@invoice-sdk/widget 1.98.1 → 1.98.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.
@@ -35,7 +35,7 @@ var W = (g, A, E) => new Promise((B, C) => {
35
35
  }, n = (I) => I.done ? B(I.value) : Promise.resolve(I.value).then(Q, t);
36
36
  n((E = E.apply(g, A)).next());
37
37
  });
38
- import { t as a, g as rB, a as wQ, b as eQ, C as oQ, G as aQ, c as uQ, d as PB, e as ig, f as DQ, h as iQ, i as Ng, O as sQ, s as Dg, j as qB, k as fQ, l as mQ, m as rQ, n as PQ, o as qQ, p as vQ, v as MQ } from "./index-DgODuxHr.js";
38
+ import { t as a, g as rB, a as wQ, b as eQ, C as oQ, G as aQ, c as uQ, d as PB, e as ig, f as DQ, h as iQ, i as Ng, O as sQ, s as Dg, j as qB, k as fQ, l as mQ, m as rQ, n as PQ, o as qQ, p as vQ, v as MQ } from "./index-C5nLxIyn.js";
39
39
  import { g as ZC } from "./_commonjsHelpers-bAxELxBV.js";
40
40
  function cC({ steps: g = [], currentStep: A = 1 } = {}) {
41
41
  const E = document.createElement("div");
@@ -937,27 +937,27 @@ const RQ = ({
937
937
  t.forEach((P) => {
938
938
  Y.append(new Option(d[P], P));
939
939
  }), v.appendChild(Y), c.append(v);
940
- const X = document.createElement("div");
941
- X.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
940
+ const F = document.createElement("div");
941
+ F.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
942
942
  const j = document.createElement("span");
943
943
  j.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", j.textContent = a("formDifferentiationCode");
944
944
  const U = document.createElement("span");
945
- U.className = "wgt:text-red-500 wgt:ml-1", U.innerText = "*", j.appendChild(U), X.appendChild(j);
946
- const F = document.createElement("input");
947
- F.type = "text", F.maxLength = 2, F.placeholder = "AB", F.defaultValue = "YY", F.className = `${f} wgt:@max-2xl:w-full wgt:w-16`, F.title = a("customLettersTooltip"), X.appendChild(F), c.append(X);
945
+ U.className = "wgt:text-red-500 wgt:ml-1", U.innerText = "*", j.appendChild(U), F.appendChild(j);
946
+ const O = document.createElement("input");
947
+ O.type = "text", O.maxLength = 2, O.placeholder = "AB", O.defaultValue = "YY", O.className = `${f} wgt:@max-2xl:w-full wgt:w-16`, O.title = a("customLettersTooltip"), F.appendChild(O), c.append(F);
948
948
  function e() {
949
- return D.value + q.value + m.value + Y.value + F.value.toUpperCase();
949
+ return D.value + q.value + m.value + Y.value + O.value.toUpperCase();
950
950
  }
951
951
  function h() {
952
- F.value = F.value.toUpperCase().replace(/[^A-Z]/g, "").slice(0, 2), typeof g == "function" && g(e());
952
+ O.value = O.value.toUpperCase().replace(/[^A-Z]/g, "").slice(0, 2), typeof g == "function" && g(e());
953
953
  }
954
954
  return [D, q, m, Y].forEach(
955
955
  (P) => P.addEventListener("change", h)
956
- ), F.addEventListener("input", h), F.addEventListener("blur", h), /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(A) ? (D.value = A[0], q.value = A[1], m.value = A.slice(2, 4), Y.value = A[4], F.value = A.slice(5, 7)) : (D.value = "1", q.value = "C", Y.value = "T", F.value = "YY"), h(), {
956
+ ), O.addEventListener("input", h), O.addEventListener("blur", h), /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(A) ? (D.value = A[0], q.value = A[1], m.value = A.slice(2, 4), Y.value = A[4], O.value = A.slice(5, 7)) : (D.value = "1", q.value = "C", Y.value = "T", O.value = "YY"), h(), {
957
957
  container: n,
958
958
  getValue: e,
959
959
  setValue: (P) => {
960
- typeof P != "string" || P.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(P) && (D.value = P[0], q.value = P[1], m.value = P.slice(2, 4), Y.value = P[4], F.value = P.slice(5, 7), h());
960
+ typeof P != "string" || P.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(P) && (D.value = P[0], q.value = P[1], m.value = P.slice(2, 4), Y.value = P[4], O.value = P.slice(5, 7), h());
961
961
  }
962
962
  };
963
963
  }, bA = wQ.create({
@@ -1174,43 +1174,43 @@ function OQ() {
1174
1174
  return e.isDisabled && h.push("is-disabled"), e.isToday && h.push("is-today"), e.isSelected && (h.push("is-selected"), P = "true"), e.hasEvent && h.push("has-event"), e.isInRange && h.push("is-inrange"), e.isStartRange && h.push("is-startrange"), e.isEndRange && h.push("is-endrange"), '<td data-day="' + e.day + '" class="' + h.join(" ") + '" aria-selected="' + P + '"><button class="pika-button pika-day" type="button" data-pika-year="' + e.year + '" data-pika-month="' + e.month + '" data-pika-day="' + e.day + '">' + e.day + "</button></td>";
1175
1175
  }, R = function(e, h) {
1176
1176
  e.setHours(0, 0, 0, 0);
1177
- var P = e.getDate(), l = e.getDay(), N = h, O = N - 1, y = 7, b = function(PA) {
1177
+ var P = e.getDate(), l = e.getDay(), N = h, G = N - 1, y = 7, b = function(PA) {
1178
1178
  return (PA + y - 1) % y;
1179
1179
  };
1180
- e.setDate(P + O - b(l));
1181
- var _ = new Date(e.getFullYear(), 0, N), S = 1440 * 60 * 1e3, nA = (e.getTime() - _.getTime()) / S, tA = 1 + Math.round((nA - O + b(_.getDay())) / y);
1180
+ e.setDate(P + G - b(l));
1181
+ var _ = new Date(e.getFullYear(), 0, N), S = 1440 * 60 * 1e3, nA = (e.getTime() - _.getTime()) / S, tA = 1 + Math.round((nA - G + b(_.getDay())) / y);
1182
1182
  return tA;
1183
1183
  }, H = function(e, h, P, l) {
1184
- var N = new Date(P, h, e), O = B ? E(N).isoWeek() : R(N, l);
1185
- return '<td class="pika-week">' + O + "</td>";
1184
+ var N = new Date(P, h, e), G = B ? E(N).isoWeek() : R(N, l);
1185
+ return '<td class="pika-week">' + G + "</td>";
1186
1186
  }, Y = function(e, h, P, l) {
1187
1187
  return '<tr class="pika-row' + (P ? " pick-whole-week" : "") + (l ? " is-selected" : "") + '">' + (h ? e.reverse() : e).join("") + "</tr>";
1188
1188
  }, d = function(e) {
1189
1189
  return "<tbody>" + e.join("") + "</tbody>";
1190
- }, X = function(e) {
1190
+ }, F = function(e) {
1191
1191
  var h, P = [];
1192
1192
  for (e.showWeekNumber && P.push("<th></th>"), h = 0; h < 7; h++)
1193
1193
  P.push('<th scope="col"><abbr title="' + m(e, h) + '">' + m(e, h, !0) + "</abbr></th>");
1194
1194
  return "<thead><tr>" + (e.isRTL ? P.reverse() : P).join("") + "</tr></thead>";
1195
- }, j = function(e, h, P, l, N, O) {
1196
- var y, b, _, S = e._o, nA = P === S.minYear, tA = P === S.maxYear, PA = '<div id="' + O + '" class="pika-title" role="heading" aria-live="assertive">', RA, XA, vA = !0, YA = !0;
1195
+ }, j = function(e, h, P, l, N, G) {
1196
+ var y, b, _, S = e._o, nA = P === S.minYear, tA = P === S.maxYear, PA = '<div id="' + G + '" class="pika-title" role="heading" aria-live="assertive">', RA, XA, vA = !0, YA = !0;
1197
1197
  for (_ = [], y = 0; y < 12; y++)
1198
1198
  _.push('<option value="' + (P === N ? y - h : 12 + y - h) + '"' + (y === l ? ' selected="selected"' : "") + (nA && y < S.minMonth || tA && y > S.maxMonth ? ' disabled="disabled"' : "") + ">" + S.i18n.months[y] + "</option>");
1199
1199
  for (RA = '<div class="pika-label">' + S.i18n.months[l] + '<select class="pika-select pika-select-month" tabindex="-1">' + _.join("") + "</select></div>", o(S.yearRange) ? (y = S.yearRange[0], b = S.yearRange[1] + 1) : (y = P - S.yearRange, b = 1 + P + S.yearRange), _ = []; y < b && y <= S.maxYear; y++)
1200
1200
  y >= S.minYear && _.push('<option value="' + y + '"' + (y === P ? ' selected="selected"' : "") + ">" + y + "</option>");
1201
1201
  return XA = '<div class="pika-label">' + P + S.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + _.join("") + "</select></div>", S.showMonthAfterYear ? PA += XA + RA : PA += RA + XA, nA && (l === 0 || S.minMonth >= l) && (vA = !1), tA && (l === 11 || S.maxMonth <= l) && (YA = !1), h === 0 && (PA += '<button class="pika-prev' + (vA ? "" : " is-disabled") + '" type="button">' + S.i18n.previousMonth + "</button>"), h === e._o.numberOfMonths - 1 && (PA += '<button class="pika-next' + (YA ? "" : " is-disabled") + '" type="button">' + S.i18n.nextMonth + "</button>"), PA += "</div>";
1202
1202
  }, U = function(e, h, P) {
1203
- return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + P + '">' + X(e) + d(h) + "</table>";
1204
- }, F = function(e) {
1203
+ return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + P + '">' + F(e) + d(h) + "</table>";
1204
+ }, O = function(e) {
1205
1205
  var h = this, P = h.config(e);
1206
1206
  h._onMouseDown = function(N) {
1207
1207
  if (h._v) {
1208
1208
  N = N || window.event;
1209
- var O = N.target || N.srcElement;
1210
- if (O)
1211
- if (c(O, "is-disabled") || (c(O, "pika-button") && !c(O, "is-empty") && !c(O.parentNode, "is-disabled") ? (h.setDate(new Date(O.getAttribute("data-pika-year"), O.getAttribute("data-pika-month"), O.getAttribute("data-pika-day"))), P.bound && t(function() {
1209
+ var G = N.target || N.srcElement;
1210
+ if (G)
1211
+ if (c(G, "is-disabled") || (c(G, "pika-button") && !c(G, "is-empty") && !c(G.parentNode, "is-disabled") ? (h.setDate(new Date(G.getAttribute("data-pika-year"), G.getAttribute("data-pika-month"), G.getAttribute("data-pika-day"))), P.bound && t(function() {
1212
1212
  h.hide(), P.blurFieldOnSelect && P.field && P.field.blur();
1213
- }, 100)) : c(O, "pika-prev") ? h.prevMonth() : c(O, "pika-next") && h.nextMonth()), c(O, "pika-select"))
1213
+ }, 100)) : c(G, "pika-prev") ? h.prevMonth() : c(G, "pika-next") && h.nextMonth()), c(G, "pika-select"))
1214
1214
  h._c = !0;
1215
1215
  else if (N.preventDefault)
1216
1216
  N.preventDefault();
@@ -1219,8 +1219,8 @@ function OQ() {
1219
1219
  }
1220
1220
  }, h._onChange = function(N) {
1221
1221
  N = N || window.event;
1222
- var O = N.target || N.srcElement;
1223
- O && (c(O, "pika-select-month") ? h.gotoMonth(O.value) : c(O, "pika-select-year") && h.gotoYear(O.value));
1222
+ var G = N.target || N.srcElement;
1223
+ G && (c(G, "pika-select-month") ? h.gotoMonth(G.value) : c(G, "pika-select-year") && h.gotoYear(G.value));
1224
1224
  }, h._onKeyChange = function(N) {
1225
1225
  if (N = N || window.event, h.isVisible())
1226
1226
  switch (N.keyCode) {
@@ -1254,8 +1254,8 @@ function OQ() {
1254
1254
  } else
1255
1255
  return new Date(Date.parse(P.field.value));
1256
1256
  }, h._onInputChange = function(N) {
1257
- var O;
1258
- N.firedBy !== h && (O = h._parseFieldValue(), i(O) && h.setDate(O), h._v || h.show());
1257
+ var G;
1258
+ N.firedBy !== h && (G = h._parseFieldValue(), i(G) && h.setDate(G), h._v || h.show());
1259
1259
  }, h._onInputFocus = function() {
1260
1260
  h.show();
1261
1261
  }, h._onInputClick = function() {
@@ -1271,20 +1271,20 @@ function OQ() {
1271
1271
  }, 50)), h._c = !1;
1272
1272
  }, h._onClick = function(N) {
1273
1273
  N = N || window.event;
1274
- var O = N.target || N.srcElement, y = O;
1275
- if (O) {
1276
- !C && c(O, "pika-select") && (O.onchange || (O.setAttribute("onchange", "return;"), n(O, "change", h._onChange)));
1274
+ var G = N.target || N.srcElement, y = G;
1275
+ if (G) {
1276
+ !C && c(G, "pika-select") && (G.onchange || (G.setAttribute("onchange", "return;"), n(G, "change", h._onChange)));
1277
1277
  do
1278
1278
  if (c(y, "pika-single") || y === P.trigger)
1279
1279
  return;
1280
1280
  while (y = y.parentNode);
1281
- h._v && O !== P.trigger && y !== P.trigger && h.hide();
1281
+ h._v && G !== P.trigger && y !== P.trigger && h.hide();
1282
1282
  }
1283
1283
  }, h.el = Q.createElement("div"), h.el.className = "pika-single" + (P.isRTL ? " is-rtl" : "") + (P.theme ? " " + P.theme : ""), n(h.el, "mousedown", h._onMouseDown, !0), n(h.el, "touchend", h._onMouseDown, !0), n(h.el, "change", h._onChange), P.keyboardInput && n(Q, "keydown", h._onKeyChange), P.field && (P.container ? P.container.appendChild(h.el) : P.bound ? Q.body.appendChild(h.el) : P.field.parentNode.insertBefore(h.el, P.field.nextSibling), n(P.field, "change", h._onInputChange), P.defaultDate || (P.defaultDate = h._parseFieldValue(), P.setDefaultDate = !0));
1284
1284
  var l = P.defaultDate;
1285
1285
  i(l) ? P.setDefaultDate ? h.setDate(l, !0) : h.gotoDate(l) : h.gotoDate(/* @__PURE__ */ new Date()), P.bound ? (this.hide(), h.el.className += " is-bound", n(P.trigger, "click", h._onInputClick), n(P.trigger, "focus", h._onInputFocus), n(P.trigger, "blur", h._onInputBlur)) : this.show();
1286
1286
  };
1287
- return F.prototype = {
1287
+ return O.prototype = {
1288
1288
  /**
1289
1289
  * configure functionality
1290
1290
  */
@@ -1414,8 +1414,8 @@ function OQ() {
1414
1414
  */
1415
1415
  draw: function(e) {
1416
1416
  if (!(!this._v && !e)) {
1417
- var h = this._o, P = h.minYear, l = h.maxYear, N = h.minMonth, O = h.maxMonth, y = "", b;
1418
- this._y <= P && (this._y = P, !isNaN(N) && this._m < N && (this._m = N)), this._y >= l && (this._y = l, !isNaN(O) && this._m > O && (this._m = O));
1417
+ var h = this._o, P = h.minYear, l = h.maxYear, N = h.minMonth, G = h.maxMonth, y = "", b;
1418
+ this._y <= P && (this._y = P, !isNaN(N) && this._m < N && (this._m = N)), this._y >= l && (this._y = l, !isNaN(G) && this._m > G && (this._m = G));
1419
1419
  for (var _ = 0; _ < h.numberOfMonths; _++)
1420
1420
  b = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2), y += '<div class="pika-lendar">' + j(this, _, this.calendars[_].year, this.calendars[_].month, this.calendars[0].year, b) + this.render(this.calendars[_].year, this.calendars[_].month, b) + "</div>";
1421
1421
  this.el.innerHTML = y, h.bound && h.field.type !== "hidden" && t(function() {
@@ -1424,28 +1424,28 @@ function OQ() {
1424
1424
  }
1425
1425
  },
1426
1426
  adjustPosition: function() {
1427
- var e, h, P, l, N, O, y, b, _, S, nA, tA;
1427
+ var e, h, P, l, N, G, y, b, _, S, nA, tA;
1428
1428
  if (!this._o.container) {
1429
- if (this.el.style.position = "absolute", e = this._o.trigger, h = e, P = this.el.offsetWidth, l = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, O = window.innerHeight || Q.documentElement.clientHeight, y = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, nA = !0, tA = !0, typeof e.getBoundingClientRect == "function")
1429
+ if (this.el.style.position = "absolute", e = this._o.trigger, h = e, P = this.el.offsetWidth, l = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, G = window.innerHeight || Q.documentElement.clientHeight, y = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, nA = !0, tA = !0, typeof e.getBoundingClientRect == "function")
1430
1430
  S = e.getBoundingClientRect(), b = S.left + window.pageXOffset, _ = S.bottom + window.pageYOffset;
1431
1431
  else
1432
1432
  for (b = h.offsetLeft, _ = h.offsetTop + h.offsetHeight; h = h.offsetParent; )
1433
1433
  b += h.offsetLeft, _ += h.offsetTop;
1434
- (this._o.reposition && b + P > N || this._o.position.indexOf("right") > -1 && b - P + e.offsetWidth > 0) && (b = b - P + e.offsetWidth, nA = !1), (this._o.reposition && _ + l > O + y || this._o.position.indexOf("top") > -1 && _ - l - e.offsetHeight > 0) && (_ = _ - l - e.offsetHeight, tA = !1), this.el.style.left = b + "px", this.el.style.top = _ + "px", f(this.el, nA ? "left-aligned" : "right-aligned"), f(this.el, tA ? "bottom-aligned" : "top-aligned"), u(this.el, nA ? "right-aligned" : "left-aligned"), u(this.el, tA ? "top-aligned" : "bottom-aligned");
1434
+ (this._o.reposition && b + P > N || this._o.position.indexOf("right") > -1 && b - P + e.offsetWidth > 0) && (b = b - P + e.offsetWidth, nA = !1), (this._o.reposition && _ + l > G + y || this._o.position.indexOf("top") > -1 && _ - l - e.offsetHeight > 0) && (_ = _ - l - e.offsetHeight, tA = !1), this.el.style.left = b + "px", this.el.style.top = _ + "px", f(this.el, nA ? "left-aligned" : "right-aligned"), f(this.el, tA ? "bottom-aligned" : "top-aligned"), u(this.el, nA ? "right-aligned" : "left-aligned"), u(this.el, tA ? "top-aligned" : "bottom-aligned");
1435
1435
  }
1436
1436
  },
1437
1437
  /**
1438
1438
  * render HTML for a particular month
1439
1439
  */
1440
1440
  render: function(e, h, P) {
1441
- var l = this._o, N = /* @__PURE__ */ new Date(), O = T(e, h), y = new Date(e, h, 1).getDay(), b = [], _ = [];
1441
+ var l = this._o, N = /* @__PURE__ */ new Date(), G = T(e, h), y = new Date(e, h, 1).getDay(), b = [], _ = [];
1442
1442
  x(N), l.firstDay > 0 && (y -= l.firstDay, y < 0 && (y += 7));
1443
- for (var S = h === 0 ? 11 : h - 1, nA = h === 11 ? 0 : h + 1, tA = h === 0 ? e - 1 : e, PA = h === 11 ? e + 1 : e, RA = T(tA, S), XA = O + y, vA = XA; vA > 7; )
1443
+ for (var S = h === 0 ? 11 : h - 1, nA = h === 11 ? 0 : h + 1, tA = h === 0 ? e - 1 : e, PA = h === 11 ? e + 1 : e, RA = T(tA, S), XA = G + y, vA = XA; vA > 7; )
1444
1444
  vA -= 7;
1445
1445
  XA += 7 - vA;
1446
1446
  for (var YA = !1, qA = 0, _A = 0; qA < XA; qA++) {
1447
- var aA = new Date(e, h, 1 + (qA - y)), JA = i(this._d) ? s(aA, this._d) : !1, zA = s(aA, N), NA = l.events.indexOf(aA.toDateString()) !== -1, FA = qA < y || qA >= O + y, jA = 1 + (qA - y), $A = h, Ag = e, tg = l.startRange && s(l.startRange, aA), hg = l.endRange && s(l.endRange, aA), gg = l.startRange && l.endRange && l.startRange < aA && aA < l.endRange, Bg = l.minDate && aA < l.minDate || l.maxDate && aA > l.maxDate || l.disableWeekends && D(aA) || l.disableDayFn && l.disableDayFn(aA);
1448
- FA && (qA < y ? (jA = RA + jA, $A = S, Ag = tA) : (jA = jA - O, $A = nA, Ag = PA));
1447
+ var aA = new Date(e, h, 1 + (qA - y)), JA = i(this._d) ? s(aA, this._d) : !1, zA = s(aA, N), NA = l.events.indexOf(aA.toDateString()) !== -1, FA = qA < y || qA >= G + y, jA = 1 + (qA - y), $A = h, Ag = e, tg = l.startRange && s(l.startRange, aA), hg = l.endRange && s(l.endRange, aA), gg = l.startRange && l.endRange && l.startRange < aA && aA < l.endRange, Bg = l.minDate && aA < l.minDate || l.maxDate && aA > l.maxDate || l.disableWeekends && D(aA) || l.disableDayFn && l.disableDayFn(aA);
1448
+ FA && (qA < y ? (jA = RA + jA, $A = S, Ag = tA) : (jA = jA - G, $A = nA, Ag = PA));
1449
1449
  var cg = {
1450
1450
  day: jA,
1451
1451
  month: $A,
@@ -1482,7 +1482,7 @@ function OQ() {
1482
1482
  var e = this._o;
1483
1483
  this.hide(), I(this.el, "mousedown", this._onMouseDown, !0), I(this.el, "touchend", this._onMouseDown, !0), I(this.el, "change", this._onChange), e.keyboardInput && I(Q, "keydown", this._onKeyChange), e.field && (I(e.field, "change", this._onInputChange), e.bound && (I(e.trigger, "click", this._onInputClick), I(e.trigger, "focus", this._onInputFocus), I(e.trigger, "blur", this._onInputBlur))), this.el.parentNode && this.el.parentNode.removeChild(this.el);
1484
1484
  }
1485
- }, F;
1485
+ }, O;
1486
1486
  });
1487
1487
  }(Lg)), Lg.exports;
1488
1488
  }
@@ -1849,11 +1849,11 @@ function EE(g, A, E, B, C = 0.5) {
1849
1849
  if (I < C) continue;
1850
1850
  const w = g.data[n * 37], c = g.data[n * 37 + 1], f = g.data[n * 37 + 2], u = g.data[n * 37 + 3], o = 1, i = 1, D = [w, c, f, u], k = g.data.slice(n * 37 + 5, n * 37 + 37), T = new Float32Array(25600);
1851
1851
  for (let d = 0; d < 160; d++)
1852
- for (let X = 0; X < 160; X++) {
1852
+ for (let F = 0; F < 160; F++) {
1853
1853
  let j = 0;
1854
1854
  for (let U = 0; U < 32; U++)
1855
- j += k[U] * A.data[U * 160 * 160 + d * 160 + X];
1856
- T[d * 160 + X] = j > 0 ? 1 : 0;
1855
+ j += k[U] * A.data[U * 160 * 160 + d * 160 + F];
1856
+ T[d * 160 + F] = j > 0 ? 1 : 0;
1857
1857
  }
1858
1858
  const x = QE();
1859
1859
  let s = x.length > 0 ? x[0] : [], q = s.length >= 4 ? s.slice(0, 4) : D;
@@ -1987,12 +1987,12 @@ function wE(o) {
1987
1987
  const i = document.createElement("div");
1988
1988
  i.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
1989
1989
  const D = document.createElement("form");
1990
- D.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", D.addEventListener("submit", (L) => {
1991
- if (L.preventDefault(), !z()) return;
1992
- const G = hA();
1993
- typeof g == "function" && g(G);
1990
+ D.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", D.addEventListener("submit", (X) => {
1991
+ if (X.preventDefault(), !z()) return;
1992
+ const L = hA();
1993
+ typeof g == "function" && g(L);
1994
1994
  }), i.appendChild(D);
1995
- let k, T, x, s, q, J, M, r, m, v, R, H, Y, d, X, j, U, F, e, h, P, l, N, O, y;
1995
+ let k, T, x, s, q, J, M, r, m, v, R, H, Y, d, F, j, U, O, e, h, P, l, N, G, y;
1996
1996
  const b = document.createElement("button");
1997
1997
  k = kA({
1998
1998
  name: "taxCode",
@@ -2007,16 +2007,16 @@ function wE(o) {
2007
2007
  "taxNote",
2008
2008
  "Với khách hàng là hộ kinh doanh, hiển thị theo số CCCD"
2009
2009
  ),
2010
- onInput: cE((L) => W(null, null, function* () {
2011
- const G = L.target.value.trim();
2012
- if (G.length >= 10)
2010
+ onInput: cE((X) => W(null, null, function* () {
2011
+ const L = X.target.value.trim();
2012
+ if (L.length >= 10)
2013
2013
  try {
2014
2014
  yield w(
2015
2015
  A == null ? void 0 : A.provider,
2016
- G,
2016
+ L,
2017
2017
  (AA, IA) => W(null, null, function* () {
2018
2018
  if (AA) {
2019
- const dA = yield PA(G);
2019
+ const dA = yield PA(L);
2020
2020
  c(IA, dA);
2021
2021
  } else
2022
2022
  c(IA);
@@ -2051,10 +2051,10 @@ function wE(o) {
2051
2051
  readOnly: !1,
2052
2052
  horizontal: !0
2053
2053
  });
2054
- const _ = zQ.map((L) => ({
2055
- value: L["cqt quản lý"],
2056
- label: L["tên cqt"],
2057
- id: L["ma xa"]
2054
+ const _ = zQ.map((X) => ({
2055
+ value: X["cqt quản lý"],
2056
+ label: X["tên cqt"],
2057
+ id: X["ma xa"]
2058
2058
  }));
2059
2059
  if (s = Ug({
2060
2060
  name: "companyTaxManagement",
@@ -2065,24 +2065,24 @@ function wE(o) {
2065
2065
  error: null,
2066
2066
  horizontal: !0,
2067
2067
  searchable: !0,
2068
- onChange: (L) => {
2069
- L.target.id && Q(L.target.id), p();
2068
+ onChange: (X) => {
2069
+ X.target.id && Q(X.target.id), p();
2070
2070
  }
2071
2071
  }), C) {
2072
- const L = _.find(
2073
- (G) => G.id === C
2072
+ const X = _.find(
2073
+ (L) => L.id === C
2074
2074
  );
2075
- L && s.setValue && s.setValue(
2076
- L.value,
2077
- L.label,
2078
- L.id
2075
+ X && s.setValue && s.setValue(
2076
+ X.value,
2077
+ X.label,
2078
+ X.id
2079
2079
  );
2080
2080
  }
2081
2081
  l = wC({
2082
2082
  label: a("uploadLogo", "Tải logo lên"),
2083
2083
  required: !1,
2084
2084
  file: (A == null ? void 0 : A.logo) || null,
2085
- onFileChange: (L) => {
2085
+ onFileChange: (X) => {
2086
2086
  p();
2087
2087
  },
2088
2088
  error: null
@@ -2094,13 +2094,13 @@ function wE(o) {
2094
2094
  placeholder: "",
2095
2095
  type: "text",
2096
2096
  value: ((TB = (vg = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : vg.legalRepresentative) == null ? void 0 : TB.name) || "",
2097
- onInput: (L) => {
2098
- const G = L.target.value;
2099
- if (G.trim() === "") {
2097
+ onInput: (X) => {
2098
+ const L = X.target.value;
2099
+ if (L.trim() === "") {
2100
2100
  m.setError(a("errorRequired"));
2101
2101
  return;
2102
2102
  }
2103
- Fg(G) ? m.setError(null) : m.setError(a("errorInvalidName"));
2103
+ Fg(L) ? m.setError(null) : m.setError(a("errorInvalidName"));
2104
2104
  }
2105
2105
  }), v = kA({
2106
2106
  name: "repDob",
@@ -2115,11 +2115,11 @@ function wE(o) {
2115
2115
  let S = new LQ({
2116
2116
  field: v.inputEl,
2117
2117
  format: "DD/MM/YYYY",
2118
- toString(L) {
2119
- const G = String(L.getMonth() + 1).padStart(2, "0"), AA = String(L.getDate()).padStart(2, "0"), IA = L.getFullYear();
2120
- return `${AA}/${G}/${IA}`;
2118
+ toString(X) {
2119
+ const L = String(X.getMonth() + 1).padStart(2, "0"), AA = String(X.getDate()).padStart(2, "0"), IA = X.getFullYear();
2120
+ return `${AA}/${L}/${IA}`;
2121
2121
  },
2122
- onSelect: (L) => {
2122
+ onSelect: (X) => {
2123
2123
  v.setError(null), p();
2124
2124
  },
2125
2125
  onClose: () => {
@@ -2133,16 +2133,16 @@ function wE(o) {
2133
2133
  n(S), R = Ug({
2134
2134
  name: "repGender",
2135
2135
  label: a("gender"),
2136
- options: aC.map((L) => ({
2137
- value: L.value,
2138
- label: a(L.value)
2136
+ options: aC.map((X) => ({
2137
+ value: X.value,
2138
+ label: a(X.value)
2139
2139
  })),
2140
2140
  required: !0,
2141
2141
  value: ((HB = (xB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : xB.legalRepresentative) == null ? void 0 : HB.gender) || "",
2142
2142
  disabled: !1,
2143
2143
  error: null,
2144
- onChange: (L) => {
2145
- L.target.value;
2144
+ onChange: (X) => {
2145
+ X.target.value;
2146
2146
  }
2147
2147
  }), Y = kA({
2148
2148
  name: "repIdCardField",
@@ -2152,14 +2152,14 @@ function wE(o) {
2152
2152
  placeholder: a("enterIdCard", "Nhập số CMND/CCCD"),
2153
2153
  type: "text",
2154
2154
  value: ((RB = (kB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : kB.legalRepresentative) == null ? void 0 : RB.idCard) || "",
2155
- onInput: (L) => {
2156
- let G = L.target.value;
2157
- const AA = G.replace(/[^0-9]/g, "");
2158
- if (AA !== G && (L.target.value = AA, G = AA), G.trim() === "") {
2155
+ onInput: (X) => {
2156
+ let L = X.target.value;
2157
+ const AA = L.replace(/[^0-9]/g, "");
2158
+ if (AA !== L && (X.target.value = AA, L = AA), L.trim() === "") {
2159
2159
  Y.setError(a("errorRequired"));
2160
2160
  return;
2161
2161
  }
2162
- /^\d{12}$/.test(G) ? Y.setError(null) : Y.setError(
2162
+ /^\d{12}$/.test(L) ? Y.setError(null) : Y.setError(
2163
2163
  a("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2164
2164
  );
2165
2165
  }
@@ -2179,10 +2179,10 @@ function wE(o) {
2179
2179
  placeholder: "",
2180
2180
  type: "text",
2181
2181
  value: ((FB = (XB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : XB.legalRepresentative) == null ? void 0 : FB.phone) || "",
2182
- onInput: (L) => {
2183
- let G = L.target.value;
2184
- const AA = G.replace(/[^\d+().\-\s]/g, ""), IA = AA.replace(/[\s.\-()]/g, "");
2185
- if (AA !== G && (L.target.value = AA, G = AA), IA.trim() === "") {
2182
+ onInput: (X) => {
2183
+ let L = X.target.value;
2184
+ const AA = L.replace(/[^\d+().\-\s]/g, ""), IA = AA.replace(/[\s.\-()]/g, "");
2185
+ if (AA !== L && (X.target.value = AA, L = AA), IA.trim() === "") {
2186
2186
  H.setError(a("errorRequired", "Số điện thoại bắt buộc"));
2187
2187
  return;
2188
2188
  }
@@ -2190,15 +2190,15 @@ function wE(o) {
2190
2190
  a("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2191
2191
  );
2192
2192
  }
2193
- }), X = Ug({
2193
+ }), F = Ug({
2194
2194
  name: "repNationality",
2195
2195
  label: a("country"),
2196
2196
  options: XQ,
2197
2197
  value: ((GB = (OB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : OB.legalRepresentative) == null ? void 0 : GB.nationality) || "",
2198
2198
  disabled: !1,
2199
2199
  error: null,
2200
- onChange: (L) => {
2201
- L.target.value;
2200
+ onChange: (X) => {
2201
+ X.target.value;
2202
2202
  }
2203
2203
  }), j = kA({
2204
2204
  name: "contactAddressDetail",
@@ -2209,15 +2209,15 @@ function wE(o) {
2209
2209
  type: "text",
2210
2210
  value: ((zB = (LB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : LB.legalRepresentative) == null ? void 0 : zB.permanentAddress) || "",
2211
2211
  readOnly: !1,
2212
- onInput: (L) => {
2213
- const G = L.target.value;
2214
- if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2212
+ onInput: (X) => {
2213
+ const L = X.target.value;
2214
+ if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(L)) {
2215
2215
  j.setError(
2216
2216
  a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2217
2217
  );
2218
2218
  return;
2219
2219
  }
2220
- G.trim() === "" ? j.setError(
2220
+ L.trim() === "" ? j.setError(
2221
2221
  a("errorRequired", "Địa chỉ thường trú bắt buộc")
2222
2222
  ) : j.setError(null);
2223
2223
  }
@@ -2225,7 +2225,7 @@ function wE(o) {
2225
2225
  label: a("businessLicense", "Giấy phép đăng ký kinh doanh"),
2226
2226
  required: !0,
2227
2227
  file: (A == null ? void 0 : A.license) || null,
2228
- onFileChange: (L) => {
2228
+ onFileChange: (X) => {
2229
2229
  p();
2230
2230
  },
2231
2231
  error: null,
@@ -2238,13 +2238,13 @@ function wE(o) {
2238
2238
  placeholder: "",
2239
2239
  type: "text",
2240
2240
  value: ((bB = (NB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : NB.contactPerson) == null ? void 0 : bB.name) || "",
2241
- onInput: (L) => {
2242
- const G = L.target.value;
2243
- if (G.trim() === "") {
2241
+ onInput: (X) => {
2242
+ const L = X.target.value;
2243
+ if (L.trim() === "") {
2244
2244
  q.setError(a("errorRequired", "Họ và tên bắt buộc"));
2245
2245
  return;
2246
2246
  }
2247
- Fg(G) ? q.setError(null) : q.setError(
2247
+ Fg(L) ? q.setError(null) : q.setError(
2248
2248
  a("errorInvalidName", "Họ và tên không hợp lệ.")
2249
2249
  );
2250
2250
  }
@@ -2256,26 +2256,26 @@ function wE(o) {
2256
2256
  placeholder: "",
2257
2257
  type: "email",
2258
2258
  value: ((yB = (jB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : jB.contactPerson) == null ? void 0 : yB.email) || "",
2259
- onInput: (L) => {
2260
- let G = L.target.value;
2261
- if (G.trim() === "") {
2259
+ onInput: (X) => {
2260
+ let L = X.target.value;
2261
+ if (L.trim() === "") {
2262
2262
  J.setError(a("errorRequired", "Email bắt buộc"));
2263
2263
  return;
2264
2264
  }
2265
- if (/[^\x00-\x7F]/.test(G) || /\s/.test(G)) {
2265
+ if (/[^\x00-\x7F]/.test(L) || /\s/.test(L)) {
2266
2266
  J.setError(
2267
2267
  a("errorInvalidEmail", "Email không hợp lệ.")
2268
2268
  );
2269
2269
  return;
2270
2270
  }
2271
2271
  const AA = 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}$");
2272
- if (G.length > 254) {
2272
+ if (L.length > 254) {
2273
2273
  J.setError(
2274
2274
  a("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
2275
2275
  );
2276
2276
  return;
2277
2277
  }
2278
- AA.test(G) ? J.setError(null) : J.setError(
2278
+ AA.test(L) ? J.setError(null) : J.setError(
2279
2279
  a("errorInvalidEmail", "Email không hợp lệ")
2280
2280
  );
2281
2281
  }
@@ -2287,10 +2287,10 @@ function wE(o) {
2287
2287
  placeholder: "",
2288
2288
  type: "text",
2289
2289
  value: ((UB = (KB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : KB.contactPerson) == null ? void 0 : UB.phone) || "",
2290
- onInput: (L) => {
2291
- let G = L.target.value;
2292
- const AA = G.replace(/[^\d+().\-\s]/g, ""), IA = AA.replace(/[\s.\-()]/g, "");
2293
- if (AA !== G && (L.target.value = AA, G = AA), IA.trim() === "") {
2290
+ onInput: (X) => {
2291
+ let L = X.target.value;
2292
+ const AA = L.replace(/[^\d+().\-\s]/g, ""), IA = AA.replace(/[\s.\-()]/g, "");
2293
+ if (AA !== L && (X.target.value = AA, L = AA), IA.trim() === "") {
2294
2294
  M.setError(
2295
2295
  a("errorRequired", "Số điện thoại bắt buộc")
2296
2296
  );
@@ -2309,15 +2309,15 @@ function wE(o) {
2309
2309
  type: "text",
2310
2310
  value: ((pB = (SB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : SB.contactPerson) == null ? void 0 : pB.address) || "",
2311
2311
  readOnly: !1,
2312
- onInput: (L) => {
2313
- const G = L.target.value;
2314
- if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2312
+ onInput: (X) => {
2313
+ const L = X.target.value;
2314
+ if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(L)) {
2315
2315
  r.setError(
2316
2316
  a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2317
2317
  );
2318
2318
  return;
2319
2319
  }
2320
- G.trim() === "" ? r.setError(
2320
+ L.trim() === "" ? r.setError(
2321
2321
  a("errorRequired", "Địa chỉ liên hệ bắt buộc")
2322
2322
  ) : r.setError(null);
2323
2323
  }
@@ -2331,20 +2331,20 @@ function wE(o) {
2331
2331
  type: "text",
2332
2332
  value: ((ZB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : ZB.invoiceSymbol) || "",
2333
2333
  readOnly: !0,
2334
- onInput: (L) => {
2334
+ onInput: (X) => {
2335
2335
  }
2336
2336
  });
2337
2337
  U = RQ({
2338
2338
  // initialValue:
2339
2339
  // registrationData?.eInvoiceRegistration?.invoiceSymbol || "1C25TYY",
2340
2340
  initialValue: f || ((VB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : VB.invoiceSymbol) || "1C25TYY",
2341
- onChange: (L) => {
2342
- nA.inputEl.value = L, p();
2341
+ onChange: (X) => {
2342
+ nA.inputEl.value = X, p();
2343
2343
  }
2344
- }), F = document.createElement("input"), F.type = "checkbox", F.name = "hasUsedEInvoiceCB", F.className = "wgt:cursor-pointer", F.checked = (WB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : WB.hasUsedEInvoice, F.addEventListener("change", (L) => {
2345
- L.target.checked ? (V.appendChild(Z), V.appendChild(EA)) : (e.checked = !1, P.inputEl.value = "", P.setError(null), h && (h.inputEl.value = "", h.setError(null), EA.contains(h.container) && EA.removeChild(h.container)), V.removeChild(Z), V.removeChild(EA));
2346
- }), e = document.createElement("input"), e.type = "checkbox", e.name = "hasUsedEInvoiceBeforeCB", e.className = "wgt:cursor-pointer", e.checked = (_B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : _B.isUsedEInvoiceBefore, e.addEventListener("change", (L) => {
2347
- L.target.checked ? EA.appendChild(h.container) : (h.inputEl.value = "", h.setError(null), EA.contains(h.container) && EA.removeChild(h.container));
2344
+ }), O = document.createElement("input"), O.type = "checkbox", O.name = "hasUsedEInvoiceCB", O.className = "wgt:cursor-pointer", O.checked = (WB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : WB.hasUsedEInvoice, O.addEventListener("change", (X) => {
2345
+ X.target.checked ? (V.appendChild(Z), V.appendChild(EA)) : (e.checked = !1, P.inputEl.value = "", P.setError(null), h && (h.inputEl.value = "", h.setError(null), EA.contains(h.container) && EA.removeChild(h.container)), V.removeChild(Z), V.removeChild(EA));
2346
+ }), e = document.createElement("input"), e.type = "checkbox", e.name = "hasUsedEInvoiceBeforeCB", e.className = "wgt:cursor-pointer", e.checked = (_B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : _B.isUsedEInvoiceBefore, e.addEventListener("change", (X) => {
2347
+ X.target.checked ? EA.appendChild(h.container) : (h.inputEl.value = "", h.setError(null), EA.contains(h.container) && EA.removeChild(h.container));
2348
2348
  }), h = kA({
2349
2349
  name: "previousOtherProviderNameField",
2350
2350
  label: a("providerName", "Tên NCC"),
@@ -2354,15 +2354,15 @@ function wE(o) {
2354
2354
  type: "text",
2355
2355
  value: (($B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $B.previousEInvoiceProvider) || "",
2356
2356
  readOnly: !1,
2357
- onInput: (L) => {
2358
- const G = L.target.value;
2359
- if (G.trim() === "") {
2357
+ onInput: (X) => {
2358
+ const L = X.target.value;
2359
+ if (L.trim() === "") {
2360
2360
  h.setError(
2361
2361
  a("errorRequired", "Tên nhà cung cấp bắt buộc")
2362
2362
  );
2363
2363
  return;
2364
2364
  }
2365
- /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(G) ? h.setError(null) : h.setError(
2365
+ /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(L) ? h.setError(null) : h.setError(
2366
2366
  a(
2367
2367
  "errorInvalidProviderName",
2368
2368
  "Tên nhà cung cấp không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
@@ -2378,15 +2378,15 @@ function wE(o) {
2378
2378
  type: "text",
2379
2379
  value: ((AC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : AC.taxAuthorityCode) || "",
2380
2380
  readOnly: !1,
2381
- onInput: (L) => {
2382
- const G = L.target.value;
2383
- if (G.trim() === "") {
2381
+ onInput: (X) => {
2382
+ const L = X.target.value;
2383
+ if (L.trim() === "") {
2384
2384
  P.setError(
2385
2385
  a("errorRequired", "Mã CQT bắt buộc")
2386
2386
  );
2387
2387
  return;
2388
2388
  }
2389
- /^[A-Za-z0-9_]+$/.test(G) ? P.setError(null) : P.setError(
2389
+ /^[A-Za-z0-9_]+$/.test(L) ? P.setError(null) : P.setError(
2390
2390
  a(
2391
2391
  "errorInvalidTaxAuthorityCode",
2392
2392
  "Mã CQT không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
@@ -2395,19 +2395,19 @@ function wE(o) {
2395
2395
  }
2396
2396
  });
2397
2397
  let tA = 0;
2398
- function PA(L) {
2398
+ function PA(X) {
2399
2399
  return W(this, null, function* () {
2400
- const G = ++tA;
2400
+ const L = ++tA;
2401
2401
  k.setError(null);
2402
2402
  try {
2403
- const AA = yield YQ(L);
2403
+ const AA = yield YQ(X);
2404
2404
  let IA = {
2405
2405
  name: "",
2406
2406
  address: "",
2407
2407
  taxAuthority: "",
2408
- taxCode: L
2408
+ taxCode: X
2409
2409
  };
2410
- if (G !== tA)
2410
+ if (L !== tA)
2411
2411
  return;
2412
2412
  if (AA.error)
2413
2413
  return T.inputEl.value = "", x.inputEl.value = "", s.setValue && s.setValue("", "", ""), s.setDisabled(!1), k.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), IA;
@@ -2423,9 +2423,9 @@ function wE(o) {
2423
2423
  ), IA.taxAuthority = HA.id || "", s.setDisabled(!1));
2424
2424
  } else
2425
2425
  s.setValue && s.setValue("", "", ""), s.setDisabled(!1);
2426
- return IA.name = AA.ten_cty || "", IA.address = AA.dia_chi || "", IA.taxCode = L, k.setError(null), IA;
2426
+ return IA.name = AA.ten_cty || "", IA.address = AA.dia_chi || "", IA.taxCode = X, k.setError(null), IA;
2427
2427
  } catch (AA) {
2428
- G === tA && (sg.error(
2428
+ L === tA && (sg.error(
2429
2429
  a("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
2430
2430
  {
2431
2431
  autoClose: 5e3,
@@ -2436,7 +2436,7 @@ function wE(o) {
2436
2436
  a("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2437
2437
  ));
2438
2438
  } finally {
2439
- G === tA && p();
2439
+ L === tA && p();
2440
2440
  }
2441
2441
  });
2442
2442
  }
@@ -2444,11 +2444,11 @@ function wE(o) {
2444
2444
  RA.className = "wgt:space-y-3";
2445
2445
  const XA = document.createElement("h3");
2446
2446
  if (XA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", XA.innerText = a("unitInfo", "1. Thông tin đơn vị"), RA.appendChild(XA), !I && !u) {
2447
- const L = document.createElement("div");
2448
- L.className = "wgt:bg-secondary-base wgt:border-l-4 wgt:border-secondary-alpha wgt:p-4 wgt:text-secondary-alpha wgt:rounded-r-xl", L.innerText = a(
2447
+ const X = document.createElement("div");
2448
+ E === "bvb" ? (X.style.backgroundColor = "#e397171a", X.style.borderLeft = "4px solid #e39717", X.style.padding = "1rem", X.style.color = "#e39717", X.style.borderRadius = "0 1rem 1rem 0") : (X.style.backgroundColor = "#f0f0f0", X.style.borderLeft = "4px solid #007bff", X.style.padding = "1rem", X.style.color = "#007bff", X.style.borderRadius = "0 1rem 1rem 0"), X.innerText = a(
2449
2449
  "notification",
2450
2450
  "Mã số thuế đã được đăng ký với M-Invoice."
2451
- ), RA.appendChild(L);
2451
+ ), RA.appendChild(X);
2452
2452
  }
2453
2453
  const vA = document.createElement("div");
2454
2454
  vA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", RA.appendChild(vA), vA.appendChild(k.container), vA.appendChild(T.container), vA.appendChild(x.container), vA.appendChild(s.container);
@@ -2474,11 +2474,11 @@ function wE(o) {
2474
2474
  "Vui lòng kiểm tra thông tin trước khi chuyển sang bước tiếp theo"
2475
2475
  ) : NA.innerText = "", Ag.appendChild(NA);
2476
2476
  }
2477
- function jA(L) {
2478
- return new Promise((G) => {
2477
+ function jA(X) {
2478
+ return new Promise((L) => {
2479
2479
  JA = !1, zA = !1, FA();
2480
2480
  const AA = () => {
2481
- Y.inputEl.value = "", m.inputEl.value = "", v.inputEl.value = "", j.inputEl.value = "", R.selectEl.value = "", X.selectEl.value = "", Y.setError(null), m.setError(null), v.setError(null), j.setError(null), R.setError(null), X.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
2481
+ Y.inputEl.value = "", m.inputEl.value = "", v.inputEl.value = "", j.inputEl.value = "", R.selectEl.value = "", F.selectEl.value = "", Y.setError(null), m.setError(null), v.setError(null), j.setError(null), R.setError(null), F.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
2482
2482
  }, IA = (oA) => {
2483
2483
  if (!oA) return "";
2484
2484
  if (/^\d{8}$/.test(oA)) {
@@ -2490,15 +2490,15 @@ function wE(o) {
2490
2490
  const jg = String(Mg.getDate()).padStart(2, "0"), xg = String(Mg.getMonth() + 1).padStart(2, "0"), Jg = Mg.getFullYear();
2491
2491
  return `${jg}/${xg}/${Jg}`;
2492
2492
  }, dA = new Image();
2493
- dA.src = URL.createObjectURL(L), dA.onload = () => W(null, null, function* () {
2493
+ dA.src = URL.createObjectURL(X), dA.onload = () => W(null, null, function* () {
2494
2494
  try {
2495
2495
  const oA = yield hE(dA).then((HA) => JSON.parse(HA).status !== "success" ? (JA = !0, zA = !1, AA(), FA(), null) : JSON.parse(HA).data);
2496
- if (oA || G({ success: !1, reason: "No data detected" }), oA) {
2496
+ if (oA || L({ success: !1, reason: "No data detected" }), oA) {
2497
2497
  JA = !1, zA = !0, FA();
2498
2498
  const GA = Object.values(oA).every((ug) => !ug);
2499
2499
  AA(), GA && (gg(
2500
2500
  a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2501
- ), AA(), G({ success: !1, reason: "Invalid card data" }));
2501
+ ), AA(), L({ success: !1, reason: "Invalid card data" }));
2502
2502
  const { address: ag, date_of_birth: Mg, full_name: jg, id_number: xg, sex: Jg } = oA;
2503
2503
  if (!xg || !/^\d{12}$/.test(xg) ? (gg(
2504
2504
  a("errorInvalidCard", "Số CCCD phải có 12 chữ số")
@@ -2509,7 +2509,7 @@ function wE(o) {
2509
2509
  R.selectEl.value = (ug == null ? void 0 : ug.value) || "";
2510
2510
  }
2511
2511
  }
2512
- G({ success: !0, data: oA });
2512
+ L({ success: !0, data: oA });
2513
2513
  } catch (oA) {
2514
2514
  console.error("readIdentityCard failed", oA);
2515
2515
  } finally {
@@ -2518,13 +2518,13 @@ function wE(o) {
2518
2518
  });
2519
2519
  });
2520
2520
  }
2521
- function $A(L, G, AA) {
2521
+ function $A(X, L, AA) {
2522
2522
  const IA = new Image();
2523
- IA.src = URL.createObjectURL(L), IA.onload = () => W(null, null, function* () {
2523
+ IA.src = URL.createObjectURL(X), IA.onload = () => W(null, null, function* () {
2524
2524
  yield CE(IA).then((dA) => {
2525
2525
  var HA, GA;
2526
2526
  const oA = JSON.parse(dA);
2527
- G && !((HA = oA == null ? void 0 : oA.data) != null && HA.isFront) ? gg(
2527
+ L && !((HA = oA == null ? void 0 : oA.data) != null && HA.isFront) ? gg(
2528
2528
  a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2529
2529
  ) : AA && !((GA = oA == null ? void 0 : oA.data) != null && GA.isBack) && Bg(
2530
2530
  a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
@@ -2543,9 +2543,9 @@ function wE(o) {
2543
2543
  } = kQ({
2544
2544
  frontFile: A == null ? void 0 : A.idCard,
2545
2545
  backFile: A == null ? void 0 : A.idCardBack,
2546
- onFrontChange: (L) => W(null, null, function* () {
2546
+ onFrontChange: (X) => W(null, null, function* () {
2547
2547
  var AA, IA;
2548
- if (O = L, $A(L, !0, !1), tg() || hg() || !wg()) {
2548
+ if (G = X, $A(X, !0, !1), tg() || hg() || !wg()) {
2549
2549
  JA = !1, zA = !1, FA(), p();
2550
2550
  return;
2551
2551
  }
@@ -2553,11 +2553,11 @@ function wE(o) {
2553
2553
  p();
2554
2554
  return;
2555
2555
  }
2556
- jA(L);
2556
+ jA(X);
2557
2557
  }),
2558
- onBackChange: (L) => W(null, null, function* () {
2558
+ onBackChange: (X) => W(null, null, function* () {
2559
2559
  var IA, dA;
2560
- if (y = L, $A(L, !1, !0), tg() || hg() || !cg()) {
2560
+ if (y = X, $A(X, !1, !0), tg() || hg() || !cg()) {
2561
2561
  JA = !1, zA = !1, FA(), p();
2562
2562
  return;
2563
2563
  }
@@ -2565,7 +2565,7 @@ function wE(o) {
2565
2565
  p();
2566
2566
  return;
2567
2567
  }
2568
- (yield jA(cg())).success || jA(L);
2568
+ (yield jA(cg())).success || jA(X);
2569
2569
  }),
2570
2570
  theme: E
2571
2571
  });
@@ -2575,7 +2575,7 @@ function wE(o) {
2575
2575
  const VA = document.createElement("div");
2576
2576
  VA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", Pg.appendChild(VA), VA.appendChild(v.container), VA.appendChild(R.container), aA.appendChild(Pg);
2577
2577
  const yA = document.createElement("div");
2578
- yA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", yA.appendChild(Y.container), yA.appendChild(d.container), yA.appendChild(H.container), yA.appendChild(X.container), qA.appendChild(aA), qA.appendChild(yA), qA.appendChild(j.container), qA.appendChild(N.container);
2578
+ yA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", yA.appendChild(Y.container), yA.appendChild(d.container), yA.appendChild(H.container), yA.appendChild(F.container), qA.appendChild(aA), qA.appendChild(yA), qA.appendChild(j.container), qA.appendChild(N.container);
2579
2579
  const OA = document.createElement("ul");
2580
2580
  OA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2581
2581
  const eg = document.createElement("li");
@@ -2598,7 +2598,7 @@ function wE(o) {
2598
2598
  const V = document.createElement("div");
2599
2599
  V.className = "wgt:flex wgt:flex-col wgt:space-y-4 wgt:border wgt:border-soft-200 wgt:px-6 wgt:py-4 wgt:rounded-xl", D.appendChild(V);
2600
2600
  const BA = document.createElement("div");
2601
- BA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", BA.appendChild(F);
2601
+ BA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", BA.appendChild(O);
2602
2602
  const CA = document.createElement("h4");
2603
2603
  CA.className = "wgt:font-semibold wgt:italic", CA.innerText = a(
2604
2604
  "hasUsedEInvoice",
@@ -2642,11 +2642,11 @@ function wE(o) {
2642
2642
  Qg.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", Qg.appendChild(
2643
2643
  document.createTextNode(a("agreeWith", "Tôi đồng ý với ") + " ")
2644
2644
  );
2645
- const Rg = (L) => {
2646
- const G = document.createElement("button");
2647
- return G.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", G.textContent = L, G.onclick = (AA) => {
2645
+ const Rg = (X) => {
2646
+ const L = document.createElement("button");
2647
+ return L.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", L.textContent = X, L.onclick = (AA) => {
2648
2648
  AA.preventDefault(), typeof B == "function" && B();
2649
- }, G;
2649
+ }, L;
2650
2650
  }, Yg = xQ(E);
2651
2651
  Qg.appendChild(
2652
2652
  Rg(a("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
@@ -2666,29 +2666,29 @@ function wE(o) {
2666
2666
  "wgt:cursor-pointer"
2667
2667
  ].join(" "), qg.appendChild(b), i.appendChild(qg);
2668
2668
  function z() {
2669
- const L = hA(), G = L.eInvoiceRegistration;
2670
- if (!G.contactPerson.address || !G.organization.name || !G.organization.address || !G.organization.taxCode || !G.organization.taxAuthority || !G.contactPerson.name || !G.contactPerson.email || !G.contactPerson.phone || !G.legalRepresentative.name || !G.legalRepresentative.dob || !G.legalRepresentative.gender || !G.legalRepresentative.phone || !G.legalRepresentative.idCard || !G.legalRepresentative.permanentAddress || !G.invoiceSymbol || G.hasUsedEInvoice && !G.taxAuthorityCode || G.isUsedEInvoiceBefore && !G.previousEInvoiceProvider || !Fg(G.contactPerson.name) || !Fg(G.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(G.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
2671
- G.legalRepresentative.permanentAddress
2672
- ) || G.isUsedEInvoiceBefore && !/^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(G.previousEInvoiceProvider) || G.hasUsedEInvoice && !/^[A-Za-z0-9_]+$/.test(G.taxAuthorityCode))
2669
+ const X = hA(), L = X.eInvoiceRegistration;
2670
+ if (!L.contactPerson.address || !L.organization.name || !L.organization.address || !L.organization.taxCode || !L.organization.taxAuthority || !L.contactPerson.name || !L.contactPerson.email || !L.contactPerson.phone || !L.legalRepresentative.name || !L.legalRepresentative.dob || !L.legalRepresentative.gender || !L.legalRepresentative.phone || !L.legalRepresentative.idCard || !L.legalRepresentative.permanentAddress || !L.invoiceSymbol || L.hasUsedEInvoice && !L.taxAuthorityCode || L.isUsedEInvoiceBefore && !L.previousEInvoiceProvider || !Fg(L.contactPerson.name) || !Fg(L.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(L.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
2671
+ L.legalRepresentative.permanentAddress
2672
+ ) || L.isUsedEInvoiceBefore && !/^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(L.previousEInvoiceProvider) || L.hasUsedEInvoice && !/^[A-Za-z0-9_]+$/.test(L.taxAuthorityCode))
2673
2673
  return !1;
2674
- const dA = G.contactPerson.phone.replace(
2674
+ const dA = L.contactPerson.phone.replace(
2675
2675
  /[^\d+().\-\s]/g,
2676
2676
  ""
2677
2677
  ).replace(
2678
2678
  /[\s.\-()]/g,
2679
2679
  ""
2680
- ), HA = G.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), GA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
2681
- return !(!GA.test(dA) || !GA.test(HA) || !/^\d{12}$/.test(G.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(G.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(G.invoiceSymbol) || !L.license || !L.idCard || !L.idCardBack);
2680
+ ), HA = L.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), GA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
2681
+ return !(!GA.test(dA) || !GA.test(HA) || !/^\d{12}$/.test(L.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(L.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(L.invoiceSymbol) || !X.license || !X.idCard || !X.idCardBack);
2682
2682
  }
2683
2683
  function p() {
2684
2684
  b.disabled = !z() || !MA || tg() || hg() || l.getError() || N.getError();
2685
2685
  }
2686
2686
  function hA() {
2687
- var L, G;
2687
+ var X, L;
2688
2688
  return {
2689
2689
  eInvoiceRegistration: {
2690
- taxAuthorityCode: (L = P == null ? void 0 : P.getValue()) != null ? L : "",
2691
- previousEInvoiceProvider: (G = h == null ? void 0 : h.getValue()) != null ? G : "",
2690
+ taxAuthorityCode: (X = P == null ? void 0 : P.getValue()) != null ? X : "",
2691
+ previousEInvoiceProvider: (L = h == null ? void 0 : h.getValue()) != null ? L : "",
2692
2692
  organization: {
2693
2693
  name: T == null ? void 0 : T.getValue(),
2694
2694
  address: x == null ? void 0 : x.getValue(),
@@ -2708,16 +2708,16 @@ function wE(o) {
2708
2708
  phone: H == null ? void 0 : H.getValue(),
2709
2709
  idCard: Y == null ? void 0 : Y.getValue(),
2710
2710
  passportNumber: d == null ? void 0 : d.getValue(),
2711
- nationality: X == null ? void 0 : X.getValue(),
2711
+ nationality: F == null ? void 0 : F.getValue(),
2712
2712
  permanentAddress: j == null ? void 0 : j.getValue()
2713
2713
  },
2714
- hasUsedEInvoice: F == null ? void 0 : F.checked,
2714
+ hasUsedEInvoice: O == null ? void 0 : O.checked,
2715
2715
  isUsedEInvoiceBefore: e == null ? void 0 : e.checked,
2716
2716
  invoiceSymbol: U == null ? void 0 : U.getValue()
2717
2717
  },
2718
2718
  license: N == null ? void 0 : N.getValues(),
2719
2719
  logo: l == null ? void 0 : l.getValues(),
2720
- idCard: O,
2720
+ idCard: G,
2721
2721
  idCardBack: y
2722
2722
  };
2723
2723
  }
@@ -2736,19 +2736,19 @@ function wE(o) {
2736
2736
  j,
2737
2737
  P,
2738
2738
  h
2739
- ].forEach((L) => {
2740
- L.inputEl.addEventListener("input", p);
2741
- }), [R, s].forEach((L) => {
2742
- L.selectEl.addEventListener("change", p);
2743
- }), [F, e].forEach((L) => {
2744
- L.addEventListener("change", p);
2745
- }), b.addEventListener("click", (L) => {
2746
- if (L.preventDefault(), !z()) return;
2747
- const G = hA();
2748
- typeof g == "function" && g(G);
2739
+ ].forEach((X) => {
2740
+ X.inputEl.addEventListener("input", p);
2741
+ }), [R, s].forEach((X) => {
2742
+ X.selectEl.addEventListener("change", p);
2743
+ }), [O, e].forEach((X) => {
2744
+ X.addEventListener("change", p);
2745
+ }), b.addEventListener("click", (X) => {
2746
+ if (X.preventDefault(), !z()) return;
2747
+ const L = hA();
2748
+ typeof g == "function" && g(L);
2749
2749
  });
2750
2750
  const TA = (((BC = (gC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : gC.organization) == null ? void 0 : BC.taxCode) || "").trim();
2751
- return TA.length >= 10 && PA(TA), $C(PB(), rB().invoiceHubBaseUrl), A != null && A.idCard && (O = A == null ? void 0 : A.idCard), (CC = A == null ? void 0 : A.eInvoiceRegistration) != null && CC.hasUsedEInvoice && (V.appendChild(Z), V.appendChild(EA), (QC = A == null ? void 0 : A.eInvoiceRegistration) != null && QC.isUsedEInvoiceBefore ? (e.checked = !0, EA.appendChild(h.container), h.inputEl.value = (EC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : EC.previousEInvoiceProvider) : h.inputEl.value = "", P.inputEl.value = (IC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : IC.taxAuthorityCode), p(), {
2751
+ return TA.length >= 10 && PA(TA), $C(PB(), rB().invoiceHubBaseUrl), A != null && A.idCard && (G = A == null ? void 0 : A.idCard), (CC = A == null ? void 0 : A.eInvoiceRegistration) != null && CC.hasUsedEInvoice && (V.appendChild(Z), V.appendChild(EA), (QC = A == null ? void 0 : A.eInvoiceRegistration) != null && QC.isUsedEInvoiceBefore ? (e.checked = !0, EA.appendChild(h.container), h.inputEl.value = (EC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : EC.previousEInvoiceProvider) : h.inputEl.value = "", P.inputEl.value = (IC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : IC.taxAuthorityCode), p(), {
2752
2752
  container: i,
2753
2753
  getValues: hA
2754
2754
  };
@@ -2917,7 +2917,7 @@ function DC({
2917
2917
  }
2918
2918
  };
2919
2919
  }
2920
- const uE = "1.98.1";
2920
+ const uE = "1.98.3";
2921
2921
  function DE(E) {
2922
2922
  return W(this, arguments, function* ({ search: g, bank: A }) {
2923
2923
  return (yield bA.get(`${Ng}`, {
@@ -3292,10 +3292,10 @@ function dE(q) {
3292
3292
  savedQuantities: x,
3293
3293
  setSavedQuantities: s
3294
3294
  }) {
3295
- let J = "", M = B ? B._id : null, r = C ? C._id : null, m = u ? u.map((K) => K) : [], v = [], R = [], H = [], Y = [], d = null, X = (x == null ? void 0 : x.qtyRegFee) || 1, j = (x == null ? void 0 : x.qtyInvoicePkg) || 1, U = (x == null ? void 0 : x.qtySignaturePkg) || 1;
3296
- function F() {
3295
+ let J = "", M = B ? B._id : null, r = C ? C._id : null, m = u ? u.map((K) => K) : [], v = [], R = [], H = [], Y = [], d = null, F = (x == null ? void 0 : x.qtyRegFee) || 1, j = (x == null ? void 0 : x.qtyInvoicePkg) || 1, U = (x == null ? void 0 : x.qtySignaturePkg) || 1;
3296
+ function O() {
3297
3297
  s && s({
3298
- qtyRegFee: X,
3298
+ qtyRegFee: F,
3299
3299
  qtyInvoicePkg: j,
3300
3300
  qtySignaturePkg: U
3301
3301
  });
@@ -3311,8 +3311,8 @@ function dE(q) {
3311
3311
  close: N
3312
3312
  } = vB();
3313
3313
  h.appendChild(P);
3314
- const O = document.createElement("div");
3315
- O.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:flex wgt:flex-col wgt:gap-8 wgt:rounded-3xl wgt:bg-weak-50 wgt:px-6 wgt:py-4 wgt:@max-2xl:px-3 wgt:@max-2xl:py-3 wgt:@max-2xl:gap-6 wgt:@max-2xl:rounded-none", h.appendChild(O);
3314
+ const G = document.createElement("div");
3315
+ G.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:flex wgt:flex-col wgt:gap-8 wgt:rounded-3xl wgt:bg-weak-50 wgt:px-6 wgt:py-4 wgt:@max-2xl:px-3 wgt:@max-2xl:py-3 wgt:@max-2xl:gap-6 wgt:@max-2xl:rounded-none", h.appendChild(G);
3316
3316
  const {
3317
3317
  container: y,
3318
3318
  invoiceSelectorWrapper: b,
@@ -3330,16 +3330,16 @@ function dE(q) {
3330
3330
  cg(), fA();
3331
3331
  }
3332
3332
  });
3333
- O.appendChild(y);
3333
+ G.appendChild(y);
3334
3334
  const { container: XA, signatureSelectorWrapper: vA } = iC(!T);
3335
- iC(!T), O.appendChild(XA);
3335
+ iC(!T), G.appendChild(XA);
3336
3336
  const YA = document.createElement("div");
3337
3337
  YA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", YA.innerHTML = `
3338
3338
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3339
3339
  <div class="wgt:h-6 wgt:w-6 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
3340
3340
  <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3341
3341
  </div>
3342
- `, O.appendChild(YA);
3342
+ `, G.appendChild(YA);
3343
3343
  const { container: qA } = ME(), { container: _A, tbody: aA } = TE(), JA = document.createElement("div");
3344
3344
  JA.className = "wgt:hidden wgt:@max-2xl: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";
3345
3345
  const zA = document.createElement("span");
@@ -3415,11 +3415,11 @@ function dE(q) {
3415
3415
  }
3416
3416
  let gA = null;
3417
3417
  T && !(K != null && K.withoutInitialFee) ? (gA = LA(rA({}, R[0]), {
3418
- quantity: X
3418
+ quantity: F
3419
3419
  }), Q(gA)) : Q(null);
3420
3420
  let V = LA(rA({}, K), { quantity: j }), BA = QA ? LA(rA({}, QA), { quantity: U }) : null;
3421
- t(V), n(BA), i(m), F(), s && s({
3422
- qtyRegFee: X,
3421
+ t(V), n(BA), i(m), O(), s && s({
3422
+ qtyRegFee: F,
3423
3423
  qtyInvoicePkg: j,
3424
3424
  qtySignaturePkg: U
3425
3425
  }), yield $A(
@@ -3589,7 +3589,7 @@ function dE(q) {
3589
3589
  }
3590
3590
  }
3591
3591
  const VA = document.createElement("div");
3592
- VA.className = "wgt:w-full", O.appendChild(VA);
3592
+ VA.className = "wgt:w-full", G.appendChild(VA);
3593
3593
  function yA() {
3594
3594
  YA.remove(), VA.innerHTML = "";
3595
3595
  const K = S().find(
@@ -3643,12 +3643,12 @@ function dE(q) {
3643
3643
  if (Object.values(H).filter(
3644
3644
  ($) => $.bank === c
3645
3645
  ).length === 0) {
3646
- O.contains(OA) && O.removeChild(OA);
3646
+ G.contains(OA) && G.removeChild(OA);
3647
3647
  return;
3648
3648
  }
3649
3649
  OA.innerHTML = "";
3650
3650
  const QA = document.createElement("h3");
3651
- QA.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", QA.innerText = a("applyPromotion"), OA.appendChild(QA), O.appendChild(OA);
3651
+ QA.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", QA.innerText = a("applyPromotion"), OA.appendChild(QA), G.appendChild(OA);
3652
3652
  const gA = document.createElement("div");
3653
3653
  gA.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
3654
3654
  const V = document.createElement("div");
@@ -3709,7 +3709,7 @@ function dE(q) {
3709
3709
  }
3710
3710
  function fA() {
3711
3711
  var MA, KA, dg, WA, Cg, Qg, Rg, Yg, qg;
3712
- if (F(), aA.innerHTML = "", O.appendChild(_A), O.appendChild(JA), O.appendChild(qA), S().length === 0 && v.length === 0) {
3712
+ if (O(), aA.innerHTML = "", G.appendChild(_A), G.appendChild(JA), G.appendChild(qA), S().length === 0 && v.length === 0) {
3713
3713
  const z = document.createElement("tr");
3714
3714
  z.innerHTML = `
3715
3715
  <td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:@max-2xl:col-span-5">
@@ -3734,18 +3734,18 @@ function dE(q) {
3734
3734
  uA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
3735
3735
  const cA = document.createElement("button");
3736
3736
  cA.type = "button", cA.ariaLabel = a("decrease"), cA.disabled = !0, cA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", cA.innerText = "–", cA.addEventListener("click", () => {
3737
- X > 1 && (X -= 1, fA());
3737
+ F > 1 && (F -= 1, fA());
3738
3738
  }), uA.appendChild(cA);
3739
3739
  const wA = document.createElement("span");
3740
- wA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", wA.innerText = X, uA.appendChild(wA);
3740
+ wA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", wA.innerText = F, uA.appendChild(wA);
3741
3741
  const eA = document.createElement("button");
3742
3742
  eA.type = "button", eA.ariaLabel = a("increase"), eA.disabled = !0, eA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", eA.innerText = "+", eA.addEventListener("click", () => {
3743
- X += 1, fA();
3743
+ F += 1, fA();
3744
3744
  }), uA.appendChild(eA), TA.appendChild(uA), z.appendChild(TA);
3745
3745
  const mA = document.createElement("td");
3746
3746
  mA.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-2xl:hidden", mA.innerText = xA((MA = R[0]) == null ? void 0 : MA.price) + " VND", z.appendChild(mA);
3747
3747
  const iA = document.createElement("td");
3748
- iA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:min-w-[16rem] wgt:@max-2xl:hidden", iA.innerText = xA(((KA = R[0]) == null ? void 0 : KA.price) * X) + " VND", z.appendChild(iA);
3748
+ iA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:min-w-[16rem] wgt:@max-2xl:hidden", iA.innerText = xA(((KA = R[0]) == null ? void 0 : KA.price) * F) + " VND", z.appendChild(iA);
3749
3749
  const lA = document.createElement("div");
3750
3750
  lA.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", lA.innerHTML = `
3751
3751
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
@@ -3757,7 +3757,7 @@ function dE(q) {
3757
3757
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3758
3758
  <span>${a("total")}:</span>
3759
3759
  <span class="wgt:text-primary">${xA(
3760
- ((WA = R[0]) == null ? void 0 : WA.price) * X
3760
+ ((WA = R[0]) == null ? void 0 : WA.price) * F
3761
3761
  )} VND</span>
3762
3762
  </div>
3763
3763
  `, p.appendChild(lA), aA.appendChild(z);
@@ -3880,7 +3880,7 @@ function dE(q) {
3880
3880
  "package"
3881
3881
  )} ${(lA = (iA = z == null ? void 0 : z.reward) == null ? void 0 : iA.packageCodes) == null ? void 0 : lA.join(", ")}`, uA.style.color = "#12B76A") : uA.innerText = "", p.appendChild(uA), aA.appendChild(p);
3882
3882
  });
3883
- const V = T && R.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = R[0]) == null ? void 0 : Rg.price) * X : 0, BA = PA(M), CA = BA ? T ? (Yg = BA.price) != null ? Yg : 0 : (qg = BA.renewPrice) != null ? qg : 0 : 0, Z = BA ? CA * BA.limit * j : 0, $ = e(r), EA = $ ? $.price * $.limit * U : 0, DA = V + Z + EA - gA;
3883
+ const V = T && R.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = R[0]) == null ? void 0 : Rg.price) * F : 0, BA = PA(M), CA = BA ? T ? (Yg = BA.price) != null ? Yg : 0 : (qg = BA.renewPrice) != null ? qg : 0 : 0, Z = BA ? CA * BA.limit * j : 0, $ = e(r), EA = $ ? $.price * $.limit * U : 0, DA = V + Z + EA - gA;
3884
3884
  w(DA);
3885
3885
  {
3886
3886
  const z = document.createElement("tr");
@@ -3946,14 +3946,14 @@ function xE({
3946
3946
  m.className = "wgt:space-y-4", t.forEach((H, Y) => {
3947
3947
  const d = document.createElement("li");
3948
3948
  d.className = "wgt:flex wgt:items-start";
3949
- const X = document.createElement("div");
3950
- X.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3949
+ const F = document.createElement("div");
3950
+ F.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3951
3951
  const j = document.createElement("div");
3952
3952
  j.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
3953
3953
  const U = document.createElement("span");
3954
- U.className = "wgt:text-white wgt:text-sm wgt:font-semibold", U.innerText = String(Y + 1), j.appendChild(U), X.appendChild(j);
3955
- const F = document.createElement("p");
3956
- F.className = "wgt:ml-3 wgt:text-text-sub-600", F.innerText = H, d.appendChild(X), d.appendChild(F), m.appendChild(d);
3954
+ U.className = "wgt:text-white wgt:text-sm wgt:font-semibold", U.innerText = String(Y + 1), j.appendChild(U), F.appendChild(j);
3955
+ const O = document.createElement("p");
3956
+ O.className = "wgt:ml-3 wgt:text-text-sub-600", O.innerText = H, d.appendChild(F), d.appendChild(O), m.appendChild(d);
3957
3957
  }), M.appendChild(m), J.appendChild(M);
3958
3958
  const v = document.createElement("div");
3959
3959
  v.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
@@ -3969,16 +3969,16 @@ function xE({
3969
3969
  )}: <span class="wgt:font-medium">${H.accountNumber}</span>`), H.bankName != null && (q.innerHTML = `${a(
3970
3970
  "beneficiaryBank"
3971
3971
  )}: <span class="wgt:font-medium">${H.bankName}</span>`), H.instructions && (m.innerHTML = "", H.instructions.forEach((Y, d) => {
3972
- const X = document.createElement("li");
3973
- X.className = "wgt:flex wgt:items-start";
3972
+ const F = document.createElement("li");
3973
+ F.className = "wgt:flex wgt:items-start";
3974
3974
  const j = document.createElement("div");
3975
3975
  j.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3976
3976
  const U = document.createElement("div");
3977
3977
  U.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
3978
- const F = document.createElement("span");
3979
- F.className = "wgt:text-white wgt:text-sm wgt:font-semibold", F.innerText = String(d + 1), U.appendChild(F), j.appendChild(U);
3978
+ const O = document.createElement("span");
3979
+ O.className = "wgt:text-white wgt:text-sm wgt:font-semibold", O.innerText = String(d + 1), U.appendChild(O), j.appendChild(U);
3980
3980
  const e = document.createElement("p");
3981
- e.className = "wgt:ml-3 wgt:text-text-sub-600", e.innerText = Y, X.appendChild(j), X.appendChild(e), m.appendChild(X);
3981
+ e.className = "wgt:ml-3 wgt:text-text-sub-600", e.innerText = Y, F.appendChild(j), F.appendChild(e), m.appendChild(F);
3982
3982
  })), H.illustrationSrc != null && (R.src = H.illustrationSrc);
3983
3983
  }
3984
3984
  };
@@ -4032,8 +4032,8 @@ function kE({
4032
4032
  c.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
4033
4033
  const f = document.createElement("p");
4034
4034
  f.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
4035
- const u = (F) => {
4036
- const e = Math.floor(F / 60), h = F % 60;
4035
+ const u = (O) => {
4036
+ const e = Math.floor(O / 60), h = O % 60;
4037
4037
  return `${e.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
4038
4038
  }, o = () => {
4039
4039
  f.innerHTML = `${a(
@@ -4091,30 +4091,30 @@ function kE({
4091
4091
  R.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", R.innerText = a("digitalSignaturePackage");
4092
4092
  const H = document.createElement("span");
4093
4093
  if (H.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", H.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(R), v.appendChild(H), T.appendChild(v), Q && Q.length > 0) {
4094
- const F = document.createElement("div");
4095
- F.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
4094
+ const O = document.createElement("div");
4095
+ O.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
4096
4096
  const e = document.createElement("h4");
4097
4097
  e.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", e.innerText = a("promotion");
4098
4098
  const h = document.createElement("div");
4099
4099
  h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((P) => {
4100
4100
  const l = document.createElement("div");
4101
4101
  l.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", l.innerText = P, h.appendChild(l);
4102
- }), F.appendChild(e), F.appendChild(h), T.appendChild(F);
4102
+ }), O.appendChild(e), O.appendChild(h), T.appendChild(O);
4103
4103
  }
4104
4104
  const Y = document.createElement("hr");
4105
4105
  T.appendChild(Y);
4106
4106
  const d = document.createElement("div");
4107
4107
  d.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4108
- const X = document.createElement("h4");
4109
- X.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", X.innerText = a("paymentAmount");
4108
+ const F = document.createElement("h4");
4109
+ F.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", F.innerText = a("paymentAmount");
4110
4110
  const j = document.createElement("span");
4111
- j.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", j.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, d.appendChild(X), d.appendChild(j), T.appendChild(d), k.appendChild(T);
4111
+ j.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", j.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, d.appendChild(F), d.appendChild(j), T.appendChild(d), k.appendChild(T);
4112
4112
  const U = Ig({
4113
4113
  title: a("cancelTransaction"),
4114
4114
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
4115
4115
  handleClick: () => {
4116
4116
  w && (clearInterval(w), w = null);
4117
- const F = qB({
4117
+ const O = qB({
4118
4118
  message: a("transactionCanceled"),
4119
4119
  okLabel: a("ok"),
4120
4120
  onClose: () => W(null, null, function* () {
@@ -4122,43 +4122,43 @@ function kE({
4122
4122
  }),
4123
4123
  preventClose: !0
4124
4124
  });
4125
- n.appendChild(F.container), F.open();
4125
+ n.appendChild(O.container), O.open();
4126
4126
  }
4127
4127
  });
4128
4128
  return k.appendChild(U), n.appendChild(k), window.addEventListener("beforeunload", () => W(null, null, function* () {
4129
4129
  w && (clearInterval(w), w = null);
4130
4130
  })), {
4131
4131
  container: n,
4132
- setSelectedProvider(F) {
4133
- g = F;
4134
- const e = (F == null ? void 0 : F.logoUrl) || (F == null ? void 0 : F.logo) || "", h = n.querySelector("img");
4135
- h && (h.src = e, h.alt = (F == null ? void 0 : F.name) || "");
4132
+ setSelectedProvider(O) {
4133
+ g = O;
4134
+ const e = (O == null ? void 0 : O.logoUrl) || (O == null ? void 0 : O.logo) || "", h = n.querySelector("img");
4135
+ h && (h.src = e, h.alt = (O == null ? void 0 : O.name) || "");
4136
4136
  },
4137
- setSelectedInvoicePackage(F) {
4137
+ setSelectedInvoicePackage(O) {
4138
4138
  var h, P;
4139
- A = F;
4139
+ A = O;
4140
4140
  const e = n.querySelector(
4141
4141
  ".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
4142
4142
  );
4143
- e && (e.innerText = F ? String((P = (h = F.code) != null ? h : F.limit) != null ? P : "") : "");
4143
+ e && (e.innerText = O ? String((P = (h = O.code) != null ? h : O.limit) != null ? P : "") : "");
4144
4144
  },
4145
- setSelectedSignaturePackage(F) {
4145
+ setSelectedSignaturePackage(O) {
4146
4146
  var P, l, N;
4147
- E = F;
4147
+ E = O;
4148
4148
  const e = n.querySelectorAll(
4149
4149
  ".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
4150
4150
  ), h = e == null ? void 0 : e[1];
4151
4151
  if (h) {
4152
- const O = F ? String((N = (l = F.code) != null ? l : (P = F.name) == null ? void 0 : P.split("-")[1]) != null ? N : "") : "";
4153
- h.innerText = O;
4152
+ const G = O ? String((N = (l = O.code) != null ? l : (P = O.name) == null ? void 0 : P.split("-")[1]) != null ? N : "") : "";
4153
+ h.innerText = G;
4154
4154
  }
4155
4155
  },
4156
- setTotalAmountText(F) {
4157
- C = F;
4156
+ setTotalAmountText(O) {
4157
+ C = O;
4158
4158
  const e = n.querySelector(
4159
4159
  ".wgt:text-2xl.wgt:font-bold.wgt:leading-6.wgt:text-[#ED1C24]"
4160
4160
  );
4161
- e && (e.innerText = typeof F == "number" ? F.toLocaleString("vi-VN") + " VND" : F);
4161
+ e && (e.innerText = typeof O == "number" ? O.toLocaleString("vi-VN") + " VND" : O);
4162
4162
  },
4163
4163
  resetCountdown() {
4164
4164
  w && (clearInterval(w), w = null), I = 3600, o(), i();
@@ -5411,8 +5411,8 @@ function ZE() {
5411
5411
  const H = v[R][0], Y = v[R][1];
5412
5412
  for (let d = -1; d <= 7; d++)
5413
5413
  if (!(H + d <= -1 || m <= H + d))
5414
- for (let X = -1; X <= 7; X++)
5415
- Y + X <= -1 || m <= Y + X || (d >= 0 && d <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (d === 0 || d === 6) || d >= 2 && d <= 4 && X >= 2 && X <= 4 ? M.set(H + d, Y + X, !0, !0) : M.set(H + d, Y + X, !1, !0));
5414
+ for (let F = -1; F <= 7; F++)
5415
+ Y + F <= -1 || m <= Y + F || (d >= 0 && d <= 6 && (F === 0 || F === 6) || F >= 0 && F <= 6 && (d === 0 || d === 6) || d >= 2 && d <= 4 && F >= 2 && F <= 4 ? M.set(H + d, Y + F, !0, !0) : M.set(H + d, Y + F, !1, !0));
5416
5416
  }
5417
5417
  }
5418
5418
  function i(M) {
@@ -5449,10 +5449,10 @@ function ZE() {
5449
5449
  let v = -1, R = m - 1, H = 7, Y = 0;
5450
5450
  for (let d = m - 1; d > 0; d -= 2)
5451
5451
  for (d === 6 && d--; ; ) {
5452
- for (let X = 0; X < 2; X++)
5453
- if (!M.isReserved(R, d - X)) {
5452
+ for (let F = 0; F < 2; F++)
5453
+ if (!M.isReserved(R, d - F)) {
5454
5454
  let j = !1;
5455
- Y < r.length && (j = (r[Y] >>> H & 1) === 1), M.set(R, d - X, j), H--, H === -1 && (Y++, H = 7);
5455
+ Y < r.length && (j = (r[Y] >>> H & 1) === 1), M.set(R, d - F, j), H--, H === -1 && (Y++, H = 7);
5456
5456
  }
5457
5457
  if (R += v, R < 0 || m <= R) {
5458
5458
  R -= v, v = -v;
@@ -5462,30 +5462,30 @@ function ZE() {
5462
5462
  }
5463
5463
  function s(M, r, m) {
5464
5464
  const v = new E();
5465
- m.forEach(function(X) {
5466
- v.put(X.mode.bit, 4), v.put(X.getLength(), f.getCharCountIndicator(X.mode, M)), X.write(v);
5465
+ m.forEach(function(F) {
5466
+ v.put(F.mode.bit, 4), v.put(F.getLength(), f.getCharCountIndicator(F.mode, M)), F.write(v);
5467
5467
  });
5468
5468
  const R = g.getSymbolTotalCodewords(M), H = n.getTotalCodewordsCount(M, r), Y = (R - H) * 8;
5469
5469
  for (v.getLengthInBits() + 4 <= Y && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
5470
5470
  v.putBit(0);
5471
5471
  const d = (Y - v.getLengthInBits()) / 8;
5472
- for (let X = 0; X < d; X++)
5473
- v.put(X % 2 ? 17 : 236, 8);
5472
+ for (let F = 0; F < d; F++)
5473
+ v.put(F % 2 ? 17 : 236, 8);
5474
5474
  return q(v, M, r);
5475
5475
  }
5476
5476
  function q(M, r, m) {
5477
- const v = g.getSymbolTotalCodewords(r), R = n.getTotalCodewordsCount(r, m), H = v - R, Y = n.getBlocksCount(r, m), d = v % Y, X = Y - d, j = Math.floor(v / Y), U = Math.floor(H / Y), F = U + 1, e = j - U, h = new I(e);
5477
+ const v = g.getSymbolTotalCodewords(r), R = n.getTotalCodewordsCount(r, m), H = v - R, Y = n.getBlocksCount(r, m), d = v % Y, F = Y - d, j = Math.floor(v / Y), U = Math.floor(H / Y), O = U + 1, e = j - U, h = new I(e);
5478
5478
  let P = 0;
5479
5479
  const l = new Array(Y), N = new Array(Y);
5480
- let O = 0;
5480
+ let G = 0;
5481
5481
  const y = new Uint8Array(M.buffer);
5482
5482
  for (let tA = 0; tA < Y; tA++) {
5483
- const PA = tA < X ? U : F;
5484
- l[tA] = y.slice(P, P + PA), N[tA] = h.encode(l[tA]), P += PA, O = Math.max(O, PA);
5483
+ const PA = tA < F ? U : O;
5484
+ l[tA] = y.slice(P, P + PA), N[tA] = h.encode(l[tA]), P += PA, G = Math.max(G, PA);
5485
5485
  }
5486
5486
  const b = new Uint8Array(v);
5487
5487
  let _ = 0, S, nA;
5488
- for (S = 0; S < O; S++)
5488
+ for (S = 0; S < G; S++)
5489
5489
  for (nA = 0; nA < Y; nA++)
5490
5490
  S < l[nA].length && (b[_++] = l[nA][S]);
5491
5491
  for (S = 0; S < e; S++)
@@ -5518,12 +5518,12 @@ The chosen QR Code version cannot contain this amount of data.
5518
5518
  Minimum version required to store current data is: ` + H + `.
5519
5519
  `
5520
5520
  );
5521
- const Y = s(r, m, R), d = g.getSymbolSize(r), X = new B(d);
5522
- return o(X, r), i(X), D(X, r), T(X, m, 0), r >= 7 && k(X, r), x(X, Y), isNaN(v) && (v = t.getBestMask(
5523
- X,
5524
- T.bind(null, X, m)
5525
- )), t.applyMask(v, X), T(X, m, v), {
5526
- modules: X,
5521
+ const Y = s(r, m, R), d = g.getSymbolSize(r), F = new B(d);
5522
+ return o(F, r), i(F), D(F, r), T(F, m, 0), r >= 7 && k(F, r), x(F, Y), isNaN(v) && (v = t.getBestMask(
5523
+ F,
5524
+ T.bind(null, F, m)
5525
+ )), t.applyMask(v, F), T(F, m, v), {
5526
+ modules: F,
5527
5527
  version: r,
5528
5528
  errorCorrectionLevel: m,
5529
5529
  maskPattern: v,
@@ -5736,20 +5736,20 @@ function BI(n) {
5736
5736
  R.appendChild(H), i.appendChild(R);
5737
5737
  function Y() {
5738
5738
  return W(this, null, function* () {
5739
- const { registrationData: F } = C, P = F.eInvoiceRegistration, { isUsedEInvoiceBefore: e } = P, h = Kg(P, ["isUsedEInvoiceBefore"]);
5739
+ const { registrationData: O } = C, P = O.eInvoiceRegistration, { isUsedEInvoiceBefore: e } = P, h = Kg(P, ["isUsedEInvoiceBefore"]);
5740
5740
  try {
5741
5741
  const N = (yield gQ({
5742
5742
  eInvoiceRegistration: rA({}, h),
5743
- bank: F.bank,
5744
- provider: F.provider,
5745
- logo: F.logo,
5746
- organizationRegistrationCert: F.license,
5743
+ bank: O.bank,
5744
+ provider: O.provider,
5745
+ logo: O.logo,
5746
+ organizationRegistrationCert: O.license,
5747
5747
  legalRepresentativeIdCard: [
5748
- F.idCard,
5749
- F.idCardBack
5748
+ O.idCard,
5749
+ O.idCardBack
5750
5750
  ],
5751
- packages: F.packages,
5752
- promotionCodes: F.promotionCodes
5751
+ packages: O.packages,
5752
+ promotionCodes: O.promotionCodes
5753
5753
  })).orderId;
5754
5754
  N !== f && (f = N, Q(N), yield d(N), v());
5755
5755
  } catch (l) {
@@ -5760,7 +5760,7 @@ function BI(n) {
5760
5760
  }
5761
5761
  });
5762
5762
  }
5763
- function d(F) {
5763
+ function d(O) {
5764
5764
  return W(this, null, function* () {
5765
5765
  var e, h, P, l;
5766
5766
  if (u) {
@@ -5770,7 +5770,7 @@ function BI(n) {
5770
5770
  u = !0, k();
5771
5771
  try {
5772
5772
  if (I = yield fQ({
5773
- orderId: F != null ? F : C == null ? void 0 : C.orderId,
5773
+ orderId: O != null ? O : C == null ? void 0 : C.orderId,
5774
5774
  amount: C == null ? void 0 : C.totalAmountText,
5775
5775
  baseURL: dQ(t)
5776
5776
  }), !(I != null && I.qr_string))
@@ -5826,13 +5826,13 @@ function BI(n) {
5826
5826
  });
5827
5827
  }
5828
5828
  f && (yield d(f));
5829
- let X = !1;
5829
+ let F = !1;
5830
5830
  function j() {
5831
- X = !navigator.onLine, console.log("Network status changed:", X ? "offline" : "online");
5831
+ F = !navigator.onLine, console.log("Network status changed:", F ? "offline" : "online");
5832
5832
  }
5833
5833
  function U() {
5834
5834
  c && (clearInterval(c), c = null), c = setInterval(() => W(null, null, function* () {
5835
- var F, e;
5835
+ var O, e;
5836
5836
  try {
5837
5837
  const h = yield mE(f);
5838
5838
  if (h.paymentStatus === "pending")
@@ -5849,14 +5849,14 @@ function BI(n) {
5849
5849
  });
5850
5850
  i.appendChild(l.container), l.open();
5851
5851
  } catch (h) {
5852
- !navigator.onLine || !h.response ? (X = !0, Dg(a("errorNetwork"), {
5852
+ !navigator.onLine || !h.response ? (F = !0, Dg(a("errorNetwork"), {
5853
5853
  okLabel: a("tryAgain"),
5854
5854
  onClose: function() {
5855
5855
  return W(this, null, function* () {
5856
5856
  });
5857
5857
  },
5858
5858
  isOffline: !0
5859
- })) : ((F = h.response) == null ? void 0 : F.status) === 404 ? Dg(a("errorOrderNotFound"), {
5859
+ })) : ((O = h.response) == null ? void 0 : O.status) === 404 ? Dg(a("errorOrderNotFound"), {
5860
5860
  okLabel: a("tryAgain"),
5861
5861
  onClose: function() {
5862
5862
  return W(this, null, function* () {
@@ -5982,8 +5982,8 @@ function CI({
5982
5982
  Y.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", Y.innerText = "3", H.appendChild(Y);
5983
5983
  const d = document.createElement("p");
5984
5984
  d.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", d.appendChild(document.createTextNode(a("notice3.1") + " "));
5985
- const X = document.createElement("a");
5986
- X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = a("settings") + " ", X.href = C, X.target = "_blank", d.appendChild(X), d.appendChild(document.createTextNode(a("notice3.2") + " ")), H.appendChild(d);
5985
+ const F = document.createElement("a");
5986
+ F.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", F.textContent = a("settings") + " ", F.href = C, F.target = "_blank", d.appendChild(F), d.appendChild(document.createTextNode(a("notice3.2") + " ")), H.appendChild(d);
5987
5987
  const j = document.createElement("div");
5988
5988
  j.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:py-3 wgt:px-5 wgt:bg-primary/15 wgt:rounded-[10px] wgt:w-fit wgt:mx-auto", n.appendChild(j);
5989
5989
  const U = document.createElement("div");
@@ -5992,8 +5992,8 @@ function CI({
5992
5992
  <path d="M3.55534 9.25979C3.21016 9.26076 2.87232 9.35944 2.58089 9.5444C2.28945 9.72937 2.05634 9.99306 1.90853 10.305C1.76071 10.6169 1.70422 10.9643 1.74561 11.307C1.78699 11.6497 1.92455 11.9736 2.14238 12.2414L6.78584 17.9296C6.9514 18.1352 7.16362 18.2983 7.40488 18.4054C7.64614 18.5125 7.90947 18.5605 8.17299 18.5454C8.73661 18.5151 9.24545 18.2136 9.56988 17.7179L19.2155 2.18356C19.2171 2.18099 19.2188 2.17841 19.2205 2.17587C19.311 2.03691 19.2816 1.76152 19.0948 1.58852C19.0435 1.54102 18.983 1.50452 18.917 1.48127C18.8511 1.45803 18.7811 1.44854 18.7113 1.45338C18.6415 1.45822 18.5735 1.47729 18.5114 1.50941C18.4493 1.54154 18.3944 1.58604 18.3501 1.64018C18.3466 1.64444 18.3431 1.64863 18.3394 1.65276L8.61164 12.6437C8.57463 12.6855 8.52967 12.7196 8.47939 12.7439C8.4291 12.7682 8.37448 12.7822 8.31871 12.7852C8.26294 12.7883 8.20713 12.7802 8.15451 12.7614C8.1019 12.7427 8.05353 12.7137 8.01222 12.6761L4.78376 9.73818C4.44846 9.43081 4.01021 9.26014 3.55534 9.25979Z" fill="${B === "ocb" ? "#008c44" : "#1e2a7b"}"
5993
5993
  </svg>
5994
5994
  `;
5995
- const F = document.createElement("label");
5996
- F.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", F.appendChild(document.createTextNode(a("informationSent"))), j.appendChild(U), j.appendChild(F);
5995
+ const O = document.createElement("label");
5996
+ O.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", O.appendChild(document.createTextNode(a("informationSent"))), j.appendChild(U), j.appendChild(O);
5997
5997
  const e = document.createElement("div");
5998
5998
  e.className = "wgt:w-full wgt:flex wgt:justify-center", n.appendChild(e);
5999
5999
  const h = Ig({
@@ -6174,7 +6174,7 @@ function DI({
6174
6174
  document.querySelectorAll('[data-wgt-warning-popup="true"]').forEach((d) => {
6175
6175
  try {
6176
6176
  d.remove();
6177
- } catch (X) {
6177
+ } catch (F) {
6178
6178
  }
6179
6179
  });
6180
6180
  const w = aI(), c = uI(w), f = `Bạn có thể vào <strong style="color: ${c} !important;">Thiết lập</strong> để sử dụng dịch vụ, <br> hoặc chọn <strong style="color: ${c} !important;">Tiếp tục</strong> để đăng ký mới (có thể phát sinh phí).`, u = document.createElement("div");
@@ -6323,7 +6323,7 @@ function DI({
6323
6323
  M = !0, J = !1, R();
6324
6324
  try {
6325
6325
  u.remove();
6326
- } catch (X) {
6326
+ } catch (F) {
6327
6327
  }
6328
6328
  d ? C ? window.location.href = C : typeof g == "function" && g() : !d && typeof A == "function" && A();
6329
6329
  }
@@ -6372,7 +6372,7 @@ function mI(g, A, E, B, C, Q) {
6372
6372
  { name: "FPT", route: "fpt", logoUrl: vQ },
6373
6373
  { name: "Viettel", route: "viettel", logoUrl: MQ }
6374
6374
  ].filter(
6375
- (O) => O.route === "m-invoice"
6375
+ (G) => G.route === "m-invoice"
6376
6376
  );
6377
6377
  function I() {
6378
6378
  return [a("stepInfo"), a("stepPlan"), a("stepPayment")];
@@ -6470,8 +6470,8 @@ function mI(g, A, E, B, C, Q) {
6470
6470
  qtySignaturePkg: 1
6471
6471
  };
6472
6472
  }
6473
- function Y(O) {
6474
- O || (O = {
6473
+ function Y(G) {
6474
+ G || (G = {
6475
6475
  name: "",
6476
6476
  address: "",
6477
6477
  taxCode: (B == null ? void 0 : B.taxCode) || "",
@@ -6479,10 +6479,10 @@ function mI(g, A, E, B, C, Q) {
6479
6479
  }), D = LA(rA({}, D), {
6480
6480
  eInvoiceRegistration: {
6481
6481
  organization: {
6482
- name: (O == null ? void 0 : O.name) || "",
6483
- address: (O == null ? void 0 : O.address) || "",
6484
- taxCode: (O == null ? void 0 : O.taxCode) || "",
6485
- taxAuthority: (O == null ? void 0 : O.taxAuthority) || ""
6482
+ name: (G == null ? void 0 : G.name) || "",
6483
+ address: (G == null ? void 0 : G.address) || "",
6484
+ taxCode: (G == null ? void 0 : G.taxCode) || "",
6485
+ taxAuthority: (G == null ? void 0 : G.taxAuthority) || ""
6486
6486
  },
6487
6487
  contactPerson: {
6488
6488
  name: "",
@@ -6516,29 +6516,29 @@ function mI(g, A, E, B, C, Q) {
6516
6516
  function d() {
6517
6517
  H(), o = 1, f(o, I()), U(o);
6518
6518
  }
6519
- function X() {
6519
+ function F() {
6520
6520
  typeof window != "undefined" && window.scrollTo({
6521
6521
  top: 0,
6522
6522
  behavior: "smooth"
6523
6523
  });
6524
6524
  }
6525
- function j(O, y) {
6525
+ function j(G, y) {
6526
6526
  return W(this, null, function* () {
6527
- O ? D = LA(rA({}, D), {
6527
+ G ? D = LA(rA({}, D), {
6528
6528
  eInvoiceRegistration: {
6529
- organization: rA({}, O.organization),
6530
- contactPerson: rA({}, O.contactPerson),
6531
- legalRepresentative: rA({}, O.legalRepresentative),
6532
- hasUsedEInvoice: O.hasUsedEInvoice,
6533
- invoiceSymbol: O.invoiceSymbol,
6534
- previousEInvoiceProvider: O.previousEInvoiceProvider
6529
+ organization: rA({}, G.organization),
6530
+ contactPerson: rA({}, G.contactPerson),
6531
+ legalRepresentative: rA({}, G.legalRepresentative),
6532
+ hasUsedEInvoice: G.hasUsedEInvoice,
6533
+ invoiceSymbol: G.invoiceSymbol,
6534
+ previousEInvoiceProvider: G.previousEInvoiceProvider
6535
6535
  }
6536
6536
  }) : y && Y(y), yield U(o);
6537
6537
  });
6538
6538
  }
6539
- function U(O) {
6539
+ function U(G) {
6540
6540
  return W(this, null, function* () {
6541
- if (O === 1) {
6541
+ if (G === 1) {
6542
6542
  const { container: y } = yield eE({
6543
6543
  providerProps: {
6544
6544
  providers: n,
@@ -6580,7 +6580,7 @@ function mI(g, A, E, B, C, Q) {
6580
6580
  updateRegistrationData: j,
6581
6581
  serial: (B == null ? void 0 : B.serial) || "",
6582
6582
  onSubmit: (b) => {
6583
- D.eInvoiceRegistration = rA(rA({}, D.eInvoiceRegistration), b.eInvoiceRegistration), D.logo = b.logo || null, D.license = b.license || null, D.idCard = b.idCard || null, D.idCardBack = b.idCardBack || null, D.provider = i.route, o = 2, f(o, I()), U(o), X();
6583
+ D.eInvoiceRegistration = rA(rA({}, D.eInvoiceRegistration), b.eInvoiceRegistration), D.logo = b.logo || null, D.license = b.license || null, D.idCard = b.idCard || null, D.idCardBack = b.idCardBack || null, D.provider = i.route, o = 2, f(o, I()), U(o), F();
6584
6584
  },
6585
6585
  registrationData: D,
6586
6586
  theme: C || "default",
@@ -6597,13 +6597,13 @@ function mI(g, A, E, B, C, Q) {
6597
6597
  }
6598
6598
  });
6599
6599
  u(y);
6600
- } else if (O === 2) {
6600
+ } else if (G === 2) {
6601
6601
  const { container: y } = yield dE({
6602
6602
  onNext: () => W(null, null, function* () {
6603
- o = 3, f(o, I()), U(o), X();
6603
+ o = 3, f(o, I()), U(o), F();
6604
6604
  }),
6605
6605
  onPrev: () => {
6606
- o = 1, f(o, I()), U(o), X();
6606
+ o = 1, f(o, I()), U(o), F();
6607
6607
  },
6608
6608
  setSelectedInitPackage: (b) => {
6609
6609
  s = b;
@@ -6643,13 +6643,13 @@ function mI(g, A, E, B, C, Q) {
6643
6643
  }
6644
6644
  });
6645
6645
  u(y);
6646
- } else if (O === 3) {
6646
+ } else if (G === 3) {
6647
6647
  const { container: y } = yield BI({
6648
6648
  onNext: () => {
6649
- o = 4, f(o, I()), U(o), X();
6649
+ o = 4, f(o, I()), U(o), F();
6650
6650
  },
6651
6651
  onPrev: () => {
6652
- o = 2, f(o, I()), U(o), X();
6652
+ o = 2, f(o, I()), U(o), F();
6653
6653
  },
6654
6654
  step: 3,
6655
6655
  checkoutProps: {
@@ -6667,7 +6667,7 @@ function mI(g, A, E, B, C, Q) {
6667
6667
  selectedPromotions: m,
6668
6668
  totalAmountText: M,
6669
6669
  onCancel: () => {
6670
- o = 2, f(o, I()), U(o), X();
6670
+ o = 2, f(o, I()), U(o), F();
6671
6671
  },
6672
6672
  onResetToStep1: d
6673
6673
  },
@@ -6676,11 +6676,11 @@ function mI(g, A, E, B, C, Q) {
6676
6676
  }
6677
6677
  });
6678
6678
  u(y);
6679
- } else if (O === 4) {
6679
+ } else if (G === 4) {
6680
6680
  const { container: y } = CI({
6681
6681
  orderId: x || "",
6682
6682
  onPrev: () => {
6683
- o = 3, f(o, I()), U(o), X();
6683
+ o = 3, f(o, I()), U(o), F();
6684
6684
  },
6685
6685
  // onReturnHome: close ? close : () => {},
6686
6686
  onReturnHome: () => {
@@ -6695,12 +6695,12 @@ function mI(g, A, E, B, C, Q) {
6695
6695
  }
6696
6696
  });
6697
6697
  }
6698
- const { container: F, open: e } = vB();
6699
- k && (u(F), e()), yield iB(
6698
+ const { container: O, open: e } = vB();
6699
+ k && (u(O), e()), yield iB(
6700
6700
  i.route,
6701
6701
  (N = (l = D == null ? void 0 : D.eInvoiceRegistration) == null ? void 0 : l.organization) == null ? void 0 : N.taxCode,
6702
- (O, y) => W(null, null, function* () {
6703
- k = !1, T = O, j(y), w.updateTitle(
6702
+ (G, y) => W(null, null, function* () {
6703
+ k = !1, T = G, j(y), w.updateTitle(
6704
6704
  Q ? a("eInvoiceRenewal") : a("eInvoiceRegister")
6705
6705
  );
6706
6706
  }),