@invoice-sdk/widget 1.69.1 → 1.69.2
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.
|
@@ -67,7 +67,7 @@ var U = (A, g, B) => new Promise((C, Q) => {
|
|
|
67
67
|
throw I;
|
|
68
68
|
}, "return" in g && C("return"), Q;
|
|
69
69
|
}, SB = (A, g, B) => (g = A[Tg("asyncIterator")]) ? g.call(A) : (A = A[Tg("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-
|
|
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-by2KBMak.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");
|
|
@@ -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));
|
|
@@ -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
|
}
|
|
@@ -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());
|
|
@@ -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.2";
|
|
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) => {
|
|
@@ -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
|
}
|
|
@@ -5293,7 +5293,7 @@ function ft(k) {
|
|
|
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
|
}
|