@invoice-sdk/widget 1.95.2 → 1.96.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,7 @@ var W = (g, A, E) => new Promise((B, C) => {
|
|
|
35
35
|
}, n = (I) => I.done ? B(I.value) : Promise.resolve(I.value).then(Q, t);
|
|
36
36
|
n((E = E.apply(g, A)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as o, g as mB, a as hQ, b as cQ, C as wQ, G as eQ, c as aQ, d as rB, e as og, f as oQ, h as DQ, i as zg, O as UC, s as ag, j as PB, k as uQ, l as iQ, m as sQ, n as fQ, o as mQ, p as rQ, v as PQ } from "./index-
|
|
38
|
+
import { t as o, g as mB, a as hQ, b as cQ, C as wQ, G as eQ, c as aQ, d as rB, e as og, f as oQ, h as DQ, i as zg, O as UC, s as ag, j as PB, k as uQ, l as iQ, m as sQ, n as fQ, o as mQ, p as rQ, v as PQ } from "./index-CKLRSbqb.js";
|
|
39
39
|
import { g as SC } from "./_commonjsHelpers-bAxELxBV.js";
|
|
40
40
|
function tC({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
41
41
|
const E = document.createElement("div");
|
|
@@ -302,14 +302,14 @@ function vQ({
|
|
|
302
302
|
u.className = "wgt:w-[1px] wgt:h-8 wgt:bg-border-light";
|
|
303
303
|
const Y = document.createElement("label");
|
|
304
304
|
Y.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", Y.innerText = c.name, e.appendChild(f), e.appendChild(u), e.appendChild(Y);
|
|
305
|
-
const { container:
|
|
305
|
+
const { container: H } = Ng({
|
|
306
306
|
checked: s,
|
|
307
307
|
onChange: (l) => {
|
|
308
308
|
l && (A = c.route, typeof E == "function" && E(c), t());
|
|
309
309
|
},
|
|
310
310
|
disabled: !1
|
|
311
311
|
});
|
|
312
|
-
D.appendChild(e), D.appendChild(
|
|
312
|
+
D.appendChild(e), D.appendChild(H), Q.appendChild(D);
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
t();
|
|
@@ -432,9 +432,9 @@ function Kg({
|
|
|
432
432
|
f.className = "wgt:absolute wgt:top-full wgt:left-0 wgt:right-0 wgt:bg-white wgt:border wgt:border-gray-300 wgt:rounded wgt:shadow-lg wgt:z-50 wgt:hidden wgt:max-h-[500px] wgt:overflow-y-auto";
|
|
433
433
|
const u = document.createElement("div");
|
|
434
434
|
u.className = "wgt:divide-y wgt:divide-gray-200";
|
|
435
|
-
let Y = A,
|
|
435
|
+
let Y = A, H = null, l = [...E];
|
|
436
436
|
const P = () => {
|
|
437
|
-
const m = E.find((i) => i.id ? i.id ===
|
|
437
|
+
const m = E.find((i) => i.id ? i.id === H : i.value === Y);
|
|
438
438
|
return m ? m.label : "";
|
|
439
439
|
};
|
|
440
440
|
e.value = P();
|
|
@@ -452,9 +452,9 @@ function Kg({
|
|
|
452
452
|
"wgt:cursor-pointer",
|
|
453
453
|
"wgt:hover:bg-gray-100",
|
|
454
454
|
"wgt:text-sm",
|
|
455
|
-
i.id ?
|
|
455
|
+
i.id ? H === i.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : Y === i.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
|
|
456
456
|
].filter(Boolean).join(" "), v.innerText = i.label, v.dataset.value = i.value, v.addEventListener("click", () => {
|
|
457
|
-
if (i.id && (
|
|
457
|
+
if (i.id && (H = i.id), Y = i.value, e.value = i.label, f.classList.add("wgt:hidden"), typeof t == "function") {
|
|
458
458
|
const d = { target: { value: i.value } };
|
|
459
459
|
i.id && (d.target.id = i.id), t(d);
|
|
460
460
|
}
|
|
@@ -489,8 +489,8 @@ function Kg({
|
|
|
489
489
|
return Y;
|
|
490
490
|
},
|
|
491
491
|
setValue(m, i, v) {
|
|
492
|
-
|
|
493
|
-
const d = E.find((
|
|
492
|
+
H = v || null, Y = m || "";
|
|
493
|
+
const d = E.find((x) => x.id ? x.id === v : x.value === m);
|
|
494
494
|
d ? (e.value = d.label, J.value = m, q()) : (e.value = i || "", J.value = m || "", q());
|
|
495
495
|
},
|
|
496
496
|
setOptions(m) {
|
|
@@ -542,8 +542,8 @@ function Kg({
|
|
|
542
542
|
for (; D.options.length > 1; )
|
|
543
543
|
D.remove(1);
|
|
544
544
|
u.forEach((Y) => {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const H = document.createElement("option");
|
|
546
|
+
H.value = Y.value, H.innerText = Y.label, D.appendChild(H);
|
|
547
547
|
});
|
|
548
548
|
},
|
|
549
549
|
setDisabled(u) {
|
|
@@ -634,13 +634,13 @@ function hC({
|
|
|
634
634
|
const J = 1024, M = Math.max(0, q), m = ["Bytes", "KB", "MB", "GB", "TB"], i = Math.floor(Math.log(P) / Math.log(J));
|
|
635
635
|
return parseFloat((P / Math.pow(J, i)).toFixed(M)) + " " + m[i];
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function H(P) {
|
|
638
638
|
const q = P.type.toLowerCase(), J = "." + P.name.split(".").pop().toLowerCase();
|
|
639
639
|
return c.accept.split(",").map((m) => m.trim().toLowerCase()).filter(Boolean).some((m) => m.startsWith(".") ? m === J : m.endsWith("/*") ? q.startsWith(m.replace("/*", "")) : q === m);
|
|
640
640
|
}
|
|
641
641
|
function l(P) {
|
|
642
642
|
if (s.innerHTML = "", f(null), P) {
|
|
643
|
-
|
|
643
|
+
H(P) || f(`File không hợp lệ. Chỉ chấp nhận: ${c.accept}`), P.size <= 500 * 1024 || f("Dung lượng file vượt quá 500KB.");
|
|
644
644
|
const J = document.createElement("div");
|
|
645
645
|
if (J.className = "wgt:flex wgt:items-center wgt:gap-4", J.addEventListener("click", () => {
|
|
646
646
|
c.click();
|
|
@@ -769,7 +769,7 @@ function cC({
|
|
|
769
769
|
f = q, q ? (e.innerText = q, e.style.display = "block", typeof C == "function" && C(q)) : (e.innerText = "", e.style.display = "none", typeof C == "function" && C(null));
|
|
770
770
|
}
|
|
771
771
|
let Y = g || null;
|
|
772
|
-
function
|
|
772
|
+
function H(q, J = 2) {
|
|
773
773
|
if (q === 0) return "0 Bytes";
|
|
774
774
|
const M = 1024, m = Math.max(0, J), i = ["Bytes", "KB", "MB", "GB", "TB"], v = Math.floor(Math.log(q) / Math.log(M));
|
|
775
775
|
return parseFloat((q / Math.pow(M, v)).toFixed(m)) + " " + i[v];
|
|
@@ -790,7 +790,7 @@ function cC({
|
|
|
790
790
|
const v = document.createElement("p");
|
|
791
791
|
v.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", v.innerText = q.name;
|
|
792
792
|
const d = document.createElement("p");
|
|
793
|
-
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText =
|
|
793
|
+
d.className = "wgt:text-sm wgt:text-gray-500", d.innerText = H(q.size), i.appendChild(v), i.appendChild(d), m.appendChild(i), n.appendChild(m), typeof B == "function" && B(null, q);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
function P(q) {
|
|
@@ -893,17 +893,17 @@ const xQ = ({
|
|
|
893
893
|
C.forEach((r) => {
|
|
894
894
|
u.append(new Option(Y[r], r));
|
|
895
895
|
}), D.appendChild(u), c.append(D);
|
|
896
|
-
const
|
|
897
|
-
|
|
896
|
+
const H = document.createElement("div");
|
|
897
|
+
H.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
898
898
|
const l = document.createElement("span");
|
|
899
899
|
l.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", l.textContent = o("codeType");
|
|
900
900
|
const P = document.createElement("span");
|
|
901
|
-
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", l.appendChild(P),
|
|
901
|
+
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", l.appendChild(P), H.appendChild(l);
|
|
902
902
|
const q = document.createElement("select");
|
|
903
903
|
q.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, q.title = o("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((r) => {
|
|
904
904
|
const T = r === "C" ? o("codeTypeC", "C (Có mã CQT)") : o("codeTypeK", "K (Không mã)");
|
|
905
905
|
q.append(new Option(T, r));
|
|
906
|
-
}),
|
|
906
|
+
}), H.appendChild(q), c.append(H);
|
|
907
907
|
const J = document.createElement("div");
|
|
908
908
|
J.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
909
909
|
const M = document.createElement("span");
|
|
@@ -916,8 +916,8 @@ const xQ = ({
|
|
|
916
916
|
v.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
917
917
|
const d = document.createElement("span");
|
|
918
918
|
d.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", d.textContent = o("typeOfEInvoice");
|
|
919
|
-
const
|
|
920
|
-
|
|
919
|
+
const x = document.createElement("span");
|
|
920
|
+
x.className = "wgt:text-red-500 wgt:ml-1", x.innerText = "*", d.appendChild(x), v.appendChild(d);
|
|
921
921
|
const G = document.createElement("select");
|
|
922
922
|
G.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, G.title = o("invoiceTypeTooltip", "Loại hóa đơn");
|
|
923
923
|
const k = {
|
|
@@ -1057,7 +1057,7 @@ function XQ() {
|
|
|
1057
1057
|
return h === 0 || h === 6;
|
|
1058
1058
|
}, Y = function(w) {
|
|
1059
1059
|
return w % 4 === 0 && w % 100 !== 0 || w % 400 === 0;
|
|
1060
|
-
},
|
|
1060
|
+
}, H = function(w, h) {
|
|
1061
1061
|
return [31, Y(w) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][h];
|
|
1062
1062
|
}, l = function(w) {
|
|
1063
1063
|
f(w) && w.setHours(0, 0, 0, 0);
|
|
@@ -1175,9 +1175,9 @@ function XQ() {
|
|
|
1175
1175
|
return (uA + b - 1) % b;
|
|
1176
1176
|
};
|
|
1177
1177
|
w.setDate(r + L - y(T));
|
|
1178
|
-
var AA = new Date(w.getFullYear(), 0, N), S = 1440 * 60 * 1e3,
|
|
1178
|
+
var AA = new Date(w.getFullYear(), 0, N), S = 1440 * 60 * 1e3, IA = (w.getTime() - AA.getTime()) / S, nA = 1 + Math.round((IA - L + y(AA.getDay())) / b);
|
|
1179
1179
|
return nA;
|
|
1180
|
-
},
|
|
1180
|
+
}, x = function(w, h, r, T) {
|
|
1181
1181
|
var N = new Date(r, h, w), L = B ? E(N).isoWeek() : d(N, T);
|
|
1182
1182
|
return '<td class="pika-week">' + L + "</td>";
|
|
1183
1183
|
}, G = function(w, h, r, T) {
|
|
@@ -1190,12 +1190,12 @@ function XQ() {
|
|
|
1190
1190
|
r.push('<th scope="col"><abbr title="' + i(w, h) + '">' + i(w, h, !0) + "</abbr></th>");
|
|
1191
1191
|
return "<thead><tr>" + (w.isRTL ? r.reverse() : r).join("") + "</tr></thead>";
|
|
1192
1192
|
}, U = function(w, h, r, T, N, L) {
|
|
1193
|
-
var b, y, AA, S = w._o,
|
|
1193
|
+
var b, y, AA, S = w._o, IA = r === S.minYear, nA = r === S.maxYear, uA = '<div id="' + L + '" class="pika-title" role="heading" aria-live="assertive">', LA, HA, kA = !0, mA = !0;
|
|
1194
1194
|
for (AA = [], b = 0; b < 12; b++)
|
|
1195
|
-
AA.push('<option value="' + (r === N ? b - h : 12 + b - h) + '"' + (b === T ? ' selected="selected"' : "") + (
|
|
1195
|
+
AA.push('<option value="' + (r === N ? b - h : 12 + b - h) + '"' + (b === T ? ' selected="selected"' : "") + (IA && b < S.minMonth || nA && b > S.maxMonth ? ' disabled="disabled"' : "") + ">" + S.i18n.months[b] + "</option>");
|
|
1196
1196
|
for (LA = '<div class="pika-label">' + S.i18n.months[T] + '<select class="pika-select pika-select-month" tabindex="-1">' + AA.join("") + "</select></div>", e(S.yearRange) ? (b = S.yearRange[0], y = S.yearRange[1] + 1) : (b = r - S.yearRange, y = 1 + r + S.yearRange), AA = []; b < y && b <= S.maxYear; b++)
|
|
1197
1197
|
b >= S.minYear && AA.push('<option value="' + b + '"' + (b === r ? ' selected="selected"' : "") + ">" + b + "</option>");
|
|
1198
|
-
return HA = '<div class="pika-label">' + r + S.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + AA.join("") + "</select></div>", S.showMonthAfterYear ? uA += HA + LA : uA += LA + HA,
|
|
1198
|
+
return HA = '<div class="pika-label">' + r + S.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + AA.join("") + "</select></div>", S.showMonthAfterYear ? uA += HA + LA : uA += LA + HA, IA && (T === 0 || S.minMonth >= T) && (kA = !1), nA && (T === 11 || S.maxMonth <= T) && (mA = !1), h === 0 && (uA += '<button class="pika-prev' + (kA ? "" : " is-disabled") + '" type="button">' + S.i18n.previousMonth + "</button>"), h === w._o.numberOfMonths - 1 && (uA += '<button class="pika-next' + (mA ? "" : " is-disabled") + '" type="button">' + S.i18n.nextMonth + "</button>"), uA += "</div>";
|
|
1199
1199
|
}, j = function(w, h, r) {
|
|
1200
1200
|
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + r + '">' + X(w) + k(h) + "</table>";
|
|
1201
1201
|
}, F = function(w) {
|
|
@@ -1421,28 +1421,28 @@ function XQ() {
|
|
|
1421
1421
|
}
|
|
1422
1422
|
},
|
|
1423
1423
|
adjustPosition: function() {
|
|
1424
|
-
var w, h, r, T, N, L, b, y, AA, S,
|
|
1424
|
+
var w, h, r, T, N, L, b, y, AA, S, IA, nA;
|
|
1425
1425
|
if (!this._o.container) {
|
|
1426
|
-
if (this.el.style.position = "absolute", w = this._o.trigger, h = w, r = this.el.offsetWidth, T = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, L = window.innerHeight || Q.documentElement.clientHeight, b = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop,
|
|
1426
|
+
if (this.el.style.position = "absolute", w = this._o.trigger, h = w, r = this.el.offsetWidth, T = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, L = window.innerHeight || Q.documentElement.clientHeight, b = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, IA = !0, nA = !0, typeof w.getBoundingClientRect == "function")
|
|
1427
1427
|
S = w.getBoundingClientRect(), y = S.left + window.pageXOffset, AA = S.bottom + window.pageYOffset;
|
|
1428
1428
|
else
|
|
1429
1429
|
for (y = h.offsetLeft, AA = h.offsetTop + h.offsetHeight; h = h.offsetParent; )
|
|
1430
1430
|
y += h.offsetLeft, AA += h.offsetTop;
|
|
1431
|
-
(this._o.reposition && y + r > N || this._o.position.indexOf("right") > -1 && y - r + w.offsetWidth > 0) && (y = y - r + w.offsetWidth,
|
|
1431
|
+
(this._o.reposition && y + r > N || this._o.position.indexOf("right") > -1 && y - r + w.offsetWidth > 0) && (y = y - r + w.offsetWidth, IA = !1), (this._o.reposition && AA + T > L + b || this._o.position.indexOf("top") > -1 && AA - T - w.offsetHeight > 0) && (AA = AA - T - w.offsetHeight, nA = !1), this.el.style.left = y + "px", this.el.style.top = AA + "px", s(this.el, IA ? "left-aligned" : "right-aligned"), s(this.el, nA ? "bottom-aligned" : "top-aligned"), D(this.el, IA ? "right-aligned" : "left-aligned"), D(this.el, nA ? "top-aligned" : "bottom-aligned");
|
|
1432
1432
|
}
|
|
1433
1433
|
},
|
|
1434
1434
|
/**
|
|
1435
1435
|
* render HTML for a particular month
|
|
1436
1436
|
*/
|
|
1437
1437
|
render: function(w, h, r) {
|
|
1438
|
-
var T = this._o, N = /* @__PURE__ */ new Date(), L =
|
|
1438
|
+
var T = this._o, N = /* @__PURE__ */ new Date(), L = H(w, h), b = new Date(w, h, 1).getDay(), y = [], AA = [];
|
|
1439
1439
|
l(N), T.firstDay > 0 && (b -= T.firstDay, b < 0 && (b += 7));
|
|
1440
|
-
for (var S = h === 0 ? 11 : h - 1,
|
|
1440
|
+
for (var S = h === 0 ? 11 : h - 1, IA = h === 11 ? 0 : h + 1, nA = h === 0 ? w - 1 : w, uA = h === 11 ? w + 1 : w, LA = H(nA, S), HA = L + b, kA = HA; kA > 7; )
|
|
1441
1441
|
kA -= 7;
|
|
1442
1442
|
HA += 7 - kA;
|
|
1443
1443
|
for (var mA = !1, RA = 0, VA = 0; RA < HA; RA++) {
|
|
1444
1444
|
var tA = new Date(w, h, 1 + (RA - b)), YA = f(this._d) ? P(tA, this._d) : !1, bA = P(tA, N), zA = T.events.indexOf(tA.toDateString()) !== -1, yA = RA < b || RA >= L + b, KA = 1 + (RA - b), gg = h, WA = w, ng = T.startRange && P(T.startRange, tA), tg = T.endRange && P(T.endRange, tA), sg = T.startRange && T.endRange && T.startRange < tA && tA < T.endRange, _A = T.minDate && tA < T.minDate || T.maxDate && tA > T.maxDate || T.disableWeekends && u(tA) || T.disableDayFn && T.disableDayFn(tA);
|
|
1445
|
-
yA && (RA < b ? (KA = LA + KA, gg = S, WA = nA) : (KA = KA - L, gg =
|
|
1445
|
+
yA && (RA < b ? (KA = LA + KA, gg = S, WA = nA) : (KA = KA - L, gg = IA, WA = uA));
|
|
1446
1446
|
var fg = {
|
|
1447
1447
|
day: KA,
|
|
1448
1448
|
month: gg,
|
|
@@ -1458,7 +1458,7 @@ function XQ() {
|
|
|
1458
1458
|
showDaysInNextAndPreviousMonths: T.showDaysInNextAndPreviousMonths,
|
|
1459
1459
|
enableSelectionDaysInNextAndPreviousMonths: T.enableSelectionDaysInNextAndPreviousMonths
|
|
1460
1460
|
};
|
|
1461
|
-
T.pickWholeWeek && YA && (mA = !0), AA.push(v(fg)), ++VA === 7 && (T.showWeekNumber && AA.unshift(
|
|
1461
|
+
T.pickWholeWeek && YA && (mA = !0), AA.push(v(fg)), ++VA === 7 && (T.showWeekNumber && AA.unshift(x(RA - b, h, w, T.firstWeekOfYearMinDays)), y.push(G(AA, T.isRTL, T.pickWholeWeek, mA)), AA = [], VA = 0, mA = !1);
|
|
1462
1462
|
}
|
|
1463
1463
|
return j(T, y, r);
|
|
1464
1464
|
},
|
|
@@ -1760,7 +1760,7 @@ function _Q(g, A, E = 200) {
|
|
|
1760
1760
|
const e = $Q();
|
|
1761
1761
|
t.setTransform(...e), t.drawImage(B, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
|
|
1762
1762
|
} else if (A.length === 4) {
|
|
1763
|
-
const [e, f, u, Y] = A,
|
|
1763
|
+
const [e, f, u, Y] = A, H = u - e, l = Y - f, P = H * 0.05, q = l * 0.05, J = Math.max(0, e - P), M = Math.max(0, f - q), m = Math.min(B.width, u + P), i = Math.min(B.height, Y + q), v = m - J, d = i - M;
|
|
1764
1764
|
t.drawImage(
|
|
1765
1765
|
B,
|
|
1766
1766
|
J,
|
|
@@ -1781,8 +1781,8 @@ function _Q(g, A, E = 200) {
|
|
|
1781
1781
|
E
|
|
1782
1782
|
), I = new ImageData(E, E), a = n.data, c = I.data;
|
|
1783
1783
|
for (let e = 0; e < a.length; e += 4) {
|
|
1784
|
-
const f = a[e], u = a[e + 1], Y = a[e + 2],
|
|
1785
|
-
c[e] = c[e + 1] = c[e + 2] =
|
|
1784
|
+
const f = a[e], u = a[e + 1], Y = a[e + 2], H = 0.2989 * f + 0.587 * u + 0.114 * Y;
|
|
1785
|
+
c[e] = c[e + 1] = c[e + 2] = H, c[e + 3] = 255;
|
|
1786
1786
|
}
|
|
1787
1787
|
const s = new ImageData(E, E), D = AE(c, E, E, 10);
|
|
1788
1788
|
return s.data.set(D), {
|
|
@@ -1844,20 +1844,20 @@ function CE(g, A, E, B, C = 0.5) {
|
|
|
1844
1844
|
for (let n = 0; n < t; n++) {
|
|
1845
1845
|
const I = g.data[n * 37 + 4];
|
|
1846
1846
|
if (I < C) continue;
|
|
1847
|
-
const a = g.data[n * 37], c = g.data[n * 37 + 1], s = g.data[n * 37 + 2], D = g.data[n * 37 + 3], e = 1, f = 1, u = [a, c, s, D], Y = g.data.slice(n * 37 + 5, n * 37 + 37),
|
|
1847
|
+
const a = g.data[n * 37], c = g.data[n * 37 + 1], s = g.data[n * 37 + 2], D = g.data[n * 37 + 3], e = 1, f = 1, u = [a, c, s, D], Y = g.data.slice(n * 37 + 5, n * 37 + 37), H = new Float32Array(25600);
|
|
1848
1848
|
for (let k = 0; k < 160; k++)
|
|
1849
1849
|
for (let X = 0; X < 160; X++) {
|
|
1850
1850
|
let U = 0;
|
|
1851
1851
|
for (let j = 0; j < 32; j++)
|
|
1852
1852
|
U += Y[j] * A.data[j * 160 * 160 + k * 160 + X];
|
|
1853
|
-
|
|
1853
|
+
H[k * 160 + X] = U > 0 ? 1 : 0;
|
|
1854
1854
|
}
|
|
1855
1855
|
const l = BE();
|
|
1856
1856
|
let P = l.length > 0 ? l[0] : [], q = P.length >= 4 ? P.slice(0, 4) : u;
|
|
1857
1857
|
q = q.map((k) => [k[0] * e, k[1] * f]);
|
|
1858
|
-
const J = 0.1, M = Math.min(...q.map((k) => k[0])), m = Math.max(...q.map((k) => k[0])), i = Math.min(...q.map((k) => k[1])), v = Math.max(...q.map((k) => k[1])), d = m - M,
|
|
1858
|
+
const J = 0.1, M = Math.min(...q.map((k) => k[0])), m = Math.max(...q.map((k) => k[0])), i = Math.min(...q.map((k) => k[1])), v = Math.max(...q.map((k) => k[1])), d = m - M, x = v - i, G = q.map((k) => [
|
|
1859
1859
|
k[0] + (k[0] < (M + m) / 2 ? -J * d : J * d),
|
|
1860
|
-
k[1] + (k[1] < (i + v) / 2 ? -J *
|
|
1860
|
+
k[1] + (k[1] < (i + v) / 2 ? -J * x : J * x)
|
|
1861
1861
|
]);
|
|
1862
1862
|
Q.push({
|
|
1863
1863
|
bbox_xyxy: u,
|
|
@@ -1989,7 +1989,7 @@ function hE(D) {
|
|
|
1989
1989
|
const O = BA();
|
|
1990
1990
|
typeof g == "function" && g(O);
|
|
1991
1991
|
}), e.appendChild(f);
|
|
1992
|
-
let u, Y,
|
|
1992
|
+
let u, Y, H, l, P, q, J, M, m, i, v, d, x, G, k, X, U, j, F, w, h, r, T, N, L;
|
|
1993
1993
|
const b = document.createElement("button");
|
|
1994
1994
|
u = dA({
|
|
1995
1995
|
name: "taxCode",
|
|
@@ -2011,13 +2011,14 @@ function hE(D) {
|
|
|
2011
2011
|
yield a(
|
|
2012
2012
|
A == null ? void 0 : A.provider,
|
|
2013
2013
|
O,
|
|
2014
|
-
($,
|
|
2014
|
+
($, EA) => W(null, null, function* () {
|
|
2015
2015
|
if ($) {
|
|
2016
2016
|
const DA = yield nA(O);
|
|
2017
|
-
c(
|
|
2017
|
+
c(EA, DA);
|
|
2018
2018
|
} else
|
|
2019
|
-
c(
|
|
2020
|
-
})
|
|
2019
|
+
c(EA);
|
|
2020
|
+
}),
|
|
2021
|
+
!I
|
|
2021
2022
|
);
|
|
2022
2023
|
} catch ($) {
|
|
2023
2024
|
console.error($);
|
|
@@ -2036,7 +2037,7 @@ function hE(D) {
|
|
|
2036
2037
|
value: ((wA = (cA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : cA.organization) == null ? void 0 : wA.name) || "",
|
|
2037
2038
|
readOnly: !1,
|
|
2038
2039
|
horizontal: !0
|
|
2039
|
-
}),
|
|
2040
|
+
}), H = dA({
|
|
2040
2041
|
name: "companyAddressDetail",
|
|
2041
2042
|
label: o("address"),
|
|
2042
2043
|
required: !0,
|
|
@@ -2076,7 +2077,7 @@ function hE(D) {
|
|
|
2076
2077
|
}
|
|
2077
2078
|
r = hC({
|
|
2078
2079
|
label: o("uploadLogo", "Tải logo lên"),
|
|
2079
|
-
required: !
|
|
2080
|
+
required: !1,
|
|
2080
2081
|
file: (A == null ? void 0 : A.logo) || null,
|
|
2081
2082
|
onFileChange: (z) => {
|
|
2082
2083
|
R();
|
|
@@ -2112,8 +2113,8 @@ function hE(D) {
|
|
|
2112
2113
|
field: i.inputEl,
|
|
2113
2114
|
format: "DD/MM/YYYY",
|
|
2114
2115
|
toString(z) {
|
|
2115
|
-
const O = String(z.getMonth() + 1).padStart(2, "0"), $ = String(z.getDate()).padStart(2, "0"),
|
|
2116
|
-
return `${$}/${O}/${
|
|
2116
|
+
const O = String(z.getMonth() + 1).padStart(2, "0"), $ = String(z.getDate()).padStart(2, "0"), EA = z.getFullYear();
|
|
2117
|
+
return `${$}/${O}/${EA}`;
|
|
2117
2118
|
},
|
|
2118
2119
|
onSelect: (z) => {
|
|
2119
2120
|
i.setError(null), R();
|
|
@@ -2140,7 +2141,7 @@ function hE(D) {
|
|
|
2140
2141
|
onChange: (z) => {
|
|
2141
2142
|
z.target.value;
|
|
2142
2143
|
}
|
|
2143
|
-
}),
|
|
2144
|
+
}), x = dA({
|
|
2144
2145
|
name: "repIdCardField",
|
|
2145
2146
|
label: o("idNumber"),
|
|
2146
2147
|
required: !0,
|
|
@@ -2152,10 +2153,10 @@ function hE(D) {
|
|
|
2152
2153
|
let O = z.target.value;
|
|
2153
2154
|
const $ = O.replace(/[^0-9]/g, "");
|
|
2154
2155
|
if ($ !== O && (z.target.value = $, O = $), O.trim() === "") {
|
|
2155
|
-
|
|
2156
|
+
x.setError(o("errorRequired"));
|
|
2156
2157
|
return;
|
|
2157
2158
|
}
|
|
2158
|
-
/^\d{12}$/.test(O) ?
|
|
2159
|
+
/^\d{12}$/.test(O) ? x.setError(null) : x.setError(
|
|
2159
2160
|
o("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
|
|
2160
2161
|
);
|
|
2161
2162
|
}
|
|
@@ -2177,12 +2178,12 @@ function hE(D) {
|
|
|
2177
2178
|
value: ((JB = (YB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : YB.legalRepresentative) == null ? void 0 : JB.phone) || "",
|
|
2178
2179
|
onInput: (z) => {
|
|
2179
2180
|
let O = z.target.value;
|
|
2180
|
-
const $ = O.replace(/[^\d+().\-\s]/g, ""),
|
|
2181
|
-
if ($ !== O && (z.target.value = $, O = $),
|
|
2181
|
+
const $ = O.replace(/[^\d+().\-\s]/g, ""), EA = $.replace(/[\s.\-()]/g, "");
|
|
2182
|
+
if ($ !== O && (z.target.value = $, O = $), EA.trim() === "") {
|
|
2182
2183
|
d.setError(o("errorRequired", "Số điện thoại bắt buộc"));
|
|
2183
2184
|
return;
|
|
2184
2185
|
}
|
|
2185
|
-
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(
|
|
2186
|
+
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? d.setError(null) : d.setError(
|
|
2186
2187
|
o("errorInvalidPhone", "Số điện thoại không hợp lệ.")
|
|
2187
2188
|
);
|
|
2188
2189
|
}
|
|
@@ -2285,14 +2286,14 @@ function hE(D) {
|
|
|
2285
2286
|
value: ((yB = (jB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : jB.contactPerson) == null ? void 0 : yB.phone) || "",
|
|
2286
2287
|
onInput: (z) => {
|
|
2287
2288
|
let O = z.target.value;
|
|
2288
|
-
const $ = O.replace(/[^\d+().\-\s]/g, ""),
|
|
2289
|
-
if ($ !== O && (z.target.value = $, O = $),
|
|
2289
|
+
const $ = O.replace(/[^\d+().\-\s]/g, ""), EA = $.replace(/[\s.\-()]/g, "");
|
|
2290
|
+
if ($ !== O && (z.target.value = $, O = $), EA.trim() === "") {
|
|
2290
2291
|
J.setError(
|
|
2291
2292
|
o("errorRequired", "Số điện thoại bắt buộc")
|
|
2292
2293
|
);
|
|
2293
2294
|
return;
|
|
2294
2295
|
}
|
|
2295
|
-
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(
|
|
2296
|
+
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? J.setError(null) : J.setError(
|
|
2296
2297
|
o("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
|
|
2297
2298
|
);
|
|
2298
2299
|
}
|
|
@@ -2390,40 +2391,38 @@ function hE(D) {
|
|
|
2390
2391
|
);
|
|
2391
2392
|
}
|
|
2392
2393
|
});
|
|
2393
|
-
let
|
|
2394
|
+
let IA = 0;
|
|
2394
2395
|
function nA(z) {
|
|
2395
2396
|
return W(this, null, function* () {
|
|
2396
|
-
const O = ++
|
|
2397
|
+
const O = ++IA;
|
|
2397
2398
|
u.setError(null);
|
|
2398
2399
|
try {
|
|
2399
2400
|
const $ = yield dQ(z);
|
|
2400
|
-
let
|
|
2401
|
+
let EA = {
|
|
2401
2402
|
name: "",
|
|
2402
2403
|
address: "",
|
|
2403
2404
|
taxAuthority: "",
|
|
2404
2405
|
taxCode: z
|
|
2405
2406
|
};
|
|
2406
|
-
if (O !==
|
|
2407
|
+
if (O !== IA)
|
|
2407
2408
|
return;
|
|
2408
2409
|
if ($.error)
|
|
2409
|
-
Y.inputEl.value = "",
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
JA
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
return IA.name = $.ten_cty || "", IA.address = $.dia_chi || "", IA.taxCode = z, u.setError(null), IA;
|
|
2424
|
-
}
|
|
2410
|
+
return Y.inputEl.value = "", H.inputEl.value = "", l.setValue && l.setValue("", "", ""), l.setDisabled(!1), u.setError(o("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), EA;
|
|
2411
|
+
if (u.setError(null), Y.inputEl.value = $.ten_cty || "", H.inputEl.value = $.dia_chi || "", $.cqthue_ql) {
|
|
2412
|
+
const DA = (FA) => FA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), xA = DA($.cqthue_ql), JA = y.find((FA) => {
|
|
2413
|
+
const SA = DA(FA.label);
|
|
2414
|
+
return SA.includes(xA) || xA.includes(SA);
|
|
2415
|
+
});
|
|
2416
|
+
JA && (l.setValue && l.setValue(
|
|
2417
|
+
JA.value,
|
|
2418
|
+
JA.label,
|
|
2419
|
+
JA.id
|
|
2420
|
+
), EA.taxAuthority = JA.id || "", l.setDisabled(!1));
|
|
2421
|
+
} else
|
|
2422
|
+
l.setValue && l.setValue("", "", ""), l.setDisabled(!1);
|
|
2423
|
+
return EA.name = $.ten_cty || "", EA.address = $.dia_chi || "", EA.taxCode = z, u.setError(null), EA;
|
|
2425
2424
|
} catch ($) {
|
|
2426
|
-
O ===
|
|
2425
|
+
O === IA && (Tg.error(
|
|
2427
2426
|
o("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
|
|
2428
2427
|
{
|
|
2429
2428
|
autoClose: 5e3,
|
|
@@ -2434,7 +2433,7 @@ function hE(D) {
|
|
|
2434
2433
|
o("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
|
|
2435
2434
|
));
|
|
2436
2435
|
} finally {
|
|
2437
|
-
O ===
|
|
2436
|
+
O === IA && R();
|
|
2438
2437
|
}
|
|
2439
2438
|
});
|
|
2440
2439
|
}
|
|
@@ -2443,7 +2442,7 @@ function hE(D) {
|
|
|
2443
2442
|
const LA = document.createElement("h3");
|
|
2444
2443
|
LA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", LA.innerText = o("unitInfo", "1. Thông tin đơn vị"), uA.appendChild(LA);
|
|
2445
2444
|
const HA = document.createElement("div");
|
|
2446
|
-
HA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(HA), HA.appendChild(u.container), HA.appendChild(Y.container), HA.appendChild(
|
|
2445
|
+
HA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(HA), HA.appendChild(u.container), HA.appendChild(Y.container), HA.appendChild(H.container), HA.appendChild(l.container);
|
|
2447
2446
|
const kA = document.createElement("div");
|
|
2448
2447
|
kA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", uA.appendChild(kA), kA.appendChild(r.container), f.appendChild(uA);
|
|
2449
2448
|
const mA = document.createElement("div");
|
|
@@ -2469,7 +2468,7 @@ function hE(D) {
|
|
|
2469
2468
|
function yA(z) {
|
|
2470
2469
|
tA = !1, YA = !1, zA();
|
|
2471
2470
|
const O = () => {
|
|
2472
|
-
|
|
2471
|
+
x.inputEl.value = "", m.inputEl.value = "", i.inputEl.value = "", X.inputEl.value = "", v.selectEl.value = "", k.selectEl.value = "", x.setError(null), m.setError(null), i.setError(null), X.setError(null), v.setError(null), k.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
|
|
2473
2472
|
}, $ = (DA) => {
|
|
2474
2473
|
if (!DA) return "";
|
|
2475
2474
|
if (/^\d{8}$/.test(DA)) {
|
|
@@ -2480,10 +2479,10 @@ function hE(D) {
|
|
|
2480
2479
|
if (isNaN(SA)) return "";
|
|
2481
2480
|
const bg = String(SA.getDate()).padStart(2, "0"), Hg = String(SA.getMonth() + 1).padStart(2, "0"), Yg = SA.getFullYear();
|
|
2482
2481
|
return `${bg}/${Hg}/${Yg}`;
|
|
2483
|
-
},
|
|
2484
|
-
|
|
2482
|
+
}, EA = new Image();
|
|
2483
|
+
EA.src = URL.createObjectURL(z), EA.onload = () => W(null, null, function* () {
|
|
2485
2484
|
try {
|
|
2486
|
-
const DA = yield nE(
|
|
2485
|
+
const DA = yield nE(EA).then((xA) => JSON.parse(xA).status !== "success" ? (tA = !0, YA = !1, O(), zA(), null) : JSON.parse(xA).data);
|
|
2487
2486
|
if (DA) {
|
|
2488
2487
|
tA = !1, YA = !0, zA();
|
|
2489
2488
|
const JA = Object.values(DA).every((eg) => !eg);
|
|
@@ -2496,7 +2495,7 @@ function hE(D) {
|
|
|
2496
2495
|
const { address: FA, date_of_birth: SA, full_name: bg, id_number: Hg, sex: Yg } = DA;
|
|
2497
2496
|
if (!Hg || !/^\d{12}$/.test(Hg) ? (tg(
|
|
2498
2497
|
o("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
2499
|
-
),
|
|
2498
|
+
), x.inputEl.value = "") : (x.inputEl.value = Hg, x.setError(null)), m.inputEl.value = bg || "", i.inputEl.value = $(SA), X.inputEl.value = FA || "", Yg) {
|
|
2500
2499
|
const eg = wC.find(
|
|
2501
2500
|
(jg) => jg.label.toLowerCase() === Yg.toLowerCase()
|
|
2502
2501
|
);
|
|
@@ -2511,9 +2510,9 @@ function hE(D) {
|
|
|
2511
2510
|
});
|
|
2512
2511
|
}
|
|
2513
2512
|
function KA(z, O, $) {
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2516
|
-
yield gE(
|
|
2513
|
+
const EA = new Image();
|
|
2514
|
+
EA.src = URL.createObjectURL(z), EA.onload = () => W(null, null, function* () {
|
|
2515
|
+
yield gE(EA).then((DA) => {
|
|
2517
2516
|
var JA, FA;
|
|
2518
2517
|
const xA = JSON.parse(DA);
|
|
2519
2518
|
O && !((JA = xA == null ? void 0 : xA.data) != null && JA.isFront) ? tg(
|
|
@@ -2536,24 +2535,24 @@ function hE(D) {
|
|
|
2536
2535
|
frontFile: A == null ? void 0 : A.idCard,
|
|
2537
2536
|
backFile: A == null ? void 0 : A.idCardBack,
|
|
2538
2537
|
onFrontChange: (z) => W(null, null, function* () {
|
|
2539
|
-
var $,
|
|
2538
|
+
var $, EA;
|
|
2540
2539
|
if (N = z, KA(z, !0, !1), WA() || ng() || !fg()) {
|
|
2541
2540
|
tA = !1, YA = !1, zA(), R();
|
|
2542
2541
|
return;
|
|
2543
2542
|
}
|
|
2544
|
-
if ((
|
|
2543
|
+
if ((EA = ($ = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $.legalRepresentative) == null ? void 0 : EA.idCard) {
|
|
2545
2544
|
R();
|
|
2546
2545
|
return;
|
|
2547
2546
|
}
|
|
2548
2547
|
yA(z);
|
|
2549
2548
|
}),
|
|
2550
2549
|
onBackChange: (z) => W(null, null, function* () {
|
|
2551
|
-
var $,
|
|
2550
|
+
var $, EA;
|
|
2552
2551
|
if (L = z, KA(z, !1, !0), WA() || ng() || !_A()) {
|
|
2553
2552
|
tA = !1, YA = !1, zA(), R();
|
|
2554
2553
|
return;
|
|
2555
2554
|
}
|
|
2556
|
-
if ((
|
|
2555
|
+
if ((EA = ($ = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $.legalRepresentative) == null ? void 0 : EA.idCardBack) {
|
|
2557
2556
|
R();
|
|
2558
2557
|
return;
|
|
2559
2558
|
}
|
|
@@ -2567,7 +2566,7 @@ function hE(D) {
|
|
|
2567
2566
|
const mg = document.createElement("div");
|
|
2568
2567
|
mg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", $A.appendChild(mg), mg.appendChild(i.container), mg.appendChild(v.container), VA.appendChild($A);
|
|
2569
2568
|
const jA = document.createElement("div");
|
|
2570
|
-
jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(
|
|
2569
|
+
jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(x.container), jA.appendChild(G.container), jA.appendChild(d.container), jA.appendChild(k.container), mA.appendChild(VA), mA.appendChild(jA), mA.appendChild(X.container), mA.appendChild(T.container);
|
|
2571
2570
|
const hg = document.createElement("ul");
|
|
2572
2571
|
hg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
2573
2572
|
const XA = document.createElement("li");
|
|
@@ -2670,7 +2669,7 @@ function hE(D) {
|
|
|
2670
2669
|
/[\s.\-()]/g,
|
|
2671
2670
|
""
|
|
2672
2671
|
), JA = O.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), FA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
|
|
2673
|
-
return !(!FA.test(DA) || !FA.test(JA) || !/^\d{12}$/.test(O.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(O.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(O.invoiceSymbol) || !z.license || !z.
|
|
2672
|
+
return !(!FA.test(DA) || !FA.test(JA) || !/^\d{12}$/.test(O.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(O.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(O.invoiceSymbol) || !z.license || !z.idCard || !z.idCardBack);
|
|
2674
2673
|
}
|
|
2675
2674
|
function R() {
|
|
2676
2675
|
b.disabled = !qg() || !iA || WA() || ng() || r.getError() || T.getError();
|
|
@@ -2683,7 +2682,7 @@ function hE(D) {
|
|
|
2683
2682
|
previousEInvoiceProvider: (O = w == null ? void 0 : w.getValue()) != null ? O : "",
|
|
2684
2683
|
organization: {
|
|
2685
2684
|
name: Y == null ? void 0 : Y.getValue(),
|
|
2686
|
-
address:
|
|
2685
|
+
address: H == null ? void 0 : H.getValue(),
|
|
2687
2686
|
taxCode: u == null ? void 0 : u.getValue(),
|
|
2688
2687
|
taxAuthority: l == null ? void 0 : l.getValue()
|
|
2689
2688
|
},
|
|
@@ -2698,7 +2697,7 @@ function hE(D) {
|
|
|
2698
2697
|
dob: i == null ? void 0 : i.getValue(),
|
|
2699
2698
|
gender: v == null ? void 0 : v.getValue(),
|
|
2700
2699
|
phone: d == null ? void 0 : d.getValue(),
|
|
2701
|
-
idCard:
|
|
2700
|
+
idCard: x == null ? void 0 : x.getValue(),
|
|
2702
2701
|
passportNumber: G == null ? void 0 : G.getValue(),
|
|
2703
2702
|
nationality: k == null ? void 0 : k.getValue(),
|
|
2704
2703
|
permanentAddress: X == null ? void 0 : X.getValue()
|
|
@@ -2716,7 +2715,7 @@ function hE(D) {
|
|
|
2716
2715
|
[
|
|
2717
2716
|
Y,
|
|
2718
2717
|
u,
|
|
2719
|
-
|
|
2718
|
+
H,
|
|
2720
2719
|
P,
|
|
2721
2720
|
q,
|
|
2722
2721
|
J,
|
|
@@ -2724,7 +2723,7 @@ function hE(D) {
|
|
|
2724
2723
|
m,
|
|
2725
2724
|
i,
|
|
2726
2725
|
d,
|
|
2727
|
-
|
|
2726
|
+
x,
|
|
2728
2727
|
X,
|
|
2729
2728
|
h,
|
|
2730
2729
|
w
|
|
@@ -2832,15 +2831,15 @@ function eE({
|
|
|
2832
2831
|
e.appendChild(u), I.appendChild(e);
|
|
2833
2832
|
const Y = document.createElement("div");
|
|
2834
2833
|
Y.className = "wgt:mt-4";
|
|
2835
|
-
const
|
|
2836
|
-
|
|
2834
|
+
const H = document.createElement("span");
|
|
2835
|
+
H.className = [
|
|
2837
2836
|
"wgt:block",
|
|
2838
2837
|
"wgt:text-2xl",
|
|
2839
2838
|
"wgt:font-bold",
|
|
2840
2839
|
C ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
2841
2840
|
].join(" ");
|
|
2842
2841
|
let l = t ? (q = g == null ? void 0 : g.renewPrice) != null ? q : 0 : (J = g == null ? void 0 : g.price) != null ? J : 0;
|
|
2843
|
-
|
|
2842
|
+
H.innerText = lA((g == null ? void 0 : g.limit) * l), Y.appendChild(H);
|
|
2844
2843
|
const P = document.createElement("span");
|
|
2845
2844
|
return P.className = "wgt:text-sm wgt:text-text-sub-600", P.innerText = `VND/${o("package")}`, Y.appendChild(P), n.appendChild(Y), { container: n };
|
|
2846
2845
|
}
|
|
@@ -2908,7 +2907,7 @@ function aC({
|
|
|
2908
2907
|
}
|
|
2909
2908
|
};
|
|
2910
2909
|
}
|
|
2911
|
-
const aE = "1.
|
|
2910
|
+
const aE = "1.96.1";
|
|
2912
2911
|
function oE(E) {
|
|
2913
2912
|
return W(this, arguments, function* ({ search: g, bank: A }) {
|
|
2914
2913
|
return (yield GA.get(`${zg}`, {
|
|
@@ -3156,7 +3155,7 @@ function PE({
|
|
|
3156
3155
|
function Y(l) {
|
|
3157
3156
|
return C.find((P) => P._id === l) || null;
|
|
3158
3157
|
}
|
|
3159
|
-
function
|
|
3158
|
+
function H() {
|
|
3160
3159
|
f.contains(u) && f.removeChild(u);
|
|
3161
3160
|
}
|
|
3162
3161
|
return {
|
|
@@ -3171,18 +3170,20 @@ function PE({
|
|
|
3171
3170
|
getInvoicePackages: () => C,
|
|
3172
3171
|
getFilteredInvoiceOptions: () => Q,
|
|
3173
3172
|
findInvoiceById: Y,
|
|
3174
|
-
removeLoading:
|
|
3173
|
+
removeLoading: H
|
|
3175
3174
|
};
|
|
3176
3175
|
}
|
|
3177
|
-
function qE() {
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3176
|
+
function qE(g = !1) {
|
|
3177
|
+
const A = document.createElement("div");
|
|
3178
|
+
A.className = "wgt:flex wgt:flex-col wgt:gap-4";
|
|
3179
|
+
const E = document.createElement("h2");
|
|
3180
|
+
if (E.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", E.innerText = o("selectSignaturePackage"), !g) {
|
|
3181
|
+
const Q = document.createElement("span");
|
|
3182
|
+
Q.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", Q.innerText = "*", E.appendChild(Q);
|
|
3183
|
+
}
|
|
3184
|
+
A.appendChild(E);
|
|
3184
3185
|
const B = document.createElement("div");
|
|
3185
|
-
|
|
3186
|
+
A.appendChild(B);
|
|
3186
3187
|
const C = document.createElement("div");
|
|
3187
3188
|
return C.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", C.innerHTML = `
|
|
3188
3189
|
<div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
|
|
@@ -3190,7 +3191,7 @@ function qE() {
|
|
|
3190
3191
|
<span class="wgt:text-sm wgt:text-text-sub-600">${o("loading")}...</span>
|
|
3191
3192
|
</div>
|
|
3192
3193
|
`, B.appendChild(C), {
|
|
3193
|
-
container:
|
|
3194
|
+
container: A,
|
|
3194
3195
|
signatureSelectorWrapper: B
|
|
3195
3196
|
};
|
|
3196
3197
|
}
|
|
@@ -3281,11 +3282,11 @@ function lE(q) {
|
|
|
3281
3282
|
setSelectedPromotions: f,
|
|
3282
3283
|
setPackages: u,
|
|
3283
3284
|
setPromotionCodes: Y,
|
|
3284
|
-
isNewCustomer:
|
|
3285
|
+
isNewCustomer: H,
|
|
3285
3286
|
savedQuantities: l,
|
|
3286
3287
|
setSavedQuantities: P
|
|
3287
3288
|
}) {
|
|
3288
|
-
let J = "", M = B ? B._id : null, m = C ? C._id : null, i = D ? D.map((K) => K) : [], v = [], d = [],
|
|
3289
|
+
let J = "", M = B ? B._id : null, m = C ? C._id : null, i = D ? D.map((K) => K) : [], v = [], d = [], x = [], G = [], k = null, X = (l == null ? void 0 : l.qtyRegFee) || 1, U = (l == null ? void 0 : l.qtyInvoicePkg) || 1, j = (l == null ? void 0 : l.qtySignaturePkg) || 1;
|
|
3289
3290
|
function F() {
|
|
3290
3291
|
P && P({
|
|
3291
3292
|
qtyRegFee: X,
|
|
@@ -3311,7 +3312,7 @@ function lE(q) {
|
|
|
3311
3312
|
invoiceSelectorWrapper: y,
|
|
3312
3313
|
setInvoicePackages: AA,
|
|
3313
3314
|
getInvoicePackages: S,
|
|
3314
|
-
getFilteredInvoiceOptions:
|
|
3315
|
+
getFilteredInvoiceOptions: IA,
|
|
3315
3316
|
setFilteredInvoiceOptions: nA,
|
|
3316
3317
|
findInvoiceById: uA,
|
|
3317
3318
|
removeLoading: LA
|
|
@@ -3324,7 +3325,7 @@ function lE(q) {
|
|
|
3324
3325
|
}
|
|
3325
3326
|
});
|
|
3326
3327
|
L.appendChild(b);
|
|
3327
|
-
const { container: HA, signatureSelectorWrapper: kA } = qE();
|
|
3328
|
+
const { container: HA, signatureSelectorWrapper: kA } = qE(!H);
|
|
3328
3329
|
L.appendChild(HA);
|
|
3329
3330
|
const mA = document.createElement("div");
|
|
3330
3331
|
mA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", mA.innerHTML = `
|
|
@@ -3365,7 +3366,7 @@ function lE(q) {
|
|
|
3365
3366
|
code: K.code,
|
|
3366
3367
|
quantity: K.quantity
|
|
3367
3368
|
}), _.length > 0 && _.forEach((aA) => {
|
|
3368
|
-
const iA =
|
|
3369
|
+
const iA = x[aA];
|
|
3369
3370
|
iA.reward.packageCodes.length > 0 && iA.reward.packageCodes.forEach((qA) => {
|
|
3370
3371
|
V.push({
|
|
3371
3372
|
code: qA,
|
|
@@ -3386,7 +3387,7 @@ function lE(q) {
|
|
|
3386
3387
|
],
|
|
3387
3388
|
packages: V,
|
|
3388
3389
|
promotionCodes: _,
|
|
3389
|
-
isRenew: !
|
|
3390
|
+
isRenew: !H
|
|
3390
3391
|
});
|
|
3391
3392
|
I(aA.orderId), g();
|
|
3392
3393
|
} catch (aA) {
|
|
@@ -3404,7 +3405,7 @@ function lE(q) {
|
|
|
3404
3405
|
(gA) => gA._id === m
|
|
3405
3406
|
);
|
|
3406
3407
|
let Z = null;
|
|
3407
|
-
|
|
3408
|
+
H && !(K != null && K.withoutInitialFee) ? (Z = OA(PA({}, d[0]), {
|
|
3408
3409
|
quantity: X
|
|
3409
3410
|
}), Q(Z)) : Q(null);
|
|
3410
3411
|
let _ = OA(PA({}, K), { quantity: U }), CA = OA(PA({}, QA), { quantity: j });
|
|
@@ -3433,7 +3434,7 @@ function lE(q) {
|
|
|
3433
3434
|
] = yield Promise.allSettled([
|
|
3434
3435
|
fE(),
|
|
3435
3436
|
DE({ bank: c }),
|
|
3436
|
-
uE({ bank: c, hasRenew: !
|
|
3437
|
+
uE({ bank: c, hasRenew: !H }),
|
|
3437
3438
|
iE({ bank: c })
|
|
3438
3439
|
]);
|
|
3439
3440
|
if (_.status === "fulfilled" ? d = _.value || [] : (console.error(
|
|
@@ -3442,7 +3443,7 @@ function lE(q) {
|
|
|
3442
3443
|
), Tg.error(
|
|
3443
3444
|
o("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
3444
3445
|
), d = []), Z.status === "fulfilled" ? (((K = Z == null ? void 0 : Z.value) == null ? void 0 : K.length) > 0 && Z.value.forEach((V) => {
|
|
3445
|
-
V.codes.length > 0 && (
|
|
3446
|
+
V.codes.length > 0 && (x[V.codes[0].code] = {
|
|
3446
3447
|
id: V.id,
|
|
3447
3448
|
name: V.name,
|
|
3448
3449
|
nameEn: V.nameEn,
|
|
@@ -3457,10 +3458,10 @@ function lE(q) {
|
|
|
3457
3458
|
isDisabled: !1,
|
|
3458
3459
|
reward: V.reward
|
|
3459
3460
|
});
|
|
3460
|
-
}), Object.keys(
|
|
3461
|
-
(V) =>
|
|
3461
|
+
}), Object.keys(x).length > 0 && (i = D || Object.keys(x).filter(
|
|
3462
|
+
(V) => x[V].bank === c && x[V].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && x[V].limit > x[V].used
|
|
3462
3463
|
), rg())) : console.error("Failed to load promotions:", Z.reason), CA.status === "fulfilled") {
|
|
3463
|
-
const V =
|
|
3464
|
+
const V = H ? CA.value : CA.value.filter((p) => p.renewPrice !== 0);
|
|
3464
3465
|
if (AA(V || []), CA.value.length > 0) {
|
|
3465
3466
|
const p = CA.value.find(
|
|
3466
3467
|
(aA) => G.includes(aA.code)
|
|
@@ -3480,7 +3481,7 @@ function lE(q) {
|
|
|
3480
3481
|
const V = v.find(
|
|
3481
3482
|
(p) => G.includes(p.code)
|
|
3482
3483
|
);
|
|
3483
|
-
m = C ? C._id : V ? V._id : (QA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : QA._id;
|
|
3484
|
+
m = C ? C._id : V ? V._id : H ? (QA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : QA._id : null;
|
|
3484
3485
|
}
|
|
3485
3486
|
} else
|
|
3486
3487
|
console.error(
|
|
@@ -3503,9 +3504,9 @@ function lE(q) {
|
|
|
3503
3504
|
fg(), mg(), hg(), NA(), vA();
|
|
3504
3505
|
}
|
|
3505
3506
|
function sg(K, QA, Z) {
|
|
3506
|
-
const _ = Object.values(
|
|
3507
|
+
const _ = Object.values(x).find(
|
|
3507
3508
|
(p) => p.bank === c && p.appliedPackages.includes(K)
|
|
3508
|
-
), CA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(
|
|
3509
|
+
), CA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(x).find(
|
|
3509
3510
|
(p) => p.bank === c && p.appliedPackages.includes(QA)
|
|
3510
3511
|
), V = gA && !gA.isDisabled && !(gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && gA.limit !== gA.used;
|
|
3511
3512
|
if (CA && !V) {
|
|
@@ -3522,14 +3523,14 @@ function lE(q) {
|
|
|
3522
3523
|
}
|
|
3523
3524
|
let _A = null;
|
|
3524
3525
|
function fg() {
|
|
3525
|
-
if (y.innerHTML = "",
|
|
3526
|
+
if (y.innerHTML = "", IA().length > 0)
|
|
3526
3527
|
_A = aC({
|
|
3527
3528
|
type: "service",
|
|
3528
|
-
packageOptions:
|
|
3529
|
+
packageOptions: IA(),
|
|
3529
3530
|
disCountedPackages: G,
|
|
3530
3531
|
promotion: o("discount"),
|
|
3531
3532
|
selectedPackageId: M,
|
|
3532
|
-
isRenew: !
|
|
3533
|
+
isRenew: !H,
|
|
3533
3534
|
handlePackageSelect: (K) => {
|
|
3534
3535
|
var _, CA;
|
|
3535
3536
|
let QA = (_ = S().find(
|
|
@@ -3588,7 +3589,7 @@ function lE(q) {
|
|
|
3588
3589
|
// getCurrentLanguage() === "vi"
|
|
3589
3590
|
// ? initPackages[0].name
|
|
3590
3591
|
// : initPackages[0].nameEn,
|
|
3591
|
-
isChecked:
|
|
3592
|
+
isChecked: H && !(K != null && K.withoutInitialFee)
|
|
3592
3593
|
});
|
|
3593
3594
|
jA.appendChild(QA);
|
|
3594
3595
|
}
|
|
@@ -3601,8 +3602,8 @@ function lE(q) {
|
|
|
3601
3602
|
), QA = v.find(
|
|
3602
3603
|
(Z) => Z._id === m
|
|
3603
3604
|
);
|
|
3604
|
-
Object.keys(
|
|
3605
|
-
const _ =
|
|
3605
|
+
Object.keys(x).forEach((Z) => {
|
|
3606
|
+
const _ = x[Z];
|
|
3606
3607
|
if (_.bank !== c)
|
|
3607
3608
|
return;
|
|
3608
3609
|
let CA = !1;
|
|
@@ -3618,10 +3619,10 @@ function lE(q) {
|
|
|
3618
3619
|
}), rg();
|
|
3619
3620
|
}
|
|
3620
3621
|
function rg() {
|
|
3621
|
-
G = Object.values(
|
|
3622
|
+
G = Object.values(x).filter((K) => K.bank === c).map((K) => K.appliedPackages[0]);
|
|
3622
3623
|
}
|
|
3623
3624
|
function NA() {
|
|
3624
|
-
if (Object.values(
|
|
3625
|
+
if (Object.values(x).filter(
|
|
3625
3626
|
(p) => p.bank === c
|
|
3626
3627
|
).length === 0) {
|
|
3627
3628
|
L.contains(XA) && L.removeChild(XA);
|
|
@@ -3634,7 +3635,7 @@ function lE(q) {
|
|
|
3634
3635
|
Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3635
3636
|
const _ = document.createElement("div");
|
|
3636
3637
|
_.className = "wgt:flex wgt:min-w-[500px] wgt:h-11 wgt:items-center wgt:gap-3 wgt:px-3 wgt:py-2 wgt:rounded-lg wgt:bg-white wgt:border wgt:border-[#E4E7EC] wgt:@max-2xl:min-w-full wgt:@max-2xl:flex-wrap wgt:@max-2xl:h-fit", Z.appendChild(_), i && i.length > 0 && i.filter((aA) => {
|
|
3637
|
-
const iA = Object.values(
|
|
3638
|
+
const iA = Object.values(x).find(
|
|
3638
3639
|
(qA) => qA.code === aA
|
|
3639
3640
|
);
|
|
3640
3641
|
return iA && iA.bank === c;
|
|
@@ -3667,7 +3668,7 @@ function lE(q) {
|
|
|
3667
3668
|
Z.appendChild(CA), XA.appendChild(Z);
|
|
3668
3669
|
const gA = document.createElement("div");
|
|
3669
3670
|
gA.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", XA.appendChild(gA);
|
|
3670
|
-
const V = Object.values(
|
|
3671
|
+
const V = Object.values(x).filter(
|
|
3671
3672
|
(p) => p.bank === c
|
|
3672
3673
|
);
|
|
3673
3674
|
if (V.length > 0)
|
|
@@ -3702,7 +3703,7 @@ function lE(q) {
|
|
|
3702
3703
|
const K = S().find(
|
|
3703
3704
|
(R) => R._id === M
|
|
3704
3705
|
);
|
|
3705
|
-
if (
|
|
3706
|
+
if (H && (d == null ? void 0 : d.length) > 0 && !(K != null && K.withoutInitialFee)) {
|
|
3706
3707
|
const R = document.createElement("tr");
|
|
3707
3708
|
R.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
|
|
3708
3709
|
const BA = document.createElement("td");
|
|
@@ -3759,7 +3760,7 @@ function lE(q) {
|
|
|
3759
3760
|
cA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
|
|
3760
3761
|
const wA = document.createElement("button");
|
|
3761
3762
|
wA.type = "button", wA.ariaLabel = o("decrease");
|
|
3762
|
-
const oA =
|
|
3763
|
+
const oA = H ? (Cg = R == null ? void 0 : R.price) != null ? Cg : 0 : (kg = R == null ? void 0 : R.renewPrice) != null ? kg : 0;
|
|
3763
3764
|
wA.disabled = U <= 1 || oA === 0, wA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", wA.innerText = "–", wA.addEventListener("click", () => {
|
|
3764
3765
|
U > 1 && (U -= 1, vA());
|
|
3765
3766
|
}), cA.appendChild(wA);
|
|
@@ -3836,7 +3837,7 @@ function lE(q) {
|
|
|
3836
3837
|
}
|
|
3837
3838
|
}
|
|
3838
3839
|
const QA = i.map(
|
|
3839
|
-
(R) => Object.values(
|
|
3840
|
+
(R) => Object.values(x).find(
|
|
3840
3841
|
(BA) => BA.code === R && BA.bank === c
|
|
3841
3842
|
)
|
|
3842
3843
|
).filter((R) => R !== void 0);
|
|
@@ -3861,7 +3862,7 @@ function lE(q) {
|
|
|
3861
3862
|
"package"
|
|
3862
3863
|
)} ${(TA = (sA = R == null ? void 0 : R.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, eA.style.color = "#12B76A") : eA.innerText = "", BA.appendChild(eA), tA.appendChild(BA);
|
|
3863
3864
|
});
|
|
3864
|
-
const _ =
|
|
3865
|
+
const _ = H && d.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = d[0]) == null ? void 0 : Rg.price) * X : 0, CA = uA(M), gA = CA ? H ? (Pg = CA.price) != null ? Pg : 0 : (qg = CA.renewPrice) != null ? qg : 0 : 0, V = CA ? gA * CA.limit * U : 0, p = w(m), aA = p ? p.price * p.limit * j : 0, iA = _ + V + aA - Z;
|
|
3865
3866
|
a(iA);
|
|
3866
3867
|
{
|
|
3867
3868
|
const R = document.createElement("tr");
|
|
@@ -3894,37 +3895,37 @@ function HE({
|
|
|
3894
3895
|
const D = document.createElement("div");
|
|
3895
3896
|
D.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
|
|
3896
3897
|
const e = document.createElement("div");
|
|
3897
|
-
e.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((
|
|
3898
|
+
e.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((x) => {
|
|
3898
3899
|
const G = document.createElement("img");
|
|
3899
|
-
G.src =
|
|
3900
|
+
G.src = x, G.alt = "Logo", G.className = "wgt:w-14 wgt:object-contain", e.appendChild(G);
|
|
3900
3901
|
}), D.appendChild(e));
|
|
3901
3902
|
const f = document.createElement("div");
|
|
3902
3903
|
f.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
|
|
3903
3904
|
const u = document.createElement("img");
|
|
3904
3905
|
u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", f.appendChild(u), D.appendChild(f);
|
|
3905
3906
|
const Y = document.createElement("div");
|
|
3906
|
-
Y.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((
|
|
3907
|
+
Y.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((x) => {
|
|
3907
3908
|
const G = document.createElement("img");
|
|
3908
|
-
G.src =
|
|
3909
|
+
G.src = x, G.alt = "Logo", G.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, Y.appendChild(G);
|
|
3909
3910
|
}), D.appendChild(Y);
|
|
3910
|
-
const
|
|
3911
|
-
|
|
3911
|
+
const H = document.createElement("div");
|
|
3912
|
+
H.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
|
|
3912
3913
|
const l = document.createElement("h3");
|
|
3913
|
-
l.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", l.innerText = B,
|
|
3914
|
+
l.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", l.innerText = B, H.appendChild(l);
|
|
3914
3915
|
const P = document.createElement("p");
|
|
3915
3916
|
P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${o(
|
|
3916
3917
|
"accountNumber"
|
|
3917
|
-
)}: <span class="wgt:font-medium">${C}</span>`,
|
|
3918
|
+
)}: <span class="wgt:font-medium">${C}</span>`, H.appendChild(P);
|
|
3918
3919
|
const q = document.createElement("p");
|
|
3919
3920
|
q.className = "wgt:text-sm wgt:text-grey-8", q.innerHTML = `${o(
|
|
3920
3921
|
"beneficiaryBank"
|
|
3921
|
-
)}: <span class="wgt:font-medium">${Q}</span>`,
|
|
3922
|
+
)}: <span class="wgt:font-medium">${Q}</span>`, H.appendChild(q), D.appendChild(H), c.appendChild(D), a.appendChild(c);
|
|
3922
3923
|
const J = document.createElement("div");
|
|
3923
3924
|
J.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
|
|
3924
3925
|
const M = document.createElement("div"), m = document.createElement("h3");
|
|
3925
3926
|
m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = o("paymentInstructionsTitle"), M.appendChild(m);
|
|
3926
3927
|
const i = document.createElement("ol");
|
|
3927
|
-
i.className = "wgt:space-y-4", t.forEach((
|
|
3928
|
+
i.className = "wgt:space-y-4", t.forEach((x, G) => {
|
|
3928
3929
|
const k = document.createElement("li");
|
|
3929
3930
|
k.className = "wgt:flex wgt:items-start";
|
|
3930
3931
|
const X = document.createElement("div");
|
|
@@ -3934,22 +3935,22 @@ function HE({
|
|
|
3934
3935
|
const j = document.createElement("span");
|
|
3935
3936
|
j.className = "wgt:text-white wgt:text-sm wgt:font-semibold", j.innerText = String(G + 1), U.appendChild(j), X.appendChild(U);
|
|
3936
3937
|
const F = document.createElement("p");
|
|
3937
|
-
F.className = "wgt:ml-3 wgt:text-text-sub-600", F.innerText =
|
|
3938
|
+
F.className = "wgt:ml-3 wgt:text-text-sub-600", F.innerText = x, k.appendChild(X), k.appendChild(F), i.appendChild(k);
|
|
3938
3939
|
}), M.appendChild(i), J.appendChild(M);
|
|
3939
3940
|
const v = document.createElement("div");
|
|
3940
3941
|
v.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
|
|
3941
3942
|
const d = document.createElement("img");
|
|
3942
3943
|
return d.src = n, d.alt = "QR payment illustration", d.className = "wgt:h-full wgt:object-contain", v.appendChild(d), J.appendChild(v), a.appendChild(J), {
|
|
3943
3944
|
container: a,
|
|
3944
|
-
update(
|
|
3945
|
-
|
|
3945
|
+
update(x = {}) {
|
|
3946
|
+
x.qrSrc != null && (u.src = x.qrSrc), x.logos && (Y.innerHTML = "", x.logos.forEach((G) => {
|
|
3946
3947
|
const k = document.createElement("img");
|
|
3947
3948
|
k.src = G, k.alt = "Logo", k.className = "wgt:w-8 wgt:object-contain", Y.appendChild(k);
|
|
3948
|
-
})),
|
|
3949
|
+
})), x.accountName != null && (l.innerText = x.accountName), x.accountNumber != null && (P.innerHTML = `${o(
|
|
3949
3950
|
"accountNumber"
|
|
3950
|
-
)}: <span class="wgt:font-medium">${
|
|
3951
|
+
)}: <span class="wgt:font-medium">${x.accountNumber}</span>`), x.bankName != null && (q.innerHTML = `${o(
|
|
3951
3952
|
"beneficiaryBank"
|
|
3952
|
-
)}: <span class="wgt:font-medium">${
|
|
3953
|
+
)}: <span class="wgt:font-medium">${x.bankName}</span>`), x.instructions && (i.innerHTML = "", x.instructions.forEach((G, k) => {
|
|
3953
3954
|
const X = document.createElement("li");
|
|
3954
3955
|
X.className = "wgt:flex wgt:items-start";
|
|
3955
3956
|
const U = document.createElement("div");
|
|
@@ -3960,7 +3961,7 @@ function HE({
|
|
|
3960
3961
|
F.className = "wgt:text-white wgt:text-sm wgt:font-semibold", F.innerText = String(k + 1), j.appendChild(F), U.appendChild(j);
|
|
3961
3962
|
const w = document.createElement("p");
|
|
3962
3963
|
w.className = "wgt:ml-3 wgt:text-text-sub-600", w.innerText = G, X.appendChild(U), X.appendChild(w), i.appendChild(X);
|
|
3963
|
-
})),
|
|
3964
|
+
})), x.illustrationSrc != null && (d.src = x.illustrationSrc);
|
|
3964
3965
|
}
|
|
3965
3966
|
};
|
|
3966
3967
|
}
|
|
@@ -4050,28 +4051,28 @@ function dE({
|
|
|
4050
4051
|
"wgt:gap-10",
|
|
4051
4052
|
"wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"
|
|
4052
4053
|
].join(" ");
|
|
4053
|
-
const
|
|
4054
|
-
|
|
4054
|
+
const H = document.createElement("div");
|
|
4055
|
+
H.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
4055
4056
|
const l = document.createElement("h2");
|
|
4056
|
-
l.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", l.innerText = o("orderInfo"),
|
|
4057
|
+
l.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", l.innerText = o("orderInfo"), H.appendChild(l);
|
|
4057
4058
|
const P = document.createElement("div");
|
|
4058
4059
|
P.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4059
4060
|
const q = document.createElement("h4");
|
|
4060
4061
|
q.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", q.innerText = o("provider");
|
|
4061
4062
|
const J = document.createElement("img");
|
|
4062
|
-
g && g.logoUrl && (J.src = g.logoUrl, J.alt = g.name, J.className = "wgt:h-6 wgt:object-contain"), P.appendChild(q), P.appendChild(J),
|
|
4063
|
+
g && g.logoUrl && (J.src = g.logoUrl, J.alt = g.name, J.className = "wgt:h-6 wgt:object-contain"), P.appendChild(q), P.appendChild(J), H.appendChild(P);
|
|
4063
4064
|
const M = document.createElement("div");
|
|
4064
4065
|
M.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4065
4066
|
const m = document.createElement("h4");
|
|
4066
4067
|
m.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", m.innerText = o("subscriptionPackage");
|
|
4067
4068
|
const i = document.createElement("span");
|
|
4068
|
-
i.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", i.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", M.appendChild(m), M.appendChild(i),
|
|
4069
|
+
i.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", i.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", M.appendChild(m), M.appendChild(i), H.appendChild(M);
|
|
4069
4070
|
const v = document.createElement("div");
|
|
4070
4071
|
v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4071
4072
|
const d = document.createElement("h4");
|
|
4072
4073
|
d.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", d.innerText = o("digitalSignaturePackage");
|
|
4073
|
-
const
|
|
4074
|
-
if (
|
|
4074
|
+
const x = document.createElement("span");
|
|
4075
|
+
if (x.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", x.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(d), v.appendChild(x), H.appendChild(v), Q && Q.length > 0) {
|
|
4075
4076
|
const F = document.createElement("div");
|
|
4076
4077
|
F.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
4077
4078
|
const w = document.createElement("h4");
|
|
@@ -4080,16 +4081,16 @@ function dE({
|
|
|
4080
4081
|
h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((r) => {
|
|
4081
4082
|
const T = document.createElement("div");
|
|
4082
4083
|
T.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", T.innerText = r, h.appendChild(T);
|
|
4083
|
-
}), F.appendChild(w), F.appendChild(h),
|
|
4084
|
+
}), F.appendChild(w), F.appendChild(h), H.appendChild(F);
|
|
4084
4085
|
}
|
|
4085
4086
|
const G = document.createElement("hr");
|
|
4086
|
-
|
|
4087
|
+
H.appendChild(G);
|
|
4087
4088
|
const k = document.createElement("div");
|
|
4088
4089
|
k.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4089
4090
|
const X = document.createElement("h4");
|
|
4090
4091
|
X.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", X.innerText = o("paymentAmount");
|
|
4091
4092
|
const U = document.createElement("span");
|
|
4092
|
-
U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, k.appendChild(X), k.appendChild(U),
|
|
4093
|
+
U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, k.appendChild(X), k.appendChild(U), H.appendChild(k), Y.appendChild(H);
|
|
4093
4094
|
const j = Eg({
|
|
4094
4095
|
title: o("cancelTransaction"),
|
|
4095
4096
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
@@ -4989,7 +4990,7 @@ function zE() {
|
|
|
4989
4990
|
if (!Q.isValid(e))
|
|
4990
4991
|
throw new Error("Invalid QR Code version");
|
|
4991
4992
|
typeof u == "undefined" && (u = C.BYTE);
|
|
4992
|
-
const Y = A.getSymbolTotalCodewords(e),
|
|
4993
|
+
const Y = A.getSymbolTotalCodewords(e), H = E.getTotalCodewordsCount(e, f), l = (Y - H) * 8;
|
|
4993
4994
|
if (u === C.MIXED) return l;
|
|
4994
4995
|
const P = l - a(u, e);
|
|
4995
4996
|
switch (u) {
|
|
@@ -5194,8 +5195,8 @@ function UE() {
|
|
|
5194
5195
|
D.hasOwnProperty(c) && (e = D[c], f = s + e, u = t[c], Y = typeof t[c] == "undefined", (Y || u > f) && (t[c] = f, n.push(c, f), Q[c] = a));
|
|
5195
5196
|
}
|
|
5196
5197
|
if (typeof C != "undefined" && typeof t[C] == "undefined") {
|
|
5197
|
-
var
|
|
5198
|
-
throw new Error(
|
|
5198
|
+
var H = ["Could not find a path from ", B, " to ", C, "."].join("");
|
|
5199
|
+
throw new Error(H);
|
|
5199
5200
|
}
|
|
5200
5201
|
return Q;
|
|
5201
5202
|
},
|
|
@@ -5251,13 +5252,13 @@ var OC;
|
|
|
5251
5252
|
function SE() {
|
|
5252
5253
|
return OC || (OC = 1, function(g) {
|
|
5253
5254
|
const A = ig(), E = bE(), B = jE(), C = yE(), Q = KE(), t = BQ(), n = ug(), I = UE();
|
|
5254
|
-
function a(
|
|
5255
|
-
return unescape(encodeURIComponent(
|
|
5255
|
+
function a(H) {
|
|
5256
|
+
return unescape(encodeURIComponent(H)).length;
|
|
5256
5257
|
}
|
|
5257
|
-
function c(
|
|
5258
|
+
function c(H, l, P) {
|
|
5258
5259
|
const q = [];
|
|
5259
5260
|
let J;
|
|
5260
|
-
for (; (J =
|
|
5261
|
+
for (; (J = H.exec(P)) !== null; )
|
|
5261
5262
|
q.push({
|
|
5262
5263
|
data: J[0],
|
|
5263
5264
|
index: J.index,
|
|
@@ -5266,10 +5267,10 @@ function SE() {
|
|
|
5266
5267
|
});
|
|
5267
5268
|
return q;
|
|
5268
5269
|
}
|
|
5269
|
-
function s(
|
|
5270
|
-
const l = c(t.NUMERIC, A.NUMERIC,
|
|
5270
|
+
function s(H) {
|
|
5271
|
+
const l = c(t.NUMERIC, A.NUMERIC, H), P = c(t.ALPHANUMERIC, A.ALPHANUMERIC, H);
|
|
5271
5272
|
let q, J;
|
|
5272
|
-
return n.isKanjiModeEnabled() ? (q = c(t.BYTE, A.BYTE,
|
|
5273
|
+
return n.isKanjiModeEnabled() ? (q = c(t.BYTE, A.BYTE, H), J = c(t.KANJI, A.KANJI, H)) : (q = c(t.BYTE_KANJI, A.BYTE, H), J = []), l.concat(P, q, J).sort(function(m, i) {
|
|
5273
5274
|
return m.index - i.index;
|
|
5274
5275
|
}).map(function(m) {
|
|
5275
5276
|
return {
|
|
@@ -5279,28 +5280,28 @@ function SE() {
|
|
|
5279
5280
|
};
|
|
5280
5281
|
});
|
|
5281
5282
|
}
|
|
5282
|
-
function D(
|
|
5283
|
+
function D(H, l) {
|
|
5283
5284
|
switch (l) {
|
|
5284
5285
|
case A.NUMERIC:
|
|
5285
|
-
return E.getBitsLength(
|
|
5286
|
+
return E.getBitsLength(H);
|
|
5286
5287
|
case A.ALPHANUMERIC:
|
|
5287
|
-
return B.getBitsLength(
|
|
5288
|
+
return B.getBitsLength(H);
|
|
5288
5289
|
case A.KANJI:
|
|
5289
|
-
return Q.getBitsLength(
|
|
5290
|
+
return Q.getBitsLength(H);
|
|
5290
5291
|
case A.BYTE:
|
|
5291
|
-
return C.getBitsLength(
|
|
5292
|
+
return C.getBitsLength(H);
|
|
5292
5293
|
}
|
|
5293
5294
|
}
|
|
5294
|
-
function e(
|
|
5295
|
-
return
|
|
5295
|
+
function e(H) {
|
|
5296
|
+
return H.reduce(function(l, P) {
|
|
5296
5297
|
const q = l.length - 1 >= 0 ? l[l.length - 1] : null;
|
|
5297
5298
|
return q && q.mode === P.mode ? (l[l.length - 1].data += P.data, l) : (l.push(P), l);
|
|
5298
5299
|
}, []);
|
|
5299
5300
|
}
|
|
5300
|
-
function f(
|
|
5301
|
+
function f(H) {
|
|
5301
5302
|
const l = [];
|
|
5302
|
-
for (let P = 0; P <
|
|
5303
|
-
const q =
|
|
5303
|
+
for (let P = 0; P < H.length; P++) {
|
|
5304
|
+
const q = H[P];
|
|
5304
5305
|
switch (q.mode) {
|
|
5305
5306
|
case A.NUMERIC:
|
|
5306
5307
|
l.push([
|
|
@@ -5329,17 +5330,17 @@ function SE() {
|
|
|
5329
5330
|
}
|
|
5330
5331
|
return l;
|
|
5331
5332
|
}
|
|
5332
|
-
function u(
|
|
5333
|
+
function u(H, l) {
|
|
5333
5334
|
const P = {}, q = { start: {} };
|
|
5334
5335
|
let J = ["start"];
|
|
5335
|
-
for (let M = 0; M <
|
|
5336
|
-
const m =
|
|
5336
|
+
for (let M = 0; M < H.length; M++) {
|
|
5337
|
+
const m = H[M], i = [];
|
|
5337
5338
|
for (let v = 0; v < m.length; v++) {
|
|
5338
|
-
const d = m[v],
|
|
5339
|
-
i.push(
|
|
5339
|
+
const d = m[v], x = "" + M + v;
|
|
5340
|
+
i.push(x), P[x] = { node: d, lastCount: 0 }, q[x] = {};
|
|
5340
5341
|
for (let G = 0; G < J.length; G++) {
|
|
5341
5342
|
const k = J[G];
|
|
5342
|
-
P[k] && P[k].node.mode === d.mode ? (q[k][
|
|
5343
|
+
P[k] && P[k].node.mode === d.mode ? (q[k][x] = D(P[k].lastCount + d.length, d.mode) - D(P[k].lastCount, d.mode), P[k].lastCount += d.length) : (P[k] && (P[k].lastCount = d.length), q[k][x] = D(d.length, d.mode) + 4 + A.getCharCountIndicator(d.mode, l));
|
|
5343
5344
|
}
|
|
5344
5345
|
}
|
|
5345
5346
|
J = i;
|
|
@@ -5348,21 +5349,21 @@ function SE() {
|
|
|
5348
5349
|
q[J[M]].end = 0;
|
|
5349
5350
|
return { map: q, table: P };
|
|
5350
5351
|
}
|
|
5351
|
-
function Y(
|
|
5352
|
+
function Y(H, l) {
|
|
5352
5353
|
let P;
|
|
5353
|
-
const q = A.getBestModeForData(
|
|
5354
|
+
const q = A.getBestModeForData(H);
|
|
5354
5355
|
if (P = A.from(l, q), P !== A.BYTE && P.bit < q.bit)
|
|
5355
|
-
throw new Error('"' +
|
|
5356
|
+
throw new Error('"' + H + '" cannot be encoded with mode ' + A.toString(P) + `.
|
|
5356
5357
|
Suggested mode is: ` + A.toString(q));
|
|
5357
5358
|
switch (P === A.KANJI && !n.isKanjiModeEnabled() && (P = A.BYTE), P) {
|
|
5358
5359
|
case A.NUMERIC:
|
|
5359
|
-
return new E(
|
|
5360
|
+
return new E(H);
|
|
5360
5361
|
case A.ALPHANUMERIC:
|
|
5361
|
-
return new B(
|
|
5362
|
+
return new B(H);
|
|
5362
5363
|
case A.KANJI:
|
|
5363
|
-
return new Q(
|
|
5364
|
+
return new Q(H);
|
|
5364
5365
|
case A.BYTE:
|
|
5365
|
-
return new C(
|
|
5366
|
+
return new C(H);
|
|
5366
5367
|
}
|
|
5367
5368
|
}
|
|
5368
5369
|
g.fromArray = function(l) {
|
|
@@ -5389,11 +5390,11 @@ function pE() {
|
|
|
5389
5390
|
function e(M, m) {
|
|
5390
5391
|
const i = M.size, v = Q.getPositions(m);
|
|
5391
5392
|
for (let d = 0; d < v.length; d++) {
|
|
5392
|
-
const
|
|
5393
|
+
const x = v[d][0], G = v[d][1];
|
|
5393
5394
|
for (let k = -1; k <= 7; k++)
|
|
5394
|
-
if (!(
|
|
5395
|
+
if (!(x + k <= -1 || i <= x + k))
|
|
5395
5396
|
for (let X = -1; X <= 7; X++)
|
|
5396
|
-
G + X <= -1 || i <= G + X || (k >= 0 && k <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (k === 0 || k === 6) || k >= 2 && k <= 4 && X >= 2 && X <= 4 ? M.set(
|
|
5397
|
+
G + X <= -1 || i <= G + X || (k >= 0 && k <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (k === 0 || k === 6) || k >= 2 && k <= 4 && X >= 2 && X <= 4 ? M.set(x + k, G + X, !0, !0) : M.set(x + k, G + X, !1, !0));
|
|
5397
5398
|
}
|
|
5398
5399
|
}
|
|
5399
5400
|
function f(M) {
|
|
@@ -5406,34 +5407,34 @@ function pE() {
|
|
|
5406
5407
|
function u(M, m) {
|
|
5407
5408
|
const i = C.getPositions(m);
|
|
5408
5409
|
for (let v = 0; v < i.length; v++) {
|
|
5409
|
-
const d = i[v][0],
|
|
5410
|
+
const d = i[v][0], x = i[v][1];
|
|
5410
5411
|
for (let G = -2; G <= 2; G++)
|
|
5411
5412
|
for (let k = -2; k <= 2; k++)
|
|
5412
|
-
G === -2 || G === 2 || k === -2 || k === 2 || G === 0 && k === 0 ? M.set(d + G,
|
|
5413
|
+
G === -2 || G === 2 || k === -2 || k === 2 || G === 0 && k === 0 ? M.set(d + G, x + k, !0, !0) : M.set(d + G, x + k, !1, !0);
|
|
5413
5414
|
}
|
|
5414
5415
|
}
|
|
5415
5416
|
function Y(M, m) {
|
|
5416
5417
|
const i = M.size, v = a.getEncodedBits(m);
|
|
5417
|
-
let d,
|
|
5418
|
+
let d, x, G;
|
|
5418
5419
|
for (let k = 0; k < 18; k++)
|
|
5419
|
-
d = Math.floor(k / 3),
|
|
5420
|
+
d = Math.floor(k / 3), x = k % 3 + i - 8 - 3, G = (v >> k & 1) === 1, M.set(d, x, G, !0), M.set(x, d, G, !0);
|
|
5420
5421
|
}
|
|
5421
|
-
function
|
|
5422
|
+
function H(M, m, i) {
|
|
5422
5423
|
const v = M.size, d = c.getEncodedBits(m, i);
|
|
5423
|
-
let
|
|
5424
|
-
for (
|
|
5425
|
-
G = (d >>
|
|
5424
|
+
let x, G;
|
|
5425
|
+
for (x = 0; x < 15; x++)
|
|
5426
|
+
G = (d >> x & 1) === 1, x < 6 ? M.set(x, 8, G, !0) : x < 8 ? M.set(x + 1, 8, G, !0) : M.set(v - 15 + x, 8, G, !0), x < 8 ? M.set(8, v - x - 1, G, !0) : x < 9 ? M.set(8, 15 - x - 1 + 1, G, !0) : M.set(8, 15 - x - 1, G, !0);
|
|
5426
5427
|
M.set(v - 8, 8, 1, !0);
|
|
5427
5428
|
}
|
|
5428
5429
|
function l(M, m) {
|
|
5429
5430
|
const i = M.size;
|
|
5430
|
-
let v = -1, d = i - 1,
|
|
5431
|
+
let v = -1, d = i - 1, x = 7, G = 0;
|
|
5431
5432
|
for (let k = i - 1; k > 0; k -= 2)
|
|
5432
5433
|
for (k === 6 && k--; ; ) {
|
|
5433
5434
|
for (let X = 0; X < 2; X++)
|
|
5434
5435
|
if (!M.isReserved(d, k - X)) {
|
|
5435
5436
|
let U = !1;
|
|
5436
|
-
G < m.length && (U = (m[G] >>>
|
|
5437
|
+
G < m.length && (U = (m[G] >>> x & 1) === 1), M.set(d, k - X, U), x--, x === -1 && (G++, x = 7);
|
|
5437
5438
|
}
|
|
5438
5439
|
if (d += v, d < 0 || i <= d) {
|
|
5439
5440
|
d -= v, v = -v;
|
|
@@ -5446,7 +5447,7 @@ function pE() {
|
|
|
5446
5447
|
i.forEach(function(X) {
|
|
5447
5448
|
v.put(X.mode.bit, 4), v.put(X.getLength(), s.getCharCountIndicator(X.mode, M)), X.write(v);
|
|
5448
5449
|
});
|
|
5449
|
-
const d = g.getSymbolTotalCodewords(M),
|
|
5450
|
+
const d = g.getSymbolTotalCodewords(M), x = n.getTotalCodewordsCount(M, m), G = (d - x) * 8;
|
|
5450
5451
|
for (v.getLengthInBits() + 4 <= G && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
|
|
5451
5452
|
v.putBit(0);
|
|
5452
5453
|
const k = (G - v.getLengthInBits()) / 8;
|
|
@@ -5455,7 +5456,7 @@ function pE() {
|
|
|
5455
5456
|
return q(v, M, m);
|
|
5456
5457
|
}
|
|
5457
5458
|
function q(M, m, i) {
|
|
5458
|
-
const v = g.getSymbolTotalCodewords(m), d = n.getTotalCodewordsCount(m, i),
|
|
5459
|
+
const v = g.getSymbolTotalCodewords(m), d = n.getTotalCodewordsCount(m, i), x = v - d, G = n.getBlocksCount(m, i), k = v % G, X = G - k, U = Math.floor(v / G), j = Math.floor(x / G), F = j + 1, w = U - j, h = new I(w);
|
|
5459
5460
|
let r = 0;
|
|
5460
5461
|
const T = new Array(G), N = new Array(G);
|
|
5461
5462
|
let L = 0;
|
|
@@ -5465,13 +5466,13 @@ function pE() {
|
|
|
5465
5466
|
T[nA] = b.slice(r, r + uA), N[nA] = h.encode(T[nA]), r += uA, L = Math.max(L, uA);
|
|
5466
5467
|
}
|
|
5467
5468
|
const y = new Uint8Array(v);
|
|
5468
|
-
let AA = 0, S,
|
|
5469
|
+
let AA = 0, S, IA;
|
|
5469
5470
|
for (S = 0; S < L; S++)
|
|
5470
|
-
for (
|
|
5471
|
-
S < T[
|
|
5471
|
+
for (IA = 0; IA < G; IA++)
|
|
5472
|
+
S < T[IA].length && (y[AA++] = T[IA][S]);
|
|
5472
5473
|
for (S = 0; S < w; S++)
|
|
5473
|
-
for (
|
|
5474
|
-
y[AA++] = N[
|
|
5474
|
+
for (IA = 0; IA < G; IA++)
|
|
5475
|
+
y[AA++] = N[IA][S];
|
|
5475
5476
|
return y;
|
|
5476
5477
|
}
|
|
5477
5478
|
function J(M, m, i, v) {
|
|
@@ -5487,23 +5488,23 @@ function pE() {
|
|
|
5487
5488
|
d = D.fromString(M, U || 40);
|
|
5488
5489
|
} else
|
|
5489
5490
|
throw new Error("Invalid data");
|
|
5490
|
-
const
|
|
5491
|
-
if (!
|
|
5491
|
+
const x = a.getBestVersionForData(d, i);
|
|
5492
|
+
if (!x)
|
|
5492
5493
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
5493
5494
|
if (!m)
|
|
5494
|
-
m =
|
|
5495
|
-
else if (m <
|
|
5495
|
+
m = x;
|
|
5496
|
+
else if (m < x)
|
|
5496
5497
|
throw new Error(
|
|
5497
5498
|
`
|
|
5498
5499
|
The chosen QR Code version cannot contain this amount of data.
|
|
5499
|
-
Minimum version required to store current data is: ` +
|
|
5500
|
+
Minimum version required to store current data is: ` + x + `.
|
|
5500
5501
|
`
|
|
5501
5502
|
);
|
|
5502
5503
|
const G = P(m, i, d), k = g.getSymbolSize(m), X = new B(k);
|
|
5503
|
-
return e(X, m), f(X), u(X, m),
|
|
5504
|
+
return e(X, m), f(X), u(X, m), H(X, i, 0), m >= 7 && Y(X, m), l(X, G), isNaN(v) && (v = t.getBestMask(
|
|
5504
5505
|
X,
|
|
5505
|
-
|
|
5506
|
-
)), t.applyMask(v, X),
|
|
5506
|
+
H.bind(null, X, i)
|
|
5507
|
+
)), t.applyMask(v, X), H(X, i, v), {
|
|
5507
5508
|
modules: X,
|
|
5508
5509
|
version: m,
|
|
5509
5510
|
errorCorrectionLevel: i,
|
|
@@ -5514,8 +5515,8 @@ Minimum version required to store current data is: ` + H + `.
|
|
|
5514
5515
|
return pg.create = function(m, i) {
|
|
5515
5516
|
if (typeof m == "undefined" || m === "")
|
|
5516
5517
|
throw new Error("No input text");
|
|
5517
|
-
let v = A.M, d,
|
|
5518
|
-
return typeof i != "undefined" && (v = A.from(i.errorCorrectionLevel, A.M), d = a.from(i.version),
|
|
5518
|
+
let v = A.M, d, x;
|
|
5519
|
+
return typeof i != "undefined" && (v = A.from(i.errorCorrectionLevel, A.M), d = a.from(i.version), x = t.from(i.maskPattern), i.toSJISFunc && g.setToSJISFunction(i.toSJISFunc)), J(m, d, v, x);
|
|
5519
5520
|
}, pg;
|
|
5520
5521
|
}
|
|
5521
5522
|
var aB = {}, oB = {}, LC;
|
|
@@ -5564,8 +5565,8 @@ function CQ() {
|
|
|
5564
5565
|
for (let e = 0; e < a; e++) {
|
|
5565
5566
|
let f = (D * a + e) * 4, u = Q.color.light;
|
|
5566
5567
|
if (D >= c && e >= c && D < a - c && e < a - c) {
|
|
5567
|
-
const Y = Math.floor((D - c) / I),
|
|
5568
|
-
u = s[n[Y * t +
|
|
5568
|
+
const Y = Math.floor((D - c) / I), H = Math.floor((e - c) / I);
|
|
5569
|
+
u = s[n[Y * t + H] ? 1 : 0];
|
|
5569
5570
|
}
|
|
5570
5571
|
B[f++] = u.r, B[f++] = u.g, B[f++] = u.b, B[f] = u.a;
|
|
5571
5572
|
}
|
|
@@ -5680,7 +5681,7 @@ function gI(n) {
|
|
|
5680
5681
|
const {
|
|
5681
5682
|
container: u,
|
|
5682
5683
|
open: Y,
|
|
5683
|
-
close:
|
|
5684
|
+
close: H
|
|
5684
5685
|
} = qB();
|
|
5685
5686
|
f.appendChild(u);
|
|
5686
5687
|
const l = document.createElement("div");
|
|
@@ -5706,7 +5707,7 @@ function gI(n) {
|
|
|
5706
5707
|
l.appendChild(i), f.appendChild(l);
|
|
5707
5708
|
const d = document.createElement("div");
|
|
5708
5709
|
d.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
5709
|
-
const
|
|
5710
|
+
const x = Eg({
|
|
5710
5711
|
type: "button",
|
|
5711
5712
|
title: o("back"),
|
|
5712
5713
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
@@ -5714,7 +5715,7 @@ function gI(n) {
|
|
|
5714
5715
|
A && (clearInterval(c), c = null, A());
|
|
5715
5716
|
}
|
|
5716
5717
|
});
|
|
5717
|
-
d.appendChild(
|
|
5718
|
+
d.appendChild(x), f.appendChild(d);
|
|
5718
5719
|
function G() {
|
|
5719
5720
|
return W(this, null, function* () {
|
|
5720
5721
|
const { registrationData: F } = C, r = F.eInvoiceRegistration, { isUsedEInvoiceBefore: w } = r, h = yg(r, ["isUsedEInvoiceBefore"]);
|
|
@@ -5737,7 +5738,7 @@ function gI(n) {
|
|
|
5737
5738
|
console.error("Error creating order:", T), ag(o("errorCreatingOrder") || "Failed to create order");
|
|
5738
5739
|
return;
|
|
5739
5740
|
} finally {
|
|
5740
|
-
|
|
5741
|
+
H();
|
|
5741
5742
|
}
|
|
5742
5743
|
});
|
|
5743
5744
|
}
|
|
@@ -5802,7 +5803,7 @@ function gI(n) {
|
|
|
5802
5803
|
}
|
|
5803
5804
|
);
|
|
5804
5805
|
} finally {
|
|
5805
|
-
|
|
5806
|
+
H(), D = !1;
|
|
5806
5807
|
}
|
|
5807
5808
|
});
|
|
5808
5809
|
}
|
|
@@ -5893,8 +5894,8 @@ function BI({
|
|
|
5893
5894
|
u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = o("notice2"), f.appendChild(u);
|
|
5894
5895
|
const Y = document.createElement("div");
|
|
5895
5896
|
Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", f.appendChild(Y);
|
|
5896
|
-
const
|
|
5897
|
-
|
|
5897
|
+
const H = document.createElement("div");
|
|
5898
|
+
H.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(H);
|
|
5898
5899
|
const l = document.createElement("div");
|
|
5899
5900
|
l.innerHTML = `
|
|
5900
5901
|
<svg
|
|
@@ -5914,9 +5915,9 @@ function BI({
|
|
|
5914
5915
|
stroke-linejoin="round"
|
|
5915
5916
|
/>
|
|
5916
5917
|
</svg>
|
|
5917
|
-
`,
|
|
5918
|
+
`, H.appendChild(l);
|
|
5918
5919
|
const P = iQ(rB(), B, Q), q = document.createElement("span");
|
|
5919
|
-
q.innerHTML = `${o("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${o("hotlineDesc")} `,
|
|
5920
|
+
q.innerHTML = `${o("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${o("hotlineDesc")} `, H.appendChild(q);
|
|
5920
5921
|
const J = document.createElement("div");
|
|
5921
5922
|
J.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(J);
|
|
5922
5923
|
const M = document.createElement("div");
|
|
@@ -5956,14 +5957,14 @@ function BI({
|
|
|
5956
5957
|
`, i.appendChild(v), i.appendChild(document.createTextNode(o("website") + ": "));
|
|
5957
5958
|
const d = document.createElement("a");
|
|
5958
5959
|
d.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", d.innerHTML = `<b>${(P == null ? void 0 : P.link) || ""}</b>`, d.href = (P == null ? void 0 : P.link) || "#", d.target = "_blank", i.appendChild(d);
|
|
5959
|
-
const
|
|
5960
|
-
|
|
5960
|
+
const x = document.createElement("div");
|
|
5961
|
+
x.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(x);
|
|
5961
5962
|
const G = document.createElement("div");
|
|
5962
|
-
G.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", G.innerText = "3",
|
|
5963
|
+
G.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", G.innerText = "3", x.appendChild(G);
|
|
5963
5964
|
const k = document.createElement("p");
|
|
5964
5965
|
k.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", k.appendChild(document.createTextNode(o("notice3.1") + " "));
|
|
5965
5966
|
const X = document.createElement("a");
|
|
5966
|
-
X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = o("settings") + " ", X.href = C, X.target = "_blank", k.appendChild(X), k.appendChild(document.createTextNode(o("notice3.2") + " ")),
|
|
5967
|
+
X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = o("settings") + " ", X.href = C, X.target = "_blank", k.appendChild(X), k.appendChild(document.createTextNode(o("notice3.2") + " ")), x.appendChild(k);
|
|
5967
5968
|
const U = document.createElement("div");
|
|
5968
5969
|
U.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:py-3 wgt:px-5 wgt:bg-primary/15 wgt:rounded-[10px] wgt:w-fit wgt:mx-auto", n.appendChild(U);
|
|
5969
5970
|
const j = document.createElement("div");
|
|
@@ -6199,12 +6200,12 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6199
6200
|
idCardBack: null,
|
|
6200
6201
|
packages: [],
|
|
6201
6202
|
promotionCodes: []
|
|
6202
|
-
}, Y = !0,
|
|
6203
|
+
}, Y = !0, H = !Q, l = null, P = null, q = null, J = null, M = 0, m = null, i = null, v = null, d = {
|
|
6203
6204
|
qtyRegFee: 1,
|
|
6204
6205
|
qtyInvoicePkg: 1,
|
|
6205
6206
|
qtySignaturePkg: 1
|
|
6206
6207
|
};
|
|
6207
|
-
function
|
|
6208
|
+
function x() {
|
|
6208
6209
|
f = n[0], u = {
|
|
6209
6210
|
eInvoiceRegistration: {
|
|
6210
6211
|
taxAuthorityCode: "",
|
|
@@ -6293,7 +6294,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6293
6294
|
});
|
|
6294
6295
|
}
|
|
6295
6296
|
function k() {
|
|
6296
|
-
|
|
6297
|
+
x(), e = 1, s(e, I()), j(e);
|
|
6297
6298
|
}
|
|
6298
6299
|
function X() {
|
|
6299
6300
|
typeof window != "undefined" && window.scrollTo({
|
|
@@ -6327,8 +6328,8 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6327
6328
|
f = y, yield uB(
|
|
6328
6329
|
y.route,
|
|
6329
6330
|
(S = (AA = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : AA.organization) == null ? void 0 : S.taxCode,
|
|
6330
|
-
(
|
|
6331
|
-
|
|
6331
|
+
(IA, nA) => {
|
|
6332
|
+
H = IA, U(nA);
|
|
6332
6333
|
},
|
|
6333
6334
|
Q
|
|
6334
6335
|
);
|
|
@@ -6351,7 +6352,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6351
6352
|
// ...data.eInvoiceRegistration,
|
|
6352
6353
|
// };
|
|
6353
6354
|
formProps: {
|
|
6354
|
-
isNewCustomer:
|
|
6355
|
+
isNewCustomer: H,
|
|
6355
6356
|
handleCheckNewCustomer: uB,
|
|
6356
6357
|
updateRegistrationData: U,
|
|
6357
6358
|
serial: (B == null ? void 0 : B.serial) || "",
|
|
@@ -6412,7 +6413,7 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6412
6413
|
theme: C,
|
|
6413
6414
|
selectedProvider: f,
|
|
6414
6415
|
registrationData: u,
|
|
6415
|
-
isNewCustomer:
|
|
6416
|
+
isNewCustomer: H,
|
|
6416
6417
|
savedQuantities: d,
|
|
6417
6418
|
setSavedQuantities: (y) => {
|
|
6418
6419
|
d = y;
|
|
@@ -6470,14 +6471,14 @@ function DI(g, A, E, B, C, Q) {
|
|
|
6470
6471
|
});
|
|
6471
6472
|
}
|
|
6472
6473
|
a.updateTitle(
|
|
6473
|
-
|
|
6474
|
+
H ? o("eInvoiceRegister") : o("eInvoiceRenewal")
|
|
6474
6475
|
);
|
|
6475
6476
|
const { container: F, open: w } = qB();
|
|
6476
6477
|
Y && (D(F), w()), yield uB(
|
|
6477
6478
|
f.route,
|
|
6478
6479
|
(N = (T = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : T.organization) == null ? void 0 : N.taxCode,
|
|
6479
6480
|
(L, b) => W(null, null, function* () {
|
|
6480
|
-
Y = !1,
|
|
6481
|
+
Y = !1, H = L, U(b);
|
|
6481
6482
|
}),
|
|
6482
6483
|
Q
|
|
6483
6484
|
);
|