@invoice-sdk/widget 1.99.0 → 1.100.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.
@@ -1,43 +1,43 @@
1
1
  var tQ = Object.defineProperty, hQ = Object.defineProperties;
2
2
  var cQ = Object.getOwnPropertyDescriptors;
3
3
  var Xg = Object.getOwnPropertySymbols;
4
- var nC = Object.prototype.hasOwnProperty, tC = Object.prototype.propertyIsEnumerable;
5
- var IC = (g, A, E) => A in g ? tQ(g, A, { enumerable: !0, configurable: !0, writable: !0, value: E }) : g[A] = E, PA = (g, A) => {
4
+ var tC = Object.prototype.hasOwnProperty, hC = Object.prototype.propertyIsEnumerable;
5
+ var nC = (g, A, E) => A in g ? tQ(g, A, { enumerable: !0, configurable: !0, writable: !0, value: E }) : g[A] = E, PA = (g, A) => {
6
6
  for (var E in A || (A = {}))
7
- nC.call(A, E) && IC(g, E, A[E]);
7
+ tC.call(A, E) && nC(g, E, A[E]);
8
8
  if (Xg)
9
9
  for (var E of Xg(A))
10
- tC.call(A, E) && IC(g, E, A[E]);
10
+ hC.call(A, E) && nC(g, E, A[E]);
11
11
  return g;
12
12
  }, GA = (g, A) => hQ(g, cQ(A));
13
13
  var Kg = (g, A) => {
14
14
  var E = {};
15
- for (var B in g)
16
- nC.call(g, B) && A.indexOf(B) < 0 && (E[B] = g[B]);
15
+ for (var C in g)
16
+ tC.call(g, C) && A.indexOf(C) < 0 && (E[C] = g[C]);
17
17
  if (g != null && Xg)
18
- for (var B of Xg(g))
19
- A.indexOf(B) < 0 && tC.call(g, B) && (E[B] = g[B]);
18
+ for (var C of Xg(g))
19
+ A.indexOf(C) < 0 && hC.call(g, C) && (E[C] = g[C]);
20
20
  return E;
21
21
  };
22
- var W = (g, A, E) => new Promise((B, C) => {
22
+ var W = (g, A, E) => new Promise((C, B) => {
23
23
  var Q = (n) => {
24
24
  try {
25
25
  I(E.next(n));
26
26
  } catch (c) {
27
- C(c);
27
+ B(c);
28
28
  }
29
29
  }, t = (n) => {
30
30
  try {
31
31
  I(E.throw(n));
32
32
  } catch (c) {
33
- C(c);
33
+ B(c);
34
34
  }
35
- }, I = (n) => n.done ? B(n.value) : Promise.resolve(n.value).then(Q, t);
35
+ }, I = (n) => n.done ? C(n.value) : Promise.resolve(n.value).then(Q, t);
36
36
  I((E = E.apply(g, A)).next());
37
37
  });
38
- import { t as a, g as rB, a as wQ, b as eQ, C as oQ, G as aQ, c as iQ, d as PB, e as ag, f as uQ, h as DQ, i as Ng, O as sQ, s as og, j as qB, k as fQ, l as mQ, m as rQ, n as PQ, o as qQ, p as vQ, v as MQ } from "./index-1zUj6on3.js";
38
+ import { t as i, g as PB, a as wQ, b as eQ, C as oQ, G as aQ, c as iQ, d as qB, e as ag, f as uQ, h as DQ, i as Ng, O as sQ, s as og, j as vB, k as fQ, l as mQ, m as rQ, n as PQ, o as qQ, p as vQ, v as MQ } from "./index-C_9Mfv96.js";
39
39
  import { g as pC } from "./_commonjsHelpers-bAxELxBV.js";
40
- function hC({ steps: g = [], currentStep: A = 1 } = {}) {
40
+ function cC({ steps: g = [], currentStep: A = 1 } = {}) {
41
41
  const E = document.createElement("div");
42
42
  E.className = [
43
43
  "wgt:relative",
@@ -47,8 +47,8 @@ function hC({ steps: g = [], currentStep: A = 1 } = {}) {
47
47
  "wgt:overflow-hidden",
48
48
  "wgt:shadow-sm"
49
49
  ].join(" ");
50
- const B = document.createElement("div");
51
- B.className = [
50
+ const C = document.createElement("div");
51
+ C.className = [
52
52
  "wgt:absolute",
53
53
  "wgt:inset-0",
54
54
  "wgt:transition-all",
@@ -56,13 +56,13 @@ function hC({ steps: g = [], currentStep: A = 1 } = {}) {
56
56
  "wgt:rounded-r-md",
57
57
  "wgt:@max-2xl:hidden",
58
58
  "wgt:bg-primary/15"
59
- ].join(" "), B.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)";
60
- const C = document.createElement("div");
61
- C.className = "wgt:relative wgt:flex wgt:w-full wgt:z-10 wgt:@max-2xl:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:overflow-hidden";
59
+ ].join(" "), C.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)";
60
+ const B = document.createElement("div");
61
+ B.className = "wgt:relative wgt:flex wgt:w-full wgt:z-10 wgt:@max-2xl:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:overflow-hidden";
62
62
  const Q = [];
63
63
  function t(n) {
64
64
  g.forEach((c, w) => {
65
- const s = w + 1, i = n === g.length + 1 ? s < g.length : n !== s, o = document.createElement("div");
65
+ const s = w + 1, a = n === g.length + 1 ? s < g.length : n !== s, o = document.createElement("div");
66
66
  o.setAttribute("role", "listitem"), o.setAttribute(
67
67
  "aria-label",
68
68
  `Step ${s} of ${g.length}: ${c.label}`
@@ -74,7 +74,7 @@ function hC({ steps: g = [], currentStep: A = 1 } = {}) {
74
74
  "wgt:py-5",
75
75
  "wgt:px-4",
76
76
  w < g.length - 1 ? "wgt:pr-9 wgt:@max-2xl:pr-0" : "",
77
- i ? "wgt:@max-2xl:hidden" : "wgt:@max-2xl:bg-primary/15"
77
+ a ? "wgt:@max-2xl:hidden" : "wgt:@max-2xl:bg-primary/15"
78
78
  ].filter(Boolean).join(" ");
79
79
  const D = document.createElement("div");
80
80
  D.className = [
@@ -89,14 +89,14 @@ function hC({ steps: g = [], currentStep: A = 1 } = {}) {
89
89
  const u = document.createElement("span");
90
90
  u.innerText = String(s), u.className = "wgt:text-white wgt:font-medium", D.appendChild(u);
91
91
  const R = document.createElement("span");
92
- R.innerText = c.label, R.className = "wgt:font-medium wgt:whitespace-nowrap", o.append(D, R), C.append(o), Q.push({ wrap: o, circle: D, label: R });
93
- }), E.append(B, C);
92
+ R.innerText = c.label, R.className = "wgt:font-medium wgt:whitespace-nowrap", o.append(D, R), B.append(o), Q.push({ wrap: o, circle: D, label: R });
93
+ }), E.append(C, B);
94
94
  }
95
95
  t(A);
96
96
  function I(n) {
97
97
  const c = g.length, w = Math.max(0, Math.min(n, c)), s = w / c * 100;
98
- B.style.width = `${s}%`, w === c ? (B.style.clipPath = "none", B.style.borderTopRightRadius = "10px", B.style.borderBottomRightRadius = "10px") : (B.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", B.style.borderTopRightRadius = "0", B.style.borderBottomRightRadius = "0"), Q.forEach(({ circle: i, label: o }, D) => {
99
- D + 1 <= w ? (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"));
98
+ C.style.width = `${s}%`, w === c ? (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"), Q.forEach(({ circle: a, label: o }, D) => {
99
+ D + 1 <= w ? (a.classList.add("wgt:bg-icon-primary"), a.classList.remove("wgt:bg-icon-soft-400"), o.classList.add("wgt:text-primary-dark"), o.classList.remove("wgt:text-soft-400")) : (a.classList.add("wgt:bg-icon-soft-400"), a.classList.remove("wgt:bg-icon-primary"), o.classList.add("wgt:text-soft-400"), o.classList.remove("wgt:text-primary-dark"));
100
100
  });
101
101
  }
102
102
  return I(A), {
@@ -121,15 +121,15 @@ function TQ({ steps: g = [], currentStep: A = 1 } = {}) {
121
121
  "wgt:py-8",
122
122
  "wgt:overflow-auto"
123
123
  ].join(" ");
124
- const B = document.createElement("h1");
125
- B.className = [
124
+ const C = document.createElement("h1");
125
+ C.className = [
126
126
  "wgt:text-[28px]",
127
127
  "wgt:font-bold",
128
128
  "wgt:leading-[30px]",
129
129
  "wgt:text-strong-950"
130
130
  ].join(" ");
131
- const C = document.createElement("div");
132
- C.className = [
131
+ const B = document.createElement("div");
132
+ B.className = [
133
133
  "wgt:w-full",
134
134
  "wgt:bg-white",
135
135
  "wgt:max-w-[1320px]",
@@ -147,21 +147,21 @@ function TQ({ steps: g = [], currentStep: A = 1 } = {}) {
147
147
  "wgt:@max-2xl:border-none",
148
148
  "wgt:@max-2xl:shadow-none"
149
149
  ].join(" ");
150
- let Q = hC({
150
+ let Q = cC({
151
151
  steps: g.map((c) => ({ label: c })),
152
152
  currentStep: A
153
153
  });
154
- C.appendChild(Q.container);
154
+ B.appendChild(Q.container);
155
155
  const t = document.createElement("div");
156
- t.className = "wgt:flex-1", C.appendChild(t), E.appendChild(B), E.appendChild(C);
156
+ t.className = "wgt:flex-1", B.appendChild(t), E.appendChild(C), E.appendChild(B);
157
157
  function I(c) {
158
- B.innerText = c;
158
+ C.innerText = c;
159
159
  }
160
160
  function n(c) {
161
- Q.container.remove(), Q = hC({
161
+ Q.container.remove(), Q = cC({
162
162
  steps: c.map((w) => ({ label: w })),
163
163
  currentStep: A
164
- }), C.insertBefore(Q.container, t);
164
+ }), B.insertBefore(Q.container, t);
165
165
  }
166
166
  return {
167
167
  container: E,
@@ -186,15 +186,15 @@ function bg({
186
186
  name: g,
187
187
  value: A = "",
188
188
  label: E = "",
189
- checked: B = !1,
190
- onChange: C,
189
+ checked: C = !1,
190
+ onChange: B,
191
191
  disabled: Q = !1,
192
192
  isIconCheckbox: t = !1
193
193
  }) {
194
194
  const I = document.createElement("div");
195
195
  if (I.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:cursor-pointer", t) {
196
- let s = function(i) {
197
- i ? (c.classList.add("wgt:bg-primary", "wgt:border-primary"), c.classList.remove("wgt:border-weak-50")) : (c.classList.remove("wgt:bg-primary", "wgt:border-primary"), c.classList.add("wgt:border-weak-50")), w.innerHTML = i ? `<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
196
+ let s = function(a) {
197
+ a ? (c.classList.add("wgt:bg-primary", "wgt:border-primary"), c.classList.remove("wgt:border-weak-50")) : (c.classList.remove("wgt:bg-primary", "wgt:border-primary"), c.classList.add("wgt:border-weak-50")), w.innerHTML = a ? `<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
198
198
  <mask id="path-1-inside-1_14170_92697" fill="white">
199
199
  <path d="M3.58055 7.58156C3.38055 7.58156 3.19055 7.50156 3.05055 7.36156L0.220552 4.53156C-0.0694482 4.24156 -0.0694482 3.76156 0.220552 3.47156C0.510552 3.18156 0.990552 3.18156 1.28055 3.47156L3.58055 5.77156L8.72055 0.631563C9.01055 0.341563 9.49055 0.341563 9.78055 0.631563C10.0706 0.921563 10.0706 1.40156 9.78055 1.69156L4.11055 7.36156C3.97055 7.50156 3.78055 7.58156 3.58055 7.58156Z"/>
200
200
  </mask>
@@ -214,7 +214,7 @@ function bg({
214
214
  <path d="M7 13.75V12.25C7.41843 12.25 7.75 12.5816 7.75 13H6.25H4.75C4.75 14.2384 5.76157 15.25 7 15.25V13.75ZM6.25 13H7.75V1H6.25H4.75V13H6.25ZM6.25 1H7.75C7.75 1.41843 7.41843 1.75 7 1.75V0.25V-1.25C5.76157 -1.25 4.75 -0.238427 4.75 1H6.25ZM7 0.25V1.75C6.58157 1.75 6.25 1.41843 6.25 1H7.75H9.25C9.25 -0.238427 8.23843 -1.25 7 -1.25V0.25ZM7.75 1H6.25V13H7.75H9.25V1H7.75ZM7.75 13H6.25C6.25 12.5816 6.58157 12.25 7 12.25V13.75V15.25C8.23843 15.25 9.25 14.2384 9.25 13H7.75Z" fill="#0E121B" mask="url(#path-3-inside-2_10693_173154)"/>
215
215
  </svg>
216
216
  `;
217
- }, n = B;
217
+ }, n = C;
218
218
  const c = document.createElement("div");
219
219
  c.className = [
220
220
  "wgt:w-7",
@@ -228,22 +228,22 @@ function bg({
228
228
  Q ? "wgt:cursor-not-allowed" : "wgt:cursor-pointer"
229
229
  ].join(" ");
230
230
  const w = document.createElement("div");
231
- s(B), c.appendChild(w), c.addEventListener("click", (i) => {
232
- i.stopPropagation(), !Q && (n = !n, s(n), C(n));
231
+ s(C), c.appendChild(w), c.addEventListener("click", (a) => {
232
+ a.stopPropagation(), !Q && (n = !n, s(n), B(n));
233
233
  }), I.append(c);
234
234
  } else {
235
235
  const n = document.createElement("div");
236
236
  n.className = "wgt:relative wgt:flex wgt:items-center wgt:justify-center wgt:h-6 wgt:w-6 wgt:cursor-pointer wgt:rounded-full wgt:transition-colors wgt:duration-200";
237
237
  const c = document.createElement("input");
238
- c.type = "radio", g && (c.name = g), A && (c.value = A), c.checked = B, c.disabled = Q, c.className = "wgt:invisible wgt:h-6 wgt:w-6";
238
+ c.type = "radio", g && (c.name = g), A && (c.value = A), c.checked = C, c.disabled = Q, c.className = "wgt:invisible wgt:h-6 wgt:w-6";
239
239
  const w = document.createElement("div");
240
240
  w.className = `wgt:absolute wgt:w-5 wgt:h-5 wgt:rounded-full wgt:border wgt:border-white wgt:border-3 wgt:transition-all wgt:duration-200 wgt:ring-2
241
241
 
242
- ${B ? "wgt:ring-primary wgt:bg-primary" : "wgt:ring-grey-6 wgt:bg-grey-6"}`;
242
+ ${C ? "wgt:ring-primary wgt:bg-primary" : "wgt:ring-grey-6 wgt:bg-grey-6"}`;
243
243
  const s = document.createElement("span");
244
- s.innerText = E, c.addEventListener("change", (i) => {
245
- const o = i.target.checked;
246
- typeof C == "function" && C(o), c.checked = !1;
244
+ s.innerText = E, c.addEventListener("change", (a) => {
245
+ const o = a.target.checked;
246
+ typeof B == "function" && B(o), c.checked = !1;
247
247
  }), n.append(c, s), n.append(w), I.append(n);
248
248
  }
249
249
  return {
@@ -255,10 +255,10 @@ function lQ({
255
255
  selectedRoute: A = null,
256
256
  onProviderChange: E
257
257
  }) {
258
- const B = document.createElement("div");
259
- B.className = "wgt:max-w-[1072px] wgt:mx-auto wgt:w-full wgt:flex wgt:flex-col wgt:gap-2";
260
- const C = document.createElement("h2");
261
- C.className = "wgt:text-sm wgt:font-semibold wgt:text-black", C.innerText = a("selectProvider"), B.appendChild(C);
258
+ const C = document.createElement("div");
259
+ C.className = "wgt:max-w-[1072px] wgt:mx-auto wgt:w-full wgt:flex wgt:flex-col wgt:gap-2";
260
+ const B = document.createElement("h2");
261
+ B.className = "wgt:text-sm wgt:font-semibold wgt:text-black", B.innerText = i("selectProvider"), C.appendChild(B);
262
262
  const Q = document.createElement("div");
263
263
  Q.className = [
264
264
  "wgt:w-full",
@@ -273,11 +273,11 @@ function lQ({
273
273
  "wgt:snap-mandatory",
274
274
  "wgt:cursor-grab",
275
275
  "wgt:select-none"
276
- ].join(" "), Q.style.scrollSnapType = "x mandatory", Q.style.overflowX = "auto", Q.style.scrollBehavior = "smooth", Q.style.scrollbarWidth = "none", Q.style.msOverflowStyle = "none", Q.style.WebkitOverflowScrolling = "touch", Q.style.overflowY = "hidden", B.appendChild(Q);
276
+ ].join(" "), Q.style.scrollSnapType = "x mandatory", Q.style.overflowX = "auto", Q.style.scrollBehavior = "smooth", Q.style.scrollbarWidth = "none", Q.style.msOverflowStyle = "none", Q.style.WebkitOverflowScrolling = "touch", Q.style.overflowY = "hidden", C.appendChild(Q);
277
277
  function t() {
278
278
  Q.innerHTML = "", g.forEach((w) => {
279
- const s = w.route === A, i = document.createElement("div");
280
- i.dataset.checked = s ? "true" : "false", i.className = [
279
+ const s = w.route === A, a = document.createElement("div");
280
+ a.dataset.checked = s ? "true" : "false", a.className = [
281
281
  "wgt:flex",
282
282
  "wgt:items-center",
283
283
  "wgt:justify-between",
@@ -291,7 +291,7 @@ function lQ({
291
291
  "wgt:transition-colors",
292
292
  "wgt:duration-200",
293
293
  s ? "wgt:border-primary" : ""
294
- ].filter(Boolean).join(" "), i.addEventListener("click", () => {
294
+ ].filter(Boolean).join(" "), a.addEventListener("click", () => {
295
295
  A = w.route, typeof E == "function" && E(w), t();
296
296
  });
297
297
  const o = document.createElement("div");
@@ -309,7 +309,7 @@ function lQ({
309
309
  },
310
310
  disabled: !1
311
311
  });
312
- i.appendChild(o), i.appendChild(T), Q.appendChild(i);
312
+ a.appendChild(o), a.appendChild(T), Q.appendChild(a);
313
313
  });
314
314
  }
315
315
  t();
@@ -323,12 +323,12 @@ function lQ({
323
323
  }), Q.addEventListener("mousemove", (w) => {
324
324
  if (!I) return;
325
325
  w.preventDefault();
326
- const i = (w.pageX - Q.offsetLeft - n) * 1.5;
327
- Q.scrollLeft = c - i;
326
+ const a = (w.pageX - Q.offsetLeft - n) * 1.5;
327
+ Q.scrollLeft = c - a;
328
328
  }), Q.addEventListener("wheel", (w) => {
329
329
  w.preventDefault(), Q.scrollLeft += w.deltaY;
330
330
  }), {
331
- container: B,
331
+ container: C,
332
332
  setSelectedRoute(w) {
333
333
  A = w, t();
334
334
  }
@@ -338,8 +338,8 @@ function kA({
338
338
  name: g,
339
339
  value: A = "",
340
340
  type: E = "text",
341
- placeholder: B = "",
342
- label: C,
341
+ placeholder: C = "",
342
+ label: B,
343
343
  required: Q = !1,
344
344
  error: t = null,
345
345
  onInput: I = null,
@@ -348,18 +348,18 @@ function kA({
348
348
  note: w = null
349
349
  }) {
350
350
  const s = document.createElement("div");
351
- if (s.className = "wgt:w-full " + (c ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), C) {
351
+ if (s.className = "wgt:w-full " + (c ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), B) {
352
352
  const u = document.createElement("label");
353
- if (u.htmlFor = g, u.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", u.innerText = C, Q) {
353
+ if (u.htmlFor = g, u.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", u.innerText = B, Q) {
354
354
  const R = document.createElement("span");
355
355
  R.className = "wgt:text-red-500 wgt:ml-1", R.innerText = "*", u.appendChild(R);
356
356
  }
357
357
  s.appendChild(u);
358
358
  }
359
- const i = document.createElement("div");
360
- i.className = "wgt:relative wgt:w-full wgt:col-span-4 wgt:flex wgt:flex-col wgt:gap-2", s.appendChild(i);
359
+ const a = document.createElement("div");
360
+ a.className = "wgt:relative wgt:w-full wgt:col-span-4 wgt:flex wgt:flex-col wgt:gap-2", s.appendChild(a);
361
361
  const o = document.createElement("input");
362
- o.type = E, o.name = g, o.id = g, o.value = A, o.placeholder = B, o.readOnly = n, o.autocomplete = "off", o.autocapitalize = "off", o.spellcheck = !1, o.className = [
362
+ o.type = E, o.name = g, o.id = g, o.value = A, o.placeholder = C, o.readOnly = n, o.autocomplete = "off", o.autocapitalize = "off", o.spellcheck = !1, o.className = [
363
363
  "wgt:col-span-4",
364
364
  "wgt:w-full",
365
365
  "wgt:border",
@@ -373,13 +373,13 @@ function kA({
373
373
  u.preventDefault();
374
374
  }, { passive: !1 });
375
375
  const D = document.createElement("span");
376
- if (D.className = "wgt:w-fit wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", D.innerText = t || "", t || (D.style.display = "none"), i.appendChild(o), w) {
376
+ if (D.className = "wgt:w-fit wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", D.innerText = t || "", t || (D.style.display = "none"), a.appendChild(o), w) {
377
377
  const u = document.createElement("ul");
378
378
  u.className = "wgt:list-outside wgt:@max-5xl:list-inside wgt:list-disc wgt:text-sm wgt:text-[#8C8C8C] wgt:italic";
379
379
  const R = document.createElement("li");
380
- R.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic wgt:whitespace-nowrap wgt:@max-2xl:whitespace-normal", R.innerText = w, u.appendChild(R), i.appendChild(u);
380
+ R.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic wgt:whitespace-nowrap wgt:@max-2xl:whitespace-normal", R.innerText = w, u.appendChild(R), a.appendChild(u);
381
381
  }
382
- return i.appendChild(D), {
382
+ return a.appendChild(D), {
383
383
  container: s,
384
384
  inputEl: o,
385
385
  setError(u) {
@@ -394,8 +394,8 @@ function Ug({
394
394
  name: g,
395
395
  value: A = "",
396
396
  options: E = [],
397
- label: B,
398
- disabled: C = !1,
397
+ label: C,
398
+ disabled: B = !1,
399
399
  error: Q = null,
400
400
  onChange: t = null,
401
401
  required: I = !1,
@@ -405,18 +405,18 @@ function Ug({
405
405
  const w = document.createElement("div");
406
406
  w.className = "wgt:w-full " + (n ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-2 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2");
407
407
  const s = document.createElement("label");
408
- if (s.htmlFor = g, s.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", s.innerText = B, w.appendChild(s), I) {
409
- const i = document.createElement("span");
410
- i.className = "wgt:text-red-500 wgt:ml-1", i.innerText = "*", s.appendChild(i);
408
+ if (s.htmlFor = g, s.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", s.innerText = C, w.appendChild(s), I) {
409
+ const a = document.createElement("span");
410
+ a.className = "wgt:text-red-500 wgt:ml-1", a.innerText = "*", s.appendChild(a);
411
411
  }
412
412
  if (c) {
413
- const i = document.createElement("div");
414
- i.className = "wgt:col-span-4 wgt:relative wgt:w-full";
413
+ const a = document.createElement("div");
414
+ a.className = "wgt:col-span-4 wgt:relative wgt:w-full";
415
415
  const o = document.createElement("input");
416
- o.type = "text", o.placeholder = `${a(
416
+ o.type = "text", o.placeholder = `${i(
417
417
  "search",
418
418
  "Tìm kiếm"
419
- )} ${B.toLowerCase()}...`, o.disabled = C, o.className = [
419
+ )} ${C.toLowerCase()}...`, o.disabled = B, o.className = [
420
420
  "wgt:border",
421
421
  "wgt:rounded",
422
422
  "wgt:px-3",
@@ -441,7 +441,7 @@ function Ug({
441
441
  const m = (P = d) => {
442
442
  if (u.innerHTML = "", P.length === 0) {
443
443
  const f = document.createElement("div");
444
- f.className = "wgt:px-3 wgt:py-2 wgt:text-gray-500 wgt:text-sm", f.innerText = `${a("noResults", "Không tìm thấy kết quả")}`, u.appendChild(f);
444
+ f.className = "wgt:px-3 wgt:py-2 wgt:text-gray-500 wgt:text-sm", f.innerText = `${i("noResults", "Không tìm thấy kết quả")}`, u.appendChild(f);
445
445
  return;
446
446
  }
447
447
  P.forEach((f) => {
@@ -469,15 +469,15 @@ function Ug({
469
469
  }), o.addEventListener("focus", () => {
470
470
  D.classList.remove("wgt:hidden"), m();
471
471
  }), document.addEventListener("click", (P) => {
472
- i.contains(P.target) || D.classList.add("wgt:hidden");
472
+ a.contains(P.target) || D.classList.add("wgt:hidden");
473
473
  }), o.addEventListener("keydown", (P) => {
474
474
  P.key === "Escape" && D.classList.add("wgt:hidden");
475
- }), D.appendChild(u), i.appendChild(o), i.appendChild(D), m();
475
+ }), D.appendChild(u), a.appendChild(o), a.appendChild(D), m();
476
476
  const Y = document.createElement("select");
477
477
  Y.style.display = "none", Y.name = g, Y.id = g, E.forEach((P) => {
478
478
  const f = document.createElement("option");
479
479
  f.value = P.value, f.innerText = P.label, P.value === A && (f.selected = !0), Y.appendChild(f);
480
- }), w.appendChild(i), w.appendChild(Y);
480
+ }), w.appendChild(a), w.appendChild(Y);
481
481
  const l = document.createElement("span");
482
482
  return l.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", l.innerText = Q || "", Q || (l.style.display = "none"), w.appendChild(l), {
483
483
  container: w,
@@ -502,12 +502,12 @@ function Ug({
502
502
  }), m();
503
503
  },
504
504
  setDisabled(P) {
505
- o.disabled = !!P, Y.disabled = !!P, P ? (i.classList.add("wgt:opacity-75"), D.classList.add("wgt:hidden")) : i.classList.remove("wgt:opacity-75");
505
+ o.disabled = !!P, Y.disabled = !!P, P ? (a.classList.add("wgt:opacity-75"), D.classList.add("wgt:hidden")) : a.classList.remove("wgt:opacity-75");
506
506
  }
507
507
  };
508
508
  } else {
509
- const i = document.createElement("select");
510
- i.id = g, i.name = g, i.disabled = C, i.className = [
509
+ const a = document.createElement("select");
510
+ a.id = g, a.name = g, a.disabled = B, a.className = [
511
511
  "wgt:col-span-4",
512
512
  "wgt:w-full",
513
513
  "wgt:border",
@@ -521,33 +521,33 @@ function Ug({
521
521
  Q ? "wgt:border-red-500" : "wgt:border-gray-300"
522
522
  ].join(" ");
523
523
  const o = document.createElement("option");
524
- o.value = "", o.disabled = !0, o.selected = A === "" || A == null, o.innerText = `-- ${a(
524
+ o.value = "", o.disabled = !0, o.selected = A === "" || A == null, o.innerText = `-- ${i(
525
525
  "select",
526
526
  "Chọn"
527
- )} ${B.toLowerCase()} --`, i.appendChild(o), E.forEach((u) => {
527
+ )} ${C.toLowerCase()} --`, a.appendChild(o), E.forEach((u) => {
528
528
  const R = document.createElement("option");
529
- R.value = u.value, R.innerText = u.label, u.value === A && (R.selected = !0), i.appendChild(R);
530
- }), typeof t == "function" && i.addEventListener("change", t), w.appendChild(i);
529
+ R.value = u.value, R.innerText = u.label, u.value === A && (R.selected = !0), a.appendChild(R);
530
+ }), typeof t == "function" && a.addEventListener("change", t), w.appendChild(a);
531
531
  const D = document.createElement("span");
532
532
  return D.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", D.innerText = Q || "", Q || (D.style.display = "none"), w.appendChild(D), {
533
533
  container: w,
534
- selectEl: i,
534
+ selectEl: a,
535
535
  setError(u) {
536
- u ? (D.innerText = u, D.style.display = "block", i.classList.remove("wgt:border-gray-300"), i.classList.add("wgt:border-red-500")) : (D.innerText = "", D.style.display = "none", i.classList.remove("wgt:border-red-500"), i.classList.add("wgt:border-gray-300"));
536
+ u ? (D.innerText = u, D.style.display = "block", a.classList.remove("wgt:border-gray-300"), a.classList.add("wgt:border-red-500")) : (D.innerText = "", D.style.display = "none", a.classList.remove("wgt:border-red-500"), a.classList.add("wgt:border-gray-300"));
537
537
  },
538
538
  getValue() {
539
- return i.value;
539
+ return a.value;
540
540
  },
541
541
  setOptions(u) {
542
- for (; i.options.length > 1; )
543
- i.remove(1);
542
+ for (; a.options.length > 1; )
543
+ a.remove(1);
544
544
  u.forEach((R) => {
545
545
  const T = document.createElement("option");
546
- T.value = R.value, T.innerText = R.label, i.appendChild(T);
546
+ T.value = R.value, T.innerText = R.label, a.appendChild(T);
547
547
  });
548
548
  },
549
549
  setDisabled(u) {
550
- i.disabled = !!u;
550
+ a.disabled = !!u;
551
551
  }
552
552
  };
553
553
  }
@@ -556,11 +556,11 @@ function Ig({
556
556
  title: g,
557
557
  isDisabled: A = !1,
558
558
  handleClick: E = null,
559
- type: B = "button",
560
- className: C = ""
559
+ type: C = "button",
560
+ className: B = ""
561
561
  } = {}) {
562
562
  const Q = document.createElement("button");
563
- return Q.type = B, Q.disabled = A, Q.className = [
563
+ return Q.type = C, Q.disabled = A, Q.className = [
564
564
  "wgt:bg-primary",
565
565
  "wgt:hover:bg-primary-dark",
566
566
  "wgt:px-6",
@@ -569,7 +569,7 @@ function Ig({
569
569
  "wgt:disabled:opacity-50",
570
570
  "wgt:disabled:cursor-not-allowed",
571
571
  "wgt:cursor-pointer",
572
- C
572
+ B
573
573
  ].filter(Boolean).join(" "), Q.innerText = g, typeof E == "function" && Q.addEventListener("click", (t) => W(null, null, function* () {
574
574
  if (!Q.disabled) {
575
575
  Q.disabled = !0;
@@ -583,12 +583,12 @@ function Ig({
583
583
  }
584
584
  })), Q;
585
585
  }
586
- function cC({
586
+ function wC({
587
587
  label: g,
588
588
  required: A = !1,
589
589
  file: E = null,
590
- onFileChange: B,
591
- error: C = null,
590
+ onFileChange: C,
591
+ error: B = null,
592
592
  accept: Q = ""
593
593
  }) {
594
594
  const t = document.createElement("form");
@@ -598,8 +598,8 @@ function cC({
598
598
  const r = document.createElement("span");
599
599
  r.className = "wgt:text-red-500 wgt:ml-1", r.innerText = "*", I.appendChild(r);
600
600
  }
601
- const n = Q ? Q.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 ${a("or")} JPEG`;
602
- I.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${a("fileFormat")} ${n}. ${a("maxFileSize")})</span>`, t.appendChild(I);
601
+ const n = Q ? Q.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 ${i("or")} JPEG`;
602
+ I.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${i("fileFormat")} ${n}. ${i("maxFileSize")})</span>`, t.appendChild(I);
603
603
  const c = document.createElement("div");
604
604
  c.className = [
605
605
  "wgt:h-fit",
@@ -616,14 +616,14 @@ function cC({
616
616
  w.accept = Q || "image/png, image/jpeg, .jpg, .jpeg, .png", w.id = "upload", w.type = "file", w.className = "wgt:hidden";
617
617
  const s = document.createElement("div");
618
618
  s.className = "wgt:w-full wgt:flex wgt:gap-1 wgt:items-start wgt:justify-start";
619
- const i = document.createElement("span");
620
- i.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", i.innerText = C || "", C || (i.style.display = "none");
619
+ const a = document.createElement("span");
620
+ a.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", a.innerText = B || "", B || (a.style.display = "none");
621
621
  let o = null;
622
622
  function D(r) {
623
- o = r, r ? (i.innerText = r, i.style.display = "block") : (i.innerText = "", i.style.display = "none");
623
+ o = r, r ? (a.innerText = r, a.style.display = "block") : (a.innerText = "", a.style.display = "none");
624
624
  }
625
625
  const u = Ig({
626
- title: a("uploadFile"),
626
+ title: i("uploadFile"),
627
627
  className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-white wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer",
628
628
  handleClick: (r) => {
629
629
  r.stopPropagation(), w.click();
@@ -653,7 +653,7 @@ function cC({
653
653
  const P = document.createElement("p");
654
654
  P.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", P.innerText = r.name;
655
655
  const f = document.createElement("p");
656
- f.className = "wgt:text-sm wgt:text-gray-500", f.innerText = R(r.size), l.appendChild(P), l.appendChild(f), Y.appendChild(l), s.appendChild(Y), E = r, typeof B == "function" && B(r);
656
+ f.className = "wgt:text-sm wgt:text-gray-500", f.innerText = R(r.size), l.appendChild(P), l.appendChild(f), Y.appendChild(l), s.appendChild(Y), E = r, typeof C == "function" && C(r);
657
657
  } else {
658
658
  const m = document.createElement("div");
659
659
  m.className = "wgt:flex wgt:items-center", m.appendChild(u), s.appendChild(m);
@@ -661,23 +661,23 @@ function cC({
661
661
  }
662
662
  return w.addEventListener("change", (r) => {
663
663
  const m = r.target.files && r.target.files[0] ? r.target.files[0] : null;
664
- m && (d(m), typeof B == "function" && B(m));
665
- }), d(E), c.appendChild(s), c.appendChild(w), t.appendChild(c), t.appendChild(i), {
664
+ m && (d(m), typeof C == "function" && C(m));
665
+ }), d(E), c.appendChild(s), c.appendChild(w), t.appendChild(c), t.appendChild(a), {
666
666
  container: t,
667
667
  getValues() {
668
668
  return E;
669
669
  },
670
670
  setFile(r) {
671
- E = r, d(r), typeof B == "function" && B(r);
671
+ E = r, d(r), typeof C == "function" && C(r);
672
672
  },
673
673
  clearFile() {
674
- E = null, d(null), typeof B == "function" && B(null);
674
+ E = null, d(null), typeof C == "function" && C(null);
675
675
  },
676
676
  getError: () => o
677
677
  };
678
678
  }
679
679
  function dQ(g) {
680
- const A = rB();
680
+ const A = PB();
681
681
  return g === "ocb" ? A.posOcbApiUrl : g === "bvb" || g === "shb" || g === "agr" ? A.posBvbApiUrl : "";
682
682
  }
683
683
  function xQ(g) {
@@ -703,32 +703,32 @@ function Fg(g) {
703
703
  const E = (() => {
704
704
  try {
705
705
  return new RegExp("\\p{Ll}", "u").test("a");
706
- } catch (C) {
706
+ } catch (B) {
707
707
  return !1;
708
708
  }
709
709
  })();
710
- let B = null;
710
+ let C = null;
711
711
  if (E) {
712
- const C = String.raw`\p{Lu}(?:\p{Ll}+|[’']\p{Lu}\p{Ll}+)(?:[’'-]\p{Lu}\p{Ll}+)*`, Q = String.raw`\p{Lu}`, t = String.raw`(?:${Q}|${C})`;
713
- B = new RegExp(
712
+ const B = String.raw`\p{Lu}(?:\p{Ll}+|[’']\p{Lu}\p{Ll}+)(?:[’'-]\p{Lu}\p{Ll}+)*`, Q = String.raw`\p{Lu}`, t = String.raw`(?:${Q}|${B})`;
713
+ C = new RegExp(
714
714
  `^(?:${t}(?: ${t})+|\\p{Lu}+(?: \\p{Lu}+)+)$`,
715
715
  "u"
716
716
  );
717
717
  } else {
718
- const C = "AĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXYÀÁẢÃẠẰẮẲẴẶẦẤẨẪẬÈÉẺẼẸỀẾỂỄỆÌÍỈĨỊÒÓỎÕỌỒỐỔỖỘỜỚỞỠỢÙÚỦŨỤỪỨỬỮỰỲÝỶỸỴ", Q = "aăâbcdđeêghiklmnxoôơpqrstưuvxyàáảãạằắẳẵặầấẩẫậèéẻẽẹềếểễệìíỉĩịòóỏõọồốổỗộờớởỡợùúủũụừứửữựỳýỷỹỵ", t = `[${C}]`, I = `[${Q}]`, n = `${t}(?:${I}+|[’']${t}${I}+)(?:[’'-]${t}${I}+)*`, w = `(?:${`${t}`}|${n})`;
719
- B = new RegExp(`^${w}(?: ${w})+$`);
718
+ const B = "AĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXYÀÁẢÃẠẰẮẲẴẶẦẤẨẪẬÈÉẺẼẸỀẾỂỄỆÌÍỈĨỊÒÓỎÕỌỒỐỔỖỘỜỚỞỠỢÙÚỦŨỤỪỨỬỮỰỲÝỶỸỴ", Q = "aăâbcdđeêghiklmnxoôơpqrstưuvxyàáảãạằắẳẵặầấẩẫậèéẻẽẹềếểễệìíỉĩịòóỏõọồốổỗộờớởỡợùúủũụừứửữựỳýỷỹỵ", t = `[${B}]`, I = `[${Q}]`, n = `${t}(?:${I}+|[’']${t}${I}+)(?:[’'-]${t}${I}+)*`, w = `(?:${`${t}`}|${n})`;
719
+ C = new RegExp(`^${w}(?: ${w})+$`);
720
720
  }
721
- return B.test(A);
721
+ return C.test(A);
722
722
  }
723
723
  function kg(g) {
724
724
  return g === "vi" ? "name" : "name" + g.charAt(0).toUpperCase() + g.slice(1);
725
725
  }
726
- function wC({
726
+ function eC({
727
727
  file: g,
728
728
  placeholder: A,
729
729
  caption: E,
730
- onFileSelected: B,
731
- onError: C,
730
+ onFileSelected: C,
731
+ onError: B,
732
732
  theme: Q
733
733
  }) {
734
734
  const t = document.createElement("div");
@@ -763,13 +763,13 @@ function wC({
763
763
  `;
764
764
  const s = document.createElement("div");
765
765
  s.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", s.innerText = A, I.append(c, s);
766
- const i = document.createElement("div");
767
- i.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", i.innerText = E, t.append(i);
766
+ const a = document.createElement("div");
767
+ a.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", a.innerText = E, t.append(a);
768
768
  const o = document.createElement("span");
769
769
  o.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", o.style.display = "none", t.append(o);
770
770
  let D = null;
771
771
  function u(m) {
772
- D = m, m ? (o.innerText = m, o.style.display = "block", typeof C == "function" && C(m)) : (o.innerText = "", o.style.display = "none", typeof C == "function" && C(null));
772
+ D = m, m ? (o.innerText = m, o.style.display = "block", typeof B == "function" && B(m)) : (o.innerText = "", o.style.display = "none", typeof B == "function" && B(null));
773
773
  }
774
774
  let R = g || null;
775
775
  function T(m, Y = 2) {
@@ -783,7 +783,7 @@ function wC({
783
783
  if (Y.alt = A, Y.className = "wgt:max-w-full wgt:max-h-full wgt:object-contain", r(m) || u(`File không hợp lệ. Chỉ chấp nhận: ${n.accept}`), m.size <= 500 * 1024 || u("Dung lượng file vượt quá 500KB."), m.type.startsWith("image/")) {
784
784
  const P = new FileReader();
785
785
  P.onload = () => {
786
- Y.src = P.result, typeof B == "function" && B(m);
786
+ Y.src = P.result, typeof C == "function" && C(m);
787
787
  }, P.readAsDataURL(m), I.appendChild(Y);
788
788
  } else {
789
789
  const P = document.createElement("div");
@@ -793,7 +793,7 @@ function wC({
793
793
  const M = document.createElement("p");
794
794
  M.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", M.innerText = m.name;
795
795
  const k = document.createElement("p");
796
- k.className = "wgt:text-sm wgt:text-gray-500", k.innerText = T(m.size), f.appendChild(M), f.appendChild(k), P.appendChild(f), I.appendChild(P), typeof B == "function" && B(null, m);
796
+ k.className = "wgt:text-sm wgt:text-gray-500", k.innerText = T(m.size), f.appendChild(M), f.appendChild(k), P.appendChild(f), I.appendChild(P), typeof C == "function" && C(null, m);
797
797
  }
798
798
  }
799
799
  function r(m) {
@@ -811,27 +811,27 @@ function wC({
811
811
  setError: u
812
812
  };
813
813
  }
814
- function kQ({ frontFile: g, backFile: A, onFrontChange: E, onBackChange: B, theme: C }) {
814
+ function kQ({ frontFile: g, backFile: A, onFrontChange: E, onBackChange: C, theme: B }) {
815
815
  const Q = document.createElement("div");
816
816
  Q.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
817
817
  const t = document.createElement("label");
818
- t.className = "wgt:font-medium", t.innerText = a("uploadIdentity");
818
+ t.className = "wgt:font-medium", t.innerText = i("uploadIdentity");
819
819
  const I = document.createElement("span");
820
820
  I.className = "wgt:text-red-500 wgt:ml-1", I.innerText = "*", t.appendChild(I), Q.append(t);
821
821
  const n = document.createElement("div");
822
822
  n.className = "wgt:w-full wgt:grid wgt:grid-cols-2 wgt:gap-4", Q.append(n);
823
- const c = wC({
823
+ const c = eC({
824
824
  file: g,
825
- placeholder: a("uploadFrontId"),
826
- caption: a("frontIdCard"),
825
+ placeholder: i("uploadFrontId"),
826
+ caption: i("frontIdCard"),
827
827
  onFileSelected: E,
828
- theme: C
829
- }), w = wC({
828
+ theme: B
829
+ }), w = eC({
830
830
  file: A,
831
- placeholder: a("uploadBackId"),
832
- caption: a("backIdCard"),
833
- onFileSelected: B,
834
- theme: C
831
+ placeholder: i("uploadBackId"),
832
+ caption: i("backIdCard"),
833
+ onFileSelected: C,
834
+ theme: B
835
835
  });
836
836
  return n.append(c.container, w.container), {
837
837
  container: Q,
@@ -851,13 +851,13 @@ const RQ = ({
851
851
  { length: 26 },
852
852
  (q, x) => String.fromCharCode(65 + x)
853
853
  );
854
- const E = (/* @__PURE__ */ new Date()).getFullYear(), B = Array.from(
854
+ const E = (/* @__PURE__ */ new Date()).getFullYear(), C = Array.from(
855
855
  { length: 2 },
856
856
  (q, x) => String(E + x).slice(-2)
857
- ), C = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], Q = ["C", "K"], t = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], I = document.createElement("div");
857
+ ), B = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], Q = ["C", "K"], t = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], I = document.createElement("div");
858
858
  I.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
859
859
  const n = document.createElement("span");
860
- n.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", n.textContent = a("invoiceTemplate");
860
+ n.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", n.textContent = i("invoiceTemplate");
861
861
  const c = document.createElement("span");
862
862
  c.className = "wgt:text-red-500 wgt:ml-1", c.innerText = "*", n.appendChild(c), I.append(n);
863
863
  const w = document.createElement("div");
@@ -874,65 +874,65 @@ const RQ = ({
874
874
  "wgt:@max-2xl:p-2",
875
875
  "wgt:@max-2xl:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-3 wgt:@max-2xl:space-y-2 wgt:@max-2xl:rounded-xl wgt:@max-2xl:bg-weak-50"
876
876
  ].join(" "), w.style.scrollSnapType = "x mandatory", w.style.overflowX = "auto", w.style.scrollBehavior = "smooth", w.style.scrollbarWidth = "none", w.style.msOverflowStyle = "none", w.style.WebkitOverflowScrolling = "touch", w.style.overflowY = "hidden", I.append(w);
877
- const s = "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", i = document.createElement("div");
878
- i.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
877
+ const s = "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", a = document.createElement("div");
878
+ a.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
879
879
  const o = document.createElement("span");
880
- o.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", o.textContent = a("sampleNumber");
880
+ o.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", o.textContent = i("sampleNumber");
881
881
  const D = document.createElement("span");
882
- D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", o.appendChild(D), i.appendChild(o);
882
+ D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", o.appendChild(D), a.appendChild(o);
883
883
  const u = document.createElement("select");
884
- u.className = `${s} wgt:@max-2xl:w-full wgt:w-48`, u.title = a("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
884
+ u.className = `${s} wgt:@max-2xl:w-full wgt:w-48`, u.title = i("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
885
885
  const R = {
886
- 1: a("invoiceTemplateTypes.1"),
887
- 2: a("invoiceTemplateTypes.2"),
888
- 3: a("invoiceTemplateTypes.3"),
889
- 4: a("invoiceTemplateTypes.4"),
890
- 5: a("invoiceTemplateTypes.5"),
891
- 6: a("invoiceTemplateTypes.6"),
892
- 7: a("invoiceTemplateTypes.7"),
893
- 8: a("invoiceTemplateTypes.8"),
894
- 9: a("invoiceTemplateTypes.9")
886
+ 1: i("invoiceTemplateTypes.1"),
887
+ 2: i("invoiceTemplateTypes.2"),
888
+ 3: i("invoiceTemplateTypes.3"),
889
+ 4: i("invoiceTemplateTypes.4"),
890
+ 5: i("invoiceTemplateTypes.5"),
891
+ 6: i("invoiceTemplateTypes.6"),
892
+ 7: i("invoiceTemplateTypes.7"),
893
+ 8: i("invoiceTemplateTypes.8"),
894
+ 9: i("invoiceTemplateTypes.9")
895
895
  };
896
- C.forEach((q) => {
896
+ B.forEach((q) => {
897
897
  u.append(new Option(R[q], q));
898
- }), i.appendChild(u), w.append(i);
898
+ }), a.appendChild(u), w.append(a);
899
899
  const T = document.createElement("div");
900
900
  T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
901
901
  const d = document.createElement("span");
902
- d.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", d.textContent = a("codeType");
902
+ d.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", d.textContent = i("codeType");
903
903
  const r = document.createElement("span");
904
904
  r.className = "wgt:text-red-500 wgt:ml-1", r.innerText = "*", d.appendChild(r), T.appendChild(d);
905
905
  const m = document.createElement("select");
906
- m.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, m.title = a("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((q) => {
907
- const x = q === "C" ? a("codeTypeC", "C (Có mã CQT)") : a("codeTypeK", "K (Không mã)");
906
+ m.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, m.title = i("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((q) => {
907
+ const x = q === "C" ? i("codeTypeC", "C (Có mã CQT)") : i("codeTypeK", "K (Không mã)");
908
908
  m.append(new Option(x, q));
909
909
  }), T.appendChild(m), w.append(T);
910
910
  const Y = document.createElement("div");
911
911
  Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
912
912
  const l = document.createElement("span");
913
- l.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", l.textContent = a("invoiceIssuanceYear");
913
+ l.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", l.textContent = i("invoiceIssuanceYear");
914
914
  const P = document.createElement("span");
915
915
  P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", l.appendChild(P), Y.appendChild(l);
916
916
  const f = document.createElement("select");
917
- f.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, f.title = a("yearTooltip", "Năm phát hành (2 chữ số cuối)"), B.forEach((q) => f.append(new Option(q, q))), f.value = String(E).slice(-2), Y.appendChild(f), w.append(Y);
917
+ f.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, f.title = i("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((q) => f.append(new Option(q, q))), f.value = String(E).slice(-2), Y.appendChild(f), w.append(Y);
918
918
  const M = document.createElement("div");
919
919
  M.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
920
920
  const k = document.createElement("span");
921
- k.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", k.textContent = a("typeOfEInvoice");
921
+ k.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", k.textContent = i("typeOfEInvoice");
922
922
  const H = document.createElement("span");
923
923
  H.className = "wgt:text-red-500 wgt:ml-1", H.innerText = "*", k.appendChild(H), M.appendChild(k);
924
924
  const J = document.createElement("select");
925
- J.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, J.title = a("invoiceTypeTooltip", "Loại hóa đơn");
925
+ J.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, J.title = i("invoiceTypeTooltip", "Loại hóa đơn");
926
926
  const v = {
927
- T: a("invoiceTypeT", "T (Đăng ký)"),
928
- D: a("invoiceTypeD", "D (Tài sản)"),
929
- L: a("invoiceTypeL", "L (CQT)"),
930
- M: a("invoiceTypeM", "M (Máy tính tiền)"),
931
- N: a("invoiceTypeN", "N (Nội bộ)"),
932
- B: a("invoiceTypeB", "B (Đại lý)"),
933
- G: a("invoiceTypeG", "G (Tem GTGT)"),
934
- H: a("invoiceTypeH", "H (Tem bán hàng)"),
935
- X: a("invoiceTypeX", "X (Thương mại)")
927
+ T: i("invoiceTypeT", "T (Đăng ký)"),
928
+ D: i("invoiceTypeD", "D (Tài sản)"),
929
+ L: i("invoiceTypeL", "L (CQT)"),
930
+ M: i("invoiceTypeM", "M (Máy tính tiền)"),
931
+ N: i("invoiceTypeN", "N (Nội bộ)"),
932
+ B: i("invoiceTypeB", "B (Đại lý)"),
933
+ G: i("invoiceTypeG", "G (Tem GTGT)"),
934
+ H: i("invoiceTypeH", "H (Tem bán hàng)"),
935
+ X: i("invoiceTypeX", "X (Thương mại)")
936
936
  };
937
937
  t.forEach((q) => {
938
938
  J.append(new Option(v[q], q));
@@ -940,11 +940,11 @@ const RQ = ({
940
940
  const F = document.createElement("div");
941
941
  F.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
942
942
  const U = document.createElement("span");
943
- U.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", U.textContent = a("formDifferentiationCode");
943
+ U.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", U.textContent = i("formDifferentiationCode");
944
944
  const j = document.createElement("span");
945
945
  j.className = "wgt:text-red-500 wgt:ml-1", j.innerText = "*", U.appendChild(j), F.appendChild(U);
946
946
  const O = document.createElement("input");
947
- O.type = "text", O.maxLength = 2, O.placeholder = "AB", O.defaultValue = "YY", O.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, O.title = a("customLettersTooltip"), F.appendChild(O), w.append(F);
947
+ O.type = "text", O.maxLength = 2, O.placeholder = "AB", O.defaultValue = "YY", O.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, O.title = i("customLettersTooltip"), F.appendChild(O), w.append(F);
948
948
  function e() {
949
949
  return u.value + m.value + f.value + J.value + O.value.toUpperCase();
950
950
  }
@@ -967,7 +967,7 @@ const RQ = ({
967
967
  });
968
968
  NA.interceptors.request.use(
969
969
  function(g) {
970
- return g.baseURL = rB().invoiceHubBaseUrl, g;
970
+ return g.baseURL = PB().invoiceHubBaseUrl, g;
971
971
  },
972
972
  function(g) {
973
973
  return Promise.reject(g);
@@ -998,7 +998,7 @@ function JQ(g, A, E) {
998
998
  })).data;
999
999
  });
1000
1000
  }
1001
- function eC(g, A) {
1001
+ function Sg(g, A) {
1002
1002
  return W(this, null, function* () {
1003
1003
  return (yield NA.get(aQ, {
1004
1004
  params: {
@@ -1029,27 +1029,27 @@ var Lg = { exports: {} };
1029
1029
  var FQ = Lg.exports, aC;
1030
1030
  function OQ() {
1031
1031
  return aC || (aC = 1, function(g, A) {
1032
- (function(E, B) {
1033
- var C;
1032
+ (function(E, C) {
1033
+ var B;
1034
1034
  {
1035
1035
  try {
1036
- C = require("moment");
1036
+ B = require("moment");
1037
1037
  } catch (Q) {
1038
1038
  }
1039
- g.exports = B(C);
1039
+ g.exports = C(B);
1040
1040
  }
1041
1041
  })(FQ, function(E) {
1042
- var B = typeof E == "function", C = !!window.addEventListener, Q = window.document, t = window.setTimeout, I = function(e, h, q, x) {
1043
- C ? e.addEventListener(h, q, !!x) : e.attachEvent("on" + h, q);
1042
+ var C = typeof E == "function", B = !!window.addEventListener, Q = window.document, t = window.setTimeout, I = function(e, h, q, x) {
1043
+ B ? e.addEventListener(h, q, !!x) : e.attachEvent("on" + h, q);
1044
1044
  }, n = function(e, h, q, x) {
1045
- C ? e.removeEventListener(h, q, !!x) : e.detachEvent("on" + h, q);
1045
+ B ? e.removeEventListener(h, q, !!x) : e.detachEvent("on" + h, q);
1046
1046
  }, c = function(e) {
1047
1047
  return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
1048
1048
  }, w = function(e, h) {
1049
1049
  return (" " + e.className + " ").indexOf(" " + h + " ") !== -1;
1050
1050
  }, s = function(e, h) {
1051
1051
  w(e, h) || (e.className = e.className === "" ? h : e.className + " " + h);
1052
- }, i = function(e, h) {
1052
+ }, a = function(e, h) {
1053
1053
  e.className = c((" " + e.className + " ").replace(" " + h + " ", " "));
1054
1054
  }, o = function(e) {
1055
1055
  return /Array/.test(Object.prototype.toString.call(e));
@@ -1181,7 +1181,7 @@ function OQ() {
1181
1181
  var AA = new Date(e.getFullYear(), 0, N), S = 1440 * 60 * 1e3, EA = (e.getTime() - AA.getTime()) / S, nA = 1 + Math.round((EA - L + y(AA.getDay())) / b);
1182
1182
  return nA;
1183
1183
  }, H = function(e, h, q, x) {
1184
- var N = new Date(q, h, e), L = B ? E(N).isoWeek() : k(N, x);
1184
+ var N = new Date(q, h, e), L = C ? E(N).isoWeek() : k(N, x);
1185
1185
  return '<td class="pika-week">' + L + "</td>";
1186
1186
  }, J = function(e, h, q, x) {
1187
1187
  return '<tr class="pika-row' + (q ? " pick-whole-week" : "") + (x ? " is-selected" : "") + '">' + (h ? e.reverse() : e).join("") + "</tr>";
@@ -1248,7 +1248,7 @@ function OQ() {
1248
1248
  }, h._parseFieldValue = function() {
1249
1249
  if (q.parse)
1250
1250
  return q.parse(q.field.value, q.format);
1251
- if (B) {
1251
+ if (C) {
1252
1252
  var N = E(q.field.value, q.format, q.formatStrict);
1253
1253
  return N && N.isValid() ? N.toDate() : null;
1254
1254
  } else
@@ -1273,7 +1273,7 @@ function OQ() {
1273
1273
  N = N || window.event;
1274
1274
  var L = N.target || N.srcElement, b = L;
1275
1275
  if (L) {
1276
- !C && w(L, "pika-select") && (L.onchange || (L.setAttribute("onchange", "return;"), I(L, "change", h._onChange)));
1276
+ !B && w(L, "pika-select") && (L.onchange || (L.setAttribute("onchange", "return;"), I(L, "change", h._onChange)));
1277
1277
  do
1278
1278
  if (w(b, "pika-single") || b === q.trigger)
1279
1279
  return;
@@ -1304,19 +1304,19 @@ function OQ() {
1304
1304
  * return a formatted string of the current selection (using Moment.js if available)
1305
1305
  */
1306
1306
  toString: function(e) {
1307
- return e = e || this._o.format, D(this._d) ? this._o.toString ? this._o.toString(this._d, e) : B ? E(this._d).format(e) : this._d.toDateString() : "";
1307
+ return e = e || this._o.format, D(this._d) ? this._o.toString ? this._o.toString(this._d, e) : C ? E(this._d).format(e) : this._d.toDateString() : "";
1308
1308
  },
1309
1309
  /**
1310
1310
  * return a Moment.js object of the current selection (if available)
1311
1311
  */
1312
1312
  getMoment: function() {
1313
- return B ? E(this._d) : null;
1313
+ return C ? E(this._d) : null;
1314
1314
  },
1315
1315
  /**
1316
1316
  * set the current selection from a Moment.js object (if available)
1317
1317
  */
1318
1318
  setMoment: function(e, h) {
1319
- B && E.isMoment(e) && this.setDate(e.toDate(), h);
1319
+ C && E.isMoment(e) && this.setDate(e.toDate(), h);
1320
1320
  },
1321
1321
  /**
1322
1322
  * return a Date object of the current selection
@@ -1431,7 +1431,7 @@ function OQ() {
1431
1431
  else
1432
1432
  for (y = h.offsetLeft, AA = h.offsetTop + h.offsetHeight; h = h.offsetParent; )
1433
1433
  y += h.offsetLeft, AA += h.offsetTop;
1434
- (this._o.reposition && y + q > N || this._o.position.indexOf("right") > -1 && y - q + e.offsetWidth > 0) && (y = y - q + e.offsetWidth, EA = !1), (this._o.reposition && AA + x > L + b || this._o.position.indexOf("top") > -1 && AA - x - e.offsetHeight > 0) && (AA = AA - x - e.offsetHeight, nA = !1), this.el.style.left = y + "px", this.el.style.top = AA + "px", s(this.el, EA ? "left-aligned" : "right-aligned"), s(this.el, nA ? "bottom-aligned" : "top-aligned"), i(this.el, EA ? "right-aligned" : "left-aligned"), i(this.el, nA ? "top-aligned" : "bottom-aligned");
1434
+ (this._o.reposition && y + q > N || this._o.position.indexOf("right") > -1 && y - q + e.offsetWidth > 0) && (y = y - q + e.offsetWidth, EA = !1), (this._o.reposition && AA + x > L + b || this._o.position.indexOf("top") > -1 && AA - x - e.offsetHeight > 0) && (AA = AA - x - e.offsetHeight, nA = !1), this.el.style.left = y + "px", this.el.style.top = AA + "px", s(this.el, EA ? "left-aligned" : "right-aligned"), s(this.el, nA ? "bottom-aligned" : "top-aligned"), a(this.el, EA ? "right-aligned" : "left-aligned"), a(this.el, nA ? "top-aligned" : "bottom-aligned");
1435
1435
  }
1436
1436
  },
1437
1437
  /**
@@ -1469,7 +1469,7 @@ function OQ() {
1469
1469
  return this._v;
1470
1470
  },
1471
1471
  show: function() {
1472
- this.isVisible() || (this._v = !0, this.draw(), i(this.el, "is-hidden"), this._o.bound && (I(Q, "click", this._onClick), this.adjustPosition()), typeof this._o.onOpen == "function" && this._o.onOpen.call(this));
1472
+ this.isVisible() || (this._v = !0, this.draw(), a(this.el, "is-hidden"), this._o.bound && (I(Q, "click", this._onClick), this.adjustPosition()), typeof this._o.onOpen == "function" && this._o.onOpen.call(this));
1473
1473
  },
1474
1474
  hide: function() {
1475
1475
  var e = this._v;
@@ -1513,16 +1513,16 @@ function Og(g, A = {}) {
1513
1513
  return console.warn("Notification container not available"), null;
1514
1514
  const {
1515
1515
  autoClose: E = 5e3,
1516
- hideProgressBar: B = !0,
1517
- closeButton: C = !1,
1516
+ hideProgressBar: C = !0,
1517
+ closeButton: B = !1,
1518
1518
  icon: Q = !1,
1519
1519
  type: t = "info"
1520
1520
  } = A;
1521
1521
  ng.length >= NQ && zg(ng[0].id);
1522
1522
  const I = Date.now() + Math.random(), n = jQ(I, g, {
1523
1523
  autoClose: E,
1524
- hideProgressBar: B,
1525
- closeButton: C,
1524
+ hideProgressBar: C,
1525
+ closeButton: B,
1526
1526
  icon: Q,
1527
1527
  type: t
1528
1528
  });
@@ -1533,7 +1533,7 @@ function Og(g, A = {}) {
1533
1533
  }, E), I;
1534
1534
  }
1535
1535
  function jQ(g, A, E) {
1536
- const { hideProgressBar: B, closeButton: C, icon: Q, type: t, autoClose: I } = E, n = document.createElement("div");
1536
+ const { hideProgressBar: C, closeButton: B, icon: Q, type: t, autoClose: I } = E, n = document.createElement("div");
1537
1537
  n.className = [
1538
1538
  "wgt:bg-white",
1539
1539
  "wgt:px-5",
@@ -1566,36 +1566,36 @@ function jQ(g, A, E) {
1566
1566
  n.style.borderLeft = `4px solid ${c[t] || c.info}`, n.style.zIndex = "99999";
1567
1567
  const w = document.createElement("div");
1568
1568
  if (w.className = "wgt:flex wgt:items-start wgt:gap-3", Q) {
1569
- const i = document.createElement("div"), o = {
1569
+ const a = document.createElement("div"), o = {
1570
1570
  info: "wgt:bg-blue-500",
1571
1571
  success: "wgt:bg-green-500",
1572
1572
  warning: "wgt:bg-orange-500",
1573
1573
  error: "wgt:bg-red-500"
1574
1574
  };
1575
- i.className = `wgt:flex-shrink-0 wgt:w-5 wgt:h-5 wgt:rounded-full wgt:flex wgt:items-center wgt:justify-center wgt:mt-0.5 ${o[t] || o.info}`, i.innerHTML = '<span class="wgt:text-white wgt:text-xs wgt:font-bold">!</span>', w.appendChild(i);
1575
+ a.className = `wgt:flex-shrink-0 wgt:w-5 wgt:h-5 wgt:rounded-full wgt:flex wgt:items-center wgt:justify-center wgt:mt-0.5 ${o[t] || o.info}`, a.innerHTML = '<span class="wgt:text-white wgt:text-xs wgt:font-bold">!</span>', w.appendChild(a);
1576
1576
  }
1577
1577
  const s = document.createElement("div");
1578
- if (s.className = "wgt:text-sm wgt:font-medium wgt:text-gray-700 wgt:leading-5 wgt:flex-1", s.innerText = A, w.appendChild(s), C) {
1579
- const i = document.createElement("button");
1580
- i.className = "wgt:flex-shrink-0 wgt:ml-2 wgt:text-gray-400 wgt:hover:text-gray-600 wgt:text-lg wgt:leading-none", i.innerHTML = "×", i.addEventListener("click", () => {
1578
+ if (s.className = "wgt:text-sm wgt:font-medium wgt:text-gray-700 wgt:leading-5 wgt:flex-1", s.innerText = A, w.appendChild(s), B) {
1579
+ const a = document.createElement("button");
1580
+ a.className = "wgt:flex-shrink-0 wgt:ml-2 wgt:text-gray-400 wgt:hover:text-gray-600 wgt:text-lg wgt:leading-none", a.innerHTML = "×", a.addEventListener("click", () => {
1581
1581
  zg(g);
1582
- }), w.appendChild(i);
1582
+ }), w.appendChild(a);
1583
1583
  }
1584
- if (n.appendChild(w), !B && I > 0) {
1585
- const i = document.createElement("div"), o = {
1584
+ if (n.appendChild(w), !C && I > 0) {
1585
+ const a = document.createElement("div"), o = {
1586
1586
  info: "wgt:bg-blue-500",
1587
1587
  success: "wgt:bg-green-500",
1588
1588
  warning: "wgt:bg-orange-500",
1589
1589
  error: "wgt:bg-red-500"
1590
1590
  };
1591
- i.className = `wgt:absolute wgt:bottom-0 wgt:left-0 wgt:h-1 wgt:transition-all wgt:duration-300 ${o[t] || o.info}`, i.style.width = "100%", requestAnimationFrame(() => {
1592
- i.style.transition = `width ${I}ms linear`, i.style.width = "0%";
1593
- }), n.appendChild(i);
1591
+ a.className = `wgt:absolute wgt:bottom-0 wgt:left-0 wgt:h-1 wgt:transition-all wgt:duration-300 ${o[t] || o.info}`, a.style.width = "100%", requestAnimationFrame(() => {
1592
+ a.style.transition = `width ${I}ms linear`, a.style.width = "0%";
1593
+ }), n.appendChild(a);
1594
1594
  }
1595
1595
  return n;
1596
1596
  }
1597
1597
  function zg(g) {
1598
- const A = ng.findIndex((B) => B.id === g);
1598
+ const A = ng.findIndex((C) => C.id === g);
1599
1599
  if (A === -1) return;
1600
1600
  const { element: E } = ng[A];
1601
1601
  E.classList.remove("wgt:translate-x-0", "wgt:opacity-100"), E.classList.add("wgt:translate-x-full", "wgt:opacity-0"), setTimeout(() => {
@@ -1616,23 +1616,23 @@ const ig = {
1616
1616
  clear: VC,
1617
1617
  destroy: yQ
1618
1618
  };
1619
- var dg = (g, A, E) => new Promise((B, C) => {
1619
+ var dg = (g, A, E) => new Promise((C, B) => {
1620
1620
  var Q = (n) => {
1621
1621
  try {
1622
1622
  I(E.next(n));
1623
1623
  } catch (c) {
1624
- C(c);
1624
+ B(c);
1625
1625
  }
1626
1626
  }, t = (n) => {
1627
1627
  try {
1628
1628
  I(E.throw(n));
1629
1629
  } catch (c) {
1630
- C(c);
1630
+ B(c);
1631
1631
  }
1632
- }, I = (n) => n.done ? B(n.value) : Promise.resolve(n.value).then(Q, t);
1632
+ }, I = (n) => n.done ? C(n.value) : Promise.resolve(n.value).then(Q, t);
1633
1633
  I((E = E.apply(g, A)).next());
1634
1634
  });
1635
- function Sg(g = "dev") {
1635
+ function pg(g = "dev") {
1636
1636
  const A = {
1637
1637
  dev: {
1638
1638
  baseURL: "https://stag-invoice-hub.atomsolution.vn",
@@ -1662,11 +1662,11 @@ function Sg(g = "dev") {
1662
1662
  };
1663
1663
  return A[g] || A.dev;
1664
1664
  }
1665
- let ZA = null, sB = null, fB = null, WC = null, mB = null;
1665
+ let ZA = null, fB = null, mB = null, WC = null, rB = null;
1666
1666
  function KQ(g) {
1667
1667
  return new Promise((A, E) => {
1668
- const B = document.createElement("script");
1669
- B.src = g, B.onload = A, B.onerror = E, document.head.appendChild(B);
1668
+ const C = document.createElement("script");
1669
+ C.src = g, C.onload = A, C.onerror = E, document.head.appendChild(C);
1670
1670
  });
1671
1671
  }
1672
1672
  function UQ() {
@@ -1674,7 +1674,7 @@ function UQ() {
1674
1674
  try {
1675
1675
  ZA || (yield KQ(
1676
1676
  "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.18.0/dist/ort.min.js"
1677
- ), ZA = window.ort, ZA.env.wasm.simd = !1, ZA.env.wasm.numThreads = 1), sB || (sB = (yield import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.11.0/dist/index.mjs")).scanImageData), mB || (mB = (yield import("https://cdn.jsdelivr.net/npm/zxing-wasm@2.2.2/+esm")).readBarcodesFromImageData);
1677
+ ), ZA = window.ort, ZA.env.wasm.simd = !1, ZA.env.wasm.numThreads = 1), fB || (fB = (yield import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.11.0/dist/index.mjs")).scanImageData), rB || (rB = (yield import("https://cdn.jsdelivr.net/npm/zxing-wasm@2.2.2/+esm")).readBarcodesFromImageData);
1678
1678
  } catch (g) {
1679
1679
  throw new Error(`Failed to initialize required modules: ${g.message}`);
1680
1680
  }
@@ -1687,14 +1687,14 @@ function _C(g, A) {
1687
1687
  throw new Error(
1688
1688
  "ONNX Runtime is not properly loaded. Please check your internet connection and try again."
1689
1689
  );
1690
- const E = A || Sg(g).baseURL, B = `${E}/${Sg(g).modelEndpoint}`, C = `${E}/${Sg(g).modeClassifyEndpoint}`;
1690
+ const E = A || pg(g).baseURL, C = `${E}/${pg(g).modelEndpoint}`, B = `${E}/${pg(g).modeClassifyEndpoint}`;
1691
1691
  if (typeof ZA.InferenceSession.create != "function")
1692
1692
  throw new Error(
1693
1693
  "InferenceSession.create is not available. ONNX Runtime may not be properly initialized."
1694
1694
  );
1695
- return fB = yield ZA.InferenceSession.create(B, {
1695
+ return mB = yield ZA.InferenceSession.create(C, {
1696
1696
  executionProviders: ["wasm"]
1697
- }), WC = yield ZA.InferenceSession.create(C), fB;
1697
+ }), WC = yield ZA.InferenceSession.create(B), mB;
1698
1698
  } catch (E) {
1699
1699
  throw new Error(`Failed to initialize ONNX model: ${E.message}`);
1700
1700
  }
@@ -1704,27 +1704,27 @@ function SQ() {
1704
1704
  return ZA;
1705
1705
  }
1706
1706
  function pQ() {
1707
- return sB;
1707
+ return fB;
1708
1708
  }
1709
1709
  function ZQ() {
1710
- return fB;
1710
+ return mB;
1711
1711
  }
1712
1712
  function VQ() {
1713
1713
  return WC;
1714
1714
  }
1715
1715
  function WQ() {
1716
- return mB;
1716
+ return rB;
1717
1717
  }
1718
1718
  function _Q(g, A = 640) {
1719
1719
  const E = document.createElement("canvas");
1720
1720
  E.width = A, E.height = A;
1721
- const B = E.getContext("2d");
1722
- B.fillStyle = "rgb(114, 114, 114)", B.fillRect(0, 0, A, A);
1723
- const C = Math.min(A / g.width, A / g.height), Q = Math.round(g.width * C), t = Math.round(g.height * C), I = Math.floor((A - Q) / 2), n = Math.floor((A - t) / 2);
1724
- return B.imageSmoothingEnabled = !1, B.drawImage(g, I, n, Q, t), B.getImageData(0, 0, A, A);
1721
+ const C = E.getContext("2d");
1722
+ C.fillStyle = "rgb(114, 114, 114)", C.fillRect(0, 0, A, A);
1723
+ const B = Math.min(A / g.width, A / g.height), Q = Math.round(g.width * B), t = Math.round(g.height * B), I = Math.floor((A - Q) / 2), n = Math.floor((A - t) / 2);
1724
+ return C.imageSmoothingEnabled = !1, C.drawImage(g, I, n, Q, t), C.getImageData(0, 0, A, A);
1725
1725
  }
1726
1726
  function $Q(g, A, E) {
1727
- const [B, C] = A, [Q, t] = E, I = Math.min(t / C, Q / B), n = (t - C * I) / 2, c = (Q - B * I) / 2, w = JSON.parse(JSON.stringify(g));
1727
+ const [C, B] = A, [Q, t] = E, I = Math.min(t / B, Q / C), n = (t - B * I) / 2, c = (Q - C * I) / 2, w = JSON.parse(JSON.stringify(g));
1728
1728
  if (Array.isArray(g[0]))
1729
1729
  for (let s = 0; s < g.length; s++)
1730
1730
  w[s][0] = (g[s][0] - n) / I, w[s][1] = (g[s][1] - c) / I;
@@ -1735,24 +1735,24 @@ function $Q(g, A, E) {
1735
1735
  return w;
1736
1736
  }
1737
1737
  function $C(g, A = 640) {
1738
- const E = _Q(g, A).data, B = new Float32Array(A * A * 3);
1738
+ const E = _Q(g, A).data, C = new Float32Array(A * A * 3);
1739
1739
  for (let t = 0, I = 0; t < E.length; t += 4, I += 3)
1740
- B[I] = E[t] / 255, B[I + 1] = E[t + 1] / 255, B[I + 2] = E[t + 2] / 255;
1741
- const C = new Float32Array(3 * A * A);
1740
+ C[I] = E[t] / 255, C[I + 1] = E[t + 1] / 255, C[I + 2] = E[t + 2] / 255;
1741
+ const B = new Float32Array(3 * A * A);
1742
1742
  for (let t = 0; t < A; t++)
1743
1743
  for (let I = 0; I < A; I++) {
1744
1744
  const n = t * A + I;
1745
- C[n] = B[n * 3], C[n + A * A] = B[n * 3 + 1], C[n + 2 * A * A] = B[n * 3 + 2];
1745
+ B[n] = C[n * 3], B[n + A * A] = C[n * 3 + 1], B[n + 2 * A * A] = C[n * 3 + 2];
1746
1746
  }
1747
1747
  let Q = SQ();
1748
- return new Q.Tensor("float32", C, [1, 3, A, A]);
1748
+ return new Q.Tensor("float32", B, [1, 3, A, A]);
1749
1749
  }
1750
1750
  function AE(g, A, E = 200) {
1751
- const B = document.createElement("canvas"), C = B.getContext("2d");
1751
+ const C = document.createElement("canvas"), B = C.getContext("2d");
1752
1752
  if (g instanceof ImageData)
1753
- B.width = g.width, B.height = g.height, C.putImageData(g, 0, 0);
1753
+ C.width = g.width, C.height = g.height, B.putImageData(g, 0, 0);
1754
1754
  else if (g instanceof HTMLCanvasElement)
1755
- B.width = g.width, B.height = g.height, C.drawImage(g, 0, 0);
1755
+ C.width = g.width, C.height = g.height, B.drawImage(g, 0, 0);
1756
1756
  else
1757
1757
  throw new Error("Input must be ImageData or HTMLCanvasElement");
1758
1758
  const Q = document.createElement("canvas");
@@ -1761,11 +1761,11 @@ function AE(g, A, E = 200) {
1761
1761
  if (Array.isArray(A[0]) && A.length === 4) {
1762
1762
  A.flat();
1763
1763
  const o = gE();
1764
- t.setTransform(...o), t.drawImage(B, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
1764
+ t.setTransform(...o), t.drawImage(C, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
1765
1765
  } else if (A.length === 4) {
1766
- const [o, D, u, R] = A, T = u - o, d = R - D, r = T * 0.05, m = d * 0.05, Y = Math.max(0, o - r), l = Math.max(0, D - m), P = Math.min(B.width, u + r), f = Math.min(B.height, R + m), M = P - Y, k = f - l;
1766
+ const [o, D, u, R] = A, T = u - o, d = R - D, r = T * 0.05, m = d * 0.05, Y = Math.max(0, o - r), l = Math.max(0, D - m), P = Math.min(C.width, u + r), f = Math.min(C.height, R + m), M = P - Y, k = f - l;
1767
1767
  t.drawImage(
1768
- B,
1768
+ C,
1769
1769
  Y,
1770
1770
  l,
1771
1771
  M,
@@ -1787,8 +1787,8 @@ function AE(g, A, E = 200) {
1787
1787
  const D = c[o], u = c[o + 1], R = c[o + 2], T = 0.2989 * D + 0.587 * u + 0.114 * R;
1788
1788
  w[o] = w[o + 1] = w[o + 2] = T, w[o + 3] = 255;
1789
1789
  }
1790
- const s = new ImageData(E, E), i = BE(w, E, E, 10);
1791
- return s.data.set(i), {
1790
+ const s = new ImageData(E, E), a = BE(w, E, E, 10);
1791
+ return s.data.set(a), {
1792
1792
  original: I,
1793
1793
  grayscale: n,
1794
1794
  threshold: s
@@ -1797,20 +1797,20 @@ function AE(g, A, E = 200) {
1797
1797
  function gE(g, A) {
1798
1798
  return [1, 0, 0, 0, 1, 0];
1799
1799
  }
1800
- function BE(g, A, E, B) {
1801
- const C = new Uint8ClampedArray(g.length), Q = new Uint32Array(A * E);
1800
+ function BE(g, A, E, C) {
1801
+ const B = new Uint8ClampedArray(g.length), Q = new Uint32Array(A * E);
1802
1802
  for (let I = 0; I < E; I++)
1803
1803
  for (let n = 0; n < A; n++) {
1804
1804
  const c = (I * A + n) * 4, w = g[c], s = I * A + n;
1805
1805
  Q[s] = w + (n > 0 ? Q[s - 1] : 0) + (I > 0 ? Q[s - A] : 0) - (n > 0 && I > 0 ? Q[s - A - 1] : 0);
1806
1806
  }
1807
- const t = Math.floor(B / 2);
1807
+ const t = Math.floor(C / 2);
1808
1808
  for (let I = 0; I < E; I++)
1809
1809
  for (let n = 0; n < A; n++) {
1810
- const c = (I * A + n) * 4, w = Math.max(n - t, 0), s = Math.max(I - t, 0), i = Math.min(n + t, A - 1), o = Math.min(I + t, E - 1), D = (i - w + 1) * (o - s + 1), u = (Q[o * A + i] - (w > 0 ? Q[o * A + w - 1] : 0) - (s > 0 ? Q[(s - 1) * A + i] : 0) + (w > 0 && s > 0 ? Q[(s - 1) * A + w - 1] : 0)) / D * 0.9, R = g[c] > u ? 255 : 0;
1811
- C[c] = C[c + 1] = C[c + 2] = R, C[c + 3] = 255;
1810
+ const c = (I * A + n) * 4, w = Math.max(n - t, 0), s = Math.max(I - t, 0), a = Math.min(n + t, A - 1), o = Math.min(I + t, E - 1), D = (a - w + 1) * (o - s + 1), u = (Q[o * A + a] - (w > 0 ? Q[o * A + w - 1] : 0) - (s > 0 ? Q[(s - 1) * A + a] : 0) + (w > 0 && s > 0 ? Q[(s - 1) * A + w - 1] : 0)) / D * 0.9, R = g[c] > u ? 255 : 0;
1811
+ B[c] = B[c + 1] = B[c + 2] = R, B[c + 3] = 255;
1812
1812
  }
1813
- return C;
1813
+ return B;
1814
1814
  }
1815
1815
  function CE(g) {
1816
1816
  return dg(this, null, function* () {
@@ -1819,7 +1819,7 @@ function CE(g) {
1819
1819
  A || (yield _C());
1820
1820
  const E = document.createElement("canvas");
1821
1821
  E.width = g.width, E.height = g.height, E.getContext("2d").drawImage(g, 0, 0);
1822
- const B = $C(g, 224), C = yield A.run({ images: B }), Q = C[Object.keys(C)[0]].data;
1822
+ const C = $C(g, 224), B = yield A.run({ images: C }), Q = B[Object.keys(B)[0]].data;
1823
1823
  let t = 0, I = -1 / 0;
1824
1824
  return Q.forEach((n, c) => {
1825
1825
  n > I && (I = n, t = c);
@@ -1842,12 +1842,12 @@ function CE(g) {
1842
1842
  function QE(g, A, E) {
1843
1843
  return [];
1844
1844
  }
1845
- function EE(g, A, E, B, C = 0.5) {
1845
+ function EE(g, A, E, C, B = 0.5) {
1846
1846
  const Q = [], t = g.dims[1];
1847
1847
  for (let I = 0; I < t; I++) {
1848
1848
  const n = g.data[I * 37 + 4];
1849
- if (n < C) continue;
1850
- const c = g.data[I * 37], w = g.data[I * 37 + 1], s = g.data[I * 37 + 2], i = g.data[I * 37 + 3], o = 1, D = 1, u = [c, w, s, i], R = g.data.slice(I * 37 + 5, I * 37 + 37), T = new Float32Array(25600);
1849
+ if (n < B) continue;
1850
+ const c = g.data[I * 37], w = g.data[I * 37 + 1], s = g.data[I * 37 + 2], a = g.data[I * 37 + 3], o = 1, D = 1, u = [c, w, s, a], R = g.data.slice(I * 37 + 5, I * 37 + 37), T = new Float32Array(25600);
1851
1851
  for (let v = 0; v < 160; v++)
1852
1852
  for (let F = 0; F < 160; F++) {
1853
1853
  let U = 0;
@@ -1873,7 +1873,7 @@ function EE(g, A, E, B, C = 0.5) {
1873
1873
  polygon_xy: r.map((v) => [v[0] * o, v[1] * D]),
1874
1874
  quad_xy: m,
1875
1875
  padded_quad_xy: J,
1876
- image_shape: [B, E]
1876
+ image_shape: [C, E]
1877
1877
  });
1878
1878
  }
1879
1879
  return Q;
@@ -1894,13 +1894,13 @@ function nE(g) {
1894
1894
  return dg(this, null, function* () {
1895
1895
  let A = null;
1896
1896
  const E = ["original", "grayscale", "threshold"];
1897
- for (const B of E) {
1898
- if (A = yield pQ()(g[B]), A && A.length > 0)
1897
+ for (const C of E) {
1898
+ if (A = yield pQ()(g[C]), A && A.length > 0)
1899
1899
  return A[0].decode();
1900
1900
  {
1901
- const C = yield tE(g[B]);
1902
- if (C)
1903
- return C;
1901
+ const B = yield tE(g[C]);
1902
+ if (B)
1903
+ return B;
1904
1904
  }
1905
1905
  }
1906
1906
  return null;
@@ -1928,20 +1928,20 @@ function hE(g, A = "sourceCanvas") {
1928
1928
  try {
1929
1929
  let E = ZQ();
1930
1930
  E || (yield initModel());
1931
- const B = document.createElement("canvas");
1932
- B.width = g.width, B.height = g.height, B.getContext("2d").drawImage(g, 0, 0);
1933
- const C = $C(g), Q = yield E.run({ [E.inputNames[0]]: C }), t = Q[Object.keys(Q)[0]], I = Q[Object.keys(Q)[1]], n = EE(
1931
+ const C = document.createElement("canvas");
1932
+ C.width = g.width, C.height = g.height, C.getContext("2d").drawImage(g, 0, 0);
1933
+ const B = $C(g), Q = yield E.run({ [E.inputNames[0]]: B }), t = Q[Object.keys(Q)[0]], I = Q[Object.keys(Q)[1]], n = EE(
1934
1934
  t,
1935
1935
  I,
1936
1936
  g.width,
1937
1937
  g.height
1938
1938
  );
1939
1939
  for (const c of n) {
1940
- const { _: w, bbox_xyxy: s } = c, i = $Q(
1940
+ const { _: w, bbox_xyxy: s } = c, a = $Q(
1941
1941
  s,
1942
1942
  [g.height, g.width],
1943
1943
  [640, 640]
1944
- ), o = AE(B, i), D = yield nE(o);
1944
+ ), o = AE(C, a), D = yield nE(o);
1945
1945
  if (D)
1946
1946
  return JSON.stringify({
1947
1947
  status: "success",
@@ -1962,18 +1962,18 @@ function hE(g, A = "sourceCanvas") {
1962
1962
  }
1963
1963
  function cE(g, A) {
1964
1964
  let E;
1965
- return function(...B) {
1966
- clearTimeout(E), E = setTimeout(() => g.apply(this, B), A);
1965
+ return function(...C) {
1966
+ clearTimeout(E), E = setTimeout(() => g.apply(this, C), A);
1967
1967
  };
1968
1968
  }
1969
- function wE(i) {
1969
+ function wE(a) {
1970
1970
  return W(this, arguments, function* ({
1971
1971
  onSubmit: g,
1972
1972
  registrationData: A,
1973
1973
  theme: E = "ocb",
1974
- onShowPolicy: B = () => {
1974
+ onShowPolicy: C = () => {
1975
1975
  },
1976
- selectedTaxAuthority: C,
1976
+ selectedTaxAuthority: B,
1977
1977
  setSelectedTaxAuthority: Q,
1978
1978
  dobPicker: t,
1979
1979
  setDobPicker: I,
@@ -1982,7 +1982,7 @@ function wE(i) {
1982
1982
  updateRegistrationData: w,
1983
1983
  serial: s
1984
1984
  }) {
1985
- var MA, aA, cA, wA, eA, rA, sA, TA, SA, Mg, TB, lB, dB, xB, HB, kB, RB, YB, JB, XB, FB, OB, GB, LB, zB, NB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC, EC;
1985
+ var MA, aA, cA, wA, eA, rA, sA, TA, SA, Mg, lB, dB, xB, HB, kB, RB, YB, JB, XB, FB, OB, GB, LB, zB, NB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC, EC, IC;
1986
1986
  const o = document.createElement("div");
1987
1987
  o.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
1988
1988
  const D = document.createElement("form");
@@ -1995,14 +1995,14 @@ function wE(i) {
1995
1995
  const b = document.createElement("button");
1996
1996
  u = kA({
1997
1997
  name: "taxCode",
1998
- label: a("taxCode"),
1998
+ label: i("taxCode"),
1999
1999
  required: !0,
2000
2000
  placeholder: "",
2001
2001
  type: "text",
2002
2002
  value: ((aA = (MA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : MA.organization) == null ? void 0 : aA.taxCode) || "",
2003
2003
  readOnly: !1,
2004
2004
  error: null,
2005
- note: a(
2005
+ note: i(
2006
2006
  "taxNote",
2007
2007
  "Với khách hàng là hộ kinh doanh, hiển thị theo số CCCD"
2008
2008
  ),
@@ -2026,12 +2026,12 @@ function wE(i) {
2026
2026
  console.error($);
2027
2027
  }
2028
2028
  else
2029
- u.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
2029
+ u.setError(i("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
2030
2030
  }), 1e3),
2031
2031
  horizontal: !0
2032
2032
  }), R = kA({
2033
2033
  name: "companyName",
2034
- label: a("companyName"),
2034
+ label: i("companyName"),
2035
2035
  required: !0,
2036
2036
  error: null,
2037
2037
  placeholder: "",
@@ -2041,7 +2041,7 @@ function wE(i) {
2041
2041
  horizontal: !0
2042
2042
  }), T = kA({
2043
2043
  name: "companyAddressDetail",
2044
- label: a("address"),
2044
+ label: i("address"),
2045
2045
  required: !0,
2046
2046
  error: null,
2047
2047
  placeholder: "",
@@ -2057,7 +2057,7 @@ function wE(i) {
2057
2057
  }));
2058
2058
  if (d = Ug({
2059
2059
  name: "companyTaxManagement",
2060
- label: a("taxAuthority"),
2060
+ label: i("taxAuthority"),
2061
2061
  value: ((TA = (sA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : sA.organization) == null ? void 0 : TA.taxAuthority) || "",
2062
2062
  options: y,
2063
2063
  required: !0,
@@ -2067,9 +2067,9 @@ function wE(i) {
2067
2067
  onChange: (z) => {
2068
2068
  z.target.id && Q(z.target.id), X();
2069
2069
  }
2070
- }), C) {
2070
+ }), B) {
2071
2071
  const z = y.find(
2072
- (G) => G.id === C
2072
+ (G) => G.id === B
2073
2073
  );
2074
2074
  z && d.setValue && d.setValue(
2075
2075
  z.value,
@@ -2077,8 +2077,8 @@ function wE(i) {
2077
2077
  z.id
2078
2078
  );
2079
2079
  }
2080
- q = cC({
2081
- label: a("uploadLogo", "Tải logo lên"),
2080
+ q = wC({
2081
+ label: i("uploadLogo", "Tải logo lên"),
2082
2082
  required: !1,
2083
2083
  file: (A == null ? void 0 : A.logo) || null,
2084
2084
  onFileChange: (z) => {
@@ -2087,7 +2087,7 @@ function wE(i) {
2087
2087
  error: null
2088
2088
  }), P = kA({
2089
2089
  name: "repName",
2090
- label: a("fullName"),
2090
+ label: i("fullName"),
2091
2091
  required: !0,
2092
2092
  error: null,
2093
2093
  placeholder: "",
@@ -2096,20 +2096,20 @@ function wE(i) {
2096
2096
  onInput: (z) => {
2097
2097
  const G = z.target.value;
2098
2098
  if (G.trim() === "") {
2099
- P.setError(a("errorRequired"));
2099
+ P.setError(i("errorRequired"));
2100
2100
  return;
2101
2101
  }
2102
- Fg(G) ? P.setError(null) : P.setError(a("errorInvalidName"));
2102
+ Fg(G) ? P.setError(null) : P.setError(i("errorInvalidName"));
2103
2103
  }
2104
2104
  }), f = kA({
2105
2105
  name: "repDob",
2106
- label: a("dateOfBirth"),
2106
+ label: i("dateOfBirth"),
2107
2107
  required: !0,
2108
2108
  error: null,
2109
2109
  placeholder: "DD/MM/YYYY",
2110
2110
  type: "text",
2111
2111
  readOnly: !0,
2112
- value: ((lB = (TB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : TB.legalRepresentative) == null ? void 0 : lB.dob) || ""
2112
+ value: ((dB = (lB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : lB.legalRepresentative) == null ? void 0 : dB.dob) || ""
2113
2113
  });
2114
2114
  let AA = new LQ({
2115
2115
  field: f.inputEl,
@@ -2122,7 +2122,7 @@ function wE(i) {
2122
2122
  f.setError(null), X();
2123
2123
  },
2124
2124
  onClose: () => {
2125
- f.inputEl.value ? f.setError(null) : f.setError(a("errorRequired")), X();
2125
+ f.inputEl.value ? f.setError(null) : f.setError(i("errorRequired")), X();
2126
2126
  },
2127
2127
  maxDate: /* @__PURE__ */ new Date(),
2128
2128
  showMonthDropdown: !0,
@@ -2131,13 +2131,13 @@ function wE(i) {
2131
2131
  });
2132
2132
  I(AA), M = Ug({
2133
2133
  name: "repGender",
2134
- label: a("gender"),
2134
+ label: i("gender"),
2135
2135
  options: oC.map((z) => ({
2136
2136
  value: z.value,
2137
- label: a(z.value)
2137
+ label: i(z.value)
2138
2138
  })),
2139
2139
  required: !0,
2140
- value: ((xB = (dB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : dB.legalRepresentative) == null ? void 0 : xB.gender) || "",
2140
+ value: ((HB = (xB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : xB.legalRepresentative) == null ? void 0 : HB.gender) || "",
2141
2141
  disabled: !1,
2142
2142
  error: null,
2143
2143
  onChange: (z) => {
@@ -2145,55 +2145,55 @@ function wE(i) {
2145
2145
  }
2146
2146
  }), H = kA({
2147
2147
  name: "repIdCardField",
2148
- label: a("idNumber"),
2148
+ label: i("idNumber"),
2149
2149
  required: !0,
2150
2150
  error: null,
2151
- placeholder: a("enterIdCard", "Nhập số CMND/CCCD"),
2151
+ placeholder: i("enterIdCard", "Nhập số CMND/CCCD"),
2152
2152
  type: "text",
2153
- value: ((kB = (HB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : HB.legalRepresentative) == null ? void 0 : kB.idCard) || "",
2153
+ value: ((RB = (kB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : kB.legalRepresentative) == null ? void 0 : RB.idCard) || "",
2154
2154
  onInput: (z) => {
2155
2155
  let G = z.target.value;
2156
2156
  const $ = G.replace(/[^0-9]/g, "");
2157
2157
  if ($ !== G && (z.target.value = $, G = $), G.trim() === "") {
2158
- H.setError(a("errorRequired"));
2158
+ H.setError(i("errorRequired"));
2159
2159
  return;
2160
2160
  }
2161
2161
  /^\d{12}$/.test(G) ? H.setError(null) : H.setError(
2162
- a("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2162
+ i("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2163
2163
  );
2164
2164
  }
2165
2165
  }), J = kA({
2166
2166
  name: "repPassportNumberField",
2167
- label: a("passport", "Hộ chiếu"),
2167
+ label: i("passport", "Hộ chiếu"),
2168
2168
  required: !1,
2169
2169
  error: null,
2170
- placeholder: a("enterPassport", "Nhập số hộ chiếu"),
2170
+ placeholder: i("enterPassport", "Nhập số hộ chiếu"),
2171
2171
  type: "text",
2172
- value: ((YB = (RB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : RB.legalRepresentative) == null ? void 0 : YB.passportNumber) || ""
2172
+ value: ((JB = (YB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : YB.legalRepresentative) == null ? void 0 : JB.passportNumber) || ""
2173
2173
  }), k = kA({
2174
2174
  name: "repPhone",
2175
- label: a("phone"),
2175
+ label: i("phone"),
2176
2176
  required: !0,
2177
2177
  error: null,
2178
2178
  placeholder: "",
2179
2179
  type: "text",
2180
- value: ((XB = (JB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : JB.legalRepresentative) == null ? void 0 : XB.phone) || "",
2180
+ value: ((FB = (XB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : XB.legalRepresentative) == null ? void 0 : FB.phone) || "",
2181
2181
  onInput: (z) => {
2182
2182
  let G = z.target.value;
2183
2183
  const $ = G.replace(/[^\d+().\-\s]/g, ""), IA = $.replace(/[\s.\-()]/g, "");
2184
2184
  if ($ !== G && (z.target.value = $, G = $), IA.trim() === "") {
2185
- k.setError(a("errorRequired", "Số điện thoại bắt buộc"));
2185
+ k.setError(i("errorRequired", "Số điện thoại bắt buộc"));
2186
2186
  return;
2187
2187
  }
2188
2188
  /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(IA) ? k.setError(null) : k.setError(
2189
- a("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2189
+ i("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2190
2190
  );
2191
2191
  }
2192
2192
  }), v = Ug({
2193
2193
  name: "repNationality",
2194
- label: a("country"),
2194
+ label: i("country"),
2195
2195
  options: XQ,
2196
- value: ((OB = (FB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : FB.legalRepresentative) == null ? void 0 : OB.nationality) || "",
2196
+ value: ((GB = (OB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : OB.legalRepresentative) == null ? void 0 : GB.nationality) || "",
2197
2197
  disabled: !1,
2198
2198
  error: null,
2199
2199
  onChange: (z) => {
@@ -2201,27 +2201,27 @@ function wE(i) {
2201
2201
  }
2202
2202
  }), F = kA({
2203
2203
  name: "contactAddressDetail",
2204
- label: a("permanentAddress"),
2204
+ label: i("permanentAddress"),
2205
2205
  required: !0,
2206
2206
  error: null,
2207
2207
  placeholder: "",
2208
2208
  type: "text",
2209
- value: ((LB = (GB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : GB.legalRepresentative) == null ? void 0 : LB.permanentAddress) || "",
2209
+ value: ((zB = (LB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : LB.legalRepresentative) == null ? void 0 : zB.permanentAddress) || "",
2210
2210
  readOnly: !1,
2211
2211
  onInput: (z) => {
2212
2212
  const G = z.target.value;
2213
2213
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2214
2214
  F.setError(
2215
- a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2215
+ i("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2216
2216
  );
2217
2217
  return;
2218
2218
  }
2219
2219
  G.trim() === "" ? F.setError(
2220
- a("errorRequired", "Địa chỉ thường trú bắt buộc")
2220
+ i("errorRequired", "Địa chỉ thường trú bắt buộc")
2221
2221
  ) : F.setError(null);
2222
2222
  }
2223
- }), x = cC({
2224
- label: a("businessLicense", "Giấy phép đăng ký kinh doanh"),
2223
+ }), x = wC({
2224
+ label: i("businessLicense", "Giấy phép đăng ký kinh doanh"),
2225
2225
  required: !0,
2226
2226
  file: (A == null ? void 0 : A.license) || null,
2227
2227
  onFileChange: (z) => {
@@ -2231,104 +2231,104 @@ function wE(i) {
2231
2231
  accept: "image/png, image/jpeg, image/jpg, .pdf"
2232
2232
  }), r = kA({
2233
2233
  name: "name",
2234
- label: a("fullName"),
2234
+ label: i("fullName"),
2235
2235
  required: !0,
2236
2236
  error: null,
2237
2237
  placeholder: "",
2238
2238
  type: "text",
2239
- value: ((NB = (zB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : zB.contactPerson) == null ? void 0 : NB.name) || "",
2239
+ value: ((bB = (NB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : NB.contactPerson) == null ? void 0 : bB.name) || "",
2240
2240
  onInput: (z) => {
2241
2241
  const G = z.target.value;
2242
2242
  if (G.trim() === "") {
2243
- r.setError(a("errorRequired", "Họ và tên bắt buộc"));
2243
+ r.setError(i("errorRequired", "Họ và tên bắt buộc"));
2244
2244
  return;
2245
2245
  }
2246
2246
  Fg(G) ? r.setError(null) : r.setError(
2247
- a("errorInvalidName", "Họ và tên không hợp lệ.")
2247
+ i("errorInvalidName", "Họ và tên không hợp lệ.")
2248
2248
  );
2249
2249
  }
2250
2250
  }), m = kA({
2251
2251
  name: "email",
2252
- label: a("email"),
2252
+ label: i("email"),
2253
2253
  required: !0,
2254
2254
  error: null,
2255
2255
  placeholder: "",
2256
2256
  type: "email",
2257
- value: ((jB = (bB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : bB.contactPerson) == null ? void 0 : jB.email) || "",
2257
+ value: ((yB = (jB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : jB.contactPerson) == null ? void 0 : yB.email) || "",
2258
2258
  onInput: (z) => {
2259
2259
  let G = z.target.value;
2260
2260
  if (G.trim() === "") {
2261
- m.setError(a("errorRequired", "Email bắt buộc"));
2261
+ m.setError(i("errorRequired", "Email bắt buộc"));
2262
2262
  return;
2263
2263
  }
2264
2264
  if (/[^\x00-\x7F]/.test(G) || /\s/.test(G)) {
2265
2265
  m.setError(
2266
- a("errorInvalidEmail", "Email không hợp lệ.")
2266
+ i("errorInvalidEmail", "Email không hợp lệ.")
2267
2267
  );
2268
2268
  return;
2269
2269
  }
2270
2270
  const $ = new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$");
2271
2271
  if (G.length > 254) {
2272
2272
  m.setError(
2273
- a("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
2273
+ i("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
2274
2274
  );
2275
2275
  return;
2276
2276
  }
2277
2277
  $.test(G) ? m.setError(null) : m.setError(
2278
- a("errorInvalidEmail", "Email không hợp lệ")
2278
+ i("errorInvalidEmail", "Email không hợp lệ")
2279
2279
  );
2280
2280
  }
2281
2281
  }), Y = kA({
2282
2282
  name: "phone",
2283
- label: a("phone"),
2283
+ label: i("phone"),
2284
2284
  required: !0,
2285
2285
  error: null,
2286
2286
  placeholder: "",
2287
2287
  type: "text",
2288
- value: ((KB = (yB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : yB.contactPerson) == null ? void 0 : KB.phone) || "",
2288
+ value: ((UB = (KB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : KB.contactPerson) == null ? void 0 : UB.phone) || "",
2289
2289
  onInput: (z) => {
2290
2290
  let G = z.target.value;
2291
2291
  const $ = G.replace(/[^\d+().\-\s]/g, ""), IA = $.replace(/[\s.\-()]/g, "");
2292
2292
  if ($ !== G && (z.target.value = $, G = $), IA.trim() === "") {
2293
2293
  Y.setError(
2294
- a("errorRequired", "Số điện thoại bắt buộc")
2294
+ i("errorRequired", "Số điện thoại bắt buộc")
2295
2295
  );
2296
2296
  return;
2297
2297
  }
2298
2298
  /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(IA) ? Y.setError(null) : Y.setError(
2299
- a("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
2299
+ i("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
2300
2300
  );
2301
2301
  }
2302
2302
  }), l = kA({
2303
2303
  name: "contactAddressDetail",
2304
- label: a("permanentAddress"),
2304
+ label: i("permanentAddress"),
2305
2305
  required: !0,
2306
2306
  error: null,
2307
2307
  placeholder: "",
2308
2308
  type: "text",
2309
- value: ((SB = (UB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : UB.contactPerson) == null ? void 0 : SB.address) || "",
2309
+ value: ((pB = (SB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : SB.contactPerson) == null ? void 0 : pB.address) || "",
2310
2310
  readOnly: !1,
2311
2311
  onInput: (z) => {
2312
2312
  const G = z.target.value;
2313
2313
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2314
2314
  l.setError(
2315
- a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2315
+ i("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2316
2316
  );
2317
2317
  return;
2318
2318
  }
2319
2319
  G.trim() === "" ? l.setError(
2320
- a("errorRequired", "Địa chỉ liên hệ bắt buộc")
2320
+ i("errorRequired", "Địa chỉ liên hệ bắt buộc")
2321
2321
  ) : l.setError(null);
2322
2322
  }
2323
2323
  });
2324
2324
  const S = kA({
2325
2325
  name: "invoiceSymbol",
2326
- label: a("invoiceSymbol", "Ký hiệu hóa đơn"),
2326
+ label: i("invoiceSymbol", "Ký hiệu hóa đơn"),
2327
2327
  required: !0,
2328
2328
  error: null,
2329
- placeholder: a("enterInvoiceSymbol", "Nhập ký hiệu hóa đơn"),
2329
+ placeholder: i("enterInvoiceSymbol", "Nhập ký hiệu hóa đơn"),
2330
2330
  type: "text",
2331
- value: ((pB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : pB.invoiceSymbol) || "",
2331
+ value: ((ZB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : ZB.invoiceSymbol) || "",
2332
2332
  readOnly: !0,
2333
2333
  onInput: (z) => {
2334
2334
  }
@@ -2336,33 +2336,33 @@ function wE(i) {
2336
2336
  U = RQ({
2337
2337
  // initialValue:
2338
2338
  // registrationData?.eInvoiceRegistration?.invoiceSymbol || "1C25TYY",
2339
- initialValue: s || ((ZB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : ZB.invoiceSymbol) || "1C25TYY",
2339
+ initialValue: s || ((VB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : VB.invoiceSymbol) || "1C25TYY",
2340
2340
  onChange: (z) => {
2341
2341
  S.inputEl.value = z, X();
2342
2342
  }
2343
- }), j = document.createElement("input"), j.type = "checkbox", j.name = "hasUsedEInvoiceCB", j.className = "wgt:cursor-pointer", j.checked = (VB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : VB.hasUsedEInvoice, j.addEventListener("change", (z) => {
2343
+ }), j = document.createElement("input"), j.type = "checkbox", j.name = "hasUsedEInvoiceCB", j.className = "wgt:cursor-pointer", j.checked = (WB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : WB.hasUsedEInvoice, j.addEventListener("change", (z) => {
2344
2344
  z.target.checked ? (Z.appendChild(gA), Z.appendChild(p)) : (O.checked = !1, h.inputEl.value = "", h.setError(null), e && (e.inputEl.value = "", e.setError(null), p.contains(e.container) && p.removeChild(e.container)), Z.removeChild(gA), Z.removeChild(p));
2345
- }), O = document.createElement("input"), O.type = "checkbox", O.name = "hasUsedEInvoiceBeforeCB", O.className = "wgt:cursor-pointer", O.checked = (WB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : WB.isUsedEInvoiceBefore, O.addEventListener("change", (z) => {
2345
+ }), O = document.createElement("input"), O.type = "checkbox", O.name = "hasUsedEInvoiceBeforeCB", O.className = "wgt:cursor-pointer", O.checked = (_B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : _B.isUsedEInvoiceBefore, O.addEventListener("change", (z) => {
2346
2346
  z.target.checked ? p.appendChild(e.container) : (e.inputEl.value = "", e.setError(null), p.contains(e.container) && p.removeChild(e.container));
2347
2347
  }), e = kA({
2348
2348
  name: "previousOtherProviderNameField",
2349
- label: a("providerName", "Tên NCC"),
2349
+ label: i("providerName", "Tên NCC"),
2350
2350
  required: !0,
2351
2351
  error: null,
2352
- placeholder: a("enterProviderName", "Nhập tên nhà cung cấp"),
2352
+ placeholder: i("enterProviderName", "Nhập tên nhà cung cấp"),
2353
2353
  type: "text",
2354
- value: ((_B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : _B.previousEInvoiceProvider) || "",
2354
+ value: (($B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $B.previousEInvoiceProvider) || "",
2355
2355
  readOnly: !1,
2356
2356
  onInput: (z) => {
2357
2357
  const G = z.target.value;
2358
2358
  if (G.trim() === "") {
2359
2359
  e.setError(
2360
- a("errorRequired", "Tên nhà cung cấp bắt buộc")
2360
+ i("errorRequired", "Tên nhà cung cấp bắt buộc")
2361
2361
  );
2362
2362
  return;
2363
2363
  }
2364
2364
  /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(G) ? e.setError(null) : e.setError(
2365
- a(
2365
+ i(
2366
2366
  "errorInvalidProviderName",
2367
2367
  "Tên nhà cung cấp không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
2368
2368
  )
@@ -2370,23 +2370,23 @@ function wE(i) {
2370
2370
  }
2371
2371
  }), h = kA({
2372
2372
  name: "previousIssuedByTaxCodeField",
2373
- label: a("taxAuthorityCode", "Mã CQT đã phát hành hóa đơn"),
2373
+ label: i("taxAuthorityCode", "Mã CQT đã phát hành hóa đơn"),
2374
2374
  required: !0,
2375
2375
  error: null,
2376
- placeholder: a("enterTaxAuthorityCode", "Nhập mã CQT cấp"),
2376
+ placeholder: i("enterTaxAuthorityCode", "Nhập mã CQT cấp"),
2377
2377
  type: "text",
2378
- value: (($B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $B.taxAuthorityCode) || "",
2378
+ value: ((AC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : AC.taxAuthorityCode) || "",
2379
2379
  readOnly: !1,
2380
2380
  onInput: (z) => {
2381
2381
  const G = z.target.value;
2382
2382
  if (G.trim() === "") {
2383
2383
  h.setError(
2384
- a("errorRequired", "Mã CQT bắt buộc")
2384
+ i("errorRequired", "Mã CQT bắt buộc")
2385
2385
  );
2386
2386
  return;
2387
2387
  }
2388
2388
  /^[A-Za-z0-9_]+$/.test(G) ? h.setError(null) : h.setError(
2389
- a(
2389
+ i(
2390
2390
  "errorInvalidTaxAuthorityCode",
2391
2391
  "Mã CQT không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
2392
2392
  )
@@ -2409,7 +2409,7 @@ function wE(i) {
2409
2409
  if (G !== EA)
2410
2410
  return;
2411
2411
  if ($.error)
2412
- return R.inputEl.value = "", T.inputEl.value = "", d.setValue && d.setValue("", "", ""), d.setDisabled(!1), u.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), IA;
2412
+ return R.inputEl.value = "", T.inputEl.value = "", d.setValue && d.setValue("", "", ""), d.setDisabled(!1), u.setError(i("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), IA;
2413
2413
  if (u.setError(null), R.inputEl.value = $.ten_cty || "", T.inputEl.value = $.dia_chi || "", $.cqthue_ql) {
2414
2414
  const lA = (OA) => OA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), oA = lA($.cqthue_ql), HA = y.find((OA) => {
2415
2415
  const wg = lA(OA.label);
@@ -2425,14 +2425,14 @@ function wE(i) {
2425
2425
  return IA.name = $.ten_cty || "", IA.address = $.dia_chi || "", IA.taxCode = z, u.setError(null), IA;
2426
2426
  } catch ($) {
2427
2427
  G === EA && (ig.error(
2428
- a("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
2428
+ i("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
2429
2429
  {
2430
2430
  autoClose: 5e3,
2431
2431
  closeButton: !0,
2432
2432
  icon: !0
2433
2433
  }
2434
2434
  ), u.setError(
2435
- a("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2435
+ i("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2436
2436
  ));
2437
2437
  } finally {
2438
2438
  G === EA && X();
@@ -2442,7 +2442,7 @@ function wE(i) {
2442
2442
  const uA = document.createElement("div");
2443
2443
  uA.className = "wgt:space-y-3";
2444
2444
  const LA = document.createElement("h3");
2445
- LA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", LA.innerText = a("unitInfo", "1. Thông tin đơn vị"), uA.appendChild(LA);
2445
+ LA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", LA.innerText = i("unitInfo", "1. Thông tin đơn vị"), uA.appendChild(LA);
2446
2446
  const xA = document.createElement("div");
2447
2447
  xA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(xA), xA.appendChild(u.container), xA.appendChild(R.container), xA.appendChild(T.container), xA.appendChild(d.container);
2448
2448
  const RA = document.createElement("div");
@@ -2450,7 +2450,7 @@ function wE(i) {
2450
2450
  const mA = document.createElement("div");
2451
2451
  mA.className = "wgt:space-y-4";
2452
2452
  const YA = document.createElement("h3");
2453
- YA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", YA.innerText = a(
2453
+ YA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", YA.innerText = i(
2454
2454
  "legalRepInfo",
2455
2455
  "2. Thông tin người đại diện pháp luật:"
2456
2456
  ), mA.appendChild(YA);
@@ -2459,10 +2459,10 @@ function wE(i) {
2459
2459
  let tA = !1, JA = !1;
2460
2460
  const bA = document.createElement("div");
2461
2461
  function zA() {
2462
- bA.className = "wgt:text-yellow-500 wgt:text-sm wgt:font-medium wgt:text-center", tA ? bA.innerText = a(
2462
+ bA.className = "wgt:text-yellow-500 wgt:text-sm wgt:font-medium wgt:text-center", tA ? bA.innerText = i(
2463
2463
  "warningIdCard",
2464
2464
  "Vui lòng tải lên ảnh CMND/CCCD hợp lệ"
2465
- ) : JA ? bA.innerText = a(
2465
+ ) : JA ? bA.innerText = i(
2466
2466
  "warningIdCardSuccess",
2467
2467
  "Vui lòng kiểm tra thông tin trước khi chuyển sang bước tiếp theo"
2468
2468
  ) : bA.innerText = "", Ag.appendChild(bA);
@@ -2490,11 +2490,11 @@ function wE(i) {
2490
2490
  tA = !1, JA = !0, zA();
2491
2491
  const OA = Object.values(oA).every((eg) => !eg);
2492
2492
  $(), OA && (hg(
2493
- a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2493
+ i("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2494
2494
  ), $(), G({ success: !1, reason: "Invalid card data" }));
2495
2495
  const { address: wg, date_of_birth: Tg, full_name: jg, id_number: xg, sex: Jg } = oA;
2496
2496
  if (!xg || !/^\d{12}$/.test(xg) ? (hg(
2497
- a("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2497
+ i("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2498
2498
  ), H.inputEl.value = "") : (H.inputEl.value = xg, H.setError(null)), P.inputEl.value = jg || "", f.inputEl.value = IA(Tg), F.inputEl.value = wg || "", Jg) {
2499
2499
  const eg = oC.find(
2500
2500
  (yg) => yg.label.toLowerCase() === Jg.toLowerCase()
@@ -2518,9 +2518,9 @@ function wE(i) {
2518
2518
  var HA, OA;
2519
2519
  const oA = JSON.parse(lA);
2520
2520
  G && !((HA = oA == null ? void 0 : oA.data) != null && HA.isFront) ? hg(
2521
- a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2521
+ i("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2522
2522
  ) : $ && !((OA = oA == null ? void 0 : oA.data) != null && OA.isBack) && fg(
2523
- a("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2523
+ i("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2524
2524
  );
2525
2525
  });
2526
2526
  });
@@ -2572,20 +2572,20 @@ function wE(i) {
2572
2572
  const gg = document.createElement("ul");
2573
2573
  gg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2574
2574
  const XA = document.createElement("li");
2575
- XA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", XA.innerText = a(
2575
+ XA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", XA.innerText = i(
2576
2576
  "legalRepNote",
2577
2577
  "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."
2578
2578
  ), gg.appendChild(XA), mA.appendChild(gg), D.appendChild(mA);
2579
2579
  const Bg = document.createElement("div");
2580
2580
  Bg.className = "wgt:space-y-4";
2581
2581
  const Pg = document.createElement("h3");
2582
- Pg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", Pg.innerText = a("contactInfo", "3. Thông tin người liên hệ:"), Bg.appendChild(Pg);
2582
+ Pg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", Pg.innerText = i("contactInfo", "3. Thông tin người liên hệ:"), Bg.appendChild(Pg);
2583
2583
  const FA = document.createElement("div");
2584
2584
  FA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", FA.appendChild(r.container), FA.appendChild(m.container), FA.appendChild(Y.container), FA.appendChild(l.container), Bg.appendChild(FA), D.appendChild(Bg);
2585
2585
  const vA = document.createElement("div");
2586
2586
  vA.className = "wgt:space-y-4";
2587
2587
  const K = document.createElement("h3");
2588
- K.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", K.innerText = a("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), vA.appendChild(K), D.appendChild(vA);
2588
+ K.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", K.innerText = i("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), vA.appendChild(K), D.appendChild(vA);
2589
2589
  const CA = document.createElement("div");
2590
2590
  CA.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:@max-4xl:flex-col", CA.appendChild(U.container), CA.appendChild(S.container), vA.appendChild(CA);
2591
2591
  const Z = document.createElement("div");
@@ -2593,14 +2593,14 @@ function wE(i) {
2593
2593
  const _ = document.createElement("div");
2594
2594
  _.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", _.appendChild(j);
2595
2595
  const QA = document.createElement("h4");
2596
- QA.className = "wgt:font-semibold wgt:italic", QA.innerText = a(
2596
+ QA.className = "wgt:font-semibold wgt:italic", QA.innerText = i(
2597
2597
  "hasUsedEInvoice",
2598
2598
  "Bạn đã sử dụng hoá đơn điện tử?"
2599
2599
  ), _.appendChild(QA), Z.appendChild(_);
2600
2600
  const gA = document.createElement("div");
2601
2601
  gA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", gA.appendChild(O);
2602
2602
  const V = document.createElement("h4");
2603
- V.className = "wgt:font-semibold wgt:italic", V.innerText = a(
2603
+ V.className = "wgt:font-semibold wgt:italic", V.innerText = i(
2604
2604
  "hasUsedEInvoiceBefore",
2605
2605
  "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"
2606
2606
  ), gA.appendChild(V);
@@ -2633,21 +2633,21 @@ function wE(i) {
2633
2633
  ), Cg.setAttribute("fill", "white"), $A.appendChild(Cg), qA.appendChild($A);
2634
2634
  const Qg = document.createElement("label");
2635
2635
  Qg.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", Qg.appendChild(
2636
- document.createTextNode(a("agreeWith", "Tôi đồng ý với ") + " ")
2636
+ document.createTextNode(i("agreeWith", "Tôi đồng ý với ") + " ")
2637
2637
  );
2638
2638
  const Rg = (z) => {
2639
2639
  const G = document.createElement("button");
2640
2640
  return G.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", G.textContent = z, G.onclick = ($) => {
2641
- $.preventDefault(), typeof B == "function" && B();
2641
+ $.preventDefault(), typeof C == "function" && C();
2642
2642
  }, G;
2643
2643
  }, Yg = xQ(E);
2644
2644
  Qg.appendChild(
2645
- Rg(a("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2646
- ), Qg.appendChild(document.createTextNode(` ${a("of", "của")} ${Yg}.`)), iA.appendChild(qA), iA.appendChild(Qg), D.appendChild(iA), qA.addEventListener("click", () => {
2645
+ Rg(i("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2646
+ ), Qg.appendChild(document.createTextNode(` ${i("of", "của")} ${Yg}.`)), iA.appendChild(qA), iA.appendChild(Qg), D.appendChild(iA), qA.addEventListener("click", () => {
2647
2647
  DA = !DA, DA ? (qA.classList.add("wgt:bg-primary"), $A.classList.remove("wgt:hidden")) : (qA.classList.remove("wgt:bg-primary"), $A.classList.add("wgt:hidden")), X();
2648
2648
  });
2649
2649
  const qg = document.createElement("div");
2650
- qg.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", b.type = "submit", b.innerText = a("next"), b.className = [
2650
+ qg.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", b.type = "submit", b.innerText = i("next"), b.className = [
2651
2651
  "wgt:bg-primary",
2652
2652
  "wgt:hover:bg-primary-dark",
2653
2653
  "wgt:text-white",
@@ -2740,21 +2740,32 @@ function wE(i) {
2740
2740
  const G = BA();
2741
2741
  typeof g == "function" && g(G);
2742
2742
  });
2743
- const hA = (((gC = (AC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : AC.organization) == null ? void 0 : gC.taxCode) || "").trim();
2744
- return hA.length >= 10 && nA(hA), _C(PB(), rB().invoiceHubBaseUrl), A != null && A.idCard && (N = A == null ? void 0 : A.idCard), (BC = A == null ? void 0 : A.eInvoiceRegistration) != null && BC.hasUsedEInvoice && (Z.appendChild(gA), Z.appendChild(p), (CC = A == null ? void 0 : A.eInvoiceRegistration) != null && CC.isUsedEInvoiceBefore ? (O.checked = !0, p.appendChild(e.container), e.inputEl.value = (QC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : QC.previousEInvoiceProvider) : e.inputEl.value = "", h.inputEl.value = (EC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : EC.taxAuthorityCode), X(), {
2743
+ const hA = (((BC = (gC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : gC.organization) == null ? void 0 : BC.taxCode) || "").trim();
2744
+ return hA.length >= 10 && nA(hA), _C(qB(), PB().invoiceHubBaseUrl), A != null && A.idCard && (N = A == null ? void 0 : A.idCard), (CC = A == null ? void 0 : A.eInvoiceRegistration) != null && CC.hasUsedEInvoice && (Z.appendChild(gA), Z.appendChild(p), (QC = A == null ? void 0 : A.eInvoiceRegistration) != null && QC.isUsedEInvoiceBefore ? (O.checked = !0, p.appendChild(e.container), e.inputEl.value = (EC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : EC.previousEInvoiceProvider) : e.inputEl.value = "", h.inputEl.value = (IC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : IC.taxAuthorityCode), X(), {
2745
2745
  container: o,
2746
2746
  getValues: BA
2747
2747
  };
2748
2748
  });
2749
2749
  }
2750
- function eE(E) {
2751
- return W(this, arguments, function* ({ providerProps: g, formProps: A }) {
2750
+ function eE(C) {
2751
+ return W(this, arguments, function* ({
2752
+ providerProps: g,
2753
+ formProps: A,
2754
+ isRenewal: E
2755
+ }) {
2752
2756
  const B = document.createElement("div");
2753
- B.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
2754
- const C = lQ(g);
2755
- B.appendChild(C.container);
2756
- const { container: Q } = yield wE(A);
2757
- return B.appendChild(Q), { container: B };
2757
+ if (B.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full", E) {
2758
+ const I = document.createElement("div");
2759
+ I.className = "wgt:flex wgt:items-start wgt:gap-2 wgt:p-4 wgt:bg-[#E397171A] wgt:border-l-4 wgt:border-l-[#E39717]";
2760
+ const n = document.createElement("div");
2761
+ n.className = "wgt:w-1 wgt:bg-[#E397171A] wgt:rounded ", I.appendChild(n);
2762
+ const c = document.createElement("div");
2763
+ c.className = "wgt:text-[#E39717] wgt:text-sm wgt:leading-relaxed", c.innerHTML = "<strong>Lưu ý:</strong> Để đảm bảo thông tin gia hạn được chính xác, vui lòng kiểm tra và tải lại các thông tin với dữ liệu mới nhất.", I.appendChild(c), B.appendChild(I);
2764
+ }
2765
+ const Q = lQ(g);
2766
+ B.appendChild(Q.container);
2767
+ const { container: t } = yield wE(A);
2768
+ return B.appendChild(t), { container: B };
2758
2769
  });
2759
2770
  }
2760
2771
  function oE({
@@ -2762,20 +2773,20 @@ function oE({
2762
2773
  placeholder: A = "",
2763
2774
  onInputChange: E = void 0
2764
2775
  }) {
2765
- const B = A || a("searchUnits"), C = document.createElement("div");
2766
- C.className = "wgt:flex wgt:flex-col";
2776
+ const C = A || i("searchUnits"), B = document.createElement("div");
2777
+ B.className = "wgt:flex wgt:flex-col";
2767
2778
  const Q = document.createElement("div");
2768
- Q.className = "wgt:flex wgt:rounded-lg wgt:border wgt:border-gray-300 wgt:overflow-hidden", C.appendChild(Q);
2779
+ Q.className = "wgt:flex wgt:rounded-lg wgt:border wgt:border-gray-300 wgt:overflow-hidden", B.appendChild(Q);
2769
2780
  const t = document.createElement("input");
2770
- return t.type = "text", t.inputMode = "numeric", t.value = g, t.placeholder = B, t.className = "wgt:flex-1 wgt:px-4 wgt:py-2 wgt:text-text-sub-600 wgt:placeholder-gray-400 wgt:bg-white wgt:focus:outline-none", typeof E == "function" && t.addEventListener("input", E), Q.appendChild(t), { container: C };
2781
+ return t.type = "text", t.inputMode = "numeric", t.value = g, t.placeholder = C, t.className = "wgt:flex-1 wgt:px-4 wgt:py-2 wgt:text-text-sub-600 wgt:placeholder-gray-400 wgt:bg-white wgt:focus:outline-none", typeof E == "function" && t.addEventListener("input", E), Q.appendChild(t), { container: B };
2771
2782
  }
2772
2783
  const dA = (g) => new Intl.NumberFormat("vi-VN").format(g);
2773
2784
  function aE({
2774
2785
  pkg: g,
2775
2786
  type: A,
2776
2787
  isDiscounted: E,
2777
- promotion: B,
2778
- isSelected: C,
2788
+ promotion: C,
2789
+ isSelected: B,
2779
2790
  onSelect: Q,
2780
2791
  isRenew: t
2781
2792
  }) {
@@ -2792,7 +2803,7 @@ function aE({
2792
2803
  "wgt:cursor-pointer",
2793
2804
  "wgt:bg-white",
2794
2805
  "wgt:justify-between",
2795
- C ? "wgt:border-primary" : "wgt:border-grey-6 wgt:hover:border-gray-300"
2806
+ B ? "wgt:border-primary" : "wgt:border-grey-6 wgt:hover:border-gray-300"
2796
2807
  ].filter(Boolean).join(" "), I.onclick = Q;
2797
2808
  const n = document.createElement("div");
2798
2809
  n.className = "wgt:w-full", I.appendChild(n);
@@ -2804,18 +2815,18 @@ function aE({
2804
2815
  if (s.className = [
2805
2816
  "wgt:text-base",
2806
2817
  "wgt:font-semibold",
2807
- C ? "wgt:text-primary" : "wgt:text-text-sub-600"
2818
+ B ? "wgt:text-primary" : "wgt:text-text-sub-600"
2808
2819
  ].join(" "), s.innerText = g.code, w.appendChild(s), E) {
2809
2820
  const l = document.createElement("div");
2810
- l.className = "wgt:w-fit wgt:px-2 wgt:py-0.5 wgt:rounded wgt:bg-primary wgt:text-white wgt:bg-gradient-to-r wgt:from-[#FF8447] wgt:to-[#F6B51E] wgt:text-sm wgt:font-semibold", l.innerText = B, w.appendChild(l);
2821
+ l.className = "wgt:w-fit wgt:px-2 wgt:py-0.5 wgt:rounded wgt:bg-primary wgt:text-white wgt:bg-gradient-to-r wgt:from-[#FF8447] wgt:to-[#F6B51E] wgt:text-sm wgt:font-semibold", l.innerText = C, w.appendChild(l);
2811
2822
  }
2812
2823
  c.appendChild(w);
2813
- const { container: i } = bg({
2814
- checked: C,
2824
+ const { container: a } = bg({
2825
+ checked: B,
2815
2826
  onChange: (l) => {
2816
2827
  }
2817
2828
  });
2818
- c.appendChild(i), n.appendChild(c);
2829
+ c.appendChild(a), n.appendChild(c);
2819
2830
  const o = document.createElement("div");
2820
2831
  o.className = "wgt:flex wgt:items-center wgt:text-gray-600 wgt:mt-2";
2821
2832
  const D = document.createElement("div");
@@ -2825,11 +2836,11 @@ function aE({
2825
2836
  `, o.appendChild(D);
2826
2837
  const u = document.createElement("span");
2827
2838
  if (u.className = "wgt:ml-2 wgt:text-sm", A === "signature") {
2828
- const l = ag(), P = a(g.duration.unit), f = l === "en" && g.duration.value > 1 ? P + "s" : P;
2829
- u.innerText = `${a("duration")}: ${g.duration.value} ${f} `;
2839
+ const l = ag(), P = i(g.duration.unit), f = l === "en" && g.duration.value > 1 ? P + "s" : P;
2840
+ u.innerText = `${i("duration")}: ${g.duration.value} ${f} `;
2830
2841
  } else typeof (g == null ? void 0 : g.limit) == "number" ? u.innerText = `${g == null ? void 0 : g.limit.toLocaleString(
2831
2842
  "vi-VN"
2832
- )} ${a("searchUnits")}` : u.innerText = "";
2843
+ )} ${i("searchUnits")}` : u.innerText = "";
2833
2844
  o.appendChild(u), n.appendChild(o);
2834
2845
  const R = document.createElement("div");
2835
2846
  R.className = "wgt:mt-4";
@@ -2838,20 +2849,20 @@ function aE({
2838
2849
  "wgt:block",
2839
2850
  "wgt:text-2xl",
2840
2851
  "wgt:font-bold",
2841
- C ? "wgt:text-primary" : "wgt:text-text-sub-600"
2852
+ B ? "wgt:text-primary" : "wgt:text-text-sub-600"
2842
2853
  ].join(" ");
2843
2854
  let d = t ? (m = g == null ? void 0 : g.renewPrice) != null ? m : 0 : (Y = g == null ? void 0 : g.price) != null ? Y : 0;
2844
2855
  T.innerText = dA((g == null ? void 0 : g.limit) * d), R.appendChild(T);
2845
2856
  const r = document.createElement("span");
2846
- return r.className = "wgt:text-sm wgt:text-text-sub-600", r.innerText = `VND/${a("package")}`, R.appendChild(r), I.appendChild(R), { container: I };
2857
+ return r.className = "wgt:text-sm wgt:text-text-sub-600", r.innerText = `VND/${i("package")}`, R.appendChild(r), I.appendChild(R), { container: I };
2847
2858
  }
2848
2859
  function iC({
2849
2860
  type: g = "service",
2850
2861
  // or "signature"
2851
2862
  packageOptions: A = [],
2852
2863
  disCountedPackages: E = [],
2853
- promotion: B,
2854
- selectedPackageId: C = "",
2864
+ promotion: C,
2865
+ selectedPackageId: B = "",
2855
2866
  allowDeselect: Q = !1,
2856
2867
  handlePackageSelect: t,
2857
2868
  isRenew: I = !1
@@ -2874,11 +2885,11 @@ function iC({
2874
2885
  ].join(" "), c.style.scrollSnapType = "x mandatory", c.style.overflowX = "auto", c.style.scrollBehavior = "smooth", c.style.scrollbarWidth = "none", c.style.msOverflowStyle = "none", c.style.WebkitOverflowScrolling = "touch", c.style.scrollbarWidth = "none", c.style.overflowY = "hidden", n.appendChild(c);
2875
2886
  function w() {
2876
2887
  c.innerHTML = "", A.forEach((D) => {
2877
- const u = D._id === C, R = E.includes(D.code), { container: T } = aE({
2888
+ const u = D._id === B, R = E.includes(D.code), { container: T } = aE({
2878
2889
  pkg: D,
2879
2890
  type: g,
2880
2891
  isDiscounted: R,
2881
- promotion: B,
2892
+ promotion: C,
2882
2893
  isSelected: u,
2883
2894
  isRenew: I,
2884
2895
  onSelect: () => {
@@ -2889,9 +2900,9 @@ function iC({
2889
2900
  });
2890
2901
  }
2891
2902
  w();
2892
- let s = !1, i, o;
2903
+ let s = !1, a, o;
2893
2904
  return c.addEventListener("mousedown", (D) => {
2894
- s = !0, c.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), i = D.pageX - c.offsetLeft, o = c.scrollLeft;
2905
+ s = !0, c.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), a = D.pageX - c.offsetLeft, o = c.scrollLeft;
2895
2906
  }), document.addEventListener("mouseup", () => {
2896
2907
  s = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2897
2908
  }), c.addEventListener("mouseleave", () => {
@@ -2899,18 +2910,18 @@ function iC({
2899
2910
  }), c.addEventListener("mousemove", (D) => {
2900
2911
  if (!s) return;
2901
2912
  D.preventDefault();
2902
- const R = (D.pageX - c.offsetLeft - i) * 1.5;
2913
+ const R = (D.pageX - c.offsetLeft - a) * 1.5;
2903
2914
  c.scrollLeft = o - R;
2904
2915
  }), c.addEventListener("wheel", (D) => {
2905
2916
  D.preventDefault(), c.scrollLeft += D.deltaY;
2906
2917
  }), {
2907
2918
  container: n,
2908
2919
  setSelectedPackageId(D) {
2909
- C = D, w();
2920
+ B = D, w();
2910
2921
  }
2911
2922
  };
2912
2923
  }
2913
- const iE = "1.99.0";
2924
+ const iE = "1.100.0";
2914
2925
  function uE(E) {
2915
2926
  return W(this, arguments, function* ({ search: g, bank: A }) {
2916
2927
  return (yield NA.get(`${Ng}`, {
@@ -2968,12 +2979,12 @@ function AQ(g) {
2968
2979
  ), A.append("provider", g.provider), A.append("bank", g.bank), A.append("packages", JSON.stringify(g.packages)), A.append("promotionCodes", JSON.stringify(g.promotionCodes)), A.append("logo", g.logo), A.append(
2969
2980
  "organizationRegistrationCert",
2970
2981
  g.organizationRegistrationCert
2971
- ), g.legalRepresentativeIdCard.forEach((B) => {
2972
- A.append("legalRepresentativeIdCard", B);
2982
+ ), g.legalRepresentativeIdCard.forEach((C) => {
2983
+ A.append("legalRepresentativeIdCard", C);
2973
2984
  }), A.append("isRenew", g.isRenew), yield NA.post(uQ, A, {
2974
2985
  headers: {
2975
2986
  "Content-Type": "multipart/form-data",
2976
- "X-Invoice-Widget-Mode": PB(),
2987
+ "X-Invoice-Widget-Mode": qB(),
2977
2988
  "X-Invoice-Widget-Version": iE
2978
2989
  }
2979
2990
  });
@@ -2989,7 +3000,7 @@ function rE() {
2989
3000
  return (yield NA.get(`${DQ}`)).data;
2990
3001
  });
2991
3002
  }
2992
- function PE({ name: g, value: A, feeLabel: E, required: B, description: C, isChecked: Q = !0 }) {
3003
+ function PE({ name: g, value: A, feeLabel: E, required: C, description: B, isChecked: Q = !0 }) {
2993
3004
  const t = document.createElement("label");
2994
3005
  t.className = [
2995
3006
  "wgt:relative",
@@ -3016,8 +3027,8 @@ function PE({ name: g, value: A, feeLabel: E, required: B, description: C, isChe
3016
3027
  const w = document.createElement("span");
3017
3028
  w.className = "wgt:text-base wgt:font-semibold wgt:text-text-sub-600", w.textContent = E, c.appendChild(w);
3018
3029
  {
3019
- const i = document.createElement("span");
3020
- i.className = [
3030
+ const a = document.createElement("span");
3031
+ a.className = [
3021
3032
  "wgt:bg-soft-200",
3022
3033
  "wgt:text-text-sub-600",
3023
3034
  "wgt:text-xs",
@@ -3025,13 +3036,13 @@ function PE({ name: g, value: A, feeLabel: E, required: B, description: C, isChe
3025
3036
  "wgt:px-1.5",
3026
3037
  "wgt:py-1",
3027
3038
  "wgt:rounded-sm"
3028
- ].join(" "), i.textContent = a("required"), c.appendChild(i);
3039
+ ].join(" "), a.textContent = i("required"), c.appendChild(a);
3029
3040
  }
3030
3041
  n.appendChild(c);
3031
3042
  const s = document.createElement("p");
3032
- return s.className = "wgt:text-text-soft-400 wgt:text-sm", s.textContent = C, n.appendChild(s), t.appendChild(n), { container: t };
3043
+ return s.className = "wgt:text-text-soft-400 wgt:text-sm", s.textContent = B, n.appendChild(s), t.appendChild(n), { container: t };
3033
3044
  }
3034
- function vB() {
3045
+ function MB() {
3035
3046
  const g = document.createElement("div");
3036
3047
  g.className = "wgt:absolute wgt:inset-0 wgt:bg-white/80 wgt:items-center wgt:justify-center wgt:z-50 wgt:w-full wgt:h-full wgt:backdrop-blur-sm", g.style.display = "none";
3037
3048
  const A = document.createElement("div");
@@ -3052,10 +3063,10 @@ function qE({
3052
3063
  onSelect: A,
3053
3064
  isDisabled: E = !1
3054
3065
  }) {
3055
- const B = document.createElement("div");
3056
- B.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (E ? " wgt:opacity-50" : "");
3057
3066
  const C = document.createElement("div");
3058
- C.className = "wgt:absolute wgt:top-0 wgt:left-0 wgt:z-0", C.innerHTML = `<svg width="177" height="108" viewBox="0 0 177 108" fill="none" xmlns="http://www.w3.org/2000/svg">
3067
+ C.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (E ? " wgt:opacity-50" : "");
3068
+ const B = document.createElement("div");
3069
+ B.className = "wgt:absolute wgt:top-0 wgt:left-0 wgt:z-0", B.innerHTML = `<svg width="177" height="108" viewBox="0 0 177 108" fill="none" xmlns="http://www.w3.org/2000/svg">
3059
3070
  <path fill-rule="evenodd" clip-rule="evenodd" d="M35.0743 3.375H37.1375V0H166.603C172.3 0 176.919 5.65535 176.919 12.6316V95.3684C176.919 102.345 172.3 108 166.603 108H37.1375V104.625H35.0743V108H10.316C4.61862 108 4.15411e-08 102.345 0 95.3684V93.4737C3.41841 93.4737 6.18958 90.0805 6.18958 85.8947C6.18958 81.709 3.41841 78.3158 0 78.3158V72C3.41841 72 6.18958 68.6068 6.18958 64.4211C6.18958 60.2353 3.41841 56.8421 0 56.8421V50.5263C3.41841 50.5263 6.18958 47.1331 6.18958 42.9474C6.18958 38.7616 3.41841 35.3684 0 35.3684V29.0526C3.41841 29.0526 6.18958 25.6594 6.18958 21.4737C6.18958 17.2879 3.41841 13.8947 0 13.8947V12.6316C0 5.65535 4.61862 0 10.316 0H35.0743V3.375ZM35.0743 97.875H37.1375V91.125H35.0743V97.875ZM35.0743 84.375H37.1375V77.625H35.0743V84.375ZM35.0743 70.875H37.1375V64.125H35.0743V70.875ZM35.0743 57.375H37.1375V50.625H35.0743V57.375ZM35.0743 43.875H37.1375V37.125H35.0743V43.875ZM35.0743 30.375H37.1375V23.625H35.0743V30.375ZM35.0743 16.875H37.1375V10.125H35.0743V16.875Z" fill="#C0D5FF"/>
3060
3071
  </svg>
3061
3072
  `;
@@ -3082,8 +3093,8 @@ function qE({
3082
3093
  const { container: w } = bg({
3083
3094
  checked: g.isSelected,
3084
3095
  onChange: () => {
3085
- let i = !g.isSelected;
3086
- A(g.code, i);
3096
+ let a = !g.isSelected;
3097
+ A(g.code, a);
3087
3098
  },
3088
3099
  isIconCheckbox: !0,
3089
3100
  disabled: E || g.isSelected
@@ -3096,21 +3107,21 @@ function qE({
3096
3107
  "wgt:text-right",
3097
3108
  "wgt:text-[#335CFF]",
3098
3109
  "wgt:italic"
3099
- ].join(" "), s.textContent = `${a("validityPeriod")}: ${a("expiredDate")} ${g.expiredAt.split("T")[0]}`, Q.appendChild(s), B.appendChild(C), B.appendChild(Q), { container: B };
3110
+ ].join(" "), s.textContent = `${i("validityPeriod")}: ${i("expiredDate")} ${g.expiredAt.split("T")[0]}`, Q.appendChild(s), C.appendChild(B), C.appendChild(Q), { container: C };
3100
3111
  }
3101
3112
  function vE({
3102
3113
  theme: g,
3103
3114
  debounceTimer: A,
3104
3115
  typedUnits: E,
3105
- onSearchComplete: B
3116
+ onSearchComplete: C
3106
3117
  }) {
3107
- let C = [], Q = [];
3118
+ let B = [], Q = [];
3108
3119
  const t = document.createElement("div");
3109
3120
  t.className = "wgt:flex wgt:flex-col wgt:gap-3";
3110
3121
  const I = document.createElement("div");
3111
3122
  I.className = "wgt:flex wgt:flex-col wgt:gap-4", t.appendChild(I);
3112
3123
  const n = document.createElement("h2");
3113
- n.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", n.innerText = a("selectInvoicePackage");
3124
+ n.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", n.innerText = i("selectInvoicePackage");
3114
3125
  const c = document.createElement("span");
3115
3126
  c.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", c.innerText = "*", n.appendChild(c), I.appendChild(n);
3116
3127
  function w() {
@@ -3118,40 +3129,40 @@ function vE({
3118
3129
  A && clearTimeout(A), E !== "" ? A = setTimeout(() => W(null, null, function* () {
3119
3130
  try {
3120
3131
  const d = E.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), r = yield uE({ search: d, bank: g });
3121
- r && (Q = r), B && B();
3132
+ r && (Q = r), C && C();
3122
3133
  } catch (d) {
3123
- console.error("Error searching packages:", d), ig.error(a("errorSearchingPackages"), {
3134
+ console.error("Error searching packages:", d), ig.error(i("errorSearchingPackages"), {
3124
3135
  autoClose: 5e3,
3125
3136
  closeButton: !0,
3126
3137
  icon: !0
3127
3138
  });
3128
3139
  }
3129
- }), 500) : (Q = C, B && B());
3140
+ }), 500) : (Q = B, C && C());
3130
3141
  });
3131
3142
  }
3132
3143
  const s = oE({
3133
3144
  value: "",
3134
- placeholder: a("searchUnits"),
3145
+ placeholder: i("searchUnits"),
3135
3146
  onInputChange: (d) => {
3136
3147
  E = d.target.value.replace(/\D/g, ""), w();
3137
3148
  }
3138
3149
  });
3139
3150
  I.appendChild(s.container);
3140
- const i = document.createElement("div");
3141
- i.className = "wgt:flex wgt:flex-col wgt:gap-2", t.appendChild(i);
3151
+ const a = document.createElement("div");
3152
+ a.className = "wgt:flex wgt:flex-col wgt:gap-2", t.appendChild(a);
3142
3153
  const o = document.createElement("h3");
3143
- o.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", o.innerText = a("mostSuitablePackage"), i.appendChild(o);
3154
+ o.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", o.innerText = i("mostSuitablePackage"), a.appendChild(o);
3144
3155
  const D = document.createElement("div");
3145
- i.appendChild(D);
3156
+ a.appendChild(D);
3146
3157
  const u = document.createElement("div");
3147
3158
  u.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", u.innerHTML = `
3148
3159
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3149
3160
  <div class="wgt:h-8 wgt:w-8 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
3150
- <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3161
+ <span class="wgt:text-sm wgt:text-text-sub-600">${i("loading")}...</span>
3151
3162
  </div>
3152
3163
  `, D.appendChild(u);
3153
3164
  function R(d) {
3154
- return C.find((r) => r._id === d) || null;
3165
+ return B.find((r) => r._id === d) || null;
3155
3166
  }
3156
3167
  function T() {
3157
3168
  D.contains(u) && D.removeChild(u);
@@ -3160,12 +3171,12 @@ function vE({
3160
3171
  container: t,
3161
3172
  invoiceSelectorWrapper: D,
3162
3173
  setInvoicePackages: (d) => {
3163
- C = d;
3174
+ B = d;
3164
3175
  },
3165
3176
  setFilteredInvoiceOptions: (d) => {
3166
3177
  Q = d;
3167
3178
  },
3168
- getInvoicePackages: () => C,
3179
+ getInvoicePackages: () => B,
3169
3180
  getFilteredInvoiceOptions: () => Q,
3170
3181
  findInvoiceById: R,
3171
3182
  removeLoading: T
@@ -3175,34 +3186,34 @@ function uC(g = !1) {
3175
3186
  const A = document.createElement("div");
3176
3187
  A.className = "wgt:flex wgt:flex-col wgt:gap-4";
3177
3188
  const E = document.createElement("h2");
3178
- if (E.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", E.innerText = a("selectSignaturePackage"), !g) {
3189
+ if (E.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", E.innerText = i("selectSignaturePackage"), !g) {
3179
3190
  const Q = document.createElement("span");
3180
3191
  Q.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", Q.innerText = "*", E.appendChild(Q);
3181
3192
  }
3182
3193
  A.appendChild(E);
3183
- const B = document.createElement("div");
3184
- A.appendChild(B);
3185
3194
  const C = document.createElement("div");
3186
- return C.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", C.innerHTML = `
3195
+ A.appendChild(C);
3196
+ const B = document.createElement("div");
3197
+ return B.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", B.innerHTML = `
3187
3198
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3188
3199
  <div class="wgt:h-8 wgt:w-8 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
3189
- <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3190
- <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3200
+ <span class="wgt:text-sm wgt:text-text-sub-600">${i("loading")}...</span>
3201
+ <span class="wgt:text-sm wgt:text-text-sub-600">${i("loading")}...</span>
3191
3202
  </div>
3192
- `, B.appendChild(C), B.appendChild(C), {
3203
+ `, C.appendChild(B), C.appendChild(B), {
3193
3204
  container: A,
3194
- signatureSelectorWrapper: B
3205
+ signatureSelectorWrapper: C
3195
3206
  };
3196
3207
  }
3197
3208
  function ME() {
3198
3209
  const g = document.createElement("div");
3199
3210
  g.className = "wgt:flex wgt:items-center wgt:gap-4 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
3200
3211
  const A = document.createElement("span");
3201
- A.className = "wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black", A.innerText = a("paymentMethod"), g.appendChild(A);
3212
+ A.className = "wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black", A.innerText = i("paymentMethod"), g.appendChild(A);
3202
3213
  const E = document.createElement("div");
3203
3214
  E.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:rounded-[10px] wgt:border wgt:border-soft-200 wgt:bg-transparent wgt:p-2", g.appendChild(E);
3204
- const B = document.createElement("div");
3205
- B.innerHTML = `
3215
+ const C = document.createElement("div");
3216
+ C.innerHTML = `
3206
3217
  <svg
3207
3218
  width="24"
3208
3219
  height="24"
@@ -3227,9 +3238,9 @@ function ME() {
3227
3238
  </clipPath>
3228
3239
  </defs>
3229
3240
  </svg>
3230
- `, E.appendChild(B);
3231
- const C = document.createElement("span");
3232
- return C.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", C.innerText = a("qrPayment"), E.appendChild(C), {
3241
+ `, E.appendChild(C);
3242
+ const B = document.createElement("span");
3243
+ return B.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", B.innerText = i("qrPayment"), E.appendChild(B), {
3233
3244
  container: g
3234
3245
  };
3235
3246
  }
@@ -3237,26 +3248,26 @@ function TE() {
3237
3248
  const g = document.createElement("div");
3238
3249
  g.className = "wgt:flex wgt:flex-col wgt:gap-2 wgt:-mt-4";
3239
3250
  const A = document.createElement("h3");
3240
- A.className = "wgt:text-lg wgt:font-bold wgt:text-text-black wgt:@max-2xl:text-xl wgt:@max-2xl:mb-3", A.innerText = a("selectedProducts"), g.appendChild(A);
3251
+ A.className = "wgt:text-lg wgt:font-bold wgt:text-text-black wgt:@max-2xl:text-xl wgt:@max-2xl:mb-3", A.innerText = i("selectedProducts"), g.appendChild(A);
3241
3252
  const E = document.createElement("div");
3242
3253
  E.className = "wgt:overflow-x-auto wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:overflow-x-visible wgt:@max-2xl:border-0 wgt:@max-2xl:bg-transparent", g.appendChild(E);
3243
- const B = document.createElement("table");
3244
- B.className = "wgt:min-w-full wgt:table-auto wgt:border-separate wgt:@max-2xl:border-collapse wgt:@max-2xl:w-full", E.appendChild(B);
3245
- const C = document.createElement("thead");
3246
- C.className = "wgt:bg-soft-150 wgt:@max-2xl:hidden";
3254
+ const C = document.createElement("table");
3255
+ C.className = "wgt:min-w-full wgt:table-auto wgt:border-separate wgt:@max-2xl:border-collapse wgt:@max-2xl:w-full", E.appendChild(C);
3256
+ const B = document.createElement("thead");
3257
+ B.className = "wgt:bg-soft-150 wgt:@max-2xl:hidden";
3247
3258
  const Q = document.createElement("tr");
3248
3259
  [
3249
- a("product"),
3250
- a("unit"),
3251
- a("quantity"),
3252
- a("unitPrice"),
3253
- a("totalPrice")
3260
+ i("product"),
3261
+ i("unit"),
3262
+ i("quantity"),
3263
+ i("unitPrice"),
3264
+ i("totalPrice")
3254
3265
  ].forEach((I) => {
3255
3266
  const n = document.createElement("th");
3256
3267
  n.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", n.innerText = I, Q.appendChild(n);
3257
- }), C.appendChild(Q), B.appendChild(C);
3268
+ }), B.appendChild(Q), C.appendChild(B);
3258
3269
  const t = document.createElement("tbody");
3259
- return t.className = "wgt:divide-y wgt:divide-gray-200 wgt:bg-white wgt:@max-2xl:divide-y-0 wgt:@max-2xl:bg-transparent", B.appendChild(t), {
3270
+ return t.className = "wgt:divide-y wgt:divide-gray-200 wgt:bg-white wgt:@max-2xl:divide-y-0 wgt:@max-2xl:bg-transparent", C.appendChild(t), {
3260
3271
  container: g,
3261
3272
  tbody: t
3262
3273
  };
@@ -3267,8 +3278,8 @@ function dE(m) {
3267
3278
  onNext: g,
3268
3279
  onPrev: A,
3269
3280
  selectedInitPackage: E,
3270
- selectedInvoiceOtp: B,
3271
- selectedSignatureOtp: C,
3281
+ selectedInvoiceOtp: C,
3282
+ selectedSignatureOtp: B,
3272
3283
  setSelectedInitPackage: Q,
3273
3284
  setSelectedInvoiceOtp: t,
3274
3285
  setSelectedSignatureOtp: I,
@@ -3276,7 +3287,7 @@ function dE(m) {
3276
3287
  setTotalAmount: c,
3277
3288
  theme: w,
3278
3289
  selectedProvider: s,
3279
- selectedPromotions: i,
3290
+ selectedPromotions: a,
3280
3291
  registrationData: o,
3281
3292
  setSelectedPromotions: D,
3282
3293
  setPackages: u,
@@ -3285,7 +3296,7 @@ function dE(m) {
3285
3296
  savedQuantities: d,
3286
3297
  setSavedQuantities: r
3287
3298
  }) {
3288
- let Y = "", l = B ? B._id : null, P = C ? C._id : null, f = i ? i.map((K) => K) : [], M = [], k = [], H = [], J = [], v = null, F = (d == null ? void 0 : d.qtyRegFee) || 1, U = (d == null ? void 0 : d.qtyInvoicePkg) || 1, j = (d == null ? void 0 : d.qtySignaturePkg) || 1;
3299
+ let Y = "", l = C ? C._id : null, P = B ? B._id : null, f = a ? a.map((K) => K) : [], M = [], k = [], H = [], J = [], v = null, F = (d == null ? void 0 : d.qtyRegFee) || 1, U = (d == null ? void 0 : d.qtyInvoicePkg) || 1, j = (d == null ? void 0 : d.qtySignaturePkg) || 1;
3289
3300
  function O() {
3290
3301
  r && r({
3291
3302
  qtyRegFee: F,
@@ -3302,7 +3313,7 @@ function dE(m) {
3302
3313
  container: q,
3303
3314
  open: x,
3304
3315
  close: N
3305
- } = vB();
3316
+ } = MB();
3306
3317
  h.appendChild(q);
3307
3318
  const L = document.createElement("div");
3308
3319
  L.className = "wgt:mx-auto wgt:w-full wgt:max-w-[1072px] wgt:flex wgt:flex-col wgt:gap-8 wgt:rounded-3xl wgt:bg-weak-50 wgt:px-6 wgt:py-4 wgt:@max-2xl:px-3 wgt:@max-2xl:py-3 wgt:@max-2xl:gap-6 wgt:@max-2xl:rounded-none", h.appendChild(L);
@@ -3330,20 +3341,20 @@ function dE(m) {
3330
3341
  mA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", mA.innerHTML = `
3331
3342
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3332
3343
  <div class="wgt:h-6 wgt:w-6 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
3333
- <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3344
+ <span class="wgt:text-sm wgt:text-text-sub-600">${i("loading")}...</span>
3334
3345
  </div>
3335
3346
  `, L.appendChild(mA);
3336
3347
  const { container: YA } = ME(), { container: VA, tbody: tA } = TE(), JA = document.createElement("div");
3337
3348
  JA.className = "wgt:hidden wgt:@max-2xl:flex wgt:items-center wgt:justify-between wgt:w-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:px-6 wgt:py-5 wgt:shadow-lg";
3338
3349
  const bA = document.createElement("span");
3339
- bA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", bA.innerText = a("total"), JA.appendChild(bA);
3350
+ bA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", bA.innerText = i("total"), JA.appendChild(bA);
3340
3351
  const zA = document.createElement("span");
3341
3352
  zA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", zA.innerText = "0 VND", JA.appendChild(zA);
3342
3353
  const jA = document.createElement("div");
3343
3354
  jA.className = "wgt:flex wgt:justify-between wgt:gap-2", h.appendChild(jA);
3344
3355
  const KA = Ig({
3345
3356
  type: "button",
3346
- title: a("back"),
3357
+ title: i("back"),
3347
3358
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
3348
3359
  handleClick: A
3349
3360
  });
@@ -3389,12 +3400,12 @@ function dE(m) {
3389
3400
  });
3390
3401
  n(iA.orderId), g();
3391
3402
  } catch (iA) {
3392
- console.error("Error creating order:", iA), og(a("errorCreatingOrder") || "Failed to create order"), N();
3403
+ console.error("Error creating order:", iA), og(i("errorCreatingOrder") || "Failed to create order"), N();
3393
3404
  return;
3394
3405
  }
3395
3406
  }), WA = Ig({
3396
3407
  type: "button",
3397
- title: a("next"),
3408
+ title: i("next"),
3398
3409
  className: "wgt:text-white wgt:bg-primary",
3399
3410
  handleClick: () => W(null, null, function* () {
3400
3411
  const K = S().find(
@@ -3403,7 +3414,7 @@ function dE(m) {
3403
3414
  (gA) => gA._id === P
3404
3415
  );
3405
3416
  if (T && !CA) {
3406
- ig.error(a("errorSelectSignature") || "Vui lòng chọn gói chữ ký số");
3417
+ ig.error(i("errorSelectSignature") || "Vui lòng chọn gói chữ ký số");
3407
3418
  return;
3408
3419
  }
3409
3420
  let Z = null;
@@ -3443,7 +3454,7 @@ function dE(m) {
3443
3454
  "Failed to load init packages:",
3444
3455
  _.reason
3445
3456
  ), ig.error(
3446
- a("errorLoadingInitPackages") || "Failed to load registration packages"
3457
+ i("errorLoadingInitPackages") || "Failed to load registration packages"
3447
3458
  ), k = []), Z.status === "fulfilled" ? (((K = Z == null ? void 0 : Z.value) == null ? void 0 : K.length) > 0 && Z.value.forEach((V) => {
3448
3459
  V.codes.length > 0 && (H[V.codes[0].code] = {
3449
3460
  id: V.id,
@@ -3460,7 +3471,7 @@ function dE(m) {
3460
3471
  isDisabled: !1,
3461
3472
  reward: V.reward
3462
3473
  });
3463
- }), Object.keys(H).length > 0 && (f = i || Object.keys(H).filter(
3474
+ }), Object.keys(H).length > 0 && (f = a || Object.keys(H).filter(
3464
3475
  (V) => H[V].bank === w && H[V].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && H[V].limit > H[V].used
3465
3476
  ), Pg())) : console.error("Failed to load promotions:", Z.reason), QA.status === "fulfilled") {
3466
3477
  const V = T ? QA.value : QA.value.filter((p) => p.renewPrice !== 0);
@@ -3468,7 +3479,7 @@ function dE(m) {
3468
3479
  const p = QA.value.find(
3469
3480
  (iA) => J.includes(iA.code)
3470
3481
  );
3471
- l = B ? B._id : p ? p._id : V == null ? void 0 : V[0]._id, nA(V);
3482
+ l = C ? C._id : p ? p._id : V == null ? void 0 : V[0]._id, nA(V);
3472
3483
  }
3473
3484
  LA();
3474
3485
  } else
@@ -3476,14 +3487,14 @@ function dE(m) {
3476
3487
  "Failed to load invoice packages:",
3477
3488
  QA.reason
3478
3489
  ), ig.error(
3479
- a("errorLoadingInvoicePackages") || "Failed to load invoice packages"
3490
+ i("errorLoadingInvoicePackages") || "Failed to load invoice packages"
3480
3491
  ), AA([]), LA();
3481
3492
  if (gA.status === "fulfilled")
3482
3493
  if (M = gA.value || [], M.length > 0) {
3483
3494
  const V = M.find(
3484
3495
  (p) => J.includes(p.code)
3485
3496
  );
3486
- T ? P = C ? C._id : V ? V._id : T ? (CA = M == null ? void 0 : M.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : CA._id : null : P = C ? C._id : (
3497
+ T ? P = B ? B._id : V ? V._id : T ? (CA = M == null ? void 0 : M.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : CA._id : null : P = B ? B._id : (
3487
3498
  // : promotionPkg
3488
3499
  // ? promotionPkg._id
3489
3500
  // : signaturePackages?.filter((p) => !p.isBonusPackage)[0]?._id;
@@ -3494,11 +3505,11 @@ function dE(m) {
3494
3505
  "Failed to load signature packages:",
3495
3506
  gA.reason
3496
3507
  ), ig.error(
3497
- a("errorLoadingSignaturePackages") || "Failed to load signature packages"
3508
+ i("errorLoadingSignaturePackages") || "Failed to load signature packages"
3498
3509
  ), M = [];
3499
3510
  hg();
3500
3511
  } catch (Z) {
3501
- console.error("Unexpected error during data loading:", Z), ig.error(a("errorLoadingData") || "Failed to load data", {
3512
+ console.error("Unexpected error during data loading:", Z), ig.error(i("errorLoadingData") || "Failed to load data", {
3502
3513
  autoClose: 5e3,
3503
3514
  closeButton: !0,
3504
3515
  icon: !0
@@ -3516,10 +3527,10 @@ function dE(m) {
3516
3527
  (p) => p.bank === w && p.appliedPackages.includes(CA)
3517
3528
  ), V = gA && !gA.isDisabled && !(gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && gA.limit !== gA.used;
3518
3529
  if (QA && !V) {
3519
- const { container: p, open: iA } = qB({
3520
- message: a("errorDiscountPackage"),
3521
- okLabel: a("ok"),
3522
- cancelLabel: a("cancel"),
3530
+ const { container: p, open: iA } = vB({
3531
+ message: i("errorDiscountPackage"),
3532
+ okLabel: i("ok"),
3533
+ cancelLabel: i("cancel"),
3523
3534
  onClose: Z,
3524
3535
  isSuccess: !1
3525
3536
  });
@@ -3534,7 +3545,7 @@ function dE(m) {
3534
3545
  type: "service",
3535
3546
  packageOptions: EA(),
3536
3547
  disCountedPackages: J,
3537
- promotion: a("discount"),
3548
+ promotion: i("discount"),
3538
3549
  selectedPackageId: l,
3539
3550
  isRenew: !T,
3540
3551
  handlePackageSelect: (K) => {
@@ -3549,7 +3560,7 @@ function dE(m) {
3549
3560
  }), y.appendChild(_A.container);
3550
3561
  else {
3551
3562
  const K = document.createElement("span");
3552
- K.className = "wgt:text-text-sub-600", K.innerText = a("noPackageFound"), y.appendChild(K), _A = null;
3563
+ K.className = "wgt:text-text-sub-600", K.innerText = i("noPackageFound"), y.appendChild(K), _A = null;
3553
3564
  }
3554
3565
  }
3555
3566
  let UA = null;
@@ -3559,7 +3570,7 @@ function dE(m) {
3559
3570
  type: "signature",
3560
3571
  packageOptions: M.filter((K) => !K.isBonusPackage),
3561
3572
  disCountedPackages: J,
3562
- promotion: a("gift"),
3573
+ promotion: i("gift"),
3563
3574
  selectedPackageId: P,
3564
3575
  allowDeselect: !T,
3565
3576
  handlePackageSelect: (K) => {
@@ -3578,7 +3589,7 @@ function dE(m) {
3578
3589
  }), RA.appendChild(UA.container);
3579
3590
  else {
3580
3591
  const K = document.createElement("span");
3581
- K.className = "wgt:text-text-sub-600", K.innerText = a("noPackageFound"), RA.appendChild(K), UA = null;
3592
+ K.className = "wgt:text-text-sub-600", K.innerText = i("noPackageFound"), RA.appendChild(K), UA = null;
3582
3593
  }
3583
3594
  }
3584
3595
  const yA = document.createElement("div");
@@ -3592,7 +3603,7 @@ function dE(m) {
3592
3603
  const { container: CA } = PE({
3593
3604
  name: "registrationFee",
3594
3605
  value: "standard",
3595
- feeLabel: `${a("registrationFee")}: ${dA(
3606
+ feeLabel: `${i("registrationFee")}: ${dA(
3596
3607
  k[0].price
3597
3608
  )} VND`,
3598
3609
  required: !0,
@@ -3641,7 +3652,7 @@ function dE(m) {
3641
3652
  }
3642
3653
  XA.innerHTML = "";
3643
3654
  const CA = document.createElement("h3");
3644
- CA.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", CA.innerText = a("applyPromotion"), XA.appendChild(CA), L.appendChild(XA);
3655
+ CA.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", CA.innerText = i("applyPromotion"), XA.appendChild(CA), L.appendChild(XA);
3645
3656
  const Z = document.createElement("div");
3646
3657
  Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
3647
3658
  const _ = document.createElement("div");
@@ -3670,7 +3681,7 @@ function dE(m) {
3670
3681
  });
3671
3682
  const QA = Ig({
3672
3683
  type: "button",
3673
- title: a("apply"),
3684
+ title: i("apply"),
3674
3685
  className: "wgt:text-white wgt:bg-primary",
3675
3686
  handleClick: () => {
3676
3687
  console.log("Apply promotion");
@@ -3697,7 +3708,7 @@ function dE(m) {
3697
3708
  });
3698
3709
  else {
3699
3710
  const p = document.createElement("span");
3700
- p.className = "wgt:text-text-sub-600", p.innerText = a("noPromotionFound"), XA.appendChild(p);
3711
+ p.className = "wgt:text-text-sub-600", p.innerText = i("noPromotionFound"), XA.appendChild(p);
3701
3712
  }
3702
3713
  }
3703
3714
  function vA() {
@@ -3706,7 +3717,7 @@ function dE(m) {
3706
3717
  const X = document.createElement("tr");
3707
3718
  X.innerHTML = `
3708
3719
  <td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:@max-2xl:col-span-5">
3709
- ${a("noDataAvailable") || "No data available"}
3720
+ ${i("noDataAvailable") || "No data available"}
3710
3721
  </td>
3711
3722
  `, tA.appendChild(X), c(0);
3712
3723
  return;
@@ -3720,19 +3731,19 @@ function dE(m) {
3720
3731
  const BA = document.createElement("td");
3721
3732
  BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", BA.innerText = ag() === "vi" ? k[0].name : k[0].nameEn, X.appendChild(BA);
3722
3733
  const hA = document.createElement("td");
3723
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", hA.innerText = a("package"), X.appendChild(hA);
3734
+ hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", hA.innerText = i("package"), X.appendChild(hA);
3724
3735
  const MA = document.createElement("td");
3725
3736
  MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
3726
3737
  const aA = document.createElement("div");
3727
3738
  aA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
3728
3739
  const cA = document.createElement("button");
3729
- cA.type = "button", cA.ariaLabel = a("decrease"), cA.disabled = !0, cA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", cA.innerText = "–", cA.addEventListener("click", () => {
3740
+ cA.type = "button", cA.ariaLabel = i("decrease"), cA.disabled = !0, cA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", cA.innerText = "–", cA.addEventListener("click", () => {
3730
3741
  F > 1 && (F -= 1, vA());
3731
3742
  }), aA.appendChild(cA);
3732
3743
  const wA = document.createElement("span");
3733
3744
  wA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", wA.innerText = F, aA.appendChild(wA);
3734
3745
  const eA = document.createElement("button");
3735
- eA.type = "button", eA.ariaLabel = a("increase"), eA.disabled = !0, eA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", eA.innerText = "+", eA.addEventListener("click", () => {
3746
+ eA.type = "button", eA.ariaLabel = i("increase"), eA.disabled = !0, eA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", eA.innerText = "+", eA.addEventListener("click", () => {
3736
3747
  F += 1, vA();
3737
3748
  }), aA.appendChild(eA), MA.appendChild(aA), X.appendChild(MA);
3738
3749
  const rA = document.createElement("td");
@@ -3742,13 +3753,13 @@ function dE(m) {
3742
3753
  const TA = document.createElement("div");
3743
3754
  TA.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", TA.innerHTML = `
3744
3755
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3745
- <span>${a("unitPrice")}:</span>
3756
+ <span>${i("unitPrice")}:</span>
3746
3757
  <span class="wgt:font-medium">${dA(
3747
3758
  ($A = k[0]) == null ? void 0 : $A.price
3748
3759
  )} VND</span>
3749
3760
  </div>
3750
3761
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3751
- <span>${a("total")}:</span>
3762
+ <span>${i("total")}:</span>
3752
3763
  <span class="wgt:text-primary">${dA(
3753
3764
  ((Cg = k[0]) == null ? void 0 : Cg.price) * F
3754
3765
  )} VND</span>
@@ -3764,13 +3775,13 @@ function dE(m) {
3764
3775
  hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = X[kg(ag())], // getCurrentLanguage() === "vi" ? invPkg?.name : invPkg?.nameEn;
3765
3776
  BA.appendChild(hA);
3766
3777
  const MA = document.createElement("td");
3767
- MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", MA.innerText = a("package"), BA.appendChild(MA);
3778
+ MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", MA.innerText = i("package"), BA.appendChild(MA);
3768
3779
  const aA = document.createElement("td");
3769
3780
  aA.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
3770
3781
  const cA = document.createElement("div");
3771
3782
  cA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
3772
3783
  const wA = document.createElement("button");
3773
- wA.type = "button", wA.ariaLabel = a("decrease");
3784
+ wA.type = "button", wA.ariaLabel = i("decrease");
3774
3785
  const eA = T ? (Qg = X == null ? void 0 : X.price) != null ? Qg : 0 : (Rg = X == null ? void 0 : X.renewPrice) != null ? Rg : 0;
3775
3786
  wA.disabled = U <= 1 || eA === 0, wA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", wA.innerText = "–", wA.addEventListener("click", () => {
3776
3787
  U > 1 && (U -= 1, vA());
@@ -3778,7 +3789,7 @@ function dE(m) {
3778
3789
  const rA = document.createElement("span");
3779
3790
  rA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", rA.innerText = eA === 0 ? 1 : U, cA.appendChild(rA);
3780
3791
  const sA = document.createElement("button");
3781
- sA.type = "button", sA.ariaLabel = a("increase"), sA.disabled = (X == null ? void 0 : X.price) === 0, sA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", sA.innerText = "+", sA.addEventListener("click", () => {
3792
+ sA.type = "button", sA.ariaLabel = i("increase"), sA.disabled = (X == null ? void 0 : X.price) === 0, sA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", sA.innerText = "+", sA.addEventListener("click", () => {
3782
3793
  eA !== 0 && (U += 1, vA());
3783
3794
  }), cA.appendChild(sA), aA.appendChild(cA), BA.appendChild(aA);
3784
3795
  const TA = document.createElement("td");
@@ -3788,13 +3799,13 @@ function dE(m) {
3788
3799
  const Mg = document.createElement("div");
3789
3800
  Mg.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", Mg.innerHTML = `
3790
3801
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3791
- <span>${a("unitPrice")}:</span>
3802
+ <span>${i("unitPrice")}:</span>
3792
3803
  <span class="wgt:font-medium">${dA(
3793
3804
  eA * (X == null ? void 0 : X.limit)
3794
3805
  )} VND</span>
3795
3806
  </div>
3796
3807
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3797
- <span>${a("total")}:</span>
3808
+ <span>${i("total")}:</span>
3798
3809
  <span class="wgt:text-primary">${dA(
3799
3810
  eA * (X == null ? void 0 : X.limit) * U
3800
3811
  )} VND</span>
@@ -3811,19 +3822,19 @@ function dE(m) {
3811
3822
  hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = X[kg(ag())], // getCurrentLanguage() === "vi" ? sigPkg?.name : sigPkg?.nameEn;
3812
3823
  BA.appendChild(hA);
3813
3824
  const MA = document.createElement("td");
3814
- MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", MA.innerText = a("package"), BA.appendChild(MA);
3825
+ MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", MA.innerText = i("package"), BA.appendChild(MA);
3815
3826
  const aA = document.createElement("td");
3816
3827
  aA.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
3817
3828
  const cA = document.createElement("div");
3818
3829
  cA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
3819
3830
  const wA = document.createElement("button");
3820
- wA.type = "button", wA.ariaLabel = a("decrease"), wA.disabled = j <= 1, wA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold" + (j <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), wA.innerText = "–", wA.addEventListener("click", () => {
3831
+ wA.type = "button", wA.ariaLabel = i("decrease"), wA.disabled = j <= 1, wA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold" + (j <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), wA.innerText = "–", wA.addEventListener("click", () => {
3821
3832
  j > 1 && (j -= 1, vA());
3822
3833
  }), cA.appendChild(wA);
3823
3834
  const eA = document.createElement("span");
3824
3835
  eA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", eA.innerText = j, cA.appendChild(eA);
3825
3836
  const rA = document.createElement("button");
3826
- rA.type = "button", rA.ariaLabel = a("increase"), rA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", rA.innerText = "+", rA.addEventListener("click", () => {
3837
+ rA.type = "button", rA.ariaLabel = i("increase"), rA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", rA.innerText = "+", rA.addEventListener("click", () => {
3827
3838
  j += 1, vA();
3828
3839
  }), cA.appendChild(rA), aA.appendChild(cA), BA.appendChild(aA);
3829
3840
  const sA = document.createElement("td");
@@ -3833,13 +3844,13 @@ function dE(m) {
3833
3844
  const SA = document.createElement("div");
3834
3845
  SA.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", SA.innerHTML = `
3835
3846
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3836
- <span>${a("unitPrice")}:</span>
3847
+ <span>${i("unitPrice")}:</span>
3837
3848
  <span class="wgt:font-medium">${dA(
3838
3849
  (X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price)
3839
3850
  )} VND</span>
3840
3851
  </div>
3841
3852
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3842
- <span>${a("total")}:</span>
3853
+ <span>${i("total")}:</span>
3843
3854
  <span class="wgt:text-primary">${dA(
3844
3855
  (X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price) * j
3845
3856
  )} VND</span>
@@ -3869,7 +3880,7 @@ function dE(m) {
3869
3880
  const aA = document.createElement("td");
3870
3881
  aA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold wgt:@max-2xl:text-base wgt:@max-2xl:font-bold wgt:@max-2xl:p-0", X.type === "discount" ? (aA.innerText = `-${dA(
3871
3882
  (cA = X == null ? void 0 : X.reward) == null ? void 0 : cA.discountAmount
3872
- )} VND`, aA.style.color = "#F04438", Z += (wA = X == null ? void 0 : X.reward) == null ? void 0 : wA.discountAmount) : (X == null ? void 0 : X.type) === "free_item" ? (aA.innerText = `+${(rA = (eA = X == null ? void 0 : X.reward) == null ? void 0 : eA.packageCodes) == null ? void 0 : rA.length} ${a(
3883
+ )} VND`, aA.style.color = "#F04438", Z += (wA = X == null ? void 0 : X.reward) == null ? void 0 : wA.discountAmount) : (X == null ? void 0 : X.type) === "free_item" ? (aA.innerText = `+${(rA = (eA = X == null ? void 0 : X.reward) == null ? void 0 : eA.packageCodes) == null ? void 0 : rA.length} ${i(
3873
3884
  "package"
3874
3885
  )} ${(TA = (sA = X == null ? void 0 : X.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, aA.style.color = "#12B76A") : aA.innerText = "", BA.appendChild(aA), tA.appendChild(BA);
3875
3886
  });
@@ -3879,7 +3890,7 @@ function dE(m) {
3879
3890
  const X = document.createElement("tr");
3880
3891
  X.className = "wgt:@max-2xl:hidden";
3881
3892
  const BA = document.createElement("td");
3882
- BA.colSpan = 4, BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", BA.innerText = a("total"), X.appendChild(BA);
3893
+ BA.colSpan = 4, BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", BA.innerText = i("total"), X.appendChild(BA);
3883
3894
  const hA = document.createElement("td");
3884
3895
  hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", hA.innerText = dA(DA) + " VND", X.appendChild(hA), tA.appendChild(X);
3885
3896
  }
@@ -3892,8 +3903,8 @@ function xE({
3892
3903
  qrSrc: g = "",
3893
3904
  logos: A = [],
3894
3905
  logosAbove: E = [],
3895
- accountName: B = "",
3896
- accountNumber: C = "",
3906
+ accountName: C = "",
3907
+ accountNumber: B = "",
3897
3908
  bankName: Q = "",
3898
3909
  instructions: t = [],
3899
3910
  illustrationSrc: I = "",
@@ -3902,39 +3913,39 @@ function xE({
3902
3913
  const c = document.createElement("div");
3903
3914
  c.className = "wgt:flex wgt:flex-col wgt:@min-2xl:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";
3904
3915
  const w = document.createElement("div"), s = document.createElement("h3");
3905
- s.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", s.innerText = a("qrPaymentTitle"), w.appendChild(s);
3906
- const i = document.createElement("div");
3907
- i.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
3916
+ s.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", s.innerText = i("qrPaymentTitle"), w.appendChild(s);
3917
+ const a = document.createElement("div");
3918
+ a.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
3908
3919
  const o = document.createElement("div");
3909
3920
  o.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((H) => {
3910
3921
  const J = document.createElement("img");
3911
3922
  J.src = H, J.alt = "Logo", J.className = "wgt:w-14 wgt:object-contain", o.appendChild(J);
3912
- }), i.appendChild(o));
3923
+ }), a.appendChild(o));
3913
3924
  const D = document.createElement("div");
3914
3925
  D.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
3915
3926
  const u = document.createElement("img");
3916
- u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", D.appendChild(u), i.appendChild(D);
3927
+ u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", D.appendChild(u), a.appendChild(D);
3917
3928
  const R = document.createElement("div");
3918
3929
  R.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((H) => {
3919
3930
  const J = document.createElement("img");
3920
3931
  J.src = H, J.alt = "Logo", J.className = `wgt:w-${n === "ocb" ? "28" : "8"} wgt:object-contain`, R.appendChild(J);
3921
- }), i.appendChild(R);
3932
+ }), a.appendChild(R);
3922
3933
  const T = document.createElement("div");
3923
3934
  T.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
3924
3935
  const d = document.createElement("h3");
3925
- d.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", d.innerText = B, T.appendChild(d);
3936
+ d.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", d.innerText = C, T.appendChild(d);
3926
3937
  const r = document.createElement("p");
3927
- r.className = "wgt:text-sm wgt:text-grey-8", r.innerHTML = `${a(
3938
+ r.className = "wgt:text-sm wgt:text-grey-8", r.innerHTML = `${i(
3928
3939
  "accountNumber"
3929
- )}: <span class="wgt:font-medium">${C}</span>`, T.appendChild(r);
3940
+ )}: <span class="wgt:font-medium">${B}</span>`, T.appendChild(r);
3930
3941
  const m = document.createElement("p");
3931
- m.className = "wgt:text-sm wgt:text-grey-8", m.innerHTML = `${a(
3942
+ m.className = "wgt:text-sm wgt:text-grey-8", m.innerHTML = `${i(
3932
3943
  "beneficiaryBank"
3933
- )}: <span class="wgt:font-medium">${Q}</span>`, T.appendChild(m), i.appendChild(T), w.appendChild(i), c.appendChild(w);
3944
+ )}: <span class="wgt:font-medium">${Q}</span>`, T.appendChild(m), a.appendChild(T), w.appendChild(a), c.appendChild(w);
3934
3945
  const Y = document.createElement("div");
3935
3946
  Y.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
3936
3947
  const l = document.createElement("div"), P = document.createElement("h3");
3937
- P.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", P.innerText = a("paymentInstructionsTitle"), l.appendChild(P);
3948
+ P.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", P.innerText = i("paymentInstructionsTitle"), l.appendChild(P);
3938
3949
  const f = document.createElement("ol");
3939
3950
  f.className = "wgt:space-y-4", t.forEach((H, J) => {
3940
3951
  const v = document.createElement("li");
@@ -3957,9 +3968,9 @@ function xE({
3957
3968
  H.qrSrc != null && (u.src = H.qrSrc), H.logos && (R.innerHTML = "", H.logos.forEach((J) => {
3958
3969
  const v = document.createElement("img");
3959
3970
  v.src = J, v.alt = "Logo", v.className = "wgt:w-8 wgt:object-contain", R.appendChild(v);
3960
- })), H.accountName != null && (d.innerText = H.accountName), H.accountNumber != null && (r.innerHTML = `${a(
3971
+ })), H.accountName != null && (d.innerText = H.accountName), H.accountNumber != null && (r.innerHTML = `${i(
3961
3972
  "accountNumber"
3962
- )}: <span class="wgt:font-medium">${H.accountNumber}</span>`), H.bankName != null && (m.innerHTML = `${a(
3973
+ )}: <span class="wgt:font-medium">${H.accountNumber}</span>`), H.bankName != null && (m.innerHTML = `${i(
3963
3974
  "beneficiaryBank"
3964
3975
  )}: <span class="wgt:font-medium">${H.bankName}</span>`), H.instructions && (f.innerHTML = "", H.instructions.forEach((J, v) => {
3965
3976
  const F = document.createElement("li");
@@ -3980,8 +3991,8 @@ function HE({
3980
3991
  qrSrc: g,
3981
3992
  logos: A = [],
3982
3993
  logosAbove: E = [],
3983
- accountName: B = "",
3984
- accountNumber: C = "",
3994
+ accountName: C = "",
3995
+ accountNumber: B = "",
3985
3996
  bankName: Q = "",
3986
3997
  instructions: t = [],
3987
3998
  illustrationSrc: I,
@@ -3991,8 +4002,8 @@ function HE({
3991
4002
  qrSrc: g,
3992
4003
  logos: A,
3993
4004
  logosAbove: E,
3994
- accountName: B,
3995
- accountNumber: C,
4005
+ accountName: C,
4006
+ accountNumber: B,
3996
4007
  bankName: Q,
3997
4008
  instructions: t,
3998
4009
  illustrationSrc: I,
@@ -4004,8 +4015,8 @@ function kE({
4004
4015
  selectedProvider: g = null,
4005
4016
  selectedInvoiceOtp: A = null,
4006
4017
  selectedSignatureOtp: E = null,
4007
- orderId: B = "",
4008
- totalAmountText: C = "",
4018
+ orderId: C = "",
4019
+ totalAmountText: B = "",
4009
4020
  selectedPromotions: Q,
4010
4021
  onResetToStep1: t
4011
4022
  } = {}) {
@@ -4025,13 +4036,13 @@ function kE({
4025
4036
  w.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
4026
4037
  const s = document.createElement("p");
4027
4038
  s.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
4028
- const i = (O) => {
4039
+ const a = (O) => {
4029
4040
  const e = Math.floor(O / 60), h = O % 60;
4030
4041
  return `${e.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
4031
4042
  }, o = () => {
4032
- s.innerHTML = `${a(
4043
+ s.innerHTML = `${i(
4033
4044
  "completePaymentIn"
4034
- )} <span class="wgt:font-bold">${i(n)}</span>`;
4045
+ )} <span class="wgt:font-bold">${a(n)}</span>`;
4035
4046
  };
4036
4047
  o();
4037
4048
  const D = () => {
@@ -4065,29 +4076,29 @@ function kE({
4065
4076
  const T = document.createElement("div");
4066
4077
  T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
4067
4078
  const d = document.createElement("h2");
4068
- d.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", d.innerText = a("orderInfo"), T.appendChild(d);
4079
+ d.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", d.innerText = i("orderInfo"), T.appendChild(d);
4069
4080
  const r = document.createElement("div");
4070
4081
  r.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4071
4082
  const m = document.createElement("h4");
4072
- m.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", m.innerText = a("provider");
4083
+ m.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", m.innerText = i("provider");
4073
4084
  const Y = document.createElement("img");
4074
4085
  g && g.logoUrl && (Y.src = g.logoUrl, Y.alt = g.name, Y.className = "wgt:h-6 wgt:object-contain"), r.appendChild(m), r.appendChild(Y), T.appendChild(r);
4075
4086
  const l = document.createElement("div");
4076
4087
  l.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4077
4088
  const P = document.createElement("h4");
4078
- P.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", P.innerText = a("subscriptionPackage");
4089
+ P.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", P.innerText = i("subscriptionPackage");
4079
4090
  const f = document.createElement("span");
4080
4091
  f.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", f.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", l.appendChild(P), l.appendChild(f), T.appendChild(l);
4081
4092
  const M = document.createElement("div");
4082
4093
  M.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4083
4094
  const k = document.createElement("h4");
4084
- k.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", k.innerText = a("digitalSignaturePackage");
4095
+ k.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", k.innerText = i("digitalSignaturePackage");
4085
4096
  const H = document.createElement("span");
4086
4097
  if (H.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", H.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", M.appendChild(k), M.appendChild(H), T.appendChild(M), Q && Q.length > 0) {
4087
4098
  const O = document.createElement("div");
4088
4099
  O.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
4089
4100
  const e = document.createElement("h4");
4090
- e.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", e.innerText = a("promotion");
4101
+ e.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", e.innerText = i("promotion");
4091
4102
  const h = document.createElement("div");
4092
4103
  h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((q) => {
4093
4104
  const x = document.createElement("div");
@@ -4099,17 +4110,17 @@ function kE({
4099
4110
  const v = document.createElement("div");
4100
4111
  v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4101
4112
  const F = document.createElement("h4");
4102
- F.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", F.innerText = a("paymentAmount");
4113
+ F.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", F.innerText = i("paymentAmount");
4103
4114
  const U = document.createElement("span");
4104
- U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, v.appendChild(F), v.appendChild(U), T.appendChild(v), R.appendChild(T);
4115
+ U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof B == "number" ? B.toLocaleString("vi-VN") + " VND" : B, v.appendChild(F), v.appendChild(U), T.appendChild(v), R.appendChild(T);
4105
4116
  const j = Ig({
4106
- title: a("cancelTransaction"),
4117
+ title: i("cancelTransaction"),
4107
4118
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
4108
4119
  handleClick: () => {
4109
4120
  c && (clearInterval(c), c = null);
4110
- const O = qB({
4111
- message: a("transactionCanceled"),
4112
- okLabel: a("ok"),
4121
+ const O = vB({
4122
+ message: i("transactionCanceled"),
4123
+ okLabel: i("ok"),
4113
4124
  onClose: () => W(null, null, function* () {
4114
4125
  n = 3600, c && (clearInterval(c), c = null), typeof t == "function" && (yield t());
4115
4126
  }),
@@ -4147,7 +4158,7 @@ function kE({
4147
4158
  }
4148
4159
  },
4149
4160
  setTotalAmountText(O) {
4150
- C = O;
4161
+ B = O;
4151
4162
  const e = I.querySelector(
4152
4163
  ".wgt:text-2xl.wgt:font-bold.wgt:leading-6.wgt:text-[#ED1C24]"
4153
4164
  );
@@ -4161,13 +4172,13 @@ function kE({
4161
4172
  }
4162
4173
  };
4163
4174
  }
4164
- var lg = {}, pg, DC;
4175
+ var lg = {}, Zg, DC;
4165
4176
  function RE() {
4166
- return DC || (DC = 1, pg = function() {
4177
+ return DC || (DC = 1, Zg = function() {
4167
4178
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
4168
- }), pg;
4179
+ }), Zg;
4169
4180
  }
4170
- var Zg = {}, Eg = {}, sC;
4181
+ var Vg = {}, Eg = {}, sC;
4171
4182
  function Dg() {
4172
4183
  if (sC) return Eg;
4173
4184
  sC = 1;
@@ -4216,29 +4227,29 @@ function Dg() {
4216
4227
  3532,
4217
4228
  3706
4218
4229
  ];
4219
- return Eg.getSymbolSize = function(B) {
4220
- if (!B) throw new Error('"version" cannot be null or undefined');
4221
- if (B < 1 || B > 40) throw new Error('"version" should be in range from 1 to 40');
4222
- return B * 4 + 17;
4223
- }, Eg.getSymbolTotalCodewords = function(B) {
4224
- return A[B];
4230
+ return Eg.getSymbolSize = function(C) {
4231
+ if (!C) throw new Error('"version" cannot be null or undefined');
4232
+ if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
4233
+ return C * 4 + 17;
4234
+ }, Eg.getSymbolTotalCodewords = function(C) {
4235
+ return A[C];
4225
4236
  }, Eg.getBCHDigit = function(E) {
4226
- let B = 0;
4237
+ let C = 0;
4227
4238
  for (; E !== 0; )
4228
- B++, E >>>= 1;
4229
- return B;
4230
- }, Eg.setToSJISFunction = function(B) {
4231
- if (typeof B != "function")
4239
+ C++, E >>>= 1;
4240
+ return C;
4241
+ }, Eg.setToSJISFunction = function(C) {
4242
+ if (typeof C != "function")
4232
4243
  throw new Error('"toSJISFunc" is not a valid function.');
4233
- g = B;
4244
+ g = C;
4234
4245
  }, Eg.isKanjiModeEnabled = function() {
4235
4246
  return typeof g != "undefined";
4236
- }, Eg.toSJIS = function(B) {
4237
- return g(B);
4247
+ }, Eg.toSJIS = function(C) {
4248
+ return g(C);
4238
4249
  }, Eg;
4239
4250
  }
4240
- var Vg = {}, fC;
4241
- function MB() {
4251
+ var Wg = {}, fC;
4252
+ function TB() {
4242
4253
  return fC || (fC = 1, function(g) {
4243
4254
  g.L = { bit: 1 }, g.M = { bit: 0 }, g.Q = { bit: 3 }, g.H = { bit: 2 };
4244
4255
  function A(E) {
@@ -4261,22 +4272,22 @@ function MB() {
4261
4272
  throw new Error("Unknown EC Level: " + E);
4262
4273
  }
4263
4274
  }
4264
- g.isValid = function(B) {
4265
- return B && typeof B.bit != "undefined" && B.bit >= 0 && B.bit < 4;
4266
- }, g.from = function(B, C) {
4267
- if (g.isValid(B))
4268
- return B;
4275
+ g.isValid = function(C) {
4276
+ return C && typeof C.bit != "undefined" && C.bit >= 0 && C.bit < 4;
4277
+ }, g.from = function(C, B) {
4278
+ if (g.isValid(C))
4279
+ return C;
4269
4280
  try {
4270
- return A(B);
4281
+ return A(C);
4271
4282
  } catch (Q) {
4272
- return C;
4283
+ return B;
4273
4284
  }
4274
4285
  };
4275
- }(Vg)), Vg;
4286
+ }(Wg)), Wg;
4276
4287
  }
4277
- var Wg, mC;
4288
+ var _g, mC;
4278
4289
  function YE() {
4279
- if (mC) return Wg;
4290
+ if (mC) return _g;
4280
4291
  mC = 1;
4281
4292
  function g() {
4282
4293
  this.buffer = [], this.length = 0;
@@ -4287,8 +4298,8 @@ function YE() {
4287
4298
  return (this.buffer[E] >>> 7 - A % 8 & 1) === 1;
4288
4299
  },
4289
4300
  put: function(A, E) {
4290
- for (let B = 0; B < E; B++)
4291
- this.putBit((A >>> E - B - 1 & 1) === 1);
4301
+ for (let C = 0; C < E; C++)
4302
+ this.putBit((A >>> E - C - 1 & 1) === 1);
4292
4303
  },
4293
4304
  getLengthInBits: function() {
4294
4305
  return this.length;
@@ -4297,67 +4308,67 @@ function YE() {
4297
4308
  const E = Math.floor(this.length / 8);
4298
4309
  this.buffer.length <= E && this.buffer.push(0), A && (this.buffer[E] |= 128 >>> this.length % 8), this.length++;
4299
4310
  }
4300
- }, Wg = g, Wg;
4311
+ }, _g = g, _g;
4301
4312
  }
4302
- var _g, rC;
4313
+ var $g, rC;
4303
4314
  function JE() {
4304
- if (rC) return _g;
4315
+ if (rC) return $g;
4305
4316
  rC = 1;
4306
4317
  function g(A) {
4307
4318
  if (!A || A < 1)
4308
4319
  throw new Error("BitMatrix size must be defined and greater than 0");
4309
4320
  this.size = A, this.data = new Uint8Array(A * A), this.reservedBit = new Uint8Array(A * A);
4310
4321
  }
4311
- return g.prototype.set = function(A, E, B, C) {
4322
+ return g.prototype.set = function(A, E, C, B) {
4312
4323
  const Q = A * this.size + E;
4313
- this.data[Q] = B, C && (this.reservedBit[Q] = !0);
4324
+ this.data[Q] = C, B && (this.reservedBit[Q] = !0);
4314
4325
  }, g.prototype.get = function(A, E) {
4315
4326
  return this.data[A * this.size + E];
4316
- }, g.prototype.xor = function(A, E, B) {
4317
- this.data[A * this.size + E] ^= B;
4327
+ }, g.prototype.xor = function(A, E, C) {
4328
+ this.data[A * this.size + E] ^= C;
4318
4329
  }, g.prototype.isReserved = function(A, E) {
4319
4330
  return this.reservedBit[A * this.size + E];
4320
- }, _g = g, _g;
4331
+ }, $g = g, $g;
4321
4332
  }
4322
- var $g = {}, PC;
4333
+ var AB = {}, PC;
4323
4334
  function XE() {
4324
4335
  return PC || (PC = 1, function(g) {
4325
4336
  const A = Dg().getSymbolSize;
4326
- g.getRowColCoords = function(B) {
4327
- if (B === 1) return [];
4328
- const C = Math.floor(B / 7) + 2, Q = A(B), t = Q === 145 ? 26 : Math.ceil((Q - 13) / (2 * C - 2)) * 2, I = [Q - 7];
4329
- for (let n = 1; n < C - 1; n++)
4337
+ g.getRowColCoords = function(C) {
4338
+ if (C === 1) return [];
4339
+ const B = Math.floor(C / 7) + 2, Q = A(C), t = Q === 145 ? 26 : Math.ceil((Q - 13) / (2 * B - 2)) * 2, I = [Q - 7];
4340
+ for (let n = 1; n < B - 1; n++)
4330
4341
  I[n] = I[n - 1] - t;
4331
4342
  return I.push(6), I.reverse();
4332
- }, g.getPositions = function(B) {
4333
- const C = [], Q = g.getRowColCoords(B), t = Q.length;
4343
+ }, g.getPositions = function(C) {
4344
+ const B = [], Q = g.getRowColCoords(C), t = Q.length;
4334
4345
  for (let I = 0; I < t; I++)
4335
4346
  for (let n = 0; n < t; n++)
4336
4347
  I === 0 && n === 0 || // top-left
4337
4348
  I === 0 && n === t - 1 || // bottom-left
4338
- I === t - 1 && n === 0 || C.push([Q[I], Q[n]]);
4339
- return C;
4349
+ I === t - 1 && n === 0 || B.push([Q[I], Q[n]]);
4350
+ return B;
4340
4351
  };
4341
- }($g)), $g;
4352
+ }(AB)), AB;
4342
4353
  }
4343
- var AB = {}, qC;
4354
+ var gB = {}, qC;
4344
4355
  function FE() {
4345
- if (qC) return AB;
4356
+ if (qC) return gB;
4346
4357
  qC = 1;
4347
4358
  const g = Dg().getSymbolSize, A = 7;
4348
- return AB.getPositions = function(B) {
4349
- const C = g(B);
4359
+ return gB.getPositions = function(C) {
4360
+ const B = g(C);
4350
4361
  return [
4351
4362
  // top-left
4352
4363
  [0, 0],
4353
4364
  // top-right
4354
- [C - A, 0],
4365
+ [B - A, 0],
4355
4366
  // bottom-left
4356
- [0, C - A]
4367
+ [0, B - A]
4357
4368
  ];
4358
- }, AB;
4369
+ }, gB;
4359
4370
  }
4360
- var gB = {}, vC;
4371
+ var BB = {}, vC;
4361
4372
  function OE() {
4362
4373
  return vC || (vC = 1, function(g) {
4363
4374
  g.Patterns = {
@@ -4376,90 +4387,90 @@ function OE() {
4376
4387
  N3: 40,
4377
4388
  N4: 10
4378
4389
  };
4379
- g.isValid = function(C) {
4380
- return C != null && C !== "" && !isNaN(C) && C >= 0 && C <= 7;
4381
- }, g.from = function(C) {
4382
- return g.isValid(C) ? parseInt(C, 10) : void 0;
4383
- }, g.getPenaltyN1 = function(C) {
4384
- const Q = C.size;
4390
+ g.isValid = function(B) {
4391
+ return B != null && B !== "" && !isNaN(B) && B >= 0 && B <= 7;
4392
+ }, g.from = function(B) {
4393
+ return g.isValid(B) ? parseInt(B, 10) : void 0;
4394
+ }, g.getPenaltyN1 = function(B) {
4395
+ const Q = B.size;
4385
4396
  let t = 0, I = 0, n = 0, c = null, w = null;
4386
4397
  for (let s = 0; s < Q; s++) {
4387
4398
  I = n = 0, c = w = null;
4388
- for (let i = 0; i < Q; i++) {
4389
- let o = C.get(s, i);
4390
- o === c ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), c = o, I = 1), o = C.get(i, s), o === w ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), w = o, n = 1);
4399
+ for (let a = 0; a < Q; a++) {
4400
+ let o = B.get(s, a);
4401
+ o === c ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), c = o, I = 1), o = B.get(a, s), o === w ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), w = o, n = 1);
4391
4402
  }
4392
4403
  I >= 5 && (t += A.N1 + (I - 5)), n >= 5 && (t += A.N1 + (n - 5));
4393
4404
  }
4394
4405
  return t;
4395
- }, g.getPenaltyN2 = function(C) {
4396
- const Q = C.size;
4406
+ }, g.getPenaltyN2 = function(B) {
4407
+ const Q = B.size;
4397
4408
  let t = 0;
4398
4409
  for (let I = 0; I < Q - 1; I++)
4399
4410
  for (let n = 0; n < Q - 1; n++) {
4400
- const c = C.get(I, n) + C.get(I, n + 1) + C.get(I + 1, n) + C.get(I + 1, n + 1);
4411
+ const c = B.get(I, n) + B.get(I, n + 1) + B.get(I + 1, n) + B.get(I + 1, n + 1);
4401
4412
  (c === 4 || c === 0) && t++;
4402
4413
  }
4403
4414
  return t * A.N2;
4404
- }, g.getPenaltyN3 = function(C) {
4405
- const Q = C.size;
4415
+ }, g.getPenaltyN3 = function(B) {
4416
+ const Q = B.size;
4406
4417
  let t = 0, I = 0, n = 0;
4407
4418
  for (let c = 0; c < Q; c++) {
4408
4419
  I = n = 0;
4409
4420
  for (let w = 0; w < Q; w++)
4410
- I = I << 1 & 2047 | C.get(c, w), w >= 10 && (I === 1488 || I === 93) && t++, n = n << 1 & 2047 | C.get(w, c), w >= 10 && (n === 1488 || n === 93) && t++;
4421
+ I = I << 1 & 2047 | B.get(c, w), w >= 10 && (I === 1488 || I === 93) && t++, n = n << 1 & 2047 | B.get(w, c), w >= 10 && (n === 1488 || n === 93) && t++;
4411
4422
  }
4412
4423
  return t * A.N3;
4413
- }, g.getPenaltyN4 = function(C) {
4424
+ }, g.getPenaltyN4 = function(B) {
4414
4425
  let Q = 0;
4415
- const t = C.data.length;
4416
- for (let n = 0; n < t; n++) Q += C.data[n];
4426
+ const t = B.data.length;
4427
+ for (let n = 0; n < t; n++) Q += B.data[n];
4417
4428
  return Math.abs(Math.ceil(Q * 100 / t / 5) - 10) * A.N4;
4418
4429
  };
4419
- function E(B, C, Q) {
4420
- switch (B) {
4430
+ function E(C, B, Q) {
4431
+ switch (C) {
4421
4432
  case g.Patterns.PATTERN000:
4422
- return (C + Q) % 2 === 0;
4433
+ return (B + Q) % 2 === 0;
4423
4434
  case g.Patterns.PATTERN001:
4424
- return C % 2 === 0;
4435
+ return B % 2 === 0;
4425
4436
  case g.Patterns.PATTERN010:
4426
4437
  return Q % 3 === 0;
4427
4438
  case g.Patterns.PATTERN011:
4428
- return (C + Q) % 3 === 0;
4439
+ return (B + Q) % 3 === 0;
4429
4440
  case g.Patterns.PATTERN100:
4430
- return (Math.floor(C / 2) + Math.floor(Q / 3)) % 2 === 0;
4441
+ return (Math.floor(B / 2) + Math.floor(Q / 3)) % 2 === 0;
4431
4442
  case g.Patterns.PATTERN101:
4432
- return C * Q % 2 + C * Q % 3 === 0;
4443
+ return B * Q % 2 + B * Q % 3 === 0;
4433
4444
  case g.Patterns.PATTERN110:
4434
- return (C * Q % 2 + C * Q % 3) % 2 === 0;
4445
+ return (B * Q % 2 + B * Q % 3) % 2 === 0;
4435
4446
  case g.Patterns.PATTERN111:
4436
- return (C * Q % 3 + (C + Q) % 2) % 2 === 0;
4447
+ return (B * Q % 3 + (B + Q) % 2) % 2 === 0;
4437
4448
  default:
4438
- throw new Error("bad maskPattern:" + B);
4449
+ throw new Error("bad maskPattern:" + C);
4439
4450
  }
4440
4451
  }
4441
- g.applyMask = function(C, Q) {
4452
+ g.applyMask = function(B, Q) {
4442
4453
  const t = Q.size;
4443
4454
  for (let I = 0; I < t; I++)
4444
4455
  for (let n = 0; n < t; n++)
4445
- Q.isReserved(n, I) || Q.xor(n, I, E(C, n, I));
4446
- }, g.getBestMask = function(C, Q) {
4456
+ Q.isReserved(n, I) || Q.xor(n, I, E(B, n, I));
4457
+ }, g.getBestMask = function(B, Q) {
4447
4458
  const t = Object.keys(g.Patterns).length;
4448
4459
  let I = 0, n = 1 / 0;
4449
4460
  for (let c = 0; c < t; c++) {
4450
- Q(c), g.applyMask(c, C);
4451
- const w = g.getPenaltyN1(C) + g.getPenaltyN2(C) + g.getPenaltyN3(C) + g.getPenaltyN4(C);
4452
- g.applyMask(c, C), w < n && (n = w, I = c);
4461
+ Q(c), g.applyMask(c, B);
4462
+ const w = g.getPenaltyN1(B) + g.getPenaltyN2(B) + g.getPenaltyN3(B) + g.getPenaltyN4(B);
4463
+ g.applyMask(c, B), w < n && (n = w, I = c);
4453
4464
  }
4454
4465
  return I;
4455
4466
  };
4456
- }(gB)), gB;
4467
+ }(BB)), BB;
4457
4468
  }
4458
4469
  var Gg = {}, MC;
4459
4470
  function gQ() {
4460
4471
  if (MC) return Gg;
4461
4472
  MC = 1;
4462
- const g = MB(), A = [
4473
+ const g = TB(), A = [
4463
4474
  // L M Q H
4464
4475
  1,
4465
4476
  1,
@@ -4784,111 +4795,111 @@ function gQ() {
4784
4795
  2040,
4785
4796
  2430
4786
4797
  ];
4787
- return Gg.getBlocksCount = function(C, Q) {
4798
+ return Gg.getBlocksCount = function(B, Q) {
4788
4799
  switch (Q) {
4789
4800
  case g.L:
4790
- return A[(C - 1) * 4 + 0];
4801
+ return A[(B - 1) * 4 + 0];
4791
4802
  case g.M:
4792
- return A[(C - 1) * 4 + 1];
4803
+ return A[(B - 1) * 4 + 1];
4793
4804
  case g.Q:
4794
- return A[(C - 1) * 4 + 2];
4805
+ return A[(B - 1) * 4 + 2];
4795
4806
  case g.H:
4796
- return A[(C - 1) * 4 + 3];
4807
+ return A[(B - 1) * 4 + 3];
4797
4808
  default:
4798
4809
  return;
4799
4810
  }
4800
- }, Gg.getTotalCodewordsCount = function(C, Q) {
4811
+ }, Gg.getTotalCodewordsCount = function(B, Q) {
4801
4812
  switch (Q) {
4802
4813
  case g.L:
4803
- return E[(C - 1) * 4 + 0];
4814
+ return E[(B - 1) * 4 + 0];
4804
4815
  case g.M:
4805
- return E[(C - 1) * 4 + 1];
4816
+ return E[(B - 1) * 4 + 1];
4806
4817
  case g.Q:
4807
- return E[(C - 1) * 4 + 2];
4818
+ return E[(B - 1) * 4 + 2];
4808
4819
  case g.H:
4809
- return E[(C - 1) * 4 + 3];
4820
+ return E[(B - 1) * 4 + 3];
4810
4821
  default:
4811
4822
  return;
4812
4823
  }
4813
4824
  }, Gg;
4814
4825
  }
4815
- var BB = {}, Hg = {}, TC;
4826
+ var CB = {}, Hg = {}, TC;
4816
4827
  function GE() {
4817
4828
  if (TC) return Hg;
4818
4829
  TC = 1;
4819
4830
  const g = new Uint8Array(512), A = new Uint8Array(256);
4820
4831
  return function() {
4821
- let B = 1;
4822
- for (let C = 0; C < 255; C++)
4823
- g[C] = B, A[B] = C, B <<= 1, B & 256 && (B ^= 285);
4824
- for (let C = 255; C < 512; C++)
4825
- g[C] = g[C - 255];
4826
- }(), Hg.log = function(B) {
4827
- if (B < 1) throw new Error("log(" + B + ")");
4828
- return A[B];
4829
- }, Hg.exp = function(B) {
4830
- return g[B];
4831
- }, Hg.mul = function(B, C) {
4832
- return B === 0 || C === 0 ? 0 : g[A[B] + A[C]];
4832
+ let C = 1;
4833
+ for (let B = 0; B < 255; B++)
4834
+ g[B] = C, A[C] = B, C <<= 1, C & 256 && (C ^= 285);
4835
+ for (let B = 255; B < 512; B++)
4836
+ g[B] = g[B - 255];
4837
+ }(), Hg.log = function(C) {
4838
+ if (C < 1) throw new Error("log(" + C + ")");
4839
+ return A[C];
4840
+ }, Hg.exp = function(C) {
4841
+ return g[C];
4842
+ }, Hg.mul = function(C, B) {
4843
+ return C === 0 || B === 0 ? 0 : g[A[C] + A[B]];
4833
4844
  }, Hg;
4834
4845
  }
4835
4846
  var lC;
4836
4847
  function LE() {
4837
4848
  return lC || (lC = 1, function(g) {
4838
4849
  const A = GE();
4839
- g.mul = function(B, C) {
4840
- const Q = new Uint8Array(B.length + C.length - 1);
4841
- for (let t = 0; t < B.length; t++)
4842
- for (let I = 0; I < C.length; I++)
4843
- Q[t + I] ^= A.mul(B[t], C[I]);
4850
+ g.mul = function(C, B) {
4851
+ const Q = new Uint8Array(C.length + B.length - 1);
4852
+ for (let t = 0; t < C.length; t++)
4853
+ for (let I = 0; I < B.length; I++)
4854
+ Q[t + I] ^= A.mul(C[t], B[I]);
4844
4855
  return Q;
4845
- }, g.mod = function(B, C) {
4846
- let Q = new Uint8Array(B);
4847
- for (; Q.length - C.length >= 0; ) {
4856
+ }, g.mod = function(C, B) {
4857
+ let Q = new Uint8Array(C);
4858
+ for (; Q.length - B.length >= 0; ) {
4848
4859
  const t = Q[0];
4849
- for (let n = 0; n < C.length; n++)
4850
- Q[n] ^= A.mul(C[n], t);
4860
+ for (let n = 0; n < B.length; n++)
4861
+ Q[n] ^= A.mul(B[n], t);
4851
4862
  let I = 0;
4852
4863
  for (; I < Q.length && Q[I] === 0; ) I++;
4853
4864
  Q = Q.slice(I);
4854
4865
  }
4855
4866
  return Q;
4856
- }, g.generateECPolynomial = function(B) {
4857
- let C = new Uint8Array([1]);
4858
- for (let Q = 0; Q < B; Q++)
4859
- C = g.mul(C, new Uint8Array([1, A.exp(Q)]));
4860
- return C;
4867
+ }, g.generateECPolynomial = function(C) {
4868
+ let B = new Uint8Array([1]);
4869
+ for (let Q = 0; Q < C; Q++)
4870
+ B = g.mul(B, new Uint8Array([1, A.exp(Q)]));
4871
+ return B;
4861
4872
  };
4862
- }(BB)), BB;
4873
+ }(CB)), CB;
4863
4874
  }
4864
- var CB, dC;
4875
+ var QB, dC;
4865
4876
  function zE() {
4866
- if (dC) return CB;
4877
+ if (dC) return QB;
4867
4878
  dC = 1;
4868
4879
  const g = LE();
4869
4880
  function A(E) {
4870
4881
  this.genPoly = void 0, this.degree = E, this.degree && this.initialize(this.degree);
4871
4882
  }
4872
- return A.prototype.initialize = function(B) {
4873
- this.degree = B, this.genPoly = g.generateECPolynomial(this.degree);
4874
- }, A.prototype.encode = function(B) {
4883
+ return A.prototype.initialize = function(C) {
4884
+ this.degree = C, this.genPoly = g.generateECPolynomial(this.degree);
4885
+ }, A.prototype.encode = function(C) {
4875
4886
  if (!this.genPoly)
4876
4887
  throw new Error("Encoder not initialized");
4877
- const C = new Uint8Array(B.length + this.degree);
4878
- C.set(B);
4879
- const Q = g.mod(C, this.genPoly), t = this.degree - Q.length;
4888
+ const B = new Uint8Array(C.length + this.degree);
4889
+ B.set(C);
4890
+ const Q = g.mod(B, this.genPoly), t = this.degree - Q.length;
4880
4891
  if (t > 0) {
4881
4892
  const I = new Uint8Array(this.degree);
4882
4893
  return I.set(Q, t), I;
4883
4894
  }
4884
4895
  return Q;
4885
- }, CB = A, CB;
4896
+ }, QB = A, QB;
4886
4897
  }
4887
- var QB = {}, EB = {}, IB = {}, xC;
4898
+ var EB = {}, IB = {}, nB = {}, xC;
4888
4899
  function BQ() {
4889
- return xC || (xC = 1, IB.isValid = function(A) {
4900
+ return xC || (xC = 1, nB.isValid = function(A) {
4890
4901
  return !isNaN(A) && A >= 1 && A <= 40;
4891
- }), IB;
4902
+ }), nB;
4892
4903
  }
4893
4904
  var pA = {}, HC;
4894
4905
  function CQ() {
@@ -4897,12 +4908,12 @@ function CQ() {
4897
4908
  const g = "[0-9]+", A = "[A-Z $%*+\\-./:]+";
4898
4909
  let E = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
4899
4910
  E = E.replace(/u/g, "\\u");
4900
- const B = "(?:(?![A-Z0-9 $%*+\\-./:]|" + E + `)(?:.|[\r
4911
+ const C = "(?:(?![A-Z0-9 $%*+\\-./:]|" + E + `)(?:.|[\r
4901
4912
  ]))+`;
4902
- pA.KANJI = new RegExp(E, "g"), pA.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), pA.BYTE = new RegExp(B, "g"), pA.NUMERIC = new RegExp(g, "g"), pA.ALPHANUMERIC = new RegExp(A, "g");
4903
- const C = new RegExp("^" + E + "$"), Q = new RegExp("^" + g + "$"), t = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
4913
+ pA.KANJI = new RegExp(E, "g"), pA.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), pA.BYTE = new RegExp(C, "g"), pA.NUMERIC = new RegExp(g, "g"), pA.ALPHANUMERIC = new RegExp(A, "g");
4914
+ const B = new RegExp("^" + E + "$"), Q = new RegExp("^" + g + "$"), t = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
4904
4915
  return pA.testKanji = function(n) {
4905
- return C.test(n);
4916
+ return B.test(n);
4906
4917
  }, pA.testNumeric = function(n) {
4907
4918
  return Q.test(n);
4908
4919
  }, pA.testAlphanumeric = function(n) {
@@ -4944,10 +4955,10 @@ function sg() {
4944
4955
  }, g.isValid = function(Q) {
4945
4956
  return Q && Q.bit && Q.ccBits;
4946
4957
  };
4947
- function B(C) {
4948
- if (typeof C != "string")
4958
+ function C(B) {
4959
+ if (typeof B != "string")
4949
4960
  throw new Error("Param is not a string");
4950
- switch (C.toLowerCase()) {
4961
+ switch (B.toLowerCase()) {
4951
4962
  case "numeric":
4952
4963
  return g.NUMERIC;
4953
4964
  case "alphanumeric":
@@ -4957,42 +4968,42 @@ function sg() {
4957
4968
  case "byte":
4958
4969
  return g.BYTE;
4959
4970
  default:
4960
- throw new Error("Unknown mode: " + C);
4971
+ throw new Error("Unknown mode: " + B);
4961
4972
  }
4962
4973
  }
4963
4974
  g.from = function(Q, t) {
4964
4975
  if (g.isValid(Q))
4965
4976
  return Q;
4966
4977
  try {
4967
- return B(Q);
4978
+ return C(Q);
4968
4979
  } catch (I) {
4969
4980
  return t;
4970
4981
  }
4971
4982
  };
4972
- }(EB)), EB;
4983
+ }(IB)), IB;
4973
4984
  }
4974
4985
  var RC;
4975
4986
  function NE() {
4976
4987
  return RC || (RC = 1, function(g) {
4977
- const A = Dg(), E = gQ(), B = MB(), C = sg(), Q = BQ(), t = 7973, I = A.getBCHDigit(t);
4978
- function n(i, o, D) {
4988
+ const A = Dg(), E = gQ(), C = TB(), B = sg(), Q = BQ(), t = 7973, I = A.getBCHDigit(t);
4989
+ function n(a, o, D) {
4979
4990
  for (let u = 1; u <= 40; u++)
4980
- if (o <= g.getCapacity(u, D, i))
4991
+ if (o <= g.getCapacity(u, D, a))
4981
4992
  return u;
4982
4993
  }
4983
- function c(i, o) {
4984
- return C.getCharCountIndicator(i, o) + 4;
4994
+ function c(a, o) {
4995
+ return B.getCharCountIndicator(a, o) + 4;
4985
4996
  }
4986
- function w(i, o) {
4997
+ function w(a, o) {
4987
4998
  let D = 0;
4988
- return i.forEach(function(u) {
4999
+ return a.forEach(function(u) {
4989
5000
  const R = c(u.mode, o);
4990
5001
  D += R + u.getBitsLength();
4991
5002
  }), D;
4992
5003
  }
4993
- function s(i, o) {
5004
+ function s(a, o) {
4994
5005
  for (let D = 1; D <= 40; D++)
4995
- if (w(i, D) <= g.getCapacity(D, o, C.MIXED))
5006
+ if (w(a, D) <= g.getCapacity(D, o, B.MIXED))
4996
5007
  return D;
4997
5008
  }
4998
5009
  g.from = function(o, D) {
@@ -5000,24 +5011,24 @@ function NE() {
5000
5011
  }, g.getCapacity = function(o, D, u) {
5001
5012
  if (!Q.isValid(o))
5002
5013
  throw new Error("Invalid QR Code version");
5003
- typeof u == "undefined" && (u = C.BYTE);
5014
+ typeof u == "undefined" && (u = B.BYTE);
5004
5015
  const R = A.getSymbolTotalCodewords(o), T = E.getTotalCodewordsCount(o, D), d = (R - T) * 8;
5005
- if (u === C.MIXED) return d;
5016
+ if (u === B.MIXED) return d;
5006
5017
  const r = d - c(u, o);
5007
5018
  switch (u) {
5008
- case C.NUMERIC:
5019
+ case B.NUMERIC:
5009
5020
  return Math.floor(r / 10 * 3);
5010
- case C.ALPHANUMERIC:
5021
+ case B.ALPHANUMERIC:
5011
5022
  return Math.floor(r / 11 * 2);
5012
- case C.KANJI:
5023
+ case B.KANJI:
5013
5024
  return Math.floor(r / 13);
5014
- case C.BYTE:
5025
+ case B.BYTE:
5015
5026
  default:
5016
5027
  return Math.floor(r / 8);
5017
5028
  }
5018
5029
  }, g.getBestVersionForData = function(o, D) {
5019
5030
  let u;
5020
- const R = B.from(D, B.M);
5031
+ const R = C.from(D, C.M);
5021
5032
  if (Array.isArray(o)) {
5022
5033
  if (o.length > 1)
5023
5034
  return s(o, R);
@@ -5035,46 +5046,46 @@ function NE() {
5035
5046
  D ^= t << A.getBCHDigit(D) - I;
5036
5047
  return o << 12 | D;
5037
5048
  };
5038
- }(QB)), QB;
5049
+ }(EB)), EB;
5039
5050
  }
5040
- var nB = {}, YC;
5051
+ var tB = {}, YC;
5041
5052
  function bE() {
5042
- if (YC) return nB;
5053
+ if (YC) return tB;
5043
5054
  YC = 1;
5044
- const g = Dg(), A = 1335, E = 21522, B = g.getBCHDigit(A);
5045
- return nB.getEncodedBits = function(Q, t) {
5055
+ const g = Dg(), A = 1335, E = 21522, C = g.getBCHDigit(A);
5056
+ return tB.getEncodedBits = function(Q, t) {
5046
5057
  const I = Q.bit << 3 | t;
5047
5058
  let n = I << 10;
5048
- for (; g.getBCHDigit(n) - B >= 0; )
5049
- n ^= A << g.getBCHDigit(n) - B;
5059
+ for (; g.getBCHDigit(n) - C >= 0; )
5060
+ n ^= A << g.getBCHDigit(n) - C;
5050
5061
  return (I << 10 | n) ^ E;
5051
- }, nB;
5062
+ }, tB;
5052
5063
  }
5053
- var tB = {}, hB, JC;
5064
+ var hB = {}, cB, JC;
5054
5065
  function jE() {
5055
- if (JC) return hB;
5066
+ if (JC) return cB;
5056
5067
  JC = 1;
5057
5068
  const g = sg();
5058
5069
  function A(E) {
5059
5070
  this.mode = g.NUMERIC, this.data = E.toString();
5060
5071
  }
5061
- return A.getBitsLength = function(B) {
5062
- return 10 * Math.floor(B / 3) + (B % 3 ? B % 3 * 3 + 1 : 0);
5072
+ return A.getBitsLength = function(C) {
5073
+ return 10 * Math.floor(C / 3) + (C % 3 ? C % 3 * 3 + 1 : 0);
5063
5074
  }, A.prototype.getLength = function() {
5064
5075
  return this.data.length;
5065
5076
  }, A.prototype.getBitsLength = function() {
5066
5077
  return A.getBitsLength(this.data.length);
5067
- }, A.prototype.write = function(B) {
5068
- let C, Q, t;
5069
- for (C = 0; C + 3 <= this.data.length; C += 3)
5070
- Q = this.data.substr(C, 3), t = parseInt(Q, 10), B.put(t, 10);
5071
- const I = this.data.length - C;
5072
- I > 0 && (Q = this.data.substr(C), t = parseInt(Q, 10), B.put(t, I * 3 + 1));
5073
- }, hB = A, hB;
5078
+ }, A.prototype.write = function(C) {
5079
+ let B, Q, t;
5080
+ for (B = 0; B + 3 <= this.data.length; B += 3)
5081
+ Q = this.data.substr(B, 3), t = parseInt(Q, 10), C.put(t, 10);
5082
+ const I = this.data.length - B;
5083
+ I > 0 && (Q = this.data.substr(B), t = parseInt(Q, 10), C.put(t, I * 3 + 1));
5084
+ }, cB = A, cB;
5074
5085
  }
5075
- var cB, XC;
5086
+ var wB, XC;
5076
5087
  function yE() {
5077
- if (XC) return cB;
5088
+ if (XC) return wB;
5078
5089
  XC = 1;
5079
5090
  const g = sg(), A = [
5080
5091
  "0",
@@ -5123,104 +5134,104 @@ function yE() {
5123
5134
  "/",
5124
5135
  ":"
5125
5136
  ];
5126
- function E(B) {
5127
- this.mode = g.ALPHANUMERIC, this.data = B;
5137
+ function E(C) {
5138
+ this.mode = g.ALPHANUMERIC, this.data = C;
5128
5139
  }
5129
- return E.getBitsLength = function(C) {
5130
- return 11 * Math.floor(C / 2) + 6 * (C % 2);
5140
+ return E.getBitsLength = function(B) {
5141
+ return 11 * Math.floor(B / 2) + 6 * (B % 2);
5131
5142
  }, E.prototype.getLength = function() {
5132
5143
  return this.data.length;
5133
5144
  }, E.prototype.getBitsLength = function() {
5134
5145
  return E.getBitsLength(this.data.length);
5135
- }, E.prototype.write = function(C) {
5146
+ }, E.prototype.write = function(B) {
5136
5147
  let Q;
5137
5148
  for (Q = 0; Q + 2 <= this.data.length; Q += 2) {
5138
5149
  let t = A.indexOf(this.data[Q]) * 45;
5139
- t += A.indexOf(this.data[Q + 1]), C.put(t, 11);
5150
+ t += A.indexOf(this.data[Q + 1]), B.put(t, 11);
5140
5151
  }
5141
- this.data.length % 2 && C.put(A.indexOf(this.data[Q]), 6);
5142
- }, cB = E, cB;
5152
+ this.data.length % 2 && B.put(A.indexOf(this.data[Q]), 6);
5153
+ }, wB = E, wB;
5143
5154
  }
5144
- var wB, FC;
5155
+ var eB, FC;
5145
5156
  function KE() {
5146
- if (FC) return wB;
5157
+ if (FC) return eB;
5147
5158
  FC = 1;
5148
5159
  const g = sg();
5149
5160
  function A(E) {
5150
5161
  this.mode = g.BYTE, typeof E == "string" ? this.data = new TextEncoder().encode(E) : this.data = new Uint8Array(E);
5151
5162
  }
5152
- return A.getBitsLength = function(B) {
5153
- return B * 8;
5163
+ return A.getBitsLength = function(C) {
5164
+ return C * 8;
5154
5165
  }, A.prototype.getLength = function() {
5155
5166
  return this.data.length;
5156
5167
  }, A.prototype.getBitsLength = function() {
5157
5168
  return A.getBitsLength(this.data.length);
5158
5169
  }, A.prototype.write = function(E) {
5159
- for (let B = 0, C = this.data.length; B < C; B++)
5160
- E.put(this.data[B], 8);
5161
- }, wB = A, wB;
5170
+ for (let C = 0, B = this.data.length; C < B; C++)
5171
+ E.put(this.data[C], 8);
5172
+ }, eB = A, eB;
5162
5173
  }
5163
- var eB, OC;
5174
+ var oB, OC;
5164
5175
  function UE() {
5165
- if (OC) return eB;
5176
+ if (OC) return oB;
5166
5177
  OC = 1;
5167
5178
  const g = sg(), A = Dg();
5168
- function E(B) {
5169
- this.mode = g.KANJI, this.data = B;
5179
+ function E(C) {
5180
+ this.mode = g.KANJI, this.data = C;
5170
5181
  }
5171
- return E.getBitsLength = function(C) {
5172
- return C * 13;
5182
+ return E.getBitsLength = function(B) {
5183
+ return B * 13;
5173
5184
  }, E.prototype.getLength = function() {
5174
5185
  return this.data.length;
5175
5186
  }, E.prototype.getBitsLength = function() {
5176
5187
  return E.getBitsLength(this.data.length);
5177
- }, E.prototype.write = function(B) {
5178
- let C;
5179
- for (C = 0; C < this.data.length; C++) {
5180
- let Q = A.toSJIS(this.data[C]);
5188
+ }, E.prototype.write = function(C) {
5189
+ let B;
5190
+ for (B = 0; B < this.data.length; B++) {
5191
+ let Q = A.toSJIS(this.data[B]);
5181
5192
  if (Q >= 33088 && Q <= 40956)
5182
5193
  Q -= 33088;
5183
5194
  else if (Q >= 57408 && Q <= 60351)
5184
5195
  Q -= 49472;
5185
5196
  else
5186
5197
  throw new Error(
5187
- "Invalid SJIS character: " + this.data[C] + `
5198
+ "Invalid SJIS character: " + this.data[B] + `
5188
5199
  Make sure your charset is UTF-8`
5189
5200
  );
5190
- Q = (Q >>> 8 & 255) * 192 + (Q & 255), B.put(Q, 13);
5201
+ Q = (Q >>> 8 & 255) * 192 + (Q & 255), C.put(Q, 13);
5191
5202
  }
5192
- }, eB = E, eB;
5203
+ }, oB = E, oB;
5193
5204
  }
5194
- var oB = { exports: {} }, GC;
5205
+ var aB = { exports: {} }, GC;
5195
5206
  function SE() {
5196
5207
  return GC || (GC = 1, function(g) {
5197
5208
  var A = {
5198
- single_source_shortest_paths: function(E, B, C) {
5209
+ single_source_shortest_paths: function(E, C, B) {
5199
5210
  var Q = {}, t = {};
5200
- t[B] = 0;
5211
+ t[C] = 0;
5201
5212
  var I = A.PriorityQueue.make();
5202
- I.push(B, 0);
5203
- for (var n, c, w, s, i, o, D, u, R; !I.empty(); ) {
5204
- n = I.pop(), c = n.value, s = n.cost, i = E[c] || {};
5205
- for (w in i)
5206
- i.hasOwnProperty(w) && (o = i[w], D = s + o, u = t[w], R = typeof t[w] == "undefined", (R || u > D) && (t[w] = D, I.push(w, D), Q[w] = c));
5213
+ I.push(C, 0);
5214
+ for (var n, c, w, s, a, o, D, u, R; !I.empty(); ) {
5215
+ n = I.pop(), c = n.value, s = n.cost, a = E[c] || {};
5216
+ for (w in a)
5217
+ a.hasOwnProperty(w) && (o = a[w], D = s + o, u = t[w], R = typeof t[w] == "undefined", (R || u > D) && (t[w] = D, I.push(w, D), Q[w] = c));
5207
5218
  }
5208
- if (typeof C != "undefined" && typeof t[C] == "undefined") {
5209
- var T = ["Could not find a path from ", B, " to ", C, "."].join("");
5219
+ if (typeof B != "undefined" && typeof t[B] == "undefined") {
5220
+ var T = ["Could not find a path from ", C, " to ", B, "."].join("");
5210
5221
  throw new Error(T);
5211
5222
  }
5212
5223
  return Q;
5213
5224
  },
5214
- extract_shortest_path_from_predecessor_list: function(E, B) {
5215
- for (var C = [], Q = B; Q; )
5216
- C.push(Q), E[Q], Q = E[Q];
5217
- return C.reverse(), C;
5225
+ extract_shortest_path_from_predecessor_list: function(E, C) {
5226
+ for (var B = [], Q = C; Q; )
5227
+ B.push(Q), E[Q], Q = E[Q];
5228
+ return B.reverse(), B;
5218
5229
  },
5219
- find_path: function(E, B, C) {
5220
- var Q = A.single_source_shortest_paths(E, B, C);
5230
+ find_path: function(E, C, B) {
5231
+ var Q = A.single_source_shortest_paths(E, C, B);
5221
5232
  return A.extract_shortest_path_from_predecessor_list(
5222
5233
  Q,
5223
- C
5234
+ B
5224
5235
  );
5225
5236
  },
5226
5237
  /**
@@ -5228,22 +5239,22 @@ function SE() {
5228
5239
  */
5229
5240
  PriorityQueue: {
5230
5241
  make: function(E) {
5231
- var B = A.PriorityQueue, C = {}, Q;
5242
+ var C = A.PriorityQueue, B = {}, Q;
5232
5243
  E = E || {};
5233
- for (Q in B)
5234
- B.hasOwnProperty(Q) && (C[Q] = B[Q]);
5235
- return C.queue = [], C.sorter = E.sorter || B.default_sorter, C;
5244
+ for (Q in C)
5245
+ C.hasOwnProperty(Q) && (B[Q] = C[Q]);
5246
+ return B.queue = [], B.sorter = E.sorter || C.default_sorter, B;
5236
5247
  },
5237
- default_sorter: function(E, B) {
5238
- return E.cost - B.cost;
5248
+ default_sorter: function(E, C) {
5249
+ return E.cost - C.cost;
5239
5250
  },
5240
5251
  /**
5241
5252
  * Add a new item to the queue and ensure the highest priority element
5242
5253
  * is at the front of the queue.
5243
5254
  */
5244
- push: function(E, B) {
5245
- var C = { value: E, cost: B };
5246
- this.queue.push(C), this.queue.sort(this.sorter);
5255
+ push: function(E, C) {
5256
+ var B = { value: E, cost: C };
5257
+ this.queue.push(B), this.queue.sort(this.sorter);
5247
5258
  },
5248
5259
  /**
5249
5260
  * Return the highest priority element in the queue.
@@ -5257,12 +5268,12 @@ function SE() {
5257
5268
  }
5258
5269
  };
5259
5270
  g.exports = A;
5260
- }(oB)), oB.exports;
5271
+ }(aB)), aB.exports;
5261
5272
  }
5262
5273
  var LC;
5263
5274
  function pE() {
5264
5275
  return LC || (LC = 1, function(g) {
5265
- const A = sg(), E = jE(), B = yE(), C = KE(), Q = UE(), t = CQ(), I = Dg(), n = SE();
5276
+ const A = sg(), E = jE(), C = yE(), B = KE(), Q = UE(), t = CQ(), I = Dg(), n = SE();
5266
5277
  function c(T) {
5267
5278
  return unescape(encodeURIComponent(T)).length;
5268
5279
  }
@@ -5291,16 +5302,16 @@ function pE() {
5291
5302
  };
5292
5303
  });
5293
5304
  }
5294
- function i(T, d) {
5305
+ function a(T, d) {
5295
5306
  switch (d) {
5296
5307
  case A.NUMERIC:
5297
5308
  return E.getBitsLength(T);
5298
5309
  case A.ALPHANUMERIC:
5299
- return B.getBitsLength(T);
5310
+ return C.getBitsLength(T);
5300
5311
  case A.KANJI:
5301
5312
  return Q.getBitsLength(T);
5302
5313
  case A.BYTE:
5303
- return C.getBitsLength(T);
5314
+ return B.getBitsLength(T);
5304
5315
  }
5305
5316
  }
5306
5317
  function o(T) {
@@ -5351,7 +5362,7 @@ function pE() {
5351
5362
  f.push(H), r[H] = { node: k, lastCount: 0 }, m[H] = {};
5352
5363
  for (let J = 0; J < Y.length; J++) {
5353
5364
  const v = Y[J];
5354
- r[v] && r[v].node.mode === k.mode ? (m[v][H] = i(r[v].lastCount + k.length, k.mode) - i(r[v].lastCount, k.mode), r[v].lastCount += k.length) : (r[v] && (r[v].lastCount = k.length), m[v][H] = i(k.length, k.mode) + 4 + A.getCharCountIndicator(k.mode, d));
5365
+ r[v] && r[v].node.mode === k.mode ? (m[v][H] = a(r[v].lastCount + k.length, k.mode) - a(r[v].lastCount, k.mode), r[v].lastCount += k.length) : (r[v] && (r[v].lastCount = k.length), m[v][H] = a(k.length, k.mode) + 4 + A.getCharCountIndicator(k.mode, d));
5355
5366
  }
5356
5367
  }
5357
5368
  Y = f;
@@ -5370,11 +5381,11 @@ function pE() {
5370
5381
  case A.NUMERIC:
5371
5382
  return new E(T);
5372
5383
  case A.ALPHANUMERIC:
5373
- return new B(T);
5384
+ return new C(T);
5374
5385
  case A.KANJI:
5375
5386
  return new Q(T);
5376
5387
  case A.BYTE:
5377
- return new C(T);
5388
+ return new B(T);
5378
5389
  }
5379
5390
  }
5380
5391
  g.fromArray = function(d) {
@@ -5391,13 +5402,13 @@ function pE() {
5391
5402
  s(d, I.isKanjiModeEnabled())
5392
5403
  );
5393
5404
  };
5394
- }(tB)), tB;
5405
+ }(hB)), hB;
5395
5406
  }
5396
5407
  var zC;
5397
5408
  function ZE() {
5398
- if (zC) return Zg;
5409
+ if (zC) return Vg;
5399
5410
  zC = 1;
5400
- const g = Dg(), A = MB(), E = YE(), B = JE(), C = XE(), Q = FE(), t = OE(), I = gQ(), n = zE(), c = NE(), w = bE(), s = sg(), i = pE();
5411
+ const g = Dg(), A = TB(), E = YE(), C = JE(), B = XE(), Q = FE(), t = OE(), I = gQ(), n = zE(), c = NE(), w = bE(), s = sg(), a = pE();
5401
5412
  function o(l, P) {
5402
5413
  const f = l.size, M = Q.getPositions(P);
5403
5414
  for (let k = 0; k < M.length; k++) {
@@ -5416,7 +5427,7 @@ function ZE() {
5416
5427
  }
5417
5428
  }
5418
5429
  function u(l, P) {
5419
- const f = C.getPositions(P);
5430
+ const f = B.getPositions(P);
5420
5431
  for (let M = 0; M < f.length; M++) {
5421
5432
  const k = f[M][0], H = f[M][1];
5422
5433
  for (let J = -2; J <= 2; J++)
@@ -5489,14 +5500,14 @@ function ZE() {
5489
5500
  function Y(l, P, f, M) {
5490
5501
  let k;
5491
5502
  if (Array.isArray(l))
5492
- k = i.fromArray(l);
5503
+ k = a.fromArray(l);
5493
5504
  else if (typeof l == "string") {
5494
5505
  let U = P;
5495
5506
  if (!U) {
5496
- const j = i.rawSplit(l);
5507
+ const j = a.rawSplit(l);
5497
5508
  U = c.getBestVersionForData(j, f);
5498
5509
  }
5499
- k = i.fromString(l, U || 40);
5510
+ k = a.fromString(l, U || 40);
5500
5511
  } else
5501
5512
  throw new Error("Invalid data");
5502
5513
  const H = c.getBestVersionForData(k, f);
@@ -5511,7 +5522,7 @@ The chosen QR Code version cannot contain this amount of data.
5511
5522
  Minimum version required to store current data is: ` + H + `.
5512
5523
  `
5513
5524
  );
5514
- const J = r(P, f, k), v = g.getSymbolSize(P), F = new B(v);
5525
+ const J = r(P, f, k), v = g.getSymbolSize(P), F = new C(v);
5515
5526
  return o(F, P), D(F), u(F, P), T(F, f, 0), P >= 7 && R(F, P), d(F, J), isNaN(M) && (M = t.getBestMask(
5516
5527
  F,
5517
5528
  T.bind(null, F, f)
@@ -5523,131 +5534,131 @@ Minimum version required to store current data is: ` + H + `.
5523
5534
  segments: k
5524
5535
  };
5525
5536
  }
5526
- return Zg.create = function(P, f) {
5537
+ return Vg.create = function(P, f) {
5527
5538
  if (typeof P == "undefined" || P === "")
5528
5539
  throw new Error("No input text");
5529
5540
  let M = A.M, k, H;
5530
5541
  return typeof f != "undefined" && (M = A.from(f.errorCorrectionLevel, A.M), k = c.from(f.version), H = t.from(f.maskPattern), f.toSJISFunc && g.setToSJISFunction(f.toSJISFunc)), Y(P, k, M, H);
5531
- }, Zg;
5542
+ }, Vg;
5532
5543
  }
5533
- var aB = {}, iB = {}, NC;
5544
+ var iB = {}, uB = {}, NC;
5534
5545
  function QQ() {
5535
5546
  return NC || (NC = 1, function(g) {
5536
5547
  function A(E) {
5537
5548
  if (typeof E == "number" && (E = E.toString()), typeof E != "string")
5538
5549
  throw new Error("Color should be defined as hex string");
5539
- let B = E.slice().replace("#", "").split("");
5540
- if (B.length < 3 || B.length === 5 || B.length > 8)
5550
+ let C = E.slice().replace("#", "").split("");
5551
+ if (C.length < 3 || C.length === 5 || C.length > 8)
5541
5552
  throw new Error("Invalid hex color: " + E);
5542
- (B.length === 3 || B.length === 4) && (B = Array.prototype.concat.apply([], B.map(function(Q) {
5553
+ (C.length === 3 || C.length === 4) && (C = Array.prototype.concat.apply([], C.map(function(Q) {
5543
5554
  return [Q, Q];
5544
- }))), B.length === 6 && B.push("F", "F");
5545
- const C = parseInt(B.join(""), 16);
5555
+ }))), C.length === 6 && C.push("F", "F");
5556
+ const B = parseInt(C.join(""), 16);
5546
5557
  return {
5547
- r: C >> 24 & 255,
5548
- g: C >> 16 & 255,
5549
- b: C >> 8 & 255,
5550
- a: C & 255,
5551
- hex: "#" + B.slice(0, 6).join("")
5558
+ r: B >> 24 & 255,
5559
+ g: B >> 16 & 255,
5560
+ b: B >> 8 & 255,
5561
+ a: B & 255,
5562
+ hex: "#" + C.slice(0, 6).join("")
5552
5563
  };
5553
5564
  }
5554
- g.getOptions = function(B) {
5555
- B || (B = {}), B.color || (B.color = {});
5556
- const C = typeof B.margin == "undefined" || B.margin === null || B.margin < 0 ? 4 : B.margin, Q = B.width && B.width >= 21 ? B.width : void 0, t = B.scale || 4;
5565
+ g.getOptions = function(C) {
5566
+ C || (C = {}), C.color || (C.color = {});
5567
+ const B = typeof C.margin == "undefined" || C.margin === null || C.margin < 0 ? 4 : C.margin, Q = C.width && C.width >= 21 ? C.width : void 0, t = C.scale || 4;
5557
5568
  return {
5558
5569
  width: Q,
5559
5570
  scale: Q ? 4 : t,
5560
- margin: C,
5571
+ margin: B,
5561
5572
  color: {
5562
- dark: A(B.color.dark || "#000000ff"),
5563
- light: A(B.color.light || "#ffffffff")
5573
+ dark: A(C.color.dark || "#000000ff"),
5574
+ light: A(C.color.light || "#ffffffff")
5564
5575
  },
5565
- type: B.type,
5566
- rendererOpts: B.rendererOpts || {}
5576
+ type: C.type,
5577
+ rendererOpts: C.rendererOpts || {}
5567
5578
  };
5568
- }, g.getScale = function(B, C) {
5569
- return C.width && C.width >= B + C.margin * 2 ? C.width / (B + C.margin * 2) : C.scale;
5570
- }, g.getImageWidth = function(B, C) {
5571
- const Q = g.getScale(B, C);
5572
- return Math.floor((B + C.margin * 2) * Q);
5573
- }, g.qrToImageData = function(B, C, Q) {
5574
- const t = C.modules.size, I = C.modules.data, n = g.getScale(t, Q), c = Math.floor((t + Q.margin * 2) * n), w = Q.margin * n, s = [Q.color.light, Q.color.dark];
5575
- for (let i = 0; i < c; i++)
5579
+ }, g.getScale = function(C, B) {
5580
+ return B.width && B.width >= C + B.margin * 2 ? B.width / (C + B.margin * 2) : B.scale;
5581
+ }, g.getImageWidth = function(C, B) {
5582
+ const Q = g.getScale(C, B);
5583
+ return Math.floor((C + B.margin * 2) * Q);
5584
+ }, g.qrToImageData = function(C, B, Q) {
5585
+ const t = B.modules.size, I = B.modules.data, n = g.getScale(t, Q), c = Math.floor((t + Q.margin * 2) * n), w = Q.margin * n, s = [Q.color.light, Q.color.dark];
5586
+ for (let a = 0; a < c; a++)
5576
5587
  for (let o = 0; o < c; o++) {
5577
- let D = (i * c + o) * 4, u = Q.color.light;
5578
- if (i >= w && o >= w && i < c - w && o < c - w) {
5579
- const R = Math.floor((i - w) / n), T = Math.floor((o - w) / n);
5588
+ let D = (a * c + o) * 4, u = Q.color.light;
5589
+ if (a >= w && o >= w && a < c - w && o < c - w) {
5590
+ const R = Math.floor((a - w) / n), T = Math.floor((o - w) / n);
5580
5591
  u = s[I[R * t + T] ? 1 : 0];
5581
5592
  }
5582
- B[D++] = u.r, B[D++] = u.g, B[D++] = u.b, B[D] = u.a;
5593
+ C[D++] = u.r, C[D++] = u.g, C[D++] = u.b, C[D] = u.a;
5583
5594
  }
5584
5595
  };
5585
- }(iB)), iB;
5596
+ }(uB)), uB;
5586
5597
  }
5587
5598
  var bC;
5588
5599
  function VE() {
5589
5600
  return bC || (bC = 1, function(g) {
5590
5601
  const A = QQ();
5591
- function E(C, Q, t) {
5592
- C.clearRect(0, 0, Q.width, Q.height), Q.style || (Q.style = {}), Q.height = t, Q.width = t, Q.style.height = t + "px", Q.style.width = t + "px";
5602
+ function E(B, Q, t) {
5603
+ B.clearRect(0, 0, Q.width, Q.height), Q.style || (Q.style = {}), Q.height = t, Q.width = t, Q.style.height = t + "px", Q.style.width = t + "px";
5593
5604
  }
5594
- function B() {
5605
+ function C() {
5595
5606
  try {
5596
5607
  return document.createElement("canvas");
5597
- } catch (C) {
5608
+ } catch (B) {
5598
5609
  throw new Error("You need to specify a canvas element");
5599
5610
  }
5600
5611
  }
5601
5612
  g.render = function(Q, t, I) {
5602
5613
  let n = I, c = t;
5603
- typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), t || (c = B()), n = A.getOptions(n);
5604
- const w = A.getImageWidth(Q.modules.size, n), s = c.getContext("2d"), i = s.createImageData(w, w);
5605
- return A.qrToImageData(i.data, Q, n), E(s, c, w), s.putImageData(i, 0, 0), c;
5614
+ typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), t || (c = C()), n = A.getOptions(n);
5615
+ const w = A.getImageWidth(Q.modules.size, n), s = c.getContext("2d"), a = s.createImageData(w, w);
5616
+ return A.qrToImageData(a.data, Q, n), E(s, c, w), s.putImageData(a, 0, 0), c;
5606
5617
  }, g.renderToDataURL = function(Q, t, I) {
5607
5618
  let n = I;
5608
5619
  typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), n || (n = {});
5609
5620
  const c = g.render(Q, t, n), w = n.type || "image/png", s = n.rendererOpts || {};
5610
5621
  return c.toDataURL(w, s.quality);
5611
5622
  };
5612
- }(aB)), aB;
5623
+ }(iB)), iB;
5613
5624
  }
5614
- var uB = {}, jC;
5625
+ var DB = {}, jC;
5615
5626
  function WE() {
5616
- if (jC) return uB;
5627
+ if (jC) return DB;
5617
5628
  jC = 1;
5618
5629
  const g = QQ();
5619
- function A(C, Q) {
5620
- const t = C.a / 255, I = Q + '="' + C.hex + '"';
5630
+ function A(B, Q) {
5631
+ const t = B.a / 255, I = Q + '="' + B.hex + '"';
5621
5632
  return t < 1 ? I + " " + Q + '-opacity="' + t.toFixed(2).slice(1) + '"' : I;
5622
5633
  }
5623
- function E(C, Q, t) {
5624
- let I = C + Q;
5634
+ function E(B, Q, t) {
5635
+ let I = B + Q;
5625
5636
  return typeof t != "undefined" && (I += " " + t), I;
5626
5637
  }
5627
- function B(C, Q, t) {
5638
+ function C(B, Q, t) {
5628
5639
  let I = "", n = 0, c = !1, w = 0;
5629
- for (let s = 0; s < C.length; s++) {
5630
- const i = Math.floor(s % Q), o = Math.floor(s / Q);
5631
- !i && !c && (c = !0), C[s] ? (w++, s > 0 && i > 0 && C[s - 1] || (I += c ? E("M", i + t, 0.5 + o + t) : E("m", n, 0), n = 0, c = !1), i + 1 < Q && C[s + 1] || (I += E("h", w), w = 0)) : n++;
5640
+ for (let s = 0; s < B.length; s++) {
5641
+ const a = Math.floor(s % Q), o = Math.floor(s / Q);
5642
+ !a && !c && (c = !0), B[s] ? (w++, s > 0 && a > 0 && B[s - 1] || (I += c ? E("M", a + t, 0.5 + o + t) : E("m", n, 0), n = 0, c = !1), a + 1 < Q && B[s + 1] || (I += E("h", w), w = 0)) : n++;
5632
5643
  }
5633
5644
  return I;
5634
5645
  }
5635
- return uB.render = function(Q, t, I) {
5636
- const n = g.getOptions(t), c = Q.modules.size, w = Q.modules.data, s = c + n.margin * 2, i = n.color.light.a ? "<path " + A(n.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", o = "<path " + A(n.color.dark, "stroke") + ' d="' + B(w, c, n.margin) + '"/>', D = 'viewBox="0 0 ' + s + " " + s + '"', R = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + D + ' shape-rendering="crispEdges">' + i + o + `</svg>
5646
+ return DB.render = function(Q, t, I) {
5647
+ const n = g.getOptions(t), c = Q.modules.size, w = Q.modules.data, s = c + n.margin * 2, a = n.color.light.a ? "<path " + A(n.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", o = "<path " + A(n.color.dark, "stroke") + ' d="' + C(w, c, n.margin) + '"/>', D = 'viewBox="0 0 ' + s + " " + s + '"', R = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + D + ' shape-rendering="crispEdges">' + a + o + `</svg>
5637
5648
  `;
5638
5649
  return typeof I == "function" && I(null, R), R;
5639
- }, uB;
5650
+ }, DB;
5640
5651
  }
5641
5652
  var yC;
5642
5653
  function _E() {
5643
5654
  if (yC) return lg;
5644
5655
  yC = 1;
5645
- const g = RE(), A = ZE(), E = VE(), B = WE();
5646
- function C(Q, t, I, n, c) {
5647
- const w = [].slice.call(arguments, 1), s = w.length, i = typeof w[s - 1] == "function";
5648
- if (!i && !g())
5656
+ const g = RE(), A = ZE(), E = VE(), C = WE();
5657
+ function B(Q, t, I, n, c) {
5658
+ const w = [].slice.call(arguments, 1), s = w.length, a = typeof w[s - 1] == "function";
5659
+ if (!a && !g())
5649
5660
  throw new Error("Callback required as last argument");
5650
- if (i) {
5661
+ if (a) {
5651
5662
  if (s < 2)
5652
5663
  throw new Error("Too few arguments provided");
5653
5664
  s === 2 ? (c = I, I = t, t = n = void 0) : s === 3 && (t.getContext && typeof c == "undefined" ? (c = n, n = void 0) : (c = n, n = I, I = t, t = void 0));
@@ -5670,8 +5681,8 @@ function _E() {
5670
5681
  c(o);
5671
5682
  }
5672
5683
  }
5673
- return lg.create = A.create, lg.toCanvas = C.bind(null, E.render), lg.toDataURL = C.bind(null, E.renderToDataURL), lg.toString = C.bind(null, function(Q, t, I) {
5674
- return B.render(Q, I);
5684
+ return lg.create = A.create, lg.toCanvas = B.bind(null, E.render), lg.toDataURL = B.bind(null, E.renderToDataURL), lg.toString = B.bind(null, function(Q, t, I) {
5685
+ return C.render(Q, I);
5675
5686
  }), lg;
5676
5687
  }
5677
5688
  var $E = _E();
@@ -5694,7 +5705,7 @@ function QI({
5694
5705
  onClose: g,
5695
5706
  showCloseButton: A = !0,
5696
5707
  preventClose: E = !1,
5697
- contactEmail: B = "hotro247@atomsolution.vn"
5708
+ contactEmail: C = "hotro247@atomsolution.vn"
5698
5709
  } = {}) {
5699
5710
  document.querySelectorAll('[data-wgt-info-popup="true"]').forEach((v) => {
5700
5711
  try {
@@ -5771,14 +5782,14 @@ function QI({
5771
5782
  color: #111827;
5772
5783
  line-height: 1.4;
5773
5784
  `, s.innerText = "Giao dịch không khớp với thông tin đơn hàng", n.appendChild(s);
5774
- const i = document.createElement("div");
5775
- i.style.cssText = `
5785
+ const a = document.createElement("div");
5786
+ a.style.cssText = `
5776
5787
  background-color: #F5F7FA;
5777
5788
  border-radius: 0.75rem;
5778
5789
  padding: 1rem;
5779
5790
  margin-bottom: 1.25rem;
5780
5791
  border: 1px solid #E1E4EA;
5781
- `, n.appendChild(i);
5792
+ `, n.appendChild(a);
5782
5793
  const o = document.createElement("div");
5783
5794
  o.style.cssText = `
5784
5795
  display: flex;
@@ -5796,7 +5807,7 @@ function QI({
5796
5807
  flex-shrink: 0;
5797
5808
  `;
5798
5809
  const u = document.createElement("span");
5799
- u.innerText = "Hướng dẫn xử lý", o.appendChild(D), o.appendChild(u), i.appendChild(o);
5810
+ u.innerText = "Hướng dẫn xử lý", o.appendChild(D), o.appendChild(u), a.appendChild(o);
5800
5811
  const R = document.createElement("p");
5801
5812
  R.style.cssText = `
5802
5813
  font-size: 0.875rem;
@@ -5806,7 +5817,7 @@ function QI({
5806
5817
  padding-left: 1.65rem;
5807
5818
  margin-bottom: 1rem;
5808
5819
 
5809
- `, R.innerHTML = `Để được hỗ trợ xử lý, vui lòng gửi email đến: <a href="mailto:${B}" style="color: #335CFF; text-decoration: none; font-weight: 500;">${B}</a>, kèm theo các thông tin sau:`, i.appendChild(R);
5820
+ `, R.innerHTML = `Để được hỗ trợ xử lý, vui lòng gửi email đến: <a href="mailto:${C}" style="color: #335CFF; text-decoration: none; font-weight: 500;">${C}</a>, kèm theo các thông tin sau:`, a.appendChild(R);
5810
5821
  const T = document.createElement("div");
5811
5822
  T.style.cssText = `
5812
5823
  background-color: #232A751A;
@@ -5814,7 +5825,7 @@ function QI({
5814
5825
  padding: 1rem 1rem 1rem 1.25rem;
5815
5826
  margin-bottom: 1rem;
5816
5827
 
5817
- `, i.appendChild(T);
5828
+ `, a.appendChild(T);
5818
5829
  const d = document.createElement("ul");
5819
5830
  d.style.cssText = `
5820
5831
  margin: 0;
@@ -5837,7 +5848,7 @@ function QI({
5837
5848
  font-style: italic;
5838
5849
  line-height: 1.6;
5839
5850
  margin-top: 0.75rem;
5840
- `, r.innerText = "Cung cấp đủ thông tin sẽ giúp chúng tôi xử lý yêu cầu của bạn nhanh chóng và chính xác hơn.", i.appendChild(r);
5851
+ `, r.innerText = "Cung cấp đủ thông tin sẽ giúp chúng tôi xử lý yêu cầu của bạn nhanh chóng và chính xác hơn.", a.appendChild(r);
5841
5852
  const m = document.createElement("button");
5842
5853
  m.type = "button", m.innerText = "Đóng", m.style.cssText = `
5843
5854
  width: 100%;
@@ -5896,38 +5907,38 @@ function II(I) {
5896
5907
  onNext: g,
5897
5908
  onPrev: A,
5898
5909
  step: E,
5899
- checkoutProps: B,
5900
- orderInfoProps: C,
5910
+ checkoutProps: C,
5911
+ orderInfoProps: B,
5901
5912
  setOrderId: Q,
5902
5913
  theme: t = "ocb"
5903
5914
  }) {
5904
- let n = null, c = "", w = null, s = (C == null ? void 0 : C.orderId) || null, i = !1, o = 0;
5915
+ let n = null, c = "", w = null, s = (B == null ? void 0 : B.orderId) || null, a = !1, o = 0;
5905
5916
  const D = document.createElement("div");
5906
5917
  D.className = "wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";
5907
5918
  const {
5908
5919
  container: u,
5909
5920
  open: R,
5910
5921
  close: T
5911
- } = vB();
5922
+ } = MB();
5912
5923
  D.appendChild(u);
5913
5924
  const d = document.createElement("div");
5914
5925
  d.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:@max-2xl:flex-col-reverse";
5915
5926
  const r = document.createElement("div");
5916
5927
  r.className = "wgt:flex-1 wgt:@max-2xl:w-full";
5917
- const m = a("paymentInstructions"), Y = Array.isArray(m) ? m : [m], { container: l, update: P } = HE(GA(PA({
5928
+ const m = i("paymentInstructions"), Y = Array.isArray(m) ? m : [m], { container: l, update: P } = HE(GA(PA({
5918
5929
  qrSrc: "",
5919
5930
  accountName: "",
5920
5931
  accountNumber: "",
5921
5932
  bankName: ""
5922
- }, B), {
5933
+ }, C), {
5923
5934
  instructions: Y,
5924
5935
  theme: t
5925
5936
  }));
5926
5937
  r.appendChild(l), d.appendChild(r);
5927
- const { container: f, resetCountdown: M } = kE(GA(PA({}, C), {
5928
- selectedPromotions: (C == null ? void 0 : C.selectedPromotions) || [],
5938
+ const { container: f, resetCountdown: M } = kE(GA(PA({}, B), {
5939
+ selectedPromotions: (B == null ? void 0 : B.selectedPromotions) || [],
5929
5940
  onResetToStep1: () => {
5930
- w && (clearInterval(w), w = null), C != null && C.onResetToStep1 && C.onResetToStep1();
5941
+ w && (clearInterval(w), w = null), B != null && B.onResetToStep1 && B.onResetToStep1();
5931
5942
  }
5932
5943
  }));
5933
5944
  d.appendChild(f), D.appendChild(d);
@@ -5935,7 +5946,7 @@ function II(I) {
5935
5946
  k.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
5936
5947
  const H = Ig({
5937
5948
  type: "button",
5938
- title: a("back"),
5949
+ title: i("back"),
5939
5950
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
5940
5951
  handleClick: () => {
5941
5952
  A && (clearInterval(w), w = null, A());
@@ -5944,7 +5955,7 @@ function II(I) {
5944
5955
  k.appendChild(H), D.appendChild(k);
5945
5956
  function J() {
5946
5957
  return W(this, null, function* () {
5947
- const { registrationData: O } = C, q = O.eInvoiceRegistration, { isUsedEInvoiceBefore: e } = q, h = Kg(q, ["isUsedEInvoiceBefore"]);
5958
+ const { registrationData: O } = B, q = O.eInvoiceRegistration, { isUsedEInvoiceBefore: e } = q, h = Kg(q, ["isUsedEInvoiceBefore"]);
5948
5959
  try {
5949
5960
  const N = (yield AQ({
5950
5961
  eInvoiceRegistration: PA({}, h),
@@ -5961,7 +5972,7 @@ function II(I) {
5961
5972
  })).orderId;
5962
5973
  N !== s && (s = N, Q(N), yield v(N), M());
5963
5974
  } catch (x) {
5964
- console.error("Error creating order:", x), og(a("errorCreatingOrder") || "Failed to create order");
5975
+ console.error("Error creating order:", x), og(i("errorCreatingOrder") || "Failed to create order");
5965
5976
  return;
5966
5977
  } finally {
5967
5978
  T();
@@ -5971,15 +5982,15 @@ function II(I) {
5971
5982
  function v(O) {
5972
5983
  return W(this, null, function* () {
5973
5984
  var e, h, q, x;
5974
- if (i) {
5985
+ if (a) {
5975
5986
  console.log("Already fetching QR data, skipping...");
5976
5987
  return;
5977
5988
  }
5978
- i = !0, R();
5989
+ a = !0, R();
5979
5990
  try {
5980
5991
  if (n = yield fQ({
5981
- orderId: O != null ? O : C == null ? void 0 : C.orderId,
5982
- amount: C == null ? void 0 : C.totalAmountText,
5992
+ orderId: O != null ? O : B == null ? void 0 : B.orderId,
5993
+ amount: B == null ? void 0 : B.totalAmountText,
5983
5994
  baseURL: dQ(t)
5984
5995
  }), !(n != null && n.qr_string))
5985
5996
  throw new Error("QR string is empty or undefined");
@@ -6002,34 +6013,34 @@ function II(I) {
6002
6013
  } catch (N) {
6003
6014
  if (((h = (e = N.response) == null ? void 0 : e.data) == null ? void 0 : h.error_code) === "BILL_ID_EXISTED") {
6004
6015
  if (console.log("Bill ID existed, recalling createOrder..."), o++, o >= EI) {
6005
- og(a("errorQRGeneration"), {
6006
- okLabel: a("ok"),
6016
+ og(i("errorQRGeneration"), {
6017
+ okLabel: i("ok"),
6007
6018
  onClose: () => {
6008
6019
  A();
6009
6020
  }
6010
6021
  });
6011
6022
  return;
6012
6023
  }
6013
- i = !1, yield J();
6024
+ a = !1, yield J();
6014
6025
  return;
6015
6026
  } else if (((q = N.response) == null ? void 0 : q.status) === 401 || ((x = N.response) == null ? void 0 : x.status) === 403) {
6016
6027
  console.log("Token refresh in progress, not showing error popup");
6017
6028
  return;
6018
6029
  } else
6019
6030
  og(
6020
- a(
6031
+ i(
6021
6032
  "errorQRGeneration",
6022
6033
  "Không thể tạo mã QR thanh toán. Vui lòng thử lại."
6023
6034
  ),
6024
6035
  {
6025
- okLabel: a("ok"),
6036
+ okLabel: i("ok"),
6026
6037
  onClose: () => {
6027
6038
  A();
6028
6039
  }
6029
6040
  }
6030
6041
  );
6031
6042
  } finally {
6032
- T(), i = !1;
6043
+ T(), a = !1;
6033
6044
  }
6034
6045
  });
6035
6046
  }
@@ -6049,13 +6060,13 @@ function II(I) {
6049
6060
  clearInterval(w), w = null;
6050
6061
  const N = QI({
6051
6062
  onClose: function() {
6052
- C != null && C.onResetToStep1 && C.onResetToStep1();
6063
+ B != null && B.onResetToStep1 && B.onResetToStep1();
6053
6064
  }
6054
6065
  });
6055
6066
  D.appendChild(N.container), N.open();
6056
6067
  return;
6057
6068
  }
6058
- const q = h.paymentStatus === "paid" ? a("paymentSuccess") : a("paymentFailed"), x = qB({
6069
+ const q = h.paymentStatus === "paid" ? i("paymentSuccess") : i("paymentFailed"), x = vB({
6059
6070
  message: q,
6060
6071
  okLabel: "OK",
6061
6072
  theme: t,
@@ -6067,22 +6078,22 @@ function II(I) {
6067
6078
  });
6068
6079
  D.appendChild(x.container), x.open();
6069
6080
  } catch (h) {
6070
- !navigator.onLine || !h.response ? (F = !0, og(a("errorNetwork"), {
6071
- okLabel: a("tryAgain"),
6081
+ !navigator.onLine || !h.response ? (F = !0, og(i("errorNetwork"), {
6082
+ okLabel: i("tryAgain"),
6072
6083
  onClose: function() {
6073
6084
  return W(this, null, function* () {
6074
6085
  });
6075
6086
  },
6076
6087
  isOffline: !0
6077
- })) : ((O = h.response) == null ? void 0 : O.status) === 404 ? og(a("errorOrderNotFound"), {
6078
- okLabel: a("tryAgain"),
6088
+ })) : ((O = h.response) == null ? void 0 : O.status) === 404 ? og(i("errorOrderNotFound"), {
6089
+ okLabel: i("tryAgain"),
6079
6090
  onClose: function() {
6080
6091
  return W(this, null, function* () {
6081
6092
  clearInterval(w), w = null, yield J();
6082
6093
  });
6083
6094
  }
6084
- }) : ((e = h.response) == null ? void 0 : e.status) === 410 ? og(a("paymentTimeoutMessage"), {
6085
- okLabel: a("tryAgain"),
6095
+ }) : ((e = h.response) == null ? void 0 : e.status) === 410 ? og(i("paymentTimeoutMessage"), {
6096
+ okLabel: i("tryAgain"),
6086
6097
  onClose: function() {
6087
6098
  return W(this, null, function* () {
6088
6099
  clearInterval(w), w = null, yield J();
@@ -6101,8 +6112,8 @@ function nI({
6101
6112
  orderId: g,
6102
6113
  onPrev: A,
6103
6114
  onReturnHome: E,
6104
- theme: B,
6105
- settingUrl: C,
6115
+ theme: C,
6116
+ settingUrl: B,
6106
6117
  provider: Q
6107
6118
  }) {
6108
6119
  if (g) {
@@ -6114,21 +6125,21 @@ function nI({
6114
6125
  const I = document.createElement("div");
6115
6126
  I.className = "wgt:w-full wgt:max-w-3xl wgt:space-y-4 wgt:rounded-xl wgt:bg-white", t.appendChild(I);
6116
6127
  const n = document.createElement("h3");
6117
- n.className = "wgt:text-sm wgt:font-semibold wgt:text-text-black", n.innerText = a("confirmationTitle"), I.appendChild(n);
6128
+ n.className = "wgt:text-sm wgt:font-semibold wgt:text-text-black", n.innerText = i("confirmationTitle"), I.appendChild(n);
6118
6129
  const c = document.createElement("div");
6119
6130
  c.className = "wgt:flex wgt:items-center wgt:gap-4", I.appendChild(c);
6120
6131
  const w = document.createElement("div");
6121
6132
  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", c.appendChild(w);
6122
6133
  const s = document.createElement("p");
6123
- s.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", s.innerText = a("notice1"), c.appendChild(s);
6124
- const i = document.createElement("div");
6125
- i.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(i);
6134
+ s.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", s.innerText = i("notice1"), c.appendChild(s);
6135
+ const a = document.createElement("div");
6136
+ a.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(a);
6126
6137
  const o = document.createElement("div");
6127
- o.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", o.innerText = "2", i.appendChild(o);
6138
+ o.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", o.innerText = "2", a.appendChild(o);
6128
6139
  const D = document.createElement("div");
6129
- D.className = "wgt:flex wgt:flex-col wgt:gap-2", i.appendChild(D);
6140
+ D.className = "wgt:flex wgt:flex-col wgt:gap-2", a.appendChild(D);
6130
6141
  const u = document.createElement("p");
6131
- u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = a("notice2"), D.appendChild(u);
6142
+ u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = i("notice2"), D.appendChild(u);
6132
6143
  const R = document.createElement("div");
6133
6144
  R.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", D.appendChild(R);
6134
6145
  const T = document.createElement("div");
@@ -6153,8 +6164,8 @@ function nI({
6153
6164
  />
6154
6165
  </svg>
6155
6166
  `, T.appendChild(d);
6156
- const r = mQ(PB(), B, Q), m = document.createElement("span");
6157
- m.innerHTML = `${a("hotlineDomestic")} <b>${(r == null ? void 0 : r.hotline) || ""}</b> ${a("hotlineDesc")} `, T.appendChild(m);
6167
+ const r = mQ(qB(), C, Q), m = document.createElement("span");
6168
+ m.innerHTML = `${i("hotlineDomestic")} <b>${(r == null ? void 0 : r.hotline) || ""}</b> ${i("hotlineDesc")} `, T.appendChild(m);
6158
6169
  const Y = document.createElement("div");
6159
6170
  Y.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", R.appendChild(Y);
6160
6171
  const l = document.createElement("div");
@@ -6176,7 +6187,7 @@ function nI({
6176
6187
  </svg>
6177
6188
  `, Y.appendChild(l);
6178
6189
  const P = document.createElement("span");
6179
- P.innerHTML = `${a("email")}: <b>${(r == null ? void 0 : r.email) || ""}</b>`, Y.appendChild(P);
6190
+ P.innerHTML = `${i("email")}: <b>${(r == null ? void 0 : r.email) || ""}</b>`, Y.appendChild(P);
6180
6191
  const f = document.createElement("div");
6181
6192
  f.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", R.appendChild(f);
6182
6193
  const M = document.createElement("div");
@@ -6191,7 +6202,7 @@ function nI({
6191
6202
  </clipPath>
6192
6203
  </defs>
6193
6204
  </svg>
6194
- `, f.appendChild(M), f.appendChild(document.createTextNode(a("website") + ": "));
6205
+ `, f.appendChild(M), f.appendChild(document.createTextNode(i("website") + ": "));
6195
6206
  const k = document.createElement("a");
6196
6207
  k.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", k.innerHTML = `<b>${(r == null ? void 0 : r.link) || ""}</b>`, k.href = (r == null ? void 0 : r.link) || "#", k.target = "_blank", f.appendChild(k);
6197
6208
  const H = document.createElement("div");
@@ -6199,24 +6210,24 @@ function nI({
6199
6210
  const J = document.createElement("div");
6200
6211
  J.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", J.innerText = "3", H.appendChild(J);
6201
6212
  const v = document.createElement("p");
6202
- v.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", v.appendChild(document.createTextNode(a("notice3.1") + " "));
6213
+ v.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", v.appendChild(document.createTextNode(i("notice3.1") + " "));
6203
6214
  const F = document.createElement("a");
6204
- F.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", F.textContent = a("settings") + " ", F.href = C, F.target = "_blank", v.appendChild(F), v.appendChild(document.createTextNode(a("notice3.2") + " ")), H.appendChild(v);
6215
+ F.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", F.textContent = i("settings") + " ", F.href = B, F.target = "_blank", v.appendChild(F), v.appendChild(document.createTextNode(i("notice3.2") + " ")), H.appendChild(v);
6205
6216
  const U = document.createElement("div");
6206
6217
  U.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:py-3 wgt:px-5 wgt:bg-primary/15 wgt:rounded-[10px] wgt:w-fit wgt:mx-auto", I.appendChild(U);
6207
6218
  const j = document.createElement("div");
6208
6219
  j.className = "wgt:w-5 wgt:h-5 wgt:flex wgt:items-center wgt:justify-center", j.innerHTML = `
6209
6220
  <svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6210
- <path d="M3.55534 9.25979C3.21016 9.26076 2.87232 9.35944 2.58089 9.5444C2.28945 9.72937 2.05634 9.99306 1.90853 10.305C1.76071 10.6169 1.70422 10.9643 1.74561 11.307C1.78699 11.6497 1.92455 11.9736 2.14238 12.2414L6.78584 17.9296C6.9514 18.1352 7.16362 18.2983 7.40488 18.4054C7.64614 18.5125 7.90947 18.5605 8.17299 18.5454C8.73661 18.5151 9.24545 18.2136 9.56988 17.7179L19.2155 2.18356C19.2171 2.18099 19.2188 2.17841 19.2205 2.17587C19.311 2.03691 19.2816 1.76152 19.0948 1.58852C19.0435 1.54102 18.983 1.50452 18.917 1.48127C18.8511 1.45803 18.7811 1.44854 18.7113 1.45338C18.6415 1.45822 18.5735 1.47729 18.5114 1.50941C18.4493 1.54154 18.3944 1.58604 18.3501 1.64018C18.3466 1.64444 18.3431 1.64863 18.3394 1.65276L8.61164 12.6437C8.57463 12.6855 8.52967 12.7196 8.47939 12.7439C8.4291 12.7682 8.37448 12.7822 8.31871 12.7852C8.26294 12.7883 8.20713 12.7802 8.15451 12.7614C8.1019 12.7427 8.05353 12.7137 8.01222 12.6761L4.78376 9.73818C4.44846 9.43081 4.01021 9.26014 3.55534 9.25979Z" fill="${B === "ocb" ? "#008c44" : "#1e2a7b"}"
6221
+ <path d="M3.55534 9.25979C3.21016 9.26076 2.87232 9.35944 2.58089 9.5444C2.28945 9.72937 2.05634 9.99306 1.90853 10.305C1.76071 10.6169 1.70422 10.9643 1.74561 11.307C1.78699 11.6497 1.92455 11.9736 2.14238 12.2414L6.78584 17.9296C6.9514 18.1352 7.16362 18.2983 7.40488 18.4054C7.64614 18.5125 7.90947 18.5605 8.17299 18.5454C8.73661 18.5151 9.24545 18.2136 9.56988 17.7179L19.2155 2.18356C19.2171 2.18099 19.2188 2.17841 19.2205 2.17587C19.311 2.03691 19.2816 1.76152 19.0948 1.58852C19.0435 1.54102 18.983 1.50452 18.917 1.48127C18.8511 1.45803 18.7811 1.44854 18.7113 1.45338C18.6415 1.45822 18.5735 1.47729 18.5114 1.50941C18.4493 1.54154 18.3944 1.58604 18.3501 1.64018C18.3466 1.64444 18.3431 1.64863 18.3394 1.65276L8.61164 12.6437C8.57463 12.6855 8.52967 12.7196 8.47939 12.7439C8.4291 12.7682 8.37448 12.7822 8.31871 12.7852C8.26294 12.7883 8.20713 12.7802 8.15451 12.7614C8.1019 12.7427 8.05353 12.7137 8.01222 12.6761L4.78376 9.73818C4.44846 9.43081 4.01021 9.26014 3.55534 9.25979Z" fill="${C === "ocb" ? "#008c44" : "#1e2a7b"}"
6211
6222
  </svg>
6212
6223
  `;
6213
6224
  const O = document.createElement("label");
6214
- O.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", O.appendChild(document.createTextNode(a("informationSent"))), U.appendChild(j), U.appendChild(O);
6225
+ O.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", O.appendChild(document.createTextNode(i("informationSent"))), U.appendChild(j), U.appendChild(O);
6215
6226
  const e = document.createElement("div");
6216
6227
  e.className = "wgt:w-full wgt:flex wgt:justify-center", I.appendChild(e);
6217
6228
  const h = Ig({
6218
6229
  type: "button",
6219
- title: a("completeRegistration"),
6230
+ title: i("completeRegistration"),
6220
6231
  className: "wgt:text-white",
6221
6232
  handleClick: typeof E == "function" && E
6222
6233
  });
@@ -6280,36 +6291,36 @@ function iI() {
6280
6291
  const E = document.createElement("div");
6281
6292
  return E.className = "wgt:flex-1 wgt:min-h-0", A.appendChild(E), g.appendChild(A), {
6282
6293
  container: g,
6283
- setContent(B) {
6284
- E.replaceChildren(B);
6294
+ setContent(C) {
6295
+ E.replaceChildren(C);
6285
6296
  }
6286
6297
  };
6287
6298
  }
6288
- function UC(B) {
6299
+ function UC(C) {
6289
6300
  return W(this, arguments, function* ({
6290
6301
  orderId: g,
6291
6302
  callbackUrl: A,
6292
6303
  onCompleteSignature: E
6293
6304
  }) {
6294
- const C = document.createElement("div");
6295
- C.style.display = "flex", C.style.flexDirection = "column", C.style.gap = "0", C.style.width = "100%", C.style.height = "100%", C.style.minHeight = "0", window.matchMedia("(min-width: 640px)").matches && (C.style.gap = "1rem");
6305
+ const B = document.createElement("div");
6306
+ B.style.display = "flex", B.style.flexDirection = "column", B.style.gap = "0", B.style.width = "100%", B.style.height = "100%", B.style.minHeight = "0", window.matchMedia("(min-width: 640px)").matches && (B.style.gap = "1rem");
6296
6307
  let Q = "";
6297
6308
  try {
6298
6309
  const c = yield rQ({ orderId: g });
6299
6310
  Q = c && c.url ? c.url : "";
6300
6311
  } catch (c) {
6301
- return console.error("Failed to fetch wireframe URL:", c), C.innerHTML = `
6312
+ return console.error("Failed to fetch wireframe URL:", c), B.innerHTML = `
6302
6313
  <div style="display: flex; align-items: center; justify-content: center; height: 100%; padding: 1rem;">
6303
6314
  <p style="color: #ef4444; text-align: center; font-size: 0.875rem;">
6304
6315
  Không thể tải hợp đồng.
6305
6316
  </p>
6306
6317
  </div>
6307
- `, { container: C };
6318
+ `, { container: B };
6308
6319
  }
6309
6320
  const t = document.createElement("div");
6310
6321
  t.style.flex = "1", t.style.minHeight = "0", t.style.position = "relative", t.style.width = "100%";
6311
6322
  const I = document.createElement("iframe");
6312
- return I.src = Q, I.style.position = "absolute", I.style.top = "0", I.style.left = "0", I.style.width = "100%", I.style.height = "100%", I.style.borderRadius = "0", I.style.border = "0", window.matchMedia("(min-width: 640px)").matches && (I.style.borderRadius = "0.375rem"), I.loading = "lazy", I.allowFullscreen = !0, I.setAttribute("scrolling", "auto"), I.setAttribute("frameBorder", "0"), t.appendChild(I), C.appendChild(t), { container: C, cleanup: () => {
6323
+ return I.src = Q, I.style.position = "absolute", I.style.top = "0", I.style.left = "0", I.style.width = "100%", I.style.height = "100%", I.style.borderRadius = "0", I.style.border = "0", window.matchMedia("(min-width: 640px)").matches && (I.style.borderRadius = "0.375rem"), I.loading = "lazy", I.allowFullscreen = !0, I.setAttribute("scrolling", "auto"), I.setAttribute("frameBorder", "0"), t.appendChild(I), B.appendChild(t), { container: B, cleanup: () => {
6313
6324
  document.body.classList.remove("no-scroll"), I.classList.remove("block-interaction");
6314
6325
  const c = document.getElementById("signature-popup-backdrop");
6315
6326
  c && c.remove();
@@ -6317,17 +6328,17 @@ function UC(B) {
6317
6328
  });
6318
6329
  }
6319
6330
  function IQ(g, A) {
6320
- const E = (A && A.includeHash) != null ? A.includeHash : !0, B = A && A.pollMs || 1e3;
6321
- let C = SC(E);
6331
+ const E = (A && A.includeHash) != null ? A.includeHash : !0, C = A && A.pollMs || 1e3;
6332
+ let B = SC(E);
6322
6333
  function Q() {
6323
6334
  const n = SC(E);
6324
- if (n !== C) {
6325
- const c = C;
6326
- C = n, g(n, c);
6335
+ if (n !== B) {
6336
+ const c = B;
6337
+ B = n, g(n, c);
6327
6338
  }
6328
6339
  }
6329
6340
  window.addEventListener("popstate", Q), E && window.addEventListener("hashchange", Q);
6330
- const t = uI(Q), I = window.setInterval(Q, B);
6341
+ const t = uI(Q), I = window.setInterval(Q, C);
6331
6342
  return Promise.resolve().then(Q), function() {
6332
6343
  window.removeEventListener("popstate", Q), E && window.removeEventListener("hashchange", Q), t(), clearInterval(I);
6333
6344
  };
@@ -6346,18 +6357,18 @@ function uI(g) {
6346
6357
  };
6347
6358
  }
6348
6359
  history[A] = !0;
6349
- function B() {
6360
+ function C() {
6350
6361
  window.dispatchEvent(new Event("url-watcher:navigate")), g();
6351
6362
  }
6352
- var C = history.pushState, Q = history.replaceState;
6363
+ var B = history.pushState, Q = history.replaceState;
6353
6364
  return history.pushState = function() {
6354
- var t = C.apply(this, arguments);
6355
- return B(), t;
6365
+ var t = B.apply(this, arguments);
6366
+ return C(), t;
6356
6367
  }, history.replaceState = function() {
6357
6368
  var t = Q.apply(this, arguments);
6358
- return B(), t;
6369
+ return C(), t;
6359
6370
  }, function() {
6360
- history.pushState = C, history.replaceState = Q;
6371
+ history.pushState = B, history.replaceState = Q;
6361
6372
  try {
6362
6373
  delete history[A];
6363
6374
  } catch (I) {
@@ -6383,8 +6394,8 @@ function fI({
6383
6394
  onConfirm: g,
6384
6395
  onCancel: A,
6385
6396
  showCloseButton: E = !0,
6386
- preventClose: B = !1,
6387
- settingUrl: C = ""
6397
+ preventClose: C = !1,
6398
+ settingUrl: B = ""
6388
6399
  } = {}) {
6389
6400
  const Q = `Mã số thuế đã được đăng ký với
6390
6401
  M-Invoice.`, t = "Thiết lập", I = "Tiếp tục";
@@ -6394,8 +6405,8 @@ function fI({
6394
6405
  } catch (F) {
6395
6406
  }
6396
6407
  });
6397
- const c = DI(), w = sI(c), s = `Bạn có thể vào <strong style="color: ${w} !important;">Thiết lập</strong> để sử dụng dịch vụ, <br> hoặc chọn <strong style="color: ${w} !important;">Tiếp tục</strong> để đăng ký mới (có thể phát sinh phí).`, i = document.createElement("div");
6398
- i.style.cssText = `
6408
+ const c = DI(), w = sI(c), s = `Bạn có thể vào <strong style="color: ${w} !important;">Thiết lập</strong> để sử dụng dịch vụ, <br> hoặc chọn <strong style="color: ${w} !important;">Tiếp tục</strong> để đăng ký mới (có thể phát sinh phí).`, a = document.createElement("div");
6409
+ a.style.cssText = `
6399
6410
  position: fixed;
6400
6411
  inset: 0;
6401
6412
  z-index: 50;
@@ -6404,7 +6415,7 @@ function fI({
6404
6415
  justify-content: center;
6405
6416
  background-color: rgba(0, 0, 0, 0.5);
6406
6417
  backdrop-filter: blur(4px);
6407
- `, i.setAttribute("role", "dialog"), i.setAttribute("aria-modal", "true"), i.setAttribute("data-wgt-warning-popup", "true"), i.setAttribute("data-theme", c);
6418
+ `, a.setAttribute("role", "dialog"), a.setAttribute("aria-modal", "true"), a.setAttribute("data-wgt-warning-popup", "true"), a.setAttribute("data-theme", c);
6408
6419
  const o = document.createElement("div");
6409
6420
  if (o.style.cssText = `
6410
6421
  position: relative;
@@ -6415,7 +6426,7 @@ function fI({
6415
6426
  background-color: white;
6416
6427
  padding: 1.5rem;
6417
6428
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
6418
- `, i.appendChild(o), E) {
6429
+ `, a.appendChild(o), E) {
6419
6430
  const v = document.createElement("button");
6420
6431
  v.type = "button", v.innerHTML = "✕", v.style.cssText = `
6421
6432
  position: absolute;
@@ -6440,7 +6451,7 @@ function fI({
6440
6451
  "mouseleave",
6441
6452
  () => v.style.color = "#6b7280"
6442
6453
  ), v.addEventListener("click", () => {
6443
- B || J(!1);
6454
+ C || J(!1);
6444
6455
  }), o.appendChild(v);
6445
6456
  }
6446
6457
  const D = document.createElement("div");
@@ -6522,51 +6533,55 @@ function fI({
6522
6533
  }), m.addEventListener("focus", () => m.style.outline = "none"), d.appendChild(m);
6523
6534
  let Y = !1, l = !1;
6524
6535
  const P = (v) => {
6525
- v.target === i && !B && J(!1);
6536
+ v.target === a && !C && J(!1);
6526
6537
  }, f = (v) => {
6527
- v.key === "Escape" && !B && J(!1);
6538
+ v.key === "Escape" && !C && J(!1);
6528
6539
  };
6529
6540
  function M() {
6530
- i.addEventListener("click", P), window.addEventListener("keydown", f), r.addEventListener("click", () => J(!0)), m.addEventListener("click", () => J(!1));
6541
+ a.addEventListener("click", P), window.addEventListener("keydown", f), r.addEventListener("click", () => J(!0)), m.addEventListener("click", () => J(!1));
6531
6542
  }
6532
6543
  function k() {
6533
- i.removeEventListener("click", P), window.removeEventListener("keydown", f);
6544
+ a.removeEventListener("click", P), window.removeEventListener("keydown", f);
6534
6545
  }
6535
6546
  function H() {
6536
- Y || (Y = !0, document.body.appendChild(i), i.style.display = "flex", setTimeout(() => r.focus(), 0), M());
6547
+ Y || (Y = !0, document.body.appendChild(a), a.style.display = "flex", setTimeout(() => r.focus(), 0), M());
6537
6548
  }
6538
6549
  function J(v = !1) {
6539
6550
  if (!(!Y || l)) {
6540
6551
  l = !0, Y = !1, k();
6541
6552
  try {
6542
- i.remove();
6553
+ a.remove();
6543
6554
  } catch (F) {
6544
6555
  }
6545
- v ? C ? window.location.href = C : typeof g == "function" && g() : !v && typeof A == "function" && A();
6556
+ v ? B ? window.location.href = B : typeof g == "function" && g() : !v && typeof A == "function" && A();
6546
6557
  }
6547
6558
  }
6548
- return { container: i, open: H, close: J };
6559
+ return { container: a, open: H, close: J };
6549
6560
  }
6550
- function DB(g, A, E, B = !1, C = "ocb", Q = "") {
6561
+ function sB(g, A, E, C = !1, B = "ocb", Q = "") {
6551
6562
  return W(this, null, function* () {
6552
6563
  var t, I;
6553
6564
  try {
6554
- if (C !== "bvb") {
6565
+ if (B !== "bvb") {
6555
6566
  E(!0, null);
6556
6567
  return;
6557
6568
  }
6558
6569
  const n = yield JQ(g, A, "HDTT");
6559
6570
  let c = null;
6560
- if (B) {
6561
- c = yield eC(g, A), E(n.isNewCustomer, c);
6571
+ if (C) {
6572
+ c = yield Sg(g, A), E(n.isNewCustomer, c);
6562
6573
  return;
6563
6574
  }
6564
6575
  if (!n.isNewCustomer) {
6565
- c = yield eC(g, A), yield E(n.isNewCustomer, c), yield new Promise((s) => setTimeout(s, 1e3)), (((t = c == null ? void 0 : c.organization) == null ? void 0 : t.name) || ((I = c == null ? void 0 : c.organization) == null ? void 0 : I.taxCode)) && fI({
6576
+ c = yield Sg(g, A), yield E(n.isNewCustomer, c), yield new Promise((s) => setTimeout(s, 1e3)), (((t = c == null ? void 0 : c.organization) == null ? void 0 : t.name) || ((I = c == null ? void 0 : c.organization) == null ? void 0 : I.taxCode)) && fI({
6566
6577
  settingUrl: Q,
6567
6578
  onCancel: () => {
6568
6579
  E(!0, null);
6569
6580
  },
6581
+ onConfirm: () => W(null, null, function* () {
6582
+ const a = yield Sg(g, A);
6583
+ E(!1, a);
6584
+ }),
6570
6585
  showCloseButton: !0,
6571
6586
  preventClose: !1
6572
6587
  }).open();
@@ -6578,7 +6593,7 @@ function DB(g, A, E, B = !1, C = "ocb", Q = "") {
6578
6593
  }
6579
6594
  });
6580
6595
  }
6581
- function qI(g, A, E, B, C, Q) {
6596
+ function qI(g, A, E, C, B, Q) {
6582
6597
  return W(this, null, function* () {
6583
6598
  var x, N;
6584
6599
  const I = [
@@ -6590,13 +6605,13 @@ function qI(g, A, E, B, C, Q) {
6590
6605
  (L) => L.route === "m-invoice"
6591
6606
  );
6592
6607
  function n() {
6593
- return [a("stepInfo"), a("stepPlan"), a("stepPayment")];
6608
+ return [i("stepInfo"), i("stepPlan"), i("stepPayment")];
6594
6609
  }
6595
6610
  let c = TQ({
6596
6611
  steps: n(),
6597
6612
  currentStep: 1
6598
- }), { container: w, setStep: s, setContent: i } = c;
6599
- g.dataset.theme = C || "default", g.classList.add("wgt:mx-auto", "wgt:@container"), g.appendChild(w);
6613
+ }), { container: w, setStep: s, setContent: a } = c;
6614
+ g.dataset.theme = B || "default", g.classList.add("wgt:mx-auto", "wgt:@container"), g.appendChild(w);
6600
6615
  let o = 1, D = I[0], u = {
6601
6616
  eInvoiceRegistration: {
6602
6617
  taxAuthorityCode: "",
@@ -6605,7 +6620,7 @@ function qI(g, A, E, B, C, Q) {
6605
6620
  organization: {
6606
6621
  name: "",
6607
6622
  address: "",
6608
- taxCode: (B == null ? void 0 : B.taxCode) || "",
6623
+ taxCode: (C == null ? void 0 : C.taxCode) || "",
6609
6624
  taxAuthority: ""
6610
6625
  },
6611
6626
  contactPerson: {
@@ -6627,7 +6642,7 @@ function qI(g, A, E, B, C, Q) {
6627
6642
  hasUsedEInvoice: !1,
6628
6643
  isUsedEInvoiceBefore: !1
6629
6644
  },
6630
- bank: C,
6645
+ bank: B,
6631
6646
  provider: D.route,
6632
6647
  logo: null,
6633
6648
  license: null,
@@ -6649,7 +6664,7 @@ function qI(g, A, E, B, C, Q) {
6649
6664
  organization: {
6650
6665
  name: "",
6651
6666
  address: "",
6652
- taxCode: (B == null ? void 0 : B.taxCode) || "",
6667
+ taxCode: (C == null ? void 0 : C.taxCode) || "",
6653
6668
  taxAuthority: ""
6654
6669
  },
6655
6670
  contactPerson: {
@@ -6671,7 +6686,7 @@ function qI(g, A, E, B, C, Q) {
6671
6686
  hasUsedEInvoice: !1,
6672
6687
  isUsedEInvoiceBefore: !1
6673
6688
  },
6674
- bank: C || "ocb",
6689
+ bank: B || "ocb",
6675
6690
  provider: D.route,
6676
6691
  logo: null,
6677
6692
  license: null,
@@ -6689,7 +6704,7 @@ function qI(g, A, E, B, C, Q) {
6689
6704
  L || (L = {
6690
6705
  name: "",
6691
6706
  address: "",
6692
- taxCode: (B == null ? void 0 : B.taxCode) || "",
6707
+ taxCode: (C == null ? void 0 : C.taxCode) || "",
6693
6708
  taxAuthority: ""
6694
6709
  }), u = GA(PA({}, u), {
6695
6710
  eInvoiceRegistration: {
@@ -6755,20 +6770,21 @@ function qI(g, A, E, B, C, Q) {
6755
6770
  return W(this, null, function* () {
6756
6771
  if (L === 1) {
6757
6772
  const { container: b } = yield eE({
6773
+ isRenewal: Q,
6758
6774
  providerProps: {
6759
6775
  providers: I,
6760
6776
  selectedRoute: D.route,
6761
6777
  onProviderChange: (y) => W(null, null, function* () {
6762
6778
  var AA, S;
6763
- D = y, yield DB(
6779
+ D = y, yield sB(
6764
6780
  y.route,
6765
6781
  (S = (AA = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : AA.organization) == null ? void 0 : S.taxCode,
6766
6782
  (EA, nA) => {
6767
6783
  T = EA, U(nA);
6768
6784
  },
6769
6785
  Q,
6770
- C,
6771
- (B == null ? void 0 : B.settingUrl) || ""
6786
+ B,
6787
+ (C == null ? void 0 : C.settingUrl) || ""
6772
6788
  );
6773
6789
  })
6774
6790
  },
@@ -6790,14 +6806,14 @@ function qI(g, A, E, B, C, Q) {
6790
6806
  // };
6791
6807
  formProps: {
6792
6808
  isNewCustomer: T,
6793
- handleCheckNewCustomer: DB,
6809
+ handleCheckNewCustomer: sB,
6794
6810
  updateRegistrationData: U,
6795
- serial: (B == null ? void 0 : B.serial) || "",
6811
+ serial: (C == null ? void 0 : C.serial) || "",
6796
6812
  onSubmit: (y) => {
6797
6813
  u.eInvoiceRegistration = PA(PA({}, u.eInvoiceRegistration), y.eInvoiceRegistration), u.logo = y.logo || null, u.license = y.license || null, u.idCard = y.idCard || null, u.idCardBack = y.idCardBack || null, u.provider = D.route, o = 2, s(o, n()), j(o), F();
6798
6814
  },
6799
6815
  registrationData: u,
6800
- theme: C || "default",
6816
+ theme: B || "default",
6801
6817
  onShowPolicy: E || (() => {
6802
6818
  }),
6803
6819
  selectedTaxAuthority: P,
@@ -6810,7 +6826,7 @@ function qI(g, A, E, B, C, Q) {
6810
6826
  }
6811
6827
  }
6812
6828
  });
6813
- i(b);
6829
+ a(b);
6814
6830
  } else if (L === 2) {
6815
6831
  const { container: b } = yield dE({
6816
6832
  onNext: () => W(null, null, function* () {
@@ -6847,7 +6863,7 @@ function qI(g, A, E, B, C, Q) {
6847
6863
  selectedInvoiceOtp: m,
6848
6864
  selectedSignatureOtp: Y,
6849
6865
  selectedPromotions: f,
6850
- theme: C,
6866
+ theme: B,
6851
6867
  selectedProvider: D,
6852
6868
  registrationData: u,
6853
6869
  isNewCustomer: T,
@@ -6856,7 +6872,7 @@ function qI(g, A, E, B, C, Q) {
6856
6872
  k = y;
6857
6873
  }
6858
6874
  });
6859
- i(b);
6875
+ a(b);
6860
6876
  } else if (L === 3) {
6861
6877
  const { container: b } = yield II({
6862
6878
  onNext: () => {
@@ -6867,11 +6883,11 @@ function qI(g, A, E, B, C, Q) {
6867
6883
  },
6868
6884
  step: 3,
6869
6885
  checkoutProps: {
6870
- logos: C === "ocb" ? [oI] : [tI, KC, wI, cI, hI],
6871
- logosAbove: C === "ocb" ? [KC, eI] : [],
6886
+ logos: B === "ocb" ? [oI] : [tI, KC, wI, cI, hI],
6887
+ logosAbove: B === "ocb" ? [KC, eI] : [],
6872
6888
  illustrationSrc: aI
6873
6889
  },
6874
- theme: C || "ocb",
6890
+ theme: B || "ocb",
6875
6891
  orderInfoProps: {
6876
6892
  registrationData: u,
6877
6893
  orderId: d || "",
@@ -6889,7 +6905,7 @@ function qI(g, A, E, B, C, Q) {
6889
6905
  d = y;
6890
6906
  }
6891
6907
  });
6892
- i(b);
6908
+ a(b);
6893
6909
  } else if (L === 4) {
6894
6910
  const { container: b } = nI({
6895
6911
  orderId: d || "",
@@ -6900,28 +6916,28 @@ function qI(g, A, E, B, C, Q) {
6900
6916
  onReturnHome: () => {
6901
6917
  q(), typeof A == "function" && A();
6902
6918
  },
6903
- theme: C || "ocb",
6904
- settingUrl: (B == null ? void 0 : B.settingUrl) || "",
6905
- serial: (B == null ? void 0 : B.serial) || "1C25TYY",
6919
+ theme: B || "ocb",
6920
+ settingUrl: (C == null ? void 0 : C.settingUrl) || "",
6921
+ serial: (C == null ? void 0 : C.serial) || "1C25TYY",
6906
6922
  provider: D.route
6907
6923
  });
6908
- i(b);
6924
+ a(b);
6909
6925
  }
6910
6926
  });
6911
6927
  }
6912
6928
  c.updateTitle(
6913
- T ? a("eInvoiceRegister") : a("eInvoiceRenewal")
6929
+ T ? i("eInvoiceRegister") : i("eInvoiceRenewal")
6914
6930
  );
6915
- const { container: O, open: e } = vB();
6916
- R && (i(O), e()), yield DB(
6931
+ const { container: O, open: e } = MB();
6932
+ R && (a(O), e()), yield sB(
6917
6933
  D.route,
6918
6934
  (N = (x = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : x.organization) == null ? void 0 : N.taxCode,
6919
6935
  (L, b) => W(null, null, function* () {
6920
6936
  R = !1, T = L, U(b);
6921
6937
  }),
6922
6938
  Q,
6923
- C,
6924
- (B == null ? void 0 : B.settingUrl) || ""
6939
+ B,
6940
+ (C == null ? void 0 : C.settingUrl) || ""
6925
6941
  );
6926
6942
  const h = IQ(
6927
6943
  () => {
@@ -6934,21 +6950,21 @@ function qI(g, A, E, B, C, Q) {
6934
6950
  }
6935
6951
  });
6936
6952
  }
6937
- function vI(g, A, E, B) {
6953
+ function vI(g, A, E, C) {
6938
6954
  return W(this, null, function* () {
6939
- const { container: C, setContent: Q } = iI(), t = E == null ? void 0 : E.orderId, I = (E == null ? void 0 : E.callbackUrl) || `${window.location.origin}/dashboard`, { container: n } = yield UC({
6955
+ const { container: B, setContent: Q } = iI(), t = E == null ? void 0 : E.orderId, I = (E == null ? void 0 : E.callbackUrl) || `${window.location.origin}/dashboard`, { container: n } = yield UC({
6940
6956
  orderId: t,
6941
6957
  callbackUrl: I,
6942
6958
  // onCompleteSignature,
6943
- onCompleteSignature: (...i) => W(null, null, function* () {
6944
- B && (yield B(...i)), s();
6959
+ onCompleteSignature: (...a) => W(null, null, function* () {
6960
+ C && (yield C(...a)), s();
6945
6961
  })
6946
6962
  });
6947
- Q(n), g.appendChild(C);
6963
+ Q(n), g.appendChild(B);
6948
6964
  const { container: c } = yield UC({
6949
6965
  orderId: t,
6950
6966
  callbackUrl: I,
6951
- onCompleteSignature: B
6967
+ onCompleteSignature: C
6952
6968
  });
6953
6969
  Q(c);
6954
6970
  const w = IQ(