@invoice-sdk/widget 1.33.1 → 1.34.0

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.
package/dist/index.esm.js CHANGED
@@ -1,18 +1,18 @@
1
- var OI = Object.defineProperty, FI = Object.defineProperties;
2
- var qI = Object.getOwnPropertyDescriptors;
1
+ var GI = Object.defineProperty, OI = Object.defineProperties;
2
+ var FI = Object.getOwnPropertyDescriptors;
3
3
  var fg = Object.getOwnPropertySymbols;
4
4
  var YB = Object.prototype.hasOwnProperty, HB = Object.prototype.propertyIsEnumerable;
5
- var Ag = (g, A) => (A = Symbol[g]) ? A : Symbol.for("Symbol." + g), yI = (g) => {
5
+ var Ag = (g, A) => (A = Symbol[g]) ? A : Symbol.for("Symbol." + g), qI = (g) => {
6
6
  throw TypeError(g);
7
7
  };
8
- var kB = (g, A, B) => A in g ? OI(g, A, { enumerable: !0, configurable: !0, writable: !0, value: B }) : g[A] = B, DA = (g, A) => {
8
+ var kB = (g, A, B) => A in g ? GI(g, A, { enumerable: !0, configurable: !0, writable: !0, value: B }) : g[A] = B, DA = (g, A) => {
9
9
  for (var B in A || (A = {}))
10
10
  YB.call(A, B) && kB(g, B, A[B]);
11
11
  if (fg)
12
12
  for (var B of fg(A))
13
13
  HB.call(A, B) && kB(g, B, A[B]);
14
14
  return g;
15
- }, FA = (g, A) => FI(g, qI(A));
15
+ }, FA = (g, A) => OI(g, FI(A));
16
16
  var yg = (g, A) => {
17
17
  var B = {};
18
18
  for (var C in g)
@@ -23,31 +23,31 @@ var yg = (g, A) => {
23
23
  return B;
24
24
  };
25
25
  var N = (g, A, B) => new Promise((C, Q) => {
26
- var I = (w) => {
26
+ var I = (t) => {
27
27
  try {
28
- n(B.next(w));
28
+ n(B.next(t));
29
29
  } catch (e) {
30
30
  Q(e);
31
31
  }
32
- }, E = (w) => {
32
+ }, E = (t) => {
33
33
  try {
34
- n(B.throw(w));
34
+ n(B.throw(t));
35
35
  } catch (e) {
36
36
  Q(e);
37
37
  }
38
- }, n = (w) => w.done ? C(w.value) : Promise.resolve(w.value).then(I, E);
38
+ }, n = (t) => t.done ? C(t.value) : Promise.resolve(t.value).then(I, E);
39
39
  n((B = B.apply(g, A)).next());
40
40
  }), UA = function(g, A) {
41
41
  this[0] = g, this[1] = A;
42
42
  }, lg = (g, A, B) => {
43
- var C = (E, n, w, e) => {
43
+ var C = (E, n, t, e) => {
44
44
  try {
45
- var t = B[E](n), i = (n = t.value) instanceof UA, o = t.done;
46
- Promise.resolve(i ? n[0] : n).then((D) => i ? C(E === "return" ? E : "next", n[1] ? { done: D.done, value: D.value } : D, w, e) : w({ value: D, done: o })).catch((D) => C("throw", D, w, e));
45
+ var w = B[E](n), i = (n = w.value) instanceof UA, o = w.done;
46
+ Promise.resolve(i ? n[0] : n).then((D) => i ? C(E === "return" ? E : "next", n[1] ? { done: D.done, value: D.value } : D, t, e) : t({ value: D, done: o })).catch((D) => C("throw", D, t, e));
47
47
  } catch (D) {
48
48
  e(D);
49
49
  }
50
- }, Q = (E) => I[E] = (n) => new Promise((w, e) => C(E, n, w, e)), I = {};
50
+ }, Q = (E) => I[E] = (n) => new Promise((t, e) => C(E, n, t, e)), I = {};
51
51
  return B = B.apply(g, A), I[Ag("asyncIterator")] = () => I, Q("next"), Q("throw"), Q("return"), I;
52
52
  }, mg = (g) => {
53
53
  var A = g[Ag("asyncIterator")], B = !1, C, Q = {};
@@ -59,15 +59,15 @@ var N = (g, A, B) => new Promise((C, Q) => {
59
59
  return B = !0, {
60
60
  done: !1,
61
61
  value: new UA(new Promise((n) => {
62
- var w = A[I](E);
63
- w instanceof Object || yI("Object expected"), n(w);
62
+ var t = A[I](E);
63
+ t instanceof Object || qI("Object expected"), n(t);
64
64
  }), 1)
65
65
  };
66
66
  }), Q[Ag("iterator")] = () => Q, C("next"), "throw" in A ? C("throw") : Q.throw = (I) => {
67
67
  throw I;
68
68
  }, "return" in A && C("return"), Q;
69
- }, zB = (g, A, B) => (A = g[Ag("asyncIterator")]) ? A.call(g) : (g = g[Ag("iterator")](), A = {}, B = (C, Q) => (Q = g[C]) && (A[C] = (I) => new Promise((E, n, w) => (I = Q.call(g, I), w = I.done, Promise.resolve(I.value).then((e) => E({ value: e, done: w }), n)))), B("next"), B("return"), A);
70
- function lI({ steps: g = [], currentStep: A = 1 } = {}) {
69
+ }, zB = (g, A, B) => (A = g[Ag("asyncIterator")]) ? A.call(g) : (g = g[Ag("iterator")](), A = {}, B = (C, Q) => (Q = g[C]) && (A[C] = (I) => new Promise((E, n, t) => (I = Q.call(g, I), t = I.done, Promise.resolve(I.value).then((e) => E({ value: e, done: t }), n)))), B("next"), B("return"), A);
70
+ function yI({ steps: g = [], currentStep: A = 1 } = {}) {
71
71
  const B = document.createElement("div");
72
72
  B.className = [
73
73
  "wgt:relative",
@@ -88,12 +88,12 @@ function lI({ steps: g = [], currentStep: A = 1 } = {}) {
88
88
  const Q = document.createElement("div");
89
89
  Q.className = "wgt:relative wgt:flex wgt:w-full wgt:z-10";
90
90
  const I = [];
91
- g.forEach((n, w) => {
92
- const e = w + 1, t = document.createElement("div");
93
- t.setAttribute("role", "listitem"), t.setAttribute(
91
+ g.forEach((n, t) => {
92
+ const e = t + 1, w = document.createElement("div");
93
+ w.setAttribute("role", "listitem"), w.setAttribute(
94
94
  "aria-label",
95
95
  `Step ${e} of ${g.length}: ${n.label}`
96
- ), t.className = [
96
+ ), w.className = [
97
97
  "wgt:flex-1",
98
98
  "wgt:flex",
99
99
  "wgt:items-center",
@@ -101,7 +101,7 @@ function lI({ steps: g = [], currentStep: A = 1 } = {}) {
101
101
  "wgt:py-5",
102
102
  "wgt:px-4",
103
103
  // make space on the right for that 36px arrow-width:
104
- w < g.length - 1 ? "wgt:pr-9" : ""
104
+ t < g.length - 1 ? "wgt:pr-9" : ""
105
105
  ].filter(Boolean).join(" ");
106
106
  const i = document.createElement("div");
107
107
  i.className = [
@@ -116,11 +116,11 @@ function lI({ steps: g = [], currentStep: A = 1 } = {}) {
116
116
  const o = document.createElement("span");
117
117
  o.innerText = String(e), o.className = "wgt:text-white wgt:font-medium", i.appendChild(o);
118
118
  const D = document.createElement("span");
119
- D.innerText = n.label, D.className = "wgt:font-medium wgt:whitespace-nowrap", t.append(i, D), Q.append(t), I.push({ wrap: t, circle: i, label: D });
119
+ D.innerText = n.label, D.className = "wgt:font-medium wgt:whitespace-nowrap", w.append(i, D), Q.append(w), I.push({ wrap: w, circle: i, label: D });
120
120
  }), B.append(C, Q);
121
121
  function E(n) {
122
- const w = g.length, e = Math.max(0, Math.min(n, w)), t = e / w * 100;
123
- C.style.width = `${t}%`, e === w ? (C.style.clipPath = "none", C.style.borderTopRightRadius = "10px", C.style.borderBottomRightRadius = "10px") : (C.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", C.style.borderTopRightRadius = "0", C.style.borderBottomRightRadius = "0"), I.forEach(({ circle: i, label: o }, D) => {
122
+ const t = g.length, e = Math.max(0, Math.min(n, t)), w = e / t * 100;
123
+ C.style.width = `${w}%`, e === t ? (C.style.clipPath = "none", C.style.borderTopRightRadius = "10px", C.style.borderBottomRightRadius = "10px") : (C.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", C.style.borderTopRightRadius = "0", C.style.borderBottomRightRadius = "0"), I.forEach(({ circle: i, label: o }, D) => {
124
124
  D + 1 <= e ? (i.classList.add("wgt:bg-icon-primary"), i.classList.remove("wgt:bg-icon-soft-400"), o.classList.add("wgt:text-primary-dark"), o.classList.remove("wgt:text-soft-400")) : (i.classList.add("wgt:bg-icon-soft-400"), i.classList.remove("wgt:bg-icon-primary"), o.classList.add("wgt:text-soft-400"), o.classList.remove("wgt:text-primary-dark"));
125
125
  });
126
126
  }
@@ -552,7 +552,7 @@ const zC = {
552
552
  }
553
553
  };
554
554
  let GC = "vi";
555
- function SQ(g) {
555
+ function lI(g) {
556
556
  zC[g] ? GC = g : (console.warn(`Language '${g}' not supported. Falling back to 'vi'`), GC = "vi");
557
557
  }
558
558
  function s(g, A = "") {
@@ -610,7 +610,7 @@ function mI({ steps: g = [], currentStep: A = 1 } = {}) {
610
610
  "wgt:gap-6",
611
611
  "wgt:shadow-[0px_1px_8px_0px_rgba(82,88,102,0.06)]"
612
612
  ].join(" ");
613
- const I = lI({
613
+ const I = yI({
614
614
  steps: g.map((n) => ({ label: n })),
615
615
  currentStep: A
616
616
  });
@@ -633,7 +633,7 @@ function mI({ steps: g = [], currentStep: A = 1 } = {}) {
633
633
  }
634
634
  };
635
635
  }
636
- function UQ({
636
+ function SQ({
637
637
  name: g,
638
638
  value: A = "",
639
639
  label: B = "",
@@ -651,15 +651,15 @@ function UQ({
651
651
  "wgt:checked:accent-primary",
652
652
  // dot & border in primary when checked
653
653
  "wgt:focus:ring-primary"
654
- ].join(" "), E.addEventListener("change", (w) => {
655
- const e = w.target.checked;
654
+ ].join(" "), E.addEventListener("change", (t) => {
655
+ const e = t.target.checked;
656
656
  typeof Q == "function" && Q(e);
657
657
  });
658
658
  const n = document.createElement("span");
659
659
  return n.innerText = B, I.append(E, n), {
660
660
  container: I,
661
- setChecked(w) {
662
- E.checked = w;
661
+ setChecked(t) {
662
+ E.checked = t;
663
663
  }
664
664
  };
665
665
  }
@@ -676,8 +676,8 @@ function LI({
676
676
  I.className = "wgt:grid wgt:grid-cols-3 wgt:gap-4", C.appendChild(I);
677
677
  function E() {
678
678
  I.innerHTML = "", g.forEach((n) => {
679
- const w = n.route === A, e = document.createElement("div");
680
- e.dataset.checked = w ? "true" : "false", e.className = [
679
+ const t = n.route === A, e = document.createElement("div");
680
+ e.dataset.checked = t ? "true" : "false", e.className = [
681
681
  "wgt:flex",
682
682
  "wgt:items-center",
683
683
  "wgt:justify-between",
@@ -690,25 +690,25 @@ function LI({
690
690
  "wgt:cursor-pointer",
691
691
  "wgt:transition-colors",
692
692
  "wgt:duration-200",
693
- w ? "wgt:border-primary" : ""
693
+ t ? "wgt:border-primary" : ""
694
694
  ].filter(Boolean).join(" "), e.addEventListener("click", () => {
695
695
  A = n.route, typeof B == "function" && B(n), E();
696
696
  });
697
- const t = document.createElement("div");
698
- t.className = "wgt:flex wgt:items-center wgt:gap-3";
697
+ const w = document.createElement("div");
698
+ w.className = "wgt:flex wgt:items-center wgt:gap-3";
699
699
  const i = document.createElement("img");
700
700
  i.src = n.logoUrl, i.alt = n.name, i.className = "wgt:h-8 wgt:object-contain";
701
701
  const o = document.createElement("div");
702
702
  o.className = "wgt:w-[1px] wgt:h-8 wgt:bg-border-light";
703
703
  const D = document.createElement("label");
704
- D.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", D.innerText = n.name, t.appendChild(i), t.appendChild(o), t.appendChild(D);
705
- const { container: c } = UQ({
706
- checked: w,
704
+ D.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", D.innerText = n.name, w.appendChild(i), w.appendChild(o), w.appendChild(D);
705
+ const { container: c } = SQ({
706
+ checked: t,
707
707
  onChange: (f) => {
708
708
  f && (A = n.route, typeof B == "function" && B(n), E());
709
709
  }
710
710
  });
711
- e.appendChild(t), e.appendChild(c), I.appendChild(e);
711
+ e.appendChild(w), e.appendChild(c), I.appendChild(e);
712
712
  });
713
713
  }
714
714
  return E(), {
@@ -727,20 +727,20 @@ function sA({
727
727
  required: I = !1,
728
728
  error: E = null,
729
729
  onInput: n = null,
730
- readOnly: w = !1,
730
+ readOnly: t = !1,
731
731
  horizontal: e = !1
732
732
  }) {
733
- const t = document.createElement("div");
734
- if (t.className = "wgt:w-full " + (e ? "wgt:grid wgt:grid-cols-6 wgt:items-center wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), Q) {
733
+ const w = document.createElement("div");
734
+ if (w.className = "wgt:w-full " + (e ? "wgt:grid wgt:grid-cols-6 wgt:items-center wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), Q) {
735
735
  const D = document.createElement("label");
736
736
  if (D.htmlFor = g, D.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2", D.innerText = Q, I) {
737
737
  const c = document.createElement("span");
738
738
  c.className = "wgt:text-red-500 wgt:ml-1", c.innerText = "*", D.appendChild(c);
739
739
  }
740
- t.appendChild(D);
740
+ w.appendChild(D);
741
741
  }
742
742
  const i = document.createElement("input");
743
- i.type = B, i.name = g, i.id = g, i.value = A, i.placeholder = C, i.readOnly = w, i.autocomplete = "off", i.autocapitalize = "off", i.spellcheck = !1, i.className = [
743
+ i.type = B, i.name = g, i.id = g, i.value = A, i.placeholder = C, i.readOnly = t, i.autocomplete = "off", i.autocapitalize = "off", i.spellcheck = !1, i.className = [
744
744
  "wgt:col-span-4",
745
745
  "wgt:w-full",
746
746
  "wgt:border",
@@ -756,8 +756,8 @@ function sA({
756
756
  "wgt:focus:ring-primary"
757
757
  ].join(" "), I && i.setAttribute("required", "true"), typeof n == "function" && i.addEventListener("input", n);
758
758
  const o = document.createElement("span");
759
- return o.className = "wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", o.innerText = E || "", E || (o.style.display = "none"), t.appendChild(i), t.appendChild(o), {
760
- container: t,
759
+ return o.className = "wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", o.innerText = E || "", E || (o.style.display = "none"), w.appendChild(i), w.appendChild(o), {
760
+ container: w,
761
761
  inputEl: i,
762
762
  setError(D) {
763
763
  D ? (o.innerText = D, o.style.display = "block", i.classList.remove("wgt:border-gray-300"), i.classList.add("wgt:border-red-500")) : (o.innerText = "", o.style.display = "none", i.classList.remove("wgt:border-red-500"), i.classList.add("wgt:border-gray-300"));
@@ -777,15 +777,15 @@ function GB({
777
777
  onChange: E = null,
778
778
  required: n = !1
779
779
  }) {
780
- const w = document.createElement("div");
781
- w.className = "wgt:flex wgt:flex-col";
780
+ const t = document.createElement("div");
781
+ t.className = "wgt:flex wgt:flex-col";
782
782
  const e = document.createElement("label");
783
- if (e.htmlFor = g, e.className = "wgt:font-medium wgt:mb-2 wgt:text-text-sub-600", e.innerText = C, w.appendChild(e), n) {
783
+ if (e.htmlFor = g, e.className = "wgt:font-medium wgt:mb-2 wgt:text-text-sub-600", e.innerText = C, t.appendChild(e), n) {
784
784
  const D = document.createElement("span");
785
785
  D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", e.appendChild(D);
786
786
  }
787
- const t = document.createElement("select");
788
- t.id = g, t.name = g, t.disabled = Q, t.className = [
787
+ const w = document.createElement("select");
788
+ w.id = g, w.name = g, w.disabled = Q, w.className = [
789
789
  "wgt:border",
790
790
  "wgt:rounded",
791
791
  "wgt:px-3",
@@ -797,30 +797,30 @@ function GB({
797
797
  Q ? "wgt:bg-weak-50" : "wgt:bg-white"
798
798
  ].join(" ");
799
799
  const i = document.createElement("option");
800
- i.value = "", i.disabled = !0, i.selected = A === "" || A == null, i.innerText = `-- Chọn ${C.toLowerCase()} --`, t.appendChild(i), B.forEach((D) => {
800
+ i.value = "", i.disabled = !0, i.selected = A === "" || A == null, i.innerText = `-- Chọn ${C.toLowerCase()} --`, w.appendChild(i), B.forEach((D) => {
801
801
  const c = document.createElement("option");
802
- c.value = D.value, c.innerText = D.label, D.value === A && (c.selected = !0), t.appendChild(c);
803
- }), typeof E == "function" && t.addEventListener("change", E);
802
+ c.value = D.value, c.innerText = D.label, D.value === A && (c.selected = !0), w.appendChild(c);
803
+ }), typeof E == "function" && w.addEventListener("change", E);
804
804
  const o = document.createElement("span");
805
- return o.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", o.innerText = I || "", I || (o.style.display = "none"), w.appendChild(t), w.appendChild(o), {
806
- container: w,
807
- selectEl: t,
805
+ return o.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", o.innerText = I || "", I || (o.style.display = "none"), t.appendChild(w), t.appendChild(o), {
806
+ container: t,
807
+ selectEl: w,
808
808
  setError(D) {
809
- D ? (o.innerText = D, o.style.display = "block", t.classList.remove("wgt:border-gray-300"), t.classList.add("wgt:border-red-500")) : (o.innerText = "", o.style.display = "none", t.classList.remove("wgt:border-red-500"), t.classList.add("wgt:border-gray-300"));
809
+ D ? (o.innerText = D, o.style.display = "block", w.classList.remove("wgt:border-gray-300"), w.classList.add("wgt:border-red-500")) : (o.innerText = "", o.style.display = "none", w.classList.remove("wgt:border-red-500"), w.classList.add("wgt:border-gray-300"));
810
810
  },
811
811
  getValue() {
812
- return t.value;
812
+ return w.value;
813
813
  },
814
814
  setOptions(D) {
815
- for (; t.options.length > 1; )
816
- t.remove(1);
815
+ for (; w.options.length > 1; )
816
+ w.remove(1);
817
817
  D.forEach((c) => {
818
818
  const f = document.createElement("option");
819
- f.value = c.value, f.innerText = c.label, t.appendChild(f);
819
+ f.value = c.value, f.innerText = c.label, w.appendChild(f);
820
820
  });
821
821
  },
822
822
  setDisabled(D) {
823
- t.disabled = !!D;
823
+ w.disabled = !!D;
824
824
  }
825
825
  };
826
826
  }
@@ -862,8 +862,8 @@ function OB({
862
862
  const r = document.createElement("span");
863
863
  r.className = "wgt:text-red-500 wgt:ml-1", r.innerText = "*", n.appendChild(r);
864
864
  }
865
- const w = I ? I.split(",").map((r) => r.trim().startsWith("image/") ? r.replace("image/", "").toUpperCase() : r.trim().startsWith(".") ? r.replace(".", "").toUpperCase() : r.toUpperCase().replace("/*", "")).filter(Boolean).join(", ") : `JPG, PNG ${s("or")} JPEG`;
866
- n.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${s("fileFormat")} ${w}. ${s("maxFileSize")})</span>`, E.appendChild(n);
865
+ const t = I ? I.split(",").map((r) => r.trim().startsWith("image/") ? r.replace("image/", "").toUpperCase() : r.trim().startsWith(".") ? r.replace(".", "").toUpperCase() : r.toUpperCase().replace("/*", "")).filter(Boolean).join(", ") : `JPG, PNG ${s("or")} JPEG`;
866
+ n.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${s("fileFormat")} ${t}. ${s("maxFileSize")})</span>`, E.appendChild(n);
867
867
  const e = document.createElement("div");
868
868
  e.className = [
869
869
  "wgt:h-fit",
@@ -876,8 +876,8 @@ function OB({
876
876
  "wgt:justify-start",
877
877
  "wgt:gap-2"
878
878
  ].join(" ");
879
- const t = document.createElement("input");
880
- t.accept = I || "image/png, image/jpeg, .jpg, .jpeg, .png", t.id = "upload", t.type = "file", t.className = "wgt:hidden";
879
+ const w = document.createElement("input");
880
+ w.accept = I || "image/png, image/jpeg, .jpg, .jpeg, .png", w.id = "upload", w.type = "file", w.className = "wgt:hidden";
881
881
  const i = document.createElement("div");
882
882
  i.className = "wgt:w-full wgt:flex wgt:gap-1 wgt:items-start wgt:justify-start";
883
883
  const o = document.createElement("span");
@@ -890,7 +890,7 @@ function OB({
890
890
  title: "Upload file",
891
891
  className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-white wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer",
892
892
  handleClick: (r) => {
893
- r.stopPropagation(), t.click();
893
+ r.stopPropagation(), w.click();
894
894
  }
895
895
  });
896
896
  function J(r, v = 2) {
@@ -900,14 +900,14 @@ function OB({
900
900
  }
901
901
  function d(r) {
902
902
  const v = r.type.toLowerCase(), h = "." + r.name.split(".").pop().toLowerCase();
903
- return t.accept.split(",").map((R) => R.trim().toLowerCase()).filter(Boolean).some((R) => R.startsWith(".") ? R === h : R.endsWith("/*") ? v.startsWith(R.replace("/*", "")) : v === R);
903
+ return w.accept.split(",").map((R) => R.trim().toLowerCase()).filter(Boolean).some((R) => R.startsWith(".") ? R === h : R.endsWith("/*") ? v.startsWith(R.replace("/*", "")) : v === R);
904
904
  }
905
905
  function u(r) {
906
906
  if (i.innerHTML = "", c(null), r) {
907
- d(r) || c(`File không hợp lệ. Chỉ chấp nhận: ${t.accept}`), r.size <= 500 * 1024 || c("Dung lượng file vượt quá 500KB.");
907
+ d(r) || c(`File không hợp lệ. Chỉ chấp nhận: ${w.accept}`), r.size <= 500 * 1024 || c("Dung lượng file vượt quá 500KB.");
908
908
  const h = document.createElement("div");
909
909
  if (h.className = "wgt:flex wgt:items-center wgt:gap-4", h.addEventListener("click", () => {
910
- t.click();
910
+ w.click();
911
911
  }), r.type.startsWith("image/")) {
912
912
  const k = document.createElement("img");
913
913
  k.src = URL.createObjectURL(r), k.alt = "Preview", k.className = "wgt:h-20 wgt:w-20 wgt:rounded wgt:object-contain wgt:rounded", h.appendChild(k);
@@ -923,10 +923,10 @@ function OB({
923
923
  v.className = "wgt:flex wgt:items-center", v.appendChild(f), i.appendChild(v);
924
924
  }
925
925
  }
926
- return t.addEventListener("change", (r) => {
926
+ return w.addEventListener("change", (r) => {
927
927
  const v = r.target.files && r.target.files[0] ? r.target.files[0] : null;
928
928
  v && (u(v), typeof C == "function" && C(v));
929
- }), u(B), e.appendChild(i), e.appendChild(t), E.appendChild(e), E.appendChild(o), {
929
+ }), u(B), e.appendChild(i), e.appendChild(w), E.appendChild(e), E.appendChild(o), {
930
930
  container: E,
931
931
  getValues() {
932
932
  return B;
@@ -969,17 +969,17 @@ function FB({
969
969
  ].join(" "), I.append(E);
970
970
  const n = document.createElement("input");
971
971
  n.type = "file", n.accept = "image/png, image/jpeg, image/jpg", n.className = "wgt:hidden", E.append(n);
972
- const w = document.createElement("div");
973
- w.className = "wgt:w-10 wgt:h-10 wgt:rounded-full wgt:bg-primary/16 wgt:flex wgt:items-center wgt:justify-center", w.innerHTML = `
972
+ const t = document.createElement("div");
973
+ t.className = "wgt:w-10 wgt:h-10 wgt:rounded-full wgt:bg-primary/16 wgt:flex wgt:items-center wgt:justify-center", t.innerHTML = `
974
974
  <svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
975
975
  <path d="M8.83184 0.96875H10.3485C10.4833 0.96875 10.5507 1.03316 10.5507 1.16199V18.1668C10.5507 18.2956 10.4833 18.3601 10.3485 18.3601H8.83184C8.69702 18.3601 8.62962 18.2956 8.62962 18.1668V1.16199C8.62962 1.03316 8.69702 0.96875 8.83184 0.96875Z" fill="#008C4F"/>
976
976
  <path d="M1.09676 8.74653H18.0836C18.2184 8.74653 18.2858 8.81094 18.2858 8.93976V10.389C18.2858 10.5179 18.2184 10.5823 18.0836 10.5823H1.09676C0.961939 10.5823 0.894531 10.5179 0.894531 10.389V8.93976C0.894531 8.81094 0.961939 8.74653 1.09676 8.74653Z" fill="#008C4F"/>
977
977
  </svg>
978
978
  `;
979
979
  const e = document.createElement("div");
980
- e.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", e.innerText = A, E.append(w, e);
981
- const t = document.createElement("div");
982
- t.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", t.innerText = B, I.append(t);
980
+ e.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", e.innerText = A, E.append(t, e);
981
+ const w = document.createElement("div");
982
+ w.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", w.innerText = B, I.append(w);
983
983
  const i = document.createElement("span");
984
984
  i.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", i.style.display = "none", I.append(i);
985
985
  let o = null;
@@ -1035,7 +1035,7 @@ function jI({ frontFile: g, backFile: A, onFrontChange: B, onBackChange: C }) {
1035
1035
  E.className = "wgt:text-red-500 wgt:ml-1", E.innerText = "*", I.appendChild(E), Q.append(I);
1036
1036
  const n = document.createElement("div");
1037
1037
  n.className = "wgt:w-full wgt:grid wgt:grid-cols-2 wgt:gap-4", Q.append(n);
1038
- const w = FB({
1038
+ const t = FB({
1039
1039
  file: g,
1040
1040
  placeholder: s("uploadFrontId"),
1041
1041
  caption: s("frontIdCard"),
@@ -1046,11 +1046,11 @@ function jI({ frontFile: g, backFile: A, onFrontChange: B, onBackChange: C }) {
1046
1046
  caption: s("backIdCard"),
1047
1047
  onFileSelected: C
1048
1048
  });
1049
- return n.append(w.container, e.container), {
1049
+ return n.append(t.container, e.container), {
1050
1050
  container: Q,
1051
- getFrontFile: () => w.getFile(),
1051
+ getFrontFile: () => t.getFile(),
1052
1052
  getBackFile: () => e.getFile(),
1053
- getFrontFileError: () => w.getError(),
1053
+ getFrontFileError: () => t.getError(),
1054
1054
  getBackFileError: () => e.getError()
1055
1055
  };
1056
1056
  }
@@ -1067,12 +1067,12 @@ const KI = ({
1067
1067
  (h, M) => String(B + M).slice(-2)
1068
1068
  ), Q = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], I = ["C", "K"], E = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], n = document.createElement("div");
1069
1069
  n.className = "wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
1070
- const w = document.createElement("span");
1071
- w.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2", w.textContent = s("invoiceTemplate");
1070
+ const t = document.createElement("span");
1071
+ t.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2", t.textContent = s("invoiceTemplate");
1072
1072
  const e = document.createElement("span");
1073
- e.className = "wgt:text-red-500 wgt:ml-1", e.innerText = "*", w.appendChild(e), n.append(w);
1074
- const t = document.createElement("div");
1075
- t.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:overflow-x-auto wgt:scrollbar-hidden", n.append(t);
1073
+ e.className = "wgt:text-red-500 wgt:ml-1", e.innerText = "*", t.appendChild(e), n.append(t);
1074
+ const w = document.createElement("div");
1075
+ w.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:overflow-x-auto wgt:scrollbar-hidden", n.append(w);
1076
1076
  const i = "wgt:border wgt:border-gray-300 wgt:bg-white wgt:rounded-lg wgt:px-3 wgt:py-2 wgt:text-start wgt:cursor-pointer wgt:outline-none", o = document.createElement("select");
1077
1077
  o.className = `${i} wgt:w-48`, o.title = s("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
1078
1078
  const D = {
@@ -1088,14 +1088,14 @@ const KI = ({
1088
1088
  };
1089
1089
  Q.forEach((h) => {
1090
1090
  o.append(new Option(D[h], h));
1091
- }), t.append(o);
1091
+ }), w.append(o);
1092
1092
  const c = document.createElement("select");
1093
1093
  c.className = `${i} wgt:w-40`, c.title = s("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), I.forEach((h) => {
1094
1094
  const M = h === "C" ? s("codeTypeC", "C (Có mã CQT)") : s("codeTypeK", "K (Không mã)");
1095
1095
  c.append(new Option(M, h));
1096
- }), t.append(c);
1096
+ }), w.append(c);
1097
1097
  const f = document.createElement("select");
1098
- f.className = `${i} wgt:w-16`, f.title = s("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((h) => f.append(new Option(h, h))), f.value = String(B).slice(-2), t.append(f);
1098
+ f.className = `${i} wgt:w-16`, f.title = s("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((h) => f.append(new Option(h, h))), f.value = String(B).slice(-2), w.append(f);
1099
1099
  const J = document.createElement("select");
1100
1100
  J.className = `${i} wgt:w-40`, J.title = s("invoiceTypeTooltip", "Loại hóa đơn");
1101
1101
  const d = {
@@ -1111,9 +1111,9 @@ const KI = ({
1111
1111
  };
1112
1112
  E.forEach((h) => {
1113
1113
  J.append(new Option(d[h], h));
1114
- }), t.append(J);
1114
+ }), w.append(J);
1115
1115
  const u = document.createElement("input");
1116
- u.type = "text", u.maxLength = 2, u.placeholder = "AB", u.defaultValue = "YY", u.className = `${i} wgt:w-16`, u.title = s("customLettersTooltip"), t.append(u);
1116
+ u.type = "text", u.maxLength = 2, u.placeholder = "AB", u.defaultValue = "YY", u.className = `${i} wgt:w-16`, u.title = s("customLettersTooltip"), w.append(u);
1117
1117
  function r() {
1118
1118
  return o.value + c.value + f.value + J.value + u.value.toUpperCase();
1119
1119
  }
@@ -1130,32 +1130,32 @@ const KI = ({
1130
1130
  }
1131
1131
  };
1132
1132
  }, ag = "/core-api/packages", bI = "/core-api/orders", NI = "/core-api/orders/create", XI = "/core-api/customers/is-new", TI = "core-api/convert/iframe-signature", xI = "/tax-code", SI = "/portal/invoice/gen-qr";
1133
- function pQ(g, A) {
1133
+ function UQ(g, A) {
1134
1134
  return function() {
1135
1135
  return g.apply(A, arguments);
1136
1136
  };
1137
1137
  }
1138
- const { toString: UI } = Object.prototype, { getPrototypeOf: LC } = Object, { iterator: kg, toStringTag: ZQ } = Symbol, Yg = /* @__PURE__ */ ((g) => (A) => {
1138
+ const { toString: UI } = Object.prototype, { getPrototypeOf: LC } = Object, { iterator: kg, toStringTag: pQ } = Symbol, Yg = /* @__PURE__ */ ((g) => (A) => {
1139
1139
  const B = UI.call(A);
1140
1140
  return g[B] || (g[B] = B.slice(8, -1).toLowerCase());
1141
1141
  })(/* @__PURE__ */ Object.create(null)), zA = (g) => (g = g.toLowerCase(), (A) => Yg(A) === g), Hg = (g) => (A) => typeof A === g, { isArray: Bg } = Array, Dg = Hg("undefined");
1142
1142
  function pI(g) {
1143
- return g !== null && !Dg(g) && g.constructor !== null && !Dg(g.constructor) && JA(g.constructor.isBuffer) && g.constructor.isBuffer(g);
1143
+ return g !== null && !Dg(g) && g.constructor !== null && !Dg(g.constructor) && PA(g.constructor.isBuffer) && g.constructor.isBuffer(g);
1144
1144
  }
1145
- const WQ = zA("ArrayBuffer");
1145
+ const ZQ = zA("ArrayBuffer");
1146
1146
  function ZI(g) {
1147
1147
  let A;
1148
- return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? A = ArrayBuffer.isView(g) : A = g && g.buffer && WQ(g.buffer), A;
1148
+ return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? A = ArrayBuffer.isView(g) : A = g && g.buffer && ZQ(g.buffer), A;
1149
1149
  }
1150
- const WI = Hg("string"), JA = Hg("function"), VQ = Hg("number"), zg = (g) => g !== null && typeof g == "object", VI = (g) => g === !0 || g === !1, Mg = (g) => {
1150
+ const WI = Hg("string"), PA = Hg("function"), WQ = Hg("number"), zg = (g) => g !== null && typeof g == "object", VI = (g) => g === !0 || g === !1, Mg = (g) => {
1151
1151
  if (Yg(g) !== "object")
1152
1152
  return !1;
1153
1153
  const A = LC(g);
1154
- return (A === null || A === Object.prototype || Object.getPrototypeOf(A) === null) && !(ZQ in g) && !(kg in g);
1155
- }, _I = zA("Date"), $I = zA("File"), AE = zA("Blob"), gE = zA("FileList"), CE = (g) => zg(g) && JA(g.pipe), BE = (g) => {
1154
+ return (A === null || A === Object.prototype || Object.getPrototypeOf(A) === null) && !(pQ in g) && !(kg in g);
1155
+ }, _I = zA("Date"), $I = zA("File"), AE = zA("Blob"), gE = zA("FileList"), CE = (g) => zg(g) && PA(g.pipe), BE = (g) => {
1156
1156
  let A;
1157
- return g && (typeof FormData == "function" && g instanceof FormData || JA(g.append) && ((A = Yg(g)) === "formdata" || // detect form-data instance
1158
- A === "object" && JA(g.toString) && g.toString() === "[object FormData]"));
1157
+ return g && (typeof FormData == "function" && g instanceof FormData || PA(g.append) && ((A = Yg(g)) === "formdata" || // detect form-data instance
1158
+ A === "object" && PA(g.toString) && g.toString() === "[object FormData]"));
1159
1159
  }, QE = zA("URLSearchParams"), [IE, EE, nE, tE] = ["ReadableStream", "Request", "Response", "Headers"].map(zA), wE = (g) => g.trim ? g.trim() : g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1160
1160
  function og(g, A, { allOwnKeys: B = !1 } = {}) {
1161
1161
  if (g === null || typeof g == "undefined")
@@ -1171,7 +1171,7 @@ function og(g, A, { allOwnKeys: B = !1 } = {}) {
1171
1171
  n = I[C], A.call(null, g[n], n, g);
1172
1172
  }
1173
1173
  }
1174
- function _Q(g, A) {
1174
+ function VQ(g, A) {
1175
1175
  A = A.toLowerCase();
1176
1176
  const B = Object.keys(g);
1177
1177
  let C = B.length, Q;
@@ -1180,10 +1180,10 @@ function _Q(g, A) {
1180
1180
  return Q;
1181
1181
  return null;
1182
1182
  }
1183
- const pA = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, $Q = (g) => !Dg(g) && g !== pA;
1183
+ const pA = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, _Q = (g) => !Dg(g) && g !== pA;
1184
1184
  function OC() {
1185
- const { caseless: g } = $Q(this) && this || {}, A = {}, B = (C, Q) => {
1186
- const I = g && _Q(A, Q) || Q;
1185
+ const { caseless: g } = _Q(this) && this || {}, A = {}, B = (C, Q) => {
1186
+ const I = g && VQ(A, Q) || Q;
1187
1187
  Mg(A[I]) && Mg(C) ? A[I] = OC(A[I], C) : Mg(C) ? A[I] = OC({}, C) : Bg(C) ? A[I] = C.slice() : A[I] = C;
1188
1188
  };
1189
1189
  for (let C = 0, Q = arguments.length; C < Q; C++)
@@ -1191,7 +1191,7 @@ function OC() {
1191
1191
  return A;
1192
1192
  }
1193
1193
  const eE = (g, A, B, { allOwnKeys: C } = {}) => (og(A, (Q, I) => {
1194
- B && JA(Q) ? g[I] = pQ(Q, B) : g[I] = Q;
1194
+ B && PA(Q) ? g[I] = UQ(Q, B) : g[I] = Q;
1195
1195
  }, { allOwnKeys: C }), g), iE = (g) => (g.charCodeAt(0) === 65279 && (g = g.slice(1)), g), DE = (g, A, B, C) => {
1196
1196
  g.prototype = Object.create(A.prototype, C), g.prototype.constructor = g, Object.defineProperty(g, "super", {
1197
1197
  value: A.prototype
@@ -1214,7 +1214,7 @@ const eE = (g, A, B, { allOwnKeys: C } = {}) => (og(A, (Q, I) => {
1214
1214
  if (!g) return null;
1215
1215
  if (Bg(g)) return g;
1216
1216
  let A = g.length;
1217
- if (!VQ(A)) return null;
1217
+ if (!WQ(A)) return null;
1218
1218
  const B = new Array(A);
1219
1219
  for (; A-- > 0; )
1220
1220
  B[A] = g[A];
@@ -1237,18 +1237,18 @@ const eE = (g, A, B, { allOwnKeys: C } = {}) => (og(A, (Q, I) => {
1237
1237
  function(B, C, Q) {
1238
1238
  return C.toUpperCase() + Q;
1239
1239
  }
1240
- ), qB = (({ hasOwnProperty: g }) => (A, B) => g.call(A, B))(Object.prototype), hE = zA("RegExp"), AI = (g, A) => {
1240
+ ), qB = (({ hasOwnProperty: g }) => (A, B) => g.call(A, B))(Object.prototype), hE = zA("RegExp"), $Q = (g, A) => {
1241
1241
  const B = Object.getOwnPropertyDescriptors(g), C = {};
1242
1242
  og(B, (Q, I) => {
1243
1243
  let E;
1244
1244
  (E = A(Q, I, g)) !== !1 && (C[I] = E || Q);
1245
1245
  }), Object.defineProperties(g, C);
1246
1246
  }, JE = (g) => {
1247
- AI(g, (A, B) => {
1248
- if (JA(g) && ["arguments", "caller", "callee"].indexOf(B) !== -1)
1247
+ $Q(g, (A, B) => {
1248
+ if (PA(g) && ["arguments", "caller", "callee"].indexOf(B) !== -1)
1249
1249
  return !1;
1250
1250
  const C = g[B];
1251
- if (JA(C)) {
1251
+ if (PA(C)) {
1252
1252
  if (A.enumerable = !1, "writable" in A) {
1253
1253
  A.writable = !1;
1254
1254
  return;
@@ -1268,7 +1268,7 @@ const eE = (g, A, B, { allOwnKeys: C } = {}) => (og(A, (Q, I) => {
1268
1268
  }, dE = () => {
1269
1269
  }, RE = (g, A) => g != null && Number.isFinite(g = +g) ? g : A;
1270
1270
  function aE(g) {
1271
- return !!(g && JA(g.append) && g[ZQ] === "FormData" && g[kg]);
1271
+ return !!(g && PA(g.append) && g[pQ] === "FormData" && g[kg]);
1272
1272
  }
1273
1273
  const kE = (g) => {
1274
1274
  const A = new Array(10), B = (C, Q) => {
@@ -1279,29 +1279,29 @@ const kE = (g) => {
1279
1279
  A[Q] = C;
1280
1280
  const I = Bg(C) ? [] : {};
1281
1281
  return og(C, (E, n) => {
1282
- const w = B(E, Q + 1);
1283
- !Dg(w) && (I[n] = w);
1282
+ const t = B(E, Q + 1);
1283
+ !Dg(t) && (I[n] = t);
1284
1284
  }), A[Q] = void 0, I;
1285
1285
  }
1286
1286
  }
1287
1287
  return C;
1288
1288
  };
1289
1289
  return B(g, 0);
1290
- }, YE = zA("AsyncFunction"), HE = (g) => g && (zg(g) || JA(g)) && JA(g.then) && JA(g.catch), gI = ((g, A) => g ? setImmediate : A ? ((B, C) => (pA.addEventListener("message", ({ source: Q, data: I }) => {
1290
+ }, YE = zA("AsyncFunction"), HE = (g) => g && (zg(g) || PA(g)) && PA(g.then) && PA(g.catch), AI = ((g, A) => g ? setImmediate : A ? ((B, C) => (pA.addEventListener("message", ({ source: Q, data: I }) => {
1291
1291
  Q === pA && I === B && C.length && C.shift()();
1292
1292
  }, !1), (Q) => {
1293
1293
  C.push(Q), pA.postMessage(B, "*");
1294
1294
  }))(`axios@${Math.random()}`, []) : (B) => setTimeout(B))(
1295
1295
  typeof setImmediate == "function",
1296
- JA(pA.postMessage)
1297
- ), zE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(pA) : typeof process != "undefined" && process.nextTick || gI, GE = (g) => g != null && JA(g[kg]), P = {
1296
+ PA(pA.postMessage)
1297
+ ), zE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(pA) : typeof process != "undefined" && process.nextTick || AI, GE = (g) => g != null && PA(g[kg]), P = {
1298
1298
  isArray: Bg,
1299
- isArrayBuffer: WQ,
1299
+ isArrayBuffer: ZQ,
1300
1300
  isBuffer: pI,
1301
1301
  isFormData: BE,
1302
1302
  isArrayBufferView: ZI,
1303
1303
  isString: WI,
1304
- isNumber: VQ,
1304
+ isNumber: WQ,
1305
1305
  isBoolean: VI,
1306
1306
  isObject: zg,
1307
1307
  isPlainObject: Mg,
@@ -1314,7 +1314,7 @@ const kE = (g) => {
1314
1314
  isFile: $I,
1315
1315
  isBlob: AE,
1316
1316
  isRegExp: hE,
1317
- isFunction: JA,
1317
+ isFunction: PA,
1318
1318
  isStream: CE,
1319
1319
  isURLSearchParams: QE,
1320
1320
  isTypedArray: fE,
@@ -1336,20 +1336,20 @@ const kE = (g) => {
1336
1336
  hasOwnProperty: qB,
1337
1337
  hasOwnProp: qB,
1338
1338
  // an alias to avoid ESLint no-prototype-builtins detection
1339
- reduceDescriptors: AI,
1339
+ reduceDescriptors: $Q,
1340
1340
  freezeMethods: JE,
1341
1341
  toObjectSet: PE,
1342
1342
  toCamelCase: vE,
1343
1343
  noop: dE,
1344
1344
  toFiniteNumber: RE,
1345
- findKey: _Q,
1345
+ findKey: VQ,
1346
1346
  global: pA,
1347
- isContextDefined: $Q,
1347
+ isContextDefined: _Q,
1348
1348
  isSpecCompliantForm: aE,
1349
1349
  toJSONObject: kE,
1350
1350
  isAsyncFn: YE,
1351
1351
  isThenable: HE,
1352
- setImmediate: gI,
1352
+ setImmediate: AI,
1353
1353
  asap: zE,
1354
1354
  isIterable: GE
1355
1355
  };
@@ -1377,7 +1377,7 @@ P.inherits(T, Error, {
1377
1377
  };
1378
1378
  }
1379
1379
  });
1380
- const CI = T.prototype, BI = {};
1380
+ const gI = T.prototype, CI = {};
1381
1381
  [
1382
1382
  "ERR_BAD_OPTION_VALUE",
1383
1383
  "ERR_BAD_OPTION",
@@ -1393,26 +1393,26 @@ const CI = T.prototype, BI = {};
1393
1393
  "ERR_INVALID_URL"
1394
1394
  // eslint-disable-next-line func-names
1395
1395
  ].forEach((g) => {
1396
- BI[g] = { value: g };
1396
+ CI[g] = { value: g };
1397
1397
  });
1398
- Object.defineProperties(T, BI);
1399
- Object.defineProperty(CI, "isAxiosError", { value: !0 });
1398
+ Object.defineProperties(T, CI);
1399
+ Object.defineProperty(gI, "isAxiosError", { value: !0 });
1400
1400
  T.from = (g, A, B, C, Q, I) => {
1401
- const E = Object.create(CI);
1402
- return P.toFlatObject(g, E, function(w) {
1403
- return w !== Error.prototype;
1401
+ const E = Object.create(gI);
1402
+ return P.toFlatObject(g, E, function(t) {
1403
+ return t !== Error.prototype;
1404
1404
  }, (n) => n !== "isAxiosError"), T.call(E, g.message, A, B, C, Q), E.cause = g, E.name = g.name, I && Object.assign(E, I), E;
1405
1405
  };
1406
1406
  const OE = null;
1407
1407
  function FC(g) {
1408
1408
  return P.isPlainObject(g) || P.isArray(g);
1409
1409
  }
1410
- function QI(g) {
1410
+ function BI(g) {
1411
1411
  return P.endsWith(g, "[]") ? g.slice(0, -2) : g;
1412
1412
  }
1413
1413
  function yB(g, A, B) {
1414
1414
  return g ? g.concat(A).map(function(Q, I) {
1415
- return Q = QI(Q), !B && I ? "[" + Q + "]" : Q;
1415
+ return Q = BI(Q), !B && I ? "[" + Q + "]" : Q;
1416
1416
  }).join(B ? "." : "") : A;
1417
1417
  }
1418
1418
  function FE(g) {
@@ -1431,24 +1431,24 @@ function Gg(g, A, B) {
1431
1431
  }, !1, function(f, J) {
1432
1432
  return !P.isUndefined(J[f]);
1433
1433
  });
1434
- const C = B.metaTokens, Q = B.visitor || t, I = B.dots, E = B.indexes, w = (B.Blob || typeof Blob != "undefined" && Blob) && P.isSpecCompliantForm(A);
1434
+ const C = B.metaTokens, Q = B.visitor || w, I = B.dots, E = B.indexes, t = (B.Blob || typeof Blob != "undefined" && Blob) && P.isSpecCompliantForm(A);
1435
1435
  if (!P.isFunction(Q))
1436
1436
  throw new TypeError("visitor must be a function");
1437
1437
  function e(c) {
1438
1438
  if (c === null) return "";
1439
1439
  if (P.isDate(c))
1440
1440
  return c.toISOString();
1441
- if (!w && P.isBlob(c))
1441
+ if (!t && P.isBlob(c))
1442
1442
  throw new T("Blob is not supported. Use a Buffer instead.");
1443
- return P.isArrayBuffer(c) || P.isTypedArray(c) ? w && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
1443
+ return P.isArrayBuffer(c) || P.isTypedArray(c) ? t && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
1444
1444
  }
1445
- function t(c, f, J) {
1445
+ function w(c, f, J) {
1446
1446
  let d = c;
1447
1447
  if (c && !J && typeof c == "object") {
1448
1448
  if (P.endsWith(f, "{}"))
1449
1449
  f = C ? f : f.slice(0, -2), c = JSON.stringify(c);
1450
1450
  else if (P.isArray(c) && FE(c) || (P.isFileList(c) || P.endsWith(f, "[]")) && (d = P.toArray(c)))
1451
- return f = QI(f), d.forEach(function(r, v) {
1451
+ return f = BI(f), d.forEach(function(r, v) {
1452
1452
  !(P.isUndefined(r) || r === null) && A.append(
1453
1453
  // eslint-disable-next-line no-nested-ternary
1454
1454
  E === !0 ? yB([f], v, I) : E === null ? f : f + "[]",
@@ -1459,7 +1459,7 @@ function Gg(g, A, B) {
1459
1459
  return FC(c) ? !0 : (A.append(yB(J, f, I), e(c)), !1);
1460
1460
  }
1461
1461
  const i = [], o = Object.assign(qE, {
1462
- defaultVisitor: t,
1462
+ defaultVisitor: w,
1463
1463
  convertValue: e,
1464
1464
  isVisitable: FC
1465
1465
  });
@@ -1499,11 +1499,11 @@ function lB(g) {
1499
1499
  function jC(g, A) {
1500
1500
  this._pairs = [], g && Gg(g, this, A);
1501
1501
  }
1502
- const II = jC.prototype;
1503
- II.append = function(A, B) {
1502
+ const QI = jC.prototype;
1503
+ QI.append = function(A, B) {
1504
1504
  this._pairs.push([A, B]);
1505
1505
  };
1506
- II.toString = function(A) {
1506
+ QI.toString = function(A) {
1507
1507
  const B = A ? function(C) {
1508
1508
  return A.call(this, C, lB);
1509
1509
  } : lB;
@@ -1514,7 +1514,7 @@ II.toString = function(A) {
1514
1514
  function yE(g) {
1515
1515
  return encodeURIComponent(g).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1516
1516
  }
1517
- function EI(g, A, B) {
1517
+ function II(g, A, B) {
1518
1518
  if (!A)
1519
1519
  return g;
1520
1520
  const C = B && B.encode || yE;
@@ -1583,7 +1583,7 @@ class mB {
1583
1583
  });
1584
1584
  }
1585
1585
  }
1586
- const nI = {
1586
+ const EI = {
1587
1587
  silentJSONParsing: !0,
1588
1588
  forcedJSONParsing: !0,
1589
1589
  clarifyTimeoutError: !1
@@ -1623,12 +1623,12 @@ function SE(g) {
1623
1623
  I = B[C], A[I] = g[I];
1624
1624
  return A;
1625
1625
  }
1626
- function tI(g) {
1626
+ function nI(g) {
1627
1627
  function A(B, C, Q, I) {
1628
1628
  let E = B[I++];
1629
1629
  if (E === "__proto__") return !0;
1630
- const n = Number.isFinite(+E), w = I >= B.length;
1631
- return E = !E && P.isArray(Q) ? Q.length : E, w ? (P.hasOwnProp(Q, E) ? Q[E] = [Q[E], C] : Q[E] = C, !n) : ((!Q[E] || !P.isObject(Q[E])) && (Q[E] = []), A(B, C, Q[E], I) && P.isArray(Q[E]) && (Q[E] = SE(Q[E])), !n);
1630
+ const n = Number.isFinite(+E), t = I >= B.length;
1631
+ return E = !E && P.isArray(Q) ? Q.length : E, t ? (P.hasOwnProp(Q, E) ? Q[E] = [Q[E], C] : Q[E] = C, !n) : ((!Q[E] || !P.isObject(Q[E])) && (Q[E] = []), A(B, C, Q[E], I) && P.isArray(Q[E]) && (Q[E] = SE(Q[E])), !n);
1632
1632
  }
1633
1633
  if (P.isFormData(g) && P.isFunction(g.entries)) {
1634
1634
  const B = {};
@@ -1649,12 +1649,12 @@ function UE(g, A, B) {
1649
1649
  return (B || JSON.stringify)(g);
1650
1650
  }
1651
1651
  const cg = {
1652
- transitional: nI,
1652
+ transitional: EI,
1653
1653
  adapter: ["xhr", "http", "fetch"],
1654
1654
  transformRequest: [function(A, B) {
1655
1655
  const C = B.getContentType() || "", Q = C.indexOf("application/json") > -1, I = P.isObject(A);
1656
1656
  if (I && P.isHTMLForm(A) && (A = new FormData(A)), P.isFormData(A))
1657
- return Q ? JSON.stringify(tI(A)) : A;
1657
+ return Q ? JSON.stringify(nI(A)) : A;
1658
1658
  if (P.isArrayBuffer(A) || P.isBuffer(A) || P.isStream(A) || P.isFile(A) || P.isBlob(A) || P.isReadableStream(A))
1659
1659
  return A;
1660
1660
  if (P.isArrayBufferView(A))
@@ -1666,10 +1666,10 @@ const cg = {
1666
1666
  if (C.indexOf("application/x-www-form-urlencoded") > -1)
1667
1667
  return TE(A, this.formSerializer).toString();
1668
1668
  if ((n = P.isFileList(A)) || C.indexOf("multipart/form-data") > -1) {
1669
- const w = this.env && this.env.FormData;
1669
+ const t = this.env && this.env.FormData;
1670
1670
  return Gg(
1671
1671
  n ? { "files[]": A } : A,
1672
- w && new w(),
1672
+ t && new t(),
1673
1673
  this.formSerializer
1674
1674
  );
1675
1675
  }
@@ -1781,30 +1781,30 @@ function $E(g, A) {
1781
1781
  });
1782
1782
  });
1783
1783
  }
1784
- let PA = class {
1784
+ let dA = class {
1785
1785
  constructor(A) {
1786
1786
  A && this.set(A);
1787
1787
  }
1788
1788
  set(A, B, C) {
1789
1789
  const Q = this;
1790
- function I(n, w, e) {
1791
- const t = wg(w);
1792
- if (!t)
1790
+ function I(n, t, e) {
1791
+ const w = wg(t);
1792
+ if (!w)
1793
1793
  throw new Error("header name must be a non-empty string");
1794
- const i = P.findKey(Q, t);
1795
- (!i || Q[i] === void 0 || e === !0 || e === void 0 && Q[i] !== !1) && (Q[i || w] = vg(n));
1794
+ const i = P.findKey(Q, w);
1795
+ (!i || Q[i] === void 0 || e === !0 || e === void 0 && Q[i] !== !1) && (Q[i || t] = vg(n));
1796
1796
  }
1797
- const E = (n, w) => P.forEach(n, (e, t) => I(e, t, w));
1797
+ const E = (n, t) => P.forEach(n, (e, w) => I(e, w, t));
1798
1798
  if (P.isPlainObject(A) || A instanceof this.constructor)
1799
1799
  E(A, B);
1800
1800
  else if (P.isString(A) && (A = A.trim()) && !VE(A))
1801
1801
  E(ZE(A), B);
1802
1802
  else if (P.isObject(A) && P.isIterable(A)) {
1803
- let n = {}, w, e;
1804
- for (const t of A) {
1805
- if (!P.isArray(t))
1803
+ let n = {}, t, e;
1804
+ for (const w of A) {
1805
+ if (!P.isArray(w))
1806
1806
  throw TypeError("Object iterator must return a key-value pair");
1807
- n[e = t[0]] = (w = n[e]) ? P.isArray(w) ? [...w, t[1]] : [w, t[1]] : t[1];
1807
+ n[e = w[0]] = (t = n[e]) ? P.isArray(t) ? [...t, w[1]] : [t, w[1]] : w[1];
1808
1808
  }
1809
1809
  E(n, B);
1810
1810
  } else
@@ -1907,8 +1907,8 @@ let PA = class {
1907
1907
  return P.isArray(A) ? A.forEach(I) : I(A), this;
1908
1908
  }
1909
1909
  };
1910
- PA.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1911
- P.reduceDescriptors(PA.prototype, ({ value: g }, A) => {
1910
+ dA.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1911
+ P.reduceDescriptors(dA.prototype, ({ value: g }, A) => {
1912
1912
  let B = A[0].toUpperCase() + A.slice(1);
1913
1913
  return {
1914
1914
  get: () => g,
@@ -1917,15 +1917,15 @@ P.reduceDescriptors(PA.prototype, ({ value: g }, A) => {
1917
1917
  }
1918
1918
  };
1919
1919
  });
1920
- P.freezeMethods(PA);
1920
+ P.freezeMethods(dA);
1921
1921
  function jg(g, A) {
1922
- const B = this || cg, C = A || B, Q = PA.from(C.headers);
1922
+ const B = this || cg, C = A || B, Q = dA.from(C.headers);
1923
1923
  let I = C.data;
1924
1924
  return P.forEach(g, function(n) {
1925
1925
  I = n.call(B, I, Q.normalize(), A ? A.status : void 0);
1926
1926
  }), Q.normalize(), I;
1927
1927
  }
1928
- function wI(g) {
1928
+ function tI(g) {
1929
1929
  return !!(g && g.__CANCEL__);
1930
1930
  }
1931
1931
  function Qg(g, A, B) {
@@ -1934,7 +1934,7 @@ function Qg(g, A, B) {
1934
1934
  P.inherits(Qg, T, {
1935
1935
  __CANCEL__: !0
1936
1936
  });
1937
- function eI(g, A, B) {
1937
+ function wI(g, A, B) {
1938
1938
  const C = B.config.validateStatus;
1939
1939
  !B.status || !C || C(B.status) ? g(B) : A(new T(
1940
1940
  "Request failed with status code " + B.status,
@@ -1952,26 +1952,26 @@ function gn(g, A) {
1952
1952
  g = g || 10;
1953
1953
  const B = new Array(g), C = new Array(g);
1954
1954
  let Q = 0, I = 0, E;
1955
- return A = A !== void 0 ? A : 1e3, function(w) {
1956
- const e = Date.now(), t = C[I];
1957
- E || (E = e), B[Q] = w, C[Q] = e;
1955
+ return A = A !== void 0 ? A : 1e3, function(t) {
1956
+ const e = Date.now(), w = C[I];
1957
+ E || (E = e), B[Q] = t, C[Q] = e;
1958
1958
  let i = I, o = 0;
1959
1959
  for (; i !== Q; )
1960
1960
  o += B[i++], i = i % g;
1961
1961
  if (Q = (Q + 1) % g, Q === I && (I = (I + 1) % g), e - E < A)
1962
1962
  return;
1963
- const D = t && e - t;
1963
+ const D = w && e - w;
1964
1964
  return D ? Math.round(o * 1e3 / D) : void 0;
1965
1965
  };
1966
1966
  }
1967
1967
  function Cn(g, A) {
1968
1968
  let B = 0, C = 1e3 / A, Q, I;
1969
- const E = (e, t = Date.now()) => {
1970
- B = t, Q = null, I && (clearTimeout(I), I = null), g.apply(null, e);
1969
+ const E = (e, w = Date.now()) => {
1970
+ B = w, Q = null, I && (clearTimeout(I), I = null), g.apply(null, e);
1971
1971
  };
1972
1972
  return [(...e) => {
1973
- const t = Date.now(), i = t - B;
1974
- i >= C ? E(e, t) : (Q = e, I || (I = setTimeout(() => {
1973
+ const w = Date.now(), i = w - B;
1974
+ i >= C ? E(e, w) : (Q = e, I || (I = setTimeout(() => {
1975
1975
  I = null, E(Q);
1976
1976
  }, C - i)));
1977
1977
  }, () => Q && E(Q)];
@@ -1980,15 +1980,15 @@ const Jg = (g, A, B = 3) => {
1980
1980
  let C = 0;
1981
1981
  const Q = gn(50, 250);
1982
1982
  return Cn((I) => {
1983
- const E = I.loaded, n = I.lengthComputable ? I.total : void 0, w = E - C, e = Q(w), t = E <= n;
1983
+ const E = I.loaded, n = I.lengthComputable ? I.total : void 0, t = E - C, e = Q(t), w = E <= n;
1984
1984
  C = E;
1985
1985
  const i = {
1986
1986
  loaded: E,
1987
1987
  total: n,
1988
1988
  progress: n ? E / n : void 0,
1989
- bytes: w,
1989
+ bytes: t,
1990
1990
  rate: e || void 0,
1991
- estimated: e && n && t ? (n - E) / e : void 0,
1991
+ estimated: e && n && w ? (n - E) / e : void 0,
1992
1992
  event: I,
1993
1993
  lengthComputable: n != null,
1994
1994
  [A ? "download" : "upload"]: !0
@@ -2038,40 +2038,40 @@ function In(g) {
2038
2038
  function En(g, A) {
2039
2039
  return A ? g.replace(/\/?\/$/, "") + "/" + A.replace(/^\/+/, "") : g;
2040
2040
  }
2041
- function iI(g, A, B) {
2041
+ function eI(g, A, B) {
2042
2042
  let C = !In(A);
2043
2043
  return g && (C || B == !1) ? En(g, A) : A;
2044
2044
  }
2045
- const bB = (g) => g instanceof PA ? DA({}, g) : g;
2045
+ const bB = (g) => g instanceof dA ? DA({}, g) : g;
2046
2046
  function WA(g, A) {
2047
2047
  A = A || {};
2048
2048
  const B = {};
2049
- function C(e, t, i, o) {
2050
- return P.isPlainObject(e) && P.isPlainObject(t) ? P.merge.call({ caseless: o }, e, t) : P.isPlainObject(t) ? P.merge({}, t) : P.isArray(t) ? t.slice() : t;
2049
+ function C(e, w, i, o) {
2050
+ return P.isPlainObject(e) && P.isPlainObject(w) ? P.merge.call({ caseless: o }, e, w) : P.isPlainObject(w) ? P.merge({}, w) : P.isArray(w) ? w.slice() : w;
2051
2051
  }
2052
- function Q(e, t, i, o) {
2053
- if (P.isUndefined(t)) {
2052
+ function Q(e, w, i, o) {
2053
+ if (P.isUndefined(w)) {
2054
2054
  if (!P.isUndefined(e))
2055
2055
  return C(void 0, e, i, o);
2056
- } else return C(e, t, i, o);
2056
+ } else return C(e, w, i, o);
2057
2057
  }
2058
- function I(e, t) {
2059
- if (!P.isUndefined(t))
2060
- return C(void 0, t);
2058
+ function I(e, w) {
2059
+ if (!P.isUndefined(w))
2060
+ return C(void 0, w);
2061
2061
  }
2062
- function E(e, t) {
2063
- if (P.isUndefined(t)) {
2062
+ function E(e, w) {
2063
+ if (P.isUndefined(w)) {
2064
2064
  if (!P.isUndefined(e))
2065
2065
  return C(void 0, e);
2066
- } else return C(void 0, t);
2066
+ } else return C(void 0, w);
2067
2067
  }
2068
- function n(e, t, i) {
2068
+ function n(e, w, i) {
2069
2069
  if (i in A)
2070
- return C(e, t);
2070
+ return C(e, w);
2071
2071
  if (i in g)
2072
2072
  return C(void 0, e);
2073
2073
  }
2074
- const w = {
2074
+ const t = {
2075
2075
  url: I,
2076
2076
  method: I,
2077
2077
  data: I,
@@ -2100,27 +2100,27 @@ function WA(g, A) {
2100
2100
  socketPath: E,
2101
2101
  responseEncoding: E,
2102
2102
  validateStatus: n,
2103
- headers: (e, t, i) => Q(bB(e), bB(t), i, !0)
2103
+ headers: (e, w, i) => Q(bB(e), bB(w), i, !0)
2104
2104
  };
2105
- return P.forEach(Object.keys(Object.assign({}, g, A)), function(t) {
2106
- const i = w[t] || Q, o = i(g[t], A[t], t);
2107
- P.isUndefined(o) && i !== n || (B[t] = o);
2105
+ return P.forEach(Object.keys(Object.assign({}, g, A)), function(w) {
2106
+ const i = t[w] || Q, o = i(g[w], A[w], w);
2107
+ P.isUndefined(o) && i !== n || (B[w] = o);
2108
2108
  }), B;
2109
2109
  }
2110
- const DI = (g) => {
2110
+ const iI = (g) => {
2111
2111
  const A = WA({}, g);
2112
2112
  let { data: B, withXSRFToken: C, xsrfHeaderName: Q, xsrfCookieName: I, headers: E, auth: n } = A;
2113
- A.headers = E = PA.from(E), A.url = EI(iI(A.baseURL, A.url, A.allowAbsoluteUrls), g.params, g.paramsSerializer), n && E.set(
2113
+ A.headers = E = dA.from(E), A.url = II(eI(A.baseURL, A.url, A.allowAbsoluteUrls), g.params, g.paramsSerializer), n && E.set(
2114
2114
  "Authorization",
2115
2115
  "Basic " + btoa((n.username || "") + ":" + (n.password ? unescape(encodeURIComponent(n.password)) : ""))
2116
2116
  );
2117
- let w;
2117
+ let t;
2118
2118
  if (P.isFormData(B)) {
2119
2119
  if (MA.hasStandardBrowserEnv || MA.hasStandardBrowserWebWorkerEnv)
2120
2120
  E.setContentType(void 0);
2121
- else if ((w = E.getContentType()) !== !1) {
2122
- const [e, ...t] = w ? w.split(";").map((i) => i.trim()).filter(Boolean) : [];
2123
- E.setContentType([e || "multipart/form-data", ...t].join("; "));
2121
+ else if ((t = E.getContentType()) !== !1) {
2122
+ const [e, ...w] = t ? t.split(";").map((i) => i.trim()).filter(Boolean) : [];
2123
+ E.setContentType([e || "multipart/form-data", ...w].join("; "));
2124
2124
  }
2125
2125
  }
2126
2126
  if (MA.hasStandardBrowserEnv && (C && P.isFunction(C) && (C = C(A)), C || C !== !1 && Bn(A.url))) {
@@ -2130,19 +2130,19 @@ const DI = (g) => {
2130
2130
  return A;
2131
2131
  }, nn = typeof XMLHttpRequest != "undefined", tn = nn && function(g) {
2132
2132
  return new Promise(function(B, C) {
2133
- const Q = DI(g);
2133
+ const Q = iI(g);
2134
2134
  let I = Q.data;
2135
- const E = PA.from(Q.headers).normalize();
2136
- let { responseType: n, onUploadProgress: w, onDownloadProgress: e } = Q, t, i, o, D, c;
2135
+ const E = dA.from(Q.headers).normalize();
2136
+ let { responseType: n, onUploadProgress: t, onDownloadProgress: e } = Q, w, i, o, D, c;
2137
2137
  function f() {
2138
- D && D(), c && c(), Q.cancelToken && Q.cancelToken.unsubscribe(t), Q.signal && Q.signal.removeEventListener("abort", t);
2138
+ D && D(), c && c(), Q.cancelToken && Q.cancelToken.unsubscribe(w), Q.signal && Q.signal.removeEventListener("abort", w);
2139
2139
  }
2140
2140
  let J = new XMLHttpRequest();
2141
2141
  J.open(Q.method.toUpperCase(), Q.url, !0), J.timeout = Q.timeout;
2142
2142
  function d() {
2143
2143
  if (!J)
2144
2144
  return;
2145
- const r = PA.from(
2145
+ const r = dA.from(
2146
2146
  "getAllResponseHeaders" in J && J.getAllResponseHeaders()
2147
2147
  ), h = {
2148
2148
  data: !n || n === "text" || n === "json" ? J.responseText : J.response,
@@ -2152,7 +2152,7 @@ const DI = (g) => {
2152
2152
  config: g,
2153
2153
  request: J
2154
2154
  };
2155
- eI(function(R) {
2155
+ wI(function(R) {
2156
2156
  B(R), f();
2157
2157
  }, function(R) {
2158
2158
  C(R), f();
@@ -2166,7 +2166,7 @@ const DI = (g) => {
2166
2166
  C(new T("Network Error", T.ERR_NETWORK, g, J)), J = null;
2167
2167
  }, J.ontimeout = function() {
2168
2168
  let v = Q.timeout ? "timeout of " + Q.timeout + "ms exceeded" : "timeout exceeded";
2169
- const h = Q.transitional || nI;
2169
+ const h = Q.transitional || EI;
2170
2170
  Q.timeoutErrorMessage && (v = Q.timeoutErrorMessage), C(new T(
2171
2171
  v,
2172
2172
  h.clarifyTimeoutError ? T.ETIMEDOUT : T.ECONNABORTED,
@@ -2175,9 +2175,9 @@ const DI = (g) => {
2175
2175
  )), J = null;
2176
2176
  }, I === void 0 && E.setContentType(null), "setRequestHeader" in J && P.forEach(E.toJSON(), function(v, h) {
2177
2177
  J.setRequestHeader(h, v);
2178
- }), P.isUndefined(Q.withCredentials) || (J.withCredentials = !!Q.withCredentials), n && n !== "json" && (J.responseType = Q.responseType), e && ([o, c] = Jg(e, !0), J.addEventListener("progress", o)), w && J.upload && ([i, D] = Jg(w), J.upload.addEventListener("progress", i), J.upload.addEventListener("loadend", D)), (Q.cancelToken || Q.signal) && (t = (r) => {
2178
+ }), P.isUndefined(Q.withCredentials) || (J.withCredentials = !!Q.withCredentials), n && n !== "json" && (J.responseType = Q.responseType), e && ([o, c] = Jg(e, !0), J.addEventListener("progress", o)), t && J.upload && ([i, D] = Jg(t), J.upload.addEventListener("progress", i), J.upload.addEventListener("loadend", D)), (Q.cancelToken || Q.signal) && (w = (r) => {
2179
2179
  J && (C(!r || r.type ? new Qg(null, g, J) : r), J.abort(), J = null);
2180
- }, Q.cancelToken && Q.cancelToken.subscribe(t), Q.signal && (Q.signal.aborted ? t() : Q.signal.addEventListener("abort", t)));
2180
+ }, Q.cancelToken && Q.cancelToken.subscribe(w), Q.signal && (Q.signal.aborted ? w() : Q.signal.addEventListener("abort", w)));
2181
2181
  const u = An(Q.url);
2182
2182
  if (u && MA.protocols.indexOf(u) === -1) {
2183
2183
  C(new T("Unsupported protocol " + u + ":", T.ERR_BAD_REQUEST, g));
@@ -2192,8 +2192,8 @@ const DI = (g) => {
2192
2192
  const I = function(e) {
2193
2193
  if (!Q) {
2194
2194
  Q = !0, n();
2195
- const t = e instanceof Error ? e : this.reason;
2196
- C.abort(t instanceof T ? t : new Qg(t instanceof Error ? t.message : t));
2195
+ const w = e instanceof Error ? e : this.reason;
2196
+ C.abort(w instanceof T ? w : new Qg(w instanceof Error ? w.message : w));
2197
2197
  }
2198
2198
  };
2199
2199
  let E = A && setTimeout(() => {
@@ -2205,8 +2205,8 @@ const DI = (g) => {
2205
2205
  }), g = null);
2206
2206
  };
2207
2207
  g.forEach((e) => e.addEventListener("abort", I));
2208
- const { signal: w } = C;
2209
- return w.unsubscribe = () => P.asap(n), w;
2208
+ const { signal: t } = C;
2209
+ return t.unsubscribe = () => P.asap(n), t;
2210
2210
  }
2211
2211
  }, en = function* (g, A) {
2212
2212
  let B = g.byteLength;
@@ -2262,8 +2262,8 @@ const DI = (g) => {
2262
2262
  pull(e) {
2263
2263
  return N(this, null, function* () {
2264
2264
  try {
2265
- const { done: t, value: i } = yield Q.next();
2266
- if (t) {
2265
+ const { done: w, value: i } = yield Q.next();
2266
+ if (w) {
2267
2267
  n(), e.close();
2268
2268
  return;
2269
2269
  }
@@ -2273,8 +2273,8 @@ const DI = (g) => {
2273
2273
  B(D);
2274
2274
  }
2275
2275
  e.enqueue(new Uint8Array(i));
2276
- } catch (t) {
2277
- throw n(t), t;
2276
+ } catch (w) {
2277
+ throw n(w), w;
2278
2278
  }
2279
2279
  });
2280
2280
  },
@@ -2284,15 +2284,15 @@ const DI = (g) => {
2284
2284
  }, {
2285
2285
  highWaterMark: 2
2286
2286
  });
2287
- }, Og = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", oI = Og && typeof ReadableStream == "function", cn = Og && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((g) => (A) => g.encode(A))(new TextEncoder()) : (g) => N(null, null, function* () {
2287
+ }, Og = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", DI = Og && typeof ReadableStream == "function", cn = Og && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((g) => (A) => g.encode(A))(new TextEncoder()) : (g) => N(null, null, function* () {
2288
2288
  return new Uint8Array(yield new Response(g).arrayBuffer());
2289
- })), cI = (g, ...A) => {
2289
+ })), oI = (g, ...A) => {
2290
2290
  try {
2291
2291
  return !!g(...A);
2292
2292
  } catch (B) {
2293
2293
  return !1;
2294
2294
  }
2295
- }, rn = oI && cI(() => {
2295
+ }, rn = DI && oI(() => {
2296
2296
  let g = !1;
2297
2297
  const A = new Request(MA.origin, {
2298
2298
  body: new ReadableStream(),
@@ -2302,7 +2302,7 @@ const DI = (g) => {
2302
2302
  }
2303
2303
  }).headers.has("Content-Type");
2304
2304
  return g && !A;
2305
- }), XB = 64 * 1024, yC = oI && cI(() => P.isReadableStream(new Response("").body)), Pg = {
2305
+ }), XB = 64 * 1024, yC = DI && oI(() => P.isReadableStream(new Response("").body)), Pg = {
2306
2306
  stream: yC && ((g) => g.body)
2307
2307
  };
2308
2308
  Og && ((g) => {
@@ -2338,12 +2338,12 @@ const fn = (g) => N(null, null, function* () {
2338
2338
  cancelToken: I,
2339
2339
  timeout: E,
2340
2340
  onDownloadProgress: n,
2341
- onUploadProgress: w,
2341
+ onUploadProgress: t,
2342
2342
  responseType: e,
2343
- headers: t,
2343
+ headers: w,
2344
2344
  withCredentials: i = "same-origin",
2345
2345
  fetchOptions: o
2346
- } = DI(g);
2346
+ } = iI(g);
2347
2347
  e = e ? (e + "").toLowerCase() : "text";
2348
2348
  let D = wn([Q, I && I.toAbortSignal()], E), c;
2349
2349
  const f = D && D.unsubscribe && (() => {
@@ -2351,16 +2351,16 @@ const fn = (g) => N(null, null, function* () {
2351
2351
  });
2352
2352
  let J;
2353
2353
  try {
2354
- if (w && rn && B !== "get" && B !== "head" && (J = yield sn(t, C)) !== 0) {
2354
+ if (t && rn && B !== "get" && B !== "head" && (J = yield sn(w, C)) !== 0) {
2355
2355
  let h = new Request(A, {
2356
2356
  method: "POST",
2357
2357
  body: C,
2358
2358
  duplex: "half"
2359
2359
  }), M;
2360
- if (P.isFormData(C) && (M = h.headers.get("content-type")) && t.setContentType(M), h.body) {
2360
+ if (P.isFormData(C) && (M = h.headers.get("content-type")) && w.setContentType(M), h.body) {
2361
2361
  const [R, a] = jB(
2362
2362
  J,
2363
- Jg(KB(w))
2363
+ Jg(KB(t))
2364
2364
  );
2365
2365
  C = NB(h.body, XB, R, a);
2366
2366
  }
@@ -2370,7 +2370,7 @@ const fn = (g) => N(null, null, function* () {
2370
2370
  c = new Request(A, FA(DA({}, o), {
2371
2371
  signal: D,
2372
2372
  method: B.toUpperCase(),
2373
- headers: t.normalize().toJSON(),
2373
+ headers: w.normalize().toJSON(),
2374
2374
  body: C,
2375
2375
  duplex: "half",
2376
2376
  credentials: d ? i : void 0
@@ -2396,9 +2396,9 @@ const fn = (g) => N(null, null, function* () {
2396
2396
  e = e || "text";
2397
2397
  let v = yield Pg[P.findKey(Pg, e) || "text"](u, g);
2398
2398
  return !r && f && f(), yield new Promise((h, M) => {
2399
- eI(h, M, {
2399
+ wI(h, M, {
2400
2400
  data: v,
2401
- headers: PA.from(u.headers),
2401
+ headers: dA.from(u.headers),
2402
2402
  status: u.status,
2403
2403
  statusText: u.statusText,
2404
2404
  config: g,
@@ -2427,7 +2427,7 @@ P.forEach(lC, (g, A) => {
2427
2427
  Object.defineProperty(g, "adapterName", { value: A });
2428
2428
  }
2429
2429
  });
2430
- const TB = (g) => `- ${g}`, Mn = (g) => P.isFunction(g) || g === null || g === !1, rI = {
2430
+ const TB = (g) => `- ${g}`, Mn = (g) => P.isFunction(g) || g === null || g === !1, cI = {
2431
2431
  getAdapter: (g) => {
2432
2432
  g = P.isArray(g) ? g : [g];
2433
2433
  const { length: A } = g;
@@ -2444,7 +2444,7 @@ const TB = (g) => `- ${g}`, Mn = (g) => P.isFunction(g) || g === null || g === !
2444
2444
  }
2445
2445
  if (!C) {
2446
2446
  const I = Object.entries(Q).map(
2447
- ([n, w]) => `adapter ${n} ` + (w === !1 ? "is not supported by the environment" : "is not available in the build")
2447
+ ([n, t]) => `adapter ${n} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build")
2448
2448
  );
2449
2449
  let E = A ? I.length > 1 ? `since :
2450
2450
  ` + I.map(TB).join(`
@@ -2463,24 +2463,24 @@ function Kg(g) {
2463
2463
  throw new Qg(null, g);
2464
2464
  }
2465
2465
  function xB(g) {
2466
- return Kg(g), g.headers = PA.from(g.headers), g.data = jg.call(
2466
+ return Kg(g), g.headers = dA.from(g.headers), g.data = jg.call(
2467
2467
  g,
2468
2468
  g.transformRequest
2469
- ), ["post", "put", "patch"].indexOf(g.method) !== -1 && g.headers.setContentType("application/x-www-form-urlencoded", !1), rI.getAdapter(g.adapter || cg.adapter)(g).then(function(C) {
2469
+ ), ["post", "put", "patch"].indexOf(g.method) !== -1 && g.headers.setContentType("application/x-www-form-urlencoded", !1), cI.getAdapter(g.adapter || cg.adapter)(g).then(function(C) {
2470
2470
  return Kg(g), C.data = jg.call(
2471
2471
  g,
2472
2472
  g.transformResponse,
2473
2473
  C
2474
- ), C.headers = PA.from(C.headers), C;
2474
+ ), C.headers = dA.from(C.headers), C;
2475
2475
  }, function(C) {
2476
- return wI(C) || (Kg(g), C && C.response && (C.response.data = jg.call(
2476
+ return tI(C) || (Kg(g), C && C.response && (C.response.data = jg.call(
2477
2477
  g,
2478
2478
  g.transformResponse,
2479
2479
  C.response
2480
- ), C.response.headers = PA.from(C.response.headers))), Promise.reject(C);
2480
+ ), C.response.headers = dA.from(C.response.headers))), Promise.reject(C);
2481
2481
  });
2482
2482
  }
2483
- const fI = "1.9.0", Fg = {};
2483
+ const rI = "1.9.0", Fg = {};
2484
2484
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((g, A) => {
2485
2485
  Fg[g] = function(C) {
2486
2486
  return typeof C === g || "a" + (A < 1 ? "n " : " ") + g;
@@ -2489,7 +2489,7 @@ const fI = "1.9.0", Fg = {};
2489
2489
  const SB = {};
2490
2490
  Fg.transitional = function(A, B, C) {
2491
2491
  function Q(I, E) {
2492
- return "[Axios v" + fI + "] Transitional option '" + I + "'" + E + (C ? ". " + C : "");
2492
+ return "[Axios v" + rI + "] Transitional option '" + I + "'" + E + (C ? ". " + C : "");
2493
2493
  }
2494
2494
  return (I, E, n) => {
2495
2495
  if (A === !1)
@@ -2516,9 +2516,9 @@ function vn(g, A, B) {
2516
2516
  for (; Q-- > 0; ) {
2517
2517
  const I = C[Q], E = A[I];
2518
2518
  if (E) {
2519
- const n = g[I], w = n === void 0 || E(n, I, g);
2520
- if (w !== !0)
2521
- throw new T("option " + I + " must be " + w, T.ERR_BAD_OPTION_VALUE);
2519
+ const n = g[I], t = n === void 0 || E(n, I, g);
2520
+ if (t !== !0)
2521
+ throw new T("option " + I + " must be " + t, T.ERR_BAD_OPTION_VALUE);
2522
2522
  continue;
2523
2523
  }
2524
2524
  if (B !== !0)
@@ -2588,22 +2588,22 @@ let ZA = class {
2588
2588
  (c) => {
2589
2589
  delete I[c];
2590
2590
  }
2591
- ), B.headers = PA.concat(E, I);
2591
+ ), B.headers = dA.concat(E, I);
2592
2592
  const n = [];
2593
- let w = !0;
2593
+ let t = !0;
2594
2594
  this.interceptors.request.forEach(function(f) {
2595
- typeof f.runWhen == "function" && f.runWhen(B) === !1 || (w = w && f.synchronous, n.unshift(f.fulfilled, f.rejected));
2595
+ typeof f.runWhen == "function" && f.runWhen(B) === !1 || (t = t && f.synchronous, n.unshift(f.fulfilled, f.rejected));
2596
2596
  });
2597
2597
  const e = [];
2598
2598
  this.interceptors.response.forEach(function(f) {
2599
2599
  e.push(f.fulfilled, f.rejected);
2600
2600
  });
2601
- let t, i = 0, o;
2602
- if (!w) {
2601
+ let w, i = 0, o;
2602
+ if (!t) {
2603
2603
  const c = [xB.bind(this), void 0];
2604
- for (c.unshift.apply(c, n), c.push.apply(c, e), o = c.length, t = Promise.resolve(B); i < o; )
2605
- t = t.then(c[i++], c[i++]);
2606
- return t;
2604
+ for (c.unshift.apply(c, n), c.push.apply(c, e), o = c.length, w = Promise.resolve(B); i < o; )
2605
+ w = w.then(c[i++], c[i++]);
2606
+ return w;
2607
2607
  }
2608
2608
  o = n.length;
2609
2609
  let D = B;
@@ -2617,18 +2617,18 @@ let ZA = class {
2617
2617
  }
2618
2618
  }
2619
2619
  try {
2620
- t = xB.call(this, D);
2620
+ w = xB.call(this, D);
2621
2621
  } catch (c) {
2622
2622
  return Promise.reject(c);
2623
2623
  }
2624
2624
  for (i = 0, o = e.length; i < o; )
2625
- t = t.then(e[i++], e[i++]);
2626
- return t;
2625
+ w = w.then(e[i++], e[i++]);
2626
+ return w;
2627
2627
  }
2628
2628
  getUri(A) {
2629
2629
  A = WA(this.defaults, A);
2630
- const B = iI(A.baseURL, A.url, A.allowAbsoluteUrls);
2631
- return EI(B, A.params, A.paramsSerializer);
2630
+ const B = eI(A.baseURL, A.url, A.allowAbsoluteUrls);
2631
+ return II(B, A.params, A.paramsSerializer);
2632
2632
  }
2633
2633
  };
2634
2634
  P.forEach(["delete", "get", "head", "options"], function(A) {
@@ -2655,7 +2655,7 @@ P.forEach(["post", "put", "patch"], function(A) {
2655
2655
  }
2656
2656
  ZA.prototype[A] = B(), ZA.prototype[A + "Form"] = B(!0);
2657
2657
  });
2658
- let hn = class sI {
2658
+ let hn = class fI {
2659
2659
  constructor(A) {
2660
2660
  if (typeof A != "function")
2661
2661
  throw new TypeError("executor must be a function.");
@@ -2721,7 +2721,7 @@ let hn = class sI {
2721
2721
  static source() {
2722
2722
  let A;
2723
2723
  return {
2724
- token: new sI(function(Q) {
2724
+ token: new fI(function(Q) {
2725
2725
  A = Q;
2726
2726
  }),
2727
2727
  cancel: A
@@ -2804,18 +2804,18 @@ const mC = {
2804
2804
  Object.entries(mC).forEach(([g, A]) => {
2805
2805
  mC[A] = g;
2806
2806
  });
2807
- function uI(g) {
2808
- const A = new ZA(g), B = pQ(ZA.prototype.request, A);
2807
+ function sI(g) {
2808
+ const A = new ZA(g), B = UQ(ZA.prototype.request, A);
2809
2809
  return P.extend(B, ZA.prototype, A, { allOwnKeys: !0 }), P.extend(B, A, null, { allOwnKeys: !0 }), B.create = function(Q) {
2810
- return uI(WA(g, Q));
2810
+ return sI(WA(g, Q));
2811
2811
  }, B;
2812
2812
  }
2813
- const nA = uI(cg);
2813
+ const nA = sI(cg);
2814
2814
  nA.Axios = ZA;
2815
2815
  nA.CanceledError = Qg;
2816
2816
  nA.CancelToken = hn;
2817
- nA.isCancel = wI;
2818
- nA.VERSION = fI;
2817
+ nA.isCancel = tI;
2818
+ nA.VERSION = rI;
2819
2819
  nA.toFormData = Gg;
2820
2820
  nA.AxiosError = T;
2821
2821
  nA.Cancel = nA.CanceledError;
@@ -2825,9 +2825,9 @@ nA.all = function(A) {
2825
2825
  nA.spread = Jn;
2826
2826
  nA.isAxiosError = Pn;
2827
2827
  nA.mergeConfig = WA;
2828
- nA.AxiosHeaders = PA;
2829
- nA.formToJSON = (g) => tI(P.isHTMLForm(g) ? new FormData(g) : g);
2830
- nA.getAdapter = rI.getAdapter;
2828
+ nA.AxiosHeaders = dA;
2829
+ nA.formToJSON = (g) => nI(P.isHTMLForm(g) ? new FormData(g) : g);
2830
+ nA.getAdapter = cI.getAdapter;
2831
2831
  nA.HttpStatusCode = mC;
2832
2832
  nA.default = nA;
2833
2833
  const {
@@ -2905,7 +2905,7 @@ const UB = [
2905
2905
  label: s("male")
2906
2906
  }
2907
2907
  ];
2908
- function MI(g) {
2908
+ function uI(g) {
2909
2909
  return g && g.__esModule && Object.prototype.hasOwnProperty.call(g, "default") ? g.default : g;
2910
2910
  }
2911
2911
  var bg = { exports: {} }, ZB;
@@ -2914,7 +2914,7 @@ function an() {
2914
2914
  var A = function(B) {
2915
2915
  var C = Object.prototype, Q = C.hasOwnProperty, I = Object.defineProperty || function(H, Y, z) {
2916
2916
  H[Y] = z.value;
2917
- }, E, n = typeof Symbol == "function" ? Symbol : {}, w = n.iterator || "@@iterator", e = n.asyncIterator || "@@asyncIterator", t = n.toStringTag || "@@toStringTag";
2917
+ }, E, n = typeof Symbol == "function" ? Symbol : {}, t = n.iterator || "@@iterator", e = n.asyncIterator || "@@asyncIterator", w = n.toStringTag || "@@toStringTag";
2918
2918
  function i(H, Y, z) {
2919
2919
  return Object.defineProperty(H, Y, {
2920
2920
  value: z,
@@ -2950,11 +2950,11 @@ function an() {
2950
2950
  function h() {
2951
2951
  }
2952
2952
  var M = {};
2953
- i(M, w, function() {
2953
+ i(M, t, function() {
2954
2954
  return this;
2955
2955
  });
2956
2956
  var R = Object.getPrototypeOf, a = R && R(R(fA([])));
2957
- a && a !== C && Q.call(a, w) && (M = a);
2957
+ a && a !== C && Q.call(a, t) && (M = a);
2958
2958
  var k = h.prototype = r.prototype = Object.create(M);
2959
2959
  v.prototype = h, I(k, "constructor", { value: h, configurable: !0 }), I(
2960
2960
  h,
@@ -2962,7 +2962,7 @@ function an() {
2962
2962
  { value: v, configurable: !0 }
2963
2963
  ), v.displayName = i(
2964
2964
  h,
2965
- t,
2965
+ w,
2966
2966
  "GeneratorFunction"
2967
2967
  );
2968
2968
  function O(H) {
@@ -2978,7 +2978,7 @@ function an() {
2978
2978
  // do is to check its .name property.
2979
2979
  (Y.displayName || Y.name) === "GeneratorFunction" : !1;
2980
2980
  }, B.mark = function(H) {
2981
- return Object.setPrototypeOf ? Object.setPrototypeOf(H, h) : (H.__proto__ = h, i(H, t, "GeneratorFunction")), H.prototype = Object.create(k), H;
2981
+ return Object.setPrototypeOf ? Object.setPrototypeOf(H, h) : (H.__proto__ = h, i(H, w, "GeneratorFunction")), H.prototype = Object.create(k), H;
2982
2982
  }, B.awrap = function(H) {
2983
2983
  return { __await: H };
2984
2984
  };
@@ -3097,7 +3097,7 @@ function an() {
3097
3097
  return x;
3098
3098
  return Y.delegate = null, u;
3099
3099
  }
3100
- O(k), i(k, t, "Generator"), i(k, w, function() {
3100
+ O(k), i(k, w, "Generator"), i(k, t, function() {
3101
3101
  return this;
3102
3102
  }), i(k, "toString", function() {
3103
3103
  return "[object Generator]";
@@ -3128,7 +3128,7 @@ function an() {
3128
3128
  };
3129
3129
  function fA(H) {
3130
3130
  if (H) {
3131
- var Y = H[w];
3131
+ var Y = H[t];
3132
3132
  if (Y)
3133
3133
  return Y.call(H);
3134
3134
  if (typeof H.next == "function")
@@ -3257,7 +3257,7 @@ function bC() {
3257
3257
  return WB || (WB = 1, Ng = (g, A) => `${g}-${A}-${Math.random().toString(16).slice(3, 8)}`), Ng;
3258
3258
  }
3259
3259
  var Xg, VB;
3260
- function vI() {
3260
+ function MI() {
3261
3261
  if (VB) return Xg;
3262
3262
  VB = 1;
3263
3263
  const g = bC();
@@ -3288,13 +3288,13 @@ var Tg, $B;
3288
3288
  function kn() {
3289
3289
  if ($B) return Tg;
3290
3290
  $B = 1;
3291
- const g = vI(), { log: A } = NC(), B = bC();
3291
+ const g = MI(), { log: A } = NC(), B = bC();
3292
3292
  let C = 0;
3293
3293
  return Tg = () => {
3294
3294
  const Q = B("Scheduler", C), I = {}, E = {};
3295
3295
  let n = [];
3296
3296
  C += 1;
3297
- const w = () => n.length, e = () => Object.keys(I).length, t = () => {
3297
+ const t = () => n.length, e = () => Object.keys(I).length, w = () => {
3298
3298
  if (n.length !== 0) {
3299
3299
  const f = Object.keys(I);
3300
3300
  for (let J = 0; J < f.length; J += 1)
@@ -3312,12 +3312,12 @@ function kn() {
3312
3312
  } catch (h) {
3313
3313
  u(h);
3314
3314
  } finally {
3315
- delete E[v.id], t();
3315
+ delete E[v.id], w();
3316
3316
  }
3317
- })), A(`[${Q}]: Add ${r.id} to JobQueue`), A(`[${Q}]: JobQueue length=${n.length}`), t();
3317
+ })), A(`[${Q}]: Add ${r.id} to JobQueue`), A(`[${Q}]: JobQueue length=${n.length}`), w();
3318
3318
  });
3319
3319
  return {
3320
- addWorker: (f) => (I[f.id] = f, A(`[${Q}]: Add ${f.id}`), A(`[${Q}]: Number of workers=${e()}`), t(), f.id),
3320
+ addWorker: (f) => (I[f.id] = f, A(`[${Q}]: Add ${f.id}`), A(`[${Q}]: Number of workers=${e()}`), w(), f.id),
3321
3321
  addJob: (f, ...J) => N(this, null, function* () {
3322
3322
  if (e() === 0)
3323
3323
  throw Error(`[${Q}]: You need to have at least one worker before adding jobs`);
@@ -3328,7 +3328,7 @@ function kn() {
3328
3328
  yield I[f].terminate();
3329
3329
  })), n = [];
3330
3330
  }),
3331
- getQueueLen: w,
3331
+ getQueueLen: t,
3332
3332
  getNumWorkers: e
3333
3333
  };
3334
3334
  }, Tg;
@@ -3356,7 +3356,7 @@ function zn() {
3356
3356
  }, Sg;
3357
3357
  }
3358
3358
  var Ug, CQ;
3359
- function hI() {
3359
+ function vI() {
3360
3360
  return CQ || (CQ = 1, Ug = {
3361
3361
  TESSERACT_ONLY: 0,
3362
3362
  LSTM_ONLY: 1,
@@ -3469,16 +3469,16 @@ function Kn() {
3469
3469
  }, gC;
3470
3470
  }
3471
3471
  var CC, iQ;
3472
- function JI() {
3472
+ function hI() {
3473
3473
  if (iQ) return CC;
3474
3474
  iQ = 1;
3475
- const g = zn(), A = vI(), { log: B } = NC(), C = bC(), Q = hI(), {
3475
+ const g = zn(), A = MI(), { log: B } = NC(), C = bC(), Q = vI(), {
3476
3476
  defaultOptions: I,
3477
3477
  spawnWorker: E,
3478
3478
  terminateWorker: n,
3479
- onMessage: w,
3479
+ onMessage: t,
3480
3480
  loadImage: e,
3481
- send: t
3481
+ send: w
3482
3482
  } = Kn();
3483
3483
  let i = 0;
3484
3484
  return CC = (...J) => N(null, [...J], function* (o = "eng", D = Q.LSTM_ONLY, c = {}, f = {}) {
@@ -3502,7 +3502,7 @@ function JI() {
3502
3502
  const j = ({ id: b, action: X, payload: EA }) => new Promise((iA, W) => {
3503
3503
  B(`[${d}]: Start ${b}, action=${X}`);
3504
3504
  const wA = `${X}-${b}`;
3505
- h[wA] = { resolve: iA, reject: W }, t(m, {
3505
+ h[wA] = { resolve: iA, reject: W }, w(m, {
3506
3506
  workerId: d,
3507
3507
  jobId: b,
3508
3508
  action: X,
@@ -3576,7 +3576,7 @@ function JI() {
3576
3576
  }), p = () => N(null, null, function* () {
3577
3577
  return m !== null && (n(m), m = null), Promise.resolve();
3578
3578
  });
3579
- w(m, ({
3579
+ t(m, ({
3580
3580
  workerId: b,
3581
3581
  jobId: X,
3582
3582
  status: EA,
@@ -3615,7 +3615,7 @@ var BC, DQ;
3615
3615
  function bn() {
3616
3616
  if (DQ) return BC;
3617
3617
  DQ = 1;
3618
- const g = JI();
3618
+ const g = hI();
3619
3619
  return BC = {
3620
3620
  recognize: (C, Q, I) => N(null, null, function* () {
3621
3621
  const E = yield g(Q, 1, I);
@@ -3761,7 +3761,7 @@ var EC, rQ;
3761
3761
  function Tn() {
3762
3762
  if (rQ) return EC;
3763
3763
  rQ = 1, an();
3764
- const g = kn(), A = JI(), B = bn(), C = Nn(), Q = hI(), I = Xn(), { setLogging: E } = NC();
3764
+ const g = kn(), A = hI(), B = bn(), C = Nn(), Q = vI(), I = Xn(), { setLogging: E } = NC();
3765
3765
  return EC = DA({
3766
3766
  languages: C,
3767
3767
  OEM: Q,
@@ -3772,7 +3772,7 @@ function Tn() {
3772
3772
  }, B), EC;
3773
3773
  }
3774
3774
  var xn = Tn();
3775
- const Sn = /* @__PURE__ */ MI(xn);
3775
+ const Sn = /* @__PURE__ */ uI(xn);
3776
3776
  var dg;
3777
3777
  (function(g) {
3778
3778
  g.EN = "eng", g.VI = "vie";
@@ -3791,7 +3791,7 @@ function Un(g) {
3791
3791
  if (/(H[oọ]|HoY|Hoy|HoYà).{0,10}(t[êe]n)/i.test(Q[E]) && /(Full|Fuli)/i.test(Q[E])) {
3792
3792
  const n = (I = Q[E + 1]) == null ? void 0 : I.trim();
3793
3793
  if (n && n.length > 2)
3794
- return n.replace(/\s+/g, " ").split(/\s+/).filter((w) => /^[\p{Lu}]+$/u.test(w)).join(" ");
3794
+ return n.replace(/\s+/g, " ").split(/\s+/).filter((t) => /^[\p{Lu}]+$/u.test(t)).join(" ");
3795
3795
  }
3796
3796
  return null;
3797
3797
  }
@@ -3841,9 +3841,9 @@ function Vn(g) {
3841
3841
  for (let Q = 0; Q < A.length; Q++) {
3842
3842
  const I = A[Q];
3843
3843
  if (B.test(I)) {
3844
- const E = (C = A[Q + 1]) != null ? C : "", w = (I + " " + E).match(/(?:Quê\s*quán|Place\s*of\s*origin)[^\w\n]{0,5}(.*?)((Phường|Xã|Thôn|Tổ|Khu|Ấp|Thị|TP\.?|Thành|Huyện|Tỉnh|Quận).+)/i);
3845
- if (w)
3846
- return w[2].replace(/\s+/g, " ").replace(/[^A-Za-zÀ-ỹ0-9\s,\.]/g, "").trim();
3844
+ const E = (C = A[Q + 1]) != null ? C : "", t = (I + " " + E).match(/(?:Quê\s*quán|Place\s*of\s*origin)[^\w\n]{0,5}(.*?)((Phường|Xã|Thôn|Tổ|Khu|Ấp|Thị|TP\.?|Thành|Huyện|Tỉnh|Quận).+)/i);
3845
+ if (t)
3846
+ return t[2].replace(/\s+/g, " ").replace(/[^A-Za-zÀ-ỹ0-9\s,\.]/g, "").trim();
3847
3847
  }
3848
3848
  }
3849
3849
  return null;
@@ -3857,8 +3857,8 @@ function _n(g) {
3857
3857
  if (B.test(I)) {
3858
3858
  const E = I.indexOf(":");
3859
3859
  let n = E >= 0 ? I.slice(E + 1).trim() : I;
3860
- const w = (C = A[Q + 1]) != null ? C : "";
3861
- return /(Date|Ngày|Giới|Họ|Tên|Số|Card|Identity|expiry|\d{1,2}\/\d{1,2}\/\d{4})/i.test(w) || (n += " " + w.trim()), n.replace(/^[^\w]*|Date.*$/gi, "").replace(/[^A-Za-zÀ-ỹ0-9\s,\.\/\-]/g, "").replace(/\s+/g, " ").trim();
3860
+ const t = (C = A[Q + 1]) != null ? C : "";
3861
+ return /(Date|Ngày|Giới|Họ|Tên|Số|Card|Identity|expiry|\d{1,2}\/\d{1,2}\/\d{4})/i.test(t) || (n += " " + t.trim()), n.replace(/^[^\w]*|Date.*$/gi, "").replace(/[^A-Za-zÀ-ỹ0-9\s,\.\/\-]/g, "").replace(/\s+/g, " ").trim();
3862
3862
  }
3863
3863
  }
3864
3864
  return null;
@@ -3892,7 +3892,7 @@ function Bt(C) {
3892
3892
  registrationData: A,
3893
3893
  theme: B = "default"
3894
3894
  }) {
3895
- var uA, cA, rA, BA, V, $, IA, hA, OA, SC, UC, pC, ZC, WC, VC, _C, $C, AB, gB, CB, BB, QB, IB, EB, nB, tB, wB, eB, iB, DB, oB, cB, rB, fB, sB, uB, MB, vB, hB, JB, PB, dB, RB, aB;
3895
+ var uA, cA, rA, BA, V, $, IA, JA, OA, SC, UC, pC, ZC, WC, VC, _C, $C, AB, gB, CB, BB, QB, IB, EB, nB, tB, wB, eB, iB, DB, oB, cB, rB, fB, sB, uB, MB, vB, hB, JB, PB, dB, RB, aB;
3896
3896
  const Q = document.createElement("div");
3897
3897
  Q.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
3898
3898
  const I = document.createElement("form");
@@ -3901,7 +3901,7 @@ function Bt(C) {
3901
3901
  const y = S();
3902
3902
  typeof g == "function" && g(y);
3903
3903
  }), Q.appendChild(I);
3904
- let E, n, w, e, t, i, o, D, c, f, J, d, u, r, v, h, M, R, a, k, O, G, F, q, m;
3904
+ let E, n, t, e, w, i, o, D, c, f, J, d, u, r, v, h, M, R, a, k, O, G, F, q, m;
3905
3905
  const j = document.createElement("button");
3906
3906
  E = sA({
3907
3907
  name: "taxCode",
@@ -3927,7 +3927,7 @@ function Bt(C) {
3927
3927
  value: ((BA = (rA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : rA.organization) == null ? void 0 : BA.name) || "",
3928
3928
  readOnly: !0,
3929
3929
  horizontal: !0
3930
- }), w = sA({
3930
+ }), t = sA({
3931
3931
  name: "companyAddressDetail",
3932
3932
  label: s("address"),
3933
3933
  required: !0,
@@ -3944,7 +3944,7 @@ function Bt(C) {
3944
3944
  error: null,
3945
3945
  placeholder: "",
3946
3946
  type: "text",
3947
- value: ((hA = (IA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : IA.organization) == null ? void 0 : hA.taxAuthority) || "",
3947
+ value: ((JA = (IA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : IA.organization) == null ? void 0 : JA.taxAuthority) || "",
3948
3948
  readOnly: !0,
3949
3949
  horizontal: !0
3950
3950
  }), G = OB({
@@ -3952,7 +3952,7 @@ function Bt(C) {
3952
3952
  required: !0,
3953
3953
  file: (A == null ? void 0 : A.logo) || null,
3954
3954
  onFileChange: (L) => {
3955
- RA();
3955
+ hA();
3956
3956
  },
3957
3957
  error: null
3958
3958
  }), c = sA({
@@ -3969,7 +3969,9 @@ function Bt(C) {
3969
3969
  c.setError(s("errorRequired"));
3970
3970
  return;
3971
3971
  }
3972
- /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(y) ? c.setError(null) : c.setError(s("errorInvalidName", "Chỉ được dùng chữ cái, số và dấu gạch dưới"));
3972
+ /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(y) ? c.setError(null) : c.setError(
3973
+ s("errorInvalidName", "Chỉ được dùng chữ cái, số và dấu gạch dưới")
3974
+ );
3973
3975
  }
3974
3976
  });
3975
3977
  const gA = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
@@ -4017,7 +4019,9 @@ function Bt(C) {
4017
4019
  u.setError(s("errorRequired"));
4018
4020
  return;
4019
4021
  }
4020
- /^\d{9,12}$/.test(y) ? u.setError(null) : u.setError(s("errorInvalidIdCard", "Số CCCD không hợp lệ"));
4022
+ /^\d{9,12}$/.test(y) ? u.setError(null) : u.setError(
4023
+ s("errorInvalidIdCard", "Số CCCD không hợp lệ")
4024
+ );
4021
4025
  }
4022
4026
  }), r = sA({
4023
4027
  name: "repPassportNumberField",
@@ -4073,11 +4077,11 @@ function Bt(C) {
4073
4077
  required: !0,
4074
4078
  file: (A == null ? void 0 : A.license) || null,
4075
4079
  onFileChange: (L) => {
4076
- RA();
4080
+ hA();
4077
4081
  },
4078
4082
  error: null,
4079
4083
  accept: "image/png, image/jpeg, image/jpg, .pdf"
4080
- }), t = sA({
4084
+ }), w = sA({
4081
4085
  name: "name",
4082
4086
  label: s("fullName"),
4083
4087
  required: !0,
@@ -4088,13 +4092,14 @@ function Bt(C) {
4088
4092
  onInput: (L) => {
4089
4093
  const y = L.target.value;
4090
4094
  if (y.trim() === "") {
4091
- t.setError(
4092
- s("errorRequired", "Họ và tên bắt buộc")
4093
- );
4095
+ w.setError(s("errorRequired", "Họ và tên bắt buộc"));
4094
4096
  return;
4095
4097
  }
4096
- /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(y) ? t.setError(null) : t.setError(
4097
- s("errorInvalidName", "Họ và tên không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới")
4098
+ /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(y) ? w.setError(null) : w.setError(
4099
+ s(
4100
+ "errorInvalidName",
4101
+ "Họ và tên không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
4102
+ )
4098
4103
  );
4099
4104
  }
4100
4105
  }), i = sA({
@@ -4112,9 +4117,7 @@ function Bt(C) {
4112
4117
  ""
4113
4118
  );
4114
4119
  if (HA !== y && (L.target.value = HA, y = HA), y.trim() === "") {
4115
- i.setError(
4116
- s("errorRequired", "Email bắt buộc")
4117
- );
4120
+ i.setError(s("errorRequired", "Email bắt buộc"));
4118
4121
  return;
4119
4122
  }
4120
4123
  /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(y) ? i.setError(null) : i.setError(
@@ -4171,10 +4174,10 @@ function Bt(C) {
4171
4174
  M = KI({
4172
4175
  initialValue: ((fB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : fB.invoiceSymbol) || "1C25TYY",
4173
4176
  onChange: (L) => {
4174
- fA.inputEl.value = L, RA();
4177
+ fA.inputEl.value = L, hA();
4175
4178
  }
4176
4179
  }), R = document.createElement("input"), R.type = "checkbox", R.name = "hasUsedEInvoiceCB", R.className = "wgt:cursor-pointer", R.checked = (sB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : sB.hasUsedEInvoice, R.addEventListener("change", (L) => {
4177
- L.target.checked ? (dA.appendChild(bA), dA.appendChild(kA)) : (dA.removeChild(bA), dA.removeChild(kA));
4180
+ L.target.checked ? (RA.appendChild(bA), RA.appendChild(kA)) : (RA.removeChild(bA), RA.removeChild(kA));
4178
4181
  }), a = document.createElement("input"), a.type = "checkbox", a.name = "hasUsedEInvoiceBeforeCB", a.className = "wgt:cursor-pointer", a.checked = (uB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : uB.isUsedEInvoiceBefore, a.addEventListener("change", (L) => {
4179
4182
  L.target.checked ? kA.appendChild(k.container) : kA.removeChild(k.container);
4180
4183
  }), k = sA({
@@ -4201,9 +4204,15 @@ function Bt(C) {
4201
4204
  E.setError(null);
4202
4205
  try {
4203
4206
  const y = yield dn(L);
4204
- y.error ? E.setError(y.error) : (n.inputEl.value = y.ten_cty || "", w.inputEl.value = y.dia_chi || "", e.inputEl.value = y.cqthue_ql || "", E.setError(null));
4207
+ y.error ? (E.setError(
4208
+ s("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
4209
+ ), n.inputEl.value = "", t.inputEl.value = "", e.inputEl.value = "") : (n.inputEl.value = y.ten_cty || "", t.inputEl.value = y.dia_chi || "", e.inputEl.value = y.cqthue_ql || "", E.setError(null));
4205
4210
  } catch (y) {
4206
- E.setError(s("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."));
4211
+ E.setError(
4212
+ s("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
4213
+ );
4214
+ } finally {
4215
+ hA();
4207
4216
  }
4208
4217
  });
4209
4218
  }
@@ -4212,13 +4221,16 @@ function Bt(C) {
4212
4221
  const Y = document.createElement("h3");
4213
4222
  Y.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", Y.innerText = s("unitInfo", "1. Thông tin đơn vị"), H.appendChild(Y);
4214
4223
  const z = document.createElement("div");
4215
- z.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:space-y-2 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", H.appendChild(z), z.appendChild(E.container), z.appendChild(n.container), z.appendChild(w.container), z.appendChild(e.container);
4224
+ z.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:space-y-2 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", H.appendChild(z), z.appendChild(E.container), z.appendChild(n.container), z.appendChild(t.container), z.appendChild(e.container);
4216
4225
  const K = document.createElement("div");
4217
4226
  K.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:space-x-4", H.appendChild(K), K.appendChild(G.container), I.appendChild(H);
4218
4227
  const l = document.createElement("div");
4219
4228
  l.className = "wgt:space-y-4";
4220
4229
  const x = document.createElement("h3");
4221
- x.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", x.innerText = s("legalRepInfo", "2. Thông tin người đại diện pháp luật:"), l.appendChild(x);
4230
+ x.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", x.innerText = s(
4231
+ "legalRepInfo",
4232
+ "2. Thông tin người đại diện pháp luật:"
4233
+ ), l.appendChild(x);
4222
4234
  const _ = document.createElement("div");
4223
4235
  _.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:space-y-2";
4224
4236
  const {
@@ -4235,8 +4247,8 @@ function Bt(C) {
4235
4247
  const oA = yield At(L, "vie");
4236
4248
  if (oA) {
4237
4249
  if (c.inputEl.value = oA == null ? void 0 : oA.full_name, oA != null && oA.dob) {
4238
- const [tg, kI, YI] = oA.dob.split("/"), qg = new Date(+YI, +kI - 1, +tg), HI = qg.getFullYear(), zI = String(qg.getMonth() + 1).padStart(2, "0"), GI = String(qg.getDate()).padStart(2, "0");
4239
- f.inputEl.value = `${HI}-${zI}-${GI}`;
4250
+ const [tg, aI, kI] = oA.dob.split("/"), qg = new Date(+kI, +aI - 1, +tg), YI = qg.getFullYear(), HI = String(qg.getMonth() + 1).padStart(2, "0"), zI = String(qg.getDate()).padStart(2, "0");
4251
+ f.inputEl.value = `${YI}-${HI}-${zI}`;
4240
4252
  }
4241
4253
  h.inputEl.value = oA == null ? void 0 : oA.place_of_residence, J.selectEl.value = pB.find((tg) => tg.label.toLocaleLowerCase() === (oA == null ? void 0 : oA.sex.toLocaleLowerCase())).value, v.selectEl.value = UB.find(
4242
4254
  (tg) => tg.label === (oA == null ? void 0 : oA.nationality)
@@ -4245,10 +4257,10 @@ function Bt(C) {
4245
4257
  } catch (oA) {
4246
4258
  console.log("🚀 ~ err:", oA);
4247
4259
  }
4248
- RA();
4260
+ hA();
4249
4261
  }),
4250
4262
  onBackChange: (L) => N(null, null, function* () {
4251
- m = L, RA();
4263
+ m = L, hA();
4252
4264
  })
4253
4265
  });
4254
4266
  _.appendChild(AA);
@@ -4261,29 +4273,38 @@ function Bt(C) {
4261
4273
  const X = document.createElement("ul");
4262
4274
  X.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
4263
4275
  const EA = document.createElement("li");
4264
- EA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", EA.innerText = s("legalRepNote", "Vui lòng kiểm tra và nhập đúng tên người đại diện theo Giấy phép kinh doanh đã tải lên."), X.appendChild(EA), l.appendChild(X), I.appendChild(l);
4276
+ EA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", EA.innerText = s(
4277
+ "legalRepNote",
4278
+ "Vui lòng kiểm tra và nhập đúng tên người đại diện theo Giấy phép kinh doanh đã tải lên."
4279
+ ), X.appendChild(EA), l.appendChild(X), I.appendChild(l);
4265
4280
  const iA = document.createElement("div");
4266
4281
  iA.className = "wgt:space-y-4";
4267
4282
  const W = document.createElement("h3");
4268
4283
  W.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", W.innerText = s("contactInfo", "3. Thông tin người liên hệ:"), iA.appendChild(W);
4269
4284
  const wA = document.createElement("div");
4270
- wA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", wA.appendChild(t.container), wA.appendChild(i.container), wA.appendChild(o.container), wA.appendChild(D.container), iA.appendChild(wA), I.appendChild(iA);
4285
+ wA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", wA.appendChild(w.container), wA.appendChild(i.container), wA.appendChild(o.container), wA.appendChild(D.container), iA.appendChild(wA), I.appendChild(iA);
4271
4286
  const mA = document.createElement("div");
4272
4287
  mA.className = "wgt:space-y-4";
4273
4288
  const aA = document.createElement("h3");
4274
4289
  aA.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", aA.innerText = s("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), mA.appendChild(aA), I.appendChild(mA);
4275
4290
  const LA = document.createElement("div");
4276
4291
  LA.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-col wgt:md:flex-row", LA.appendChild(M.container), LA.appendChild(fA.container), mA.appendChild(LA);
4277
- const dA = document.createElement("div");
4278
- dA.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", I.appendChild(dA);
4292
+ const RA = document.createElement("div");
4293
+ RA.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", I.appendChild(RA);
4279
4294
  const jA = document.createElement("div");
4280
4295
  jA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", jA.appendChild(R);
4281
4296
  const Ig = document.createElement("h4");
4282
- Ig.className = "wgt:font-semibold wgt:italic", Ig.innerText = s("hasUsedEInvoice", "Bạn đã sử dụng hoá đơn điện tử?"), jA.appendChild(Ig), dA.appendChild(jA);
4297
+ Ig.className = "wgt:font-semibold wgt:italic", Ig.innerText = s(
4298
+ "hasUsedEInvoice",
4299
+ "Bạn đã sử dụng hoá đơn điện tử?"
4300
+ ), jA.appendChild(Ig), RA.appendChild(jA);
4283
4301
  const bA = document.createElement("div");
4284
4302
  bA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", bA.appendChild(a);
4285
4303
  const Eg = document.createElement("h4");
4286
- Eg.className = "wgt:font-semibold wgt:italic", Eg.innerText = s("hasUsedEInvoiceBefore", "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"), bA.appendChild(Eg);
4304
+ Eg.className = "wgt:font-semibold wgt:italic", Eg.innerText = s(
4305
+ "hasUsedEInvoiceBefore",
4306
+ "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"
4307
+ ), bA.appendChild(Eg);
4287
4308
  const kA = document.createElement("div");
4288
4309
  kA.className = "wgt:w-full wgt:flex wgt:flex-row-reverse wgt:space-x-4 wgt:gap-4 wgt:items-center wgt:justify-start", kA.appendChild(O.container);
4289
4310
  const $A = document.createElement("div");
@@ -4312,7 +4333,9 @@ function Bt(C) {
4312
4333
  "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"
4313
4334
  ), TA.setAttribute("fill", "white"), KA.appendChild(TA), XA.appendChild(KA);
4314
4335
  const GA = document.createElement("label");
4315
- GA.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", GA.appendChild(document.createTextNode(s("agreeWith", "Tôi đồng ý với ") + " "));
4336
+ GA.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", GA.appendChild(
4337
+ document.createTextNode(s("agreeWith", "Tôi đồng ý với ") + " ")
4338
+ );
4316
4339
  const ng = (L, y) => {
4317
4340
  const HA = document.createElement("a");
4318
4341
  return HA.href = y, HA.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline", HA.textContent = L, HA;
@@ -4324,8 +4347,10 @@ function Bt(C) {
4324
4347
  return "BVBank";
4325
4348
  }
4326
4349
  };
4327
- GA.appendChild(ng(s("terms", "Điều khoản"), "#")), GA.appendChild(document.createTextNode(" " + s("and", "và") + " ")), GA.appendChild(ng(s("usagePolicy", "Chính sách sử dụng"), "#")), GA.appendChild(document.createTextNode(` ${s("of", "của")} ${U()}.`)), $A.appendChild(XA), $A.appendChild(GA), I.appendChild($A), XA.addEventListener("click", () => {
4328
- NA = !NA, NA ? (XA.classList.add("wgt:bg-primary"), KA.classList.remove("wgt:hidden")) : (XA.classList.remove("wgt:bg-primary"), KA.classList.add("wgt:hidden")), RA();
4350
+ GA.appendChild(ng(s("terms", "Điều khoản"), "#")), GA.appendChild(document.createTextNode(" " + s("and", "và") + " ")), GA.appendChild(ng(s("usagePolicy", "Chính sách sử dụng"), "#")), GA.appendChild(
4351
+ document.createTextNode(` ${s("of", "của")} ${U()}.`)
4352
+ ), $A.appendChild(XA), $A.appendChild(GA), I.appendChild($A), XA.addEventListener("click", () => {
4353
+ NA = !NA, NA ? (XA.classList.add("wgt:bg-primary"), KA.classList.remove("wgt:hidden")) : (XA.classList.remove("wgt:bg-primary"), KA.classList.add("wgt:hidden")), hA();
4329
4354
  });
4330
4355
  const CA = document.createElement("div");
4331
4356
  CA.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", j.type = "submit", j.innerText = s("next"), j.className = [
@@ -4345,7 +4370,7 @@ function Bt(C) {
4345
4370
  y.contactPerson.email
4346
4371
  ) || y.legalRepresentative.dob > gA || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(y.invoiceSymbol) || !L.license || !L.logo || !L.idCard || !L.idCardBack);
4347
4372
  }
4348
- function RA() {
4373
+ function hA() {
4349
4374
  j.disabled = !YA() || !NA || Z() || p() || G.getError() || F.getError();
4350
4375
  }
4351
4376
  function S() {
@@ -4356,12 +4381,12 @@ function Bt(C) {
4356
4381
  previousEInvoiceProvider: (y = k == null ? void 0 : k.getValue()) != null ? y : "",
4357
4382
  organization: {
4358
4383
  name: n == null ? void 0 : n.getValue(),
4359
- address: w == null ? void 0 : w.getValue(),
4384
+ address: t == null ? void 0 : t.getValue(),
4360
4385
  taxCode: E == null ? void 0 : E.getValue(),
4361
4386
  taxAuthority: e == null ? void 0 : e.getValue()
4362
4387
  },
4363
4388
  contactPerson: {
4364
- name: t == null ? void 0 : t.getValue(),
4389
+ name: w == null ? void 0 : w.getValue(),
4365
4390
  address: D == null ? void 0 : D.getValue(),
4366
4391
  email: i == null ? void 0 : i.getValue(),
4367
4392
  phone: o == null ? void 0 : o.getValue()
@@ -4389,9 +4414,9 @@ function Bt(C) {
4389
4414
  [
4390
4415
  n,
4391
4416
  E,
4392
- w,
4393
- e,
4394
4417
  t,
4418
+ e,
4419
+ w,
4395
4420
  i,
4396
4421
  o,
4397
4422
  D,
@@ -4404,18 +4429,18 @@ function Bt(C) {
4404
4429
  O,
4405
4430
  k
4406
4431
  ].forEach((L) => {
4407
- L.inputEl.addEventListener("input", RA);
4432
+ L.inputEl.addEventListener("input", hA);
4408
4433
  }), [J].forEach((L) => {
4409
- L.selectEl.addEventListener("change", RA);
4434
+ L.selectEl.addEventListener("change", hA);
4410
4435
  }), [R, a].forEach((L) => {
4411
- L.addEventListener("change", RA);
4436
+ L.addEventListener("change", hA);
4412
4437
  }), j.addEventListener("click", (L) => {
4413
4438
  if (L.preventDefault(), !YA()) return;
4414
4439
  const y = S();
4415
4440
  typeof g == "function" && g(y);
4416
4441
  });
4417
4442
  const QA = (((JB = (hB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : hB.organization) == null ? void 0 : JB.taxCode) || "").trim();
4418
- return QA.length >= 10 && vA(QA), A != null && A.idCard && (q = A == null ? void 0 : A.idCard), (PB = A == null ? void 0 : A.eInvoiceRegistration) != null && PB.hasUsedEInvoice && (dA.appendChild(bA), dA.appendChild(kA), (dB = A == null ? void 0 : A.eInvoiceRegistration) != null && dB.isUsedEInvoiceBefore ? (a.checked = !0, kA.appendChild(k.container), k.inputEl.value = (RB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : RB.previousEInvoiceProvider) : k.inputEl.value = "", O.inputEl.value = (aB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : aB.taxAuthorityCode), RA(), {
4443
+ return QA.length >= 10 && vA(QA), A != null && A.idCard && (q = A == null ? void 0 : A.idCard), (PB = A == null ? void 0 : A.eInvoiceRegistration) != null && PB.hasUsedEInvoice && (RA.appendChild(bA), RA.appendChild(kA), (dB = A == null ? void 0 : A.eInvoiceRegistration) != null && dB.isUsedEInvoiceBefore ? (a.checked = !0, kA.appendChild(k.container), k.inputEl.value = (RB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : RB.previousEInvoiceProvider) : k.inputEl.value = "", O.inputEl.value = (aB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : aB.taxAuthorityCode), hA(), {
4419
4444
  container: Q,
4420
4445
  getValues: S
4421
4446
  };
@@ -4470,8 +4495,8 @@ function fQ({
4470
4495
  // prevent text selection while dragging
4471
4496
  ].join(" "), I.style.scrollSnapType = "x mandatory", I.style.overflowX = "auto", I.style.scrollBehavior = "smooth", I.style.scrollbarWidth = "none", I.style.msOverflowStyle = "none", I.style.WebkitOverflowScrolling = "touch", I.style.scrollbarWidth = "none", I.style.overflowY = "hidden", Q.appendChild(I);
4472
4497
  function E() {
4473
- I.innerHTML = "", A.forEach((t) => {
4474
- const i = t._id === B, o = document.createElement("div");
4498
+ I.innerHTML = "", A.forEach((w) => {
4499
+ const i = w._id === B, o = document.createElement("div");
4475
4500
  o.className = [
4476
4501
  "wgt:relative",
4477
4502
  "wgt:border",
@@ -4485,7 +4510,7 @@ function fQ({
4485
4510
  "wgt:justify-between",
4486
4511
  i ? "wgt:border-primary" : "wgt:border-grey-6 wgt:hover:border-gray-300"
4487
4512
  ].filter(Boolean).join(" "), o.onclick = () => {
4488
- B = t._id, typeof C == "function" && C(t._id), E();
4513
+ B = w._id, typeof C == "function" && C(w._id), E();
4489
4514
  };
4490
4515
  const D = document.createElement("div");
4491
4516
  D.className = "wgt:w-full", o.appendChild(D);
@@ -4496,11 +4521,11 @@ function fQ({
4496
4521
  "wgt:text-base",
4497
4522
  "wgt:font-semibold",
4498
4523
  i ? "wgt:text-primary" : "wgt:text-"
4499
- ].join(" "), f.innerText = t.name.split("-")[0], c.appendChild(f);
4500
- const { container: J } = UQ({
4524
+ ].join(" "), f.innerText = w.name.split("-")[0], c.appendChild(f);
4525
+ const { container: J } = SQ({
4501
4526
  checked: i,
4502
4527
  onChange: (R) => {
4503
- R && (B = t._id, typeof C == "function" && C(t._id), E());
4528
+ R && (B = w._id, typeof C == "function" && C(w._id), E());
4504
4529
  }
4505
4530
  });
4506
4531
  c.appendChild(J), D.appendChild(c);
@@ -4512,7 +4537,7 @@ function fQ({
4512
4537
  </svg>
4513
4538
  `, d.appendChild(u);
4514
4539
  const r = document.createElement("span");
4515
- r.className = "wgt:ml-2 wgt:text-sm", g === "signature" ? r.innerText = `${s("duration")}: ${t.name.split("-")[1]}` : typeof (t == null ? void 0 : t.limit) == "number" ? r.innerText = `${t == null ? void 0 : t.limit.toLocaleString(
4540
+ r.className = "wgt:ml-2 wgt:text-sm", g === "signature" ? r.innerText = `${s("duration")}: ${w.name.split("-")[1]}` : typeof (w == null ? void 0 : w.limit) == "number" ? r.innerText = `${w == null ? void 0 : w.limit.toLocaleString(
4516
4541
  "vi-VN"
4517
4542
  )} ${s("electronicInvoices")} / ${s("month")}` : r.innerText = "", d.appendChild(r), D.appendChild(d);
4518
4543
  const v = document.createElement("div");
@@ -4523,40 +4548,41 @@ function fQ({
4523
4548
  "wgt:text-2xl",
4524
4549
  "wgt:font-bold",
4525
4550
  i ? "wgt:text-primary" : "wgt:text-text-sub-600"
4526
- ].join(" "), h.innerText = SA((t == null ? void 0 : t.limit) * (t == null ? void 0 : t.price)), v.appendChild(h);
4551
+ ].join(" "), h.innerText = SA((w == null ? void 0 : w.limit) * (w == null ? void 0 : w.price)), v.appendChild(h);
4527
4552
  const M = document.createElement("span");
4528
4553
  M.className = "wgt:text-sm wgt:text-text-sub-600", M.innerText = `VND/${s("package")}`, v.appendChild(M), o.appendChild(v), I.appendChild(o);
4529
4554
  });
4530
4555
  }
4531
4556
  E();
4532
- let n = !1, w, e;
4533
- return I.addEventListener("mousedown", (t) => {
4534
- n = !0, I.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), w = t.pageX - I.offsetLeft, e = I.scrollLeft;
4557
+ let n = !1, t, e;
4558
+ return I.addEventListener("mousedown", (w) => {
4559
+ n = !0, I.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), t = w.pageX - I.offsetLeft, e = I.scrollLeft;
4535
4560
  }), document.addEventListener("mouseup", () => {
4536
4561
  n = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
4537
4562
  }), I.addEventListener("mouseleave", () => {
4538
4563
  n = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
4539
- }), I.addEventListener("mousemove", (t) => {
4564
+ }), I.addEventListener("mousemove", (w) => {
4540
4565
  if (!n) return;
4541
- t.preventDefault();
4542
- const o = (t.pageX - I.offsetLeft - w) * 1.5;
4566
+ w.preventDefault();
4567
+ const o = (w.pageX - I.offsetLeft - t) * 1.5;
4543
4568
  I.scrollLeft = e - o;
4544
- }), I.addEventListener("wheel", (t) => {
4545
- t.preventDefault(), I.scrollLeft += t.deltaY;
4569
+ }), I.addEventListener("wheel", (w) => {
4570
+ w.preventDefault(), I.scrollLeft += w.deltaY;
4546
4571
  }), {
4547
4572
  container: Q,
4548
- setSelectedPackageId(t) {
4549
- B = t, E();
4573
+ setSelectedPackageId(w) {
4574
+ B = w, E();
4550
4575
  }
4551
4576
  };
4552
4577
  }
4553
- function Et(A) {
4554
- return N(this, arguments, function* ({ search: g }) {
4578
+ function Et(B) {
4579
+ return N(this, arguments, function* ({ search: g, bank: A }) {
4555
4580
  return (yield lA.get(`${ag}`, {
4556
4581
  params: {
4557
4582
  isActive: !0,
4558
4583
  search: g || null,
4559
- type: "service"
4584
+ type: "service",
4585
+ bank: A
4560
4586
  }
4561
4587
  })).data;
4562
4588
  });
@@ -4636,12 +4662,12 @@ function Dt({ name: g, value: A, feeLabel: B, required: C, description: Q, isChe
4636
4662
  ].join(" "), E.appendChild(n), n.addEventListener("change", (o) => {
4637
4663
  I ? n.checked = !0 : n.checked = !1;
4638
4664
  });
4639
- const w = document.createElement("div");
4640
- w.className = "wgt:flex wgt:flex-col wgt:gap-1";
4665
+ const t = document.createElement("div");
4666
+ t.className = "wgt:flex wgt:flex-col wgt:gap-1";
4641
4667
  const e = document.createElement("div");
4642
4668
  e.className = "wgt:flex wgt:items-center wgt:gap-2";
4643
- const t = document.createElement("span");
4644
- t.className = "wgt:text-base wgt:font-semibold wgt:text-text-sub-600 ", t.textContent = B, e.appendChild(t);
4669
+ const w = document.createElement("span");
4670
+ w.className = "wgt:text-base wgt:font-semibold wgt:text-text-sub-600 ", w.textContent = B, e.appendChild(w);
4645
4671
  {
4646
4672
  const o = document.createElement("span");
4647
4673
  o.className = [
@@ -4654,9 +4680,9 @@ function Dt({ name: g, value: A, feeLabel: B, required: C, description: Q, isChe
4654
4680
  "wgt:rounded-sm"
4655
4681
  ].join(" "), o.textContent = s("required"), e.appendChild(o);
4656
4682
  }
4657
- w.appendChild(e);
4683
+ t.appendChild(e);
4658
4684
  const i = document.createElement("p");
4659
- return i.className = "wgt:text-text-soft-400 wgt:text-sm", i.textContent = Q, w.appendChild(i), E.appendChild(w), { container: E };
4685
+ return i.className = "wgt:text-text-soft-400 wgt:text-sm", i.textContent = Q, t.appendChild(i), E.appendChild(t), { container: E };
4660
4686
  }
4661
4687
  const SA = (g) => new Intl.NumberFormat("vi-VN").format(g) + " VND";
4662
4688
  function sg(g, A) {
@@ -4676,20 +4702,20 @@ function ot(i) {
4676
4702
  setSelectedInvoiceOtp: I,
4677
4703
  setSelectedSignatureOtp: E,
4678
4704
  setTotalAmount: n,
4679
- theme: w,
4705
+ theme: t,
4680
4706
  selectedProvider: e,
4681
- registrationData: t
4707
+ registrationData: w
4682
4708
  }) {
4683
4709
  var KA, TA, GA, ng;
4684
4710
  const o = yield Rn(
4685
4711
  e.route,
4686
- (TA = (KA = t == null ? void 0 : t.eInvoiceRegistration) == null ? void 0 : KA.organization) == null ? void 0 : TA.taxCode
4712
+ (TA = (KA = w == null ? void 0 : w.eInvoiceRegistration) == null ? void 0 : KA.organization) == null ? void 0 : TA.taxCode
4687
4713
  ).then((U) => U == null ? void 0 : U.isNewCustomer), D = yield nt({
4688
- bank: w
4714
+ bank: t
4689
4715
  }), c = yield tt({
4690
- bank: w
4716
+ bank: t
4691
4717
  }), f = yield wt({
4692
- bank: w
4718
+ bank: t
4693
4719
  });
4694
4720
  let J = "", d = B ? B._id : c[0]._id;
4695
4721
  const u = c;
@@ -4748,7 +4774,7 @@ function ot(i) {
4748
4774
  return N(this, null, function* () {
4749
4775
  if (h && clearTimeout(h), J !== "")
4750
4776
  h = setTimeout(() => N(null, null, function* () {
4751
- const U = J.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), CA = yield Et({ search: U });
4777
+ const U = J.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), CA = yield Et({ search: U, bank: t });
4752
4778
  CA && CA.length ? r = sg(
4753
4779
  CA,
4754
4780
  d
@@ -4814,7 +4840,7 @@ function ot(i) {
4814
4840
  return f.find((CA) => CA._id === U) || null;
4815
4841
  }
4816
4842
  function W() {
4817
- var U, CA, YA, RA;
4843
+ var U, CA, YA, hA;
4818
4844
  if (X.innerHTML = "", o) {
4819
4845
  const S = document.createElement("tr"), QA = document.createElement("td");
4820
4846
  QA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium", QA.innerText = `${(U = D[0]) == null ? void 0 : U.name}`, S.appendChild(QA);
@@ -4836,8 +4862,8 @@ function ot(i) {
4836
4862
  }), rA.appendChild($), cA.appendChild(rA), S.appendChild(cA);
4837
4863
  const IA = document.createElement("td");
4838
4864
  IA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", IA.innerText = SA((CA = D[0]) == null ? void 0 : CA.price), S.appendChild(IA);
4839
- const hA = document.createElement("td");
4840
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", hA.innerText = SA(((YA = D[0]) == null ? void 0 : YA.price) * M), S.appendChild(hA), X.appendChild(S);
4865
+ const JA = document.createElement("td");
4866
+ JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = SA(((YA = D[0]) == null ? void 0 : YA.price) * M), S.appendChild(JA), X.appendChild(S);
4841
4867
  }
4842
4868
  {
4843
4869
  const S = EA(d);
@@ -4860,8 +4886,8 @@ function ot(i) {
4860
4886
  IA.type = "button", IA.ariaLabel = s("increase"), IA.className = "wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950", IA.innerText = "+", IA.addEventListener("click", () => {
4861
4887
  R += 1, W();
4862
4888
  }), BA.appendChild(IA), rA.appendChild(BA), QA.appendChild(rA);
4863
- const hA = document.createElement("td");
4864
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", hA.innerText = SA((S == null ? void 0 : S.price) * (S == null ? void 0 : S.limit)), QA.appendChild(hA);
4889
+ const JA = document.createElement("td");
4890
+ JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = SA((S == null ? void 0 : S.price) * (S == null ? void 0 : S.limit)), QA.appendChild(JA);
4865
4891
  const OA = document.createElement("td");
4866
4892
  OA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", OA.innerText = SA(
4867
4893
  (S == null ? void 0 : S.price) * (S == null ? void 0 : S.limit) * R
@@ -4889,8 +4915,8 @@ function ot(i) {
4889
4915
  IA.type = "button", IA.ariaLabel = s("increase"), IA.className = "wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950", IA.innerText = "+", IA.addEventListener("click", () => {
4890
4916
  a += 1, W();
4891
4917
  }), BA.appendChild(IA), rA.appendChild(BA), QA.appendChild(rA);
4892
- const hA = document.createElement("td");
4893
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", hA.innerText = SA(S.limit * S.price), QA.appendChild(hA);
4918
+ const JA = document.createElement("td");
4919
+ JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", JA.innerText = SA(S.limit * S.price), QA.appendChild(JA);
4894
4920
  const OA = document.createElement("td");
4895
4921
  OA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium", OA.innerText = SA(
4896
4922
  S.limit * S.price * a
@@ -4898,7 +4924,7 @@ function ot(i) {
4898
4924
  }
4899
4925
  }
4900
4926
  {
4901
- const S = o ? ((RA = D[0]) == null ? void 0 : RA.price) * M : 0, QA = EA(d), uA = QA ? QA.price * QA.limit * R : 0, cA = iA(v), rA = cA ? cA.price * cA.limit * a : 0, BA = S + uA + rA;
4927
+ const S = o ? ((hA = D[0]) == null ? void 0 : hA.price) * M : 0, QA = EA(d), uA = QA ? QA.price * QA.limit * R : 0, cA = iA(v), rA = cA ? cA.price * cA.limit * a : 0, BA = S + uA + rA;
4902
4928
  n(BA);
4903
4929
  const V = document.createElement("tr"), $ = document.createElement("td");
4904
4930
  $.colSpan = 4, $.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", $.innerText = s("total"), V.appendChild($);
@@ -4940,8 +4966,8 @@ function ot(i) {
4940
4966
  </defs>
4941
4967
  </svg>
4942
4968
  `, aA.appendChild(LA);
4943
- const dA = document.createElement("span");
4944
- dA.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", dA.innerText = s("qrPayment"), aA.appendChild(dA);
4969
+ const RA = document.createElement("span");
4970
+ RA.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", RA.innerText = s("qrPayment"), aA.appendChild(RA);
4945
4971
  const jA = document.createElement("div");
4946
4972
  jA.className = "wgt:flex wgt:justify-between wgt:gap-2", k.appendChild(jA);
4947
4973
  const Ig = Cg({
@@ -4982,19 +5008,19 @@ function ct({
4982
5008
  } = {}) {
4983
5009
  const n = document.createElement("div");
4984
5010
  n.className = "wgt:flex wgt:flex-col wgt:md:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";
4985
- const w = document.createElement("div"), e = document.createElement("h3");
4986
- e.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4 wgt:text-center", e.innerText = s("qrPaymentTitle"), w.appendChild(e);
4987
- const t = document.createElement("div");
4988
- t.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-4 wgt:border wgt:border-[#E4E7EC]";
5011
+ const t = document.createElement("div"), e = document.createElement("h3");
5012
+ e.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4 wgt:text-center", e.innerText = s("qrPaymentTitle"), t.appendChild(e);
5013
+ const w = document.createElement("div");
5014
+ w.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-4 wgt:border wgt:border-[#E4E7EC]";
4989
5015
  const i = document.createElement("div");
4990
5016
  i.className = "wgt:flex wgt:justify-center";
4991
5017
  const o = document.createElement("img");
4992
- o.src = g, o.alt = "QR code", o.className = "wgt:w-full wgt:max-w-[200px] wgt:aspect-square wgt:object-contain", i.appendChild(o), t.appendChild(i);
5018
+ o.src = g, o.alt = "QR code", o.className = "wgt:w-full wgt:max-w-[200px] wgt:aspect-square wgt:object-contain", i.appendChild(o), w.appendChild(i);
4993
5019
  const D = document.createElement("div");
4994
5020
  D.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((a) => {
4995
5021
  const k = document.createElement("img");
4996
5022
  k.src = a, k.alt = "Logo", k.className = "wgt:w-8 wgt:object-contain", D.appendChild(k);
4997
- }), t.appendChild(D);
5023
+ }), w.appendChild(D);
4998
5024
  const c = document.createElement("div");
4999
5025
  c.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
5000
5026
  const f = document.createElement("h3");
@@ -5002,7 +5028,7 @@ function ct({
5002
5028
  const J = document.createElement("p");
5003
5029
  J.className = "wgt:text-sm wgt:text-grey-8", J.innerHTML = `${s("accountNumber")}: <span class="wgt:font-medium">${C}</span>`, c.appendChild(J);
5004
5030
  const d = document.createElement("p");
5005
- d.className = "wgt:text-sm wgt:text-grey-8", d.innerHTML = `${s("beneficiaryBank")}: <span class="wgt:font-medium">${Q}</span>`, c.appendChild(d), t.appendChild(c), w.appendChild(t), n.appendChild(w);
5031
+ d.className = "wgt:text-sm wgt:text-grey-8", d.innerHTML = `${s("beneficiaryBank")}: <span class="wgt:font-medium">${Q}</span>`, c.appendChild(d), w.appendChild(c), t.appendChild(w), n.appendChild(t);
5006
5032
  const u = document.createElement("div");
5007
5033
  u.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:md:w-1/2";
5008
5034
  const r = document.createElement("div"), v = document.createElement("h3");
@@ -5080,19 +5106,19 @@ function Rg({
5080
5106
  E.src = ft, E.alt = "gif", E.className = "wgt:w-[120px] wgt:h-[120px]", I.appendChild(E), Q.appendChild(I);
5081
5107
  const n = document.createElement("h2");
5082
5108
  n.id = "success-popup-title", n.className = "wgt:mt-4 wgt:text-center wgt:text-xl wgt:font-semibold wgt:text-gray-800", n.innerText = g, Q.appendChild(n);
5083
- const w = document.createElement("button");
5084
- w.type = "button", w.innerText = A, w.className = "wgt:mt-6 wgt:w-full wgt:rounded wgt:bg-primary wgt:px-4 wgt:py-2 wgt:text-white wgt:focus:outline-none", w.addEventListener("click", () => {
5085
- t();
5086
- }), Q.appendChild(w);
5109
+ const t = document.createElement("button");
5110
+ t.type = "button", t.innerText = A, t.className = "wgt:mt-6 wgt:w-full wgt:rounded wgt:bg-primary wgt:px-4 wgt:py-2 wgt:text-white wgt:focus:outline-none", t.addEventListener("click", () => {
5111
+ w();
5112
+ }), Q.appendChild(t);
5087
5113
  function e() {
5088
5114
  C.style.display = "flex", setTimeout(() => {
5089
- w.focus();
5115
+ t.focus();
5090
5116
  }, 0);
5091
5117
  }
5092
- function t() {
5118
+ function w() {
5093
5119
  C.style.display = "none", typeof B == "function" && B();
5094
5120
  }
5095
- return { container: C, open: e, close: t };
5121
+ return { container: C, open: e, close: w };
5096
5122
  }
5097
5123
  function st({
5098
5124
  selectedProvider: g = null,
@@ -5112,15 +5138,15 @@ function st({
5112
5138
  "wgt:overflow-hidden"
5113
5139
  ].join(" ");
5114
5140
  let E = 600, n = null;
5115
- const w = document.createElement("div");
5116
- w.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
5141
+ const t = document.createElement("div");
5142
+ t.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
5117
5143
  const e = document.createElement("p");
5118
5144
  e.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
5119
- const t = (j) => {
5145
+ const w = (j) => {
5120
5146
  const gA = Math.floor(j / 60), fA = j % 60;
5121
5147
  return `${gA.toString().padStart(2, "0")}:${fA.toString().padStart(2, "0")}`;
5122
5148
  }, i = () => {
5123
- e.innerHTML = `${s("completePaymentIn")} <span class="font-bold">${t(E)}</span>`;
5149
+ e.innerHTML = `${s("completePaymentIn")} <span class="font-bold">${w(E)}</span>`;
5124
5150
  };
5125
5151
  i(), (() => {
5126
5152
  n = setInterval(() => {
@@ -5139,7 +5165,7 @@ function st({
5139
5165
  I.appendChild(j), gA();
5140
5166
  }
5141
5167
  }, 1e3);
5142
- })(), w.appendChild(e);
5168
+ })(), t.appendChild(e);
5143
5169
  const D = document.createElement("svg");
5144
5170
  D.setAttribute("width", "24"), D.setAttribute("height", "24"), D.setAttribute("viewBox", "0 0 24 24"), D.setAttribute("fill", "none"), D.setAttribute("xmlns", "http://www.w3.org/2000/svg"), D.innerHTML = `
5145
5171
  <path
@@ -5152,7 +5178,7 @@ function st({
5152
5178
  d="M16.0945 14.9672L12.7523 12.5508V6.75C12.7523 6.64687 12.668 6.5625 12.5648 6.5625H11.4375C11.3344 6.5625 11.25 6.64687 11.25 6.75V13.2047C11.25 13.2656 11.2781 13.3219 11.3273 13.357L15.2039 16.1836C15.2883 16.2445 15.4055 16.2258 15.4664 16.1437L16.1367 15.2297C16.1976 15.1429 16.1789 15.0258 16.0945 14.9672Z"
5153
5179
  fill="#1D963E"
5154
5180
  />
5155
- `, w.appendChild(D), I.appendChild(w);
5181
+ `, t.appendChild(D), I.appendChild(t);
5156
5182
  const c = document.createElement("div");
5157
5183
  c.className = [
5158
5184
  "wgt:p-6",
@@ -5430,16 +5456,16 @@ function Jt() {
5430
5456
  g.getRowColCoords = function(C) {
5431
5457
  if (C === 1) return [];
5432
5458
  const Q = Math.floor(C / 7) + 2, I = A(C), E = I === 145 ? 26 : Math.ceil((I - 13) / (2 * Q - 2)) * 2, n = [I - 7];
5433
- for (let w = 1; w < Q - 1; w++)
5434
- n[w] = n[w - 1] - E;
5459
+ for (let t = 1; t < Q - 1; t++)
5460
+ n[t] = n[t - 1] - E;
5435
5461
  return n.push(6), n.reverse();
5436
5462
  }, g.getPositions = function(C) {
5437
5463
  const Q = [], I = g.getRowColCoords(C), E = I.length;
5438
5464
  for (let n = 0; n < E; n++)
5439
- for (let w = 0; w < E; w++)
5440
- n === 0 && w === 0 || // top-left
5441
- n === 0 && w === E - 1 || // bottom-left
5442
- n === E - 1 && w === 0 || Q.push([I[n], I[w]]);
5465
+ for (let t = 0; t < E; t++)
5466
+ n === 0 && t === 0 || // top-left
5467
+ n === 0 && t === E - 1 || // bottom-left
5468
+ n === E - 1 && t === 0 || Q.push([I[n], I[t]]);
5443
5469
  return Q;
5444
5470
  };
5445
5471
  }(DC)), DC;
@@ -5486,38 +5512,38 @@ function dt() {
5486
5512
  return g.isValid(Q) ? parseInt(Q, 10) : void 0;
5487
5513
  }, g.getPenaltyN1 = function(Q) {
5488
5514
  const I = Q.size;
5489
- let E = 0, n = 0, w = 0, e = null, t = null;
5515
+ let E = 0, n = 0, t = 0, e = null, w = null;
5490
5516
  for (let i = 0; i < I; i++) {
5491
- n = w = 0, e = t = null;
5517
+ n = t = 0, e = w = null;
5492
5518
  for (let o = 0; o < I; o++) {
5493
5519
  let D = Q.get(i, o);
5494
- D === e ? n++ : (n >= 5 && (E += A.N1 + (n - 5)), e = D, n = 1), D = Q.get(o, i), D === t ? w++ : (w >= 5 && (E += A.N1 + (w - 5)), t = D, w = 1);
5520
+ D === e ? n++ : (n >= 5 && (E += A.N1 + (n - 5)), e = D, n = 1), D = Q.get(o, i), D === w ? t++ : (t >= 5 && (E += A.N1 + (t - 5)), w = D, t = 1);
5495
5521
  }
5496
- n >= 5 && (E += A.N1 + (n - 5)), w >= 5 && (E += A.N1 + (w - 5));
5522
+ n >= 5 && (E += A.N1 + (n - 5)), t >= 5 && (E += A.N1 + (t - 5));
5497
5523
  }
5498
5524
  return E;
5499
5525
  }, g.getPenaltyN2 = function(Q) {
5500
5526
  const I = Q.size;
5501
5527
  let E = 0;
5502
5528
  for (let n = 0; n < I - 1; n++)
5503
- for (let w = 0; w < I - 1; w++) {
5504
- const e = Q.get(n, w) + Q.get(n, w + 1) + Q.get(n + 1, w) + Q.get(n + 1, w + 1);
5529
+ for (let t = 0; t < I - 1; t++) {
5530
+ const e = Q.get(n, t) + Q.get(n, t + 1) + Q.get(n + 1, t) + Q.get(n + 1, t + 1);
5505
5531
  (e === 4 || e === 0) && E++;
5506
5532
  }
5507
5533
  return E * A.N2;
5508
5534
  }, g.getPenaltyN3 = function(Q) {
5509
5535
  const I = Q.size;
5510
- let E = 0, n = 0, w = 0;
5536
+ let E = 0, n = 0, t = 0;
5511
5537
  for (let e = 0; e < I; e++) {
5512
- n = w = 0;
5513
- for (let t = 0; t < I; t++)
5514
- n = n << 1 & 2047 | Q.get(e, t), t >= 10 && (n === 1488 || n === 93) && E++, w = w << 1 & 2047 | Q.get(t, e), t >= 10 && (w === 1488 || w === 93) && E++;
5538
+ n = t = 0;
5539
+ for (let w = 0; w < I; w++)
5540
+ n = n << 1 & 2047 | Q.get(e, w), w >= 10 && (n === 1488 || n === 93) && E++, t = t << 1 & 2047 | Q.get(w, e), w >= 10 && (t === 1488 || t === 93) && E++;
5515
5541
  }
5516
5542
  return E * A.N3;
5517
5543
  }, g.getPenaltyN4 = function(Q) {
5518
5544
  let I = 0;
5519
5545
  const E = Q.data.length;
5520
- for (let w = 0; w < E; w++) I += Q.data[w];
5546
+ for (let t = 0; t < E; t++) I += Q.data[t];
5521
5547
  return Math.abs(Math.ceil(I * 100 / E / 5) - 10) * A.N4;
5522
5548
  };
5523
5549
  function B(C, Q, I) {
@@ -5545,22 +5571,22 @@ function dt() {
5545
5571
  g.applyMask = function(Q, I) {
5546
5572
  const E = I.size;
5547
5573
  for (let n = 0; n < E; n++)
5548
- for (let w = 0; w < E; w++)
5549
- I.isReserved(w, n) || I.xor(w, n, B(Q, w, n));
5574
+ for (let t = 0; t < E; t++)
5575
+ I.isReserved(t, n) || I.xor(t, n, B(Q, t, n));
5550
5576
  }, g.getBestMask = function(Q, I) {
5551
5577
  const E = Object.keys(g.Patterns).length;
5552
- let n = 0, w = 1 / 0;
5578
+ let n = 0, t = 1 / 0;
5553
5579
  for (let e = 0; e < E; e++) {
5554
5580
  I(e), g.applyMask(e, Q);
5555
- const t = g.getPenaltyN1(Q) + g.getPenaltyN2(Q) + g.getPenaltyN3(Q) + g.getPenaltyN4(Q);
5556
- g.applyMask(e, Q), t < w && (w = t, n = e);
5581
+ const w = g.getPenaltyN1(Q) + g.getPenaltyN2(Q) + g.getPenaltyN3(Q) + g.getPenaltyN4(Q);
5582
+ g.applyMask(e, Q), w < t && (t = w, n = e);
5557
5583
  }
5558
5584
  return n;
5559
5585
  };
5560
5586
  }(cC)), cC;
5561
5587
  }
5562
5588
  var ug = {}, RQ;
5563
- function PI() {
5589
+ function JI() {
5564
5590
  if (RQ) return ug;
5565
5591
  RQ = 1;
5566
5592
  const g = TC(), A = [
@@ -5950,8 +5976,8 @@ function at() {
5950
5976
  let I = new Uint8Array(C);
5951
5977
  for (; I.length - Q.length >= 0; ) {
5952
5978
  const E = I[0];
5953
- for (let w = 0; w < Q.length; w++)
5954
- I[w] ^= A.mul(Q[w], E);
5979
+ for (let t = 0; t < Q.length; t++)
5980
+ I[t] ^= A.mul(Q[t], E);
5955
5981
  let n = 0;
5956
5982
  for (; n < I.length && I[n] === 0; ) n++;
5957
5983
  I = I.slice(n);
@@ -5989,13 +6015,13 @@ function kt() {
5989
6015
  }, fC = A, fC;
5990
6016
  }
5991
6017
  var sC = {}, uC = {}, MC = {}, HQ;
5992
- function dI() {
6018
+ function PI() {
5993
6019
  return HQ || (HQ = 1, MC.isValid = function(A) {
5994
6020
  return !isNaN(A) && A >= 1 && A <= 40;
5995
6021
  }), MC;
5996
6022
  }
5997
6023
  var yA = {}, zQ;
5998
- function RI() {
6024
+ function dI() {
5999
6025
  if (zQ) return yA;
6000
6026
  zQ = 1;
6001
6027
  const g = "[0-9]+", A = "[A-Z $%*+\\-./:]+";
@@ -6005,18 +6031,18 @@ function RI() {
6005
6031
  ]))+`;
6006
6032
  yA.KANJI = new RegExp(B, "g"), yA.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), yA.BYTE = new RegExp(C, "g"), yA.NUMERIC = new RegExp(g, "g"), yA.ALPHANUMERIC = new RegExp(A, "g");
6007
6033
  const Q = new RegExp("^" + B + "$"), I = new RegExp("^" + g + "$"), E = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
6008
- return yA.testKanji = function(w) {
6009
- return Q.test(w);
6010
- }, yA.testNumeric = function(w) {
6011
- return I.test(w);
6012
- }, yA.testAlphanumeric = function(w) {
6013
- return E.test(w);
6034
+ return yA.testKanji = function(t) {
6035
+ return Q.test(t);
6036
+ }, yA.testNumeric = function(t) {
6037
+ return I.test(t);
6038
+ }, yA.testAlphanumeric = function(t) {
6039
+ return E.test(t);
6014
6040
  }, yA;
6015
6041
  }
6016
6042
  var GQ;
6017
6043
  function _A() {
6018
6044
  return GQ || (GQ = 1, function(g) {
6019
- const A = dI(), B = RI();
6045
+ const A = PI(), B = dI();
6020
6046
  g.NUMERIC = {
6021
6047
  id: "Numeric",
6022
6048
  bit: 1,
@@ -6078,8 +6104,8 @@ function _A() {
6078
6104
  var OQ;
6079
6105
  function Yt() {
6080
6106
  return OQ || (OQ = 1, function(g) {
6081
- const A = VA(), B = PI(), C = TC(), Q = _A(), I = dI(), E = 7973, n = A.getBCHDigit(E);
6082
- function w(o, D, c) {
6107
+ const A = VA(), B = JI(), C = TC(), Q = _A(), I = PI(), E = 7973, n = A.getBCHDigit(E);
6108
+ function t(o, D, c) {
6083
6109
  for (let f = 1; f <= 40; f++)
6084
6110
  if (D <= g.getCapacity(f, c, o))
6085
6111
  return f;
@@ -6087,7 +6113,7 @@ function Yt() {
6087
6113
  function e(o, D) {
6088
6114
  return Q.getCharCountIndicator(o, D) + 4;
6089
6115
  }
6090
- function t(o, D) {
6116
+ function w(o, D) {
6091
6117
  let c = 0;
6092
6118
  return o.forEach(function(f) {
6093
6119
  const J = e(f.mode, D);
@@ -6096,7 +6122,7 @@ function Yt() {
6096
6122
  }
6097
6123
  function i(o, D) {
6098
6124
  for (let c = 1; c <= 40; c++)
6099
- if (t(o, c) <= g.getCapacity(c, D, Q.MIXED))
6125
+ if (w(o, c) <= g.getCapacity(c, D, Q.MIXED))
6100
6126
  return c;
6101
6127
  }
6102
6128
  g.from = function(D, c) {
@@ -6130,7 +6156,7 @@ function Yt() {
6130
6156
  f = D[0];
6131
6157
  } else
6132
6158
  f = D;
6133
- return w(f.mode, f.getLength(), J);
6159
+ return t(f.mode, f.getLength(), J);
6134
6160
  }, g.getEncodedBits = function(D) {
6135
6161
  if (!I.isValid(D) || D < 7)
6136
6162
  throw new Error("Invalid QR Code version");
@@ -6148,10 +6174,10 @@ function Ht() {
6148
6174
  const g = VA(), A = 1335, B = 21522, C = g.getBCHDigit(A);
6149
6175
  return vC.getEncodedBits = function(I, E) {
6150
6176
  const n = I.bit << 3 | E;
6151
- let w = n << 10;
6152
- for (; g.getBCHDigit(w) - C >= 0; )
6153
- w ^= A << g.getBCHDigit(w) - C;
6154
- return (n << 10 | w) ^ B;
6177
+ let t = n << 10;
6178
+ for (; g.getBCHDigit(t) - C >= 0; )
6179
+ t ^= A << g.getBCHDigit(t) - C;
6180
+ return (n << 10 | t) ^ B;
6155
6181
  }, vC;
6156
6182
  }
6157
6183
  var hC = {}, JC, qQ;
@@ -6304,10 +6330,10 @@ function qt() {
6304
6330
  E[C] = 0;
6305
6331
  var n = A.PriorityQueue.make();
6306
6332
  n.push(C, 0);
6307
- for (var w, e, t, i, o, D, c, f, J; !n.empty(); ) {
6308
- w = n.pop(), e = w.value, i = w.cost, o = B[e] || {};
6309
- for (t in o)
6310
- o.hasOwnProperty(t) && (D = o[t], c = i + D, f = E[t], J = typeof E[t] == "undefined", (J || f > c) && (E[t] = c, n.push(t, c), I[t] = e));
6333
+ for (var t, e, w, i, o, D, c, f, J; !n.empty(); ) {
6334
+ t = n.pop(), e = t.value, i = t.cost, o = B[e] || {};
6335
+ for (w in o)
6336
+ o.hasOwnProperty(w) && (D = o[w], c = i + D, f = E[w], J = typeof E[w] == "undefined", (J || f > c) && (E[w] = c, n.push(w, c), I[w] = e));
6311
6337
  }
6312
6338
  if (typeof Q != "undefined" && typeof E[Q] == "undefined") {
6313
6339
  var d = ["Could not find a path from ", C, " to ", Q, "."].join("");
@@ -6366,11 +6392,11 @@ function qt() {
6366
6392
  var jQ;
6367
6393
  function yt() {
6368
6394
  return jQ || (jQ = 1, function(g) {
6369
- const A = _A(), B = zt(), C = Gt(), Q = Ot(), I = Ft(), E = RI(), n = VA(), w = qt();
6395
+ const A = _A(), B = zt(), C = Gt(), Q = Ot(), I = Ft(), E = dI(), n = VA(), t = qt();
6370
6396
  function e(d) {
6371
6397
  return unescape(encodeURIComponent(d)).length;
6372
6398
  }
6373
- function t(d, u, r) {
6399
+ function w(d, u, r) {
6374
6400
  const v = [];
6375
6401
  let h;
6376
6402
  for (; (h = d.exec(r)) !== null; )
@@ -6383,9 +6409,9 @@ function yt() {
6383
6409
  return v;
6384
6410
  }
6385
6411
  function i(d) {
6386
- const u = t(E.NUMERIC, A.NUMERIC, d), r = t(E.ALPHANUMERIC, A.ALPHANUMERIC, d);
6412
+ const u = w(E.NUMERIC, A.NUMERIC, d), r = w(E.ALPHANUMERIC, A.ALPHANUMERIC, d);
6387
6413
  let v, h;
6388
- return n.isKanjiModeEnabled() ? (v = t(E.BYTE, A.BYTE, d), h = t(E.KANJI, A.KANJI, d)) : (v = t(E.BYTE_KANJI, A.BYTE, d), h = []), u.concat(r, v, h).sort(function(R, a) {
6414
+ return n.isKanjiModeEnabled() ? (v = w(E.BYTE, A.BYTE, d), h = w(E.KANJI, A.KANJI, d)) : (v = w(E.BYTE_KANJI, A.BYTE, d), h = []), u.concat(r, v, h).sort(function(R, a) {
6389
6415
  return R.index - a.index;
6390
6416
  }).map(function(R) {
6391
6417
  return {
@@ -6486,7 +6512,7 @@ function yt() {
6486
6512
  return typeof v == "string" ? r.push(J(v, null)) : v.data && r.push(J(v.data, v.mode)), r;
6487
6513
  }, []);
6488
6514
  }, g.fromString = function(u, r) {
6489
- const v = i(u, n.isKanjiModeEnabled()), h = c(v), M = f(h, r), R = w.find_path(M.map, "start", "end"), a = [];
6515
+ const v = i(u, n.isKanjiModeEnabled()), h = c(v), M = f(h, r), R = t.find_path(M.map, "start", "end"), a = [];
6490
6516
  for (let k = 1; k < R.length - 1; k++)
6491
6517
  a.push(M.table[R[k]].node);
6492
6518
  return g.fromArray(D(a));
@@ -6501,7 +6527,7 @@ var KQ;
6501
6527
  function lt() {
6502
6528
  if (KQ) return tC;
6503
6529
  KQ = 1;
6504
- const g = VA(), A = TC(), B = vt(), C = ht(), Q = Jt(), I = Pt(), E = dt(), n = PI(), w = kt(), e = Yt(), t = Ht(), i = _A(), o = yt();
6530
+ const g = VA(), A = TC(), B = vt(), C = ht(), Q = Jt(), I = Pt(), E = dt(), n = JI(), t = kt(), e = Yt(), w = Ht(), i = _A(), o = yt();
6505
6531
  function D(M, R) {
6506
6532
  const a = M.size, k = I.getPositions(R);
6507
6533
  for (let O = 0; O < k.length; O++) {
@@ -6535,7 +6561,7 @@ function lt() {
6535
6561
  O = Math.floor(q / 3), G = q % 3 + a - 8 - 3, F = (k >> q & 1) === 1, M.set(O, G, F, !0), M.set(G, O, F, !0);
6536
6562
  }
6537
6563
  function d(M, R, a) {
6538
- const k = M.size, O = t.getEncodedBits(R, a);
6564
+ const k = M.size, O = w.getEncodedBits(R, a);
6539
6565
  let G, F;
6540
6566
  for (G = 0; G < 15; G++)
6541
6567
  F = (O >> G & 1) === 1, G < 6 ? M.set(G, 8, F, !0) : G < 8 ? M.set(G + 1, 8, F, !0) : M.set(k - 15 + G, 8, F, !0), G < 8 ? M.set(8, k - G - 1, F, !0) : G < 9 ? M.set(8, 15 - G - 1 + 1, F, !0) : M.set(8, 15 - G - 1, F, !0);
@@ -6571,7 +6597,7 @@ function lt() {
6571
6597
  return v(k, M, R);
6572
6598
  }
6573
6599
  function v(M, R, a) {
6574
- const k = g.getSymbolTotalCodewords(R), O = n.getTotalCodewordsCount(R, a), G = k - O, F = n.getBlocksCount(R, a), q = k % F, m = F - q, j = Math.floor(k / F), gA = Math.floor(G / F), fA = gA + 1, vA = j - gA, H = new w(vA);
6600
+ const k = g.getSymbolTotalCodewords(R), O = n.getTotalCodewordsCount(R, a), G = k - O, F = n.getBlocksCount(R, a), q = k % F, m = F - q, j = Math.floor(k / F), gA = Math.floor(G / F), fA = gA + 1, vA = j - gA, H = new t(vA);
6575
6601
  let Y = 0;
6576
6602
  const z = new Array(F), K = new Array(F);
6577
6603
  let l = 0;
@@ -6635,7 +6661,7 @@ Minimum version required to store current data is: ` + G + `.
6635
6661
  }, tC;
6636
6662
  }
6637
6663
  var kC = {}, YC = {}, bQ;
6638
- function aI() {
6664
+ function RI() {
6639
6665
  return bQ || (bQ = 1, function(g) {
6640
6666
  function A(B) {
6641
6667
  if (typeof B == "number" && (B = B.toString()), typeof B != "string")
@@ -6675,12 +6701,12 @@ function aI() {
6675
6701
  const I = g.getScale(C, Q);
6676
6702
  return Math.floor((C + Q.margin * 2) * I);
6677
6703
  }, g.qrToImageData = function(C, Q, I) {
6678
- const E = Q.modules.size, n = Q.modules.data, w = g.getScale(E, I), e = Math.floor((E + I.margin * 2) * w), t = I.margin * w, i = [I.color.light, I.color.dark];
6704
+ const E = Q.modules.size, n = Q.modules.data, t = g.getScale(E, I), e = Math.floor((E + I.margin * 2) * t), w = I.margin * t, i = [I.color.light, I.color.dark];
6679
6705
  for (let o = 0; o < e; o++)
6680
6706
  for (let D = 0; D < e; D++) {
6681
6707
  let c = (o * e + D) * 4, f = I.color.light;
6682
- if (o >= t && D >= t && o < e - t && D < e - t) {
6683
- const J = Math.floor((o - t) / w), d = Math.floor((D - t) / w);
6708
+ if (o >= w && D >= w && o < e - w && D < e - w) {
6709
+ const J = Math.floor((o - w) / t), d = Math.floor((D - w) / t);
6684
6710
  f = i[n[J * E + d] ? 1 : 0];
6685
6711
  }
6686
6712
  C[c++] = f.r, C[c++] = f.g, C[c++] = f.b, C[c] = f.a;
@@ -6691,7 +6717,7 @@ function aI() {
6691
6717
  var NQ;
6692
6718
  function mt() {
6693
6719
  return NQ || (NQ = 1, function(g) {
6694
- const A = aI();
6720
+ const A = RI();
6695
6721
  function B(Q, I, E) {
6696
6722
  Q.clearRect(0, 0, I.width, I.height), I.style || (I.style = {}), I.height = E, I.width = E, I.style.height = E + "px", I.style.width = E + "px";
6697
6723
  }
@@ -6703,15 +6729,15 @@ function mt() {
6703
6729
  }
6704
6730
  }
6705
6731
  g.render = function(I, E, n) {
6706
- let w = n, e = E;
6707
- typeof w == "undefined" && (!E || !E.getContext) && (w = E, E = void 0), E || (e = C()), w = A.getOptions(w);
6708
- const t = A.getImageWidth(I.modules.size, w), i = e.getContext("2d"), o = i.createImageData(t, t);
6709
- return A.qrToImageData(o.data, I, w), B(i, e, t), i.putImageData(o, 0, 0), e;
6732
+ let t = n, e = E;
6733
+ typeof t == "undefined" && (!E || !E.getContext) && (t = E, E = void 0), E || (e = C()), t = A.getOptions(t);
6734
+ const w = A.getImageWidth(I.modules.size, t), i = e.getContext("2d"), o = i.createImageData(w, w);
6735
+ return A.qrToImageData(o.data, I, t), B(i, e, w), i.putImageData(o, 0, 0), e;
6710
6736
  }, g.renderToDataURL = function(I, E, n) {
6711
- let w = n;
6712
- typeof w == "undefined" && (!E || !E.getContext) && (w = E, E = void 0), w || (w = {});
6713
- const e = g.render(I, E, w), t = w.type || "image/png", i = w.rendererOpts || {};
6714
- return e.toDataURL(t, i.quality);
6737
+ let t = n;
6738
+ typeof t == "undefined" && (!E || !E.getContext) && (t = E, E = void 0), t || (t = {});
6739
+ const e = g.render(I, E, t), w = t.type || "image/png", i = t.rendererOpts || {};
6740
+ return e.toDataURL(w, i.quality);
6715
6741
  };
6716
6742
  }(kC)), kC;
6717
6743
  }
@@ -6719,7 +6745,7 @@ var HC = {}, XQ;
6719
6745
  function Lt() {
6720
6746
  if (XQ) return HC;
6721
6747
  XQ = 1;
6722
- const g = aI();
6748
+ const g = RI();
6723
6749
  function A(Q, I) {
6724
6750
  const E = Q.a / 255, n = I + '="' + Q.hex + '"';
6725
6751
  return E < 1 ? n + " " + I + '-opacity="' + E.toFixed(2).slice(1) + '"' : n;
@@ -6729,15 +6755,15 @@ function Lt() {
6729
6755
  return typeof E != "undefined" && (n += " " + E), n;
6730
6756
  }
6731
6757
  function C(Q, I, E) {
6732
- let n = "", w = 0, e = !1, t = 0;
6758
+ let n = "", t = 0, e = !1, w = 0;
6733
6759
  for (let i = 0; i < Q.length; i++) {
6734
6760
  const o = Math.floor(i % I), D = Math.floor(i / I);
6735
- !o && !e && (e = !0), Q[i] ? (t++, i > 0 && o > 0 && Q[i - 1] || (n += e ? B("M", o + E, 0.5 + D + E) : B("m", w, 0), w = 0, e = !1), o + 1 < I && Q[i + 1] || (n += B("h", t), t = 0)) : w++;
6761
+ !o && !e && (e = !0), Q[i] ? (w++, i > 0 && o > 0 && Q[i - 1] || (n += e ? B("M", o + E, 0.5 + D + E) : B("m", t, 0), t = 0, e = !1), o + 1 < I && Q[i + 1] || (n += B("h", w), w = 0)) : t++;
6736
6762
  }
6737
6763
  return n;
6738
6764
  }
6739
6765
  return HC.render = function(I, E, n) {
6740
- const w = g.getOptions(E), e = I.modules.size, t = I.modules.data, i = e + w.margin * 2, o = w.color.light.a ? "<path " + A(w.color.light, "fill") + ' d="M0 0h' + i + "v" + i + 'H0z"/>' : "", D = "<path " + A(w.color.dark, "stroke") + ' d="' + C(t, e, w.margin) + '"/>', c = 'viewBox="0 0 ' + i + " " + i + '"', J = '<svg xmlns="http://www.w3.org/2000/svg" ' + (w.width ? 'width="' + w.width + '" height="' + w.width + '" ' : "") + c + ' shape-rendering="crispEdges">' + o + D + `</svg>
6766
+ const t = g.getOptions(E), e = I.modules.size, w = I.modules.data, i = e + t.margin * 2, o = t.color.light.a ? "<path " + A(t.color.light, "fill") + ' d="M0 0h' + i + "v" + i + 'H0z"/>' : "", D = "<path " + A(t.color.dark, "stroke") + ' d="' + C(w, e, t.margin) + '"/>', c = 'viewBox="0 0 ' + i + " " + i + '"', J = '<svg xmlns="http://www.w3.org/2000/svg" ' + (t.width ? 'width="' + t.width + '" height="' + t.width + '" ' : "") + c + ' shape-rendering="crispEdges">' + o + D + `</svg>
6741
6767
  `;
6742
6768
  return typeof n == "function" && n(null, J), J;
6743
6769
  }, HC;
@@ -6747,29 +6773,29 @@ function jt() {
6747
6773
  if (TQ) return gg;
6748
6774
  TQ = 1;
6749
6775
  const g = Mt(), A = lt(), B = mt(), C = Lt();
6750
- function Q(I, E, n, w, e) {
6751
- const t = [].slice.call(arguments, 1), i = t.length, o = typeof t[i - 1] == "function";
6776
+ function Q(I, E, n, t, e) {
6777
+ const w = [].slice.call(arguments, 1), i = w.length, o = typeof w[i - 1] == "function";
6752
6778
  if (!o && !g())
6753
6779
  throw new Error("Callback required as last argument");
6754
6780
  if (o) {
6755
6781
  if (i < 2)
6756
6782
  throw new Error("Too few arguments provided");
6757
- i === 2 ? (e = n, n = E, E = w = void 0) : i === 3 && (E.getContext && typeof e == "undefined" ? (e = w, w = void 0) : (e = w, w = n, n = E, E = void 0));
6783
+ i === 2 ? (e = n, n = E, E = t = void 0) : i === 3 && (E.getContext && typeof e == "undefined" ? (e = t, t = void 0) : (e = t, t = n, n = E, E = void 0));
6758
6784
  } else {
6759
6785
  if (i < 1)
6760
6786
  throw new Error("Too few arguments provided");
6761
- return i === 1 ? (n = E, E = w = void 0) : i === 2 && !E.getContext && (w = n, n = E, E = void 0), new Promise(function(D, c) {
6787
+ return i === 1 ? (n = E, E = t = void 0) : i === 2 && !E.getContext && (t = n, n = E, E = void 0), new Promise(function(D, c) {
6762
6788
  try {
6763
- const f = A.create(n, w);
6764
- D(I(f, E, w));
6789
+ const f = A.create(n, t);
6790
+ D(I(f, E, t));
6765
6791
  } catch (f) {
6766
6792
  c(f);
6767
6793
  }
6768
6794
  });
6769
6795
  }
6770
6796
  try {
6771
- const D = A.create(n, w);
6772
- e(null, I(D, E, w));
6797
+ const D = A.create(n, t);
6798
+ e(null, I(D, E, t));
6773
6799
  } catch (D) {
6774
6800
  e(D);
6775
6801
  }
@@ -6779,7 +6805,7 @@ function jt() {
6779
6805
  }), gg;
6780
6806
  }
6781
6807
  var Kt = jt();
6782
- const bt = /* @__PURE__ */ MI(Kt);
6808
+ const bt = /* @__PURE__ */ uI(Kt);
6783
6809
  function Nt(E) {
6784
6810
  return N(this, arguments, function* ({
6785
6811
  onNext: g,
@@ -6794,7 +6820,7 @@ function Nt(E) {
6794
6820
  orderId: Q == null ? void 0 : Q.orderId,
6795
6821
  amount: Q == null ? void 0 : Q.totalAmountText,
6796
6822
  baseURL: I === "ocb" ? "https://ocb-uat-api-outscope-pos.atomsolution.vn/v1" : I === "bvb" ? "https://bvbank-stag.atomsolution.vn/v1" : ""
6797
- }), w = yield bt.toDataURL(n.qr_string, {
6823
+ }), t = yield bt.toDataURL(n.qr_string, {
6798
6824
  errorCorrectionLevel: "H",
6799
6825
  margin: 1,
6800
6826
  width: 200,
@@ -6806,23 +6832,23 @@ function Nt(E) {
6806
6832
  }
6807
6833
  }), e = document.createElement("div");
6808
6834
  e.className = "wgt:flex wgt:flex-col wgt:gap-6";
6809
- const t = document.createElement("div");
6810
- t.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6";
6835
+ const w = document.createElement("div");
6836
+ w.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6";
6811
6837
  const i = document.createElement("div");
6812
6838
  i.className = "wgt:flex-1";
6813
6839
  const { container: o } = rt(DA({
6814
- qrSrc: w,
6840
+ qrSrc: t,
6815
6841
  accountName: (n == null ? void 0 : n.merchant_name) || "",
6816
6842
  accountNumber: (n == null ? void 0 : n.va_account_no) || "",
6817
6843
  bankName: (n == null ? void 0 : n.bank_code) || ""
6818
6844
  }, C));
6819
- i.appendChild(o), t.appendChild(i);
6845
+ i.appendChild(o), w.appendChild(i);
6820
6846
  const { container: D, cleanup: c } = st(FA(DA({}, Q), {
6821
6847
  onResetToStep1: () => {
6822
6848
  c && c(), Q != null && Q.onResetToStep1 && Q.onResetToStep1();
6823
6849
  }
6824
6850
  }));
6825
- t.appendChild(D), e.appendChild(t);
6851
+ w.appendChild(D), e.appendChild(w);
6826
6852
  const f = document.createElement("div");
6827
6853
  f.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
6828
6854
  const J = Cg({
@@ -6880,16 +6906,16 @@ function Xt({ orderId: g, onPrev: A, onReturnHome: B, theme: C }) {
6880
6906
  E.className = "wgt:text-sm wgt:font-semibold wgt:text-text-black", E.innerText = s("confirmationTitle"), I.appendChild(E);
6881
6907
  const n = document.createElement("div");
6882
6908
  n.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(n);
6883
- const w = document.createElement("div");
6884
- w.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", w.innerText = "1", n.appendChild(w);
6909
+ const t = document.createElement("div");
6910
+ t.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", t.innerText = "1", n.appendChild(t);
6885
6911
  const e = document.createElement("p");
6886
6912
  e.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", e.innerText = s("notice1"), n.appendChild(e);
6887
- const t = document.createElement("div");
6888
- t.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(t);
6913
+ const w = document.createElement("div");
6914
+ w.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(w);
6889
6915
  const i = document.createElement("div");
6890
- i.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", i.innerText = "2", t.appendChild(i);
6916
+ i.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", i.innerText = "2", w.appendChild(i);
6891
6917
  const o = document.createElement("div");
6892
- o.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", t.appendChild(o);
6918
+ o.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", w.appendChild(o);
6893
6919
  const D = document.createElement("div");
6894
6920
  D.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", o.appendChild(D);
6895
6921
  const c = document.createElement("div");
@@ -7060,13 +7086,13 @@ function Cw(g, A, B, C) {
7060
7086
  ], {
7061
7087
  container: E,
7062
7088
  setStep: n,
7063
- setContent: w
7089
+ setContent: t
7064
7090
  } = mI({
7065
7091
  steps: Q.map((v) => v),
7066
7092
  currentStep: 1
7067
7093
  });
7068
7094
  g.dataset.theme = C || "default", g.appendChild(E);
7069
- let e = 1, t = I[0], i = {
7095
+ let e = 1, w = I[0], i = {
7070
7096
  eInvoiceRegistration: {
7071
7097
  taxAuthorityCode: "",
7072
7098
  invoiceSymbol: "",
@@ -7099,7 +7125,7 @@ function Cw(g, A, B, C) {
7099
7125
  isUsedEInvoiceBefore: !1
7100
7126
  },
7101
7127
  bank: C || "ocb",
7102
- provider: t.route,
7128
+ provider: w.route,
7103
7129
  logo: null,
7104
7130
  license: null,
7105
7131
  idCard: null,
@@ -7107,7 +7133,7 @@ function Cw(g, A, B, C) {
7107
7133
  packages: []
7108
7134
  }, o = null, D = null, c = null, f = null, J = 0;
7109
7135
  function d() {
7110
- t = I[0], i = {
7136
+ w = I[0], i = {
7111
7137
  eInvoiceRegistration: {
7112
7138
  taxAuthorityCode: "",
7113
7139
  invoiceSymbol: "",
@@ -7138,7 +7164,7 @@ function Cw(g, A, B, C) {
7138
7164
  isUsedEInvoiceBefore: !1
7139
7165
  },
7140
7166
  bank: C || "ocb",
7141
- provider: t.route,
7167
+ provider: w.route,
7142
7168
  logo: null,
7143
7169
  license: null,
7144
7170
  idCard: null,
@@ -7155,20 +7181,20 @@ function Cw(g, A, B, C) {
7155
7181
  const { container: h } = yield Qt({
7156
7182
  providerProps: {
7157
7183
  providers: I,
7158
- selectedRoute: t.route,
7184
+ selectedRoute: w.route,
7159
7185
  onProviderChange: (M) => {
7160
- t = M;
7186
+ w = M;
7161
7187
  }
7162
7188
  },
7163
7189
  formProps: {
7164
7190
  onSubmit: (M) => {
7165
- i.eInvoiceRegistration = DA(DA({}, i.eInvoiceRegistration), M.eInvoiceRegistration), i.logo = M.logo || null, i.license = M.license || null, i.idCard = M.idCard || null, i.idCardBack = M.idCardBack || null, i.provider = t.route, e = 2, n(e), r(e);
7191
+ i.eInvoiceRegistration = DA(DA({}, i.eInvoiceRegistration), M.eInvoiceRegistration), i.logo = M.logo || null, i.license = M.license || null, i.idCard = M.idCard || null, i.idCardBack = M.idCardBack || null, i.provider = w.route, e = 2, n(e), r(e);
7166
7192
  },
7167
7193
  registrationData: i,
7168
7194
  theme: C || "default"
7169
7195
  }
7170
7196
  });
7171
- w(h);
7197
+ t(h);
7172
7198
  } else if (v === 2) {
7173
7199
  const { container: h } = yield ot({
7174
7200
  onNext: () => N(null, null, function* () {
@@ -7195,7 +7221,7 @@ function Cw(g, A, B, C) {
7195
7221
  })
7196
7222
  }),
7197
7223
  bank: i.bank,
7198
- provider: t.route,
7224
+ provider: w.route,
7199
7225
  logo: i.logo,
7200
7226
  organizationRegistrationCert: i.license,
7201
7227
  legalRepresentativeIdCard: [
@@ -7228,10 +7254,10 @@ function Cw(g, A, B, C) {
7228
7254
  selectedInvoiceOtp: c,
7229
7255
  selectedSignatureOtp: f,
7230
7256
  theme: C,
7231
- selectedProvider: t,
7257
+ selectedProvider: w,
7232
7258
  registrationData: i
7233
7259
  });
7234
- w(h);
7260
+ t(h);
7235
7261
  } else if (v === 3) {
7236
7262
  const { container: h } = yield Nt({
7237
7263
  onNext: () => {
@@ -7251,7 +7277,7 @@ function Cw(g, A, B, C) {
7251
7277
  token: (B == null ? void 0 : B.accessToken) || "",
7252
7278
  registrationData: i,
7253
7279
  orderId: o || "",
7254
- selectedProvider: t || { name: "", logo: "" },
7280
+ selectedProvider: w || { name: "", logo: "" },
7255
7281
  selectedInvoiceOtp: c || { unitsPerMonth: 0 },
7256
7282
  selectedSignatureOtp: f || { durationYears: 0 },
7257
7283
  totalAmountText: J,
@@ -7261,7 +7287,7 @@ function Cw(g, A, B, C) {
7261
7287
  onResetToStep1: u
7262
7288
  }
7263
7289
  });
7264
- w(h);
7290
+ t(h);
7265
7291
  } else if (v === 4) {
7266
7292
  const { container: h } = Xt({
7267
7293
  orderId: o || "",
@@ -7272,21 +7298,20 @@ function Cw(g, A, B, C) {
7272
7298
  }),
7273
7299
  theme: C || "ocb"
7274
7300
  });
7275
- w(h);
7301
+ t(h);
7276
7302
  }
7277
7303
  });
7278
7304
  }
7279
7305
  yield r(e);
7280
7306
  });
7281
7307
  }
7282
- function Bw(g, A, B) {
7308
+ function Bw(g, A, B, C) {
7283
7309
  return N(this, null, function* () {
7284
- const { container: C, setContent: Q } = _t(), I = B == null ? void 0 : B.orderId, { container: E } = yield Aw({ orderId: I });
7285
- Q(E), g.appendChild(C);
7310
+ const { container: Q, setContent: I } = _t(), E = B == null ? void 0 : B.orderId, { container: n } = yield Aw({ orderId: E });
7311
+ I(n), g.appendChild(Q);
7286
7312
  });
7287
7313
  }
7288
7314
  function Pw(g) {
7289
- SQ(g.language || "vi");
7290
7315
  const A = typeof g.selector == "string" ? document.querySelector < HTMLElement > g.selector : g.selector;
7291
7316
  if (!A)
7292
7317
  throw new Error(`[WidgetSDK] Mount element not found: ${g.selector}`);
@@ -7301,16 +7326,25 @@ function Pw(g) {
7301
7326
  ), { destroy: B };
7302
7327
  }
7303
7328
  function dw(g) {
7304
- SQ(g.language || "vi");
7305
7329
  const A = typeof g.selector == "string" ? document.querySelector < HTMLElement > g.selector : g.selector;
7306
7330
  if (!A)
7307
7331
  throw new Error(`[WidgetSDK] Mount element not found: ${g.selector}`);
7308
7332
  function B() {
7309
7333
  A.innerHTML = "", g.onClose && g.onClose();
7310
7334
  }
7311
- return Bw(A, B, g.data || {}), { destroy: B };
7335
+ return Bw(
7336
+ A,
7337
+ B,
7338
+ g.data || {}
7339
+ ), { destroy: B };
7340
+ }
7341
+ function Rw(g) {
7342
+ if (g !== "vi" && g !== "en")
7343
+ throw new Error(`[WidgetSDK] Unsupported language: ${g}`);
7344
+ lI(g);
7312
7345
  }
7313
7346
  export {
7314
7347
  Pw as init,
7315
- dw as initEContract
7348
+ dw as initEContract,
7349
+ Rw as setWidgetLanguage
7316
7350
  };