@invoice-sdk/widget 1.69.1 → 1.69.3
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.
|
@@ -2,7 +2,7 @@ var HI = Object.defineProperty, kI = Object.defineProperties;
|
|
|
2
2
|
var YI = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Sg = Object.getOwnPropertySymbols;
|
|
4
4
|
var jB = Object.prototype.hasOwnProperty, KB = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var Hg = (A, g) => (g = Symbol[A]) ? g : Symbol.for("Symbol." + A), xI = (A) => {
|
|
6
6
|
throw TypeError(A);
|
|
7
7
|
};
|
|
8
8
|
var bB = (A, g, B) => g in A ? HI(A, g, { enumerable: !0, configurable: !0, writable: !0, value: B }) : A[g] = B, qA = (A, g) => {
|
|
@@ -48,10 +48,10 @@ var U = (A, g, B) => new Promise((C, Q) => {
|
|
|
48
48
|
c(w);
|
|
49
49
|
}
|
|
50
50
|
}, Q = (E) => I[E] = (n) => new Promise((t, c) => C(E, n, t, c)), I = {};
|
|
51
|
-
return B = B.apply(A, g), I[
|
|
51
|
+
return B = B.apply(A, g), I[Hg("asyncIterator")] = () => I, Q("next"), Q("throw"), Q("return"), I;
|
|
52
52
|
}, rC = (A) => {
|
|
53
|
-
var g = A[
|
|
54
|
-
return g == null ? (g = A[
|
|
53
|
+
var g = A[Hg("asyncIterator")], B = !1, C, Q = {};
|
|
54
|
+
return g == null ? (g = A[Hg("iterator")](), C = (I) => Q[I] = (E) => g[I](E)) : (g = g.call(A), C = (I) => Q[I] = (E) => {
|
|
55
55
|
if (B) {
|
|
56
56
|
if (B = !1, I === "throw") throw E;
|
|
57
57
|
return E;
|
|
@@ -63,11 +63,11 @@ var U = (A, g, B) => new Promise((C, Q) => {
|
|
|
63
63
|
t instanceof Object || xI("Object expected"), n(t);
|
|
64
64
|
}), 1)
|
|
65
65
|
};
|
|
66
|
-
}), Q[
|
|
66
|
+
}), Q[Hg("iterator")] = () => Q, C("next"), "throw" in g ? C("throw") : Q.throw = (I) => {
|
|
67
67
|
throw I;
|
|
68
68
|
}, "return" in g && C("return"), Q;
|
|
69
|
-
}, SB = (A, g, B) => (g = A[
|
|
70
|
-
import { t as u, g as AB, a as gB, b as Ig, c as RI, m as GI, d as zI, f as XI, v as OI, r as bQ, u as jQ } from "./index-
|
|
69
|
+
}, SB = (A, g, B) => (g = A[Hg("asyncIterator")]) ? g.call(A) : (A = A[Hg("iterator")](), g = {}, B = (C, Q) => (Q = A[C]) && (g[C] = (I) => new Promise((E, n, t) => (I = Q.call(A, I), t = I.done, Promise.resolve(I.value).then((c) => E({ value: c, done: t }), n)))), B("next"), B("return"), g);
|
|
70
|
+
import { t as u, g as AB, a as gB, b as Ig, c as RI, m as GI, d as zI, f as XI, v as OI, r as bQ, u as jQ } from "./index-BnQCNbqf.js";
|
|
71
71
|
import { g as KQ } from "./_commonjsHelpers-bAxELxBV.js";
|
|
72
72
|
function UB({ steps: A = [], currentStep: g = 1 } = {}) {
|
|
73
73
|
const B = document.createElement("div");
|
|
@@ -1898,7 +1898,7 @@ function hI(A, g, B) {
|
|
|
1898
1898
|
return A && (C || B == !1) ? on(A, g) : g;
|
|
1899
1899
|
}
|
|
1900
1900
|
const BQ = (A) => A instanceof LA ? qA({}, A) : A;
|
|
1901
|
-
function
|
|
1901
|
+
function Pg(A, g) {
|
|
1902
1902
|
g = g || {};
|
|
1903
1903
|
const B = {};
|
|
1904
1904
|
function C(c, h, a, e) {
|
|
@@ -1963,7 +1963,7 @@ function Mg(A, g) {
|
|
|
1963
1963
|
}), B;
|
|
1964
1964
|
}
|
|
1965
1965
|
const cI = (A) => {
|
|
1966
|
-
const g =
|
|
1966
|
+
const g = Pg({}, A);
|
|
1967
1967
|
let { data: B, withXSRFToken: C, xsrfHeaderName: Q, xsrfCookieName: I, headers: E, auth: n } = g;
|
|
1968
1968
|
g.headers = E = LA.from(E), g.url = QI(hI(g.baseURL, g.url, g.allowAbsoluteUrls), A.params, A.paramsSerializer), n && E.set(
|
|
1969
1969
|
"Authorization",
|
|
@@ -2384,7 +2384,7 @@ const _g = {
|
|
|
2384
2384
|
assertOptions: ln,
|
|
2385
2385
|
validators: wC
|
|
2386
2386
|
}, gg = _g.validators;
|
|
2387
|
-
let
|
|
2387
|
+
let Mg = class {
|
|
2388
2388
|
constructor(g) {
|
|
2389
2389
|
this.defaults = g || {}, this.interceptors = {
|
|
2390
2390
|
request: new $B(),
|
|
@@ -2419,7 +2419,7 @@ let fg = class {
|
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
2421
|
_request(g, B) {
|
|
2422
|
-
typeof g == "string" ? (B = B || {}, B.url = g) : B = g || {}, B =
|
|
2422
|
+
typeof g == "string" ? (B = B || {}, B.url = g) : B = g || {}, B = Pg(this.defaults, B);
|
|
2423
2423
|
const { transitional: C, paramsSerializer: Q, headers: I } = B;
|
|
2424
2424
|
C !== void 0 && _g.assertOptions(C, {
|
|
2425
2425
|
silentJSONParsing: gg.transitional(gg.boolean),
|
|
@@ -2481,14 +2481,14 @@ let fg = class {
|
|
|
2481
2481
|
return h;
|
|
2482
2482
|
}
|
|
2483
2483
|
getUri(g) {
|
|
2484
|
-
g =
|
|
2484
|
+
g = Pg(this.defaults, g);
|
|
2485
2485
|
const B = hI(g.baseURL, g.url, g.allowAbsoluteUrls);
|
|
2486
2486
|
return QI(B, g.params, g.paramsSerializer);
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
2489
|
H.forEach(["delete", "get", "head", "options"], function(g) {
|
|
2490
|
-
|
|
2491
|
-
return this.request(
|
|
2490
|
+
Mg.prototype[g] = function(B, C) {
|
|
2491
|
+
return this.request(Pg(C || {}, {
|
|
2492
2492
|
method: g,
|
|
2493
2493
|
url: B,
|
|
2494
2494
|
data: (C || {}).data
|
|
@@ -2498,7 +2498,7 @@ H.forEach(["delete", "get", "head", "options"], function(g) {
|
|
|
2498
2498
|
H.forEach(["post", "put", "patch"], function(g) {
|
|
2499
2499
|
function B(C) {
|
|
2500
2500
|
return function(I, E, n) {
|
|
2501
|
-
return this.request(
|
|
2501
|
+
return this.request(Pg(n || {}, {
|
|
2502
2502
|
method: g,
|
|
2503
2503
|
headers: C ? {
|
|
2504
2504
|
"Content-Type": "multipart/form-data"
|
|
@@ -2508,7 +2508,7 @@ H.forEach(["post", "put", "patch"], function(g) {
|
|
|
2508
2508
|
}));
|
|
2509
2509
|
};
|
|
2510
2510
|
}
|
|
2511
|
-
|
|
2511
|
+
Mg.prototype[g] = B(), Mg.prototype[g + "Form"] = B(!0);
|
|
2512
2512
|
});
|
|
2513
2513
|
let Jn = class iI {
|
|
2514
2514
|
constructor(g) {
|
|
@@ -2660,13 +2660,13 @@ Object.entries(_C).forEach(([A, g]) => {
|
|
|
2660
2660
|
_C[g] = A;
|
|
2661
2661
|
});
|
|
2662
2662
|
function uI(A) {
|
|
2663
|
-
const g = new
|
|
2664
|
-
return H.extend(B,
|
|
2665
|
-
return uI(
|
|
2663
|
+
const g = new Mg(A), B = SQ(Mg.prototype.request, g);
|
|
2664
|
+
return H.extend(B, Mg.prototype, g, { allOwnKeys: !0 }), H.extend(B, g, null, { allOwnKeys: !0 }), B.create = function(Q) {
|
|
2665
|
+
return uI(Pg(A, Q));
|
|
2666
2666
|
}, B;
|
|
2667
2667
|
}
|
|
2668
2668
|
const rA = uI(yg);
|
|
2669
|
-
rA.Axios =
|
|
2669
|
+
rA.Axios = Mg;
|
|
2670
2670
|
rA.CanceledError = xg;
|
|
2671
2671
|
rA.CancelToken = Jn;
|
|
2672
2672
|
rA.isCancel = nI;
|
|
@@ -2679,7 +2679,7 @@ rA.all = function(g) {
|
|
|
2679
2679
|
};
|
|
2680
2680
|
rA.spread = Tn;
|
|
2681
2681
|
rA.isAxiosError = Hn;
|
|
2682
|
-
rA.mergeConfig =
|
|
2682
|
+
rA.mergeConfig = Pg;
|
|
2683
2683
|
rA.AxiosHeaders = LA;
|
|
2684
2684
|
rA.formToJSON = (A) => EI(H.isHTMLForm(A) ? new FormData(A) : A);
|
|
2685
2685
|
rA.getAdapter = oI.getAdapter;
|
|
@@ -3783,7 +3783,7 @@ function Qt(t) {
|
|
|
3783
3783
|
horizontal: !0,
|
|
3784
3784
|
searchable: !0,
|
|
3785
3785
|
onChange: (F) => {
|
|
3786
|
-
F.target.id && I(F.target.id),
|
|
3786
|
+
F.target.id && I(F.target.id), AA();
|
|
3787
3787
|
}
|
|
3788
3788
|
}), Q) {
|
|
3789
3789
|
const F = d.find(
|
|
@@ -3800,7 +3800,7 @@ function Qt(t) {
|
|
|
3800
3800
|
required: !0,
|
|
3801
3801
|
file: (g == null ? void 0 : g.logo) || null,
|
|
3802
3802
|
onFileChange: (F) => {
|
|
3803
|
-
|
|
3803
|
+
AA();
|
|
3804
3804
|
},
|
|
3805
3805
|
error: null
|
|
3806
3806
|
}), m = RA({
|
|
@@ -3837,10 +3837,10 @@ function Qt(t) {
|
|
|
3837
3837
|
return `${EA}/${X}/${DA}`;
|
|
3838
3838
|
},
|
|
3839
3839
|
onSelect: (F) => {
|
|
3840
|
-
f.setError(null),
|
|
3840
|
+
f.setError(null), AA();
|
|
3841
3841
|
},
|
|
3842
3842
|
onClose: () => {
|
|
3843
|
-
f.inputEl.value ? f.setError(null) : f.setError(u("errorRequired")),
|
|
3843
|
+
f.inputEl.value ? f.setError(null) : f.setError(u("errorRequired")), AA();
|
|
3844
3844
|
},
|
|
3845
3845
|
maxDate: /* @__PURE__ */ new Date(),
|
|
3846
3846
|
showMonthDropdown: !0,
|
|
@@ -3943,7 +3943,7 @@ function Qt(t) {
|
|
|
3943
3943
|
required: !0,
|
|
3944
3944
|
file: (g == null ? void 0 : g.license) || null,
|
|
3945
3945
|
onFileChange: (F) => {
|
|
3946
|
-
|
|
3946
|
+
AA();
|
|
3947
3947
|
},
|
|
3948
3948
|
error: null,
|
|
3949
3949
|
accept: "image/png, image/jpeg, image/jpg, .pdf"
|
|
@@ -4054,7 +4054,7 @@ function Qt(t) {
|
|
|
4054
4054
|
O = KI({
|
|
4055
4055
|
initialValue: ((YB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : YB.invoiceSymbol) || "1C25TYY",
|
|
4056
4056
|
onChange: (F) => {
|
|
4057
|
-
N.inputEl.value = F,
|
|
4057
|
+
N.inputEl.value = F, AA();
|
|
4058
4058
|
}
|
|
4059
4059
|
}), G = document.createElement("input"), G.type = "checkbox", G.name = "hasUsedEInvoiceCB", G.className = "wgt:cursor-pointer", G.checked = (xB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : xB.hasUsedEInvoice, G.addEventListener("change", (F) => {
|
|
4060
4060
|
F.target.checked ? (mA.appendChild(QA), mA.appendChild(CA)) : (Y.checked = !1, j.inputEl.value = "", j.setError(null), z && (z.inputEl.value = "", z.setError(null), CA.contains(z.container) && CA.removeChild(z.container)), mA.removeChild(QA), mA.removeChild(CA));
|
|
@@ -4125,8 +4125,8 @@ function Qt(t) {
|
|
|
4125
4125
|
else {
|
|
4126
4126
|
if (e.inputEl.value = EA.ten_cty || "", w.inputEl.value = EA.dia_chi || "", EA.cqthue_ql) {
|
|
4127
4127
|
const DA = (ig) => ig.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), JA = DA(EA.cqthue_ql), Ag = d.find((ig) => {
|
|
4128
|
-
const
|
|
4129
|
-
return
|
|
4128
|
+
const Jg = DA(ig.label);
|
|
4129
|
+
return Jg.includes(JA) || JA.includes(Jg);
|
|
4130
4130
|
});
|
|
4131
4131
|
Ag && (s.setValue && s.setValue(
|
|
4132
4132
|
Ag.value,
|
|
@@ -4148,7 +4148,7 @@ function Qt(t) {
|
|
|
4148
4148
|
u("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
|
|
4149
4149
|
));
|
|
4150
4150
|
} finally {
|
|
4151
|
-
X === y &&
|
|
4151
|
+
X === y && AA();
|
|
4152
4152
|
}
|
|
4153
4153
|
});
|
|
4154
4154
|
}
|
|
@@ -4190,9 +4190,9 @@ function Qt(t) {
|
|
|
4190
4190
|
const ug = JA.slice(0, 2), uC = JA.slice(2, 4), TI = JA.slice(4, 8);
|
|
4191
4191
|
return `${ug}/${uC}/${TI}`;
|
|
4192
4192
|
}
|
|
4193
|
-
const [Ag, ig,
|
|
4194
|
-
if (isNaN(
|
|
4195
|
-
const iC = String(
|
|
4193
|
+
const [Ag, ig, Jg] = JA.split("/"), Tg = new Date(+Jg, +ig - 1, +Ag);
|
|
4194
|
+
if (isNaN(Tg)) return "";
|
|
4195
|
+
const iC = String(Tg.getDate()).padStart(2, "0"), Rg = String(Tg.getMonth() + 1).padStart(2, "0"), Kg = Tg.getFullYear();
|
|
4196
4196
|
return `${iC}/${Rg}/${Kg}`;
|
|
4197
4197
|
}, DA = new Image();
|
|
4198
4198
|
DA.src = URL.createObjectURL(F), DA.onload = () => U(null, null, function* () {
|
|
@@ -4207,10 +4207,10 @@ function Qt(t) {
|
|
|
4207
4207
|
), X();
|
|
4208
4208
|
return;
|
|
4209
4209
|
}
|
|
4210
|
-
const { address:
|
|
4210
|
+
const { address: Jg, date_of_birth: Tg, full_name: iC, id_number: Rg, sex: Kg } = JA;
|
|
4211
4211
|
if (!Rg || !/^\d{12}$/.test(Rg) ? (cg(
|
|
4212
4212
|
u("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
4213
|
-
), r.inputEl.value = "") : (r.inputEl.value = Rg, r.setError(null)), m.inputEl.value = iC || "", f.inputEl.value = EA(
|
|
4213
|
+
), r.inputEl.value = "") : (r.inputEl.value = Rg, r.setError(null)), m.inputEl.value = iC || "", f.inputEl.value = EA(Tg), x.inputEl.value = Jg || "", Kg) {
|
|
4214
4214
|
const ug = hQ.find(
|
|
4215
4215
|
(uC) => uC.label.toLowerCase() === Kg.toLowerCase()
|
|
4216
4216
|
);
|
|
@@ -4220,7 +4220,7 @@ function Qt(t) {
|
|
|
4220
4220
|
} catch (JA) {
|
|
4221
4221
|
console.error("readIdentityCard failed", JA);
|
|
4222
4222
|
} finally {
|
|
4223
|
-
|
|
4223
|
+
AA();
|
|
4224
4224
|
}
|
|
4225
4225
|
});
|
|
4226
4226
|
}
|
|
@@ -4237,11 +4237,11 @@ function Qt(t) {
|
|
|
4237
4237
|
onFrontChange: (F) => U(null, null, function* () {
|
|
4238
4238
|
var EA, DA;
|
|
4239
4239
|
if (o = F, tg() || hg() || !wg()) {
|
|
4240
|
-
zA = !1, fA = !1, NA(),
|
|
4240
|
+
zA = !1, fA = !1, NA(), AA();
|
|
4241
4241
|
return;
|
|
4242
4242
|
}
|
|
4243
4243
|
if ((DA = (EA = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : EA.legalRepresentative) == null ? void 0 : DA.idCard) {
|
|
4244
|
-
|
|
4244
|
+
AA();
|
|
4245
4245
|
return;
|
|
4246
4246
|
}
|
|
4247
4247
|
vA(F);
|
|
@@ -4249,11 +4249,11 @@ function Qt(t) {
|
|
|
4249
4249
|
onBackChange: (F) => U(null, null, function* () {
|
|
4250
4250
|
var EA, DA;
|
|
4251
4251
|
if (i = F, tg() || hg() || !VA()) {
|
|
4252
|
-
zA = !1, fA = !1, NA(),
|
|
4252
|
+
zA = !1, fA = !1, NA(), AA();
|
|
4253
4253
|
return;
|
|
4254
4254
|
}
|
|
4255
4255
|
if ((DA = (EA = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : EA.legalRepresentative) == null ? void 0 : DA.idCardBack) {
|
|
4256
|
-
|
|
4256
|
+
AA();
|
|
4257
4257
|
return;
|
|
4258
4258
|
}
|
|
4259
4259
|
vA(VA());
|
|
@@ -4282,8 +4282,8 @@ function Qt(t) {
|
|
|
4282
4282
|
YA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", YA.appendChild(D.container), YA.appendChild(M.container), YA.appendChild(k.container), YA.appendChild(J.container), SA.appendChild(YA), h.appendChild(SA);
|
|
4283
4283
|
const ag = document.createElement("div");
|
|
4284
4284
|
ag.className = "wgt:space-y-4";
|
|
4285
|
-
const
|
|
4286
|
-
|
|
4285
|
+
const lg = document.createElement("h3");
|
|
4286
|
+
lg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", lg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ag.appendChild(lg), h.appendChild(ag);
|
|
4287
4287
|
const _A = document.createElement("div");
|
|
4288
4288
|
_A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container), ag.appendChild(_A);
|
|
4289
4289
|
const mA = document.createElement("div");
|
|
@@ -4307,8 +4307,8 @@ function Qt(t) {
|
|
|
4307
4307
|
const $ = document.createElement("div");
|
|
4308
4308
|
$.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
4309
4309
|
let cA = !0;
|
|
4310
|
-
const
|
|
4311
|
-
|
|
4310
|
+
const gA = document.createElement("div");
|
|
4311
|
+
gA.className = [
|
|
4312
4312
|
"wgt:w-4",
|
|
4313
4313
|
"wgt:h-4",
|
|
4314
4314
|
"wgt:mt-1",
|
|
@@ -4328,7 +4328,7 @@ function Qt(t) {
|
|
|
4328
4328
|
Z.setAttribute("fill-rule", "evenodd"), Z.setAttribute("clip-rule", "evenodd"), Z.setAttribute(
|
|
4329
4329
|
"d",
|
|
4330
4330
|
"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"
|
|
4331
|
-
), Z.setAttribute("fill", "white"), eA.appendChild(Z),
|
|
4331
|
+
), Z.setAttribute("fill", "white"), eA.appendChild(Z), gA.appendChild(eA);
|
|
4332
4332
|
const xA = document.createElement("label");
|
|
4333
4333
|
xA.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", xA.appendChild(
|
|
4334
4334
|
document.createTextNode(u("agreeWith", "Tôi đồng ý với ") + " ")
|
|
@@ -4341,8 +4341,8 @@ function Qt(t) {
|
|
|
4341
4341
|
}, jg = yI(B);
|
|
4342
4342
|
xA.appendChild(
|
|
4343
4343
|
bg(u("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
|
|
4344
|
-
), xA.appendChild(document.createTextNode(` ${u("of", "của")} ${jg}.`)), $.appendChild(
|
|
4345
|
-
cA = !cA, cA ? (
|
|
4344
|
+
), xA.appendChild(document.createTextNode(` ${u("of", "của")} ${jg}.`)), $.appendChild(gA), $.appendChild(xA), h.appendChild($), gA.addEventListener("click", () => {
|
|
4345
|
+
cA = !cA, cA ? (gA.classList.add("wgt:bg-primary"), eA.classList.remove("wgt:hidden")) : (gA.classList.remove("wgt:bg-primary"), eA.classList.add("wgt:hidden")), AA();
|
|
4346
4346
|
});
|
|
4347
4347
|
const R = document.createElement("div");
|
|
4348
4348
|
R.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", P.type = "submit", P.innerText = u("next"), P.className = [
|
|
@@ -4365,7 +4365,7 @@ function Qt(t) {
|
|
|
4365
4365
|
const DA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
|
|
4366
4366
|
return !(!DA.test(X.contactPerson.phone) || !DA.test(X.legalRepresentative.phone) || !/^\d{12}$/.test(X.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(X.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(X.invoiceSymbol) || !F.license || !F.logo || !F.idCard || !F.idCardBack);
|
|
4367
4367
|
}
|
|
4368
|
-
function
|
|
4368
|
+
function AA() {
|
|
4369
4369
|
P.disabled = !BA() || !cA || tg() || hg() || S.getError() || K.getError();
|
|
4370
4370
|
}
|
|
4371
4371
|
function lA() {
|
|
@@ -4422,18 +4422,18 @@ function Qt(t) {
|
|
|
4422
4422
|
j,
|
|
4423
4423
|
z
|
|
4424
4424
|
].forEach((F) => {
|
|
4425
|
-
F.inputEl.addEventListener("input",
|
|
4425
|
+
F.inputEl.addEventListener("input", AA);
|
|
4426
4426
|
}), [l, s].forEach((F) => {
|
|
4427
|
-
F.selectEl.addEventListener("change",
|
|
4427
|
+
F.selectEl.addEventListener("change", AA);
|
|
4428
4428
|
}), [G, Y].forEach((F) => {
|
|
4429
|
-
F.addEventListener("change",
|
|
4429
|
+
F.addEventListener("change", AA);
|
|
4430
4430
|
}), P.addEventListener("click", (F) => {
|
|
4431
4431
|
if (F.preventDefault(), !BA()) return;
|
|
4432
4432
|
const X = lA();
|
|
4433
4433
|
typeof A == "function" && A(X);
|
|
4434
4434
|
});
|
|
4435
4435
|
const uA = (((OB = (XB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : XB.organization) == null ? void 0 : OB.taxCode) || "").trim();
|
|
4436
|
-
return uA.length >= 10 && IA(uA), rI(gB()), g != null && g.idCard && (o = g == null ? void 0 : g.idCard), (FB = g == null ? void 0 : g.eInvoiceRegistration) != null && FB.hasUsedEInvoice && (mA.appendChild(QA), mA.appendChild(CA), (LB = g == null ? void 0 : g.eInvoiceRegistration) != null && LB.isUsedEInvoiceBefore ? (Y.checked = !0, CA.appendChild(z.container), z.inputEl.value = (NB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : NB.previousEInvoiceProvider) : z.inputEl.value = "", j.inputEl.value = (yB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : yB.taxAuthorityCode),
|
|
4436
|
+
return uA.length >= 10 && IA(uA), rI(gB()), g != null && g.idCard && (o = g == null ? void 0 : g.idCard), (FB = g == null ? void 0 : g.eInvoiceRegistration) != null && FB.hasUsedEInvoice && (mA.appendChild(QA), mA.appendChild(CA), (LB = g == null ? void 0 : g.eInvoiceRegistration) != null && LB.isUsedEInvoiceBefore ? (Y.checked = !0, CA.appendChild(z.container), z.inputEl.value = (NB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : NB.previousEInvoiceProvider) : z.inputEl.value = "", j.inputEl.value = (yB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : yB.taxAuthorityCode), AA(), {
|
|
4437
4437
|
container: c,
|
|
4438
4438
|
getValues: lA
|
|
4439
4439
|
};
|
|
@@ -4597,7 +4597,7 @@ function wQ({
|
|
|
4597
4597
|
}
|
|
4598
4598
|
};
|
|
4599
4599
|
}
|
|
4600
|
-
const tt = "1.69.
|
|
4600
|
+
const tt = "1.69.3";
|
|
4601
4601
|
function ht(B) {
|
|
4602
4602
|
return U(this, arguments, function* ({ search: A, bank: g }) {
|
|
4603
4603
|
return (yield pA.get(`${IC}`, {
|
|
@@ -4770,7 +4770,7 @@ function ut({
|
|
|
4770
4770
|
g(A.code, a);
|
|
4771
4771
|
},
|
|
4772
4772
|
isIconCheckbox: !0,
|
|
4773
|
-
disabled: B
|
|
4773
|
+
disabled: B || A.isSelected
|
|
4774
4774
|
});
|
|
4775
4775
|
c.className = "wgt:absolute wgt:top-0 wgt:right-0", E.appendChild(c), I.appendChild(E);
|
|
4776
4776
|
const h = document.createElement("p");
|
|
@@ -5005,7 +5005,7 @@ function ft(k) {
|
|
|
5005
5005
|
</div>
|
|
5006
5006
|
`, P.appendChild(XA);
|
|
5007
5007
|
const { container: OA } = rt(), { container: zA, tbody: fA } = mt(), dA = document.createElement("div");
|
|
5008
|
-
dA.className = "wgt:hidden wgt:max-sm:flex wgt:items-center wgt:justify-between wgt:w-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:px-6 wgt:py-5 wgt:
|
|
5008
|
+
dA.className = "wgt:hidden wgt:max-sm:flex wgt:items-center wgt:justify-between wgt:w-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:px-6 wgt:py-5 wgt:shadow-lg";
|
|
5009
5009
|
const NA = document.createElement("span");
|
|
5010
5010
|
NA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", NA.innerText = u("total"), dA.appendChild(NA);
|
|
5011
5011
|
const vA = document.createElement("span");
|
|
@@ -5021,7 +5021,7 @@ function ft(k) {
|
|
|
5021
5021
|
ZA.appendChild(tg);
|
|
5022
5022
|
const hg = (b, nA, QA, W) => U(null, null, function* () {
|
|
5023
5023
|
o();
|
|
5024
|
-
const
|
|
5024
|
+
const gA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = gA, $ = sC(gA, ["isUsedEInvoiceBefore"]);
|
|
5025
5025
|
let cA = [
|
|
5026
5026
|
{
|
|
5027
5027
|
code: nA.code,
|
|
@@ -5094,7 +5094,7 @@ function ft(k) {
|
|
|
5094
5094
|
const [
|
|
5095
5095
|
$,
|
|
5096
5096
|
cA,
|
|
5097
|
-
|
|
5097
|
+
gA,
|
|
5098
5098
|
hA,
|
|
5099
5099
|
eA
|
|
5100
5100
|
] = yield Promise.allSettled([
|
|
@@ -5112,9 +5112,9 @@ function ft(k) {
|
|
|
5112
5112
|
$.reason
|
|
5113
5113
|
), Dg.error(
|
|
5114
5114
|
u("errorCheckingCustomer") || "Failed to check customer status"
|
|
5115
|
-
), x = !1),
|
|
5115
|
+
), x = !1), gA.status === "fulfilled" ? r = gA.value || [] : (console.error(
|
|
5116
5116
|
"Failed to load init packages:",
|
|
5117
|
-
|
|
5117
|
+
gA.reason
|
|
5118
5118
|
), Dg.error(
|
|
5119
5119
|
u("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
5120
5120
|
), r = []), cA.status === "fulfilled" ? (((W = cA == null ? void 0 : cA.value) == null ? void 0 : W.length) > 0 && cA.value.forEach((Z) => {
|
|
@@ -5135,7 +5135,7 @@ function ft(k) {
|
|
|
5135
5135
|
});
|
|
5136
5136
|
}), Object.keys(q).length > 0 && (l = e || Object.keys(q).filter(
|
|
5137
5137
|
(Z) => q[Z].bank === h && q[Z].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && q[Z].limit > q[Z].used
|
|
5138
|
-
),
|
|
5138
|
+
), lg())) : console.error("Failed to load promotions:", cA.reason), hA.status === "fulfilled") {
|
|
5139
5139
|
if (N(hA.value || []), hA.value.length > 0) {
|
|
5140
5140
|
const Z = hA.value.find(
|
|
5141
5141
|
(xA) => T.includes(xA.code)
|
|
@@ -5175,23 +5175,23 @@ function ft(k) {
|
|
|
5175
5175
|
});
|
|
5176
5176
|
}
|
|
5177
5177
|
function wg() {
|
|
5178
|
-
KA(), eg(), og(), _A(),
|
|
5178
|
+
KA(), eg(), og(), _A(), mA();
|
|
5179
5179
|
}
|
|
5180
5180
|
function bA(b, nA, QA) {
|
|
5181
5181
|
const W = Object.values(q).find(
|
|
5182
|
-
(
|
|
5182
|
+
(gA) => gA.bank === h && gA.appliedPackages.includes(b)
|
|
5183
5183
|
), CA = W && !W.isDisabled && !(W.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && W.limit !== W.used, $ = Object.values(q).find(
|
|
5184
|
-
(
|
|
5184
|
+
(gA) => gA.bank === h && gA.appliedPackages.includes(nA)
|
|
5185
5185
|
), cA = $ && !$.isDisabled && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used;
|
|
5186
5186
|
if (CA && !cA) {
|
|
5187
|
-
const { container:
|
|
5187
|
+
const { container: gA, open: hA } = eC({
|
|
5188
5188
|
message: u("errorDiscountPackage"),
|
|
5189
5189
|
okLabel: u("ok"),
|
|
5190
5190
|
cancelLabel: u("cancel"),
|
|
5191
5191
|
onClose: QA,
|
|
5192
5192
|
isSuccess: !1
|
|
5193
5193
|
});
|
|
5194
|
-
S.appendChild(
|
|
5194
|
+
S.appendChild(gA), hA();
|
|
5195
5195
|
} else
|
|
5196
5196
|
QA();
|
|
5197
5197
|
}
|
|
@@ -5286,14 +5286,14 @@ function ft(k) {
|
|
|
5286
5286
|
W.isDisabled = !CA, !CA && l.includes(W.code) ? l = l.filter(
|
|
5287
5287
|
($) => $ !== W.code
|
|
5288
5288
|
) : CA && !l.includes(W.code) && l.push(W.code);
|
|
5289
|
-
}),
|
|
5289
|
+
}), lg();
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function lg() {
|
|
5292
5292
|
T = Object.values(q).filter((b) => b.bank === h).map((b) => b.appliedPackages[0]);
|
|
5293
5293
|
}
|
|
5294
5294
|
function _A() {
|
|
5295
5295
|
if (Object.values(q).filter(
|
|
5296
|
-
(
|
|
5296
|
+
(gA) => gA.bank === h
|
|
5297
5297
|
).length === 0) {
|
|
5298
5298
|
P.contains(YA) && P.removeChild(YA);
|
|
5299
5299
|
return;
|
|
@@ -5339,29 +5339,29 @@ function ft(k) {
|
|
|
5339
5339
|
const $ = document.createElement("div");
|
|
5340
5340
|
$.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:max-lg:flex wgt:max-lg:flex-col", YA.appendChild($);
|
|
5341
5341
|
const cA = Object.values(q).filter(
|
|
5342
|
-
(
|
|
5342
|
+
(gA) => gA.bank === h
|
|
5343
5343
|
);
|
|
5344
5344
|
if (cA.length > 0)
|
|
5345
|
-
cA.forEach((
|
|
5345
|
+
cA.forEach((gA) => {
|
|
5346
5346
|
const { container: hA } = ut({
|
|
5347
|
-
promotion: yA(qA({},
|
|
5348
|
-
isSelected: l.includes(
|
|
5347
|
+
promotion: yA(qA({}, gA), {
|
|
5348
|
+
isSelected: l.includes(gA.code)
|
|
5349
5349
|
}),
|
|
5350
5350
|
onSelect: (eA, Z) => {
|
|
5351
5351
|
Z && l.push(eA), _A(), mA();
|
|
5352
5352
|
},
|
|
5353
|
-
isDisabled:
|
|
5353
|
+
isDisabled: gA.isDisabled || gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString() || gA.limit === gA.used
|
|
5354
5354
|
});
|
|
5355
5355
|
$.appendChild(hA);
|
|
5356
5356
|
});
|
|
5357
5357
|
else {
|
|
5358
|
-
const
|
|
5359
|
-
|
|
5358
|
+
const gA = document.createElement("span");
|
|
5359
|
+
gA.className = "wgt:text-text-sub-600", gA.innerText = u("noPromotionFound"), YA.appendChild(gA);
|
|
5360
5360
|
}
|
|
5361
5361
|
}
|
|
5362
5362
|
function mA() {
|
|
5363
5363
|
var eA, Z, xA, bg, jg;
|
|
5364
|
-
if (fA.innerHTML = "", y().length === 0 && v.length === 0) {
|
|
5364
|
+
if (fA.innerHTML = "", P.appendChild(zA), P.appendChild(dA), P.appendChild(OA), y().length === 0 && v.length === 0) {
|
|
5365
5365
|
const R = document.createElement("tr");
|
|
5366
5366
|
R.innerHTML = `
|
|
5367
5367
|
<td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:max-sm:col-span-5">
|
|
@@ -5378,8 +5378,8 @@ function ft(k) {
|
|
|
5378
5378
|
R.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5379
5379
|
const BA = document.createElement("td");
|
|
5380
5380
|
BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = Ig() === "vi" ? r[0].name : r[0].nameEn, R.appendChild(BA);
|
|
5381
|
-
const
|
|
5382
|
-
|
|
5381
|
+
const AA = document.createElement("td");
|
|
5382
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", AA.innerText = u("package"), R.appendChild(AA);
|
|
5383
5383
|
const lA = document.createElement("td");
|
|
5384
5384
|
lA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2";
|
|
5385
5385
|
const uA = document.createElement("div");
|
|
@@ -5402,11 +5402,15 @@ function ft(k) {
|
|
|
5402
5402
|
HA.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", HA.innerHTML = `
|
|
5403
5403
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
5404
5404
|
<span>${u("unitPrice")}:</span>
|
|
5405
|
-
<span class="wgt:font-medium">${kA(
|
|
5405
|
+
<span class="wgt:font-medium">${kA(
|
|
5406
|
+
(xA = r[0]) == null ? void 0 : xA.price
|
|
5407
|
+
)} VND</span>
|
|
5406
5408
|
</div>
|
|
5407
5409
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
5408
5410
|
<span>${u("total")}:</span>
|
|
5409
|
-
<span class="wgt:text-primary">${kA(
|
|
5411
|
+
<span class="wgt:text-primary">${kA(
|
|
5412
|
+
((bg = r[0]) == null ? void 0 : bg.price) * G
|
|
5413
|
+
)} VND</span>
|
|
5410
5414
|
</div>
|
|
5411
5415
|
`, BA.appendChild(HA), fA.appendChild(R);
|
|
5412
5416
|
}
|
|
@@ -5415,8 +5419,8 @@ function ft(k) {
|
|
|
5415
5419
|
if (R) {
|
|
5416
5420
|
const BA = document.createElement("tr");
|
|
5417
5421
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5418
|
-
const
|
|
5419
|
-
|
|
5422
|
+
const AA = document.createElement("td");
|
|
5423
|
+
AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Ig() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
|
|
5420
5424
|
const lA = document.createElement("td");
|
|
5421
5425
|
lA.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-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
|
|
5422
5426
|
const uA = document.createElement("td");
|
|
@@ -5441,13 +5445,17 @@ function ft(k) {
|
|
|
5441
5445
|
$A.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", $A.innerHTML = `
|
|
5442
5446
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
5443
5447
|
<span>${u("unitPrice")}:</span>
|
|
5444
|
-
<span class="wgt:font-medium">${kA(
|
|
5448
|
+
<span class="wgt:font-medium">${kA(
|
|
5449
|
+
(R == null ? void 0 : R.price) * (R == null ? void 0 : R.limit)
|
|
5450
|
+
)} VND</span>
|
|
5445
5451
|
</div>
|
|
5446
5452
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
5447
5453
|
<span>${u("total")}:</span>
|
|
5448
|
-
<span class="wgt:text-primary">${kA(
|
|
5454
|
+
<span class="wgt:text-primary">${kA(
|
|
5455
|
+
(R == null ? void 0 : R.price) * (R == null ? void 0 : R.limit) * Y
|
|
5456
|
+
)} VND</span>
|
|
5449
5457
|
</div>
|
|
5450
|
-
`,
|
|
5458
|
+
`, AA.appendChild($A), fA.appendChild(BA);
|
|
5451
5459
|
}
|
|
5452
5460
|
}
|
|
5453
5461
|
{
|
|
@@ -5455,8 +5463,8 @@ function ft(k) {
|
|
|
5455
5463
|
if (R) {
|
|
5456
5464
|
const BA = document.createElement("tr");
|
|
5457
5465
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5458
|
-
const
|
|
5459
|
-
|
|
5466
|
+
const AA = document.createElement("td");
|
|
5467
|
+
AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Ig() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
|
|
5460
5468
|
const lA = document.createElement("td");
|
|
5461
5469
|
lA.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-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
|
|
5462
5470
|
const uA = document.createElement("td");
|
|
@@ -5481,13 +5489,17 @@ function ft(k) {
|
|
|
5481
5489
|
$A.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", $A.innerHTML = `
|
|
5482
5490
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
5483
5491
|
<span>${u("unitPrice")}:</span>
|
|
5484
|
-
<span class="wgt:font-medium">${kA(
|
|
5492
|
+
<span class="wgt:font-medium">${kA(
|
|
5493
|
+
(R == null ? void 0 : R.limit) * (R == null ? void 0 : R.price)
|
|
5494
|
+
)} VND</span>
|
|
5485
5495
|
</div>
|
|
5486
5496
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
5487
5497
|
<span>${u("total")}:</span>
|
|
5488
|
-
<span class="wgt:text-primary">${kA(
|
|
5498
|
+
<span class="wgt:text-primary">${kA(
|
|
5499
|
+
(R == null ? void 0 : R.limit) * (R == null ? void 0 : R.price) * z
|
|
5500
|
+
)} VND</span>
|
|
5489
5501
|
</div>
|
|
5490
|
-
`,
|
|
5502
|
+
`, AA.appendChild($A), fA.appendChild(BA);
|
|
5491
5503
|
}
|
|
5492
5504
|
}
|
|
5493
5505
|
const nA = l.map(
|
|
@@ -5500,31 +5512,31 @@ function ft(k) {
|
|
|
5500
5512
|
var aA, iA, MA, sA, TA, HA;
|
|
5501
5513
|
const BA = document.createElement("tr");
|
|
5502
5514
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-3 wgt:max-sm:p-3 wgt:max-sm:bg-weak-50 wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200";
|
|
5503
|
-
const
|
|
5504
|
-
|
|
5505
|
-
<div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-
|
|
5515
|
+
const AA = document.createElement("td");
|
|
5516
|
+
AA.colSpan = 3, AA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:max-sm:col-span-5 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-1", AA.innerHTML = `
|
|
5517
|
+
<div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-start">
|
|
5506
5518
|
<img src="${qt}" alt="ticket" class="wgt:w-4 wgt:max-sm:w-5">
|
|
5507
5519
|
<span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${Ig() === "vi" ? R == null ? void 0 : R.name : (R == null ? void 0 : R.nameEn) || (R == null ? void 0 : R.code)}</span>
|
|
5508
5520
|
</div>
|
|
5509
|
-
`, BA.appendChild(
|
|
5521
|
+
`, BA.appendChild(AA);
|
|
5510
5522
|
const lA = document.createElement("td");
|
|
5511
5523
|
lA.className = "wgt:max-sm:hidden", BA.appendChild(lA);
|
|
5512
5524
|
const uA = document.createElement("td");
|
|
5513
|
-
uA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold", R.type === "discount" ? (uA.innerText = `-${kA(
|
|
5525
|
+
uA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold wgt:max-sm:text-base wgt:max-sm:font-bold wgt:max-sm:p-0", R.type === "discount" ? (uA.innerText = `-${kA(
|
|
5514
5526
|
(aA = R == null ? void 0 : R.reward) == null ? void 0 : aA.discountAmount
|
|
5515
5527
|
)} VND`, uA.style.color = "#F04438", QA += (iA = R == null ? void 0 : R.reward) == null ? void 0 : iA.discountAmount) : (R == null ? void 0 : R.type) === "free_item" ? (uA.innerText = `+${(sA = (MA = R == null ? void 0 : R.reward) == null ? void 0 : MA.packageCodes) == null ? void 0 : sA.length} ${u(
|
|
5516
5528
|
"package"
|
|
5517
5529
|
)} ${(HA = (TA = R == null ? void 0 : R.reward) == null ? void 0 : TA.packageCodes) == null ? void 0 : HA.join(", ")}`, uA.style.color = "#12B76A") : uA.innerText = "", BA.appendChild(uA), fA.appendChild(BA);
|
|
5518
5530
|
});
|
|
5519
|
-
const W = x && r.length > 0 && !(b != null && b.withoutInitialFee) ? ((jg = r[0]) == null ? void 0 : jg.price) * G : 0, CA = p(m), $ = CA ? CA.price * CA.limit * Y : 0, cA = j(f),
|
|
5531
|
+
const W = x && r.length > 0 && !(b != null && b.withoutInitialFee) ? ((jg = r[0]) == null ? void 0 : jg.price) * G : 0, CA = p(m), $ = CA ? CA.price * CA.limit * Y : 0, cA = j(f), gA = cA ? cA.price * cA.limit * z : 0, hA = W + $ + gA - QA;
|
|
5520
5532
|
c(hA);
|
|
5521
5533
|
{
|
|
5522
5534
|
const R = document.createElement("tr");
|
|
5523
5535
|
R.className = "wgt:max-sm:hidden";
|
|
5524
5536
|
const BA = document.createElement("td");
|
|
5525
5537
|
BA.colSpan = 4, BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", BA.innerText = u("total"), R.appendChild(BA);
|
|
5526
|
-
const
|
|
5527
|
-
|
|
5538
|
+
const AA = document.createElement("td");
|
|
5539
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", AA.innerText = kA(hA) + " VND", R.appendChild(AA), fA.appendChild(R);
|
|
5528
5540
|
}
|
|
5529
5541
|
vA.innerText = kA(hA) + " VND";
|
|
5530
5542
|
}
|
|
@@ -5657,14 +5669,14 @@ function dt(A) {
|
|
|
5657
5669
|
)).data;
|
|
5658
5670
|
});
|
|
5659
5671
|
}
|
|
5660
|
-
var
|
|
5672
|
+
var kg = {}, PC, eQ;
|
|
5661
5673
|
function vt() {
|
|
5662
5674
|
return eQ || (eQ = 1, PC = function() {
|
|
5663
5675
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
5664
5676
|
}), PC;
|
|
5665
5677
|
}
|
|
5666
5678
|
var dC = {}, Bg = {}, oQ;
|
|
5667
|
-
function
|
|
5679
|
+
function dg() {
|
|
5668
5680
|
if (oQ) return Bg;
|
|
5669
5681
|
oQ = 1;
|
|
5670
5682
|
let A;
|
|
@@ -5818,7 +5830,7 @@ function Jt() {
|
|
|
5818
5830
|
var TC = {}, sQ;
|
|
5819
5831
|
function Tt() {
|
|
5820
5832
|
return sQ || (sQ = 1, function(A) {
|
|
5821
|
-
const g =
|
|
5833
|
+
const g = dg().getSymbolSize;
|
|
5822
5834
|
A.getRowColCoords = function(C) {
|
|
5823
5835
|
if (C === 1) return [];
|
|
5824
5836
|
const Q = Math.floor(C / 7) + 2, I = g(C), E = I === 145 ? 26 : Math.ceil((I - 13) / (2 * Q - 2)) * 2, n = [I - 7];
|
|
@@ -5840,7 +5852,7 @@ var HC = {}, DQ;
|
|
|
5840
5852
|
function Ht() {
|
|
5841
5853
|
if (DQ) return HC;
|
|
5842
5854
|
DQ = 1;
|
|
5843
|
-
const A =
|
|
5855
|
+
const A = dg().getSymbolSize, g = 7;
|
|
5844
5856
|
return HC.getPositions = function(C) {
|
|
5845
5857
|
const Q = A(C);
|
|
5846
5858
|
return [
|
|
@@ -6406,7 +6418,7 @@ function PI() {
|
|
|
6406
6418
|
}, Cg;
|
|
6407
6419
|
}
|
|
6408
6420
|
var vQ;
|
|
6409
|
-
function
|
|
6421
|
+
function vg() {
|
|
6410
6422
|
return vQ || (vQ = 1, function(A) {
|
|
6411
6423
|
const g = MI(), B = PI();
|
|
6412
6424
|
A.NUMERIC = {
|
|
@@ -6470,7 +6482,7 @@ function dg() {
|
|
|
6470
6482
|
var lQ;
|
|
6471
6483
|
function Gt() {
|
|
6472
6484
|
return lQ || (lQ = 1, function(A) {
|
|
6473
|
-
const g =
|
|
6485
|
+
const g = dg(), B = fI(), C = nB(), Q = vg(), I = MI(), E = 7973, n = g.getBCHDigit(E);
|
|
6474
6486
|
function t(e, w, s) {
|
|
6475
6487
|
for (let D = 1; D <= 40; D++)
|
|
6476
6488
|
if (w <= A.getCapacity(D, s, e))
|
|
@@ -6537,7 +6549,7 @@ var XC = {}, JQ;
|
|
|
6537
6549
|
function zt() {
|
|
6538
6550
|
if (JQ) return XC;
|
|
6539
6551
|
JQ = 1;
|
|
6540
|
-
const A =
|
|
6552
|
+
const A = dg(), g = 1335, B = 21522, C = A.getBCHDigit(g);
|
|
6541
6553
|
return XC.getEncodedBits = function(I, E) {
|
|
6542
6554
|
const n = I.bit << 3 | E;
|
|
6543
6555
|
let t = n << 10;
|
|
@@ -6550,7 +6562,7 @@ var OC = {}, FC, TQ;
|
|
|
6550
6562
|
function Xt() {
|
|
6551
6563
|
if (TQ) return FC;
|
|
6552
6564
|
TQ = 1;
|
|
6553
|
-
const A =
|
|
6565
|
+
const A = vg();
|
|
6554
6566
|
function g(B) {
|
|
6555
6567
|
this.mode = A.NUMERIC, this.data = B.toString();
|
|
6556
6568
|
}
|
|
@@ -6572,7 +6584,7 @@ var LC, HQ;
|
|
|
6572
6584
|
function Ot() {
|
|
6573
6585
|
if (HQ) return LC;
|
|
6574
6586
|
HQ = 1;
|
|
6575
|
-
const A =
|
|
6587
|
+
const A = vg(), g = [
|
|
6576
6588
|
"0",
|
|
6577
6589
|
"1",
|
|
6578
6590
|
"2",
|
|
@@ -6641,7 +6653,7 @@ var NC, kQ;
|
|
|
6641
6653
|
function Ft() {
|
|
6642
6654
|
if (kQ) return NC;
|
|
6643
6655
|
kQ = 1;
|
|
6644
|
-
const A =
|
|
6656
|
+
const A = vg();
|
|
6645
6657
|
function g(B) {
|
|
6646
6658
|
this.mode = A.BYTE, typeof B == "string" ? this.data = new TextEncoder().encode(B) : this.data = new Uint8Array(B);
|
|
6647
6659
|
}
|
|
@@ -6660,7 +6672,7 @@ var yC, YQ;
|
|
|
6660
6672
|
function Lt() {
|
|
6661
6673
|
if (YQ) return yC;
|
|
6662
6674
|
YQ = 1;
|
|
6663
|
-
const A =
|
|
6675
|
+
const A = vg(), g = dg();
|
|
6664
6676
|
function B(C) {
|
|
6665
6677
|
this.mode = A.KANJI, this.data = C;
|
|
6666
6678
|
}
|
|
@@ -6758,7 +6770,7 @@ function Nt() {
|
|
|
6758
6770
|
var RQ;
|
|
6759
6771
|
function yt() {
|
|
6760
6772
|
return RQ || (RQ = 1, function(A) {
|
|
6761
|
-
const g =
|
|
6773
|
+
const g = vg(), B = Xt(), C = Ot(), Q = Ft(), I = Lt(), E = PI(), n = dg(), t = Nt();
|
|
6762
6774
|
function c(k) {
|
|
6763
6775
|
return unescape(encodeURIComponent(k)).length;
|
|
6764
6776
|
}
|
|
@@ -6893,7 +6905,7 @@ var GQ;
|
|
|
6893
6905
|
function bt() {
|
|
6894
6906
|
if (GQ) return dC;
|
|
6895
6907
|
GQ = 1;
|
|
6896
|
-
const A =
|
|
6908
|
+
const A = dg(), g = nB(), B = lt(), C = Jt(), Q = Tt(), I = Ht(), E = kt(), n = fI(), t = Rt(), c = Gt(), h = zt(), a = vg(), e = yt();
|
|
6897
6909
|
function w(v, r) {
|
|
6898
6910
|
const q = v.size, T = I.getPositions(r);
|
|
6899
6911
|
for (let x = 0; x < T.length; x++) {
|
|
@@ -7136,7 +7148,7 @@ function Kt() {
|
|
|
7136
7148
|
}
|
|
7137
7149
|
var FQ;
|
|
7138
7150
|
function St() {
|
|
7139
|
-
if (FQ) return
|
|
7151
|
+
if (FQ) return kg;
|
|
7140
7152
|
FQ = 1;
|
|
7141
7153
|
const A = vt(), g = bt(), B = jt(), C = Kt();
|
|
7142
7154
|
function Q(I, E, n, t, c) {
|
|
@@ -7166,9 +7178,9 @@ function St() {
|
|
|
7166
7178
|
c(w);
|
|
7167
7179
|
}
|
|
7168
7180
|
}
|
|
7169
|
-
return
|
|
7181
|
+
return kg.create = g.create, kg.toCanvas = Q.bind(null, B.render), kg.toDataURL = Q.bind(null, B.renderToDataURL), kg.toString = Q.bind(null, function(I, E, n) {
|
|
7170
7182
|
return C.render(I, n);
|
|
7171
|
-
}),
|
|
7183
|
+
}), kg;
|
|
7172
7184
|
}
|
|
7173
7185
|
var Ut = St();
|
|
7174
7186
|
const pt = /* @__PURE__ */ KQ(Ut);
|
|
@@ -7212,7 +7224,7 @@ function Zt({
|
|
|
7212
7224
|
k();
|
|
7213
7225
|
const J = () => {
|
|
7214
7226
|
w = setInterval(() => {
|
|
7215
|
-
e--, k(), e <= 0 &&
|
|
7227
|
+
e--, k(), e <= 0 && fg(w);
|
|
7216
7228
|
}, 1e3), lI(w);
|
|
7217
7229
|
};
|
|
7218
7230
|
J(), s.appendChild(D);
|
|
@@ -7282,12 +7294,12 @@ function Zt({
|
|
|
7282
7294
|
title: u("cancelTransaction"),
|
|
7283
7295
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
7284
7296
|
handleClick: () => {
|
|
7285
|
-
w &&
|
|
7297
|
+
w && fg(w);
|
|
7286
7298
|
const { container: d, open: L } = eC({
|
|
7287
7299
|
message: u("transactionCanceled"),
|
|
7288
7300
|
okLabel: u("ok"),
|
|
7289
7301
|
onClose: () => {
|
|
7290
|
-
e = 3600,
|
|
7302
|
+
e = 3600, fg(w), typeof h == "function" && h();
|
|
7291
7303
|
},
|
|
7292
7304
|
preventClose: !0
|
|
7293
7305
|
});
|
|
@@ -7295,7 +7307,7 @@ function Zt({
|
|
|
7295
7307
|
}
|
|
7296
7308
|
});
|
|
7297
7309
|
return f.appendChild(P), a.appendChild(f), window.addEventListener("beforeunload", () => {
|
|
7298
|
-
w &&
|
|
7310
|
+
w && fg(w);
|
|
7299
7311
|
}), {
|
|
7300
7312
|
container: a,
|
|
7301
7313
|
setSelectedProvider(d) {
|
|
@@ -7473,13 +7485,15 @@ function Wt(n) {
|
|
|
7473
7485
|
j = !navigator.onLine;
|
|
7474
7486
|
}
|
|
7475
7487
|
function K() {
|
|
7476
|
-
h &&
|
|
7488
|
+
h && fg(h), h = setInterval(() => U(null, null, function* () {
|
|
7477
7489
|
var o, i;
|
|
7478
7490
|
try {
|
|
7479
7491
|
const P = yield ot(a);
|
|
7480
7492
|
if (P.paymentStatus === "pending")
|
|
7481
7493
|
return;
|
|
7482
|
-
const d = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed")
|
|
7494
|
+
const d = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed");
|
|
7495
|
+
fg(h);
|
|
7496
|
+
const L = eC({
|
|
7483
7497
|
message: d,
|
|
7484
7498
|
okLabel: "OK",
|
|
7485
7499
|
isSuccess: P.paymentStatus === "paid",
|
|
@@ -7517,7 +7531,7 @@ function Wt(n) {
|
|
|
7517
7531
|
}), 5e3), lI(h);
|
|
7518
7532
|
}
|
|
7519
7533
|
return t && K(), window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
|
|
7520
|
-
h &&
|
|
7534
|
+
h && fg(h);
|
|
7521
7535
|
}), { container: s };
|
|
7522
7536
|
});
|
|
7523
7537
|
}
|
|
@@ -7929,7 +7943,7 @@ let BC = /* @__PURE__ */ new Set();
|
|
|
7929
7943
|
function lI(A) {
|
|
7930
7944
|
A && BC.add(A);
|
|
7931
7945
|
}
|
|
7932
|
-
function
|
|
7946
|
+
function fg(A) {
|
|
7933
7947
|
A && (BC.delete(A), window.clearInterval(A));
|
|
7934
7948
|
}
|
|
7935
7949
|
function c0() {
|
|
@@ -8217,5 +8231,5 @@ export {
|
|
|
8217
8231
|
Y0 as InvoiceRegisterWidget,
|
|
8218
8232
|
lI as registerWidgetInterval,
|
|
8219
8233
|
c0 as stopAllIntervals,
|
|
8220
|
-
|
|
8234
|
+
fg as unregisterWidgetInterval
|
|
8221
8235
|
};
|