@invoice-sdk/widget 1.125.15 → 1.126.0
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/{index-BpeERBmS.js → index-BYnZd_pX.js} +5 -3
- package/dist/{index-BF6bVOOY.js → index-CpTaTzi5.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +30 -30
- package/dist/{loading-Be9H7dYJ.js → loading-Bs9il-yL.js} +2 -2
- package/dist/{widget-YxHm6F6B.js → widget-DLORQyjI.js} +269 -267
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as l, g as mh, a as Tt, s as Mt, c as Nt, b as Xh, d as Bh, e as ih, f as Nh, h as zt, o as Eh, m as Hh, i as
|
|
2
|
-
import { c as wt, a as Kt, g as Jt, b as vh, f as vn, d as Qh, e as Yt, h as Lh, i as Ih, j as bh, k as Sh, l as Vh, m as Mh, n as Jh } from "./loading-
|
|
1
|
+
import { t as l, g as mh, a as Tt, s as Mt, c as Nt, b as Xh, d as Bh, e as ih, f as Nh, h as zt, o as Eh, m as Hh, i as Ph, j as yh, v as kh } from "./index-CpTaTzi5.js";
|
|
2
|
+
import { c as wt, a as Kt, g as Jt, b as vh, f as vn, d as Qh, e as Yt, h as Lh, i as Ih, j as bh, k as Sh, l as Vh, m as Mh, n as Jh } from "./loading-Bs9il-yL.js";
|
|
3
3
|
import { g as sh } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
4
4
|
function X0({ steps: n = [], currentStep: t = 1 } = {}) {
|
|
5
5
|
const e = document.createElement("div");
|
|
@@ -52,8 +52,8 @@ function X0({ steps: n = [], currentStep: t = 1 } = {}) {
|
|
|
52
52
|
].join(" ");
|
|
53
53
|
const x = document.createElement("span");
|
|
54
54
|
x.innerText = String(T), x.className = "wgt:text-white wgt:font-medium", w.appendChild(x);
|
|
55
|
-
const
|
|
56
|
-
|
|
55
|
+
const P = document.createElement("span");
|
|
56
|
+
P.innerText = i.label, P.className = "wgt:font-medium wgt:whitespace-nowrap", m.append(w, P), h.append(m), c.push({ wrap: m, circle: w, label: P });
|
|
57
57
|
}), e.append(a, h);
|
|
58
58
|
}
|
|
59
59
|
A(t);
|
|
@@ -295,8 +295,8 @@ function Vn({
|
|
|
295
295
|
if (T.className = "wgt:w-full " + (i ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), h) {
|
|
296
296
|
const x = document.createElement("label");
|
|
297
297
|
if (x.htmlFor = n, x.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", x.innerText = h, c) {
|
|
298
|
-
const
|
|
299
|
-
|
|
298
|
+
const P = document.createElement("span");
|
|
299
|
+
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", x.appendChild(P);
|
|
300
300
|
}
|
|
301
301
|
T.appendChild(x);
|
|
302
302
|
}
|
|
@@ -320,8 +320,8 @@ function Vn({
|
|
|
320
320
|
if (w.className = "wgt:w-fit wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", w.innerText = A || "", A || (w.style.display = "none"), r.appendChild(m), q) {
|
|
321
321
|
const x = document.createElement("ul");
|
|
322
322
|
x.className = "wgt:list-outside wgt:@max-5xl:list-inside wgt:list-disc wgt:text-sm wgt:text-[#8C8C8C] wgt:italic";
|
|
323
|
-
const
|
|
324
|
-
|
|
323
|
+
const P = document.createElement("li");
|
|
324
|
+
P.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic wgt:whitespace-nowrap wgt:@max-2xl:whitespace-normal", P.innerText = q, x.appendChild(P), r.appendChild(x);
|
|
325
325
|
}
|
|
326
326
|
return r.appendChild(w), {
|
|
327
327
|
container: T,
|
|
@@ -376,9 +376,9 @@ function Ft({
|
|
|
376
376
|
w.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";
|
|
377
377
|
const x = document.createElement("div");
|
|
378
378
|
x.className = "wgt:divide-y wgt:divide-gray-200";
|
|
379
|
-
let
|
|
379
|
+
let P = t, L = null, S = [...e];
|
|
380
380
|
const p = () => {
|
|
381
|
-
const C = e.find((X) => X.id ? X.id === L : X.value ===
|
|
381
|
+
const C = e.find((X) => X.id ? X.id === L : X.value === P);
|
|
382
382
|
return C ? C.label : "";
|
|
383
383
|
};
|
|
384
384
|
m.value = p();
|
|
@@ -396,9 +396,9 @@ function Ft({
|
|
|
396
396
|
"wgt:cursor-pointer",
|
|
397
397
|
"wgt:hover:bg-gray-100",
|
|
398
398
|
"wgt:text-sm",
|
|
399
|
-
X.id ? L === X.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" :
|
|
399
|
+
X.id ? L === X.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : P === X.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
|
|
400
400
|
].filter(Boolean).join(" "), k.innerText = X.label, k.dataset.value = X.value, k.addEventListener("click", () => {
|
|
401
|
-
if (X.id && (L = X.id),
|
|
401
|
+
if (X.id && (L = X.id), P = X.value, m.value = X.label, w.classList.add("wgt:hidden"), typeof A == "function") {
|
|
402
402
|
const b = { target: { value: X.value } };
|
|
403
403
|
X.id && (b.target.id = X.id), A(b);
|
|
404
404
|
}
|
|
@@ -430,10 +430,10 @@ function Ft({
|
|
|
430
430
|
C ? (H.innerText = C, H.style.display = "block", m.classList.remove("wgt:border-gray-300"), m.classList.add("wgt:border-red-500")) : (H.innerText = "", H.style.display = "none", m.classList.remove("wgt:border-red-500"), m.classList.add("wgt:border-gray-300"));
|
|
431
431
|
},
|
|
432
432
|
getValue() {
|
|
433
|
-
return
|
|
433
|
+
return P;
|
|
434
434
|
},
|
|
435
435
|
setValue(C, X, k) {
|
|
436
|
-
L = k || null,
|
|
436
|
+
L = k || null, P = C || "";
|
|
437
437
|
const b = e.find((Q) => Q.id ? Q.id === k : Q.value === C);
|
|
438
438
|
b ? (m.value = b.label, N.value = C, d()) : (m.value = X || "", N.value = C || "", d());
|
|
439
439
|
},
|
|
@@ -469,8 +469,8 @@ function Ft({
|
|
|
469
469
|
"select",
|
|
470
470
|
"Chọn"
|
|
471
471
|
)} ${a.toLowerCase()} --`, r.appendChild(m), e.forEach((x) => {
|
|
472
|
-
const
|
|
473
|
-
|
|
472
|
+
const P = document.createElement("option");
|
|
473
|
+
P.value = x.value, P.innerText = x.label, x.value === t && (P.selected = !0), r.appendChild(P);
|
|
474
474
|
}), typeof A == "function" && r.addEventListener("change", A), q.appendChild(r);
|
|
475
475
|
const w = document.createElement("span");
|
|
476
476
|
return w.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", w.innerText = c || "", c || (w.style.display = "none"), q.appendChild(w), {
|
|
@@ -485,9 +485,9 @@ function Ft({
|
|
|
485
485
|
setOptions(x) {
|
|
486
486
|
for (; r.options.length > 1; )
|
|
487
487
|
r.remove(1);
|
|
488
|
-
x.forEach((
|
|
488
|
+
x.forEach((P) => {
|
|
489
489
|
const L = document.createElement("option");
|
|
490
|
-
L.value =
|
|
490
|
+
L.value = P.value, L.innerText = P.label, r.appendChild(L);
|
|
491
491
|
});
|
|
492
492
|
},
|
|
493
493
|
setDisabled(x) {
|
|
@@ -544,7 +544,7 @@ function B0({
|
|
|
544
544
|
p.stopPropagation(), q.click();
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
|
-
function
|
|
547
|
+
function P(p, d = 2) {
|
|
548
548
|
if (p === 0) return "0 Bytes";
|
|
549
549
|
const N = 1024, H = Math.max(0, d), C = ["Bytes", "KB", "MB", "GB", "TB"], X = Math.floor(Math.log(p) / Math.log(N));
|
|
550
550
|
return parseFloat((p / Math.pow(N, X)).toFixed(H)) + " " + C[X];
|
|
@@ -568,7 +568,7 @@ function B0({
|
|
|
568
568
|
const C = document.createElement("p");
|
|
569
569
|
C.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", C.innerText = p.name;
|
|
570
570
|
const X = document.createElement("p");
|
|
571
|
-
X.className = "wgt:text-sm wgt:text-gray-500", X.innerText =
|
|
571
|
+
X.className = "wgt:text-sm wgt:text-gray-500", X.innerText = P(p.size), H.appendChild(C), H.appendChild(X), N.appendChild(H), T.appendChild(N), e = p, typeof a == "function" && a(p);
|
|
572
572
|
} else {
|
|
573
573
|
const d = document.createElement("div");
|
|
574
574
|
d.className = "wgt:flex wgt:items-center", d.appendChild(x), T.appendChild(d);
|
|
@@ -688,7 +688,7 @@ function N0({
|
|
|
688
688
|
function x(d) {
|
|
689
689
|
w = d, d ? (m.innerText = d, m.style.display = "block", typeof h == "function" && h(d)) : (m.innerText = "", m.style.display = "none", typeof h == "function" && h(null));
|
|
690
690
|
}
|
|
691
|
-
let
|
|
691
|
+
let P = n || null;
|
|
692
692
|
function L(d, N = 2) {
|
|
693
693
|
if (d === 0) return "0 Bytes";
|
|
694
694
|
const H = 1024, C = Math.max(0, N), X = ["Bytes", "KB", "MB", "GB", "TB"], k = Math.floor(Math.log(d) / Math.log(H));
|
|
@@ -719,10 +719,10 @@ function N0({
|
|
|
719
719
|
}
|
|
720
720
|
return o.addEventListener("change", () => {
|
|
721
721
|
const d = o.files?.[0];
|
|
722
|
-
d && (
|
|
722
|
+
d && (P = d, S(d));
|
|
723
723
|
}), u.addEventListener("click", () => o.click()), n && S(n), {
|
|
724
724
|
container: A,
|
|
725
|
-
getFile: () =>
|
|
725
|
+
getFile: () => P,
|
|
726
726
|
getError: () => w,
|
|
727
727
|
setError: x
|
|
728
728
|
};
|
|
@@ -766,14 +766,14 @@ const zh = ({
|
|
|
766
766
|
} = {}) => {
|
|
767
767
|
Array.from(
|
|
768
768
|
{ length: 26 },
|
|
769
|
-
(
|
|
769
|
+
(y, D) => String.fromCharCode(65 + D)
|
|
770
770
|
);
|
|
771
771
|
const a = (/* @__PURE__ */ new Date()).getFullYear();
|
|
772
772
|
String(a).slice(-2);
|
|
773
773
|
const h = typeof t == "string" && t.length >= 4 ? t.slice(2, 4) : null;
|
|
774
774
|
let c = Array.from(
|
|
775
775
|
{ length: 2 },
|
|
776
|
-
(
|
|
776
|
+
(y, D) => String(a + D).slice(-2)
|
|
777
777
|
);
|
|
778
778
|
e && h && /^\d{2}$/.test(h) && (c.includes(h) || (c = [h, ...c]));
|
|
779
779
|
const A = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], u = ["C", "K"], o = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], i = document.createElement("div");
|
|
@@ -800,8 +800,8 @@ const zh = ({
|
|
|
800
800
|
w.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
801
801
|
const x = document.createElement("span");
|
|
802
802
|
x.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", x.textContent = l("sampleNumber");
|
|
803
|
-
const
|
|
804
|
-
|
|
803
|
+
const P = document.createElement("span");
|
|
804
|
+
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", x.appendChild(P), w.appendChild(x);
|
|
805
805
|
const L = document.createElement("select");
|
|
806
806
|
L.className = `${m} wgt:@max-2xl:w-full wgt:w-48`, L.title = l("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
|
|
807
807
|
const S = {
|
|
@@ -815,8 +815,8 @@ const zh = ({
|
|
|
815
815
|
8: l("invoiceTemplateTypes.8"),
|
|
816
816
|
9: l("invoiceTemplateTypes.9")
|
|
817
817
|
};
|
|
818
|
-
A.forEach((
|
|
819
|
-
L.append(new Option(S[
|
|
818
|
+
A.forEach((y) => {
|
|
819
|
+
L.append(new Option(S[y], y));
|
|
820
820
|
}), w.appendChild(L), r.append(w);
|
|
821
821
|
const p = document.createElement("div");
|
|
822
822
|
p.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
@@ -825,9 +825,9 @@ const zh = ({
|
|
|
825
825
|
const N = document.createElement("span");
|
|
826
826
|
N.className = "wgt:text-red-500 wgt:ml-1", N.innerText = "*", d.appendChild(N), p.appendChild(d);
|
|
827
827
|
const H = document.createElement("select");
|
|
828
|
-
H.className = `${m} wgt:@max-2xl:w-full wgt:w-40`, H.title = l("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), u.forEach((
|
|
829
|
-
const D =
|
|
830
|
-
H.append(new Option(D,
|
|
828
|
+
H.className = `${m} wgt:@max-2xl:w-full wgt:w-40`, H.title = l("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), u.forEach((y) => {
|
|
829
|
+
const D = y === "C" ? l("codeTypeC", "C (Có mã CQT)") : l("codeTypeK", "K (Không mã)");
|
|
830
|
+
H.append(new Option(D, y));
|
|
831
831
|
}), p.appendChild(H), r.append(p);
|
|
832
832
|
const C = document.createElement("div");
|
|
833
833
|
C.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
@@ -836,7 +836,7 @@ const zh = ({
|
|
|
836
836
|
const k = document.createElement("span");
|
|
837
837
|
k.className = "wgt:text-red-500 wgt:ml-1", k.innerText = "*", X.appendChild(k), C.appendChild(X);
|
|
838
838
|
const b = document.createElement("select");
|
|
839
|
-
b.className = `${m} wgt:@max-2xl:w-full wgt:w-16`, b.title = l("yearTooltip", "Năm phát hành (2 chữ số cuối)"), c.forEach((
|
|
839
|
+
b.className = `${m} wgt:@max-2xl:w-full wgt:w-16`, b.title = l("yearTooltip", "Năm phát hành (2 chữ số cuối)"), c.forEach((y) => b.append(new Option(y, y))), b.value = String(a).slice(-2), C.appendChild(b), r.append(C);
|
|
840
840
|
const Q = document.createElement("div");
|
|
841
841
|
Q.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
842
842
|
const I = document.createElement("span");
|
|
@@ -856,8 +856,8 @@ const zh = ({
|
|
|
856
856
|
H: l("invoiceTypeH", "H (Tem bán hàng)"),
|
|
857
857
|
X: l("invoiceTypeX", "X (Thương mại)")
|
|
858
858
|
};
|
|
859
|
-
o.forEach((
|
|
860
|
-
B.append(new Option(K[
|
|
859
|
+
o.forEach((y) => {
|
|
860
|
+
B.append(new Option(K[y], y));
|
|
861
861
|
}), Q.appendChild(B), r.append(Q);
|
|
862
862
|
const Y = document.createElement("div");
|
|
863
863
|
Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
@@ -872,36 +872,36 @@ const zh = ({
|
|
|
872
872
|
b,
|
|
873
873
|
B,
|
|
874
874
|
s
|
|
875
|
-
].forEach((
|
|
875
|
+
].forEach((y) => y.disabled = !0);
|
|
876
876
|
let f = null;
|
|
877
877
|
function v() {
|
|
878
878
|
return L.value + H.value + b.value + B.value + s.value.toUpperCase();
|
|
879
879
|
}
|
|
880
880
|
function J() {
|
|
881
881
|
s.value = s.value.toUpperCase().replace(/[^A-Z]/g, "").slice(0, 2);
|
|
882
|
-
const
|
|
883
|
-
if (
|
|
884
|
-
f =
|
|
885
|
-
const D = /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(
|
|
886
|
-
typeof n == "function" && D && (console.log("Invoice symbol current (valid):",
|
|
882
|
+
const y = v();
|
|
883
|
+
if (y === f) return;
|
|
884
|
+
f = y;
|
|
885
|
+
const D = /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(y);
|
|
886
|
+
typeof n == "function" && D && (console.log("Invoice symbol current (valid):", y), n(y));
|
|
887
887
|
}
|
|
888
888
|
if ([L, H, b, B].forEach(
|
|
889
|
-
(
|
|
889
|
+
(y) => y.addEventListener("change", J)
|
|
890
890
|
), s.addEventListener("input", J), s.addEventListener("blur", J), console.log("Initializing invoice symbol component with:", t), L.value = "1", H.value = "C", b.value = "26", B.value = "M", s.value = "YY", t && typeof t == "string") {
|
|
891
891
|
if (S[t[0]] && (L.value = t[0]), t.length >= 2 && u.includes(t[1]) && (H.value = t[1]), t.length >= 4 && /^\d{2}$/.test(t.slice(2, 4))) {
|
|
892
|
-
const
|
|
893
|
-
b.value =
|
|
892
|
+
const y = t.slice(2, 4);
|
|
893
|
+
b.value = y;
|
|
894
894
|
}
|
|
895
895
|
if (t.length >= 5 && K[t[4]] && (B.value = t[4]), t.length >= 7) {
|
|
896
|
-
const
|
|
897
|
-
/^[A-Z]{2}$/.test(
|
|
896
|
+
const y = t.slice(5, 7).toUpperCase();
|
|
897
|
+
/^[A-Z]{2}$/.test(y) && (s.value = y);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
900
|
return J(), {
|
|
901
901
|
container: i,
|
|
902
902
|
getValue: v,
|
|
903
|
-
setValue: (
|
|
904
|
-
typeof
|
|
903
|
+
setValue: (y) => {
|
|
904
|
+
typeof y != "string" || y.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(y) && (L.value = y[0], H.value = y[1], b.value = y.slice(2, 4), B.value = y[4], s.value = y.slice(5, 7), J());
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
907
|
}, Fh = [
|
|
@@ -954,10 +954,10 @@ function Zh() {
|
|
|
954
954
|
}, x = function(g) {
|
|
955
955
|
var s = g.getDay();
|
|
956
956
|
return s === 0 || s === 6;
|
|
957
|
-
},
|
|
957
|
+
}, P = function(g) {
|
|
958
958
|
return g % 4 === 0 && g % 100 !== 0 || g % 400 === 0;
|
|
959
959
|
}, L = function(g, s) {
|
|
960
|
-
return [31,
|
|
960
|
+
return [31, P(g) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][s];
|
|
961
961
|
}, S = function(g) {
|
|
962
962
|
w(g) && g.setHours(0, 0, 0, 0);
|
|
963
963
|
}, p = function(g, s) {
|
|
@@ -1070,15 +1070,15 @@ function Zh() {
|
|
|
1070
1070
|
return g.isDisabled && s.push("is-disabled"), g.isToday && s.push("is-today"), g.isSelected && (s.push("is-selected"), f = "true"), g.hasEvent && s.push("has-event"), g.isInRange && s.push("is-inrange"), g.isStartRange && s.push("is-startrange"), g.isEndRange && s.push("is-endrange"), '<td data-day="' + g.day + '" class="' + s.join(" ") + '" aria-selected="' + f + '"><button class="pika-button pika-day" type="button" data-pika-year="' + g.year + '" data-pika-month="' + g.month + '" data-pika-day="' + g.day + '">' + g.day + "</button></td>";
|
|
1071
1071
|
}, b = function(g, s) {
|
|
1072
1072
|
g.setHours(0, 0, 0, 0);
|
|
1073
|
-
var f = g.getDate(), v = g.getDay(), J = s,
|
|
1073
|
+
var f = g.getDate(), v = g.getDay(), J = s, y = J - 1, D = 7, F = function(O) {
|
|
1074
1074
|
return (O + D - 1) % D;
|
|
1075
1075
|
};
|
|
1076
|
-
g.setDate(f +
|
|
1077
|
-
var U = new Date(g.getFullYear(), 0, J), Z = 1440 * 60 * 1e3, W = (g.getTime() - U.getTime()) / Z, G = 1 + Math.round((W -
|
|
1076
|
+
g.setDate(f + y - F(v));
|
|
1077
|
+
var U = new Date(g.getFullYear(), 0, J), Z = 1440 * 60 * 1e3, W = (g.getTime() - U.getTime()) / Z, G = 1 + Math.round((W - y + F(U.getDay())) / D);
|
|
1078
1078
|
return G;
|
|
1079
1079
|
}, Q = function(g, s, f, v) {
|
|
1080
|
-
var J = new Date(f, s, g),
|
|
1081
|
-
return '<td class="pika-week">' +
|
|
1080
|
+
var J = new Date(f, s, g), y = a ? e(J).isoWeek() : b(J, v);
|
|
1081
|
+
return '<td class="pika-week">' + y + "</td>";
|
|
1082
1082
|
}, I = function(g, s, f, v) {
|
|
1083
1083
|
return '<tr class="pika-row' + (f ? " pick-whole-week" : "") + (v ? " is-selected" : "") + '">' + (s ? g.reverse() : g).join("") + "</tr>";
|
|
1084
1084
|
}, E = function(g) {
|
|
@@ -1088,8 +1088,8 @@ function Zh() {
|
|
|
1088
1088
|
for (g.showWeekNumber && f.push("<th></th>"), s = 0; s < 7; s++)
|
|
1089
1089
|
f.push('<th scope="col"><abbr title="' + X(g, s) + '">' + X(g, s, !0) + "</abbr></th>");
|
|
1090
1090
|
return "<thead><tr>" + (g.isRTL ? f.reverse() : f).join("") + "</tr></thead>";
|
|
1091
|
-
}, K = function(g, s, f, v, J,
|
|
1092
|
-
var D, F, U, Z = g._o, W = f === Z.minYear, G = f === Z.maxYear, O = '<div id="' +
|
|
1091
|
+
}, K = function(g, s, f, v, J, y) {
|
|
1092
|
+
var D, F, U, Z = g._o, W = f === Z.minYear, G = f === Z.maxYear, O = '<div id="' + y + '" class="pika-title" role="heading" aria-live="assertive">', $, sn, Mn = !0, In = !0;
|
|
1093
1093
|
for (U = [], D = 0; D < 12; D++)
|
|
1094
1094
|
U.push('<option value="' + (f === J ? D - s : 12 + D - s) + '"' + (D === v ? ' selected="selected"' : "") + (W && D < Z.minMonth || G && D > Z.maxMonth ? ' disabled="disabled"' : "") + ">" + Z.i18n.months[D] + "</option>");
|
|
1095
1095
|
for ($ = '<div class="pika-label">' + Z.i18n.months[v] + '<select class="pika-select pika-select-month" tabindex="-1">' + U.join("") + "</select></div>", m(Z.yearRange) ? (D = Z.yearRange[0], F = Z.yearRange[1] + 1) : (D = f - Z.yearRange, F = 1 + f + Z.yearRange), U = []; D < F && D <= Z.maxYear; D++)
|
|
@@ -1102,11 +1102,11 @@ function Zh() {
|
|
|
1102
1102
|
s._onMouseDown = function(J) {
|
|
1103
1103
|
if (s._v) {
|
|
1104
1104
|
J = J || window.event;
|
|
1105
|
-
var
|
|
1106
|
-
if (
|
|
1107
|
-
if (q(
|
|
1105
|
+
var y = J.target || J.srcElement;
|
|
1106
|
+
if (y)
|
|
1107
|
+
if (q(y, "is-disabled") || (q(y, "pika-button") && !q(y, "is-empty") && !q(y.parentNode, "is-disabled") ? (s.setDate(new Date(y.getAttribute("data-pika-year"), y.getAttribute("data-pika-month"), y.getAttribute("data-pika-day"))), f.bound && A(function() {
|
|
1108
1108
|
s.hide(), f.blurFieldOnSelect && f.field && f.field.blur();
|
|
1109
|
-
}, 100)) : q(
|
|
1109
|
+
}, 100)) : q(y, "pika-prev") ? s.prevMonth() : q(y, "pika-next") && s.nextMonth()), q(y, "pika-select"))
|
|
1110
1110
|
s._c = !0;
|
|
1111
1111
|
else if (J.preventDefault)
|
|
1112
1112
|
J.preventDefault();
|
|
@@ -1115,8 +1115,8 @@ function Zh() {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}, s._onChange = function(J) {
|
|
1117
1117
|
J = J || window.event;
|
|
1118
|
-
var
|
|
1119
|
-
|
|
1118
|
+
var y = J.target || J.srcElement;
|
|
1119
|
+
y && (q(y, "pika-select-month") ? s.gotoMonth(y.value) : q(y, "pika-select-year") && s.gotoYear(y.value));
|
|
1120
1120
|
}, s._onKeyChange = function(J) {
|
|
1121
1121
|
if (J = J || window.event, s.isVisible())
|
|
1122
1122
|
switch (J.keyCode) {
|
|
@@ -1150,8 +1150,8 @@ function Zh() {
|
|
|
1150
1150
|
} else
|
|
1151
1151
|
return new Date(Date.parse(f.field.value));
|
|
1152
1152
|
}, s._onInputChange = function(J) {
|
|
1153
|
-
var
|
|
1154
|
-
J.firedBy !== s && (
|
|
1153
|
+
var y;
|
|
1154
|
+
J.firedBy !== s && (y = s._parseFieldValue(), w(y) && s.setDate(y), s._v || s.show());
|
|
1155
1155
|
}, s._onInputFocus = function() {
|
|
1156
1156
|
s.show();
|
|
1157
1157
|
}, s._onInputClick = function() {
|
|
@@ -1167,14 +1167,14 @@ function Zh() {
|
|
|
1167
1167
|
}, 50)), s._c = !1;
|
|
1168
1168
|
}, s._onClick = function(J) {
|
|
1169
1169
|
J = J || window.event;
|
|
1170
|
-
var
|
|
1171
|
-
if (
|
|
1172
|
-
!h && q(
|
|
1170
|
+
var y = J.target || J.srcElement, D = y;
|
|
1171
|
+
if (y) {
|
|
1172
|
+
!h && q(y, "pika-select") && (y.onchange || (y.setAttribute("onchange", "return;"), u(y, "change", s._onChange)));
|
|
1173
1173
|
do
|
|
1174
1174
|
if (q(D, "pika-single") || D === f.trigger)
|
|
1175
1175
|
return;
|
|
1176
1176
|
while (D = D.parentNode);
|
|
1177
|
-
s._v &&
|
|
1177
|
+
s._v && y !== f.trigger && D !== f.trigger && s.hide();
|
|
1178
1178
|
}
|
|
1179
1179
|
}, s.el = c.createElement("div"), s.el.className = "pika-single" + (f.isRTL ? " is-rtl" : "") + (f.theme ? " " + f.theme : ""), u(s.el, "mousedown", s._onMouseDown, !0), u(s.el, "touchend", s._onMouseDown, !0), u(s.el, "change", s._onChange), f.keyboardInput && u(c, "keydown", s._onKeyChange), f.field && (f.container ? f.container.appendChild(s.el) : f.bound ? c.body.appendChild(s.el) : f.field.parentNode.insertBefore(s.el, f.field.nextSibling), u(f.field, "change", s._onInputChange), f.defaultDate || (f.defaultDate = s._parseFieldValue(), f.setDefaultDate = !0));
|
|
1180
1180
|
var v = f.defaultDate;
|
|
@@ -1310,8 +1310,8 @@ function Zh() {
|
|
|
1310
1310
|
*/
|
|
1311
1311
|
draw: function(g) {
|
|
1312
1312
|
if (!(!this._v && !g)) {
|
|
1313
|
-
var s = this._o, f = s.minYear, v = s.maxYear, J = s.minMonth,
|
|
1314
|
-
this._y <= f && (this._y = f, !isNaN(J) && this._m < J && (this._m = J)), this._y >= v && (this._y = v, !isNaN(
|
|
1313
|
+
var s = this._o, f = s.minYear, v = s.maxYear, J = s.minMonth, y = s.maxMonth, D = "", F;
|
|
1314
|
+
this._y <= f && (this._y = f, !isNaN(J) && this._m < J && (this._m = J)), this._y >= v && (this._y = v, !isNaN(y) && this._m > y && (this._m = y));
|
|
1315
1315
|
for (var U = 0; U < s.numberOfMonths; U++)
|
|
1316
1316
|
F = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2), D += '<div class="pika-lendar">' + K(this, U, this.calendars[U].year, this.calendars[U].month, this.calendars[0].year, F) + this.render(this.calendars[U].year, this.calendars[U].month, F) + "</div>";
|
|
1317
1317
|
this.el.innerHTML = D, s.bound && s.field.type !== "hidden" && A(function() {
|
|
@@ -1320,34 +1320,34 @@ function Zh() {
|
|
|
1320
1320
|
}
|
|
1321
1321
|
},
|
|
1322
1322
|
adjustPosition: function() {
|
|
1323
|
-
var g, s, f, v, J,
|
|
1323
|
+
var g, s, f, v, J, y, D, F, U, Z, W, G;
|
|
1324
1324
|
if (!this._o.container) {
|
|
1325
|
-
if (this.el.style.position = "absolute", g = this._o.trigger, s = g, f = this.el.offsetWidth, v = this.el.offsetHeight, J = window.innerWidth || c.documentElement.clientWidth,
|
|
1325
|
+
if (this.el.style.position = "absolute", g = this._o.trigger, s = g, f = this.el.offsetWidth, v = this.el.offsetHeight, J = window.innerWidth || c.documentElement.clientWidth, y = window.innerHeight || c.documentElement.clientHeight, D = window.pageYOffset || c.body.scrollTop || c.documentElement.scrollTop, W = !0, G = !0, typeof g.getBoundingClientRect == "function")
|
|
1326
1326
|
Z = g.getBoundingClientRect(), F = Z.left + window.pageXOffset, U = Z.bottom + window.pageYOffset;
|
|
1327
1327
|
else
|
|
1328
1328
|
for (F = s.offsetLeft, U = s.offsetTop + s.offsetHeight; s = s.offsetParent; )
|
|
1329
1329
|
F += s.offsetLeft, U += s.offsetTop;
|
|
1330
|
-
(this._o.reposition && F + f > J || this._o.position.indexOf("right") > -1 && F - f + g.offsetWidth > 0) && (F = F - f + g.offsetWidth, W = !1), (this._o.reposition && U + v >
|
|
1330
|
+
(this._o.reposition && F + f > J || this._o.position.indexOf("right") > -1 && F - f + g.offsetWidth > 0) && (F = F - f + g.offsetWidth, W = !1), (this._o.reposition && U + v > y + D || this._o.position.indexOf("top") > -1 && U - v - g.offsetHeight > 0) && (U = U - v - g.offsetHeight, G = !1), this.el.style.left = F + "px", this.el.style.top = U + "px", T(this.el, W ? "left-aligned" : "right-aligned"), T(this.el, G ? "bottom-aligned" : "top-aligned"), r(this.el, W ? "right-aligned" : "left-aligned"), r(this.el, G ? "top-aligned" : "bottom-aligned");
|
|
1331
1331
|
}
|
|
1332
1332
|
},
|
|
1333
1333
|
/**
|
|
1334
1334
|
* render HTML for a particular month
|
|
1335
1335
|
*/
|
|
1336
1336
|
render: function(g, s, f) {
|
|
1337
|
-
var v = this._o, J = /* @__PURE__ */ new Date(),
|
|
1337
|
+
var v = this._o, J = /* @__PURE__ */ new Date(), y = L(g, s), D = new Date(g, s, 1).getDay(), F = [], U = [];
|
|
1338
1338
|
S(J), v.firstDay > 0 && (D -= v.firstDay, D < 0 && (D += 7));
|
|
1339
|
-
for (var Z = s === 0 ? 11 : s - 1, W = s === 11 ? 0 : s + 1, G = s === 0 ? g - 1 : g, O = s === 11 ? g + 1 : g, $ = L(G, Z), sn =
|
|
1339
|
+
for (var Z = s === 0 ? 11 : s - 1, W = s === 11 ? 0 : s + 1, G = s === 0 ? g - 1 : g, O = s === 11 ? g + 1 : g, $ = L(G, Z), sn = y + D, Mn = sn; Mn > 7; )
|
|
1340
1340
|
Mn -= 7;
|
|
1341
1341
|
sn += 7 - Mn;
|
|
1342
1342
|
for (var In = !1, Jn = 0, _n = 0; Jn < sn; Jn++) {
|
|
1343
|
-
var Hn = new Date(g, s, 1 + (Jn - D)),
|
|
1344
|
-
et && (Jn < D ? (pn = $ + pn, Fn = Z, Rn = G) : (pn = pn -
|
|
1343
|
+
var Hn = new Date(g, s, 1 + (Jn - D)), Pn = w(this._d) ? p(Hn, this._d) : !1, $n = p(Hn, J), nt = v.events.indexOf(Hn.toDateString()) !== -1, et = Jn < D || Jn >= y + D, pn = 1 + (Jn - D), Fn = s, Rn = g, Dn = v.startRange && p(v.startRange, Hn), Kn = v.endRange && p(v.endRange, Hn), Gn = v.startRange && v.endRange && v.startRange < Hn && Hn < v.endRange, Zn = v.minDate && Hn < v.minDate || v.maxDate && Hn > v.maxDate || v.disableWeekends && x(Hn) || v.disableDayFn && v.disableDayFn(Hn);
|
|
1344
|
+
et && (Jn < D ? (pn = $ + pn, Fn = Z, Rn = G) : (pn = pn - y, Fn = W, Rn = O));
|
|
1345
1345
|
var At = {
|
|
1346
1346
|
day: pn,
|
|
1347
1347
|
month: Fn,
|
|
1348
1348
|
year: Rn,
|
|
1349
1349
|
hasEvent: nt,
|
|
1350
|
-
isSelected:
|
|
1350
|
+
isSelected: Pn,
|
|
1351
1351
|
isToday: $n,
|
|
1352
1352
|
isDisabled: Zn,
|
|
1353
1353
|
isEmpty: et,
|
|
@@ -1357,7 +1357,7 @@ function Zh() {
|
|
|
1357
1357
|
showDaysInNextAndPreviousMonths: v.showDaysInNextAndPreviousMonths,
|
|
1358
1358
|
enableSelectionDaysInNextAndPreviousMonths: v.enableSelectionDaysInNextAndPreviousMonths
|
|
1359
1359
|
};
|
|
1360
|
-
v.pickWholeWeek &&
|
|
1360
|
+
v.pickWholeWeek && Pn && (In = !0), U.push(k(At)), ++_n === 7 && (v.showWeekNumber && U.unshift(Q(Jn - D, s, g, v.firstWeekOfYearMinDays)), F.push(I(U, v.isRTL, v.pickWholeWeek, In)), U = [], _n = 0, In = !1);
|
|
1361
1361
|
}
|
|
1362
1362
|
return Y(v, F, f);
|
|
1363
1363
|
},
|
|
@@ -1659,7 +1659,7 @@ function qa(n, t, e = 200) {
|
|
|
1659
1659
|
const m = la();
|
|
1660
1660
|
A.setTransform(...m), A.drawImage(a, 0, 0), A.setTransform(1, 0, 0, 1, 0, 0);
|
|
1661
1661
|
} else if (t.length === 4) {
|
|
1662
|
-
const [m, w, x,
|
|
1662
|
+
const [m, w, x, P] = t, L = x - m, S = P - w, p = L * 0.05, d = S * 0.05, N = Math.max(0, m - p), H = Math.max(0, w - d), C = Math.min(a.width, x + p), X = Math.min(a.height, P + d), k = C - N, b = X - H;
|
|
1663
1663
|
A.drawImage(
|
|
1664
1664
|
a,
|
|
1665
1665
|
N,
|
|
@@ -1680,7 +1680,7 @@ function qa(n, t, e = 200) {
|
|
|
1680
1680
|
e
|
|
1681
1681
|
), o = new ImageData(e, e), i = u.data, q = o.data;
|
|
1682
1682
|
for (let m = 0; m < i.length; m += 4) {
|
|
1683
|
-
const w = i[m], x = i[m + 1],
|
|
1683
|
+
const w = i[m], x = i[m + 1], P = i[m + 2], L = 0.2989 * w + 0.587 * x + 0.114 * P;
|
|
1684
1684
|
q[m] = q[m + 1] = q[m + 2] = L, q[m + 3] = 255;
|
|
1685
1685
|
}
|
|
1686
1686
|
const T = new ImageData(e, e), r = ga(q, e, e, 10);
|
|
@@ -1703,8 +1703,8 @@ function ga(n, t, e, a) {
|
|
|
1703
1703
|
const A = Math.floor(a / 2);
|
|
1704
1704
|
for (let u = 0; u < e; u++)
|
|
1705
1705
|
for (let o = 0; o < t; o++) {
|
|
1706
|
-
const i = (u * t + o) * 4, q = Math.max(o - A, 0), T = Math.max(u - A, 0), r = Math.min(o + A, t - 1), m = Math.min(u + A, e - 1), w = (r - q + 1) * (m - T + 1), x = (c[m * t + r] - (q > 0 ? c[m * t + q - 1] : 0) - (T > 0 ? c[(T - 1) * t + r] : 0) + (q > 0 && T > 0 ? c[(T - 1) * t + q - 1] : 0)) / w * 0.9,
|
|
1707
|
-
h[i] = h[i + 1] = h[i + 2] =
|
|
1706
|
+
const i = (u * t + o) * 4, q = Math.max(o - A, 0), T = Math.max(u - A, 0), r = Math.min(o + A, t - 1), m = Math.min(u + A, e - 1), w = (r - q + 1) * (m - T + 1), x = (c[m * t + r] - (q > 0 ? c[m * t + q - 1] : 0) - (T > 0 ? c[(T - 1) * t + r] : 0) + (q > 0 && T > 0 ? c[(T - 1) * t + q - 1] : 0)) / w * 0.9, P = n[i] > x ? 255 : 0;
|
|
1707
|
+
h[i] = h[i + 1] = h[i + 2] = P, h[i + 3] = 255;
|
|
1708
1708
|
}
|
|
1709
1709
|
return h;
|
|
1710
1710
|
}
|
|
@@ -1743,12 +1743,12 @@ function xa(n, t, e, a, h = 0.5) {
|
|
|
1743
1743
|
for (let u = 0; u < A; u++) {
|
|
1744
1744
|
const o = n.data[u * 37 + 4];
|
|
1745
1745
|
if (o < h) continue;
|
|
1746
|
-
const i = n.data[u * 37], q = n.data[u * 37 + 1], T = n.data[u * 37 + 2], r = n.data[u * 37 + 3], m = 1, w = 1, x = [i, q, T, r],
|
|
1746
|
+
const i = n.data[u * 37], q = n.data[u * 37 + 1], T = n.data[u * 37 + 2], r = n.data[u * 37 + 3], m = 1, w = 1, x = [i, q, T, r], P = n.data.slice(u * 37 + 5, u * 37 + 37), L = new Float32Array(25600);
|
|
1747
1747
|
for (let E = 0; E < 160; E++)
|
|
1748
1748
|
for (let B = 0; B < 160; B++) {
|
|
1749
1749
|
let K = 0;
|
|
1750
1750
|
for (let Y = 0; Y < 32; Y++)
|
|
1751
|
-
K +=
|
|
1751
|
+
K += P[Y] * t.data[Y * 160 * 160 + E * 160 + B];
|
|
1752
1752
|
L[E * 160 + B] = K > 0 ? 1 : 0;
|
|
1753
1753
|
}
|
|
1754
1754
|
const S = Ta();
|
|
@@ -1903,7 +1903,7 @@ const Ca = () => typeof window < "u" && typeof window.umami < "u", Qn = (n, t =
|
|
|
1903
1903
|
STEP3_PAYMENT_SUCCESS: "einv_payment_success",
|
|
1904
1904
|
STEP3_PAYMENT_FAILED: "einv_payment_failed",
|
|
1905
1905
|
STEP3_PAYMENT_WRONG_AMOUNT: "einv_payment_wrong_amount"
|
|
1906
|
-
},
|
|
1906
|
+
}, Pt = {
|
|
1907
1907
|
success(n) {
|
|
1908
1908
|
Qn(Ln.STEP3_PAYMENT_SUCCESS, {
|
|
1909
1909
|
orderId: n.orderId,
|
|
@@ -1959,7 +1959,7 @@ const Ca = () => typeof window < "u" && typeof window.umami < "u", Qn = (n, t =
|
|
|
1959
1959
|
theme: n.theme
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
|
-
},
|
|
1962
|
+
}, P0 = {
|
|
1963
1963
|
success(n) {
|
|
1964
1964
|
Qn(Ln.STEP3_QR_GENERATION_SUCCESS, {
|
|
1965
1965
|
orderId: n.orderId,
|
|
@@ -1982,7 +1982,7 @@ const Ca = () => typeof window < "u" && typeof window.umami < "u", Qn = (n, t =
|
|
|
1982
1982
|
retryCount: n.retryCount || 0
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
|
-
},
|
|
1985
|
+
}, y0 = {
|
|
1986
1986
|
stopped(n) {
|
|
1987
1987
|
Qn(Ln.STEP3_POLLING_STOPPED, {
|
|
1988
1988
|
orderId: n.orderId,
|
|
@@ -2021,7 +2021,7 @@ async function Xa({
|
|
|
2021
2021
|
}) {
|
|
2022
2022
|
console.log("render form");
|
|
2023
2023
|
let x = null;
|
|
2024
|
-
function
|
|
2024
|
+
function P(V = "") {
|
|
2025
2025
|
return String(V).trim().toUpperCase()[4] === "M" ? "HDMTT" : "HDTT";
|
|
2026
2026
|
}
|
|
2027
2027
|
function L() {
|
|
@@ -2034,9 +2034,9 @@ async function Xa({
|
|
|
2034
2034
|
M.className = "wgt:text-sm wgt:leading-relaxed", M.style.color = "#FF8447", M.innerHTML = l("register_note", {
|
|
2035
2035
|
defaultValue: "Mã số thuế này đã được đăng ký trên M-Invoice, vì vậy bạn không thể tạo mới với thông tin này.",
|
|
2036
2036
|
provider: m
|
|
2037
|
-
}), x.appendChild(M),
|
|
2037
|
+
}), x.appendChild(M), Pn && Pn.firstChild && (Pn.insertBefore(
|
|
2038
2038
|
x,
|
|
2039
|
-
|
|
2039
|
+
Pn.firstChild
|
|
2040
2040
|
), setTimeout(() => {
|
|
2041
2041
|
x.style.opacity = "1";
|
|
2042
2042
|
}, 50));
|
|
@@ -2061,7 +2061,7 @@ async function Xa({
|
|
|
2061
2061
|
const M = fn();
|
|
2062
2062
|
typeof n == "function" && n(M);
|
|
2063
2063
|
}), d.appendChild(N);
|
|
2064
|
-
let H, C, X, k, b, Q, I, E, B, K, Y, nn, g, s, f, v, J,
|
|
2064
|
+
let H, C, X, k, b, Q, I, E, B, K, Y, nn, g, s, f, v, J, y, D, F, U, Z, W, G, O;
|
|
2065
2065
|
const $ = document.createElement("button");
|
|
2066
2066
|
H = Vn({
|
|
2067
2067
|
name: "taxCode",
|
|
@@ -2400,7 +2400,7 @@ async function Xa({
|
|
|
2400
2400
|
onChange: (V) => {
|
|
2401
2401
|
Jn.inputEl.value = V, An();
|
|
2402
2402
|
}
|
|
2403
|
-
}),
|
|
2403
|
+
}), y = document.createElement("input"), y.type = "checkbox", y.name = "hasUsedEInvoiceCB", y.className = "wgt:cursor-pointer", y.checked = t?.eInvoiceRegistration?.hasUsedEInvoice, y.addEventListener("change", (V) => {
|
|
2404
2404
|
V.target.checked ? (mn.appendChild(j), mn.appendChild(un)) : (D.checked = !1, U.inputEl.value = "", U.setError(null), F && (F.inputEl.value = "", F.setError(null), un.contains(F.container) && un.removeChild(F.container)), mn.removeChild(j), mn.removeChild(un));
|
|
2405
2405
|
}), D = document.createElement("input"), D.type = "checkbox", D.name = "hasUsedEInvoiceBeforeCB", D.className = "wgt:cursor-pointer", D.checked = t?.eInvoiceRegistration?.isUsedEInvoiceBefore, D.addEventListener("change", (V) => {
|
|
2406
2406
|
V.target.checked ? un.appendChild(F.container) : (F.inputEl.value = "", F.setError(null), un.contains(F.container) && un.removeChild(F.container));
|
|
@@ -2520,14 +2520,14 @@ async function Xa({
|
|
|
2520
2520
|
M === _n && An();
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
|
-
const
|
|
2524
|
-
|
|
2523
|
+
const Pn = document.createElement("div");
|
|
2524
|
+
Pn.className = "wgt:space-y-3";
|
|
2525
2525
|
const $n = document.createElement("h3");
|
|
2526
|
-
$n.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", $n.innerText = l("unitInfo", "1. Thông tin đơn vị"),
|
|
2526
|
+
$n.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", $n.innerText = l("unitInfo", "1. Thông tin đơn vị"), Pn.appendChild($n), setTimeout(() => L(), 50);
|
|
2527
2527
|
const nt = document.createElement("div");
|
|
2528
|
-
nt.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",
|
|
2528
|
+
nt.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", Pn.appendChild(nt), nt.appendChild(H.container), nt.appendChild(C.container), nt.appendChild(X.container), nt.appendChild(k.container);
|
|
2529
2529
|
const et = document.createElement("div");
|
|
2530
|
-
et.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4",
|
|
2530
|
+
et.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", Pn.appendChild(et), et.appendChild(Z.container), N.appendChild(Pn);
|
|
2531
2531
|
const pn = document.createElement("div");
|
|
2532
2532
|
pn.className = "wgt:space-y-4";
|
|
2533
2533
|
const Fn = document.createElement("h3");
|
|
@@ -2669,8 +2669,8 @@ async function Xa({
|
|
|
2669
2669
|
), ot.appendChild(Ct), pn.appendChild(ot), N.appendChild(pn);
|
|
2670
2670
|
const jn = document.createElement("div");
|
|
2671
2671
|
jn.className = "wgt:space-y-4";
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2672
|
+
const yn = document.createElement("h3");
|
|
2673
|
+
yn.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", yn.innerText = l("contactInfo", "3. Thông tin người liên hệ:"), jn.appendChild(yn);
|
|
2674
2674
|
const z = document.createElement("div");
|
|
2675
2675
|
z.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", z.appendChild(b.container), z.appendChild(Q.container), z.appendChild(I.container), z.appendChild(E.container), jn.appendChild(z), N.appendChild(jn);
|
|
2676
2676
|
const an = document.createElement("div");
|
|
@@ -2682,12 +2682,12 @@ async function Xa({
|
|
|
2682
2682
|
const mn = document.createElement("div");
|
|
2683
2683
|
mn.className = "wgt:flex wgt:flex-col wgt:space-y-4 wgt:border wgt:border-soft-200 wgt:px-6 wgt:py-4 wgt:rounded-xl", r || N.appendChild(mn);
|
|
2684
2684
|
const cn = document.createElement("div");
|
|
2685
|
-
cn.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", cn.appendChild(
|
|
2685
|
+
cn.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", cn.appendChild(y);
|
|
2686
2686
|
const en = document.createElement("h4");
|
|
2687
2687
|
en.className = "wgt:font-semibold wgt:italic", en.innerText = l(
|
|
2688
2688
|
"hasUsedEInvoice",
|
|
2689
2689
|
"Bạn đã sử dụng hoá đơn điện tử?"
|
|
2690
|
-
), cn.appendChild(en), r || mn.appendChild(cn),
|
|
2690
|
+
), cn.appendChild(en), r || mn.appendChild(cn), y.checked = r, y.disabled = r;
|
|
2691
2691
|
const j = document.createElement("div");
|
|
2692
2692
|
if (j.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", !r) {
|
|
2693
2693
|
j.appendChild(D);
|
|
@@ -2798,7 +2798,7 @@ async function Xa({
|
|
|
2798
2798
|
nationality: f?.getValue(),
|
|
2799
2799
|
permanentAddress: v?.getValue()
|
|
2800
2800
|
},
|
|
2801
|
-
hasUsedEInvoice: r ? !0 :
|
|
2801
|
+
hasUsedEInvoice: r ? !0 : y?.checked || !1,
|
|
2802
2802
|
isUsedEInvoiceBefore: D?.checked || !1,
|
|
2803
2803
|
invoiceSymbol: J?.getValue()
|
|
2804
2804
|
},
|
|
@@ -2827,7 +2827,7 @@ async function Xa({
|
|
|
2827
2827
|
V.inputEl.addEventListener("input", An);
|
|
2828
2828
|
}), [Y, k].forEach((V) => {
|
|
2829
2829
|
V.selectEl.addEventListener("change", An);
|
|
2830
|
-
}), [
|
|
2830
|
+
}), [y, D].forEach((V) => {
|
|
2831
2831
|
V.addEventListener("change", An);
|
|
2832
2832
|
}), $.addEventListener("click", async (V) => {
|
|
2833
2833
|
if (V.preventDefault(), !wn()) return;
|
|
@@ -2857,7 +2857,7 @@ async function Xa({
|
|
|
2857
2857
|
try {
|
|
2858
2858
|
const Tn = t?.provider || "m-invoice";
|
|
2859
2859
|
console.log("Current theme:", e), console.log("Provider being used:", Tn);
|
|
2860
|
-
const ln = J?.getValue?.() || Jn?.inputEl?.value || "", Sn =
|
|
2860
|
+
const ln = J?.getValue?.() || Jn?.inputEl?.value || "", Sn = P(ln);
|
|
2861
2861
|
if (_ = (await Kt(Tn, M, Sn)).isNewCustomer, _)
|
|
2862
2862
|
S();
|
|
2863
2863
|
else {
|
|
@@ -2977,8 +2977,8 @@ function Na({
|
|
|
2977
2977
|
"searchUnits"
|
|
2978
2978
|
)}` : x.innerText = "";
|
|
2979
2979
|
m.appendChild(x), o.appendChild(m);
|
|
2980
|
-
const
|
|
2981
|
-
|
|
2980
|
+
const P = document.createElement("div");
|
|
2981
|
+
P.className = "wgt:mt-4";
|
|
2982
2982
|
const L = document.createElement("span");
|
|
2983
2983
|
L.className = [
|
|
2984
2984
|
"wgt:block",
|
|
@@ -2987,9 +2987,9 @@ function Na({
|
|
|
2987
2987
|
h ? "wgt:text-primary" : "wgt:text-text-sub-600"
|
|
2988
2988
|
].join(" ");
|
|
2989
2989
|
let S = A ? n?.renewPrice ?? 0 : n?.price ?? 0;
|
|
2990
|
-
L.innerText = vn(n?.limit * S),
|
|
2990
|
+
L.innerText = vn(n?.limit * S), P.appendChild(L);
|
|
2991
2991
|
const p = document.createElement("span");
|
|
2992
|
-
return p.className = "wgt:text-sm wgt:text-text-sub-600", p.innerText = `VND/${l("package")}`,
|
|
2992
|
+
return p.className = "wgt:text-sm wgt:text-text-sub-600", p.innerText = `VND/${l("package")}`, P.appendChild(p), u.appendChild(P), { container: u };
|
|
2993
2993
|
}
|
|
2994
2994
|
function v0({
|
|
2995
2995
|
type: n = "service",
|
|
@@ -3026,7 +3026,7 @@ function v0({
|
|
|
3026
3026
|
}
|
|
3027
3027
|
const w = m("prev"), x = m("next");
|
|
3028
3028
|
w.style.left = "8px", x.style.right = "8px", i.appendChild(w), i.appendChild(x);
|
|
3029
|
-
let
|
|
3029
|
+
let P = t, L = e, S = h;
|
|
3030
3030
|
const p = () => window.matchMedia("(max-width: 414px)").matches;
|
|
3031
3031
|
function d() {
|
|
3032
3032
|
const B = T.getBoundingClientRect(), K = i.getBoundingClientRect(), Y = B.top - K.top + B.height / 2;
|
|
@@ -3046,12 +3046,12 @@ function v0({
|
|
|
3046
3046
|
}
|
|
3047
3047
|
w.addEventListener("click", () => H(-1)), x.addEventListener("click", () => H(1)), T.addEventListener("scroll", C);
|
|
3048
3048
|
function X() {
|
|
3049
|
-
if (T.innerHTML = "", !
|
|
3049
|
+
if (T.innerHTML = "", !P || P.length === 0) {
|
|
3050
3050
|
const B = document.createElement("div");
|
|
3051
3051
|
B.className = "wgt:col-span-full wgt:text-center wgt:py-8 wgt:text-text-sub-600", B.innerText = l("noPackageFound") || "Không tìm thấy gói phù hợp", T.appendChild(B);
|
|
3052
3052
|
return;
|
|
3053
3053
|
}
|
|
3054
|
-
|
|
3054
|
+
P.forEach((B) => {
|
|
3055
3055
|
const K = B._id === S, Y = L.includes(B.code), { container: nn } = Na({
|
|
3056
3056
|
pkg: B,
|
|
3057
3057
|
type: n,
|
|
@@ -3093,7 +3093,7 @@ function v0({
|
|
|
3093
3093
|
S = B, X();
|
|
3094
3094
|
},
|
|
3095
3095
|
updateData(B, K = null, Y = null) {
|
|
3096
|
-
|
|
3096
|
+
P = B || P, K !== null && (L = K), Y !== null && (S = Y), X();
|
|
3097
3097
|
},
|
|
3098
3098
|
updateDiscountedOnly(B) {
|
|
3099
3099
|
L = B, X();
|
|
@@ -3208,7 +3208,7 @@ function Ha({
|
|
|
3208
3208
|
"expiredDate"
|
|
3209
3209
|
)} ${n.expiredAt.split("T")[0]}`, A.appendChild(r), h.appendChild(c), h.appendChild(A), { container: h };
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function Pa({
|
|
3212
3212
|
value: n = "",
|
|
3213
3213
|
placeholder: t = "",
|
|
3214
3214
|
onInputChange: e = void 0
|
|
@@ -3220,7 +3220,7 @@ function ya({
|
|
|
3220
3220
|
const A = document.createElement("input");
|
|
3221
3221
|
return A.type = "text", A.inputMode = "numeric", A.value = n, A.placeholder = a, A.className = "wgt:flex-1 wgt:px-4 wgt:py-2 wgt:text-text-sub-600 wgt:placeholder-gray-400 wgt:bg-white wgt:focus:outline-none", typeof e == "function" && A.addEventListener("input", e), c.appendChild(A), { container: h };
|
|
3222
3222
|
}
|
|
3223
|
-
function
|
|
3223
|
+
function ya({
|
|
3224
3224
|
theme: n,
|
|
3225
3225
|
debounceTimer: t,
|
|
3226
3226
|
typedUnits: e,
|
|
@@ -3254,7 +3254,7 @@ function Pa({
|
|
|
3254
3254
|
}
|
|
3255
3255
|
}, 500) : (A = c, a && a());
|
|
3256
3256
|
}
|
|
3257
|
-
const r =
|
|
3257
|
+
const r = Pa({
|
|
3258
3258
|
value: "",
|
|
3259
3259
|
placeholder: l("searchUnits"),
|
|
3260
3260
|
onInputChange: (p) => {
|
|
@@ -3268,18 +3268,18 @@ function Pa({
|
|
|
3268
3268
|
w.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", w.innerText = l("mostSuitablePackage"), m.appendChild(w);
|
|
3269
3269
|
const x = document.createElement("div");
|
|
3270
3270
|
m.appendChild(x);
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3271
|
+
const P = document.createElement("div");
|
|
3272
|
+
P.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", P.innerHTML = `
|
|
3273
3273
|
<div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
|
|
3274
3274
|
<div class="wgt:h-8 wgt:w-8 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
|
|
3275
3275
|
<span class="wgt:text-sm wgt:text-text-sub-600">${l("loading")}...</span>
|
|
3276
3276
|
</div>
|
|
3277
|
-
`, x.appendChild(
|
|
3277
|
+
`, x.appendChild(P);
|
|
3278
3278
|
function L(p) {
|
|
3279
3279
|
return c.find((d) => d._id === p) || null;
|
|
3280
3280
|
}
|
|
3281
3281
|
function S() {
|
|
3282
|
-
x.contains(
|
|
3282
|
+
x.contains(P) && x.removeChild(P);
|
|
3283
3283
|
}
|
|
3284
3284
|
return {
|
|
3285
3285
|
container: u,
|
|
@@ -3400,7 +3400,7 @@ async function Ia({
|
|
|
3400
3400
|
selectedPromotions: m,
|
|
3401
3401
|
registrationData: w,
|
|
3402
3402
|
setSelectedPromotions: x,
|
|
3403
|
-
setPackages:
|
|
3403
|
+
setPackages: P,
|
|
3404
3404
|
setPromotionCodes: L,
|
|
3405
3405
|
isNewCustomer: S,
|
|
3406
3406
|
savedQuantities: p,
|
|
@@ -3419,7 +3419,7 @@ async function Ia({
|
|
|
3419
3419
|
function J(z) {
|
|
3420
3420
|
return z.find((an) => Y.includes(an.code));
|
|
3421
3421
|
}
|
|
3422
|
-
function
|
|
3422
|
+
function y(z) {
|
|
3423
3423
|
return E.find((an) => an._id === z) || null;
|
|
3424
3424
|
}
|
|
3425
3425
|
const D = document.createElement("div");
|
|
@@ -3441,20 +3441,20 @@ async function Ia({
|
|
|
3441
3441
|
setFilteredInvoiceOptions: In,
|
|
3442
3442
|
findInvoiceById: Jn,
|
|
3443
3443
|
removeLoading: _n
|
|
3444
|
-
} =
|
|
3444
|
+
} = ya({
|
|
3445
3445
|
theme: T,
|
|
3446
3446
|
debounceTimer: nn,
|
|
3447
3447
|
typedUnits: k,
|
|
3448
3448
|
onSearchComplete: () => {
|
|
3449
|
-
qt(),
|
|
3449
|
+
qt(), yn();
|
|
3450
3450
|
},
|
|
3451
3451
|
selectedProvider: r
|
|
3452
3452
|
});
|
|
3453
3453
|
W.appendChild(G);
|
|
3454
|
-
let Hn = null,
|
|
3454
|
+
let Hn = null, Pn = null;
|
|
3455
3455
|
if (!N) {
|
|
3456
3456
|
const z = ka(N);
|
|
3457
|
-
|
|
3457
|
+
Pn = z.container, Hn = z.signatureSelectorWrapper, W.appendChild(Pn);
|
|
3458
3458
|
}
|
|
3459
3459
|
const $n = document.createElement("div");
|
|
3460
3460
|
$n.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", $n.innerHTML = `
|
|
@@ -3500,7 +3500,7 @@ async function Ia({
|
|
|
3500
3500
|
isCashRegister: C
|
|
3501
3501
|
});
|
|
3502
3502
|
});
|
|
3503
|
-
}),
|
|
3503
|
+
}), P(en), L(tn);
|
|
3504
3504
|
try {
|
|
3505
3505
|
const j = await Lh({
|
|
3506
3506
|
eInvoiceRegistration: {
|
|
@@ -3644,7 +3644,7 @@ async function Ia({
|
|
|
3644
3644
|
}
|
|
3645
3645
|
}
|
|
3646
3646
|
function Lt() {
|
|
3647
|
-
ot(), qt(), N || Wt(), ct(), jn(),
|
|
3647
|
+
ot(), qt(), N || Wt(), ct(), jn(), yn();
|
|
3648
3648
|
}
|
|
3649
3649
|
function Ht(z, an, on) {
|
|
3650
3650
|
const tn = Object.values(K).find(
|
|
@@ -3682,7 +3682,7 @@ async function Ia({
|
|
|
3682
3682
|
(tn) => tn._id === b
|
|
3683
3683
|
)?.code, on = sn().find((tn) => tn._id === z)?.code;
|
|
3684
3684
|
Ht(an, on, () => {
|
|
3685
|
-
b = z, st.setSelectedPackageId(z), ot(), ct(), jn(),
|
|
3685
|
+
b = z, st.setSelectedPackageId(z), ot(), ct(), jn(), yn();
|
|
3686
3686
|
});
|
|
3687
3687
|
}
|
|
3688
3688
|
}), O.appendChild(st.container);
|
|
@@ -3705,14 +3705,14 @@ async function Ia({
|
|
|
3705
3705
|
(tn) => tn._id === Q
|
|
3706
3706
|
)?.code, on = E.find((tn) => tn._id === z)?.code;
|
|
3707
3707
|
if (N && Q === z) {
|
|
3708
|
-
Q = null, ut.setSelectedPackageId(null), ot(), ct(), jn(),
|
|
3708
|
+
Q = null, ut.setSelectedPackageId(null), ot(), ct(), jn(), yn();
|
|
3709
3709
|
return;
|
|
3710
3710
|
}
|
|
3711
3711
|
Ht(an, on, () => {
|
|
3712
|
-
Q = z, ut.setSelectedPackageId(z), In(sn()), ot(), ct(), jn(),
|
|
3712
|
+
Q = z, ut.setSelectedPackageId(z), In(sn()), ot(), ct(), jn(), yn();
|
|
3713
3713
|
});
|
|
3714
3714
|
}
|
|
3715
|
-
}), Hn.appendChild(ut.container)) : (ut = null,
|
|
3715
|
+
}), Hn.appendChild(ut.container)) : (ut = null, Pn && (Pn.style.display = "none")));
|
|
3716
3716
|
}
|
|
3717
3717
|
const at = document.createElement("div");
|
|
3718
3718
|
at.className = "wgt:w-full", W.appendChild(at);
|
|
@@ -3795,7 +3795,7 @@ async function Ia({
|
|
|
3795
3795
|
handleClick: () => {
|
|
3796
3796
|
I = I.filter(
|
|
3797
3797
|
(Nn) => Nn !== un
|
|
3798
|
-
), jn(),
|
|
3798
|
+
), jn(), yn();
|
|
3799
3799
|
}
|
|
3800
3800
|
});
|
|
3801
3801
|
Cn.className = "wgt:w-fit wgt:h-fit wgt:p-0 wgt:bg-transparent wgt:cursor-pointer", Cn.innerHTML = `<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3827,7 +3827,7 @@ async function Ia({
|
|
|
3827
3827
|
onSelect: (rn, Cn) => {
|
|
3828
3828
|
Cn ? I.includes(rn) || I.push(rn) : I = I.filter(
|
|
3829
3829
|
(Nn) => Nn !== rn
|
|
3830
|
-
), jn(),
|
|
3830
|
+
), jn(), yn();
|
|
3831
3831
|
},
|
|
3832
3832
|
isHidden: !1,
|
|
3833
3833
|
isSelectable: !0
|
|
@@ -3839,7 +3839,7 @@ async function Ia({
|
|
|
3839
3839
|
j.className = "wgt:text-text-sub-600", j.innerText = l("noPromotionFound"), bn.appendChild(j);
|
|
3840
3840
|
}
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3842
|
+
function yn() {
|
|
3843
3843
|
if (v(), pn.innerHTML = "", W.appendChild(et), W.appendChild(Fn), W.appendChild(nt), sn().length === 0 && E.length === 0) {
|
|
3844
3844
|
const R = document.createElement("tr");
|
|
3845
3845
|
R.innerHTML = `
|
|
@@ -3865,13 +3865,13 @@ async function Ia({
|
|
|
3865
3865
|
xn.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";
|
|
3866
3866
|
const Xn = document.createElement("button");
|
|
3867
3867
|
Xn.type = "button", Xn.ariaLabel = l("decrease"), Xn.disabled = !0, Xn.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:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", Xn.innerText = "–", Xn.addEventListener("click", () => {
|
|
3868
|
-
g > 1 && (g -= 1,
|
|
3868
|
+
g > 1 && (g -= 1, yn());
|
|
3869
3869
|
}), xn.appendChild(Xn);
|
|
3870
3870
|
const dn = document.createElement("span");
|
|
3871
3871
|
dn.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", dn.innerText = g, xn.appendChild(dn);
|
|
3872
3872
|
const wn = document.createElement("button");
|
|
3873
3873
|
wn.type = "button", wn.ariaLabel = l("increase"), wn.disabled = !0, wn.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:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", wn.innerText = "+", wn.addEventListener("click", () => {
|
|
3874
|
-
g += 1,
|
|
3874
|
+
g += 1, yn();
|
|
3875
3875
|
}), xn.appendChild(wn), En.appendChild(xn), R.appendChild(En);
|
|
3876
3876
|
const An = document.createElement("td");
|
|
3877
3877
|
An.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", An.innerText = vn(B[0]?.price) + " VND", R.appendChild(An);
|
|
@@ -3910,13 +3910,13 @@ async function Ia({
|
|
|
3910
3910
|
dn.type = "button", dn.ariaLabel = l("decrease");
|
|
3911
3911
|
const wn = S ? R?.price ?? 0 : R?.renewPrice ?? 0;
|
|
3912
3912
|
dn.disabled = s <= 1 || wn === 0, dn.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", dn.innerText = "–", dn.addEventListener("click", () => {
|
|
3913
|
-
s > 1 && (s -= 1,
|
|
3913
|
+
s > 1 && (s -= 1, yn());
|
|
3914
3914
|
}), Xn.appendChild(dn);
|
|
3915
3915
|
const An = document.createElement("span");
|
|
3916
3916
|
An.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", An.innerText = wn === 0 ? 1 : s, Xn.appendChild(An);
|
|
3917
3917
|
const fn = document.createElement("button");
|
|
3918
3918
|
fn.type = "button", fn.ariaLabel = l("increase"), fn.disabled = R?.price === 0, fn.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", fn.innerText = "+", fn.addEventListener("click", () => {
|
|
3919
|
-
wn !== 0 && (s += 1,
|
|
3919
|
+
wn !== 0 && (s += 1, yn());
|
|
3920
3920
|
}), Xn.appendChild(fn), xn.appendChild(Xn), hn.appendChild(xn);
|
|
3921
3921
|
const On = document.createElement("td");
|
|
3922
3922
|
On.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", On.innerText = vn(wn * R?.limit) + " VND", hn.appendChild(On);
|
|
@@ -3940,7 +3940,7 @@ async function Ia({
|
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
{
|
|
3943
|
-
const R =
|
|
3943
|
+
const R = y(Q);
|
|
3944
3944
|
if (R) {
|
|
3945
3945
|
const hn = document.createElement("tr");
|
|
3946
3946
|
hn.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";
|
|
@@ -3955,13 +3955,13 @@ async function Ia({
|
|
|
3955
3955
|
Xn.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";
|
|
3956
3956
|
const dn = document.createElement("button");
|
|
3957
3957
|
dn.type = "button", dn.ariaLabel = l("decrease"), dn.disabled = f <= 1, dn.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:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold" + (f <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), dn.innerText = "–", dn.addEventListener("click", () => {
|
|
3958
|
-
f > 1 && (f -= 1,
|
|
3958
|
+
f > 1 && (f -= 1, yn());
|
|
3959
3959
|
}), Xn.appendChild(dn);
|
|
3960
3960
|
const wn = document.createElement("span");
|
|
3961
3961
|
wn.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", wn.innerText = f, Xn.appendChild(wn);
|
|
3962
3962
|
const An = document.createElement("button");
|
|
3963
3963
|
An.type = "button", An.ariaLabel = l("increase"), An.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:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", An.innerText = "+", An.addEventListener("click", () => {
|
|
3964
|
-
f += 1,
|
|
3964
|
+
f += 1, yn();
|
|
3965
3965
|
}), Xn.appendChild(An), xn.appendChild(Xn), hn.appendChild(xn);
|
|
3966
3966
|
const fn = document.createElement("td");
|
|
3967
3967
|
fn.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", fn.innerText = vn(R?.limit * R?.price) + " VND", hn.appendChild(fn);
|
|
@@ -4009,7 +4009,7 @@ async function Ia({
|
|
|
4009
4009
|
"package"
|
|
4010
4010
|
)} ${R?.reward?.packageCodes?.join(", ")}`, xn.style.color = "#12B76A") : xn.innerText = "", hn.appendChild(xn), pn.appendChild(hn);
|
|
4011
4011
|
});
|
|
4012
|
-
const tn = !N && B.length > 0 && !z?.withoutInitialFee ? B[0]?.price * g : 0, mn = Jn(b), cn = mn ? N ? mn.renewPrice ?? 0 : mn.price ?? 0 : 0, en = mn ? cn * mn.limit * s : 0, j =
|
|
4012
|
+
const tn = !N && B.length > 0 && !z?.withoutInitialFee ? B[0]?.price * g : 0, mn = Jn(b), cn = mn ? N ? mn.renewPrice ?? 0 : mn.price ?? 0 : 0, en = mn ? cn * mn.limit * s : 0, j = y(Q), un = j ? j.price * j.limit * f : 0, rn = tn + en + un, Cn = Math.min(on, rn), Nn = Math.max(rn - Cn, 0);
|
|
4013
4013
|
i(Nn);
|
|
4014
4014
|
{
|
|
4015
4015
|
const R = document.createElement("tr");
|
|
@@ -4049,11 +4049,11 @@ function ba({
|
|
|
4049
4049
|
w.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
|
|
4050
4050
|
const x = document.createElement("img");
|
|
4051
4051
|
x.src = n, x.alt = "QR code", x.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", w.appendChild(x), r.appendChild(w);
|
|
4052
|
-
const
|
|
4053
|
-
|
|
4052
|
+
const P = document.createElement("div");
|
|
4053
|
+
P.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", t.forEach((Q) => {
|
|
4054
4054
|
const I = document.createElement("img");
|
|
4055
|
-
I.src = Q, I.alt = "Logo", I.className = `wgt:w-${o === "ocb" ? "28" : "8"} wgt:object-contain`,
|
|
4056
|
-
}), r.appendChild(
|
|
4055
|
+
I.src = Q, I.alt = "Logo", I.className = `wgt:w-${o === "ocb" ? "28" : "8"} wgt:object-contain`, P.appendChild(I);
|
|
4056
|
+
}), r.appendChild(P);
|
|
4057
4057
|
const L = document.createElement("div");
|
|
4058
4058
|
L.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
|
|
4059
4059
|
const S = document.createElement("h3");
|
|
@@ -4089,9 +4089,9 @@ function ba({
|
|
|
4089
4089
|
return b.src = u, b.alt = "QR payment illustration", b.className = "wgt:h-full wgt:object-contain", k.appendChild(b), N.appendChild(k), i.appendChild(N), {
|
|
4090
4090
|
container: i,
|
|
4091
4091
|
update(Q = {}) {
|
|
4092
|
-
Q.qrSrc != null && (x.src = Q.qrSrc), Q.logos && (
|
|
4092
|
+
Q.qrSrc != null && (x.src = Q.qrSrc), Q.logos && (P.innerHTML = "", Q.logos.forEach((I) => {
|
|
4093
4093
|
const E = document.createElement("img");
|
|
4094
|
-
E.src = I, E.alt = "Logo", E.className = "wgt:w-8 wgt:object-contain",
|
|
4094
|
+
E.src = I, E.alt = "Logo", E.className = "wgt:w-8 wgt:object-contain", P.appendChild(E);
|
|
4095
4095
|
})), Q.accountName != null && (S.innerText = Q.accountName), Q.accountNumber != null && (p.innerHTML = `${l(
|
|
4096
4096
|
"accountNumber"
|
|
4097
4097
|
)}: <span class="wgt:font-medium">${Q.accountNumber}</span>`), Q.bankName != null && (d.innerHTML = `${l(
|
|
@@ -4169,13 +4169,13 @@ function Ja({
|
|
|
4169
4169
|
w.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
|
|
4170
4170
|
const x = document.createElement("p");
|
|
4171
4171
|
x.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
|
|
4172
|
-
const
|
|
4172
|
+
const P = (O) => {
|
|
4173
4173
|
const $ = Math.floor(O / 60).toString().padStart(2, "0"), sn = (O % 60).toString().padStart(2, "0");
|
|
4174
4174
|
return `${$}:${sn}`;
|
|
4175
4175
|
}, L = () => {
|
|
4176
4176
|
x.innerHTML = `${l(
|
|
4177
4177
|
"completePaymentIn"
|
|
4178
|
-
)} <span class="wgt:font-bold">${
|
|
4178
|
+
)} <span class="wgt:font-bold">${P(r)}</span>`;
|
|
4179
4179
|
};
|
|
4180
4180
|
L();
|
|
4181
4181
|
const S = () => {
|
|
@@ -4203,13 +4203,13 @@ function Ja({
|
|
|
4203
4203
|
const Q = document.createElement("h4");
|
|
4204
4204
|
Q.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", Q.innerText = l("subscriptionPackage");
|
|
4205
4205
|
const I = document.createElement("span");
|
|
4206
|
-
if (I.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", I.innerText = t ? String(t.code) : "", b.appendChild(Q), b.appendChild(I), N.appendChild(b), !o) {
|
|
4206
|
+
if (I.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", I.innerText = t?.code ? String(t.code) : "", b.appendChild(Q), b.appendChild(I), N.appendChild(b), !o) {
|
|
4207
4207
|
const O = document.createElement("div");
|
|
4208
4208
|
O.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4209
4209
|
const $ = document.createElement("h4");
|
|
4210
4210
|
$.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", $.innerText = l("digitalSignaturePackage");
|
|
4211
4211
|
const sn = document.createElement("span");
|
|
4212
|
-
sn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", sn.innerText = e ? String(e.code) : "", O.appendChild($), O.appendChild(sn), N.appendChild(O);
|
|
4212
|
+
sn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", sn.innerText = e?.code ? String(e.code) : l("notUsed", "Không sử dụng"), O.appendChild($), O.appendChild(sn), N.appendChild(O);
|
|
4213
4213
|
}
|
|
4214
4214
|
if (c && c.length > 0) {
|
|
4215
4215
|
const O = document.createElement("div");
|
|
@@ -4245,11 +4245,11 @@ function Ja({
|
|
|
4245
4245
|
v.className = "wgt:flex wgt:items-start wgt:gap-2";
|
|
4246
4246
|
const J = document.createElement("img");
|
|
4247
4247
|
J.src = Ma, J.className = "wgt:w-4 wgt:h-4";
|
|
4248
|
-
const
|
|
4249
|
-
if (
|
|
4248
|
+
const y = document.createElement("p");
|
|
4249
|
+
if (y.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#344054]", y.innerHTML = l(
|
|
4250
4250
|
"contact_info",
|
|
4251
4251
|
'Thông tin liên hệ: <a href="mailto:hotro247@atomsolution.vn" class="wgt:font-semibold wgt:underline">hotro247@atomsolution.vn</a>'
|
|
4252
|
-
), v.appendChild(J), v.appendChild(
|
|
4252
|
+
), v.appendChild(J), v.appendChild(y), nn.appendChild(v), N.appendChild(nn), q) {
|
|
4253
4253
|
const O = document.createElement("p");
|
|
4254
4254
|
O.className = "wgt:text-sm wgt:italic wgt:text-[#335CFF] wgt:mt-6 wgt:text-center", O.textContent = l("freeOrderDescription") || "Bạn không cần thanh toán cho đơn hàng này", N.appendChild(O);
|
|
4255
4255
|
}
|
|
@@ -4346,7 +4346,7 @@ function Ja({
|
|
|
4346
4346
|
const $ = T.querySelectorAll(
|
|
4347
4347
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4348
4348
|
)[0];
|
|
4349
|
-
$ && ($.innerText = O ? String(O.code
|
|
4349
|
+
$ && ($.innerText = O?.code ? String(O.code) : "");
|
|
4350
4350
|
},
|
|
4351
4351
|
setSelectedSignaturePackage(O) {
|
|
4352
4352
|
if (o) return;
|
|
@@ -4354,7 +4354,7 @@ function Ja({
|
|
|
4354
4354
|
const $ = T.querySelectorAll(
|
|
4355
4355
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4356
4356
|
);
|
|
4357
|
-
$[1] && ($[1].innerText = O ? String(O.code
|
|
4357
|
+
$[1] && ($[1].innerText = O?.code ? String(O.code) : l("notUsed", "Không sử dụng"));
|
|
4358
4358
|
}
|
|
4359
4359
|
};
|
|
4360
4360
|
}
|
|
@@ -5009,9 +5009,9 @@ function xh() {
|
|
|
5009
5009
|
}
|
|
5010
5010
|
}, Vt;
|
|
5011
5011
|
}
|
|
5012
|
-
var a0 = {},
|
|
5012
|
+
var a0 = {}, yt = {}, K0;
|
|
5013
5013
|
function za() {
|
|
5014
|
-
if (K0) return
|
|
5014
|
+
if (K0) return yt;
|
|
5015
5015
|
K0 = 1;
|
|
5016
5016
|
const n = new Uint8Array(512), t = new Uint8Array(256);
|
|
5017
5017
|
return function() {
|
|
@@ -5020,14 +5020,14 @@ function za() {
|
|
|
5020
5020
|
n[h] = a, t[a] = h, a <<= 1, a & 256 && (a ^= 285);
|
|
5021
5021
|
for (let h = 255; h < 512; h++)
|
|
5022
5022
|
n[h] = n[h - 255];
|
|
5023
|
-
}(),
|
|
5023
|
+
}(), yt.log = function(a) {
|
|
5024
5024
|
if (a < 1) throw new Error("log(" + a + ")");
|
|
5025
5025
|
return t[a];
|
|
5026
|
-
},
|
|
5026
|
+
}, yt.exp = function(a) {
|
|
5027
5027
|
return n[a];
|
|
5028
|
-
},
|
|
5028
|
+
}, yt.mul = function(a, h) {
|
|
5029
5029
|
return a === 0 || h === 0 ? 0 : n[t[a] + t[h]];
|
|
5030
|
-
},
|
|
5030
|
+
}, yt;
|
|
5031
5031
|
}
|
|
5032
5032
|
var O0;
|
|
5033
5033
|
function Fa() {
|
|
@@ -5183,8 +5183,8 @@ function Za() {
|
|
|
5183
5183
|
function q(r, m) {
|
|
5184
5184
|
let w = 0;
|
|
5185
5185
|
return r.forEach(function(x) {
|
|
5186
|
-
const
|
|
5187
|
-
w +=
|
|
5186
|
+
const P = i(x.mode, m);
|
|
5187
|
+
w += P + x.getBitsLength();
|
|
5188
5188
|
}), w;
|
|
5189
5189
|
}
|
|
5190
5190
|
function T(r, m) {
|
|
@@ -5198,7 +5198,7 @@ function Za() {
|
|
|
5198
5198
|
if (!c.isValid(m))
|
|
5199
5199
|
throw new Error("Invalid QR Code version");
|
|
5200
5200
|
typeof x > "u" && (x = h.BYTE);
|
|
5201
|
-
const
|
|
5201
|
+
const P = t.getSymbolTotalCodewords(m), L = e.getTotalCodewordsCount(m, w), S = (P - L) * 8;
|
|
5202
5202
|
if (x === h.MIXED) return S;
|
|
5203
5203
|
const p = S - i(x, m);
|
|
5204
5204
|
switch (x) {
|
|
@@ -5214,16 +5214,16 @@ function Za() {
|
|
|
5214
5214
|
}
|
|
5215
5215
|
}, n.getBestVersionForData = function(m, w) {
|
|
5216
5216
|
let x;
|
|
5217
|
-
const
|
|
5217
|
+
const P = a.from(w, a.M);
|
|
5218
5218
|
if (Array.isArray(m)) {
|
|
5219
5219
|
if (m.length > 1)
|
|
5220
|
-
return T(m,
|
|
5220
|
+
return T(m, P);
|
|
5221
5221
|
if (m.length === 0)
|
|
5222
5222
|
return 1;
|
|
5223
5223
|
x = m[0];
|
|
5224
5224
|
} else
|
|
5225
5225
|
x = m;
|
|
5226
|
-
return o(x.mode, x.getLength(),
|
|
5226
|
+
return o(x.mode, x.getLength(), P);
|
|
5227
5227
|
}, n.getEncodedBits = function(m) {
|
|
5228
5228
|
if (!c.isValid(m) || m < 7)
|
|
5229
5229
|
throw new Error("Invalid QR Code version");
|
|
@@ -5397,10 +5397,10 @@ function tc() {
|
|
|
5397
5397
|
A[a] = 0;
|
|
5398
5398
|
var u = t.PriorityQueue.make();
|
|
5399
5399
|
u.push(a, 0);
|
|
5400
|
-
for (var o, i, q, T, r, m, w, x,
|
|
5400
|
+
for (var o, i, q, T, r, m, w, x, P; !u.empty(); ) {
|
|
5401
5401
|
o = u.pop(), i = o.value, T = o.cost, r = e[i] || {};
|
|
5402
5402
|
for (q in r)
|
|
5403
|
-
r.hasOwnProperty(q) && (m = r[q], w = T + m, x = A[q],
|
|
5403
|
+
r.hasOwnProperty(q) && (m = r[q], w = T + m, x = A[q], P = typeof A[q] > "u", (P || x > w) && (A[q] = w, u.push(q, w), c[q] = i));
|
|
5404
5404
|
}
|
|
5405
5405
|
if (typeof h < "u" && typeof A[h] > "u") {
|
|
5406
5406
|
var L = ["Could not find a path from ", a, " to ", h, "."].join("");
|
|
@@ -5557,7 +5557,7 @@ function hc() {
|
|
|
5557
5557
|
d[N[H]].end = 0;
|
|
5558
5558
|
return { map: d, table: p };
|
|
5559
5559
|
}
|
|
5560
|
-
function
|
|
5560
|
+
function P(L, S) {
|
|
5561
5561
|
let p;
|
|
5562
5562
|
const d = t.getBestModeForData(L);
|
|
5563
5563
|
if (p = t.from(S, d), p !== t.BYTE && p.bit < d.bit)
|
|
@@ -5576,7 +5576,7 @@ function hc() {
|
|
|
5576
5576
|
}
|
|
5577
5577
|
n.fromArray = function(S) {
|
|
5578
5578
|
return S.reduce(function(p, d) {
|
|
5579
|
-
return typeof d == "string" ? p.push(
|
|
5579
|
+
return typeof d == "string" ? p.push(P(d, null)) : d.data && p.push(P(d.data, d.mode)), p;
|
|
5580
5580
|
}, []);
|
|
5581
5581
|
}, n.fromString = function(S, p) {
|
|
5582
5582
|
const d = T(S, u.isKanjiModeEnabled()), N = w(d), H = x(N, p), C = o.find_path(H.map, "start", "end"), X = [];
|
|
@@ -5621,7 +5621,7 @@ function ac() {
|
|
|
5621
5621
|
I === -2 || I === 2 || E === -2 || E === 2 || I === 0 && E === 0 ? H.set(b + I, Q + E, !0, !0) : H.set(b + I, Q + E, !1, !0);
|
|
5622
5622
|
}
|
|
5623
5623
|
}
|
|
5624
|
-
function
|
|
5624
|
+
function P(H, C) {
|
|
5625
5625
|
const X = H.size, k = i.getEncodedBits(C);
|
|
5626
5626
|
let b, Q, I;
|
|
5627
5627
|
for (let E = 0; E < 18; E++)
|
|
@@ -5667,15 +5667,15 @@ function ac() {
|
|
|
5667
5667
|
const k = n.getSymbolTotalCodewords(C), b = u.getTotalCodewordsCount(C, X), Q = k - b, I = u.getBlocksCount(C, X), E = k % I, B = I - E, K = Math.floor(k / I), Y = Math.floor(Q / I), nn = Y + 1, g = K - Y, s = new o(g);
|
|
5668
5668
|
let f = 0;
|
|
5669
5669
|
const v = new Array(I), J = new Array(I);
|
|
5670
|
-
let
|
|
5670
|
+
let y = 0;
|
|
5671
5671
|
const D = new Uint8Array(H.buffer);
|
|
5672
5672
|
for (let G = 0; G < I; G++) {
|
|
5673
5673
|
const O = G < B ? Y : nn;
|
|
5674
|
-
v[G] = D.slice(f, f + O), J[G] = s.encode(v[G]), f += O,
|
|
5674
|
+
v[G] = D.slice(f, f + O), J[G] = s.encode(v[G]), f += O, y = Math.max(y, O);
|
|
5675
5675
|
}
|
|
5676
5676
|
const F = new Uint8Array(k);
|
|
5677
5677
|
let U = 0, Z, W;
|
|
5678
|
-
for (Z = 0; Z <
|
|
5678
|
+
for (Z = 0; Z < y; Z++)
|
|
5679
5679
|
for (W = 0; W < I; W++)
|
|
5680
5680
|
Z < v[W].length && (F[U++] = v[W][Z]);
|
|
5681
5681
|
for (Z = 0; Z < g; Z++)
|
|
@@ -5709,7 +5709,7 @@ Minimum version required to store current data is: ` + Q + `.
|
|
|
5709
5709
|
`
|
|
5710
5710
|
);
|
|
5711
5711
|
const I = p(C, X, b), E = n.getSymbolSize(C), B = new a(E);
|
|
5712
|
-
return m(B, C), w(B), x(B, C), L(B, X, 0), C >= 7 &&
|
|
5712
|
+
return m(B, C), w(B), x(B, C), L(B, X, 0), C >= 7 && P(B, C), S(B, I), isNaN(k) && (k = A.getBestMask(
|
|
5713
5713
|
B,
|
|
5714
5714
|
L.bind(null, B, X)
|
|
5715
5715
|
)), A.applyMask(k, B), L(B, X, k), {
|
|
@@ -5773,8 +5773,8 @@ function ph() {
|
|
|
5773
5773
|
for (let m = 0; m < i; m++) {
|
|
5774
5774
|
let w = (r * i + m) * 4, x = c.color.light;
|
|
5775
5775
|
if (r >= q && m >= q && r < i - q && m < i - q) {
|
|
5776
|
-
const
|
|
5777
|
-
x = T[u[
|
|
5776
|
+
const P = Math.floor((r - q) / o), L = Math.floor((m - q) / o);
|
|
5777
|
+
x = T[u[P * A + L] ? 1 : 0];
|
|
5778
5778
|
}
|
|
5779
5779
|
a[w++] = x.r, a[w++] = x.g, a[w++] = x.b, a[w] = x.a;
|
|
5780
5780
|
}
|
|
@@ -5830,9 +5830,9 @@ function ec() {
|
|
|
5830
5830
|
return u;
|
|
5831
5831
|
}
|
|
5832
5832
|
return x0.render = function(c, A, u) {
|
|
5833
|
-
const o = n.getOptions(A), i = c.modules.size, q = c.modules.data, T = i + o.margin * 2, r = o.color.light.a ? "<path " + t(o.color.light, "fill") + ' d="M0 0h' + T + "v" + T + 'H0z"/>' : "", m = "<path " + t(o.color.dark, "stroke") + ' d="' + a(q, i, o.margin) + '"/>', w = 'viewBox="0 0 ' + T + " " + T + '"',
|
|
5833
|
+
const o = n.getOptions(A), i = c.modules.size, q = c.modules.data, T = i + o.margin * 2, r = o.color.light.a ? "<path " + t(o.color.light, "fill") + ' d="M0 0h' + T + "v" + T + 'H0z"/>' : "", m = "<path " + t(o.color.dark, "stroke") + ' d="' + a(q, i, o.margin) + '"/>', w = 'viewBox="0 0 ' + T + " " + T + '"', P = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + w + ' shape-rendering="crispEdges">' + r + m + `</svg>
|
|
5834
5834
|
`;
|
|
5835
|
-
return typeof u == "function" && u(null,
|
|
5835
|
+
return typeof u == "function" && u(null, P), P;
|
|
5836
5836
|
}, x0;
|
|
5837
5837
|
}
|
|
5838
5838
|
var eh;
|
|
@@ -6007,10 +6007,10 @@ function qc({
|
|
|
6007
6007
|
margin-bottom: 1rem;
|
|
6008
6008
|
|
|
6009
6009
|
`;
|
|
6010
|
-
const
|
|
6010
|
+
const P = "hotro247@atomsolution.vn";
|
|
6011
6011
|
x.innerHTML = l("email_support_info", "").replace(
|
|
6012
6012
|
/{email}/g,
|
|
6013
|
-
|
|
6013
|
+
P
|
|
6014
6014
|
), T.appendChild(x);
|
|
6015
6015
|
const L = document.createElement("div");
|
|
6016
6016
|
L.style.cssText = `
|
|
@@ -6115,7 +6115,7 @@ async function gc({
|
|
|
6115
6115
|
theme: A = "ocb"
|
|
6116
6116
|
}) {
|
|
6117
6117
|
let u = null, o = "", i = null, q = h?.orderId || null, T = !1, r = 0, m = !1, w = 0;
|
|
6118
|
-
const x = h?.selectedProvider?.route || h?.selectedProvider?.name || h?.provider || "",
|
|
6118
|
+
const x = h?.selectedProvider?.route || h?.selectedProvider?.name || h?.provider || "", P = "QR";
|
|
6119
6119
|
let L = null, S = null, p = null, d = 0;
|
|
6120
6120
|
const N = document.createElement("div");
|
|
6121
6121
|
N.className = "wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";
|
|
@@ -6139,7 +6139,7 @@ async function gc({
|
|
|
6139
6139
|
},
|
|
6140
6140
|
onFreeOrderConfirmed: () => {
|
|
6141
6141
|
try {
|
|
6142
|
-
|
|
6142
|
+
Pt.freeOrderConfirmed({
|
|
6143
6143
|
orderId: q,
|
|
6144
6144
|
totalAmount: w,
|
|
6145
6145
|
orderAmount: w,
|
|
@@ -6190,7 +6190,7 @@ async function gc({
|
|
|
6190
6190
|
theme: A
|
|
6191
6191
|
}), m)
|
|
6192
6192
|
try {
|
|
6193
|
-
|
|
6193
|
+
Pt.freeOrderDetected({
|
|
6194
6194
|
orderId: q,
|
|
6195
6195
|
totalAmount: w,
|
|
6196
6196
|
orderAmount: w,
|
|
@@ -6220,7 +6220,7 @@ async function gc({
|
|
|
6220
6220
|
margin: 1,
|
|
6221
6221
|
width: 200,
|
|
6222
6222
|
color: { dark: "#000000", light: "#ffffff" }
|
|
6223
|
-
}),
|
|
6223
|
+
}), P0.success({
|
|
6224
6224
|
orderId: f ?? h?.orderId,
|
|
6225
6225
|
amount: w,
|
|
6226
6226
|
qrUrl: "dataurl",
|
|
@@ -6236,7 +6236,7 @@ async function gc({
|
|
|
6236
6236
|
}), s();
|
|
6237
6237
|
} catch (v) {
|
|
6238
6238
|
if (v.response?.data?.error_code === "BILL_ID_EXISTED") {
|
|
6239
|
-
if (r++,
|
|
6239
|
+
if (r++, P0.failed({
|
|
6240
6240
|
orderId: f ?? h?.orderId,
|
|
6241
6241
|
amount: w,
|
|
6242
6242
|
errorCode: "BILL_ID_EXISTED",
|
|
@@ -6274,15 +6274,15 @@ async function gc({
|
|
|
6274
6274
|
const f = await Jh(q);
|
|
6275
6275
|
if (f.paymentStatus === "pending") return;
|
|
6276
6276
|
if (f.paymentStatus === "wrong_amount") {
|
|
6277
|
-
clearInterval(i), i = null,
|
|
6277
|
+
clearInterval(i), i = null, Pt.wrongAmount({
|
|
6278
6278
|
orderId: q,
|
|
6279
6279
|
expectedAmount: w,
|
|
6280
6280
|
receivedAmount: f?.receivedAmount ?? f?.amount ?? null,
|
|
6281
6281
|
difference: (f?.receivedAmount ?? f?.amount ?? 0) - (w ?? 0),
|
|
6282
|
-
paymentMethod:
|
|
6282
|
+
paymentMethod: P,
|
|
6283
6283
|
provider: x,
|
|
6284
6284
|
theme: A
|
|
6285
|
-
}),
|
|
6285
|
+
}), y0.stopped({
|
|
6286
6286
|
orderId: q,
|
|
6287
6287
|
reason: "wrong_amount",
|
|
6288
6288
|
duration: p ? Math.round((Date.now() - p) / 1e3) : null,
|
|
@@ -6290,32 +6290,32 @@ async function gc({
|
|
|
6290
6290
|
provider: x,
|
|
6291
6291
|
theme: A
|
|
6292
6292
|
});
|
|
6293
|
-
const
|
|
6293
|
+
const y = qc({
|
|
6294
6294
|
onClose: () => h?.onResetToStep1?.()
|
|
6295
6295
|
});
|
|
6296
|
-
N.appendChild(
|
|
6296
|
+
N.appendChild(y.container), y.open();
|
|
6297
6297
|
return;
|
|
6298
6298
|
}
|
|
6299
6299
|
clearInterval(i), i = null;
|
|
6300
6300
|
const v = S ? Math.round((Date.now() - S) / 1e3) : null;
|
|
6301
|
-
f.paymentStatus === "paid" ?
|
|
6301
|
+
f.paymentStatus === "paid" ? Pt.success({
|
|
6302
6302
|
orderId: q,
|
|
6303
6303
|
amount: w,
|
|
6304
6304
|
transactionId: f?.transactionId || f?.transaction_id,
|
|
6305
|
-
paymentMethod:
|
|
6305
|
+
paymentMethod: P,
|
|
6306
6306
|
provider: x,
|
|
6307
6307
|
theme: A,
|
|
6308
6308
|
duration: v
|
|
6309
|
-
}) :
|
|
6309
|
+
}) : Pt.failed({
|
|
6310
6310
|
orderId: q,
|
|
6311
6311
|
amount: w,
|
|
6312
6312
|
errorCode: f?.errorCode || f?.error_code,
|
|
6313
6313
|
errorMessage: f?.errorMessage || f?.error_message,
|
|
6314
|
-
paymentMethod:
|
|
6314
|
+
paymentMethod: P,
|
|
6315
6315
|
provider: x,
|
|
6316
6316
|
theme: A,
|
|
6317
6317
|
failureReason: f.paymentStatus
|
|
6318
|
-
}),
|
|
6318
|
+
}), y0.stopped({
|
|
6319
6319
|
orderId: q,
|
|
6320
6320
|
reason: f.paymentStatus,
|
|
6321
6321
|
duration: p ? Math.round((Date.now() - p) / 1e3) : null,
|
|
@@ -6373,10 +6373,10 @@ function rc({
|
|
|
6373
6373
|
w.className = "wgt:flex wgt:flex-col wgt:gap-2", r.appendChild(w);
|
|
6374
6374
|
const x = document.createElement("p");
|
|
6375
6375
|
x.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", x.innerText = l("notice2"), w.appendChild(x);
|
|
6376
|
-
const
|
|
6377
|
-
|
|
6376
|
+
const P = document.createElement("div");
|
|
6377
|
+
P.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", w.appendChild(P);
|
|
6378
6378
|
const L = document.createElement("div");
|
|
6379
|
-
L.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950",
|
|
6379
|
+
L.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", P.appendChild(L);
|
|
6380
6380
|
const S = document.createElement("div");
|
|
6381
6381
|
S.innerHTML = `
|
|
6382
6382
|
<svg
|
|
@@ -6400,7 +6400,7 @@ function rc({
|
|
|
6400
6400
|
const p = Bh(ih(), a, c), d = document.createElement("span");
|
|
6401
6401
|
d.innerHTML = `${l("hotlineDomestic")} <b>${p?.hotline || ""}</b> ${l("hotlineDesc")} `, L.appendChild(d);
|
|
6402
6402
|
const N = document.createElement("div");
|
|
6403
|
-
N.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950",
|
|
6403
|
+
N.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", P.appendChild(N);
|
|
6404
6404
|
const H = document.createElement("div");
|
|
6405
6405
|
H.innerHTML = `
|
|
6406
6406
|
<svg
|
|
@@ -6422,7 +6422,7 @@ function rc({
|
|
|
6422
6422
|
const C = document.createElement("span");
|
|
6423
6423
|
C.innerHTML = `${l("email")}: <b>${p?.email || ""}</b>`, N.appendChild(C);
|
|
6424
6424
|
const X = document.createElement("div");
|
|
6425
|
-
X.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950",
|
|
6425
|
+
X.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", P.appendChild(X);
|
|
6426
6426
|
const k = document.createElement("div");
|
|
6427
6427
|
k.innerHTML = `
|
|
6428
6428
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -6595,9 +6595,9 @@ async function Nc({
|
|
|
6595
6595
|
a.style.display = "flex", a.style.flexDirection = "column", a.style.gap = "0", a.style.width = "100%", a.style.height = "100%", a.style.minHeight = "0", window.matchMedia("(min-width: 640px)").matches && (a.style.gap = "1rem");
|
|
6596
6596
|
let h = "", c = null, A = [], u = -1;
|
|
6597
6597
|
try {
|
|
6598
|
-
const x = await Nh({ orderId: n }),
|
|
6598
|
+
const x = await Nh({ orderId: n }), P = await zt({ orderId: n });
|
|
6599
6599
|
A = Array.isArray(x) ? x : Array.isArray(x?.data) ? x.data : [];
|
|
6600
|
-
const L = Array.isArray(
|
|
6600
|
+
const L = Array.isArray(P) ? P : Array.isArray(P?.data) ? P.data : [];
|
|
6601
6601
|
for (let S = 0; S < A.length; S++) {
|
|
6602
6602
|
const p = A[S], d = p?.envelopeId, N = L.find((H) => H?.envelopeId === d);
|
|
6603
6603
|
if (N) {
|
|
@@ -6636,11 +6636,11 @@ async function Nc({
|
|
|
6636
6636
|
i.src = h, i.style.position = "absolute", i.style.top = "0", i.style.left = "0", i.style.width = "100%", i.style.height = "100%", i.style.borderRadius = "0", i.style.border = "0", window.matchMedia("(min-width: 640px)").matches && (i.style.borderRadius = "0.375rem"), i.loading = "lazy", i.allowFullscreen = !0, i.setAttribute("scrolling", "auto"), i.setAttribute("frameBorder", "0");
|
|
6637
6637
|
const q = { id: null }, T = { open: !1 };
|
|
6638
6638
|
async function r() {
|
|
6639
|
-
const x = await zt({ orderId: n }),
|
|
6639
|
+
const x = await zt({ orderId: n }), P = Array.isArray(x) ? x : Array.isArray(x?.data) ? x.data : [];
|
|
6640
6640
|
for (let L = u + 1; L < A.length; L++) {
|
|
6641
6641
|
const S = A[L];
|
|
6642
6642
|
if (!S?.iframeUrl) continue;
|
|
6643
|
-
if (!!!
|
|
6643
|
+
if (!!!P.find((N) => N?.envelopeId === S?.envelopeId)?.isSigned)
|
|
6644
6644
|
return u = L, c = S.envelopeId, i.src = S.iframeUrl, T.open = !1, !0;
|
|
6645
6645
|
}
|
|
6646
6646
|
return c = null, !1;
|
|
@@ -6648,7 +6648,7 @@ async function Nc({
|
|
|
6648
6648
|
async function m() {
|
|
6649
6649
|
if (!(!c || T.open))
|
|
6650
6650
|
try {
|
|
6651
|
-
const x = await zt({ orderId: n }),
|
|
6651
|
+
const x = await zt({ orderId: n }), P = Array.isArray(x) ? x : Array.isArray(x?.data) ? x.data : [], L = P.find((S) => S?.envelopeId === c);
|
|
6652
6652
|
if (L && L.isSigned) {
|
|
6653
6653
|
if (Array.isArray(A) && A.length === 1) {
|
|
6654
6654
|
q.id && (clearInterval(q.id), q.id = null);
|
|
@@ -6663,7 +6663,7 @@ async function Nc({
|
|
|
6663
6663
|
for (let p = u + 1; p < A.length; p++) {
|
|
6664
6664
|
const d = A[p];
|
|
6665
6665
|
if (!d?.iframeUrl) continue;
|
|
6666
|
-
if (!
|
|
6666
|
+
if (!P.find((H) => H?.envelopeId === d?.envelopeId)?.isSigned) {
|
|
6667
6667
|
S = !0;
|
|
6668
6668
|
break;
|
|
6669
6669
|
}
|
|
@@ -6744,7 +6744,7 @@ function Hc() {
|
|
|
6744
6744
|
const t = document.body.className;
|
|
6745
6745
|
return t.includes("bvb") ? "bvb" : t.includes("shb") ? "shb" : t.includes("agr") ? "agr" : t.includes("nama") ? "nama" : "bvb";
|
|
6746
6746
|
}
|
|
6747
|
-
function
|
|
6747
|
+
function Pc(n) {
|
|
6748
6748
|
return {
|
|
6749
6749
|
ocb: "#008c44",
|
|
6750
6750
|
bvb: "#1e2a7b",
|
|
@@ -6753,7 +6753,7 @@ function yc(n) {
|
|
|
6753
6753
|
nama: "#ffdd00"
|
|
6754
6754
|
}[n];
|
|
6755
6755
|
}
|
|
6756
|
-
function
|
|
6756
|
+
function yc({
|
|
6757
6757
|
onConfirm: n,
|
|
6758
6758
|
onCancel: t,
|
|
6759
6759
|
showCloseButton: e = !0,
|
|
@@ -6768,7 +6768,7 @@ function Pc({
|
|
|
6768
6768
|
} catch {
|
|
6769
6769
|
}
|
|
6770
6770
|
});
|
|
6771
|
-
const q = Hc(), T =
|
|
6771
|
+
const q = Hc(), T = Pc(q);
|
|
6772
6772
|
document.documentElement.style.setProperty("--primary", T), q === "nama" && document.documentElement.style.setProperty(
|
|
6773
6773
|
"--primary-bg",
|
|
6774
6774
|
"linear-gradient(180deg, #FFEC72 0%, #FD0 100%)"
|
|
@@ -6828,11 +6828,11 @@ function Pc({
|
|
|
6828
6828
|
justify-content: center;
|
|
6829
6829
|
margin-bottom: 1rem;
|
|
6830
6830
|
`, w.appendChild(x);
|
|
6831
|
-
const
|
|
6832
|
-
|
|
6831
|
+
const P = document.createElement("img");
|
|
6832
|
+
P.src = fh, P.alt = "Warning", P.style.cssText = `
|
|
6833
6833
|
width:40px;
|
|
6834
6834
|
height: 40px;
|
|
6835
|
-
`, x.appendChild(
|
|
6835
|
+
`, x.appendChild(P);
|
|
6836
6836
|
const L = document.createElement("h2");
|
|
6837
6837
|
L.style.cssText = `
|
|
6838
6838
|
margin: 0 0 1rem 0;
|
|
@@ -6970,7 +6970,7 @@ async function d0(n, t, e, a = !1, h = "ocb", c = "", A = null, u = "M-Invoice")
|
|
|
6970
6970
|
return;
|
|
6971
6971
|
}
|
|
6972
6972
|
if (!o.isNewCustomer) {
|
|
6973
|
-
i = await Jt(n, t), await e(o.isNewCustomer, i), await new Promise((T) => setTimeout(T, 1e3)), (i?.organization?.name || i?.organization?.taxCode) &&
|
|
6973
|
+
i = await Jt(n, t), await e(o.isNewCustomer, i), await new Promise((T) => setTimeout(T, 1e3)), (i?.organization?.name || i?.organization?.taxCode) && yc({
|
|
6974
6974
|
settingUrl: c,
|
|
6975
6975
|
onCancel: () => {
|
|
6976
6976
|
},
|
|
@@ -6993,15 +6993,15 @@ async function bc(n, t, e, a, h, c) {
|
|
|
6993
6993
|
const u = [
|
|
6994
6994
|
{ name: "1Invoice", route: "one-invoice", logoUrl: Eh },
|
|
6995
6995
|
{ name: "M-Invoice", route: "m-invoice", logoUrl: Hh },
|
|
6996
|
-
{ name: "Misa", route: "misa", logoUrl:
|
|
6997
|
-
{ name: "FPT", route: "fpt", logoUrl:
|
|
6996
|
+
{ name: "Misa", route: "misa", logoUrl: Ph },
|
|
6997
|
+
{ name: "FPT", route: "fpt", logoUrl: yh },
|
|
6998
6998
|
{ name: "Viettel", route: "viettel", logoUrl: kh }
|
|
6999
|
-
].filter((
|
|
7000
|
-
function o(
|
|
6999
|
+
].filter((y) => y.route === "m-invoice" || y.route === "one-invoice");
|
|
7000
|
+
function o(y = !1) {
|
|
7001
7001
|
return [
|
|
7002
7002
|
l("stepInfo"),
|
|
7003
7003
|
l("stepPlan"),
|
|
7004
|
-
|
|
7004
|
+
y ? l("stepConfirm", "Xác nhận") : l("stepPayment")
|
|
7005
7005
|
];
|
|
7006
7006
|
}
|
|
7007
7007
|
let i = Dh({
|
|
@@ -7009,7 +7009,9 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7009
7009
|
currentStep: 1
|
|
7010
7010
|
}), { container: q, setStep: T, setContent: r } = i;
|
|
7011
7011
|
n.dataset.theme = h || "default", n.classList.add("wgt:mx-auto", "wgt:@container"), n.appendChild(q);
|
|
7012
|
-
let m = 1, w = /* @__PURE__ */ new Set(), x = u[0]
|
|
7012
|
+
let m = 1, w = /* @__PURE__ */ new Set(), x = u[0];
|
|
7013
|
+
localStorage.setItem("activeProvider", x.route), localStorage.setItem("activeProviderName", x.name);
|
|
7014
|
+
let P = {
|
|
7013
7015
|
_userHasEditedTaxCode: !1,
|
|
7014
7016
|
eInvoiceRegistration: {
|
|
7015
7017
|
taxAuthorityCode: "",
|
|
@@ -7055,7 +7057,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7055
7057
|
qtySignaturePkg: 1
|
|
7056
7058
|
};
|
|
7057
7059
|
function E() {
|
|
7058
|
-
x = u[0],
|
|
7060
|
+
x = u[0], localStorage.setItem("activeProvider", x.route), localStorage.setItem("activeProviderName", x.name), P = {
|
|
7059
7061
|
eInvoiceRegistration: {
|
|
7060
7062
|
taxAuthorityCode: "",
|
|
7061
7063
|
invoiceSymbol: "",
|
|
@@ -7100,20 +7102,20 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7100
7102
|
qtySignaturePkg: 1
|
|
7101
7103
|
};
|
|
7102
7104
|
}
|
|
7103
|
-
function B(
|
|
7104
|
-
|
|
7105
|
+
function B(y) {
|
|
7106
|
+
y || (y = {
|
|
7105
7107
|
name: "",
|
|
7106
7108
|
address: "",
|
|
7107
7109
|
taxCode: a?.taxCode || "",
|
|
7108
7110
|
taxAuthority: ""
|
|
7109
|
-
}),
|
|
7110
|
-
...
|
|
7111
|
+
}), P = {
|
|
7112
|
+
...P,
|
|
7111
7113
|
eInvoiceRegistration: {
|
|
7112
7114
|
organization: {
|
|
7113
|
-
name:
|
|
7114
|
-
address:
|
|
7115
|
-
taxCode:
|
|
7116
|
-
taxAuthority:
|
|
7115
|
+
name: y?.name || "",
|
|
7116
|
+
address: y?.address || "",
|
|
7117
|
+
taxCode: y?.taxCode || "",
|
|
7118
|
+
taxAuthority: y?.taxAuthority || ""
|
|
7117
7119
|
},
|
|
7118
7120
|
contactPerson: {
|
|
7119
7121
|
name: "",
|
|
@@ -7154,42 +7156,42 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7154
7156
|
behavior: "smooth"
|
|
7155
7157
|
});
|
|
7156
7158
|
}
|
|
7157
|
-
async function nn(
|
|
7158
|
-
if (
|
|
7159
|
-
if (
|
|
7160
|
-
|
|
7161
|
-
...
|
|
7159
|
+
async function nn(y, D) {
|
|
7160
|
+
if (y) {
|
|
7161
|
+
if (y === P) return;
|
|
7162
|
+
P = {
|
|
7163
|
+
...P,
|
|
7162
7164
|
eInvoiceRegistration: {
|
|
7163
|
-
organization: { ...
|
|
7164
|
-
contactPerson: c ? { ...
|
|
7165
|
-
legalRepresentative: c ? { ...
|
|
7166
|
-
hasUsedEInvoice:
|
|
7167
|
-
invoiceSymbol:
|
|
7168
|
-
previousEInvoiceProvider:
|
|
7169
|
-
businessType:
|
|
7165
|
+
organization: { ...y.organization },
|
|
7166
|
+
contactPerson: c ? { ...y.contactPerson } : P.eInvoiceRegistration.contactPerson,
|
|
7167
|
+
legalRepresentative: c ? { ...y.legalRepresentative } : P.eInvoiceRegistration.legalRepresentative,
|
|
7168
|
+
hasUsedEInvoice: y.hasUsedEInvoice,
|
|
7169
|
+
invoiceSymbol: y.invoiceSymbol,
|
|
7170
|
+
previousEInvoiceProvider: y.previousEInvoiceProvider,
|
|
7171
|
+
businessType: y.businessType
|
|
7170
7172
|
}
|
|
7171
7173
|
};
|
|
7172
7174
|
} else D && B(D);
|
|
7173
7175
|
await g(m);
|
|
7174
7176
|
}
|
|
7175
|
-
async function g(
|
|
7177
|
+
async function g(y) {
|
|
7176
7178
|
const D = vt(X) === 0, F = o(D);
|
|
7177
|
-
w.has(
|
|
7179
|
+
w.has(y) || (w.add(y), y === 1 ? Qn(Ln.STEP1_VIEWED, {
|
|
7178
7180
|
theme: h,
|
|
7179
7181
|
isRenewal: c
|
|
7180
|
-
}) :
|
|
7182
|
+
}) : y === 2 ? Qn(Ln.STEP2_VIEWED, {
|
|
7181
7183
|
theme: h,
|
|
7182
7184
|
isRenewal: c,
|
|
7183
7185
|
provider: x?.route,
|
|
7184
7186
|
isNewCustomer: S
|
|
7185
|
-
}) :
|
|
7187
|
+
}) : y === 3 && Qn(Ln.STEP3_VIEWED, {
|
|
7186
7188
|
theme: h,
|
|
7187
7189
|
isRenewal: c,
|
|
7188
7190
|
provider: x?.route,
|
|
7189
7191
|
isNewCustomer: S
|
|
7190
7192
|
}));
|
|
7191
7193
|
const U = "1C26MYY", Z = /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/;
|
|
7192
|
-
if (
|
|
7194
|
+
if (y === 1) {
|
|
7193
7195
|
const { container: W } = await Ba({
|
|
7194
7196
|
isNewCustomer: S,
|
|
7195
7197
|
isRenewal: c,
|
|
@@ -7197,9 +7199,9 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7197
7199
|
providers: u,
|
|
7198
7200
|
selectedRoute: x.route,
|
|
7199
7201
|
onProviderChange: async (G) => {
|
|
7200
|
-
x = G, await d0(
|
|
7202
|
+
x = G, localStorage.setItem("activeProvider", G.route), localStorage.setItem("activeProviderName", G.name), await d0(
|
|
7201
7203
|
G.route,
|
|
7202
|
-
|
|
7204
|
+
P?.eInvoiceRegistration?.organization?.taxCode,
|
|
7203
7205
|
(O, $) => {
|
|
7204
7206
|
S = O, nn($);
|
|
7205
7207
|
},
|
|
@@ -7218,12 +7220,12 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7218
7220
|
updateRegistrationData: nn,
|
|
7219
7221
|
serial: Z.test(a?.serial || "") ? a.serial : U,
|
|
7220
7222
|
onSubmit: (G) => {
|
|
7221
|
-
|
|
7222
|
-
...
|
|
7223
|
+
P.eInvoiceRegistration = {
|
|
7224
|
+
...P.eInvoiceRegistration,
|
|
7223
7225
|
...G.eInvoiceRegistration
|
|
7224
|
-
},
|
|
7226
|
+
}, P.logo = G.logo || null, P.license = G.license || null, P.idCard = G.idCard || null, P.idCardBack = G.idCardBack || null, P.provider = x.route, m = 2, T(m, F), g(m), Y();
|
|
7225
7227
|
},
|
|
7226
|
-
registrationData:
|
|
7228
|
+
registrationData: P,
|
|
7227
7229
|
theme: h || "default",
|
|
7228
7230
|
onShowPolicy: e || (() => {
|
|
7229
7231
|
}),
|
|
@@ -7241,7 +7243,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7241
7243
|
}
|
|
7242
7244
|
});
|
|
7243
7245
|
r(W), X = 0;
|
|
7244
|
-
} else if (
|
|
7246
|
+
} else if (y === 2) {
|
|
7245
7247
|
const { container: W } = await Ia({
|
|
7246
7248
|
onNext: async () => {
|
|
7247
7249
|
Qn(Ln.STEP2_COMPLETED, {
|
|
@@ -7278,10 +7280,10 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7278
7280
|
b = G;
|
|
7279
7281
|
},
|
|
7280
7282
|
setPackages: (G) => {
|
|
7281
|
-
|
|
7283
|
+
P.packages = G;
|
|
7282
7284
|
},
|
|
7283
7285
|
setPromotionCodes: (G) => {
|
|
7284
|
-
|
|
7286
|
+
P.promotionCodes = G;
|
|
7285
7287
|
},
|
|
7286
7288
|
selectedInitPackage: d,
|
|
7287
7289
|
selectedInvoiceOtp: N,
|
|
@@ -7289,7 +7291,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7289
7291
|
selectedPromotions: b,
|
|
7290
7292
|
theme: h,
|
|
7291
7293
|
selectedProvider: x,
|
|
7292
|
-
registrationData:
|
|
7294
|
+
registrationData: P,
|
|
7293
7295
|
isNewCustomer: S,
|
|
7294
7296
|
savedQuantities: I,
|
|
7295
7297
|
isRenewal: c,
|
|
@@ -7298,7 +7300,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7298
7300
|
}
|
|
7299
7301
|
});
|
|
7300
7302
|
r(W);
|
|
7301
|
-
} else if (
|
|
7303
|
+
} else if (y === 3) {
|
|
7302
7304
|
const W = vt(X) === 0;
|
|
7303
7305
|
i.updateTitle(
|
|
7304
7306
|
W ? l("orderConfirmation", "Xác nhận đơn hàng") : l("stepPayment")
|
|
@@ -7318,7 +7320,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7318
7320
|
},
|
|
7319
7321
|
theme: h || "ocb",
|
|
7320
7322
|
orderInfoProps: {
|
|
7321
|
-
registrationData:
|
|
7323
|
+
registrationData: P,
|
|
7322
7324
|
orderId: p || "",
|
|
7323
7325
|
selectedProvider: x || { name: "", logo: "" },
|
|
7324
7326
|
selectedInvoiceOtp: N || { unitsPerMonth: 0 },
|
|
@@ -7338,7 +7340,7 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7338
7340
|
}
|
|
7339
7341
|
});
|
|
7340
7342
|
r(G);
|
|
7341
|
-
} else if (
|
|
7343
|
+
} else if (y === 4) {
|
|
7342
7344
|
const { container: W } = rc({
|
|
7343
7345
|
orderId: p || "",
|
|
7344
7346
|
onPrev: () => {
|
|
@@ -7358,9 +7360,9 @@ async function bc(n, t, e, a, h, c) {
|
|
|
7358
7360
|
const { container: s, open: f } = Yt();
|
|
7359
7361
|
L && (r(s), f()), await d0(
|
|
7360
7362
|
x.route,
|
|
7361
|
-
|
|
7362
|
-
async (
|
|
7363
|
-
L = !1, S =
|
|
7363
|
+
P?.eInvoiceRegistration?.organization?.taxCode,
|
|
7364
|
+
async (y, D) => {
|
|
7365
|
+
L = !1, S = y, nn(D), i.updateTitle(
|
|
7364
7366
|
c ? l("eInvoiceRenewal") : l("eInvoiceRegister")
|
|
7365
7367
|
);
|
|
7366
7368
|
},
|