@invoice-sdk/widget 1.118.3 → 1.118.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-NylKpkES.js → index-B68FYxtM.js} +2 -2
- package/dist/{index-GouE6DVq.js → index-UUNzXMwl.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/{loading-CUfLWsim.js → loading-BLy_vWaj.js} +2 -2
- package/dist/{widget-LwNYmd1-.js → widget-D9n9m6hq.js} +150 -146
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ var mh = (t, n) => {
|
|
|
19
19
|
n.indexOf(c) < 0 && oh.call(t, c) && (e[c] = t[c]);
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var qn = (t, n, e) => new Promise((c, h) => {
|
|
23
23
|
var a = (A) => {
|
|
24
24
|
try {
|
|
25
25
|
o(e.next(A));
|
|
@@ -35,8 +35,8 @@ var sn = (t, n, e) => new Promise((c, h) => {
|
|
|
35
35
|
}, o = (A) => A.done ? c(A.value) : Promise.resolve(A.value).then(a, u);
|
|
36
36
|
o((e = e.apply(t, n)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as g, g as jh, a as Uh, b as Pt, s as n0, c as Mt, d as rc, e as Tc, f as xc, m as dc, h as wc, i as pc, v as Cc } from "./index-
|
|
39
|
-
import { c as vt, a as _h, g as t0, b as fc, f as Sn, d as Xc, e as a0, h as Bc, i as Nc, j as Ec, k as Hc, l as yc, m as Pc, n as kc } from "./loading-
|
|
38
|
+
import { t as g, g as jh, a as Uh, b as Pt, s as n0, c as Mt, d as rc, e as Tc, f as xc, m as dc, h as wc, i as pc, v as Cc } from "./index-UUNzXMwl.js";
|
|
39
|
+
import { c as vt, a as _h, g as t0, b as fc, f as Sn, d as Xc, e as a0, h as Bc, i as Nc, j as Ec, k as Hc, l as yc, m as Pc, n as kc } from "./loading-BLy_vWaj.js";
|
|
40
40
|
import { g as $h } from "./_commonjsHelpers-bAxELxBV.js";
|
|
41
41
|
function qh({ steps: t = [], currentStep: n = 1 } = {}) {
|
|
42
42
|
const e = document.createElement("div");
|
|
@@ -1112,8 +1112,8 @@ function Dc() {
|
|
|
1112
1112
|
return r.isDisabled && m.push("is-disabled"), r.isToday && m.push("is-today"), r.isSelected && (m.push("is-selected"), P = "true"), r.hasEvent && m.push("has-event"), r.isInRange && m.push("is-inrange"), r.isStartRange && m.push("is-startrange"), r.isEndRange && m.push("is-endrange"), '<td data-day="' + r.day + '" class="' + m.join(" ") + '" aria-selected="' + P + '"><button class="pika-button pika-day" type="button" data-pika-year="' + r.year + '" data-pika-month="' + r.month + '" data-pika-day="' + r.day + '">' + r.day + "</button></td>";
|
|
1113
1113
|
}, I = function(r, m) {
|
|
1114
1114
|
r.setHours(0, 0, 0, 0);
|
|
1115
|
-
var P = r.getDate(), N = r.getDay(), L = m, M = L - 1, K = 7, U = function(
|
|
1116
|
-
return (
|
|
1115
|
+
var P = r.getDate(), N = r.getDay(), L = m, M = L - 1, K = 7, U = function(tn) {
|
|
1116
|
+
return (tn + K - 1) % K;
|
|
1117
1117
|
};
|
|
1118
1118
|
r.setDate(P + M - U(N));
|
|
1119
1119
|
var G = new Date(r.getFullYear(), 0, L), R = 1440 * 60 * 1e3, cn = (r.getTime() - G.getTime()) / R, V = 1 + Math.round((cn - M + U(G.getDay())) / K);
|
|
@@ -1131,12 +1131,12 @@ function Dc() {
|
|
|
1131
1131
|
P.push('<th scope="col"><abbr title="' + X(r, m) + '">' + X(r, m, !0) + "</abbr></th>");
|
|
1132
1132
|
return "<thead><tr>" + (r.isRTL ? P.reverse() : P).join("") + "</tr></thead>";
|
|
1133
1133
|
}, W = function(r, m, P, N, L, M) {
|
|
1134
|
-
var K, U, G, R = r._o, cn = P === R.minYear, V = P === R.maxYear,
|
|
1134
|
+
var K, U, G, R = r._o, cn = P === R.minYear, V = P === R.maxYear, tn = '<div id="' + M + '" class="pika-title" role="heading" aria-live="assertive">', rn, Xn, mn = !0, jn = !0;
|
|
1135
1135
|
for (G = [], K = 0; K < 12; K++)
|
|
1136
1136
|
G.push('<option value="' + (P === L ? K - m : 12 + K - m) + '"' + (K === N ? ' selected="selected"' : "") + (cn && K < R.minMonth || V && K > R.maxMonth ? ' disabled="disabled"' : "") + ">" + R.i18n.months[K] + "</option>");
|
|
1137
1137
|
for (rn = '<div class="pika-label">' + R.i18n.months[N] + '<select class="pika-select pika-select-month" tabindex="-1">' + G.join("") + "</select></div>", l(R.yearRange) ? (K = R.yearRange[0], U = R.yearRange[1] + 1) : (K = P - R.yearRange, U = 1 + P + R.yearRange), G = []; K < U && K <= R.maxYear; K++)
|
|
1138
1138
|
K >= R.minYear && G.push('<option value="' + K + '"' + (K === P ? ' selected="selected"' : "") + ">" + K + "</option>");
|
|
1139
|
-
return Xn = '<div class="pika-label">' + P + R.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", R.showMonthAfterYear ?
|
|
1139
|
+
return Xn = '<div class="pika-label">' + P + R.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", R.showMonthAfterYear ? tn += Xn + rn : tn += rn + Xn, cn && (N === 0 || R.minMonth >= N) && (mn = !1), V && (N === 11 || R.maxMonth <= N) && (jn = !1), m === 0 && (tn += '<button class="pika-prev' + (mn ? "" : " is-disabled") + '" type="button">' + R.i18n.previousMonth + "</button>"), m === r._o.numberOfMonths - 1 && (tn += '<button class="pika-next' + (jn ? "" : " is-disabled") + '" type="button">' + R.i18n.nextMonth + "</button>"), tn += "</div>";
|
|
1140
1140
|
}, z = function(r, m, P) {
|
|
1141
1141
|
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + P + '">' + E(r) + C(m) + "</table>";
|
|
1142
1142
|
}, F = function(r) {
|
|
@@ -1378,12 +1378,12 @@ function Dc() {
|
|
|
1378
1378
|
render: function(r, m, P) {
|
|
1379
1379
|
var N = this._o, L = /* @__PURE__ */ new Date(), M = k(r, m), K = new Date(r, m, 1).getDay(), U = [], G = [];
|
|
1380
1380
|
v(L), N.firstDay > 0 && (K -= N.firstDay, K < 0 && (K += 7));
|
|
1381
|
-
for (var R = m === 0 ? 11 : m - 1, cn = m === 11 ? 0 : m + 1, V = m === 0 ? r - 1 : r,
|
|
1381
|
+
for (var R = m === 0 ? 11 : m - 1, cn = m === 11 ? 0 : m + 1, V = m === 0 ? r - 1 : r, tn = m === 11 ? r + 1 : r, rn = k(V, R), Xn = M + K, mn = Xn; mn > 7; )
|
|
1382
1382
|
mn -= 7;
|
|
1383
1383
|
Xn += 7 - mn;
|
|
1384
1384
|
for (var jn = !1, Bn = 0, $n = 0; Bn < Xn; Bn++) {
|
|
1385
1385
|
var ln = new Date(r, m, 1 + (Bn - K)), mt = x(this._d) ? p(ln, this._d) : !1, Jn = p(ln, L), Tt = N.events.indexOf(ln.toDateString()) !== -1, nt = Bn < K || Bn >= M + K, Qn = 1 + (Bn - K), Wn = m, Gn = r, qt = N.startRange && p(N.startRange, ln), Bt = N.endRange && p(N.endRange, ln), Fn = N.startRange && N.endRange && N.startRange < ln && ln < N.endRange, st = N.minDate && ln < N.minDate || N.maxDate && ln > N.maxDate || N.disableWeekends && w(ln) || N.disableDayFn && N.disableDayFn(ln);
|
|
1386
|
-
nt && (Bn < K ? (Qn = rn + Qn, Wn = R, Gn = V) : (Qn = Qn - M, Wn = cn, Gn =
|
|
1386
|
+
nt && (Bn < K ? (Qn = rn + Qn, Wn = R, Gn = V) : (Qn = Qn - M, Wn = cn, Gn = tn));
|
|
1387
1387
|
var lt = {
|
|
1388
1388
|
day: Qn,
|
|
1389
1389
|
month: Wn,
|
|
@@ -2042,7 +2042,7 @@ function xh(t) {
|
|
|
2042
2042
|
return e > 1 ? !1 : e === 1 ? /^\d{10}-\d{3}$/.test(n) : /^(\d{10}|\d{12}|\d{13})$/.test(n);
|
|
2043
2043
|
}
|
|
2044
2044
|
function g1(l) {
|
|
2045
|
-
return
|
|
2045
|
+
return qn(this, arguments, function* ({
|
|
2046
2046
|
onSubmit: t,
|
|
2047
2047
|
registrationData: n,
|
|
2048
2048
|
theme: e = "ocb",
|
|
@@ -2150,7 +2150,7 @@ function g1(l) {
|
|
|
2150
2150
|
readOnly: !1,
|
|
2151
2151
|
horizontal: !0
|
|
2152
2152
|
});
|
|
2153
|
-
const
|
|
2153
|
+
const tn = Yc.map((D) => ({
|
|
2154
2154
|
value: D["cqt quản lý"],
|
|
2155
2155
|
label: D["tên cqt"],
|
|
2156
2156
|
id: D["ma xa"]
|
|
@@ -2159,7 +2159,7 @@ function g1(l) {
|
|
|
2159
2159
|
name: "companyTaxManagement",
|
|
2160
2160
|
label: g("taxAuthority"),
|
|
2161
2161
|
value: ((un = (O = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : O.organization) == null ? void 0 : un.taxAuthority) || "",
|
|
2162
|
-
options:
|
|
2162
|
+
options: tn,
|
|
2163
2163
|
required: !0,
|
|
2164
2164
|
error: null,
|
|
2165
2165
|
horizontal: !0,
|
|
@@ -2168,7 +2168,7 @@ function g1(l) {
|
|
|
2168
2168
|
D.target.id && a(D.target.id), An();
|
|
2169
2169
|
}
|
|
2170
2170
|
}), h) {
|
|
2171
|
-
const D =
|
|
2171
|
+
const D = tn.find(
|
|
2172
2172
|
(J) => J.id === h
|
|
2173
2173
|
);
|
|
2174
2174
|
D && f.setValue && f.setValue(
|
|
@@ -2494,7 +2494,7 @@ function g1(l) {
|
|
|
2494
2494
|
});
|
|
2495
2495
|
let mn = 0;
|
|
2496
2496
|
function jn(D) {
|
|
2497
|
-
return
|
|
2497
|
+
return qn(this, null, function* () {
|
|
2498
2498
|
const J = ++mn;
|
|
2499
2499
|
d.setError(null);
|
|
2500
2500
|
try {
|
|
@@ -2508,7 +2508,7 @@ function g1(l) {
|
|
|
2508
2508
|
if (J !== mn)
|
|
2509
2509
|
return;
|
|
2510
2510
|
if (d.setError(null), y.inputEl.value = hn.ten_cty || "", B.inputEl.value = hn.dia_chi || "", hn.cqthue_ql) {
|
|
2511
|
-
const Pn = (Zn) => Zn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), gn = Pn(hn.cqthue_ql), kn =
|
|
2511
|
+
const Pn = (Zn) => Zn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), gn = Pn(hn.cqthue_ql), kn = tn.find((Zn) => {
|
|
2512
2512
|
const rt = Pn(Zn.label);
|
|
2513
2513
|
return rt.includes(gn) || gn.includes(rt);
|
|
2514
2514
|
});
|
|
@@ -2580,7 +2580,7 @@ function g1(l) {
|
|
|
2580
2580
|
const u0 = String(Ht.getDate()).padStart(2, "0"), Gt = String(Ht.getMonth() + 1).padStart(2, "0"), Rt = Ht.getFullYear();
|
|
2581
2581
|
return `${u0}/${Gt}/${Rt}`;
|
|
2582
2582
|
}, Pn = new Image();
|
|
2583
|
-
Pn.src = URL.createObjectURL(D), Pn.onload = () =>
|
|
2583
|
+
Pn.src = URL.createObjectURL(D), Pn.onload = () => qn(null, null, function* () {
|
|
2584
2584
|
try {
|
|
2585
2585
|
const gn = yield l1(Pn).then((kn) => JSON.parse(kn).status !== "success" ? (Qn = !0, Wn = !1, hn(), qt(), null) : JSON.parse(kn).data);
|
|
2586
2586
|
if (gn || J({ success: !1, reason: "No data detected" }), gn) {
|
|
@@ -2610,7 +2610,7 @@ function g1(l) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
function Fn(D, J, hn) {
|
|
2612
2612
|
const on = new Image();
|
|
2613
|
-
on.src = URL.createObjectURL(D), on.onload = () =>
|
|
2613
|
+
on.src = URL.createObjectURL(D), on.onload = () => qn(null, null, function* () {
|
|
2614
2614
|
yield A1(on).then((Pn) => {
|
|
2615
2615
|
var kn, Zn;
|
|
2616
2616
|
const gn = JSON.parse(Pn);
|
|
@@ -2633,7 +2633,7 @@ function g1(l) {
|
|
|
2633
2633
|
} = Vc({
|
|
2634
2634
|
frontFile: n == null ? void 0 : n.idCard,
|
|
2635
2635
|
backFile: n == null ? void 0 : n.idCardBack,
|
|
2636
|
-
onFrontChange: (D) =>
|
|
2636
|
+
onFrontChange: (D) => qn(null, null, function* () {
|
|
2637
2637
|
var hn, on;
|
|
2638
2638
|
if (R = D, Fn(D, !0, !1), lt() || xt() || !A0()) {
|
|
2639
2639
|
Qn = !1, Wn = !1, qt(), An();
|
|
@@ -2645,7 +2645,7 @@ function g1(l) {
|
|
|
2645
2645
|
}
|
|
2646
2646
|
Bt(D);
|
|
2647
2647
|
}),
|
|
2648
|
-
onBackChange: (D) =>
|
|
2648
|
+
onBackChange: (D) => qn(null, null, function* () {
|
|
2649
2649
|
var on, Pn;
|
|
2650
2650
|
if (cn = D, Fn(D, !1, !0), lt() || xt() || !Ft()) {
|
|
2651
2651
|
Qn = !1, Wn = !1, qt(), An();
|
|
@@ -2730,19 +2730,19 @@ function g1(l) {
|
|
|
2730
2730
|
"d",
|
|
2731
2731
|
"M5.23 12.03a.75.75 0 011.06.02L10 15.94l7.71-7.71a.75.75 0 111.06 1.06l-8.24 8.24a.75.75 0 01-1.06 0L5.21 13.09a.75.75 0 01.02-1.06z"
|
|
2732
2732
|
), an.setAttribute("fill", "white"), j.appendChild(an), $.appendChild(j);
|
|
2733
|
-
const
|
|
2734
|
-
|
|
2733
|
+
const nn = document.createElement("label");
|
|
2734
|
+
nn.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", nn.appendChild(
|
|
2735
2735
|
document.createTextNode(g("agreeWith", "Tôi đồng ý với ") + " ")
|
|
2736
2736
|
);
|
|
2737
|
-
const
|
|
2737
|
+
const sn = (D) => {
|
|
2738
2738
|
const J = document.createElement("button");
|
|
2739
2739
|
return J.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", J.textContent = D, J.onclick = (hn) => {
|
|
2740
2740
|
hn.preventDefault(), typeof c == "function" && c();
|
|
2741
2741
|
}, J;
|
|
2742
2742
|
}, Tn = Ic(e);
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
),
|
|
2743
|
+
nn.appendChild(
|
|
2744
|
+
sn(g("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
|
|
2745
|
+
), nn.appendChild(document.createTextNode(` ${g("of", "của")} ${Tn}.`)), _.appendChild($), _.appendChild(nn), p.appendChild(_), $.addEventListener("click", () => {
|
|
2746
2746
|
Z = !Z, Z ? ($.classList.add("wgt:bg-primary"), j.classList.remove("wgt:hidden")) : ($.classList.remove("wgt:bg-primary"), j.classList.add("wgt:hidden")), An();
|
|
2747
2747
|
});
|
|
2748
2748
|
const xn = document.createElement("div");
|
|
@@ -2836,7 +2836,7 @@ function g1(l) {
|
|
|
2836
2836
|
D.selectEl.addEventListener("change", An);
|
|
2837
2837
|
}), [N, L].forEach((D) => {
|
|
2838
2838
|
D.addEventListener("change", An);
|
|
2839
|
-
}), V.addEventListener("click", (D) =>
|
|
2839
|
+
}), V.addEventListener("click", (D) => qn(null, null, function* () {
|
|
2840
2840
|
if (D.preventDefault(), !vn()) return;
|
|
2841
2841
|
const J = d.getValue().trim();
|
|
2842
2842
|
if (!xh(J)) {
|
|
@@ -2901,7 +2901,7 @@ function g1(l) {
|
|
|
2901
2901
|
});
|
|
2902
2902
|
}
|
|
2903
2903
|
function r1(h) {
|
|
2904
|
-
return
|
|
2904
|
+
return qn(this, arguments, function* ({
|
|
2905
2905
|
providerProps: t,
|
|
2906
2906
|
formProps: n,
|
|
2907
2907
|
isRenewal: e,
|
|
@@ -3165,54 +3165,58 @@ function d1({
|
|
|
3165
3165
|
promotion: t,
|
|
3166
3166
|
onSelect: n,
|
|
3167
3167
|
// isDisabled = false,
|
|
3168
|
-
isHidden: e = !1
|
|
3168
|
+
isHidden: e = !1,
|
|
3169
|
+
isSelectable: c = !0
|
|
3169
3170
|
}) {
|
|
3170
|
-
const c = document.createElement("div");
|
|
3171
|
-
c.className = e ? "" : "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]";
|
|
3172
3171
|
const h = document.createElement("div");
|
|
3173
|
-
|
|
3172
|
+
if (e)
|
|
3173
|
+
return h.style.display = "none", { container: h };
|
|
3174
|
+
const a = c && !t.isSelected;
|
|
3175
|
+
h.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (a ? " wgt:opacity-50" : "");
|
|
3176
|
+
const u = document.createElement("div");
|
|
3177
|
+
u.className = "wgt:absolute wgt:top-0 wgt:left-0 wgt:z-0", u.innerHTML = `<svg width="177" height="108" viewBox="0 0 177 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3174
3178
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.0743 3.375H37.1375V0H166.603C172.3 0 176.919 5.65535 176.919 12.6316V95.3684C176.919 102.345 172.3 108 166.603 108H37.1375V104.625H35.0743V108H10.316C4.61862 108 4.15411e-08 102.345 0 95.3684V93.4737C3.41841 93.4737 6.18958 90.0805 6.18958 85.8947C6.18958 81.709 3.41841 78.3158 0 78.3158V72C3.41841 72 6.18958 68.6068 6.18958 64.4211C6.18958 60.2353 3.41841 56.8421 0 56.8421V50.5263C3.41841 50.5263 6.18958 47.1331 6.18958 42.9474C6.18958 38.7616 3.41841 35.3684 0 35.3684V29.0526C3.41841 29.0526 6.18958 25.6594 6.18958 21.4737C6.18958 17.2879 3.41841 13.8947 0 13.8947V12.6316C0 5.65535 4.61862 0 10.316 0H35.0743V3.375ZM35.0743 97.875H37.1375V91.125H35.0743V97.875ZM35.0743 84.375H37.1375V77.625H35.0743V84.375ZM35.0743 70.875H37.1375V64.125H35.0743V70.875ZM35.0743 57.375H37.1375V50.625H35.0743V57.375ZM35.0743 43.875H37.1375V37.125H35.0743V43.875ZM35.0743 30.375H37.1375V23.625H35.0743V30.375ZM35.0743 16.875H37.1375V10.125H35.0743V16.875Z" fill="#C0D5FF"/>
|
|
3175
3179
|
</svg>
|
|
3176
3180
|
`;
|
|
3177
|
-
const
|
|
3178
|
-
|
|
3179
|
-
const
|
|
3180
|
-
|
|
3181
|
-
const
|
|
3182
|
-
|
|
3181
|
+
const o = document.createElement("div");
|
|
3182
|
+
o.className = "wgt:w-full wgt:relative wgt:z-10 wgt:h-full wgt:bg-white wgt:rounded-tr wgt:rounded-br wgt:px-4 wgt:py-3 wgt:ml-9 wgt:flex wgt:flex-col wgt:justify-between";
|
|
3183
|
+
const A = document.createElement("div");
|
|
3184
|
+
A.className = "wgt:flex wgt:items-start wgt:flex-col wgt:relative";
|
|
3185
|
+
const i = document.createElement("h3");
|
|
3186
|
+
i.className = [
|
|
3183
3187
|
"wgt:text-base",
|
|
3184
3188
|
"wgt:font-semibold",
|
|
3185
3189
|
"wgt:text-gray-500",
|
|
3186
3190
|
"wgt:mb-1",
|
|
3187
3191
|
"wgt:text-primary"
|
|
3188
|
-
].join(" "),
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3192
|
+
].join(" "), i.textContent = t.code, A.appendChild(i);
|
|
3193
|
+
const s = document.createElement("p");
|
|
3194
|
+
s.className = [
|
|
3191
3195
|
"wgt:text-sm",
|
|
3192
3196
|
"wgt:text-text-sub-600",
|
|
3193
3197
|
"wgt:mb-2"
|
|
3194
3198
|
].join(" ");
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3197
|
-
const { container:
|
|
3199
|
+
const T = zt(Pt());
|
|
3200
|
+
s.textContent = t[T], A.appendChild(s);
|
|
3201
|
+
const { container: q } = e0({
|
|
3198
3202
|
checked: t.isSelected,
|
|
3199
3203
|
onChange: () => {
|
|
3200
|
-
let
|
|
3201
|
-
n(t.code,
|
|
3204
|
+
let x = !t.isSelected;
|
|
3205
|
+
n(t.code, x);
|
|
3202
3206
|
},
|
|
3203
3207
|
isIconCheckbox: !0
|
|
3204
3208
|
});
|
|
3205
|
-
|
|
3206
|
-
const
|
|
3207
|
-
return
|
|
3209
|
+
c || (q.style.display = "none"), q.className = "wgt:absolute wgt:top-0 wgt:right-0", A.appendChild(q), o.appendChild(A);
|
|
3210
|
+
const l = document.createElement("p");
|
|
3211
|
+
return l.className = [
|
|
3208
3212
|
"wgt:text-xs",
|
|
3209
3213
|
"wgt:font-normal",
|
|
3210
3214
|
"wgt:text-right",
|
|
3211
3215
|
"wgt:text-[#335CFF]",
|
|
3212
3216
|
"wgt:italic"
|
|
3213
|
-
].join(" "),
|
|
3217
|
+
].join(" "), l.textContent = `${g("validityPeriod")}: ${g(
|
|
3214
3218
|
"expiredDate"
|
|
3215
|
-
)} ${t.expiredAt.split("T")[0]}`,
|
|
3219
|
+
)} ${t.expiredAt.split("T")[0]}`, o.appendChild(l), h.appendChild(u), h.appendChild(o), { container: h };
|
|
3216
3220
|
}
|
|
3217
3221
|
function w1({
|
|
3218
3222
|
value: t = "",
|
|
@@ -3242,8 +3246,8 @@ function p1({
|
|
|
3242
3246
|
const i = document.createElement("span");
|
|
3243
3247
|
i.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", i.innerText = "*", A.appendChild(i), o.appendChild(A);
|
|
3244
3248
|
function s() {
|
|
3245
|
-
return
|
|
3246
|
-
n && clearTimeout(n), e !== "" ? n = setTimeout(() =>
|
|
3249
|
+
return qn(this, null, function* () {
|
|
3250
|
+
n && clearTimeout(n), e !== "" ? n = setTimeout(() => qn(null, null, function* () {
|
|
3247
3251
|
try {
|
|
3248
3252
|
const v = e.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), p = yield Xc({ search: v, bank: t });
|
|
3249
3253
|
p && (a = p), c && c();
|
|
@@ -3391,7 +3395,7 @@ function X1() {
|
|
|
3391
3395
|
}
|
|
3392
3396
|
const B1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFmSURBVHgBjVJLUsJAEH2dTAzu4gmEG+gNYKFxGU9gbqAuLaEqVVDllhuAJyDuQBfEE1CeADiBcaESyWTsJCKfIOXbzPT3db9qAkN5VQvG3iUUVUEoYxcUJlDJC+TcIy8IReY0zA4STKHp15gnYeYTKuCGLiQXrEJnAmK/MHts1Uh5jgXxMab648EaUcv2EUduyrJ1kJb9yvGKgDmzEFMhieoDB7vxBpQsDVEphMYdm/Y402LB0Dxpr9ob7Ff8HKZ/jTw/pNtBBaSeeS93OYLmpAyF4uapw0KmgtfI60/EWjShrftu4IgTH6jxFKSGyEQ0PkdI1BTJzF9SqS4QFRtqwkciezxJCPnVJnV3VkashtTgNf6JrEaqEYt/nItIqrhry+78JSLd9Cf5bxbST/KQH74weQ8Z50Fh8iFJ99dewDAsKO2Cqyp8O04uYrx/Dv3d4wU9LiwvqfQuhL5OnyhuSAFk5KbmN7eYmgg1dFx4AAAAAElFTkSuQmCC";
|
|
3393
3397
|
function N1(B) {
|
|
3394
|
-
return
|
|
3398
|
+
return qn(this, arguments, function* ({
|
|
3395
3399
|
onNext: t,
|
|
3396
3400
|
onPrev: n,
|
|
3397
3401
|
selectedInitPackage: e,
|
|
@@ -3462,18 +3466,18 @@ function N1(B) {
|
|
|
3462
3466
|
Z = Ln, xn(), Y != null && Y.eInvoiceRegistration && (Y.eInvoiceRegistration.businessType = Z), _ == null || _(Z);
|
|
3463
3467
|
}), { btn: Dn, inner: _n, textSpan: et, value: Ln };
|
|
3464
3468
|
}
|
|
3465
|
-
const
|
|
3469
|
+
const nn = an(g("company") || "Doanh nghiệp", "company"), sn = an(
|
|
3466
3470
|
g("householdBusiness") || "Hộ kinh doanh",
|
|
3467
3471
|
"household"
|
|
3468
3472
|
);
|
|
3469
|
-
j.appendChild(
|
|
3473
|
+
j.appendChild(nn.btn), j.appendChild(sn.btn);
|
|
3470
3474
|
function Tn(An, Ln) {
|
|
3471
3475
|
An.btn.classList.toggle("wgt:bg-weak-50", Ln), An.inner.style.opacity = Ln ? "1" : "0";
|
|
3472
3476
|
const Dn = An.inner.parentElement;
|
|
3473
3477
|
Dn.classList.toggle("wgt:border-[#1e2a7b]", Ln), Dn.classList.toggle("wgt:border-[#D0D5DD]", !Ln), An.textSpan.style.color = Ln ? "#1e2a7b" : "", An.textSpan.classList.toggle("wgt:text-text-sub-600", !Ln);
|
|
3474
3478
|
}
|
|
3475
3479
|
function xn() {
|
|
3476
|
-
Tn(
|
|
3480
|
+
Tn(nn, Z === "company"), Tn(sn, Z === "household");
|
|
3477
3481
|
}
|
|
3478
3482
|
return xn(), {
|
|
3479
3483
|
container: $,
|
|
@@ -3490,7 +3494,7 @@ function N1(B) {
|
|
|
3490
3494
|
cn.className = "wgt:relative wgt:flex wgt:w-full wgt:h-full wgt:flex-col wgt:gap-4 wgt:py-6";
|
|
3491
3495
|
const {
|
|
3492
3496
|
container: V,
|
|
3493
|
-
open:
|
|
3497
|
+
open: tn,
|
|
3494
3498
|
close: rn
|
|
3495
3499
|
} = a0();
|
|
3496
3500
|
cn.appendChild(V);
|
|
@@ -3557,9 +3561,9 @@ function N1(B) {
|
|
|
3557
3561
|
dt.className = "wgt:flex wgt:justify-between wgt:gap-2", cn.appendChild(dt);
|
|
3558
3562
|
const Nt = document.createElement("button");
|
|
3559
3563
|
Nt.type = "button", Nt.innerText = g("back"), Nt.className = "wgt:bg-transparent wgt:text-primary wgt:hover:text-primary-dark wgt:hover:bg-transparent wgt:underline", Nt.addEventListener("click", n), dt.appendChild(Nt);
|
|
3560
|
-
const Ft = (Y, _, Z, $) =>
|
|
3561
|
-
|
|
3562
|
-
const
|
|
3564
|
+
const Ft = (Y, _, Z, $) => qn(null, null, function* () {
|
|
3565
|
+
tn();
|
|
3566
|
+
const nn = x.eInvoiceRegistration, { isUsedEInvoiceBefore: en } = nn, j = mh(nn, ["isUsedEInvoiceBefore"]);
|
|
3563
3567
|
let an = [
|
|
3564
3568
|
{
|
|
3565
3569
|
code: _.code,
|
|
@@ -3575,8 +3579,8 @@ function N1(B) {
|
|
|
3575
3579
|
code: Y.code,
|
|
3576
3580
|
quantity: Y.quantity,
|
|
3577
3581
|
isCashRegister: X
|
|
3578
|
-
}), $.length > 0 && $.forEach((
|
|
3579
|
-
const Tn = r[
|
|
3582
|
+
}), $.length > 0 && $.forEach((sn) => {
|
|
3583
|
+
const Tn = r[sn];
|
|
3580
3584
|
Tn.reward.packageCodes.length > 0 && Tn.reward.packageCodes.forEach((xn) => {
|
|
3581
3585
|
an.push({
|
|
3582
3586
|
code: xn,
|
|
@@ -3586,7 +3590,7 @@ function N1(B) {
|
|
|
3586
3590
|
});
|
|
3587
3591
|
}), Q(an), k($);
|
|
3588
3592
|
try {
|
|
3589
|
-
const
|
|
3593
|
+
const sn = yield Bc({
|
|
3590
3594
|
eInvoiceRegistration: En({}, j),
|
|
3591
3595
|
bank: x.bank,
|
|
3592
3596
|
provider: q.route,
|
|
@@ -3600,9 +3604,9 @@ function N1(B) {
|
|
|
3600
3604
|
promotionCodes: $,
|
|
3601
3605
|
isRenew: y,
|
|
3602
3606
|
isCashRegister: X
|
|
3603
|
-
}), Tn =
|
|
3607
|
+
}), Tn = sn.orderId, xn = sn.amount || 0;
|
|
3604
3608
|
A(Tn), s ? s(xn) : console.warn("setOrderAmount is not defined!"), yield new Promise((vn) => setTimeout(vn, 100)), rn(), t();
|
|
3605
|
-
} catch (
|
|
3609
|
+
} catch (sn) {
|
|
3606
3610
|
n0(g("errorCreatingOrder") || "Failed to create order"), rn();
|
|
3607
3611
|
return;
|
|
3608
3612
|
}
|
|
@@ -3610,7 +3614,7 @@ function N1(B) {
|
|
|
3610
3614
|
type: "button",
|
|
3611
3615
|
title: g("next"),
|
|
3612
3616
|
className: "wgt:text-text-primary wgt:bg-primary",
|
|
3613
|
-
handleClick: () =>
|
|
3617
|
+
handleClick: () => qn(null, null, function* () {
|
|
3614
3618
|
const Y = ln().find(
|
|
3615
3619
|
(j) => j._id === C
|
|
3616
3620
|
), _ = z.find(
|
|
@@ -3639,7 +3643,7 @@ function N1(B) {
|
|
|
3639
3643
|
});
|
|
3640
3644
|
dt.appendChild(A0);
|
|
3641
3645
|
function It() {
|
|
3642
|
-
return
|
|
3646
|
+
return qn(this, null, function* () {
|
|
3643
3647
|
var Y, _;
|
|
3644
3648
|
try {
|
|
3645
3649
|
const [
|
|
@@ -3680,18 +3684,18 @@ function N1(B) {
|
|
|
3680
3684
|
reward: an.reward
|
|
3681
3685
|
});
|
|
3682
3686
|
}), Object.keys(r).length > 0 && (W = l ? [...l] : [], at())) : console.error("Failed to load promotions:", Z.reason), en.status === "fulfilled") {
|
|
3683
|
-
H = (y ? en.value.filter((
|
|
3684
|
-
const
|
|
3687
|
+
H = (y ? en.value.filter((sn) => sn.renewPrice !== 0) : en.value) || [];
|
|
3688
|
+
const nn = X ? I(
|
|
3685
3689
|
H,
|
|
3686
3690
|
Xn.getValue()
|
|
3687
3691
|
) : H;
|
|
3688
|
-
if ($n(
|
|
3689
|
-
const
|
|
3690
|
-
if (c ? C = c._id :
|
|
3692
|
+
if ($n(nn || []), Jn(nn || []), en.value.length > 0) {
|
|
3693
|
+
const sn = U(nn);
|
|
3694
|
+
if (c ? C = c._id : sn ? C = sn._id : C = nn == null ? void 0 : nn[0]._id, X) {
|
|
3691
3695
|
const Tn = Xn.getValue();
|
|
3692
3696
|
S[Tn] = C;
|
|
3693
3697
|
}
|
|
3694
|
-
Jn(
|
|
3698
|
+
Jn(nn);
|
|
3695
3699
|
}
|
|
3696
3700
|
nt();
|
|
3697
3701
|
} else
|
|
@@ -3704,9 +3708,9 @@ function N1(B) {
|
|
|
3704
3708
|
if (j.status === "fulfilled")
|
|
3705
3709
|
if (z = j.value || [], z.length > 0) {
|
|
3706
3710
|
const an = z.find(
|
|
3707
|
-
(
|
|
3711
|
+
(nn) => m.includes(nn.code)
|
|
3708
3712
|
);
|
|
3709
|
-
y ? E = h ? h._id : null : E = h ? h._id : an ? an._id : y ? null : (_ = z == null ? void 0 : z.filter((
|
|
3713
|
+
y ? E = h ? h._id : null : E = h ? h._id : an ? an._id : y ? null : (_ = z == null ? void 0 : z.filter((nn) => !nn.isBonusPackage)[0]) == null ? void 0 : _._id;
|
|
3710
3714
|
} else {
|
|
3711
3715
|
if (console.error(
|
|
3712
3716
|
"Failed to load signature packages:",
|
|
@@ -3734,14 +3738,14 @@ function N1(B) {
|
|
|
3734
3738
|
}
|
|
3735
3739
|
function it(Y, _, Z) {
|
|
3736
3740
|
const $ = Object.values(r).find(
|
|
3737
|
-
(
|
|
3741
|
+
(nn) => nn.bank === T && nn.appliedPackages.includes(Y)
|
|
3738
3742
|
), en = m.includes(Y) || $ && // !currentPackagePromotion.isDisabled &&
|
|
3739
3743
|
!$.isHidden && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used, j = Object.values(r).find(
|
|
3740
|
-
(
|
|
3744
|
+
(nn) => nn.bank === T && nn.appliedPackages.includes(_)
|
|
3741
3745
|
), an = m.includes(_) || j && // !newPackagePromotion.isDisabled &&
|
|
3742
3746
|
!j.isHidden && !(j.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && j.limit !== j.used && j.isActive;
|
|
3743
3747
|
if (en && !an) {
|
|
3744
|
-
const { container:
|
|
3748
|
+
const { container: nn, open: sn } = Mt({
|
|
3745
3749
|
message: g("errorDiscountPackage"),
|
|
3746
3750
|
description: g("errorDiscountPackageDes"),
|
|
3747
3751
|
okLabel: g("ok"),
|
|
@@ -3751,7 +3755,7 @@ function N1(B) {
|
|
|
3751
3755
|
isSuccess: !1,
|
|
3752
3756
|
theme: T
|
|
3753
3757
|
});
|
|
3754
|
-
cn.appendChild(
|
|
3758
|
+
cn.appendChild(nn), sn();
|
|
3755
3759
|
} else
|
|
3756
3760
|
Z();
|
|
3757
3761
|
}
|
|
@@ -3852,10 +3856,10 @@ function N1(B) {
|
|
|
3852
3856
|
);
|
|
3853
3857
|
return;
|
|
3854
3858
|
}
|
|
3855
|
-
const an = j.expiredAt < (/* @__PURE__ */ new Date()).toISOString(),
|
|
3859
|
+
const an = j.expiredAt < (/* @__PURE__ */ new Date()).toISOString(), nn = j.limit <= j.used, sn = !j.isActive, xn = ((vn = j.appliedPackages) == null ? void 0 : vn.some(
|
|
3856
3860
|
(An) => $.includes(An)
|
|
3857
|
-
)) && !an && !
|
|
3858
|
-
j.isHidden = !xn, xn ?
|
|
3861
|
+
)) && !an && !nn && !sn;
|
|
3862
|
+
j.isHidden = !xn, xn ? W.includes(j.code) || W.push(j.code) : W = W.filter(
|
|
3859
3863
|
(An) => An !== j.code
|
|
3860
3864
|
);
|
|
3861
3865
|
}), at();
|
|
@@ -3871,7 +3875,7 @@ function N1(B) {
|
|
|
3871
3875
|
}
|
|
3872
3876
|
function Rn() {
|
|
3873
3877
|
if (Object.values(r).filter(
|
|
3874
|
-
(
|
|
3878
|
+
(nn) => nn.bank === T
|
|
3875
3879
|
).length === 0) {
|
|
3876
3880
|
mn.contains(zn) && mn.removeChild(zn);
|
|
3877
3881
|
return;
|
|
@@ -3882,20 +3886,20 @@ function N1(B) {
|
|
|
3882
3886
|
const Z = document.createElement("div");
|
|
3883
3887
|
Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3884
3888
|
const $ = document.createElement("div");
|
|
3885
|
-
$.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($), W && W.length > 0 && W.filter((
|
|
3889
|
+
$.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($), W && W.length > 0 && W.filter((sn) => {
|
|
3886
3890
|
const Tn = Object.values(r).find(
|
|
3887
|
-
(xn) => xn.code ===
|
|
3891
|
+
(xn) => xn.code === sn
|
|
3888
3892
|
);
|
|
3889
3893
|
return Tn && Tn.bank === T;
|
|
3890
|
-
}).forEach((
|
|
3894
|
+
}).forEach((sn) => {
|
|
3891
3895
|
const Tn = document.createElement("div");
|
|
3892
|
-
Tn.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", Tn.innerText =
|
|
3896
|
+
Tn.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", Tn.innerText = sn;
|
|
3893
3897
|
const xn = vt({
|
|
3894
3898
|
type: "button",
|
|
3895
3899
|
title: "x",
|
|
3896
3900
|
handleClick: () => {
|
|
3897
3901
|
W = W.filter(
|
|
3898
|
-
(vn) => vn !==
|
|
3902
|
+
(vn) => vn !== sn
|
|
3899
3903
|
), Rn(), In();
|
|
3900
3904
|
}
|
|
3901
3905
|
});
|
|
@@ -3916,27 +3920,27 @@ function N1(B) {
|
|
|
3916
3920
|
Z.appendChild(en), zn.appendChild(Z);
|
|
3917
3921
|
const j = document.createElement("div");
|
|
3918
3922
|
j.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", zn.appendChild(j);
|
|
3919
|
-
const an =
|
|
3920
|
-
(tn) => Object.values(r).find(
|
|
3921
|
-
(qn) => qn.code === tn && qn.bank === T
|
|
3922
|
-
)
|
|
3923
|
-
).filter(Boolean);
|
|
3923
|
+
const an = Object.values(r).filter((nn) => nn.bank === T).filter((nn) => !nn.isHidden);
|
|
3924
3924
|
if (an.length > 0)
|
|
3925
|
-
an.forEach((
|
|
3926
|
-
const { container:
|
|
3927
|
-
promotion: Kn(En({},
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3925
|
+
an.forEach((nn) => {
|
|
3926
|
+
const sn = W.includes(nn.code), { container: Tn } = d1({
|
|
3927
|
+
promotion: Kn(En({}, nn), {
|
|
3928
|
+
isSelected: W.includes(nn.code)
|
|
3929
|
+
}),
|
|
3930
|
+
// onSelect: (promotionCode, isSelected) => {
|
|
3931
|
+
onSelect: (xn, vn) => {
|
|
3932
|
+
vn ? W.includes(xn) || W.push(xn) : W = W.filter(
|
|
3933
|
+
(An) => An !== xn
|
|
3934
|
+
), Rn(), In();
|
|
3932
3935
|
},
|
|
3933
|
-
isHidden: !1
|
|
3936
|
+
isHidden: !1,
|
|
3937
|
+
isSelectable: !0
|
|
3934
3938
|
});
|
|
3935
|
-
j.appendChild(
|
|
3939
|
+
sn || Tn.classList.add("wgt:opacity-50"), j.appendChild(Tn);
|
|
3936
3940
|
});
|
|
3937
3941
|
else {
|
|
3938
|
-
const
|
|
3939
|
-
|
|
3942
|
+
const nn = document.createElement("span");
|
|
3943
|
+
nn.className = "wgt:text-text-sub-600", nn.innerText = g("noPromotionFound"), zn.appendChild(nn);
|
|
3940
3944
|
}
|
|
3941
3945
|
}
|
|
3942
3946
|
function In() {
|
|
@@ -4111,7 +4115,7 @@ function N1(B) {
|
|
|
4111
4115
|
"package"
|
|
4112
4116
|
)} ${(Vn = (Nn = O == null ? void 0 : O.reward) == null ? void 0 : Nn.packageCodes) == null ? void 0 : Vn.join(", ")}`, fn.style.color = "#12B76A") : fn.innerText = "", un.appendChild(fn), Fn.appendChild(un);
|
|
4113
4117
|
});
|
|
4114
|
-
const $ = !y && F.length > 0 && !(Y != null && Y.withoutInitialFee) ? ((Kt = F[0]) == null ? void 0 : Kt.price) * N : 0, en = Tt(C), j = en ? y ? (Yt = en.renewPrice) != null ? Yt : 0 : (Ot = en.price) != null ? Ot : 0 : 0, an = en ? j * en.limit * L : 0,
|
|
4118
|
+
const $ = !y && F.length > 0 && !(Y != null && Y.withoutInitialFee) ? ((Kt = F[0]) == null ? void 0 : Kt.price) * N : 0, en = Tt(C), j = en ? y ? (Yt = en.renewPrice) != null ? Yt : 0 : (Ot = en.price) != null ? Ot : 0 : 0, an = en ? j * en.limit * L : 0, nn = R(E), sn = nn ? nn.price * nn.limit * M : 0, Tn = $ + an + sn, xn = Math.min(Z, Tn), vn = Math.max(Tn - xn, 0);
|
|
4115
4119
|
i(vn);
|
|
4116
4120
|
{
|
|
4117
4121
|
const O = document.createElement("tr");
|
|
@@ -4268,8 +4272,8 @@ function k1({
|
|
|
4268
4272
|
const x = document.createElement("p");
|
|
4269
4273
|
x.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
|
|
4270
4274
|
const w = (V) => {
|
|
4271
|
-
const
|
|
4272
|
-
return `${
|
|
4275
|
+
const tn = Math.floor(V / 60).toString().padStart(2, "0"), rn = (V % 60).toString().padStart(2, "0");
|
|
4276
|
+
return `${tn}:${rn}`;
|
|
4273
4277
|
}, Q = () => {
|
|
4274
4278
|
x.innerHTML = `${g(
|
|
4275
4279
|
"completePaymentIn"
|
|
@@ -4304,21 +4308,21 @@ function k1({
|
|
|
4304
4308
|
if (b.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", b.innerText = n ? String(n.code) : "", H.appendChild(I), H.appendChild(b), d.appendChild(H), !A) {
|
|
4305
4309
|
const V = document.createElement("div");
|
|
4306
4310
|
V.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4307
|
-
const
|
|
4308
|
-
|
|
4311
|
+
const tn = document.createElement("h4");
|
|
4312
|
+
tn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", tn.innerText = g("digitalSignaturePackage");
|
|
4309
4313
|
const rn = document.createElement("span");
|
|
4310
|
-
rn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", rn.innerText = e ? String(e.code) : "", V.appendChild(
|
|
4314
|
+
rn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", rn.innerText = e ? String(e.code) : "", V.appendChild(tn), V.appendChild(rn), d.appendChild(V);
|
|
4311
4315
|
}
|
|
4312
4316
|
if (a && a.length > 0) {
|
|
4313
4317
|
const V = document.createElement("div");
|
|
4314
4318
|
V.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
4315
|
-
const
|
|
4316
|
-
|
|
4319
|
+
const tn = document.createElement("h4");
|
|
4320
|
+
tn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", tn.innerText = g("promotion");
|
|
4317
4321
|
const rn = document.createElement("div");
|
|
4318
4322
|
rn.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", a.forEach((Xn) => {
|
|
4319
4323
|
const mn = document.createElement("div");
|
|
4320
4324
|
mn.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", mn.innerText = Xn, rn.appendChild(mn);
|
|
4321
|
-
}), V.appendChild(
|
|
4325
|
+
}), V.appendChild(tn), V.appendChild(rn), d.appendChild(V);
|
|
4322
4326
|
}
|
|
4323
4327
|
const S = document.createElement("hr");
|
|
4324
4328
|
d.appendChild(S);
|
|
@@ -4363,7 +4367,7 @@ function k1({
|
|
|
4363
4367
|
const R = vt({
|
|
4364
4368
|
title: i ? g("confirmFreeOrder") || "Xác nhận đơn hàng" : g("cancelTransaction") || "Hủy giao dịch",
|
|
4365
4369
|
className: i ? "wgt:flex-1 wgt:py-3 wgt:rounded-lg wgt:bg-primary wgt:text-white hover:wgt:bg-primary-dark" : "wgt:w-full wgt:py-3 wgt:rounded-lg wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary hover:wgt:bg-transparent",
|
|
4366
|
-
handleClick: i ? () =>
|
|
4370
|
+
handleClick: i ? () => qn(null, null, function* () {
|
|
4367
4371
|
R.disabled = !0;
|
|
4368
4372
|
const V = R.textContent;
|
|
4369
4373
|
R.textContent = g("processing") || "Đang xử lý...", U();
|
|
@@ -4372,7 +4376,7 @@ function k1({
|
|
|
4372
4376
|
/bg-primary|bg-\[\#0066cc\]/g,
|
|
4373
4377
|
"bg-green-500"
|
|
4374
4378
|
), R.textContent = g("confirmed") || "Đã xác nhận";
|
|
4375
|
-
const
|
|
4379
|
+
const tn = Mt({
|
|
4376
4380
|
message: g("freeOrderSuccess") || "Thông tin đăng ký đã được ghi nhận thành công!",
|
|
4377
4381
|
okLabel: g("next") || "Tiếp tục",
|
|
4378
4382
|
theme: "bvb",
|
|
@@ -4382,8 +4386,8 @@ function k1({
|
|
|
4382
4386
|
clearInterval(q), o(), G();
|
|
4383
4387
|
}
|
|
4384
4388
|
});
|
|
4385
|
-
s.appendChild(
|
|
4386
|
-
} catch (
|
|
4389
|
+
s.appendChild(tn.container), tn.open();
|
|
4390
|
+
} catch (tn) {
|
|
4387
4391
|
R.disabled = !1, R.textContent = V;
|
|
4388
4392
|
const rn = Mt({
|
|
4389
4393
|
message: "Xác nhận đơn hàng thất bại. Vui lòng thử lại.",
|
|
@@ -4431,28 +4435,28 @@ function k1({
|
|
|
4431
4435
|
},
|
|
4432
4436
|
setTotalAmountText(V) {
|
|
4433
4437
|
h = V;
|
|
4434
|
-
const
|
|
4435
|
-
|
|
4438
|
+
const tn = s.querySelector(".wgt:text-2xl.wgt:font-bold");
|
|
4439
|
+
tn && (tn.innerText = typeof V == "number" ? V.toLocaleString("vi-VN") + " VND" : V);
|
|
4436
4440
|
},
|
|
4437
4441
|
setSelectedProvider(V) {
|
|
4438
4442
|
t = V;
|
|
4439
|
-
const
|
|
4440
|
-
|
|
4443
|
+
const tn = s.querySelector("img");
|
|
4444
|
+
tn && (V != null && V.logoUrl) && (tn.src = V.logoUrl, tn.alt = V.name || "");
|
|
4441
4445
|
},
|
|
4442
4446
|
setSelectedInvoicePackage(V) {
|
|
4443
4447
|
n = V;
|
|
4444
|
-
const
|
|
4448
|
+
const tn = s.querySelectorAll(
|
|
4445
4449
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4446
4450
|
)[0];
|
|
4447
|
-
|
|
4451
|
+
tn && (tn.innerText = V ? String(V.code || "") : "");
|
|
4448
4452
|
},
|
|
4449
4453
|
setSelectedSignaturePackage(V) {
|
|
4450
4454
|
if (A) return;
|
|
4451
4455
|
e = V;
|
|
4452
|
-
const
|
|
4456
|
+
const tn = s.querySelectorAll(
|
|
4453
4457
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4454
4458
|
);
|
|
4455
|
-
|
|
4459
|
+
tn[1] && (tn[1].innerText = V ? String(V.code || "") : "");
|
|
4456
4460
|
}
|
|
4457
4461
|
};
|
|
4458
4462
|
}
|
|
@@ -5768,8 +5772,8 @@ function R1() {
|
|
|
5768
5772
|
let M = 0;
|
|
5769
5773
|
const K = new Uint8Array(B.buffer);
|
|
5770
5774
|
for (let V = 0; V < S; V++) {
|
|
5771
|
-
const
|
|
5772
|
-
N[V] = K.slice(P, P +
|
|
5775
|
+
const tn = V < E ? z : F;
|
|
5776
|
+
N[V] = K.slice(P, P + tn), L[V] = m.encode(N[V]), P += tn, M = Math.max(M, tn);
|
|
5773
5777
|
}
|
|
5774
5778
|
const U = new Uint8Array(H);
|
|
5775
5779
|
let G = 0, R, cn;
|
|
@@ -6198,7 +6202,7 @@ function ca({
|
|
|
6198
6202
|
}
|
|
6199
6203
|
const aa = 5;
|
|
6200
6204
|
function ea(o) {
|
|
6201
|
-
return
|
|
6205
|
+
return qn(this, arguments, function* ({
|
|
6202
6206
|
onNext: t,
|
|
6203
6207
|
onPrev: n,
|
|
6204
6208
|
step: e,
|
|
@@ -6270,7 +6274,7 @@ function ea(o) {
|
|
|
6270
6274
|
}), n && (clearInterval(s), s = null, n());
|
|
6271
6275
|
}), z.appendChild(F), B.appendChild(z);
|
|
6272
6276
|
function r() {
|
|
6273
|
-
return
|
|
6277
|
+
return qn(this, null, function* () {
|
|
6274
6278
|
const M = (h == null ? void 0 : h.totalAmountText) || 0;
|
|
6275
6279
|
w = M, x = M === 0, On(Yn.STEP3_VIEWED, {
|
|
6276
6280
|
orderId: T,
|
|
@@ -6282,7 +6286,7 @@ function ea(o) {
|
|
|
6282
6286
|
});
|
|
6283
6287
|
}
|
|
6284
6288
|
function m(M) {
|
|
6285
|
-
return
|
|
6289
|
+
return qn(this, null, function* () {
|
|
6286
6290
|
var K, U, G, R;
|
|
6287
6291
|
if (!(q || x)) {
|
|
6288
6292
|
q = !0, X();
|
|
@@ -6348,7 +6352,7 @@ function ea(o) {
|
|
|
6348
6352
|
});
|
|
6349
6353
|
}
|
|
6350
6354
|
function P() {
|
|
6351
|
-
x || s || (s = setInterval(() =>
|
|
6355
|
+
x || s || (s = setInterval(() => qn(null, null, function* () {
|
|
6352
6356
|
var M, K, U, G, R, cn;
|
|
6353
6357
|
try {
|
|
6354
6358
|
const V = yield kc(T);
|
|
@@ -6380,7 +6384,7 @@ function ea(o) {
|
|
|
6380
6384
|
return;
|
|
6381
6385
|
}
|
|
6382
6386
|
clearInterval(s), s = null;
|
|
6383
|
-
const
|
|
6387
|
+
const tn = p ? Math.round((Date.now() - p) / 1e3) : null;
|
|
6384
6388
|
V.paymentStatus === "paid" ? _t.success({
|
|
6385
6389
|
orderId: T,
|
|
6386
6390
|
amount: w,
|
|
@@ -6388,7 +6392,7 @@ function ea(o) {
|
|
|
6388
6392
|
paymentMethod: k,
|
|
6389
6393
|
provider: Q,
|
|
6390
6394
|
theme: u,
|
|
6391
|
-
duration:
|
|
6395
|
+
duration: tn
|
|
6392
6396
|
}) : _t.failed({
|
|
6393
6397
|
orderId: T,
|
|
6394
6398
|
amount: w,
|
|
@@ -6614,7 +6618,7 @@ function ga() {
|
|
|
6614
6618
|
};
|
|
6615
6619
|
}
|
|
6616
6620
|
function Rh(c) {
|
|
6617
|
-
return
|
|
6621
|
+
return qn(this, arguments, function* ({
|
|
6618
6622
|
orderId: t,
|
|
6619
6623
|
callbackUrl: n,
|
|
6620
6624
|
onCompleteSignature: e
|
|
@@ -6882,7 +6886,7 @@ function da({
|
|
|
6882
6886
|
return { container: q, open: b, close: S };
|
|
6883
6887
|
}
|
|
6884
6888
|
function I0(t, n, e, c = !1, h = "ocb", a = "") {
|
|
6885
|
-
return
|
|
6889
|
+
return qn(this, null, function* () {
|
|
6886
6890
|
var u, o;
|
|
6887
6891
|
try {
|
|
6888
6892
|
if (h !== "bvb") {
|
|
@@ -6903,7 +6907,7 @@ function I0(t, n, e, c = !1, h = "ocb", a = "") {
|
|
|
6903
6907
|
// },
|
|
6904
6908
|
onCancel: () => {
|
|
6905
6909
|
},
|
|
6906
|
-
onConfirm: () =>
|
|
6910
|
+
onConfirm: () => qn(null, null, function* () {
|
|
6907
6911
|
const q = yield t0(t, n);
|
|
6908
6912
|
e(!1, q);
|
|
6909
6913
|
}),
|
|
@@ -6919,7 +6923,7 @@ function I0(t, n, e, c = !1, h = "ocb", a = "") {
|
|
|
6919
6923
|
});
|
|
6920
6924
|
}
|
|
6921
6925
|
function Xa(t, n, e, c, h, a) {
|
|
6922
|
-
return
|
|
6926
|
+
return qn(this, null, function* () {
|
|
6923
6927
|
var L, M;
|
|
6924
6928
|
const o = [
|
|
6925
6929
|
{ name: "M-Invoice", route: "m-invoice", logoUrl: dc },
|
|
@@ -7079,7 +7083,7 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7079
7083
|
});
|
|
7080
7084
|
}
|
|
7081
7085
|
function z(K, U) {
|
|
7082
|
-
return
|
|
7086
|
+
return qn(this, null, function* () {
|
|
7083
7087
|
K ? w = Kn(En({}, w), {
|
|
7084
7088
|
eInvoiceRegistration: {
|
|
7085
7089
|
organization: En({}, K.organization),
|
|
@@ -7093,7 +7097,7 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7093
7097
|
});
|
|
7094
7098
|
}
|
|
7095
7099
|
function F(K) {
|
|
7096
|
-
return
|
|
7100
|
+
return qn(this, null, function* () {
|
|
7097
7101
|
if (K === 1) {
|
|
7098
7102
|
const { container: U } = yield r1({
|
|
7099
7103
|
isNewCustomer: k,
|
|
@@ -7101,13 +7105,13 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7101
7105
|
providerProps: {
|
|
7102
7106
|
providers: o,
|
|
7103
7107
|
selectedRoute: x.route,
|
|
7104
|
-
onProviderChange: (G) =>
|
|
7108
|
+
onProviderChange: (G) => qn(null, null, function* () {
|
|
7105
7109
|
var R, cn;
|
|
7106
7110
|
x = G, yield I0(
|
|
7107
7111
|
G.route,
|
|
7108
7112
|
(cn = (R = w == null ? void 0 : w.eInvoiceRegistration) == null ? void 0 : R.organization) == null ? void 0 : cn.taxCode,
|
|
7109
|
-
(V,
|
|
7110
|
-
k = V, z(
|
|
7113
|
+
(V, tn) => {
|
|
7114
|
+
k = V, z(tn);
|
|
7111
7115
|
},
|
|
7112
7116
|
a,
|
|
7113
7117
|
h,
|
|
@@ -7163,7 +7167,7 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7163
7167
|
isNewCustomer: k
|
|
7164
7168
|
});
|
|
7165
7169
|
const { container: U } = yield N1({
|
|
7166
|
-
onNext: () =>
|
|
7170
|
+
onNext: () => qn(null, null, function* () {
|
|
7167
7171
|
On(Yn.STEP2_COMPLETED, {
|
|
7168
7172
|
theme: h,
|
|
7169
7173
|
provider: x == null ? void 0 : x.route,
|
|
@@ -7279,7 +7283,7 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7279
7283
|
Q && (q(r), m()), yield I0(
|
|
7280
7284
|
x.route,
|
|
7281
7285
|
(M = (L = w == null ? void 0 : w.eInvoiceRegistration) == null ? void 0 : L.organization) == null ? void 0 : M.taxCode,
|
|
7282
|
-
(K, U) =>
|
|
7286
|
+
(K, U) => qn(null, null, function* () {
|
|
7283
7287
|
Q = !1, k = K, z(U), i.updateTitle(
|
|
7284
7288
|
a ? g("eInvoiceRenewal") : g("eInvoiceRegister")
|
|
7285
7289
|
);
|
|
@@ -7300,12 +7304,12 @@ function Xa(t, n, e, c, h, a) {
|
|
|
7300
7304
|
});
|
|
7301
7305
|
}
|
|
7302
7306
|
function Ba(t, n, e, c) {
|
|
7303
|
-
return
|
|
7307
|
+
return qn(this, null, function* () {
|
|
7304
7308
|
const { container: h, setContent: a } = ga(), u = e == null ? void 0 : e.orderId, o = (e == null ? void 0 : e.callbackUrl) || `${window.location.origin}/dashboard`, { container: A } = yield Rh({
|
|
7305
7309
|
orderId: u,
|
|
7306
7310
|
callbackUrl: o,
|
|
7307
7311
|
// onCompleteSignature,
|
|
7308
|
-
onCompleteSignature: (...q) =>
|
|
7312
|
+
onCompleteSignature: (...q) => qn(null, null, function* () {
|
|
7309
7313
|
c && (yield c(...q)), T();
|
|
7310
7314
|
})
|
|
7311
7315
|
});
|