@invoice-sdk/widget 1.125.13 → 1.125.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-DFVtmZz4.js → index-BF6bVOOY.js} +658 -653
- package/dist/{index-CecYhuZJ.js → index-BpeERBmS.js} +173 -170
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +78 -78
- package/dist/{loading-BwrcsLCA.js → loading-Be9H7dYJ.js} +46 -50
- package/dist/{widget-BfX2SPR3.js → widget-YxHm6F6B.js} +2460 -2456
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as O, f as G, e as te, b as ne,
|
|
2
|
-
import { t, c as Q, k as se } from "./index-
|
|
1
|
+
import { c as O, f as G, e as te, b as ne, o as re, p as ie, s as ae, q as oe } from "./loading-Be9H7dYJ.js";
|
|
2
|
+
import { t, c as Q, k as se } from "./index-BF6bVOOY.js";
|
|
3
3
|
function B(i) {
|
|
4
4
|
const n = i.trim();
|
|
5
5
|
return n ? n.length < 2 || n.length > 250 ? { valid: !1, error: t("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(n) ? { valid: !1, error: t("invalid_characters") } : { valid: !0 } : { valid: !1, error: t("required_name") };
|
|
@@ -19,8 +19,8 @@ function J(i, n = !1) {
|
|
|
19
19
|
const e = r.replace(/\s/g, "");
|
|
20
20
|
if (/[<>:"\/\\|?*@#$%!A-Za-z]/.test(e))
|
|
21
21
|
return { valid: !1, error: t("phone_invalid") };
|
|
22
|
-
const d = /^0\d{9}$/,
|
|
23
|
-
return !d.test(e) && !
|
|
22
|
+
const d = /^0\d{9}$/, o = /^\+84\d{9}$/;
|
|
23
|
+
return !d.test(e) && !o.test(e) ? { valid: !1, error: t("phone_invalid_format") } : { valid: !0 };
|
|
24
24
|
}
|
|
25
25
|
function z(i) {
|
|
26
26
|
const n = i.trim();
|
|
@@ -30,8 +30,8 @@ function z(i) {
|
|
|
30
30
|
return { valid: !1, error: t("tax_code_invalid") };
|
|
31
31
|
if ((r.match(/-/g) || []).length > 1)
|
|
32
32
|
return { valid: !1, error: t("tax_code_invalid_format") };
|
|
33
|
-
const d = /^\d{10}$/,
|
|
34
|
-
return !d.test(r) && !
|
|
33
|
+
const d = /^\d{10}$/, o = /^\d{10}-\d{3}$/;
|
|
34
|
+
return !d.test(r) && !o.test(r) ? { valid: !1, error: t("tax_code_invalid_format") } : { valid: !0 };
|
|
35
35
|
}
|
|
36
36
|
function le({ defaultValues: i = {}, onChange: n } = {}) {
|
|
37
37
|
const r = {
|
|
@@ -44,56 +44,56 @@ function le({ defaultValues: i = {}, onChange: n } = {}) {
|
|
|
44
44
|
function l() {
|
|
45
45
|
typeof n == "function" && n({ ...r });
|
|
46
46
|
}
|
|
47
|
-
function d({ label: k, required: s, name:
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
function d({ label: k, required: s, name: a, type: p = "text", placeholder: f }) {
|
|
48
|
+
const E = document.createElement("div");
|
|
49
|
+
E.className = "";
|
|
50
50
|
const P = document.createElement("label");
|
|
51
|
-
P.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", P.htmlFor =
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
P.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", P.htmlFor = a, P.innerHTML = s ? `${k} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>` : k;
|
|
52
|
+
const w = document.createElement("input");
|
|
53
|
+
w.id = a, w.name = a, w.type = p, w.placeholder = f || "", w.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", w.value = r[a] || "";
|
|
54
54
|
const H = document.createElement("div");
|
|
55
|
-
return H.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", H.setAttribute("data-error-for",
|
|
56
|
-
r[
|
|
55
|
+
return H.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", H.setAttribute("data-error-for", a), w.addEventListener("input", () => {
|
|
56
|
+
r[a] = w.value, w.classList.remove(
|
|
57
57
|
"wgt:border-semantic-error",
|
|
58
58
|
"wgt:bg-semantic-error-50"
|
|
59
59
|
), H.classList.add("wgt:hidden"), l();
|
|
60
|
-
}),
|
|
60
|
+
}), w.addEventListener("blur", () => {
|
|
61
61
|
let L;
|
|
62
|
-
switch (
|
|
62
|
+
switch (a) {
|
|
63
63
|
case "representativeName":
|
|
64
|
-
L = B(
|
|
64
|
+
L = B(w.value);
|
|
65
65
|
break;
|
|
66
66
|
case "buyerAddress":
|
|
67
|
-
L = K(
|
|
67
|
+
L = K(w.value);
|
|
68
68
|
break;
|
|
69
69
|
case "email":
|
|
70
|
-
L = U(
|
|
70
|
+
L = U(w.value);
|
|
71
71
|
break;
|
|
72
72
|
default:
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
!L.valid && L.error && (
|
|
75
|
+
!L.valid && L.error && (w.classList.add(
|
|
76
76
|
"wgt:border-semantic-error",
|
|
77
77
|
"wgt:bg-semantic-error-50"
|
|
78
78
|
), H.textContent = L.error, H.classList.remove("wgt:hidden"));
|
|
79
|
-
}),
|
|
79
|
+
}), E.appendChild(P), E.appendChild(w), E.appendChild(H), { field: E, input: w, errorEl: H };
|
|
80
80
|
}
|
|
81
81
|
const {
|
|
82
|
-
field:
|
|
82
|
+
field: o,
|
|
83
83
|
input: g,
|
|
84
84
|
errorEl: m
|
|
85
85
|
} = d({
|
|
86
|
-
label: t("
|
|
86
|
+
label: t("invoice_buyerName"),
|
|
87
87
|
required: !0,
|
|
88
88
|
name: "representativeName",
|
|
89
|
-
placeholder: t("
|
|
90
|
-
}), { field:
|
|
89
|
+
placeholder: t("invoice_buyerName_input")
|
|
90
|
+
}), { field: N, errorEl: C } = d({
|
|
91
91
|
label: t("buyerAddress"),
|
|
92
92
|
required: !1,
|
|
93
93
|
name: "buyerAddress",
|
|
94
94
|
placeholder: t("buyerAddress_input")
|
|
95
95
|
}), {
|
|
96
|
-
field:
|
|
96
|
+
field: y,
|
|
97
97
|
input: x,
|
|
98
98
|
errorEl: c
|
|
99
99
|
} = d({
|
|
@@ -103,17 +103,17 @@ function le({ defaultValues: i = {}, onChange: n } = {}) {
|
|
|
103
103
|
type: "email",
|
|
104
104
|
placeholder: t("email_input")
|
|
105
105
|
});
|
|
106
|
-
e.appendChild(
|
|
106
|
+
e.appendChild(o), e.appendChild(N), e.appendChild(y);
|
|
107
107
|
function u() {
|
|
108
108
|
let k = !0;
|
|
109
|
-
function s(f,
|
|
109
|
+
function s(f, E, P) {
|
|
110
110
|
f.classList.add(
|
|
111
111
|
"wgt:border-semantic-error",
|
|
112
112
|
"wgt:bg-semantic-error-50"
|
|
113
|
-
), P &&
|
|
113
|
+
), P && E && (E.textContent = P, E.classList.remove("wgt:hidden")), k = !1;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
115
|
+
const a = B(r.representativeName);
|
|
116
|
+
if (a.valid || s(g, m, a.error), r.buyerAddress.trim()) {
|
|
117
117
|
const f = K(r.buyerAddress);
|
|
118
118
|
f.valid || s(
|
|
119
119
|
document.querySelector('input[name="buyerAddress"]'),
|
|
@@ -121,8 +121,8 @@ function le({ defaultValues: i = {}, onChange: n } = {}) {
|
|
|
121
121
|
f.error
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
return
|
|
124
|
+
const p = U(r.email);
|
|
125
|
+
return p.valid || s(x, c, p.error), k;
|
|
126
126
|
}
|
|
127
127
|
function T() {
|
|
128
128
|
return { ...r };
|
|
@@ -148,7 +148,7 @@ function de({
|
|
|
148
148
|
function d() {
|
|
149
149
|
typeof n == "function" && n({ ...e });
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function o({ label: A, required: S, name: h, type: R = "text", placeholder: j }) {
|
|
152
152
|
const q = document.createElement("div");
|
|
153
153
|
q.className = "";
|
|
154
154
|
const F = document.createElement("label");
|
|
@@ -191,17 +191,17 @@ function de({
|
|
|
191
191
|
g.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:font-medium wgt:text-strong-950 wgt:text-sm";
|
|
192
192
|
const m = document.createElement("input");
|
|
193
193
|
m.type = "checkbox", m.className = "wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary", m.checked = e.noTaxCode;
|
|
194
|
-
const
|
|
195
|
-
|
|
194
|
+
const N = document.createElement("span");
|
|
195
|
+
N.textContent = t("business_noTaxCode"), N.className = "wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]", N.style.fontFamily = "Inter, sans-serif", m.addEventListener("change", () => {
|
|
196
196
|
e.noTaxCode = m.checked, c.disabled = e.noTaxCode, T.disabled = e.noTaxCode, c.classList.remove(
|
|
197
197
|
"wgt:border-semantic-error",
|
|
198
198
|
"wgt:bg-semantic-error-50"
|
|
199
199
|
), u.classList.add("wgt:hidden"), d();
|
|
200
|
-
}), g.appendChild(m), g.appendChild(
|
|
200
|
+
}), g.appendChild(m), g.appendChild(N);
|
|
201
201
|
const C = document.createElement("div");
|
|
202
202
|
C.className = "wgt:space-y-2";
|
|
203
|
-
const
|
|
204
|
-
|
|
203
|
+
const y = document.createElement("label");
|
|
204
|
+
y.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 ", y.innerHTML = t("confirmation_popup_taxCode") + '<span class="wgt:text-[#ED1C24]">*</span>';
|
|
205
205
|
const x = document.createElement("div");
|
|
206
206
|
x.className = "wgt:flex wgt:gap-2 wgt:mt-2";
|
|
207
207
|
const c = document.createElement("input");
|
|
@@ -247,7 +247,7 @@ function de({
|
|
|
247
247
|
T.disabled = !0;
|
|
248
248
|
const h = await r(A, { ...e });
|
|
249
249
|
if (!h || typeof h != "object") return;
|
|
250
|
-
h.businessName != null && (e.businessName = String(h.businessName || ""), s.value = e.businessName), h.representativeName != null && (e.representativeName = String(h.representativeName || ""), f.value = e.representativeName), h.buyerAddress != null && (e.buyerAddress = String(h.buyerAddress || ""),
|
|
250
|
+
h.businessName != null && (e.businessName = String(h.businessName || ""), s.value = e.businessName), h.representativeName != null && (e.representativeName = String(h.representativeName || ""), f.value = e.representativeName), h.buyerAddress != null && (e.buyerAddress = String(h.buyerAddress || ""), w.value = e.buyerAddress), d();
|
|
251
251
|
} catch {
|
|
252
252
|
c.classList.add(
|
|
253
253
|
"wgt:border-semantic-error",
|
|
@@ -258,30 +258,30 @@ function de({
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
|
-
x.appendChild(c), x.appendChild(T), C.appendChild(
|
|
261
|
+
x.appendChild(c), x.appendChild(T), C.appendChild(y), C.appendChild(x), C.appendChild(u);
|
|
262
262
|
const {
|
|
263
263
|
field: k,
|
|
264
264
|
input: s,
|
|
265
|
-
errorEl:
|
|
266
|
-
} =
|
|
265
|
+
errorEl: a
|
|
266
|
+
} = o({
|
|
267
267
|
label: t("businessName"),
|
|
268
268
|
required: !0,
|
|
269
269
|
name: "businessName",
|
|
270
270
|
placeholder: t("businessName_input")
|
|
271
271
|
}), {
|
|
272
|
-
field:
|
|
272
|
+
field: p,
|
|
273
273
|
input: f,
|
|
274
|
-
errorEl:
|
|
275
|
-
} =
|
|
276
|
-
label: t("
|
|
274
|
+
errorEl: E
|
|
275
|
+
} = o({
|
|
276
|
+
label: t("invoice_buyerName"),
|
|
277
277
|
required: !0,
|
|
278
278
|
name: "representativeName",
|
|
279
|
-
placeholder: t("
|
|
279
|
+
placeholder: t("invoice_buyerName_input")
|
|
280
280
|
}), {
|
|
281
281
|
field: P,
|
|
282
|
-
input:
|
|
282
|
+
input: w,
|
|
283
283
|
errorEl: H
|
|
284
|
-
} =
|
|
284
|
+
} = o({
|
|
285
285
|
label: t("buyerAddress"),
|
|
286
286
|
required: !1,
|
|
287
287
|
name: "buyerAddress",
|
|
@@ -290,7 +290,7 @@ function de({
|
|
|
290
290
|
field: L,
|
|
291
291
|
input: X,
|
|
292
292
|
errorEl: Z
|
|
293
|
-
} =
|
|
293
|
+
} = o({
|
|
294
294
|
label: t("email"),
|
|
295
295
|
required: !0,
|
|
296
296
|
name: "email",
|
|
@@ -300,15 +300,15 @@ function de({
|
|
|
300
300
|
field: v,
|
|
301
301
|
input: M,
|
|
302
302
|
errorEl: V
|
|
303
|
-
} =
|
|
303
|
+
} = o({
|
|
304
304
|
label: t("phone"),
|
|
305
305
|
required: !1,
|
|
306
306
|
name: "phone",
|
|
307
307
|
type: "tel",
|
|
308
308
|
placeholder: t("phone_input")
|
|
309
309
|
});
|
|
310
|
-
l.appendChild(g), l.appendChild(C), l.appendChild(k), l.appendChild(
|
|
311
|
-
function
|
|
310
|
+
l.appendChild(g), l.appendChild(C), l.appendChild(k), l.appendChild(p), l.appendChild(P), l.appendChild(L), l.appendChild(v), c.disabled = e.noTaxCode, T.disabled = e.noTaxCode;
|
|
311
|
+
function D() {
|
|
312
312
|
let A = !0;
|
|
313
313
|
function S(q, F, b) {
|
|
314
314
|
q.classList.add(
|
|
@@ -322,11 +322,11 @@ function de({
|
|
|
322
322
|
q.valid || S(c, u, q.error);
|
|
323
323
|
}
|
|
324
324
|
const h = B(e.businessName);
|
|
325
|
-
h.valid || S(s,
|
|
325
|
+
h.valid || S(s, a, h.error);
|
|
326
326
|
const R = B(e.representativeName);
|
|
327
|
-
if (R.valid || S(f,
|
|
327
|
+
if (R.valid || S(f, E, R.error), e.buyerAddress.trim()) {
|
|
328
328
|
const q = K(e.buyerAddress);
|
|
329
|
-
q.valid || S(
|
|
329
|
+
q.valid || S(w, H, q.error);
|
|
330
330
|
}
|
|
331
331
|
const j = U(e.email);
|
|
332
332
|
if (j.valid || S(X, Z, j.error), e.phone.trim()) {
|
|
@@ -335,10 +335,10 @@ function de({
|
|
|
335
335
|
}
|
|
336
336
|
return A;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function I() {
|
|
339
339
|
return { ...e };
|
|
340
340
|
}
|
|
341
|
-
return { container: l, getValues:
|
|
341
|
+
return { container: l, getValues: I, validate: D };
|
|
342
342
|
}
|
|
343
343
|
function ce({
|
|
344
344
|
type: i,
|
|
@@ -348,28 +348,28 @@ function ce({
|
|
|
348
348
|
onClose: l,
|
|
349
349
|
onConfirm: d
|
|
350
350
|
}) {
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const o = document.createElement("div");
|
|
352
|
+
o.className = "wgt:fixed wgt:inset-0 wgt:flex wgt:items-center wgt:justify-center wgt:z-50 wgt:p-4", o.style.cssText = `
|
|
353
353
|
background-color: rgba(0, 0, 0, 0.5);
|
|
354
354
|
backdrop-filter: blur(4px);
|
|
355
|
-
`, e &&
|
|
355
|
+
`, e && o.setAttribute("data-theme", e);
|
|
356
356
|
const g = document.createElement("div");
|
|
357
357
|
g.className = "wgt:w-full wgt:max-w-md wgt:bg-white wgt:rounded-2xl wgt:shadow-xl wgt:max-h-[90vh] wgt:overflow-y-auto";
|
|
358
358
|
const m = document.createElement("div");
|
|
359
359
|
m.className = "wgt:px-6 wgt:pt-6 wgt:pb-4 wgt:space-y-2";
|
|
360
|
-
const
|
|
361
|
-
|
|
360
|
+
const N = document.createElement("h3");
|
|
361
|
+
N.className = "wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950", N.textContent = t("confirmation_popup_title");
|
|
362
362
|
const C = document.createElement("p");
|
|
363
|
-
C.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", C.textContent = t("confirmation_popup_subtitle"), m.appendChild(
|
|
364
|
-
const
|
|
365
|
-
|
|
363
|
+
C.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", C.textContent = t("confirmation_popup_subtitle"), m.appendChild(N), m.appendChild(C), g.appendChild(m);
|
|
364
|
+
const y = document.createElement("div");
|
|
365
|
+
y.className = "wgt:px-6 wgt:pb-4";
|
|
366
366
|
const x = document.createElement("div");
|
|
367
367
|
x.className = "wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";
|
|
368
|
-
function c(
|
|
368
|
+
function c(w, H, L) {
|
|
369
369
|
const X = document.createElement("div");
|
|
370
370
|
X.className = "wgt:flex wgt:items-start wgt:gap-3";
|
|
371
371
|
const Z = document.createElement("span");
|
|
372
|
-
Z.className = "wgt:text-primary wgt:flex-shrink-0", Z.innerHTML =
|
|
372
|
+
Z.className = "wgt:text-primary wgt:flex-shrink-0", Z.innerHTML = w;
|
|
373
373
|
const v = document.createElement("div");
|
|
374
374
|
v.className = "wgt:flex wgt:items-start wgt:justify-between wgt:flex-1 wgt:gap-2";
|
|
375
375
|
const M = document.createElement("span");
|
|
@@ -396,62 +396,62 @@ function ce({
|
|
|
396
396
|
t("confirmation_popup_totalAmount"),
|
|
397
397
|
G(r?.amount) + " VND"
|
|
398
398
|
)
|
|
399
|
-
),
|
|
399
|
+
), y.appendChild(x), g.appendChild(y);
|
|
400
400
|
const s = document.createElement("div");
|
|
401
401
|
s.className = "wgt:px-6 wgt:pb-6";
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
function w
|
|
402
|
+
const a = document.createElement("div");
|
|
403
|
+
a.className = "wgt:space-y-3 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:px-4 wgt:py-4";
|
|
404
|
+
function p(w, H) {
|
|
405
405
|
const L = document.createElement("div");
|
|
406
406
|
L.className = "wgt:flex wgt:items-start wgt:justify-between wgt:gap-4";
|
|
407
407
|
const X = document.createElement("span");
|
|
408
|
-
X.className = "wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3", X.textContent =
|
|
408
|
+
X.className = "wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3", X.textContent = w;
|
|
409
409
|
const Z = document.createElement("span");
|
|
410
410
|
return Z.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", Z.textContent = H || "-", L.appendChild(X), L.appendChild(Z), L;
|
|
411
411
|
}
|
|
412
|
-
i === "business" ? (
|
|
413
|
-
|
|
414
|
-
),
|
|
415
|
-
|
|
416
|
-
t("
|
|
412
|
+
i === "business" ? (a.appendChild(
|
|
413
|
+
p(t("confirmation_popup_taxCode"), n.taxCode)
|
|
414
|
+
), a.appendChild(p(t("businessName"), n.businessName)), a.appendChild(
|
|
415
|
+
p(
|
|
416
|
+
t("confirmation_popup_buyerName"),
|
|
417
417
|
n.representativeName
|
|
418
418
|
)
|
|
419
|
-
),
|
|
420
|
-
|
|
421
|
-
),
|
|
422
|
-
|
|
423
|
-
),
|
|
424
|
-
|
|
425
|
-
)) : (
|
|
426
|
-
|
|
427
|
-
t("
|
|
419
|
+
), a.appendChild(
|
|
420
|
+
p(t("confirmation_popup_buyerAddress"), n.buyerAddress)
|
|
421
|
+
), a.appendChild(
|
|
422
|
+
p(t("confirmation_popup_email"), n.email)
|
|
423
|
+
), a.appendChild(
|
|
424
|
+
p(t("confirmation_popup_phone"), n.phone)
|
|
425
|
+
)) : (a.appendChild(
|
|
426
|
+
p(
|
|
427
|
+
t("confirmation_popup_buyerName"),
|
|
428
428
|
n.representativeName
|
|
429
429
|
)
|
|
430
|
-
),
|
|
431
|
-
|
|
432
|
-
),
|
|
433
|
-
|
|
434
|
-
)), s.appendChild(
|
|
430
|
+
), a.appendChild(
|
|
431
|
+
p(t("confirmation_popup_buyerAddress"), n.buyerAddress)
|
|
432
|
+
), a.appendChild(
|
|
433
|
+
p(t("confirmation_popup_email"), n.email)
|
|
434
|
+
)), s.appendChild(a), g.appendChild(s);
|
|
435
435
|
const f = document.createElement("div");
|
|
436
436
|
f.className = "wgt:px-6 wgt:pb-6 wgt:flex wgt:gap-3";
|
|
437
|
-
const
|
|
437
|
+
const E = O({
|
|
438
438
|
type: "button",
|
|
439
439
|
title: "Đóng",
|
|
440
440
|
className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-white wgt:text-primary wgt:border wgt:border-primary",
|
|
441
441
|
handleClick: () => {
|
|
442
|
-
typeof l == "function" && l(),
|
|
442
|
+
typeof l == "function" && l(), o.remove();
|
|
443
443
|
}
|
|
444
444
|
}), P = O({
|
|
445
445
|
type: "button",
|
|
446
446
|
title: "Xác nhận",
|
|
447
447
|
className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-primary wgt:text-white",
|
|
448
448
|
handleClick: () => {
|
|
449
|
-
typeof d == "function" && d({ type: i, data: n }),
|
|
449
|
+
typeof d == "function" && d({ type: i, data: n }), o.remove();
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
|
-
return f.appendChild(
|
|
453
|
-
|
|
454
|
-
}), { overlay:
|
|
452
|
+
return f.appendChild(E), f.appendChild(P), g.appendChild(f), o.appendChild(g), o.addEventListener("click", (w) => {
|
|
453
|
+
w.target === o && (typeof l == "function" && l(), o.remove());
|
|
454
|
+
}), { overlay: o };
|
|
455
455
|
}
|
|
456
456
|
const ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAABICAYAAABbaA9tAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKz9JREFUeAHtXQd4HNW1PlO3aqVdrVaymiVZso0bocR54AAGQu/F5BkIHZxAgNBDHkU8kgChBgLEJJTAoxlMiCkOzRCbEmow7sa2ZEuy2qqstNoyO+XdMzNXOzteNTc+YP/vu9rdmTu3zbnnnnavAL4ZMENcYyCHHHYCWNj94MAk4MtDoeI3SyfMejYYLCU/NfM6Bznk8C0Dj38ugn2Egeopi7WaqVqqeoqmVU/VuionvY3XrflyyGF7sTuXfqxLu6e83HWFWLC1V5YKZFVVcclQCbMWgWF9BYHeJ6Id485tbEyAsZqokEMO24HdSdgoYihK3bSNkaRUo6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VzRvOhN2/D8Q5PA9xC4XRcBUCJ7qS17h5B14Pog+mYhXE/fwqgZR62EexsZhkpy8AHf1RK+C9PafHHIYE3YHYev1XB/Z0tMJyo1+TkAP5OB/CjM/dWLHCFM//iP1lHLjHwc62mH3tS+H7xh2p7VBF0ni1XuskFV5miQT4mas//mAkfGAGx/HruAa182A0e9FzCGHbbA7OaIeL3JWw5ofeBnfRgevoW9Xt33iJ54LWODNa1r4wxn03JIccvjWYNBj1VZR+1etag/0Qmpa9YxUV0XdY1qaoL+v/5slh52Eb4IzDp6FUV9U5M3TtNIirrTlrPavBmDb47ZyyOFbh5y4kUMOOeQwFvw/nuqxEggnLfAAAAAASUVORK5CYII=";
|
|
457
457
|
function ue({ theme: i, assets: n = {}, year: r } = {}) {
|
|
@@ -459,16 +459,16 @@ function ue({ theme: i, assets: n = {}, year: r } = {}) {
|
|
|
459
459
|
l.className = "wgt:w-full wgt:bg-white", i && l.setAttribute("data-theme", i);
|
|
460
460
|
const d = document.createElement("div");
|
|
461
461
|
d.className = "wgt:w-full wgt:border-t wgt:border-[#E5E7EB]", l.appendChild(d);
|
|
462
|
-
const
|
|
463
|
-
|
|
462
|
+
const o = document.createElement("div");
|
|
463
|
+
o.className = "wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-4", l.appendChild(o);
|
|
464
464
|
const g = document.createElement("div");
|
|
465
465
|
g.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:mb-3 wgt:flex-wrap";
|
|
466
466
|
const m = document.createElement("div");
|
|
467
467
|
m.className = "wgt:text-base wgt:font-semibold wgt:text-strong-950", m.textContent = "Giải pháp thanh toán được cung cấp bởi";
|
|
468
|
-
const
|
|
469
|
-
|
|
468
|
+
const N = document.createElement("div");
|
|
469
|
+
N.className = "wgt:flex wgt:items-center wgt:justify-center wgt:shrink-0";
|
|
470
470
|
const C = document.createElement("img");
|
|
471
|
-
if (C.src = ge, C.alt = "ATOM", C.className = "wgt:h-6 wgt:w-auto", C.loading = "lazy",
|
|
471
|
+
if (C.src = ge, C.alt = "ATOM", C.className = "wgt:h-6 wgt:w-auto", C.loading = "lazy", N.appendChild(C), g.appendChild(m), g.appendChild(N), o.appendChild(g), n.cyberSourceLogo || n.pciLogo) {
|
|
472
472
|
const c = document.createElement("div");
|
|
473
473
|
if (c.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-6 wgt:py-2", n.cyberSourceLogo) {
|
|
474
474
|
const u = document.createElement("img");
|
|
@@ -478,10 +478,10 @@ function ue({ theme: i, assets: n = {}, year: r } = {}) {
|
|
|
478
478
|
const u = document.createElement("img");
|
|
479
479
|
u.src = n.pciLogo, u.alt = "PCI DSS", u.className = "wgt:h-10 wgt:w-auto", u.loading = "lazy", c.appendChild(u);
|
|
480
480
|
}
|
|
481
|
-
|
|
481
|
+
o.appendChild(c);
|
|
482
482
|
}
|
|
483
|
-
const
|
|
484
|
-
|
|
483
|
+
const y = document.createElement("div");
|
|
484
|
+
y.className = "wgt:w-full wgt:border-t wgt:border-[#E5E7EB]", l.appendChild(y);
|
|
485
485
|
const x = document.createElement("div");
|
|
486
486
|
return x.className = "wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-3 wgt:text-center wgt:text-sm wgt:text-[#9CA3AF]", x.textContent = `© ${e} Bản quyền thuộc về ATOM`, l.appendChild(x), { container: l };
|
|
487
487
|
}
|
|
@@ -494,29 +494,29 @@ function me({
|
|
|
494
494
|
}) {
|
|
495
495
|
const d = document.createElement("div");
|
|
496
496
|
d.className = "wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full wgt:shadow wgt:rounded-xl", r && d.setAttribute("data-theme", r);
|
|
497
|
-
const
|
|
498
|
-
|
|
497
|
+
const o = document.createElement("div");
|
|
498
|
+
o.className = "wgt:w-full wgt:max-w-md wgt:space-y-4 wgt:rounded-xl wgt:bg-white wgt:p-4", d.appendChild(o);
|
|
499
499
|
const {
|
|
500
500
|
container: g,
|
|
501
501
|
open: m,
|
|
502
|
-
close:
|
|
502
|
+
close: N
|
|
503
503
|
} = te();
|
|
504
504
|
d.style.position = d.style.position || "relative", d.appendChild(g);
|
|
505
505
|
const C = document.createElement("div");
|
|
506
506
|
C.className = "wgt:space-y-1";
|
|
507
|
-
const
|
|
508
|
-
|
|
507
|
+
const y = document.createElement("h3");
|
|
508
|
+
y.className = "wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center", y.textContent = t("invoiceform_title");
|
|
509
509
|
const x = document.createElement("p");
|
|
510
|
-
x.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", x.textContent = t("invoiceform_subtitle"), C.appendChild(
|
|
510
|
+
x.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", x.textContent = t("invoiceform_subtitle"), C.appendChild(y), C.appendChild(x), o.appendChild(C);
|
|
511
511
|
const c = document.createElement("div");
|
|
512
512
|
c.className = "wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";
|
|
513
513
|
function u(v, M) {
|
|
514
514
|
const V = document.createElement("div");
|
|
515
515
|
V.className = "wgt:flex wgt:items-start";
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
|
|
516
|
+
const D = document.createElement("div");
|
|
517
|
+
D.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";
|
|
518
|
+
const I = document.createElement("span");
|
|
519
|
+
I.className = "wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";
|
|
520
520
|
let A = "";
|
|
521
521
|
v === t("invoice_number") ? A = `
|
|
522
522
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -530,11 +530,11 @@ function me({
|
|
|
530
530
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
531
531
|
<path d="M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM8 12.8C9.27304 12.8 10.4939 12.2943 11.3941 11.3941C12.2943 10.4939 12.8 9.27304 12.8 8C12.8 6.72696 12.2943 5.50606 11.3941 4.60589C10.4939 3.70571 9.27304 3.2 8 3.2C6.72696 3.2 5.50606 3.70571 4.60589 4.60589C3.70571 5.50606 3.2 6.72696 3.2 8C3.2 9.27304 3.70571 10.4939 4.60589 11.3941C5.50606 12.2943 6.72696 12.8 8 12.8V12.8ZM5.9 9.2H9.2C9.27957 9.2 9.35587 9.16839 9.41213 9.11213C9.46839 9.05587 9.5 8.97957 9.5 8.9C9.5 8.82044 9.46839 8.74413 9.41213 8.68787C9.35587 8.63161 9.27957 8.6 9.2 8.6H6.8C6.40218 8.6 6.02064 8.44197 5.73934 8.16066C5.45804 7.87936 5.3 7.49783 5.3 7.1C5.3 6.70218 5.45804 6.32065 5.73934 6.03934C6.02064 5.75804 6.40218 5.6 6.8 5.6H7.4V4.4H8.6V5.6H10.1V6.8H6.8C6.72044 6.8 6.64413 6.83161 6.58787 6.88787C6.53161 6.94413 6.5 7.02044 6.5 7.1C6.5 7.17957 6.53161 7.25587 6.58787 7.31213C6.64413 7.36839 6.72044 7.4 6.8 7.4H9.2C9.59783 7.4 9.97936 7.55804 10.2607 7.83934C10.542 8.12065 10.7 8.50218 10.7 8.9C10.7 9.29783 10.542 9.67936 10.2607 9.96066C9.97936 10.242 9.59783 10.4 9.2 10.4H8.6V11.6H7.4V10.4H5.9V9.2Z" fill="currentColor"/>
|
|
532
532
|
</svg>
|
|
533
|
-
`),
|
|
533
|
+
`), I.innerHTML = A;
|
|
534
534
|
const S = document.createElement("span");
|
|
535
|
-
S.className = "wgt:text-sm wgt:text-weak-700", S.textContent = v,
|
|
535
|
+
S.className = "wgt:text-sm wgt:text-weak-700", S.textContent = v, D.appendChild(I), D.appendChild(S);
|
|
536
536
|
const h = document.createElement("span");
|
|
537
|
-
return h.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", h.textContent = M ?? "", V.appendChild(
|
|
537
|
+
return h.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", h.textContent = M ?? "", V.appendChild(D), V.appendChild(h), V;
|
|
538
538
|
}
|
|
539
539
|
c.appendChild(u(t("invoice_number"), i?.billNo)), c.appendChild(
|
|
540
540
|
u(t("address_form"), i?.address)
|
|
@@ -543,9 +543,9 @@ function me({
|
|
|
543
543
|
t("total_amount"),
|
|
544
544
|
`${G(i?.amount)} VND`
|
|
545
545
|
)
|
|
546
|
-
),
|
|
546
|
+
), o.appendChild(c);
|
|
547
547
|
const T = document.createElement("div");
|
|
548
|
-
T.className = "wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6",
|
|
548
|
+
T.className = "wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6", o.appendChild(T);
|
|
549
549
|
const k = document.createElement("div");
|
|
550
550
|
k.className = "wgt:flex wgt:border-b wgt:border-[#E1E4EA]", T.appendChild(k);
|
|
551
551
|
const s = document.createElement("button");
|
|
@@ -557,18 +557,18 @@ function me({
|
|
|
557
557
|
${t("individual")}
|
|
558
558
|
</span>
|
|
559
559
|
`;
|
|
560
|
-
const
|
|
561
|
-
|
|
560
|
+
const a = document.createElement("button");
|
|
561
|
+
a.type = "button", a.className = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold", a.innerHTML = `
|
|
562
562
|
<span class="wgt:flex wgt:items-center wgt:justify-center wgt:gap-2">
|
|
563
563
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
564
564
|
<path d="M4 3.875H11.5C11.5332 3.875 11.5654 3.88769 11.5889 3.91113C11.6123 3.93457 11.625 3.96685 11.625 4V15.875H15.875V8.625H14.375V8.375H16C16.0332 8.375 16.0654 8.38769 16.0889 8.41113C16.1123 8.43457 16.125 8.46685 16.125 8.5V15.875H17.625V16.125H2.375V15.875H3.875V4C3.875 3.96685 3.88769 3.93457 3.91113 3.91113C3.93457 3.88769 3.96685 3.875 4 3.875ZM4.125 15.875H11.375V4.125H4.125V15.875ZM8.625 9.875V10.125H6.875V9.875H8.625ZM8.625 6.875V7.125H6.875V6.875H8.625Z" fill="currentColor" stroke="currentColor" stroke-width="1.25"/>
|
|
565
565
|
</svg>
|
|
566
566
|
${t("business")}
|
|
567
567
|
</span>
|
|
568
|
-
`, k.appendChild(s), k.appendChild(
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
const f = le(),
|
|
568
|
+
`, k.appendChild(s), k.appendChild(a);
|
|
569
|
+
const p = document.createElement("div");
|
|
570
|
+
p.className = "wgt:mt-4 wgt:px-4", T.appendChild(p);
|
|
571
|
+
const f = le(), E = de({
|
|
572
572
|
defaultValues: { taxCode: l || "" },
|
|
573
573
|
onFetchByTaxCode: async (v) => {
|
|
574
574
|
const M = await ne(v);
|
|
@@ -579,15 +579,15 @@ function me({
|
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
|
-
let P = "individual",
|
|
582
|
+
let P = "individual", w = f;
|
|
583
583
|
function H(v) {
|
|
584
|
-
P = v, s.style.borderBottom = "none",
|
|
584
|
+
P = v, s.style.borderBottom = "none", a.style.borderBottom = "none";
|
|
585
585
|
const M = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold";
|
|
586
|
-
v === "individual" ? (s.className = `${M} wgt:text-strong-950`, s.style.borderBottom = "2px solid var(--primary)",
|
|
586
|
+
v === "individual" ? (s.className = `${M} wgt:text-strong-950`, s.style.borderBottom = "2px solid var(--primary)", a.className = `${M} wgt:text-soft-400`, p.innerHTML = "", p.appendChild(f.container), w = f) : (a.className = `${M} wgt:text-strong-950`, a.style.borderBottom = "2px solid var(--primary)", s.className = `${M} wgt:text-soft-400`, p.innerHTML = "", p.appendChild(E.container), w = E);
|
|
587
587
|
}
|
|
588
|
-
s.addEventListener("click", () => H("individual")),
|
|
588
|
+
s.addEventListener("click", () => H("individual")), a.addEventListener("click", () => H("business")), H("individual");
|
|
589
589
|
const L = document.createElement("p");
|
|
590
|
-
L.className = "wgt:mt-2 wgt:text-xs wgt:text-[#FF8447] wgt:text-left wgt:justify-center", L.textContent = t("invoiceform_note"),
|
|
590
|
+
L.className = "wgt:mt-2 wgt:text-xs wgt:text-[#FF8447] wgt:text-left wgt:justify-center", L.textContent = t("invoiceform_note"), o.appendChild(L);
|
|
591
591
|
const X = document.createElement("div");
|
|
592
592
|
X.className = "wgt:mt-6 wgt:w-full wgt:flex wgt:justify-center wgt:items-center";
|
|
593
593
|
const Z = O({
|
|
@@ -595,10 +595,10 @@ function me({
|
|
|
595
595
|
title: t("btn_preview"),
|
|
596
596
|
className: "wgt:min-w-[163px] wgt:text-white",
|
|
597
597
|
handleClick: () => {
|
|
598
|
-
if (!
|
|
598
|
+
if (!w.validate()) return;
|
|
599
599
|
const v = {
|
|
600
600
|
type: P,
|
|
601
|
-
data:
|
|
601
|
+
data: w.getValues()
|
|
602
602
|
}, { overlay: M } = ce({
|
|
603
603
|
type: v.type,
|
|
604
604
|
data: v.data,
|
|
@@ -614,8 +614,8 @@ function me({
|
|
|
614
614
|
const V = await e({
|
|
615
615
|
type: v.type,
|
|
616
616
|
data: v.data
|
|
617
|
-
}),
|
|
618
|
-
if (
|
|
617
|
+
}), D = V?.finalData ?? V?.data ?? V ?? {}, I = String(D?.status || "").trim().toLowerCase();
|
|
618
|
+
if (N(), I === "invoiced") {
|
|
619
619
|
Q({
|
|
620
620
|
message: t("invoice_success"),
|
|
621
621
|
description: t("invoice_description"),
|
|
@@ -626,7 +626,7 @@ function me({
|
|
|
626
626
|
}).open();
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
if (
|
|
629
|
+
if (I === "failed") {
|
|
630
630
|
Q({
|
|
631
631
|
message: t("invoice_failed"),
|
|
632
632
|
description: t("invoice_description_failed"),
|
|
@@ -639,7 +639,7 @@ function me({
|
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
} catch (V) {
|
|
642
|
-
|
|
642
|
+
N(), Q({
|
|
643
643
|
message: t("invoice_failed"),
|
|
644
644
|
description: t("invoice_description_failed"),
|
|
645
645
|
okLabel: t("close"),
|
|
@@ -654,9 +654,9 @@ function me({
|
|
|
654
654
|
document.body.appendChild(M);
|
|
655
655
|
}
|
|
656
656
|
});
|
|
657
|
-
return X.appendChild(Z),
|
|
657
|
+
return X.appendChild(Z), o.appendChild(X), { container: d };
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function we({ theme: i, onClose: n } = {}) {
|
|
660
660
|
const r = document.createElement("div");
|
|
661
661
|
r.className = " wgt:flex wgt:h-screen wgt:bg-[#F3F4F6] wgt:p-4", i && r.setAttribute("data-theme", i);
|
|
662
662
|
const e = document.createElement("div");
|
|
@@ -670,12 +670,12 @@ function pe({ theme: i, onClose: n } = {}) {
|
|
|
670
670
|
</svg>
|
|
671
671
|
|
|
672
672
|
`, l.appendChild(d), e.appendChild(l);
|
|
673
|
-
const
|
|
674
|
-
|
|
673
|
+
const o = document.createElement("h2");
|
|
674
|
+
o.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", o.textContent = t("invoiceCheckout_title"), e.appendChild(o);
|
|
675
675
|
const g = document.createElement("p");
|
|
676
676
|
return g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed", g.textContent = t("invoiceCheckout_description"), e.appendChild(g), r.appendChild(e), { container: r };
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function pe({ theme: i, onClose: n } = {}) {
|
|
679
679
|
const r = document.createElement("div");
|
|
680
680
|
r.className = "wgt:min-h-screen wgt:flex wgt:bg-[#F3F4F6] wgt:p-4", i && r.setAttribute("data-theme", i);
|
|
681
681
|
const e = document.createElement("div");
|
|
@@ -702,8 +702,8 @@ function we({ theme: i, onClose: n } = {}) {
|
|
|
702
702
|
</svg>
|
|
703
703
|
|
|
704
704
|
`, l.appendChild(d), e.appendChild(l);
|
|
705
|
-
const
|
|
706
|
-
|
|
705
|
+
const o = document.createElement("h2");
|
|
706
|
+
o.className = "wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2", o.textContent = t("invoiceExpired_title"), e.appendChild(o);
|
|
707
707
|
const g = document.createElement("p");
|
|
708
708
|
g.className = "wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed wgt:px-2 wgt:mb-3", g.textContent = t("invoiceExpired_description"), e.appendChild(g);
|
|
709
709
|
const m = document.createElement("p");
|
|
@@ -727,51 +727,51 @@ function Ee({ uuid: i, orderInfo: n, theme: r }) {
|
|
|
727
727
|
let l = !1;
|
|
728
728
|
const d = document.createElement("div");
|
|
729
729
|
d.className = "wgt:w-full", e.appendChild(d);
|
|
730
|
-
const
|
|
730
|
+
const o = ue({
|
|
731
731
|
theme: r,
|
|
732
732
|
year: 2025
|
|
733
733
|
});
|
|
734
|
-
|
|
734
|
+
o.container.classList.add("wgt:mt-1"), e.appendChild(o.container);
|
|
735
735
|
function g(s) {
|
|
736
736
|
l || (d.innerHTML = "", s && d.appendChild(s));
|
|
737
737
|
}
|
|
738
738
|
function m(s) {
|
|
739
739
|
s && console.log("[DEBUG] renderFailedPage:", s);
|
|
740
|
-
const
|
|
740
|
+
const a = se({
|
|
741
741
|
theme: r,
|
|
742
742
|
onClose: c
|
|
743
743
|
});
|
|
744
|
-
g(
|
|
744
|
+
g(a.container);
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
const s =
|
|
746
|
+
function N() {
|
|
747
|
+
const s = pe({
|
|
748
748
|
theme: r
|
|
749
749
|
});
|
|
750
750
|
g(s.container);
|
|
751
751
|
}
|
|
752
752
|
function C(s) {
|
|
753
|
-
const
|
|
753
|
+
const a = we({
|
|
754
754
|
theme: r
|
|
755
755
|
});
|
|
756
|
-
g(
|
|
756
|
+
g(a.container);
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
const
|
|
758
|
+
function y(s) {
|
|
759
|
+
const a = me({
|
|
760
760
|
orderInfo: s || {},
|
|
761
761
|
theme: r,
|
|
762
|
-
onSubmit: async ({ type:
|
|
763
|
-
const
|
|
764
|
-
if (!
|
|
762
|
+
onSubmit: async ({ type: p, data: f }) => {
|
|
763
|
+
const E = x();
|
|
764
|
+
if (!E)
|
|
765
765
|
return m({ reason: "MISSING_UUID_ON_SUBMIT" }), { ok: !1 };
|
|
766
|
-
const P = he(
|
|
767
|
-
return await fe(r,
|
|
766
|
+
const P = he(p, f);
|
|
767
|
+
return await fe(r, E, P), { ok: !0, finalData: await xe(E, r, {
|
|
768
768
|
maxTries: 20,
|
|
769
769
|
intervalMs: 1500
|
|
770
770
|
}) };
|
|
771
771
|
},
|
|
772
772
|
onBack: c
|
|
773
773
|
});
|
|
774
|
-
g(
|
|
774
|
+
g(a.container);
|
|
775
775
|
}
|
|
776
776
|
function x() {
|
|
777
777
|
const s = new URLSearchParams(window.location.search || "");
|
|
@@ -785,11 +785,14 @@ function Ee({ uuid: i, orderInfo: n, theme: r }) {
|
|
|
785
785
|
const s = x();
|
|
786
786
|
if (!s)
|
|
787
787
|
return m({ reason: "EMPTY_UUID_NO_API_CALL" });
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
return m({ reason: "API_MESSAGE", apiMsg:
|
|
791
|
-
const f = _(
|
|
792
|
-
return f === "expired" ?
|
|
788
|
+
const a = await ee(r, s), p = String(a?.message || "").trim();
|
|
789
|
+
if (p)
|
|
790
|
+
return m({ reason: "API_MESSAGE", apiMsg: p, res: a });
|
|
791
|
+
const f = _(a?.status);
|
|
792
|
+
return f === "expired" ? N() : f === "invoiced" ? C(a) : f === "failed" ? y({
|
|
793
|
+
...n || {},
|
|
794
|
+
...a || {}
|
|
795
|
+
}) : f === "pending" || f === "waiting" ? y(a || n || {}) : f === "" && a && Object.keys(a).length > 0 ? y(a) : m({ reason: "UNKNOWN_STATUS", status: f, res: a });
|
|
793
796
|
} catch (s) {
|
|
794
797
|
return console.log("[DEBUG] loadAndRender error:", s), m({ reason: "EXCEPTION", error: s?.message || s });
|
|
795
798
|
}
|
|
@@ -825,11 +828,11 @@ function he(i, n) {
|
|
|
825
828
|
async function xe(i, n, { maxTries: r = 20, intervalMs: e = 1500 } = {}) {
|
|
826
829
|
for (let d = 0; d < r; d++) {
|
|
827
830
|
await ve(e);
|
|
828
|
-
const
|
|
829
|
-
if (g === "invoiced" || g === "failed") return
|
|
831
|
+
const o = await ee(n, i), g = _(o?.status);
|
|
832
|
+
if (g === "invoiced" || g === "failed") return o;
|
|
830
833
|
if (g === "expired") {
|
|
831
834
|
const m = new Error("Invoice request expired while polling");
|
|
832
|
-
throw m.code = "EXPIRED", m.data =
|
|
835
|
+
throw m.code = "EXPIRED", m.data = o, m;
|
|
833
836
|
}
|
|
834
837
|
}
|
|
835
838
|
const l = new Error("Polling timeout: status not invoiced");
|