@atomsolution/invoice-widget 1.67.0 → 1.67.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.
@@ -2,7 +2,7 @@ var TI = Object.defineProperty, HI = Object.defineProperties;
2
2
  var kI = Object.getOwnPropertyDescriptors;
3
3
  var Sg = Object.getOwnPropertySymbols;
4
4
  var jB = Object.prototype.hasOwnProperty, KB = Object.prototype.propertyIsEnumerable;
5
- var Tg = (A, g) => (g = Symbol[A]) ? g : Symbol.for("Symbol." + A), YI = (A) => {
5
+ var Hg = (A, g) => (g = Symbol[A]) ? g : Symbol.for("Symbol." + A), YI = (A) => {
6
6
  throw TypeError(A);
7
7
  };
8
8
  var bB = (A, g, B) => g in A ? TI(A, g, { enumerable: !0, configurable: !0, writable: !0, value: B }) : A[g] = B, qA = (A, g) => {
@@ -48,10 +48,10 @@ var p = (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[Tg("asyncIterator")] = () => I, Q("next"), Q("throw"), Q("return"), I;
51
+ return B = B.apply(A, g), I[Hg("asyncIterator")] = () => I, Q("next"), Q("throw"), Q("return"), I;
52
52
  }, DC = (A) => {
53
- var g = A[Tg("asyncIterator")], B = !1, C, Q = {};
54
- return g == null ? (g = A[Tg("iterator")](), C = (I) => Q[I] = (E) => g[I](E)) : (g = g.call(A), C = (I) => Q[I] = (E) => {
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 p = (A, g, B) => new Promise((C, Q) => {
63
63
  t instanceof Object || YI("Object expected"), n(t);
64
64
  }), 1)
65
65
  };
66
- }), Q[Tg("iterator")] = () => Q, C("next"), "throw" in g ? C("throw") : Q.throw = (I) => {
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[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 $C, a as AB, b as Ig, c as RI, m as xI, d as GI, f as zI, v as XI, r as yQ, u as bQ } from "./index-7csnLY3P.js";
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 $C, a as AB, b as Ig, c as RI, m as xI, d as GI, f as zI, v as XI, r as yQ, u as bQ } from "./index-DjBG_p3F.js";
71
71
  import { g as jQ } 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 tI(A, g, B) {
1898
1898
  return A && (C || B == !1) ? wn(A, g) : g;
1899
1899
  }
1900
1900
  const BQ = (A) => A instanceof LA ? qA({}, A) : A;
1901
- function Mg(A, g) {
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 hI = (A) => {
1966
- const g = Mg({}, A);
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 = BI(tI(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: vn,
2385
2385
  validators: wC
2386
2386
  }, gg = _g.validators;
2387
- let fg = class {
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 = Mg(this.defaults, 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 = Mg(this.defaults, g);
2484
+ g = Pg(this.defaults, g);
2485
2485
  const B = tI(g.baseURL, g.url, g.allowAbsoluteUrls);
2486
2486
  return BI(B, g.params, g.paramsSerializer);
2487
2487
  }
2488
2488
  };
2489
2489
  H.forEach(["delete", "get", "head", "options"], function(g) {
2490
- fg.prototype[g] = function(B, C) {
2491
- return this.request(Mg(C || {}, {
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(Mg(n || {}, {
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
- fg.prototype[g] = B(), fg.prototype[g + "Form"] = B(!0);
2511
+ Mg.prototype[g] = B(), Mg.prototype[g + "Form"] = B(!0);
2512
2512
  });
2513
2513
  let dn = class aI {
2514
2514
  constructor(g) {
@@ -2660,13 +2660,13 @@ Object.entries(WC).forEach(([A, g]) => {
2660
2660
  WC[g] = A;
2661
2661
  });
2662
2662
  function iI(A) {
2663
- const g = new fg(A), B = KQ(fg.prototype.request, g);
2664
- return H.extend(B, fg.prototype, g, { allOwnKeys: !0 }), H.extend(B, g, null, { allOwnKeys: !0 }), B.create = function(Q) {
2665
- return iI(Mg(A, Q));
2663
+ const g = new Mg(A), B = KQ(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 iI(Pg(A, Q));
2666
2666
  }, B;
2667
2667
  }
2668
2668
  const rA = iI(yg);
2669
- rA.Axios = fg;
2669
+ rA.Axios = Mg;
2670
2670
  rA.CanceledError = Rg;
2671
2671
  rA.CancelToken = dn;
2672
2672
  rA.isCancel = EI;
@@ -2679,7 +2679,7 @@ rA.all = function(g) {
2679
2679
  };
2680
2680
  rA.spread = Jn;
2681
2681
  rA.isAxiosError = ln;
2682
- rA.mergeConfig = Mg;
2682
+ rA.mergeConfig = Pg;
2683
2683
  rA.AxiosHeaders = LA;
2684
2684
  rA.formToJSON = (A) => II(H.isHTMLForm(A) ? new FormData(A) : A);
2685
2685
  rA.getAdapter = eI.getAdapter;
@@ -3783,7 +3783,7 @@ function Ct(t) {
3783
3783
  horizontal: !0,
3784
3784
  searchable: !0,
3785
3785
  onChange: (F) => {
3786
- F.target.id && I(F.target.id), gA();
3786
+ F.target.id && I(F.target.id), AA();
3787
3787
  }
3788
3788
  }), Q) {
3789
3789
  const F = v.find(
@@ -3800,7 +3800,7 @@ function Ct(t) {
3800
3800
  required: !0,
3801
3801
  file: (g == null ? void 0 : g.logo) || null,
3802
3802
  onFileChange: (F) => {
3803
- gA();
3803
+ AA();
3804
3804
  },
3805
3805
  error: null
3806
3806
  }), m = xA({
@@ -3837,10 +3837,10 @@ function Ct(t) {
3837
3837
  return `${EA}/${X}/${DA}`;
3838
3838
  },
3839
3839
  onSelect: (F) => {
3840
- f.setError(null), gA();
3840
+ f.setError(null), AA();
3841
3841
  },
3842
3842
  onClose: () => {
3843
- f.inputEl.value ? f.setError(null) : f.setError(u("errorRequired")), gA();
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 Ct(t) {
3943
3943
  required: !0,
3944
3944
  file: (g == null ? void 0 : g.license) || null,
3945
3945
  onFileChange: (F) => {
3946
- gA();
3946
+ AA();
3947
3947
  },
3948
3948
  error: null,
3949
3949
  accept: "image/png, image/jpeg, image/jpg, .pdf"
@@ -4054,7 +4054,7 @@ function Ct(t) {
4054
4054
  O = jI({
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, gA();
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 = (RB = g == null ? void 0 : g.eInvoiceRegistration) == null ? void 0 : RB.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 Ct(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(), lA = DA(EA.cqthue_ql), Ag = v.find((ig) => {
4128
- const Jg = DA(ig.label);
4129
- return Jg.includes(lA) || lA.includes(Jg);
4128
+ const lg = DA(ig.label);
4129
+ return lg.includes(lA) || lA.includes(lg);
4130
4130
  });
4131
4131
  Ag && (s.setValue && s.setValue(
4132
4132
  Ag.value,
@@ -4148,7 +4148,7 @@ function Ct(t) {
4148
4148
  u("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
4149
4149
  ));
4150
4150
  } finally {
4151
- X === y && gA();
4151
+ X === y && AA();
4152
4152
  }
4153
4153
  });
4154
4154
  }
@@ -4190,9 +4190,9 @@ function Ct(t) {
4190
4190
  const ug = lA.slice(0, 2), iC = lA.slice(2, 4), lI = lA.slice(4, 8);
4191
4191
  return `${ug}/${iC}/${lI}`;
4192
4192
  }
4193
- const [Ag, ig, Jg] = lA.split("/"), lg = new Date(+Jg, +ig - 1, +Ag);
4194
- if (isNaN(lg)) return "";
4195
- const aC = String(lg.getDate()).padStart(2, "0"), xg = String(lg.getMonth() + 1).padStart(2, "0"), Kg = lg.getFullYear();
4193
+ const [Ag, ig, lg] = lA.split("/"), Tg = new Date(+lg, +ig - 1, +Ag);
4194
+ if (isNaN(Tg)) return "";
4195
+ const aC = String(Tg.getDate()).padStart(2, "0"), xg = String(Tg.getMonth() + 1).padStart(2, "0"), Kg = Tg.getFullYear();
4196
4196
  return `${aC}/${xg}/${Kg}`;
4197
4197
  }, DA = new Image();
4198
4198
  DA.src = URL.createObjectURL(F), DA.onload = () => p(null, null, function* () {
@@ -4207,10 +4207,10 @@ function Ct(t) {
4207
4207
  ), X();
4208
4208
  return;
4209
4209
  }
4210
- const { address: Jg, date_of_birth: lg, full_name: aC, id_number: xg, sex: Kg } = lA;
4210
+ const { address: lg, date_of_birth: Tg, full_name: aC, id_number: xg, sex: Kg } = lA;
4211
4211
  if (!xg || !/^\d{12}$/.test(xg) ? (cg(
4212
4212
  u("errorInvalidCard", "Số CCCD phải có 12 chữ số")
4213
- ), r.inputEl.value = "") : (r.inputEl.value = xg, r.setError(null)), m.inputEl.value = aC || "", f.inputEl.value = EA(lg), R.inputEl.value = Jg || "", Kg) {
4213
+ ), r.inputEl.value = "") : (r.inputEl.value = xg, r.setError(null)), m.inputEl.value = aC || "", f.inputEl.value = EA(Tg), R.inputEl.value = lg || "", Kg) {
4214
4214
  const ug = hQ.find(
4215
4215
  (iC) => iC.label.toLowerCase() === Kg.toLowerCase()
4216
4216
  );
@@ -4220,7 +4220,7 @@ function Ct(t) {
4220
4220
  } catch (lA) {
4221
4221
  console.error("readIdentityCard failed", lA);
4222
4222
  } finally {
4223
- gA();
4223
+ AA();
4224
4224
  }
4225
4225
  });
4226
4226
  }
@@ -4237,11 +4237,11 @@ function Ct(t) {
4237
4237
  onFrontChange: (F) => p(null, null, function* () {
4238
4238
  var EA, DA;
4239
4239
  if (o = F, tg() || hg() || !wg()) {
4240
- zA = !1, fA = !1, NA(), gA();
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
- gA();
4244
+ AA();
4245
4245
  return;
4246
4246
  }
4247
4247
  dA(F);
@@ -4249,11 +4249,11 @@ function Ct(t) {
4249
4249
  onBackChange: (F) => p(null, null, function* () {
4250
4250
  var EA, DA;
4251
4251
  if (i = F, tg() || hg() || !VA()) {
4252
- zA = !1, fA = !1, NA(), gA();
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
- gA();
4256
+ AA();
4257
4257
  return;
4258
4258
  }
4259
4259
  dA(VA());
@@ -4282,8 +4282,8 @@ function Ct(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(l.container), SA.appendChild(YA), h.appendChild(SA);
4283
4283
  const ag = document.createElement("div");
4284
4284
  ag.className = "wgt:space-y-4";
4285
- const dg = document.createElement("h3");
4286
- dg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", dg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ag.appendChild(dg), h.appendChild(ag);
4285
+ const Jg = document.createElement("h3");
4286
+ Jg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", Jg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ag.appendChild(Jg), 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 Ct(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 AA = document.createElement("div");
4311
- AA.className = [
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 Ct(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), AA.appendChild(eA);
4331
+ ), Z.setAttribute("fill", "white"), eA.appendChild(Z), gA.appendChild(eA);
4332
4332
  const RA = document.createElement("label");
4333
4333
  RA.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", RA.appendChild(
4334
4334
  document.createTextNode(u("agreeWith", "Tôi đồng ý với ") + " ")
@@ -4341,8 +4341,8 @@ function Ct(t) {
4341
4341
  }, jg = NI(B);
4342
4342
  RA.appendChild(
4343
4343
  bg(u("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
4344
- ), RA.appendChild(document.createTextNode(` ${u("of", "của")} ${jg}.`)), $.appendChild(AA), $.appendChild(RA), h.appendChild($), AA.addEventListener("click", () => {
4345
- cA = !cA, cA ? (AA.classList.add("wgt:bg-primary"), eA.classList.remove("wgt:hidden")) : (AA.classList.remove("wgt:bg-primary"), eA.classList.add("wgt:hidden")), gA();
4344
+ ), RA.appendChild(document.createTextNode(` ${u("of", "của")} ${jg}.`)), $.appendChild(gA), $.appendChild(RA), 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 x = document.createElement("div");
4348
4348
  x.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 Ct(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 gA() {
4368
+ function AA() {
4369
4369
  P.disabled = !BA() || !cA || tg() || hg() || S.getError() || K.getError();
4370
4370
  }
4371
4371
  function JA() {
@@ -4422,18 +4422,18 @@ function Ct(t) {
4422
4422
  j,
4423
4423
  z
4424
4424
  ].forEach((F) => {
4425
- F.inputEl.addEventListener("input", gA);
4425
+ F.inputEl.addEventListener("input", AA);
4426
4426
  }), [J, s].forEach((F) => {
4427
- F.selectEl.addEventListener("change", gA);
4427
+ F.selectEl.addEventListener("change", AA);
4428
4428
  }), [G, Y].forEach((F) => {
4429
- F.addEventListener("change", gA);
4429
+ F.addEventListener("change", AA);
4430
4430
  }), P.addEventListener("click", (F) => {
4431
4431
  if (F.preventDefault(), !BA()) return;
4432
4432
  const X = JA();
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), DI(AB()), 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), gA(), {
4436
+ return uA.length >= 10 && IA(uA), DI(AB()), 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: JA
4439
4439
  };
@@ -4597,7 +4597,7 @@ function wQ({
4597
4597
  }
4598
4598
  };
4599
4599
  }
4600
- const Et = "1.67.0";
4600
+ const Et = "1.67.2";
4601
4601
  function nt(B) {
4602
4602
  return p(this, arguments, function* ({ search: A, bank: g }) {
4603
4603
  return (yield pA.get(`${IC}`, {
@@ -4770,7 +4770,7 @@ function at({
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 mt(k) {
5005
5005
  </div>
5006
5006
  `, P.appendChild(XA);
5007
5007
  const { container: OA } = st(), { container: zA, tbody: fA } = Dt(), vA = document.createElement("div");
5008
- vA.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:mt-6 wgt:shadow-lg wgt:max-sm:sticky wgt:max-sm:bottom-4 wgt:max-sm:z-20";
5008
+ vA.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"), vA.appendChild(NA);
5011
5011
  const dA = document.createElement("span");
@@ -5021,7 +5021,7 @@ function mt(k) {
5021
5021
  ZA.appendChild(tg);
5022
5022
  const hg = (b, nA, QA, W) => p(null, null, function* () {
5023
5023
  o();
5024
- const AA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = AA, $ = uC(AA, ["isUsedEInvoiceBefore"]);
5024
+ const gA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = gA, $ = uC(gA, ["isUsedEInvoiceBefore"]);
5025
5025
  let cA = [
5026
5026
  {
5027
5027
  code: nA.code,
@@ -5094,7 +5094,7 @@ function mt(k) {
5094
5094
  const [
5095
5095
  $,
5096
5096
  cA,
5097
- AA,
5097
+ gA,
5098
5098
  hA,
5099
5099
  eA
5100
5100
  ] = yield Promise.allSettled([
@@ -5112,9 +5112,9 @@ function mt(k) {
5112
5112
  $.reason
5113
5113
  ), Dg.error(
5114
5114
  u("errorCheckingCustomer") || "Failed to check customer status"
5115
- ), R = !1), AA.status === "fulfilled" ? r = AA.value || [] : (console.error(
5115
+ ), R = !1), gA.status === "fulfilled" ? r = gA.value || [] : (console.error(
5116
5116
  "Failed to load init packages:",
5117
- AA.reason
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 mt(k) {
5135
5135
  });
5136
5136
  }), Object.keys(q).length > 0 && (J = 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
- ), dg())) : console.error("Failed to load promotions:", cA.reason), hA.status === "fulfilled") {
5138
+ ), Jg())) : 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
  (RA) => T.includes(RA.code)
@@ -5175,23 +5175,23 @@ function mt(k) {
5175
5175
  });
5176
5176
  }
5177
5177
  function wg() {
5178
- KA(), eg(), og(), _A(), P.appendChild(zA), P.appendChild(vA), P.appendChild(OA), mA();
5178
+ KA(), eg(), og(), _A(), mA();
5179
5179
  }
5180
5180
  function bA(b, nA, QA) {
5181
5181
  const W = Object.values(q).find(
5182
- (AA) => AA.bank === h && AA.appliedPackages.includes(b)
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
- (AA) => AA.bank === h && AA.appliedPackages.includes(nA)
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: AA, open: hA } = eC({
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(AA), hA();
5194
+ S.appendChild(gA), hA();
5195
5195
  } else
5196
5196
  QA();
5197
5197
  }
@@ -5286,14 +5286,14 @@ function mt(k) {
5286
5286
  W.isDisabled = !CA, !CA && J.includes(W.code) ? J = J.filter(
5287
5287
  ($) => $ !== W.code
5288
5288
  ) : CA && !J.includes(W.code) && J.push(W.code);
5289
- }), dg();
5289
+ }), Jg();
5290
5290
  }
5291
- function dg() {
5291
+ function Jg() {
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
- (AA) => AA.bank === h
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 mt(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
- (AA) => AA.bank === h
5342
+ (gA) => gA.bank === h
5343
5343
  );
5344
5344
  if (cA.length > 0)
5345
- cA.forEach((AA) => {
5345
+ cA.forEach((gA) => {
5346
5346
  const { container: hA } = at({
5347
- promotion: yA(qA({}, AA), {
5348
- isSelected: J.includes(AA.code)
5347
+ promotion: yA(qA({}, gA), {
5348
+ isSelected: J.includes(gA.code)
5349
5349
  }),
5350
5350
  onSelect: (eA, Z) => {
5351
5351
  Z && J.push(eA), _A(), mA();
5352
5352
  },
5353
- isDisabled: AA.isDisabled || AA.expiredAt < (/* @__PURE__ */ new Date()).toISOString() || AA.limit === AA.used
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 AA = document.createElement("span");
5359
- AA.className = "wgt:text-text-sub-600", AA.innerText = u("noPromotionFound"), YA.appendChild(AA);
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, RA, bg, jg;
5364
- if (fA.innerHTML = "", y().length === 0 && d.length === 0) {
5364
+ if (fA.innerHTML = "", P.appendChild(zA), P.appendChild(vA), P.appendChild(OA), y().length === 0 && d.length === 0) {
5365
5365
  const x = document.createElement("tr");
5366
5366
  x.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 mt(k) {
5378
5378
  x.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, x.appendChild(BA);
5381
- const gA = document.createElement("td");
5382
- gA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", gA.innerText = u("package"), x.appendChild(gA);
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"), x.appendChild(AA);
5383
5383
  const JA = document.createElement("td");
5384
5384
  JA.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 mt(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((RA = r[0]) == null ? void 0 : RA.price)} VND</span>
5405
+ <span class="wgt:font-medium">${kA(
5406
+ (RA = r[0]) == null ? void 0 : RA.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(((bg = r[0]) == null ? void 0 : bg.price) * G)} VND</span>
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(x);
5412
5416
  }
@@ -5415,8 +5419,8 @@ function mt(k) {
5415
5419
  if (x) {
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 gA = document.createElement("td");
5419
- gA.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", gA.innerText = Ig() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(gA);
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" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(AA);
5420
5424
  const JA = document.createElement("td");
5421
5425
  JA.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", JA.innerText = u("package"), BA.appendChild(JA);
5422
5426
  const uA = document.createElement("td");
@@ -5441,13 +5445,17 @@ function mt(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((x == null ? void 0 : x.price) * (x == null ? void 0 : x.limit))} VND</span>
5448
+ <span class="wgt:font-medium">${kA(
5449
+ (x == null ? void 0 : x.price) * (x == null ? void 0 : x.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((x == null ? void 0 : x.price) * (x == null ? void 0 : x.limit) * Y)} VND</span>
5454
+ <span class="wgt:text-primary">${kA(
5455
+ (x == null ? void 0 : x.price) * (x == null ? void 0 : x.limit) * Y
5456
+ )} VND</span>
5449
5457
  </div>
5450
- `, gA.appendChild($A), fA.appendChild(BA);
5458
+ `, AA.appendChild($A), fA.appendChild(BA);
5451
5459
  }
5452
5460
  }
5453
5461
  {
@@ -5455,8 +5463,8 @@ function mt(k) {
5455
5463
  if (x) {
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 gA = document.createElement("td");
5459
- gA.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", gA.innerText = Ig() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(gA);
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" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(AA);
5460
5468
  const JA = document.createElement("td");
5461
5469
  JA.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", JA.innerText = u("package"), BA.appendChild(JA);
5462
5470
  const uA = document.createElement("td");
@@ -5481,13 +5489,17 @@ function mt(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((x == null ? void 0 : x.limit) * (x == null ? void 0 : x.price))} VND</span>
5492
+ <span class="wgt:font-medium">${kA(
5493
+ (x == null ? void 0 : x.limit) * (x == null ? void 0 : x.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((x == null ? void 0 : x.limit) * (x == null ? void 0 : x.price) * z)} VND</span>
5498
+ <span class="wgt:text-primary">${kA(
5499
+ (x == null ? void 0 : x.limit) * (x == null ? void 0 : x.price) * z
5500
+ )} VND</span>
5489
5501
  </div>
5490
- `, gA.appendChild($A), fA.appendChild(BA);
5502
+ `, AA.appendChild($A), fA.appendChild(BA);
5491
5503
  }
5492
5504
  }
5493
5505
  const nA = J.map(
@@ -5500,31 +5512,31 @@ function mt(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 gA = document.createElement("td");
5504
- gA.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", gA.innerHTML = `
5505
- <div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-center">
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="${rt}" 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" ? x == null ? void 0 : x.name : (x == null ? void 0 : x.nameEn) || (x == null ? void 0 : x.code)}</span>
5508
5520
  </div>
5509
- `, BA.appendChild(gA);
5521
+ `, BA.appendChild(AA);
5510
5522
  const JA = document.createElement("td");
5511
5523
  JA.className = "wgt:max-sm:hidden", BA.appendChild(JA);
5512
5524
  const uA = document.createElement("td");
5513
- uA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold", x.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", x.type === "discount" ? (uA.innerText = `-${kA(
5514
5526
  (aA = x == null ? void 0 : x.reward) == null ? void 0 : aA.discountAmount
5515
5527
  )} VND`, uA.style.color = "#F04438", QA += (iA = x == null ? void 0 : x.reward) == null ? void 0 : iA.discountAmount) : (x == null ? void 0 : x.type) === "free_item" ? (uA.innerText = `+${(sA = (MA = x == null ? void 0 : x.reward) == null ? void 0 : MA.packageCodes) == null ? void 0 : sA.length} ${u(
5516
5528
  "package"
5517
5529
  )} ${(HA = (TA = x == null ? void 0 : x.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 = R && r.length > 0 && !(b != null && b.withoutInitialFee) ? ((jg = r[0]) == null ? void 0 : jg.price) * G : 0, CA = U(m), $ = CA ? CA.price * CA.limit * Y : 0, cA = j(f), AA = cA ? cA.price * cA.limit * z : 0, hA = W + $ + AA - QA;
5531
+ const W = R && r.length > 0 && !(b != null && b.withoutInitialFee) ? ((jg = r[0]) == null ? void 0 : jg.price) * G : 0, CA = U(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 x = document.createElement("tr");
5523
5535
  x.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"), x.appendChild(BA);
5526
- const gA = document.createElement("td");
5527
- gA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", gA.innerText = kA(hA) + " VND", x.appendChild(gA), fA.appendChild(x);
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", x.appendChild(AA), fA.appendChild(x);
5528
5540
  }
5529
5541
  dA.innerText = kA(hA) + " VND";
5530
5542
  }
@@ -5664,7 +5676,7 @@ function Mt({
5664
5676
  k();
5665
5677
  const l = () => {
5666
5678
  w = setInterval(() => {
5667
- e--, k(), e <= 0 && kg(w);
5679
+ e--, k(), e <= 0 && fg(w);
5668
5680
  }, 1e3), dI(w);
5669
5681
  };
5670
5682
  l(), s.appendChild(D);
@@ -5734,12 +5746,12 @@ function Mt({
5734
5746
  title: u("cancelTransaction"),
5735
5747
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
5736
5748
  handleClick: () => {
5737
- w && kg(w);
5749
+ w && fg(w);
5738
5750
  const { container: v, open: L } = eC({
5739
5751
  message: u("transactionCanceled"),
5740
5752
  okLabel: u("ok"),
5741
5753
  onClose: () => {
5742
- e = 3600, kg(w), typeof h == "function" && h();
5754
+ e = 3600, fg(w), typeof h == "function" && h();
5743
5755
  },
5744
5756
  preventClose: !0
5745
5757
  });
@@ -5747,7 +5759,7 @@ function Mt({
5747
5759
  }
5748
5760
  });
5749
5761
  return f.appendChild(P), a.appendChild(f), window.addEventListener("beforeunload", () => {
5750
- w && kg(w);
5762
+ w && fg(w);
5751
5763
  }), {
5752
5764
  container: a,
5753
5765
  setSelectedProvider(v) {
@@ -5800,14 +5812,14 @@ function Pt(A) {
5800
5812
  )).data;
5801
5813
  });
5802
5814
  }
5803
- var Hg = {}, MC, eQ;
5815
+ var kg = {}, MC, eQ;
5804
5816
  function vt() {
5805
5817
  return eQ || (eQ = 1, MC = function() {
5806
5818
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
5807
5819
  }), MC;
5808
5820
  }
5809
5821
  var PC = {}, Bg = {}, oQ;
5810
- function Pg() {
5822
+ function vg() {
5811
5823
  if (oQ) return Bg;
5812
5824
  oQ = 1;
5813
5825
  let A;
@@ -5961,7 +5973,7 @@ function Jt() {
5961
5973
  var lC = {}, sQ;
5962
5974
  function lt() {
5963
5975
  return sQ || (sQ = 1, function(A) {
5964
- const g = Pg().getSymbolSize;
5976
+ const g = vg().getSymbolSize;
5965
5977
  A.getRowColCoords = function(C) {
5966
5978
  if (C === 1) return [];
5967
5979
  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];
@@ -5983,7 +5995,7 @@ var TC = {}, DQ;
5983
5995
  function Tt() {
5984
5996
  if (DQ) return TC;
5985
5997
  DQ = 1;
5986
- const A = Pg().getSymbolSize, g = 7;
5998
+ const A = vg().getSymbolSize, g = 7;
5987
5999
  return TC.getPositions = function(C) {
5988
6000
  const Q = A(C);
5989
6001
  return [
@@ -6549,7 +6561,7 @@ function MI() {
6549
6561
  }, Cg;
6550
6562
  }
6551
6563
  var dQ;
6552
- function vg() {
6564
+ function dg() {
6553
6565
  return dQ || (dQ = 1, function(A) {
6554
6566
  const g = fI(), B = MI();
6555
6567
  A.NUMERIC = {
@@ -6613,7 +6625,7 @@ function vg() {
6613
6625
  var JQ;
6614
6626
  function xt() {
6615
6627
  return JQ || (JQ = 1, function(A) {
6616
- const g = Pg(), B = qI(), C = EB(), Q = vg(), I = fI(), E = 7973, n = g.getBCHDigit(E);
6628
+ const g = vg(), B = qI(), C = EB(), Q = dg(), I = fI(), E = 7973, n = g.getBCHDigit(E);
6617
6629
  function t(e, w, s) {
6618
6630
  for (let D = 1; D <= 40; D++)
6619
6631
  if (w <= A.getCapacity(D, s, e))
@@ -6680,7 +6692,7 @@ var zC = {}, lQ;
6680
6692
  function Gt() {
6681
6693
  if (lQ) return zC;
6682
6694
  lQ = 1;
6683
- const A = Pg(), g = 1335, B = 21522, C = A.getBCHDigit(g);
6695
+ const A = vg(), g = 1335, B = 21522, C = A.getBCHDigit(g);
6684
6696
  return zC.getEncodedBits = function(I, E) {
6685
6697
  const n = I.bit << 3 | E;
6686
6698
  let t = n << 10;
@@ -6693,7 +6705,7 @@ var XC = {}, OC, TQ;
6693
6705
  function zt() {
6694
6706
  if (TQ) return OC;
6695
6707
  TQ = 1;
6696
- const A = vg();
6708
+ const A = dg();
6697
6709
  function g(B) {
6698
6710
  this.mode = A.NUMERIC, this.data = B.toString();
6699
6711
  }
@@ -6715,7 +6727,7 @@ var FC, HQ;
6715
6727
  function Xt() {
6716
6728
  if (HQ) return FC;
6717
6729
  HQ = 1;
6718
- const A = vg(), g = [
6730
+ const A = dg(), g = [
6719
6731
  "0",
6720
6732
  "1",
6721
6733
  "2",
@@ -6784,7 +6796,7 @@ var LC, kQ;
6784
6796
  function Ot() {
6785
6797
  if (kQ) return LC;
6786
6798
  kQ = 1;
6787
- const A = vg();
6799
+ const A = dg();
6788
6800
  function g(B) {
6789
6801
  this.mode = A.BYTE, typeof B == "string" ? this.data = new TextEncoder().encode(B) : this.data = new Uint8Array(B);
6790
6802
  }
@@ -6803,7 +6815,7 @@ var NC, YQ;
6803
6815
  function Ft() {
6804
6816
  if (YQ) return NC;
6805
6817
  YQ = 1;
6806
- const A = vg(), g = Pg();
6818
+ const A = dg(), g = vg();
6807
6819
  function B(C) {
6808
6820
  this.mode = A.KANJI, this.data = C;
6809
6821
  }
@@ -6901,7 +6913,7 @@ function Lt() {
6901
6913
  var xQ;
6902
6914
  function Nt() {
6903
6915
  return xQ || (xQ = 1, function(A) {
6904
- const g = vg(), B = zt(), C = Xt(), Q = Ot(), I = Ft(), E = MI(), n = Pg(), t = Lt();
6916
+ const g = dg(), B = zt(), C = Xt(), Q = Ot(), I = Ft(), E = MI(), n = vg(), t = Lt();
6905
6917
  function c(k) {
6906
6918
  return unescape(encodeURIComponent(k)).length;
6907
6919
  }
@@ -7036,7 +7048,7 @@ var GQ;
7036
7048
  function yt() {
7037
7049
  if (GQ) return PC;
7038
7050
  GQ = 1;
7039
- const A = Pg(), g = EB(), B = dt(), C = Jt(), Q = lt(), I = Tt(), E = Ht(), n = qI(), t = Rt(), c = xt(), h = Gt(), a = vg(), e = Nt();
7051
+ const A = vg(), g = EB(), B = dt(), C = Jt(), Q = lt(), I = Tt(), E = Ht(), n = qI(), t = Rt(), c = xt(), h = Gt(), a = dg(), e = Nt();
7040
7052
  function w(d, r) {
7041
7053
  const q = d.size, T = I.getPositions(r);
7042
7054
  for (let R = 0; R < T.length; R++) {
@@ -7279,7 +7291,7 @@ function jt() {
7279
7291
  }
7280
7292
  var FQ;
7281
7293
  function Kt() {
7282
- if (FQ) return Hg;
7294
+ if (FQ) return kg;
7283
7295
  FQ = 1;
7284
7296
  const A = vt(), g = yt(), B = bt(), C = jt();
7285
7297
  function Q(I, E, n, t, c) {
@@ -7309,9 +7321,9 @@ function Kt() {
7309
7321
  c(w);
7310
7322
  }
7311
7323
  }
7312
- return Hg.create = g.create, Hg.toCanvas = Q.bind(null, B.render), Hg.toDataURL = Q.bind(null, B.renderToDataURL), Hg.toString = Q.bind(null, function(I, E, n) {
7324
+ 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) {
7313
7325
  return C.render(I, n);
7314
- }), Hg;
7326
+ }), kg;
7315
7327
  }
7316
7328
  var St = Kt();
7317
7329
  const Ut = /* @__PURE__ */ jQ(St), pt = 5;
@@ -7472,13 +7484,15 @@ function Zt(n) {
7472
7484
  j = !navigator.onLine;
7473
7485
  }
7474
7486
  function K() {
7475
- h && kg(h), h = setInterval(() => p(null, null, function* () {
7487
+ h && fg(h), h = setInterval(() => p(null, null, function* () {
7476
7488
  var o, i;
7477
7489
  try {
7478
7490
  const P = yield wt(a);
7479
7491
  if (P.paymentStatus === "pending")
7480
7492
  return;
7481
- const v = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed"), L = eC({
7493
+ const v = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed");
7494
+ fg(h);
7495
+ const L = eC({
7482
7496
  message: v,
7483
7497
  okLabel: "OK",
7484
7498
  isSuccess: P.paymentStatus === "paid",
@@ -7516,7 +7530,7 @@ function Zt(n) {
7516
7530
  }), 5e3), dI(h);
7517
7531
  }
7518
7532
  return t && K(), window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
7519
- h && kg(h);
7533
+ h && fg(h);
7520
7534
  }), { container: s };
7521
7535
  });
7522
7536
  }
@@ -7831,7 +7845,7 @@ let BC = /* @__PURE__ */ new Set();
7831
7845
  function dI(A) {
7832
7846
  A && BC.add(A);
7833
7847
  }
7834
- function kg(A) {
7848
+ function fg(A) {
7835
7849
  A && (BC.delete(A), window.clearInterval(A));
7836
7850
  }
7837
7851
  function E0() {
@@ -8119,5 +8133,5 @@ export {
8119
8133
  l0 as InvoiceRegisterWidget,
8120
8134
  dI as registerWidgetInterval,
8121
8135
  E0 as stopAllIntervals,
8122
- kg as unregisterWidgetInterval
8136
+ fg as unregisterWidgetInterval
8123
8137
  };