qk-pc-ui 2.9.2 → 2.9.4
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/qk-pc-ui.mjs +1164 -1089
- package/dist/qk-pc-ui.umd.js +38 -38
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/qk-pc-ui.mjs
CHANGED
|
@@ -375,12 +375,12 @@ var table_fmt = {
|
|
|
375
375
|
44: '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'
|
|
376
376
|
};
|
|
377
377
|
function SSF_frac(e, r, t) {
|
|
378
|
-
for (var a = e < 0 ? -1 : 1, n = e * a, i = 0, s = 1, l = 0, o = 1, f = 0, c = 0,
|
|
379
|
-
n = 1 / (n -
|
|
378
|
+
for (var a = e < 0 ? -1 : 1, n = e * a, i = 0, s = 1, l = 0, o = 1, f = 0, c = 0, _ = Math.floor(n); f < r && (_ = Math.floor(n), l = _ * s + i, c = _ * f + o, !(n - _ < 5e-8)); )
|
|
379
|
+
n = 1 / (n - _), i = s, s = l, o = f, f = c;
|
|
380
380
|
if (c > r && (f > r ? (c = o, l = i) : (c = f, l = s)), !t)
|
|
381
381
|
return [0, a * l, c];
|
|
382
|
-
var
|
|
383
|
-
return [
|
|
382
|
+
var d = Math.floor(a * l / c);
|
|
383
|
+
return [d, a * l - d * c, c];
|
|
384
384
|
}
|
|
385
385
|
function SSF_parse_date_code(e, r, t) {
|
|
386
386
|
if (e > 2958465 || e < 0)
|
|
@@ -648,7 +648,7 @@ function write_num_flt(e, r, t) {
|
|
|
648
648
|
if (r.match(/^#+0+$/))
|
|
649
649
|
return f + pad0r(o, r.length - r.indexOf("0"));
|
|
650
650
|
if (i = r.match(dec1))
|
|
651
|
-
return n = rnd(t, i[1].length).replace(/^([^\.]+)$/, "$1." + hashq(i[1])).replace(/\.$/, "." + hashq(i[1])).replace(/\.(\d*)$/, function(
|
|
651
|
+
return n = rnd(t, i[1].length).replace(/^([^\.]+)$/, "$1." + hashq(i[1])).replace(/\.$/, "." + hashq(i[1])).replace(/\.(\d*)$/, function(m, u) {
|
|
652
652
|
return "." + u + fill("0", hashq(
|
|
653
653
|
/*::(*/
|
|
654
654
|
i[1]
|
|
@@ -663,8 +663,8 @@ function write_num_flt(e, r, t) {
|
|
|
663
663
|
if (i = r.match(/^#,#*,#0/))
|
|
664
664
|
return write_num_flt(e, r.replace(/^#,#*,/, ""), t);
|
|
665
665
|
if (i = r.match(/^([0#]+)(\\?-([0#]+))+$/))
|
|
666
|
-
return n = _strrev(write_num_flt(e, r.replace(/[\\-]/g, ""), t)), s = 0, _strrev(_strrev(r.replace(/\\/g, "")).replace(/[0#]/g, function(
|
|
667
|
-
return s < n.length ? n.charAt(s++) :
|
|
666
|
+
return n = _strrev(write_num_flt(e, r.replace(/[\\-]/g, ""), t)), s = 0, _strrev(_strrev(r.replace(/\\/g, "")).replace(/[0#]/g, function(m) {
|
|
667
|
+
return s < n.length ? n.charAt(s++) : m === "0" ? "0" : "";
|
|
668
668
|
}));
|
|
669
669
|
if (r.match(phone))
|
|
670
670
|
return n = write_num_flt(e, "##########", t), "(" + n.substr(0, 3) + ") " + n.substr(3, 3) + "-" + n.substr(6);
|
|
@@ -688,12 +688,12 @@ function write_num_flt(e, r, t) {
|
|
|
688
688
|
return n = pad0r(t, 0), r.length <= n.length ? n : hashq(r.substr(0, r.length - n.length)) + n;
|
|
689
689
|
if (i = r.match(/^([#0?]+)\.([#0]+)$/)) {
|
|
690
690
|
n = "" + t.toFixed(Math.min(i[2].length, 10)).replace(/([^0])0+$/, "$1"), s = n.indexOf(".");
|
|
691
|
-
var
|
|
692
|
-
return hashq(r.substr(0,
|
|
691
|
+
var _ = r.indexOf(".") - s, d = r.length - n.length - _;
|
|
692
|
+
return hashq(r.substr(0, _) + n + r.substr(r.length - d));
|
|
693
693
|
}
|
|
694
694
|
if (i = r.match(/^00,000\.([#0]*0)$/))
|
|
695
|
-
return s = dec(t, i[1].length), t < 0 ? "-" + write_num_flt(e, r, -t) : commaify(flr(t)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(
|
|
696
|
-
return "00," + (
|
|
695
|
+
return s = dec(t, i[1].length), t < 0 ? "-" + write_num_flt(e, r, -t) : commaify(flr(t)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(m) {
|
|
696
|
+
return "00," + (m.length < 3 ? pad0(0, 3 - m.length) : "") + m;
|
|
697
697
|
}) + "." + pad0(s, i[1].length);
|
|
698
698
|
switch (r) {
|
|
699
699
|
case "###,##0.00":
|
|
@@ -763,7 +763,7 @@ function write_num_int(e, r, t) {
|
|
|
763
763
|
if (r.match(/^#+0+$/))
|
|
764
764
|
return f + pad0(o, r.length - r.indexOf("0"));
|
|
765
765
|
if (i = r.match(dec1))
|
|
766
|
-
return n = ("" + t).replace(/^([^\.]+)$/, "$1." + hashq(i[1])).replace(/\.$/, "." + hashq(i[1])), n = n.replace(/\.(\d*)$/, function(
|
|
766
|
+
return n = ("" + t).replace(/^([^\.]+)$/, "$1." + hashq(i[1])).replace(/\.$/, "." + hashq(i[1])), n = n.replace(/\.(\d*)$/, function(m, u) {
|
|
767
767
|
return "." + u + fill("0", hashq(i[1]).length - u.length);
|
|
768
768
|
}), r.indexOf("0.") !== -1 ? n : n.replace(/^0\./, ".");
|
|
769
769
|
if (r = r.replace(/^#+([0.])/, "$1"), i = r.match(/^(0*)\.(#*)$/))
|
|
@@ -775,8 +775,8 @@ function write_num_int(e, r, t) {
|
|
|
775
775
|
if (i = r.match(/^#,#*,#0/))
|
|
776
776
|
return write_num_int(e, r.replace(/^#,#*,/, ""), t);
|
|
777
777
|
if (i = r.match(/^([0#]+)(\\?-([0#]+))+$/))
|
|
778
|
-
return n = _strrev(write_num_int(e, r.replace(/[\\-]/g, ""), t)), s = 0, _strrev(_strrev(r.replace(/\\/g, "")).replace(/[0#]/g, function(
|
|
779
|
-
return s < n.length ? n.charAt(s++) :
|
|
778
|
+
return n = _strrev(write_num_int(e, r.replace(/[\\-]/g, ""), t)), s = 0, _strrev(_strrev(r.replace(/\\/g, "")).replace(/[0#]/g, function(m) {
|
|
779
|
+
return s < n.length ? n.charAt(s++) : m === "0" ? "0" : "";
|
|
780
780
|
}));
|
|
781
781
|
if (r.match(phone))
|
|
782
782
|
return n = write_num_int(e, "##########", t), "(" + n.substr(0, 3) + ") " + n.substr(3, 3) + "-" + n.substr(6);
|
|
@@ -800,12 +800,12 @@ function write_num_int(e, r, t) {
|
|
|
800
800
|
return n = "" + t, r.length <= n.length ? n : hashq(r.substr(0, r.length - n.length)) + n;
|
|
801
801
|
if (i = r.match(/^([#0]+)\.([#0]+)$/)) {
|
|
802
802
|
n = "" + t.toFixed(Math.min(i[2].length, 10)).replace(/([^0])0+$/, "$1"), s = n.indexOf(".");
|
|
803
|
-
var
|
|
804
|
-
return hashq(r.substr(0,
|
|
803
|
+
var _ = r.indexOf(".") - s, d = r.length - n.length - _;
|
|
804
|
+
return hashq(r.substr(0, _) + n + r.substr(r.length - d));
|
|
805
805
|
}
|
|
806
806
|
if (i = r.match(/^00,000\.([#0]*0)$/))
|
|
807
|
-
return t < 0 ? "-" + write_num_int(e, r, -t) : commaify("" + t).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(
|
|
808
|
-
return "00," + (
|
|
807
|
+
return t < 0 ? "-" + write_num_int(e, r, -t) : commaify("" + t).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(m) {
|
|
808
|
+
return "00," + (m.length < 3 ? pad0(0, 3 - m.length) : "") + m;
|
|
809
809
|
}) + "." + pad0(0, i[1].length);
|
|
810
810
|
switch (r) {
|
|
811
811
|
case "###,###":
|
|
@@ -938,7 +938,7 @@ function fmt_is_date(e) {
|
|
|
938
938
|
return !1;
|
|
939
939
|
}
|
|
940
940
|
function eval_fmt(e, r, t, a) {
|
|
941
|
-
for (var n = [], i = "", s = 0, l = "", o = "t", f, c,
|
|
941
|
+
for (var n = [], i = "", s = 0, l = "", o = "t", f, c, _, d = "H"; s < e.length; )
|
|
942
942
|
switch (l = e.charAt(s)) {
|
|
943
943
|
case "G":
|
|
944
944
|
if (!SSF_isgeneral(e, s))
|
|
@@ -946,13 +946,13 @@ function eval_fmt(e, r, t, a) {
|
|
|
946
946
|
n[n.length] = { t: "G", v: "General" }, s += 7;
|
|
947
947
|
break;
|
|
948
948
|
case '"':
|
|
949
|
-
for (i = ""; (
|
|
950
|
-
i += String.fromCharCode(
|
|
949
|
+
for (i = ""; (_ = e.charCodeAt(++s)) !== 34 && s < e.length; )
|
|
950
|
+
i += String.fromCharCode(_);
|
|
951
951
|
n[n.length] = { t: "t", v: i }, ++s;
|
|
952
952
|
break;
|
|
953
953
|
case "\\":
|
|
954
|
-
var h = e.charAt(++s),
|
|
955
|
-
n[n.length] = { t:
|
|
954
|
+
var h = e.charAt(++s), m = h === "(" || h === ")" ? h : "t";
|
|
955
|
+
n[n.length] = { t: m, v: h }, ++s;
|
|
956
956
|
break;
|
|
957
957
|
case "_":
|
|
958
958
|
n[n.length] = { t: "t", v: " " }, s += 2;
|
|
@@ -986,13 +986,13 @@ function eval_fmt(e, r, t, a) {
|
|
|
986
986
|
return "";
|
|
987
987
|
for (i = l; ++s < e.length && e.charAt(s).toLowerCase() === l; )
|
|
988
988
|
i += l;
|
|
989
|
-
l === "m" && o.toLowerCase() === "h" && (l = "M"), l === "h" && (l =
|
|
989
|
+
l === "m" && o.toLowerCase() === "h" && (l = "M"), l === "h" && (l = d), n[n.length] = { t: l, v: i }, o = l;
|
|
990
990
|
break;
|
|
991
991
|
case "A":
|
|
992
992
|
case "a":
|
|
993
993
|
case "上":
|
|
994
994
|
var u = { t: l, v: l };
|
|
995
|
-
if (f == null && (f = SSF_parse_date_code(r, t)), e.substr(s, 3).toUpperCase() === "A/P" ? (f != null && (u.v = f.H >= 12 ? "P" : "A"), u.t = "T",
|
|
995
|
+
if (f == null && (f = SSF_parse_date_code(r, t)), e.substr(s, 3).toUpperCase() === "A/P" ? (f != null && (u.v = f.H >= 12 ? "P" : "A"), u.t = "T", d = "h", s += 3) : e.substr(s, 5).toUpperCase() === "AM/PM" ? (f != null && (u.v = f.H >= 12 ? "PM" : "AM"), u.t = "T", s += 5, d = "h") : e.substr(s, 5).toUpperCase() === "上午/下午" ? (f != null && (u.v = f.H >= 12 ? "下午" : "上午"), u.t = "T", s += 5, d = "h") : (u.t = "t", ++s), f == null && u.t === "T")
|
|
996
996
|
return "";
|
|
997
997
|
n[n.length] = u, o = l;
|
|
998
998
|
break;
|
|
@@ -1063,7 +1063,7 @@ function eval_fmt(e, r, t, a) {
|
|
|
1063
1063
|
switch (n[s].t) {
|
|
1064
1064
|
case "h":
|
|
1065
1065
|
case "H":
|
|
1066
|
-
n[s].t =
|
|
1066
|
+
n[s].t = d, o = "h", p < 1 && (p = 1);
|
|
1067
1067
|
break;
|
|
1068
1068
|
case "s":
|
|
1069
1069
|
(I = n[s].v.match(/\.0+$/)) && (C = Math.max(C, I[0].length - 1)), p < 3 && (p = 3);
|
|
@@ -1124,9 +1124,9 @@ function eval_fmt(e, r, t, a) {
|
|
|
1124
1124
|
n[s].t = "t", n[s].v = SSF_general(r, t);
|
|
1125
1125
|
break;
|
|
1126
1126
|
}
|
|
1127
|
-
var X = "", z,
|
|
1127
|
+
var X = "", z, y;
|
|
1128
1128
|
if (k.length > 0) {
|
|
1129
|
-
k.charCodeAt(0) == 40 ? (z = r < 0 && k.charCodeAt(0) === 45 ? -r : r,
|
|
1129
|
+
k.charCodeAt(0) == 40 ? (z = r < 0 && k.charCodeAt(0) === 45 ? -r : r, y = write_num("n", k, z)) : (z = r < 0 && a > 1 ? -r : r, y = write_num("n", k, z), z < 0 && n[0] && n[0].t == "t" && (y = y.substr(1), n[0].v = "-" + n[0].v)), b = y.length - 1;
|
|
1130
1130
|
var B = n.length;
|
|
1131
1131
|
for (s = 0; s < n.length; ++s)
|
|
1132
1132
|
if (n[s] != null && n[s].t != "t" && n[s].v.indexOf(".") > -1) {
|
|
@@ -1134,21 +1134,21 @@ function eval_fmt(e, r, t, a) {
|
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
1136
|
var A = n.length;
|
|
1137
|
-
if (B === n.length &&
|
|
1137
|
+
if (B === n.length && y.indexOf("E") === -1) {
|
|
1138
1138
|
for (s = n.length - 1; s >= 0; --s)
|
|
1139
|
-
n[s] == null || "n?".indexOf(n[s].t) === -1 || (b >= n[s].v.length - 1 ? (b -= n[s].v.length, n[s].v =
|
|
1140
|
-
b >= 0 && A < n.length && (n[A].v =
|
|
1141
|
-
} else if (B !== n.length &&
|
|
1142
|
-
for (b =
|
|
1139
|
+
n[s] == null || "n?".indexOf(n[s].t) === -1 || (b >= n[s].v.length - 1 ? (b -= n[s].v.length, n[s].v = y.substr(b + 1, n[s].v.length)) : b < 0 ? n[s].v = "" : (n[s].v = y.substr(0, b + 1), b = -1), n[s].t = "t", A = s);
|
|
1140
|
+
b >= 0 && A < n.length && (n[A].v = y.substr(0, b + 1) + n[A].v);
|
|
1141
|
+
} else if (B !== n.length && y.indexOf("E") === -1) {
|
|
1142
|
+
for (b = y.indexOf(".") - 1, s = B; s >= 0; --s)
|
|
1143
1143
|
if (!(n[s] == null || "n?".indexOf(n[s].t) === -1)) {
|
|
1144
1144
|
for (c = n[s].v.indexOf(".") > -1 && s === B ? n[s].v.indexOf(".") - 1 : n[s].v.length - 1, X = n[s].v.substr(c + 1); c >= 0; --c)
|
|
1145
|
-
b >= 0 && (n[s].v.charAt(c) === "0" || n[s].v.charAt(c) === "#") && (X =
|
|
1145
|
+
b >= 0 && (n[s].v.charAt(c) === "0" || n[s].v.charAt(c) === "#") && (X = y.charAt(b--) + X);
|
|
1146
1146
|
n[s].v = X, n[s].t = "t", A = s;
|
|
1147
1147
|
}
|
|
1148
|
-
for (b >= 0 && A < n.length && (n[A].v =
|
|
1148
|
+
for (b >= 0 && A < n.length && (n[A].v = y.substr(0, b + 1) + n[A].v), b = y.indexOf(".") + 1, s = B; s < n.length; ++s)
|
|
1149
1149
|
if (!(n[s] == null || "n?(".indexOf(n[s].t) === -1 && s !== B)) {
|
|
1150
1150
|
for (c = n[s].v.indexOf(".") > -1 && s === B ? n[s].v.indexOf(".") + 1 : 0, X = n[s].v.substr(0, c); c < n[s].v.length; ++c)
|
|
1151
|
-
b <
|
|
1151
|
+
b < y.length && (X += y.charAt(b++));
|
|
1152
1152
|
n[s].v = X, n[s].t = "t", A = s;
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
@@ -1275,9 +1275,9 @@ function dateNF_regex(e) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
function dateNF_fix(e, r, t) {
|
|
1277
1277
|
var a = -1, n = -1, i = -1, s = -1, l = -1, o = -1;
|
|
1278
|
-
(r.match(dateNFregex) || []).forEach(function(
|
|
1279
|
-
var h = parseInt(t[
|
|
1280
|
-
switch (
|
|
1278
|
+
(r.match(dateNFregex) || []).forEach(function(_, d) {
|
|
1279
|
+
var h = parseInt(t[d + 1], 10);
|
|
1280
|
+
switch (_.toLowerCase().charAt(0)) {
|
|
1281
1281
|
case "y":
|
|
1282
1282
|
a = h;
|
|
1283
1283
|
break;
|
|
@@ -1304,96 +1304,96 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1304
1304
|
var e = {};
|
|
1305
1305
|
e.version = "1.2.0";
|
|
1306
1306
|
function r() {
|
|
1307
|
-
for (var
|
|
1308
|
-
|
|
1307
|
+
for (var y = 0, B = new Array(256), A = 0; A != 256; ++A)
|
|
1308
|
+
y = A, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, y = y & 1 ? -306674912 ^ y >>> 1 : y >>> 1, B[A] = y;
|
|
1309
1309
|
return typeof Int32Array < "u" ? new Int32Array(B) : B;
|
|
1310
1310
|
}
|
|
1311
1311
|
var t = r();
|
|
1312
|
-
function a(
|
|
1312
|
+
function a(y) {
|
|
1313
1313
|
var B = 0, A = 0, N = 0, V = typeof Int32Array < "u" ? new Int32Array(4096) : new Array(4096);
|
|
1314
1314
|
for (N = 0; N != 256; ++N)
|
|
1315
|
-
V[N] =
|
|
1315
|
+
V[N] = y[N];
|
|
1316
1316
|
for (N = 0; N != 256; ++N)
|
|
1317
|
-
for (A =
|
|
1318
|
-
A = V[B] = A >>> 8 ^
|
|
1317
|
+
for (A = y[N], B = 256 + N; B < 4096; B += 256)
|
|
1318
|
+
A = V[B] = A >>> 8 ^ y[A & 255];
|
|
1319
1319
|
var G = [];
|
|
1320
1320
|
for (N = 1; N != 16; ++N)
|
|
1321
1321
|
G[N - 1] = typeof Int32Array < "u" ? V.subarray(N * 256, N * 256 + 256) : V.slice(N * 256, N * 256 + 256);
|
|
1322
1322
|
return G;
|
|
1323
1323
|
}
|
|
1324
|
-
var n = a(t), i = n[0], s = n[1], l = n[2], o = n[3], f = n[4], c = n[5],
|
|
1325
|
-
function b(
|
|
1326
|
-
for (var A = B ^ -1, N = 0, V =
|
|
1327
|
-
A = A >>> 8 ^ t[(A ^
|
|
1324
|
+
var n = a(t), i = n[0], s = n[1], l = n[2], o = n[3], f = n[4], c = n[5], _ = n[6], d = n[7], h = n[8], m = n[9], u = n[10], p = n[11], C = n[12], I = n[13], k = n[14];
|
|
1325
|
+
function b(y, B) {
|
|
1326
|
+
for (var A = B ^ -1, N = 0, V = y.length; N < V; )
|
|
1327
|
+
A = A >>> 8 ^ t[(A ^ y.charCodeAt(N++)) & 255];
|
|
1328
1328
|
return ~A;
|
|
1329
1329
|
}
|
|
1330
|
-
function X(
|
|
1331
|
-
for (var A = B ^ -1, N =
|
|
1332
|
-
A = k[
|
|
1330
|
+
function X(y, B) {
|
|
1331
|
+
for (var A = B ^ -1, N = y.length - 15, V = 0; V < N; )
|
|
1332
|
+
A = k[y[V++] ^ A & 255] ^ I[y[V++] ^ A >> 8 & 255] ^ C[y[V++] ^ A >> 16 & 255] ^ p[y[V++] ^ A >>> 24] ^ u[y[V++]] ^ m[y[V++]] ^ h[y[V++]] ^ d[y[V++]] ^ _[y[V++]] ^ c[y[V++]] ^ f[y[V++]] ^ o[y[V++]] ^ l[y[V++]] ^ s[y[V++]] ^ i[y[V++]] ^ t[y[V++]];
|
|
1333
1333
|
for (N += 15; V < N; )
|
|
1334
|
-
A = A >>> 8 ^ t[(A ^
|
|
1334
|
+
A = A >>> 8 ^ t[(A ^ y[V++]) & 255];
|
|
1335
1335
|
return ~A;
|
|
1336
1336
|
}
|
|
1337
|
-
function z(
|
|
1338
|
-
for (var A = B ^ -1, N = 0, V =
|
|
1339
|
-
G =
|
|
1337
|
+
function z(y, B) {
|
|
1338
|
+
for (var A = B ^ -1, N = 0, V = y.length, G = 0, Y = 0; N < V; )
|
|
1339
|
+
G = y.charCodeAt(N++), G < 128 ? A = A >>> 8 ^ t[(A ^ G) & 255] : G < 2048 ? (A = A >>> 8 ^ t[(A ^ (192 | G >> 6 & 31)) & 255], A = A >>> 8 ^ t[(A ^ (128 | G & 63)) & 255]) : G >= 55296 && G < 57344 ? (G = (G & 1023) + 64, Y = y.charCodeAt(N++) & 1023, A = A >>> 8 ^ t[(A ^ (240 | G >> 8 & 7)) & 255], A = A >>> 8 ^ t[(A ^ (128 | G >> 2 & 63)) & 255], A = A >>> 8 ^ t[(A ^ (128 | Y >> 6 & 15 | (G & 3) << 4)) & 255], A = A >>> 8 ^ t[(A ^ (128 | Y & 63)) & 255]) : (A = A >>> 8 ^ t[(A ^ (224 | G >> 12 & 15)) & 255], A = A >>> 8 ^ t[(A ^ (128 | G >> 6 & 63)) & 255], A = A >>> 8 ^ t[(A ^ (128 | G & 63)) & 255]);
|
|
1340
1340
|
return ~A;
|
|
1341
1341
|
}
|
|
1342
1342
|
return e.table = t, e.bstr = b, e.buf = X, e.str = z, e;
|
|
1343
1343
|
}(), CFB = /* @__PURE__ */ function() {
|
|
1344
1344
|
var r = {};
|
|
1345
1345
|
r.version = "1.2.1";
|
|
1346
|
-
function t(
|
|
1347
|
-
for (var g =
|
|
1348
|
-
if (
|
|
1349
|
-
return
|
|
1346
|
+
function t(x, v) {
|
|
1347
|
+
for (var g = x.split("/"), w = v.split("/"), T = 0, S = 0, R = Math.min(g.length, w.length); T < R; ++T) {
|
|
1348
|
+
if (S = g[T].length - w[T].length)
|
|
1349
|
+
return S;
|
|
1350
1350
|
if (g[T] != w[T])
|
|
1351
1351
|
return g[T] < w[T] ? -1 : 1;
|
|
1352
1352
|
}
|
|
1353
1353
|
return g.length - w.length;
|
|
1354
1354
|
}
|
|
1355
|
-
function a(
|
|
1356
|
-
if (
|
|
1357
|
-
return
|
|
1358
|
-
var v =
|
|
1359
|
-
return v === -1 ?
|
|
1355
|
+
function a(x) {
|
|
1356
|
+
if (x.charAt(x.length - 1) == "/")
|
|
1357
|
+
return x.slice(0, -1).indexOf("/") === -1 ? x : a(x.slice(0, -1));
|
|
1358
|
+
var v = x.lastIndexOf("/");
|
|
1359
|
+
return v === -1 ? x : x.slice(0, v + 1);
|
|
1360
1360
|
}
|
|
1361
|
-
function n(
|
|
1362
|
-
if (
|
|
1363
|
-
return n(
|
|
1364
|
-
var v =
|
|
1365
|
-
return v === -1 ?
|
|
1361
|
+
function n(x) {
|
|
1362
|
+
if (x.charAt(x.length - 1) == "/")
|
|
1363
|
+
return n(x.slice(0, -1));
|
|
1364
|
+
var v = x.lastIndexOf("/");
|
|
1365
|
+
return v === -1 ? x : x.slice(v + 1);
|
|
1366
1366
|
}
|
|
1367
|
-
function i(
|
|
1367
|
+
function i(x, v) {
|
|
1368
1368
|
typeof v == "string" && (v = new Date(v));
|
|
1369
1369
|
var g = v.getHours();
|
|
1370
|
-
g = g << 6 | v.getMinutes(), g = g << 5 | v.getSeconds() >>> 1,
|
|
1370
|
+
g = g << 6 | v.getMinutes(), g = g << 5 | v.getSeconds() >>> 1, x.write_shift(2, g);
|
|
1371
1371
|
var w = v.getFullYear() - 1980;
|
|
1372
|
-
w = w << 4 | v.getMonth() + 1, w = w << 5 | v.getDate(),
|
|
1372
|
+
w = w << 4 | v.getMonth() + 1, w = w << 5 | v.getDate(), x.write_shift(2, w);
|
|
1373
1373
|
}
|
|
1374
|
-
function s(
|
|
1375
|
-
var v =
|
|
1374
|
+
function s(x) {
|
|
1375
|
+
var v = x.read_shift(2) & 65535, g = x.read_shift(2) & 65535, w = /* @__PURE__ */ new Date(), T = g & 31;
|
|
1376
1376
|
g >>>= 5;
|
|
1377
|
-
var
|
|
1378
|
-
g >>>= 4, w.setMilliseconds(0), w.setFullYear(g + 1980), w.setMonth(
|
|
1377
|
+
var S = g & 15;
|
|
1378
|
+
g >>>= 4, w.setMilliseconds(0), w.setFullYear(g + 1980), w.setMonth(S - 1), w.setDate(T);
|
|
1379
1379
|
var R = v & 31;
|
|
1380
1380
|
v >>>= 5;
|
|
1381
1381
|
var H = v & 63;
|
|
1382
1382
|
return v >>>= 6, w.setHours(v), w.setMinutes(H), w.setSeconds(R << 1), w;
|
|
1383
1383
|
}
|
|
1384
|
-
function l(
|
|
1385
|
-
prep_blob(
|
|
1384
|
+
function l(x) {
|
|
1385
|
+
prep_blob(x, 0);
|
|
1386
1386
|
for (var v = (
|
|
1387
1387
|
/*::(*/
|
|
1388
1388
|
{}
|
|
1389
|
-
), g = 0;
|
|
1390
|
-
var w =
|
|
1389
|
+
), g = 0; x.l <= x.length - 4; ) {
|
|
1390
|
+
var w = x.read_shift(2), T = x.read_shift(2), S = x.l + T, R = {};
|
|
1391
1391
|
switch (w) {
|
|
1392
1392
|
case 21589:
|
|
1393
|
-
g =
|
|
1393
|
+
g = x.read_shift(1), g & 1 && (R.mtime = x.read_shift(4)), T > 5 && (g & 2 && (R.atime = x.read_shift(4)), g & 4 && (R.ctime = x.read_shift(4))), R.mtime && (R.mt = new Date(R.mtime * 1e3));
|
|
1394
1394
|
break;
|
|
1395
1395
|
}
|
|
1396
|
-
|
|
1396
|
+
x.l = S, v[w] = R;
|
|
1397
1397
|
}
|
|
1398
1398
|
return v;
|
|
1399
1399
|
}
|
|
@@ -1401,19 +1401,19 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1401
1401
|
function f() {
|
|
1402
1402
|
return o || (o = {});
|
|
1403
1403
|
}
|
|
1404
|
-
function c(
|
|
1405
|
-
if (
|
|
1406
|
-
return Je(
|
|
1407
|
-
if ((
|
|
1408
|
-
return lt(
|
|
1409
|
-
if (
|
|
1410
|
-
throw new Error("CFB file size " +
|
|
1411
|
-
var g = 3, w = 512, T = 0,
|
|
1404
|
+
function c(x, v) {
|
|
1405
|
+
if (x[0] == 80 && x[1] == 75)
|
|
1406
|
+
return Je(x, v);
|
|
1407
|
+
if ((x[0] | 32) == 109 && (x[1] | 32) == 105)
|
|
1408
|
+
return lt(x, v);
|
|
1409
|
+
if (x.length < 512)
|
|
1410
|
+
throw new Error("CFB file size " + x.length + " < 512");
|
|
1411
|
+
var g = 3, w = 512, T = 0, S = 0, R = 0, H = 0, O = 0, M = [], U = (
|
|
1412
1412
|
/*::(*/
|
|
1413
|
-
|
|
1413
|
+
x.slice(0, 512)
|
|
1414
1414
|
);
|
|
1415
1415
|
prep_blob(U, 0);
|
|
1416
|
-
var K =
|
|
1416
|
+
var K = _(U);
|
|
1417
1417
|
switch (g = K[0], g) {
|
|
1418
1418
|
case 3:
|
|
1419
1419
|
w = 512;
|
|
@@ -1423,46 +1423,46 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1423
1423
|
break;
|
|
1424
1424
|
case 0:
|
|
1425
1425
|
if (K[1] == 0)
|
|
1426
|
-
return Je(
|
|
1426
|
+
return Je(x, v);
|
|
1427
1427
|
default:
|
|
1428
1428
|
throw new Error("Major Version: Expected 3 or 4 saw " + g);
|
|
1429
1429
|
}
|
|
1430
1430
|
w !== 512 && (U = /*::(*/
|
|
1431
|
-
|
|
1431
|
+
x.slice(0, w), prep_blob(
|
|
1432
1432
|
U,
|
|
1433
1433
|
28
|
|
1434
1434
|
/* blob.l */
|
|
1435
1435
|
));
|
|
1436
|
-
var Z =
|
|
1437
|
-
|
|
1436
|
+
var Z = x.slice(0, w);
|
|
1437
|
+
d(U, g);
|
|
1438
1438
|
var te = U.read_shift(4, "i");
|
|
1439
1439
|
if (g === 3 && te !== 0)
|
|
1440
1440
|
throw new Error("# Directory Sectors: Expected 0 saw " + te);
|
|
1441
|
-
U.l += 4, R = U.read_shift(4, "i"), U.l += 4, U.chk("00100000", "Mini Stream Cutoff Size: "), H = U.read_shift(4, "i"), T = U.read_shift(4, "i"), O = U.read_shift(4, "i"),
|
|
1441
|
+
U.l += 4, R = U.read_shift(4, "i"), U.l += 4, U.chk("00100000", "Mini Stream Cutoff Size: "), H = U.read_shift(4, "i"), T = U.read_shift(4, "i"), O = U.read_shift(4, "i"), S = U.read_shift(4, "i");
|
|
1442
1442
|
for (var J = -1, ee = 0; ee < 109 && (J = U.read_shift(4, "i"), !(J < 0)); ++ee)
|
|
1443
1443
|
M[ee] = J;
|
|
1444
|
-
var se = h(
|
|
1445
|
-
p(O,
|
|
1444
|
+
var se = h(x, w);
|
|
1445
|
+
p(O, S, se, w, M);
|
|
1446
1446
|
var _e = I(se, R, M, w);
|
|
1447
1447
|
_e[R].name = "!Directory", T > 0 && H !== Y && (_e[H].name = "!MiniFAT"), _e[M[0]].name = "!FAT", _e.fat_addrs = M, _e.ssz = w;
|
|
1448
1448
|
var pe = {}, we = [], Be = [], Le = [];
|
|
1449
|
-
k(R, _e, se, we, T, pe, Be, H),
|
|
1449
|
+
k(R, _e, se, we, T, pe, Be, H), m(Be, Le, we), we.shift();
|
|
1450
1450
|
var De = {
|
|
1451
1451
|
FileIndex: Be,
|
|
1452
1452
|
FullPaths: Le
|
|
1453
1453
|
};
|
|
1454
1454
|
return v && v.raw && (De.raw = { header: Z, sectors: se }), De;
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1457
|
-
if (
|
|
1456
|
+
function _(x) {
|
|
1457
|
+
if (x[x.l] == 80 && x[x.l + 1] == 75)
|
|
1458
1458
|
return [0, 0];
|
|
1459
|
-
|
|
1460
|
-
var v =
|
|
1461
|
-
return [
|
|
1459
|
+
x.chk(le, "Header Signature: "), x.l += 16;
|
|
1460
|
+
var v = x.read_shift(2, "u");
|
|
1461
|
+
return [x.read_shift(2, "u"), v];
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1463
|
+
function d(x, v) {
|
|
1464
1464
|
var g = 9;
|
|
1465
|
-
switch (
|
|
1465
|
+
switch (x.l += 2, g = x.read_shift(2)) {
|
|
1466
1466
|
case 9:
|
|
1467
1467
|
if (v != 3)
|
|
1468
1468
|
throw new Error("Sector Shift: Expected 9 saw " + g);
|
|
@@ -1474,22 +1474,22 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1474
1474
|
default:
|
|
1475
1475
|
throw new Error("Sector Shift: Expected 9 or 12 saw " + g);
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1477
|
+
x.chk("0600", "Mini Sector Shift: "), x.chk("000000000000", "Reserved: ");
|
|
1478
1478
|
}
|
|
1479
|
-
function h(
|
|
1480
|
-
for (var g = Math.ceil(
|
|
1481
|
-
w[T - 1] =
|
|
1482
|
-
return w[g - 1] =
|
|
1479
|
+
function h(x, v) {
|
|
1480
|
+
for (var g = Math.ceil(x.length / v) - 1, w = [], T = 1; T < g; ++T)
|
|
1481
|
+
w[T - 1] = x.slice(T * v, (T + 1) * v);
|
|
1482
|
+
return w[g - 1] = x.slice(g * v), w;
|
|
1483
1483
|
}
|
|
1484
|
-
function x
|
|
1485
|
-
for (var w = 0, T = 0,
|
|
1484
|
+
function m(x, v, g) {
|
|
1485
|
+
for (var w = 0, T = 0, S = 0, R = 0, H = 0, O = g.length, M = [], U = []; w < O; ++w)
|
|
1486
1486
|
M[w] = U[w] = w, v[w] = g[w];
|
|
1487
1487
|
for (; H < U.length; ++H)
|
|
1488
|
-
w = U[H], T =
|
|
1488
|
+
w = U[H], T = x[w].L, S = x[w].R, R = x[w].C, M[w] === w && (T !== -1 && M[T] !== T && (M[w] = M[T]), S !== -1 && M[S] !== S && (M[w] = M[S])), R !== -1 && (M[R] = w), T !== -1 && w != M[w] && (M[T] = M[w], U.lastIndexOf(T) < H && U.push(T)), S !== -1 && w != M[w] && (M[S] = M[w], U.lastIndexOf(S) < H && U.push(S));
|
|
1489
1489
|
for (w = 1; w < O; ++w)
|
|
1490
|
-
M[w] === w && (
|
|
1490
|
+
M[w] === w && (S !== -1 && M[S] !== S ? M[w] = M[S] : T !== -1 && M[T] !== T && (M[w] = M[T]));
|
|
1491
1491
|
for (w = 1; w < O; ++w)
|
|
1492
|
-
if (
|
|
1492
|
+
if (x[w].type !== 0) {
|
|
1493
1493
|
if (H = w, H != M[H])
|
|
1494
1494
|
do
|
|
1495
1495
|
H = M[H], v[w] = v[H] + "/" + v[w];
|
|
@@ -1497,62 +1497,62 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1497
1497
|
M[w] = -1;
|
|
1498
1498
|
}
|
|
1499
1499
|
for (v[0] += "/", w = 1; w < O; ++w)
|
|
1500
|
-
|
|
1500
|
+
x[w].type !== 2 && (v[w] += "/");
|
|
1501
1501
|
}
|
|
1502
|
-
function u(
|
|
1503
|
-
for (var w =
|
|
1504
|
-
|
|
1505
|
-
return
|
|
1502
|
+
function u(x, v, g) {
|
|
1503
|
+
for (var w = x.start, T = x.size, S = [], R = w; g && T > 0 && R >= 0; )
|
|
1504
|
+
S.push(v.slice(R * G, R * G + G)), T -= G, R = __readInt32LE(g, R * 4);
|
|
1505
|
+
return S.length === 0 ? new_buf(0) : bconcat(S).slice(0, x.size);
|
|
1506
1506
|
}
|
|
1507
|
-
function p(
|
|
1508
|
-
var
|
|
1509
|
-
if (
|
|
1507
|
+
function p(x, v, g, w, T) {
|
|
1508
|
+
var S = Y;
|
|
1509
|
+
if (x === Y) {
|
|
1510
1510
|
if (v !== 0)
|
|
1511
1511
|
throw new Error("DIFAT chain shorter than expected");
|
|
1512
|
-
} else if (
|
|
1513
|
-
var R = g[
|
|
1512
|
+
} else if (x !== -1) {
|
|
1513
|
+
var R = g[x], H = (w >>> 2) - 1;
|
|
1514
1514
|
if (!R)
|
|
1515
1515
|
return;
|
|
1516
|
-
for (var O = 0; O < H && (
|
|
1517
|
-
T.push(
|
|
1516
|
+
for (var O = 0; O < H && (S = __readInt32LE(R, O * 4)) !== Y; ++O)
|
|
1517
|
+
T.push(S);
|
|
1518
1518
|
p(__readInt32LE(R, w - 4), v - 1, g, w, T);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
function C(
|
|
1522
|
-
var
|
|
1521
|
+
function C(x, v, g, w, T) {
|
|
1522
|
+
var S = [], R = [];
|
|
1523
1523
|
T || (T = []);
|
|
1524
1524
|
var H = w - 1, O = 0, M = 0;
|
|
1525
1525
|
for (O = v; O >= 0; ) {
|
|
1526
|
-
T[O] = !0,
|
|
1526
|
+
T[O] = !0, S[S.length] = O, R.push(x[O]);
|
|
1527
1527
|
var U = g[Math.floor(O * 4 / w)];
|
|
1528
1528
|
if (M = O * 4 & H, w < 4 + M)
|
|
1529
1529
|
throw new Error("FAT boundary crossed: " + O + " 4 " + w);
|
|
1530
|
-
if (!
|
|
1530
|
+
if (!x[U])
|
|
1531
1531
|
break;
|
|
1532
|
-
O = __readInt32LE(
|
|
1532
|
+
O = __readInt32LE(x[U], M);
|
|
1533
1533
|
}
|
|
1534
|
-
return { nodes:
|
|
1534
|
+
return { nodes: S, data: __toBuffer([R]) };
|
|
1535
1535
|
}
|
|
1536
|
-
function I(
|
|
1537
|
-
var T =
|
|
1536
|
+
function I(x, v, g, w) {
|
|
1537
|
+
var T = x.length, S = [], R = [], H = [], O = [], M = w - 1, U = 0, K = 0, Z = 0, te = 0;
|
|
1538
1538
|
for (U = 0; U < T; ++U)
|
|
1539
1539
|
if (H = [], Z = U + v, Z >= T && (Z -= T), !R[Z]) {
|
|
1540
1540
|
O = [];
|
|
1541
1541
|
var J = [];
|
|
1542
1542
|
for (K = Z; K >= 0; ) {
|
|
1543
|
-
J[K] = !0, R[K] = !0, H[H.length] = K, O.push(
|
|
1543
|
+
J[K] = !0, R[K] = !0, H[H.length] = K, O.push(x[K]);
|
|
1544
1544
|
var ee = g[Math.floor(K * 4 / w)];
|
|
1545
1545
|
if (te = K * 4 & M, w < 4 + te)
|
|
1546
1546
|
throw new Error("FAT boundary crossed: " + K + " 4 " + w);
|
|
1547
|
-
if (!
|
|
1547
|
+
if (!x[ee] || (K = __readInt32LE(x[ee], te), J[K]))
|
|
1548
1548
|
break;
|
|
1549
1549
|
}
|
|
1550
|
-
|
|
1550
|
+
S[Z] = { nodes: H, data: __toBuffer([O]) };
|
|
1551
1551
|
}
|
|
1552
|
-
return
|
|
1552
|
+
return S;
|
|
1553
1553
|
}
|
|
1554
|
-
function k(
|
|
1555
|
-
for (var O = 0, M = w.length ? 2 : 0, U = v[
|
|
1554
|
+
function k(x, v, g, w, T, S, R, H) {
|
|
1555
|
+
for (var O = 0, M = w.length ? 2 : 0, U = v[x].data, K = 0, Z = 0, te; K < U.length; K += 128) {
|
|
1556
1556
|
var J = (
|
|
1557
1557
|
/*::(*/
|
|
1558
1558
|
U.slice(K, K + 128)
|
|
@@ -1572,56 +1572,56 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1572
1572
|
}, se = J.read_shift(2) + J.read_shift(2) + J.read_shift(2) + J.read_shift(2);
|
|
1573
1573
|
se !== 0 && (ee.ct = b(J, J.l - 8));
|
|
1574
1574
|
var _e = J.read_shift(2) + J.read_shift(2) + J.read_shift(2) + J.read_shift(2);
|
|
1575
|
-
_e !== 0 && (ee.mt = b(J, J.l - 8)), ee.start = J.read_shift(4, "i"), ee.size = J.read_shift(4, "i"), ee.size < 0 && ee.start < 0 && (ee.size = ee.type = 0, ee.start = Y, ee.name = ""), ee.type === 5 ? (O = ee.start, T > 0 && O !== Y && (v[O].name = "!StreamData")) : ee.size >= 4096 ? (ee.storage = "fat", v[ee.start] === void 0 && (v[ee.start] = C(g, ee.start, v.fat_addrs, v.ssz)), v[ee.start].name = ee.name, ee.content = v[ee.start].data.slice(0, ee.size)) : (ee.storage = "minifat", ee.size < 0 ? ee.size = 0 : O !== Y && ee.start !== Y && v[O] && (ee.content = u(ee, v[O].data, (v[H] || {}).data))), ee.content && prep_blob(ee.content, 0),
|
|
1575
|
+
_e !== 0 && (ee.mt = b(J, J.l - 8)), ee.start = J.read_shift(4, "i"), ee.size = J.read_shift(4, "i"), ee.size < 0 && ee.start < 0 && (ee.size = ee.type = 0, ee.start = Y, ee.name = ""), ee.type === 5 ? (O = ee.start, T > 0 && O !== Y && (v[O].name = "!StreamData")) : ee.size >= 4096 ? (ee.storage = "fat", v[ee.start] === void 0 && (v[ee.start] = C(g, ee.start, v.fat_addrs, v.ssz)), v[ee.start].name = ee.name, ee.content = v[ee.start].data.slice(0, ee.size)) : (ee.storage = "minifat", ee.size < 0 ? ee.size = 0 : O !== Y && ee.start !== Y && v[O] && (ee.content = u(ee, v[O].data, (v[H] || {}).data))), ee.content && prep_blob(ee.content, 0), S[te] = ee, R.push(ee);
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
|
-
function b(
|
|
1579
|
-
return new Date((__readUInt32LE(
|
|
1578
|
+
function b(x, v) {
|
|
1579
|
+
return new Date((__readUInt32LE(x, v + 4) / 1e7 * Math.pow(2, 32) + __readUInt32LE(x, v) / 1e7 - 11644473600) * 1e3);
|
|
1580
1580
|
}
|
|
1581
|
-
function X(
|
|
1582
|
-
return f(), c(o.readFileSync(
|
|
1581
|
+
function X(x, v) {
|
|
1582
|
+
return f(), c(o.readFileSync(x), v);
|
|
1583
1583
|
}
|
|
1584
|
-
function z(
|
|
1584
|
+
function z(x, v) {
|
|
1585
1585
|
var g = v && v.type;
|
|
1586
|
-
switch (g || has_buf && Buffer.isBuffer(
|
|
1586
|
+
switch (g || has_buf && Buffer.isBuffer(x) && (g = "buffer"), g || "base64") {
|
|
1587
1587
|
case "file":
|
|
1588
|
-
return X(
|
|
1588
|
+
return X(x, v);
|
|
1589
1589
|
case "base64":
|
|
1590
|
-
return c(s2a(Base64_decode(
|
|
1590
|
+
return c(s2a(Base64_decode(x)), v);
|
|
1591
1591
|
case "binary":
|
|
1592
|
-
return c(s2a(
|
|
1592
|
+
return c(s2a(x), v);
|
|
1593
1593
|
}
|
|
1594
1594
|
return c(
|
|
1595
1595
|
/*::typeof blob == 'string' ? new Buffer(blob, 'utf-8') : */
|
|
1596
|
-
|
|
1596
|
+
x,
|
|
1597
1597
|
v
|
|
1598
1598
|
);
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function y(x, v) {
|
|
1601
1601
|
var g = v || {}, w = g.root || "Root Entry";
|
|
1602
|
-
if (
|
|
1602
|
+
if (x.FullPaths || (x.FullPaths = []), x.FileIndex || (x.FileIndex = []), x.FullPaths.length !== x.FileIndex.length)
|
|
1603
1603
|
throw new Error("inconsistent CFB structure");
|
|
1604
|
-
|
|
1604
|
+
x.FullPaths.length === 0 && (x.FullPaths[0] = w + "/", x.FileIndex[0] = { name: w, type: 5 }), g.CLSID && (x.FileIndex[0].clsid = g.CLSID), B(x);
|
|
1605
1605
|
}
|
|
1606
|
-
function B(
|
|
1606
|
+
function B(x) {
|
|
1607
1607
|
var v = "Sh33tJ5";
|
|
1608
|
-
if (!CFB.find(
|
|
1608
|
+
if (!CFB.find(x, "/" + v)) {
|
|
1609
1609
|
var g = new_buf(4);
|
|
1610
|
-
g[0] = 55, g[1] = g[3] = 50, g[2] = 54,
|
|
1610
|
+
g[0] = 55, g[1] = g[3] = 50, g[2] = 54, x.FileIndex.push({ name: v, type: 2, content: g, size: 4, L: 69, R: 69, C: 69 }), x.FullPaths.push(x.FullPaths[0] + v), A(x);
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
function A(
|
|
1614
|
-
|
|
1615
|
-
for (var g = !1, w = !1, T =
|
|
1616
|
-
var
|
|
1617
|
-
switch (
|
|
1613
|
+
function A(x, v) {
|
|
1614
|
+
y(x);
|
|
1615
|
+
for (var g = !1, w = !1, T = x.FullPaths.length - 1; T >= 0; --T) {
|
|
1616
|
+
var S = x.FileIndex[T];
|
|
1617
|
+
switch (S.type) {
|
|
1618
1618
|
case 0:
|
|
1619
|
-
w ? g = !0 : (
|
|
1619
|
+
w ? g = !0 : (x.FileIndex.pop(), x.FullPaths.pop());
|
|
1620
1620
|
break;
|
|
1621
1621
|
case 1:
|
|
1622
1622
|
case 2:
|
|
1623
1623
|
case 5:
|
|
1624
|
-
w = !0, isNaN(
|
|
1624
|
+
w = !0, isNaN(S.R * S.L * S.C) && (g = !0), S.R > -1 && S.L > -1 && S.R == S.L && (g = !0);
|
|
1625
1625
|
break;
|
|
1626
1626
|
default:
|
|
1627
1627
|
g = !0;
|
|
@@ -1630,8 +1630,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
if (!(!g && !v)) {
|
|
1632
1632
|
var R = new Date(1987, 1, 19), H = 0, O = Object.create ? /* @__PURE__ */ Object.create(null) : {}, M = [];
|
|
1633
|
-
for (T = 0; T <
|
|
1634
|
-
O[
|
|
1633
|
+
for (T = 0; T < x.FullPaths.length; ++T)
|
|
1634
|
+
O[x.FullPaths[T]] = !0, x.FileIndex[T].type !== 0 && M.push([x.FullPaths[T], x.FileIndex[T]]);
|
|
1635
1635
|
for (T = 0; T < M.length; ++T) {
|
|
1636
1636
|
var U = a(M[T][0]);
|
|
1637
1637
|
w = O[U], w || (M.push([U, {
|
|
@@ -1645,30 +1645,30 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
for (M.sort(function(te, J) {
|
|
1647
1647
|
return t(te[0], J[0]);
|
|
1648
|
-
}),
|
|
1649
|
-
|
|
1648
|
+
}), x.FullPaths = [], x.FileIndex = [], T = 0; T < M.length; ++T)
|
|
1649
|
+
x.FullPaths[T] = M[T][0], x.FileIndex[T] = M[T][1];
|
|
1650
1650
|
for (T = 0; T < M.length; ++T) {
|
|
1651
|
-
var K =
|
|
1651
|
+
var K = x.FileIndex[T], Z = x.FullPaths[T];
|
|
1652
1652
|
if (K.name = n(Z).replace("/", ""), K.L = K.R = K.C = -(K.color = 1), K.size = K.content ? K.content.length : 0, K.start = 0, K.clsid = K.clsid || he, T === 0)
|
|
1653
1653
|
K.C = M.length > 1 ? 1 : -1, K.size = 0, K.type = 5;
|
|
1654
1654
|
else if (Z.slice(-1) == "/") {
|
|
1655
|
-
for (H = T + 1; H < M.length && a(
|
|
1655
|
+
for (H = T + 1; H < M.length && a(x.FullPaths[H]) != Z; ++H)
|
|
1656
1656
|
;
|
|
1657
|
-
for (K.C = H >= M.length ? -1 : H, H = T + 1; H < M.length && a(
|
|
1657
|
+
for (K.C = H >= M.length ? -1 : H, H = T + 1; H < M.length && a(x.FullPaths[H]) != a(Z); ++H)
|
|
1658
1658
|
;
|
|
1659
1659
|
K.R = H >= M.length ? -1 : H, K.type = 1;
|
|
1660
1660
|
} else
|
|
1661
|
-
a(
|
|
1661
|
+
a(x.FullPaths[T + 1] || "") == a(Z) && (K.R = T + 1), K.type = 2;
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
function N(
|
|
1665
|
+
function N(x, v) {
|
|
1666
1666
|
var g = v || {};
|
|
1667
1667
|
if (g.fileType == "mad")
|
|
1668
|
-
return ot(
|
|
1669
|
-
switch (A(
|
|
1668
|
+
return ot(x, g);
|
|
1669
|
+
switch (A(x), g.fileType) {
|
|
1670
1670
|
case "zip":
|
|
1671
|
-
return tt(
|
|
1671
|
+
return tt(x, g);
|
|
1672
1672
|
}
|
|
1673
1673
|
var w = function(te) {
|
|
1674
1674
|
for (var J = 0, ee = 0, se = 0; se < te.FileIndex.length; ++se) {
|
|
@@ -1682,43 +1682,43 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1682
1682
|
Ue = ++Ne <= 109 ? 0 : Math.ceil((Ne - 109) / 127);
|
|
1683
1683
|
var Ce = [1, Ue, Ne, Le, we, ee, J, 0];
|
|
1684
1684
|
return te.FileIndex[0].size = J << 6, Ce[7] = (te.FileIndex[0].start = Ce[0] + Ce[1] + Ce[2] + Ce[3] + Ce[4] + Ce[5]) + (Ce[6] + 7 >> 3), Ce;
|
|
1685
|
-
}(
|
|
1685
|
+
}(x), T = new_buf(w[7] << 9), S = 0, R = 0;
|
|
1686
1686
|
{
|
|
1687
|
-
for (
|
|
1688
|
-
T.write_shift(1, q[
|
|
1689
|
-
for (
|
|
1687
|
+
for (S = 0; S < 8; ++S)
|
|
1688
|
+
T.write_shift(1, q[S]);
|
|
1689
|
+
for (S = 0; S < 8; ++S)
|
|
1690
1690
|
T.write_shift(2, 0);
|
|
1691
|
-
for (T.write_shift(2, 62), T.write_shift(2, 3), T.write_shift(2, 65534), T.write_shift(2, 9), T.write_shift(2, 6),
|
|
1691
|
+
for (T.write_shift(2, 62), T.write_shift(2, 3), T.write_shift(2, 65534), T.write_shift(2, 9), T.write_shift(2, 6), S = 0; S < 3; ++S)
|
|
1692
1692
|
T.write_shift(2, 0);
|
|
1693
|
-
for (T.write_shift(4, 0), T.write_shift(4, w[2]), T.write_shift(4, w[0] + w[1] + w[2] + w[3] - 1), T.write_shift(4, 0), T.write_shift(4, 4096), T.write_shift(4, w[3] ? w[0] + w[1] + w[2] - 1 : Y), T.write_shift(4, w[3]), T.write_shift(-4, w[1] ? w[0] - 1 : Y), T.write_shift(4, w[1]),
|
|
1694
|
-
T.write_shift(-4,
|
|
1693
|
+
for (T.write_shift(4, 0), T.write_shift(4, w[2]), T.write_shift(4, w[0] + w[1] + w[2] + w[3] - 1), T.write_shift(4, 0), T.write_shift(4, 4096), T.write_shift(4, w[3] ? w[0] + w[1] + w[2] - 1 : Y), T.write_shift(4, w[3]), T.write_shift(-4, w[1] ? w[0] - 1 : Y), T.write_shift(4, w[1]), S = 0; S < 109; ++S)
|
|
1694
|
+
T.write_shift(-4, S < w[2] ? w[1] + S : -1);
|
|
1695
1695
|
}
|
|
1696
1696
|
if (w[1])
|
|
1697
1697
|
for (R = 0; R < w[1]; ++R) {
|
|
1698
|
-
for (;
|
|
1699
|
-
T.write_shift(-4,
|
|
1698
|
+
for (; S < 236 + R * 127; ++S)
|
|
1699
|
+
T.write_shift(-4, S < w[2] ? w[1] + S : -1);
|
|
1700
1700
|
T.write_shift(-4, R === w[1] - 1 ? Y : R + 1);
|
|
1701
1701
|
}
|
|
1702
1702
|
var H = function(te) {
|
|
1703
|
-
for (R += te;
|
|
1704
|
-
T.write_shift(-4,
|
|
1705
|
-
te && (++
|
|
1703
|
+
for (R += te; S < R - 1; ++S)
|
|
1704
|
+
T.write_shift(-4, S + 1);
|
|
1705
|
+
te && (++S, T.write_shift(-4, Y));
|
|
1706
1706
|
};
|
|
1707
|
-
for (R =
|
|
1707
|
+
for (R = S = 0, R += w[1]; S < R; ++S)
|
|
1708
1708
|
T.write_shift(-4, ue.DIFSECT);
|
|
1709
|
-
for (R += w[2];
|
|
1709
|
+
for (R += w[2]; S < R; ++S)
|
|
1710
1710
|
T.write_shift(-4, ue.FATSECT);
|
|
1711
1711
|
H(w[3]), H(w[4]);
|
|
1712
|
-
for (var O = 0, M = 0, U =
|
|
1713
|
-
U =
|
|
1712
|
+
for (var O = 0, M = 0, U = x.FileIndex[0]; O < x.FileIndex.length; ++O)
|
|
1713
|
+
U = x.FileIndex[O], U.content && (M = U.content.length, !(M < 4096) && (U.start = R, H(M + 511 >> 9)));
|
|
1714
1714
|
for (H(w[6] + 7 >> 3); T.l & 511; )
|
|
1715
1715
|
T.write_shift(-4, ue.ENDOFCHAIN);
|
|
1716
|
-
for (R =
|
|
1717
|
-
U =
|
|
1716
|
+
for (R = S = 0, O = 0; O < x.FileIndex.length; ++O)
|
|
1717
|
+
U = x.FileIndex[O], U.content && (M = U.content.length, !(!M || M >= 4096) && (U.start = R, H(M + 63 >> 6)));
|
|
1718
1718
|
for (; T.l & 511; )
|
|
1719
1719
|
T.write_shift(-4, ue.ENDOFCHAIN);
|
|
1720
|
-
for (
|
|
1721
|
-
var K =
|
|
1720
|
+
for (S = 0; S < w[4] << 2; ++S) {
|
|
1721
|
+
var K = x.FullPaths[S];
|
|
1722
1722
|
if (!K || K.length === 0) {
|
|
1723
1723
|
for (O = 0; O < 17; ++O)
|
|
1724
1724
|
T.write_shift(4, 0);
|
|
@@ -1728,8 +1728,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1728
1728
|
T.write_shift(4, 0);
|
|
1729
1729
|
continue;
|
|
1730
1730
|
}
|
|
1731
|
-
U =
|
|
1732
|
-
var Z =
|
|
1731
|
+
U = x.FileIndex[S], S === 0 && (U.start = U.size ? U.start - 1 : Y);
|
|
1732
|
+
var Z = S === 0 && g.root || U.name;
|
|
1733
1733
|
if (M = 2 * (Z.length + 1), T.write_shift(64, Z, "utf16le"), T.write_shift(2, M), T.write_shift(1, U.type), T.write_shift(1, U.color), T.write_shift(-4, U.L), T.write_shift(-4, U.R), T.write_shift(-4, U.C), U.clsid)
|
|
1734
1734
|
T.write_shift(16, U.clsid, "hex");
|
|
1735
1735
|
else
|
|
@@ -1737,8 +1737,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1737
1737
|
T.write_shift(4, 0);
|
|
1738
1738
|
T.write_shift(4, U.state || 0), T.write_shift(4, 0), T.write_shift(4, 0), T.write_shift(4, 0), T.write_shift(4, 0), T.write_shift(4, U.start), T.write_shift(4, U.size), T.write_shift(4, 0);
|
|
1739
1739
|
}
|
|
1740
|
-
for (
|
|
1741
|
-
if (U =
|
|
1740
|
+
for (S = 1; S < x.FileIndex.length; ++S)
|
|
1741
|
+
if (U = x.FileIndex[S], U.size >= 4096)
|
|
1742
1742
|
if (T.l = U.start + 1 << 9, has_buf && Buffer.isBuffer(U.content))
|
|
1743
1743
|
U.content.copy(T, T.l, 0, U.size), T.l += U.size + 511 & -512;
|
|
1744
1744
|
else {
|
|
@@ -1747,8 +1747,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1747
1747
|
for (; O & 511; ++O)
|
|
1748
1748
|
T.write_shift(1, 0);
|
|
1749
1749
|
}
|
|
1750
|
-
for (
|
|
1751
|
-
if (U =
|
|
1750
|
+
for (S = 1; S < x.FileIndex.length; ++S)
|
|
1751
|
+
if (U = x.FileIndex[S], U.size > 0 && U.size < 4096)
|
|
1752
1752
|
if (has_buf && Buffer.isBuffer(U.content))
|
|
1753
1753
|
U.content.copy(T, T.l, 0, U.size), T.l += U.size + 63 & -64;
|
|
1754
1754
|
else {
|
|
@@ -1764,21 +1764,21 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1764
1764
|
T.write_shift(1, 0);
|
|
1765
1765
|
return T;
|
|
1766
1766
|
}
|
|
1767
|
-
function V(
|
|
1768
|
-
var g =
|
|
1767
|
+
function V(x, v) {
|
|
1768
|
+
var g = x.FullPaths.map(function(O) {
|
|
1769
1769
|
return O.toUpperCase();
|
|
1770
1770
|
}), w = g.map(function(O) {
|
|
1771
1771
|
var M = O.split("/");
|
|
1772
1772
|
return M[M.length - (O.slice(-1) == "/" ? 2 : 1)];
|
|
1773
1773
|
}), T = !1;
|
|
1774
1774
|
v.charCodeAt(0) === 47 ? (T = !0, v = g[0].slice(0, -1) + v) : T = v.indexOf("/") !== -1;
|
|
1775
|
-
var
|
|
1775
|
+
var S = v.toUpperCase(), R = T === !0 ? g.indexOf(S) : w.indexOf(S);
|
|
1776
1776
|
if (R !== -1)
|
|
1777
|
-
return
|
|
1778
|
-
var H = !
|
|
1779
|
-
for (
|
|
1780
|
-
if ((H ? g[R].replace(chr1, "!") : g[R]).replace(chr0, "") ==
|
|
1781
|
-
return
|
|
1777
|
+
return x.FileIndex[R];
|
|
1778
|
+
var H = !S.match(chr1);
|
|
1779
|
+
for (S = S.replace(chr0, ""), H && (S = S.replace(chr1, "!")), R = 0; R < g.length; ++R)
|
|
1780
|
+
if ((H ? g[R].replace(chr1, "!") : g[R]).replace(chr0, "") == S || (H ? w[R].replace(chr1, "!") : w[R]).replace(chr0, "") == S)
|
|
1781
|
+
return x.FileIndex[R];
|
|
1782
1782
|
return null;
|
|
1783
1783
|
}
|
|
1784
1784
|
var G = 64, Y = -2, le = "d0cf11e0a1b11ae1", q = [208, 207, 17, 224, 161, 177, 26, 225], he = "00000000000000000000000000000000", ue = {
|
|
@@ -1797,18 +1797,18 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1797
1797
|
/* 2.6.1 Compound File Directory Entry */
|
|
1798
1798
|
EntryTypes: ["unknown", "storage", "stream", "lockbytes", "property", "root"]
|
|
1799
1799
|
};
|
|
1800
|
-
function Ee(
|
|
1800
|
+
function Ee(x, v, g) {
|
|
1801
1801
|
f();
|
|
1802
|
-
var w = N(
|
|
1802
|
+
var w = N(x, g);
|
|
1803
1803
|
o.writeFileSync(v, w);
|
|
1804
1804
|
}
|
|
1805
|
-
function me(
|
|
1806
|
-
for (var v = new Array(
|
|
1807
|
-
v[g] = String.fromCharCode(
|
|
1805
|
+
function me(x) {
|
|
1806
|
+
for (var v = new Array(x.length), g = 0; g < x.length; ++g)
|
|
1807
|
+
v[g] = String.fromCharCode(x[g]);
|
|
1808
1808
|
return v.join("");
|
|
1809
1809
|
}
|
|
1810
|
-
function ge(
|
|
1811
|
-
var g = N(
|
|
1810
|
+
function ge(x, v) {
|
|
1811
|
+
var g = N(x, v);
|
|
1812
1812
|
switch (v && v.type || "buffer") {
|
|
1813
1813
|
case "file":
|
|
1814
1814
|
return f(), o.writeFileSync(v.filename, g), g;
|
|
@@ -1825,127 +1825,127 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1825
1825
|
return g;
|
|
1826
1826
|
}
|
|
1827
1827
|
var de;
|
|
1828
|
-
function F(
|
|
1828
|
+
function F(x) {
|
|
1829
1829
|
try {
|
|
1830
|
-
var v =
|
|
1830
|
+
var v = x.InflateRaw, g = new v();
|
|
1831
1831
|
if (g._processChunk(new Uint8Array([3, 0]), g._finishFlushFlag), g.bytesRead)
|
|
1832
|
-
de =
|
|
1832
|
+
de = x;
|
|
1833
1833
|
else
|
|
1834
1834
|
throw new Error("zlib does not expose bytesRead");
|
|
1835
1835
|
} catch (w) {
|
|
1836
1836
|
console.error("cannot use native zlib: " + (w.message || w));
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
|
-
function W(
|
|
1839
|
+
function W(x, v) {
|
|
1840
1840
|
if (!de)
|
|
1841
|
-
return Ke(
|
|
1842
|
-
var g = de.InflateRaw, w = new g(), T = w._processChunk(
|
|
1843
|
-
return
|
|
1841
|
+
return Ke(x, v);
|
|
1842
|
+
var g = de.InflateRaw, w = new g(), T = w._processChunk(x.slice(x.l), w._finishFlushFlag);
|
|
1843
|
+
return x.l += w.bytesRead, T;
|
|
1844
1844
|
}
|
|
1845
|
-
function P(
|
|
1846
|
-
return de ? de.deflateRawSync(
|
|
1845
|
+
function P(x) {
|
|
1846
|
+
return de ? de.deflateRawSync(x) : We(x);
|
|
1847
1847
|
}
|
|
1848
1848
|
var D = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], j = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258], ne = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];
|
|
1849
|
-
function ie(
|
|
1850
|
-
var v = (
|
|
1849
|
+
function ie(x) {
|
|
1850
|
+
var v = (x << 1 | x << 11) & 139536 | (x << 5 | x << 15) & 558144;
|
|
1851
1851
|
return (v >> 16 | v >> 8 | v) & 255;
|
|
1852
1852
|
}
|
|
1853
1853
|
for (var ae = typeof Uint8Array < "u", Q = ae ? new Uint8Array(256) : [], ce = 0; ce < 256; ++ce)
|
|
1854
1854
|
Q[ce] = ie(ce);
|
|
1855
|
-
function oe(
|
|
1856
|
-
var g = Q[
|
|
1857
|
-
return v <= 8 ? g >>> 8 - v : (g = g << 8 | Q[
|
|
1855
|
+
function oe(x, v) {
|
|
1856
|
+
var g = Q[x & 255];
|
|
1857
|
+
return v <= 8 ? g >>> 8 - v : (g = g << 8 | Q[x >> 8 & 255], v <= 16 ? g >>> 16 - v : (g = g << 8 | Q[x >> 16 & 255], g >>> 24 - v));
|
|
1858
1858
|
}
|
|
1859
|
-
function ve(
|
|
1859
|
+
function ve(x, v) {
|
|
1860
1860
|
var g = v & 7, w = v >>> 3;
|
|
1861
|
-
return (
|
|
1861
|
+
return (x[w] | (g <= 6 ? 0 : x[w + 1] << 8)) >>> g & 3;
|
|
1862
1862
|
}
|
|
1863
|
-
function fe(
|
|
1863
|
+
function fe(x, v) {
|
|
1864
1864
|
var g = v & 7, w = v >>> 3;
|
|
1865
|
-
return (
|
|
1865
|
+
return (x[w] | (g <= 5 ? 0 : x[w + 1] << 8)) >>> g & 7;
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function Se(x, v) {
|
|
1868
1868
|
var g = v & 7, w = v >>> 3;
|
|
1869
|
-
return (
|
|
1869
|
+
return (x[w] | (g <= 4 ? 0 : x[w + 1] << 8)) >>> g & 15;
|
|
1870
1870
|
}
|
|
1871
|
-
function xe(
|
|
1871
|
+
function xe(x, v) {
|
|
1872
1872
|
var g = v & 7, w = v >>> 3;
|
|
1873
|
-
return (
|
|
1873
|
+
return (x[w] | (g <= 3 ? 0 : x[w + 1] << 8)) >>> g & 31;
|
|
1874
1874
|
}
|
|
1875
|
-
function re(
|
|
1875
|
+
function re(x, v) {
|
|
1876
1876
|
var g = v & 7, w = v >>> 3;
|
|
1877
|
-
return (
|
|
1877
|
+
return (x[w] | (g <= 1 ? 0 : x[w + 1] << 8)) >>> g & 127;
|
|
1878
1878
|
}
|
|
1879
|
-
function Te(
|
|
1880
|
-
var w = v & 7, T = v >>> 3,
|
|
1881
|
-
return g < 8 - w || (R |=
|
|
1879
|
+
function Te(x, v, g) {
|
|
1880
|
+
var w = v & 7, T = v >>> 3, S = (1 << g) - 1, R = x[T] >>> w;
|
|
1881
|
+
return g < 8 - w || (R |= x[T + 1] << 8 - w, g < 16 - w) || (R |= x[T + 2] << 16 - w, g < 24 - w) || (R |= x[T + 3] << 24 - w), R & S;
|
|
1882
1882
|
}
|
|
1883
|
-
function Ae(
|
|
1883
|
+
function Ae(x, v, g) {
|
|
1884
1884
|
var w = v & 7, T = v >>> 3;
|
|
1885
|
-
return w <= 5 ?
|
|
1885
|
+
return w <= 5 ? x[T] |= (g & 7) << w : (x[T] |= g << w & 255, x[T + 1] = (g & 7) >> 8 - w), v + 3;
|
|
1886
1886
|
}
|
|
1887
|
-
function Fe(
|
|
1887
|
+
function Fe(x, v, g) {
|
|
1888
1888
|
var w = v & 7, T = v >>> 3;
|
|
1889
|
-
return g = (g & 1) << w,
|
|
1889
|
+
return g = (g & 1) << w, x[T] |= g, v + 1;
|
|
1890
1890
|
}
|
|
1891
|
-
function Ie(
|
|
1891
|
+
function Ie(x, v, g) {
|
|
1892
1892
|
var w = v & 7, T = v >>> 3;
|
|
1893
|
-
return g <<= w,
|
|
1893
|
+
return g <<= w, x[T] |= g & 255, g >>>= 8, x[T + 1] = g, v + 8;
|
|
1894
1894
|
}
|
|
1895
|
-
function $e(
|
|
1895
|
+
function $e(x, v, g) {
|
|
1896
1896
|
var w = v & 7, T = v >>> 3;
|
|
1897
|
-
return g <<= w,
|
|
1897
|
+
return g <<= w, x[T] |= g & 255, g >>>= 8, x[T + 1] = g & 255, x[T + 2] = g >>> 8, v + 16;
|
|
1898
1898
|
}
|
|
1899
|
-
function Oe(
|
|
1900
|
-
var g =
|
|
1899
|
+
function Oe(x, v) {
|
|
1900
|
+
var g = x.length, w = 2 * g > v ? 2 * g : v + 5, T = 0;
|
|
1901
1901
|
if (g >= v)
|
|
1902
|
-
return
|
|
1902
|
+
return x;
|
|
1903
1903
|
if (has_buf) {
|
|
1904
|
-
var
|
|
1905
|
-
if (
|
|
1906
|
-
|
|
1904
|
+
var S = new_unsafe_buf(w);
|
|
1905
|
+
if (x.copy)
|
|
1906
|
+
x.copy(S);
|
|
1907
1907
|
else
|
|
1908
|
-
for (; T <
|
|
1909
|
-
|
|
1910
|
-
return
|
|
1908
|
+
for (; T < x.length; ++T)
|
|
1909
|
+
S[T] = x[T];
|
|
1910
|
+
return S;
|
|
1911
1911
|
} else if (ae) {
|
|
1912
1912
|
var R = new Uint8Array(w);
|
|
1913
1913
|
if (R.set)
|
|
1914
|
-
R.set(
|
|
1914
|
+
R.set(x);
|
|
1915
1915
|
else
|
|
1916
1916
|
for (; T < g; ++T)
|
|
1917
|
-
R[T] =
|
|
1917
|
+
R[T] = x[T];
|
|
1918
1918
|
return R;
|
|
1919
1919
|
}
|
|
1920
|
-
return
|
|
1920
|
+
return x.length = w, x;
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
for (var v = new Array(
|
|
1922
|
+
function ye(x) {
|
|
1923
|
+
for (var v = new Array(x), g = 0; g < x; ++g)
|
|
1924
1924
|
v[g] = 0;
|
|
1925
1925
|
return v;
|
|
1926
1926
|
}
|
|
1927
|
-
function Pe(
|
|
1928
|
-
var w = 1, T = 0,
|
|
1929
|
-
for (
|
|
1930
|
-
M[
|
|
1931
|
-
for (
|
|
1932
|
-
|
|
1933
|
-
O =
|
|
1934
|
-
var U = ae ? new Uint16Array(O) :
|
|
1935
|
-
for (
|
|
1936
|
-
M[T =
|
|
1937
|
-
for (M[0] = 0,
|
|
1938
|
-
M[
|
|
1939
|
-
for (
|
|
1940
|
-
H =
|
|
1927
|
+
function Pe(x, v, g) {
|
|
1928
|
+
var w = 1, T = 0, S = 0, R = 0, H = 0, O = x.length, M = ae ? new Uint16Array(32) : ye(32);
|
|
1929
|
+
for (S = 0; S < 32; ++S)
|
|
1930
|
+
M[S] = 0;
|
|
1931
|
+
for (S = O; S < g; ++S)
|
|
1932
|
+
x[S] = 0;
|
|
1933
|
+
O = x.length;
|
|
1934
|
+
var U = ae ? new Uint16Array(O) : ye(O);
|
|
1935
|
+
for (S = 0; S < O; ++S)
|
|
1936
|
+
M[T = x[S]]++, w < T && (w = T), U[S] = 0;
|
|
1937
|
+
for (M[0] = 0, S = 1; S <= w; ++S)
|
|
1938
|
+
M[S + 16] = H = H + M[S - 1] << 1;
|
|
1939
|
+
for (S = 0; S < O; ++S)
|
|
1940
|
+
H = x[S], H != 0 && (U[S] = M[H + 16]++);
|
|
1941
1941
|
var K = 0;
|
|
1942
|
-
for (
|
|
1943
|
-
if (K =
|
|
1944
|
-
for (H = oe(U[
|
|
1945
|
-
v[H | R << K] = K & 15 |
|
|
1942
|
+
for (S = 0; S < O; ++S)
|
|
1943
|
+
if (K = x[S], K != 0)
|
|
1944
|
+
for (H = oe(U[S], w) >> w - K, R = (1 << w + 4 - K) - 1; R >= 0; --R)
|
|
1945
|
+
v[H | R << K] = K & 15 | S << 4;
|
|
1946
1946
|
return w;
|
|
1947
1947
|
}
|
|
1948
|
-
var Re = ae ? new Uint16Array(512) :
|
|
1948
|
+
var Re = ae ? new Uint16Array(512) : ye(512), Me = ae ? new Uint16Array(32) : ye(32);
|
|
1949
1949
|
if (!ae) {
|
|
1950
1950
|
for (var ke = 0; ke < 512; ++ke)
|
|
1951
1951
|
Re[ke] = 0;
|
|
@@ -1953,9 +1953,9 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1953
1953
|
Me[ke] = 0;
|
|
1954
1954
|
}
|
|
1955
1955
|
(function() {
|
|
1956
|
-
for (var
|
|
1957
|
-
|
|
1958
|
-
Pe(
|
|
1956
|
+
for (var x = [], v = 0; v < 32; v++)
|
|
1957
|
+
x.push(5);
|
|
1958
|
+
Pe(x, Me, 32);
|
|
1959
1959
|
var g = [];
|
|
1960
1960
|
for (v = 0; v <= 143; v++)
|
|
1961
1961
|
g.push(8);
|
|
@@ -1977,7 +1977,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
1977
1977
|
for (g = 0, w = 0; g < j.length - 1; ++g)
|
|
1978
1978
|
for (; w < j[g + 1]; ++w)
|
|
1979
1979
|
T[w] = g;
|
|
1980
|
-
function
|
|
1980
|
+
function S(H, O) {
|
|
1981
1981
|
for (var M = 0; M < H.length; ) {
|
|
1982
1982
|
var U = Math.min(65535, H.length - M), K = M + U == H.length;
|
|
1983
1983
|
for (O.write_shift(1, +K), O.write_shift(2, U), O.write_shift(2, ~U & 65535); U-- > 0; )
|
|
@@ -2022,23 +2022,23 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2022
2022
|
return O.l = (M + 7) / 8 | 0, O.l;
|
|
2023
2023
|
}
|
|
2024
2024
|
return function(O, M) {
|
|
2025
|
-
return O.length < 8 ?
|
|
2025
|
+
return O.length < 8 ? S(O, M) : R(O, M);
|
|
2026
2026
|
};
|
|
2027
2027
|
}();
|
|
2028
|
-
function We(
|
|
2029
|
-
var v = new_buf(50 + Math.floor(
|
|
2028
|
+
function We(x) {
|
|
2029
|
+
var v = new_buf(50 + Math.floor(x.length * 1.1)), g = qe(x, v);
|
|
2030
2030
|
return v.slice(0, g);
|
|
2031
2031
|
}
|
|
2032
|
-
var Xe = ae ? new Uint16Array(32768) :
|
|
2033
|
-
function Ze(
|
|
2034
|
-
var g = xe(
|
|
2032
|
+
var Xe = ae ? new Uint16Array(32768) : ye(32768), He = ae ? new Uint16Array(32768) : ye(32768), Ge = ae ? new Uint16Array(128) : ye(128), ze = 1, je = 1;
|
|
2033
|
+
function Ze(x, v) {
|
|
2034
|
+
var g = xe(x, v) + 257;
|
|
2035
2035
|
v += 5;
|
|
2036
|
-
var w = xe(
|
|
2036
|
+
var w = xe(x, v) + 1;
|
|
2037
2037
|
v += 5;
|
|
2038
|
-
var T =
|
|
2038
|
+
var T = Se(x, v) + 4;
|
|
2039
2039
|
v += 4;
|
|
2040
|
-
for (var
|
|
2041
|
-
R[D[Z]] =
|
|
2040
|
+
for (var S = 0, R = ae ? new Uint8Array(19) : ye(19), H = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], O = 1, M = ae ? new Uint8Array(8) : ye(8), U = ae ? new Uint8Array(8) : ye(8), K = R.length, Z = 0; Z < T; ++Z)
|
|
2041
|
+
R[D[Z]] = S = fe(x, v), O < S && (O = S), M[S]++, v += 3;
|
|
2042
2042
|
var te = 0;
|
|
2043
2043
|
for (M[0] = 0, Z = 1; Z <= O; ++Z)
|
|
2044
2044
|
U[Z] = te = te + M[Z - 1] << 1;
|
|
@@ -2053,17 +2053,17 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2053
2053
|
}
|
|
2054
2054
|
var se = [];
|
|
2055
2055
|
for (O = 1; se.length < g + w; )
|
|
2056
|
-
switch (te = Ge[re(
|
|
2056
|
+
switch (te = Ge[re(x, v)], v += te & 7, te >>>= 3) {
|
|
2057
2057
|
case 16:
|
|
2058
|
-
for (
|
|
2058
|
+
for (S = 3 + ve(x, v), v += 2, te = se[se.length - 1]; S-- > 0; )
|
|
2059
2059
|
se.push(te);
|
|
2060
2060
|
break;
|
|
2061
2061
|
case 17:
|
|
2062
|
-
for (
|
|
2062
|
+
for (S = 3 + fe(x, v), v += 3; S-- > 0; )
|
|
2063
2063
|
se.push(0);
|
|
2064
2064
|
break;
|
|
2065
2065
|
case 18:
|
|
2066
|
-
for (
|
|
2066
|
+
for (S = 11 + re(x, v), v += 7; S-- > 0; )
|
|
2067
2067
|
se.push(0);
|
|
2068
2068
|
break;
|
|
2069
2069
|
default:
|
|
@@ -2077,62 +2077,62 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2077
2077
|
pe[Z] = 0;
|
|
2078
2078
|
return ze = Pe(_e, Xe, 286), je = Pe(pe, He, 30), v;
|
|
2079
2079
|
}
|
|
2080
|
-
function Qe(
|
|
2081
|
-
if (
|
|
2080
|
+
function Qe(x, v) {
|
|
2081
|
+
if (x[0] == 3 && !(x[1] & 3))
|
|
2082
2082
|
return [new_raw_buf(v), 2];
|
|
2083
|
-
for (var g = 0, w = 0, T = new_unsafe_buf(v || 1 << 18),
|
|
2084
|
-
if (w = fe(
|
|
2085
|
-
w >> 1 == 1 ? (H = 9, O = 5) : (g = Ze(
|
|
2083
|
+
for (var g = 0, w = 0, T = new_unsafe_buf(v || 1 << 18), S = 0, R = T.length >>> 0, H = 0, O = 0; !(w & 1); ) {
|
|
2084
|
+
if (w = fe(x, g), g += 3, w >>> 1)
|
|
2085
|
+
w >> 1 == 1 ? (H = 9, O = 5) : (g = Ze(x, g), H = ze, O = je);
|
|
2086
2086
|
else {
|
|
2087
2087
|
g & 7 && (g += 8 - (g & 7));
|
|
2088
|
-
var M =
|
|
2088
|
+
var M = x[g >>> 3] | x[(g >>> 3) + 1] << 8;
|
|
2089
2089
|
if (g += 32, M > 0)
|
|
2090
|
-
for (!v && R <
|
|
2091
|
-
T[
|
|
2090
|
+
for (!v && R < S + M && (T = Oe(T, S + M), R = T.length); M-- > 0; )
|
|
2091
|
+
T[S++] = x[g >>> 3], g += 8;
|
|
2092
2092
|
continue;
|
|
2093
2093
|
}
|
|
2094
2094
|
for (; ; ) {
|
|
2095
|
-
!v && R <
|
|
2096
|
-
var U = Te(
|
|
2095
|
+
!v && R < S + 32767 && (T = Oe(T, S + 32767), R = T.length);
|
|
2096
|
+
var U = Te(x, g, H), K = w >>> 1 == 1 ? Re[U] : Xe[U];
|
|
2097
2097
|
if (g += K & 15, K >>>= 4, !(K >>> 8 & 255))
|
|
2098
|
-
T[
|
|
2098
|
+
T[S++] = K;
|
|
2099
2099
|
else {
|
|
2100
2100
|
if (K == 256)
|
|
2101
2101
|
break;
|
|
2102
2102
|
K -= 257;
|
|
2103
2103
|
var Z = K < 8 ? 0 : K - 4 >> 2;
|
|
2104
2104
|
Z > 5 && (Z = 0);
|
|
2105
|
-
var te =
|
|
2106
|
-
Z > 0 && (te += Te(
|
|
2105
|
+
var te = S + j[K];
|
|
2106
|
+
Z > 0 && (te += Te(x, g, Z), g += Z), U = Te(x, g, O), K = w >>> 1 == 1 ? Me[U] : He[U], g += K & 15, K >>>= 4;
|
|
2107
2107
|
var J = K < 4 ? 0 : K - 2 >> 1, ee = ne[K];
|
|
2108
|
-
for (J > 0 && (ee += Te(
|
|
2109
|
-
T[
|
|
2108
|
+
for (J > 0 && (ee += Te(x, g, J), g += J), !v && R < te && (T = Oe(T, te + 100), R = T.length); S < te; )
|
|
2109
|
+
T[S] = T[S - ee], ++S;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
|
-
return v ? [T, g + 7 >>> 3] : [T.slice(0,
|
|
2113
|
+
return v ? [T, g + 7 >>> 3] : [T.slice(0, S), g + 7 >>> 3];
|
|
2114
2114
|
}
|
|
2115
|
-
function Ke(
|
|
2116
|
-
var g =
|
|
2117
|
-
return
|
|
2115
|
+
function Ke(x, v) {
|
|
2116
|
+
var g = x.slice(x.l || 0), w = Qe(g, v);
|
|
2117
|
+
return x.l += w[1], w[0];
|
|
2118
2118
|
}
|
|
2119
|
-
function Ye(
|
|
2120
|
-
if (
|
|
2119
|
+
function Ye(x, v) {
|
|
2120
|
+
if (x)
|
|
2121
2121
|
typeof console < "u" && console.error(v);
|
|
2122
2122
|
else
|
|
2123
2123
|
throw new Error(v);
|
|
2124
2124
|
}
|
|
2125
|
-
function Je(
|
|
2125
|
+
function Je(x, v) {
|
|
2126
2126
|
var g = (
|
|
2127
2127
|
/*::(*/
|
|
2128
|
-
|
|
2128
|
+
x
|
|
2129
2129
|
);
|
|
2130
2130
|
prep_blob(g, 0);
|
|
2131
|
-
var w = [], T = [],
|
|
2131
|
+
var w = [], T = [], S = {
|
|
2132
2132
|
FileIndex: w,
|
|
2133
2133
|
FullPaths: T
|
|
2134
2134
|
};
|
|
2135
|
-
S
|
|
2135
|
+
y(S, { root: v.root });
|
|
2136
2136
|
for (var R = g.length - 4; (g[R] != 80 || g[R + 1] != 75 || g[R + 2] != 5 || g[R + 3] != 6) && R >= 0; )
|
|
2137
2137
|
--R;
|
|
2138
2138
|
g.l = R + 4, g.l += 4;
|
|
@@ -2150,30 +2150,30 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2150
2150
|
);
|
|
2151
2151
|
g.l += K + Z + te;
|
|
2152
2152
|
var se = g.l;
|
|
2153
|
-
g.l = J + 4, et(g, M, U,
|
|
2153
|
+
g.l = J + 4, et(g, M, U, S, ee), g.l = se;
|
|
2154
2154
|
}
|
|
2155
|
-
return
|
|
2155
|
+
return S;
|
|
2156
2156
|
}
|
|
2157
|
-
function et(
|
|
2158
|
-
|
|
2159
|
-
var
|
|
2160
|
-
if (
|
|
2157
|
+
function et(x, v, g, w, T) {
|
|
2158
|
+
x.l += 2;
|
|
2159
|
+
var S = x.read_shift(2), R = x.read_shift(2), H = s(x);
|
|
2160
|
+
if (S & 8257)
|
|
2161
2161
|
throw new Error("Unsupported ZIP encryption");
|
|
2162
|
-
for (var O =
|
|
2163
|
-
te += String.fromCharCode(
|
|
2162
|
+
for (var O = x.read_shift(4), M = x.read_shift(4), U = x.read_shift(4), K = x.read_shift(2), Z = x.read_shift(2), te = "", J = 0; J < K; ++J)
|
|
2163
|
+
te += String.fromCharCode(x[x.l++]);
|
|
2164
2164
|
if (Z) {
|
|
2165
2165
|
var ee = l(
|
|
2166
2166
|
/*::(*/
|
|
2167
|
-
|
|
2167
|
+
x.slice(x.l, x.l + Z)
|
|
2168
2168
|
/*:: :any)*/
|
|
2169
2169
|
);
|
|
2170
2170
|
(ee[21589] || {}).mt && (H = ee[21589].mt), ((T || {})[21589] || {}).mt && (H = T[21589].mt);
|
|
2171
2171
|
}
|
|
2172
|
-
|
|
2173
|
-
var se =
|
|
2172
|
+
x.l += Z;
|
|
2173
|
+
var se = x.slice(x.l, x.l + M);
|
|
2174
2174
|
switch (R) {
|
|
2175
2175
|
case 8:
|
|
2176
|
-
se = W(
|
|
2176
|
+
se = W(x, U);
|
|
2177
2177
|
break;
|
|
2178
2178
|
case 0:
|
|
2179
2179
|
break;
|
|
@@ -2181,12 +2181,12 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2181
2181
|
throw new Error("Unsupported ZIP Compression method " + R);
|
|
2182
2182
|
}
|
|
2183
2183
|
var _e = !1;
|
|
2184
|
-
|
|
2184
|
+
S & 8 && (O = x.read_shift(4), O == 134695760 && (O = x.read_shift(4), _e = !0), M = x.read_shift(4), U = x.read_shift(4)), M != v && Ye(_e, "Bad compressed size: " + v + " != " + M), U != g && Ye(_e, "Bad uncompressed size: " + g + " != " + U), Ve(w, te, se, { unsafe: !0, mt: H });
|
|
2185
2185
|
}
|
|
2186
|
-
function tt(
|
|
2187
|
-
var g = v || {}, w = [], T = [],
|
|
2188
|
-
for (O = 1; O <
|
|
2189
|
-
if (te =
|
|
2186
|
+
function tt(x, v) {
|
|
2187
|
+
var g = v || {}, w = [], T = [], S = new_buf(1), R = g.compression ? 8 : 0, H = 0, O = 0, M = 0, U = 0, K = 0, Z = x.FullPaths[0], te = Z, J = x.FileIndex[0], ee = [], se = 0;
|
|
2188
|
+
for (O = 1; O < x.FullPaths.length; ++O)
|
|
2189
|
+
if (te = x.FullPaths[O].slice(Z.length), J = x.FileIndex[O], !(!J.size || !J.content || te == "Sh33tJ5")) {
|
|
2190
2190
|
var _e = U, pe = new_buf(te.length);
|
|
2191
2191
|
for (M = 0; M < te.length; ++M)
|
|
2192
2192
|
pe.write_shift(1, te.charCodeAt(M) & 127);
|
|
@@ -2196,17 +2196,17 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2196
2196
|
0
|
|
2197
2197
|
);
|
|
2198
2198
|
var we = J.content;
|
|
2199
|
-
R == 8 && (we = P(we)),
|
|
2199
|
+
R == 8 && (we = P(we)), S = new_buf(30), S.write_shift(4, 67324752), S.write_shift(2, 20), S.write_shift(2, H), S.write_shift(2, R), J.mt ? i(S, J.mt) : S.write_shift(4, 0), S.write_shift(-4, ee[K]), S.write_shift(4, we.length), S.write_shift(
|
|
2200
2200
|
4,
|
|
2201
2201
|
/*::(*/
|
|
2202
2202
|
J.content.length
|
|
2203
|
-
),
|
|
2203
|
+
), S.write_shift(2, pe.length), S.write_shift(2, 0), U += S.length, w.push(S), U += pe.length, w.push(pe), U += we.length, w.push(we), S = new_buf(46), S.write_shift(4, 33639248), S.write_shift(2, 0), S.write_shift(2, 20), S.write_shift(2, H), S.write_shift(2, R), S.write_shift(4, 0), S.write_shift(-4, ee[K]), S.write_shift(4, we.length), S.write_shift(
|
|
2204
2204
|
4,
|
|
2205
2205
|
/*::(*/
|
|
2206
2206
|
J.content.length
|
|
2207
|
-
),
|
|
2207
|
+
), S.write_shift(2, pe.length), S.write_shift(2, 0), S.write_shift(2, 0), S.write_shift(2, 0), S.write_shift(2, 0), S.write_shift(4, 0), S.write_shift(4, _e), se += S.l, T.push(S), se += pe.length, T.push(pe), ++K;
|
|
2208
2208
|
}
|
|
2209
|
-
return
|
|
2209
|
+
return S = new_buf(22), S.write_shift(4, 101010256), S.write_shift(2, 0), S.write_shift(2, 0), S.write_shift(2, K), S.write_shift(2, K), S.write_shift(4, se), S.write_shift(4, U), S.write_shift(2, 0), bconcat([bconcat(w), bconcat(T), S]);
|
|
2210
2210
|
}
|
|
2211
2211
|
var be = {
|
|
2212
2212
|
htm: "text/html",
|
|
@@ -2218,21 +2218,21 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2218
2218
|
thmx: "application/vnd.ms-officetheme",
|
|
2219
2219
|
sh33tj5: "application/octet-stream"
|
|
2220
2220
|
};
|
|
2221
|
-
function rt(
|
|
2222
|
-
if (
|
|
2223
|
-
return
|
|
2224
|
-
var g =
|
|
2221
|
+
function rt(x, v) {
|
|
2222
|
+
if (x.ctype)
|
|
2223
|
+
return x.ctype;
|
|
2224
|
+
var g = x.name || "", w = g.match(/\.([^\.]+)$/);
|
|
2225
2225
|
return w && be[w[1]] || v && (w = (g = v).match(/[\.\\]([^\.\\])+$/), w && be[w[1]]) ? be[w[1]] : "application/octet-stream";
|
|
2226
2226
|
}
|
|
2227
|
-
function at(
|
|
2228
|
-
for (var v = Base64_encode(
|
|
2227
|
+
function at(x) {
|
|
2228
|
+
for (var v = Base64_encode(x), g = [], w = 0; w < v.length; w += 76)
|
|
2229
2229
|
g.push(v.slice(w, w + 76));
|
|
2230
2230
|
return g.join(`\r
|
|
2231
2231
|
`) + `\r
|
|
2232
2232
|
`;
|
|
2233
2233
|
}
|
|
2234
|
-
function nt(
|
|
2235
|
-
var v =
|
|
2234
|
+
function nt(x) {
|
|
2235
|
+
var v = x.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g, function(M) {
|
|
2236
2236
|
var U = M.charCodeAt(0).toString(16).toUpperCase();
|
|
2237
2237
|
return "=" + (U.length == 1 ? "0" + U : U);
|
|
2238
2238
|
});
|
|
@@ -2241,34 +2241,34 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2241
2241
|
=0A`).replace(/([^\r\n])\n/mg, "$1=0A");
|
|
2242
2242
|
for (var g = [], w = v.split(`\r
|
|
2243
2243
|
`), T = 0; T < w.length; ++T) {
|
|
2244
|
-
var
|
|
2245
|
-
if (
|
|
2244
|
+
var S = w[T];
|
|
2245
|
+
if (S.length == 0) {
|
|
2246
2246
|
g.push("");
|
|
2247
2247
|
continue;
|
|
2248
2248
|
}
|
|
2249
|
-
for (var R = 0; R <
|
|
2250
|
-
var H = 76, O =
|
|
2251
|
-
O.charAt(H - 1) == "=" ? H-- : O.charAt(H - 2) == "=" ? H -= 2 : O.charAt(H - 3) == "=" && (H -= 3), O =
|
|
2249
|
+
for (var R = 0; R < S.length; ) {
|
|
2250
|
+
var H = 76, O = S.slice(R, R + H);
|
|
2251
|
+
O.charAt(H - 1) == "=" ? H-- : O.charAt(H - 2) == "=" ? H -= 2 : O.charAt(H - 3) == "=" && (H -= 3), O = S.slice(R, R + H), R += H, R < S.length && (O += "="), g.push(O);
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
return g.join(`\r
|
|
2255
2255
|
`);
|
|
2256
2256
|
}
|
|
2257
|
-
function it(
|
|
2258
|
-
for (var v = [], g = 0; g <
|
|
2259
|
-
for (var w =
|
|
2260
|
-
w = w.slice(0, w.length - 1) +
|
|
2257
|
+
function it(x) {
|
|
2258
|
+
for (var v = [], g = 0; g < x.length; ++g) {
|
|
2259
|
+
for (var w = x[g]; g <= x.length && w.charAt(w.length - 1) == "="; )
|
|
2260
|
+
w = w.slice(0, w.length - 1) + x[++g];
|
|
2261
2261
|
v.push(w);
|
|
2262
2262
|
}
|
|
2263
2263
|
for (var T = 0; T < v.length; ++T)
|
|
2264
|
-
v[T] = v[T].replace(/[=][0-9A-Fa-f]{2}/g, function(
|
|
2265
|
-
return String.fromCharCode(parseInt(
|
|
2264
|
+
v[T] = v[T].replace(/[=][0-9A-Fa-f]{2}/g, function(S) {
|
|
2265
|
+
return String.fromCharCode(parseInt(S.slice(1), 16));
|
|
2266
2266
|
});
|
|
2267
2267
|
return s2a(v.join(`\r
|
|
2268
2268
|
`));
|
|
2269
2269
|
}
|
|
2270
|
-
function st(
|
|
2271
|
-
for (var w = "", T = "",
|
|
2270
|
+
function st(x, v, g) {
|
|
2271
|
+
for (var w = "", T = "", S = "", R, H = 0; H < 10; ++H) {
|
|
2272
2272
|
var O = v[H];
|
|
2273
2273
|
if (!O || O.match(/^\s*$/))
|
|
2274
2274
|
break;
|
|
@@ -2279,7 +2279,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2279
2279
|
w = M[2].trim();
|
|
2280
2280
|
break;
|
|
2281
2281
|
case "content-type":
|
|
2282
|
-
|
|
2282
|
+
S = M[2].trim();
|
|
2283
2283
|
break;
|
|
2284
2284
|
case "content-transfer-encoding":
|
|
2285
2285
|
T = M[2].trim();
|
|
@@ -2296,17 +2296,17 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2296
2296
|
default:
|
|
2297
2297
|
throw new Error("Unsupported Content-Transfer-Encoding " + T);
|
|
2298
2298
|
}
|
|
2299
|
-
var U = Ve(
|
|
2300
|
-
|
|
2299
|
+
var U = Ve(x, w.slice(g.length), R, { unsafe: !0 });
|
|
2300
|
+
S && (U.ctype = S);
|
|
2301
2301
|
}
|
|
2302
|
-
function lt(
|
|
2303
|
-
if (me(
|
|
2302
|
+
function lt(x, v) {
|
|
2303
|
+
if (me(x.slice(0, 13)).toLowerCase() != "mime-version:")
|
|
2304
2304
|
throw new Error("Unsupported MAD header");
|
|
2305
|
-
var g = v && v.root || "", w = (has_buf && Buffer.isBuffer(
|
|
2306
|
-
`), T = 0,
|
|
2305
|
+
var g = v && v.root || "", w = (has_buf && Buffer.isBuffer(x) ? x.toString("binary") : me(x)).split(`\r
|
|
2306
|
+
`), T = 0, S = "";
|
|
2307
2307
|
for (T = 0; T < w.length; ++T)
|
|
2308
|
-
if (
|
|
2309
|
-
for (; g.length > 0 && (g = g.slice(0, g.length - 1), g = g.slice(0, g.lastIndexOf("/") + 1),
|
|
2308
|
+
if (S = w[T], !!/^Content-Location:/i.test(S) && (S = S.slice(S.indexOf("file")), g || (g = S.slice(0, S.lastIndexOf("/") + 1)), S.slice(0, g.length) != g))
|
|
2309
|
+
for (; g.length > 0 && (g = g.slice(0, g.length - 1), g = g.slice(0, g.lastIndexOf("/") + 1), S.slice(0, g.length) != g); )
|
|
2310
2310
|
;
|
|
2311
2311
|
var R = (w[1] || "").match(/boundary="(.*?)"/);
|
|
2312
2312
|
if (!R)
|
|
@@ -2315,7 +2315,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2315
2315
|
FileIndex: O,
|
|
2316
2316
|
FullPaths: M
|
|
2317
2317
|
};
|
|
2318
|
-
|
|
2318
|
+
y(U);
|
|
2319
2319
|
var K, Z = 0;
|
|
2320
2320
|
for (T = 0; T < w.length; ++T) {
|
|
2321
2321
|
var te = w[T];
|
|
@@ -2323,7 +2323,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
return U;
|
|
2325
2325
|
}
|
|
2326
|
-
function ot(
|
|
2326
|
+
function ot(x, v) {
|
|
2327
2327
|
var g = v || {}, w = g.boundary || "SheetJS";
|
|
2328
2328
|
w = "------=" + w;
|
|
2329
2329
|
for (var T = [
|
|
@@ -2332,8 +2332,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2332
2332
|
"",
|
|
2333
2333
|
"",
|
|
2334
2334
|
""
|
|
2335
|
-
],
|
|
2336
|
-
if (R =
|
|
2335
|
+
], S = x.FullPaths[0], R = S, H = x.FileIndex[0], O = 1; O < x.FullPaths.length; ++O)
|
|
2336
|
+
if (R = x.FullPaths[O].slice(S.length), H = x.FileIndex[O], !(!H.size || !H.content || R == "Sh33tJ5")) {
|
|
2337
2337
|
R = R.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(se) {
|
|
2338
2338
|
return "_x" + se.charCodeAt(0).toString(16) + "_";
|
|
2339
2339
|
}).replace(/[\u0080-\uFFFF]/g, function(se) {
|
|
@@ -2348,42 +2348,42 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
2348
2348
|
`), T.join(`\r
|
|
2349
2349
|
`);
|
|
2350
2350
|
}
|
|
2351
|
-
function ft(
|
|
2351
|
+
function ft(x) {
|
|
2352
2352
|
var v = {};
|
|
2353
|
-
return
|
|
2353
|
+
return y(v, x), v;
|
|
2354
2354
|
}
|
|
2355
|
-
function Ve(
|
|
2355
|
+
function Ve(x, v, g, w) {
|
|
2356
2356
|
var T = w && w.unsafe;
|
|
2357
|
-
T ||
|
|
2358
|
-
var
|
|
2359
|
-
if (!
|
|
2360
|
-
var R =
|
|
2361
|
-
v.slice(0, R.length) == R ? R = v : (R.slice(-1) != "/" && (R += "/"), R = (R + v).replace("//", "/")),
|
|
2357
|
+
T || y(x);
|
|
2358
|
+
var S = !T && CFB.find(x, v);
|
|
2359
|
+
if (!S) {
|
|
2360
|
+
var R = x.FullPaths[0];
|
|
2361
|
+
v.slice(0, R.length) == R ? R = v : (R.slice(-1) != "/" && (R += "/"), R = (R + v).replace("//", "/")), S = { name: n(v), type: 2 }, x.FileIndex.push(S), x.FullPaths.push(R), T || CFB.utils.cfb_gc(x);
|
|
2362
2362
|
}
|
|
2363
|
-
return
|
|
2363
|
+
return S.content = g, S.size = g ? g.length : 0, w && (w.CLSID && (S.clsid = w.CLSID), w.mt && (S.mt = w.mt), w.ct && (S.ct = w.ct)), S;
|
|
2364
2364
|
}
|
|
2365
|
-
function ct(
|
|
2366
|
-
|
|
2367
|
-
var g = CFB.find(
|
|
2365
|
+
function ct(x, v) {
|
|
2366
|
+
y(x);
|
|
2367
|
+
var g = CFB.find(x, v);
|
|
2368
2368
|
if (g) {
|
|
2369
|
-
for (var w = 0; w <
|
|
2370
|
-
if (
|
|
2371
|
-
return
|
|
2369
|
+
for (var w = 0; w < x.FileIndex.length; ++w)
|
|
2370
|
+
if (x.FileIndex[w] == g)
|
|
2371
|
+
return x.FileIndex.splice(w, 1), x.FullPaths.splice(w, 1), !0;
|
|
2372
2372
|
}
|
|
2373
2373
|
return !1;
|
|
2374
2374
|
}
|
|
2375
|
-
function ut(
|
|
2376
|
-
|
|
2377
|
-
var w = CFB.find(
|
|
2375
|
+
function ut(x, v, g) {
|
|
2376
|
+
y(x);
|
|
2377
|
+
var w = CFB.find(x, v);
|
|
2378
2378
|
if (w) {
|
|
2379
|
-
for (var T = 0; T <
|
|
2380
|
-
if (
|
|
2381
|
-
return
|
|
2379
|
+
for (var T = 0; T < x.FileIndex.length; ++T)
|
|
2380
|
+
if (x.FileIndex[T] == w)
|
|
2381
|
+
return x.FileIndex[T].name = n(g), x.FullPaths[T] = g, !0;
|
|
2382
2382
|
}
|
|
2383
2383
|
return !1;
|
|
2384
2384
|
}
|
|
2385
|
-
function ht(
|
|
2386
|
-
A(
|
|
2385
|
+
function ht(x) {
|
|
2386
|
+
A(x, !0);
|
|
2387
2387
|
}
|
|
2388
2388
|
return r.find = V, r.read = z, r.parse = c, r.write = ge, r.writeFile = Ee, r.utils = {
|
|
2389
2389
|
cfb_new: ft,
|
|
@@ -3200,16 +3200,16 @@ function sheet_add_aoa(e, r, t) {
|
|
|
3200
3200
|
var c = safe_decode_range(i["!ref"]);
|
|
3201
3201
|
f.s.c = c.s.c, f.s.r = c.s.r, f.e.c = Math.max(f.e.c, c.e.c), f.e.r = Math.max(f.e.r, c.e.r), s == -1 && (f.e.r = s = c.e.r + 1);
|
|
3202
3202
|
}
|
|
3203
|
-
for (var
|
|
3204
|
-
if (r[
|
|
3205
|
-
if (!Array.isArray(r[
|
|
3203
|
+
for (var _ = 0; _ != r.length; ++_)
|
|
3204
|
+
if (r[_]) {
|
|
3205
|
+
if (!Array.isArray(r[_]))
|
|
3206
3206
|
throw new Error("aoa_to_sheet expects an array of arrays");
|
|
3207
|
-
for (var
|
|
3208
|
-
if (!(typeof r[
|
|
3209
|
-
var h = { v: r[
|
|
3210
|
-
if (f.s.r >
|
|
3211
|
-
h = r[
|
|
3212
|
-
else if (Array.isArray(h.v) && (h.f = r[
|
|
3207
|
+
for (var d = 0; d != r[_].length; ++d)
|
|
3208
|
+
if (!(typeof r[_][d] > "u")) {
|
|
3209
|
+
var h = { v: r[_][d] }, m = s + _, u = l + d;
|
|
3210
|
+
if (f.s.r > m && (f.s.r = m), f.s.c > u && (f.s.c = u), f.e.r < m && (f.e.r = m), f.e.c < u && (f.e.c = u), r[_][d] && typeof r[_][d] == "object" && !Array.isArray(r[_][d]) && !(r[_][d] instanceof Date))
|
|
3211
|
+
h = r[_][d];
|
|
3212
|
+
else if (Array.isArray(h.v) && (h.f = r[_][d][1], h.v = h.v[0]), h.v === null)
|
|
3213
3213
|
if (h.f)
|
|
3214
3214
|
h.t = "n";
|
|
3215
3215
|
else if (a.nullError)
|
|
@@ -3221,9 +3221,9 @@ function sheet_add_aoa(e, r, t) {
|
|
|
3221
3221
|
else
|
|
3222
3222
|
typeof h.v == "number" ? h.t = "n" : typeof h.v == "boolean" ? h.t = "b" : h.v instanceof Date ? (h.z = a.dateNF || table_fmt[14], a.cellDates ? (h.t = "d", h.w = SSF_format(h.z, datenum(h.v))) : (h.t = "n", h.v = datenum(h.v), h.w = SSF_format(h.z, h.v))) : h.t = "s";
|
|
3223
3223
|
if (n)
|
|
3224
|
-
i[
|
|
3224
|
+
i[m] || (i[m] = []), i[m][u] && i[m][u].z && (h.z = i[m][u].z), i[m][u] = h;
|
|
3225
3225
|
else {
|
|
3226
|
-
var p = encode_cell({ c: u, r:
|
|
3226
|
+
var p = encode_cell({ c: u, r: m });
|
|
3227
3227
|
i[p] && i[p].z && (h.z = i[p].z), i[p] = h;
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
@@ -4207,8 +4207,8 @@ function write_PropertySet(e, r, t) {
|
|
|
4207
4207
|
f = new_buf(8), f.write_shift(4, 0), n.unshift(f);
|
|
4208
4208
|
var c = [new_buf(4)];
|
|
4209
4209
|
for (c[0].write_shift(4, e.length), l = 0; l < e.length; ++l) {
|
|
4210
|
-
var
|
|
4211
|
-
for (o = new_buf(8 + 2 * (
|
|
4210
|
+
var _ = e[l][0];
|
|
4211
|
+
for (o = new_buf(8 + 2 * (_.length + 1) + (_.length % 2 ? 0 : 2)), o.write_shift(4, l + 2), o.write_shift(4, _.length + 1), o.write_shift(0, _, "dbcs"); o.l != o.length; )
|
|
4212
4212
|
o.write_shift(1, 0);
|
|
4213
4213
|
c.push(o);
|
|
4214
4214
|
}
|
|
@@ -4216,18 +4216,18 @@ function write_PropertySet(e, r, t) {
|
|
|
4216
4216
|
}
|
|
4217
4217
|
for (l = 0; l < e.length; ++l)
|
|
4218
4218
|
if (!(r && !r[e[l][0]]) && !(XLSPSSkip.indexOf(e[l][0]) > -1 || PseudoPropsPairs.indexOf(e[l][0]) > -1) && e[l][1] != null) {
|
|
4219
|
-
var
|
|
4219
|
+
var d = e[l][1], h = 0;
|
|
4220
4220
|
if (r) {
|
|
4221
4221
|
h = +r[e[l][0]];
|
|
4222
|
-
var
|
|
4223
|
-
if (
|
|
4224
|
-
var u =
|
|
4225
|
-
|
|
4222
|
+
var m = t[h];
|
|
4223
|
+
if (m.p == "version" && typeof d == "string") {
|
|
4224
|
+
var u = d.split(".");
|
|
4225
|
+
d = (+u[0] << 16) + (+u[1] || 0);
|
|
4226
4226
|
}
|
|
4227
|
-
o = write_TypedPropertyValue(
|
|
4227
|
+
o = write_TypedPropertyValue(m.t, d);
|
|
4228
4228
|
} else {
|
|
4229
|
-
var p = guess_property_type(
|
|
4230
|
-
p == -1 && (p = 31,
|
|
4229
|
+
var p = guess_property_type(d);
|
|
4230
|
+
p == -1 && (p = 31, d = String(d)), o = write_TypedPropertyValue(p, d);
|
|
4231
4231
|
}
|
|
4232
4232
|
i.push(o), f = new_buf(8), f.write_shift(4, r ? h : 2 + l), n.push(f), s += 8 + o.length;
|
|
4233
4233
|
}
|
|
@@ -4742,36 +4742,36 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4742
4742
|
break;
|
|
4743
4743
|
}
|
|
4744
4744
|
prep_blob(c, 0);
|
|
4745
|
-
var
|
|
4746
|
-
switch (
|
|
4745
|
+
var _ = c.read_shift(1), d = !!(_ & 136), h = !1, m = !1;
|
|
4746
|
+
switch (_) {
|
|
4747
4747
|
case 2:
|
|
4748
4748
|
break;
|
|
4749
4749
|
case 3:
|
|
4750
4750
|
break;
|
|
4751
4751
|
case 48:
|
|
4752
|
-
h = !0,
|
|
4752
|
+
h = !0, d = !0;
|
|
4753
4753
|
break;
|
|
4754
4754
|
case 49:
|
|
4755
|
-
h = !0,
|
|
4755
|
+
h = !0, d = !0;
|
|
4756
4756
|
break;
|
|
4757
4757
|
case 131:
|
|
4758
4758
|
break;
|
|
4759
4759
|
case 139:
|
|
4760
4760
|
break;
|
|
4761
4761
|
case 140:
|
|
4762
|
-
|
|
4762
|
+
m = !0;
|
|
4763
4763
|
break;
|
|
4764
4764
|
case 245:
|
|
4765
4765
|
break;
|
|
4766
4766
|
default:
|
|
4767
|
-
throw new Error("DBF Unsupported Version: " +
|
|
4767
|
+
throw new Error("DBF Unsupported Version: " + _.toString(16));
|
|
4768
4768
|
}
|
|
4769
4769
|
var u = 0, p = 521;
|
|
4770
|
-
|
|
4770
|
+
_ == 2 && (u = c.read_shift(2)), c.l += 3, _ != 2 && (u = c.read_shift(4)), u > 1048576 && (u = 1e6), _ != 2 && (p = c.read_shift(2));
|
|
4771
4771
|
var C = c.read_shift(2), I = o.codepage || 1252;
|
|
4772
|
-
|
|
4773
|
-
for (var k = [], b = {}, X = Math.min(c.length,
|
|
4774
|
-
switch (b = {}, b.name = $cptable.utils.decode(I, c.slice(c.l, c.l + z)).replace(/[\u0000\r\n].*$/g, ""), c.l += z, b.type = String.fromCharCode(c.read_shift(1)),
|
|
4772
|
+
_ != 2 && (c.l += 16, c.read_shift(1), c[c.l] !== 0 && (I = e[c[c.l]]), c.l += 1, c.l += 2), m && (c.l += 36);
|
|
4773
|
+
for (var k = [], b = {}, X = Math.min(c.length, _ == 2 ? 521 : p - 10 - (h ? 264 : 0)), z = m ? 32 : 11; c.l < X && c[c.l] != 13; )
|
|
4774
|
+
switch (b = {}, b.name = $cptable.utils.decode(I, c.slice(c.l, c.l + z)).replace(/[\u0000\r\n].*$/g, ""), c.l += z, b.type = String.fromCharCode(c.read_shift(1)), _ != 2 && !m && (b.offset = c.read_shift(4)), b.len = c.read_shift(1), _ == 2 && (b.offset = c.read_shift(2)), b.dec = c.read_shift(1), b.name.length && k.push(b), _ != 2 && (c.l += m ? 13 : 14), b.type) {
|
|
4775
4775
|
case "B":
|
|
4776
4776
|
(!h || b.len != 8) && o.WTF && console.log("Skipping " + b.name + ":" + b.type);
|
|
4777
4777
|
break;
|
|
@@ -4799,7 +4799,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4799
4799
|
if (c[c.l] !== 13 && (c.l = p - 1), c.read_shift(1) !== 13)
|
|
4800
4800
|
throw new Error("DBF Terminator not found " + c.l + " " + c[c.l]);
|
|
4801
4801
|
c.l = p;
|
|
4802
|
-
var
|
|
4802
|
+
var y = 0, B = 0;
|
|
4803
4803
|
for (f[0] = [], B = 0; B != k.length; ++B)
|
|
4804
4804
|
f[0][B] = k[B].name;
|
|
4805
4805
|
for (; u-- > 0; ) {
|
|
@@ -4807,33 +4807,33 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4807
4807
|
c.l += C;
|
|
4808
4808
|
continue;
|
|
4809
4809
|
}
|
|
4810
|
-
for (++c.l, f[++
|
|
4810
|
+
for (++c.l, f[++y] = [], B = 0, B = 0; B != k.length; ++B) {
|
|
4811
4811
|
var A = c.slice(c.l, c.l + k[B].len);
|
|
4812
4812
|
c.l += k[B].len, prep_blob(A, 0);
|
|
4813
4813
|
var N = $cptable.utils.decode(I, A);
|
|
4814
4814
|
switch (k[B].type) {
|
|
4815
4815
|
case "C":
|
|
4816
|
-
N.trim().length && (f[
|
|
4816
|
+
N.trim().length && (f[y][B] = N.replace(/\s+$/, ""));
|
|
4817
4817
|
break;
|
|
4818
4818
|
case "D":
|
|
4819
|
-
N.length === 8 ? f[
|
|
4819
|
+
N.length === 8 ? f[y][B] = new Date(+N.slice(0, 4), +N.slice(4, 6) - 1, +N.slice(6, 8)) : f[y][B] = N;
|
|
4820
4820
|
break;
|
|
4821
4821
|
case "F":
|
|
4822
|
-
f[
|
|
4822
|
+
f[y][B] = parseFloat(N.trim());
|
|
4823
4823
|
break;
|
|
4824
4824
|
case "+":
|
|
4825
4825
|
case "I":
|
|
4826
|
-
f[
|
|
4826
|
+
f[y][B] = m ? A.read_shift(-4, "i") ^ 2147483648 : A.read_shift(4, "i");
|
|
4827
4827
|
break;
|
|
4828
4828
|
case "L":
|
|
4829
4829
|
switch (N.trim().toUpperCase()) {
|
|
4830
4830
|
case "Y":
|
|
4831
4831
|
case "T":
|
|
4832
|
-
f[
|
|
4832
|
+
f[y][B] = !0;
|
|
4833
4833
|
break;
|
|
4834
4834
|
case "N":
|
|
4835
4835
|
case "F":
|
|
4836
|
-
f[
|
|
4836
|
+
f[y][B] = !1;
|
|
4837
4837
|
break;
|
|
4838
4838
|
case "":
|
|
4839
4839
|
case "?":
|
|
@@ -4843,28 +4843,28 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4843
4843
|
}
|
|
4844
4844
|
break;
|
|
4845
4845
|
case "M":
|
|
4846
|
-
if (!
|
|
4847
|
-
throw new Error("DBF Unexpected MEMO for type " +
|
|
4848
|
-
f[
|
|
4846
|
+
if (!d)
|
|
4847
|
+
throw new Error("DBF Unexpected MEMO for type " + _.toString(16));
|
|
4848
|
+
f[y][B] = "##MEMO##" + (m ? parseInt(N.trim(), 10) : A.read_shift(4));
|
|
4849
4849
|
break;
|
|
4850
4850
|
case "N":
|
|
4851
|
-
N = N.replace(/\u0000/g, "").trim(), N && N != "." && (f[
|
|
4851
|
+
N = N.replace(/\u0000/g, "").trim(), N && N != "." && (f[y][B] = +N || 0);
|
|
4852
4852
|
break;
|
|
4853
4853
|
case "@":
|
|
4854
|
-
f[
|
|
4854
|
+
f[y][B] = new Date(A.read_shift(-8, "f") - 621356832e5);
|
|
4855
4855
|
break;
|
|
4856
4856
|
case "T":
|
|
4857
|
-
f[
|
|
4857
|
+
f[y][B] = new Date((A.read_shift(4) - 2440588) * 864e5 + A.read_shift(4));
|
|
4858
4858
|
break;
|
|
4859
4859
|
case "Y":
|
|
4860
|
-
f[
|
|
4860
|
+
f[y][B] = A.read_shift(4, "i") / 1e4 + A.read_shift(4, "i") / 1e4 * Math.pow(2, 32);
|
|
4861
4861
|
break;
|
|
4862
4862
|
case "O":
|
|
4863
|
-
f[
|
|
4863
|
+
f[y][B] = -A.read_shift(-8, "f");
|
|
4864
4864
|
break;
|
|
4865
4865
|
case "B":
|
|
4866
4866
|
if (h && k[B].len == 8) {
|
|
4867
|
-
f[
|
|
4867
|
+
f[y][B] = A.read_shift(8, "f");
|
|
4868
4868
|
break;
|
|
4869
4869
|
}
|
|
4870
4870
|
case "G":
|
|
@@ -4879,7 +4879,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4879
4879
|
}
|
|
4880
4880
|
}
|
|
4881
4881
|
}
|
|
4882
|
-
if (
|
|
4882
|
+
if (_ != 2 && c.l < c.length && c[c.l++] != 26)
|
|
4883
4883
|
throw new Error("DBF EOF Marker missing " + (c.l - 1) + " of " + c.length + " " + c[c.l - 1].toString(16));
|
|
4884
4884
|
return o && o.sheetRows && (f = f.slice(0, o.sheetRows)), o.DBF = k, f;
|
|
4885
4885
|
}
|
|
@@ -4887,10 +4887,10 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4887
4887
|
var f = o || {};
|
|
4888
4888
|
f.dateNF || (f.dateNF = "yyyymmdd");
|
|
4889
4889
|
var c = aoa_to_sheet(t(l, f), f);
|
|
4890
|
-
return c["!cols"] = f.DBF.map(function(
|
|
4890
|
+
return c["!cols"] = f.DBF.map(function(_) {
|
|
4891
4891
|
return {
|
|
4892
|
-
wch:
|
|
4893
|
-
DBF:
|
|
4892
|
+
wch: _.len,
|
|
4893
|
+
DBF: _
|
|
4894
4894
|
};
|
|
4895
4895
|
}), delete f.DBF, c;
|
|
4896
4896
|
}
|
|
@@ -4908,19 +4908,19 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4908
4908
|
var f = o || {};
|
|
4909
4909
|
if (+f.codepage >= 0 && set_cp(+f.codepage), f.type == "string")
|
|
4910
4910
|
throw new Error("Cannot write DBF to JS string");
|
|
4911
|
-
var c = buf_array(),
|
|
4912
|
-
for (u = 0; u <
|
|
4913
|
-
if (((
|
|
4914
|
-
|
|
4911
|
+
var c = buf_array(), _ = sheet_to_json(l, { header: 1, raw: !0, cellDates: !0 }), d = _[0], h = _.slice(1), m = l["!cols"] || [], u = 0, p = 0, C = 0, I = 1;
|
|
4912
|
+
for (u = 0; u < d.length; ++u) {
|
|
4913
|
+
if (((m[u] || {}).DBF || {}).name) {
|
|
4914
|
+
d[u] = m[u].DBF.name, ++C;
|
|
4915
4915
|
continue;
|
|
4916
4916
|
}
|
|
4917
|
-
if (
|
|
4918
|
-
if (++C, typeof
|
|
4919
|
-
throw new Error("DBF Invalid column name " +
|
|
4920
|
-
if (
|
|
4917
|
+
if (d[u] != null) {
|
|
4918
|
+
if (++C, typeof d[u] == "number" && (d[u] = d[u].toString(10)), typeof d[u] != "string")
|
|
4919
|
+
throw new Error("DBF Invalid column name " + d[u] + " |" + typeof d[u] + "|");
|
|
4920
|
+
if (d.indexOf(d[u]) !== u) {
|
|
4921
4921
|
for (p = 0; p < 1024; ++p)
|
|
4922
|
-
if (
|
|
4923
|
-
|
|
4922
|
+
if (d.indexOf(d[u] + "_" + p) == -1) {
|
|
4923
|
+
d[u] += "_" + p;
|
|
4924
4924
|
break;
|
|
4925
4925
|
}
|
|
4926
4926
|
}
|
|
@@ -4928,10 +4928,10 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4928
4928
|
}
|
|
4929
4929
|
var k = safe_decode_range(l["!ref"]), b = [], X = [], z = [];
|
|
4930
4930
|
for (u = 0; u <= k.e.c - k.s.c; ++u) {
|
|
4931
|
-
var
|
|
4931
|
+
var y = "", B = "", A = 0, N = [];
|
|
4932
4932
|
for (p = 0; p < h.length; ++p)
|
|
4933
4933
|
h[p][u] != null && N.push(h[p][u]);
|
|
4934
|
-
if (N.length == 0 ||
|
|
4934
|
+
if (N.length == 0 || d[u] == null) {
|
|
4935
4935
|
b[u] = "?";
|
|
4936
4936
|
continue;
|
|
4937
4937
|
}
|
|
@@ -4952,9 +4952,9 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4952
4952
|
default:
|
|
4953
4953
|
B = "C";
|
|
4954
4954
|
}
|
|
4955
|
-
A = Math.max(A, String(N[p]).length),
|
|
4955
|
+
A = Math.max(A, String(N[p]).length), y = y && y != B ? "C" : B;
|
|
4956
4956
|
}
|
|
4957
|
-
A > 250 && (A = 250), B = ((
|
|
4957
|
+
A > 250 && (A = 250), B = ((m[u] || {}).DBF || {}).type, B == "C" && m[u].DBF.len > A && (A = m[u].DBF.len), y == "B" && B == "N" && (y = "N", z[u] = m[u].DBF.dec, A = m[u].DBF.len), X[u] = y == "C" || B == "N" ? A : i[y] || 0, I += X[u], b[u] = y;
|
|
4958
4958
|
}
|
|
4959
4959
|
var V = c.next(32);
|
|
4960
4960
|
for (V.write_shift(4, 318902576), V.write_shift(4, h.length), V.write_shift(2, 296 + 32 * C), V.write_shift(2, I), u = 0; u < 4; ++u)
|
|
@@ -4963,9 +4963,9 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4963
4963
|
/*::String(*/
|
|
4964
4964
|
current_ansi
|
|
4965
4965
|
/*::)*/
|
|
4966
|
-
] || 3) << 8), u = 0, p = 0; u <
|
|
4967
|
-
if (
|
|
4968
|
-
var G = c.next(32), Y = (
|
|
4966
|
+
] || 3) << 8), u = 0, p = 0; u < d.length; ++u)
|
|
4967
|
+
if (d[u] != null) {
|
|
4968
|
+
var G = c.next(32), Y = (d[u].slice(-10) + "\0\0\0\0\0\0\0\0\0\0\0").slice(0, 11);
|
|
4969
4969
|
G.write_shift(1, Y, "sbcs"), G.write_shift(1, b[u] == "?" ? "C" : b[u], "sbcs"), G.write_shift(4, p), G.write_shift(1, X[u] || i[b[u]] || 0), G.write_shift(1, z[u] || 0), G.write_shift(1, 2), G.write_shift(4, 0), G.write_shift(1, 0), G.write_shift(4, 0), G.write_shift(4, 0), p += X[u] || i[b[u]] || 0;
|
|
4970
4970
|
}
|
|
4971
4971
|
var le = c.next(264);
|
|
@@ -4973,8 +4973,8 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
4973
4973
|
le.write_shift(4, 0);
|
|
4974
4974
|
for (u = 0; u < h.length; ++u) {
|
|
4975
4975
|
var q = c.next(I);
|
|
4976
|
-
for (q.write_shift(1, 0), p = 0; p <
|
|
4977
|
-
if (
|
|
4976
|
+
for (q.write_shift(1, 0), p = 0; p < d.length; ++p)
|
|
4977
|
+
if (d[p] != null)
|
|
4978
4978
|
switch (b[p]) {
|
|
4979
4979
|
case "L":
|
|
4980
4980
|
q.write_shift(1, h[u][p] == null ? 63 : h[u][p] ? 84 : 70);
|
|
@@ -5101,32 +5101,32 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5101
5101
|
">": 190,
|
|
5102
5102
|
"?": 191,
|
|
5103
5103
|
"{": 223
|
|
5104
|
-
}, r = new RegExp("\x1BN(" + keys(e).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1") + "|\\|)", "gm"), t = function(
|
|
5105
|
-
var
|
|
5106
|
-
return typeof
|
|
5107
|
-
}, a = function(
|
|
5108
|
-
var u = h.charCodeAt(0) - 32 << 4 |
|
|
5109
|
-
return u == 59 ?
|
|
5104
|
+
}, r = new RegExp("\x1BN(" + keys(e).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1") + "|\\|)", "gm"), t = function(d, h) {
|
|
5105
|
+
var m = e[h];
|
|
5106
|
+
return typeof m == "number" ? _getansi(m) : m;
|
|
5107
|
+
}, a = function(d, h, m) {
|
|
5108
|
+
var u = h.charCodeAt(0) - 32 << 4 | m.charCodeAt(0) - 48;
|
|
5109
|
+
return u == 59 ? d : _getansi(u);
|
|
5110
5110
|
};
|
|
5111
5111
|
e["|"] = 254;
|
|
5112
|
-
function n(
|
|
5112
|
+
function n(d, h) {
|
|
5113
5113
|
switch (h.type) {
|
|
5114
5114
|
case "base64":
|
|
5115
|
-
return i(Base64_decode(
|
|
5115
|
+
return i(Base64_decode(d), h);
|
|
5116
5116
|
case "binary":
|
|
5117
|
-
return i(
|
|
5117
|
+
return i(d, h);
|
|
5118
5118
|
case "buffer":
|
|
5119
|
-
return i(has_buf && Buffer.isBuffer(
|
|
5119
|
+
return i(has_buf && Buffer.isBuffer(d) ? d.toString("binary") : a2s(d), h);
|
|
5120
5120
|
case "array":
|
|
5121
|
-
return i(cc2str(
|
|
5121
|
+
return i(cc2str(d), h);
|
|
5122
5122
|
}
|
|
5123
5123
|
throw new Error("Unrecognized type " + h.type);
|
|
5124
5124
|
}
|
|
5125
|
-
function i(
|
|
5126
|
-
var
|
|
5127
|
-
for (+h.codepage >= 0 && set_cp(+h.codepage); C !==
|
|
5125
|
+
function i(d, h) {
|
|
5126
|
+
var m = d.split(/[\n\r]+/), u = -1, p = -1, C = 0, I = 0, k = [], b = [], X = null, z = {}, y = [], B = [], A = [], N = 0, V;
|
|
5127
|
+
for (+h.codepage >= 0 && set_cp(+h.codepage); C !== m.length; ++C) {
|
|
5128
5128
|
N = 0;
|
|
5129
|
-
var G =
|
|
5129
|
+
var G = m[C].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g, a).replace(r, t), Y = G.replace(/;;/g, "\0").split(";").map(function(D) {
|
|
5130
5130
|
return D.replace(/\u0000/g, ";");
|
|
5131
5131
|
}), le = Y[0], q;
|
|
5132
5132
|
if (G.length > 0)
|
|
@@ -5224,7 +5224,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5224
5224
|
p = parseInt(Y[I].slice(1)) - 1, B[p] || (B[p] = {});
|
|
5225
5225
|
break;
|
|
5226
5226
|
case "R":
|
|
5227
|
-
u = parseInt(Y[I].slice(1)) - 1,
|
|
5227
|
+
u = parseInt(Y[I].slice(1)) - 1, y[u] || (y[u] = {}), N > 0 ? (y[u].hpt = N, y[u].hpx = pt2px(N)) : N === 0 && (y[u].hidden = !0);
|
|
5228
5228
|
break;
|
|
5229
5229
|
default:
|
|
5230
5230
|
if (h && h.WTF)
|
|
@@ -5237,65 +5237,65 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5237
5237
|
throw new Error("SYLK bad record " + G);
|
|
5238
5238
|
}
|
|
5239
5239
|
}
|
|
5240
|
-
return
|
|
5240
|
+
return y.length > 0 && (z["!rows"] = y), B.length > 0 && (z["!cols"] = B), h && h.sheetRows && (k = k.slice(0, h.sheetRows)), [k, z];
|
|
5241
5241
|
}
|
|
5242
|
-
function s(
|
|
5243
|
-
var
|
|
5242
|
+
function s(d, h) {
|
|
5243
|
+
var m = n(d, h), u = m[0], p = m[1], C = aoa_to_sheet(u, h);
|
|
5244
5244
|
return keys(p).forEach(function(I) {
|
|
5245
5245
|
C[I] = p[I];
|
|
5246
5246
|
}), C;
|
|
5247
5247
|
}
|
|
5248
|
-
function l(
|
|
5249
|
-
return sheet_to_workbook(s(
|
|
5248
|
+
function l(d, h) {
|
|
5249
|
+
return sheet_to_workbook(s(d, h), h);
|
|
5250
5250
|
}
|
|
5251
|
-
function o(
|
|
5252
|
-
var p = "C;Y" + (
|
|
5253
|
-
switch (
|
|
5251
|
+
function o(d, h, m, u) {
|
|
5252
|
+
var p = "C;Y" + (m + 1) + ";X" + (u + 1) + ";K";
|
|
5253
|
+
switch (d.t) {
|
|
5254
5254
|
case "n":
|
|
5255
|
-
p +=
|
|
5255
|
+
p += d.v || 0, d.f && !d.F && (p += ";E" + a1_to_rc(d.f, { r: m, c: u }));
|
|
5256
5256
|
break;
|
|
5257
5257
|
case "b":
|
|
5258
|
-
p +=
|
|
5258
|
+
p += d.v ? "TRUE" : "FALSE";
|
|
5259
5259
|
break;
|
|
5260
5260
|
case "e":
|
|
5261
|
-
p +=
|
|
5261
|
+
p += d.w || d.v;
|
|
5262
5262
|
break;
|
|
5263
5263
|
case "d":
|
|
5264
|
-
p += '"' + (
|
|
5264
|
+
p += '"' + (d.w || d.v) + '"';
|
|
5265
5265
|
break;
|
|
5266
5266
|
case "s":
|
|
5267
|
-
p += '"' +
|
|
5267
|
+
p += '"' + d.v.replace(/"/g, "").replace(/;/g, ";;") + '"';
|
|
5268
5268
|
break;
|
|
5269
5269
|
}
|
|
5270
5270
|
return p;
|
|
5271
5271
|
}
|
|
5272
|
-
function f(
|
|
5273
|
-
h.forEach(function(
|
|
5272
|
+
function f(d, h) {
|
|
5273
|
+
h.forEach(function(m, u) {
|
|
5274
5274
|
var p = "F;W" + (u + 1) + " " + (u + 1) + " ";
|
|
5275
|
-
|
|
5275
|
+
m.hidden ? p += "0" : (typeof m.width == "number" && !m.wpx && (m.wpx = width2px(m.width)), typeof m.wpx == "number" && !m.wch && (m.wch = px2char(m.wpx)), typeof m.wch == "number" && (p += Math.round(m.wch))), p.charAt(p.length - 1) != " " && d.push(p);
|
|
5276
5276
|
});
|
|
5277
5277
|
}
|
|
5278
|
-
function c(
|
|
5279
|
-
h.forEach(function(
|
|
5278
|
+
function c(d, h) {
|
|
5279
|
+
h.forEach(function(m, u) {
|
|
5280
5280
|
var p = "F;";
|
|
5281
|
-
|
|
5281
|
+
m.hidden ? p += "M0;" : m.hpt ? p += "M" + 20 * m.hpt + ";" : m.hpx && (p += "M" + 20 * px2pt(m.hpx) + ";"), p.length > 2 && d.push(p + "R" + (u + 1));
|
|
5282
5282
|
});
|
|
5283
5283
|
}
|
|
5284
|
-
function d
|
|
5285
|
-
var
|
|
5284
|
+
function _(d, h) {
|
|
5285
|
+
var m = ["ID;PWXL;N;E"], u = [], p = safe_decode_range(d["!ref"]), C, I = Array.isArray(d), k = `\r
|
|
5286
5286
|
`;
|
|
5287
|
-
|
|
5287
|
+
m.push("P;PGeneral"), m.push("F;P0;DG0G8;M255"), d["!cols"] && f(m, d["!cols"]), d["!rows"] && c(m, d["!rows"]), m.push("B;Y" + (p.e.r - p.s.r + 1) + ";X" + (p.e.c - p.s.c + 1) + ";D" + [p.s.c, p.s.r, p.e.c, p.e.r].join(" "));
|
|
5288
5288
|
for (var b = p.s.r; b <= p.e.r; ++b)
|
|
5289
5289
|
for (var X = p.s.c; X <= p.e.c; ++X) {
|
|
5290
5290
|
var z = encode_cell({ r: b, c: X });
|
|
5291
|
-
C = I ? (
|
|
5291
|
+
C = I ? (d[b] || [])[X] : d[z], !(!C || C.v == null && (!C.f || C.F)) && u.push(o(C, d, b, X));
|
|
5292
5292
|
}
|
|
5293
|
-
return
|
|
5293
|
+
return m.join(k) + k + u.join(k) + k + "E" + k;
|
|
5294
5294
|
}
|
|
5295
5295
|
return {
|
|
5296
5296
|
to_workbook: l,
|
|
5297
5297
|
to_sheet: s,
|
|
5298
|
-
from_sheet:
|
|
5298
|
+
from_sheet: _
|
|
5299
5299
|
};
|
|
5300
5300
|
}(), DIF = /* @__PURE__ */ function() {
|
|
5301
5301
|
function e(i, s) {
|
|
@@ -5313,13 +5313,13 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5313
5313
|
}
|
|
5314
5314
|
function r(i, s) {
|
|
5315
5315
|
for (var l = i.split(`
|
|
5316
|
-
`), o = -1, f = -1, c = 0,
|
|
5316
|
+
`), o = -1, f = -1, c = 0, _ = []; c !== l.length; ++c) {
|
|
5317
5317
|
if (l[c].trim() === "BOT") {
|
|
5318
|
-
|
|
5318
|
+
_[++o] = [], f = 0;
|
|
5319
5319
|
continue;
|
|
5320
5320
|
}
|
|
5321
5321
|
if (!(o < 0)) {
|
|
5322
|
-
var
|
|
5322
|
+
var d = l[c].trim().split(","), h = d[0], m = d[1];
|
|
5323
5323
|
++c;
|
|
5324
5324
|
for (var u = l[c] || ""; (u.match(/["]/g) || []).length & 1 && c < l.length - 1; )
|
|
5325
5325
|
u += `
|
|
@@ -5327,23 +5327,23 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5327
5327
|
switch (u = u.trim(), +h) {
|
|
5328
5328
|
case -1:
|
|
5329
5329
|
if (u === "BOT") {
|
|
5330
|
-
|
|
5330
|
+
_[++o] = [], f = 0;
|
|
5331
5331
|
continue;
|
|
5332
5332
|
} else if (u !== "EOD")
|
|
5333
5333
|
throw new Error("Unrecognized DIF special command " + u);
|
|
5334
5334
|
break;
|
|
5335
5335
|
case 0:
|
|
5336
|
-
u === "TRUE" ?
|
|
5336
|
+
u === "TRUE" ? _[o][f] = !0 : u === "FALSE" ? _[o][f] = !1 : isNaN(fuzzynum(m)) ? isNaN(fuzzydate(m).getDate()) ? _[o][f] = m : _[o][f] = parseDate(m) : _[o][f] = fuzzynum(m), ++f;
|
|
5337
5337
|
break;
|
|
5338
5338
|
case 1:
|
|
5339
|
-
u = u.slice(1, u.length - 1), u = u.replace(/""/g, '"'), u && u.match(/^=".*"$/) && (u = u.slice(2, -1)),
|
|
5339
|
+
u = u.slice(1, u.length - 1), u = u.replace(/""/g, '"'), u && u.match(/^=".*"$/) && (u = u.slice(2, -1)), _[o][f++] = u !== "" ? u : null;
|
|
5340
5340
|
break;
|
|
5341
5341
|
}
|
|
5342
5342
|
if (u === "EOD")
|
|
5343
5343
|
break;
|
|
5344
5344
|
}
|
|
5345
5345
|
}
|
|
5346
|
-
return s && s.sheetRows && (
|
|
5346
|
+
return s && s.sheetRows && (_ = _.slice(0, s.sheetRows)), _;
|
|
5347
5347
|
}
|
|
5348
5348
|
function t(i, s) {
|
|
5349
5349
|
return aoa_to_sheet(e(i, s), s);
|
|
@@ -5352,35 +5352,35 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5352
5352
|
return sheet_to_workbook(t(i, s), s);
|
|
5353
5353
|
}
|
|
5354
5354
|
var n = /* @__PURE__ */ function() {
|
|
5355
|
-
var i = function(o, f, c,
|
|
5356
|
-
o.push(f), o.push(c + "," +
|
|
5357
|
-
}, s = function(o, f, c,
|
|
5358
|
-
o.push(f + "," + c), o.push(f == 1 ? '"' +
|
|
5355
|
+
var i = function(o, f, c, _, d) {
|
|
5356
|
+
o.push(f), o.push(c + "," + _), o.push('"' + d.replace(/"/g, '""') + '"');
|
|
5357
|
+
}, s = function(o, f, c, _) {
|
|
5358
|
+
o.push(f + "," + c), o.push(f == 1 ? '"' + _.replace(/"/g, '""') + '"' : _);
|
|
5359
5359
|
};
|
|
5360
5360
|
return function(o) {
|
|
5361
|
-
var f = [], c = safe_decode_range(o["!ref"]),
|
|
5361
|
+
var f = [], c = safe_decode_range(o["!ref"]), _, d = Array.isArray(o);
|
|
5362
5362
|
i(f, "TABLE", 0, 1, "sheetjs"), i(f, "VECTORS", 0, c.e.r - c.s.r + 1, ""), i(f, "TUPLES", 0, c.e.c - c.s.c + 1, ""), i(f, "DATA", 0, 0, "");
|
|
5363
5363
|
for (var h = c.s.r; h <= c.e.r; ++h) {
|
|
5364
5364
|
s(f, -1, 0, "BOT");
|
|
5365
|
-
for (var
|
|
5366
|
-
var u = encode_cell({ r: h, c:
|
|
5367
|
-
if (
|
|
5365
|
+
for (var m = c.s.c; m <= c.e.c; ++m) {
|
|
5366
|
+
var u = encode_cell({ r: h, c: m });
|
|
5367
|
+
if (_ = d ? (o[h] || [])[m] : o[u], !_) {
|
|
5368
5368
|
s(f, 1, 0, "");
|
|
5369
5369
|
continue;
|
|
5370
5370
|
}
|
|
5371
|
-
switch (
|
|
5371
|
+
switch (_.t) {
|
|
5372
5372
|
case "n":
|
|
5373
|
-
var p =
|
|
5374
|
-
!p &&
|
|
5373
|
+
var p = _.w;
|
|
5374
|
+
!p && _.v != null && (p = _.v), p == null ? _.f && !_.F ? s(f, 1, 0, "=" + _.f) : s(f, 1, 0, "") : s(f, 0, p, "V");
|
|
5375
5375
|
break;
|
|
5376
5376
|
case "b":
|
|
5377
|
-
s(f, 0,
|
|
5377
|
+
s(f, 0, _.v ? 1 : 0, _.v ? "TRUE" : "FALSE");
|
|
5378
5378
|
break;
|
|
5379
5379
|
case "s":
|
|
5380
|
-
s(f, 1, 0, isNaN(
|
|
5380
|
+
s(f, 1, 0, isNaN(_.v) ? _.v : '="' + _.v + '"');
|
|
5381
5381
|
break;
|
|
5382
5382
|
case "d":
|
|
5383
|
-
|
|
5383
|
+
_.w || (_.w = SSF_format(_.z || table_fmt[14], datenum(parseDate(_.v)))), s(f, 0, _.w, "V");
|
|
5384
5384
|
break;
|
|
5385
5385
|
default:
|
|
5386
5386
|
s(f, 1, 0, "");
|
|
@@ -5399,51 +5399,51 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5399
5399
|
from_sheet: n
|
|
5400
5400
|
};
|
|
5401
5401
|
}(), ETH = /* @__PURE__ */ function() {
|
|
5402
|
-
function e(
|
|
5403
|
-
return
|
|
5402
|
+
function e(_) {
|
|
5403
|
+
return _.replace(/\\b/g, "\\").replace(/\\c/g, ":").replace(/\\n/g, `
|
|
5404
5404
|
`);
|
|
5405
5405
|
}
|
|
5406
|
-
function r(
|
|
5407
|
-
return
|
|
5406
|
+
function r(_) {
|
|
5407
|
+
return _.replace(/\\/g, "\\b").replace(/:/g, "\\c").replace(/\n/g, "\\n");
|
|
5408
5408
|
}
|
|
5409
|
-
function t(
|
|
5410
|
-
for (var h =
|
|
5411
|
-
`),
|
|
5409
|
+
function t(_, d) {
|
|
5410
|
+
for (var h = _.split(`
|
|
5411
|
+
`), m = -1, u = -1, p = 0, C = []; p !== h.length; ++p) {
|
|
5412
5412
|
var I = h[p].trim().split(":");
|
|
5413
5413
|
if (I[0] === "cell") {
|
|
5414
5414
|
var k = decode_cell(I[1]);
|
|
5415
5415
|
if (C.length <= k.r)
|
|
5416
|
-
for (
|
|
5417
|
-
C[
|
|
5418
|
-
switch (
|
|
5416
|
+
for (m = C.length; m <= k.r; ++m)
|
|
5417
|
+
C[m] || (C[m] = []);
|
|
5418
|
+
switch (m = k.r, u = k.c, I[2]) {
|
|
5419
5419
|
case "t":
|
|
5420
|
-
C[
|
|
5420
|
+
C[m][u] = e(I[3]);
|
|
5421
5421
|
break;
|
|
5422
5422
|
case "v":
|
|
5423
|
-
C[
|
|
5423
|
+
C[m][u] = +I[3];
|
|
5424
5424
|
break;
|
|
5425
5425
|
case "vtf":
|
|
5426
5426
|
var b = I[I.length - 1];
|
|
5427
5427
|
case "vtc":
|
|
5428
5428
|
switch (I[3]) {
|
|
5429
5429
|
case "nl":
|
|
5430
|
-
C[
|
|
5430
|
+
C[m][u] = !!+I[4];
|
|
5431
5431
|
break;
|
|
5432
5432
|
default:
|
|
5433
|
-
C[
|
|
5433
|
+
C[m][u] = +I[4];
|
|
5434
5434
|
break;
|
|
5435
5435
|
}
|
|
5436
|
-
I[2] == "vtf" && (C[
|
|
5436
|
+
I[2] == "vtf" && (C[m][u] = [C[m][u], b]);
|
|
5437
5437
|
}
|
|
5438
5438
|
}
|
|
5439
5439
|
}
|
|
5440
|
-
return
|
|
5440
|
+
return d && d.sheetRows && (C = C.slice(0, d.sheetRows)), C;
|
|
5441
5441
|
}
|
|
5442
|
-
function a(
|
|
5443
|
-
return aoa_to_sheet(t(
|
|
5442
|
+
function a(_, d) {
|
|
5443
|
+
return aoa_to_sheet(t(_, d), d);
|
|
5444
5444
|
}
|
|
5445
|
-
function n(
|
|
5446
|
-
return sheet_to_workbook(a(
|
|
5445
|
+
function n(_, d) {
|
|
5446
|
+
return sheet_to_workbook(a(_, d), d);
|
|
5447
5447
|
}
|
|
5448
5448
|
var i = [
|
|
5449
5449
|
"socialcalc:version:1.5",
|
|
@@ -5460,37 +5460,37 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5460
5460
|
"part:sheet"
|
|
5461
5461
|
].join(`
|
|
5462
5462
|
`), o = "--SocialCalcSpreadsheetControlSave--";
|
|
5463
|
-
function f(
|
|
5464
|
-
if (!
|
|
5463
|
+
function f(_) {
|
|
5464
|
+
if (!_ || !_["!ref"])
|
|
5465
5465
|
return "";
|
|
5466
|
-
for (var
|
|
5466
|
+
for (var d = [], h = [], m, u = "", p = decode_range(_["!ref"]), C = Array.isArray(_), I = p.s.r; I <= p.e.r; ++I)
|
|
5467
5467
|
for (var k = p.s.c; k <= p.e.c; ++k)
|
|
5468
|
-
if (u = encode_cell({ r: I, c: k }),
|
|
5469
|
-
switch (h = ["cell", u, "t"],
|
|
5468
|
+
if (u = encode_cell({ r: I, c: k }), m = C ? (_[I] || [])[k] : _[u], !(!m || m.v == null || m.t === "z")) {
|
|
5469
|
+
switch (h = ["cell", u, "t"], m.t) {
|
|
5470
5470
|
case "s":
|
|
5471
5471
|
case "str":
|
|
5472
|
-
h.push(r(
|
|
5472
|
+
h.push(r(m.v));
|
|
5473
5473
|
break;
|
|
5474
5474
|
case "n":
|
|
5475
|
-
|
|
5475
|
+
m.f ? (h[2] = "vtf", h[3] = "n", h[4] = m.v, h[5] = r(m.f)) : (h[2] = "v", h[3] = m.v);
|
|
5476
5476
|
break;
|
|
5477
5477
|
case "b":
|
|
5478
|
-
h[2] = "vt" + (
|
|
5478
|
+
h[2] = "vt" + (m.f ? "f" : "c"), h[3] = "nl", h[4] = m.v ? "1" : "0", h[5] = r(m.f || (m.v ? "TRUE" : "FALSE"));
|
|
5479
5479
|
break;
|
|
5480
5480
|
case "d":
|
|
5481
|
-
var b = datenum(parseDate(
|
|
5482
|
-
h[2] = "vtc", h[3] = "nd", h[4] = "" + b, h[5] =
|
|
5481
|
+
var b = datenum(parseDate(m.v));
|
|
5482
|
+
h[2] = "vtc", h[3] = "nd", h[4] = "" + b, h[5] = m.w || SSF_format(m.z || table_fmt[14], b);
|
|
5483
5483
|
break;
|
|
5484
5484
|
case "e":
|
|
5485
5485
|
continue;
|
|
5486
5486
|
}
|
|
5487
|
-
|
|
5487
|
+
d.push(h.join(":"));
|
|
5488
5488
|
}
|
|
5489
|
-
return
|
|
5489
|
+
return d.push("sheet:c:" + (p.e.c - p.s.c + 1) + ":r:" + (p.e.r - p.s.r + 1) + ":tvf:1"), d.push("valueformat:1:text-wiki"), d.join(`
|
|
5490
5490
|
`);
|
|
5491
5491
|
}
|
|
5492
|
-
function c(
|
|
5493
|
-
return [i, s, l, s, f(
|
|
5492
|
+
function c(_) {
|
|
5493
|
+
return [i, s, l, s, f(_), o].join(`
|
|
5494
5494
|
`);
|
|
5495
5495
|
}
|
|
5496
5496
|
return {
|
|
@@ -5499,24 +5499,24 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5499
5499
|
from_sheet: c
|
|
5500
5500
|
};
|
|
5501
5501
|
}(), PRN = /* @__PURE__ */ function() {
|
|
5502
|
-
function e(c,
|
|
5503
|
-
|
|
5502
|
+
function e(c, _, d, h, m) {
|
|
5503
|
+
m.raw ? _[d][h] = c : c === "" || (c === "TRUE" ? _[d][h] = !0 : c === "FALSE" ? _[d][h] = !1 : isNaN(fuzzynum(c)) ? isNaN(fuzzydate(c).getDate()) ? _[d][h] = c : _[d][h] = parseDate(c) : _[d][h] = fuzzynum(c));
|
|
5504
5504
|
}
|
|
5505
|
-
function r(c,
|
|
5506
|
-
var
|
|
5505
|
+
function r(c, _) {
|
|
5506
|
+
var d = _ || {}, h = [];
|
|
5507
5507
|
if (!c || c.length === 0)
|
|
5508
5508
|
return h;
|
|
5509
|
-
for (var
|
|
5509
|
+
for (var m = c.split(/[\r\n]/), u = m.length - 1; u >= 0 && m[u].length === 0; )
|
|
5510
5510
|
--u;
|
|
5511
5511
|
for (var p = 10, C = 0, I = 0; I <= u; ++I)
|
|
5512
|
-
C =
|
|
5512
|
+
C = m[I].indexOf(" "), C == -1 ? C = m[I].length : C++, p = Math.max(p, C);
|
|
5513
5513
|
for (I = 0; I <= u; ++I) {
|
|
5514
5514
|
h[I] = [];
|
|
5515
5515
|
var k = 0;
|
|
5516
|
-
for (e(
|
|
5517
|
-
e(
|
|
5516
|
+
for (e(m[I].slice(0, p).trim(), h, I, k, d), k = 1; k <= (m[I].length - p) / 10 + 1; ++k)
|
|
5517
|
+
e(m[I].slice(p + (k - 1) * 10, p + k * 10).trim(), h, I, k, d);
|
|
5518
5518
|
}
|
|
5519
|
-
return
|
|
5519
|
+
return d.sheetRows && (h = h.slice(0, d.sheetRows)), h;
|
|
5520
5520
|
}
|
|
5521
5521
|
var t = {
|
|
5522
5522
|
/*::[*/
|
|
@@ -5538,32 +5538,32 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5538
5538
|
124: 0
|
|
5539
5539
|
};
|
|
5540
5540
|
function n(c) {
|
|
5541
|
-
for (var
|
|
5542
|
-
(
|
|
5543
|
-
|
|
5544
|
-
for (h in
|
|
5545
|
-
Object.prototype.hasOwnProperty.call(
|
|
5546
|
-
if (!
|
|
5547
|
-
|
|
5548
|
-
for (h in
|
|
5549
|
-
Object.prototype.hasOwnProperty.call(
|
|
5541
|
+
for (var _ = {}, d = !1, h = 0, m = 0; h < c.length; ++h)
|
|
5542
|
+
(m = c.charCodeAt(h)) == 34 ? d = !d : !d && m in t && (_[m] = (_[m] || 0) + 1);
|
|
5543
|
+
m = [];
|
|
5544
|
+
for (h in _)
|
|
5545
|
+
Object.prototype.hasOwnProperty.call(_, h) && m.push([_[h], h]);
|
|
5546
|
+
if (!m.length) {
|
|
5547
|
+
_ = a;
|
|
5548
|
+
for (h in _)
|
|
5549
|
+
Object.prototype.hasOwnProperty.call(_, h) && m.push([_[h], h]);
|
|
5550
5550
|
}
|
|
5551
|
-
return
|
|
5551
|
+
return m.sort(function(u, p) {
|
|
5552
5552
|
return u[0] - p[0] || a[u[1]] - a[p[1]];
|
|
5553
|
-
}), t[
|
|
5553
|
+
}), t[m.pop()[1]] || 44;
|
|
5554
5554
|
}
|
|
5555
|
-
function i(c,
|
|
5556
|
-
var
|
|
5557
|
-
c.slice(0, 4) == "sep=" ? c.charCodeAt(5) == 13 && c.charCodeAt(6) == 10 ? (h = c.charAt(4), c = c.slice(7)) : c.charCodeAt(5) == 13 || c.charCodeAt(5) == 10 ? (h = c.charAt(4), c = c.slice(6)) : h = n(c.slice(0, 1024)) :
|
|
5558
|
-
var p = 0, C = 0, I = 0, k = 0, b = 0, X = h.charCodeAt(0), z = !1,
|
|
5555
|
+
function i(c, _) {
|
|
5556
|
+
var d = _ || {}, h = "", m = d.dense ? [] : {}, u = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
|
|
5557
|
+
c.slice(0, 4) == "sep=" ? c.charCodeAt(5) == 13 && c.charCodeAt(6) == 10 ? (h = c.charAt(4), c = c.slice(7)) : c.charCodeAt(5) == 13 || c.charCodeAt(5) == 10 ? (h = c.charAt(4), c = c.slice(6)) : h = n(c.slice(0, 1024)) : d && d.FS ? h = d.FS : h = n(c.slice(0, 1024));
|
|
5558
|
+
var p = 0, C = 0, I = 0, k = 0, b = 0, X = h.charCodeAt(0), z = !1, y = 0, B = c.charCodeAt(0);
|
|
5559
5559
|
c = c.replace(/\r\n/mg, `
|
|
5560
5560
|
`);
|
|
5561
|
-
var A =
|
|
5561
|
+
var A = d.dateNF != null ? dateNF_regex(d.dateNF) : null;
|
|
5562
5562
|
function N() {
|
|
5563
5563
|
var V = c.slice(k, b), G = {};
|
|
5564
5564
|
if (V.charAt(0) == '"' && V.charAt(V.length - 1) == '"' && (V = V.slice(1, -1).replace(/""/g, '"')), V.length === 0)
|
|
5565
5565
|
G.t = "z";
|
|
5566
|
-
else if (
|
|
5566
|
+
else if (d.raw)
|
|
5567
5567
|
G.t = "s", G.v = V;
|
|
5568
5568
|
else if (V.trim().length === 0)
|
|
5569
5569
|
G.t = "s", G.v = V;
|
|
@@ -5574,21 +5574,21 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5574
5574
|
else if (V == "FALSE")
|
|
5575
5575
|
G.t = "b", G.v = !1;
|
|
5576
5576
|
else if (!isNaN(I = fuzzynum(V)))
|
|
5577
|
-
G.t = "n",
|
|
5577
|
+
G.t = "n", d.cellText !== !1 && (G.w = V), G.v = I;
|
|
5578
5578
|
else if (!isNaN(fuzzydate(V).getDate()) || A && V.match(A)) {
|
|
5579
|
-
G.z =
|
|
5579
|
+
G.z = d.dateNF || table_fmt[14];
|
|
5580
5580
|
var Y = 0;
|
|
5581
|
-
A && V.match(A) && (V = dateNF_fix(V,
|
|
5581
|
+
A && V.match(A) && (V = dateNF_fix(V, d.dateNF, V.match(A) || []), Y = 1), d.cellDates ? (G.t = "d", G.v = parseDate(V, Y)) : (G.t = "n", G.v = datenum(parseDate(V, Y))), d.cellText !== !1 && (G.w = SSF_format(G.z, G.v instanceof Date ? datenum(G.v) : G.v)), d.cellNF || delete G.z;
|
|
5582
5582
|
} else
|
|
5583
5583
|
G.t = "s", G.v = V;
|
|
5584
|
-
if (G.t == "z" || (
|
|
5584
|
+
if (G.t == "z" || (d.dense ? (m[p] || (m[p] = []), m[p][C] = G) : m[encode_cell({ c: C, r: p })] = G), k = b + 1, B = c.charCodeAt(k), u.e.c < C && (u.e.c = C), u.e.r < p && (u.e.r = p), y == X)
|
|
5585
5585
|
++C;
|
|
5586
|
-
else if (C = 0, ++p,
|
|
5586
|
+
else if (C = 0, ++p, d.sheetRows && d.sheetRows <= p)
|
|
5587
5587
|
return !0;
|
|
5588
5588
|
}
|
|
5589
5589
|
e:
|
|
5590
5590
|
for (; b < c.length; ++b)
|
|
5591
|
-
switch (
|
|
5591
|
+
switch (y = c.charCodeAt(b)) {
|
|
5592
5592
|
case 34:
|
|
5593
5593
|
B === 34 && (z = !z);
|
|
5594
5594
|
break;
|
|
@@ -5599,42 +5599,42 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5599
5599
|
break e;
|
|
5600
5600
|
break;
|
|
5601
5601
|
}
|
|
5602
|
-
return b - k > 0 && N(),
|
|
5602
|
+
return b - k > 0 && N(), m["!ref"] = encode_range(u), m;
|
|
5603
5603
|
}
|
|
5604
|
-
function s(c,
|
|
5605
|
-
return !(
|
|
5604
|
+
function s(c, _) {
|
|
5605
|
+
return !(_ && _.PRN) || _.FS || c.slice(0, 4) == "sep=" || c.indexOf(" ") >= 0 || c.indexOf(",") >= 0 || c.indexOf(";") >= 0 ? i(c, _) : aoa_to_sheet(r(c, _), _);
|
|
5606
5606
|
}
|
|
5607
|
-
function l(c,
|
|
5608
|
-
var
|
|
5609
|
-
switch (
|
|
5607
|
+
function l(c, _) {
|
|
5608
|
+
var d = "", h = _.type == "string" ? [0, 0, 0, 0] : firstbyte(c, _);
|
|
5609
|
+
switch (_.type) {
|
|
5610
5610
|
case "base64":
|
|
5611
|
-
|
|
5611
|
+
d = Base64_decode(c);
|
|
5612
5612
|
break;
|
|
5613
5613
|
case "binary":
|
|
5614
|
-
|
|
5614
|
+
d = c;
|
|
5615
5615
|
break;
|
|
5616
5616
|
case "buffer":
|
|
5617
|
-
|
|
5617
|
+
_.codepage == 65001 ? d = c.toString("utf8") : _.codepage && typeof $cptable < "u" ? d = $cptable.utils.decode(_.codepage, c) : d = has_buf && Buffer.isBuffer(c) ? c.toString("binary") : a2s(c);
|
|
5618
5618
|
break;
|
|
5619
5619
|
case "array":
|
|
5620
|
-
|
|
5620
|
+
d = cc2str(c);
|
|
5621
5621
|
break;
|
|
5622
5622
|
case "string":
|
|
5623
|
-
|
|
5623
|
+
d = c;
|
|
5624
5624
|
break;
|
|
5625
5625
|
default:
|
|
5626
|
-
throw new Error("Unrecognized type " +
|
|
5626
|
+
throw new Error("Unrecognized type " + _.type);
|
|
5627
5627
|
}
|
|
5628
|
-
return h[0] == 239 && h[1] == 187 && h[2] == 191 ?
|
|
5628
|
+
return h[0] == 239 && h[1] == 187 && h[2] == 191 ? d = utf8read(d.slice(3)) : _.type != "string" && _.type != "buffer" && _.codepage == 65001 ? d = utf8read(d) : _.type == "binary" && typeof $cptable < "u" && _.codepage && (d = $cptable.utils.decode(_.codepage, $cptable.utils.encode(28591, d))), d.slice(0, 19) == "socialcalc:version:" ? ETH.to_sheet(_.type == "string" ? d : utf8read(d), _) : s(d, _);
|
|
5629
5629
|
}
|
|
5630
|
-
function o(c,
|
|
5631
|
-
return sheet_to_workbook(l(c,
|
|
5630
|
+
function o(c, _) {
|
|
5631
|
+
return sheet_to_workbook(l(c, _), _);
|
|
5632
5632
|
}
|
|
5633
5633
|
function f(c) {
|
|
5634
|
-
for (var
|
|
5635
|
-
for (var p = [], C =
|
|
5634
|
+
for (var _ = [], d = safe_decode_range(c["!ref"]), h, m = Array.isArray(c), u = d.s.r; u <= d.e.r; ++u) {
|
|
5635
|
+
for (var p = [], C = d.s.c; C <= d.e.c; ++C) {
|
|
5636
5636
|
var I = encode_cell({ r: u, c: C });
|
|
5637
|
-
if (h =
|
|
5637
|
+
if (h = m ? (c[u] || [])[C] : c[I], !h || h.v == null) {
|
|
5638
5638
|
p.push(" ");
|
|
5639
5639
|
continue;
|
|
5640
5640
|
}
|
|
@@ -5642,9 +5642,9 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5642
5642
|
k += " ";
|
|
5643
5643
|
p.push(k + (C === 0 ? " " : ""));
|
|
5644
5644
|
}
|
|
5645
|
-
|
|
5645
|
+
_.push(p.join(""));
|
|
5646
5646
|
}
|
|
5647
|
-
return
|
|
5647
|
+
return _.join(`
|
|
5648
5648
|
`);
|
|
5649
5649
|
}
|
|
5650
5650
|
return {
|
|
@@ -5742,9 +5742,9 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5742
5742
|
throw new Error("Unrecognized LOTUS BOF " + F[2]);
|
|
5743
5743
|
if (D["!ref"] = encode_range(oe), ae[ne || j] = D, Q.push(ne || j), !ce.length)
|
|
5744
5744
|
return { SheetNames: Q, Sheets: ae };
|
|
5745
|
-
for (var fe = {},
|
|
5746
|
-
ae[Q[xe]] ? (
|
|
5747
|
-
return { SheetNames:
|
|
5745
|
+
for (var fe = {}, Se = [], xe = 0; xe < ce.length; ++xe)
|
|
5746
|
+
ae[Q[xe]] ? (Se.push(ce[xe] || Q[xe]), fe[ce[xe]] = ae[ce[xe]] || ae[Q[xe]]) : (Se.push(ce[xe]), fe[ce[xe]] = { "!ref": "A1" });
|
|
5747
|
+
return { SheetNames: Se, Sheets: fe };
|
|
5748
5748
|
}
|
|
5749
5749
|
function a(F, W) {
|
|
5750
5750
|
var P = W || {};
|
|
@@ -5760,8 +5760,8 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5760
5760
|
if (fe.t == "n")
|
|
5761
5761
|
(fe.v | 0) == fe.v && fe.v >= -32768 && fe.v <= 32767 ? write_biff_rec(D, 13, h(Q, oe, fe.v)) : write_biff_rec(D, 14, u(Q, oe, fe.v));
|
|
5762
5762
|
else {
|
|
5763
|
-
var
|
|
5764
|
-
write_biff_rec(D, 15,
|
|
5763
|
+
var Se = format_cell(fe);
|
|
5764
|
+
write_biff_rec(D, 15, _(Q, oe, Se.slice(0, 239)));
|
|
5765
5765
|
}
|
|
5766
5766
|
}
|
|
5767
5767
|
return write_biff_rec(D, 1), D.end();
|
|
@@ -5779,15 +5779,15 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5779
5779
|
var ae = F.Sheets[F.SheetNames[j]];
|
|
5780
5780
|
if (!(!ae || !ae["!ref"])) {
|
|
5781
5781
|
for (var Q = safe_decode_range(ae["!ref"]), ce = Array.isArray(ae), oe = [], ve = Math.min(Q.e.r, 8191), fe = Q.s.r; fe <= ve; ++fe)
|
|
5782
|
-
for (var
|
|
5782
|
+
for (var Se = encode_row(fe), xe = Q.s.c; xe <= Q.e.c; ++xe) {
|
|
5783
5783
|
fe === Q.s.r && (oe[xe] = encode_col(xe));
|
|
5784
|
-
var re = oe[xe] +
|
|
5784
|
+
var re = oe[xe] + Se, Te = ce ? (ae[fe] || [])[xe] : ae[re];
|
|
5785
5785
|
if (!(!Te || Te.t == "z"))
|
|
5786
5786
|
if (Te.t == "n")
|
|
5787
5787
|
write_biff_rec(D, 23, N(fe, xe, ie, Te.v));
|
|
5788
5788
|
else {
|
|
5789
5789
|
var Ae = format_cell(Te);
|
|
5790
|
-
write_biff_rec(D, 22,
|
|
5790
|
+
write_biff_rec(D, 22, y(fe, xe, ie, Ae.slice(0, 239)));
|
|
5791
5791
|
}
|
|
5792
5792
|
}
|
|
5793
5793
|
++ie;
|
|
@@ -5833,7 +5833,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5833
5833
|
}
|
|
5834
5834
|
return P.qpro && F.l++, j[1].v = F.read_shift(D - F.l, "cstr"), j;
|
|
5835
5835
|
}
|
|
5836
|
-
function
|
|
5836
|
+
function _(F, W, P) {
|
|
5837
5837
|
var D = new_buf(7 + P.length);
|
|
5838
5838
|
D.write_shift(1, 255), D.write_shift(2, W), D.write_shift(2, F), D.write_shift(1, 39);
|
|
5839
5839
|
for (var j = 0; j < D.length; ++j) {
|
|
@@ -5842,7 +5842,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5842
5842
|
}
|
|
5843
5843
|
return D.write_shift(1, 0), D;
|
|
5844
5844
|
}
|
|
5845
|
-
function
|
|
5845
|
+
function d(F, W, P) {
|
|
5846
5846
|
var D = f(F, W, P);
|
|
5847
5847
|
return D[1].v = F.read_shift(2, "i"), D;
|
|
5848
5848
|
}
|
|
@@ -5850,7 +5850,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5850
5850
|
var D = new_buf(7);
|
|
5851
5851
|
return D.write_shift(1, 255), D.write_shift(2, W), D.write_shift(2, F), D.write_shift(2, P, "i"), D;
|
|
5852
5852
|
}
|
|
5853
|
-
function
|
|
5853
|
+
function m(F, W, P) {
|
|
5854
5854
|
var D = f(F, W, P);
|
|
5855
5855
|
return D[1].v = F.read_shift(8, "f"), D;
|
|
5856
5856
|
}
|
|
@@ -5993,7 +5993,7 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
5993
5993
|
var P = X(F);
|
|
5994
5994
|
return P[1].t = "s", P[1].v = F.read_shift(W - 4, "cstr"), P;
|
|
5995
5995
|
}
|
|
5996
|
-
function
|
|
5996
|
+
function y(F, W, P, D) {
|
|
5997
5997
|
var j = new_buf(6 + D.length);
|
|
5998
5998
|
j.write_shift(2, F), j.write_shift(1, P), j.write_shift(1, W), j.write_shift(1, 39);
|
|
5999
5999
|
for (var ne = 0; ne < D.length; ++ne) {
|
|
@@ -6131,9 +6131,9 @@ var DBF = /* @__PURE__ */ function() {
|
|
|
6131
6131
|
/*::[*/
|
|
6132
6132
|
12: { n: "BLANK" },
|
|
6133
6133
|
/*::[*/
|
|
6134
|
-
13: { n: "INTEGER", f:
|
|
6134
|
+
13: { n: "INTEGER", f: d },
|
|
6135
6135
|
/*::[*/
|
|
6136
|
-
14: { n: "NUMBER", f:
|
|
6136
|
+
14: { n: "NUMBER", f: m },
|
|
6137
6137
|
/*::[*/
|
|
6138
6138
|
15: { n: "LABEL", f: c },
|
|
6139
6139
|
/*::[*/
|
|
@@ -6552,19 +6552,19 @@ var RTF = /* @__PURE__ */ function() {
|
|
|
6552
6552
|
if (!o.length)
|
|
6553
6553
|
throw new Error("RTF missing table");
|
|
6554
6554
|
var f = { s: { c: 0, r: 0 }, e: { c: 0, r: o.length - 1 } };
|
|
6555
|
-
return o.forEach(function(c,
|
|
6556
|
-
Array.isArray(l) && (l[
|
|
6557
|
-
for (var
|
|
6558
|
-
switch (
|
|
6555
|
+
return o.forEach(function(c, _) {
|
|
6556
|
+
Array.isArray(l) && (l[_] = []);
|
|
6557
|
+
for (var d = /\\\w+\b/g, h = 0, m, u = -1; m = d.exec(c); ) {
|
|
6558
|
+
switch (m[0]) {
|
|
6559
6559
|
case "\\cell":
|
|
6560
|
-
var p = c.slice(h,
|
|
6560
|
+
var p = c.slice(h, d.lastIndex - m[0].length);
|
|
6561
6561
|
if (p[0] == " " && (p = p.slice(1)), ++u, p.length) {
|
|
6562
6562
|
var C = { v: p, t: "s" };
|
|
6563
|
-
Array.isArray(l) ? l[
|
|
6563
|
+
Array.isArray(l) ? l[_][u] = C : l[encode_cell({ r: _, c: u })] = C;
|
|
6564
6564
|
}
|
|
6565
6565
|
break;
|
|
6566
6566
|
}
|
|
6567
|
-
h =
|
|
6567
|
+
h = d.lastIndex;
|
|
6568
6568
|
}
|
|
6569
6569
|
u > f.e.c && (f.e.c = u);
|
|
6570
6570
|
}), l["!ref"] = encode_range(f), l;
|
|
@@ -6578,8 +6578,8 @@ var RTF = /* @__PURE__ */ function() {
|
|
|
6578
6578
|
for (var c = s.s.c; c <= s.e.c; ++c)
|
|
6579
6579
|
i.push("\\cellx" + (c + 1));
|
|
6580
6580
|
for (i.push("\\pard\\intbl"), c = s.s.c; c <= s.e.c; ++c) {
|
|
6581
|
-
var
|
|
6582
|
-
l = o ? (n[f] || [])[c] : n[
|
|
6581
|
+
var _ = encode_cell({ r: f, c });
|
|
6582
|
+
l = o ? (n[f] || [])[c] : n[_], !(!l || l.v == null && (!l.f || l.F)) && (i.push(" " + (l.w || (format_cell(l), l.w))), i.push("\\cell"));
|
|
6583
6583
|
}
|
|
6584
6584
|
i.push("\\pard\\intbl\\row");
|
|
6585
6585
|
}
|
|
@@ -7122,8 +7122,8 @@ var VBAFMTS = ["xlsb", "xlsm", "xlam", "biff8", "xla"], rc_to_a1 = /* @__PURE__
|
|
|
7122
7122
|
}(), crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g, a1_to_rc = /* @__PURE__ */ function() {
|
|
7123
7123
|
return function(r, t) {
|
|
7124
7124
|
return r.replace(crefregex, function(a, n, i, s, l, o) {
|
|
7125
|
-
var f = decode_col(s) - (i ? 0 : t.c), c = decode_row(o) - (l ? 0 : t.r),
|
|
7126
|
-
return n + "R" +
|
|
7125
|
+
var f = decode_col(s) - (i ? 0 : t.c), c = decode_row(o) - (l ? 0 : t.r), _ = c == 0 ? "" : l ? c + 1 : "[" + c + "]", d = f == 0 ? "" : i ? f + 1 : "[" + f + "]";
|
|
7126
|
+
return n + "R" + _ + "C" + d;
|
|
7127
7127
|
});
|
|
7128
7128
|
};
|
|
7129
7129
|
}();
|
|
@@ -7843,7 +7843,7 @@ function stringify_formula(e, r, t, a, n) {
|
|
|
7843
7843
|
var i = n && n.biff || 8, s = (
|
|
7844
7844
|
/*range != null ? range :*/
|
|
7845
7845
|
{ s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }
|
|
7846
|
-
), l = [], o, f, c,
|
|
7846
|
+
), l = [], o, f, c, _ = 0, d = 0, h, m = "";
|
|
7847
7847
|
if (!e[0] || !e[0][0])
|
|
7848
7848
|
return "";
|
|
7849
7849
|
for (var u = -1, p = "", C = 0, I = e[0].length; C < I; ++C) {
|
|
@@ -7910,8 +7910,8 @@ function stringify_formula(e, r, t, a, n) {
|
|
|
7910
7910
|
c = t ? shift_cell_xls(k[1][1], t, n) : k[1][1], l.push(encode_cell_xls(c, i));
|
|
7911
7911
|
break;
|
|
7912
7912
|
case "PtgRef3d":
|
|
7913
|
-
|
|
7914
|
-
k[1][1], c = shift_cell_xls(k[1][2], s, n),
|
|
7913
|
+
_ = /*::Number(*/
|
|
7914
|
+
k[1][1], c = shift_cell_xls(k[1][2], s, n), m = get_ixti(a, _, n), l.push(m + "!" + encode_cell_xls(c, i));
|
|
7915
7915
|
break;
|
|
7916
7916
|
case "PtgFunc":
|
|
7917
7917
|
case "PtgFuncVar":
|
|
@@ -7950,8 +7950,8 @@ function stringify_formula(e, r, t, a, n) {
|
|
|
7950
7950
|
h = shift_range_xls(k[1][1], s, n), l.push(encode_range_xls(h, n));
|
|
7951
7951
|
break;
|
|
7952
7952
|
case "PtgArea3d":
|
|
7953
|
-
|
|
7954
|
-
k[1][1], h = k[1][2],
|
|
7953
|
+
_ = /*::Number(*/
|
|
7954
|
+
k[1][1], h = k[1][2], m = get_ixti(a, _, n), l.push(m + "!" + encode_range_xls(h, n));
|
|
7955
7955
|
break;
|
|
7956
7956
|
case "PtgAttrSum":
|
|
7957
7957
|
l.push("SUM(" + l.pop() + ")");
|
|
@@ -7960,25 +7960,25 @@ function stringify_formula(e, r, t, a, n) {
|
|
|
7960
7960
|
case "PtgAttrSemi":
|
|
7961
7961
|
break;
|
|
7962
7962
|
case "PtgName":
|
|
7963
|
-
|
|
7964
|
-
var
|
|
7963
|
+
d = k[1][2];
|
|
7964
|
+
var y = (a.names || [])[d - 1] || (a[0] || [])[d], B = y ? y.Name : "SH33TJSNAME" + String(d);
|
|
7965
7965
|
B && B.slice(0, 6) == "_xlfn." && !n.xlfn && (B = B.slice(6)), l.push(B);
|
|
7966
7966
|
break;
|
|
7967
7967
|
case "PtgNameX":
|
|
7968
7968
|
var A = k[1][1];
|
|
7969
|
-
|
|
7969
|
+
d = k[1][2];
|
|
7970
7970
|
var N;
|
|
7971
7971
|
if (n.biff <= 5)
|
|
7972
|
-
A < 0 && (A = -A), a[A] && (N = a[A][
|
|
7972
|
+
A < 0 && (A = -A), a[A] && (N = a[A][d]);
|
|
7973
7973
|
else {
|
|
7974
7974
|
var V = "";
|
|
7975
|
-
if (((a[A] || [])[0] || [])[0] == 14849 || (((a[A] || [])[0] || [])[0] == 1025 ? a[A][
|
|
7976
|
-
V += a[A][
|
|
7977
|
-
else if (a[0] && a[0][
|
|
7978
|
-
V += a[0][
|
|
7975
|
+
if (((a[A] || [])[0] || [])[0] == 14849 || (((a[A] || [])[0] || [])[0] == 1025 ? a[A][d] && a[A][d].itab > 0 && (V = a.SheetNames[a[A][d].itab - 1] + "!") : V = a.SheetNames[d - 1] + "!"), a[A] && a[A][d])
|
|
7976
|
+
V += a[A][d].Name;
|
|
7977
|
+
else if (a[0] && a[0][d])
|
|
7978
|
+
V += a[0][d].Name;
|
|
7979
7979
|
else {
|
|
7980
7980
|
var G = (get_ixti_raw(a, A, n) || "").split(";;");
|
|
7981
|
-
G[
|
|
7981
|
+
G[d - 1] ? V = G[d - 1] : V += "SH33TJSERRX";
|
|
7982
7982
|
}
|
|
7983
7983
|
l.push(V);
|
|
7984
7984
|
break;
|
|
@@ -8129,8 +8129,8 @@ function write_Formula(e, r, t, a, n) {
|
|
|
8129
8129
|
l.write_shift(2, o), l.write_shift(4, 0);
|
|
8130
8130
|
for (var f = new_buf(e.bf.length), c = 0; c < e.bf.length; ++c)
|
|
8131
8131
|
f[c] = e.bf[c];
|
|
8132
|
-
var
|
|
8133
|
-
return
|
|
8132
|
+
var _ = bconcat([i, s, l, f]);
|
|
8133
|
+
return _;
|
|
8134
8134
|
}
|
|
8135
8135
|
function parse_XLSBParsedFormula(e, r, t) {
|
|
8136
8136
|
var a = e.read_shift(4), n = parse_Rgce(e, a, t), i = e.read_shift(4), s = i > 0 ? parse_RgbExtra(e, i, n, t) : null;
|
|
@@ -9455,20 +9455,20 @@ function write_ws_xml_cell(e, r, t, a) {
|
|
|
9455
9455
|
return e.l && t["!links"].push([r, e.l]), e.D && (o.cm = 1), writextag("c", l, o);
|
|
9456
9456
|
}
|
|
9457
9457
|
function write_ws_xml_data(e, r, t, a) {
|
|
9458
|
-
var n = [], i = [], s = safe_decode_range(e["!ref"]), l = "", o, f = "", c = [],
|
|
9459
|
-
for (
|
|
9460
|
-
c[
|
|
9461
|
-
for (
|
|
9462
|
-
for (i = [], f = encode_row(
|
|
9463
|
-
o = c[
|
|
9464
|
-
var I =
|
|
9458
|
+
var n = [], i = [], s = safe_decode_range(e["!ref"]), l = "", o, f = "", c = [], _ = 0, d = 0, h = e["!rows"], m = Array.isArray(e), u = { r: f }, p, C = -1;
|
|
9459
|
+
for (d = s.s.c; d <= s.e.c; ++d)
|
|
9460
|
+
c[d] = encode_col(d);
|
|
9461
|
+
for (_ = s.s.r; _ <= s.e.r; ++_) {
|
|
9462
|
+
for (i = [], f = encode_row(_), d = s.s.c; d <= s.e.c; ++d) {
|
|
9463
|
+
o = c[d] + f;
|
|
9464
|
+
var I = m ? (e[_] || [])[d] : e[o];
|
|
9465
9465
|
I !== void 0 && (l = write_ws_xml_cell(I, o, e, r)) != null && i.push(l);
|
|
9466
9466
|
}
|
|
9467
|
-
(i.length > 0 || h && h[
|
|
9467
|
+
(i.length > 0 || h && h[_]) && (u = { r: f }, h && h[_] && (p = h[_], p.hidden && (u.hidden = 1), C = -1, p.hpx ? C = px2pt(p.hpx) : p.hpt && (C = p.hpt), C > -1 && (u.ht = C, u.customHeight = 1), p.level && (u.outlineLevel = p.level)), n[n.length] = writextag("row", i.join(""), u));
|
|
9468
9468
|
}
|
|
9469
9469
|
if (h)
|
|
9470
|
-
for (;
|
|
9471
|
-
h && h[
|
|
9470
|
+
for (; _ < h.length; ++_)
|
|
9471
|
+
h && h[_] && (u = { r: _ + 1 }, p = h[_], p.hidden && (u.hidden = 1), C = -1, p.hpx ? C = px2pt(p.hpx) : p.hpt && (C = p.hpt), C > -1 && (u.ht = C, u.customHeight = 1), p.level && (u.outlineLevel = p.level), n[n.length] = writextag("row", "", u));
|
|
9472
9472
|
return n.join("");
|
|
9473
9473
|
}
|
|
9474
9474
|
function write_ws_xml(e, r, t, a) {
|
|
@@ -9484,18 +9484,18 @@ function write_ws_xml(e, r, t, a) {
|
|
|
9484
9484
|
c.e.c = Math.min(c.e.c, 16383), c.e.r = Math.min(c.e.c, 1048575), f = encode_range(c);
|
|
9485
9485
|
}
|
|
9486
9486
|
a || (a = {}), o["!comments"] = [];
|
|
9487
|
-
var
|
|
9487
|
+
var _ = [];
|
|
9488
9488
|
write_ws_xml_sheetpr(o, t, e, r, n), n[n.length] = writextag("dimension", null, { ref: f }), n[n.length] = write_ws_xml_sheetviews(o, r, e, t), r.sheetFormat && (n[n.length] = writextag("sheetFormatPr", null, {
|
|
9489
9489
|
defaultRowHeight: r.sheetFormat.defaultRowHeight || "16",
|
|
9490
9490
|
baseColWidth: r.sheetFormat.baseColWidth || "10",
|
|
9491
9491
|
outlineLevelRow: r.sheetFormat.outlineLevelRow || "7"
|
|
9492
9492
|
})), o["!cols"] != null && o["!cols"].length > 0 && (n[n.length] = write_ws_xml_cols(o, o["!cols"])), n[s = n.length] = "<sheetData/>", o["!links"] = [], o["!ref"] != null && (l = write_ws_xml_data(o, r), l.length > 0 && (n[n.length] = l)), n.length > s + 1 && (n[n.length] = "</sheetData>", n[s] = n[s].replace("/>", ">")), o["!protect"] && (n[n.length] = write_ws_xml_protection(o["!protect"])), o["!autofilter"] != null && (n[n.length] = write_ws_xml_autofilter(o["!autofilter"], o, t, e)), o["!merges"] != null && o["!merges"].length > 0 && (n[n.length] = write_ws_xml_merges(o["!merges"]));
|
|
9493
|
-
var
|
|
9493
|
+
var d = -1, h, m = -1;
|
|
9494
9494
|
return (
|
|
9495
9495
|
/*::(*/
|
|
9496
9496
|
o["!links"].length > 0 && (n[n.length] = "<hyperlinks>", o["!links"].forEach(function(u) {
|
|
9497
|
-
u[1].Target && (h = { ref: u[0] }, u[1].Target.charAt(0) != "#" && (
|
|
9498
|
-
}), n[n.length] = "</hyperlinks>"), delete o["!links"], o["!margins"] != null && (n[n.length] = write_ws_xml_margins(o["!margins"])), (!r || r.ignoreEC || r.ignoreEC == null) && (n[n.length] = writetag("ignoredErrors", writextag("ignoredError", null, { numberStoredAsText: 1, sqref: f }))),
|
|
9497
|
+
u[1].Target && (h = { ref: u[0] }, u[1].Target.charAt(0) != "#" && (m = add_rels(a, -1, escapexml(u[1].Target).replace(/#.*$/, ""), RELS.HLINK), h["r:id"] = "rId" + m), (d = u[1].Target.indexOf("#")) > -1 && (h.location = escapexml(u[1].Target.slice(d + 1))), u[1].Tooltip && (h.tooltip = escapexml(u[1].Tooltip)), n[n.length] = writextag("hyperlink", null, h));
|
|
9498
|
+
}), n[n.length] = "</hyperlinks>"), delete o["!links"], o["!margins"] != null && (n[n.length] = write_ws_xml_margins(o["!margins"])), (!r || r.ignoreEC || r.ignoreEC == null) && (n[n.length] = writetag("ignoredErrors", writextag("ignoredError", null, { numberStoredAsText: 1, sqref: f }))), _.length > 0 && (m = add_rels(a, -1, "../drawings/drawing" + (e + 1) + ".xml", RELS.DRAW), n[n.length] = writextag("drawing", null, { "r:id": "rId" + m }), o["!drawing"] = _), o["!comments"].length > 0 && (m = add_rels(a, -1, "../drawings/vmlDrawing" + (e + 1) + ".vml", RELS.VML), n[n.length] = writextag("legacyDrawing", null, { "r:id": "rId" + m }), o["!legacy"] = m), n.length > 1 && (n[n.length] = "</worksheet>", n[1] = n[1].replace("/>", ">")), n.join("")
|
|
9499
9499
|
);
|
|
9500
9500
|
}
|
|
9501
9501
|
function parse_BrtRowHdr(e, r) {
|
|
@@ -9517,12 +9517,12 @@ function write_BrtRowHdr(e, r, t) {
|
|
|
9517
9517
|
a.l += 4;
|
|
9518
9518
|
for (var f = { r: e, c: 0 }, c = 0; c < 16; ++c)
|
|
9519
9519
|
if (!(r.s.c > c + 1 << 10 || r.e.c < c << 10)) {
|
|
9520
|
-
for (var
|
|
9520
|
+
for (var _ = -1, d = -1, h = c << 10; h < c + 1 << 10; ++h) {
|
|
9521
9521
|
f.c = h;
|
|
9522
|
-
var
|
|
9523
|
-
|
|
9522
|
+
var m = Array.isArray(t) ? (t[f.r] || [])[f.c] : t[encode_cell(f)];
|
|
9523
|
+
m && (_ < 0 && (_ = h), d = h);
|
|
9524
9524
|
}
|
|
9525
|
-
|
|
9525
|
+
_ < 0 || (++l, a.write_shift(4, _), a.write_shift(4, d));
|
|
9526
9526
|
}
|
|
9527
9527
|
var u = a.l;
|
|
9528
9528
|
return a.l = o, a.write_shift(4, l), a.l = u, a.length > a.l ? a.slice(0, a.l) : a;
|
|
@@ -9852,16 +9852,16 @@ function write_CELLTABLE(e, r, t, a) {
|
|
|
9852
9852
|
r["!rows"] && (f = Math.max(n.e.r, r["!rows"].length - 1));
|
|
9853
9853
|
for (var c = n.s.r; c <= f; ++c) {
|
|
9854
9854
|
s = encode_row(c), write_row_header(e, r, n, c);
|
|
9855
|
-
var
|
|
9855
|
+
var _ = !1;
|
|
9856
9856
|
if (c <= n.e.r)
|
|
9857
|
-
for (var
|
|
9858
|
-
c === n.s.r && (l[
|
|
9859
|
-
var h = o ? (r[c] || [])[
|
|
9857
|
+
for (var d = n.s.c; d <= n.e.c; ++d) {
|
|
9858
|
+
c === n.s.r && (l[d] = encode_col(d)), i = l[d] + s;
|
|
9859
|
+
var h = o ? (r[c] || [])[d] : r[i];
|
|
9860
9860
|
if (!h) {
|
|
9861
|
-
|
|
9861
|
+
_ = !1;
|
|
9862
9862
|
continue;
|
|
9863
9863
|
}
|
|
9864
|
-
|
|
9864
|
+
_ = write_ws_bin_cell(e, h, c, d, a, r, _);
|
|
9865
9865
|
}
|
|
9866
9866
|
}
|
|
9867
9867
|
write_record(
|
|
@@ -10262,31 +10262,31 @@ function write_ws_xlml_cell(e, r, t, a, n, i, s) {
|
|
|
10262
10262
|
if (e.l && e.l.Target && (l["ss:HRef"] = escapexml(e.l.Target), e.l.Tooltip && (l["x:HRefScreenTip"] = escapexml(e.l.Tooltip))), t["!merges"])
|
|
10263
10263
|
for (var f = t["!merges"], c = 0; c != f.length; ++c)
|
|
10264
10264
|
f[c].s.c != s.c || f[c].s.r != s.r || (f[c].e.c > f[c].s.c && (l["ss:MergeAcross"] = f[c].e.c - f[c].s.c), f[c].e.r > f[c].s.r && (l["ss:MergeDown"] = f[c].e.r - f[c].s.r));
|
|
10265
|
-
var
|
|
10265
|
+
var _ = "", d = "";
|
|
10266
10266
|
switch (e.t) {
|
|
10267
10267
|
case "z":
|
|
10268
10268
|
if (!a.sheetStubs)
|
|
10269
10269
|
return "";
|
|
10270
10270
|
break;
|
|
10271
10271
|
case "n":
|
|
10272
|
-
|
|
10272
|
+
_ = "Number", d = String(e.v);
|
|
10273
10273
|
break;
|
|
10274
10274
|
case "b":
|
|
10275
|
-
|
|
10275
|
+
_ = "Boolean", d = e.v ? "1" : "0";
|
|
10276
10276
|
break;
|
|
10277
10277
|
case "e":
|
|
10278
|
-
|
|
10278
|
+
_ = "Error", d = BErr[e.v];
|
|
10279
10279
|
break;
|
|
10280
10280
|
case "d":
|
|
10281
|
-
|
|
10281
|
+
_ = "DateTime", d = new Date(e.v).toISOString(), e.z == null && (e.z = e.z || table_fmt[14]);
|
|
10282
10282
|
break;
|
|
10283
10283
|
case "s":
|
|
10284
|
-
|
|
10284
|
+
_ = "String", d = escapexlml(e.v || "");
|
|
10285
10285
|
break;
|
|
10286
10286
|
}
|
|
10287
10287
|
var h = get_cell_style(a.cellXfs, e, a);
|
|
10288
10288
|
l["ss:StyleID"] = "s" + (21 + h), l["ss:Index"] = s.c + 1;
|
|
10289
|
-
var
|
|
10289
|
+
var m = e.v != null ? d : "", u = e.t == "z" ? "" : '<Data ss:Type="' + _ + '">' + m + "</Data>";
|
|
10290
10290
|
return (e.c || []).length > 0 && (u += write_ws_xlml_comment(e.c)), writextag("Cell", u, l);
|
|
10291
10291
|
}
|
|
10292
10292
|
function write_ws_xlml_row(e, r) {
|
|
@@ -10303,16 +10303,16 @@ function write_ws_xlml_table(e, r, t, a) {
|
|
|
10303
10303
|
I && (b["ss:Width"] = width2px(k.width)), p.hidden && (b["ss:Hidden"] = "1"), l.push(writextag("Column", null, b));
|
|
10304
10304
|
});
|
|
10305
10305
|
for (var o = Array.isArray(e), f = n.s.r; f <= n.e.r; ++f) {
|
|
10306
|
-
for (var c = [write_ws_xlml_row(f, (e["!rows"] || [])[f])],
|
|
10307
|
-
var
|
|
10306
|
+
for (var c = [write_ws_xlml_row(f, (e["!rows"] || [])[f])], _ = n.s.c; _ <= n.e.c; ++_) {
|
|
10307
|
+
var d = !1;
|
|
10308
10308
|
for (s = 0; s != i.length; ++s)
|
|
10309
|
-
if (!(i[s].s.c >
|
|
10310
|
-
(i[s].s.c !=
|
|
10309
|
+
if (!(i[s].s.c > _) && !(i[s].s.r > f) && !(i[s].e.c < _) && !(i[s].e.r < f)) {
|
|
10310
|
+
(i[s].s.c != _ || i[s].s.r != f) && (d = !0);
|
|
10311
10311
|
break;
|
|
10312
10312
|
}
|
|
10313
|
-
if (!
|
|
10314
|
-
var h = { r: f, c:
|
|
10315
|
-
c.push(write_ws_xlml_cell(u,
|
|
10313
|
+
if (!d) {
|
|
10314
|
+
var h = { r: f, c: _ }, m = encode_cell(h), u = o ? (e[f] || [])[_] : e[m];
|
|
10315
|
+
c.push(write_ws_xlml_cell(u, m, e, r, t, a, h));
|
|
10316
10316
|
}
|
|
10317
10317
|
}
|
|
10318
10318
|
c.push("</Row>"), c.length > 2 && l.push(c.join(""));
|
|
@@ -14521,8 +14521,8 @@ function write_ws_biff2(e, r, t, a) {
|
|
|
14521
14521
|
l = encode_row(f);
|
|
14522
14522
|
for (var c = i.s.c; c <= i.e.c; ++c) {
|
|
14523
14523
|
f === i.s.r && (o[c] = encode_col(c)), s = o[c] + l;
|
|
14524
|
-
var
|
|
14525
|
-
|
|
14524
|
+
var _ = n ? (r[f] || [])[c] : r[s];
|
|
14525
|
+
_ && write_ws_biff2_cell(e, _, f, c);
|
|
14526
14526
|
}
|
|
14527
14527
|
}
|
|
14528
14528
|
}
|
|
@@ -14611,17 +14611,17 @@ function write_ws_biff8_cell(e, r, t, a, n) {
|
|
|
14611
14611
|
}
|
|
14612
14612
|
}
|
|
14613
14613
|
function write_ws_biff8(e, r, t) {
|
|
14614
|
-
var a = buf_array(), n = t.SheetNames[e], i = t.Sheets[n] || {}, s = (t || {}).Workbook || {}, l = (s.Sheets || [])[e] || {}, o = Array.isArray(i), f = r.biff == 8, c,
|
|
14615
|
-
if (h.e.c > 255 || h.e.r >=
|
|
14614
|
+
var a = buf_array(), n = t.SheetNames[e], i = t.Sheets[n] || {}, s = (t || {}).Workbook || {}, l = (s.Sheets || [])[e] || {}, o = Array.isArray(i), f = r.biff == 8, c, _ = "", d = [], h = safe_decode_range(i["!ref"] || "A1"), m = f ? 65536 : 16384;
|
|
14615
|
+
if (h.e.c > 255 || h.e.r >= m) {
|
|
14616
14616
|
if (r.WTF)
|
|
14617
14617
|
throw new Error("Range " + (i["!ref"] || "A1") + " exceeds format limit A1:IV16384");
|
|
14618
|
-
h.e.c = Math.min(h.e.c, 255), h.e.r = Math.min(h.e.c,
|
|
14618
|
+
h.e.c = Math.min(h.e.c, 255), h.e.r = Math.min(h.e.c, m - 1);
|
|
14619
14619
|
}
|
|
14620
14620
|
write_biff_rec(a, 2057, write_BOF(t, 16, r)), write_biff_rec(a, 13, writeuint16(1)), write_biff_rec(a, 12, writeuint16(100)), write_biff_rec(a, 15, writebool(!0)), write_biff_rec(a, 17, writebool(!1)), write_biff_rec(a, 16, write_Xnum(1e-3)), write_biff_rec(a, 95, writebool(!0)), write_biff_rec(a, 42, writebool(!1)), write_biff_rec(a, 43, writebool(!1)), write_biff_rec(a, 130, writeuint16(1)), write_biff_rec(a, 128, write_Guts()), write_biff_rec(a, 131, writebool(!1)), write_biff_rec(a, 132, writebool(!1)), f && write_ws_cols_biff8(a, i["!cols"]), write_biff_rec(a, 512, write_Dimensions(h, r)), f && (i["!links"] = []);
|
|
14621
14621
|
for (var u = h.s.r; u <= h.e.r; ++u) {
|
|
14622
|
-
|
|
14622
|
+
_ = encode_row(u);
|
|
14623
14623
|
for (var p = h.s.c; p <= h.e.c; ++p) {
|
|
14624
|
-
u === h.s.r && (
|
|
14624
|
+
u === h.s.r && (d[p] = encode_col(p)), c = d[p] + _;
|
|
14625
14625
|
var C = o ? (i[u] || [])[p] : i[c];
|
|
14626
14626
|
C && (write_ws_biff8_cell(a, C, u, p, r), f && C.l && i["!links"].push([c, C.l]));
|
|
14627
14627
|
}
|
|
@@ -14669,25 +14669,25 @@ function write_biff8_global(e, r, t) {
|
|
|
14669
14669
|
write_biff_rec(a, 442, write_XLUnicodeString(f));
|
|
14670
14670
|
}
|
|
14671
14671
|
write_biff_rec(a, 156, writeuint16(17)), write_biff_rec(a, 25, writebool(!1)), write_biff_rec(a, 18, writebool(!1)), write_biff_rec(a, 19, writeuint16(0)), l && write_biff_rec(a, 431, writebool(!1)), l && write_biff_rec(a, 444, writeuint16(0)), write_biff_rec(a, 61, write_Window1()), write_biff_rec(a, 64, writebool(!1)), write_biff_rec(a, 141, writeuint16(0)), write_biff_rec(a, 34, writebool(safe1904(e) == "true")), write_biff_rec(a, 14, writebool(!0)), l && write_biff_rec(a, 439, writebool(!1)), write_biff_rec(a, 218, writeuint16(0)), write_FONTS_biff8(a, e, t), write_FMTS_biff8(a, e.SSF, t), write_CELLXFS_biff8(a, t), l && write_biff_rec(a, 352, writebool(!1));
|
|
14672
|
-
var c = a.end(),
|
|
14673
|
-
l && write_biff_rec(
|
|
14674
|
-
|
|
14672
|
+
var c = a.end(), _ = buf_array();
|
|
14673
|
+
l && write_biff_rec(_, 140, write_Country()), l && t.Strings && write_biff_continue(_, 252, write_SST(t.Strings)), write_biff_rec(
|
|
14674
|
+
_,
|
|
14675
14675
|
10
|
|
14676
14676
|
/* EOF */
|
|
14677
14677
|
);
|
|
14678
|
-
var
|
|
14678
|
+
var d = _.end(), h = buf_array(), m = 0, u = 0;
|
|
14679
14679
|
for (u = 0; u < e.SheetNames.length; ++u)
|
|
14680
|
-
|
|
14681
|
-
var p = c.length +
|
|
14680
|
+
m += (l ? 12 : 11) + (l ? 2 : 1) * e.SheetNames[u].length;
|
|
14681
|
+
var p = c.length + m + d.length;
|
|
14682
14682
|
for (u = 0; u < e.SheetNames.length; ++u) {
|
|
14683
14683
|
var C = i[u] || {};
|
|
14684
14684
|
write_biff_rec(h, 133, write_BoundSheet8({ pos: p, hs: C.Hidden || 0, dt: 0, name: e.SheetNames[u] }, t)), p += r[u].length;
|
|
14685
14685
|
}
|
|
14686
14686
|
var I = h.end();
|
|
14687
|
-
if (
|
|
14688
|
-
throw new Error("BS8 " +
|
|
14687
|
+
if (m != I.length)
|
|
14688
|
+
throw new Error("BS8 " + m + " != " + I.length);
|
|
14689
14689
|
var k = [];
|
|
14690
|
-
return c.length && k.push(c), I.length && k.push(I),
|
|
14690
|
+
return c.length && k.push(c), I.length && k.push(I), d.length && k.push(d), bconcat(k);
|
|
14691
14691
|
}
|
|
14692
14692
|
function write_biff8_buf(e, r) {
|
|
14693
14693
|
var t = r || {}, a = [];
|
|
@@ -14729,12 +14729,12 @@ function make_html_row(e, r, t, a) {
|
|
|
14729
14729
|
break;
|
|
14730
14730
|
}
|
|
14731
14731
|
if (!(l < 0)) {
|
|
14732
|
-
var c = encode_cell({ r: t, c: s }),
|
|
14733
|
-
l > 1 && (h.rowspan = l), o > 1 && (h.colspan = o), a.editable ?
|
|
14732
|
+
var c = encode_cell({ r: t, c: s }), _ = a.dense ? (e[t] || [])[s] : e[c], d = _ && _.v != null && (_.h || escapehtml(_.w || (format_cell(_), _.w) || "")) || "", h = {};
|
|
14733
|
+
l > 1 && (h.rowspan = l), o > 1 && (h.colspan = o), a.editable ? d = '<span contenteditable="true">' + d + "</span>" : _ && (h["data-t"] = _ && _.t || "z", _.v != null && (h["data-v"] = _.v), _.z != null && (h["data-z"] = _.z), _.l && (_.l.Target || "#").charAt(0) != "#" && (d = '<a href="' + _.l.Target + '">' + d + "</a>")), h.id = (a.id || "sjs") + "-" + c, i.push(writextag("td", d, h));
|
|
14734
14734
|
}
|
|
14735
14735
|
}
|
|
14736
|
-
var
|
|
14737
|
-
return
|
|
14736
|
+
var m = "<tr>";
|
|
14737
|
+
return m + i.join("") + "</tr>";
|
|
14738
14738
|
}
|
|
14739
14739
|
var HTML_BEGIN = '<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>', HTML_END = "</body></html>";
|
|
14740
14740
|
function make_html_preamble(e, r, t) {
|
|
@@ -14762,9 +14762,9 @@ function sheet_add_dom(e, r, t) {
|
|
|
14762
14762
|
var c = decode_range(e["!ref"]);
|
|
14763
14763
|
f.s.r = Math.min(f.s.r, c.s.r), f.s.c = Math.min(f.s.c, c.s.c), f.e.r = Math.max(f.e.r, c.e.r), f.e.c = Math.max(f.e.c, c.e.c), n == -1 && (f.e.r = n = c.e.r + 1);
|
|
14764
14764
|
}
|
|
14765
|
-
var
|
|
14766
|
-
for (e["!cols"] || (e["!cols"] = []);
|
|
14767
|
-
var b = l[
|
|
14765
|
+
var _ = [], d = 0, h = e["!rows"] || (e["!rows"] = []), m = 0, u = 0, p = 0, C = 0, I = 0, k = 0;
|
|
14766
|
+
for (e["!cols"] || (e["!cols"] = []); m < l.length && u < o; ++m) {
|
|
14767
|
+
var b = l[m];
|
|
14768
14768
|
if (is_dom_element_hidden(b)) {
|
|
14769
14769
|
if (a.display)
|
|
14770
14770
|
continue;
|
|
@@ -14774,14 +14774,14 @@ function sheet_add_dom(e, r, t) {
|
|
|
14774
14774
|
for (p = C = 0; p < X.length; ++p) {
|
|
14775
14775
|
var z = X[p];
|
|
14776
14776
|
if (!(a.display && is_dom_element_hidden(z))) {
|
|
14777
|
-
var
|
|
14778
|
-
for (
|
|
14779
|
-
var A = d
|
|
14780
|
-
A.s.c == C + i && A.s.r < u + n && u + n <= A.e.r && (C = A.e.c + 1 - i,
|
|
14777
|
+
var y = z.hasAttribute("data-v") ? z.getAttribute("data-v") : z.hasAttribute("v") ? z.getAttribute("v") : htmldecode(z.innerHTML), B = z.getAttribute("data-z") || z.getAttribute("z");
|
|
14778
|
+
for (d = 0; d < _.length; ++d) {
|
|
14779
|
+
var A = _[d];
|
|
14780
|
+
A.s.c == C + i && A.s.r < u + n && u + n <= A.e.r && (C = A.e.c + 1 - i, d = -1);
|
|
14781
14781
|
}
|
|
14782
|
-
k = +z.getAttribute("colspan") || 1, ((I = +z.getAttribute("rowspan") || 1) > 1 || k > 1) &&
|
|
14783
|
-
var N = { t: "s", v:
|
|
14784
|
-
|
|
14782
|
+
k = +z.getAttribute("colspan") || 1, ((I = +z.getAttribute("rowspan") || 1) > 1 || k > 1) && _.push({ s: { r: u + n, c: C + i }, e: { r: u + n + (I || 1) - 1, c: C + i + (k || 1) - 1 } });
|
|
14783
|
+
var N = { t: "s", v: y }, V = z.getAttribute("data-t") || z.getAttribute("t") || "";
|
|
14784
|
+
y != null && (y.length == 0 ? N.t = V || "z" : a.raw || y.trim().length == 0 || V == "s" || (y === "TRUE" ? N = { t: "b", v: !0 } : y === "FALSE" ? N = { t: "b", v: !1 } : isNaN(fuzzynum(y)) ? isNaN(fuzzydate(y).getDate()) || (N = { t: "d", v: parseDate(y) }, a.cellDates || (N = { t: "n", v: datenum(N.v) }), N.z = a.dateNF || table_fmt[14]) : N = { t: "n", v: fuzzynum(y) })), N.z === void 0 && B != null && (N.z = B);
|
|
14785
14785
|
var G = "", Y = z.getElementsByTagName("A");
|
|
14786
14786
|
if (Y && Y.length)
|
|
14787
14787
|
for (var le = 0; le < Y.length && !(Y[le].hasAttribute("href") && (G = Y[le].getAttribute("href"), G.charAt(0) != "#")); ++le)
|
|
@@ -14791,7 +14791,7 @@ function sheet_add_dom(e, r, t) {
|
|
|
14791
14791
|
}
|
|
14792
14792
|
++u;
|
|
14793
14793
|
}
|
|
14794
|
-
return
|
|
14794
|
+
return _.length && (e["!merges"] = (e["!merges"] || []).concat(_)), f.e.r = Math.max(f.e.r, u - 1 + n), e["!ref"] = encode_range(f), u >= o && (e["!fullref"] = encode_range((f.e.r = l.length - m + u - 1 + n, f))), e;
|
|
14795
14795
|
}
|
|
14796
14796
|
function parse_dom_table(e, r) {
|
|
14797
14797
|
var t = r || {}, a = t.dense ? [] : {};
|
|
@@ -14845,31 +14845,31 @@ var write_styles_ods = /* @__PURE__ */ function() {
|
|
|
14845
14845
|
var o = [];
|
|
14846
14846
|
o.push(' <table:table table:name="' + escapexml(s.SheetNames[l]) + `" table:style-name="ta1">
|
|
14847
14847
|
`);
|
|
14848
|
-
var f = 0, c = 0,
|
|
14848
|
+
var f = 0, c = 0, _ = decode_range(i["!ref"] || "A1"), d = i["!merges"] || [], h = 0, m = Array.isArray(i);
|
|
14849
14849
|
if (i["!cols"])
|
|
14850
|
-
for (c = 0; c <=
|
|
14850
|
+
for (c = 0; c <= _.e.c; ++c)
|
|
14851
14851
|
o.push(" <table:table-column" + (i["!cols"][c] ? ' table:style-name="co' + i["!cols"][c].ods + '"' : "") + `></table:table-column>
|
|
14852
14852
|
`);
|
|
14853
14853
|
var u = "", p = i["!rows"] || [];
|
|
14854
|
-
for (f = 0; f <
|
|
14854
|
+
for (f = 0; f < _.s.r; ++f)
|
|
14855
14855
|
u = p[f] ? ' table:style-name="ro' + p[f].ods + '"' : "", o.push(" <table:table-row" + u + `></table:table-row>
|
|
14856
14856
|
`);
|
|
14857
|
-
for (; f <=
|
|
14857
|
+
for (; f <= _.e.r; ++f) {
|
|
14858
14858
|
for (u = p[f] ? ' table:style-name="ro' + p[f].ods + '"' : "", o.push(" <table:table-row" + u + `>
|
|
14859
|
-
`), c = 0; c <
|
|
14859
|
+
`), c = 0; c < _.s.c; ++c)
|
|
14860
14860
|
o.push(r);
|
|
14861
|
-
for (; c <=
|
|
14861
|
+
for (; c <= _.e.c; ++c) {
|
|
14862
14862
|
var C = !1, I = {}, k = "";
|
|
14863
|
-
for (h = 0; h !=
|
|
14864
|
-
if (!(
|
|
14865
|
-
(
|
|
14863
|
+
for (h = 0; h != d.length; ++h)
|
|
14864
|
+
if (!(d[h].s.c > c) && !(d[h].s.r > f) && !(d[h].e.c < c) && !(d[h].e.r < f)) {
|
|
14865
|
+
(d[h].s.c != c || d[h].s.r != f) && (C = !0), I["table:number-columns-spanned"] = d[h].e.c - d[h].s.c + 1, I["table:number-rows-spanned"] = d[h].e.r - d[h].s.r + 1;
|
|
14866
14866
|
break;
|
|
14867
14867
|
}
|
|
14868
14868
|
if (C) {
|
|
14869
14869
|
o.push(t);
|
|
14870
14870
|
continue;
|
|
14871
14871
|
}
|
|
14872
|
-
var b = encode_cell({ r: f, c }), X =
|
|
14872
|
+
var b = encode_cell({ r: f, c }), X = m ? (i[f] || [])[c] : i[b];
|
|
14873
14873
|
if (X && X.f && (I["table:formula"] = escapexml(csf_to_ods_formula(X.f)), X.F && X.F.slice(0, b.length) == b)) {
|
|
14874
14874
|
var z = decode_range(X.F);
|
|
14875
14875
|
I["table:number-matrix-columns-spanned"] = z.e.c - z.s.c + 1, I["table:number-matrix-rows-spanned"] = z.e.r - z.s.r + 1;
|
|
@@ -14896,12 +14896,12 @@ var write_styles_ods = /* @__PURE__ */ function() {
|
|
|
14896
14896
|
o.push(r);
|
|
14897
14897
|
continue;
|
|
14898
14898
|
}
|
|
14899
|
-
var
|
|
14899
|
+
var y = e(k);
|
|
14900
14900
|
if (X.l && X.l.Target) {
|
|
14901
14901
|
var B = X.l.Target;
|
|
14902
|
-
B = B.charAt(0) == "#" ? "#" + csf_to_ods_3D(B.slice(1)) : B, B.charAt(0) != "#" && !B.match(/^\w+:/) && (B = "../" + B),
|
|
14902
|
+
B = B.charAt(0) == "#" ? "#" + csf_to_ods_3D(B.slice(1)) : B, B.charAt(0) != "#" && !B.match(/^\w+:/) && (B = "../" + B), y = writextag("text:a", y, { "xlink:href": B.replace(/&/g, "&") });
|
|
14903
14903
|
}
|
|
14904
|
-
o.push(" " + writextag("table:table-cell", writextag("text:p",
|
|
14904
|
+
o.push(" " + writextag("table:table-cell", writextag("text:p", y, {}), I) + `
|
|
14905
14905
|
`);
|
|
14906
14906
|
}
|
|
14907
14907
|
o.push(` </table:table-row>
|
|
@@ -14926,13 +14926,13 @@ var write_styles_ods = /* @__PURE__ */ function() {
|
|
|
14926
14926
|
if (f && f["!cols"]) {
|
|
14927
14927
|
for (var c = 0; c < f["!cols"].length; ++c)
|
|
14928
14928
|
if (f["!cols"][c]) {
|
|
14929
|
-
var
|
|
14930
|
-
if (
|
|
14929
|
+
var _ = f["!cols"][c];
|
|
14930
|
+
if (_.width == null && _.wpx == null && _.wch == null)
|
|
14931
14931
|
continue;
|
|
14932
|
-
process_col(
|
|
14933
|
-
var
|
|
14932
|
+
process_col(_), _.ods = l;
|
|
14933
|
+
var d = f["!cols"][c].wpx + "px";
|
|
14934
14934
|
i.push(' <style:style style:name="co' + l + `" style:family="table-column">
|
|
14935
|
-
`), i.push(' <style:table-column-properties fo:break-before="auto" style:column-width="' +
|
|
14935
|
+
`), i.push(' <style:table-column-properties fo:break-before="auto" style:column-width="' + d + `"/>
|
|
14936
14936
|
`), i.push(` </style:style>
|
|
14937
14937
|
`), ++l;
|
|
14938
14938
|
}
|
|
@@ -14946,9 +14946,9 @@ var write_styles_ods = /* @__PURE__ */ function() {
|
|
|
14946
14946
|
for (var c = 0; c < f["!rows"].length; ++c)
|
|
14947
14947
|
if (f["!rows"][c]) {
|
|
14948
14948
|
f["!rows"][c].ods = o;
|
|
14949
|
-
var
|
|
14949
|
+
var _ = f["!rows"][c].hpx + "px";
|
|
14950
14950
|
i.push(' <style:style style:name="ro' + o + `" style:family="table-row">
|
|
14951
|
-
`), i.push(' <style:table-row-properties fo:break-before="auto" style:row-height="' +
|
|
14951
|
+
`), i.push(' <style:table-row-properties fo:break-before="auto" style:row-height="' + _ + `"/>
|
|
14952
14952
|
`), i.push(` </style:style>
|
|
14953
14953
|
`), ++o;
|
|
14954
14954
|
}
|
|
@@ -15008,8 +15008,8 @@ var write_styles_ods = /* @__PURE__ */ function() {
|
|
|
15008
15008
|
`), n(o, s), o.push(` <office:body>
|
|
15009
15009
|
`), o.push(` <office:spreadsheet>
|
|
15010
15010
|
`);
|
|
15011
|
-
for (var
|
|
15012
|
-
o.push(a(s.Sheets[s.SheetNames[
|
|
15011
|
+
for (var _ = 0; _ != s.SheetNames.length; ++_)
|
|
15012
|
+
o.push(a(s.Sheets[s.SheetNames[_]], s, _));
|
|
15013
15013
|
return o.push(` </office:spreadsheet>
|
|
15014
15014
|
`), o.push(` </office:body>
|
|
15015
15015
|
`), l.bookType == "fods" ? o.push("</office:document>") : o.push("</office:document-content>"), o.join("");
|
|
@@ -15264,12 +15264,12 @@ function write_tile_row(e, r, t) {
|
|
|
15264
15264
|
var l = ((s = (i = e[8]) == null ? void 0 : i[0]) == null ? void 0 : s.data) && varint_to_i32(e[8][0].data) > 0 || !1;
|
|
15265
15265
|
if (l)
|
|
15266
15266
|
throw "Math only works with normal offsets";
|
|
15267
|
-
for (var o = 0, f = u8_to_dataview(e[7][0].data), c = 0,
|
|
15267
|
+
for (var o = 0, f = u8_to_dataview(e[7][0].data), c = 0, _ = [], d = u8_to_dataview(e[4][0].data), h = 0, m = [], u = 0; u < r.length; ++u) {
|
|
15268
15268
|
if (r[u] == null) {
|
|
15269
|
-
f.setUint16(u * 2, 65535, !0),
|
|
15269
|
+
f.setUint16(u * 2, 65535, !0), d.setUint16(u * 2, 65535);
|
|
15270
15270
|
continue;
|
|
15271
15271
|
}
|
|
15272
|
-
f.setUint16(u * 2, c, !0),
|
|
15272
|
+
f.setUint16(u * 2, c, !0), d.setUint16(u * 2, h, !0);
|
|
15273
15273
|
var p, C;
|
|
15274
15274
|
switch (typeof r[u]) {
|
|
15275
15275
|
case "string":
|
|
@@ -15284,11 +15284,11 @@ function write_tile_row(e, r, t) {
|
|
|
15284
15284
|
default:
|
|
15285
15285
|
throw new Error("Unsupported value " + r[u]);
|
|
15286
15286
|
}
|
|
15287
|
-
|
|
15287
|
+
_.push(p), c += p.length, m.push(C), h += C.length, ++o;
|
|
15288
15288
|
}
|
|
15289
15289
|
for (e[2][0].data = write_varint49(o); u < e[7][0].data.length / 2; ++u)
|
|
15290
|
-
f.setUint16(u * 2, 65535, !0),
|
|
15291
|
-
return e[6][0].data = u8concat(
|
|
15290
|
+
f.setUint16(u * 2, 65535, !0), d.setUint16(u * 2, 65535, !0);
|
|
15291
|
+
return e[6][0].data = u8concat(_), e[3][0].data = u8concat(m), o;
|
|
15292
15292
|
}
|
|
15293
15293
|
function write_numbers_iwa(e, r) {
|
|
15294
15294
|
if (!r || !r.numbers)
|
|
@@ -15341,17 +15341,17 @@ function write_numbers_iwa(e, r) {
|
|
|
15341
15341
|
});
|
|
15342
15342
|
}
|
|
15343
15343
|
});
|
|
15344
|
-
for (var
|
|
15345
|
-
var u =
|
|
15344
|
+
for (var _ = CFB.find(f, l[1].location), d = parse_iwa_file(decompress_iwa_file(_.content)), h, m = 0; m < d.length; ++m) {
|
|
15345
|
+
var u = d[m];
|
|
15346
15346
|
u.id == 1 && (h = u);
|
|
15347
15347
|
}
|
|
15348
15348
|
var p = parse_TSP_Reference(parse_shallow(h.messages[0].data)[1][0].data);
|
|
15349
|
-
for (
|
|
15350
|
-
u =
|
|
15351
|
-
for (p = parse_TSP_Reference(parse_shallow(h.messages[0].data)[2][0].data),
|
|
15352
|
-
u =
|
|
15353
|
-
for (p = parse_TSP_Reference(parse_shallow(h.messages[0].data)[2][0].data),
|
|
15354
|
-
u =
|
|
15349
|
+
for (_ = CFB.find(f, l[p].location), d = parse_iwa_file(decompress_iwa_file(_.content)), m = 0; m < d.length; ++m)
|
|
15350
|
+
u = d[m], u.id == p && (h = u);
|
|
15351
|
+
for (p = parse_TSP_Reference(parse_shallow(h.messages[0].data)[2][0].data), _ = CFB.find(f, l[p].location), d = parse_iwa_file(decompress_iwa_file(_.content)), m = 0; m < d.length; ++m)
|
|
15352
|
+
u = d[m], u.id == p && (h = u);
|
|
15353
|
+
for (p = parse_TSP_Reference(parse_shallow(h.messages[0].data)[2][0].data), _ = CFB.find(f, l[p].location), d = parse_iwa_file(decompress_iwa_file(_.content)), m = 0; m < d.length; ++m)
|
|
15354
|
+
u = d[m], u.id == p && (h = u);
|
|
15355
15355
|
var C = parse_shallow(h.messages[0].data);
|
|
15356
15356
|
{
|
|
15357
15357
|
C[6][0].data = write_varint49(a.e.r + 1), C[7][0].data = write_varint49(a.e.c + 1);
|
|
@@ -15363,9 +15363,9 @@ function write_numbers_iwa(e, r) {
|
|
|
15363
15363
|
throw "Bad ColumnRowUIDMapArchive";
|
|
15364
15364
|
var z = parse_shallow(b[X].messages[0].data);
|
|
15365
15365
|
z[1] = [], z[2] = [], z[3] = [];
|
|
15366
|
-
for (var
|
|
15366
|
+
for (var y = 0; y <= a.e.c; ++y) {
|
|
15367
15367
|
var B = [];
|
|
15368
|
-
B[1] = B[2] = [{ type: 0, data: write_varint49(
|
|
15368
|
+
B[1] = B[2] = [{ type: 0, data: write_varint49(y + 420690) }], z[1].push({ type: 2, data: write_shallow(B) }), z[2].push({ type: 0, data: write_varint49(y) }), z[3].push({ type: 0, data: write_varint49(y) });
|
|
15369
15369
|
}
|
|
15370
15370
|
z[4] = [], z[5] = [], z[6] = [];
|
|
15371
15371
|
for (var A = 0; A <= a.e.r; ++A)
|
|
@@ -15394,8 +15394,8 @@ function write_numbers_iwa(e, r) {
|
|
|
15394
15394
|
{
|
|
15395
15395
|
if (b[0].id != q)
|
|
15396
15396
|
throw "Bad HeaderStorageBucket";
|
|
15397
|
-
for (Y = parse_shallow(b[0].messages[0].data),
|
|
15398
|
-
le = parse_shallow(Y[2][0].data), le[1][0].data = write_varint49(
|
|
15397
|
+
for (Y = parse_shallow(b[0].messages[0].data), y = 0; y <= a.e.c; ++y)
|
|
15398
|
+
le = parse_shallow(Y[2][0].data), le[1][0].data = write_varint49(y), le[4][0].data = write_varint49(a.e.r + 1), Y[2][y] = { type: Y[2][0].type, data: write_shallow(le) };
|
|
15399
15399
|
b[0].messages[0].data = write_shallow(Y);
|
|
15400
15400
|
}
|
|
15401
15401
|
k.content = compress_iwa_file(write_iwa_file(b)), k.size = k.content.length;
|
|
@@ -15452,8 +15452,8 @@ function write_numbers_iwa(e, r) {
|
|
|
15452
15452
|
C[4][0].data = write_shallow(N);
|
|
15453
15453
|
}
|
|
15454
15454
|
h.messages[0].data = write_shallow(C);
|
|
15455
|
-
var de = write_iwa_file(
|
|
15456
|
-
return
|
|
15455
|
+
var de = write_iwa_file(d), F = compress_iwa_file(de);
|
|
15456
|
+
return _.content = F, _.size = _.content.length, f;
|
|
15457
15457
|
}
|
|
15458
15458
|
function fix_opts_func(e) {
|
|
15459
15459
|
return function(t) {
|
|
@@ -15495,15 +15495,15 @@ function write_zip_xlsxb(e, r) {
|
|
|
15495
15495
|
e.Props.SheetNames = o;
|
|
15496
15496
|
}
|
|
15497
15497
|
for (e.Props.Worksheets = e.Props.SheetNames.length, zip_add_file(i, s, write_ext_props(e.Props)), n.extprops.push(s), add_rels(r.rels, 3, s, RELS.EXT_PROPS), e.Custprops !== e.Props && keys(e.Custprops || {}).length > 0 && (s = "docProps/custom.xml", zip_add_file(i, s, write_cust_props(e.Custprops)), n.custprops.push(s), add_rels(r.rels, 4, s, RELS.CUST_PROPS)), l = 1; l <= e.SheetNames.length; ++l) {
|
|
15498
|
-
var c = { "!id": {} },
|
|
15499
|
-
switch (
|
|
15498
|
+
var c = { "!id": {} }, _ = e.Sheets[e.SheetNames[l - 1]], d = (_ || {})["!type"] || "sheet";
|
|
15499
|
+
switch (d) {
|
|
15500
15500
|
case "chart":
|
|
15501
15501
|
default:
|
|
15502
15502
|
s = "xl/worksheets/sheet" + l + "." + t, zip_add_file(i, s, write_ws(l - 1, s, r, e, c)), n.sheets.push(s), add_rels(r.wbrels, -1, "worksheets/sheet" + l + "." + t, RELS.WS[0]);
|
|
15503
15503
|
}
|
|
15504
|
-
if (
|
|
15505
|
-
var h =
|
|
15506
|
-
h && h.length > 0 && (u = "xl/comments" + l + "." + t, zip_add_file(i, u, write_cmnt(h, u)), n.comments.push(u), add_rels(c, -1, "../comments" + l + "." + t, RELS.CMNT),
|
|
15504
|
+
if (_) {
|
|
15505
|
+
var h = _["!comments"], m = !1, u = "";
|
|
15506
|
+
h && h.length > 0 && (u = "xl/comments" + l + "." + t, zip_add_file(i, u, write_cmnt(h, u)), n.comments.push(u), add_rels(c, -1, "../comments" + l + "." + t, RELS.CMNT), m = !0), _["!legacy"] && m && zip_add_file(i, "xl/drawings/vmlDrawing" + l + ".vml", write_comments_vml(l, _["!comments"])), delete _["!comments"], delete _["!legacy"];
|
|
15507
15507
|
}
|
|
15508
15508
|
c["!id"].rId1 && zip_add_file(i, get_rels_path(s), write_rels(c));
|
|
15509
15509
|
}
|
|
@@ -15526,25 +15526,25 @@ function write_zip_xlsx(e, r) {
|
|
|
15526
15526
|
e.Props.Worksheets = e.Props.SheetNames.length, zip_add_file(i, s, write_ext_props(e.Props)), n.extprops.push(s), add_rels(r.rels, 3, s, RELS.EXT_PROPS), e.Custprops !== e.Props && keys(e.Custprops || {}).length > 0 && (s = "docProps/custom.xml", zip_add_file(i, s, write_cust_props(e.Custprops)), n.custprops.push(s), add_rels(r.rels, 4, s, RELS.CUST_PROPS));
|
|
15527
15527
|
var c = ["SheetJ5"];
|
|
15528
15528
|
for (r.tcid = 0, l = 1; l <= e.SheetNames.length; ++l) {
|
|
15529
|
-
var
|
|
15529
|
+
var _ = { "!id": {} }, d = e.Sheets[e.SheetNames[l - 1]], h = (d || {})["!type"] || "sheet";
|
|
15530
15530
|
switch (h) {
|
|
15531
15531
|
case "chart":
|
|
15532
15532
|
default:
|
|
15533
|
-
s = "xl/worksheets/sheet" + l + "." + t, zip_add_file(i, s, write_ws_xml(l - 1, r, e,
|
|
15533
|
+
s = "xl/worksheets/sheet" + l + "." + t, zip_add_file(i, s, write_ws_xml(l - 1, r, e, _)), n.sheets.push(s), add_rels(r.wbrels, -1, "worksheets/sheet" + l + "." + t, RELS.WS[0]);
|
|
15534
15534
|
}
|
|
15535
|
-
if (
|
|
15536
|
-
var
|
|
15537
|
-
if (
|
|
15535
|
+
if (d) {
|
|
15536
|
+
var m = d["!comments"], u = !1, p = "";
|
|
15537
|
+
if (m && m.length > 0) {
|
|
15538
15538
|
var C = !1;
|
|
15539
|
-
|
|
15539
|
+
m.forEach(function(I) {
|
|
15540
15540
|
I[1].forEach(function(k) {
|
|
15541
15541
|
k.T == !0 && (C = !0);
|
|
15542
15542
|
});
|
|
15543
|
-
}), C && (p = "xl/threadedComments/threadedComment" + l + "." + t, zip_add_file(i, p, write_tcmnt_xml(
|
|
15543
|
+
}), C && (p = "xl/threadedComments/threadedComment" + l + "." + t, zip_add_file(i, p, write_tcmnt_xml(m, c, r)), n.threadedcomments.push(p), add_rels(_, -1, "../threadedComments/threadedComment" + l + "." + t, RELS.TCMNT)), p = "xl/comments" + l + "." + t, zip_add_file(i, p, write_comments_xml(m)), n.comments.push(p), add_rels(_, -1, "../comments" + l + "." + t, RELS.CMNT), u = !0;
|
|
15544
15544
|
}
|
|
15545
|
-
|
|
15545
|
+
d["!legacy"] && u && zip_add_file(i, "xl/drawings/vmlDrawing" + l + ".vml", write_comments_vml(l, d["!comments"])), delete d["!comments"], delete d["!legacy"];
|
|
15546
15546
|
}
|
|
15547
|
-
|
|
15547
|
+
_["!id"].rId1 && zip_add_file(i, get_rels_path(s), write_rels(_));
|
|
15548
15548
|
}
|
|
15549
15549
|
return r.Strings != null && r.Strings.length > 0 && (s = "xl/sharedStrings." + t, zip_add_file(i, s, write_sst_xml(r.Strings, r)), n.strs.push(s), add_rels(r.wbrels, -1, "sharedStrings." + t, RELS.SST)), s = "xl/workbook." + t, zip_add_file(i, s, write_wb_xml(e)), n.workbooks.push(s), add_rels(r.rels, 1, s, RELS.WB), s = "xl/theme/theme1.xml", zip_add_file(i, s, write_theme(e.Themes, r)), n.themes.push(s), add_rels(r.wbrels, -1, "theme/theme1.xml", RELS.THEME), s = "xl/styles." + t, zip_add_file(i, s, write_sty_xml(e, r)), n.styles.push(s), add_rels(r.wbrels, -1, "styles." + t, RELS.STY), e.vbaraw && a && (s = "xl/vbaProject.bin", zip_add_file(i, s, e.vbaraw), n.vba.push(s), add_rels(r.wbrels, -1, "vbaProject.bin", RELS.VBA)), s = "xl/metadata." + t, zip_add_file(i, s, write_xlmeta_xml()), n.metadata.push(s), add_rels(r.wbrels, -1, "metadata." + t, RELS.XLMETA), c.length > 1 && (s = "xl/persons/person.xml", zip_add_file(i, s, write_people_xml(c)), n.people.push(s), add_rels(r.wbrels, -1, "persons/person.xml", RELS.PEOPLE)), zip_add_file(i, "[Content_Types].xml", write_ct(n, r)), zip_add_file(i, "_rels/.rels", write_rels(r.rels)), zip_add_file(i, "xl/_rels/workbook." + t + ".rels", write_rels(r.wbrels)), delete r.revssf, delete r.ssf, i;
|
|
15550
15550
|
}
|
|
@@ -15761,27 +15761,27 @@ function writeFileSync(e, r, t) {
|
|
|
15761
15761
|
return a.type = "file", a.file = r, resolve_book_type(a), writeSync(e, a);
|
|
15762
15762
|
}
|
|
15763
15763
|
function make_json_row(e, r, t, a, n, i, s, l) {
|
|
15764
|
-
var o = encode_row(t), f = l.defval, c = l.raw || !Object.prototype.hasOwnProperty.call(l, "raw"),
|
|
15764
|
+
var o = encode_row(t), f = l.defval, c = l.raw || !Object.prototype.hasOwnProperty.call(l, "raw"), _ = !0, d = n === 1 ? [] : {};
|
|
15765
15765
|
if (n !== 1)
|
|
15766
15766
|
if (Object.defineProperty)
|
|
15767
15767
|
try {
|
|
15768
|
-
Object.defineProperty(
|
|
15768
|
+
Object.defineProperty(d, "__rowNum__", { value: t, enumerable: !1 });
|
|
15769
15769
|
} catch {
|
|
15770
|
-
|
|
15770
|
+
d.__rowNum__ = t;
|
|
15771
15771
|
}
|
|
15772
15772
|
else
|
|
15773
|
-
|
|
15773
|
+
d.__rowNum__ = t;
|
|
15774
15774
|
if (!s || e[t])
|
|
15775
15775
|
for (var h = r.s.c; h <= r.e.c; ++h) {
|
|
15776
|
-
var
|
|
15777
|
-
if (
|
|
15776
|
+
var m = s ? e[t][h] : e[a[h] + o];
|
|
15777
|
+
if (m === void 0 || m.t === void 0) {
|
|
15778
15778
|
if (f === void 0)
|
|
15779
15779
|
continue;
|
|
15780
|
-
i[h] != null && (
|
|
15780
|
+
i[h] != null && (d[i[h]] = f);
|
|
15781
15781
|
continue;
|
|
15782
15782
|
}
|
|
15783
|
-
var u =
|
|
15784
|
-
switch (
|
|
15783
|
+
var u = m.v;
|
|
15784
|
+
switch (m.t) {
|
|
15785
15785
|
case "z":
|
|
15786
15786
|
if (u == null)
|
|
15787
15787
|
break;
|
|
@@ -15795,24 +15795,24 @@ function make_json_row(e, r, t, a, n, i, s, l) {
|
|
|
15795
15795
|
case "n":
|
|
15796
15796
|
break;
|
|
15797
15797
|
default:
|
|
15798
|
-
throw new Error("unrecognized type " +
|
|
15798
|
+
throw new Error("unrecognized type " + m.t);
|
|
15799
15799
|
}
|
|
15800
15800
|
if (i[h] != null) {
|
|
15801
15801
|
if (u == null)
|
|
15802
|
-
if (
|
|
15803
|
-
|
|
15802
|
+
if (m.t == "e" && u === null)
|
|
15803
|
+
d[i[h]] = null;
|
|
15804
15804
|
else if (f !== void 0)
|
|
15805
|
-
|
|
15805
|
+
d[i[h]] = f;
|
|
15806
15806
|
else if (c && u === null)
|
|
15807
|
-
|
|
15807
|
+
d[i[h]] = null;
|
|
15808
15808
|
else
|
|
15809
15809
|
continue;
|
|
15810
15810
|
else
|
|
15811
|
-
|
|
15812
|
-
u != null && (
|
|
15811
|
+
d[i[h]] = c && (m.t !== "n" || m.t === "n" && l.rawNumbers !== !1) ? u : format_cell(m, u, l);
|
|
15812
|
+
u != null && (_ = !1);
|
|
15813
15813
|
}
|
|
15814
15814
|
}
|
|
15815
|
-
return { row:
|
|
15815
|
+
return { row: d, isempty: _ };
|
|
15816
15816
|
}
|
|
15817
15817
|
function sheet_to_json(e, r) {
|
|
15818
15818
|
if (e == null || e["!ref"] == null)
|
|
@@ -15829,17 +15829,17 @@ function sheet_to_json(e, r) {
|
|
|
15829
15829
|
o = c;
|
|
15830
15830
|
}
|
|
15831
15831
|
a > 0 && (n = 0);
|
|
15832
|
-
var
|
|
15832
|
+
var _ = encode_row(o.s.r), d = [], h = [], m = 0, u = 0, p = Array.isArray(e), C = o.s.r, I = 0, k = {};
|
|
15833
15833
|
p && !e[C] && (e[C] = []);
|
|
15834
15834
|
var b = f.skipHidden && e["!cols"] || [], X = f.skipHidden && e["!rows"] || [];
|
|
15835
15835
|
for (I = o.s.c; I <= o.e.c; ++I)
|
|
15836
15836
|
if (!(b[I] || {}).hidden)
|
|
15837
|
-
switch (
|
|
15837
|
+
switch (d[I] = encode_col(I), t = p ? e[C][I] : e[d[I] + _], a) {
|
|
15838
15838
|
case 1:
|
|
15839
15839
|
i[I] = I - o.s.c;
|
|
15840
15840
|
break;
|
|
15841
15841
|
case 2:
|
|
15842
|
-
i[I] =
|
|
15842
|
+
i[I] = d[I];
|
|
15843
15843
|
break;
|
|
15844
15844
|
case 3:
|
|
15845
15845
|
i[I] = f.header[I - o.s.c];
|
|
@@ -15857,22 +15857,22 @@ function sheet_to_json(e, r) {
|
|
|
15857
15857
|
}
|
|
15858
15858
|
for (C = o.s.r + n; C <= o.e.r; ++C)
|
|
15859
15859
|
if (!(X[C] || {}).hidden) {
|
|
15860
|
-
var z = make_json_row(e, o, C,
|
|
15861
|
-
(z.isempty === !1 || (a === 1 ? f.blankrows !== !1 : f.blankrows)) && (h[
|
|
15860
|
+
var z = make_json_row(e, o, C, d, a, i, p, f);
|
|
15861
|
+
(z.isempty === !1 || (a === 1 ? f.blankrows !== !1 : f.blankrows)) && (h[m++] = z.row);
|
|
15862
15862
|
}
|
|
15863
|
-
return h.length =
|
|
15863
|
+
return h.length = m, h;
|
|
15864
15864
|
}
|
|
15865
15865
|
var qreg = /"/g;
|
|
15866
15866
|
function make_csv_row(e, r, t, a, n, i, s, l) {
|
|
15867
|
-
for (var o = !0, f = [], c = "",
|
|
15868
|
-
if (a[
|
|
15869
|
-
var h = l.dense ? (e[t] || [])[
|
|
15867
|
+
for (var o = !0, f = [], c = "", _ = encode_row(t), d = r.s.c; d <= r.e.c; ++d)
|
|
15868
|
+
if (a[d]) {
|
|
15869
|
+
var h = l.dense ? (e[t] || [])[d] : e[a[d] + _];
|
|
15870
15870
|
if (h == null)
|
|
15871
15871
|
c = "";
|
|
15872
15872
|
else if (h.v != null) {
|
|
15873
15873
|
o = !1, c = "" + (l.rawNumbers && h.t == "n" ? h.v : format_cell(h, null, l));
|
|
15874
|
-
for (var
|
|
15875
|
-
if ((u = c.charCodeAt(
|
|
15874
|
+
for (var m = 0, u = 0; m !== c.length; ++m)
|
|
15875
|
+
if ((u = c.charCodeAt(m)) === n || u === i || u === 34 || l.forceQuotes) {
|
|
15876
15876
|
c = '"' + c.replace(qreg, '""') + '"';
|
|
15877
15877
|
break;
|
|
15878
15878
|
}
|
|
@@ -15888,12 +15888,12 @@ function sheet_to_csv(e, r) {
|
|
|
15888
15888
|
if (e == null || e["!ref"] == null)
|
|
15889
15889
|
return "";
|
|
15890
15890
|
var n = safe_decode_range(e["!ref"]), i = a.FS !== void 0 ? a.FS : ",", s = i.charCodeAt(0), l = a.RS !== void 0 ? a.RS : `
|
|
15891
|
-
`, o = l.charCodeAt(0), f = new RegExp((i == "|" ? "\\|" : i) + "+$"), c = "",
|
|
15891
|
+
`, o = l.charCodeAt(0), f = new RegExp((i == "|" ? "\\|" : i) + "+$"), c = "", _ = [];
|
|
15892
15892
|
a.dense = Array.isArray(e);
|
|
15893
|
-
for (var
|
|
15894
|
-
(
|
|
15893
|
+
for (var d = a.skipHidden && e["!cols"] || [], h = a.skipHidden && e["!rows"] || [], m = n.s.c; m <= n.e.c; ++m)
|
|
15894
|
+
(d[m] || {}).hidden || (_[m] = encode_col(m));
|
|
15895
15895
|
for (var u = 0, p = n.s.r; p <= n.e.r; ++p)
|
|
15896
|
-
(h[p] || {}).hidden || (c = make_csv_row(e, n, p,
|
|
15896
|
+
(h[p] || {}).hidden || (c = make_csv_row(e, n, p, _, s, o, i, a), c != null && (a.strip && (c = c.replace(f, "")), (c || a.blankrows !== !1) && t.push((u++ ? l : "") + c)));
|
|
15897
15897
|
return delete a.dense, t.join("");
|
|
15898
15898
|
}
|
|
15899
15899
|
function sheet_to_txt(e, r) {
|
|
@@ -15949,22 +15949,22 @@ function sheet_add_json(e, r, t) {
|
|
|
15949
15949
|
}
|
|
15950
15950
|
var f, c = { s: { c: 0, r: 0 }, e: { c: l, r: s + r.length - 1 + n } };
|
|
15951
15951
|
if (i["!ref"]) {
|
|
15952
|
-
var
|
|
15953
|
-
c.e.c = Math.max(c.e.c,
|
|
15952
|
+
var _ = safe_decode_range(i["!ref"]);
|
|
15953
|
+
c.e.c = Math.max(c.e.c, _.e.c), c.e.r = Math.max(c.e.r, _.e.r), s == -1 && (s = _.e.r + 1, c.e.r = s + r.length - 1 + n);
|
|
15954
15954
|
} else
|
|
15955
15955
|
s == -1 && (s = 0, c.e.r = r.length - 1 + n);
|
|
15956
|
-
var
|
|
15956
|
+
var d = a.header || [], h = 0;
|
|
15957
15957
|
r.forEach(function(u, p) {
|
|
15958
15958
|
keys(u).forEach(function(C) {
|
|
15959
|
-
(h =
|
|
15959
|
+
(h = d.indexOf(C)) == -1 && (d[h = d.length] = C);
|
|
15960
15960
|
var I = u[C], k = "z", b = "", X = encode_cell({ c: l + h, r: s + p + n });
|
|
15961
15961
|
f = ws_get_cell_stub(i, X), I && typeof I == "object" && !(I instanceof Date) ? i[X] = I : (typeof I == "number" ? k = "n" : typeof I == "boolean" ? k = "b" : typeof I == "string" ? k = "s" : I instanceof Date ? (k = "d", a.cellDates || (k = "n", I = datenum(I)), b = a.dateNF || table_fmt[14]) : I === null && a.nullError && (k = "e", I = 0), f ? (f.t = k, f.v = I, delete f.w, delete f.R, b && (f.z = b)) : i[X] = f = { t: k, v: I }, b && (f.z = b));
|
|
15962
15962
|
});
|
|
15963
|
-
}), c.e.c = Math.max(c.e.c, l +
|
|
15964
|
-
var
|
|
15963
|
+
}), c.e.c = Math.max(c.e.c, l + d.length - 1);
|
|
15964
|
+
var m = encode_row(s);
|
|
15965
15965
|
if (n)
|
|
15966
|
-
for (h = 0; h <
|
|
15967
|
-
i[encode_col(h + l) +
|
|
15966
|
+
for (h = 0; h < d.length; ++h)
|
|
15967
|
+
i[encode_col(h + l) + m] = { t: "s", v: d[h] };
|
|
15968
15968
|
return i["!ref"] = encode_range(c), i;
|
|
15969
15969
|
}
|
|
15970
15970
|
function json_to_sheet(e, r) {
|
|
@@ -16107,18 +16107,18 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16107
16107
|
let s = null;
|
|
16108
16108
|
const l = computed({
|
|
16109
16109
|
get: () => t.modelValue,
|
|
16110
|
-
set: (
|
|
16110
|
+
set: (d) => i("update:modelValue", d)
|
|
16111
16111
|
}), o = () => {
|
|
16112
|
-
let
|
|
16113
|
-
var
|
|
16114
|
-
h.TitleArray && h.TitleArray.length > 0 ?
|
|
16115
|
-
let p = t.columnArray, C =
|
|
16112
|
+
let d = t.data, h = t.printOption;
|
|
16113
|
+
var m = "", u = "";
|
|
16114
|
+
h.TitleArray && h.TitleArray.length > 0 ? m = h.TitleArray.map((k, b) => `<tr><th colspan='100' style="font-size:${20 - b * 3}px;border:none;">${k}</th></tr>`).join("") : m = `<tr><th colspan='100' style='font-size:20px;border:none'>${t.title}</th></tr>`, h.FootArray && h.FootArray.length > 0 && (u = h.FootArray.map((k) => `<tr><td colspan='100' style="font-size:18ddpx;border:none;text-align:right">${k}</td></tr>`).join(""));
|
|
16115
|
+
let p = t.columnArray, C = d.map(
|
|
16116
16116
|
(k, b) => `<tr>${p.map((X, z) => {
|
|
16117
|
-
let
|
|
16118
|
-
return
|
|
16117
|
+
let y = f(k, X, z, b);
|
|
16118
|
+
return y.colspan == "0" || y.rowspan == "0" ? "" : `<td rowspan="${y.rowspan > 1 ? y.rowspan : ""}" colspan="${y.colspan > 1 ? y.colspan : ""}">${k[X.title]}</td>`;
|
|
16119
16119
|
}).join("")}</tr>`
|
|
16120
16120
|
).join(""), I = "";
|
|
16121
|
-
return t.columnArray.filter((k) => k.isSummary).length > 0 && (I = `<tr>${
|
|
16121
|
+
return t.columnArray.filter((k) => k.isSummary).length > 0 && (I = `<tr>${_().map((k) => `<td>${k}</td>`)}</tr>`), `
|
|
16122
16122
|
<style type="text/css">
|
|
16123
16123
|
td, th {
|
|
16124
16124
|
border: 1px solid black;
|
|
@@ -16134,7 +16134,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16134
16134
|
</style>
|
|
16135
16135
|
<table>
|
|
16136
16136
|
<thead>
|
|
16137
|
-
${
|
|
16137
|
+
${m}
|
|
16138
16138
|
<tr>${p.map((k) => `<th>${k.title}</th>`).join("")}</tr>
|
|
16139
16139
|
</thead>
|
|
16140
16140
|
<tbody>
|
|
@@ -16143,13 +16143,13 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16143
16143
|
${u}
|
|
16144
16144
|
</tbody>
|
|
16145
16145
|
</table>`;
|
|
16146
|
-
}, f = (
|
|
16146
|
+
}, f = (d, h, m, u) => {
|
|
16147
16147
|
if (h.title == null)
|
|
16148
16148
|
return { rowspan: 1, colspan: 1 };
|
|
16149
16149
|
let p = h.title, C = t.columnArray.FirstOrDefault((b) => b.title == p);
|
|
16150
16150
|
if (C == null || !C.isHeBing)
|
|
16151
16151
|
return { rowspan: 1, colspan: 1 };
|
|
16152
|
-
let I =
|
|
16152
|
+
let I = d[p];
|
|
16153
16153
|
if (u > 0 && I == t.data[u - 1][p])
|
|
16154
16154
|
return { rowspan: 0, colspan: 0 };
|
|
16155
16155
|
let k = 0;
|
|
@@ -16164,25 +16164,25 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16164
16164
|
return ElMessageBox.alert(L("未发现打印机"));
|
|
16165
16165
|
if (s == null)
|
|
16166
16166
|
return window.open("http://saas.ip239.com/CommonApp/Lodop6.226_Clodop3.083.zip", "newwindow"), ElMessageBox.alert(L("电脑尚未安装打印机插件!请先下载并解压安装"));
|
|
16167
|
-
var
|
|
16168
|
-
n.PrintName && s.SET_PRINTER_INDEXA(n.PrintName), n.Direction == 1 ? s.SET_PRINT_PAGESIZE(2, 0, 0, "A4") : s.SET_PRINT_PAGESIZE(1, 0, 0, "A4"), s.ADD_PRINT_HTM(0, 0, "100%", "100%",
|
|
16169
|
-
},
|
|
16167
|
+
var d = o();
|
|
16168
|
+
n.PrintName && s.SET_PRINTER_INDEXA(n.PrintName), n.Direction == 1 ? s.SET_PRINT_PAGESIZE(2, 0, 0, "A4") : s.SET_PRINT_PAGESIZE(1, 0, 0, "A4"), s.ADD_PRINT_HTM(0, 0, "100%", "100%", d), s.PRINT(), i("update:modelValue", !1), ElMessage({ message: L("数据打印成功") });
|
|
16169
|
+
}, _ = () => t.columnArray.map((d, h) => {
|
|
16170
16170
|
if (h === 0)
|
|
16171
16171
|
return L("合计");
|
|
16172
|
-
if (!
|
|
16172
|
+
if (!d.isSummary)
|
|
16173
16173
|
return "";
|
|
16174
|
-
let
|
|
16174
|
+
let m = 0;
|
|
16175
16175
|
return t.data.forEach((u) => {
|
|
16176
16176
|
if (u.src && u.src.IgnoreSummary)
|
|
16177
16177
|
return;
|
|
16178
|
-
let p = Number(u[
|
|
16179
|
-
Number.isNaN(p) || (
|
|
16180
|
-
}),
|
|
16178
|
+
let p = Number(u[d.title]);
|
|
16179
|
+
Number.isNaN(p) || (m += p);
|
|
16180
|
+
}), m.toFixed(2);
|
|
16181
16181
|
});
|
|
16182
16182
|
return watch(
|
|
16183
16183
|
() => t.modelValue,
|
|
16184
|
-
(
|
|
16185
|
-
if (
|
|
16184
|
+
(d) => {
|
|
16185
|
+
if (d && s == null) {
|
|
16186
16186
|
if (!window.getLodop) {
|
|
16187
16187
|
console.log("未引入Lodop插件");
|
|
16188
16188
|
return;
|
|
@@ -16193,13 +16193,13 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16193
16193
|
console.log("电脑无打印机");
|
|
16194
16194
|
return;
|
|
16195
16195
|
}
|
|
16196
|
-
for (let
|
|
16197
|
-
a.value.push(s.GET_PRINTER_NAME(
|
|
16196
|
+
for (let m = 0; m < h; m++)
|
|
16197
|
+
a.value.push(s.GET_PRINTER_NAME(m));
|
|
16198
16198
|
}
|
|
16199
16199
|
}
|
|
16200
|
-
), (
|
|
16200
|
+
), (d, h) => (openBlock(), createBlock(unref(ElDialog), {
|
|
16201
16201
|
modelValue: l.value,
|
|
16202
|
-
"onUpdate:modelValue": h[2] || (h[2] = (
|
|
16202
|
+
"onUpdate:modelValue": h[2] || (h[2] = (m) => l.value = m),
|
|
16203
16203
|
title: unref(L)("打印配置"),
|
|
16204
16204
|
width: "600px"
|
|
16205
16205
|
}, {
|
|
@@ -16209,16 +16209,16 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16209
16209
|
createElementVNode("label", _hoisted_1$e, toDisplayString(unref(L)("打印机")), 1),
|
|
16210
16210
|
createVNode(unref(ElSelect), {
|
|
16211
16211
|
modelValue: n.PrintName,
|
|
16212
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
16212
|
+
"onUpdate:modelValue": h[0] || (h[0] = (m) => n.PrintName = m)
|
|
16213
16213
|
}, {
|
|
16214
16214
|
default: withCtx(() => [
|
|
16215
16215
|
createVNode(unref(ElOption), {
|
|
16216
16216
|
value: "",
|
|
16217
16217
|
label: unref(L)("默认打印机")
|
|
16218
16218
|
}, null, 8, ["label"]),
|
|
16219
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (
|
|
16220
|
-
value:
|
|
16221
|
-
label:
|
|
16219
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (m) => (openBlock(), createBlock(unref(ElOption), {
|
|
16220
|
+
value: m,
|
|
16221
|
+
label: m
|
|
16222
16222
|
}, null, 8, ["value", "label"]))), 256))
|
|
16223
16223
|
]),
|
|
16224
16224
|
_: 1
|
|
@@ -16231,7 +16231,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16231
16231
|
createElementVNode("label", _hoisted_2$9, toDisplayString(unref(L)("打印方向")), 1),
|
|
16232
16232
|
createVNode(unref(ElSelect), {
|
|
16233
16233
|
modelValue: n.Direction,
|
|
16234
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
|
16234
|
+
"onUpdate:modelValue": h[1] || (h[1] = (m) => n.Direction = m)
|
|
16235
16235
|
}, {
|
|
16236
16236
|
default: withCtx(() => [
|
|
16237
16237
|
createVNode(unref(ElOption), {
|
|
@@ -16248,7 +16248,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16248
16248
|
]),
|
|
16249
16249
|
_: 1
|
|
16250
16250
|
}),
|
|
16251
|
-
renderSlot(
|
|
16251
|
+
renderSlot(d.$slots, "PrintDialogConfigDlg"),
|
|
16252
16252
|
createElementVNode("div", _hoisted_3$7, [
|
|
16253
16253
|
createVNode(unref(ElButton), {
|
|
16254
16254
|
type: "primary",
|
|
@@ -16294,19 +16294,19 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16294
16294
|
emits: ["command"],
|
|
16295
16295
|
setup(e, { expose: r, emit: t }) {
|
|
16296
16296
|
ref([]), ref();
|
|
16297
|
-
const a = ref([]), n = reactive({ IsVisible: !1, dataArray: [] }), i = e, s = (
|
|
16297
|
+
const a = ref([]), n = reactive({ IsVisible: !1, dataArray: [] }), i = e, s = (y) => {
|
|
16298
16298
|
try {
|
|
16299
|
-
let B = /* @__PURE__ */ new Date(), A =
|
|
16299
|
+
let B = /* @__PURE__ */ new Date(), A = y.ToDateTime();
|
|
16300
16300
|
return B > A ? "red" : (B = B.AddDays(30), B > A ? "#f6d00c" : "inherit");
|
|
16301
16301
|
} catch {
|
|
16302
16302
|
}
|
|
16303
|
-
}, l = ({ row:
|
|
16303
|
+
}, l = ({ row: y, column: B, columnIndex: A, rowIndex: N }) => {
|
|
16304
16304
|
if (B.property == null)
|
|
16305
16305
|
return { rowspan: 1, colspan: 1 };
|
|
16306
16306
|
let V = B.property, G = i.columnArray.FirstOrDefault((q) => q.dataKey == V);
|
|
16307
16307
|
if (G == null || !G.isHeBing)
|
|
16308
16308
|
return { rowspan: 1, colspan: 1 };
|
|
16309
|
-
let Y =
|
|
16309
|
+
let Y = y[V];
|
|
16310
16310
|
if (N > 0 && Y == a.value[N - 1][V])
|
|
16311
16311
|
return { rowspan: 0, colspan: 0 };
|
|
16312
16312
|
let le = 0;
|
|
@@ -16316,21 +16316,21 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16316
16316
|
rowspan: le,
|
|
16317
16317
|
colspan: 1
|
|
16318
16318
|
};
|
|
16319
|
-
}, o = (
|
|
16320
|
-
for (let A = 0; A <
|
|
16321
|
-
if (B(
|
|
16322
|
-
return
|
|
16319
|
+
}, o = (y, B) => {
|
|
16320
|
+
for (let A = 0; A < y.length; A++)
|
|
16321
|
+
if (B(y[A]))
|
|
16322
|
+
return y[A];
|
|
16323
16323
|
return null;
|
|
16324
|
-
}, f = async (
|
|
16324
|
+
}, f = async (y) => {
|
|
16325
16325
|
let B = a.value.filter((A) => A.src.checked);
|
|
16326
|
-
return B.length == 0 && (await ElMessageBox.confirm(L(`您尚未选择任何数据!您是想${
|
|
16326
|
+
return B.length == 0 && (await ElMessageBox.confirm(L(`您尚未选择任何数据!您是想${y}全部数据吗??`), L(`数据${y}确认`), {
|
|
16327
16327
|
cancelButtonText: L("取消"),
|
|
16328
16328
|
confirmButtonText: L("确定")
|
|
16329
16329
|
}), B = a.value), B.map((A) => {
|
|
16330
16330
|
let N = {};
|
|
16331
16331
|
for (let V in A) {
|
|
16332
16332
|
if (V == "src") {
|
|
16333
|
-
|
|
16333
|
+
y == "打印" && (N[V] = A.src);
|
|
16334
16334
|
continue;
|
|
16335
16335
|
}
|
|
16336
16336
|
let G = o(i.columnArray, (Y) => Y.dataKey == V);
|
|
@@ -16339,15 +16339,15 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16339
16339
|
return N;
|
|
16340
16340
|
});
|
|
16341
16341
|
}, c = async () => {
|
|
16342
|
-
let
|
|
16343
|
-
for (let q in
|
|
16342
|
+
let y = await f("导出"), B = 0, A = y.length, N = [];
|
|
16343
|
+
for (let q in y[0])
|
|
16344
16344
|
B++, N.push(q);
|
|
16345
16345
|
let V = [];
|
|
16346
16346
|
i.printOption.TitleArray.forEach((q) => {
|
|
16347
16347
|
V.push([q]);
|
|
16348
16348
|
}), V.push(N);
|
|
16349
|
-
for (let q = 0; q <
|
|
16350
|
-
let he = N.map((ue) =>
|
|
16349
|
+
for (let q = 0; q < y.length; q++) {
|
|
16350
|
+
let he = N.map((ue) => y[q][ue]);
|
|
16351
16351
|
V.push(he);
|
|
16352
16352
|
}
|
|
16353
16353
|
i.printOption.FootArray.forEach((q) => {
|
|
@@ -16392,9 +16392,9 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16392
16392
|
});
|
|
16393
16393
|
const le = utils.book_new();
|
|
16394
16394
|
utils.book_append_sheet(le, G, "sheet1"), writeFileSync(le, i.tabName + L("导出") + ".xlsx");
|
|
16395
|
-
},
|
|
16395
|
+
}, _ = ({ columns: y, data: B }) => {
|
|
16396
16396
|
let A = [];
|
|
16397
|
-
return
|
|
16397
|
+
return y.forEach((N, V) => {
|
|
16398
16398
|
if (V === 0) {
|
|
16399
16399
|
A[V] = L("合计");
|
|
16400
16400
|
return;
|
|
@@ -16411,8 +16411,8 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16411
16411
|
}
|
|
16412
16412
|
}), A[V] = A[V].toFixed(2);
|
|
16413
16413
|
}), A;
|
|
16414
|
-
},
|
|
16415
|
-
let A =
|
|
16414
|
+
}, d = (y, B) => {
|
|
16415
|
+
let A = y[B.dataKey];
|
|
16416
16416
|
if (A == "合计")
|
|
16417
16417
|
return A;
|
|
16418
16418
|
if (B.EnumType) {
|
|
@@ -16422,38 +16422,38 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16422
16422
|
return L(V);
|
|
16423
16423
|
return "";
|
|
16424
16424
|
}
|
|
16425
|
-
return B.FnGet ? B.FnGet(
|
|
16426
|
-
}, h = (
|
|
16427
|
-
|
|
16428
|
-
},
|
|
16425
|
+
return B.FnGet ? B.FnGet(y) : A;
|
|
16426
|
+
}, h = (y) => {
|
|
16427
|
+
y.srcFilter = y.srcFilter || y.filters, y.filterText == "" ? y.filters = y.srcFilter : y.filters = y.srcFilter.filter((B) => B.text.indexOf(y.filterText) >= 0);
|
|
16428
|
+
}, m = ref([]), u = computed({
|
|
16429
16429
|
get: () => {
|
|
16430
|
-
let
|
|
16430
|
+
let y = [];
|
|
16431
16431
|
return i.columnArray.forEach((B) => {
|
|
16432
|
-
B.isFilter && (B.filters || (B.filterText = "", B.filterList = [], B.filters = [])),
|
|
16433
|
-
}),
|
|
16432
|
+
B.isFilter && (B.filters || (B.filterText = "", B.filterList = [], B.filters = [])), y.push(B);
|
|
16433
|
+
}), m.value = y, y;
|
|
16434
16434
|
}
|
|
16435
16435
|
}), p = computed({
|
|
16436
|
-
get: () => u.value.some((
|
|
16436
|
+
get: () => u.value.some((y) => y.isSummary)
|
|
16437
16437
|
});
|
|
16438
16438
|
watch(
|
|
16439
16439
|
() => i.data,
|
|
16440
|
-
(
|
|
16440
|
+
(y, B) => {
|
|
16441
16441
|
I(!0);
|
|
16442
16442
|
}
|
|
16443
16443
|
);
|
|
16444
|
-
const C = (
|
|
16445
|
-
|
|
16446
|
-
}, I = (
|
|
16444
|
+
const C = (y) => {
|
|
16445
|
+
y.filterList = y.filters.Where((B) => !y.filterList.Exists((A) => A == B.text)).Select((B) => B.text), I(!0), y.isVisible = !1;
|
|
16446
|
+
}, I = (y) => {
|
|
16447
16447
|
let B = i.data.map((A) => {
|
|
16448
16448
|
A.src = A;
|
|
16449
16449
|
let N = {};
|
|
16450
16450
|
for (let V = 0; V < i.columnArray.length; V++) {
|
|
16451
16451
|
let G = i.columnArray[V];
|
|
16452
|
-
N[G.dataKey] =
|
|
16452
|
+
N[G.dataKey] = d(A, G);
|
|
16453
16453
|
}
|
|
16454
16454
|
return N.src = A, N;
|
|
16455
16455
|
});
|
|
16456
|
-
|
|
16456
|
+
y && i.columnArray.forEach((A) => {
|
|
16457
16457
|
if (A.isFilter) {
|
|
16458
16458
|
let N = [];
|
|
16459
16459
|
B.forEach((V) => {
|
|
@@ -16469,12 +16469,12 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16469
16469
|
}
|
|
16470
16470
|
return !0;
|
|
16471
16471
|
});
|
|
16472
|
-
}, k = t, b = (
|
|
16473
|
-
let A = i.commandArray.FirstOrDefault((N) => typeof N == "object" && N.Name ==
|
|
16474
|
-
A && (A.onClick ? A.onClick(B) : A.OnClick && A.OnClick(B)), k("command",
|
|
16475
|
-
}, X = (
|
|
16476
|
-
a.value.ForEach((B) => B.src.checked = !1),
|
|
16477
|
-
}, z = (
|
|
16472
|
+
}, k = t, b = (y, B) => {
|
|
16473
|
+
let A = i.commandArray.FirstOrDefault((N) => typeof N == "object" && N.Name == y);
|
|
16474
|
+
A && (A.onClick ? A.onClick(B) : A.OnClick && A.OnClick(B)), k("command", y, B);
|
|
16475
|
+
}, X = (y) => {
|
|
16476
|
+
a.value.ForEach((B) => B.src.checked = !1), y.forEach((B) => B.src.checked = !0);
|
|
16477
|
+
}, z = (y) => {
|
|
16478
16478
|
};
|
|
16479
16479
|
return r({
|
|
16480
16480
|
onUpdateData: I,
|
|
@@ -16482,7 +16482,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16482
16482
|
printData: async () => {
|
|
16483
16483
|
n.dataArray = await f("打印"), n.IsVisible = !0;
|
|
16484
16484
|
}
|
|
16485
|
-
}), (
|
|
16485
|
+
}), (y, B) => (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
16486
16486
|
createVNode(unref(ElTable), {
|
|
16487
16487
|
data: a.value,
|
|
16488
16488
|
height: "full",
|
|
@@ -16494,7 +16494,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16494
16494
|
class: "qktab",
|
|
16495
16495
|
"sum-text": unref(L)("合计"),
|
|
16496
16496
|
"span-method": l,
|
|
16497
|
-
"summary-method":
|
|
16497
|
+
"summary-method": _,
|
|
16498
16498
|
onSelectionChange: X
|
|
16499
16499
|
}, {
|
|
16500
16500
|
default: withCtx(() => [
|
|
@@ -16511,7 +16511,7 @@ const _hoisted_1$e = { style: { display: "inline-block", width: "100px" } }, _ho
|
|
|
16511
16511
|
label: unref(L)("行号"),
|
|
16512
16512
|
fixed: "left"
|
|
16513
16513
|
}, null, 8, ["label"])) : createCommentVNode("", !0),
|
|
16514
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
16514
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (A) => (openBlock(), createBlock(unref(ElTableColumn), {
|
|
16515
16515
|
prop: A.dataKey,
|
|
16516
16516
|
label: unref(L)(A.title),
|
|
16517
16517
|
"min-width": A.width,
|
|
@@ -16861,6 +16861,12 @@ const SafeCall$1 = async (e, r) => {
|
|
|
16861
16861
|
} catch (a) {
|
|
16862
16862
|
console.log(a), a.resultcontent ? alert(a.resultcontent) : alert("打印错误:" + a.message);
|
|
16863
16863
|
}
|
|
16864
|
+
}, CardTypeClassEnum = {
|
|
16865
|
+
无: "0",
|
|
16866
|
+
计次卡: "1",
|
|
16867
|
+
储值卡: "2",
|
|
16868
|
+
钱包卡: "3",
|
|
16869
|
+
周期卡: "4"
|
|
16864
16870
|
}, UserCardTypeEnum$1 = {
|
|
16865
16871
|
身份证: "0",
|
|
16866
16872
|
临时身份证: "1",
|
|
@@ -16925,21 +16931,21 @@ const SafeCall$1 = async (e, r) => {
|
|
|
16925
16931
|
},
|
|
16926
16932
|
emits: ["command", "handData", "saveData"],
|
|
16927
16933
|
setup(e, { expose: r, emit: t }) {
|
|
16928
|
-
const a = useSlots(), n = ref([]), i = ref(!0), s = ref(!0), l = ref(), o = reactive({ IsVisible: !1, DataModel: {}, Title: "" }), f = ref(null), c = ref(0),
|
|
16934
|
+
const a = useSlots(), n = ref([]), i = ref(!0), s = ref(!0), l = ref(), o = reactive({ IsVisible: !1, DataModel: {}, Title: "" }), f = ref(null), c = ref(0), _ = ref(1), d = ref(20), h = window.ProjectHost, m = e, u = t, p = ref([]), C = computed({
|
|
16929
16935
|
get: () => {
|
|
16930
16936
|
var X = [];
|
|
16931
|
-
return
|
|
16937
|
+
return m.commandArray && m.commandArray.length > 0 && m.commandArray.forEach((z) => X.push(z)), p.value.some((z) => z.Name == "编辑") ? X.push("编辑") : p.value.some((z) => z.Name == "查看") && X.push("查看"), p.value.some((z) => z.Name == "删除") && X.push("删除"), X;
|
|
16932
16938
|
}
|
|
16933
16939
|
}), I = (X, z) => {
|
|
16934
16940
|
switch (X) {
|
|
16935
16941
|
case "新增": {
|
|
16936
|
-
i.value = !0, o.Title = `${L(
|
|
16942
|
+
i.value = !0, o.Title = `${L(m.tabName)} - ` + L("添加"), o.DataModel = {}, u("handData", o.DataModel, !0), o.IsVisible = !0;
|
|
16937
16943
|
break;
|
|
16938
16944
|
}
|
|
16939
16945
|
case "查看":
|
|
16940
16946
|
case "编辑": {
|
|
16941
|
-
i.value = X == "编辑", o.Title = `${L(
|
|
16942
|
-
o.DataModel = await AjaxCallWeb(`${h}/${
|
|
16947
|
+
i.value = X == "编辑", o.Title = `${L(m.tabName)} - ${L(X)}`, SafeCall$1(async () => {
|
|
16948
|
+
o.DataModel = await AjaxCallWeb(`${h}/${m.controller}/GetModel`, {
|
|
16943
16949
|
Id: z.Id
|
|
16944
16950
|
}), u("handData", o.DataModel, !0), o.IsVisible = !0;
|
|
16945
16951
|
}, L("数据加载中"));
|
|
@@ -16947,10 +16953,10 @@ const SafeCall$1 = async (e, r) => {
|
|
|
16947
16953
|
}
|
|
16948
16954
|
case "删除": {
|
|
16949
16955
|
confirm(L("数据删除后将不能恢复,请确认是否删除")) && SafeCall$1(async () => {
|
|
16950
|
-
await AjaxCallWeb(`${h}/${
|
|
16951
|
-
for (let
|
|
16952
|
-
if (n.value[
|
|
16953
|
-
n.value.splice(
|
|
16956
|
+
await AjaxCallWeb(`${h}/${m.controller}/Delete`, { Id: z.Id }), ElMessage({ message: L("数据删除成功!"), type: "success" });
|
|
16957
|
+
for (let y = 0; y < n.value.length; y++)
|
|
16958
|
+
if (n.value[y].Id == z.Id) {
|
|
16959
|
+
n.value.splice(y, 1);
|
|
16954
16960
|
break;
|
|
16955
16961
|
}
|
|
16956
16962
|
f.value.onUpdateData(!0);
|
|
@@ -16960,20 +16966,20 @@ const SafeCall$1 = async (e, r) => {
|
|
|
16960
16966
|
case "批量删除": {
|
|
16961
16967
|
if (confirm(L(`数据删除后无法恢复!!\r
|
|
16962
16968
|
确认删除吗?`))) {
|
|
16963
|
-
let
|
|
16964
|
-
if (
|
|
16969
|
+
let y = n.value.filter((B) => B.checked);
|
|
16970
|
+
if (y.length == 0)
|
|
16965
16971
|
return ElMessage({ message: L("未选择需要删除的数据"), type: "error" });
|
|
16966
16972
|
SafeCall$1(async () => {
|
|
16967
|
-
for (let B = 0; B <
|
|
16968
|
-
let A =
|
|
16969
|
-
await AjaxCallWeb(`${h}/${
|
|
16973
|
+
for (let B = 0; B < y.length; B++) {
|
|
16974
|
+
let A = y[B].Id;
|
|
16975
|
+
await AjaxCallWeb(`${h}/${m.controller}/Delete`, {
|
|
16970
16976
|
Id: A
|
|
16971
|
-
}), ElMessage({ message: L("删除成功") + `(${B + 1}/${
|
|
16977
|
+
}), ElMessage({ message: L("删除成功") + `(${B + 1}/${y.length})` });
|
|
16972
16978
|
}
|
|
16973
16979
|
ElMessage({
|
|
16974
|
-
message: L("批量删除") + `:${
|
|
16980
|
+
message: L("批量删除") + `:${y.length}` + L("条数据成功"),
|
|
16975
16981
|
type: "success"
|
|
16976
|
-
}), n.value = n.value.filter((B) => !
|
|
16982
|
+
}), n.value = n.value.filter((B) => !y.some((A) => A.Id == B.Id)), f.value.onUpdateData(!0);
|
|
16977
16983
|
}, L("数据删除中"));
|
|
16978
16984
|
}
|
|
16979
16985
|
break;
|
|
@@ -16985,37 +16991,37 @@ const SafeCall$1 = async (e, r) => {
|
|
|
16985
16991
|
}
|
|
16986
16992
|
}, k = () => {
|
|
16987
16993
|
u("saveData", o.DataModel, !0), SafeCall$1(async () => {
|
|
16988
|
-
let X = await AjaxCallWeb(`${h}/${
|
|
16994
|
+
let X = await AjaxCallWeb(`${h}/${m.controller}/SaveModel`, o.DataModel);
|
|
16989
16995
|
ElMessage({ message: L("数据保存成功!"), type: "success" }), o.IsVisible = !1, b();
|
|
16990
16996
|
}, L("数据保存中"));
|
|
16991
16997
|
}, b = (X) => SafeCall$1(async () => {
|
|
16992
|
-
X && X > 0 && (
|
|
16998
|
+
X && X > 0 && (_.value = X);
|
|
16993
16999
|
var z = {
|
|
16994
|
-
PageIndex:
|
|
16995
|
-
PageSize:
|
|
17000
|
+
PageIndex: _.value,
|
|
17001
|
+
PageSize: d.value
|
|
16996
17002
|
};
|
|
16997
|
-
if (
|
|
16998
|
-
for (var
|
|
16999
|
-
z[
|
|
17000
|
-
let B = await AjaxCallWeb(`${h}/${
|
|
17003
|
+
if (m.searchParam)
|
|
17004
|
+
for (var y in m.searchParam)
|
|
17005
|
+
z[y] = m.searchParam[y];
|
|
17006
|
+
let B = await AjaxCallWeb(`${h}/${m.controller}/GetPage`, z);
|
|
17001
17007
|
B.forEach((A) => u("handData", A, !1)), n.value = B, c.value = window.LastResult.totalRows;
|
|
17002
17008
|
}, L("数据查询中"));
|
|
17003
17009
|
return onMounted(async () => {
|
|
17004
|
-
if (s.value = a.FilterItem,
|
|
17005
|
-
p.value =
|
|
17010
|
+
if (s.value = a.FilterItem, m.powerArray && m.powerArray.length > 0)
|
|
17011
|
+
p.value = m.powerArray, m.loadData && nextTick(() => b());
|
|
17006
17012
|
else {
|
|
17007
|
-
let X =
|
|
17013
|
+
let X = m.powerId && m.powerId > 0 ? m.powerId : GetUrlParam("PowerId", "");
|
|
17008
17014
|
X ? await SafeCall$1(async () => {
|
|
17009
17015
|
p.value = await SystemModuleApi("/ModulePowerInfo/Search", {
|
|
17010
17016
|
SearchType: 3,
|
|
17011
17017
|
ParentId: X
|
|
17012
|
-
}),
|
|
17018
|
+
}), m.loadData && nextTick(() => b());
|
|
17013
17019
|
}, L("页面加载中")) : (p.value = [
|
|
17014
17020
|
{ Id: "1", Name: "新增" },
|
|
17015
17021
|
{ Id: "1", Name: "编辑" },
|
|
17016
17022
|
{ Id: "1", Name: "删除" },
|
|
17017
17023
|
{ Id: "1", Name: "查看" }
|
|
17018
|
-
],
|
|
17024
|
+
], m.loadData && nextTick(() => b()));
|
|
17019
17025
|
}
|
|
17020
17026
|
}), r({
|
|
17021
17027
|
onSearch: b
|
|
@@ -17023,10 +17029,10 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17023
17029
|
s.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
17024
17030
|
key: 0,
|
|
17025
17031
|
class: "filter",
|
|
17026
|
-
onSearch: z[0] || (z[0] = (
|
|
17032
|
+
onSearch: z[0] || (z[0] = (y) => b(1)),
|
|
17027
17033
|
ref_key: "filter",
|
|
17028
17034
|
ref: l,
|
|
17029
|
-
labelWidth:
|
|
17035
|
+
labelWidth: m.labelWidth
|
|
17030
17036
|
}, {
|
|
17031
17037
|
FilterItem: withCtx(() => [
|
|
17032
17038
|
renderSlot(X.$slots, "FilterItem", {}, void 0, !0)
|
|
@@ -17035,28 +17041,28 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17035
17041
|
}, 8, ["labelWidth"])) : createCommentVNode("", !0),
|
|
17036
17042
|
createVNode(Tool, {
|
|
17037
17043
|
total: c.value,
|
|
17038
|
-
pageIndex:
|
|
17039
|
-
"onUpdate:pageIndex": z[5] || (z[5] = (
|
|
17040
|
-
pageSize:
|
|
17041
|
-
"onUpdate:pageSize": z[6] || (z[6] = (
|
|
17044
|
+
pageIndex: _.value,
|
|
17045
|
+
"onUpdate:pageIndex": z[5] || (z[5] = (y) => _.value = y),
|
|
17046
|
+
pageSize: d.value,
|
|
17047
|
+
"onUpdate:pageSize": z[6] || (z[6] = (y) => d.value = y),
|
|
17042
17048
|
onUpdateData: b,
|
|
17043
17049
|
class: "tool"
|
|
17044
17050
|
}, {
|
|
17045
17051
|
ToolItem: withCtx(() => [
|
|
17046
|
-
p.value.some((
|
|
17052
|
+
p.value.some((y) => y.Name == "新增") ? (openBlock(), createBlock(unref(ElButton), {
|
|
17047
17053
|
key: 0,
|
|
17048
17054
|
type: "primary",
|
|
17049
|
-
onClick: z[1] || (z[1] = (
|
|
17055
|
+
onClick: z[1] || (z[1] = (y) => I("新增"))
|
|
17050
17056
|
}, {
|
|
17051
17057
|
default: withCtx(() => [
|
|
17052
17058
|
createTextVNode(toDisplayString(unref(L)("新增")), 1)
|
|
17053
17059
|
]),
|
|
17054
17060
|
_: 1
|
|
17055
17061
|
})) : createCommentVNode("", !0),
|
|
17056
|
-
p.value.some((
|
|
17062
|
+
p.value.some((y) => y.Name == "删除") ? (openBlock(), createBlock(unref(ElButton), {
|
|
17057
17063
|
key: 1,
|
|
17058
17064
|
type: "danger",
|
|
17059
|
-
onClick: z[2] || (z[2] = (
|
|
17065
|
+
onClick: z[2] || (z[2] = (y) => I("批量删除"))
|
|
17060
17066
|
}, {
|
|
17061
17067
|
default: withCtx(() => [
|
|
17062
17068
|
createTextVNode(toDisplayString(unref(L)("批量删除")), 1)
|
|
@@ -17065,7 +17071,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17065
17071
|
})) : createCommentVNode("", !0),
|
|
17066
17072
|
createVNode(unref(ElButton), {
|
|
17067
17073
|
type: "primary",
|
|
17068
|
-
onClick: z[3] || (z[3] = (
|
|
17074
|
+
onClick: z[3] || (z[3] = (y) => f.value.exportData())
|
|
17069
17075
|
}, {
|
|
17070
17076
|
default: withCtx(() => [
|
|
17071
17077
|
createTextVNode(toDisplayString(unref(L)("导出")), 1)
|
|
@@ -17074,7 +17080,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17074
17080
|
}),
|
|
17075
17081
|
createVNode(unref(ElButton), {
|
|
17076
17082
|
type: "success",
|
|
17077
|
-
onClick: z[4] || (z[4] = (
|
|
17083
|
+
onClick: z[4] || (z[4] = (y) => f.value.printData())
|
|
17078
17084
|
}, {
|
|
17079
17085
|
default: withCtx(() => [
|
|
17080
17086
|
createTextVNode(toDisplayString(unref(L)("打印")), 1)
|
|
@@ -17090,32 +17096,32 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17090
17096
|
ref: f,
|
|
17091
17097
|
class: "dataList",
|
|
17092
17098
|
data: n.value,
|
|
17093
|
-
tabName:
|
|
17094
|
-
columnArray:
|
|
17095
|
-
toolWidth:
|
|
17096
|
-
maxCommand:
|
|
17099
|
+
tabName: m.tabName,
|
|
17100
|
+
columnArray: m.columnArray,
|
|
17101
|
+
toolWidth: m.toolWidth,
|
|
17102
|
+
maxCommand: m.maxCommand,
|
|
17097
17103
|
onCommand: I,
|
|
17098
17104
|
commandArray: C.value,
|
|
17099
17105
|
key: C.value,
|
|
17100
17106
|
powerArray: p.value,
|
|
17101
|
-
printOption:
|
|
17107
|
+
printOption: m.printOption
|
|
17102
17108
|
}, null, 8, ["data", "tabName", "columnArray", "toolWidth", "maxCommand", "commandArray", "powerArray", "printOption"])),
|
|
17103
17109
|
createVNode(unref(ElDialog), {
|
|
17104
17110
|
modelValue: o.IsVisible,
|
|
17105
|
-
"onUpdate:modelValue": z[7] || (z[7] = (
|
|
17111
|
+
"onUpdate:modelValue": z[7] || (z[7] = (y) => o.IsVisible = y),
|
|
17106
17112
|
title: o.Title,
|
|
17107
|
-
width:
|
|
17113
|
+
width: m.editDlgWidth,
|
|
17108
17114
|
top: "1vh",
|
|
17109
17115
|
"close-on-click-modal": !1,
|
|
17110
17116
|
"close-on-press-escape": !1,
|
|
17111
|
-
style: normalizeStyle("height:" +
|
|
17117
|
+
style: normalizeStyle("height:" + m.editDlgHeight),
|
|
17112
17118
|
draggable: "",
|
|
17113
17119
|
"destroy-on-close": ""
|
|
17114
17120
|
}, {
|
|
17115
17121
|
default: withCtx(() => [
|
|
17116
17122
|
createVNode(unref(ElForm), {
|
|
17117
|
-
inline:
|
|
17118
|
-
"label-width":
|
|
17123
|
+
inline: m.inline,
|
|
17124
|
+
"label-width": m.labelWidth,
|
|
17119
17125
|
class: "myform"
|
|
17120
17126
|
}, {
|
|
17121
17127
|
default: withCtx(() => [
|
|
@@ -17143,7 +17149,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17143
17149
|
}, 8, ["modelValue", "title", "width", "style"])
|
|
17144
17150
|
]));
|
|
17145
17151
|
}
|
|
17146
|
-
}, PageIndex = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
17152
|
+
}, PageIndex = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-413922d0"]]), _hoisted_1$b = { class: "pagemain" }, _sfc_main$h = {
|
|
17147
17153
|
__name: "index",
|
|
17148
17154
|
props: {
|
|
17149
17155
|
columnArray: { type: Array, default: () => [] },
|
|
@@ -17194,7 +17200,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17194
17200
|
};
|
|
17195
17201
|
return l.printOption.TitleArray && l.printOption.TitleArray.length > 0 && l.printOption.TitleArray.forEach((C) => p.TitleArray.push(C)), l.printOption.FootArray && l.printOption.FootArray.length > 0 && l.printOption.FootArray.forEach((C) => p.FootArray.push(C)), p;
|
|
17196
17202
|
}
|
|
17197
|
-
}), c = t,
|
|
17203
|
+
}), c = t, _ = ref([]), d = computed({
|
|
17198
17204
|
get: () => {
|
|
17199
17205
|
var p = [];
|
|
17200
17206
|
return l.commandArray && l.commandArray.length > 0 && l.commandArray.forEach((C) => p.push(C)), p;
|
|
@@ -17206,28 +17212,28 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17206
17212
|
break;
|
|
17207
17213
|
}
|
|
17208
17214
|
}
|
|
17209
|
-
},
|
|
17215
|
+
}, m = (p, C, I, k) => {
|
|
17210
17216
|
if (C == p.length) {
|
|
17211
17217
|
if (I.forEach((b) => k.push(b)), I.length > 1) {
|
|
17212
17218
|
let b = { IgnoreSummary: !0, Rows: I }, X = !0, z = I[0];
|
|
17213
|
-
for (let
|
|
17214
|
-
b[
|
|
17215
|
-
for (let
|
|
17216
|
-
if (X && l.columnArray[
|
|
17217
|
-
b[l.columnArray[
|
|
17219
|
+
for (let y in z)
|
|
17220
|
+
b[y] = z[y];
|
|
17221
|
+
for (let y = 0; y < l.columnArray.length; y++)
|
|
17222
|
+
if (X && l.columnArray[y].isHeBing)
|
|
17223
|
+
b[l.columnArray[y].dataKey] = I[0][l.columnArray[y].dataKey];
|
|
17218
17224
|
else {
|
|
17219
17225
|
if (X) {
|
|
17220
|
-
X = !1, b[l.columnArray[
|
|
17226
|
+
X = !1, b[l.columnArray[y].dataKey] = "合计";
|
|
17221
17227
|
continue;
|
|
17222
17228
|
}
|
|
17223
|
-
l.columnArray[
|
|
17229
|
+
l.columnArray[y].isSummary ? b[l.columnArray[y].dataKey] = I.Sum((B) => B[l.columnArray[y].dataKey] * 1).toFixed(2) : b[l.columnArray[y].dataKey] = "-";
|
|
17224
17230
|
}
|
|
17225
17231
|
k.push(b);
|
|
17226
17232
|
}
|
|
17227
17233
|
} else {
|
|
17228
17234
|
let b = I.GroupBy((X) => X[p[C].dataKey]);
|
|
17229
17235
|
for (let X = 0; X < b.length; X++)
|
|
17230
|
-
|
|
17236
|
+
m(p, C + 1, b[X], k);
|
|
17231
17237
|
}
|
|
17232
17238
|
}, u = () => {
|
|
17233
17239
|
o(async () => {
|
|
@@ -17241,14 +17247,14 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17241
17247
|
for (let X = 0; X < l.columnArray.length; X++)
|
|
17242
17248
|
l.columnArray[X].isHeBing && k.push(l.columnArray[X]);
|
|
17243
17249
|
let b = [];
|
|
17244
|
-
|
|
17250
|
+
m(k, 0, I, b), I = b;
|
|
17245
17251
|
}
|
|
17246
17252
|
n.value = I;
|
|
17247
17253
|
}, L("数据查询中"));
|
|
17248
17254
|
};
|
|
17249
17255
|
return onMounted(async () => {
|
|
17250
17256
|
i.value = a.FilterItem, l.powerId > 0 && await o(async () => {
|
|
17251
|
-
|
|
17257
|
+
_.value = await SystemModuleApi("/ModulePowerInfo/Search", {
|
|
17252
17258
|
SearchType: 3,
|
|
17253
17259
|
ParentId: l.powerId
|
|
17254
17260
|
});
|
|
@@ -17262,7 +17268,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17262
17268
|
onSearch: u
|
|
17263
17269
|
}, {
|
|
17264
17270
|
FilterItem: withCtx(() => [
|
|
17265
|
-
renderSlot(p.$slots, "FilterItem", { powerArray:
|
|
17271
|
+
renderSlot(p.$slots, "FilterItem", { powerArray: _.value }, void 0, !0)
|
|
17266
17272
|
]),
|
|
17267
17273
|
_: 3
|
|
17268
17274
|
})) : createCommentVNode("", !0),
|
|
@@ -17289,10 +17295,10 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17289
17295
|
]),
|
|
17290
17296
|
_: 1
|
|
17291
17297
|
}),
|
|
17292
|
-
renderSlot(p.$slots, "ToolItem", { powerArray:
|
|
17298
|
+
renderSlot(p.$slots, "ToolItem", { powerArray: _.value }, void 0, !0)
|
|
17293
17299
|
]),
|
|
17294
17300
|
PageItem: withCtx(() => [
|
|
17295
|
-
renderSlot(p.$slots, "PageItem", { powerArray:
|
|
17301
|
+
renderSlot(p.$slots, "PageItem", { powerArray: _.value }, void 0, !0)
|
|
17296
17302
|
]),
|
|
17297
17303
|
_: 3
|
|
17298
17304
|
}),
|
|
@@ -17305,8 +17311,8 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17305
17311
|
toolWidth: l.toolWidth,
|
|
17306
17312
|
columnArray: l.columnArray,
|
|
17307
17313
|
onCommand: h,
|
|
17308
|
-
commandArray:
|
|
17309
|
-
key:
|
|
17314
|
+
commandArray: d.value,
|
|
17315
|
+
key: d.value,
|
|
17310
17316
|
printOption: f.value
|
|
17311
17317
|
}, null, 8, ["data", "tabName", "toolWidth", "columnArray", "commandArray", "printOption"]))
|
|
17312
17318
|
]));
|
|
@@ -17335,16 +17341,16 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17335
17341
|
const i = computed({
|
|
17336
17342
|
get: () => {
|
|
17337
17343
|
if (t.MaxTime) {
|
|
17338
|
-
let c = t.MaxTime.ToDateTime(),
|
|
17339
|
-
return
|
|
17344
|
+
let c = t.MaxTime.ToDateTime(), _ = c.ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
|
17345
|
+
return _ < c ? _.ToString("yyyy-MM-dd 00:00:00").ToDateTime().AddDays(1) : c;
|
|
17340
17346
|
} else
|
|
17341
17347
|
return null;
|
|
17342
17348
|
}
|
|
17343
17349
|
}), s = computed({
|
|
17344
17350
|
get: () => t.MinTime ? t.MinTime.ToDateTime().ToString("yyyy-MM-dd 00:00:00").ToDateTime() : null
|
|
17345
17351
|
}), l = (c) => {
|
|
17346
|
-
let
|
|
17347
|
-
return i.value && s.value && (
|
|
17352
|
+
let _ = !0;
|
|
17353
|
+
return i.value && s.value && (_ = c >= s.value && c <= i.value), !_;
|
|
17348
17354
|
}, o = () => {
|
|
17349
17355
|
n.value != null ? (a("update:BeginTime", n.value[0]), a("update:EndTime", n.value[1])) : (a("update:BeginTime", ""), a("update:EndTime", ""), n.value = ["", ""]), a("change");
|
|
17350
17356
|
}, f = [
|
|
@@ -17399,11 +17405,11 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17399
17405
|
}
|
|
17400
17406
|
];
|
|
17401
17407
|
return onMounted(() => {
|
|
17402
|
-
let c = /* @__PURE__ */ new Date(),
|
|
17403
|
-
t.BeginTime ? n.value[0] = t.BeginTime : (n.value[0] = c.ToString("yyyy-MM-dd 00:00:00"),
|
|
17404
|
-
}), (c,
|
|
17408
|
+
let c = /* @__PURE__ */ new Date(), _ = !1;
|
|
17409
|
+
t.BeginTime ? n.value[0] = t.BeginTime : (n.value[0] = c.ToString("yyyy-MM-dd 00:00:00"), _ = !0), t.EndTime ? n.value[1] = t.EndTime : (n.value[1] = c.ToString("yyyy-MM-dd 23:59:59"), _ = !0), _ && o();
|
|
17410
|
+
}), (c, _) => (openBlock(), createBlock(unref(ElDatePicker), {
|
|
17405
17411
|
modelValue: n.value,
|
|
17406
|
-
"onUpdate:modelValue":
|
|
17412
|
+
"onUpdate:modelValue": _[0] || (_[0] = (d) => n.value = d),
|
|
17407
17413
|
onChange: o,
|
|
17408
17414
|
type: t.type,
|
|
17409
17415
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
@@ -17431,14 +17437,14 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17431
17437
|
"content-type": "application/json"
|
|
17432
17438
|
}
|
|
17433
17439
|
};
|
|
17434
|
-
l.forEach((
|
|
17435
|
-
if ((
|
|
17440
|
+
l.forEach((_) => {
|
|
17441
|
+
if ((_.type == "image/jpeg" || _.type == "image/png" || _.type == "image/bmp") && _.size / 1024 > 600)
|
|
17436
17442
|
return alert(L("图片大小不能超过 600kb!")), !1;
|
|
17437
17443
|
const h = new FileReader();
|
|
17438
|
-
h.readAsDataURL(
|
|
17444
|
+
h.readAsDataURL(_), h.onload = function() {
|
|
17439
17445
|
let u = {
|
|
17440
17446
|
FileData: this.result.substring(this.result.indexOf(",") + 1),
|
|
17441
|
-
FileType:
|
|
17447
|
+
FileType: _.name
|
|
17442
17448
|
};
|
|
17443
17449
|
axios.post(f, u, c).then((p) => {
|
|
17444
17450
|
let C = p.data;
|
|
@@ -17474,30 +17480,30 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17474
17480
|
get: () => t.headPic ? "http://npic.1000da.com.cn/ApiHandler.ashx?Action=UploadHeadPic" : "http://npic.1000da.com.cn/ApiHandler.ashx?Action=UploadFile"
|
|
17475
17481
|
});
|
|
17476
17482
|
onMounted(() => {
|
|
17477
|
-
typeof t.modelValue == "object" && t.modelValue.forEach((h,
|
|
17483
|
+
typeof t.modelValue == "object" && t.modelValue.forEach((h, m) => {
|
|
17478
17484
|
i.value.push({
|
|
17479
|
-
name: `图${
|
|
17485
|
+
name: `图${m}`,
|
|
17480
17486
|
url: h
|
|
17481
17487
|
});
|
|
17482
17488
|
});
|
|
17483
17489
|
});
|
|
17484
17490
|
const l = async () => {
|
|
17485
17491
|
try {
|
|
17486
|
-
let h = await AjaxCallWeb("http://localhost:18008/AForge/TakePictures"),
|
|
17487
|
-
t.headPic && (
|
|
17488
|
-
let u = await AjaxCallWeb(
|
|
17492
|
+
let h = await AjaxCallWeb("http://localhost:18008/AForge/TakePictures"), m = "http://npic.1000da.com.cn/ApiHandler.ashx?Action=UploadFileBase64";
|
|
17493
|
+
t.headPic && (m = "http://npic.1000da.com.cn/ApiHandler.ashx?Action=UploadHeadPicBase64");
|
|
17494
|
+
let u = await AjaxCallWeb(m, {
|
|
17489
17495
|
FileData: h.PicData,
|
|
17490
17496
|
FileName: "头像.jpg",
|
|
17491
17497
|
FileType: "jpg"
|
|
17492
17498
|
});
|
|
17493
17499
|
a("update:modelValue", u), a("change");
|
|
17494
17500
|
} catch (h) {
|
|
17495
|
-
let
|
|
17496
|
-
if (
|
|
17501
|
+
let m = h.resultcontent || h.message;
|
|
17502
|
+
if (m == "取消")
|
|
17497
17503
|
return;
|
|
17498
|
-
ElMessage.error(
|
|
17504
|
+
ElMessage.error(m);
|
|
17499
17505
|
}
|
|
17500
|
-
}, o = (h,
|
|
17506
|
+
}, o = (h, m) => {
|
|
17501
17507
|
let u = h.response.data;
|
|
17502
17508
|
a(
|
|
17503
17509
|
"update:modelValue",
|
|
@@ -17505,7 +17511,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17505
17511
|
), a("change");
|
|
17506
17512
|
}, f = () => {
|
|
17507
17513
|
a("update:modelValue", ""), a("change");
|
|
17508
|
-
}, c = (h) => h.indexOf(".jpg") >= 0 || h.indexOf(".png") >= 0 || h.indexOf(".bmp") >= 0 || t.isImage,
|
|
17514
|
+
}, c = (h) => h.indexOf(".jpg") >= 0 || h.indexOf(".png") >= 0 || h.indexOf(".bmp") >= 0 || t.isImage, _ = (h, m, u) => {
|
|
17509
17515
|
if (h.resultcode != "200")
|
|
17510
17516
|
return ElMessage.error(L("文件上传失败") + ":" + h.resultcontent);
|
|
17511
17517
|
if (t.multiple) {
|
|
@@ -17514,17 +17520,17 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17514
17520
|
} else
|
|
17515
17521
|
a("update:modelValue", h.data);
|
|
17516
17522
|
a("change");
|
|
17517
|
-
},
|
|
17518
|
-
return (h,
|
|
17523
|
+
}, d = (h) => !0;
|
|
17524
|
+
return (h, m) => (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
17519
17525
|
t.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
17520
17526
|
createVNode(unref(ElUpload), {
|
|
17521
17527
|
"file-list": i.value,
|
|
17522
|
-
"onUpdate:fileList":
|
|
17528
|
+
"onUpdate:fileList": m[0] || (m[0] = (u) => i.value = u),
|
|
17523
17529
|
action: s.value,
|
|
17524
17530
|
class: "avatar-uploader",
|
|
17525
17531
|
"list-type": "picture-card",
|
|
17526
|
-
"on-success":
|
|
17527
|
-
"before-upload":
|
|
17532
|
+
"on-success": _,
|
|
17533
|
+
"before-upload": d,
|
|
17528
17534
|
"on-remove": o
|
|
17529
17535
|
}, {
|
|
17530
17536
|
default: withCtx(() => [
|
|
@@ -17539,7 +17545,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17539
17545
|
}, 8, ["file-list", "action"]),
|
|
17540
17546
|
createVNode(unref(ElDialog), {
|
|
17541
17547
|
modelValue: n.IsVisible,
|
|
17542
|
-
"onUpdate:modelValue":
|
|
17548
|
+
"onUpdate:modelValue": m[1] || (m[1] = (u) => n.IsVisible = u),
|
|
17543
17549
|
top: "1vh"
|
|
17544
17550
|
}, {
|
|
17545
17551
|
default: withCtx(() => [
|
|
@@ -17557,8 +17563,8 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17557
17563
|
class: "avatar-uploader",
|
|
17558
17564
|
action: s.value,
|
|
17559
17565
|
"show-file-list": !1,
|
|
17560
|
-
"on-success":
|
|
17561
|
-
"before-upload":
|
|
17566
|
+
"on-success": _,
|
|
17567
|
+
"before-upload": d,
|
|
17562
17568
|
"on-remove": o
|
|
17563
17569
|
}, {
|
|
17564
17570
|
default: withCtx(() => [
|
|
@@ -17711,17 +17717,17 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17711
17717
|
f += `&${c}=${i.params[c]}`;
|
|
17712
17718
|
return f;
|
|
17713
17719
|
} else {
|
|
17714
|
-
let f = i.params || {}, c = t.resolve({ name: i.name, query: { Token: a.query.Token } }),
|
|
17715
|
-
for (let
|
|
17716
|
-
|
|
17717
|
-
return window.location.origin + window.location.pathname + c.href +
|
|
17720
|
+
let f = i.params || {}, c = t.resolve({ name: i.name, query: { Token: a.query.Token } }), _ = "";
|
|
17721
|
+
for (let d in f)
|
|
17722
|
+
_ += `&${d}=${encodeURIComponent(f[d])}`;
|
|
17723
|
+
return window.location.origin + window.location.pathname + c.href + _ + "&cachetime=";
|
|
17718
17724
|
}
|
|
17719
17725
|
};
|
|
17720
17726
|
return (f, c) => (openBlock(), createBlock(unref(ElDialog), {
|
|
17721
17727
|
title: unref(L)(i.name),
|
|
17722
17728
|
key: s.value,
|
|
17723
17729
|
modelValue: l.value,
|
|
17724
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
17730
|
+
"onUpdate:modelValue": c[0] || (c[0] = (_) => l.value = _),
|
|
17725
17731
|
top: "1vh",
|
|
17726
17732
|
style: normalizeStyle("width:" + i.width)
|
|
17727
17733
|
}, {
|
|
@@ -17794,7 +17800,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17794
17800
|
get: () => t.modelValue,
|
|
17795
17801
|
set: (u) => o("update:modelValue", u)
|
|
17796
17802
|
}), c = async () => {
|
|
17797
|
-
await n(), await Sleep(300), a.CardType == "0" ?
|
|
17803
|
+
await n(), await Sleep(300), a.CardType == "0" ? m() : a.CardType == "9" && h(), o("update:cardType", a.CardType);
|
|
17798
17804
|
};
|
|
17799
17805
|
watch(
|
|
17800
17806
|
() => t.modelValue,
|
|
@@ -17804,12 +17810,12 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17804
17810
|
}, 1e3), c()) : (l.value != null && (clearInterval(l.value), l.value = null), await n());
|
|
17805
17811
|
}
|
|
17806
17812
|
);
|
|
17807
|
-
const
|
|
17813
|
+
const _ = () => {
|
|
17808
17814
|
let u = {};
|
|
17809
17815
|
for (let p in a)
|
|
17810
17816
|
u[p] = a[p];
|
|
17811
17817
|
o("update:modelValue", !1), setTimeout(() => o("success", u), 300);
|
|
17812
|
-
},
|
|
17818
|
+
}, d = (u, p) => AjaxCallWeb("http://npic.1000da.com.cn/ApiHandler.ashx?Action=UploadFileBase64", {
|
|
17813
17819
|
FileType: u,
|
|
17814
17820
|
FileData: p
|
|
17815
17821
|
}), h = async () => {
|
|
@@ -17825,11 +17831,11 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17825
17831
|
h();
|
|
17826
17832
|
}) : ElMessageBox.alert(u.message);
|
|
17827
17833
|
}
|
|
17828
|
-
},
|
|
17834
|
+
}, m = async () => {
|
|
17829
17835
|
n = () => LocalApi("/CancelReadIidentityCard");
|
|
17830
17836
|
try {
|
|
17831
17837
|
let p = await LocalApi("/ReadIdentityCard", { MaxSecord: s.value * 1e3 });
|
|
17832
|
-
p.HeadPortrait = await
|
|
17838
|
+
p.HeadPortrait = await d("bmp", p.HeadPortrait);
|
|
17833
17839
|
for (var u in p)
|
|
17834
17840
|
a[u] = p[u];
|
|
17835
17841
|
a.EndDate = a.EndDate.replace("T", " ").ToDateTime().ToString("yyyy-MM-dd"), a.Sex = a.Sex == "男" ? "1" : "0";
|
|
@@ -17950,7 +17956,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
17950
17956
|
type: "primary",
|
|
17951
17957
|
style: { display: "inline-block" },
|
|
17952
17958
|
size: "large",
|
|
17953
|
-
onClick:
|
|
17959
|
+
onClick: _
|
|
17954
17960
|
}, {
|
|
17955
17961
|
default: withCtx(() => [
|
|
17956
17962
|
createTextVNode("确定")
|
|
@@ -18099,13 +18105,17 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18099
18105
|
})
|
|
18100
18106
|
]));
|
|
18101
18107
|
}
|
|
18102
|
-
}, _withScopeId$1 = (e) => (pushScopeId("data-v-
|
|
18108
|
+
}, _withScopeId$1 = (e) => (pushScopeId("data-v-6074d7b4"), e = e(), popScopeId(), e), _hoisted_1$4 = { style: { "margin-bottom": "10px" } }, _hoisted_2$2 = {
|
|
18103
18109
|
rowspan: "3",
|
|
18104
18110
|
style: { "padding-right": "10px" }
|
|
18105
|
-
}, _hoisted_3$2 = ["src"], _hoisted_4$2 = ["src"], _hoisted_5$2 = { key: 1 }, _hoisted_6$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "用户:", -1)), _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "手机号:", -1)), _hoisted_8$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "会员余额:", -1)), _hoisted_9$2 = { class: "amount" }, _hoisted_10$1 = ["src"], _hoisted_11$1 = ["src"], _hoisted_12$1 = { key: 1 }, _hoisted_13$1 = { class: "amount" }, _hoisted_14$1 = { key: 0 }, _hoisted_15$1 = { key: 1 }, _hoisted_16$1 = { key: 2 }, _hoisted_17$1 = { key:
|
|
18111
|
+
}, _hoisted_3$2 = ["src"], _hoisted_4$2 = ["src"], _hoisted_5$2 = { key: 1 }, _hoisted_6$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "用户:", -1)), _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "手机号:", -1)), _hoisted_8$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("td", { class: "t" }, "会员余额:", -1)), _hoisted_9$2 = { class: "amount" }, _hoisted_10$1 = ["src"], _hoisted_11$1 = ["src"], _hoisted_12$1 = { key: 1 }, _hoisted_13$1 = { class: "amount" }, _hoisted_14$1 = { key: 0 }, _hoisted_15$1 = { key: 1 }, _hoisted_16$1 = { key: 2 }, _hoisted_17$1 = { key: 0 }, _hoisted_18$1 = { key: 0 }, _hoisted_19$1 = { style: { "text-align": "center" } }, _sfc_main$7 = {
|
|
18106
18112
|
__name: "MemberBox",
|
|
18107
18113
|
props: {
|
|
18108
18114
|
payAmount: { type: [String, Number], default: "0" },
|
|
18115
|
+
orderInfo: {
|
|
18116
|
+
type: Object,
|
|
18117
|
+
default: () => ({})
|
|
18118
|
+
},
|
|
18109
18119
|
ckUserInfoPassword: { type: String, default: "不检测" },
|
|
18110
18120
|
ckCardPassword: { type: String, default: "不检测" }
|
|
18111
18121
|
},
|
|
@@ -18123,8 +18133,8 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18123
18133
|
return ElMessage({ message: "请输入正确的11位手机号" });
|
|
18124
18134
|
a.cardArray = [], a.memberInfo = {}, SafeCall$1(async () => {
|
|
18125
18135
|
try {
|
|
18126
|
-
let
|
|
18127
|
-
a.cardArray =
|
|
18136
|
+
let h = await MemberApi("/OrganApi/MemberRelCardSearch", { SearchType: 3, Telephone: d });
|
|
18137
|
+
a.cardArray = h.Where((m) => m.Status == s.正常 && m.CardTypeClass != CardTypeClassEnum.周期卡);
|
|
18128
18138
|
} catch {
|
|
18129
18139
|
}
|
|
18130
18140
|
try {
|
|
@@ -18132,7 +18142,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18132
18142
|
} catch {
|
|
18133
18143
|
}
|
|
18134
18144
|
}, "会员信息查询中");
|
|
18135
|
-
}, f = (d) => {
|
|
18145
|
+
}, f = (d, h) => {
|
|
18136
18146
|
d.HasPassWord == 1 ? ElMessageBox.prompt("请输入卡密码", "卡密码", {
|
|
18137
18147
|
cancelButtonText: "取消",
|
|
18138
18148
|
confirmButtonText: "确定",
|
|
@@ -18140,17 +18150,43 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18140
18150
|
closeOnPressEscape: !1,
|
|
18141
18151
|
closeOnHashChange: !1,
|
|
18142
18152
|
inputType: "password"
|
|
18143
|
-
}).then(({ value:
|
|
18153
|
+
}).then(({ value: m }) => {
|
|
18144
18154
|
SafeCall$1(async () => {
|
|
18145
|
-
let
|
|
18146
|
-
i("success",
|
|
18155
|
+
let u = await MemberApi("/OrganApi/GetMemberCardIdentityCode", { CardId: d.Id, PassWord: m, ValidityMinute: 5 });
|
|
18156
|
+
i("success", u.RCardCode);
|
|
18147
18157
|
}, "卡密码验证中");
|
|
18148
|
-
}) : i("success", "MEM" + d.CardNo);
|
|
18149
|
-
}, c = () => {
|
|
18150
|
-
|
|
18158
|
+
}) : i("success", "MEM" + d.CardNo, h);
|
|
18159
|
+
}, c = (d) => {
|
|
18160
|
+
if (d.CardTypeClass == CardTypeClassEnum.计次卡)
|
|
18161
|
+
ElMessageBox.prompt("注意:当前使用的是【计次卡】,请根据消费的产品输入需要扣取的次数。默认每张票扣1次!", "计次卡扣费", {
|
|
18162
|
+
cancelButtonText: "取消",
|
|
18163
|
+
confirmButtonText: "确定",
|
|
18164
|
+
closeOnClickModal: !1,
|
|
18165
|
+
closeOnPressEscape: !1,
|
|
18166
|
+
closeOnHashChange: !1,
|
|
18167
|
+
inputPlaceholder: "请输入需要扣取的次数",
|
|
18168
|
+
inputValue: n.orderInfo.TickCount
|
|
18169
|
+
}).then(({ value: h }) => {
|
|
18170
|
+
f(d, h);
|
|
18171
|
+
});
|
|
18172
|
+
else if (d.CardTypeClass == CardTypeClassEnum.周期卡) {
|
|
18173
|
+
if (!confirm("注意:当前使用的是【周期卡】,将不会扣除余额,请确认是否继续?", "注意"))
|
|
18174
|
+
return;
|
|
18175
|
+
f(d);
|
|
18176
|
+
} else if (d.CardTypeClass == CardTypeClassEnum.储值卡)
|
|
18177
|
+
return f(d);
|
|
18178
|
+
}, _ = () => {
|
|
18179
|
+
a.memberInfo.HasPassWord == 1 ? ElMessageBox.prompt("请输入会员支付密码", "支付密码", {
|
|
18180
|
+
cancelButtonText: "取消",
|
|
18181
|
+
confirmButtonText: "确定",
|
|
18182
|
+
closeOnClickModal: !1,
|
|
18183
|
+
closeOnPressEscape: !1,
|
|
18184
|
+
closeOnHashChange: !1,
|
|
18185
|
+
inputType: "password"
|
|
18186
|
+
}).then(({ value: d }) => {
|
|
18151
18187
|
SafeCall$1(async () => {
|
|
18152
|
-
let
|
|
18153
|
-
i("success",
|
|
18188
|
+
let h = await MemberApi("/OrganApi/GetUserIdentityCode", { UserId: a.memberInfo.Id, PassWord: d, ValidityMinute: 5 });
|
|
18189
|
+
i("success", h.RUIdentityCode);
|
|
18154
18190
|
}, "支付密码验证中");
|
|
18155
18191
|
}) : SafeCall$1(async () => {
|
|
18156
18192
|
let d = await MemberApi("/OrganApi/GetUserIdentityCode", { UserId: a.memberInfo.Id, PassWord: "", ValidityMinute: 5 });
|
|
@@ -18159,7 +18195,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18159
18195
|
};
|
|
18160
18196
|
return r({
|
|
18161
18197
|
LoadData: o
|
|
18162
|
-
}), (d,
|
|
18198
|
+
}), (d, h) => (openBlock(), createElementBlock("div", null, [
|
|
18163
18199
|
createElementVNode("table", _hoisted_1$4, [
|
|
18164
18200
|
createElementVNode("tr", null, [
|
|
18165
18201
|
createElementVNode("td", _hoisted_2$2, [
|
|
@@ -18199,7 +18235,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18199
18235
|
a.memberInfo.Id ? (openBlock(), createBlock(unref(ElButton), {
|
|
18200
18236
|
key: 0,
|
|
18201
18237
|
type: "primary",
|
|
18202
|
-
onClick:
|
|
18238
|
+
onClick: h[0] || (h[0] = (m) => _()),
|
|
18203
18239
|
style: { "margin-left": "20px" }
|
|
18204
18240
|
}, {
|
|
18205
18241
|
default: withCtx(() => [
|
|
@@ -18222,8 +18258,8 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18222
18258
|
prop: "HeadPic",
|
|
18223
18259
|
label: "头像"
|
|
18224
18260
|
}, {
|
|
18225
|
-
default: withCtx(({ row:
|
|
18226
|
-
|
|
18261
|
+
default: withCtx(({ row: m }) => [
|
|
18262
|
+
m.HeadPic ? (openBlock(), createBlock(unref(ElPopover), {
|
|
18227
18263
|
key: 0,
|
|
18228
18264
|
placement: "top-start",
|
|
18229
18265
|
title: "头像",
|
|
@@ -18232,13 +18268,13 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18232
18268
|
}, {
|
|
18233
18269
|
reference: withCtx(() => [
|
|
18234
18270
|
createElementVNode("img", {
|
|
18235
|
-
src:
|
|
18271
|
+
src: m.HeadPic,
|
|
18236
18272
|
style: { height: "60px" }
|
|
18237
18273
|
}, null, 8, _hoisted_10$1)
|
|
18238
18274
|
]),
|
|
18239
18275
|
default: withCtx(() => [
|
|
18240
18276
|
createElementVNode("img", {
|
|
18241
|
-
src:
|
|
18277
|
+
src: m.HeadPic,
|
|
18242
18278
|
style: { width: "300px" }
|
|
18243
18279
|
}, null, 8, _hoisted_11$1)
|
|
18244
18280
|
]),
|
|
@@ -18257,6 +18293,16 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18257
18293
|
prop: "CardTypeName",
|
|
18258
18294
|
label: "类型"
|
|
18259
18295
|
}),
|
|
18296
|
+
createVNode(unref(ElTableColumn), {
|
|
18297
|
+
"min-width": "100",
|
|
18298
|
+
prop: "CardTypeClass",
|
|
18299
|
+
label: "分类"
|
|
18300
|
+
}, {
|
|
18301
|
+
default: withCtx(({ row: m }) => [
|
|
18302
|
+
createTextVNode(toDisplayString(unref(GetEnumName)(unref(CardTypeClassEnum), m.CardTypeClass)), 1)
|
|
18303
|
+
]),
|
|
18304
|
+
_: 1
|
|
18305
|
+
}),
|
|
18260
18306
|
createVNode(unref(ElTableColumn), {
|
|
18261
18307
|
"min-width": "80",
|
|
18262
18308
|
prop: "UserName",
|
|
@@ -18267,8 +18313,8 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18267
18313
|
prop: "Blance",
|
|
18268
18314
|
label: "余额"
|
|
18269
18315
|
}, {
|
|
18270
|
-
default: withCtx(({ row:
|
|
18271
|
-
createElementVNode("span", _hoisted_13$1, toDisplayString((
|
|
18316
|
+
default: withCtx(({ row: m }) => [
|
|
18317
|
+
createElementVNode("span", _hoisted_13$1, toDisplayString((m.Blance / 100).toFixed(2)), 1)
|
|
18272
18318
|
]),
|
|
18273
18319
|
_: 1
|
|
18274
18320
|
}),
|
|
@@ -18276,24 +18322,40 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18276
18322
|
"min-width": "100",
|
|
18277
18323
|
label: "操作"
|
|
18278
18324
|
}, {
|
|
18279
|
-
default: withCtx(({ row:
|
|
18280
|
-
|
|
18281
|
-
key:
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18325
|
+
default: withCtx(({ row: m }) => [
|
|
18326
|
+
m.Status != s.正常 ? (openBlock(), createElementBlock("span", _hoisted_14$1, toDisplayString(unref(GetEnumName)(s, m.Status)), 1)) : m.BeginDate.ToDateTime() > /* @__PURE__ */ new Date() ? (openBlock(), createElementBlock("span", _hoisted_15$1, "未生效")) : m.EndDate.ToDateTime() < /* @__PURE__ */ new Date() ? (openBlock(), createElementBlock("span", _hoisted_16$1, "已过期")) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
18327
|
+
m.CardTypeClass == unref(CardTypeClassEnum).储值卡 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18328
|
+
m.Balance < n.payAmount ? (openBlock(), createElementBlock("span", _hoisted_17$1, "余额不足")) : (openBlock(), createBlock(unref(ElButton), {
|
|
18329
|
+
key: 1,
|
|
18330
|
+
type: "primary",
|
|
18331
|
+
onClick: (u) => c(m)
|
|
18332
|
+
}, {
|
|
18333
|
+
default: withCtx(() => [
|
|
18334
|
+
createTextVNode("使用")
|
|
18335
|
+
]),
|
|
18336
|
+
_: 2
|
|
18337
|
+
}, 1032, ["onClick"]))
|
|
18338
|
+
], 64)) : createCommentVNode("", !0),
|
|
18339
|
+
createElementVNode("template", null, [
|
|
18340
|
+
m.NumOfTimes <= 0 ? (openBlock(), createElementBlock("span", _hoisted_18$1, "余次不足")) : (openBlock(), createBlock(unref(ElButton), {
|
|
18341
|
+
key: 1,
|
|
18342
|
+
type: "primary",
|
|
18343
|
+
onClick: (u) => c(m)
|
|
18344
|
+
}, {
|
|
18345
|
+
default: withCtx(() => [
|
|
18346
|
+
createTextVNode("使用")
|
|
18347
|
+
]),
|
|
18348
|
+
_: 2
|
|
18349
|
+
}, 1032, ["onClick"]))
|
|
18350
|
+
])
|
|
18351
|
+
], 64))
|
|
18290
18352
|
]),
|
|
18291
18353
|
_: 1
|
|
18292
18354
|
})
|
|
18293
18355
|
]),
|
|
18294
18356
|
_: 1
|
|
18295
18357
|
}, 8, ["data"]),
|
|
18296
|
-
createElementVNode("div",
|
|
18358
|
+
createElementVNode("div", _hoisted_19$1, [
|
|
18297
18359
|
createVNode(unref(ElButton), {
|
|
18298
18360
|
type: "danger",
|
|
18299
18361
|
onClick: l
|
|
@@ -18306,7 +18368,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18306
18368
|
])
|
|
18307
18369
|
]));
|
|
18308
18370
|
}
|
|
18309
|
-
}, MemberBox = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
18371
|
+
}, MemberBox = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-6074d7b4"]]), _hoisted_1$3 = ["src"], _sfc_main$6 = {
|
|
18310
18372
|
__name: "byDialog",
|
|
18311
18373
|
props: {
|
|
18312
18374
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -18434,7 +18496,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18434
18496
|
}
|
|
18435
18497
|
staticData.isConfirm = !1;
|
|
18436
18498
|
}
|
|
18437
|
-
}, _withScopeId = (e) => (pushScopeId("data-v-
|
|
18499
|
+
}, _withScopeId = (e) => (pushScopeId("data-v-2dddea6d"), e = e(), popScopeId(), e), _hoisted_1$2 = { style: { height: "calc(100% - 40px)", "overflow-y": "auto" } }, _hoisted_2$1 = { style: { width: "100%", "font-size": "1.2em" } }, _hoisted_3$1 = { class: "tlab" }, _hoisted_4$1 = { class: "tlab" }, _hoisted_5$1 = { style: { color: "crimson", "text-decoration": "line-through" } }, _hoisted_6$1 = { style: { color: "#1a9f17", "font-size": "1.3em" } }, _hoisted_7$1 = {
|
|
18438
18500
|
key: 1,
|
|
18439
18501
|
style: { color: "crimson" }
|
|
18440
18502
|
}, _hoisted_8$1 = { class: "tlab" }, _hoisted_9$1 = { key: 0 }, _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("td", { class: "tlab" }, "描述:", -1)), _hoisted_11 = { key: 1 }, _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("td", { class: "tlab" }, "优惠金额:", -1)), _hoisted_13 = { key: 2 }, _hoisted_14 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("td", { class: "tlab" }, "营销员:", -1)), _hoisted_15 = { class: "tlab" }, _hoisted_16 = { key: 3 }, _hoisted_17 = { class: "tlab" }, _hoisted_18 = { class: "tlab" }, _hoisted_19 = { class: "tlab" }, _hoisted_20 = { class: "tlab" }, _hoisted_21 = { class: "tlab" }, _hoisted_22 = { key: 6 }, _hoisted_23 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("td", { class: "tlab" }, "备注:", -1)), _hoisted_24 = { style: { color: "#808080", "font-size": "14px" } }, _hoisted_25 = { style: { "text-align": "center" } }, _sfc_main$5 = {
|
|
@@ -18469,6 +18531,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18469
18531
|
}), o = reactive({
|
|
18470
18532
|
isPlayVoice: "1",
|
|
18471
18533
|
//关闭播放语音
|
|
18534
|
+
numOfTimes: "",
|
|
18472
18535
|
PayAmount: "",
|
|
18473
18536
|
//付款金额
|
|
18474
18537
|
PayCode: "",
|
|
@@ -18502,20 +18565,20 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18502
18565
|
watch(
|
|
18503
18566
|
() => t.modelValue,
|
|
18504
18567
|
(u) => {
|
|
18505
|
-
u ? (o.PayCode = "", o.PayAmount = "", o.RebateAmount = 0, o.Remarks = "", o.Telephone = "", o.MakreterTel = "", o.IsConfirming = !1, setTimeout(() => {
|
|
18568
|
+
u ? (o.PayCode = "", o.PayAmount = "", o.RebateAmount = 0, o.numOfTimes = "", o.Remarks = "", o.Telephone = "", o.MakreterTel = "", o.IsConfirming = !1, setTimeout(() => {
|
|
18506
18569
|
t.memberInfo && t.memberInfo.Id && (o.GetMethod = "会员收款", o.Telephone = t.memberInfo.Telephone, f());
|
|
18507
18570
|
}, 100), c(o.GetMethod)) : (o.timerId != null && (clearInterval(o.timerId), o.timerId = null), o.loading != null && (o.loading.close(), o.loading = null));
|
|
18508
18571
|
}
|
|
18509
18572
|
);
|
|
18510
|
-
const
|
|
18573
|
+
const _ = () => {
|
|
18511
18574
|
ElMessageBox.prompt("请输入订单备注:", {
|
|
18512
18575
|
confirmButtonText: " 确定",
|
|
18513
18576
|
cancelButtonText: "取消"
|
|
18514
18577
|
}).then(({ value: u }) => {
|
|
18515
18578
|
o.Remarks = u;
|
|
18516
18579
|
});
|
|
18517
|
-
},
|
|
18518
|
-
o.PayCode = u, o.PayType = "512", o.isMemberBox = !1, nextTick(() => h());
|
|
18580
|
+
}, d = (u, p) => {
|
|
18581
|
+
o.PayCode = u, o.PayType = "512", o.numOfTimes = p, o.isMemberBox = !1, nextTick(() => h());
|
|
18519
18582
|
}, h = async () => {
|
|
18520
18583
|
o.IsConfirming = !0, await SafeConfirmOrder({
|
|
18521
18584
|
GetMethod: o.GetMethod,
|
|
@@ -18524,6 +18587,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18524
18587
|
OrderId: t.orderInfo.Id,
|
|
18525
18588
|
OrderCode: t.orderInfo.OrderCode,
|
|
18526
18589
|
PayType: o.PayType,
|
|
18590
|
+
UseTimes: o.numOfTimes,
|
|
18527
18591
|
RebateAmount: o.RebateAmount,
|
|
18528
18592
|
MakreterTel: o.MakreterTel,
|
|
18529
18593
|
Telephone: o.Telephone,
|
|
@@ -18546,7 +18610,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18546
18610
|
onUnmounted(() => {
|
|
18547
18611
|
UnRegisterKeyboard("120"), UnRegisterKeyboard("121"), UnRegisterKeyboard("122");
|
|
18548
18612
|
});
|
|
18549
|
-
const
|
|
18613
|
+
const m = () => {
|
|
18550
18614
|
localStorage.setItem("ConfirmOrder_isPlayVoice", o.isPlayVoice);
|
|
18551
18615
|
};
|
|
18552
18616
|
return onMounted(async () => {
|
|
@@ -18723,7 +18787,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18723
18787
|
ref_key: "RefMemberBox",
|
|
18724
18788
|
ref: i,
|
|
18725
18789
|
payAmount: l.value,
|
|
18726
|
-
onSuccess:
|
|
18790
|
+
onSuccess: d,
|
|
18727
18791
|
ckUserInfoPassword: o.ckUserInfoPassword,
|
|
18728
18792
|
ckCardPassword: o.ckCardPassword,
|
|
18729
18793
|
onCancel: p[5] || (p[5] = (C) => o.isMemberBox = !1)
|
|
@@ -18807,7 +18871,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18807
18871
|
}, 8, ["loading"]),
|
|
18808
18872
|
createVNode(unref(ElLink), {
|
|
18809
18873
|
style: { "margin-left": "10px", color: "blue" },
|
|
18810
|
-
onClick:
|
|
18874
|
+
onClick: _
|
|
18811
18875
|
}, {
|
|
18812
18876
|
default: withCtx(() => [
|
|
18813
18877
|
createTextVNode("添加备注")
|
|
@@ -18822,14 +18886,14 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18822
18886
|
"inline-prompt": "",
|
|
18823
18887
|
"active-text": "语音播报开启",
|
|
18824
18888
|
"inactive-text": "语音播报关闭",
|
|
18825
|
-
onChange:
|
|
18889
|
+
onChange: m
|
|
18826
18890
|
}, null, 8, ["modelValue"])
|
|
18827
18891
|
])
|
|
18828
18892
|
]),
|
|
18829
18893
|
_: 1
|
|
18830
18894
|
}, 8, ["modelValue"]));
|
|
18831
18895
|
}
|
|
18832
|
-
}, byConfirmOrder = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
18896
|
+
}, byConfirmOrder = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-2dddea6d"]]), _hoisted_1$1 = { name: "selectIco" }, _hoisted_2 = { style: { padding: "5px", float: "left", border: "1px solid #e2e2e2", overflow: "hidden" } }, _hoisted_3 = {
|
|
18833
18897
|
class: "icon",
|
|
18834
18898
|
"aria-hidden": "true",
|
|
18835
18899
|
style: { "font-size": "60px" }
|
|
@@ -18893,7 +18957,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18893
18957
|
createElementVNode("div", _hoisted_6, [
|
|
18894
18958
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.value, (c) => (openBlock(), createElementBlock("div", {
|
|
18895
18959
|
class: "icon-item",
|
|
18896
|
-
onClick: (
|
|
18960
|
+
onClick: (_) => l(c)
|
|
18897
18961
|
}, [
|
|
18898
18962
|
(openBlock(), createElementBlock("svg", _hoisted_8, [
|
|
18899
18963
|
createElementVNode("use", {
|
|
@@ -18919,18 +18983,18 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18919
18983
|
i.value = !0, setTimeout(() => s.value.focus(), 300);
|
|
18920
18984
|
}, f = () => {
|
|
18921
18985
|
if (l.value) {
|
|
18922
|
-
if (n.value.Exists((
|
|
18986
|
+
if (n.value.Exists((_) => _ == l.value)) {
|
|
18923
18987
|
alert("已存在标签:" + l.value), l.value = "", s.value.focus();
|
|
18924
18988
|
return;
|
|
18925
18989
|
}
|
|
18926
18990
|
n.value.push(l.value), a("update:modelValue", n.value.join("|")), a("change"), l.value = "", i.value = !1;
|
|
18927
18991
|
}
|
|
18928
|
-
}, c = (
|
|
18929
|
-
n.value = n.value.filter((
|
|
18992
|
+
}, c = (_) => {
|
|
18993
|
+
n.value = n.value.filter((d) => d != _), a("update:modelValue", n.value.join("|")), a("change");
|
|
18930
18994
|
};
|
|
18931
|
-
return computed(() => t.modelValue, (
|
|
18995
|
+
return computed(() => t.modelValue, (_) => {
|
|
18932
18996
|
try {
|
|
18933
|
-
n.value =
|
|
18997
|
+
n.value = _.split("|");
|
|
18934
18998
|
} catch {
|
|
18935
18999
|
}
|
|
18936
19000
|
}), onMounted(() => {
|
|
@@ -18938,11 +19002,11 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18938
19002
|
t.modelValue != "" ? n.value = t.modelValue.split("|") : n.value = [];
|
|
18939
19003
|
} catch {
|
|
18940
19004
|
}
|
|
18941
|
-
}), (
|
|
19005
|
+
}), (_, d) => (openBlock(), createElementBlock(Fragment, null, [
|
|
18942
19006
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (h) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
18943
19007
|
createVNode(unref(ElTag), {
|
|
18944
19008
|
closable: "",
|
|
18945
|
-
onClose: (
|
|
19009
|
+
onClose: (m) => c(h)
|
|
18946
19010
|
}, {
|
|
18947
19011
|
default: withCtx(() => [
|
|
18948
19012
|
createTextVNode(toDisplayString(h), 1)
|
|
@@ -18955,7 +19019,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18955
19019
|
ref_key: "inputElement",
|
|
18956
19020
|
ref: s,
|
|
18957
19021
|
modelValue: l.value,
|
|
18958
|
-
"onUpdate:modelValue":
|
|
19022
|
+
"onUpdate:modelValue": d[0] || (d[0] = (h) => l.value = h),
|
|
18959
19023
|
onBlur: f,
|
|
18960
19024
|
onKeypress: withKeys(f, ["enter"]),
|
|
18961
19025
|
style: { width: "200px" }
|
|
@@ -18993,15 +19057,15 @@ const SafeCall$1 = async (e, r) => {
|
|
|
18993
19057
|
},
|
|
18994
19058
|
emits: ["command", "reportChange"],
|
|
18995
19059
|
setup(e, { emit: r }) {
|
|
18996
|
-
const t = e, a = ref(""), n = ref({}), i = ref([]), s = ref(""), l = ref(!1), o = r, f = (h,
|
|
18997
|
-
o("command", h, a.value,
|
|
19060
|
+
const t = e, a = ref(""), n = ref({}), i = ref([]), s = ref(""), l = ref(!1), o = r, f = (h, m) => {
|
|
19061
|
+
o("command", h, a.value, m);
|
|
18998
19062
|
}, c = async () => {
|
|
18999
19063
|
l.value = !1, await Sleep(10);
|
|
19000
|
-
let h = t.reportArray.FirstOrDefault((
|
|
19064
|
+
let h = t.reportArray.FirstOrDefault((m) => m.Name == a.value);
|
|
19001
19065
|
i.value = h.ColumnArray, s.value = h.Url, l.value = !0, o("reportChange", h);
|
|
19002
|
-
},
|
|
19066
|
+
}, _ = computed({
|
|
19003
19067
|
get: () => `${n.value.OrganName}${a.value}`
|
|
19004
|
-
}),
|
|
19068
|
+
}), d = computed({
|
|
19005
19069
|
get: () => {
|
|
19006
19070
|
var h = {
|
|
19007
19071
|
FootArray: [`${L("制单人")}:${n.value.NickName}`],
|
|
@@ -19014,15 +19078,15 @@ const SafeCall$1 = async (e, r) => {
|
|
|
19014
19078
|
nextTick(() => {
|
|
19015
19079
|
t.reportArray.length > 0 && (a.value = t.reportArray[0].Name), c();
|
|
19016
19080
|
}), n.value = JSON.parse(sessionStorage.getItem("ManagerInfo"));
|
|
19017
|
-
}), (h,
|
|
19081
|
+
}), (h, m) => l.value ? (openBlock(), createBlock(reportIndex, {
|
|
19018
19082
|
key: 0,
|
|
19019
19083
|
url: s.value,
|
|
19020
|
-
tabName:
|
|
19084
|
+
tabName: _.value,
|
|
19021
19085
|
loadData: !1,
|
|
19022
19086
|
columnArray: i.value,
|
|
19023
19087
|
onCommand: f,
|
|
19024
19088
|
commandArray: t.commandArray,
|
|
19025
|
-
printOption:
|
|
19089
|
+
printOption: d.value,
|
|
19026
19090
|
searchParam: t.searchParam,
|
|
19027
19091
|
toolWidth: t.toolWidth
|
|
19028
19092
|
}, {
|
|
@@ -19032,9 +19096,9 @@ const SafeCall$1 = async (e, r) => {
|
|
|
19032
19096
|
default: withCtx(() => [
|
|
19033
19097
|
createVNode(byDatePicker, {
|
|
19034
19098
|
BeginTime: t.searchParam.BeginTime,
|
|
19035
|
-
"onUpdate:BeginTime":
|
|
19099
|
+
"onUpdate:BeginTime": m[0] || (m[0] = (u) => t.searchParam.BeginTime = u),
|
|
19036
19100
|
EndTime: t.searchParam.EndTime,
|
|
19037
|
-
"onUpdate:EndTime":
|
|
19101
|
+
"onUpdate:EndTime": m[1] || (m[1] = (u) => t.searchParam.EndTime = u)
|
|
19038
19102
|
}, null, 8, ["BeginTime", "EndTime"])
|
|
19039
19103
|
]),
|
|
19040
19104
|
_: 1
|
|
@@ -19043,7 +19107,7 @@ const SafeCall$1 = async (e, r) => {
|
|
|
19043
19107
|
PageItem: withCtx(() => [
|
|
19044
19108
|
createVNode(unref(ElRadioGroup), {
|
|
19045
19109
|
modelValue: a.value,
|
|
19046
|
-
"onUpdate:modelValue":
|
|
19110
|
+
"onUpdate:modelValue": m[2] || (m[2] = (u) => a.value = u),
|
|
19047
19111
|
onChange: c
|
|
19048
19112
|
}, {
|
|
19049
19113
|
default: withCtx(() => [
|
|
@@ -19089,13 +19153,13 @@ const SafeCall$1 = async (e, r) => {
|
|
|
19089
19153
|
if (o.Name)
|
|
19090
19154
|
return o.Name;
|
|
19091
19155
|
}, l = (o, f, c) => {
|
|
19092
|
-
let
|
|
19093
|
-
if (
|
|
19156
|
+
let _ = t.reportArray.FirstOrDefault((h) => h.Name == f);
|
|
19157
|
+
if (_ == null)
|
|
19094
19158
|
return;
|
|
19095
|
-
let
|
|
19159
|
+
let d = _.getDetailParam(c);
|
|
19096
19160
|
i.value = {};
|
|
19097
|
-
for (let h in
|
|
19098
|
-
i.value[h] =
|
|
19161
|
+
for (let h in d)
|
|
19162
|
+
i.value[h] = d[h];
|
|
19099
19163
|
for (let h in t.searchParam)
|
|
19100
19164
|
i.value[h] = t.searchParam[h];
|
|
19101
19165
|
n.value = o, nextTick(() => {
|
|
@@ -19174,7 +19238,18 @@ const SafeCall$1 = async (e, r) => {
|
|
|
19174
19238
|
})), l(f);
|
|
19175
19239
|
}
|
|
19176
19240
|
}
|
|
19177
|
-
})
|
|
19241
|
+
});
|
|
19242
|
+
watch(
|
|
19243
|
+
() => t.provinceId,
|
|
19244
|
+
() => n.elValue[0] = t.provinceId
|
|
19245
|
+
), watch(
|
|
19246
|
+
() => t.cityId,
|
|
19247
|
+
() => n.elValue[1] = t.cityId
|
|
19248
|
+
), watch(
|
|
19249
|
+
() => t.countyId,
|
|
19250
|
+
() => n.elValue[2] = t.countyId
|
|
19251
|
+
);
|
|
19252
|
+
const i = (s) => {
|
|
19178
19253
|
let l = n.areaArray.FirstOrDefault((o) => o.Id == s[0]);
|
|
19179
19254
|
a("update:provinceId", n.elValue[0]), a("update:provinceName", l == null ? void 0 : l.Name), l = n.areaArray.FirstOrDefault((o) => o.Id == s[1]), a("update:cityId", n.elValue[1]), a("update:cityName", l == null ? void 0 : l.Name), l = n.areaArray.FirstOrDefault((o) => o.Id == s[2]), a("update:countyId", n.elValue[2]), a("update:countyName", l == null ? void 0 : l.Name);
|
|
19180
19255
|
};
|