@invoice-sdk/widget 1.118.2 → 1.118.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.
@@ -19,7 +19,7 @@ var mh = (t, n) => {
19
19
  n.indexOf(c) < 0 && oh.call(t, c) && (e[c] = t[c]);
20
20
  return e;
21
21
  };
22
- var qn = (t, n, e) => new Promise((c, h) => {
22
+ var sn = (t, n, e) => new Promise((c, h) => {
23
23
  var a = (A) => {
24
24
  try {
25
25
  o(e.next(A));
@@ -35,8 +35,8 @@ var qn = (t, n, e) => new Promise((c, h) => {
35
35
  }, o = (A) => A.done ? c(A.value) : Promise.resolve(A.value).then(a, u);
36
36
  o((e = e.apply(t, n)).next());
37
37
  });
38
- import { t as g, g as jh, a as Uh, b as Pt, s as n0, c as Mt, d as rc, e as Tc, f as xc, m as dc, h as wc, i as pc, v as Cc } from "./index-EgycCzHi.js";
39
- import { c as vt, a as _h, g as t0, b as fc, f as Sn, d as Xc, e as a0, h as Bc, i as Nc, j as Ec, k as Hc, l as yc, m as Pc, n as kc } from "./loading-Btbxdqb9.js";
38
+ import { t as g, g as jh, a as Uh, b as Pt, s as n0, c as Mt, d as rc, e as Tc, f as xc, m as dc, h as wc, i as pc, v as Cc } from "./index-GouE6DVq.js";
39
+ import { c as vt, a as _h, g as t0, b as fc, f as Sn, d as Xc, e as a0, h as Bc, i as Nc, j as Ec, k as Hc, l as yc, m as Pc, n as kc } from "./loading-CUfLWsim.js";
40
40
  import { g as $h } from "./_commonjsHelpers-bAxELxBV.js";
41
41
  function qh({ steps: t = [], currentStep: n = 1 } = {}) {
42
42
  const e = document.createElement("div");
@@ -1112,8 +1112,8 @@ function Dc() {
1112
1112
  return r.isDisabled && m.push("is-disabled"), r.isToday && m.push("is-today"), r.isSelected && (m.push("is-selected"), P = "true"), r.hasEvent && m.push("has-event"), r.isInRange && m.push("is-inrange"), r.isStartRange && m.push("is-startrange"), r.isEndRange && m.push("is-endrange"), '<td data-day="' + r.day + '" class="' + m.join(" ") + '" aria-selected="' + P + '"><button class="pika-button pika-day" type="button" data-pika-year="' + r.year + '" data-pika-month="' + r.month + '" data-pika-day="' + r.day + '">' + r.day + "</button></td>";
1113
1113
  }, I = function(r, m) {
1114
1114
  r.setHours(0, 0, 0, 0);
1115
- var P = r.getDate(), N = r.getDay(), L = m, M = L - 1, K = 7, U = function(tn) {
1116
- return (tn + K - 1) % K;
1115
+ var P = r.getDate(), N = r.getDay(), L = m, M = L - 1, K = 7, U = function(nn) {
1116
+ return (nn + K - 1) % K;
1117
1117
  };
1118
1118
  r.setDate(P + M - U(N));
1119
1119
  var G = new Date(r.getFullYear(), 0, L), R = 1440 * 60 * 1e3, cn = (r.getTime() - G.getTime()) / R, V = 1 + Math.round((cn - M + U(G.getDay())) / K);
@@ -1131,12 +1131,12 @@ function Dc() {
1131
1131
  P.push('<th scope="col"><abbr title="' + X(r, m) + '">' + X(r, m, !0) + "</abbr></th>");
1132
1132
  return "<thead><tr>" + (r.isRTL ? P.reverse() : P).join("") + "</tr></thead>";
1133
1133
  }, W = function(r, m, P, N, L, M) {
1134
- var K, U, G, R = r._o, cn = P === R.minYear, V = P === R.maxYear, tn = '<div id="' + M + '" class="pika-title" role="heading" aria-live="assertive">', rn, Xn, mn = !0, jn = !0;
1134
+ var K, U, G, R = r._o, cn = P === R.minYear, V = P === R.maxYear, nn = '<div id="' + M + '" class="pika-title" role="heading" aria-live="assertive">', rn, Xn, mn = !0, jn = !0;
1135
1135
  for (G = [], K = 0; K < 12; K++)
1136
1136
  G.push('<option value="' + (P === L ? K - m : 12 + K - m) + '"' + (K === N ? ' selected="selected"' : "") + (cn && K < R.minMonth || V && K > R.maxMonth ? ' disabled="disabled"' : "") + ">" + R.i18n.months[K] + "</option>");
1137
1137
  for (rn = '<div class="pika-label">' + R.i18n.months[N] + '<select class="pika-select pika-select-month" tabindex="-1">' + G.join("") + "</select></div>", l(R.yearRange) ? (K = R.yearRange[0], U = R.yearRange[1] + 1) : (K = P - R.yearRange, U = 1 + P + R.yearRange), G = []; K < U && K <= R.maxYear; K++)
1138
1138
  K >= R.minYear && G.push('<option value="' + K + '"' + (K === P ? ' selected="selected"' : "") + ">" + K + "</option>");
1139
- return Xn = '<div class="pika-label">' + P + R.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", R.showMonthAfterYear ? tn += Xn + rn : tn += rn + Xn, cn && (N === 0 || R.minMonth >= N) && (mn = !1), V && (N === 11 || R.maxMonth <= N) && (jn = !1), m === 0 && (tn += '<button class="pika-prev' + (mn ? "" : " is-disabled") + '" type="button">' + R.i18n.previousMonth + "</button>"), m === r._o.numberOfMonths - 1 && (tn += '<button class="pika-next' + (jn ? "" : " is-disabled") + '" type="button">' + R.i18n.nextMonth + "</button>"), tn += "</div>";
1139
+ return Xn = '<div class="pika-label">' + P + R.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", R.showMonthAfterYear ? nn += Xn + rn : nn += rn + Xn, cn && (N === 0 || R.minMonth >= N) && (mn = !1), V && (N === 11 || R.maxMonth <= N) && (jn = !1), m === 0 && (nn += '<button class="pika-prev' + (mn ? "" : " is-disabled") + '" type="button">' + R.i18n.previousMonth + "</button>"), m === r._o.numberOfMonths - 1 && (nn += '<button class="pika-next' + (jn ? "" : " is-disabled") + '" type="button">' + R.i18n.nextMonth + "</button>"), nn += "</div>";
1140
1140
  }, z = function(r, m, P) {
1141
1141
  return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + P + '">' + E(r) + C(m) + "</table>";
1142
1142
  }, F = function(r) {
@@ -1378,12 +1378,12 @@ function Dc() {
1378
1378
  render: function(r, m, P) {
1379
1379
  var N = this._o, L = /* @__PURE__ */ new Date(), M = k(r, m), K = new Date(r, m, 1).getDay(), U = [], G = [];
1380
1380
  v(L), N.firstDay > 0 && (K -= N.firstDay, K < 0 && (K += 7));
1381
- for (var R = m === 0 ? 11 : m - 1, cn = m === 11 ? 0 : m + 1, V = m === 0 ? r - 1 : r, tn = m === 11 ? r + 1 : r, rn = k(V, R), Xn = M + K, mn = Xn; mn > 7; )
1381
+ for (var R = m === 0 ? 11 : m - 1, cn = m === 11 ? 0 : m + 1, V = m === 0 ? r - 1 : r, nn = m === 11 ? r + 1 : r, rn = k(V, R), Xn = M + K, mn = Xn; mn > 7; )
1382
1382
  mn -= 7;
1383
1383
  Xn += 7 - mn;
1384
1384
  for (var jn = !1, Bn = 0, $n = 0; Bn < Xn; Bn++) {
1385
1385
  var ln = new Date(r, m, 1 + (Bn - K)), mt = x(this._d) ? p(ln, this._d) : !1, Jn = p(ln, L), Tt = N.events.indexOf(ln.toDateString()) !== -1, nt = Bn < K || Bn >= M + K, Qn = 1 + (Bn - K), Wn = m, Gn = r, qt = N.startRange && p(N.startRange, ln), Bt = N.endRange && p(N.endRange, ln), Fn = N.startRange && N.endRange && N.startRange < ln && ln < N.endRange, st = N.minDate && ln < N.minDate || N.maxDate && ln > N.maxDate || N.disableWeekends && w(ln) || N.disableDayFn && N.disableDayFn(ln);
1386
- nt && (Bn < K ? (Qn = rn + Qn, Wn = R, Gn = V) : (Qn = Qn - M, Wn = cn, Gn = tn));
1386
+ nt && (Bn < K ? (Qn = rn + Qn, Wn = R, Gn = V) : (Qn = Qn - M, Wn = cn, Gn = nn));
1387
1387
  var lt = {
1388
1388
  day: Qn,
1389
1389
  month: Wn,
@@ -2042,7 +2042,7 @@ function xh(t) {
2042
2042
  return e > 1 ? !1 : e === 1 ? /^\d{10}-\d{3}$/.test(n) : /^(\d{10}|\d{12}|\d{13})$/.test(n);
2043
2043
  }
2044
2044
  function g1(l) {
2045
- return qn(this, arguments, function* ({
2045
+ return sn(this, arguments, function* ({
2046
2046
  onSubmit: t,
2047
2047
  registrationData: n,
2048
2048
  theme: e = "ocb",
@@ -2150,7 +2150,7 @@ function g1(l) {
2150
2150
  readOnly: !1,
2151
2151
  horizontal: !0
2152
2152
  });
2153
- const tn = Yc.map((D) => ({
2153
+ const nn = Yc.map((D) => ({
2154
2154
  value: D["cqt quản lý"],
2155
2155
  label: D["tên cqt"],
2156
2156
  id: D["ma xa"]
@@ -2159,7 +2159,7 @@ function g1(l) {
2159
2159
  name: "companyTaxManagement",
2160
2160
  label: g("taxAuthority"),
2161
2161
  value: ((un = (O = n == null ? void 0 : n.eInvoiceRegistration) == null ? void 0 : O.organization) == null ? void 0 : un.taxAuthority) || "",
2162
- options: tn,
2162
+ options: nn,
2163
2163
  required: !0,
2164
2164
  error: null,
2165
2165
  horizontal: !0,
@@ -2168,7 +2168,7 @@ function g1(l) {
2168
2168
  D.target.id && a(D.target.id), An();
2169
2169
  }
2170
2170
  }), h) {
2171
- const D = tn.find(
2171
+ const D = nn.find(
2172
2172
  (J) => J.id === h
2173
2173
  );
2174
2174
  D && f.setValue && f.setValue(
@@ -2494,7 +2494,7 @@ function g1(l) {
2494
2494
  });
2495
2495
  let mn = 0;
2496
2496
  function jn(D) {
2497
- return qn(this, null, function* () {
2497
+ return sn(this, null, function* () {
2498
2498
  const J = ++mn;
2499
2499
  d.setError(null);
2500
2500
  try {
@@ -2508,7 +2508,7 @@ function g1(l) {
2508
2508
  if (J !== mn)
2509
2509
  return;
2510
2510
  if (d.setError(null), y.inputEl.value = hn.ten_cty || "", B.inputEl.value = hn.dia_chi || "", hn.cqthue_ql) {
2511
- const Pn = (Zn) => Zn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), gn = Pn(hn.cqthue_ql), kn = tn.find((Zn) => {
2511
+ const Pn = (Zn) => Zn.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), gn = Pn(hn.cqthue_ql), kn = nn.find((Zn) => {
2512
2512
  const rt = Pn(Zn.label);
2513
2513
  return rt.includes(gn) || gn.includes(rt);
2514
2514
  });
@@ -2580,7 +2580,7 @@ function g1(l) {
2580
2580
  const u0 = String(Ht.getDate()).padStart(2, "0"), Gt = String(Ht.getMonth() + 1).padStart(2, "0"), Rt = Ht.getFullYear();
2581
2581
  return `${u0}/${Gt}/${Rt}`;
2582
2582
  }, Pn = new Image();
2583
- Pn.src = URL.createObjectURL(D), Pn.onload = () => qn(null, null, function* () {
2583
+ Pn.src = URL.createObjectURL(D), Pn.onload = () => sn(null, null, function* () {
2584
2584
  try {
2585
2585
  const gn = yield l1(Pn).then((kn) => JSON.parse(kn).status !== "success" ? (Qn = !0, Wn = !1, hn(), qt(), null) : JSON.parse(kn).data);
2586
2586
  if (gn || J({ success: !1, reason: "No data detected" }), gn) {
@@ -2610,7 +2610,7 @@ function g1(l) {
2610
2610
  }
2611
2611
  function Fn(D, J, hn) {
2612
2612
  const on = new Image();
2613
- on.src = URL.createObjectURL(D), on.onload = () => qn(null, null, function* () {
2613
+ on.src = URL.createObjectURL(D), on.onload = () => sn(null, null, function* () {
2614
2614
  yield A1(on).then((Pn) => {
2615
2615
  var kn, Zn;
2616
2616
  const gn = JSON.parse(Pn);
@@ -2633,7 +2633,7 @@ function g1(l) {
2633
2633
  } = Vc({
2634
2634
  frontFile: n == null ? void 0 : n.idCard,
2635
2635
  backFile: n == null ? void 0 : n.idCardBack,
2636
- onFrontChange: (D) => qn(null, null, function* () {
2636
+ onFrontChange: (D) => sn(null, null, function* () {
2637
2637
  var hn, on;
2638
2638
  if (R = D, Fn(D, !0, !1), lt() || xt() || !A0()) {
2639
2639
  Qn = !1, Wn = !1, qt(), An();
@@ -2645,7 +2645,7 @@ function g1(l) {
2645
2645
  }
2646
2646
  Bt(D);
2647
2647
  }),
2648
- onBackChange: (D) => qn(null, null, function* () {
2648
+ onBackChange: (D) => sn(null, null, function* () {
2649
2649
  var on, Pn;
2650
2650
  if (cn = D, Fn(D, !1, !0), lt() || xt() || !Ft()) {
2651
2651
  Qn = !1, Wn = !1, qt(), An();
@@ -2730,19 +2730,19 @@ function g1(l) {
2730
2730
  "d",
2731
2731
  "M5.23 12.03a.75.75 0 011.06.02L10 15.94l7.71-7.71a.75.75 0 111.06 1.06l-8.24 8.24a.75.75 0 01-1.06 0L5.21 13.09a.75.75 0 01.02-1.06z"
2732
2732
  ), an.setAttribute("fill", "white"), j.appendChild(an), $.appendChild(j);
2733
- const nn = document.createElement("label");
2734
- nn.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", nn.appendChild(
2733
+ const tn = document.createElement("label");
2734
+ tn.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", tn.appendChild(
2735
2735
  document.createTextNode(g("agreeWith", "Tôi đồng ý với ") + " ")
2736
2736
  );
2737
- const sn = (D) => {
2737
+ const qn = (D) => {
2738
2738
  const J = document.createElement("button");
2739
2739
  return J.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", J.textContent = D, J.onclick = (hn) => {
2740
2740
  hn.preventDefault(), typeof c == "function" && c();
2741
2741
  }, J;
2742
2742
  }, Tn = Ic(e);
2743
- nn.appendChild(
2744
- sn(g("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2745
- ), nn.appendChild(document.createTextNode(` ${g("of", "của")} ${Tn}.`)), _.appendChild($), _.appendChild(nn), p.appendChild(_), $.addEventListener("click", () => {
2743
+ tn.appendChild(
2744
+ qn(g("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2745
+ ), tn.appendChild(document.createTextNode(` ${g("of", "của")} ${Tn}.`)), _.appendChild($), _.appendChild(tn), p.appendChild(_), $.addEventListener("click", () => {
2746
2746
  Z = !Z, Z ? ($.classList.add("wgt:bg-primary"), j.classList.remove("wgt:hidden")) : ($.classList.remove("wgt:bg-primary"), j.classList.add("wgt:hidden")), An();
2747
2747
  });
2748
2748
  const xn = document.createElement("div");
@@ -2836,7 +2836,7 @@ function g1(l) {
2836
2836
  D.selectEl.addEventListener("change", An);
2837
2837
  }), [N, L].forEach((D) => {
2838
2838
  D.addEventListener("change", An);
2839
- }), V.addEventListener("click", (D) => qn(null, null, function* () {
2839
+ }), V.addEventListener("click", (D) => sn(null, null, function* () {
2840
2840
  if (D.preventDefault(), !vn()) return;
2841
2841
  const J = d.getValue().trim();
2842
2842
  if (!xh(J)) {
@@ -2901,7 +2901,7 @@ function g1(l) {
2901
2901
  });
2902
2902
  }
2903
2903
  function r1(h) {
2904
- return qn(this, arguments, function* ({
2904
+ return sn(this, arguments, function* ({
2905
2905
  providerProps: t,
2906
2906
  formProps: n,
2907
2907
  isRenewal: e,
@@ -3164,10 +3164,11 @@ function x1({
3164
3164
  function d1({
3165
3165
  promotion: t,
3166
3166
  onSelect: n,
3167
- isDisabled: e = !1
3167
+ // isDisabled = false,
3168
+ isHidden: e = !1
3168
3169
  }) {
3169
3170
  const c = document.createElement("div");
3170
- c.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (e ? " wgt:opacity-50" : "");
3171
+ c.className = e ? "" : "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]";
3171
3172
  const h = document.createElement("div");
3172
3173
  h.className = "wgt:absolute wgt:top-0 wgt:left-0 wgt:z-0", h.innerHTML = `<svg width="177" height="108" viewBox="0 0 177 108" fill="none" xmlns="http://www.w3.org/2000/svg">
3173
3174
  <path fill-rule="evenodd" clip-rule="evenodd" d="M35.0743 3.375H37.1375V0H166.603C172.3 0 176.919 5.65535 176.919 12.6316V95.3684C176.919 102.345 172.3 108 166.603 108H37.1375V104.625H35.0743V108H10.316C4.61862 108 4.15411e-08 102.345 0 95.3684V93.4737C3.41841 93.4737 6.18958 90.0805 6.18958 85.8947C6.18958 81.709 3.41841 78.3158 0 78.3158V72C3.41841 72 6.18958 68.6068 6.18958 64.4211C6.18958 60.2353 3.41841 56.8421 0 56.8421V50.5263C3.41841 50.5263 6.18958 47.1331 6.18958 42.9474C6.18958 38.7616 3.41841 35.3684 0 35.3684V29.0526C3.41841 29.0526 6.18958 25.6594 6.18958 21.4737C6.18958 17.2879 3.41841 13.8947 0 13.8947V12.6316C0 5.65535 4.61862 0 10.316 0H35.0743V3.375ZM35.0743 97.875H37.1375V91.125H35.0743V97.875ZM35.0743 84.375H37.1375V77.625H35.0743V84.375ZM35.0743 70.875H37.1375V64.125H35.0743V70.875ZM35.0743 57.375H37.1375V50.625H35.0743V57.375ZM35.0743 43.875H37.1375V37.125H35.0743V43.875ZM35.0743 30.375H37.1375V23.625H35.0743V30.375ZM35.0743 16.875H37.1375V10.125H35.0743V16.875Z" fill="#C0D5FF"/>
@@ -3199,8 +3200,7 @@ function d1({
3199
3200
  let q = !t.isSelected;
3200
3201
  n(t.code, q);
3201
3202
  },
3202
- isIconCheckbox: !0,
3203
- disabled: e || t.isSelected
3203
+ isIconCheckbox: !0
3204
3204
  });
3205
3205
  s.className = "wgt:absolute wgt:top-0 wgt:right-0", u.appendChild(s), a.appendChild(u);
3206
3206
  const T = document.createElement("p");
@@ -3210,7 +3210,9 @@ function d1({
3210
3210
  "wgt:text-right",
3211
3211
  "wgt:text-[#335CFF]",
3212
3212
  "wgt:italic"
3213
- ].join(" "), T.textContent = `${g("validityPeriod")}: ${g("expiredDate")} ${t.expiredAt.split("T")[0]}`, a.appendChild(T), c.appendChild(h), c.appendChild(a), { container: c };
3213
+ ].join(" "), T.textContent = `${g("validityPeriod")}: ${g(
3214
+ "expiredDate"
3215
+ )} ${t.expiredAt.split("T")[0]}`, a.appendChild(T), c.appendChild(h), c.appendChild(a), { container: c };
3214
3216
  }
3215
3217
  function w1({
3216
3218
  value: t = "",
@@ -3240,8 +3242,8 @@ function p1({
3240
3242
  const i = document.createElement("span");
3241
3243
  i.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", i.innerText = "*", A.appendChild(i), o.appendChild(A);
3242
3244
  function s() {
3243
- return qn(this, null, function* () {
3244
- n && clearTimeout(n), e !== "" ? n = setTimeout(() => qn(null, null, function* () {
3245
+ return sn(this, null, function* () {
3246
+ n && clearTimeout(n), e !== "" ? n = setTimeout(() => sn(null, null, function* () {
3245
3247
  try {
3246
3248
  const v = e.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), p = yield Xc({ search: v, bank: t });
3247
3249
  p && (a = p), c && c();
@@ -3389,7 +3391,7 @@ function X1() {
3389
3391
  }
3390
3392
  const B1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFmSURBVHgBjVJLUsJAEH2dTAzu4gmEG+gNYKFxGU9gbqAuLaEqVVDllhuAJyDuQBfEE1CeADiBcaESyWTsJCKfIOXbzPT3db9qAkN5VQvG3iUUVUEoYxcUJlDJC+TcIy8IReY0zA4STKHp15gnYeYTKuCGLiQXrEJnAmK/MHts1Uh5jgXxMab648EaUcv2EUduyrJ1kJb9yvGKgDmzEFMhieoDB7vxBpQsDVEphMYdm/Y402LB0Dxpr9ob7Ff8HKZ/jTw/pNtBBaSeeS93OYLmpAyF4uapw0KmgtfI60/EWjShrftu4IgTH6jxFKSGyEQ0PkdI1BTJzF9SqS4QFRtqwkciezxJCPnVJnV3VkashtTgNf6JrEaqEYt/nItIqrhry+78JSLd9Cf5bxbST/KQH74weQ8Z50Fh8iFJ99dewDAsKO2Cqyp8O04uYrx/Dv3d4wU9LiwvqfQuhL5OnyhuSAFk5KbmN7eYmgg1dFx4AAAAAElFTkSuQmCC";
3391
3393
  function N1(B) {
3392
- return qn(this, arguments, function* ({
3394
+ return sn(this, arguments, function* ({
3393
3395
  onNext: t,
3394
3396
  onPrev: n,
3395
3397
  selectedInitPackage: e,
@@ -3460,18 +3462,18 @@ function N1(B) {
3460
3462
  Z = Ln, xn(), Y != null && Y.eInvoiceRegistration && (Y.eInvoiceRegistration.businessType = Z), _ == null || _(Z);
3461
3463
  }), { btn: Dn, inner: _n, textSpan: et, value: Ln };
3462
3464
  }
3463
- const nn = an(g("company") || "Doanh nghiệp", "company"), sn = an(
3465
+ const tn = an(g("company") || "Doanh nghiệp", "company"), qn = an(
3464
3466
  g("householdBusiness") || "Hộ kinh doanh",
3465
3467
  "household"
3466
3468
  );
3467
- j.appendChild(nn.btn), j.appendChild(sn.btn);
3469
+ j.appendChild(tn.btn), j.appendChild(qn.btn);
3468
3470
  function Tn(An, Ln) {
3469
3471
  An.btn.classList.toggle("wgt:bg-weak-50", Ln), An.inner.style.opacity = Ln ? "1" : "0";
3470
3472
  const Dn = An.inner.parentElement;
3471
3473
  Dn.classList.toggle("wgt:border-[#1e2a7b]", Ln), Dn.classList.toggle("wgt:border-[#D0D5DD]", !Ln), An.textSpan.style.color = Ln ? "#1e2a7b" : "", An.textSpan.classList.toggle("wgt:text-text-sub-600", !Ln);
3472
3474
  }
3473
3475
  function xn() {
3474
- Tn(nn, Z === "company"), Tn(sn, Z === "household");
3476
+ Tn(tn, Z === "company"), Tn(qn, Z === "household");
3475
3477
  }
3476
3478
  return xn(), {
3477
3479
  container: $,
@@ -3488,7 +3490,7 @@ function N1(B) {
3488
3490
  cn.className = "wgt:relative wgt:flex wgt:w-full wgt:h-full wgt:flex-col wgt:gap-4 wgt:py-6";
3489
3491
  const {
3490
3492
  container: V,
3491
- open: tn,
3493
+ open: nn,
3492
3494
  close: rn
3493
3495
  } = a0();
3494
3496
  cn.appendChild(V);
@@ -3555,9 +3557,9 @@ function N1(B) {
3555
3557
  dt.className = "wgt:flex wgt:justify-between wgt:gap-2", cn.appendChild(dt);
3556
3558
  const Nt = document.createElement("button");
3557
3559
  Nt.type = "button", Nt.innerText = g("back"), Nt.className = "wgt:bg-transparent wgt:text-primary wgt:hover:text-primary-dark wgt:hover:bg-transparent wgt:underline", Nt.addEventListener("click", n), dt.appendChild(Nt);
3558
- const Ft = (Y, _, Z, $) => qn(null, null, function* () {
3559
- tn();
3560
- const nn = x.eInvoiceRegistration, { isUsedEInvoiceBefore: en } = nn, j = mh(nn, ["isUsedEInvoiceBefore"]);
3560
+ const Ft = (Y, _, Z, $) => sn(null, null, function* () {
3561
+ nn();
3562
+ const tn = x.eInvoiceRegistration, { isUsedEInvoiceBefore: en } = tn, j = mh(tn, ["isUsedEInvoiceBefore"]);
3561
3563
  let an = [
3562
3564
  {
3563
3565
  code: _.code,
@@ -3573,8 +3575,8 @@ function N1(B) {
3573
3575
  code: Y.code,
3574
3576
  quantity: Y.quantity,
3575
3577
  isCashRegister: X
3576
- }), $.length > 0 && $.forEach((sn) => {
3577
- const Tn = r[sn];
3578
+ }), $.length > 0 && $.forEach((qn) => {
3579
+ const Tn = r[qn];
3578
3580
  Tn.reward.packageCodes.length > 0 && Tn.reward.packageCodes.forEach((xn) => {
3579
3581
  an.push({
3580
3582
  code: xn,
@@ -3584,7 +3586,7 @@ function N1(B) {
3584
3586
  });
3585
3587
  }), Q(an), k($);
3586
3588
  try {
3587
- const sn = yield Bc({
3589
+ const qn = yield Bc({
3588
3590
  eInvoiceRegistration: En({}, j),
3589
3591
  bank: x.bank,
3590
3592
  provider: q.route,
@@ -3598,9 +3600,9 @@ function N1(B) {
3598
3600
  promotionCodes: $,
3599
3601
  isRenew: y,
3600
3602
  isCashRegister: X
3601
- }), Tn = sn.orderId, xn = sn.amount || 0;
3603
+ }), Tn = qn.orderId, xn = qn.amount || 0;
3602
3604
  A(Tn), s ? s(xn) : console.warn("setOrderAmount is not defined!"), yield new Promise((vn) => setTimeout(vn, 100)), rn(), t();
3603
- } catch (sn) {
3605
+ } catch (qn) {
3604
3606
  n0(g("errorCreatingOrder") || "Failed to create order"), rn();
3605
3607
  return;
3606
3608
  }
@@ -3608,7 +3610,7 @@ function N1(B) {
3608
3610
  type: "button",
3609
3611
  title: g("next"),
3610
3612
  className: "wgt:text-text-primary wgt:bg-primary",
3611
- handleClick: () => qn(null, null, function* () {
3613
+ handleClick: () => sn(null, null, function* () {
3612
3614
  const Y = ln().find(
3613
3615
  (j) => j._id === C
3614
3616
  ), _ = z.find(
@@ -3637,7 +3639,7 @@ function N1(B) {
3637
3639
  });
3638
3640
  dt.appendChild(A0);
3639
3641
  function It() {
3640
- return qn(this, null, function* () {
3642
+ return sn(this, null, function* () {
3641
3643
  var Y, _;
3642
3644
  try {
3643
3645
  const [
@@ -3673,22 +3675,23 @@ function N1(B) {
3673
3675
  isActive: an.isActive,
3674
3676
  type: an.type,
3675
3677
  expiredAt: an.toDate,
3676
- isDisabled: !1,
3678
+ // isDisabled: false,
3679
+ isHidden: !1,
3677
3680
  reward: an.reward
3678
3681
  });
3679
3682
  }), Object.keys(r).length > 0 && (W = l ? [...l] : [], at())) : console.error("Failed to load promotions:", Z.reason), en.status === "fulfilled") {
3680
- H = (y ? en.value.filter((sn) => sn.renewPrice !== 0) : en.value) || [];
3681
- const nn = X ? I(
3683
+ H = (y ? en.value.filter((qn) => qn.renewPrice !== 0) : en.value) || [];
3684
+ const tn = X ? I(
3682
3685
  H,
3683
3686
  Xn.getValue()
3684
3687
  ) : H;
3685
- if ($n(nn || []), Jn(nn || []), en.value.length > 0) {
3686
- const sn = U(nn);
3687
- if (c ? C = c._id : sn ? C = sn._id : C = nn == null ? void 0 : nn[0]._id, X) {
3688
+ if ($n(tn || []), Jn(tn || []), en.value.length > 0) {
3689
+ const qn = U(tn);
3690
+ if (c ? C = c._id : qn ? C = qn._id : C = tn == null ? void 0 : tn[0]._id, X) {
3688
3691
  const Tn = Xn.getValue();
3689
3692
  S[Tn] = C;
3690
3693
  }
3691
- Jn(nn);
3694
+ Jn(tn);
3692
3695
  }
3693
3696
  nt();
3694
3697
  } else
@@ -3701,9 +3704,9 @@ function N1(B) {
3701
3704
  if (j.status === "fulfilled")
3702
3705
  if (z = j.value || [], z.length > 0) {
3703
3706
  const an = z.find(
3704
- (nn) => m.includes(nn.code)
3707
+ (tn) => m.includes(tn.code)
3705
3708
  );
3706
- y ? E = h ? h._id : null : E = h ? h._id : an ? an._id : y ? null : (_ = z == null ? void 0 : z.filter((nn) => !nn.isBonusPackage)[0]) == null ? void 0 : _._id;
3709
+ y ? E = h ? h._id : null : E = h ? h._id : an ? an._id : y ? null : (_ = z == null ? void 0 : z.filter((tn) => !tn.isBonusPackage)[0]) == null ? void 0 : _._id;
3707
3710
  } else {
3708
3711
  if (console.error(
3709
3712
  "Failed to load signature packages:",
@@ -3731,12 +3734,14 @@ function N1(B) {
3731
3734
  }
3732
3735
  function it(Y, _, Z) {
3733
3736
  const $ = Object.values(r).find(
3734
- (nn) => nn.bank === T && nn.appliedPackages.includes(Y)
3735
- ), en = $ && !$.isDisabled && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used, j = Object.values(r).find(
3736
- (nn) => nn.bank === T && nn.appliedPackages.includes(_)
3737
- ), an = j && !j.isDisabled && !(j.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && j.limit !== j.used;
3737
+ (tn) => tn.bank === T && tn.appliedPackages.includes(Y)
3738
+ ), en = m.includes(Y) || $ && // !currentPackagePromotion.isDisabled &&
3739
+ !$.isHidden && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used, j = Object.values(r).find(
3740
+ (tn) => tn.bank === T && tn.appliedPackages.includes(_)
3741
+ ), an = m.includes(_) || j && // !newPackagePromotion.isDisabled &&
3742
+ !j.isHidden && !(j.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && j.limit !== j.used && j.isActive;
3738
3743
  if (en && !an) {
3739
- const { container: nn, open: sn } = Mt({
3744
+ const { container: tn, open: qn } = Mt({
3740
3745
  message: g("errorDiscountPackage"),
3741
3746
  description: g("errorDiscountPackageDes"),
3742
3747
  okLabel: g("ok"),
@@ -3746,7 +3751,7 @@ function N1(B) {
3746
3751
  isSuccess: !1,
3747
3752
  theme: T
3748
3753
  });
3749
- cn.appendChild(nn), sn();
3754
+ cn.appendChild(tn), qn();
3750
3755
  } else
3751
3756
  Z();
3752
3757
  }
@@ -3842,15 +3847,15 @@ function N1(B) {
3842
3847
  var vn;
3843
3848
  const j = r[en];
3844
3849
  if (j.bank !== T) {
3845
- j.isDisabled = !0, W = W.filter(
3850
+ j.isHidden = !0, W = W.filter(
3846
3851
  (An) => An !== j.code
3847
3852
  );
3848
3853
  return;
3849
3854
  }
3850
- const an = j.expiredAt < (/* @__PURE__ */ new Date()).toISOString(), nn = j.limit <= j.used, sn = !j.isActive, xn = ((vn = j.appliedPackages) == null ? void 0 : vn.some(
3855
+ const an = j.expiredAt < (/* @__PURE__ */ new Date()).toISOString(), tn = j.limit <= j.used, qn = !j.isActive, xn = ((vn = j.appliedPackages) == null ? void 0 : vn.some(
3851
3856
  (An) => $.includes(An)
3852
- )) && !an && !nn && !sn;
3853
- j.isDisabled = !xn, xn ? xn && !W.includes(j.code) && W.push(j.code) : W = W.filter(
3857
+ )) && !an && !tn && !qn;
3858
+ j.isHidden = !xn, xn ? xn && !W.includes(j.code) && W.push(j.code) : W = W.filter(
3854
3859
  (An) => An !== j.code
3855
3860
  );
3856
3861
  }), at();
@@ -3866,7 +3871,7 @@ function N1(B) {
3866
3871
  }
3867
3872
  function Rn() {
3868
3873
  if (Object.values(r).filter(
3869
- (nn) => nn.bank === T
3874
+ (tn) => tn.bank === T
3870
3875
  ).length === 0) {
3871
3876
  mn.contains(zn) && mn.removeChild(zn);
3872
3877
  return;
@@ -3877,20 +3882,20 @@ function N1(B) {
3877
3882
  const Z = document.createElement("div");
3878
3883
  Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
3879
3884
  const $ = document.createElement("div");
3880
- $.className = "wgt:flex wgt:min-w-[500px] wgt:h-11 wgt:items-center wgt:gap-3 wgt:px-3 wgt:py-2 wgt:rounded-lg wgt:bg-white wgt:border wgt:border-[#E4E7EC] wgt:@max-2xl:min-w-full wgt:@max-2xl:flex-wrap wgt:@max-2xl:h-fit", Z.appendChild($), W && W.length > 0 && W.filter((sn) => {
3885
+ $.className = "wgt:flex wgt:min-w-[500px] wgt:h-11 wgt:items-center wgt:gap-3 wgt:px-3 wgt:py-2 wgt:rounded-lg wgt:bg-white wgt:border wgt:border-[#E4E7EC] wgt:@max-2xl:min-w-full wgt:@max-2xl:flex-wrap wgt:@max-2xl:h-fit", Z.appendChild($), W && W.length > 0 && W.filter((qn) => {
3881
3886
  const Tn = Object.values(r).find(
3882
- (xn) => xn.code === sn
3887
+ (xn) => xn.code === qn
3883
3888
  );
3884
3889
  return Tn && Tn.bank === T;
3885
- }).forEach((sn) => {
3890
+ }).forEach((qn) => {
3886
3891
  const Tn = document.createElement("div");
3887
- Tn.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", Tn.innerText = sn;
3892
+ Tn.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", Tn.innerText = qn;
3888
3893
  const xn = vt({
3889
3894
  type: "button",
3890
3895
  title: "x",
3891
3896
  handleClick: () => {
3892
3897
  W = W.filter(
3893
- (vn) => vn !== sn
3898
+ (vn) => vn !== qn
3894
3899
  ), Rn(), In();
3895
3900
  }
3896
3901
  });
@@ -3911,27 +3916,27 @@ function N1(B) {
3911
3916
  Z.appendChild(en), zn.appendChild(Z);
3912
3917
  const j = document.createElement("div");
3913
3918
  j.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", zn.appendChild(j);
3914
- const an = Object.values(r).filter(
3915
- (nn) => nn.bank === T
3916
- );
3919
+ const an = W.map(
3920
+ (tn) => Object.values(r).find(
3921
+ (qn) => qn.code === tn && qn.bank === T
3922
+ )
3923
+ ).filter(Boolean);
3917
3924
  if (an.length > 0)
3918
- an.forEach((nn) => {
3919
- const { container: sn } = d1({
3920
- promotion: Kn(En({}, nn), {
3921
- isSelected: W.includes(nn.code)
3922
- }),
3925
+ an.forEach((tn) => {
3926
+ const { container: qn } = d1({
3927
+ promotion: Kn(En({}, tn), { isSelected: !0 }),
3923
3928
  onSelect: (Tn, xn) => {
3924
- xn ? W.push(Tn) : W = W.filter(
3929
+ xn || (W = W.filter(
3925
3930
  (vn) => vn !== Tn
3926
- ), Rn(), In();
3931
+ ), Rn(), In());
3927
3932
  },
3928
- isDisabled: nn.isDisabled || nn.expiredAt < (/* @__PURE__ */ new Date()).toISOString() || nn.limit === nn.used
3933
+ isHidden: !1
3929
3934
  });
3930
- j.appendChild(sn);
3935
+ j.appendChild(qn);
3931
3936
  });
3932
3937
  else {
3933
- const nn = document.createElement("span");
3934
- nn.className = "wgt:text-text-sub-600", nn.innerText = g("noPromotionFound"), zn.appendChild(nn);
3938
+ const tn = document.createElement("span");
3939
+ tn.className = "wgt:text-text-sub-600", tn.innerText = g("noPromotionSelected") || "Chưa chọn khuyến mãi", zn.appendChild(tn);
3935
3940
  }
3936
3941
  }
3937
3942
  function In() {
@@ -4106,7 +4111,7 @@ function N1(B) {
4106
4111
  "package"
4107
4112
  )} ${(Vn = (Nn = O == null ? void 0 : O.reward) == null ? void 0 : Nn.packageCodes) == null ? void 0 : Vn.join(", ")}`, fn.style.color = "#12B76A") : fn.innerText = "", un.appendChild(fn), Fn.appendChild(un);
4108
4113
  });
4109
- const $ = !y && F.length > 0 && !(Y != null && Y.withoutInitialFee) ? ((Kt = F[0]) == null ? void 0 : Kt.price) * N : 0, en = Tt(C), j = en ? y ? (Yt = en.renewPrice) != null ? Yt : 0 : (Ot = en.price) != null ? Ot : 0 : 0, an = en ? j * en.limit * L : 0, nn = R(E), sn = nn ? nn.price * nn.limit * M : 0, Tn = $ + an + sn, xn = Math.min(Z, Tn), vn = Math.max(Tn - xn, 0);
4114
+ const $ = !y && F.length > 0 && !(Y != null && Y.withoutInitialFee) ? ((Kt = F[0]) == null ? void 0 : Kt.price) * N : 0, en = Tt(C), j = en ? y ? (Yt = en.renewPrice) != null ? Yt : 0 : (Ot = en.price) != null ? Ot : 0 : 0, an = en ? j * en.limit * L : 0, tn = R(E), qn = tn ? tn.price * tn.limit * M : 0, Tn = $ + an + qn, xn = Math.min(Z, Tn), vn = Math.max(Tn - xn, 0);
4110
4115
  i(vn);
4111
4116
  {
4112
4117
  const O = document.createElement("tr");
@@ -4263,8 +4268,8 @@ function k1({
4263
4268
  const x = document.createElement("p");
4264
4269
  x.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
4265
4270
  const w = (V) => {
4266
- const tn = Math.floor(V / 60).toString().padStart(2, "0"), rn = (V % 60).toString().padStart(2, "0");
4267
- return `${tn}:${rn}`;
4271
+ const nn = Math.floor(V / 60).toString().padStart(2, "0"), rn = (V % 60).toString().padStart(2, "0");
4272
+ return `${nn}:${rn}`;
4268
4273
  }, Q = () => {
4269
4274
  x.innerHTML = `${g(
4270
4275
  "completePaymentIn"
@@ -4299,21 +4304,21 @@ function k1({
4299
4304
  if (b.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", b.innerText = n ? String(n.code) : "", H.appendChild(I), H.appendChild(b), d.appendChild(H), !A) {
4300
4305
  const V = document.createElement("div");
4301
4306
  V.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4302
- const tn = document.createElement("h4");
4303
- tn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", tn.innerText = g("digitalSignaturePackage");
4307
+ const nn = document.createElement("h4");
4308
+ nn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", nn.innerText = g("digitalSignaturePackage");
4304
4309
  const rn = document.createElement("span");
4305
- rn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", rn.innerText = e ? String(e.code) : "", V.appendChild(tn), V.appendChild(rn), d.appendChild(V);
4310
+ rn.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", rn.innerText = e ? String(e.code) : "", V.appendChild(nn), V.appendChild(rn), d.appendChild(V);
4306
4311
  }
4307
4312
  if (a && a.length > 0) {
4308
4313
  const V = document.createElement("div");
4309
4314
  V.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
4310
- const tn = document.createElement("h4");
4311
- tn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", tn.innerText = g("promotion");
4315
+ const nn = document.createElement("h4");
4316
+ nn.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", nn.innerText = g("promotion");
4312
4317
  const rn = document.createElement("div");
4313
4318
  rn.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", a.forEach((Xn) => {
4314
4319
  const mn = document.createElement("div");
4315
4320
  mn.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", mn.innerText = Xn, rn.appendChild(mn);
4316
- }), V.appendChild(tn), V.appendChild(rn), d.appendChild(V);
4321
+ }), V.appendChild(nn), V.appendChild(rn), d.appendChild(V);
4317
4322
  }
4318
4323
  const S = document.createElement("hr");
4319
4324
  d.appendChild(S);
@@ -4358,7 +4363,7 @@ function k1({
4358
4363
  const R = vt({
4359
4364
  title: i ? g("confirmFreeOrder") || "Xác nhận đơn hàng" : g("cancelTransaction") || "Hủy giao dịch",
4360
4365
  className: i ? "wgt:flex-1 wgt:py-3 wgt:rounded-lg wgt:bg-primary wgt:text-white hover:wgt:bg-primary-dark" : "wgt:w-full wgt:py-3 wgt:rounded-lg wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary hover:wgt:bg-transparent",
4361
- handleClick: i ? () => qn(null, null, function* () {
4366
+ handleClick: i ? () => sn(null, null, function* () {
4362
4367
  R.disabled = !0;
4363
4368
  const V = R.textContent;
4364
4369
  R.textContent = g("processing") || "Đang xử lý...", U();
@@ -4367,7 +4372,7 @@ function k1({
4367
4372
  /bg-primary|bg-\[\#0066cc\]/g,
4368
4373
  "bg-green-500"
4369
4374
  ), R.textContent = g("confirmed") || "Đã xác nhận";
4370
- const tn = Mt({
4375
+ const nn = Mt({
4371
4376
  message: g("freeOrderSuccess") || "Thông tin đăng ký đã được ghi nhận thành công!",
4372
4377
  okLabel: g("next") || "Tiếp tục",
4373
4378
  theme: "bvb",
@@ -4377,8 +4382,8 @@ function k1({
4377
4382
  clearInterval(q), o(), G();
4378
4383
  }
4379
4384
  });
4380
- s.appendChild(tn.container), tn.open();
4381
- } catch (tn) {
4385
+ s.appendChild(nn.container), nn.open();
4386
+ } catch (nn) {
4382
4387
  R.disabled = !1, R.textContent = V;
4383
4388
  const rn = Mt({
4384
4389
  message: "Xác nhận đơn hàng thất bại. Vui lòng thử lại.",
@@ -4426,28 +4431,28 @@ function k1({
4426
4431
  },
4427
4432
  setTotalAmountText(V) {
4428
4433
  h = V;
4429
- const tn = s.querySelector(".wgt:text-2xl.wgt:font-bold");
4430
- tn && (tn.innerText = typeof V == "number" ? V.toLocaleString("vi-VN") + " VND" : V);
4434
+ const nn = s.querySelector(".wgt:text-2xl.wgt:font-bold");
4435
+ nn && (nn.innerText = typeof V == "number" ? V.toLocaleString("vi-VN") + " VND" : V);
4431
4436
  },
4432
4437
  setSelectedProvider(V) {
4433
4438
  t = V;
4434
- const tn = s.querySelector("img");
4435
- tn && (V != null && V.logoUrl) && (tn.src = V.logoUrl, tn.alt = V.name || "");
4439
+ const nn = s.querySelector("img");
4440
+ nn && (V != null && V.logoUrl) && (nn.src = V.logoUrl, nn.alt = V.name || "");
4436
4441
  },
4437
4442
  setSelectedInvoicePackage(V) {
4438
4443
  n = V;
4439
- const tn = s.querySelectorAll(
4444
+ const nn = s.querySelectorAll(
4440
4445
  ".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
4441
4446
  )[0];
4442
- tn && (tn.innerText = V ? String(V.code || "") : "");
4447
+ nn && (nn.innerText = V ? String(V.code || "") : "");
4443
4448
  },
4444
4449
  setSelectedSignaturePackage(V) {
4445
4450
  if (A) return;
4446
4451
  e = V;
4447
- const tn = s.querySelectorAll(
4452
+ const nn = s.querySelectorAll(
4448
4453
  ".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
4449
4454
  );
4450
- tn[1] && (tn[1].innerText = V ? String(V.code || "") : "");
4455
+ nn[1] && (nn[1].innerText = V ? String(V.code || "") : "");
4451
4456
  }
4452
4457
  };
4453
4458
  }
@@ -5763,8 +5768,8 @@ function R1() {
5763
5768
  let M = 0;
5764
5769
  const K = new Uint8Array(B.buffer);
5765
5770
  for (let V = 0; V < S; V++) {
5766
- const tn = V < E ? z : F;
5767
- N[V] = K.slice(P, P + tn), L[V] = m.encode(N[V]), P += tn, M = Math.max(M, tn);
5771
+ const nn = V < E ? z : F;
5772
+ N[V] = K.slice(P, P + nn), L[V] = m.encode(N[V]), P += nn, M = Math.max(M, nn);
5768
5773
  }
5769
5774
  const U = new Uint8Array(H);
5770
5775
  let G = 0, R, cn;
@@ -6193,7 +6198,7 @@ function ca({
6193
6198
  }
6194
6199
  const aa = 5;
6195
6200
  function ea(o) {
6196
- return qn(this, arguments, function* ({
6201
+ return sn(this, arguments, function* ({
6197
6202
  onNext: t,
6198
6203
  onPrev: n,
6199
6204
  step: e,
@@ -6265,7 +6270,7 @@ function ea(o) {
6265
6270
  }), n && (clearInterval(s), s = null, n());
6266
6271
  }), z.appendChild(F), B.appendChild(z);
6267
6272
  function r() {
6268
- return qn(this, null, function* () {
6273
+ return sn(this, null, function* () {
6269
6274
  const M = (h == null ? void 0 : h.totalAmountText) || 0;
6270
6275
  w = M, x = M === 0, On(Yn.STEP3_VIEWED, {
6271
6276
  orderId: T,
@@ -6277,7 +6282,7 @@ function ea(o) {
6277
6282
  });
6278
6283
  }
6279
6284
  function m(M) {
6280
- return qn(this, null, function* () {
6285
+ return sn(this, null, function* () {
6281
6286
  var K, U, G, R;
6282
6287
  if (!(q || x)) {
6283
6288
  q = !0, X();
@@ -6343,7 +6348,7 @@ function ea(o) {
6343
6348
  });
6344
6349
  }
6345
6350
  function P() {
6346
- x || s || (s = setInterval(() => qn(null, null, function* () {
6351
+ x || s || (s = setInterval(() => sn(null, null, function* () {
6347
6352
  var M, K, U, G, R, cn;
6348
6353
  try {
6349
6354
  const V = yield kc(T);
@@ -6375,7 +6380,7 @@ function ea(o) {
6375
6380
  return;
6376
6381
  }
6377
6382
  clearInterval(s), s = null;
6378
- const tn = p ? Math.round((Date.now() - p) / 1e3) : null;
6383
+ const nn = p ? Math.round((Date.now() - p) / 1e3) : null;
6379
6384
  V.paymentStatus === "paid" ? _t.success({
6380
6385
  orderId: T,
6381
6386
  amount: w,
@@ -6383,7 +6388,7 @@ function ea(o) {
6383
6388
  paymentMethod: k,
6384
6389
  provider: Q,
6385
6390
  theme: u,
6386
- duration: tn
6391
+ duration: nn
6387
6392
  }) : _t.failed({
6388
6393
  orderId: T,
6389
6394
  amount: w,
@@ -6609,7 +6614,7 @@ function ga() {
6609
6614
  };
6610
6615
  }
6611
6616
  function Rh(c) {
6612
- return qn(this, arguments, function* ({
6617
+ return sn(this, arguments, function* ({
6613
6618
  orderId: t,
6614
6619
  callbackUrl: n,
6615
6620
  onCompleteSignature: e
@@ -6877,7 +6882,7 @@ function da({
6877
6882
  return { container: q, open: b, close: S };
6878
6883
  }
6879
6884
  function I0(t, n, e, c = !1, h = "ocb", a = "") {
6880
- return qn(this, null, function* () {
6885
+ return sn(this, null, function* () {
6881
6886
  var u, o;
6882
6887
  try {
6883
6888
  if (h !== "bvb") {
@@ -6898,7 +6903,7 @@ function I0(t, n, e, c = !1, h = "ocb", a = "") {
6898
6903
  // },
6899
6904
  onCancel: () => {
6900
6905
  },
6901
- onConfirm: () => qn(null, null, function* () {
6906
+ onConfirm: () => sn(null, null, function* () {
6902
6907
  const q = yield t0(t, n);
6903
6908
  e(!1, q);
6904
6909
  }),
@@ -6914,7 +6919,7 @@ function I0(t, n, e, c = !1, h = "ocb", a = "") {
6914
6919
  });
6915
6920
  }
6916
6921
  function Xa(t, n, e, c, h, a) {
6917
- return qn(this, null, function* () {
6922
+ return sn(this, null, function* () {
6918
6923
  var L, M;
6919
6924
  const o = [
6920
6925
  { name: "M-Invoice", route: "m-invoice", logoUrl: dc },
@@ -7074,7 +7079,7 @@ function Xa(t, n, e, c, h, a) {
7074
7079
  });
7075
7080
  }
7076
7081
  function z(K, U) {
7077
- return qn(this, null, function* () {
7082
+ return sn(this, null, function* () {
7078
7083
  K ? w = Kn(En({}, w), {
7079
7084
  eInvoiceRegistration: {
7080
7085
  organization: En({}, K.organization),
@@ -7088,7 +7093,7 @@ function Xa(t, n, e, c, h, a) {
7088
7093
  });
7089
7094
  }
7090
7095
  function F(K) {
7091
- return qn(this, null, function* () {
7096
+ return sn(this, null, function* () {
7092
7097
  if (K === 1) {
7093
7098
  const { container: U } = yield r1({
7094
7099
  isNewCustomer: k,
@@ -7096,13 +7101,13 @@ function Xa(t, n, e, c, h, a) {
7096
7101
  providerProps: {
7097
7102
  providers: o,
7098
7103
  selectedRoute: x.route,
7099
- onProviderChange: (G) => qn(null, null, function* () {
7104
+ onProviderChange: (G) => sn(null, null, function* () {
7100
7105
  var R, cn;
7101
7106
  x = G, yield I0(
7102
7107
  G.route,
7103
7108
  (cn = (R = w == null ? void 0 : w.eInvoiceRegistration) == null ? void 0 : R.organization) == null ? void 0 : cn.taxCode,
7104
- (V, tn) => {
7105
- k = V, z(tn);
7109
+ (V, nn) => {
7110
+ k = V, z(nn);
7106
7111
  },
7107
7112
  a,
7108
7113
  h,
@@ -7158,7 +7163,7 @@ function Xa(t, n, e, c, h, a) {
7158
7163
  isNewCustomer: k
7159
7164
  });
7160
7165
  const { container: U } = yield N1({
7161
- onNext: () => qn(null, null, function* () {
7166
+ onNext: () => sn(null, null, function* () {
7162
7167
  On(Yn.STEP2_COMPLETED, {
7163
7168
  theme: h,
7164
7169
  provider: x == null ? void 0 : x.route,
@@ -7274,7 +7279,7 @@ function Xa(t, n, e, c, h, a) {
7274
7279
  Q && (q(r), m()), yield I0(
7275
7280
  x.route,
7276
7281
  (M = (L = w == null ? void 0 : w.eInvoiceRegistration) == null ? void 0 : L.organization) == null ? void 0 : M.taxCode,
7277
- (K, U) => qn(null, null, function* () {
7282
+ (K, U) => sn(null, null, function* () {
7278
7283
  Q = !1, k = K, z(U), i.updateTitle(
7279
7284
  a ? g("eInvoiceRenewal") : g("eInvoiceRegister")
7280
7285
  );
@@ -7295,12 +7300,12 @@ function Xa(t, n, e, c, h, a) {
7295
7300
  });
7296
7301
  }
7297
7302
  function Ba(t, n, e, c) {
7298
- return qn(this, null, function* () {
7303
+ return sn(this, null, function* () {
7299
7304
  const { container: h, setContent: a } = ga(), u = e == null ? void 0 : e.orderId, o = (e == null ? void 0 : e.callbackUrl) || `${window.location.origin}/dashboard`, { container: A } = yield Rh({
7300
7305
  orderId: u,
7301
7306
  callbackUrl: o,
7302
7307
  // onCompleteSignature,
7303
- onCompleteSignature: (...q) => qn(null, null, function* () {
7308
+ onCompleteSignature: (...q) => sn(null, null, function* () {
7304
7309
  c && (yield c(...q)), T();
7305
7310
  })
7306
7311
  });