@invoice-sdk/widget 1.76.0 → 1.76.1

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.
@@ -12,30 +12,30 @@ var AC = (g, A, E) => A in g ? IQ(g, A, { enumerable: !0, configurable: !0, writ
12
12
  }, bA = (g, A) => nQ(g, tQ(A));
13
13
  var Gg = (g, A) => {
14
14
  var E = {};
15
- for (var C in g)
16
- gC.call(g, C) && A.indexOf(C) < 0 && (E[C] = g[C]);
15
+ for (var Q in g)
16
+ gC.call(g, Q) && A.indexOf(Q) < 0 && (E[Q] = g[Q]);
17
17
  if (g != null && Tg)
18
- for (var C of Tg(g))
19
- A.indexOf(C) < 0 && BC.call(g, C) && (E[C] = g[C]);
18
+ for (var Q of Tg(g))
19
+ A.indexOf(Q) < 0 && BC.call(g, Q) && (E[Q] = g[Q]);
20
20
  return E;
21
21
  };
22
- var p = (g, A, E) => new Promise((C, B) => {
23
- var Q = (n) => {
22
+ var p = (g, A, E) => new Promise((Q, B) => {
23
+ var C = (n) => {
24
24
  try {
25
25
  I(E.next(n));
26
- } catch (o) {
27
- B(o);
26
+ } catch (D) {
27
+ B(D);
28
28
  }
29
29
  }, t = (n) => {
30
30
  try {
31
31
  I(E.throw(n));
32
- } catch (o) {
33
- B(o);
32
+ } catch (D) {
33
+ B(D);
34
34
  }
35
- }, I = (n) => n.done ? C(n.value) : Promise.resolve(n.value).then(Q, t);
35
+ }, I = (n) => n.done ? Q(n.value) : Promise.resolve(n.value).then(C, t);
36
36
  I((E = E.apply(g, A)).next());
37
37
  });
38
- import { t as D, g as wB, a as NC, b as bC, G as hQ, C as cQ, c as eB, d as ag, e as wQ, f as eQ, h as Yg, O as jC, s as Qg, i as aB, j as aQ, k as oQ, l as DQ, m as uQ, n as sQ, o as iQ, p as fQ, v as mQ, r as yC, u as KC } from "./index-daMOQLMq.js";
38
+ import { t as o, g as wB, a as NC, b as bC, G as hQ, C as cQ, c as eB, d as ag, e as wQ, f as eQ, h as Yg, O as jC, s as Qg, i as aB, j as aQ, k as oQ, l as DQ, m as uQ, n as sQ, o as iQ, p as fQ, v as mQ, r as yC, u as KC } from "./index-BPmYaMay.js";
39
39
  import { g as UC } from "./_commonjsHelpers-bAxELxBV.js";
40
40
  function CC({ steps: g = [], currentStep: A = 1 } = {}) {
41
41
  const E = document.createElement("div");
@@ -47,8 +47,8 @@ function CC({ steps: g = [], currentStep: A = 1 } = {}) {
47
47
  "wgt:overflow-hidden",
48
48
  "wgt:shadow-sm"
49
49
  ].join(" ");
50
- const C = document.createElement("div");
51
- C.className = [
50
+ const Q = document.createElement("div");
51
+ Q.className = [
52
52
  "wgt:absolute",
53
53
  "wgt:inset-0",
54
54
  "wgt:transition-all",
@@ -56,16 +56,16 @@ function CC({ steps: g = [], currentStep: A = 1 } = {}) {
56
56
  "wgt:rounded-r-md",
57
57
  "wgt:max-sm:hidden",
58
58
  "wgt:bg-primary/15"
59
- ].join(" "), C.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)";
59
+ ].join(" "), Q.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)";
60
60
  const B = document.createElement("div");
61
61
  B.className = "wgt:relative wgt:flex wgt:w-full wgt:z-10 wgt:max-sm:grid wgt:max-sm:grid-cols-1 wgt:max-sm:overflow-hidden";
62
- const Q = [];
62
+ const C = [];
63
63
  function t(n) {
64
- g.forEach((o, c) => {
64
+ g.forEach((D, c) => {
65
65
  const s = c + 1, a = n === g.length + 1 ? s < g.length : n !== s, e = document.createElement("div");
66
66
  e.setAttribute("role", "listitem"), e.setAttribute(
67
67
  "aria-label",
68
- `Step ${s} of ${g.length}: ${o.label}`
68
+ `Step ${s} of ${g.length}: ${D.label}`
69
69
  ), e.className = [
70
70
  "wgt:flex-1",
71
71
  "wgt:flex",
@@ -89,13 +89,13 @@ function CC({ steps: g = [], currentStep: A = 1 } = {}) {
89
89
  const q = document.createElement("span");
90
90
  q.innerText = String(s), q.className = "wgt:text-white wgt:font-medium", f.appendChild(q);
91
91
  const F = document.createElement("span");
92
- F.innerText = o.label, F.className = "wgt:font-medium wgt:whitespace-nowrap", e.append(f, F), B.append(e), Q.push({ wrap: e, circle: f, label: F });
93
- }), E.append(C, B);
92
+ F.innerText = D.label, F.className = "wgt:font-medium wgt:whitespace-nowrap", e.append(f, F), B.append(e), C.push({ wrap: e, circle: f, label: F });
93
+ }), E.append(Q, B);
94
94
  }
95
95
  t(A);
96
96
  function I(n) {
97
- const o = g.length, c = Math.max(0, Math.min(n, o)), s = c / o * 100;
98
- C.style.width = `${s}%`, c === o ? (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: e }, f) => {
97
+ const D = g.length, c = Math.max(0, Math.min(n, D)), s = c / D * 100;
98
+ Q.style.width = `${s}%`, c === D ? (Q.style.clipPath = "none", Q.style.borderTopRightRadius = "10px", Q.style.borderBottomRightRadius = "10px") : (Q.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", Q.style.borderTopRightRadius = "0", Q.style.borderBottomRightRadius = "0"), C.forEach(({ circle: a, label: e }, f) => {
99
99
  f + 1 <= c ? (a.classList.add("wgt:bg-icon-primary"), a.classList.remove("wgt:bg-icon-soft-400"), e.classList.add("wgt:text-primary-dark"), e.classList.remove("wgt:text-soft-400")) : (a.classList.add("wgt:bg-icon-soft-400"), a.classList.remove("wgt:bg-icon-primary"), e.classList.add("wgt:text-soft-400"), e.classList.remove("wgt:text-primary-dark"));
100
100
  });
101
101
  }
@@ -121,13 +121,13 @@ function rQ({ steps: g = [], currentStep: A = 1 } = {}) {
121
121
  "wgt:py-8",
122
122
  "wgt:overflow-auto"
123
123
  ].join(" ");
124
- const C = document.createElement("h1");
125
- C.className = [
124
+ const Q = document.createElement("h1");
125
+ Q.className = [
126
126
  "wgt:text-[28px]",
127
127
  "wgt:font-bold",
128
128
  "wgt:leading-[30px]",
129
129
  "wgt:text-strong-950"
130
- ].join(" "), C.innerText = D("widgetTitle");
130
+ ].join(" "), Q.innerText = o("widgetTitle");
131
131
  const B = document.createElement("div");
132
132
  B.className = [
133
133
  "wgt:w-full",
@@ -147,36 +147,36 @@ function rQ({ steps: g = [], currentStep: A = 1 } = {}) {
147
147
  "wgt:max-sm:border-none",
148
148
  "wgt:max-sm:shadow-none"
149
149
  ].join(" ");
150
- let Q = CC({
151
- steps: g.map((o) => ({ label: o })),
150
+ let C = CC({
151
+ steps: g.map((D) => ({ label: D })),
152
152
  currentStep: A
153
153
  });
154
- B.appendChild(Q.container);
154
+ B.appendChild(C.container);
155
155
  const t = document.createElement("div");
156
- t.className = "wgt:flex-1", B.appendChild(t), E.appendChild(C), E.appendChild(B);
156
+ t.className = "wgt:flex-1", B.appendChild(t), E.appendChild(Q), E.appendChild(B);
157
157
  function I() {
158
- C.innerText = D("widgetTitle");
158
+ Q.innerText = o("widgetTitle");
159
159
  }
160
- function n(o) {
161
- Q.container.remove(), Q = CC({
162
- steps: o.map((c) => ({ label: c })),
160
+ function n(D) {
161
+ C.container.remove(), C = CC({
162
+ steps: D.map((c) => ({ label: c })),
163
163
  currentStep: A
164
- }), B.insertBefore(Q.container, t);
164
+ }), B.insertBefore(C.container, t);
165
165
  }
166
166
  return {
167
167
  container: E,
168
168
  /**
169
169
  * Change which step is active (1‐based index):
170
170
  */
171
- setStep(o, c) {
172
- A = o, n(c), Q.update(o);
171
+ setStep(D, c) {
172
+ A = D, n(c), C.update(D);
173
173
  },
174
174
  /**
175
175
  * Replace whatever content is inside the "children" area:
176
176
  * @param {HTMLElement} domNode
177
177
  */
178
- setContent(o) {
179
- t.replaceChildren(o);
178
+ setContent(D) {
179
+ t.replaceChildren(D);
180
180
  },
181
181
  updateSteps: n,
182
182
  updateTitle: I
@@ -186,15 +186,15 @@ function Jg({
186
186
  name: g,
187
187
  value: A = "",
188
188
  label: E = "",
189
- checked: C = !1,
189
+ checked: Q = !1,
190
190
  onChange: B,
191
- disabled: Q = !1,
191
+ disabled: C = !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
196
  let s = function(a) {
197
- a ? (o.classList.add("wgt:bg-primary", "wgt:border-primary"), o.classList.remove("wgt:border-weak-50")) : (o.classList.remove("wgt:bg-primary", "wgt:border-primary"), o.classList.add("wgt:border-weak-50")), c.innerHTML = a ? `<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
197
+ a ? (D.classList.add("wgt:bg-primary", "wgt:border-primary"), D.classList.remove("wgt:border-weak-50")) : (D.classList.remove("wgt:bg-primary", "wgt:border-primary"), D.classList.add("wgt:border-weak-50")), c.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,9 +214,9 @@ function Jg({
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 = C;
218
- const o = document.createElement("div");
219
- o.className = [
217
+ }, n = Q;
218
+ const D = document.createElement("div");
219
+ D.className = [
220
220
  "wgt:w-7",
221
221
  "wgt:h-7",
222
222
  "wgt:border-2",
@@ -225,26 +225,26 @@ function Jg({
225
225
  "wgt:items-center",
226
226
  "wgt:justify-center",
227
227
  "wgt:transition-colors",
228
- Q ? "wgt:cursor-not-allowed" : "wgt:cursor-pointer"
228
+ C ? "wgt:cursor-not-allowed" : "wgt:cursor-pointer"
229
229
  ].join(" ");
230
230
  const c = document.createElement("div");
231
- s(C), o.appendChild(c), o.addEventListener("click", (a) => {
232
- a.stopPropagation(), !Q && (n = !n, s(n), B(n));
233
- }), I.append(o);
231
+ s(Q), D.appendChild(c), D.addEventListener("click", (a) => {
232
+ a.stopPropagation(), !C && (n = !n, s(n), B(n));
233
+ }), I.append(D);
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
- const o = document.createElement("input");
238
- o.type = "radio", g && (o.name = g), A && (o.value = A), o.checked = C, o.disabled = Q, o.className = "wgt:invisible wgt:h-6 wgt:w-6";
237
+ const D = document.createElement("input");
238
+ D.type = "radio", g && (D.name = g), A && (D.value = A), D.checked = Q, D.disabled = C, D.className = "wgt:invisible wgt:h-6 wgt:w-6";
239
239
  const c = document.createElement("div");
240
240
  c.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
- ${C ? "wgt:ring-primary wgt:bg-primary" : "wgt:ring-grey-6 wgt:bg-grey-6"}`;
242
+ ${Q ? "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, o.addEventListener("change", (a) => {
244
+ s.innerText = E, D.addEventListener("change", (a) => {
245
245
  const e = a.target.checked;
246
- typeof B == "function" && B(e), o.checked = !1;
247
- }), n.append(o, s), n.append(c), I.append(n);
246
+ typeof B == "function" && B(e), D.checked = !1;
247
+ }), n.append(D, s), n.append(c), I.append(n);
248
248
  }
249
249
  return {
250
250
  container: I
@@ -255,12 +255,12 @@ function PQ({
255
255
  selectedRoute: A = null,
256
256
  onProviderChange: E
257
257
  }) {
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 = D("selectProvider"), C.appendChild(B);
262
258
  const Q = document.createElement("div");
263
- Q.className = [
259
+ Q.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 = o("selectProvider"), Q.appendChild(B);
262
+ const C = document.createElement("div");
263
+ C.className = [
264
264
  "wgt:w-full",
265
265
  "wgt:grid",
266
266
  "wgt:grid-flow-col",
@@ -273,9 +273,9 @@ function PQ({
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", C.appendChild(Q);
276
+ ].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.overflowY = "hidden", Q.appendChild(C);
277
277
  function t() {
278
- Q.innerHTML = "", g.forEach((c) => {
278
+ C.innerHTML = "", g.forEach((c) => {
279
279
  const s = c.route === A, a = document.createElement("div");
280
280
  a.dataset.checked = s ? "true" : "false", a.className = [
281
281
  "wgt:flex",
@@ -310,26 +310,26 @@ function PQ({
310
310
  disabled: !1
311
311
  // Disable checkbox for FPT
312
312
  });
313
- a.appendChild(e), a.appendChild(J), Q.appendChild(a);
313
+ a.appendChild(e), a.appendChild(J), C.appendChild(a);
314
314
  });
315
315
  }
316
316
  t();
317
- let I = !1, n, o;
318
- return Q.addEventListener("mousedown", (c) => {
319
- I = !0, Q.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), n = c.pageX - Q.offsetLeft, o = Q.scrollLeft;
317
+ let I = !1, n, D;
318
+ return C.addEventListener("mousedown", (c) => {
319
+ I = !0, C.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), n = c.pageX - C.offsetLeft, D = C.scrollLeft;
320
320
  }), document.addEventListener("mouseup", () => {
321
- I = !1, Q.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
322
- }), Q.addEventListener("mouseleave", () => {
323
- I = !1, Q.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
324
- }), Q.addEventListener("mousemove", (c) => {
321
+ I = !1, C.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
322
+ }), C.addEventListener("mouseleave", () => {
323
+ I = !1, C.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
324
+ }), C.addEventListener("mousemove", (c) => {
325
325
  if (!I) return;
326
326
  c.preventDefault();
327
- const a = (c.pageX - Q.offsetLeft - n) * 1.5;
328
- Q.scrollLeft = o - a;
329
- }), Q.addEventListener("wheel", (c) => {
330
- c.preventDefault(), Q.scrollLeft += c.deltaY;
327
+ const a = (c.pageX - C.offsetLeft - n) * 1.5;
328
+ C.scrollLeft = D - a;
329
+ }), C.addEventListener("wheel", (c) => {
330
+ c.preventDefault(), C.scrollLeft += c.deltaY;
331
331
  }), {
332
- container: C,
332
+ container: Q,
333
333
  setSelectedRoute(c) {
334
334
  A = c, t();
335
335
  }
@@ -339,25 +339,25 @@ function xA({
339
339
  name: g,
340
340
  value: A = "",
341
341
  type: E = "text",
342
- placeholder: C = "",
342
+ placeholder: Q = "",
343
343
  label: B,
344
- required: Q = !1,
344
+ required: C = !1,
345
345
  error: t = null,
346
346
  onInput: I = null,
347
347
  readOnly: n = !1,
348
- horizontal: o = !1
348
+ horizontal: D = !1
349
349
  }) {
350
350
  const c = document.createElement("div");
351
- if (c.className = "wgt:w-full " + (o ? "wgt:max-xl:flex wgt:max-xl:flex-col wgt:max-xl:items-start wgt:max-xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-center wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), B) {
351
+ if (c.className = "wgt:w-full " + (D ? "wgt:max-xl:flex wgt:max-xl:flex-col wgt:max-xl:items-start wgt:max-xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-center wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), B) {
352
352
  const e = document.createElement("label");
353
- if (e.htmlFor = g, e.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal", e.innerText = B, Q) {
353
+ if (e.htmlFor = g, e.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal", e.innerText = B, C) {
354
354
  const f = document.createElement("span");
355
355
  f.className = "wgt:text-red-500 wgt:ml-1", f.innerText = "*", e.appendChild(f);
356
356
  }
357
357
  c.appendChild(e);
358
358
  }
359
359
  const s = document.createElement("input");
360
- s.type = E, s.name = g, s.id = g, s.value = A, s.placeholder = C, s.readOnly = n, s.autocomplete = "off", s.autocapitalize = "off", s.spellcheck = !1, s.className = [
360
+ s.type = E, s.name = g, s.id = g, s.value = A, s.placeholder = Q, s.readOnly = n, s.autocomplete = "off", s.autocapitalize = "off", s.spellcheck = !1, s.className = [
361
361
  "wgt:col-span-4",
362
362
  "wgt:w-full",
363
363
  "wgt:border",
@@ -367,7 +367,7 @@ function xA({
367
367
  "wgt:focus:outline-none",
368
368
  t ? "wgt:border-red-500 wgt:focus:border-red-500" : "wgt:border-gray-300 wgt:focus:border-primary",
369
369
  "wgt:bg-white"
370
- ].join(" "), Q && s.setAttribute("required", "true"), typeof I == "function" && s.addEventListener("input", I), E === "number" && s.addEventListener("wheel", (e) => {
370
+ ].join(" "), C && s.setAttribute("required", "true"), typeof I == "function" && s.addEventListener("input", I), E === "number" && s.addEventListener("wheel", (e) => {
371
371
  e.preventDefault();
372
372
  }, { passive: !1 });
373
373
  const a = document.createElement("span");
@@ -386,26 +386,26 @@ function Og({
386
386
  name: g,
387
387
  value: A = "",
388
388
  options: E = [],
389
- label: C,
389
+ label: Q,
390
390
  disabled: B = !1,
391
- error: Q = null,
391
+ error: C = null,
392
392
  onChange: t = null,
393
393
  required: I = !1,
394
394
  horizontal: n = !1,
395
- searchable: o = !1
395
+ searchable: D = !1
396
396
  }) {
397
397
  const c = document.createElement("div");
398
398
  c.className = "wgt:w-full " + (n ? "wgt:max-xl:flex wgt:max-xl:flex-col wgt:max-xl:items-start wgt:max-xl:gap-2 wgt:grid wgt:grid-cols-6 wgt:items-center wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2");
399
399
  const s = document.createElement("label");
400
- if (s.htmlFor = g, s.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", s.innerText = C, c.appendChild(s), I) {
400
+ if (s.htmlFor = g, s.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", s.innerText = Q, c.appendChild(s), I) {
401
401
  const a = document.createElement("span");
402
402
  a.className = "wgt:text-red-500 wgt:ml-1", a.innerText = "*", s.appendChild(a);
403
403
  }
404
- if (o) {
404
+ if (D) {
405
405
  const a = document.createElement("div");
406
406
  a.className = "wgt:col-span-4 wgt:relative wgt:w-full";
407
407
  const e = document.createElement("input");
408
- e.type = "text", e.placeholder = `${D("search", "Tìm kiếm")} ${C.toLowerCase()}...`, e.disabled = B, e.className = [
408
+ e.type = "text", e.placeholder = `${o("search", "Tìm kiếm")} ${Q.toLowerCase()}...`, e.disabled = B, e.className = [
409
409
  "wgt:border",
410
410
  "wgt:rounded",
411
411
  "wgt:px-3",
@@ -415,7 +415,7 @@ function Og({
415
415
  "wgt:focus:ring-2",
416
416
  "wgt:focus:ring-blue-500",
417
417
  "wgt:bg-white",
418
- Q ? "wgt:border-red-500" : "wgt:border-gray-300"
418
+ C ? "wgt:border-red-500" : "wgt:border-gray-300"
419
419
  ].join(" ");
420
420
  const f = document.createElement("div");
421
421
  f.className = "wgt:absolute wgt:top-full wgt:left-0 wgt:right-0 wgt:bg-white wgt:border wgt:border-gray-300 wgt:rounded wgt:shadow-lg wgt:z-50 wgt:hidden wgt:max-h-[500px] wgt:overflow-y-auto";
@@ -430,7 +430,7 @@ function Og({
430
430
  const m = (i = H) => {
431
431
  if (q.innerHTML = "", i.length === 0) {
432
432
  const r = document.createElement("div");
433
- r.className = "wgt:px-3 wgt:py-2 wgt:text-gray-500 wgt:text-sm", r.innerText = `${D("noResults", "Không tìm thấy kết quả")}`, q.appendChild(r);
433
+ r.className = "wgt:px-3 wgt:py-2 wgt:text-gray-500 wgt:text-sm", r.innerText = `${o("noResults", "Không tìm thấy kết quả")}`, q.appendChild(r);
434
434
  return;
435
435
  }
436
436
  i.forEach((r) => {
@@ -468,7 +468,7 @@ function Og({
468
468
  r.value = i.value, r.innerText = i.label, i.value === A && (r.selected = !0), k.appendChild(r);
469
469
  }), c.appendChild(a), c.appendChild(k);
470
470
  const v = document.createElement("span");
471
- return v.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", v.innerText = Q || "", Q || (v.style.display = "none"), c.appendChild(v), {
471
+ return v.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", v.innerText = C || "", C || (v.style.display = "none"), c.appendChild(v), {
472
472
  container: c,
473
473
  selectEl: k,
474
474
  setError(i) {
@@ -509,15 +509,15 @@ function Og({
509
509
  "wgt:focus:ring-2",
510
510
  "wgt:focus:ring-blue-500",
511
511
  "wgt:bg-white",
512
- Q ? "wgt:border-red-500" : "wgt:border-gray-300"
512
+ C ? "wgt:border-red-500" : "wgt:border-gray-300"
513
513
  ].join(" ");
514
514
  const e = document.createElement("option");
515
- e.value = "", e.disabled = !0, e.selected = A === "" || A == null, e.innerText = `-- ${D("select", "Chọn")} ${C.toLowerCase()} --`, a.appendChild(e), E.forEach((q) => {
515
+ e.value = "", e.disabled = !0, e.selected = A === "" || A == null, e.innerText = `-- ${o("select", "Chọn")} ${Q.toLowerCase()} --`, a.appendChild(e), E.forEach((q) => {
516
516
  const F = document.createElement("option");
517
517
  F.value = q.value, F.innerText = q.label, q.value === A && (F.selected = !0), a.appendChild(F);
518
518
  }), typeof t == "function" && a.addEventListener("change", t), c.appendChild(a);
519
519
  const f = document.createElement("span");
520
- return f.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", f.innerText = Q || "", Q || (f.style.display = "none"), c.appendChild(f), {
520
+ return f.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", f.innerText = C || "", C || (f.style.display = "none"), c.appendChild(f), {
521
521
  container: c,
522
522
  selectEl: a,
523
523
  setError(q) {
@@ -544,11 +544,11 @@ function Ig({
544
544
  title: g,
545
545
  isDisabled: A = !1,
546
546
  handleClick: E = null,
547
- type: C = "button",
547
+ type: Q = "button",
548
548
  className: B = ""
549
549
  } = {}) {
550
- const Q = document.createElement("button");
551
- return Q.type = C, Q.disabled = A, Q.className = [
550
+ const C = document.createElement("button");
551
+ return C.type = Q, C.disabled = A, C.className = [
552
552
  "wgt:bg-primary",
553
553
  "wgt:hover:bg-primary-dark",
554
554
  "wgt:px-6",
@@ -558,26 +558,26 @@ function Ig({
558
558
  "wgt:disabled:cursor-not-allowed",
559
559
  "wgt:cursor-pointer",
560
560
  B
561
- ].filter(Boolean).join(" "), Q.innerText = g, typeof E == "function" && Q.addEventListener("click", (t) => p(null, null, function* () {
562
- if (!Q.disabled) {
563
- Q.disabled = !0;
561
+ ].filter(Boolean).join(" "), C.innerText = g, typeof E == "function" && C.addEventListener("click", (t) => p(null, null, function* () {
562
+ if (!C.disabled) {
563
+ C.disabled = !0;
564
564
  try {
565
565
  yield E(t);
566
566
  } catch (I) {
567
567
  console.error("Button click handler error:", I);
568
568
  } finally {
569
- Q.disabled = !1;
569
+ C.disabled = !1;
570
570
  }
571
571
  }
572
- })), Q;
572
+ })), C;
573
573
  }
574
574
  function QC({
575
575
  label: g,
576
576
  required: A = !1,
577
577
  file: E = null,
578
- onFileChange: C,
578
+ onFileChange: Q,
579
579
  error: B = null,
580
- accept: Q = ""
580
+ accept: C = ""
581
581
  }) {
582
582
  const t = document.createElement("form");
583
583
  t.className = "wgt:flex wgt:flex-col";
@@ -586,10 +586,10 @@ function QC({
586
586
  const P = document.createElement("span");
587
587
  P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", I.appendChild(P);
588
588
  }
589
- const n = Q ? Q.split(",").map((P) => P.trim().startsWith("image/") ? P.replace("image/", "").toUpperCase() : P.trim().startsWith(".") ? P.replace(".", "").toUpperCase() : P.toUpperCase().replace("/*", "")).filter(Boolean).join(", ") : `JPG, PNG ${D("or")} JPEG`;
590
- I.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${D("fileFormat")} ${n}. ${D("maxFileSize")})</span>`, t.appendChild(I);
591
- const o = document.createElement("div");
592
- o.className = [
589
+ const n = C ? C.split(",").map((P) => P.trim().startsWith("image/") ? P.replace("image/", "").toUpperCase() : P.trim().startsWith(".") ? P.replace(".", "").toUpperCase() : P.toUpperCase().replace("/*", "")).filter(Boolean).join(", ") : `JPG, PNG ${o("or")} JPEG`;
590
+ I.innerHTML += ` <span class="wgt:text-xs wgt:font-normal wgt:leading-4 wgt:text-soft-400">(${o("fileFormat")} ${n}. ${o("maxFileSize")})</span>`, t.appendChild(I);
591
+ const D = document.createElement("div");
592
+ D.className = [
593
593
  "wgt:h-fit",
594
594
  "wgt:w-full",
595
595
  "wgt:rounded",
@@ -601,7 +601,7 @@ function QC({
601
601
  "wgt:gap-2"
602
602
  ].join(" ");
603
603
  const c = document.createElement("input");
604
- c.accept = Q || "image/png, image/jpeg, .jpg, .jpeg, .png", c.id = "upload", c.type = "file", c.className = "wgt:hidden";
604
+ c.accept = C || "image/png, image/jpeg, .jpg, .jpeg, .png", c.id = "upload", c.type = "file", c.className = "wgt:hidden";
605
605
  const s = document.createElement("div");
606
606
  s.className = "wgt:w-full wgt:flex wgt:gap-1 wgt:items-start wgt:justify-start";
607
607
  const a = document.createElement("span");
@@ -641,7 +641,7 @@ function QC({
641
641
  const i = document.createElement("p");
642
642
  i.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", i.innerText = P.name;
643
643
  const r = document.createElement("p");
644
- r.className = "wgt:text-sm wgt:text-gray-500", r.innerText = F(P.size), v.appendChild(i), v.appendChild(r), k.appendChild(v), s.appendChild(k), E = P, typeof C == "function" && C(P);
644
+ r.className = "wgt:text-sm wgt:text-gray-500", r.innerText = F(P.size), v.appendChild(i), v.appendChild(r), k.appendChild(v), s.appendChild(k), E = P, typeof Q == "function" && Q(P);
645
645
  } else {
646
646
  const m = document.createElement("div");
647
647
  m.className = "wgt:flex wgt:items-center", m.appendChild(q), s.appendChild(m);
@@ -649,17 +649,17 @@ function QC({
649
649
  }
650
650
  return c.addEventListener("change", (P) => {
651
651
  const m = P.target.files && P.target.files[0] ? P.target.files[0] : null;
652
- m && (H(m), typeof C == "function" && C(m));
653
- }), H(E), o.appendChild(s), o.appendChild(c), t.appendChild(o), t.appendChild(a), {
652
+ m && (H(m), typeof Q == "function" && Q(m));
653
+ }), H(E), D.appendChild(s), D.appendChild(c), t.appendChild(D), t.appendChild(a), {
654
654
  container: t,
655
655
  getValues() {
656
656
  return E;
657
657
  },
658
658
  setFile(P) {
659
- E = P, H(P), typeof C == "function" && C(P);
659
+ E = P, H(P), typeof Q == "function" && Q(P);
660
660
  },
661
661
  clearFile() {
662
- E = null, H(null), typeof C == "function" && C(null);
662
+ E = null, H(null), typeof Q == "function" && Q(null);
663
663
  },
664
664
  getError: () => e
665
665
  };
@@ -684,24 +684,24 @@ function lg(g) {
684
684
  return !1;
685
685
  }
686
686
  })();
687
- let C = null;
687
+ let Q = null;
688
688
  if (E) {
689
- 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})`;
690
- C = new RegExp(`^${t}(?: ${t})+$`, "u");
689
+ const B = String.raw`\p{Lu}(?:\p{Ll}+|[’']\p{Lu}\p{Ll}+)(?:[’'-]\p{Lu}\p{Ll}+)*`, C = String.raw`\p{Lu}`, t = String.raw`(?:${C}|${B})`;
690
+ Q = new RegExp(`^${t}(?: ${t})+$`, "u");
691
691
  } else {
692
- 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}+)*`, c = `(?:${`${t}`}|${n})`;
693
- C = new RegExp(`^${c}(?: ${c})+$`);
692
+ const B = "AĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXYÀÁẢÃẠẰẮẲẴẶẦẤẨẪẬÈÉẺẼẸỀẾỂỄỆÌÍỈĨỊÒÓỎÕỌỒỐỔỖỘỜỚỞỠỢÙÚỦŨỤỪỨỬỮỰỲÝỶỸỴ", C = "aăâbcdđeêghiklmnxoôơpqrstưuvxyàáảãạằắẳẵặầấẩẫậèéẻẽẹềếểễệìíỉĩịòóỏõọồốổỗộờớởỡợùúủũụừứửữựỳýỷỹỵ", t = `[${B}]`, I = `[${C}]`, n = `${t}(?:${I}+|[’']${t}${I}+)(?:[’'-]${t}${I}+)*`, c = `(?:${`${t}`}|${n})`;
693
+ Q = new RegExp(`^${c}(?: ${c})+$`);
694
694
  }
695
- return C.test(A);
695
+ return Q.test(A);
696
696
  }
697
697
  function EC({
698
698
  file: g,
699
699
  placeholder: A,
700
700
  caption: E,
701
- onFileSelected: C,
701
+ onFileSelected: Q,
702
702
  onError: B,
703
703
  // new callback for errors
704
- theme: Q
704
+ theme: C
705
705
  }) {
706
706
  const t = document.createElement("div");
707
707
  t.className = "wgt:flex wgt:flex-col wgt:items-center wgt:gap-2";
@@ -724,17 +724,17 @@ function EC({
724
724
  ].join(" "), t.append(I);
725
725
  const n = document.createElement("input");
726
726
  n.type = "file", n.accept = "image/png, image/jpeg, image/jpg", n.className = "wgt:hidden", I.append(n);
727
- const o = document.createElement("div");
728
- o.className = "wgt:w-10 wgt:h-10 wgt:rounded-full wgt:bg-primary/16 wgt:flex wgt:items-center wgt:justify-center";
729
- const c = MQ(Q);
730
- o.innerHTML = `
727
+ const D = document.createElement("div");
728
+ D.className = "wgt:w-10 wgt:h-10 wgt:rounded-full wgt:bg-primary/16 wgt:flex wgt:items-center wgt:justify-center";
729
+ const c = MQ(C);
730
+ D.innerHTML = `
731
731
  <svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
732
732
  <path d="M8.83184 0.96875H10.3485C10.4833 0.96875 10.5507 1.03316 10.5507 1.16199V18.1668C10.5507 18.2956 10.4833 18.3601 10.3485 18.3601H8.83184C8.69702 18.3601 8.62962 18.2956 8.62962 18.1668V1.16199C8.62962 1.03316 8.69702 0.96875 8.83184 0.96875Z" fill="${c}"/>
733
733
  <path d="M1.09676 8.74653H18.0836C18.2184 8.74653 18.2858 8.81094 18.2858 8.93976V10.389C18.2858 10.5179 18.2184 10.5823 18.0836 10.5823H1.09676C0.961939 10.5823 0.894531 10.5179 0.894531 10.389V8.93976C0.894531 8.81094 0.961939 8.74653 1.09676 8.74653Z" fill="${c}"/>
734
734
  </svg>
735
735
  `;
736
736
  const s = document.createElement("div");
737
- s.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", s.innerText = A, I.append(o, s);
737
+ s.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", s.innerText = A, I.append(D, s);
738
738
  const a = document.createElement("div");
739
739
  a.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", a.innerText = E, t.append(a);
740
740
  const e = document.createElement("span");
@@ -755,7 +755,7 @@ function EC({
755
755
  if (k.alt = A, k.className = "wgt:max-w-full wgt:max-h-full wgt:object-contain", P(m) || q(`File không hợp lệ. Chỉ chấp nhận: ${n.accept}`), m.size <= 500 * 1024 || q("Dung lượng file vượt quá 500KB."), m.type.startsWith("image/")) {
756
756
  const i = new FileReader();
757
757
  i.onload = () => {
758
- k.src = i.result, typeof C == "function" && C(m);
758
+ k.src = i.result, typeof Q == "function" && Q(m);
759
759
  }, i.readAsDataURL(m), I.appendChild(k);
760
760
  } else {
761
761
  const i = document.createElement("div");
@@ -765,7 +765,7 @@ function EC({
765
765
  const l = document.createElement("p");
766
766
  l.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", l.innerText = m.name;
767
767
  const R = document.createElement("p");
768
- R.className = "wgt:text-sm wgt:text-gray-500", R.innerText = J(m.size), r.appendChild(l), r.appendChild(R), i.appendChild(r), I.appendChild(i), typeof C == "function" && C(null, m);
768
+ R.className = "wgt:text-sm wgt:text-gray-500", R.innerText = J(m.size), r.appendChild(l), r.appendChild(R), i.appendChild(r), I.appendChild(i), typeof Q == "function" && Q(null, m);
769
769
  }
770
770
  }
771
771
  function P(m) {
@@ -783,35 +783,35 @@ function EC({
783
783
  setError: q
784
784
  };
785
785
  }
786
- function TQ({ frontFile: g, backFile: A, onFrontChange: E, onBackChange: C, theme: B }) {
787
- const Q = document.createElement("div");
788
- Q.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
786
+ function TQ({ frontFile: g, backFile: A, onFrontChange: E, onBackChange: Q, theme: B }) {
787
+ const C = document.createElement("div");
788
+ C.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
789
789
  const t = document.createElement("label");
790
- t.className = "wgt:font-medium", t.innerText = D("uploadIdentity");
790
+ t.className = "wgt:font-medium", t.innerText = o("uploadIdentity");
791
791
  const I = document.createElement("span");
792
- I.className = "wgt:text-red-500 wgt:ml-1", I.innerText = "*", t.appendChild(I), Q.append(t);
792
+ I.className = "wgt:text-red-500 wgt:ml-1", I.innerText = "*", t.appendChild(I), C.append(t);
793
793
  const n = document.createElement("div");
794
- n.className = "wgt:w-full wgt:grid wgt:grid-cols-2 wgt:gap-4", Q.append(n);
795
- const o = EC({
794
+ n.className = "wgt:w-full wgt:grid wgt:grid-cols-2 wgt:gap-4", C.append(n);
795
+ const D = EC({
796
796
  file: g,
797
- placeholder: D("uploadFrontId"),
798
- caption: D("frontIdCard"),
797
+ placeholder: o("uploadFrontId"),
798
+ caption: o("frontIdCard"),
799
799
  onFileSelected: E,
800
800
  theme: B
801
801
  }), c = EC({
802
802
  file: A,
803
- placeholder: D("uploadBackId"),
804
- caption: D("backIdCard"),
805
- onFileSelected: C,
803
+ placeholder: o("uploadBackId"),
804
+ caption: o("backIdCard"),
805
+ onFileSelected: Q,
806
806
  theme: B
807
807
  });
808
- return n.append(o.container, c.container), {
809
- container: Q,
810
- getFrontFile: () => o.getFile(),
808
+ return n.append(D.container, c.container), {
809
+ container: C,
810
+ getFrontFile: () => D.getFile(),
811
811
  getBackFile: () => c.getFile(),
812
- getFrontFileError: () => o.getError(),
812
+ getFrontFileError: () => D.getError(),
813
813
  getBackFileError: () => c.getError(),
814
- setFrontFileError: o.setError,
814
+ setFrontFileError: D.setError,
815
815
  setBackFileError: c.setError
816
816
  };
817
817
  }
@@ -823,15 +823,15 @@ const lQ = ({
823
823
  { length: 26 },
824
824
  (u, T) => String.fromCharCode(65 + T)
825
825
  );
826
- const E = (/* @__PURE__ */ new Date()).getFullYear(), C = Array.from(
826
+ const E = (/* @__PURE__ */ new Date()).getFullYear(), Q = Array.from(
827
827
  { length: 2 },
828
828
  (u, T) => String(E + T).slice(-2)
829
- ), 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");
829
+ ), B = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], C = ["C", "K"], t = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], I = document.createElement("div");
830
830
  I.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
831
831
  const n = document.createElement("span");
832
- n.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal", n.textContent = D("invoiceTemplate");
833
- const o = document.createElement("span");
834
- o.className = "wgt:text-red-500 wgt:ml-1", o.innerText = "*", n.appendChild(o), I.append(n);
832
+ n.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal", n.textContent = o("invoiceTemplate");
833
+ const D = document.createElement("span");
834
+ D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", n.appendChild(D), I.append(n);
835
835
  const c = document.createElement("div");
836
836
  c.className = [
837
837
  "wgt:w-full",
@@ -849,21 +849,21 @@ const lQ = ({
849
849
  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");
850
850
  a.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
851
851
  const e = document.createElement("span");
852
- e.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", e.textContent = D("sampleNumber");
852
+ e.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", e.textContent = o("sampleNumber");
853
853
  const f = document.createElement("span");
854
854
  f.className = "wgt:text-red-500 wgt:ml-1", f.innerText = "*", e.appendChild(f), a.appendChild(e);
855
855
  const q = document.createElement("select");
856
- q.className = `${s} wgt:max-sm:w-full wgt:w-48`, q.title = D("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
856
+ q.className = `${s} wgt:max-sm:w-full wgt:w-48`, q.title = o("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
857
857
  const F = {
858
- 1: D("invoiceTemplateTypes.1"),
859
- 2: D("invoiceTemplateTypes.2"),
860
- 3: D("invoiceTemplateTypes.3"),
861
- 4: D("invoiceTemplateTypes.4"),
862
- 5: D("invoiceTemplateTypes.5"),
863
- 6: D("invoiceTemplateTypes.6"),
864
- 7: D("invoiceTemplateTypes.7"),
865
- 8: D("invoiceTemplateTypes.8"),
866
- 9: D("invoiceTemplateTypes.9")
858
+ 1: o("invoiceTemplateTypes.1"),
859
+ 2: o("invoiceTemplateTypes.2"),
860
+ 3: o("invoiceTemplateTypes.3"),
861
+ 4: o("invoiceTemplateTypes.4"),
862
+ 5: o("invoiceTemplateTypes.5"),
863
+ 6: o("invoiceTemplateTypes.6"),
864
+ 7: o("invoiceTemplateTypes.7"),
865
+ 8: o("invoiceTemplateTypes.8"),
866
+ 9: o("invoiceTemplateTypes.9")
867
867
  };
868
868
  B.forEach((u) => {
869
869
  q.append(new Option(F[u], u));
@@ -871,40 +871,40 @@ const lQ = ({
871
871
  const J = document.createElement("div");
872
872
  J.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
873
873
  const H = document.createElement("span");
874
- H.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", H.textContent = D("codeType");
874
+ H.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", H.textContent = o("codeType");
875
875
  const P = document.createElement("span");
876
876
  P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", H.appendChild(P), J.appendChild(H);
877
877
  const m = document.createElement("select");
878
- m.className = `${s} wgt:max-sm:w-full wgt:w-40`, m.title = D("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((u) => {
879
- const T = u === "C" ? D("codeTypeC", "C (Có mã CQT)") : D("codeTypeK", "K (Không mã)");
878
+ m.className = `${s} wgt:max-sm:w-full wgt:w-40`, m.title = o("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), C.forEach((u) => {
879
+ const T = u === "C" ? o("codeTypeC", "C (Có mã CQT)") : o("codeTypeK", "K (Không mã)");
880
880
  m.append(new Option(T, u));
881
881
  }), J.appendChild(m), c.append(J);
882
882
  const k = document.createElement("div");
883
883
  k.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
884
884
  const v = document.createElement("span");
885
- v.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", v.textContent = D("invoiceIssuanceYear");
885
+ v.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", v.textContent = o("invoiceIssuanceYear");
886
886
  const i = document.createElement("span");
887
887
  i.className = "wgt:text-red-500 wgt:ml-1", i.innerText = "*", v.appendChild(i), k.appendChild(v);
888
888
  const r = document.createElement("select");
889
- r.className = `${s} wgt:max-sm:w-full wgt:w-16`, r.title = D("yearTooltip", "Năm phát hành (2 chữ số cuối)"), C.forEach((u) => r.append(new Option(u, u))), r.value = String(E).slice(-2), k.appendChild(r), c.append(k);
889
+ r.className = `${s} wgt:max-sm:w-full wgt:w-16`, r.title = o("yearTooltip", "Năm phát hành (2 chữ số cuối)"), Q.forEach((u) => r.append(new Option(u, u))), r.value = String(E).slice(-2), k.appendChild(r), c.append(k);
890
890
  const l = document.createElement("div");
891
891
  l.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
892
892
  const R = document.createElement("span");
893
- R.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", R.textContent = D("typeOfEInvoice");
893
+ R.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", R.textContent = o("typeOfEInvoice");
894
894
  const X = document.createElement("span");
895
895
  X.className = "wgt:text-red-500 wgt:ml-1", X.innerText = "*", R.appendChild(X), l.appendChild(R);
896
896
  const d = document.createElement("select");
897
- d.className = `${s} wgt:max-sm:w-full wgt:w-40`, d.title = D("invoiceTypeTooltip", "Loại hóa đơn");
897
+ d.className = `${s} wgt:max-sm:w-full wgt:w-40`, d.title = o("invoiceTypeTooltip", "Loại hóa đơn");
898
898
  const M = {
899
- T: D("invoiceTypeT", "T (Đăng ký)"),
900
- D: D("invoiceTypeD", "D (Tài sản)"),
901
- L: D("invoiceTypeL", "L (CQT)"),
902
- M: D("invoiceTypeM", "M (Máy tính tiền)"),
903
- N: D("invoiceTypeN", "N (Nội bộ)"),
904
- B: D("invoiceTypeB", "B (Đại lý)"),
905
- G: D("invoiceTypeG", "G (Tem GTGT)"),
906
- H: D("invoiceTypeH", "H (Tem bán hàng)"),
907
- X: D("invoiceTypeX", "X (Thương mại)")
899
+ T: o("invoiceTypeT", "T (Đăng ký)"),
900
+ D: o("invoiceTypeD", "D (Tài sản)"),
901
+ L: o("invoiceTypeL", "L (CQT)"),
902
+ M: o("invoiceTypeM", "M (Máy tính tiền)"),
903
+ N: o("invoiceTypeN", "N (Nội bộ)"),
904
+ B: o("invoiceTypeB", "B (Đại lý)"),
905
+ G: o("invoiceTypeG", "G (Tem GTGT)"),
906
+ H: o("invoiceTypeH", "H (Tem bán hàng)"),
907
+ X: o("invoiceTypeX", "X (Thương mại)")
908
908
  };
909
909
  t.forEach((u) => {
910
910
  d.append(new Option(M[u], u));
@@ -912,11 +912,11 @@ const lQ = ({
912
912
  const Y = document.createElement("div");
913
913
  Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
914
914
  const K = document.createElement("span");
915
- K.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", K.textContent = D("formDifferentiationCode");
915
+ K.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:max-sm:whitespace-normal wgt:max-sm:block wgt:hidden", K.textContent = o("formDifferentiationCode");
916
916
  const j = document.createElement("span");
917
917
  j.className = "wgt:text-red-500 wgt:ml-1", j.innerText = "*", K.appendChild(j), Y.appendChild(K);
918
918
  const y = document.createElement("input");
919
- y.type = "text", y.maxLength = 2, y.placeholder = "AB", y.defaultValue = "YY", y.className = `${s} wgt:max-sm:w-full wgt:w-16`, y.title = D("customLettersTooltip"), Y.appendChild(y), c.append(Y);
919
+ y.type = "text", y.maxLength = 2, y.placeholder = "AB", y.defaultValue = "YY", y.className = `${s} wgt:max-sm:w-full wgt:w-16`, y.title = o("customLettersTooltip"), Y.appendChild(y), c.append(Y);
920
920
  function h() {
921
921
  return q.value + m.value + r.value + d.value + y.value.toUpperCase();
922
922
  }
@@ -991,28 +991,28 @@ var xg = { exports: {} };
991
991
  var kQ = xg.exports, nC;
992
992
  function RQ() {
993
993
  return nC || (nC = 1, function(g, A) {
994
- (function(E, C) {
994
+ (function(E, Q) {
995
995
  var B;
996
996
  {
997
997
  try {
998
998
  B = require("moment");
999
- } catch (Q) {
999
+ } catch (C) {
1000
1000
  }
1001
- g.exports = C(B);
1001
+ g.exports = Q(B);
1002
1002
  }
1003
1003
  })(kQ, function(E) {
1004
- var C = typeof E == "function", B = !!window.addEventListener, Q = window.document, t = window.setTimeout, I = function(h, w, u, T) {
1004
+ var Q = typeof E == "function", B = !!window.addEventListener, C = window.document, t = window.setTimeout, I = function(h, w, u, T) {
1005
1005
  B ? h.addEventListener(w, u, !!T) : h.attachEvent("on" + w, u);
1006
1006
  }, n = function(h, w, u, T) {
1007
1007
  B ? h.removeEventListener(w, u, !!T) : h.detachEvent("on" + w, u);
1008
- }, o = function(h) {
1008
+ }, D = function(h) {
1009
1009
  return h.trim ? h.trim() : h.replace(/^\s+|\s+$/g, "");
1010
1010
  }, c = function(h, w) {
1011
1011
  return (" " + h.className + " ").indexOf(" " + w + " ") !== -1;
1012
1012
  }, s = function(h, w) {
1013
1013
  c(h, w) || (h.className = h.className === "" ? w : h.className + " " + w);
1014
1014
  }, a = function(h, w) {
1015
- h.className = o((" " + h.className + " ").replace(" " + w + " ", " "));
1015
+ h.className = D((" " + h.className + " ").replace(" " + w + " ", " "));
1016
1016
  }, e = function(h) {
1017
1017
  return /Array/.test(Object.prototype.toString.call(h));
1018
1018
  }, f = function(h) {
@@ -1035,7 +1035,7 @@ function RQ() {
1035
1035
  return h;
1036
1036
  }, k = function(h, w, u) {
1037
1037
  var T;
1038
- Q.createEvent ? (T = Q.createEvent("HTMLEvents"), T.initEvent(w, !0, !1), T = m(T, u), h.dispatchEvent(T)) : Q.createEventObject && (T = Q.createEventObject(), T = m(T, u), h.fireEvent("on" + w, T));
1038
+ C.createEvent ? (T = C.createEvent("HTMLEvents"), T.initEvent(w, !0, !1), T = m(T, u), h.dispatchEvent(T)) : C.createEventObject && (T = C.createEventObject(), T = m(T, u), h.fireEvent("on" + w, T));
1039
1039
  }, v = function(h) {
1040
1040
  return h.month < 0 && (h.year -= Math.ceil(Math.abs(h.month) / 12), h.month += 12), h.month > 11 && (h.year += Math.floor(Math.abs(h.month) / 12), h.month -= 12), h;
1041
1041
  }, i = {
@@ -1143,7 +1143,7 @@ function RQ() {
1143
1143
  var S = new Date(h.getFullYear(), 0, L), U = 1440 * 60 * 1e3, nA = (h.getTime() - S.getTime()) / U, aA = 1 + Math.round((nA - z + IA(S.getDay())) / N);
1144
1144
  return aA;
1145
1145
  }, X = function(h, w, u, T) {
1146
- var L = new Date(u, w, h), z = C ? E(L).isoWeek() : R(L, T);
1146
+ var L = new Date(u, w, h), z = Q ? E(L).isoWeek() : R(L, T);
1147
1147
  return '<td class="pika-week">' + z + "</td>";
1148
1148
  }, d = function(h, w, u, T) {
1149
1149
  return '<tr class="pika-row' + (u ? " pick-whole-week" : "") + (T ? " is-selected" : "") + '">' + (w ? h.reverse() : h).join("") + "</tr>";
@@ -1210,7 +1210,7 @@ function RQ() {
1210
1210
  }, w._parseFieldValue = function() {
1211
1211
  if (u.parse)
1212
1212
  return u.parse(u.field.value, u.format);
1213
- if (C) {
1213
+ if (Q) {
1214
1214
  var L = E(u.field.value, u.format, u.formatStrict);
1215
1215
  return L && L.isValid() ? L.toDate() : null;
1216
1216
  } else
@@ -1223,7 +1223,7 @@ function RQ() {
1223
1223
  }, w._onInputClick = function() {
1224
1224
  w.show();
1225
1225
  }, w._onInputBlur = function() {
1226
- var L = Q.activeElement;
1226
+ var L = C.activeElement;
1227
1227
  do
1228
1228
  if (c(L, "pika-single"))
1229
1229
  return;
@@ -1242,7 +1242,7 @@ function RQ() {
1242
1242
  while (N = N.parentNode);
1243
1243
  w._v && z !== u.trigger && N !== u.trigger && w.hide();
1244
1244
  }
1245
- }, w.el = Q.createElement("div"), w.el.className = "pika-single" + (u.isRTL ? " is-rtl" : "") + (u.theme ? " " + u.theme : ""), I(w.el, "mousedown", w._onMouseDown, !0), I(w.el, "touchend", w._onMouseDown, !0), I(w.el, "change", w._onChange), u.keyboardInput && I(Q, "keydown", w._onKeyChange), u.field && (u.container ? u.container.appendChild(w.el) : u.bound ? Q.body.appendChild(w.el) : u.field.parentNode.insertBefore(w.el, u.field.nextSibling), I(u.field, "change", w._onInputChange), u.defaultDate || (u.defaultDate = w._parseFieldValue(), u.setDefaultDate = !0));
1245
+ }, w.el = C.createElement("div"), w.el.className = "pika-single" + (u.isRTL ? " is-rtl" : "") + (u.theme ? " " + u.theme : ""), I(w.el, "mousedown", w._onMouseDown, !0), I(w.el, "touchend", w._onMouseDown, !0), I(w.el, "change", w._onChange), u.keyboardInput && I(C, "keydown", w._onKeyChange), u.field && (u.container ? u.container.appendChild(w.el) : u.bound ? C.body.appendChild(w.el) : u.field.parentNode.insertBefore(w.el, u.field.nextSibling), I(u.field, "change", w._onInputChange), u.defaultDate || (u.defaultDate = w._parseFieldValue(), u.setDefaultDate = !0));
1246
1246
  var T = u.defaultDate;
1247
1247
  f(T) ? u.setDefaultDate ? w.setDate(T, !0) : w.gotoDate(T) : w.gotoDate(/* @__PURE__ */ new Date()), u.bound ? (this.hide(), w.el.className += " is-bound", I(u.trigger, "click", w._onInputClick), I(u.trigger, "focus", w._onInputFocus), I(u.trigger, "blur", w._onInputBlur)) : this.show();
1248
1248
  };
@@ -1266,19 +1266,19 @@ function RQ() {
1266
1266
  * return a formatted string of the current selection (using Moment.js if available)
1267
1267
  */
1268
1268
  toString: function(h) {
1269
- return h = h || this._o.format, f(this._d) ? this._o.toString ? this._o.toString(this._d, h) : C ? E(this._d).format(h) : this._d.toDateString() : "";
1269
+ return h = h || this._o.format, f(this._d) ? this._o.toString ? this._o.toString(this._d, h) : Q ? E(this._d).format(h) : this._d.toDateString() : "";
1270
1270
  },
1271
1271
  /**
1272
1272
  * return a Moment.js object of the current selection (if available)
1273
1273
  */
1274
1274
  getMoment: function() {
1275
- return C ? E(this._d) : null;
1275
+ return Q ? E(this._d) : null;
1276
1276
  },
1277
1277
  /**
1278
1278
  * set the current selection from a Moment.js object (if available)
1279
1279
  */
1280
1280
  setMoment: function(h, w) {
1281
- C && E.isMoment(h) && this.setDate(h.toDate(), w);
1281
+ Q && E.isMoment(h) && this.setDate(h.toDate(), w);
1282
1282
  },
1283
1283
  /**
1284
1284
  * return a Date object of the current selection
@@ -1388,7 +1388,7 @@ function RQ() {
1388
1388
  adjustPosition: function() {
1389
1389
  var h, w, u, T, L, z, N, IA, S, U, nA, aA;
1390
1390
  if (!this._o.container) {
1391
- if (this.el.style.position = "absolute", h = this._o.trigger, w = h, u = this.el.offsetWidth, T = this.el.offsetHeight, L = window.innerWidth || Q.documentElement.clientWidth, z = window.innerHeight || Q.documentElement.clientHeight, N = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, nA = !0, aA = !0, typeof h.getBoundingClientRect == "function")
1391
+ if (this.el.style.position = "absolute", h = this._o.trigger, w = h, u = this.el.offsetWidth, T = this.el.offsetHeight, L = window.innerWidth || C.documentElement.clientWidth, z = window.innerHeight || C.documentElement.clientHeight, N = window.pageYOffset || C.body.scrollTop || C.documentElement.scrollTop, nA = !0, aA = !0, typeof h.getBoundingClientRect == "function")
1392
1392
  U = h.getBoundingClientRect(), IA = U.left + window.pageXOffset, S = U.bottom + window.pageYOffset;
1393
1393
  else
1394
1394
  for (IA = w.offsetLeft, S = w.offsetTop + w.offsetHeight; w = w.offsetParent; )
@@ -1431,18 +1431,18 @@ function RQ() {
1431
1431
  return this._v;
1432
1432
  },
1433
1433
  show: function() {
1434
- 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));
1434
+ this.isVisible() || (this._v = !0, this.draw(), a(this.el, "is-hidden"), this._o.bound && (I(C, "click", this._onClick), this.adjustPosition()), typeof this._o.onOpen == "function" && this._o.onOpen.call(this));
1435
1435
  },
1436
1436
  hide: function() {
1437
1437
  var h = this._v;
1438
- h !== !1 && (this._o.bound && n(Q, "click", this._onClick), this._o.container || (this.el.style.position = "static", this.el.style.left = "auto", this.el.style.top = "auto"), s(this.el, "is-hidden"), this._v = !1, h !== void 0 && typeof this._o.onClose == "function" && this._o.onClose.call(this));
1438
+ h !== !1 && (this._o.bound && n(C, "click", this._onClick), this._o.container || (this.el.style.position = "static", this.el.style.left = "auto", this.el.style.top = "auto"), s(this.el, "is-hidden"), this._v = !1, h !== void 0 && typeof this._o.onClose == "function" && this._o.onClose.call(this));
1439
1439
  },
1440
1440
  /**
1441
1441
  * GAME OVER
1442
1442
  */
1443
1443
  destroy: function() {
1444
1444
  var h = this._o;
1445
- this.hide(), n(this.el, "mousedown", this._onMouseDown, !0), n(this.el, "touchend", this._onMouseDown, !0), n(this.el, "change", this._onChange), h.keyboardInput && n(Q, "keydown", this._onKeyChange), h.field && (n(h.field, "change", this._onInputChange), h.bound && (n(h.trigger, "click", this._onInputClick), n(h.trigger, "focus", this._onInputFocus), n(h.trigger, "blur", this._onInputBlur))), this.el.parentNode && this.el.parentNode.removeChild(this.el);
1445
+ this.hide(), n(this.el, "mousedown", this._onMouseDown, !0), n(this.el, "touchend", this._onMouseDown, !0), n(this.el, "change", this._onChange), h.keyboardInput && n(C, "keydown", this._onKeyChange), h.field && (n(h.field, "change", this._onInputChange), h.bound && (n(h.trigger, "click", this._onInputClick), n(h.trigger, "focus", this._onInputFocus), n(h.trigger, "blur", this._onInputBlur))), this.el.parentNode && this.el.parentNode.removeChild(this.el);
1446
1446
  }
1447
1447
  }, y;
1448
1448
  });
@@ -1475,17 +1475,17 @@ function Hg(g, A = {}) {
1475
1475
  return console.warn("Notification container not available"), null;
1476
1476
  const {
1477
1477
  autoClose: E = 5e3,
1478
- hideProgressBar: C = !0,
1478
+ hideProgressBar: Q = !0,
1479
1479
  closeButton: B = !1,
1480
- icon: Q = !1,
1480
+ icon: C = !1,
1481
1481
  type: t = "info"
1482
1482
  } = A;
1483
1483
  ng.length >= FQ && kg(ng[0].id);
1484
1484
  const I = Date.now() + Math.random(), n = OQ(I, g, {
1485
1485
  autoClose: E,
1486
- hideProgressBar: C,
1486
+ hideProgressBar: Q,
1487
1487
  closeButton: B,
1488
- icon: Q,
1488
+ icon: C,
1489
1489
  type: t
1490
1490
  });
1491
1491
  return ng.push({ id: I, element: n }), mA.appendChild(n), requestAnimationFrame(() => {
@@ -1495,7 +1495,7 @@ function Hg(g, A = {}) {
1495
1495
  }, E), I;
1496
1496
  }
1497
1497
  function OQ(g, A, E) {
1498
- const { hideProgressBar: C, closeButton: B, icon: Q, type: t, autoClose: I } = E, n = document.createElement("div");
1498
+ const { hideProgressBar: Q, closeButton: B, icon: C, type: t, autoClose: I } = E, n = document.createElement("div");
1499
1499
  n.className = [
1500
1500
  "wgt:bg-white",
1501
1501
  "wgt:px-5",
@@ -1515,7 +1515,7 @@ function OQ(g, A, E) {
1515
1515
  "wgt:relative",
1516
1516
  "wgt:overflow-hidden"
1517
1517
  ].join(" ");
1518
- const o = {
1518
+ const D = {
1519
1519
  info: "#40A9FF",
1520
1520
  // Blue
1521
1521
  success: "#52C41A",
@@ -1525,9 +1525,9 @@ function OQ(g, A, E) {
1525
1525
  error: "#FF4D4F"
1526
1526
  // Red
1527
1527
  };
1528
- n.style.borderLeft = `4px solid ${o[t] || o.info}`, n.style.zIndex = "99999";
1528
+ n.style.borderLeft = `4px solid ${D[t] || D.info}`, n.style.zIndex = "99999";
1529
1529
  const c = document.createElement("div");
1530
- if (c.className = "wgt:flex wgt:items-start wgt:gap-3", Q) {
1530
+ if (c.className = "wgt:flex wgt:items-start wgt:gap-3", C) {
1531
1531
  const a = document.createElement("div"), e = {
1532
1532
  info: "wgt:bg-blue-500",
1533
1533
  success: "wgt:bg-green-500",
@@ -1543,7 +1543,7 @@ function OQ(g, A, E) {
1543
1543
  kg(g);
1544
1544
  }), c.appendChild(a);
1545
1545
  }
1546
- if (n.appendChild(c), !C && I > 0) {
1546
+ if (n.appendChild(c), !Q && I > 0) {
1547
1547
  const a = document.createElement("div"), e = {
1548
1548
  info: "wgt:bg-blue-500",
1549
1549
  success: "wgt:bg-green-500",
@@ -1557,7 +1557,7 @@ function OQ(g, A, E) {
1557
1557
  return n;
1558
1558
  }
1559
1559
  function kg(g) {
1560
- const A = ng.findIndex((C) => C.id === g);
1560
+ const A = ng.findIndex((Q) => Q.id === g);
1561
1561
  if (A === -1) return;
1562
1562
  const { element: E } = ng[A];
1563
1563
  E.classList.remove("wgt:translate-x-0", "wgt:opacity-100"), E.classList.add("wgt:translate-x-full", "wgt:opacity-0"), setTimeout(() => {
@@ -1578,20 +1578,20 @@ const og = {
1578
1578
  clear: pC,
1579
1579
  destroy: LQ
1580
1580
  };
1581
- var vg = (g, A, E) => new Promise((C, B) => {
1582
- var Q = (n) => {
1581
+ var vg = (g, A, E) => new Promise((Q, B) => {
1582
+ var C = (n) => {
1583
1583
  try {
1584
1584
  I(E.next(n));
1585
- } catch (o) {
1586
- B(o);
1585
+ } catch (D) {
1586
+ B(D);
1587
1587
  }
1588
1588
  }, t = (n) => {
1589
1589
  try {
1590
1590
  I(E.throw(n));
1591
- } catch (o) {
1592
- B(o);
1591
+ } catch (D) {
1592
+ B(D);
1593
1593
  }
1594
- }, I = (n) => n.done ? C(n.value) : Promise.resolve(n.value).then(Q, t);
1594
+ }, I = (n) => n.done ? Q(n.value) : Promise.resolve(n.value).then(C, t);
1595
1595
  I((E = E.apply(g, A)).next());
1596
1596
  });
1597
1597
  function Lg(g = "dev") {
@@ -1641,36 +1641,36 @@ function oB(g, A) {
1641
1641
  throw new Error(
1642
1642
  "ONNX Runtime is not properly loaded. Please check your internet connection and try again."
1643
1643
  );
1644
- const E = A || Lg(g).baseURL, C = `${E}/${Lg(g).modelEndpoint}`, B = `${E}/${Lg(g).modeClassifyEndpoint}`;
1644
+ const E = A || Lg(g).baseURL, Q = `${E}/${Lg(g).modelEndpoint}`, B = `${E}/${Lg(g).modeClassifyEndpoint}`;
1645
1645
  if (typeof Eg.InferenceSession.create != "function")
1646
1646
  throw new Error(
1647
1647
  "InferenceSession.create is not available. ONNX Runtime may not be properly initialized."
1648
1648
  );
1649
- return qg = yield Eg.InferenceSession.create(C), cB = yield Eg.InferenceSession.create(B), qg;
1649
+ return qg = yield Eg.InferenceSession.create(Q), cB = yield Eg.InferenceSession.create(B), qg;
1650
1650
  } catch (E) {
1651
1651
  throw new Error(`Failed to initialize ONNX model: ${E.message}`);
1652
1652
  }
1653
1653
  });
1654
1654
  }
1655
1655
  function NQ(g, A, E = 200) {
1656
- const C = document.createElement("canvas"), B = C.getContext("2d");
1656
+ const Q = document.createElement("canvas"), B = Q.getContext("2d");
1657
1657
  if (g instanceof ImageData)
1658
- C.width = g.width, C.height = g.height, B.putImageData(g, 0, 0);
1658
+ Q.width = g.width, Q.height = g.height, B.putImageData(g, 0, 0);
1659
1659
  else if (g instanceof HTMLCanvasElement)
1660
- C.width = g.width, C.height = g.height, B.drawImage(g, 0, 0), B.getImageData(0, 0, g.width, g.height);
1660
+ Q.width = g.width, Q.height = g.height, B.drawImage(g, 0, 0), B.getImageData(0, 0, g.width, g.height);
1661
1661
  else
1662
1662
  throw new Error("Input must be ImageData or HTMLCanvasElement");
1663
- const Q = document.createElement("canvas");
1664
- Q.width = E, Q.height = E;
1665
- const t = Q.getContext("2d");
1663
+ const C = document.createElement("canvas");
1664
+ C.width = E, C.height = E;
1665
+ const t = C.getContext("2d");
1666
1666
  if (Array.isArray(A[0]) && A.length === 4) {
1667
1667
  A.flat();
1668
1668
  const e = bQ();
1669
- t.setTransform(...e), t.drawImage(C, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
1669
+ t.setTransform(...e), t.drawImage(Q, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
1670
1670
  } else if (A.length === 4) {
1671
- const [e, f, q, F] = A, J = q - e, H = F - f, P = J * 0.05, m = H * 0.05, k = Math.max(0, e - P), v = Math.max(0, f - m), i = Math.min(C.width, q + P), r = Math.min(C.height, F + m), l = i - k, R = r - v;
1671
+ const [e, f, q, F] = A, J = q - e, H = F - f, P = J * 0.05, m = H * 0.05, k = Math.max(0, e - P), v = Math.max(0, f - m), i = Math.min(Q.width, q + P), r = Math.min(Q.height, F + m), l = i - k, R = r - v;
1672
1672
  t.drawImage(
1673
- C,
1673
+ Q,
1674
1674
  k,
1675
1675
  v,
1676
1676
  l,
@@ -1687,9 +1687,9 @@ function NQ(g, A, E = 200) {
1687
1687
  0,
1688
1688
  E,
1689
1689
  E
1690
- ), n = new ImageData(E, E), o = I.data, c = n.data;
1691
- for (let e = 0; e < o.length; e += 4) {
1692
- const f = o[e], q = o[e + 1], F = o[e + 2], J = 0.2989 * f + 0.587 * q + 0.114 * F;
1690
+ ), n = new ImageData(E, E), D = I.data, c = n.data;
1691
+ for (let e = 0; e < D.length; e += 4) {
1692
+ const f = D[e], q = D[e + 1], F = D[e + 2], J = 0.2989 * f + 0.587 * q + 0.114 * F;
1693
1693
  c[e] = c[e + 1] = c[e + 2] = J, c[e + 3] = 255;
1694
1694
  }
1695
1695
  const s = new ImageData(E, E), a = jQ(c, E, E, 10);
@@ -1702,43 +1702,43 @@ function NQ(g, A, E = 200) {
1702
1702
  function bQ(g, A) {
1703
1703
  return [1, 0, 0, 0, 1, 0];
1704
1704
  }
1705
- function jQ(g, A, E, C) {
1706
- const B = new Uint8ClampedArray(g.length), Q = new Uint32Array(A * E);
1705
+ function jQ(g, A, E, Q) {
1706
+ const B = new Uint8ClampedArray(g.length), C = new Uint32Array(A * E);
1707
1707
  for (let I = 0; I < E; I++)
1708
1708
  for (let n = 0; n < A; n++) {
1709
- const o = (I * A + n) * 4, c = g[o], s = I * A + n;
1710
- Q[s] = c + (n > 0 ? Q[s - 1] : 0) + (I > 0 ? Q[s - A] : 0) - (n > 0 && I > 0 ? Q[s - A - 1] : 0);
1709
+ const D = (I * A + n) * 4, c = g[D], s = I * A + n;
1710
+ C[s] = c + (n > 0 ? C[s - 1] : 0) + (I > 0 ? C[s - A] : 0) - (n > 0 && I > 0 ? C[s - A - 1] : 0);
1711
1711
  }
1712
- const t = Math.floor(C / 2);
1712
+ const t = Math.floor(Q / 2);
1713
1713
  for (let I = 0; I < E; I++)
1714
1714
  for (let n = 0; n < A; n++) {
1715
- const o = (I * A + n) * 4, c = Math.max(n - t, 0), s = Math.max(I - t, 0), a = Math.min(n + t, A - 1), e = Math.min(I + t, E - 1), f = (a - c + 1) * (e - s + 1), q = (Q[e * A + a] - (c > 0 ? Q[e * A + c - 1] : 0) - (s > 0 ? Q[(s - 1) * A + a] : 0) + (c > 0 && s > 0 ? Q[(s - 1) * A + c - 1] : 0)) / f * 0.9, F = g[o] > q ? 255 : 0;
1716
- B[o] = B[o + 1] = B[o + 2] = F, B[o + 3] = 255;
1715
+ const D = (I * A + n) * 4, c = Math.max(n - t, 0), s = Math.max(I - t, 0), a = Math.min(n + t, A - 1), e = Math.min(I + t, E - 1), f = (a - c + 1) * (e - s + 1), q = (C[e * A + a] - (c > 0 ? C[e * A + c - 1] : 0) - (s > 0 ? C[(s - 1) * A + a] : 0) + (c > 0 && s > 0 ? C[(s - 1) * A + c - 1] : 0)) / f * 0.9, F = g[D] > q ? 255 : 0;
1716
+ B[D] = B[D + 1] = B[D + 2] = F, B[D + 3] = 255;
1717
1717
  }
1718
1718
  return B;
1719
1719
  }
1720
1720
  function ZC(g, A = 640) {
1721
1721
  const E = document.createElement("canvas");
1722
1722
  E.width = A, E.height = A;
1723
- const C = E.getContext("2d");
1724
- C.drawImage(g, 0, 0, A, A);
1725
- const B = C.getImageData(0, 0, A, A).data, Q = new Float32Array(A * A * 3);
1723
+ const Q = E.getContext("2d");
1724
+ Q.drawImage(g, 0, 0, A, A);
1725
+ const B = Q.getImageData(0, 0, A, A).data, C = new Float32Array(A * A * 3);
1726
1726
  for (let I = 0, n = 0; I < B.length; I += 4, n += 3)
1727
- Q[n] = B[I] / 255, Q[n + 1] = B[I + 1] / 255, Q[n + 2] = B[I + 2] / 255;
1727
+ C[n] = B[I] / 255, C[n + 1] = B[I + 1] / 255, C[n + 2] = B[I + 2] / 255;
1728
1728
  const t = new Float32Array(3 * A * A);
1729
1729
  for (let I = 0; I < A; I++)
1730
1730
  for (let n = 0; n < A; n++) {
1731
- const o = I * A + n;
1732
- t[o] = Q[o * 3], t[o + A * A] = Q[o * 3 + 1], t[o + 2 * A * A] = Q[o * 3 + 2];
1731
+ const D = I * A + n;
1732
+ t[D] = C[D * 3], t[D + A * A] = C[D * 3 + 1], t[D + 2 * A * A] = C[D * 3 + 2];
1733
1733
  }
1734
1734
  return new Eg.Tensor("float32", t, [1, 3, A, A]);
1735
1735
  }
1736
- function yQ(g, A, E, C, B = 0.5) {
1737
- const Q = [], t = g.dims[1];
1736
+ function yQ(g, A, E, Q, B = 0.5) {
1737
+ const C = [], t = g.dims[1];
1738
1738
  for (let I = 0; I < t; I++) {
1739
1739
  const n = g.data[I * 37 + 4];
1740
1740
  if (n < B) continue;
1741
- const o = g.data[I * 37], c = g.data[I * 37 + 1], s = g.data[I * 37 + 2], a = g.data[I * 37 + 3], e = E / 640, f = C / 640, q = [o * e, c * f, s * e, a * f], F = g.data.slice(I * 37 + 5, I * 37 + 37), J = new Float32Array(25600);
1741
+ const D = g.data[I * 37], c = g.data[I * 37 + 1], s = g.data[I * 37 + 2], a = g.data[I * 37 + 3], e = E / 640, f = Q / 640, q = [D * e, c * f, s * e, a * f], F = g.data.slice(I * 37 + 5, I * 37 + 37), J = new Float32Array(25600);
1742
1742
  for (let M = 0; M < 160; M++)
1743
1743
  for (let Y = 0; Y < 160; Y++) {
1744
1744
  let K = 0;
@@ -1753,7 +1753,7 @@ function yQ(g, A, E, C, B = 0.5) {
1753
1753
  M[0] + (M[0] < (v + i) / 2 ? -k * R : k * R),
1754
1754
  M[1] + (M[1] < (r + l) / 2 ? -k * X : k * X)
1755
1755
  ]);
1756
- Q.push({
1756
+ C.push({
1757
1757
  bbox_xyxy: q,
1758
1758
  confidence: n,
1759
1759
  cxcy: [
@@ -1764,10 +1764,10 @@ function yQ(g, A, E, C, B = 0.5) {
1764
1764
  polygon_xy: P.map((M) => [M[0] * e, M[1] * f]),
1765
1765
  quad_xy: m,
1766
1766
  padded_quad_xy: d,
1767
- image_shape: [C, E]
1767
+ image_shape: [Q, E]
1768
1768
  });
1769
1769
  }
1770
- return Q;
1770
+ return C;
1771
1771
  }
1772
1772
  function KQ(g, A, E) {
1773
1773
  return [];
@@ -1789,8 +1789,8 @@ function SQ(g) {
1789
1789
  return vg(this, null, function* () {
1790
1790
  let A = null;
1791
1791
  const E = ["original", "grayscale", "threshold"];
1792
- for (const C of E)
1793
- if (A = yield hB(g[C]), A && A.length > 0)
1792
+ for (const Q of E)
1793
+ if (A = yield hB(g[Q]), A && A.length > 0)
1794
1794
  break;
1795
1795
  return A;
1796
1796
  });
@@ -1801,14 +1801,14 @@ function pQ(g, A = "sourceCanvas") {
1801
1801
  qg || (yield oB());
1802
1802
  const E = document.createElement("canvas");
1803
1803
  E.width = g.width, E.height = g.height, E.getContext("2d").drawImage(g, 0, 0);
1804
- const C = ZC(g), B = yield qg.run({ [qg.inputNames[0]]: C }), Q = B[Object.keys(B)[0]], t = B[Object.keys(B)[1]], I = yQ(
1805
- Q,
1804
+ const Q = ZC(g), B = yield qg.run({ [qg.inputNames[0]]: Q }), C = B[Object.keys(B)[0]], t = B[Object.keys(B)[1]], I = yQ(
1805
+ C,
1806
1806
  t,
1807
1807
  g.width,
1808
1808
  g.height
1809
1809
  );
1810
1810
  for (const n of I) {
1811
- const { _: o, bbox_xyxy: c } = n, s = NQ(E, c), a = yield SQ(s), e = a.length > 0 ? a[0].decode() : null;
1811
+ const { _: D, bbox_xyxy: c } = n, s = NQ(E, c), a = yield SQ(s), e = a.length > 0 ? a[0].decode() : null;
1812
1812
  if (e)
1813
1813
  return JSON.stringify({
1814
1814
  status: "success",
@@ -1833,16 +1833,16 @@ function ZQ(g) {
1833
1833
  cB || (yield oB());
1834
1834
  const A = document.createElement("canvas");
1835
1835
  A.width = g.width, A.height = g.height, A.getContext("2d").drawImage(g, 0, 0);
1836
- const E = ZC(g, 224), C = yield cB.run({ images: E }), B = C[Object.keys(C)[0]].data;
1837
- let Q = 0, t = -1 / 0;
1836
+ const E = ZC(g, 224), Q = yield cB.run({ images: E }), B = Q[Object.keys(Q)[0]].data;
1837
+ let C = 0, t = -1 / 0;
1838
1838
  return B.forEach((I, n) => {
1839
- I > t && (t = I, Q = n);
1839
+ I > t && (t = I, C = n);
1840
1840
  }), JSON.stringify({
1841
1841
  status: "success",
1842
1842
  data: {
1843
- isBack: Q == 0,
1844
- isFront: Q == 1,
1845
- other: Q == 2
1843
+ isBack: C == 0,
1844
+ isFront: C == 1,
1845
+ other: C == 2
1846
1846
  }
1847
1847
  });
1848
1848
  } catch (A) {
@@ -1855,8 +1855,8 @@ function ZQ(g) {
1855
1855
  }
1856
1856
  function VQ(g, A) {
1857
1857
  let E;
1858
- return function(...C) {
1859
- clearTimeout(E), E = setTimeout(() => g.apply(this, C), A);
1858
+ return function(...Q) {
1859
+ clearTimeout(E), E = setTimeout(() => g.apply(this, Q), A);
1860
1860
  };
1861
1861
  }
1862
1862
  function WQ(n) {
@@ -1864,27 +1864,27 @@ function WQ(n) {
1864
1864
  onSubmit: g,
1865
1865
  registrationData: A,
1866
1866
  theme: E = "ocb",
1867
- onShowPolicy: C = () => {
1867
+ onShowPolicy: Q = () => {
1868
1868
  },
1869
1869
  selectedTaxAuthority: B,
1870
- setSelectedTaxAuthority: Q,
1870
+ setSelectedTaxAuthority: C,
1871
1871
  dobPicker: t,
1872
1872
  setDobPicker: I
1873
1873
  }) {
1874
1874
  var iA, uA, TA, lA, SA, sB, iB, fB, mB, rB, PB, qB, vB, MB, TB, lB, HB, dB, xB, kB, RB, YB, JB, XB, FB, GB, OB, LB, zB, NB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B;
1875
- const o = document.createElement("div");
1876
- o.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
1875
+ const D = document.createElement("div");
1876
+ D.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
1877
1877
  const c = document.createElement("form");
1878
1878
  c.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", c.addEventListener("submit", (O) => {
1879
1879
  if (O.preventDefault(), !vA()) return;
1880
1880
  const G = hA();
1881
1881
  typeof g == "function" && g(G);
1882
- }), o.appendChild(c);
1882
+ }), D.appendChild(c);
1883
1883
  let s, a, e, f, q, F, J, H, P, m, k, v, i, r, l, R, X, d, M, Y, K, j, y, h, w;
1884
1884
  const u = document.createElement("button");
1885
1885
  s = xA({
1886
1886
  name: "taxCode",
1887
- label: D("taxCode"),
1887
+ label: o("taxCode"),
1888
1888
  required: !0,
1889
1889
  placeholder: "",
1890
1890
  type: "text",
@@ -1893,12 +1893,12 @@ function WQ(n) {
1893
1893
  error: null,
1894
1894
  onInput: VQ((O) => {
1895
1895
  const G = O.target.value.trim();
1896
- G.length >= 10 ? IA(G) : s.setError(D("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
1896
+ G.length >= 10 ? IA(G) : s.setError(o("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
1897
1897
  }, 1e3),
1898
1898
  horizontal: !0
1899
1899
  }), a = xA({
1900
1900
  name: "companyName",
1901
- label: D("companyName"),
1901
+ label: o("companyName"),
1902
1902
  required: !0,
1903
1903
  error: null,
1904
1904
  placeholder: "",
@@ -1908,7 +1908,7 @@ function WQ(n) {
1908
1908
  horizontal: !0
1909
1909
  }), e = xA({
1910
1910
  name: "companyAddressDetail",
1911
- label: D("address"),
1911
+ label: o("address"),
1912
1912
  required: !0,
1913
1913
  error: null,
1914
1914
  placeholder: "",
@@ -1924,14 +1924,14 @@ function WQ(n) {
1924
1924
  }));
1925
1925
  if (f = Og({
1926
1926
  name: "companyTaxManagement",
1927
- label: D("taxAuthority"),
1927
+ label: o("taxAuthority"),
1928
1928
  options: T,
1929
1929
  required: !0,
1930
1930
  error: null,
1931
1931
  horizontal: !0,
1932
1932
  searchable: !0,
1933
1933
  onChange: (O) => {
1934
- O.target.id && Q(O.target.id), $();
1934
+ O.target.id && C(O.target.id), $();
1935
1935
  }
1936
1936
  }), B) {
1937
1937
  const O = T.find(
@@ -1944,7 +1944,7 @@ function WQ(n) {
1944
1944
  );
1945
1945
  }
1946
1946
  j = QC({
1947
- label: D("uploadLogo", "Tải logo lên"),
1947
+ label: o("uploadLogo", "Tải logo lên"),
1948
1948
  required: !0,
1949
1949
  file: (A == null ? void 0 : A.logo) || null,
1950
1950
  onFileChange: (O) => {
@@ -1953,7 +1953,7 @@ function WQ(n) {
1953
1953
  error: null
1954
1954
  }), P = xA({
1955
1955
  name: "repName",
1956
- label: D("fullName"),
1956
+ label: o("fullName"),
1957
1957
  required: !0,
1958
1958
  error: null,
1959
1959
  placeholder: "",
@@ -1962,14 +1962,14 @@ function WQ(n) {
1962
1962
  onInput: (O) => {
1963
1963
  const G = O.target.value;
1964
1964
  if (G.trim() === "") {
1965
- P.setError(D("errorRequired"));
1965
+ P.setError(o("errorRequired"));
1966
1966
  return;
1967
1967
  }
1968
- lg(G) ? P.setError(null) : P.setError(D("errorInvalidName"));
1968
+ lg(G) ? P.setError(null) : P.setError(o("errorInvalidName"));
1969
1969
  }
1970
1970
  }), m = xA({
1971
1971
  name: "repDob",
1972
- label: D("dateOfBirth"),
1972
+ label: o("dateOfBirth"),
1973
1973
  required: !0,
1974
1974
  error: null,
1975
1975
  placeholder: "DD/MM/YYYY",
@@ -1988,7 +1988,7 @@ function WQ(n) {
1988
1988
  m.setError(null), $();
1989
1989
  },
1990
1990
  onClose: () => {
1991
- m.inputEl.value ? m.setError(null) : m.setError(D("errorRequired")), $();
1991
+ m.inputEl.value ? m.setError(null) : m.setError(o("errorRequired")), $();
1992
1992
  },
1993
1993
  maxDate: /* @__PURE__ */ new Date(),
1994
1994
  showMonthDropdown: !0,
@@ -1997,10 +1997,10 @@ function WQ(n) {
1997
1997
  });
1998
1998
  I(L), k = Og({
1999
1999
  name: "repGender",
2000
- label: D("gender"),
2000
+ label: o("gender"),
2001
2001
  options: IC.map((O) => ({
2002
2002
  value: O.value,
2003
- label: D(O.value)
2003
+ label: o(O.value)
2004
2004
  })),
2005
2005
  required: !0,
2006
2006
  value: ((qB = (PB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : PB.legalRepresentative) == null ? void 0 : qB.gender) || "",
@@ -2011,34 +2011,34 @@ function WQ(n) {
2011
2011
  }
2012
2012
  }), i = xA({
2013
2013
  name: "repIdCardField",
2014
- label: D("idNumber"),
2014
+ label: o("idNumber"),
2015
2015
  required: !0,
2016
2016
  error: null,
2017
- placeholder: D("enterIdCard", "Nhập số CMND/CCCD"),
2017
+ placeholder: o("enterIdCard", "Nhập số CMND/CCCD"),
2018
2018
  type: "text",
2019
2019
  value: ((MB = (vB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : vB.legalRepresentative) == null ? void 0 : MB.idCard) || "",
2020
2020
  onInput: (O) => {
2021
2021
  let G = O.target.value;
2022
2022
  const gA = G.replace(/[^0-9]/g, "");
2023
2023
  if (gA !== G && (O.target.value = gA, G = gA), G.trim() === "") {
2024
- i.setError(D("errorRequired"));
2024
+ i.setError(o("errorRequired"));
2025
2025
  return;
2026
2026
  }
2027
2027
  /^\d{12}$/.test(G) ? i.setError(null) : i.setError(
2028
- D("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2028
+ o("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2029
2029
  );
2030
2030
  }
2031
2031
  }), r = xA({
2032
2032
  name: "repPassportNumberField",
2033
- label: D("passport", "Hộ chiếu"),
2033
+ label: o("passport", "Hộ chiếu"),
2034
2034
  required: !1,
2035
2035
  error: null,
2036
- placeholder: D("enterPassport", "Nhập số hộ chiếu"),
2036
+ placeholder: o("enterPassport", "Nhập số hộ chiếu"),
2037
2037
  type: "text",
2038
2038
  value: ((lB = (TB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : TB.legalRepresentative) == null ? void 0 : lB.passportNumber) || ""
2039
2039
  }), v = xA({
2040
2040
  name: "repPhone",
2041
- label: D("phone"),
2041
+ label: o("phone"),
2042
2042
  required: !0,
2043
2043
  error: null,
2044
2044
  placeholder: "",
@@ -2048,16 +2048,16 @@ function WQ(n) {
2048
2048
  let G = O.target.value;
2049
2049
  const gA = G.replace(/[^\d+().\-\s]/g, ""), DA = gA.replace(/[\s.\-()]/g, "");
2050
2050
  if (gA !== G && (O.target.value = gA, G = gA), DA.trim() === "") {
2051
- v.setError(D("errorRequired", "Số điện thoại bắt buộc"));
2051
+ v.setError(o("errorRequired", "Số điện thoại bắt buộc"));
2052
2052
  return;
2053
2053
  }
2054
2054
  /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(DA) ? v.setError(null) : v.setError(
2055
- D("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2055
+ o("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2056
2056
  );
2057
2057
  }
2058
2058
  }), l = Og({
2059
2059
  name: "repNationality",
2060
- label: D("country"),
2060
+ label: o("country"),
2061
2061
  options: xQ,
2062
2062
  value: ((kB = (xB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : xB.legalRepresentative) == null ? void 0 : kB.nationality) || "",
2063
2063
  disabled: !1,
@@ -2067,7 +2067,7 @@ function WQ(n) {
2067
2067
  }
2068
2068
  }), R = xA({
2069
2069
  name: "contactAddressDetail",
2070
- label: D("permanentAddress"),
2070
+ label: o("permanentAddress"),
2071
2071
  required: !0,
2072
2072
  error: null,
2073
2073
  placeholder: "",
@@ -2078,16 +2078,16 @@ function WQ(n) {
2078
2078
  const G = O.target.value;
2079
2079
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2080
2080
  R.setError(
2081
- D("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2081
+ o("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2082
2082
  );
2083
2083
  return;
2084
2084
  }
2085
2085
  G.trim() === "" ? R.setError(
2086
- D("errorRequired", "Địa chỉ thường trú bắt buộc")
2086
+ o("errorRequired", "Địa chỉ thường trú bắt buộc")
2087
2087
  ) : R.setError(null);
2088
2088
  }
2089
2089
  }), y = QC({
2090
- label: D("businessLicense", "Giấy phép đăng ký kinh doanh"),
2090
+ label: o("businessLicense", "Giấy phép đăng ký kinh doanh"),
2091
2091
  required: !0,
2092
2092
  file: (A == null ? void 0 : A.license) || null,
2093
2093
  onFileChange: (O) => {
@@ -2097,7 +2097,7 @@ function WQ(n) {
2097
2097
  accept: "image/png, image/jpeg, image/jpg, .pdf"
2098
2098
  }), q = xA({
2099
2099
  name: "name",
2100
- label: D("fullName"),
2100
+ label: o("fullName"),
2101
2101
  required: !0,
2102
2102
  error: null,
2103
2103
  placeholder: "",
@@ -2106,16 +2106,16 @@ function WQ(n) {
2106
2106
  onInput: (O) => {
2107
2107
  const G = O.target.value;
2108
2108
  if (G.trim() === "") {
2109
- q.setError(D("errorRequired", "Họ và tên bắt buộc"));
2109
+ q.setError(o("errorRequired", "Họ và tên bắt buộc"));
2110
2110
  return;
2111
2111
  }
2112
2112
  lg(G) ? q.setError(null) : q.setError(
2113
- D("errorInvalidName", "Họ và tên không hợp lệ.")
2113
+ o("errorInvalidName", "Họ và tên không hợp lệ.")
2114
2114
  );
2115
2115
  }
2116
2116
  }), F = xA({
2117
2117
  name: "email",
2118
- label: D("email"),
2118
+ label: o("email"),
2119
2119
  required: !0,
2120
2120
  error: null,
2121
2121
  placeholder: "",
@@ -2124,29 +2124,29 @@ function WQ(n) {
2124
2124
  onInput: (O) => {
2125
2125
  let G = O.target.value;
2126
2126
  if (G.trim() === "") {
2127
- F.setError(D("errorRequired", "Email bắt buộc"));
2127
+ F.setError(o("errorRequired", "Email bắt buộc"));
2128
2128
  return;
2129
2129
  }
2130
2130
  if (/[^\x00-\x7F]/.test(G) || /\s/.test(G)) {
2131
2131
  F.setError(
2132
- D("errorInvalidEmail", "Email không hợp lệ.")
2132
+ o("errorInvalidEmail", "Email không hợp lệ.")
2133
2133
  );
2134
2134
  return;
2135
2135
  }
2136
2136
  const gA = 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}$");
2137
2137
  if (G.length > 254) {
2138
2138
  F.setError(
2139
- D("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
2139
+ o("errorInvalidEmailLength", "Email quá dài (tối đa 254 ký tự).")
2140
2140
  );
2141
2141
  return;
2142
2142
  }
2143
2143
  gA.test(G) ? F.setError(null) : F.setError(
2144
- D("errorInvalidEmail", "Email không hợp lệ")
2144
+ o("errorInvalidEmail", "Email không hợp lệ")
2145
2145
  );
2146
2146
  }
2147
2147
  }), J = xA({
2148
2148
  name: "phone",
2149
- label: D("phone"),
2149
+ label: o("phone"),
2150
2150
  required: !0,
2151
2151
  error: null,
2152
2152
  placeholder: "",
@@ -2157,17 +2157,17 @@ function WQ(n) {
2157
2157
  const gA = G.replace(/[^\d+().\-\s]/g, ""), DA = gA.replace(/[\s.\-()]/g, "");
2158
2158
  if (gA !== G && (O.target.value = gA, G = gA), DA.trim() === "") {
2159
2159
  J.setError(
2160
- D("errorRequired", "Số điện thoại bắt buộc")
2160
+ o("errorRequired", "Số điện thoại bắt buộc")
2161
2161
  );
2162
2162
  return;
2163
2163
  }
2164
2164
  /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(DA) ? J.setError(null) : J.setError(
2165
- D("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
2165
+ o("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
2166
2166
  );
2167
2167
  }
2168
2168
  }), H = xA({
2169
2169
  name: "contactAddressDetail",
2170
- label: D("permanentAddress"),
2170
+ label: o("permanentAddress"),
2171
2171
  required: !0,
2172
2172
  error: null,
2173
2173
  placeholder: "",
@@ -2178,21 +2178,21 @@ function WQ(n) {
2178
2178
  const G = O.target.value;
2179
2179
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2180
2180
  H.setError(
2181
- D("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2181
+ o("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2182
2182
  );
2183
2183
  return;
2184
2184
  }
2185
2185
  G.trim() === "" ? H.setError(
2186
- D("errorRequired", "Địa chỉ liên hệ bắt buộc")
2186
+ o("errorRequired", "Địa chỉ liên hệ bắt buộc")
2187
2187
  ) : H.setError(null);
2188
2188
  }
2189
2189
  });
2190
2190
  const z = xA({
2191
2191
  name: "invoiceSymbol",
2192
- label: D("invoiceSymbol", "Ký hiệu hóa đơn"),
2192
+ label: o("invoiceSymbol", "Ký hiệu hóa đơn"),
2193
2193
  required: !0,
2194
2194
  error: null,
2195
- placeholder: D("enterInvoiceSymbol", "Nhập ký hiệu hóa đơn"),
2195
+ placeholder: o("enterInvoiceSymbol", "Nhập ký hiệu hóa đơn"),
2196
2196
  type: "text",
2197
2197
  value: ((bB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : bB.invoiceSymbol) || "",
2198
2198
  readOnly: !0,
@@ -2210,10 +2210,10 @@ function WQ(n) {
2210
2210
  O.target.checked ? QA.appendChild(Y.container) : (Y.inputEl.value = "", Y.setError(null), QA.contains(Y.container) && QA.removeChild(Y.container));
2211
2211
  }), Y = xA({
2212
2212
  name: "previousOtherProviderNameField",
2213
- label: D("providerName", "Tên NCC"),
2213
+ label: o("providerName", "Tên NCC"),
2214
2214
  required: !0,
2215
2215
  error: null,
2216
- placeholder: D("enterProviderName", "Nhập tên nhà cung cấp"),
2216
+ placeholder: o("enterProviderName", "Nhập tên nhà cung cấp"),
2217
2217
  type: "text",
2218
2218
  value: ((UB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : UB.previousEInvoiceProvider) || "",
2219
2219
  readOnly: !1,
@@ -2221,12 +2221,12 @@ function WQ(n) {
2221
2221
  const G = O.target.value;
2222
2222
  if (G.trim() === "") {
2223
2223
  Y.setError(
2224
- D("errorRequired", "Tên nhà cung cấp bắt buộc")
2224
+ o("errorRequired", "Tên nhà cung cấp bắt buộc")
2225
2225
  );
2226
2226
  return;
2227
2227
  }
2228
2228
  /^[\p{L}0-9_]+(?: [\p{L}0-9_]+)*$/u.test(G) ? Y.setError(null) : Y.setError(
2229
- D(
2229
+ o(
2230
2230
  "errorInvalidProviderName",
2231
2231
  "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"
2232
2232
  )
@@ -2234,10 +2234,10 @@ function WQ(n) {
2234
2234
  }
2235
2235
  }), K = xA({
2236
2236
  name: "previousIssuedByTaxCodeField",
2237
- label: D("taxAuthorityCode", "Mã CQT đã phát hành hóa đơn"),
2237
+ label: o("taxAuthorityCode", "Mã CQT đã phát hành hóa đơn"),
2238
2238
  required: !0,
2239
2239
  error: null,
2240
- placeholder: D("enterTaxAuthorityCode", "Nhập mã CQT cấp"),
2240
+ placeholder: o("enterTaxAuthorityCode", "Nhập mã CQT cấp"),
2241
2241
  type: "text",
2242
2242
  value: ((SB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : SB.taxAuthorityCode) || "",
2243
2243
  readOnly: !1,
@@ -2245,12 +2245,12 @@ function WQ(n) {
2245
2245
  const G = O.target.value;
2246
2246
  if (G.trim() === "") {
2247
2247
  K.setError(
2248
- D("errorRequired", "Mã CQT bắt buộc")
2248
+ o("errorRequired", "Mã CQT bắt buộc")
2249
2249
  );
2250
2250
  return;
2251
2251
  }
2252
2252
  /^[A-Za-z0-9_]+$/.test(G) ? K.setError(null) : K.setError(
2253
- D(
2253
+ o(
2254
2254
  "errorInvalidTaxAuthorityCode",
2255
2255
  "Mã CQT không hợp lệ. Chỉ được dùng chữ cái, số và dấu gạch dưới"
2256
2256
  )
@@ -2284,14 +2284,14 @@ function WQ(n) {
2284
2284
  }
2285
2285
  } catch (gA) {
2286
2286
  G === N && (og.error(
2287
- D("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
2287
+ o("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
2288
2288
  {
2289
2289
  autoClose: 5e3,
2290
2290
  closeButton: !0,
2291
2291
  icon: !0
2292
2292
  }
2293
2293
  ), s.setError(
2294
- D("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2294
+ o("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2295
2295
  ));
2296
2296
  } finally {
2297
2297
  G === N && $();
@@ -2301,7 +2301,7 @@ function WQ(n) {
2301
2301
  const S = document.createElement("div");
2302
2302
  S.className = "wgt:space-y-3";
2303
2303
  const U = document.createElement("h3");
2304
- U.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", U.innerText = D("unitInfo", "1. Thông tin đơn vị"), S.appendChild(U);
2304
+ U.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", U.innerText = o("unitInfo", "1. Thông tin đơn vị"), S.appendChild(U);
2305
2305
  const nA = document.createElement("div");
2306
2306
  nA.className = "wgt:grid wgt:max-sm:grid-cols-1 wgt:max-sm:p-4 wgt:max-sm:gap-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:space-y-2 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", S.appendChild(nA), nA.appendChild(s.container), nA.appendChild(a.container), nA.appendChild(e.container), nA.appendChild(f.container);
2307
2307
  const aA = document.createElement("div");
@@ -2309,7 +2309,7 @@ function WQ(n) {
2309
2309
  const cA = document.createElement("div");
2310
2310
  cA.className = "wgt:space-y-4";
2311
2311
  const YA = document.createElement("h3");
2312
- YA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", YA.innerText = D(
2312
+ YA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", YA.innerText = o(
2313
2313
  "legalRepInfo",
2314
2314
  "2. Thông tin người đại diện pháp luật:"
2315
2315
  ), cA.appendChild(YA);
@@ -2318,10 +2318,10 @@ function WQ(n) {
2318
2318
  let kA = !1, sA = !1;
2319
2319
  const rA = document.createElement("div");
2320
2320
  function FA() {
2321
- rA.className = "wgt:text-yellow-500 wgt:text-sm wgt:font-medium wgt:text-center", kA ? rA.innerText = D(
2321
+ rA.className = "wgt:text-yellow-500 wgt:text-sm wgt:font-medium wgt:text-center", kA ? rA.innerText = o(
2322
2322
  "warningIdCard",
2323
2323
  "Vui lòng tải lên ảnh CMND/CCCD hợp lệ"
2324
- ) : sA ? rA.innerText = D(
2324
+ ) : sA ? rA.innerText = o(
2325
2325
  "warningIdCardSuccess",
2326
2326
  "Vui lòng tải lên ảnh CMND/CCCD hợp lệ"
2327
2327
  ) : rA.innerText = "", ig.appendChild(rA);
@@ -2349,13 +2349,13 @@ function WQ(n) {
2349
2349
  const GA = Object.values(fA).every((eg) => !eg);
2350
2350
  if (G(), GA) {
2351
2351
  zA(
2352
- D("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2352
+ o("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2353
2353
  ), G();
2354
2354
  return;
2355
2355
  }
2356
2356
  const { address: OA, date_of_birth: wg, full_name: Xg, id_number: rg, sex: Mg } = fA;
2357
2357
  if (!rg || !/^\d{12}$/.test(rg) ? (zA(
2358
- D("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2358
+ o("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2359
2359
  ), i.inputEl.value = "") : (i.inputEl.value = rg, i.setError(null)), P.inputEl.value = Xg || "", m.inputEl.value = gA(wg), R.inputEl.value = OA || "", Mg) {
2360
2360
  const eg = IC.find(
2361
2361
  (Fg) => Fg.label.toLowerCase() === Mg.toLowerCase()
@@ -2377,9 +2377,9 @@ function WQ(n) {
2377
2377
  var GA, OA;
2378
2378
  const qA = JSON.parse(fA);
2379
2379
  console.log("🚀 ~ result:", qA), G && !((GA = qA == null ? void 0 : qA.data) != null && GA.isFront) ? zA(
2380
- D("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2380
+ o("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2381
2381
  ) : gA && !((OA = qA == null ? void 0 : qA.data) != null && OA.isBack) && hg(
2382
- D("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2382
+ o("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2383
2383
  );
2384
2384
  });
2385
2385
  });
@@ -2431,20 +2431,20 @@ function WQ(n) {
2431
2431
  const KA = document.createElement("ul");
2432
2432
  KA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2433
2433
  const cg = document.createElement("li");
2434
- cg.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", cg.innerText = D(
2434
+ cg.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", cg.innerText = o(
2435
2435
  "legalRepNote",
2436
2436
  "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."
2437
2437
  ), KA.appendChild(cg), cA.appendChild(KA), c.appendChild(cA);
2438
2438
  const XA = document.createElement("div");
2439
2439
  XA.className = "wgt:space-y-4";
2440
2440
  const fg = document.createElement("h3");
2441
- fg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", fg.innerText = D("contactInfo", "3. Thông tin người liên hệ:"), XA.appendChild(fg);
2441
+ fg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", fg.innerText = o("contactInfo", "3. Thông tin người liên hệ:"), XA.appendChild(fg);
2442
2442
  const WA = document.createElement("div");
2443
2443
  WA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", WA.appendChild(q.container), WA.appendChild(F.container), WA.appendChild(J.container), WA.appendChild(H.container), XA.appendChild(WA), c.appendChild(XA);
2444
2444
  const UA = document.createElement("div");
2445
2445
  UA.className = "wgt:space-y-4";
2446
2446
  const dA = document.createElement("h3");
2447
- dA.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", dA.innerText = D("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), UA.appendChild(dA), c.appendChild(UA);
2447
+ dA.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", dA.innerText = o("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), UA.appendChild(dA), c.appendChild(UA);
2448
2448
  const b = document.createElement("div");
2449
2449
  b.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", b.appendChild(X.container), b.appendChild(z.container), UA.appendChild(b);
2450
2450
  const W = document.createElement("div");
@@ -2452,14 +2452,14 @@ function WQ(n) {
2452
2452
  const CA = document.createElement("div");
2453
2453
  CA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", CA.appendChild(d);
2454
2454
  const Z = document.createElement("h4");
2455
- Z.className = "wgt:font-semibold wgt:italic", Z.innerText = D(
2455
+ Z.className = "wgt:font-semibold wgt:italic", Z.innerText = o(
2456
2456
  "hasUsedEInvoice",
2457
2457
  "Bạn đã sử dụng hoá đơn điện tử?"
2458
2458
  ), CA.appendChild(Z), W.appendChild(CA);
2459
2459
  const EA = document.createElement("div");
2460
2460
  EA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", EA.appendChild(M);
2461
2461
  const _ = document.createElement("h4");
2462
- _.className = "wgt:font-semibold wgt:italic", _.innerText = D(
2462
+ _.className = "wgt:font-semibold wgt:italic", _.innerText = o(
2463
2463
  "hasUsedEInvoiceBefore",
2464
2464
  "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"
2465
2465
  ), EA.appendChild(_);
@@ -2492,21 +2492,21 @@ function WQ(n) {
2492
2492
  ), gg.setAttribute("fill", "white"), MA.appendChild(gg), wA.appendChild(MA);
2493
2493
  const Bg = document.createElement("label");
2494
2494
  Bg.className = "wgt:text-sm wgt:text-strong-950 wgt:leading-tight", Bg.appendChild(
2495
- document.createTextNode(D("agreeWith", "Tôi đồng ý với ") + " ")
2495
+ document.createTextNode(o("agreeWith", "Tôi đồng ý với ") + " ")
2496
2496
  );
2497
2497
  const x = (O) => {
2498
2498
  const G = document.createElement("button");
2499
2499
  return G.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", G.textContent = O, G.onclick = (gA) => {
2500
- gA.preventDefault(), typeof C == "function" && C();
2500
+ gA.preventDefault(), typeof Q == "function" && Q();
2501
2501
  }, G;
2502
2502
  }, BA = vQ(E);
2503
2503
  Bg.appendChild(
2504
- x(D("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2505
- ), Bg.appendChild(document.createTextNode(` ${D("of", "của")} ${BA}.`)), AA.appendChild(wA), AA.appendChild(Bg), c.appendChild(AA), wA.addEventListener("click", () => {
2504
+ x(o("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2505
+ ), Bg.appendChild(document.createTextNode(` ${o("of", "của")} ${BA}.`)), AA.appendChild(wA), AA.appendChild(Bg), c.appendChild(AA), wA.addEventListener("click", () => {
2506
2506
  tA = !tA, tA ? (wA.classList.add("wgt:bg-primary"), MA.classList.remove("wgt:hidden")) : (wA.classList.remove("wgt:bg-primary"), MA.classList.add("wgt:hidden")), $();
2507
2507
  });
2508
2508
  const eA = document.createElement("div");
2509
- eA.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", u.type = "submit", u.innerText = D("next"), u.className = [
2509
+ eA.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", u.type = "submit", u.innerText = o("next"), u.className = [
2510
2510
  "wgt:bg-primary",
2511
2511
  "wgt:hover:bg-primary-dark",
2512
2512
  "wgt:text-white",
@@ -2516,7 +2516,7 @@ function WQ(n) {
2516
2516
  "wgt:disabled:opacity-50",
2517
2517
  "wgt:disabled:cursor-not-allowed",
2518
2518
  "wgt:cursor-pointer"
2519
- ].join(" "), eA.appendChild(u), o.appendChild(eA);
2519
+ ].join(" "), eA.appendChild(u), D.appendChild(eA);
2520
2520
  function vA() {
2521
2521
  const O = hA(), G = O.eInvoiceRegistration;
2522
2522
  if (!G.contactPerson.address || !G.organization.name || !G.organization.address || !G.organization.taxCode || !G.organization.taxAuthority || !G.contactPerson.name || !G.contactPerson.email || !G.contactPerson.phone || !G.legalRepresentative.name || !G.legalRepresentative.dob || !G.legalRepresentative.gender || !G.legalRepresentative.phone || !G.legalRepresentative.idCard || !G.legalRepresentative.permanentAddress || !G.invoiceSymbol || G.hasUsedEInvoice && !G.taxAuthorityCode || G.isUsedEInvoiceBefore && !G.previousEInvoiceProvider || !lg(G.contactPerson.name) || !lg(G.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(G.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
@@ -2595,19 +2595,19 @@ function WQ(n) {
2595
2595
  });
2596
2596
  const oA = (((ZB = (pB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : pB.organization) == null ? void 0 : ZB.taxCode) || "").trim();
2597
2597
  return oA.length >= 10 && IA(oA), oB(eB(), wB().invoiceHubBaseUrl), A != null && A.idCard && (h = A == null ? void 0 : A.idCard), (VB = A == null ? void 0 : A.eInvoiceRegistration) != null && VB.hasUsedEInvoice && (W.appendChild(EA), W.appendChild(QA), (WB = A == null ? void 0 : A.eInvoiceRegistration) != null && WB.isUsedEInvoiceBefore ? (M.checked = !0, QA.appendChild(Y.container), Y.inputEl.value = (_B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : _B.previousEInvoiceProvider) : Y.inputEl.value = "", K.inputEl.value = ($B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $B.taxAuthorityCode), $(), {
2598
- container: o,
2598
+ container: D,
2599
2599
  getValues: hA
2600
2600
  };
2601
2601
  });
2602
2602
  }
2603
2603
  function _Q(E) {
2604
2604
  return p(this, arguments, function* ({ providerProps: g, formProps: A }) {
2605
- const C = document.createElement("div");
2606
- C.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full wgt:max-xl:px-0 wgt:px-[100px]";
2605
+ const Q = document.createElement("div");
2606
+ Q.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full wgt:max-xl:px-0 wgt:px-[100px]";
2607
2607
  const B = PQ(g);
2608
- C.appendChild(B.container);
2609
- const { container: Q } = yield WQ(A);
2610
- return C.appendChild(Q), { container: C };
2608
+ Q.appendChild(B.container);
2609
+ const { container: C } = yield WQ(A);
2610
+ return Q.appendChild(C), { container: Q };
2611
2611
  });
2612
2612
  }
2613
2613
  function $Q({
@@ -2615,21 +2615,21 @@ function $Q({
2615
2615
  placeholder: A = "",
2616
2616
  onInputChange: E = void 0
2617
2617
  }) {
2618
- const C = A || D("searchUnits"), B = document.createElement("div");
2618
+ const Q = A || o("searchUnits"), B = document.createElement("div");
2619
2619
  B.className = "wgt:flex wgt:flex-col";
2620
- const Q = document.createElement("div");
2621
- Q.className = "wgt:flex wgt:rounded-lg wgt:border wgt:border-gray-300 wgt:overflow-hidden", B.appendChild(Q);
2620
+ const C = document.createElement("div");
2621
+ C.className = "wgt:flex wgt:rounded-lg wgt:border wgt:border-gray-300 wgt:overflow-hidden", B.appendChild(C);
2622
2622
  const t = document.createElement("input");
2623
- 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 };
2623
+ return t.type = "text", t.inputMode = "numeric", t.value = g, t.placeholder = Q, 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), C.appendChild(t), { container: B };
2624
2624
  }
2625
2625
  const HA = (g) => new Intl.NumberFormat("vi-VN").format(g);
2626
2626
  function AE({
2627
2627
  pkg: g,
2628
2628
  type: A,
2629
2629
  isDiscounted: E,
2630
- promotion: C,
2630
+ promotion: Q,
2631
2631
  isSelected: B,
2632
- onSelect: Q
2632
+ onSelect: C
2633
2633
  }) {
2634
2634
  const t = document.createElement("div");
2635
2635
  t.className = [
@@ -2644,23 +2644,23 @@ function AE({
2644
2644
  "wgt:bg-white",
2645
2645
  "wgt:justify-between",
2646
2646
  B ? "wgt:border-primary" : "wgt:border-grey-6 wgt:hover:border-gray-300"
2647
- ].filter(Boolean).join(" "), t.onclick = Q;
2647
+ ].filter(Boolean).join(" "), t.onclick = C;
2648
2648
  const I = document.createElement("div");
2649
2649
  I.className = "wgt:w-full", t.appendChild(I);
2650
2650
  const n = document.createElement("div");
2651
2651
  n.className = "wgt:w-full wgt:flex wgt:justify-between wgt:items-center";
2652
- const o = document.createElement("div");
2653
- o.className = "wgt:flex wgt:items-center wgt:gap-2";
2652
+ const D = document.createElement("div");
2653
+ D.className = "wgt:flex wgt:items-center wgt:gap-2";
2654
2654
  const c = document.createElement("span");
2655
2655
  if (c.className = [
2656
2656
  "wgt:text-base",
2657
2657
  "wgt:font-semibold",
2658
2658
  B ? "wgt:text-primary" : "wgt:text-text-sub-600"
2659
- ].join(" "), c.innerText = g.code, o.appendChild(c), E) {
2659
+ ].join(" "), c.innerText = g.code, D.appendChild(c), E) {
2660
2660
  const H = document.createElement("div");
2661
- H.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", H.innerText = C, o.appendChild(H);
2661
+ H.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", H.innerText = Q, D.appendChild(H);
2662
2662
  }
2663
- n.appendChild(o);
2663
+ n.appendChild(D);
2664
2664
  const { container: s } = Jg({
2665
2665
  checked: B,
2666
2666
  onChange: (H) => {
@@ -2676,11 +2676,11 @@ function AE({
2676
2676
  `, a.appendChild(e);
2677
2677
  const f = document.createElement("span");
2678
2678
  if (f.className = "wgt:ml-2 wgt:text-sm", A === "signature") {
2679
- const H = ag(), P = D(g.duration.unit), m = H === "en" && g.duration.value > 1 ? P + "s" : P;
2680
- f.innerText = `${D("duration")}: ${g.duration.value} ${m} `;
2679
+ const H = ag(), P = o(g.duration.unit), m = H === "en" && g.duration.value > 1 ? P + "s" : P;
2680
+ f.innerText = `${o("duration")}: ${g.duration.value} ${m} `;
2681
2681
  } else typeof (g == null ? void 0 : g.limit) == "number" ? f.innerText = `${g == null ? void 0 : g.limit.toLocaleString(
2682
2682
  "vi-VN"
2683
- )} ${D("searchUnits")}` : f.innerText = "";
2683
+ )} ${o("searchUnits")}` : f.innerText = "";
2684
2684
  a.appendChild(f), I.appendChild(a);
2685
2685
  const q = document.createElement("div");
2686
2686
  q.className = "wgt:mt-4";
@@ -2692,16 +2692,16 @@ function AE({
2692
2692
  B ? "wgt:text-primary" : "wgt:text-text-sub-600"
2693
2693
  ].join(" "), F.innerText = HA((g == null ? void 0 : g.limit) * (g == null ? void 0 : g.price)), q.appendChild(F);
2694
2694
  const J = document.createElement("span");
2695
- return J.className = "wgt:text-sm wgt:text-text-sub-600", J.innerText = `VND/${D("package")}`, q.appendChild(J), t.appendChild(q), { container: t };
2695
+ return J.className = "wgt:text-sm wgt:text-text-sub-600", J.innerText = `VND/${o("package")}`, q.appendChild(J), t.appendChild(q), { container: t };
2696
2696
  }
2697
2697
  function tC({
2698
2698
  type: g = "service",
2699
2699
  // or "signature"
2700
2700
  packageOptions: A = [],
2701
2701
  disCountedPackages: E = [],
2702
- promotion: C,
2702
+ promotion: Q,
2703
2703
  selectedPackageId: B = "",
2704
- handlePackageSelect: Q
2704
+ handlePackageSelect: C
2705
2705
  } = {}) {
2706
2706
  const t = document.createElement("div");
2707
2707
  t.className = "wgt:space-y-6";
@@ -2727,25 +2727,25 @@ function tC({
2727
2727
  pkg: a,
2728
2728
  type: g,
2729
2729
  isDiscounted: f,
2730
- promotion: C,
2730
+ promotion: Q,
2731
2731
  isSelected: e,
2732
2732
  onSelect: () => {
2733
- typeof Q == "function" && Q(a._id);
2733
+ typeof C == "function" && C(a._id);
2734
2734
  }
2735
2735
  });
2736
2736
  I.appendChild(q);
2737
2737
  });
2738
2738
  }
2739
2739
  n();
2740
- let o = !1, c, s;
2740
+ let D = !1, c, s;
2741
2741
  return I.addEventListener("mousedown", (a) => {
2742
- o = !0, I.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), c = a.pageX - I.offsetLeft, s = I.scrollLeft;
2742
+ D = !0, I.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), c = a.pageX - I.offsetLeft, s = I.scrollLeft;
2743
2743
  }), document.addEventListener("mouseup", () => {
2744
- o = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2744
+ D = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2745
2745
  }), I.addEventListener("mouseleave", () => {
2746
- o = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2746
+ D = !1, I.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2747
2747
  }), I.addEventListener("mousemove", (a) => {
2748
- if (!o) return;
2748
+ if (!D) return;
2749
2749
  a.preventDefault();
2750
2750
  const f = (a.pageX - I.offsetLeft - c) * 1.5;
2751
2751
  I.scrollLeft = s - f;
@@ -2758,7 +2758,7 @@ function tC({
2758
2758
  }
2759
2759
  };
2760
2760
  }
2761
- const gE = "1.76.0";
2761
+ const gE = "1.76.1";
2762
2762
  function BE(E) {
2763
2763
  return p(this, arguments, function* ({ search: g, bank: A }) {
2764
2764
  return (yield LA.get(`${Yg}`, {
@@ -2815,8 +2815,8 @@ function VC(g) {
2815
2815
  ), 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(
2816
2816
  "organizationRegistrationCert",
2817
2817
  g.organizationRegistrationCert
2818
- ), g.legalRepresentativeIdCard.forEach((C) => {
2819
- A.append("legalRepresentativeIdCard", C);
2818
+ ), g.legalRepresentativeIdCard.forEach((Q) => {
2819
+ A.append("legalRepresentativeIdCard", Q);
2820
2820
  }), yield LA.post(wQ, A, {
2821
2821
  headers: {
2822
2822
  "Content-Type": "multipart/form-data",
@@ -2841,7 +2841,7 @@ function nE() {
2841
2841
  return (yield LA.get(`${eQ}`)).data;
2842
2842
  });
2843
2843
  }
2844
- function tE({ name: g, value: A, feeLabel: E, required: C, description: B, isChecked: Q = !0 }) {
2844
+ function tE({ name: g, value: A, feeLabel: E, required: Q, description: B, isChecked: C = !0 }) {
2845
2845
  const t = document.createElement("label");
2846
2846
  t.className = [
2847
2847
  "wgt:relative",
@@ -2856,17 +2856,17 @@ function tE({ name: g, value: A, feeLabel: E, required: C, description: B, isChe
2856
2856
  const I = Jg({
2857
2857
  name: g,
2858
2858
  value: A,
2859
- checked: Q,
2859
+ checked: C,
2860
2860
  onChange: () => {
2861
2861
  }
2862
2862
  });
2863
2863
  t.appendChild(I.container);
2864
2864
  const n = document.createElement("div");
2865
2865
  n.className = "wgt:flex wgt:flex-col wgt:gap-1";
2866
- const o = document.createElement("div");
2867
- o.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:max-sm:flex-col wgt:max-sm:items-start";
2866
+ const D = document.createElement("div");
2867
+ D.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:max-sm:flex-col wgt:max-sm:items-start";
2868
2868
  const c = document.createElement("span");
2869
- c.className = "wgt:text-base wgt:font-semibold wgt:text-text-sub-600", c.textContent = E, o.appendChild(c);
2869
+ c.className = "wgt:text-base wgt:font-semibold wgt:text-text-sub-600", c.textContent = E, D.appendChild(c);
2870
2870
  {
2871
2871
  const a = document.createElement("span");
2872
2872
  a.className = [
@@ -2877,9 +2877,9 @@ function tE({ name: g, value: A, feeLabel: E, required: C, description: B, isChe
2877
2877
  "wgt:px-1.5",
2878
2878
  "wgt:py-1",
2879
2879
  "wgt:rounded-sm"
2880
- ].join(" "), a.textContent = D("required"), o.appendChild(a);
2880
+ ].join(" "), a.textContent = o("required"), D.appendChild(a);
2881
2881
  }
2882
- n.appendChild(o);
2882
+ n.appendChild(D);
2883
2883
  const s = document.createElement("p");
2884
2884
  return s.className = "wgt:text-text-soft-400 wgt:text-sm", s.textContent = B, n.appendChild(s), t.appendChild(n), { container: t };
2885
2885
  }
@@ -2904,15 +2904,15 @@ function hE({
2904
2904
  onSelect: A,
2905
2905
  isDisabled: E = !1
2906
2906
  }) {
2907
- const C = document.createElement("div");
2908
- C.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (E ? " wgt:opacity-50" : "");
2907
+ const Q = document.createElement("div");
2908
+ Q.className = "wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]" + (E ? " wgt:opacity-50" : "");
2909
2909
  const B = document.createElement("div");
2910
2910
  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">
2911
2911
  <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"/>
2912
2912
  </svg>
2913
2913
  `;
2914
- const Q = document.createElement("div");
2915
- Q.className = "wgt:w-full wgt:relative wgt:z-10 wgt:h-full wgt:bg-white wgt:rounded-tr wgt:rounded-br wgt:px-4 wgt:py-3 wgt:ml-9 wgt:flex wgt:flex-col wgt:justify-between";
2914
+ const C = document.createElement("div");
2915
+ C.className = "wgt:w-full wgt:relative wgt:z-10 wgt:h-full wgt:bg-white wgt:rounded-tr wgt:rounded-br wgt:px-4 wgt:py-3 wgt:ml-9 wgt:flex wgt:flex-col wgt:justify-between";
2916
2916
  const t = document.createElement("div");
2917
2917
  t.className = "wgt:flex wgt:items-start wgt:flex-col wgt:relative";
2918
2918
  const I = document.createElement("h3");
@@ -2929,7 +2929,7 @@ function hE({
2929
2929
  "wgt:text-text-sub-600",
2930
2930
  "wgt:mb-2"
2931
2931
  ].join(" "), n.textContent = ag() === "vi" ? g.name : g.nameEn, t.appendChild(n);
2932
- const { container: o } = Jg({
2932
+ const { container: D } = Jg({
2933
2933
  checked: g.isSelected,
2934
2934
  onChange: () => {
2935
2935
  let s = !g.isSelected;
@@ -2938,7 +2938,7 @@ function hE({
2938
2938
  isIconCheckbox: !0,
2939
2939
  disabled: E || g.isSelected
2940
2940
  });
2941
- o.className = "wgt:absolute wgt:top-0 wgt:right-0", t.appendChild(o), Q.appendChild(t);
2941
+ D.className = "wgt:absolute wgt:top-0 wgt:right-0", t.appendChild(D), C.appendChild(t);
2942
2942
  const c = document.createElement("p");
2943
2943
  return c.className = [
2944
2944
  "wgt:text-xs",
@@ -2946,42 +2946,42 @@ function hE({
2946
2946
  "wgt:text-right",
2947
2947
  "wgt:text-[#335CFF]",
2948
2948
  "wgt:italic"
2949
- ].join(" "), c.textContent = `${D("validityPeriod")}: ${D("expiredDate")} ${g.expiredAt.split("T")[0]}`, Q.appendChild(c), C.appendChild(B), C.appendChild(Q), { container: C };
2949
+ ].join(" "), c.textContent = `${o("validityPeriod")}: ${o("expiredDate")} ${g.expiredAt.split("T")[0]}`, C.appendChild(c), Q.appendChild(B), Q.appendChild(C), { container: Q };
2950
2950
  }
2951
2951
  function cE({
2952
2952
  theme: g,
2953
2953
  debounceTimer: A,
2954
2954
  typedUnits: E,
2955
- onSearchComplete: C
2955
+ onSearchComplete: Q
2956
2956
  }) {
2957
- let B = [], Q = [];
2957
+ let B = [], C = [];
2958
2958
  const t = document.createElement("div");
2959
2959
  t.className = "wgt:flex wgt:flex-col wgt:gap-3";
2960
2960
  const I = document.createElement("div");
2961
2961
  I.className = "wgt:flex wgt:flex-col wgt:gap-4", t.appendChild(I);
2962
2962
  const n = document.createElement("h2");
2963
- n.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", n.innerText = D("selectInvoicePackage");
2964
- const o = document.createElement("span");
2965
- o.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", o.innerText = "*", n.appendChild(o), I.appendChild(n);
2963
+ n.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", n.innerText = o("selectInvoicePackage");
2964
+ const D = document.createElement("span");
2965
+ D.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", D.innerText = "*", n.appendChild(D), I.appendChild(n);
2966
2966
  function c() {
2967
2967
  return p(this, null, function* () {
2968
2968
  A && clearTimeout(A), E !== "" ? A = setTimeout(() => p(null, null, function* () {
2969
2969
  try {
2970
2970
  const H = E.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), P = yield BE({ search: H, bank: g });
2971
- P && (Q = P), C && C();
2971
+ P && (C = P), Q && Q();
2972
2972
  } catch (H) {
2973
- console.error("Error searching packages:", H), og.error(D("errorSearchingPackages"), {
2973
+ console.error("Error searching packages:", H), og.error(o("errorSearchingPackages"), {
2974
2974
  autoClose: 5e3,
2975
2975
  closeButton: !0,
2976
2976
  icon: !0
2977
2977
  });
2978
2978
  }
2979
- }), 500) : (Q = B, C && C());
2979
+ }), 500) : (C = B, Q && Q());
2980
2980
  });
2981
2981
  }
2982
2982
  const s = $Q({
2983
2983
  value: "",
2984
- placeholder: D("searchUnits"),
2984
+ placeholder: o("searchUnits"),
2985
2985
  onInputChange: (H) => {
2986
2986
  E = H.target.value.replace(/\D/g, ""), c();
2987
2987
  }
@@ -2990,14 +2990,14 @@ function cE({
2990
2990
  const a = document.createElement("div");
2991
2991
  a.className = "wgt:flex wgt:flex-col wgt:gap-2", t.appendChild(a);
2992
2992
  const e = document.createElement("h3");
2993
- e.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", e.innerText = D("mostSuitablePackage"), a.appendChild(e);
2993
+ e.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", e.innerText = o("mostSuitablePackage"), a.appendChild(e);
2994
2994
  const f = document.createElement("div");
2995
2995
  a.appendChild(f);
2996
2996
  const q = document.createElement("div");
2997
2997
  q.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", q.innerHTML = `
2998
2998
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
2999
2999
  <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>
3000
- <span class="wgt:text-sm wgt:text-text-sub-600">${D("loading")}...</span>
3000
+ <span class="wgt:text-sm wgt:text-text-sub-600">${o("loading")}...</span>
3001
3001
  </div>
3002
3002
  `, f.appendChild(q);
3003
3003
  function F(H) {
@@ -3013,10 +3013,10 @@ function cE({
3013
3013
  B = H;
3014
3014
  },
3015
3015
  setFilteredInvoiceOptions: (H) => {
3016
- Q = H;
3016
+ C = H;
3017
3017
  },
3018
3018
  getInvoicePackages: () => B,
3019
- getFilteredInvoiceOptions: () => Q,
3019
+ getFilteredInvoiceOptions: () => C,
3020
3020
  findInvoiceById: F,
3021
3021
  removeLoading: J
3022
3022
  };
@@ -3025,31 +3025,31 @@ function wE() {
3025
3025
  const g = document.createElement("div");
3026
3026
  g.className = "wgt:flex wgt:flex-col wgt:gap-4";
3027
3027
  const A = document.createElement("h2");
3028
- A.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", A.innerText = D("selectSignaturePackage");
3028
+ A.className = "wgt:text-xl wgt:font-bold wgt:text-text-black", A.innerText = o("selectSignaturePackage");
3029
3029
  const E = document.createElement("span");
3030
3030
  E.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", E.innerText = "*", A.appendChild(E), g.appendChild(A);
3031
- const C = document.createElement("div");
3032
- g.appendChild(C);
3031
+ const Q = document.createElement("div");
3032
+ g.appendChild(Q);
3033
3033
  const B = document.createElement("div");
3034
3034
  return B.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", B.innerHTML = `
3035
3035
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3036
3036
  <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>
3037
- <span class="wgt:text-sm wgt:text-text-sub-600">${D("loading")}...</span>
3037
+ <span class="wgt:text-sm wgt:text-text-sub-600">${o("loading")}...</span>
3038
3038
  </div>
3039
- `, C.appendChild(B), {
3039
+ `, Q.appendChild(B), {
3040
3040
  container: g,
3041
- signatureSelectorWrapper: C
3041
+ signatureSelectorWrapper: Q
3042
3042
  };
3043
3043
  }
3044
3044
  function eE() {
3045
3045
  const g = document.createElement("div");
3046
3046
  g.className = "wgt:flex wgt:items-center wgt:gap-4 wgt:max-sm:flex-col wgt:max-sm:items-start";
3047
3047
  const A = document.createElement("span");
3048
- A.className = "wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black", A.innerText = D("paymentMethod"), g.appendChild(A);
3048
+ A.className = "wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black", A.innerText = o("paymentMethod"), g.appendChild(A);
3049
3049
  const E = document.createElement("div");
3050
3050
  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);
3051
- const C = document.createElement("div");
3052
- C.innerHTML = `
3051
+ const Q = document.createElement("div");
3052
+ Q.innerHTML = `
3053
3053
  <svg
3054
3054
  width="24"
3055
3055
  height="24"
@@ -3074,9 +3074,9 @@ function eE() {
3074
3074
  </clipPath>
3075
3075
  </defs>
3076
3076
  </svg>
3077
- `, E.appendChild(C);
3077
+ `, E.appendChild(Q);
3078
3078
  const B = document.createElement("span");
3079
- return B.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", B.innerText = D("qrPayment"), E.appendChild(B), {
3079
+ return B.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-strong-950", B.innerText = o("qrPayment"), E.appendChild(B), {
3080
3080
  container: g
3081
3081
  };
3082
3082
  }
@@ -3084,26 +3084,26 @@ function aE() {
3084
3084
  const g = document.createElement("div");
3085
3085
  g.className = "wgt:flex wgt:flex-col wgt:gap-2 wgt:-mt-4";
3086
3086
  const A = document.createElement("h3");
3087
- A.className = "wgt:text-lg wgt:font-bold wgt:text-text-black wgt:max-sm:text-xl wgt:max-sm:mb-3", A.innerText = D("selectedProducts"), g.appendChild(A);
3087
+ A.className = "wgt:text-lg wgt:font-bold wgt:text-text-black wgt:max-sm:text-xl wgt:max-sm:mb-3", A.innerText = o("selectedProducts"), g.appendChild(A);
3088
3088
  const E = document.createElement("div");
3089
3089
  E.className = "wgt:overflow-x-auto wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:max-sm:overflow-x-visible wgt:max-sm:border-0 wgt:max-sm:bg-transparent", g.appendChild(E);
3090
- const C = document.createElement("table");
3091
- C.className = "wgt:min-w-full wgt:table-auto wgt:border-separate wgt:max-sm:border-collapse wgt:max-sm:w-full", E.appendChild(C);
3090
+ const Q = document.createElement("table");
3091
+ Q.className = "wgt:min-w-full wgt:table-auto wgt:border-separate wgt:max-sm:border-collapse wgt:max-sm:w-full", E.appendChild(Q);
3092
3092
  const B = document.createElement("thead");
3093
3093
  B.className = "wgt:bg-soft-150 wgt:max-sm:hidden";
3094
- const Q = document.createElement("tr");
3094
+ const C = document.createElement("tr");
3095
3095
  [
3096
- D("product"),
3097
- D("unit"),
3098
- D("quantity"),
3099
- D("unitPrice"),
3100
- D("totalPrice")
3096
+ o("product"),
3097
+ o("unit"),
3098
+ o("quantity"),
3099
+ o("unitPrice"),
3100
+ o("totalPrice")
3101
3101
  ].forEach((I) => {
3102
3102
  const n = document.createElement("th");
3103
- 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);
3104
- }), B.appendChild(Q), C.appendChild(B);
3103
+ 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, C.appendChild(n);
3104
+ }), B.appendChild(C), Q.appendChild(B);
3105
3105
  const t = document.createElement("tbody");
3106
- return t.className = "wgt:divide-y wgt:divide-gray-200 wgt:bg-white wgt:max-sm:divide-y-0 wgt:max-sm:bg-transparent", C.appendChild(t), {
3106
+ return t.className = "wgt:divide-y wgt:divide-gray-200 wgt:bg-white wgt:max-sm:divide-y-0 wgt:max-sm:bg-transparent", Q.appendChild(t), {
3107
3107
  container: g,
3108
3108
  tbody: t
3109
3109
  };
@@ -3114,13 +3114,13 @@ function DE(J) {
3114
3114
  onNext: g,
3115
3115
  onPrev: A,
3116
3116
  selectedInitPackage: E,
3117
- selectedInvoiceOtp: C,
3117
+ selectedInvoiceOtp: Q,
3118
3118
  selectedSignatureOtp: B,
3119
- setSelectedInitPackage: Q,
3119
+ setSelectedInitPackage: C,
3120
3120
  setSelectedInvoiceOtp: t,
3121
3121
  setSelectedSignatureOtp: I,
3122
3122
  setOrderId: n,
3123
- setTotalAmount: o,
3123
+ setTotalAmount: D,
3124
3124
  theme: c,
3125
3125
  selectedProvider: s,
3126
3126
  selectedPromotions: a,
@@ -3129,7 +3129,7 @@ function DE(J) {
3129
3129
  setPackages: q,
3130
3130
  setPromotionCodes: F
3131
3131
  }) {
3132
- let H = "", P = C ? C._id : null, m = B ? B._id : null, k = a ? a.map((b) => b) : [], v = [], i = [], r = [], l = [], R = !1, X = null, d = 1, M = 1, Y = 1;
3132
+ let H = "", P = Q ? Q._id : null, m = B ? B._id : null, k = a ? a.map((b) => b) : [], v = [], i = [], r = [], l = [], R = !1, X = null, d = 1, M = 1, Y = 1;
3133
3133
  function K(b) {
3134
3134
  return v.find((W) => W._id === b) || null;
3135
3135
  }
@@ -3167,20 +3167,20 @@ function DE(J) {
3167
3167
  YA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", YA.innerHTML = `
3168
3168
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3169
3169
  <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>
3170
- <span class="wgt:text-sm wgt:text-text-sub-600">${D("loading")}...</span>
3170
+ <span class="wgt:text-sm wgt:text-text-sub-600">${o("loading")}...</span>
3171
3171
  </div>
3172
3172
  `, u.appendChild(YA);
3173
3173
  const { container: JA } = eE(), { container: kA, tbody: sA } = aE(), rA = document.createElement("div");
3174
3174
  rA.className = "wgt:hidden wgt:max-sm:flex wgt:items-center wgt:justify-between wgt:w-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:px-6 wgt:py-5 wgt:shadow-lg";
3175
3175
  const FA = document.createElement("span");
3176
- FA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", FA.innerText = D("total"), rA.appendChild(FA);
3176
+ FA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", FA.innerText = o("total"), rA.appendChild(FA);
3177
3177
  const PA = document.createElement("span");
3178
3178
  PA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", PA.innerText = "0 VND", rA.appendChild(PA);
3179
3179
  const jA = document.createElement("div");
3180
3180
  jA.className = "wgt:flex wgt:justify-between wgt:gap-2", j.appendChild(jA);
3181
3181
  const ig = Ig({
3182
3182
  type: "button",
3183
- title: D("back"),
3183
+ title: o("back"),
3184
3184
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
3185
3185
  handleClick: A
3186
3186
  });
@@ -3226,12 +3226,12 @@ function DE(J) {
3226
3226
  });
3227
3227
  n(tA.orderId), g();
3228
3228
  } catch (tA) {
3229
- console.error("Error creating order:", tA), Qg(D("errorCreatingOrder") || "Failed to create order"), w();
3229
+ console.error("Error creating order:", tA), Qg(o("errorCreatingOrder") || "Failed to create order"), w();
3230
3230
  return;
3231
3231
  }
3232
3232
  }), $A = Ig({
3233
3233
  type: "button",
3234
- title: D("next"),
3234
+ title: o("next"),
3235
3235
  className: "wgt:text-white wgt:bg-primary",
3236
3236
  handleClick: () => p(null, null, function* () {
3237
3237
  const b = N().find(
@@ -3242,7 +3242,7 @@ function DE(J) {
3242
3242
  let CA = null;
3243
3243
  R && !(b != null && b.withoutInitialFee) ? (CA = bA(RA({}, i[0]), {
3244
3244
  quantity: d
3245
- }), Q(CA)) : Q(null);
3245
+ }), C(CA)) : C(null);
3246
3246
  let Z = bA(RA({}, b), { quantity: M }), EA = bA(RA({}, W), { quantity: Y });
3247
3247
  t(Z), I(EA), f(k), yield tg(
3248
3248
  CA,
@@ -3277,12 +3277,12 @@ function DE(J) {
3277
3277
  "Failed to check new customer:",
3278
3278
  _.reason
3279
3279
  ), og.error(
3280
- D("errorCheckingCustomer") || "Failed to check customer status"
3280
+ o("errorCheckingCustomer") || "Failed to check customer status"
3281
3281
  ), R = !1), AA.status === "fulfilled" ? i = AA.value || [] : (console.error(
3282
3282
  "Failed to load init packages:",
3283
3283
  AA.reason
3284
3284
  ), og.error(
3285
- D("errorLoadingInitPackages") || "Failed to load registration packages"
3285
+ o("errorLoadingInitPackages") || "Failed to load registration packages"
3286
3286
  ), i = []), QA.status === "fulfilled" ? (((Z = QA == null ? void 0 : QA.value) == null ? void 0 : Z.length) > 0 && QA.value.forEach((V) => {
3287
3287
  V.codes.length > 0 && (r[V.codes[0].code] = {
3288
3288
  id: V.id,
@@ -3306,7 +3306,7 @@ function DE(J) {
3306
3306
  const V = tA.value.find(
3307
3307
  (MA) => l.includes(MA.code)
3308
3308
  );
3309
- P = C ? C._id : V ? V._id : tA.value[0]._id, S(tA.value);
3309
+ P = Q ? Q._id : V ? V._id : tA.value[0]._id, S(tA.value);
3310
3310
  }
3311
3311
  nA();
3312
3312
  } else
@@ -3314,7 +3314,7 @@ function DE(J) {
3314
3314
  "Failed to load invoice packages:",
3315
3315
  tA.reason
3316
3316
  ), og.error(
3317
- D("errorLoadingInvoicePackages") || "Failed to load invoice packages"
3317
+ o("errorLoadingInvoicePackages") || "Failed to load invoice packages"
3318
3318
  ), z([]), nA();
3319
3319
  if (wA.status === "fulfilled") {
3320
3320
  if (v = wA.value || [], v.length > 0) {
@@ -3328,11 +3328,11 @@ function DE(J) {
3328
3328
  "Failed to load signature packages:",
3329
3329
  wA.reason
3330
3330
  ), og.error(
3331
- D("errorLoadingSignaturePackages") || "Failed to load signature packages"
3331
+ o("errorLoadingSignaturePackages") || "Failed to load signature packages"
3332
3332
  ), v = [];
3333
3333
  hg();
3334
3334
  } catch (_) {
3335
- console.error("Unexpected error during data loading:", _), og.error(D("errorLoadingData") || "Failed to load data", {
3335
+ console.error("Unexpected error during data loading:", _), og.error(o("errorLoadingData") || "Failed to load data", {
3336
3336
  autoClose: 5e3,
3337
3337
  closeButton: !0,
3338
3338
  icon: !0
@@ -3351,9 +3351,9 @@ function DE(J) {
3351
3351
  ), QA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used;
3352
3352
  if (EA && !QA) {
3353
3353
  const { container: AA, open: tA } = aB({
3354
- message: D("errorDiscountPackage"),
3355
- okLabel: D("ok"),
3356
- cancelLabel: D("cancel"),
3354
+ message: o("errorDiscountPackage"),
3355
+ okLabel: o("ok"),
3356
+ cancelLabel: o("cancel"),
3357
3357
  onClose: CA,
3358
3358
  isSuccess: !1
3359
3359
  });
@@ -3368,7 +3368,7 @@ function DE(J) {
3368
3368
  type: "service",
3369
3369
  packageOptions: IA(),
3370
3370
  disCountedPackages: l,
3371
- promotion: D("discount"),
3371
+ promotion: o("discount"),
3372
3372
  selectedPackageId: P,
3373
3373
  handlePackageSelect: (b) => {
3374
3374
  var Z, EA;
@@ -3382,7 +3382,7 @@ function DE(J) {
3382
3382
  }), L.appendChild(Ag.container);
3383
3383
  else {
3384
3384
  const b = document.createElement("span");
3385
- b.className = "wgt:text-text-sub-600", b.innerText = D("noPackageFound"), L.appendChild(b), Ag = null;
3385
+ b.className = "wgt:text-text-sub-600", b.innerText = o("noPackageFound"), L.appendChild(b), Ag = null;
3386
3386
  }
3387
3387
  }
3388
3388
  let NA = null;
@@ -3392,7 +3392,7 @@ function DE(J) {
3392
3392
  type: "signature",
3393
3393
  packageOptions: v.filter((b) => !b.isBonusPackage),
3394
3394
  disCountedPackages: l,
3395
- promotion: D("gift"),
3395
+ promotion: o("gift"),
3396
3396
  selectedPackageId: m,
3397
3397
  handlePackageSelect: (b) => {
3398
3398
  var Z, EA;
@@ -3406,7 +3406,7 @@ function DE(J) {
3406
3406
  }), cA.appendChild(NA.container);
3407
3407
  else {
3408
3408
  const b = document.createElement("span");
3409
- b.className = "wgt:text-text-sub-600", b.innerText = D("noPackageFound"), cA.appendChild(b), NA = null;
3409
+ b.className = "wgt:text-text-sub-600", b.innerText = o("noPackageFound"), cA.appendChild(b), NA = null;
3410
3410
  }
3411
3411
  }
3412
3412
  const KA = document.createElement("div");
@@ -3420,7 +3420,7 @@ function DE(J) {
3420
3420
  const { container: W } = tE({
3421
3421
  name: "registrationFee",
3422
3422
  value: "standard",
3423
- feeLabel: `${D("registrationFee")}: ${HA(
3423
+ feeLabel: `${o("registrationFee")}: ${HA(
3424
3424
  i[0].price
3425
3425
  )} VND`,
3426
3426
  required: !0,
@@ -3466,7 +3466,7 @@ function DE(J) {
3466
3466
  }
3467
3467
  XA.innerHTML = "";
3468
3468
  const W = document.createElement("h3");
3469
- W.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", W.innerText = D("applyPromotion"), XA.appendChild(W), u.appendChild(XA);
3469
+ W.className = "wgt:text-xl wgt:font-bold wgt:text-strong-950", W.innerText = o("applyPromotion"), XA.appendChild(W), u.appendChild(XA);
3470
3470
  const CA = document.createElement("div");
3471
3471
  CA.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:max-sm:flex-col wgt:max-sm:items-start";
3472
3472
  const Z = document.createElement("div");
@@ -3495,7 +3495,7 @@ function DE(J) {
3495
3495
  });
3496
3496
  const EA = Ig({
3497
3497
  type: "button",
3498
- title: D("apply"),
3498
+ title: o("apply"),
3499
3499
  className: "wgt:text-white wgt:bg-primary",
3500
3500
  handleClick: () => {
3501
3501
  console.log("Apply promotion");
@@ -3522,7 +3522,7 @@ function DE(J) {
3522
3522
  });
3523
3523
  else {
3524
3524
  const AA = document.createElement("span");
3525
- AA.className = "wgt:text-text-sub-600", AA.innerText = D("noPromotionFound"), XA.appendChild(AA);
3525
+ AA.className = "wgt:text-text-sub-600", AA.innerText = o("noPromotionFound"), XA.appendChild(AA);
3526
3526
  }
3527
3527
  }
3528
3528
  function dA() {
@@ -3531,9 +3531,9 @@ function DE(J) {
3531
3531
  const x = document.createElement("tr");
3532
3532
  x.innerHTML = `
3533
3533
  <td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:max-sm:col-span-5">
3534
- ${D("noDataAvailable") || "No data available"}
3534
+ ${o("noDataAvailable") || "No data available"}
3535
3535
  </td>
3536
- `, sA.appendChild(x), o(0);
3536
+ `, sA.appendChild(x), D(0);
3537
3537
  return;
3538
3538
  }
3539
3539
  const b = N().find(
@@ -3545,19 +3545,19 @@ function DE(J) {
3545
3545
  const BA = document.createElement("td");
3546
3546
  BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = ag() === "vi" ? i[0].name : i[0].nameEn, x.appendChild(BA);
3547
3547
  const eA = document.createElement("td");
3548
- eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", eA.innerText = D("package"), x.appendChild(eA);
3548
+ eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", eA.innerText = o("package"), x.appendChild(eA);
3549
3549
  const vA = document.createElement("td");
3550
3550
  vA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2";
3551
3551
  const $ = document.createElement("div");
3552
3552
  $.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:max-sm:w-full wgt:max-sm:max-w-[200px] wgt:max-sm:mx-auto";
3553
3553
  const hA = document.createElement("button");
3554
- hA.type = "button", hA.ariaLabel = D("decrease"), hA.disabled = !0, hA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", hA.innerText = "–", hA.addEventListener("click", () => {
3554
+ hA.type = "button", hA.ariaLabel = o("decrease"), hA.disabled = !0, hA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", hA.innerText = "–", hA.addEventListener("click", () => {
3555
3555
  d > 1 && (d -= 1, dA());
3556
3556
  }), $.appendChild(hA);
3557
3557
  const oA = document.createElement("span");
3558
3558
  oA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:max-sm:text-lg wgt:max-sm:min-w-[60px] wgt:max-sm:font-semibold", oA.innerText = d, $.appendChild(oA);
3559
3559
  const iA = document.createElement("button");
3560
- iA.type = "button", iA.ariaLabel = D("increase"), iA.disabled = !0, iA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", iA.innerText = "+", iA.addEventListener("click", () => {
3560
+ iA.type = "button", iA.ariaLabel = o("increase"), iA.disabled = !0, iA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", iA.innerText = "+", iA.addEventListener("click", () => {
3561
3561
  d += 1, dA();
3562
3562
  }), $.appendChild(iA), vA.appendChild($), x.appendChild(vA);
3563
3563
  const uA = document.createElement("td");
@@ -3567,13 +3567,13 @@ function DE(J) {
3567
3567
  const lA = document.createElement("div");
3568
3568
  lA.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", lA.innerHTML = `
3569
3569
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3570
- <span>${D("unitPrice")}:</span>
3570
+ <span>${o("unitPrice")}:</span>
3571
3571
  <span class="wgt:font-medium">${HA(
3572
3572
  (MA = i[0]) == null ? void 0 : MA.price
3573
3573
  )} VND</span>
3574
3574
  </div>
3575
3575
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3576
- <span>${D("total")}:</span>
3576
+ <span>${o("total")}:</span>
3577
3577
  <span class="wgt:text-primary">${HA(
3578
3578
  ((gg = i[0]) == null ? void 0 : gg.price) * d
3579
3579
  )} VND</span>
@@ -3588,19 +3588,19 @@ function DE(J) {
3588
3588
  const eA = document.createElement("td");
3589
3589
  eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", eA.innerText = ag() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(eA);
3590
3590
  const vA = document.createElement("td");
3591
- vA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", vA.innerText = D("package"), BA.appendChild(vA);
3591
+ vA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", vA.innerText = o("package"), BA.appendChild(vA);
3592
3592
  const $ = document.createElement("td");
3593
3593
  $.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2";
3594
3594
  const hA = document.createElement("div");
3595
3595
  hA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:max-sm:w-full wgt:max-sm:max-w-[200px] wgt:max-sm:mx-auto";
3596
3596
  const oA = document.createElement("button");
3597
- oA.type = "button", oA.ariaLabel = D("decrease"), oA.disabled = M <= 1 || (x == null ? void 0 : x.price) === 0, oA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", oA.innerText = "–", oA.addEventListener("click", () => {
3597
+ oA.type = "button", oA.ariaLabel = o("decrease"), oA.disabled = M <= 1 || (x == null ? void 0 : x.price) === 0, oA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", oA.innerText = "–", oA.addEventListener("click", () => {
3598
3598
  M > 1 && (M -= 1, dA());
3599
3599
  }), hA.appendChild(oA);
3600
3600
  const iA = document.createElement("span");
3601
3601
  iA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:max-sm:text-lg wgt:max-sm:min-w-[60px] wgt:max-sm:font-semibold", iA.innerText = M, hA.appendChild(iA);
3602
3602
  const uA = document.createElement("button");
3603
- uA.type = "button", uA.ariaLabel = D("increase"), uA.disabled = (x == null ? void 0 : x.price) === 0, uA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", uA.innerText = "+", uA.addEventListener("click", () => {
3603
+ uA.type = "button", uA.ariaLabel = o("increase"), uA.disabled = (x == null ? void 0 : x.price) === 0, uA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", uA.innerText = "+", uA.addEventListener("click", () => {
3604
3604
  M += 1, dA();
3605
3605
  }), hA.appendChild(uA), $.appendChild(hA), BA.appendChild($);
3606
3606
  const TA = document.createElement("td");
@@ -3610,13 +3610,13 @@ function DE(J) {
3610
3610
  const SA = document.createElement("div");
3611
3611
  SA.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", SA.innerHTML = `
3612
3612
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3613
- <span>${D("unitPrice")}:</span>
3613
+ <span>${o("unitPrice")}:</span>
3614
3614
  <span class="wgt:font-medium">${HA(
3615
3615
  (x == null ? void 0 : x.price) * (x == null ? void 0 : x.limit)
3616
3616
  )} VND</span>
3617
3617
  </div>
3618
3618
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3619
- <span>${D("total")}:</span>
3619
+ <span>${o("total")}:</span>
3620
3620
  <span class="wgt:text-primary">${HA(
3621
3621
  (x == null ? void 0 : x.price) * (x == null ? void 0 : x.limit) * M
3622
3622
  )} VND</span>
@@ -3632,19 +3632,19 @@ function DE(J) {
3632
3632
  const eA = document.createElement("td");
3633
3633
  eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", eA.innerText = ag() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(eA);
3634
3634
  const vA = document.createElement("td");
3635
- vA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", vA.innerText = D("package"), BA.appendChild(vA);
3635
+ vA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", vA.innerText = o("package"), BA.appendChild(vA);
3636
3636
  const $ = document.createElement("td");
3637
3637
  $.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2";
3638
3638
  const hA = document.createElement("div");
3639
3639
  hA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:max-sm:w-full wgt:max-sm:max-w-[200px] wgt:max-sm:mx-auto";
3640
3640
  const oA = document.createElement("button");
3641
- oA.type = "button", oA.ariaLabel = D("decrease"), oA.disabled = Y <= 1, oA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold" + (Y <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), oA.innerText = "–", oA.addEventListener("click", () => {
3641
+ oA.type = "button", oA.ariaLabel = o("decrease"), oA.disabled = Y <= 1, oA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold" + (Y <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), oA.innerText = "–", oA.addEventListener("click", () => {
3642
3642
  Y > 1 && (Y -= 1, dA());
3643
3643
  }), hA.appendChild(oA);
3644
3644
  const iA = document.createElement("span");
3645
3645
  iA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:max-sm:text-lg wgt:max-sm:min-w-[60px] wgt:max-sm:font-semibold", iA.innerText = Y, hA.appendChild(iA);
3646
3646
  const uA = document.createElement("button");
3647
- uA.type = "button", uA.ariaLabel = D("increase"), uA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", uA.innerText = "+", uA.addEventListener("click", () => {
3647
+ uA.type = "button", uA.ariaLabel = o("increase"), uA.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-sm:h-12 wgt:max-sm:w-12 wgt:max-sm:text-lg wgt:max-sm:font-bold", uA.innerText = "+", uA.addEventListener("click", () => {
3648
3648
  Y += 1, dA();
3649
3649
  }), hA.appendChild(uA), $.appendChild(hA), BA.appendChild($);
3650
3650
  const TA = document.createElement("td");
@@ -3654,13 +3654,13 @@ function DE(J) {
3654
3654
  const SA = document.createElement("div");
3655
3655
  SA.className = "wgt:hidden wgt:max-sm:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", SA.innerHTML = `
3656
3656
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3657
- <span>${D("unitPrice")}:</span>
3657
+ <span>${o("unitPrice")}:</span>
3658
3658
  <span class="wgt:font-medium">${HA(
3659
3659
  (x == null ? void 0 : x.limit) * (x == null ? void 0 : x.price)
3660
3660
  )} VND</span>
3661
3661
  </div>
3662
3662
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3663
- <span>${D("total")}:</span>
3663
+ <span>${o("total")}:</span>
3664
3664
  <span class="wgt:text-primary">${HA(
3665
3665
  (x == null ? void 0 : x.limit) * (x == null ? void 0 : x.price) * Y
3666
3666
  )} VND</span>
@@ -3690,17 +3690,17 @@ function DE(J) {
3690
3690
  const $ = document.createElement("td");
3691
3691
  $.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold wgt:max-sm:text-base wgt:max-sm:font-bold wgt:max-sm:p-0", x.type === "discount" ? ($.innerText = `-${HA(
3692
3692
  (hA = x == null ? void 0 : x.reward) == null ? void 0 : hA.discountAmount
3693
- )} VND`, $.style.color = "#F04438", CA += (oA = x == null ? void 0 : x.reward) == null ? void 0 : oA.discountAmount) : (x == null ? void 0 : x.type) === "free_item" ? ($.innerText = `+${(uA = (iA = x == null ? void 0 : x.reward) == null ? void 0 : iA.packageCodes) == null ? void 0 : uA.length} ${D(
3693
+ )} VND`, $.style.color = "#F04438", CA += (oA = x == null ? void 0 : x.reward) == null ? void 0 : oA.discountAmount) : (x == null ? void 0 : x.type) === "free_item" ? ($.innerText = `+${(uA = (iA = x == null ? void 0 : x.reward) == null ? void 0 : iA.packageCodes) == null ? void 0 : uA.length} ${o(
3694
3694
  "package"
3695
3695
  )} ${(lA = (TA = x == null ? void 0 : x.reward) == null ? void 0 : TA.packageCodes) == null ? void 0 : lA.join(", ")}`, $.style.color = "#12B76A") : $.innerText = "", BA.appendChild($), sA.appendChild(BA);
3696
3696
  });
3697
3697
  const Z = R && i.length > 0 && !(b != null && b.withoutInitialFee) ? ((Bg = i[0]) == null ? void 0 : Bg.price) * d : 0, EA = U(P), _ = EA ? EA.price * EA.limit * M : 0, QA = K(m), AA = QA ? QA.price * QA.limit * Y : 0, tA = Z + _ + AA - CA;
3698
- o(tA);
3698
+ D(tA);
3699
3699
  {
3700
3700
  const x = document.createElement("tr");
3701
3701
  x.className = "wgt:max-sm:hidden";
3702
3702
  const BA = document.createElement("td");
3703
- 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 = D("total"), x.appendChild(BA);
3703
+ 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 = o("total"), x.appendChild(BA);
3704
3704
  const eA = document.createElement("td");
3705
3705
  eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", eA.innerText = HA(tA) + " VND", x.appendChild(eA), sA.appendChild(x);
3706
3706
  }
@@ -3713,17 +3713,17 @@ function uE({
3713
3713
  qrSrc: g = "",
3714
3714
  logos: A = [],
3715
3715
  logosAbove: E = [],
3716
- accountName: C = "",
3716
+ accountName: Q = "",
3717
3717
  accountNumber: B = "",
3718
- bankName: Q = "",
3718
+ bankName: C = "",
3719
3719
  instructions: t = [],
3720
3720
  illustrationSrc: I = "",
3721
3721
  theme: n = "ocb"
3722
3722
  } = {}) {
3723
- const o = document.createElement("div");
3724
- o.className = "wgt:flex wgt:flex-col wgt:md:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";
3723
+ const D = document.createElement("div");
3724
+ D.className = "wgt:flex wgt:flex-col wgt:md:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";
3725
3725
  const c = document.createElement("div"), s = document.createElement("h3");
3726
- s.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", s.innerText = D("qrPaymentTitle"), c.appendChild(s);
3726
+ s.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", s.innerText = o("qrPaymentTitle"), c.appendChild(s);
3727
3727
  const a = document.createElement("div");
3728
3728
  a.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
3729
3729
  const e = document.createElement("div");
@@ -3732,7 +3732,7 @@ function uE({
3732
3732
  d.src = X, d.alt = "Logo", d.className = "wgt:w-14 wgt:object-contain", e.appendChild(d);
3733
3733
  }), a.appendChild(e));
3734
3734
  const f = document.createElement("div");
3735
- f.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem]";
3735
+ f.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:max-sm:w-[12.5rem]";
3736
3736
  const q = document.createElement("img");
3737
3737
  q.src = g, q.alt = "QR code", q.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", f.appendChild(q), a.appendChild(f);
3738
3738
  const F = document.createElement("div");
@@ -3743,19 +3743,19 @@ function uE({
3743
3743
  const J = document.createElement("div");
3744
3744
  J.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
3745
3745
  const H = document.createElement("h3");
3746
- H.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", H.innerText = C, J.appendChild(H);
3746
+ H.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", H.innerText = Q, J.appendChild(H);
3747
3747
  const P = document.createElement("p");
3748
- P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${D(
3748
+ P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${o(
3749
3749
  "accountNumber"
3750
3750
  )}: <span class="wgt:font-medium">${B}</span>`, J.appendChild(P);
3751
3751
  const m = document.createElement("p");
3752
- m.className = "wgt:text-sm wgt:text-grey-8", m.innerHTML = `${D(
3752
+ m.className = "wgt:text-sm wgt:text-grey-8", m.innerHTML = `${o(
3753
3753
  "beneficiaryBank"
3754
- )}: <span class="wgt:font-medium">${Q}</span>`, J.appendChild(m), a.appendChild(J), c.appendChild(a), o.appendChild(c);
3754
+ )}: <span class="wgt:font-medium">${C}</span>`, J.appendChild(m), a.appendChild(J), c.appendChild(a), D.appendChild(c);
3755
3755
  const k = document.createElement("div");
3756
3756
  k.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:md:w-1/2";
3757
3757
  const v = document.createElement("div"), i = document.createElement("h3");
3758
- i.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 mb-4", i.innerText = D("paymentInstructionsTitle"), v.appendChild(i);
3758
+ i.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 mb-4", i.innerText = o("paymentInstructionsTitle"), v.appendChild(i);
3759
3759
  const r = document.createElement("ol");
3760
3760
  r.className = "wgt:space-y-4", t.forEach((X, d) => {
3761
3761
  const M = document.createElement("li");
@@ -3772,15 +3772,15 @@ function uE({
3772
3772
  const l = document.createElement("div");
3773
3773
  l.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
3774
3774
  const R = document.createElement("img");
3775
- return R.src = I, R.alt = "QR payment illustration", R.className = "wgt:h-full wgt:object-contain", l.appendChild(R), k.appendChild(l), o.appendChild(k), {
3776
- container: o,
3775
+ return R.src = I, R.alt = "QR payment illustration", R.className = "wgt:h-full wgt:object-contain", l.appendChild(R), k.appendChild(l), D.appendChild(k), {
3776
+ container: D,
3777
3777
  update(X = {}) {
3778
3778
  X.qrSrc != null && (q.src = X.qrSrc), X.logos && (F.innerHTML = "", X.logos.forEach((d) => {
3779
3779
  const M = document.createElement("img");
3780
3780
  M.src = d, M.alt = "Logo", M.className = "wgt:w-8 wgt:object-contain", F.appendChild(M);
3781
- })), X.accountName != null && (H.innerText = X.accountName), X.accountNumber != null && (P.innerHTML = `${D(
3781
+ })), X.accountName != null && (H.innerText = X.accountName), X.accountNumber != null && (P.innerHTML = `${o(
3782
3782
  "accountNumber"
3783
- )}: <span class="wgt:font-medium">${X.accountNumber}</span>`), X.bankName != null && (m.innerHTML = `${D(
3783
+ )}: <span class="wgt:font-medium">${X.accountNumber}</span>`), X.bankName != null && (m.innerHTML = `${o(
3784
3784
  "beneficiaryBank"
3785
3785
  )}: <span class="wgt:font-medium">${X.bankName}</span>`), X.instructions && (r.innerHTML = "", X.instructions.forEach((d, M) => {
3786
3786
  const Y = document.createElement("li");
@@ -3801,25 +3801,25 @@ function sE({
3801
3801
  qrSrc: g,
3802
3802
  logos: A = [],
3803
3803
  logosAbove: E = [],
3804
- accountName: C = "",
3804
+ accountName: Q = "",
3805
3805
  accountNumber: B = "",
3806
- bankName: Q = "",
3806
+ bankName: C = "",
3807
3807
  instructions: t = [],
3808
3808
  illustrationSrc: I,
3809
3809
  theme: n
3810
3810
  } = {}) {
3811
- const { container: o, update: c } = uE({
3811
+ const { container: D, update: c } = uE({
3812
3812
  qrSrc: g,
3813
3813
  logos: A,
3814
3814
  logosAbove: E,
3815
- accountName: C,
3815
+ accountName: Q,
3816
3816
  accountNumber: B,
3817
- bankName: Q,
3817
+ bankName: C,
3818
3818
  instructions: t,
3819
3819
  illustrationSrc: I,
3820
3820
  theme: n
3821
3821
  });
3822
- return { container: o, update: c };
3822
+ return { container: D, update: c };
3823
3823
  }
3824
3824
  const DB = NC.create({
3825
3825
  headers: {
@@ -3909,25 +3909,25 @@ function ug() {
3909
3909
  3532,
3910
3910
  3706
3911
3911
  ];
3912
- return Cg.getSymbolSize = function(C) {
3913
- if (!C) throw new Error('"version" cannot be null or undefined');
3914
- if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
3915
- return C * 4 + 17;
3916
- }, Cg.getSymbolTotalCodewords = function(C) {
3917
- return A[C];
3912
+ return Cg.getSymbolSize = function(Q) {
3913
+ if (!Q) throw new Error('"version" cannot be null or undefined');
3914
+ if (Q < 1 || Q > 40) throw new Error('"version" should be in range from 1 to 40');
3915
+ return Q * 4 + 17;
3916
+ }, Cg.getSymbolTotalCodewords = function(Q) {
3917
+ return A[Q];
3918
3918
  }, Cg.getBCHDigit = function(E) {
3919
- let C = 0;
3919
+ let Q = 0;
3920
3920
  for (; E !== 0; )
3921
- C++, E >>>= 1;
3922
- return C;
3923
- }, Cg.setToSJISFunction = function(C) {
3924
- if (typeof C != "function")
3921
+ Q++, E >>>= 1;
3922
+ return Q;
3923
+ }, Cg.setToSJISFunction = function(Q) {
3924
+ if (typeof Q != "function")
3925
3925
  throw new Error('"toSJISFunc" is not a valid function.');
3926
- g = C;
3926
+ g = Q;
3927
3927
  }, Cg.isKanjiModeEnabled = function() {
3928
3928
  return typeof g != "undefined";
3929
- }, Cg.toSJIS = function(C) {
3930
- return g(C);
3929
+ }, Cg.toSJIS = function(Q) {
3930
+ return g(Q);
3931
3931
  }, Cg;
3932
3932
  }
3933
3933
  var bg = {}, eC;
@@ -3954,14 +3954,14 @@ function uB() {
3954
3954
  throw new Error("Unknown EC Level: " + E);
3955
3955
  }
3956
3956
  }
3957
- g.isValid = function(C) {
3958
- return C && typeof C.bit != "undefined" && C.bit >= 0 && C.bit < 4;
3959
- }, g.from = function(C, B) {
3960
- if (g.isValid(C))
3961
- return C;
3957
+ g.isValid = function(Q) {
3958
+ return Q && typeof Q.bit != "undefined" && Q.bit >= 0 && Q.bit < 4;
3959
+ }, g.from = function(Q, B) {
3960
+ if (g.isValid(Q))
3961
+ return Q;
3962
3962
  try {
3963
- return A(C);
3964
- } catch (Q) {
3963
+ return A(Q);
3964
+ } catch (C) {
3965
3965
  return B;
3966
3966
  }
3967
3967
  };
@@ -3980,8 +3980,8 @@ function mE() {
3980
3980
  return (this.buffer[E] >>> 7 - A % 8 & 1) === 1;
3981
3981
  },
3982
3982
  put: function(A, E) {
3983
- for (let C = 0; C < E; C++)
3984
- this.putBit((A >>> E - C - 1 & 1) === 1);
3983
+ for (let Q = 0; Q < E; Q++)
3984
+ this.putBit((A >>> E - Q - 1 & 1) === 1);
3985
3985
  },
3986
3986
  getLengthInBits: function() {
3987
3987
  return this.length;
@@ -4001,13 +4001,13 @@ function rE() {
4001
4001
  throw new Error("BitMatrix size must be defined and greater than 0");
4002
4002
  this.size = A, this.data = new Uint8Array(A * A), this.reservedBit = new Uint8Array(A * A);
4003
4003
  }
4004
- return g.prototype.set = function(A, E, C, B) {
4005
- const Q = A * this.size + E;
4006
- this.data[Q] = C, B && (this.reservedBit[Q] = !0);
4004
+ return g.prototype.set = function(A, E, Q, B) {
4005
+ const C = A * this.size + E;
4006
+ this.data[C] = Q, B && (this.reservedBit[C] = !0);
4007
4007
  }, g.prototype.get = function(A, E) {
4008
4008
  return this.data[A * this.size + E];
4009
- }, g.prototype.xor = function(A, E, C) {
4010
- this.data[A * this.size + E] ^= C;
4009
+ }, g.prototype.xor = function(A, E, Q) {
4010
+ this.data[A * this.size + E] ^= Q;
4011
4011
  }, g.prototype.isReserved = function(A, E) {
4012
4012
  return this.reservedBit[A * this.size + E];
4013
4013
  }, yg = g, yg;
@@ -4016,19 +4016,19 @@ var Kg = {}, DC;
4016
4016
  function PE() {
4017
4017
  return DC || (DC = 1, function(g) {
4018
4018
  const A = ug().getSymbolSize;
4019
- g.getRowColCoords = function(C) {
4020
- if (C === 1) return [];
4021
- 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];
4019
+ g.getRowColCoords = function(Q) {
4020
+ if (Q === 1) return [];
4021
+ const B = Math.floor(Q / 7) + 2, C = A(Q), t = C === 145 ? 26 : Math.ceil((C - 13) / (2 * B - 2)) * 2, I = [C - 7];
4022
4022
  for (let n = 1; n < B - 1; n++)
4023
4023
  I[n] = I[n - 1] - t;
4024
4024
  return I.push(6), I.reverse();
4025
- }, g.getPositions = function(C) {
4026
- const B = [], Q = g.getRowColCoords(C), t = Q.length;
4025
+ }, g.getPositions = function(Q) {
4026
+ const B = [], C = g.getRowColCoords(Q), t = C.length;
4027
4027
  for (let I = 0; I < t; I++)
4028
4028
  for (let n = 0; n < t; n++)
4029
4029
  I === 0 && n === 0 || // top-left
4030
4030
  I === 0 && n === t - 1 || // bottom-left
4031
- I === t - 1 && n === 0 || B.push([Q[I], Q[n]]);
4031
+ I === t - 1 && n === 0 || B.push([C[I], C[n]]);
4032
4032
  return B;
4033
4033
  };
4034
4034
  }(Kg)), Kg;
@@ -4038,8 +4038,8 @@ function qE() {
4038
4038
  if (uC) return Ug;
4039
4039
  uC = 1;
4040
4040
  const g = ug().getSymbolSize, A = 7;
4041
- return Ug.getPositions = function(C) {
4042
- const B = g(C);
4041
+ return Ug.getPositions = function(Q) {
4042
+ const B = g(Q);
4043
4043
  return [
4044
4044
  // top-left
4045
4045
  [0, 0],
@@ -4074,75 +4074,75 @@ function vE() {
4074
4074
  }, g.from = function(B) {
4075
4075
  return g.isValid(B) ? parseInt(B, 10) : void 0;
4076
4076
  }, g.getPenaltyN1 = function(B) {
4077
- const Q = B.size;
4078
- let t = 0, I = 0, n = 0, o = null, c = null;
4079
- for (let s = 0; s < Q; s++) {
4080
- I = n = 0, o = c = null;
4081
- for (let a = 0; a < Q; a++) {
4077
+ const C = B.size;
4078
+ let t = 0, I = 0, n = 0, D = null, c = null;
4079
+ for (let s = 0; s < C; s++) {
4080
+ I = n = 0, D = c = null;
4081
+ for (let a = 0; a < C; a++) {
4082
4082
  let e = B.get(s, a);
4083
- e === o ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), o = e, I = 1), e = B.get(a, s), e === c ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), c = e, n = 1);
4083
+ e === D ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), D = e, I = 1), e = B.get(a, s), e === c ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), c = e, n = 1);
4084
4084
  }
4085
4085
  I >= 5 && (t += A.N1 + (I - 5)), n >= 5 && (t += A.N1 + (n - 5));
4086
4086
  }
4087
4087
  return t;
4088
4088
  }, g.getPenaltyN2 = function(B) {
4089
- const Q = B.size;
4089
+ const C = B.size;
4090
4090
  let t = 0;
4091
- for (let I = 0; I < Q - 1; I++)
4092
- for (let n = 0; n < Q - 1; n++) {
4093
- const o = B.get(I, n) + B.get(I, n + 1) + B.get(I + 1, n) + B.get(I + 1, n + 1);
4094
- (o === 4 || o === 0) && t++;
4091
+ for (let I = 0; I < C - 1; I++)
4092
+ for (let n = 0; n < C - 1; n++) {
4093
+ const D = B.get(I, n) + B.get(I, n + 1) + B.get(I + 1, n) + B.get(I + 1, n + 1);
4094
+ (D === 4 || D === 0) && t++;
4095
4095
  }
4096
4096
  return t * A.N2;
4097
4097
  }, g.getPenaltyN3 = function(B) {
4098
- const Q = B.size;
4098
+ const C = B.size;
4099
4099
  let t = 0, I = 0, n = 0;
4100
- for (let o = 0; o < Q; o++) {
4100
+ for (let D = 0; D < C; D++) {
4101
4101
  I = n = 0;
4102
- for (let c = 0; c < Q; c++)
4103
- I = I << 1 & 2047 | B.get(o, c), c >= 10 && (I === 1488 || I === 93) && t++, n = n << 1 & 2047 | B.get(c, o), c >= 10 && (n === 1488 || n === 93) && t++;
4102
+ for (let c = 0; c < C; c++)
4103
+ I = I << 1 & 2047 | B.get(D, c), c >= 10 && (I === 1488 || I === 93) && t++, n = n << 1 & 2047 | B.get(c, D), c >= 10 && (n === 1488 || n === 93) && t++;
4104
4104
  }
4105
4105
  return t * A.N3;
4106
4106
  }, g.getPenaltyN4 = function(B) {
4107
- let Q = 0;
4107
+ let C = 0;
4108
4108
  const t = B.data.length;
4109
- for (let n = 0; n < t; n++) Q += B.data[n];
4110
- return Math.abs(Math.ceil(Q * 100 / t / 5) - 10) * A.N4;
4109
+ for (let n = 0; n < t; n++) C += B.data[n];
4110
+ return Math.abs(Math.ceil(C * 100 / t / 5) - 10) * A.N4;
4111
4111
  };
4112
- function E(C, B, Q) {
4113
- switch (C) {
4112
+ function E(Q, B, C) {
4113
+ switch (Q) {
4114
4114
  case g.Patterns.PATTERN000:
4115
- return (B + Q) % 2 === 0;
4115
+ return (B + C) % 2 === 0;
4116
4116
  case g.Patterns.PATTERN001:
4117
4117
  return B % 2 === 0;
4118
4118
  case g.Patterns.PATTERN010:
4119
- return Q % 3 === 0;
4119
+ return C % 3 === 0;
4120
4120
  case g.Patterns.PATTERN011:
4121
- return (B + Q) % 3 === 0;
4121
+ return (B + C) % 3 === 0;
4122
4122
  case g.Patterns.PATTERN100:
4123
- return (Math.floor(B / 2) + Math.floor(Q / 3)) % 2 === 0;
4123
+ return (Math.floor(B / 2) + Math.floor(C / 3)) % 2 === 0;
4124
4124
  case g.Patterns.PATTERN101:
4125
- return B * Q % 2 + B * Q % 3 === 0;
4125
+ return B * C % 2 + B * C % 3 === 0;
4126
4126
  case g.Patterns.PATTERN110:
4127
- return (B * Q % 2 + B * Q % 3) % 2 === 0;
4127
+ return (B * C % 2 + B * C % 3) % 2 === 0;
4128
4128
  case g.Patterns.PATTERN111:
4129
- return (B * Q % 3 + (B + Q) % 2) % 2 === 0;
4129
+ return (B * C % 3 + (B + C) % 2) % 2 === 0;
4130
4130
  default:
4131
- throw new Error("bad maskPattern:" + C);
4131
+ throw new Error("bad maskPattern:" + Q);
4132
4132
  }
4133
4133
  }
4134
- g.applyMask = function(B, Q) {
4135
- const t = Q.size;
4134
+ g.applyMask = function(B, C) {
4135
+ const t = C.size;
4136
4136
  for (let I = 0; I < t; I++)
4137
4137
  for (let n = 0; n < t; n++)
4138
- Q.isReserved(n, I) || Q.xor(n, I, E(B, n, I));
4139
- }, g.getBestMask = function(B, Q) {
4138
+ C.isReserved(n, I) || C.xor(n, I, E(B, n, I));
4139
+ }, g.getBestMask = function(B, C) {
4140
4140
  const t = Object.keys(g.Patterns).length;
4141
4141
  let I = 0, n = 1 / 0;
4142
- for (let o = 0; o < t; o++) {
4143
- Q(o), g.applyMask(o, B);
4142
+ for (let D = 0; D < t; D++) {
4143
+ C(D), g.applyMask(D, B);
4144
4144
  const c = g.getPenaltyN1(B) + g.getPenaltyN2(B) + g.getPenaltyN3(B) + g.getPenaltyN4(B);
4145
- g.applyMask(o, B), c < n && (n = c, I = o);
4145
+ g.applyMask(D, B), c < n && (n = c, I = D);
4146
4146
  }
4147
4147
  return I;
4148
4148
  };
@@ -4477,8 +4477,8 @@ function _C() {
4477
4477
  2040,
4478
4478
  2430
4479
4479
  ];
4480
- return dg.getBlocksCount = function(B, Q) {
4481
- switch (Q) {
4480
+ return dg.getBlocksCount = function(B, C) {
4481
+ switch (C) {
4482
4482
  case g.L:
4483
4483
  return A[(B - 1) * 4 + 0];
4484
4484
  case g.M:
@@ -4490,8 +4490,8 @@ function _C() {
4490
4490
  default:
4491
4491
  return;
4492
4492
  }
4493
- }, dg.getTotalCodewordsCount = function(B, Q) {
4494
- switch (Q) {
4493
+ }, dg.getTotalCodewordsCount = function(B, C) {
4494
+ switch (C) {
4495
4495
  case g.L:
4496
4496
  return E[(B - 1) * 4 + 0];
4497
4497
  case g.M:
@@ -4511,45 +4511,45 @@ function ME() {
4511
4511
  fC = 1;
4512
4512
  const g = new Uint8Array(512), A = new Uint8Array(256);
4513
4513
  return function() {
4514
- let C = 1;
4514
+ let Q = 1;
4515
4515
  for (let B = 0; B < 255; B++)
4516
- g[B] = C, A[C] = B, C <<= 1, C & 256 && (C ^= 285);
4516
+ g[B] = Q, A[Q] = B, Q <<= 1, Q & 256 && (Q ^= 285);
4517
4517
  for (let B = 255; B < 512; B++)
4518
4518
  g[B] = g[B - 255];
4519
- }(), Pg.log = function(C) {
4520
- if (C < 1) throw new Error("log(" + C + ")");
4521
- return A[C];
4522
- }, Pg.exp = function(C) {
4523
- return g[C];
4524
- }, Pg.mul = function(C, B) {
4525
- return C === 0 || B === 0 ? 0 : g[A[C] + A[B]];
4519
+ }(), Pg.log = function(Q) {
4520
+ if (Q < 1) throw new Error("log(" + Q + ")");
4521
+ return A[Q];
4522
+ }, Pg.exp = function(Q) {
4523
+ return g[Q];
4524
+ }, Pg.mul = function(Q, B) {
4525
+ return Q === 0 || B === 0 ? 0 : g[A[Q] + A[B]];
4526
4526
  }, Pg;
4527
4527
  }
4528
4528
  var mC;
4529
4529
  function TE() {
4530
4530
  return mC || (mC = 1, function(g) {
4531
4531
  const A = ME();
4532
- g.mul = function(C, B) {
4533
- const Q = new Uint8Array(C.length + B.length - 1);
4534
- for (let t = 0; t < C.length; t++)
4532
+ g.mul = function(Q, B) {
4533
+ const C = new Uint8Array(Q.length + B.length - 1);
4534
+ for (let t = 0; t < Q.length; t++)
4535
4535
  for (let I = 0; I < B.length; I++)
4536
- Q[t + I] ^= A.mul(C[t], B[I]);
4537
- return Q;
4538
- }, g.mod = function(C, B) {
4539
- let Q = new Uint8Array(C);
4540
- for (; Q.length - B.length >= 0; ) {
4541
- const t = Q[0];
4536
+ C[t + I] ^= A.mul(Q[t], B[I]);
4537
+ return C;
4538
+ }, g.mod = function(Q, B) {
4539
+ let C = new Uint8Array(Q);
4540
+ for (; C.length - B.length >= 0; ) {
4541
+ const t = C[0];
4542
4542
  for (let n = 0; n < B.length; n++)
4543
- Q[n] ^= A.mul(B[n], t);
4543
+ C[n] ^= A.mul(B[n], t);
4544
4544
  let I = 0;
4545
- for (; I < Q.length && Q[I] === 0; ) I++;
4546
- Q = Q.slice(I);
4545
+ for (; I < C.length && C[I] === 0; ) I++;
4546
+ C = C.slice(I);
4547
4547
  }
4548
- return Q;
4549
- }, g.generateECPolynomial = function(C) {
4548
+ return C;
4549
+ }, g.generateECPolynomial = function(Q) {
4550
4550
  let B = new Uint8Array([1]);
4551
- for (let Q = 0; Q < C; Q++)
4552
- B = g.mul(B, new Uint8Array([1, A.exp(Q)]));
4551
+ for (let C = 0; C < Q; C++)
4552
+ B = g.mul(B, new Uint8Array([1, A.exp(C)]));
4553
4553
  return B;
4554
4554
  };
4555
4555
  }(pg)), pg;
@@ -4562,19 +4562,19 @@ function lE() {
4562
4562
  function A(E) {
4563
4563
  this.genPoly = void 0, this.degree = E, this.degree && this.initialize(this.degree);
4564
4564
  }
4565
- return A.prototype.initialize = function(C) {
4566
- this.degree = C, this.genPoly = g.generateECPolynomial(this.degree);
4567
- }, A.prototype.encode = function(C) {
4565
+ return A.prototype.initialize = function(Q) {
4566
+ this.degree = Q, this.genPoly = g.generateECPolynomial(this.degree);
4567
+ }, A.prototype.encode = function(Q) {
4568
4568
  if (!this.genPoly)
4569
4569
  throw new Error("Encoder not initialized");
4570
- const B = new Uint8Array(C.length + this.degree);
4571
- B.set(C);
4572
- const Q = g.mod(B, this.genPoly), t = this.degree - Q.length;
4570
+ const B = new Uint8Array(Q.length + this.degree);
4571
+ B.set(Q);
4572
+ const C = g.mod(B, this.genPoly), t = this.degree - C.length;
4573
4573
  if (t > 0) {
4574
4574
  const I = new Uint8Array(this.degree);
4575
- return I.set(Q, t), I;
4575
+ return I.set(C, t), I;
4576
4576
  }
4577
- return Q;
4577
+ return C;
4578
4578
  }, Zg = A, Zg;
4579
4579
  }
4580
4580
  var Vg = {}, Wg = {}, _g = {}, PC;
@@ -4590,14 +4590,14 @@ function AQ() {
4590
4590
  const g = "[0-9]+", A = "[A-Z $%*+\\-./:]+";
4591
4591
  let E = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
4592
4592
  E = E.replace(/u/g, "\\u");
4593
- const C = "(?:(?![A-Z0-9 $%*+\\-./:]|" + E + `)(?:.|[\r
4593
+ const Q = "(?:(?![A-Z0-9 $%*+\\-./:]|" + E + `)(?:.|[\r
4594
4594
  ]))+`;
4595
- 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");
4596
- const B = new RegExp("^" + E + "$"), Q = new RegExp("^" + g + "$"), t = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
4595
+ pA.KANJI = new RegExp(E, "g"), pA.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), pA.BYTE = new RegExp(Q, "g"), pA.NUMERIC = new RegExp(g, "g"), pA.ALPHANUMERIC = new RegExp(A, "g");
4596
+ const B = new RegExp("^" + E + "$"), C = new RegExp("^" + g + "$"), t = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
4597
4597
  return pA.testKanji = function(n) {
4598
4598
  return B.test(n);
4599
4599
  }, pA.testNumeric = function(n) {
4600
- return Q.test(n);
4600
+ return C.test(n);
4601
4601
  }, pA.testAlphanumeric = function(n) {
4602
4602
  return t.test(n);
4603
4603
  }, pA;
@@ -4624,20 +4624,20 @@ function sg() {
4624
4624
  ccBits: [8, 10, 12]
4625
4625
  }, g.MIXED = {
4626
4626
  bit: -1
4627
- }, g.getCharCountIndicator = function(Q, t) {
4628
- if (!Q.ccBits) throw new Error("Invalid mode: " + Q);
4627
+ }, g.getCharCountIndicator = function(C, t) {
4628
+ if (!C.ccBits) throw new Error("Invalid mode: " + C);
4629
4629
  if (!A.isValid(t))
4630
4630
  throw new Error("Invalid version: " + t);
4631
- return t >= 1 && t < 10 ? Q.ccBits[0] : t < 27 ? Q.ccBits[1] : Q.ccBits[2];
4632
- }, g.getBestModeForData = function(Q) {
4633
- return E.testNumeric(Q) ? g.NUMERIC : E.testAlphanumeric(Q) ? g.ALPHANUMERIC : E.testKanji(Q) ? g.KANJI : g.BYTE;
4634
- }, g.toString = function(Q) {
4635
- if (Q && Q.id) return Q.id;
4631
+ return t >= 1 && t < 10 ? C.ccBits[0] : t < 27 ? C.ccBits[1] : C.ccBits[2];
4632
+ }, g.getBestModeForData = function(C) {
4633
+ return E.testNumeric(C) ? g.NUMERIC : E.testAlphanumeric(C) ? g.ALPHANUMERIC : E.testKanji(C) ? g.KANJI : g.BYTE;
4634
+ }, g.toString = function(C) {
4635
+ if (C && C.id) return C.id;
4636
4636
  throw new Error("Invalid mode");
4637
- }, g.isValid = function(Q) {
4638
- return Q && Q.bit && Q.ccBits;
4637
+ }, g.isValid = function(C) {
4638
+ return C && C.bit && C.ccBits;
4639
4639
  };
4640
- function C(B) {
4640
+ function Q(B) {
4641
4641
  if (typeof B != "string")
4642
4642
  throw new Error("Param is not a string");
4643
4643
  switch (B.toLowerCase()) {
@@ -4653,11 +4653,11 @@ function sg() {
4653
4653
  throw new Error("Unknown mode: " + B);
4654
4654
  }
4655
4655
  }
4656
- g.from = function(Q, t) {
4657
- if (g.isValid(Q))
4658
- return Q;
4656
+ g.from = function(C, t) {
4657
+ if (g.isValid(C))
4658
+ return C;
4659
4659
  try {
4660
- return C(Q);
4660
+ return Q(C);
4661
4661
  } catch (I) {
4662
4662
  return t;
4663
4663
  }
@@ -4667,19 +4667,19 @@ function sg() {
4667
4667
  var MC;
4668
4668
  function HE() {
4669
4669
  return MC || (MC = 1, function(g) {
4670
- const A = ug(), E = _C(), C = uB(), B = sg(), Q = $C(), t = 7973, I = A.getBCHDigit(t);
4670
+ const A = ug(), E = _C(), Q = uB(), B = sg(), C = $C(), t = 7973, I = A.getBCHDigit(t);
4671
4671
  function n(a, e, f) {
4672
4672
  for (let q = 1; q <= 40; q++)
4673
4673
  if (e <= g.getCapacity(q, f, a))
4674
4674
  return q;
4675
4675
  }
4676
- function o(a, e) {
4676
+ function D(a, e) {
4677
4677
  return B.getCharCountIndicator(a, e) + 4;
4678
4678
  }
4679
4679
  function c(a, e) {
4680
4680
  let f = 0;
4681
4681
  return a.forEach(function(q) {
4682
- const F = o(q.mode, e);
4682
+ const F = D(q.mode, e);
4683
4683
  f += F + q.getBitsLength();
4684
4684
  }), f;
4685
4685
  }
@@ -4689,14 +4689,14 @@ function HE() {
4689
4689
  return f;
4690
4690
  }
4691
4691
  g.from = function(e, f) {
4692
- return Q.isValid(e) ? parseInt(e, 10) : f;
4692
+ return C.isValid(e) ? parseInt(e, 10) : f;
4693
4693
  }, g.getCapacity = function(e, f, q) {
4694
- if (!Q.isValid(e))
4694
+ if (!C.isValid(e))
4695
4695
  throw new Error("Invalid QR Code version");
4696
4696
  typeof q == "undefined" && (q = B.BYTE);
4697
4697
  const F = A.getSymbolTotalCodewords(e), J = E.getTotalCodewordsCount(e, f), H = (F - J) * 8;
4698
4698
  if (q === B.MIXED) return H;
4699
- const P = H - o(q, e);
4699
+ const P = H - D(q, e);
4700
4700
  switch (q) {
4701
4701
  case B.NUMERIC:
4702
4702
  return Math.floor(P / 10 * 3);
@@ -4710,7 +4710,7 @@ function HE() {
4710
4710
  }
4711
4711
  }, g.getBestVersionForData = function(e, f) {
4712
4712
  let q;
4713
- const F = C.from(f, C.M);
4713
+ const F = Q.from(f, Q.M);
4714
4714
  if (Array.isArray(e)) {
4715
4715
  if (e.length > 1)
4716
4716
  return s(e, F);
@@ -4721,7 +4721,7 @@ function HE() {
4721
4721
  q = e;
4722
4722
  return n(q.mode, q.getLength(), F);
4723
4723
  }, g.getEncodedBits = function(e) {
4724
- if (!Q.isValid(e) || e < 7)
4724
+ if (!C.isValid(e) || e < 7)
4725
4725
  throw new Error("Invalid QR Code version");
4726
4726
  let f = e << 12;
4727
4727
  for (; A.getBCHDigit(f) - I >= 0; )
@@ -4734,12 +4734,12 @@ var $g = {}, TC;
4734
4734
  function dE() {
4735
4735
  if (TC) return $g;
4736
4736
  TC = 1;
4737
- const g = ug(), A = 1335, E = 21522, C = g.getBCHDigit(A);
4738
- return $g.getEncodedBits = function(Q, t) {
4739
- const I = Q.bit << 3 | t;
4737
+ const g = ug(), A = 1335, E = 21522, Q = g.getBCHDigit(A);
4738
+ return $g.getEncodedBits = function(C, t) {
4739
+ const I = C.bit << 3 | t;
4740
4740
  let n = I << 10;
4741
- for (; g.getBCHDigit(n) - C >= 0; )
4742
- n ^= A << g.getBCHDigit(n) - C;
4741
+ for (; g.getBCHDigit(n) - Q >= 0; )
4742
+ n ^= A << g.getBCHDigit(n) - Q;
4743
4743
  return (I << 10 | n) ^ E;
4744
4744
  }, $g;
4745
4745
  }
@@ -4751,18 +4751,18 @@ function xE() {
4751
4751
  function A(E) {
4752
4752
  this.mode = g.NUMERIC, this.data = E.toString();
4753
4753
  }
4754
- return A.getBitsLength = function(C) {
4755
- return 10 * Math.floor(C / 3) + (C % 3 ? C % 3 * 3 + 1 : 0);
4754
+ return A.getBitsLength = function(Q) {
4755
+ return 10 * Math.floor(Q / 3) + (Q % 3 ? Q % 3 * 3 + 1 : 0);
4756
4756
  }, A.prototype.getLength = function() {
4757
4757
  return this.data.length;
4758
4758
  }, A.prototype.getBitsLength = function() {
4759
4759
  return A.getBitsLength(this.data.length);
4760
- }, A.prototype.write = function(C) {
4761
- let B, Q, t;
4760
+ }, A.prototype.write = function(Q) {
4761
+ let B, C, t;
4762
4762
  for (B = 0; B + 3 <= this.data.length; B += 3)
4763
- Q = this.data.substr(B, 3), t = parseInt(Q, 10), C.put(t, 10);
4763
+ C = this.data.substr(B, 3), t = parseInt(C, 10), Q.put(t, 10);
4764
4764
  const I = this.data.length - B;
4765
- I > 0 && (Q = this.data.substr(B), t = parseInt(Q, 10), C.put(t, I * 3 + 1));
4765
+ I > 0 && (C = this.data.substr(B), t = parseInt(C, 10), Q.put(t, I * 3 + 1));
4766
4766
  }, gB = A, gB;
4767
4767
  }
4768
4768
  var BB, HC;
@@ -4816,8 +4816,8 @@ function kE() {
4816
4816
  "/",
4817
4817
  ":"
4818
4818
  ];
4819
- function E(C) {
4820
- this.mode = g.ALPHANUMERIC, this.data = C;
4819
+ function E(Q) {
4820
+ this.mode = g.ALPHANUMERIC, this.data = Q;
4821
4821
  }
4822
4822
  return E.getBitsLength = function(B) {
4823
4823
  return 11 * Math.floor(B / 2) + 6 * (B % 2);
@@ -4826,12 +4826,12 @@ function kE() {
4826
4826
  }, E.prototype.getBitsLength = function() {
4827
4827
  return E.getBitsLength(this.data.length);
4828
4828
  }, E.prototype.write = function(B) {
4829
- let Q;
4830
- for (Q = 0; Q + 2 <= this.data.length; Q += 2) {
4831
- let t = A.indexOf(this.data[Q]) * 45;
4832
- t += A.indexOf(this.data[Q + 1]), B.put(t, 11);
4829
+ let C;
4830
+ for (C = 0; C + 2 <= this.data.length; C += 2) {
4831
+ let t = A.indexOf(this.data[C]) * 45;
4832
+ t += A.indexOf(this.data[C + 1]), B.put(t, 11);
4833
4833
  }
4834
- this.data.length % 2 && B.put(A.indexOf(this.data[Q]), 6);
4834
+ this.data.length % 2 && B.put(A.indexOf(this.data[C]), 6);
4835
4835
  }, BB = E, BB;
4836
4836
  }
4837
4837
  var CB, dC;
@@ -4842,15 +4842,15 @@ function RE() {
4842
4842
  function A(E) {
4843
4843
  this.mode = g.BYTE, typeof E == "string" ? this.data = new TextEncoder().encode(E) : this.data = new Uint8Array(E);
4844
4844
  }
4845
- return A.getBitsLength = function(C) {
4846
- return C * 8;
4845
+ return A.getBitsLength = function(Q) {
4846
+ return Q * 8;
4847
4847
  }, A.prototype.getLength = function() {
4848
4848
  return this.data.length;
4849
4849
  }, A.prototype.getBitsLength = function() {
4850
4850
  return A.getBitsLength(this.data.length);
4851
4851
  }, A.prototype.write = function(E) {
4852
- for (let C = 0, B = this.data.length; C < B; C++)
4853
- E.put(this.data[C], 8);
4852
+ for (let Q = 0, B = this.data.length; Q < B; Q++)
4853
+ E.put(this.data[Q], 8);
4854
4854
  }, CB = A, CB;
4855
4855
  }
4856
4856
  var QB, xC;
@@ -4858,8 +4858,8 @@ function YE() {
4858
4858
  if (xC) return QB;
4859
4859
  xC = 1;
4860
4860
  const g = sg(), A = ug();
4861
- function E(C) {
4862
- this.mode = g.KANJI, this.data = C;
4861
+ function E(Q) {
4862
+ this.mode = g.KANJI, this.data = Q;
4863
4863
  }
4864
4864
  return E.getBitsLength = function(B) {
4865
4865
  return B * 13;
@@ -4867,20 +4867,20 @@ function YE() {
4867
4867
  return this.data.length;
4868
4868
  }, E.prototype.getBitsLength = function() {
4869
4869
  return E.getBitsLength(this.data.length);
4870
- }, E.prototype.write = function(C) {
4870
+ }, E.prototype.write = function(Q) {
4871
4871
  let B;
4872
4872
  for (B = 0; B < this.data.length; B++) {
4873
- let Q = A.toSJIS(this.data[B]);
4874
- if (Q >= 33088 && Q <= 40956)
4875
- Q -= 33088;
4876
- else if (Q >= 57408 && Q <= 60351)
4877
- Q -= 49472;
4873
+ let C = A.toSJIS(this.data[B]);
4874
+ if (C >= 33088 && C <= 40956)
4875
+ C -= 33088;
4876
+ else if (C >= 57408 && C <= 60351)
4877
+ C -= 49472;
4878
4878
  else
4879
4879
  throw new Error(
4880
4880
  "Invalid SJIS character: " + this.data[B] + `
4881
4881
  Make sure your charset is UTF-8`
4882
4882
  );
4883
- Q = (Q >>> 8 & 255) * 192 + (Q & 255), C.put(Q, 13);
4883
+ C = (C >>> 8 & 255) * 192 + (C & 255), Q.put(C, 13);
4884
4884
  }
4885
4885
  }, QB = E, QB;
4886
4886
  }
@@ -4888,31 +4888,31 @@ var EB = { exports: {} }, kC;
4888
4888
  function JE() {
4889
4889
  return kC || (kC = 1, function(g) {
4890
4890
  var A = {
4891
- single_source_shortest_paths: function(E, C, B) {
4892
- var Q = {}, t = {};
4893
- t[C] = 0;
4891
+ single_source_shortest_paths: function(E, Q, B) {
4892
+ var C = {}, t = {};
4893
+ t[Q] = 0;
4894
4894
  var I = A.PriorityQueue.make();
4895
- I.push(C, 0);
4896
- for (var n, o, c, s, a, e, f, q, F; !I.empty(); ) {
4897
- n = I.pop(), o = n.value, s = n.cost, a = E[o] || {};
4895
+ I.push(Q, 0);
4896
+ for (var n, D, c, s, a, e, f, q, F; !I.empty(); ) {
4897
+ n = I.pop(), D = n.value, s = n.cost, a = E[D] || {};
4898
4898
  for (c in a)
4899
- a.hasOwnProperty(c) && (e = a[c], f = s + e, q = t[c], F = typeof t[c] == "undefined", (F || q > f) && (t[c] = f, I.push(c, f), Q[c] = o));
4899
+ a.hasOwnProperty(c) && (e = a[c], f = s + e, q = t[c], F = typeof t[c] == "undefined", (F || q > f) && (t[c] = f, I.push(c, f), C[c] = D));
4900
4900
  }
4901
4901
  if (typeof B != "undefined" && typeof t[B] == "undefined") {
4902
- var J = ["Could not find a path from ", C, " to ", B, "."].join("");
4902
+ var J = ["Could not find a path from ", Q, " to ", B, "."].join("");
4903
4903
  throw new Error(J);
4904
4904
  }
4905
- return Q;
4905
+ return C;
4906
4906
  },
4907
- extract_shortest_path_from_predecessor_list: function(E, C) {
4908
- for (var B = [], Q = C; Q; )
4909
- B.push(Q), E[Q], Q = E[Q];
4907
+ extract_shortest_path_from_predecessor_list: function(E, Q) {
4908
+ for (var B = [], C = Q; C; )
4909
+ B.push(C), E[C], C = E[C];
4910
4910
  return B.reverse(), B;
4911
4911
  },
4912
- find_path: function(E, C, B) {
4913
- var Q = A.single_source_shortest_paths(E, C, B);
4912
+ find_path: function(E, Q, B) {
4913
+ var C = A.single_source_shortest_paths(E, Q, B);
4914
4914
  return A.extract_shortest_path_from_predecessor_list(
4915
- Q,
4915
+ C,
4916
4916
  B
4917
4917
  );
4918
4918
  },
@@ -4921,21 +4921,21 @@ function JE() {
4921
4921
  */
4922
4922
  PriorityQueue: {
4923
4923
  make: function(E) {
4924
- var C = A.PriorityQueue, B = {}, Q;
4924
+ var Q = A.PriorityQueue, B = {}, C;
4925
4925
  E = E || {};
4926
- for (Q in C)
4927
- C.hasOwnProperty(Q) && (B[Q] = C[Q]);
4928
- return B.queue = [], B.sorter = E.sorter || C.default_sorter, B;
4926
+ for (C in Q)
4927
+ Q.hasOwnProperty(C) && (B[C] = Q[C]);
4928
+ return B.queue = [], B.sorter = E.sorter || Q.default_sorter, B;
4929
4929
  },
4930
- default_sorter: function(E, C) {
4931
- return E.cost - C.cost;
4930
+ default_sorter: function(E, Q) {
4931
+ return E.cost - Q.cost;
4932
4932
  },
4933
4933
  /**
4934
4934
  * Add a new item to the queue and ensure the highest priority element
4935
4935
  * is at the front of the queue.
4936
4936
  */
4937
- push: function(E, C) {
4938
- var B = { value: E, cost: C };
4937
+ push: function(E, Q) {
4938
+ var B = { value: E, cost: Q };
4939
4939
  this.queue.push(B), this.queue.sort(this.sorter);
4940
4940
  },
4941
4941
  /**
@@ -4955,8 +4955,8 @@ function JE() {
4955
4955
  var RC;
4956
4956
  function XE() {
4957
4957
  return RC || (RC = 1, function(g) {
4958
- const A = sg(), E = xE(), C = kE(), B = RE(), Q = YE(), t = AQ(), I = ug(), n = JE();
4959
- function o(J) {
4958
+ const A = sg(), E = xE(), Q = kE(), B = RE(), C = YE(), t = AQ(), I = ug(), n = JE();
4959
+ function D(J) {
4960
4960
  return unescape(encodeURIComponent(J)).length;
4961
4961
  }
4962
4962
  function c(J, H, P) {
@@ -4989,9 +4989,9 @@ function XE() {
4989
4989
  case A.NUMERIC:
4990
4990
  return E.getBitsLength(J);
4991
4991
  case A.ALPHANUMERIC:
4992
- return C.getBitsLength(J);
4993
- case A.KANJI:
4994
4992
  return Q.getBitsLength(J);
4993
+ case A.KANJI:
4994
+ return C.getBitsLength(J);
4995
4995
  case A.BYTE:
4996
4996
  return B.getBitsLength(J);
4997
4997
  }
@@ -5023,12 +5023,12 @@ function XE() {
5023
5023
  case A.KANJI:
5024
5024
  H.push([
5025
5025
  m,
5026
- { data: m.data, mode: A.BYTE, length: o(m.data) }
5026
+ { data: m.data, mode: A.BYTE, length: D(m.data) }
5027
5027
  ]);
5028
5028
  break;
5029
5029
  case A.BYTE:
5030
5030
  H.push([
5031
- { data: m.data, mode: A.BYTE, length: o(m.data) }
5031
+ { data: m.data, mode: A.BYTE, length: D(m.data) }
5032
5032
  ]);
5033
5033
  }
5034
5034
  }
@@ -5063,9 +5063,9 @@ function XE() {
5063
5063
  case A.NUMERIC:
5064
5064
  return new E(J);
5065
5065
  case A.ALPHANUMERIC:
5066
- return new C(J);
5067
- case A.KANJI:
5068
5066
  return new Q(J);
5067
+ case A.KANJI:
5068
+ return new C(J);
5069
5069
  case A.BYTE:
5070
5070
  return new B(J);
5071
5071
  }
@@ -5090,9 +5090,9 @@ var YC;
5090
5090
  function FE() {
5091
5091
  if (YC) return Ng;
5092
5092
  YC = 1;
5093
- const g = ug(), A = uB(), E = mE(), C = rE(), B = PE(), Q = qE(), t = vE(), I = _C(), n = lE(), o = HE(), c = dE(), s = sg(), a = XE();
5093
+ const g = ug(), A = uB(), E = mE(), Q = rE(), B = PE(), C = qE(), t = vE(), I = _C(), n = lE(), D = HE(), c = dE(), s = sg(), a = XE();
5094
5094
  function e(v, i) {
5095
- const r = v.size, l = Q.getPositions(i);
5095
+ const r = v.size, l = C.getPositions(i);
5096
5096
  for (let R = 0; R < l.length; R++) {
5097
5097
  const X = l[R][0], d = l[R][1];
5098
5098
  for (let M = -1; M <= 7; M++)
@@ -5118,7 +5118,7 @@ function FE() {
5118
5118
  }
5119
5119
  }
5120
5120
  function F(v, i) {
5121
- const r = v.size, l = o.getEncodedBits(i);
5121
+ const r = v.size, l = D.getEncodedBits(i);
5122
5122
  let R, X, d;
5123
5123
  for (let M = 0; M < 18; M++)
5124
5124
  R = Math.floor(M / 3), X = M % 3 + r - 8 - 3, d = (l >> M & 1) === 1, v.set(R, X, d, !0), v.set(X, R, d, !0);
@@ -5187,12 +5187,12 @@ function FE() {
5187
5187
  let K = i;
5188
5188
  if (!K) {
5189
5189
  const j = a.rawSplit(v);
5190
- K = o.getBestVersionForData(j, r);
5190
+ K = D.getBestVersionForData(j, r);
5191
5191
  }
5192
5192
  R = a.fromString(v, K || 40);
5193
5193
  } else
5194
5194
  throw new Error("Invalid data");
5195
- const X = o.getBestVersionForData(R, r);
5195
+ const X = D.getBestVersionForData(R, r);
5196
5196
  if (!X)
5197
5197
  throw new Error("The amount of data is too big to be stored in a QR Code");
5198
5198
  if (!i)
@@ -5204,7 +5204,7 @@ The chosen QR Code version cannot contain this amount of data.
5204
5204
  Minimum version required to store current data is: ` + X + `.
5205
5205
  `
5206
5206
  );
5207
- const d = P(i, r, R), M = g.getSymbolSize(i), Y = new C(M);
5207
+ const d = P(i, r, R), M = g.getSymbolSize(i), Y = new Q(M);
5208
5208
  return e(Y, i), f(Y), q(Y, i), J(Y, r, 0), i >= 7 && F(Y, i), H(Y, d), isNaN(l) && (l = t.getBestMask(
5209
5209
  Y,
5210
5210
  J.bind(null, Y, r)
@@ -5220,7 +5220,7 @@ Minimum version required to store current data is: ` + X + `.
5220
5220
  if (typeof i == "undefined" || i === "")
5221
5221
  throw new Error("No input text");
5222
5222
  let l = A.M, R, X;
5223
- return typeof r != "undefined" && (l = A.from(r.errorCorrectionLevel, A.M), R = o.from(r.version), X = t.from(r.maskPattern), r.toSJISFunc && g.setToSJISFunction(r.toSJISFunc)), k(i, R, l, X);
5223
+ return typeof r != "undefined" && (l = A.from(r.errorCorrectionLevel, A.M), R = D.from(r.version), X = t.from(r.maskPattern), r.toSJISFunc && g.setToSJISFunction(r.toSJISFunc)), k(i, R, l, X);
5224
5224
  }, Ng;
5225
5225
  }
5226
5226
  var IB = {}, nB = {}, JC;
@@ -5229,50 +5229,50 @@ function gQ() {
5229
5229
  function A(E) {
5230
5230
  if (typeof E == "number" && (E = E.toString()), typeof E != "string")
5231
5231
  throw new Error("Color should be defined as hex string");
5232
- let C = E.slice().replace("#", "").split("");
5233
- if (C.length < 3 || C.length === 5 || C.length > 8)
5232
+ let Q = E.slice().replace("#", "").split("");
5233
+ if (Q.length < 3 || Q.length === 5 || Q.length > 8)
5234
5234
  throw new Error("Invalid hex color: " + E);
5235
- (C.length === 3 || C.length === 4) && (C = Array.prototype.concat.apply([], C.map(function(Q) {
5236
- return [Q, Q];
5237
- }))), C.length === 6 && C.push("F", "F");
5238
- const B = parseInt(C.join(""), 16);
5235
+ (Q.length === 3 || Q.length === 4) && (Q = Array.prototype.concat.apply([], Q.map(function(C) {
5236
+ return [C, C];
5237
+ }))), Q.length === 6 && Q.push("F", "F");
5238
+ const B = parseInt(Q.join(""), 16);
5239
5239
  return {
5240
5240
  r: B >> 24 & 255,
5241
5241
  g: B >> 16 & 255,
5242
5242
  b: B >> 8 & 255,
5243
5243
  a: B & 255,
5244
- hex: "#" + C.slice(0, 6).join("")
5244
+ hex: "#" + Q.slice(0, 6).join("")
5245
5245
  };
5246
5246
  }
5247
- g.getOptions = function(C) {
5248
- C || (C = {}), C.color || (C.color = {});
5249
- 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;
5247
+ g.getOptions = function(Q) {
5248
+ Q || (Q = {}), Q.color || (Q.color = {});
5249
+ const B = typeof Q.margin == "undefined" || Q.margin === null || Q.margin < 0 ? 4 : Q.margin, C = Q.width && Q.width >= 21 ? Q.width : void 0, t = Q.scale || 4;
5250
5250
  return {
5251
- width: Q,
5252
- scale: Q ? 4 : t,
5251
+ width: C,
5252
+ scale: C ? 4 : t,
5253
5253
  margin: B,
5254
5254
  color: {
5255
- dark: A(C.color.dark || "#000000ff"),
5256
- light: A(C.color.light || "#ffffffff")
5255
+ dark: A(Q.color.dark || "#000000ff"),
5256
+ light: A(Q.color.light || "#ffffffff")
5257
5257
  },
5258
- type: C.type,
5259
- rendererOpts: C.rendererOpts || {}
5258
+ type: Q.type,
5259
+ rendererOpts: Q.rendererOpts || {}
5260
5260
  };
5261
- }, g.getScale = function(C, B) {
5262
- return B.width && B.width >= C + B.margin * 2 ? B.width / (C + B.margin * 2) : B.scale;
5263
- }, g.getImageWidth = function(C, B) {
5264
- const Q = g.getScale(C, B);
5265
- return Math.floor((C + B.margin * 2) * Q);
5266
- }, g.qrToImageData = function(C, B, Q) {
5267
- const t = B.modules.size, I = B.modules.data, n = g.getScale(t, Q), o = Math.floor((t + Q.margin * 2) * n), c = Q.margin * n, s = [Q.color.light, Q.color.dark];
5268
- for (let a = 0; a < o; a++)
5269
- for (let e = 0; e < o; e++) {
5270
- let f = (a * o + e) * 4, q = Q.color.light;
5271
- if (a >= c && e >= c && a < o - c && e < o - c) {
5261
+ }, g.getScale = function(Q, B) {
5262
+ return B.width && B.width >= Q + B.margin * 2 ? B.width / (Q + B.margin * 2) : B.scale;
5263
+ }, g.getImageWidth = function(Q, B) {
5264
+ const C = g.getScale(Q, B);
5265
+ return Math.floor((Q + B.margin * 2) * C);
5266
+ }, g.qrToImageData = function(Q, B, C) {
5267
+ const t = B.modules.size, I = B.modules.data, n = g.getScale(t, C), D = Math.floor((t + C.margin * 2) * n), c = C.margin * n, s = [C.color.light, C.color.dark];
5268
+ for (let a = 0; a < D; a++)
5269
+ for (let e = 0; e < D; e++) {
5270
+ let f = (a * D + e) * 4, q = C.color.light;
5271
+ if (a >= c && e >= c && a < D - c && e < D - c) {
5272
5272
  const F = Math.floor((a - c) / n), J = Math.floor((e - c) / n);
5273
5273
  q = s[I[F * t + J] ? 1 : 0];
5274
5274
  }
5275
- C[f++] = q.r, C[f++] = q.g, C[f++] = q.b, C[f] = q.a;
5275
+ Q[f++] = q.r, Q[f++] = q.g, Q[f++] = q.b, Q[f] = q.a;
5276
5276
  }
5277
5277
  };
5278
5278
  }(nB)), nB;
@@ -5281,26 +5281,26 @@ var XC;
5281
5281
  function GE() {
5282
5282
  return XC || (XC = 1, function(g) {
5283
5283
  const A = gQ();
5284
- function E(B, Q, t) {
5285
- 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";
5284
+ function E(B, C, t) {
5285
+ B.clearRect(0, 0, C.width, C.height), C.style || (C.style = {}), C.height = t, C.width = t, C.style.height = t + "px", C.style.width = t + "px";
5286
5286
  }
5287
- function C() {
5287
+ function Q() {
5288
5288
  try {
5289
5289
  return document.createElement("canvas");
5290
5290
  } catch (B) {
5291
5291
  throw new Error("You need to specify a canvas element");
5292
5292
  }
5293
5293
  }
5294
- g.render = function(Q, t, I) {
5295
- let n = I, o = t;
5296
- typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), t || (o = C()), n = A.getOptions(n);
5297
- const c = A.getImageWidth(Q.modules.size, n), s = o.getContext("2d"), a = s.createImageData(c, c);
5298
- return A.qrToImageData(a.data, Q, n), E(s, o, c), s.putImageData(a, 0, 0), o;
5299
- }, g.renderToDataURL = function(Q, t, I) {
5294
+ g.render = function(C, t, I) {
5295
+ let n = I, D = t;
5296
+ typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), t || (D = Q()), n = A.getOptions(n);
5297
+ const c = A.getImageWidth(C.modules.size, n), s = D.getContext("2d"), a = s.createImageData(c, c);
5298
+ return A.qrToImageData(a.data, C, n), E(s, D, c), s.putImageData(a, 0, 0), D;
5299
+ }, g.renderToDataURL = function(C, t, I) {
5300
5300
  let n = I;
5301
5301
  typeof n == "undefined" && (!t || !t.getContext) && (n = t, t = void 0), n || (n = {});
5302
- const o = g.render(Q, t, n), c = n.type || "image/png", s = n.rendererOpts || {};
5303
- return o.toDataURL(c, s.quality);
5302
+ const D = g.render(C, t, n), c = n.type || "image/png", s = n.rendererOpts || {};
5303
+ return D.toDataURL(c, s.quality);
5304
5304
  };
5305
5305
  }(IB)), IB;
5306
5306
  }
@@ -5309,24 +5309,24 @@ function OE() {
5309
5309
  if (FC) return tB;
5310
5310
  FC = 1;
5311
5311
  const g = gQ();
5312
- function A(B, Q) {
5313
- const t = B.a / 255, I = Q + '="' + B.hex + '"';
5314
- return t < 1 ? I + " " + Q + '-opacity="' + t.toFixed(2).slice(1) + '"' : I;
5312
+ function A(B, C) {
5313
+ const t = B.a / 255, I = C + '="' + B.hex + '"';
5314
+ return t < 1 ? I + " " + C + '-opacity="' + t.toFixed(2).slice(1) + '"' : I;
5315
5315
  }
5316
- function E(B, Q, t) {
5317
- let I = B + Q;
5316
+ function E(B, C, t) {
5317
+ let I = B + C;
5318
5318
  return typeof t != "undefined" && (I += " " + t), I;
5319
5319
  }
5320
- function C(B, Q, t) {
5321
- let I = "", n = 0, o = !1, c = 0;
5320
+ function Q(B, C, t) {
5321
+ let I = "", n = 0, D = !1, c = 0;
5322
5322
  for (let s = 0; s < B.length; s++) {
5323
- const a = Math.floor(s % Q), e = Math.floor(s / Q);
5324
- !a && !o && (o = !0), B[s] ? (c++, s > 0 && a > 0 && B[s - 1] || (I += o ? E("M", a + t, 0.5 + e + t) : E("m", n, 0), n = 0, o = !1), a + 1 < Q && B[s + 1] || (I += E("h", c), c = 0)) : n++;
5323
+ const a = Math.floor(s % C), e = Math.floor(s / C);
5324
+ !a && !D && (D = !0), B[s] ? (c++, s > 0 && a > 0 && B[s - 1] || (I += D ? E("M", a + t, 0.5 + e + t) : E("m", n, 0), n = 0, D = !1), a + 1 < C && B[s + 1] || (I += E("h", c), c = 0)) : n++;
5325
5325
  }
5326
5326
  return I;
5327
5327
  }
5328
- return tB.render = function(Q, t, I) {
5329
- const n = g.getOptions(t), o = Q.modules.size, c = Q.modules.data, s = o + n.margin * 2, a = n.color.light.a ? "<path " + A(n.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", e = "<path " + A(n.color.dark, "stroke") + ' d="' + C(c, o, n.margin) + '"/>', f = 'viewBox="0 0 ' + s + " " + s + '"', F = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + a + e + `</svg>
5328
+ return tB.render = function(C, t, I) {
5329
+ const n = g.getOptions(t), D = C.modules.size, c = C.modules.data, s = D + n.margin * 2, a = n.color.light.a ? "<path " + A(n.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", e = "<path " + A(n.color.dark, "stroke") + ' d="' + Q(c, D, n.margin) + '"/>', f = 'viewBox="0 0 ' + s + " " + s + '"', F = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + a + e + `</svg>
5330
5330
  `;
5331
5331
  return typeof I == "function" && I(null, F), F;
5332
5332
  }, tB;
@@ -5335,22 +5335,22 @@ var GC;
5335
5335
  function LE() {
5336
5336
  if (GC) return mg;
5337
5337
  GC = 1;
5338
- const g = fE(), A = FE(), E = GE(), C = OE();
5339
- function B(Q, t, I, n, o) {
5338
+ const g = fE(), A = FE(), E = GE(), Q = OE();
5339
+ function B(C, t, I, n, D) {
5340
5340
  const c = [].slice.call(arguments, 1), s = c.length, a = typeof c[s - 1] == "function";
5341
5341
  if (!a && !g())
5342
5342
  throw new Error("Callback required as last argument");
5343
5343
  if (a) {
5344
5344
  if (s < 2)
5345
5345
  throw new Error("Too few arguments provided");
5346
- s === 2 ? (o = I, I = t, t = n = void 0) : s === 3 && (t.getContext && typeof o == "undefined" ? (o = n, n = void 0) : (o = n, n = I, I = t, t = void 0));
5346
+ s === 2 ? (D = I, I = t, t = n = void 0) : s === 3 && (t.getContext && typeof D == "undefined" ? (D = n, n = void 0) : (D = n, n = I, I = t, t = void 0));
5347
5347
  } else {
5348
5348
  if (s < 1)
5349
5349
  throw new Error("Too few arguments provided");
5350
5350
  return s === 1 ? (I = t, t = n = void 0) : s === 2 && !t.getContext && (n = I, I = t, t = void 0), new Promise(function(e, f) {
5351
5351
  try {
5352
5352
  const q = A.create(I, n);
5353
- e(Q(q, t, n));
5353
+ e(C(q, t, n));
5354
5354
  } catch (q) {
5355
5355
  f(q);
5356
5356
  }
@@ -5358,13 +5358,13 @@ function LE() {
5358
5358
  }
5359
5359
  try {
5360
5360
  const e = A.create(I, n);
5361
- o(null, Q(e, t, n));
5361
+ D(null, C(e, t, n));
5362
5362
  } catch (e) {
5363
- o(e);
5363
+ D(e);
5364
5364
  }
5365
5365
  }
5366
- return mg.create = A.create, mg.toCanvas = B.bind(null, E.render), mg.toDataURL = B.bind(null, E.renderToDataURL), mg.toString = B.bind(null, function(Q, t, I) {
5367
- return C.render(Q, I);
5366
+ return mg.create = A.create, mg.toCanvas = B.bind(null, E.render), mg.toDataURL = B.bind(null, E.renderToDataURL), mg.toString = B.bind(null, function(C, t, I) {
5367
+ return Q.render(C, I);
5368
5368
  }), mg;
5369
5369
  }
5370
5370
  var zE = LE();
@@ -5373,13 +5373,13 @@ function bE({
5373
5373
  selectedProvider: g = null,
5374
5374
  selectedInvoiceOtp: A = null,
5375
5375
  selectedSignatureOtp: E = null,
5376
- token: C = "",
5376
+ token: Q = "",
5377
5377
  orderId: B = "",
5378
- totalAmountText: Q = "",
5378
+ totalAmountText: C = "",
5379
5379
  qrData: t,
5380
5380
  qrSrc: I,
5381
5381
  selectedPromotions: n,
5382
- onResetToStep1: o
5382
+ onResetToStep1: D
5383
5383
  } = {}) {
5384
5384
  const c = document.createElement("div");
5385
5385
  c.className = [
@@ -5401,7 +5401,7 @@ function bE({
5401
5401
  const T = Math.floor(u / 60), L = u % 60;
5402
5402
  return `${T.toString().padStart(2, "0")}:${L.toString().padStart(2, "0")}`;
5403
5403
  }, F = () => {
5404
- f.innerHTML = `${D(
5404
+ f.innerHTML = `${o(
5405
5405
  "completePaymentIn"
5406
5406
  )} <span class="font-bold">${q(s)}</span>`;
5407
5407
  };
@@ -5437,29 +5437,29 @@ function bE({
5437
5437
  const m = document.createElement("div");
5438
5438
  m.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
5439
5439
  const k = document.createElement("h2");
5440
- k.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", k.innerText = D("orderInfo"), m.appendChild(k);
5440
+ k.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", k.innerText = o("orderInfo"), m.appendChild(k);
5441
5441
  const v = document.createElement("div");
5442
5442
  v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
5443
5443
  const i = document.createElement("h4");
5444
- i.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", i.innerText = D("provider");
5444
+ i.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", i.innerText = o("provider");
5445
5445
  const r = document.createElement("img");
5446
5446
  g && g.logoUrl && (r.src = g.logoUrl, r.alt = g.name, r.className = "wgt:h-6 wgt:object-contain"), v.appendChild(i), v.appendChild(r), m.appendChild(v);
5447
5447
  const l = document.createElement("div");
5448
5448
  l.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
5449
5449
  const R = document.createElement("h4");
5450
- R.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", R.innerText = D("subscriptionPackage");
5450
+ R.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", R.innerText = o("subscriptionPackage");
5451
5451
  const X = document.createElement("span");
5452
5452
  X.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", X.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", l.appendChild(R), l.appendChild(X), m.appendChild(l);
5453
5453
  const d = document.createElement("div");
5454
5454
  d.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
5455
5455
  const M = document.createElement("h4");
5456
- M.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", M.innerText = D("digitalSignaturePackage");
5456
+ M.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", M.innerText = o("digitalSignaturePackage");
5457
5457
  const Y = document.createElement("span");
5458
5458
  if (Y.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", Y.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", d.appendChild(M), d.appendChild(Y), m.appendChild(d), n && n.length > 0) {
5459
5459
  const u = document.createElement("div");
5460
5460
  u.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
5461
5461
  const T = document.createElement("h4");
5462
- T.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", T.innerText = D("promotion");
5462
+ T.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", T.innerText = o("promotion");
5463
5463
  const L = document.createElement("div");
5464
5464
  L.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", n.forEach((z) => {
5465
5465
  const N = document.createElement("div");
@@ -5471,19 +5471,19 @@ function bE({
5471
5471
  const j = document.createElement("div");
5472
5472
  j.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
5473
5473
  const y = document.createElement("h4");
5474
- y.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", y.innerText = D("paymentAmount");
5474
+ y.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", y.innerText = o("paymentAmount");
5475
5475
  const h = document.createElement("span");
5476
- h.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", h.innerText = Q.toLocaleString("vi-VN") + " VND", j.appendChild(y), j.appendChild(h), m.appendChild(j), P.appendChild(m);
5476
+ h.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", h.innerText = C.toLocaleString("vi-VN") + " VND", j.appendChild(y), j.appendChild(h), m.appendChild(j), P.appendChild(m);
5477
5477
  const w = Ig({
5478
- title: D("cancelTransaction"),
5478
+ title: o("cancelTransaction"),
5479
5479
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
5480
5480
  handleClick: () => {
5481
5481
  a && _A(a);
5482
5482
  const { container: u, open: T } = aB({
5483
- message: D("transactionCanceled"),
5484
- okLabel: D("ok"),
5483
+ message: o("transactionCanceled"),
5484
+ okLabel: o("ok"),
5485
5485
  onClose: () => p(null, null, function* () {
5486
- s = 3600, _A(a), yield hC(B), typeof o == "function" && (yield o());
5486
+ s = 3600, _A(a), yield hC(B), typeof D == "function" && (yield D());
5487
5487
  }),
5488
5488
  preventClose: !0
5489
5489
  });
@@ -5504,7 +5504,7 @@ function bE({
5504
5504
  E = u, Y.innerText = u ? String(E == null ? void 0 : E.name.split("-")[1]) : "";
5505
5505
  },
5506
5506
  setTotalAmountText(u) {
5507
- Q = u, h.innerText = u;
5507
+ C = u, h.innerText = u;
5508
5508
  },
5509
5509
  resetCountdown() {
5510
5510
  s = 3600, F(), J();
@@ -5517,12 +5517,12 @@ function yE(I) {
5517
5517
  onNext: g,
5518
5518
  onPrev: A,
5519
5519
  step: E,
5520
- checkoutProps: C,
5520
+ checkoutProps: Q,
5521
5521
  orderInfoProps: B,
5522
- setOrderId: Q,
5522
+ setOrderId: C,
5523
5523
  theme: t = "ocb"
5524
5524
  }) {
5525
- let n = null, o = "", c = null, s = (B == null ? void 0 : B.orderId) || null, a = !1, e = 0;
5525
+ let n = null, D = "", c = null, s = (B == null ? void 0 : B.orderId) || null, a = !1, e = 0;
5526
5526
  const f = document.createElement("div");
5527
5527
  f.className = "wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";
5528
5528
  const {
@@ -5535,12 +5535,12 @@ function yE(I) {
5535
5535
  H.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:max-lg:flex-col-reverse";
5536
5536
  const P = document.createElement("div");
5537
5537
  P.className = "wgt:flex-1 wgt:max-lg:w-full";
5538
- const m = D("paymentInstructions"), k = Array.isArray(m) ? m : [m], { container: v, update: i } = sE(bA(RA({
5538
+ const m = o("paymentInstructions"), k = Array.isArray(m) ? m : [m], { container: v, update: i } = sE(bA(RA({
5539
5539
  qrSrc: "",
5540
5540
  accountName: "",
5541
5541
  accountNumber: "",
5542
5542
  bankName: ""
5543
- }, C), {
5543
+ }, Q), {
5544
5544
  instructions: k,
5545
5545
  theme: t
5546
5546
  }));
@@ -5558,7 +5558,7 @@ function yE(I) {
5558
5558
  R.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
5559
5559
  const X = Ig({
5560
5560
  type: "button",
5561
- title: D("back"),
5561
+ title: o("back"),
5562
5562
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
5563
5563
  handleClick: () => {
5564
5564
  A && (A(), _A(c));
@@ -5566,7 +5566,7 @@ function yE(I) {
5566
5566
  });
5567
5567
  R.appendChild(X), f.appendChild(R);
5568
5568
  function d() {
5569
- n = null, o = "", s = null, a = !1, e = 0, B != null && B.onResetToStep1 && B.onResetToStep1();
5569
+ n = null, D = "", s = null, a = !1, e = 0, B != null && B.onResetToStep1 && B.onResetToStep1();
5570
5570
  }
5571
5571
  function M() {
5572
5572
  return p(this, null, function* () {
@@ -5585,9 +5585,9 @@ function yE(I) {
5585
5585
  packages: h.packages,
5586
5586
  promotionCodes: h.promotionCodes
5587
5587
  })).orderId;
5588
- z !== s && (s = z, Q(z), yield Y(z), l());
5588
+ z !== s && (s = z, C(z), yield Y(z), l());
5589
5589
  } catch (L) {
5590
- console.error("Error creating order:", L), Qg(D("errorCreatingOrder") || "Failed to create order");
5590
+ console.error("Error creating order:", L), Qg(o("errorCreatingOrder") || "Failed to create order");
5591
5591
  return;
5592
5592
  } finally {
5593
5593
  J();
@@ -5608,7 +5608,7 @@ function yE(I) {
5608
5608
  orderId: h != null ? h : B == null ? void 0 : B.orderId,
5609
5609
  amount: B == null ? void 0 : B.totalAmountText,
5610
5610
  baseURL: qQ(t)
5611
- }), o = yield NE.toDataURL(n.qr_string, {
5611
+ }), D = yield NE.toDataURL(n.qr_string, {
5612
5612
  errorCorrectionLevel: "H",
5613
5613
  margin: 1,
5614
5614
  width: 200,
@@ -5619,7 +5619,7 @@ function yE(I) {
5619
5619
  // Background color
5620
5620
  }
5621
5621
  }), i && i({
5622
- qrSrc: o,
5622
+ qrSrc: D,
5623
5623
  accountName: (n == null ? void 0 : n.merchant_name) || "",
5624
5624
  accountNumber: (n == null ? void 0 : n.va_account_no) || "",
5625
5625
  bankName: (n == null ? void 0 : n.bank_code) || ""
@@ -5627,8 +5627,8 @@ function yE(I) {
5627
5627
  } catch (z) {
5628
5628
  if (((u = (w = z.response) == null ? void 0 : w.data) == null ? void 0 : u.error_code) === "BILL_ID_EXISTED") {
5629
5629
  if (console.log("Bill ID existed, recalling createOrder..."), a = !1, e++, e >= jE) {
5630
- Qg(D("errorQRGeneration"), {
5631
- okLabel: D("ok"),
5630
+ Qg(o("errorQRGeneration"), {
5631
+ okLabel: o("ok"),
5632
5632
  onClose: () => {
5633
5633
  A();
5634
5634
  }
@@ -5638,8 +5638,8 @@ function yE(I) {
5638
5638
  yield M();
5639
5639
  return;
5640
5640
  } else if (((L = (T = z.response) == null ? void 0 : T.data) == null ? void 0 : L.error_code) === "AUTHEN_FAIL") {
5641
- Qg(D("errorQRGeneration"), {
5642
- okLabel: D("ok"),
5641
+ Qg(o("errorQRGeneration"), {
5642
+ okLabel: o("ok"),
5643
5643
  onClose: () => {
5644
5644
  d();
5645
5645
  }
@@ -5647,12 +5647,12 @@ function yE(I) {
5647
5647
  return;
5648
5648
  } else
5649
5649
  Qg(
5650
- D(
5650
+ o(
5651
5651
  "errorQRGeneration",
5652
5652
  "Không thể tạo mã QR thanh toán. Vui lòng thử lại."
5653
5653
  ),
5654
5654
  {
5655
- okLabel: D("ok"),
5655
+ okLabel: o("ok"),
5656
5656
  onClose: () => {
5657
5657
  A();
5658
5658
  }
@@ -5675,7 +5675,7 @@ function yE(I) {
5675
5675
  const u = yield IE(s);
5676
5676
  if (u.paymentStatus === "pending")
5677
5677
  return;
5678
- const T = u.paymentStatus === "paid" ? D("paymentSuccess") : D("paymentFailed");
5678
+ const T = u.paymentStatus === "paid" ? o("paymentSuccess") : o("paymentFailed");
5679
5679
  _A(c);
5680
5680
  const L = aB({
5681
5681
  message: T,
@@ -5688,23 +5688,23 @@ function yE(I) {
5688
5688
  });
5689
5689
  f.appendChild(L.container), L.open();
5690
5690
  } catch (u) {
5691
- K ? Qg(D("errorNetwork"), {
5692
- okLabel: D("tryAgain"),
5691
+ K ? Qg(o("errorNetwork"), {
5692
+ okLabel: o("tryAgain"),
5693
5693
  onClose: function() {
5694
5694
  return p(this, null, function* () {
5695
5695
  yield M();
5696
5696
  });
5697
5697
  },
5698
5698
  isOffline: K
5699
- }) : ((h = u.response) == null ? void 0 : h.status) === 404 ? Qg(D("errorOrderNotFound"), {
5700
- okLabel: D("tryAgain"),
5699
+ }) : ((h = u.response) == null ? void 0 : h.status) === 404 ? Qg(o("errorOrderNotFound"), {
5700
+ okLabel: o("tryAgain"),
5701
5701
  onClose: function() {
5702
5702
  return p(this, null, function* () {
5703
5703
  yield M();
5704
5704
  });
5705
5705
  }
5706
- }) : ((w = u.response) == null ? void 0 : w.status) === 410 ? Qg(D("paymentTimeoutMessage"), {
5707
- okLabel: D("tryAgain"),
5706
+ }) : ((w = u.response) == null ? void 0 : w.status) === 410 ? Qg(o("paymentTimeoutMessage"), {
5707
+ okLabel: o("tryAgain"),
5708
5708
  onClose: function() {
5709
5709
  return p(this, null, function* () {
5710
5710
  yield M();
@@ -5723,9 +5723,9 @@ function KE({
5723
5723
  orderId: g,
5724
5724
  onPrev: A,
5725
5725
  onReturnHome: E,
5726
- theme: C,
5726
+ theme: Q,
5727
5727
  settingUrl: B,
5728
- provider: Q
5728
+ provider: C
5729
5729
  }) {
5730
5730
  if (g) {
5731
5731
  const u = new URL(window.location);
@@ -5736,13 +5736,13 @@ function KE({
5736
5736
  const I = document.createElement("div");
5737
5737
  I.className = "wgt:w-full wgt:max-w-3xl wgt:space-y-4 wgt:rounded-xl wgt:bg-white", t.appendChild(I);
5738
5738
  const n = document.createElement("h3");
5739
- n.className = "wgt:text-sm wgt:font-semibold wgt:text-text-black", n.innerText = D("confirmationTitle"), I.appendChild(n);
5740
- const o = document.createElement("div");
5741
- o.className = "wgt:flex wgt:items-center wgt:gap-4", I.appendChild(o);
5739
+ n.className = "wgt:text-sm wgt:font-semibold wgt:text-text-black", n.innerText = o("confirmationTitle"), I.appendChild(n);
5740
+ const D = document.createElement("div");
5741
+ D.className = "wgt:flex wgt:items-center wgt:gap-4", I.appendChild(D);
5742
5742
  const c = document.createElement("div");
5743
- c.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", c.innerText = "1", o.appendChild(c);
5743
+ c.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", c.innerText = "1", D.appendChild(c);
5744
5744
  const s = document.createElement("p");
5745
- s.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", s.innerText = D("notice1"), o.appendChild(s);
5745
+ s.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", s.innerText = o("notice1"), D.appendChild(s);
5746
5746
  const a = document.createElement("div");
5747
5747
  a.className = "wgt:flex wgt:items-start wgt:gap-4", I.appendChild(a);
5748
5748
  const e = document.createElement("div");
@@ -5750,7 +5750,7 @@ function KE({
5750
5750
  const f = document.createElement("div");
5751
5751
  f.className = "wgt:flex wgt:flex-col wgt:gap-2", a.appendChild(f);
5752
5752
  const q = document.createElement("p");
5753
- q.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", q.innerText = D("notice2"), f.appendChild(q);
5753
+ q.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", q.innerText = o("notice2"), f.appendChild(q);
5754
5754
  const F = document.createElement("div");
5755
5755
  F.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", f.appendChild(F);
5756
5756
  const J = document.createElement("div");
@@ -5775,8 +5775,8 @@ function KE({
5775
5775
  />
5776
5776
  </svg>
5777
5777
  `, J.appendChild(H);
5778
- const P = oQ(eB(), C, Q), m = document.createElement("span");
5779
- m.innerHTML = `${D("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${D("hotlineDesc")} `, J.appendChild(m);
5778
+ const P = oQ(eB(), Q, C), m = document.createElement("span");
5779
+ m.innerHTML = `${o("hotlineDomestic")} <b>${(P == null ? void 0 : P.hotline) || ""}</b> ${o("hotlineDesc")} `, J.appendChild(m);
5780
5780
  const k = document.createElement("div");
5781
5781
  k.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", F.appendChild(k);
5782
5782
  const v = document.createElement("div");
@@ -5798,7 +5798,7 @@ function KE({
5798
5798
  </svg>
5799
5799
  `, k.appendChild(v);
5800
5800
  const i = document.createElement("span");
5801
- i.innerHTML = `${D("email")}: <b>${(P == null ? void 0 : P.email) || ""}</b>`, k.appendChild(i);
5801
+ i.innerHTML = `${o("email")}: <b>${(P == null ? void 0 : P.email) || ""}</b>`, k.appendChild(i);
5802
5802
  const r = document.createElement("div");
5803
5803
  r.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", F.appendChild(r);
5804
5804
  const l = document.createElement("div");
@@ -5813,7 +5813,7 @@ function KE({
5813
5813
  </clipPath>
5814
5814
  </defs>
5815
5815
  </svg>
5816
- `, r.appendChild(l), r.appendChild(document.createTextNode(D("website") + ": "));
5816
+ `, r.appendChild(l), r.appendChild(document.createTextNode(o("website") + ": "));
5817
5817
  const R = document.createElement("a");
5818
5818
  R.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", R.innerHTML = `<b>${(P == null ? void 0 : P.link) || ""}</b>`, R.href = (P == null ? void 0 : P.link) || "#", R.target = "_blank", r.appendChild(R);
5819
5819
  const X = document.createElement("div");
@@ -5821,25 +5821,25 @@ function KE({
5821
5821
  const d = document.createElement("div");
5822
5822
  d.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", d.innerText = "3", X.appendChild(d);
5823
5823
  const M = document.createElement("p");
5824
- M.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", M.appendChild(document.createTextNode(D("notice3.1") + " "));
5824
+ M.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", M.appendChild(document.createTextNode(o("notice3.1") + " "));
5825
5825
  const Y = document.createElement("a");
5826
- Y.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", Y.textContent = D("settings") + " ", Y.href = B, Y.target = "_blank", M.appendChild(Y), M.appendChild(document.createTextNode(D("notice3.2") + " ")), X.appendChild(M);
5826
+ Y.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", Y.textContent = o("settings") + " ", Y.href = B, Y.target = "_blank", M.appendChild(Y), M.appendChild(document.createTextNode(o("notice3.2") + " ")), X.appendChild(M);
5827
5827
  const K = document.createElement("div");
5828
5828
  K.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(K);
5829
5829
  const j = document.createElement("div");
5830
5830
  j.className = "wgt:w-5 wgt:h-5 wgt:flex wgt:items-center wgt:justify-center", j.innerHTML = `
5831
5831
  <svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5832
- <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"}"
5832
+ <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="${Q === "ocb" ? "#008c44" : "#1e2a7b"}"
5833
5833
  </svg>
5834
5834
 
5835
5835
  `;
5836
5836
  const y = document.createElement("label");
5837
- y.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", y.appendChild(document.createTextNode(D("informationSent"))), K.appendChild(j), K.appendChild(y);
5837
+ y.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", y.appendChild(document.createTextNode(o("informationSent"))), K.appendChild(j), K.appendChild(y);
5838
5838
  const h = document.createElement("div");
5839
5839
  h.className = "wgt:w-full wgt:flex wgt:justify-center", I.appendChild(h);
5840
5840
  const w = Ig({
5841
5841
  type: "button",
5842
- title: D("completeRegistration"),
5842
+ title: o("completeRegistration"),
5843
5843
  className: "wgt:text-white",
5844
5844
  handleClick: typeof E == "function" && E
5845
5845
  });
@@ -5903,16 +5903,16 @@ function _E() {
5903
5903
  const E = document.createElement("div");
5904
5904
  return E.className = "wgt:flex-1 wgt:min-h-0", A.appendChild(E), g.appendChild(A), {
5905
5905
  container: g,
5906
- setContent(C) {
5907
- E.replaceChildren(C);
5906
+ setContent(Q) {
5907
+ E.replaceChildren(Q);
5908
5908
  }
5909
5909
  };
5910
5910
  }
5911
- function $E(g, A) {
5912
- const E = document.getElementById("signature-popup-backdrop");
5913
- if (E) return E;
5914
- const C = document.createElement("style");
5915
- C.textContent = `
5911
+ function $E(g, A, E) {
5912
+ const Q = document.getElementById("signature-popup-backdrop");
5913
+ if (Q) return Q;
5914
+ const B = document.createElement("style");
5915
+ B.textContent = `
5916
5916
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
5917
5917
  @keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
5918
5918
  @keyframes scale-up { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@@ -5926,11 +5926,11 @@ function $E(g, A) {
5926
5926
  .bg-blur { backdrop-filter: blur(4px); }
5927
5927
  .no-scroll { overflow: hidden; }
5928
5928
  .block-interaction { pointer-events: none; }
5929
- `, document.head.appendChild(C);
5930
- const B = document.createElement("div");
5931
- B.id = "signature-popup-backdrop", B.className = ["bg-blur", "animate-fade-in"].join(" "), B.style.position = "fixed", B.style.top = "0", B.style.left = "0", B.style.right = "0", B.style.bottom = "0", B.style.display = "flex", B.style.alignItems = "center", B.style.justifyContent = "center", B.style.zIndex = "9998", B.style.backgroundColor = "#00000070";
5932
- const Q = document.createElement("div");
5933
- return Q.className = ["animate-scale-up"].join(" "), Q.style.backgroundColor = "#ffffff", Q.style.borderRadius = "16px", Q.style.boxShadow = "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", Q.style.maxWidth = "28rem", Q.style.width = "92.28%", Q.style.marginLeft = "1rem", Q.style.marginRight = "1rem", Q.innerHTML = `
5929
+ `, document.head.appendChild(B);
5930
+ const C = document.createElement("div");
5931
+ C.id = "signature-popup-backdrop", C.className = ["bg-blur", "animate-fade-in"].join(" "), C.style.position = "fixed", C.style.top = "0", C.style.left = "0", C.style.right = "0", C.style.bottom = "0", C.style.display = "flex", C.style.alignItems = "center", C.style.justifyContent = "center", C.style.zIndex = "9998", C.style.backgroundColor = "#00000070";
5932
+ const t = document.createElement("div");
5933
+ return t.className = ["animate-scale-up"].join(" "), t.style.backgroundColor = "#ffffff", t.style.borderRadius = "16px", t.style.boxShadow = "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", t.style.maxWidth = "28rem", t.style.width = "92.28%", t.style.marginLeft = "1rem", t.style.marginRight = "1rem", t.innerHTML = `
5934
5934
  <div style="padding: 1.5rem; text-align: center;">
5935
5935
  <h3 style="font-size: 1.125rem; font-weight: 600; color: #1f2937; margin-bottom: 1rem;">
5936
5936
  Thông báo lưu ý
@@ -5951,68 +5951,84 @@ function $E(g, A) {
5951
5951
  OK
5952
5952
  </button>
5953
5953
  </div>
5954
- `, B.appendChild(Q), document.body.appendChild(B), document.body.classList.add("no-scroll"), g && g.classList.add("block-interaction"), Q.querySelector("#popup-ok-btn").addEventListener("click", () => {
5955
- B.classList.remove("animate-fade-in"), Q.classList.remove("animate-scale-up"), B.classList.add("animate-fade-out"), Q.classList.add("animate-scale-down"), setTimeout(() => {
5956
- B.remove(), C.remove(), document.body.classList.remove("no-scroll"), g && g.classList.remove("block-interaction"), A && (window.location.href = A);
5954
+ `, C.appendChild(t), document.body.appendChild(C), document.body.classList.add("no-scroll"), g && g.classList.add("block-interaction"), t.querySelector("#popup-ok-btn").addEventListener("click", () => {
5955
+ C.classList.remove("animate-fade-in"), t.classList.remove("animate-scale-up"), C.classList.add("animate-fade-out"), t.classList.add("animate-scale-down"), setTimeout(() => {
5956
+ C.remove(), B.remove(), document.body.classList.remove("no-scroll"), g && g.classList.remove("block-interaction"), typeof E == "function" ? E() : (console.log("Signature completed", A), A && (window.location.href = A));
5957
5957
  }, 300);
5958
- }), B;
5958
+ }), C;
5959
5959
  }
5960
- function OC(g, A, E, C) {
5960
+ function OC(g, A, E, Q, B) {
5961
5961
  return p(this, null, function* () {
5962
5962
  try {
5963
- (yield uQ({ orderId: g })) === !0 && ($E(E, C), A.id && (clearInterval(A.id), A.id = null));
5964
- } catch (B) {
5965
- console.error("Error checking completed signature:", B);
5963
+ (yield uQ({ orderId: g })) === !0 && ($E(E, Q, B), A.id && (clearInterval(A.id), A.id = null));
5964
+ } catch (C) {
5965
+ console.error("Error checking completed signature:", C);
5966
5966
  }
5967
5967
  });
5968
5968
  }
5969
- function LC(E) {
5970
- return p(this, arguments, function* ({ orderId: g, callbackUrl: A }) {
5971
- const C = document.createElement("div");
5972
- 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");
5973
- let B = "";
5969
+ function LC(Q) {
5970
+ return p(this, arguments, function* ({
5971
+ orderId: g,
5972
+ callbackUrl: A,
5973
+ onCompleteSignature: E
5974
+ }) {
5975
+ const B = document.createElement("div");
5976
+ 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");
5977
+ let C = "";
5974
5978
  try {
5975
- const o = yield DQ({ orderId: g });
5976
- B = o && o.url ? o.url : "";
5977
- } catch (o) {
5978
- return console.error("Failed to fetch wireframe URL:", o), C.innerHTML = `
5979
+ const c = yield DQ({ orderId: g });
5980
+ C = c && c.url ? c.url : "";
5981
+ } catch (c) {
5982
+ return console.error("Failed to fetch wireframe URL:", c), B.innerHTML = `
5979
5983
  <div style="display: flex; align-items: center; justify-content: center; height: 100%; padding: 1rem;">
5980
5984
  <p style="color: #ef4444; text-align: center; font-size: 0.875rem;">
5981
5985
  Không thể tải hợp đồng.
5982
5986
  </p>
5983
5987
  </div>
5984
- `, { container: C };
5988
+ `, { container: B };
5985
5989
  }
5986
- const Q = document.createElement("div");
5987
- Q.style.flex = "1", Q.style.minHeight = "0", Q.style.position = "relative", Q.style.width = "100%";
5988
- const t = document.createElement("iframe");
5989
- t.src = B, t.style.position = "absolute", t.style.top = "0", t.style.left = "0", t.style.width = "100%", t.style.height = "100%", t.style.borderRadius = "0", t.style.border = "0", window.matchMedia("(min-width: 640px)").matches && (t.style.borderRadius = "0.375rem"), t.loading = "lazy", t.allowFullscreen = !0, t.setAttribute("scrolling", "auto"), t.setAttribute("frameBorder", "0");
5990
- const I = { id: null };
5991
- return t.addEventListener("load", () => {
5992
- OC(g, I, t, A), I.id = setInterval(() => {
5993
- OC(g, I, t, A);
5990
+ const t = document.createElement("div");
5991
+ t.style.flex = "1", t.style.minHeight = "0", t.style.position = "relative", t.style.width = "100%";
5992
+ const I = document.createElement("iframe");
5993
+ I.src = C, 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");
5994
+ const n = { id: null };
5995
+ return I.addEventListener("load", () => {
5996
+ OC(
5997
+ g,
5998
+ n,
5999
+ I,
6000
+ A,
6001
+ E
6002
+ ), n.id = setInterval(() => {
6003
+ OC(
6004
+ g,
6005
+ n,
6006
+ I,
6007
+ A,
6008
+ E
6009
+ );
5994
6010
  }, 3e3);
5995
- }), Q.appendChild(t), C.appendChild(Q), { container: C, cleanup: () => {
5996
- I.id && clearInterval(I.id), document.body.classList.remove("no-scroll"), t.classList.remove("block-interaction");
5997
- const o = document.getElementById("signature-popup-backdrop");
5998
- o && o.remove();
6011
+ }), t.appendChild(I), B.appendChild(t), { container: B, cleanup: () => {
6012
+ n.id && clearInterval(n.id), document.body.classList.remove("no-scroll"), I.classList.remove("block-interaction");
6013
+ const c = document.getElementById("signature-popup-backdrop");
6014
+ c && c.remove();
5999
6015
  } };
6000
6016
  });
6001
6017
  }
6002
6018
  function BQ(g, A) {
6003
- const E = (A && A.includeHash) != null ? A.includeHash : !0, C = A && A.pollMs || 1e3;
6019
+ const E = (A && A.includeHash) != null ? A.includeHash : !0, Q = A && A.pollMs || 1e3;
6004
6020
  let B = zC(E);
6005
- function Q() {
6021
+ function C() {
6006
6022
  const n = zC(E);
6007
6023
  if (n !== B) {
6008
- const o = B;
6009
- B = n, g(n, o);
6024
+ const D = B;
6025
+ B = n, g(n, D);
6010
6026
  }
6011
6027
  }
6012
- window.addEventListener("popstate", Q), E && window.addEventListener("hashchange", Q);
6013
- const t = AI(Q), I = window.setInterval(Q, C);
6014
- return Promise.resolve().then(Q), function() {
6015
- window.removeEventListener("popstate", Q), E && window.removeEventListener("hashchange", Q), t(), clearInterval(I);
6028
+ window.addEventListener("popstate", C), E && window.addEventListener("hashchange", C);
6029
+ const t = AI(C), I = window.setInterval(C, Q);
6030
+ return Promise.resolve().then(C), function() {
6031
+ window.removeEventListener("popstate", C), E && window.removeEventListener("hashchange", C), t(), clearInterval(I);
6016
6032
  };
6017
6033
  }
6018
6034
  function zC(g) {
@@ -6029,18 +6045,18 @@ function AI(g) {
6029
6045
  };
6030
6046
  }
6031
6047
  history[A] = !0;
6032
- function C() {
6048
+ function Q() {
6033
6049
  window.dispatchEvent(new Event("url-watcher:navigate")), g();
6034
6050
  }
6035
- var B = history.pushState, Q = history.replaceState;
6051
+ var B = history.pushState, C = history.replaceState;
6036
6052
  return history.pushState = function() {
6037
6053
  var t = B.apply(this, arguments);
6038
- return C(), t;
6054
+ return Q(), t;
6039
6055
  }, history.replaceState = function() {
6040
- var t = Q.apply(this, arguments);
6041
- return C(), t;
6056
+ var t = C.apply(this, arguments);
6057
+ return Q(), t;
6042
6058
  }, function() {
6043
- history.pushState = B, history.replaceState = Q;
6059
+ history.pushState = B, history.replaceState = C;
6044
6060
  try {
6045
6061
  delete history[A];
6046
6062
  } catch (I) {
@@ -6066,9 +6082,9 @@ function QQ() {
6066
6082
  window.removeEventListener("beforeunload", g);
6067
6083
  };
6068
6084
  }
6069
- function EI(g, A, E, C, B) {
6085
+ function EI(g, A, E, Q, B) {
6070
6086
  return p(this, null, function* () {
6071
- const Q = QQ(), I = [
6087
+ const C = QQ(), I = [
6072
6088
  { name: "M-Invoice", route: "m-invoice", logoUrl: sQ },
6073
6089
  { name: "Misa", route: "misa", logoUrl: iQ },
6074
6090
  { name: "FPT", route: "fpt", logoUrl: fQ },
@@ -6077,12 +6093,12 @@ function EI(g, A, E, C, B) {
6077
6093
  (j) => j.route === "m-invoice"
6078
6094
  );
6079
6095
  function n() {
6080
- return [D("stepInfo"), D("stepPlan"), D("stepPayment")];
6096
+ return [o("stepInfo"), o("stepPlan"), o("stepPayment")];
6081
6097
  }
6082
- let o = rQ({
6098
+ let D = rQ({
6083
6099
  steps: n(),
6084
6100
  currentStep: 1
6085
- }), { container: c, setStep: s, setContent: a } = o;
6101
+ }), { container: c, setStep: s, setContent: a } = D;
6086
6102
  g.dataset.theme = B || "default", g.appendChild(c);
6087
6103
  let e = 1, f = I[0], q = {
6088
6104
  eInvoiceRegistration: {
@@ -6093,7 +6109,7 @@ function EI(g, A, E, C, B) {
6093
6109
  organization: {
6094
6110
  name: "",
6095
6111
  address: "",
6096
- taxCode: (C == null ? void 0 : C.taxCode) || "",
6112
+ taxCode: (Q == null ? void 0 : Q.taxCode) || "",
6097
6113
  taxAuthority: ""
6098
6114
  },
6099
6115
  // digitalSignaturePackageCode: "",
@@ -6134,7 +6150,7 @@ function EI(g, A, E, C, B) {
6134
6150
  organization: {
6135
6151
  name: "",
6136
6152
  address: "",
6137
- taxCode: (C == null ? void 0 : C.taxCode) || "",
6153
+ taxCode: (Q == null ? void 0 : Q.taxCode) || "",
6138
6154
  taxAuthority: ""
6139
6155
  },
6140
6156
  contactPerson: {
@@ -6178,7 +6194,7 @@ function EI(g, A, E, C, B) {
6178
6194
  }
6179
6195
  function X() {
6180
6196
  return p(this, null, function* () {
6181
- o.updateTitle && o.updateTitle(), o.updateSteps && o.updateSteps(n()), yield d(e);
6197
+ D.updateTitle && D.updateTitle(), D.updateSteps && D.updateSteps(n()), yield d(e);
6182
6198
  });
6183
6199
  }
6184
6200
  function d(j) {
@@ -6267,7 +6283,7 @@ function EI(g, A, E, C, B) {
6267
6283
  },
6268
6284
  theme: B || "ocb",
6269
6285
  orderInfoProps: {
6270
- token: (C == null ? void 0 : C.accessToken) || "",
6286
+ token: (Q == null ? void 0 : Q.accessToken) || "",
6271
6287
  registrationData: q,
6272
6288
  orderId: F || "",
6273
6289
  selectedProvider: f || { name: "", logo: "" },
@@ -6294,7 +6310,7 @@ function EI(g, A, E, C, B) {
6294
6310
  onReturnHome: A || (() => {
6295
6311
  }),
6296
6312
  theme: B || "ocb",
6297
- settingUrl: (C == null ? void 0 : C.settingUrl) || "",
6313
+ settingUrl: (Q == null ? void 0 : Q.settingUrl) || "",
6298
6314
  provider: f.route
6299
6315
  });
6300
6316
  a(y);
@@ -6313,38 +6329,40 @@ function EI(g, A, E, C, B) {
6313
6329
  { includeHash: !1 }
6314
6330
  );
6315
6331
  function K() {
6316
- i && typeof i.destroy == "function" && i.destroy(), KC(M), Q(), gI(), Y(), g && g.parentNode && (g.innerHTML = "");
6332
+ i && typeof i.destroy == "function" && i.destroy(), KC(M), C(), gI(), Y(), g && g.parentNode && (g.innerHTML = "");
6317
6333
  }
6318
6334
  return { destroy: K };
6319
6335
  });
6320
6336
  }
6321
- function II(g, A, E) {
6337
+ function II(g, A, E, Q) {
6322
6338
  return p(this, null, function* () {
6323
- const C = QQ(), { container: B, setContent: Q } = _E(), t = E == null ? void 0 : E.orderId, I = (E == null ? void 0 : E.callbackUrl) || `${window.location.origin}/dashboard`, { container: n } = yield LC({
6324
- orderId: t,
6325
- callbackUrl: I
6339
+ const B = QQ(), { container: C, setContent: t } = _E(), I = E == null ? void 0 : E.orderId, n = (E == null ? void 0 : E.callbackUrl) || `${window.location.origin}/dashboard`, { container: D } = yield LC({
6340
+ orderId: I,
6341
+ callbackUrl: n,
6342
+ onCompleteSignature: Q
6326
6343
  });
6327
- Q(n), g.appendChild(B);
6328
- const o = {
6344
+ t(D), g.appendChild(C);
6345
+ const c = {
6329
6346
  rerender: () => p(null, null, function* () {
6330
- const { container: a } = yield LC({
6331
- orderId: t,
6332
- callbackUrl: I
6347
+ const { container: e } = yield LC({
6348
+ orderId: I,
6349
+ callbackUrl: n,
6350
+ onCompleteSignature: Q
6333
6351
  });
6334
- Q(a);
6352
+ t(e);
6335
6353
  })
6336
6354
  };
6337
- yC(o);
6338
- const c = BQ(
6339
- (a, e) => {
6340
- s();
6355
+ yC(c);
6356
+ const s = BQ(
6357
+ (e, f) => {
6358
+ a();
6341
6359
  },
6342
6360
  { includeHash: !1 }
6343
6361
  );
6344
- function s() {
6345
- KC(o), C(), c(), g && g.parentNode && (g.innerHTML = "");
6362
+ function a() {
6363
+ KC(c), B(), s(), g && g.parentNode && (g.innerHTML = "");
6346
6364
  }
6347
- return { destroy: s };
6365
+ return { destroy: a };
6348
6366
  });
6349
6367
  }
6350
6368
  export {