@spot-flow/checkout-inline-js 0.2.6 → 0.2.7-dev.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.
- package/dist/checkout-inline.es.js +763 -759
- package/dist/checkout-inline.js +52 -52
- package/package.json +1 -1
|
@@ -71,8 +71,8 @@ const Ne = (n, e, t) => {
|
|
|
71
71
|
body: JSON.stringify(e)
|
|
72
72
|
});
|
|
73
73
|
if (!a.ok) {
|
|
74
|
-
const
|
|
75
|
-
throw
|
|
74
|
+
const c = await a.json();
|
|
75
|
+
throw c.message ? c : new N("Network response was not ok", a.status);
|
|
76
76
|
}
|
|
77
77
|
return {
|
|
78
78
|
data: await a.json(),
|
|
@@ -92,8 +92,8 @@ const Ne = (n, e, t) => {
|
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
if (!a.ok) {
|
|
95
|
-
const
|
|
96
|
-
throw
|
|
95
|
+
const c = await a.json();
|
|
96
|
+
throw c.message ? c : new N("Network response was not ok", a.status);
|
|
97
97
|
}
|
|
98
98
|
return {
|
|
99
99
|
data: await a.json(),
|
|
@@ -110,8 +110,8 @@ const Ne = (n, e, t) => {
|
|
|
110
110
|
body: JSON.stringify(e)
|
|
111
111
|
});
|
|
112
112
|
if (!a.ok) {
|
|
113
|
-
const
|
|
114
|
-
throw
|
|
113
|
+
const c = await a.json();
|
|
114
|
+
throw c.message ? c : new N("Network response was not ok", a.status);
|
|
115
115
|
}
|
|
116
116
|
return {
|
|
117
117
|
data: await a.json(),
|
|
@@ -128,8 +128,8 @@ const Ne = (n, e, t) => {
|
|
|
128
128
|
body: JSON.stringify(e)
|
|
129
129
|
});
|
|
130
130
|
if (!a.ok) {
|
|
131
|
-
const
|
|
132
|
-
throw
|
|
131
|
+
const c = await a.json();
|
|
132
|
+
throw c.message ? new N(c.message, a.status) : new N("Network response was not ok", a.status);
|
|
133
133
|
}
|
|
134
134
|
return {
|
|
135
135
|
data: await a.json(),
|
|
@@ -146,8 +146,8 @@ const Ne = (n, e, t) => {
|
|
|
146
146
|
body: JSON.stringify(e)
|
|
147
147
|
});
|
|
148
148
|
if (!a.ok) {
|
|
149
|
-
const
|
|
150
|
-
throw
|
|
149
|
+
const c = await a.json();
|
|
150
|
+
throw c.message ? new N(c.message, a.status) : new N("Network response was not ok", a.status);
|
|
151
151
|
}
|
|
152
152
|
return {
|
|
153
153
|
data: await a.json(),
|
|
@@ -167,8 +167,8 @@ const Ne = (n, e, t) => {
|
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
169
|
if (!o.ok) {
|
|
170
|
-
const
|
|
171
|
-
throw
|
|
170
|
+
const l = await o.json();
|
|
171
|
+
throw l.message ? new N(l.message, o.status) : new N("Network response was not ok", o.status);
|
|
172
172
|
}
|
|
173
173
|
return {
|
|
174
174
|
data: await o.json(),
|
|
@@ -189,8 +189,8 @@ async function ml(n, e, t, i, s) {
|
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
if (!o.ok) {
|
|
192
|
-
const
|
|
193
|
-
throw
|
|
192
|
+
const c = await o.json();
|
|
193
|
+
throw c.message ? new N(c.message, o.status) : new N("Network response was not okay", o.status);
|
|
194
194
|
}
|
|
195
195
|
return await o.json();
|
|
196
196
|
} catch (o) {
|
|
@@ -261,8 +261,8 @@ const pl = async (n, e, t, i) => {
|
|
|
261
261
|
body: JSON.stringify(e)
|
|
262
262
|
});
|
|
263
263
|
if (!a.ok) {
|
|
264
|
-
const
|
|
265
|
-
throw
|
|
264
|
+
const c = await a.json();
|
|
265
|
+
throw c.message ? c : new N("Network response was not ok", a.status);
|
|
266
266
|
}
|
|
267
267
|
return {
|
|
268
268
|
data: await a.json(),
|
|
@@ -282,8 +282,8 @@ async function fl(n, e, t, i, s) {
|
|
|
282
282
|
}
|
|
283
283
|
);
|
|
284
284
|
if (!o.ok) {
|
|
285
|
-
const
|
|
286
|
-
throw
|
|
285
|
+
const c = await o.json();
|
|
286
|
+
throw c.message ? new N(c.message, o.status) : new N("Network response was not ok", o.status);
|
|
287
287
|
}
|
|
288
288
|
return o.json();
|
|
289
289
|
} catch (a) {
|
|
@@ -300,8 +300,8 @@ const gl = async (n, e, t, i) => {
|
|
|
300
300
|
}
|
|
301
301
|
);
|
|
302
302
|
if (!a.ok) {
|
|
303
|
-
const
|
|
304
|
-
throw
|
|
303
|
+
const c = await a.json();
|
|
304
|
+
throw c.message ? new N(c.message, a.status) : new N("Network response was not ok", a.status);
|
|
305
305
|
}
|
|
306
306
|
const o = await a.json();
|
|
307
307
|
return {
|
|
@@ -1423,8 +1423,8 @@ class Pl {
|
|
|
1423
1423
|
a || "static"
|
|
1424
1424
|
), window.getComputedStyle(t).position === "static" && (t.style.position = "relative"), t.classList.add("spinner-loading-active"), t instanceof HTMLButtonElement || t instanceof HTMLAnchorElement) {
|
|
1425
1425
|
if (t instanceof HTMLButtonElement) {
|
|
1426
|
-
const
|
|
1427
|
-
t.disabled = !0, t.setAttribute("data-was-disabled", String(
|
|
1426
|
+
const c = t.disabled;
|
|
1427
|
+
t.disabled = !0, t.setAttribute("data-was-disabled", String(c));
|
|
1428
1428
|
}
|
|
1429
1429
|
t.style.pointerEvents = "none", t.setAttribute(
|
|
1430
1430
|
"data-original-pointer-events",
|
|
@@ -1685,10 +1685,10 @@ const Fs = new Pl({
|
|
|
1685
1685
|
}), xe = (() => {
|
|
1686
1686
|
let n = navigator == null ? void 0 : navigator.language.split("-")[0].toLowerCase(), e = /* @__PURE__ */ new Map(), t = [], i = 0, s = [], a = !1;
|
|
1687
1687
|
const o = (f) => {
|
|
1688
|
-
n !== f && (n = f, a = !1,
|
|
1689
|
-
}, l = () => {
|
|
1690
|
-
t.forEach((f) => f(n));
|
|
1688
|
+
n !== f && (n = f, a = !1, c());
|
|
1691
1689
|
}, c = () => {
|
|
1690
|
+
t.forEach((f) => f(n));
|
|
1691
|
+
}, l = () => {
|
|
1692
1692
|
s.forEach((f) => f(i > 0));
|
|
1693
1693
|
}, p = (f) => (t.push(f), () => {
|
|
1694
1694
|
t = t.filter((w) => w !== f);
|
|
@@ -1696,10 +1696,10 @@ const Fs = new Pl({
|
|
|
1696
1696
|
if (a) return Array.isArray(f) ? f : [f];
|
|
1697
1697
|
if (w === "en" && A === "static")
|
|
1698
1698
|
return Array.isArray(f) ? f : [f];
|
|
1699
|
-
i += 1,
|
|
1699
|
+
i += 1, l();
|
|
1700
1700
|
const x = Array.isArray(f) ? `[${f.join("|")}]:${w}` : `${f}:${w}`;
|
|
1701
1701
|
if (e.has(x))
|
|
1702
|
-
return i -= 1,
|
|
1702
|
+
return i -= 1, l(), e.get(x);
|
|
1703
1703
|
try {
|
|
1704
1704
|
const E = await yl({
|
|
1705
1705
|
text: f,
|
|
@@ -1712,7 +1712,7 @@ const Fs = new Pl({
|
|
|
1712
1712
|
} catch (E) {
|
|
1713
1713
|
return console.error("Translation failed:", E), o("en"), a = !0, Array.isArray(f) ? f : [f];
|
|
1714
1714
|
} finally {
|
|
1715
|
-
i -= 1,
|
|
1715
|
+
i -= 1, l();
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
1718
1718
|
return {
|
|
@@ -1904,14 +1904,14 @@ class Gs {
|
|
|
1904
1904
|
'input[name="name"]'
|
|
1905
1905
|
), o = document.querySelector(
|
|
1906
1906
|
".details-form-button"
|
|
1907
|
-
),
|
|
1907
|
+
), c = document.querySelector("#checkoutcard"), l = this.container.querySelector(
|
|
1908
1908
|
"#enter-details-text"
|
|
1909
1909
|
), p = this.container.querySelector("#certified-text"), m = this.container.querySelector(
|
|
1910
1910
|
"#card-confirmation-text-one"
|
|
1911
1911
|
), g = this.container.querySelector(
|
|
1912
1912
|
"#card-confirmation-text-two"
|
|
1913
1913
|
);
|
|
1914
|
-
|
|
1914
|
+
l && (l.innerHTML = pe["enter-card-details"]), p && (p.innerHTML = pe.certified), m && (m.innerHTML = pe["card-confirmation-one"]), g && (g.innerHTML = pe["card-confirmation-two"]), t && (t.setAttribute(
|
|
1915
1915
|
"placeholder",
|
|
1916
1916
|
pe["card-number"]
|
|
1917
1917
|
), t.addEventListener(
|
|
@@ -1929,7 +1929,7 @@ class Gs {
|
|
|
1929
1929
|
), a.addEventListener(
|
|
1930
1930
|
"input",
|
|
1931
1931
|
(b) => this.handleInputChange(b, o)
|
|
1932
|
-
)),
|
|
1932
|
+
)), c && c.addEventListener("submit", (b) => {
|
|
1933
1933
|
var y, S, f;
|
|
1934
1934
|
b.preventDefault(), this.onAction(b)({
|
|
1935
1935
|
pan: Al(this.cardDetailsValues.number),
|
|
@@ -1953,7 +1953,7 @@ class Gs {
|
|
|
1953
1953
|
return t.reduce((s, a) => s + a, 0) % 10 === 0;
|
|
1954
1954
|
}
|
|
1955
1955
|
handleInputChange(e, t) {
|
|
1956
|
-
var
|
|
1956
|
+
var c, l, p;
|
|
1957
1957
|
const i = e.target, { name: s, value: a } = i;
|
|
1958
1958
|
let o = a;
|
|
1959
1959
|
if (a.trim() === "") {
|
|
@@ -1964,7 +1964,7 @@ class Gs {
|
|
|
1964
1964
|
o = Ml(a);
|
|
1965
1965
|
const m = o.replace(/\s+/g, ""), g = this.validateCreditCard(m);
|
|
1966
1966
|
this.filterCreditCardType(a);
|
|
1967
|
-
const b = (
|
|
1967
|
+
const b = (c = this.creditCardTypes[0]) == null ? void 0 : c.name;
|
|
1968
1968
|
b && _n.map((y) => {
|
|
1969
1969
|
if (y.name === this.currency)
|
|
1970
1970
|
if (y.cardTypes.includes(b)) {
|
|
@@ -1997,7 +1997,7 @@ class Gs {
|
|
|
1997
1997
|
} else if (s === "expiry") {
|
|
1998
1998
|
const m = /* @__PURE__ */ new Date();
|
|
1999
1999
|
o = Ll(a);
|
|
2000
|
-
const g = o.split("/"), b = (
|
|
2000
|
+
const g = o.split("/"), b = (l = g[0]) == null ? void 0 : l.trim(), y = (p = g[1]) == null ? void 0 : p.trim(), S = (/* @__PURE__ */ new Date()).getFullYear() % 100, f = m.getMonth() + 1;
|
|
2001
2001
|
let w = !0;
|
|
2002
2002
|
(parseInt(y) === S && parseInt(b) < f || parseInt(y) < S) && (w = !1), (y == null ? void 0 : y.length) === 2 && this.checkInputValidity(
|
|
2003
2003
|
w,
|
|
@@ -2053,10 +2053,10 @@ class Gs {
|
|
|
2053
2053
|
e.style.border = "";
|
|
2054
2054
|
const i = document.getElementById("card-number-error"), s = document.getElementById("expiry-error"), a = this.container.querySelector(
|
|
2055
2055
|
"#card-type"
|
|
2056
|
-
), o = document.querySelector("#card-error"),
|
|
2056
|
+
), o = document.querySelector("#card-error"), c = document.querySelector(
|
|
2057
2057
|
"#card-details"
|
|
2058
2058
|
);
|
|
2059
|
-
if (e.style.color = "#0D0716",
|
|
2059
|
+
if (e.style.color = "#0D0716", c && (c.style.border = "1px solid #9E9BA1"), o && (o.classList.remove("block"), o.classList.add("hidden")), s && s.remove(), i && i.remove(), this.cardDetailsValues = {
|
|
2060
2060
|
...this.cardDetailsValues,
|
|
2061
2061
|
[t]: ""
|
|
2062
2062
|
}, t === "number" && (a.innerHTML = `<svg width="25" height="16" viewBox="0 0 25 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -2064,28 +2064,28 @@ class Gs {
|
|
|
2064
2064
|
d="M24.5827 6.33333V14.6667C24.5827 14.8877 24.4554 15.0996 24.2288 15.2559C24.0022 15.4122 23.6948 15.5 23.3743 15.5H1.62435C1.30388 15.5 0.996535 15.4122 0.769928 15.2559C0.543322 15.0996 0.416016 14.8877 0.416016 14.6667V6.33333H24.5827ZM24.5827 4.66667H0.416016V1.33333C0.416016 1.11232 0.543322 0.900358 0.769928 0.744078C0.996535 0.587797 1.30388 0.5 1.62435 0.5H23.3743C23.6948 0.5 24.0022 0.587797 24.2288 0.744078C24.4554 0.900358 24.5827 1.11232 24.5827 1.33333V4.66667ZM16.1243 11.3333V13H20.9577V11.3333H16.1243Z"
|
|
2065
2065
|
fill="#B6B4B9" />
|
|
2066
2066
|
</svg>`), t === "expiry" && e.value.length === 0) {
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2067
|
+
const l = document.querySelector('input[name="number"]');
|
|
2068
|
+
l == null || l.focus();
|
|
2069
2069
|
}
|
|
2070
2070
|
if (t === "cvv" && e.value.length === 0) {
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2071
|
+
const l = document.querySelector('input[name="expiry"]');
|
|
2072
|
+
l == null || l.focus();
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
checkInputValidity(e, t, i, s) {
|
|
2076
2076
|
const a = document.querySelector(
|
|
2077
2077
|
"#card-details"
|
|
2078
|
-
), o = document.querySelector("#card-error"), { name:
|
|
2078
|
+
), o = document.querySelector("#card-error"), { name: c } = t;
|
|
2079
2079
|
if (!e)
|
|
2080
2080
|
a && (a.style.border = "1px solid #D62020"), o && (o.classList.remove("hidden"), o.classList.add("block"), o.setAttribute("data-translate", s), o.textContent = pe[s]), t.style.color = "#D62020";
|
|
2081
2081
|
else if (a && (a.style.border = "1px solid #9E9BA1"), o && (o.classList.remove("block"), o.classList.add("hidden")), t.style.color = "#0D0716", i) {
|
|
2082
|
-
if (
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2082
|
+
if (c === "number") {
|
|
2083
|
+
const l = document.querySelector('input[name="expiry"]');
|
|
2084
|
+
l == null || l.focus();
|
|
2085
2085
|
}
|
|
2086
|
-
if (
|
|
2087
|
-
const
|
|
2088
|
-
|
|
2086
|
+
if (c === "expiry") {
|
|
2087
|
+
const l = document.querySelector('input[name="cvv"]');
|
|
2088
|
+
l == null || l.focus();
|
|
2089
2089
|
}
|
|
2090
2090
|
}
|
|
2091
2091
|
}
|
|
@@ -2099,8 +2099,8 @@ class Gs {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
}
|
|
2101
2101
|
async function Bl(n, e) {
|
|
2102
|
-
const t = Uint8Array.from(atob(e), (
|
|
2103
|
-
return
|
|
2102
|
+
const t = Uint8Array.from(atob(e), (l) => l.charCodeAt(0)), i = crypto.getRandomValues(new Uint8Array(12)), s = new TextEncoder().encode(n), a = await crypto.subtle.importKey("raw", t, { name: "AES-GCM" }, !1, ["encrypt"]), o = await crypto.subtle.encrypt({ name: "AES-GCM", iv: i }, a, s), c = new Uint8Array(i.length + o.byteLength);
|
|
2103
|
+
return c.set(i), c.set(new Uint8Array(o), i.length), btoa(String.fromCharCode.apply(null, c));
|
|
2104
2104
|
}
|
|
2105
2105
|
const Rl = `<div id="paymentSuccess">
|
|
2106
2106
|
<div class="container-center min-h-[30dvh]">
|
|
@@ -2358,8 +2358,8 @@ class Ul {
|
|
|
2358
2358
|
var a;
|
|
2359
2359
|
e.preventDefault(), this.cardPin = "";
|
|
2360
2360
|
const s = (((a = e.clipboardData) == null ? void 0 : a.getData("text").trim()) || "").split("");
|
|
2361
|
-
t.forEach((o,
|
|
2362
|
-
o.value = s[
|
|
2361
|
+
t.forEach((o, c) => {
|
|
2362
|
+
o.value = s[c] ? "*" : "", o.style.fontSize = "1.5rem", o.style.fontWeight = "bold", this.pinValues[c] = s[c] || "";
|
|
2363
2363
|
});
|
|
2364
2364
|
for (let o = 0; o < t.length; o++)
|
|
2365
2365
|
if (!this.pinValues[o]) {
|
|
@@ -24509,10 +24509,10 @@ class Gl {
|
|
|
24509
24509
|
}, this.translatedTexts = e.translatedTexts;
|
|
24510
24510
|
}
|
|
24511
24511
|
attachListeners() {
|
|
24512
|
-
const e = this.container.querySelector("#billing-text"), t = this.container.querySelector("#address-text"), i = this.container.querySelector("#country-text"), s = this.container.querySelector("#state-text"), a = this.container.querySelector("#city-text"), o = this.container.querySelector("#zip-code-text"),
|
|
24512
|
+
const e = this.container.querySelector("#billing-text"), t = this.container.querySelector("#address-text"), i = this.container.querySelector("#country-text"), s = this.container.querySelector("#state-text"), a = this.container.querySelector("#city-text"), o = this.container.querySelector("#zip-code-text"), c = this.container.querySelector(
|
|
24513
24513
|
"#avs-form-button-text"
|
|
24514
|
-
),
|
|
24515
|
-
e && (e.innerHTML = this.translatedTexts["billing-address"]), t && (t.innerHTML = this.translatedTexts.address), i && (i.innerHTML = this.translatedTexts.country), s && (s.innerHTML = this.translatedTexts.state), a && (a.innerHTML = this.translatedTexts.city), o && (o.innerHTML = this.translatedTexts["zip-code"]),
|
|
24514
|
+
), l = this.container.querySelector("#certified-text");
|
|
24515
|
+
e && (e.innerHTML = this.translatedTexts["billing-address"]), t && (t.innerHTML = this.translatedTexts.address), i && (i.innerHTML = this.translatedTexts.country), s && (s.innerHTML = this.translatedTexts.state), a && (a.innerHTML = this.translatedTexts.city), o && (o.innerHTML = this.translatedTexts["zip-code"]), c && (c.innerHTML = this.translatedTexts.submit), l && (l.innerHTML = pe.certified);
|
|
24516
24516
|
const p = this.container.querySelector(
|
|
24517
24517
|
"input[name='address']"
|
|
24518
24518
|
), m = this.container.querySelector(
|
|
@@ -24549,13 +24549,13 @@ class Gl {
|
|
|
24549
24549
|
}
|
|
24550
24550
|
handleInputChange(e, t, i) {
|
|
24551
24551
|
const s = e.target, { name: a, value: o } = s;
|
|
24552
|
-
let
|
|
24552
|
+
let c = o;
|
|
24553
24553
|
if (a === "address" && (this.contactDetails.address = o), a === "country") {
|
|
24554
24554
|
this.contactDetails.country = o;
|
|
24555
|
-
const
|
|
24555
|
+
const l = this.countries.find(
|
|
24556
24556
|
(p) => p.value === this.contactDetails.country
|
|
24557
24557
|
);
|
|
24558
|
-
|
|
24558
|
+
l && (this.states = l.state.map((p) => ({
|
|
24559
24559
|
label: p,
|
|
24560
24560
|
value: p
|
|
24561
24561
|
})), i && (i.innerHTML = "", this.contactDetails.state = "", this.states.forEach((p) => {
|
|
@@ -24563,7 +24563,7 @@ class Gl {
|
|
|
24563
24563
|
i.appendChild(m);
|
|
24564
24564
|
})));
|
|
24565
24565
|
}
|
|
24566
|
-
if (a === "state" && (this.contactDetails.state = o), a === "city" && (this.contactDetails.city = o), a === "code" && (this.contactDetails.code = mi(o),
|
|
24566
|
+
if (a === "state" && (this.contactDetails.state = o), a === "city" && (this.contactDetails.city = o), a === "code" && (this.contactDetails.code = mi(o), c = mi(o)), s.value = c, this.validateCard())
|
|
24567
24567
|
t && t.removeAttribute("disabled");
|
|
24568
24568
|
else if (t) {
|
|
24569
24569
|
if (t.disabled)
|
|
@@ -24907,7 +24907,7 @@ class Wl {
|
|
|
24907
24907
|
"#debited-select-field"
|
|
24908
24908
|
), o = this.container.querySelector(
|
|
24909
24909
|
"#debited-select-label"
|
|
24910
|
-
),
|
|
24910
|
+
), c = this.container.querySelector("#type-select-field"), l = this.container.querySelector("#type-select-label"), p = this.container.querySelector("#filee"), m = this.container.querySelector("#file-label"), g = this.container.querySelector("#file-text"), b = this.container.querySelector("#file-icon"), y = this.container.querySelector("#file-button"), S = this.container.querySelector("#form-button"), f = document.querySelector(
|
|
24911
24911
|
"#transaction-issues-form"
|
|
24912
24912
|
);
|
|
24913
24913
|
e && (e.value = ((w = this.paymentResponse) == null ? void 0 : w.reference) || ""), t && t.addEventListener("input", (M) => {
|
|
@@ -24916,8 +24916,8 @@ class Wl {
|
|
|
24916
24916
|
this.handleInputChange(M, S);
|
|
24917
24917
|
}), a && (a.value || o && (o.classList.add("top-1/2"), o.classList.remove("inset-y-4")), a == null || a.addEventListener("change", (M) => {
|
|
24918
24918
|
this.handleInputChange(M, S), a.value ? o && (o.classList.add("inset-y-4"), o.classList.remove("top-1/2")) : o && (o.classList.add("top-1/2"), o.classList.remove("inset-y-4"));
|
|
24919
|
-
})),
|
|
24920
|
-
this.handleInputChange(M, S),
|
|
24919
|
+
})), c && (c.value || l && (l.classList.add("top-1/2"), l.classList.remove("inset-y-4")), c == null || c.addEventListener("change", (M) => {
|
|
24920
|
+
this.handleInputChange(M, S), c.value ? l && (l.classList.add("inset-y-4"), l.classList.remove("top-1/2")) : l && (l.classList.add("top-1/2"), l.classList.remove("inset-y-4"));
|
|
24921
24921
|
})), p && p.addEventListener("change", (M) => {
|
|
24922
24922
|
var D;
|
|
24923
24923
|
M.preventDefault();
|
|
@@ -25240,8 +25240,8 @@ function ec() {
|
|
|
25240
25240
|
}
|
|
25241
25241
|
function ss({ element: n, maskInputOptions: e, tagName: t, type: i, value: s, maskInputFn: a }) {
|
|
25242
25242
|
let o = s || "";
|
|
25243
|
-
const
|
|
25244
|
-
return (e[t.toLowerCase()] ||
|
|
25243
|
+
const c = i && Wn(i);
|
|
25244
|
+
return (e[t.toLowerCase()] || c && e[c]) && (a ? o = a(o, n) : o = "*".repeat(o.length)), o;
|
|
25245
25245
|
}
|
|
25246
25246
|
function Wn(n) {
|
|
25247
25247
|
return n.toLowerCase();
|
|
@@ -25255,7 +25255,7 @@ function nc(n) {
|
|
|
25255
25255
|
for (let i = 0; i < n.width; i += t)
|
|
25256
25256
|
for (let s = 0; s < n.height; s += t) {
|
|
25257
25257
|
const a = e.getImageData, o = js in a ? a[js] : a;
|
|
25258
|
-
if (new Uint32Array(o.call(e, i, s, Math.min(t, n.width - i), Math.min(t, n.height - s)).data.buffer).some((
|
|
25258
|
+
if (new Uint32Array(o.call(e, i, s, Math.min(t, n.width - i), Math.min(t, n.height - s)).data.buffer).some((l) => l !== 0))
|
|
25259
25259
|
return !1;
|
|
25260
25260
|
}
|
|
25261
25261
|
return !0;
|
|
@@ -25293,17 +25293,17 @@ function ac(n) {
|
|
|
25293
25293
|
let nt, qs;
|
|
25294
25294
|
const oc = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, rc = /^(?:[a-z+]+:)?\/\//i, lc = /^www\..*/i, cc = /^(data:)([^,]*),(.*)/i;
|
|
25295
25295
|
function bi(n, e) {
|
|
25296
|
-
return (n || "").replace(oc, (t, i, s, a, o,
|
|
25297
|
-
const
|
|
25298
|
-
if (!
|
|
25296
|
+
return (n || "").replace(oc, (t, i, s, a, o, c) => {
|
|
25297
|
+
const l = s || o || c, p = i || a || "";
|
|
25298
|
+
if (!l)
|
|
25299
25299
|
return t;
|
|
25300
|
-
if (rc.test(
|
|
25301
|
-
return `url(${p}${
|
|
25302
|
-
if (cc.test(
|
|
25303
|
-
return `url(${p}${
|
|
25304
|
-
if (
|
|
25305
|
-
return `url(${p}${ac(e) +
|
|
25306
|
-
const m = e.split("/"), g =
|
|
25300
|
+
if (rc.test(l) || lc.test(l))
|
|
25301
|
+
return `url(${p}${l}${p})`;
|
|
25302
|
+
if (cc.test(l))
|
|
25303
|
+
return `url(${p}${l}${p})`;
|
|
25304
|
+
if (l[0] === "/")
|
|
25305
|
+
return `url(${p}${ac(e) + l}${p})`;
|
|
25306
|
+
const m = e.split("/"), g = l.split("/");
|
|
25307
25307
|
m.pop();
|
|
25308
25308
|
for (const b of g)
|
|
25309
25309
|
b !== "." && (b === ".." ? m.pop() : m.push(b));
|
|
@@ -25317,8 +25317,8 @@ function hc(n, e) {
|
|
|
25317
25317
|
let t = 0;
|
|
25318
25318
|
function i(a) {
|
|
25319
25319
|
let o;
|
|
25320
|
-
const
|
|
25321
|
-
return
|
|
25320
|
+
const c = a.exec(e.substring(t));
|
|
25321
|
+
return c ? (o = c[0], t += o.length, o) : "";
|
|
25322
25322
|
}
|
|
25323
25323
|
const s = [];
|
|
25324
25324
|
for (; i(uc), !(t >= e.length); ) {
|
|
@@ -25328,19 +25328,19 @@ function hc(n, e) {
|
|
|
25328
25328
|
else {
|
|
25329
25329
|
let o = "";
|
|
25330
25330
|
a = st(n, a);
|
|
25331
|
-
let
|
|
25331
|
+
let c = !1;
|
|
25332
25332
|
for (; ; ) {
|
|
25333
|
-
const
|
|
25334
|
-
if (
|
|
25333
|
+
const l = e.charAt(t);
|
|
25334
|
+
if (l === "") {
|
|
25335
25335
|
s.push((a + o).trim());
|
|
25336
25336
|
break;
|
|
25337
|
-
} else if (
|
|
25338
|
-
|
|
25339
|
-
else if (
|
|
25337
|
+
} else if (c)
|
|
25338
|
+
l === ")" && (c = !1);
|
|
25339
|
+
else if (l === ",") {
|
|
25340
25340
|
t += 1, s.push((a + o).trim());
|
|
25341
25341
|
break;
|
|
25342
|
-
} else
|
|
25343
|
-
o +=
|
|
25342
|
+
} else l === "(" && (c = !0);
|
|
25343
|
+
o += l, t += 1;
|
|
25344
25344
|
}
|
|
25345
25345
|
}
|
|
25346
25346
|
}
|
|
@@ -25429,11 +25429,11 @@ function vc(n, e, t) {
|
|
|
25429
25429
|
return;
|
|
25430
25430
|
}
|
|
25431
25431
|
if (a !== "complete") {
|
|
25432
|
-
const
|
|
25432
|
+
const c = setTimeout(() => {
|
|
25433
25433
|
s || (e(), s = !0);
|
|
25434
25434
|
}, t);
|
|
25435
25435
|
n.addEventListener("load", () => {
|
|
25436
|
-
clearTimeout(
|
|
25436
|
+
clearTimeout(c), s = !0, e();
|
|
25437
25437
|
});
|
|
25438
25438
|
return;
|
|
25439
25439
|
}
|
|
@@ -25459,7 +25459,7 @@ function bc(n, e, t) {
|
|
|
25459
25459
|
});
|
|
25460
25460
|
}
|
|
25461
25461
|
function fc(n, e) {
|
|
25462
|
-
const { doc: t, mirror: i, blockClass: s, blockSelector: a, needsMask: o, inlineStylesheet:
|
|
25462
|
+
const { doc: t, mirror: i, blockClass: s, blockSelector: a, needsMask: o, inlineStylesheet: c, maskInputOptions: l = {}, maskTextFn: p, maskInputFn: m, dataURLOptions: g = {}, inlineImages: b, recordCanvas: y, keepIframeSrcFn: S, newlyAddedElement: f = !1 } = e, w = gc(t, i);
|
|
25463
25463
|
switch (n.nodeType) {
|
|
25464
25464
|
case n.DOCUMENT_NODE:
|
|
25465
25465
|
return n.compatMode !== "CSS1Compat" ? {
|
|
@@ -25483,8 +25483,8 @@ function fc(n, e) {
|
|
|
25483
25483
|
doc: t,
|
|
25484
25484
|
blockClass: s,
|
|
25485
25485
|
blockSelector: a,
|
|
25486
|
-
inlineStylesheet:
|
|
25487
|
-
maskInputOptions:
|
|
25486
|
+
inlineStylesheet: c,
|
|
25487
|
+
maskInputOptions: l,
|
|
25488
25488
|
maskInputFn: m,
|
|
25489
25489
|
dataURLOptions: g,
|
|
25490
25490
|
inlineImages: b,
|
|
@@ -25524,25 +25524,25 @@ function gc(n, e) {
|
|
|
25524
25524
|
function yc(n, e) {
|
|
25525
25525
|
var t;
|
|
25526
25526
|
const { needsMask: i, maskTextFn: s, rootId: a } = e, o = n.parentNode && n.parentNode.tagName;
|
|
25527
|
-
let
|
|
25528
|
-
const
|
|
25529
|
-
if (
|
|
25527
|
+
let c = n.textContent;
|
|
25528
|
+
const l = o === "STYLE" ? !0 : void 0, p = o === "SCRIPT" ? !0 : void 0;
|
|
25529
|
+
if (l && c) {
|
|
25530
25530
|
try {
|
|
25531
|
-
n.nextSibling || n.previousSibling || !((t = n.parentNode.sheet) === null || t === void 0) && t.cssRules && (
|
|
25531
|
+
n.nextSibling || n.previousSibling || !((t = n.parentNode.sheet) === null || t === void 0) && t.cssRules && (c = vi(n.parentNode.sheet));
|
|
25532
25532
|
} catch (m) {
|
|
25533
25533
|
console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`, n);
|
|
25534
25534
|
}
|
|
25535
|
-
|
|
25535
|
+
c = bi(c, os());
|
|
25536
25536
|
}
|
|
25537
|
-
return p && (
|
|
25537
|
+
return p && (c = "SCRIPT_PLACEHOLDER"), !l && !p && c && i && (c = s ? s(c, n.parentElement) : c.replace(/[\S]/g, "*")), {
|
|
25538
25538
|
type: Se.Text,
|
|
25539
|
-
textContent:
|
|
25540
|
-
isStyle:
|
|
25539
|
+
textContent: c || "",
|
|
25540
|
+
isStyle: l,
|
|
25541
25541
|
rootId: a
|
|
25542
25542
|
};
|
|
25543
25543
|
}
|
|
25544
25544
|
function Cc(n, e) {
|
|
25545
|
-
const { doc: t, blockClass: i, blockSelector: s, inlineStylesheet: a, maskInputOptions: o = {}, maskInputFn:
|
|
25545
|
+
const { doc: t, blockClass: i, blockSelector: s, inlineStylesheet: a, maskInputOptions: o = {}, maskInputFn: c, dataURLOptions: l = {}, inlineImages: p, recordCanvas: m, keepIframeSrcFn: g, newlyAddedElement: b = !1, rootId: y } = e, S = pc(n, i, s), f = sc(n);
|
|
25546
25546
|
let w = {};
|
|
25547
25547
|
const A = n.attributes.length;
|
|
25548
25548
|
for (let x = 0; x < A; x++) {
|
|
@@ -25566,16 +25566,16 @@ function Cc(n, e) {
|
|
|
25566
25566
|
tagName: f,
|
|
25567
25567
|
value: x,
|
|
25568
25568
|
maskInputOptions: o,
|
|
25569
|
-
maskInputFn:
|
|
25569
|
+
maskInputFn: c
|
|
25570
25570
|
}) : E && (w.checked = E);
|
|
25571
25571
|
}
|
|
25572
25572
|
if (f === "option" && (n.selected && !o.select ? w.selected = !0 : delete w.selected), f === "canvas" && m) {
|
|
25573
25573
|
if (n.__context === "2d")
|
|
25574
|
-
nc(n) || (w.rr_dataURL = n.toDataURL(
|
|
25574
|
+
nc(n) || (w.rr_dataURL = n.toDataURL(l.type, l.quality));
|
|
25575
25575
|
else if (!("__context" in n)) {
|
|
25576
|
-
const x = n.toDataURL(
|
|
25576
|
+
const x = n.toDataURL(l.type, l.quality), E = document.createElement("canvas");
|
|
25577
25577
|
E.width = n.width, E.height = n.height;
|
|
25578
|
-
const D = E.toDataURL(
|
|
25578
|
+
const D = E.toDataURL(l.type, l.quality);
|
|
25579
25579
|
x !== D && (w.rr_dataURL = x);
|
|
25580
25580
|
}
|
|
25581
25581
|
}
|
|
@@ -25586,7 +25586,7 @@ function Cc(n, e) {
|
|
|
25586
25586
|
const D = () => {
|
|
25587
25587
|
x.removeEventListener("load", D);
|
|
25588
25588
|
try {
|
|
25589
|
-
nt.width = x.naturalWidth, nt.height = x.naturalHeight, qs.drawImage(x, 0, 0), w.rr_dataURL = nt.toDataURL(
|
|
25589
|
+
nt.width = x.naturalWidth, nt.height = x.naturalHeight, qs.drawImage(x, 0, 0), w.rr_dataURL = nt.toDataURL(l.type, l.quality);
|
|
25590
25590
|
} catch (F) {
|
|
25591
25591
|
console.warn(`Cannot inline img src=${x.currentSrc}! Error: ${F}`);
|
|
25592
25592
|
}
|
|
@@ -25652,9 +25652,9 @@ function Sc(n, e) {
|
|
|
25652
25652
|
return !1;
|
|
25653
25653
|
}
|
|
25654
25654
|
function at(n, e) {
|
|
25655
|
-
const { doc: t, mirror: i, blockClass: s, blockSelector: a, maskTextClass: o, maskTextSelector:
|
|
25655
|
+
const { doc: t, mirror: i, blockClass: s, blockSelector: a, maskTextClass: o, maskTextSelector: c, skipChild: l = !1, inlineStylesheet: p = !0, maskInputOptions: m = {}, maskTextFn: g, maskInputFn: b, slimDOMOptions: y, dataURLOptions: S = {}, inlineImages: f = !1, recordCanvas: w = !1, onSerialize: A, onIframeLoad: M, iframeLoadTimeout: x = 5e3, onStylesheetLoad: E, stylesheetLoadTimeout: D = 5e3, keepIframeSrcFn: F = () => !1, newlyAddedElement: q = !1 } = e;
|
|
25656
25656
|
let { needsMask: G } = e, { preserveWhiteSpace: z = !0 } = e;
|
|
25657
|
-
!G && n.childNodes && (G = Wa(n, o,
|
|
25657
|
+
!G && n.childNodes && (G = Wa(n, o, c, G === void 0));
|
|
25658
25658
|
const ce = fc(n, {
|
|
25659
25659
|
doc: t,
|
|
25660
25660
|
mirror: i,
|
|
@@ -25679,7 +25679,7 @@ function at(n, e) {
|
|
|
25679
25679
|
if (i.add(n, j), Le === Tt)
|
|
25680
25680
|
return null;
|
|
25681
25681
|
A && A(n);
|
|
25682
|
-
let Be = !
|
|
25682
|
+
let Be = !l;
|
|
25683
25683
|
if (j.type === Se.Element) {
|
|
25684
25684
|
Be = Be && !j.needBlock, delete j.needBlock;
|
|
25685
25685
|
const ve = n.shadowRoot;
|
|
@@ -25694,8 +25694,8 @@ function at(n, e) {
|
|
|
25694
25694
|
blockSelector: a,
|
|
25695
25695
|
needsMask: G,
|
|
25696
25696
|
maskTextClass: o,
|
|
25697
|
-
maskTextSelector:
|
|
25698
|
-
skipChild:
|
|
25697
|
+
maskTextSelector: c,
|
|
25698
|
+
skipChild: l,
|
|
25699
25699
|
inlineStylesheet: p,
|
|
25700
25700
|
maskInputOptions: m,
|
|
25701
25701
|
maskTextFn: g,
|
|
@@ -25732,7 +25732,7 @@ function at(n, e) {
|
|
|
25732
25732
|
blockSelector: a,
|
|
25733
25733
|
needsMask: G,
|
|
25734
25734
|
maskTextClass: o,
|
|
25735
|
-
maskTextSelector:
|
|
25735
|
+
maskTextSelector: c,
|
|
25736
25736
|
skipChild: !1,
|
|
25737
25737
|
inlineStylesheet: p,
|
|
25738
25738
|
maskInputOptions: m,
|
|
@@ -25761,7 +25761,7 @@ function at(n, e) {
|
|
|
25761
25761
|
blockSelector: a,
|
|
25762
25762
|
needsMask: G,
|
|
25763
25763
|
maskTextClass: o,
|
|
25764
|
-
maskTextSelector:
|
|
25764
|
+
maskTextSelector: c,
|
|
25765
25765
|
skipChild: !1,
|
|
25766
25766
|
inlineStylesheet: p,
|
|
25767
25767
|
maskInputOptions: m,
|
|
@@ -25784,7 +25784,7 @@ function at(n, e) {
|
|
|
25784
25784
|
}, D), j;
|
|
25785
25785
|
}
|
|
25786
25786
|
function wc(n, e) {
|
|
25787
|
-
const { mirror: t = new Ka(), blockClass: i = "rr-block", blockSelector: s = null, maskTextClass: a = "rr-mask", maskTextSelector: o = null, inlineStylesheet:
|
|
25787
|
+
const { mirror: t = new Ka(), blockClass: i = "rr-block", blockSelector: s = null, maskTextClass: a = "rr-mask", maskTextSelector: o = null, inlineStylesheet: c = !0, inlineImages: l = !1, recordCanvas: p = !1, maskAllInputs: m = !1, maskTextFn: g, maskInputFn: b, slimDOM: y = !1, dataURLOptions: S, preserveWhiteSpace: f, onSerialize: w, onIframeLoad: A, iframeLoadTimeout: M, onStylesheetLoad: x, stylesheetLoadTimeout: E, keepIframeSrcFn: D = () => !1 } = e || {};
|
|
25788
25788
|
return at(n, {
|
|
25789
25789
|
doc: n,
|
|
25790
25790
|
mirror: t,
|
|
@@ -25793,7 +25793,7 @@ function wc(n, e) {
|
|
|
25793
25793
|
maskTextClass: a,
|
|
25794
25794
|
maskTextSelector: o,
|
|
25795
25795
|
skipChild: !1,
|
|
25796
|
-
inlineStylesheet:
|
|
25796
|
+
inlineStylesheet: c,
|
|
25797
25797
|
maskInputOptions: m === !0 ? {
|
|
25798
25798
|
color: !0,
|
|
25799
25799
|
date: !0,
|
|
@@ -25829,7 +25829,7 @@ function wc(n, e) {
|
|
|
25829
25829
|
headMetaVerification: !0
|
|
25830
25830
|
} : y === !1 ? {} : y,
|
|
25831
25831
|
dataURLOptions: S,
|
|
25832
|
-
inlineImages:
|
|
25832
|
+
inlineImages: l,
|
|
25833
25833
|
recordCanvas: p,
|
|
25834
25834
|
preserveWhiteSpace: f,
|
|
25835
25835
|
onSerialize: w,
|
|
@@ -25876,10 +25876,10 @@ function _t(n, e, t = {}) {
|
|
|
25876
25876
|
return function(...a) {
|
|
25877
25877
|
const o = Date.now();
|
|
25878
25878
|
!s && t.leading === !1 && (s = o);
|
|
25879
|
-
const
|
|
25880
|
-
|
|
25881
|
-
s = t.leading === !1 ? 0 : Date.now(), i = null, n.apply(
|
|
25882
|
-
},
|
|
25879
|
+
const c = e - (o - s), l = this;
|
|
25880
|
+
c <= 0 || c > e ? (i && (clearTimeout(i), i = null), s = o, n.apply(l, a)) : !i && t.trailing !== !1 && (i = setTimeout(() => {
|
|
25881
|
+
s = t.leading === !1 ? 0 : Date.now(), i = null, n.apply(l, a);
|
|
25882
|
+
}, c));
|
|
25883
25883
|
};
|
|
25884
25884
|
}
|
|
25885
25885
|
function Li(n, e, t, i, s = window) {
|
|
@@ -25915,10 +25915,10 @@ let gi = Date.now;
|
|
|
25915
25915
|
/[1-9][0-9]{12}/.test(Date.now().toString()) || (gi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
25916
25916
|
function Za(n) {
|
|
25917
25917
|
var e, t, i, s, a, o;
|
|
25918
|
-
const
|
|
25918
|
+
const c = n.document;
|
|
25919
25919
|
return {
|
|
25920
|
-
left:
|
|
25921
|
-
top:
|
|
25920
|
+
left: c.scrollingElement ? c.scrollingElement.scrollLeft : n.pageXOffset !== void 0 ? n.pageXOffset : (c == null ? void 0 : c.documentElement.scrollLeft) || ((t = (e = c == null ? void 0 : c.body) === null || e === void 0 ? void 0 : e.parentElement) === null || t === void 0 ? void 0 : t.scrollLeft) || ((i = c == null ? void 0 : c.body) === null || i === void 0 ? void 0 : i.scrollLeft) || 0,
|
|
25921
|
+
top: c.scrollingElement ? c.scrollingElement.scrollTop : n.pageYOffset !== void 0 ? n.pageYOffset : (c == null ? void 0 : c.documentElement.scrollTop) || ((a = (s = c == null ? void 0 : c.body) === null || s === void 0 ? void 0 : s.parentElement) === null || a === void 0 ? void 0 : a.scrollTop) || ((o = c == null ? void 0 : c.body) === null || o === void 0 ? void 0 : o.scrollTop) || 0
|
|
25922
25922
|
};
|
|
25923
25923
|
}
|
|
25924
25924
|
function Qa() {
|
|
@@ -26076,18 +26076,18 @@ class _c {
|
|
|
26076
26076
|
}, this.emit = () => {
|
|
26077
26077
|
if (this.frozen || this.locked)
|
|
26078
26078
|
return;
|
|
26079
|
-
const e = [], t = /* @__PURE__ */ new Set(), i = new Tc(), s = (
|
|
26080
|
-
let p =
|
|
26079
|
+
const e = [], t = /* @__PURE__ */ new Set(), i = new Tc(), s = (l) => {
|
|
26080
|
+
let p = l, m = Tt;
|
|
26081
26081
|
for (; m === Tt; )
|
|
26082
26082
|
p = p && p.nextSibling, m = p && this.mirror.getId(p);
|
|
26083
26083
|
return m;
|
|
26084
|
-
}, a = (
|
|
26085
|
-
if (!
|
|
26084
|
+
}, a = (l) => {
|
|
26085
|
+
if (!l.parentNode || !to(l) || l.parentNode.tagName === "TEXTAREA")
|
|
26086
26086
|
return;
|
|
26087
|
-
const p = kt(
|
|
26087
|
+
const p = kt(l.parentNode) ? this.mirror.getId(no(l)) : this.mirror.getId(l.parentNode), m = s(l);
|
|
26088
26088
|
if (p === -1 || m === -1)
|
|
26089
|
-
return i.addNode(
|
|
26090
|
-
const g = at(
|
|
26089
|
+
return i.addNode(l);
|
|
26090
|
+
const g = at(l, {
|
|
26091
26091
|
doc: this.doc,
|
|
26092
26092
|
mirror: this.mirror,
|
|
26093
26093
|
blockClass: this.blockClass,
|
|
@@ -26105,7 +26105,7 @@ class _c {
|
|
|
26105
26105
|
recordCanvas: this.recordCanvas,
|
|
26106
26106
|
inlineImages: this.inlineImages,
|
|
26107
26107
|
onSerialize: (b) => {
|
|
26108
|
-
$a(b, this.mirror) && this.iframeManager.addIframe(b), eo(b, this.mirror) && this.stylesheetManager.trackLinkElement(b), Yi(
|
|
26108
|
+
$a(b, this.mirror) && this.iframeManager.addIframe(b), eo(b, this.mirror) && this.stylesheetManager.trackLinkElement(b), Yi(l) && this.shadowDomManager.addShadowRoot(l.shadowRoot, this.doc);
|
|
26109
26109
|
},
|
|
26110
26110
|
onIframeLoad: (b, y) => {
|
|
26111
26111
|
this.iframeManager.attachIframe(b, y), this.shadowDomManager.observeAttachShadow(b);
|
|
@@ -26122,18 +26122,18 @@ class _c {
|
|
|
26122
26122
|
};
|
|
26123
26123
|
for (; this.mapRemoves.length; )
|
|
26124
26124
|
this.mirror.removeNodeFromMap(this.mapRemoves.shift());
|
|
26125
|
-
for (const
|
|
26126
|
-
Qs(this.removes,
|
|
26127
|
-
for (const
|
|
26128
|
-
!Js(this.droppedSet,
|
|
26125
|
+
for (const l of this.movedSet)
|
|
26126
|
+
Qs(this.removes, l, this.mirror) && !this.movedSet.has(l.parentNode) || a(l);
|
|
26127
|
+
for (const l of this.addedSet)
|
|
26128
|
+
!Js(this.droppedSet, l) && !Qs(this.removes, l, this.mirror) || Js(this.movedSet, l) ? a(l) : this.droppedSet.add(l);
|
|
26129
26129
|
let o = null;
|
|
26130
26130
|
for (; i.length; ) {
|
|
26131
|
-
let
|
|
26131
|
+
let l = null;
|
|
26132
26132
|
if (o) {
|
|
26133
26133
|
const p = this.mirror.getId(o.value.parentNode), m = s(o.value);
|
|
26134
|
-
p !== -1 && m !== -1 && (
|
|
26134
|
+
p !== -1 && m !== -1 && (l = o);
|
|
26135
26135
|
}
|
|
26136
|
-
if (!
|
|
26136
|
+
if (!l) {
|
|
26137
26137
|
let p = i.tail;
|
|
26138
26138
|
for (; p; ) {
|
|
26139
26139
|
const m = p;
|
|
@@ -26142,14 +26142,14 @@ class _c {
|
|
|
26142
26142
|
if (s(m.value) === -1)
|
|
26143
26143
|
continue;
|
|
26144
26144
|
if (g !== -1) {
|
|
26145
|
-
|
|
26145
|
+
l = m;
|
|
26146
26146
|
break;
|
|
26147
26147
|
} else {
|
|
26148
26148
|
const y = m.value;
|
|
26149
26149
|
if (y.parentNode && y.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
26150
26150
|
const S = y.parentNode.host;
|
|
26151
26151
|
if (this.mirror.getId(S) !== -1) {
|
|
26152
|
-
|
|
26152
|
+
l = m;
|
|
26153
26153
|
break;
|
|
26154
26154
|
}
|
|
26155
26155
|
}
|
|
@@ -26157,36 +26157,36 @@ class _c {
|
|
|
26157
26157
|
}
|
|
26158
26158
|
}
|
|
26159
26159
|
}
|
|
26160
|
-
if (!
|
|
26160
|
+
if (!l) {
|
|
26161
26161
|
for (; i.head; )
|
|
26162
26162
|
i.removeNode(i.head.value);
|
|
26163
26163
|
break;
|
|
26164
26164
|
}
|
|
26165
|
-
o =
|
|
26165
|
+
o = l.previous, i.removeNode(l.value), a(l.value);
|
|
26166
26166
|
}
|
|
26167
|
-
const
|
|
26168
|
-
texts: this.texts.map((
|
|
26169
|
-
const p =
|
|
26167
|
+
const c = {
|
|
26168
|
+
texts: this.texts.map((l) => {
|
|
26169
|
+
const p = l.node;
|
|
26170
26170
|
return p.parentNode && p.parentNode.tagName === "TEXTAREA" && this.genTextAreaValueMutation(p.parentNode), {
|
|
26171
26171
|
id: this.mirror.getId(p),
|
|
26172
|
-
value:
|
|
26172
|
+
value: l.value
|
|
26173
26173
|
};
|
|
26174
|
-
}).filter((
|
|
26175
|
-
attributes: this.attributes.map((
|
|
26176
|
-
const { attributes: p } =
|
|
26174
|
+
}).filter((l) => !t.has(l.id)).filter((l) => this.mirror.has(l.id)),
|
|
26175
|
+
attributes: this.attributes.map((l) => {
|
|
26176
|
+
const { attributes: p } = l;
|
|
26177
26177
|
if (typeof p.style == "string") {
|
|
26178
|
-
const m = JSON.stringify(
|
|
26179
|
-
m.length < p.style.length && (m + g).split("var(").length === p.style.split("var(").length && (p.style =
|
|
26178
|
+
const m = JSON.stringify(l.styleDiff), g = JSON.stringify(l._unchangedStyles);
|
|
26179
|
+
m.length < p.style.length && (m + g).split("var(").length === p.style.split("var(").length && (p.style = l.styleDiff);
|
|
26180
26180
|
}
|
|
26181
26181
|
return {
|
|
26182
|
-
id: this.mirror.getId(
|
|
26182
|
+
id: this.mirror.getId(l.node),
|
|
26183
26183
|
attributes: p
|
|
26184
26184
|
};
|
|
26185
|
-
}).filter((
|
|
26185
|
+
}).filter((l) => !t.has(l.id)).filter((l) => this.mirror.has(l.id)),
|
|
26186
26186
|
removes: this.removes,
|
|
26187
26187
|
adds: e
|
|
26188
26188
|
};
|
|
26189
|
-
!
|
|
26189
|
+
!c.texts.length && !c.attributes.length && !c.removes.length && !c.adds.length || (this.texts = [], this.attributes = [], this.attributeMap = /* @__PURE__ */ new WeakMap(), this.removes = [], this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.movedMap = {}, this.mutationCb(c));
|
|
26190
26190
|
}, this.genTextAreaValueMutation = (e) => {
|
|
26191
26191
|
let t = this.attributeMap.get(e);
|
|
26192
26192
|
t || (t = {
|
|
@@ -26242,12 +26242,12 @@ class _c {
|
|
|
26242
26242
|
}
|
|
26243
26243
|
const o = this.unattachedDoc.createElement("span");
|
|
26244
26244
|
e.oldValue && o.setAttribute("style", e.oldValue);
|
|
26245
|
-
for (const
|
|
26246
|
-
const
|
|
26247
|
-
|
|
26245
|
+
for (const c of Array.from(t.style)) {
|
|
26246
|
+
const l = t.style.getPropertyValue(c), p = t.style.getPropertyPriority(c);
|
|
26247
|
+
l !== o.style.getPropertyValue(c) || p !== o.style.getPropertyPriority(c) ? p === "" ? a.styleDiff[c] = l : a.styleDiff[c] = [l, p] : a._unchangedStyles[c] = [l, p];
|
|
26248
26248
|
}
|
|
26249
|
-
for (const
|
|
26250
|
-
t.style.getPropertyValue(
|
|
26249
|
+
for (const c of Array.from(o.style))
|
|
26250
|
+
t.style.getPropertyValue(c) === "" && (a.styleDiff[c] = !1);
|
|
26251
26251
|
}
|
|
26252
26252
|
break;
|
|
26253
26253
|
}
|
|
@@ -26386,33 +26386,33 @@ function ao(n, e) {
|
|
|
26386
26386
|
let a = window.MutationObserver || window.__rrMutationObserver;
|
|
26387
26387
|
const o = (i = (t = window == null ? void 0 : window.Zone) === null || t === void 0 ? void 0 : t.__symbol__) === null || i === void 0 ? void 0 : i.call(t, "MutationObserver");
|
|
26388
26388
|
o && window[o] && (a = window[o]);
|
|
26389
|
-
const
|
|
26390
|
-
return
|
|
26389
|
+
const c = new a(Y(s.processMutations.bind(s)));
|
|
26390
|
+
return c.observe(e, {
|
|
26391
26391
|
attributes: !0,
|
|
26392
26392
|
attributeOldValue: !0,
|
|
26393
26393
|
characterData: !0,
|
|
26394
26394
|
characterDataOldValue: !0,
|
|
26395
26395
|
childList: !0,
|
|
26396
26396
|
subtree: !0
|
|
26397
|
-
}),
|
|
26397
|
+
}), c;
|
|
26398
26398
|
}
|
|
26399
26399
|
function Ic({ mousemoveCb: n, sampling: e, doc: t, mirror: i }) {
|
|
26400
26400
|
if (e.mousemove === !1)
|
|
26401
26401
|
return () => {
|
|
26402
26402
|
};
|
|
26403
26403
|
const s = typeof e.mousemove == "number" ? e.mousemove : 50, a = typeof e.mousemoveCallback == "number" ? e.mousemoveCallback : 500;
|
|
26404
|
-
let o = [],
|
|
26405
|
-
const
|
|
26406
|
-
const b = Date.now() -
|
|
26407
|
-
n(o.map((y) => (y.timeOffset -= b, y)), g), o = [],
|
|
26404
|
+
let o = [], c;
|
|
26405
|
+
const l = _t(Y((g) => {
|
|
26406
|
+
const b = Date.now() - c;
|
|
26407
|
+
n(o.map((y) => (y.timeOffset -= b, y)), g), o = [], c = null;
|
|
26408
26408
|
}), a), p = Y(_t(Y((g) => {
|
|
26409
26409
|
const b = It(g), { clientX: y, clientY: S } = Ji(g) ? g.changedTouches[0] : g;
|
|
26410
|
-
|
|
26410
|
+
c || (c = gi()), o.push({
|
|
26411
26411
|
x: y,
|
|
26412
26412
|
y: S,
|
|
26413
26413
|
id: i.getId(b),
|
|
26414
|
-
timeOffset: gi() -
|
|
26415
|
-
}),
|
|
26414
|
+
timeOffset: gi() - c
|
|
26415
|
+
}), l(typeof DragEvent < "u" && g instanceof DragEvent ? J.Drag : g instanceof MouseEvent ? J.MouseMove : J.TouchMove);
|
|
26416
26416
|
}), s, {
|
|
26417
26417
|
trailing: !1
|
|
26418
26418
|
})), m = [
|
|
@@ -26428,8 +26428,8 @@ function Dc({ mouseInteractionCb: n, doc: e, mirror: t, blockClass: i, blockSele
|
|
|
26428
26428
|
if (a.mouseInteraction === !1)
|
|
26429
26429
|
return () => {
|
|
26430
26430
|
};
|
|
26431
|
-
const o = a.mouseInteraction === !0 || a.mouseInteraction === void 0 ? {} : a.mouseInteraction,
|
|
26432
|
-
let
|
|
26431
|
+
const o = a.mouseInteraction === !0 || a.mouseInteraction === void 0 ? {} : a.mouseInteraction, c = [];
|
|
26432
|
+
let l = null;
|
|
26433
26433
|
const p = (m) => (g) => {
|
|
26434
26434
|
const b = It(g);
|
|
26435
26435
|
if (He(b, i, s, !0))
|
|
@@ -26449,7 +26449,7 @@ function Dc({ mouseInteractionCb: n, doc: e, mirror: t, blockClass: i, blockSele
|
|
|
26449
26449
|
}
|
|
26450
26450
|
y === gn.Touch ? Ue[m] === Ue.MouseDown ? S = "TouchStart" : Ue[m] === Ue.MouseUp && (S = "TouchEnd") : gn.Pen;
|
|
26451
26451
|
} else Ji(g) && (y = gn.Touch);
|
|
26452
|
-
y !== null ? (
|
|
26452
|
+
y !== null ? (l = y, (S.startsWith("Touch") && y === gn.Touch || S.startsWith("Mouse") && y === gn.Mouse) && (y = null)) : Ue[m] === Ue.Click && (y = l, l = null);
|
|
26453
26453
|
const f = Ji(g) ? g.changedTouches[0] : g;
|
|
26454
26454
|
if (!f)
|
|
26455
26455
|
return;
|
|
@@ -26469,18 +26469,18 @@ function Dc({ mouseInteractionCb: n, doc: e, mirror: t, blockClass: i, blockSele
|
|
|
26469
26469
|
case Ue.TouchEnd:
|
|
26470
26470
|
return;
|
|
26471
26471
|
}
|
|
26472
|
-
|
|
26472
|
+
c.push(Re(g, b, e));
|
|
26473
26473
|
}), Y(() => {
|
|
26474
|
-
|
|
26474
|
+
c.forEach((m) => m());
|
|
26475
26475
|
});
|
|
26476
26476
|
}
|
|
26477
26477
|
function oo({ scrollCb: n, doc: e, mirror: t, blockClass: i, blockSelector: s, sampling: a }) {
|
|
26478
|
-
const o = Y(_t(Y((
|
|
26479
|
-
const
|
|
26480
|
-
if (!
|
|
26478
|
+
const o = Y(_t(Y((c) => {
|
|
26479
|
+
const l = It(c);
|
|
26480
|
+
if (!l || He(l, i, s, !0))
|
|
26481
26481
|
return;
|
|
26482
|
-
const p = t.getId(
|
|
26483
|
-
if (
|
|
26482
|
+
const p = t.getId(l);
|
|
26483
|
+
if (l === e && e.defaultView) {
|
|
26484
26484
|
const m = Za(e.defaultView);
|
|
26485
26485
|
n({
|
|
26486
26486
|
id: p,
|
|
@@ -26490,8 +26490,8 @@ function oo({ scrollCb: n, doc: e, mirror: t, blockClass: i, blockSelector: s, s
|
|
|
26490
26490
|
} else
|
|
26491
26491
|
n({
|
|
26492
26492
|
id: p,
|
|
26493
|
-
x:
|
|
26494
|
-
y:
|
|
26493
|
+
x: l.scrollLeft,
|
|
26494
|
+
y: l.scrollTop
|
|
26495
26495
|
});
|
|
26496
26496
|
}), a.scroll || 100));
|
|
26497
26497
|
return Re("scroll", o, e);
|
|
@@ -26508,7 +26508,7 @@ function Bc({ viewportResizeCb: n }, { win: e }) {
|
|
|
26508
26508
|
return Re("resize", s, e);
|
|
26509
26509
|
}
|
|
26510
26510
|
const Rc = ["INPUT", "TEXTAREA", "SELECT"], Ys = /* @__PURE__ */ new WeakMap();
|
|
26511
|
-
function Hc({ inputCb: n, doc: e, mirror: t, blockClass: i, blockSelector: s, ignoreClass: a, ignoreSelector: o, maskInputOptions:
|
|
26511
|
+
function Hc({ inputCb: n, doc: e, mirror: t, blockClass: i, blockSelector: s, ignoreClass: a, ignoreSelector: o, maskInputOptions: c, maskInputFn: l, sampling: p, userTriggeredOnInput: m }) {
|
|
26512
26512
|
function g(M) {
|
|
26513
26513
|
let x = It(M);
|
|
26514
26514
|
const E = M.isTrusted, D = x && x.tagName;
|
|
@@ -26516,13 +26516,13 @@ function Hc({ inputCb: n, doc: e, mirror: t, blockClass: i, blockSelector: s, ig
|
|
|
26516
26516
|
return;
|
|
26517
26517
|
let F = x.value, q = !1;
|
|
26518
26518
|
const G = as(x) || "";
|
|
26519
|
-
G === "radio" || G === "checkbox" ? q = x.checked : (
|
|
26519
|
+
G === "radio" || G === "checkbox" ? q = x.checked : (c[D.toLowerCase()] || c[G]) && (F = ss({
|
|
26520
26520
|
element: x,
|
|
26521
|
-
maskInputOptions:
|
|
26521
|
+
maskInputOptions: c,
|
|
26522
26522
|
tagName: D,
|
|
26523
26523
|
type: G,
|
|
26524
26524
|
value: F,
|
|
26525
|
-
maskInputFn:
|
|
26525
|
+
maskInputFn: l
|
|
26526
26526
|
})), b(x, m ? { text: F, isChecked: q, userTriggered: E } : { text: F, isChecked: q });
|
|
26527
26527
|
const z = x.name;
|
|
26528
26528
|
G === "radio" && z && q && e.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach((ce) => {
|
|
@@ -26622,8 +26622,8 @@ function Nc({ styleSheetRuleCb: n, mirror: e, stylesheetManager: t }, { win: i }
|
|
|
26622
26622
|
}), m.apply(g, b);
|
|
26623
26623
|
})
|
|
26624
26624
|
}));
|
|
26625
|
-
let
|
|
26626
|
-
i.CSSStyleSheet.prototype.replaceSync && (
|
|
26625
|
+
let c;
|
|
26626
|
+
i.CSSStyleSheet.prototype.replaceSync && (c = i.CSSStyleSheet.prototype.replaceSync, i.CSSStyleSheet.prototype.replaceSync = new Proxy(c, {
|
|
26627
26627
|
apply: Y((m, g, b) => {
|
|
26628
26628
|
const [y] = b, { id: S, styleId: f } = Ln(g, e, t.styleMirror);
|
|
26629
26629
|
return (S && S !== -1 || f && f !== -1) && n({
|
|
@@ -26633,10 +26633,10 @@ function Nc({ styleSheetRuleCb: n, mirror: e, stylesheetManager: t }, { win: i }
|
|
|
26633
26633
|
}), m.apply(g, b);
|
|
26634
26634
|
})
|
|
26635
26635
|
}));
|
|
26636
|
-
const
|
|
26637
|
-
ai("CSSGroupingRule") ?
|
|
26636
|
+
const l = {};
|
|
26637
|
+
ai("CSSGroupingRule") ? l.CSSGroupingRule = i.CSSGroupingRule : (ai("CSSMediaRule") && (l.CSSMediaRule = i.CSSMediaRule), ai("CSSConditionRule") && (l.CSSConditionRule = i.CSSConditionRule), ai("CSSSupportsRule") && (l.CSSSupportsRule = i.CSSSupportsRule));
|
|
26638
26638
|
const p = {};
|
|
26639
|
-
return Object.entries(
|
|
26639
|
+
return Object.entries(l).forEach(([m, g]) => {
|
|
26640
26640
|
p[m] = {
|
|
26641
26641
|
insertRule: g.prototype.insertRule,
|
|
26642
26642
|
deleteRule: g.prototype.deleteRule
|
|
@@ -26670,7 +26670,7 @@ function Nc({ styleSheetRuleCb: n, mirror: e, stylesheetManager: t }, { win: i }
|
|
|
26670
26670
|
})
|
|
26671
26671
|
});
|
|
26672
26672
|
}), Y(() => {
|
|
26673
|
-
i.CSSStyleSheet.prototype.insertRule = s, i.CSSStyleSheet.prototype.deleteRule = a, o && (i.CSSStyleSheet.prototype.replace = o),
|
|
26673
|
+
i.CSSStyleSheet.prototype.insertRule = s, i.CSSStyleSheet.prototype.deleteRule = a, o && (i.CSSStyleSheet.prototype.replace = o), c && (i.CSSStyleSheet.prototype.replaceSync = c), Object.entries(l).forEach(([m, g]) => {
|
|
26674
26674
|
g.prototype.insertRule = p[m].insertRule, g.prototype.deleteRule = p[m].deleteRule;
|
|
26675
26675
|
});
|
|
26676
26676
|
});
|
|
@@ -26679,18 +26679,18 @@ function ro({ mirror: n, stylesheetManager: e }, t) {
|
|
|
26679
26679
|
var i, s, a;
|
|
26680
26680
|
let o = null;
|
|
26681
26681
|
t.nodeName === "#document" ? o = n.getId(t) : o = n.getId(t.host);
|
|
26682
|
-
const
|
|
26683
|
-
return o === null || o === -1 || !
|
|
26682
|
+
const c = t.nodeName === "#document" ? (i = t.defaultView) === null || i === void 0 ? void 0 : i.Document : (a = (s = t.ownerDocument) === null || s === void 0 ? void 0 : s.defaultView) === null || a === void 0 ? void 0 : a.ShadowRoot, l = c != null && c.prototype ? Object.getOwnPropertyDescriptor(c == null ? void 0 : c.prototype, "adoptedStyleSheets") : void 0;
|
|
26683
|
+
return o === null || o === -1 || !c || !l ? () => {
|
|
26684
26684
|
} : (Object.defineProperty(t, "adoptedStyleSheets", {
|
|
26685
|
-
configurable:
|
|
26686
|
-
enumerable:
|
|
26685
|
+
configurable: l.configurable,
|
|
26686
|
+
enumerable: l.enumerable,
|
|
26687
26687
|
get() {
|
|
26688
26688
|
var p;
|
|
26689
|
-
return (p =
|
|
26689
|
+
return (p = l.get) === null || p === void 0 ? void 0 : p.call(this);
|
|
26690
26690
|
},
|
|
26691
26691
|
set(p) {
|
|
26692
26692
|
var m;
|
|
26693
|
-
const g = (m =
|
|
26693
|
+
const g = (m = l.set) === null || m === void 0 ? void 0 : m.call(this, p);
|
|
26694
26694
|
if (o !== null && o !== -1)
|
|
26695
26695
|
try {
|
|
26696
26696
|
e.adoptStyleSheets(p, o);
|
|
@@ -26700,22 +26700,22 @@ function ro({ mirror: n, stylesheetManager: e }, t) {
|
|
|
26700
26700
|
}
|
|
26701
26701
|
}), Y(() => {
|
|
26702
26702
|
Object.defineProperty(t, "adoptedStyleSheets", {
|
|
26703
|
-
configurable:
|
|
26704
|
-
enumerable:
|
|
26705
|
-
get:
|
|
26706
|
-
set:
|
|
26703
|
+
configurable: l.configurable,
|
|
26704
|
+
enumerable: l.enumerable,
|
|
26705
|
+
get: l.get,
|
|
26706
|
+
set: l.set
|
|
26707
26707
|
});
|
|
26708
26708
|
}));
|
|
26709
26709
|
}
|
|
26710
26710
|
function Oc({ styleDeclarationCb: n, mirror: e, ignoreCSSAttributes: t, stylesheetManager: i }, { win: s }) {
|
|
26711
26711
|
const a = s.CSSStyleDeclaration.prototype.setProperty;
|
|
26712
26712
|
s.CSSStyleDeclaration.prototype.setProperty = new Proxy(a, {
|
|
26713
|
-
apply: Y((
|
|
26713
|
+
apply: Y((c, l, p) => {
|
|
26714
26714
|
var m;
|
|
26715
26715
|
const [g, b, y] = p;
|
|
26716
26716
|
if (t.has(g))
|
|
26717
|
-
return a.apply(
|
|
26718
|
-
const { id: S, styleId: f } = Ln((m =
|
|
26717
|
+
return a.apply(l, [g, b, y]);
|
|
26718
|
+
const { id: S, styleId: f } = Ln((m = l.parentRule) === null || m === void 0 ? void 0 : m.parentStyleSheet, e, i.styleMirror);
|
|
26719
26719
|
return (S && S !== -1 || f && f !== -1) && n({
|
|
26720
26720
|
id: S,
|
|
26721
26721
|
styleId: f,
|
|
@@ -26724,39 +26724,39 @@ function Oc({ styleDeclarationCb: n, mirror: e, ignoreCSSAttributes: t, styleshe
|
|
|
26724
26724
|
value: b,
|
|
26725
26725
|
priority: y
|
|
26726
26726
|
},
|
|
26727
|
-
index: yi(
|
|
26728
|
-
}),
|
|
26727
|
+
index: yi(l.parentRule)
|
|
26728
|
+
}), c.apply(l, p);
|
|
26729
26729
|
})
|
|
26730
26730
|
});
|
|
26731
26731
|
const o = s.CSSStyleDeclaration.prototype.removeProperty;
|
|
26732
26732
|
return s.CSSStyleDeclaration.prototype.removeProperty = new Proxy(o, {
|
|
26733
|
-
apply: Y((
|
|
26733
|
+
apply: Y((c, l, p) => {
|
|
26734
26734
|
var m;
|
|
26735
26735
|
const [g] = p;
|
|
26736
26736
|
if (t.has(g))
|
|
26737
|
-
return o.apply(
|
|
26738
|
-
const { id: b, styleId: y } = Ln((m =
|
|
26737
|
+
return o.apply(l, [g]);
|
|
26738
|
+
const { id: b, styleId: y } = Ln((m = l.parentRule) === null || m === void 0 ? void 0 : m.parentStyleSheet, e, i.styleMirror);
|
|
26739
26739
|
return (b && b !== -1 || y && y !== -1) && n({
|
|
26740
26740
|
id: b,
|
|
26741
26741
|
styleId: y,
|
|
26742
26742
|
remove: {
|
|
26743
26743
|
property: g
|
|
26744
26744
|
},
|
|
26745
|
-
index: yi(
|
|
26746
|
-
}),
|
|
26745
|
+
index: yi(l.parentRule)
|
|
26746
|
+
}), c.apply(l, p);
|
|
26747
26747
|
})
|
|
26748
26748
|
}), Y(() => {
|
|
26749
26749
|
s.CSSStyleDeclaration.prototype.setProperty = a, s.CSSStyleDeclaration.prototype.removeProperty = o;
|
|
26750
26750
|
});
|
|
26751
26751
|
}
|
|
26752
26752
|
function Uc({ mediaInteractionCb: n, blockClass: e, blockSelector: t, mirror: i, sampling: s, doc: a }) {
|
|
26753
|
-
const o = Y((
|
|
26753
|
+
const o = Y((l) => _t(Y((p) => {
|
|
26754
26754
|
const m = It(p);
|
|
26755
26755
|
if (!m || He(m, e, t, !0))
|
|
26756
26756
|
return;
|
|
26757
26757
|
const { currentTime: g, volume: b, muted: y, playbackRate: S, loop: f } = m;
|
|
26758
26758
|
n({
|
|
26759
|
-
type:
|
|
26759
|
+
type: l,
|
|
26760
26760
|
id: i.getId(m),
|
|
26761
26761
|
currentTime: g,
|
|
26762
26762
|
volume: b,
|
|
@@ -26764,7 +26764,7 @@ function Uc({ mediaInteractionCb: n, blockClass: e, blockSelector: t, mirror: i,
|
|
|
26764
26764
|
playbackRate: S,
|
|
26765
26765
|
loop: f
|
|
26766
26766
|
});
|
|
26767
|
-
}), s.media || 500)),
|
|
26767
|
+
}), s.media || 500)), c = [
|
|
26768
26768
|
Re("play", o(0), a),
|
|
26769
26769
|
Re("pause", o(1), a),
|
|
26770
26770
|
Re("seeked", o(2), a),
|
|
@@ -26772,7 +26772,7 @@ function Uc({ mediaInteractionCb: n, blockClass: e, blockSelector: t, mirror: i,
|
|
|
26772
26772
|
Re("ratechange", o(4), a)
|
|
26773
26773
|
];
|
|
26774
26774
|
return Y(() => {
|
|
26775
|
-
|
|
26775
|
+
c.forEach((l) => l());
|
|
26776
26776
|
});
|
|
26777
26777
|
}
|
|
26778
26778
|
function Vc({ fontCb: n, doc: e }) {
|
|
@@ -26781,40 +26781,40 @@ function Vc({ fontCb: n, doc: e }) {
|
|
|
26781
26781
|
return () => {
|
|
26782
26782
|
};
|
|
26783
26783
|
const i = [], s = /* @__PURE__ */ new WeakMap(), a = t.FontFace;
|
|
26784
|
-
t.FontFace = function(
|
|
26785
|
-
const g = new a(
|
|
26784
|
+
t.FontFace = function(l, p, m) {
|
|
26785
|
+
const g = new a(l, p, m);
|
|
26786
26786
|
return s.set(g, {
|
|
26787
|
-
family:
|
|
26787
|
+
family: l,
|
|
26788
26788
|
buffer: typeof p != "string",
|
|
26789
26789
|
descriptors: m,
|
|
26790
26790
|
fontSource: typeof p == "string" ? p : JSON.stringify(Array.from(new Uint8Array(p)))
|
|
26791
26791
|
}), g;
|
|
26792
26792
|
};
|
|
26793
|
-
const o = vt(e.fonts, "add", function(
|
|
26794
|
-
return function(
|
|
26793
|
+
const o = vt(e.fonts, "add", function(c) {
|
|
26794
|
+
return function(l) {
|
|
26795
26795
|
return setTimeout(Y(() => {
|
|
26796
|
-
const p = s.get(
|
|
26797
|
-
p && (n(p), s.delete(
|
|
26798
|
-
}), 0),
|
|
26796
|
+
const p = s.get(l);
|
|
26797
|
+
p && (n(p), s.delete(l));
|
|
26798
|
+
}), 0), c.apply(this, [l]);
|
|
26799
26799
|
};
|
|
26800
26800
|
});
|
|
26801
26801
|
return i.push(() => {
|
|
26802
26802
|
t.FontFace = a;
|
|
26803
26803
|
}), i.push(o), Y(() => {
|
|
26804
|
-
i.forEach((
|
|
26804
|
+
i.forEach((c) => c());
|
|
26805
26805
|
});
|
|
26806
26806
|
}
|
|
26807
26807
|
function Fc(n) {
|
|
26808
26808
|
const { doc: e, mirror: t, blockClass: i, blockSelector: s, selectionCb: a } = n;
|
|
26809
26809
|
let o = !0;
|
|
26810
|
-
const
|
|
26811
|
-
const
|
|
26812
|
-
if (!
|
|
26810
|
+
const c = Y(() => {
|
|
26811
|
+
const l = e.getSelection();
|
|
26812
|
+
if (!l || o && (l != null && l.isCollapsed))
|
|
26813
26813
|
return;
|
|
26814
|
-
o =
|
|
26815
|
-
const p = [], m =
|
|
26814
|
+
o = l.isCollapsed || !1;
|
|
26815
|
+
const p = [], m = l.rangeCount || 0;
|
|
26816
26816
|
for (let g = 0; g < m; g++) {
|
|
26817
|
-
const b =
|
|
26817
|
+
const b = l.getRangeAt(g), { startContainer: y, startOffset: S, endContainer: f, endOffset: w } = b;
|
|
26818
26818
|
He(y, i, s, !0) || He(f, i, s, !0) || p.push({
|
|
26819
26819
|
start: t.getId(y),
|
|
26820
26820
|
startOffset: S,
|
|
@@ -26824,13 +26824,13 @@ function Fc(n) {
|
|
|
26824
26824
|
}
|
|
26825
26825
|
a({ ranges: p });
|
|
26826
26826
|
});
|
|
26827
|
-
return
|
|
26827
|
+
return c(), Re("selectionchange", c);
|
|
26828
26828
|
}
|
|
26829
26829
|
function Kc({ doc: n, customElementCb: e }) {
|
|
26830
26830
|
const t = n.defaultView;
|
|
26831
26831
|
return !t || !t.customElements ? () => {
|
|
26832
26832
|
} : vt(t.customElements, "define", function(s) {
|
|
26833
|
-
return function(a, o,
|
|
26833
|
+
return function(a, o, c) {
|
|
26834
26834
|
try {
|
|
26835
26835
|
e({
|
|
26836
26836
|
define: {
|
|
@@ -26840,12 +26840,12 @@ function Kc({ doc: n, customElementCb: e }) {
|
|
|
26840
26840
|
} catch {
|
|
26841
26841
|
console.warn(`Custom element callback failed for ${a}`);
|
|
26842
26842
|
}
|
|
26843
|
-
return s.apply(this, [a, o,
|
|
26843
|
+
return s.apply(this, [a, o, c]);
|
|
26844
26844
|
};
|
|
26845
26845
|
});
|
|
26846
26846
|
}
|
|
26847
26847
|
function Gc(n, e) {
|
|
26848
|
-
const { mutationCb: t, mousemoveCb: i, mouseInteractionCb: s, scrollCb: a, viewportResizeCb: o, inputCb:
|
|
26848
|
+
const { mutationCb: t, mousemoveCb: i, mouseInteractionCb: s, scrollCb: a, viewportResizeCb: o, inputCb: c, mediaInteractionCb: l, styleSheetRuleCb: p, styleDeclarationCb: m, canvasMutationCb: g, fontCb: b, selectionCb: y, customElementCb: S } = n;
|
|
26849
26849
|
n.mutationCb = (...f) => {
|
|
26850
26850
|
e.mutation && e.mutation(...f), t(...f);
|
|
26851
26851
|
}, n.mousemoveCb = (...f) => {
|
|
@@ -26857,9 +26857,9 @@ function Gc(n, e) {
|
|
|
26857
26857
|
}, n.viewportResizeCb = (...f) => {
|
|
26858
26858
|
e.viewportResize && e.viewportResize(...f), o(...f);
|
|
26859
26859
|
}, n.inputCb = (...f) => {
|
|
26860
|
-
e.input && e.input(...f),
|
|
26860
|
+
e.input && e.input(...f), c(...f);
|
|
26861
26861
|
}, n.mediaInteractionCb = (...f) => {
|
|
26862
|
-
e.mediaInteaction && e.mediaInteaction(...f),
|
|
26862
|
+
e.mediaInteaction && e.mediaInteaction(...f), l(...f);
|
|
26863
26863
|
}, n.styleSheetRuleCb = (...f) => {
|
|
26864
26864
|
e.styleSheetRule && e.styleSheetRule(...f), p(...f);
|
|
26865
26865
|
}, n.styleDeclarationCb = (...f) => {
|
|
@@ -26882,9 +26882,9 @@ function jc(n, e = {}) {
|
|
|
26882
26882
|
Gc(n, e);
|
|
26883
26883
|
let i;
|
|
26884
26884
|
n.recordDOM && (i = ao(n, n.doc));
|
|
26885
|
-
const s = Ic(n), a = Dc(n), o = oo(n),
|
|
26885
|
+
const s = Ic(n), a = Dc(n), o = oo(n), c = Bc(n, {
|
|
26886
26886
|
win: t
|
|
26887
|
-
}),
|
|
26887
|
+
}), l = Hc(n), p = Uc(n);
|
|
26888
26888
|
let m = () => {
|
|
26889
26889
|
}, g = () => {
|
|
26890
26890
|
}, b = () => {
|
|
@@ -26897,7 +26897,7 @@ function jc(n, e = {}) {
|
|
|
26897
26897
|
for (const A of n.plugins)
|
|
26898
26898
|
w.push(A.observer(A.callback, t, A.options));
|
|
26899
26899
|
return Y(() => {
|
|
26900
|
-
qn.forEach((A) => A.reset()), i == null || i.disconnect(), s(), a(), o(),
|
|
26900
|
+
qn.forEach((A) => A.reset()), i == null || i.disconnect(), s(), a(), o(), c(), l(), p(), m(), g(), b(), y(), S(), f(), w.forEach((A) => A());
|
|
26901
26901
|
});
|
|
26902
26902
|
}
|
|
26903
26903
|
function si(n) {
|
|
@@ -26912,8 +26912,8 @@ class Xs {
|
|
|
26912
26912
|
}
|
|
26913
26913
|
getId(e, t, i, s) {
|
|
26914
26914
|
const a = i || this.getIdToRemoteIdMap(e), o = s || this.getRemoteIdToIdMap(e);
|
|
26915
|
-
let
|
|
26916
|
-
return
|
|
26915
|
+
let c = a.get(t);
|
|
26916
|
+
return c || (c = this.generateIdFn(), a.set(t, c), o.set(c, t)), c;
|
|
26917
26917
|
}
|
|
26918
26918
|
getIds(e, t) {
|
|
26919
26919
|
const i = this.getIdToRemoteIdMap(e), s = this.getRemoteIdToIdMap(e);
|
|
@@ -27155,14 +27155,14 @@ function Zc(n, e, t, i) {
|
|
|
27155
27155
|
});
|
|
27156
27156
|
}
|
|
27157
27157
|
return new (t || (t = Promise))(function(a, o) {
|
|
27158
|
-
function
|
|
27158
|
+
function c(m) {
|
|
27159
27159
|
try {
|
|
27160
27160
|
p(i.next(m));
|
|
27161
27161
|
} catch (g) {
|
|
27162
27162
|
o(g);
|
|
27163
27163
|
}
|
|
27164
27164
|
}
|
|
27165
|
-
function
|
|
27165
|
+
function l(m) {
|
|
27166
27166
|
try {
|
|
27167
27167
|
p(i.throw(m));
|
|
27168
27168
|
} catch (g) {
|
|
@@ -27170,7 +27170,7 @@ function Zc(n, e, t, i) {
|
|
|
27170
27170
|
}
|
|
27171
27171
|
}
|
|
27172
27172
|
function p(m) {
|
|
27173
|
-
m.done ? a(m.value) : s(m.value).then(
|
|
27173
|
+
m.done ? a(m.value) : s(m.value).then(c, l);
|
|
27174
27174
|
}
|
|
27175
27175
|
p((i = i.apply(n, [])).next());
|
|
27176
27176
|
});
|
|
@@ -27270,7 +27270,7 @@ function Xc(n, e, t, i) {
|
|
|
27270
27270
|
try {
|
|
27271
27271
|
if (typeof e.CanvasRenderingContext2D.prototype[o] != "function")
|
|
27272
27272
|
continue;
|
|
27273
|
-
const
|
|
27273
|
+
const c = vt(e.CanvasRenderingContext2D.prototype, o, function(l) {
|
|
27274
27274
|
return function(...p) {
|
|
27275
27275
|
return He(this.canvas, t, i, !0) || setTimeout(() => {
|
|
27276
27276
|
const m = co(p, e, this);
|
|
@@ -27279,12 +27279,12 @@ function Xc(n, e, t, i) {
|
|
|
27279
27279
|
property: o,
|
|
27280
27280
|
args: m
|
|
27281
27281
|
});
|
|
27282
|
-
}, 0),
|
|
27282
|
+
}, 0), l.apply(this, p);
|
|
27283
27283
|
};
|
|
27284
27284
|
});
|
|
27285
|
-
s.push(
|
|
27285
|
+
s.push(c);
|
|
27286
27286
|
} catch {
|
|
27287
|
-
const
|
|
27287
|
+
const l = Li(e.CanvasRenderingContext2D.prototype, o, {
|
|
27288
27288
|
set(p) {
|
|
27289
27289
|
n(this.canvas, {
|
|
27290
27290
|
type: dt["2D"],
|
|
@@ -27294,7 +27294,7 @@ function Xc(n, e, t, i) {
|
|
|
27294
27294
|
});
|
|
27295
27295
|
}
|
|
27296
27296
|
});
|
|
27297
|
-
s.push(
|
|
27297
|
+
s.push(l);
|
|
27298
27298
|
}
|
|
27299
27299
|
return () => {
|
|
27300
27300
|
s.forEach((o) => o());
|
|
@@ -27307,19 +27307,19 @@ function ea(n, e, t, i) {
|
|
|
27307
27307
|
const s = [];
|
|
27308
27308
|
try {
|
|
27309
27309
|
const a = vt(n.HTMLCanvasElement.prototype, "getContext", function(o) {
|
|
27310
|
-
return function(
|
|
27310
|
+
return function(c, ...l) {
|
|
27311
27311
|
if (!He(this, e, t, !0)) {
|
|
27312
|
-
const p = $c(
|
|
27312
|
+
const p = $c(c);
|
|
27313
27313
|
if ("__context" in this || (this.__context = p), i && ["webgl", "webgl2"].includes(p))
|
|
27314
|
-
if (
|
|
27315
|
-
const m =
|
|
27314
|
+
if (l[0] && typeof l[0] == "object") {
|
|
27315
|
+
const m = l[0];
|
|
27316
27316
|
m.preserveDrawingBuffer || (m.preserveDrawingBuffer = !0);
|
|
27317
27317
|
} else
|
|
27318
|
-
|
|
27318
|
+
l.splice(0, 1, {
|
|
27319
27319
|
preserveDrawingBuffer: !0
|
|
27320
27320
|
});
|
|
27321
27321
|
}
|
|
27322
|
-
return o.apply(this, [
|
|
27322
|
+
return o.apply(this, [c, ...l]);
|
|
27323
27323
|
};
|
|
27324
27324
|
});
|
|
27325
27325
|
s.push(a);
|
|
@@ -27331,8 +27331,8 @@ function ea(n, e, t, i) {
|
|
|
27331
27331
|
};
|
|
27332
27332
|
}
|
|
27333
27333
|
function na(n, e, t, i, s, a, o) {
|
|
27334
|
-
const
|
|
27335
|
-
for (const p of
|
|
27334
|
+
const c = [], l = Object.getOwnPropertyNames(n);
|
|
27335
|
+
for (const p of l)
|
|
27336
27336
|
if (![
|
|
27337
27337
|
"isContextLost",
|
|
27338
27338
|
"canvas",
|
|
@@ -27356,7 +27356,7 @@ function na(n, e, t, i, s, a, o) {
|
|
|
27356
27356
|
return y;
|
|
27357
27357
|
};
|
|
27358
27358
|
});
|
|
27359
|
-
|
|
27359
|
+
c.push(m);
|
|
27360
27360
|
} catch {
|
|
27361
27361
|
const g = Li(n, p, {
|
|
27362
27362
|
set(b) {
|
|
@@ -27368,9 +27368,9 @@ function na(n, e, t, i, s, a, o) {
|
|
|
27368
27368
|
});
|
|
27369
27369
|
}
|
|
27370
27370
|
});
|
|
27371
|
-
|
|
27371
|
+
c.push(g);
|
|
27372
27372
|
}
|
|
27373
|
-
return
|
|
27373
|
+
return c;
|
|
27374
27374
|
}
|
|
27375
27375
|
function ed(n, e, t, i, s) {
|
|
27376
27376
|
const a = [];
|
|
@@ -27382,7 +27382,7 @@ function nd(n, e) {
|
|
|
27382
27382
|
var t = n.toString(), i = t.split(`
|
|
27383
27383
|
`);
|
|
27384
27384
|
i.pop(), i.shift();
|
|
27385
|
-
for (var s = i[0].search(/\S/), a = /(['"])__worker_loader_strict__(['"])/g, o = 0,
|
|
27385
|
+
for (var s = i[0].search(/\S/), a = /(['"])__worker_loader_strict__(['"])/g, o = 0, c = i.length; o < c; ++o)
|
|
27386
27386
|
i[o] = i[o].substring(s).replace(a, "$1use strict$2") + `
|
|
27387
27387
|
`;
|
|
27388
27388
|
return i;
|
|
@@ -27452,7 +27452,7 @@ var sd = id(
|
|
|
27452
27452
|
return b % 3 === 2 ? y = y.substring(0, y.length - 1) + "=" : b % 3 === 1 && (y = y.substring(0, y.length - 2) + "=="), y;
|
|
27453
27453
|
};
|
|
27454
27454
|
const a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
27455
|
-
function
|
|
27455
|
+
function c(p, m, g) {
|
|
27456
27456
|
return n(this, void 0, void 0, function* () {
|
|
27457
27457
|
const b = `${p}-${m}`;
|
|
27458
27458
|
if ("OffscreenCanvas" in globalThis) {
|
|
@@ -27466,18 +27466,18 @@ var sd = id(
|
|
|
27466
27466
|
return "";
|
|
27467
27467
|
});
|
|
27468
27468
|
}
|
|
27469
|
-
const
|
|
27470
|
-
|
|
27469
|
+
const l = self;
|
|
27470
|
+
l.onmessage = function(p) {
|
|
27471
27471
|
return n(this, void 0, void 0, function* () {
|
|
27472
27472
|
if ("OffscreenCanvas" in globalThis) {
|
|
27473
|
-
const { id: m, bitmap: g, width: b, height: y, dataURLOptions: S } = p.data, f =
|
|
27473
|
+
const { id: m, bitmap: g, width: b, height: y, dataURLOptions: S } = p.data, f = c(b, y, S), w = new OffscreenCanvas(b, y);
|
|
27474
27474
|
w.getContext("2d").drawImage(g, 0, 0), g.close();
|
|
27475
27475
|
const M = yield w.convertToBlob(S), x = M.type, E = yield M.arrayBuffer(), D = s(E);
|
|
27476
27476
|
if (!a.has(m) && (yield f) === D)
|
|
27477
|
-
return a.set(m, D),
|
|
27477
|
+
return a.set(m, D), l.postMessage({ id: m });
|
|
27478
27478
|
if (a.get(m) === D)
|
|
27479
|
-
return
|
|
27480
|
-
|
|
27479
|
+
return l.postMessage({ id: m });
|
|
27480
|
+
l.postMessage({
|
|
27481
27481
|
id: m,
|
|
27482
27482
|
type: x,
|
|
27483
27483
|
base64: D,
|
|
@@ -27485,7 +27485,7 @@ var sd = id(
|
|
|
27485
27485
|
height: y
|
|
27486
27486
|
}), a.set(m, D);
|
|
27487
27487
|
} else
|
|
27488
|
-
return
|
|
27488
|
+
return l.postMessage({ id: p.data.id });
|
|
27489
27489
|
});
|
|
27490
27490
|
};
|
|
27491
27491
|
})();
|
|
@@ -27508,19 +27508,19 @@ class ad {
|
|
|
27508
27508
|
this.locked = !1;
|
|
27509
27509
|
}
|
|
27510
27510
|
constructor(e) {
|
|
27511
|
-
this.pendingCanvasMutations = /* @__PURE__ */ new Map(), this.rafStamps = { latestId: 0, invokeId: null }, this.frozen = !1, this.locked = !1, this.processMutation = (
|
|
27512
|
-
(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(
|
|
27511
|
+
this.pendingCanvasMutations = /* @__PURE__ */ new Map(), this.rafStamps = { latestId: 0, invokeId: null }, this.frozen = !1, this.locked = !1, this.processMutation = (l, p) => {
|
|
27512
|
+
(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(l) || this.pendingCanvasMutations.set(l, []), this.pendingCanvasMutations.get(l).push(p);
|
|
27513
27513
|
};
|
|
27514
|
-
const { sampling: t = "all", win: i, blockClass: s, blockSelector: a, recordCanvas: o, dataURLOptions:
|
|
27514
|
+
const { sampling: t = "all", win: i, blockClass: s, blockSelector: a, recordCanvas: o, dataURLOptions: c } = e;
|
|
27515
27515
|
this.mutationCb = e.mutationCb, this.mirror = e.mirror, o && t === "all" && this.initCanvasMutationObserver(i, s, a), o && typeof t == "number" && this.initCanvasFPSObserver(t, i, s, a, {
|
|
27516
|
-
dataURLOptions:
|
|
27516
|
+
dataURLOptions: c
|
|
27517
27517
|
});
|
|
27518
27518
|
}
|
|
27519
27519
|
initCanvasFPSObserver(e, t, i, s, a) {
|
|
27520
|
-
const o = ea(t, i, s, !0),
|
|
27521
|
-
|
|
27520
|
+
const o = ea(t, i, s, !0), c = /* @__PURE__ */ new Map(), l = new sd();
|
|
27521
|
+
l.onmessage = (S) => {
|
|
27522
27522
|
const { id: f } = S.data;
|
|
27523
|
-
if (
|
|
27523
|
+
if (c.set(f, !1), !("base64" in S.data))
|
|
27524
27524
|
return;
|
|
27525
27525
|
const { base64: w, type: A, width: M, height: x } = S.data;
|
|
27526
27526
|
this.mutationCb({
|
|
@@ -27566,14 +27566,14 @@ class ad {
|
|
|
27566
27566
|
m = S, b().forEach((f) => Zc(this, void 0, void 0, function* () {
|
|
27567
27567
|
var w;
|
|
27568
27568
|
const A = this.mirror.getId(f);
|
|
27569
|
-
if (
|
|
27569
|
+
if (c.get(A) || f.width === 0 || f.height === 0)
|
|
27570
27570
|
return;
|
|
27571
|
-
if (
|
|
27571
|
+
if (c.set(A, !0), ["webgl", "webgl2"].includes(f.__context)) {
|
|
27572
27572
|
const x = f.getContext(f.__context);
|
|
27573
27573
|
((w = x == null ? void 0 : x.getContextAttributes()) === null || w === void 0 ? void 0 : w.preserveDrawingBuffer) === !1 && x.clear(x.COLOR_BUFFER_BIT);
|
|
27574
27574
|
}
|
|
27575
27575
|
const M = yield createImageBitmap(f);
|
|
27576
|
-
|
|
27576
|
+
l.postMessage({
|
|
27577
27577
|
id: A,
|
|
27578
27578
|
bitmap: M,
|
|
27579
27579
|
width: f.width,
|
|
@@ -27649,9 +27649,9 @@ class od {
|
|
|
27649
27649
|
let o;
|
|
27650
27650
|
this.styleMirror.has(a) ? o = this.styleMirror.getId(a) : (o = this.styleMirror.add(a), s.push({
|
|
27651
27651
|
styleId: o,
|
|
27652
|
-
rules: Array.from(a.rules || CSSRule, (
|
|
27653
|
-
rule: Fa(
|
|
27654
|
-
index:
|
|
27652
|
+
rules: Array.from(a.rules || CSSRule, (c, l) => ({
|
|
27653
|
+
rule: Fa(c),
|
|
27654
|
+
index: l
|
|
27655
27655
|
}))
|
|
27656
27656
|
})), i.styleIds.push(o);
|
|
27657
27657
|
}
|
|
@@ -27692,7 +27692,7 @@ function Ce(n) {
|
|
|
27692
27692
|
let me, ui, ji, Ci = !1;
|
|
27693
27693
|
const Ye = ec();
|
|
27694
27694
|
function Dt(n = {}) {
|
|
27695
|
-
const { emit: e, checkoutEveryNms: t, checkoutEveryNth: i, blockClass: s = "rr-block", blockSelector: a = null, ignoreClass: o = "rr-ignore", ignoreSelector:
|
|
27695
|
+
const { emit: e, checkoutEveryNms: t, checkoutEveryNth: i, blockClass: s = "rr-block", blockSelector: a = null, ignoreClass: o = "rr-ignore", ignoreSelector: c = null, maskTextClass: l = "rr-mask", maskTextSelector: p = null, inlineStylesheet: m = !0, maskAllInputs: g, maskInputOptions: b, slimDOMOptions: y, maskInputFn: S, maskTextFn: f, hooks: w, packFn: A, sampling: M = {}, dataURLOptions: x = {}, mousemoveWait: E, recordDOM: D = !0, recordCanvas: F = !1, recordCrossOriginIframes: q = !1, recordAfter: G = n.recordAfter === "DOMContentLoaded" ? n.recordAfter : "load", userTriggeredOnInput: z = !1, collectFonts: ce = !1, inlineImages: Le = !1, plugins: j, keepIframeSrcFn: Be = () => !1, ignoreCSSAttributes: ve = /* @__PURE__ */ new Set([]), errorHandler: Ke } = n;
|
|
27696
27696
|
Ec(Ke);
|
|
27697
27697
|
const we = q ? window.parent === window : !0;
|
|
27698
27698
|
let hn = !1;
|
|
@@ -27811,7 +27811,7 @@ function Dt(n = {}) {
|
|
|
27811
27811
|
bypassOptions: {
|
|
27812
27812
|
blockClass: s,
|
|
27813
27813
|
blockSelector: a,
|
|
27814
|
-
maskTextClass:
|
|
27814
|
+
maskTextClass: l,
|
|
27815
27815
|
maskTextSelector: p,
|
|
27816
27816
|
inlineStylesheet: m,
|
|
27817
27817
|
maskInputOptions: an,
|
|
@@ -27845,7 +27845,7 @@ function Dt(n = {}) {
|
|
|
27845
27845
|
mirror: Ye,
|
|
27846
27846
|
blockClass: s,
|
|
27847
27847
|
blockSelector: a,
|
|
27848
|
-
maskTextClass:
|
|
27848
|
+
maskTextClass: l,
|
|
27849
27849
|
maskTextSelector: p,
|
|
27850
27850
|
inlineStylesheet: m,
|
|
27851
27851
|
maskAllInputs: an,
|
|
@@ -27931,8 +27931,8 @@ function Dt(n = {}) {
|
|
|
27931
27931
|
},
|
|
27932
27932
|
blockClass: s,
|
|
27933
27933
|
ignoreClass: o,
|
|
27934
|
-
ignoreSelector:
|
|
27935
|
-
maskTextClass:
|
|
27934
|
+
ignoreSelector: c,
|
|
27935
|
+
maskTextClass: l,
|
|
27936
27936
|
maskTextSelector: p,
|
|
27937
27937
|
maskInputOptions: an,
|
|
27938
27938
|
inlineStylesheet: m,
|
|
@@ -28257,12 +28257,12 @@ v.JSONEncode = /* @__PURE__ */ function() {
|
|
|
28257
28257
|
'"': '\\"',
|
|
28258
28258
|
"\\": "\\\\"
|
|
28259
28259
|
};
|
|
28260
|
-
return a.lastIndex = 0, a.test(s) ? '"' + s.replace(a, function(
|
|
28261
|
-
var
|
|
28262
|
-
return typeof
|
|
28260
|
+
return a.lastIndex = 0, a.test(s) ? '"' + s.replace(a, function(c) {
|
|
28261
|
+
var l = o[c];
|
|
28262
|
+
return typeof l == "string" ? l : "\\u" + ("0000" + c.charCodeAt(0).toString(16)).slice(-4);
|
|
28263
28263
|
}) + '"' : '"' + s + '"';
|
|
28264
28264
|
}, i = function(s, a) {
|
|
28265
|
-
var o = "",
|
|
28265
|
+
var o = "", c = " ", l = 0, p = "", m = "", g = 0, b = o, y = [], S = a[s];
|
|
28266
28266
|
switch (S && typeof S == "object" && typeof S.toJSON == "function" && (S = S.toJSON(s)), typeof S) {
|
|
28267
28267
|
case "string":
|
|
28268
28268
|
return t(S);
|
|
@@ -28274,9 +28274,9 @@ v.JSONEncode = /* @__PURE__ */ function() {
|
|
|
28274
28274
|
case "object":
|
|
28275
28275
|
if (!S)
|
|
28276
28276
|
return "null";
|
|
28277
|
-
if (o +=
|
|
28278
|
-
for (g = S.length,
|
|
28279
|
-
y[
|
|
28277
|
+
if (o += c, y = [], Bt.apply(S) === "[object Array]") {
|
|
28278
|
+
for (g = S.length, l = 0; l < g; l += 1)
|
|
28279
|
+
y[l] = i(l, S) || "null";
|
|
28280
28280
|
return m = y.length === 0 ? "[]" : o ? `[
|
|
28281
28281
|
` + o + y.join(`,
|
|
28282
28282
|
` + o) + `
|
|
@@ -28322,7 +28322,7 @@ v.JSONDecode = function() {
|
|
|
28322
28322
|
s("Bad number");
|
|
28323
28323
|
else
|
|
28324
28324
|
return y;
|
|
28325
|
-
},
|
|
28325
|
+
}, c = function() {
|
|
28326
28326
|
var y, S, f = "", w;
|
|
28327
28327
|
if (e === '"')
|
|
28328
28328
|
for (; a(); ) {
|
|
@@ -28341,7 +28341,7 @@ v.JSONDecode = function() {
|
|
|
28341
28341
|
f += e;
|
|
28342
28342
|
}
|
|
28343
28343
|
s("Bad string");
|
|
28344
|
-
},
|
|
28344
|
+
}, l = function() {
|
|
28345
28345
|
for (; e && e <= " "; )
|
|
28346
28346
|
a();
|
|
28347
28347
|
}, p = function() {
|
|
@@ -28357,36 +28357,36 @@ v.JSONDecode = function() {
|
|
|
28357
28357
|
}, m, g = function() {
|
|
28358
28358
|
var y = [];
|
|
28359
28359
|
if (e === "[") {
|
|
28360
|
-
if (a("["),
|
|
28360
|
+
if (a("["), l(), e === "]")
|
|
28361
28361
|
return a("]"), y;
|
|
28362
28362
|
for (; e; ) {
|
|
28363
|
-
if (y.push(m()),
|
|
28363
|
+
if (y.push(m()), l(), e === "]")
|
|
28364
28364
|
return a("]"), y;
|
|
28365
|
-
a(","),
|
|
28365
|
+
a(","), l();
|
|
28366
28366
|
}
|
|
28367
28367
|
}
|
|
28368
28368
|
s("Bad array");
|
|
28369
28369
|
}, b = function() {
|
|
28370
28370
|
var y, S = {};
|
|
28371
28371
|
if (e === "{") {
|
|
28372
|
-
if (a("{"),
|
|
28372
|
+
if (a("{"), l(), e === "}")
|
|
28373
28373
|
return a("}"), S;
|
|
28374
28374
|
for (; e; ) {
|
|
28375
|
-
if (y =
|
|
28375
|
+
if (y = c(), l(), a(":"), Object.hasOwnProperty.call(S, y) && s('Duplicate key "' + y + '"'), S[y] = m(), l(), e === "}")
|
|
28376
28376
|
return a("}"), S;
|
|
28377
|
-
a(","),
|
|
28377
|
+
a(","), l();
|
|
28378
28378
|
}
|
|
28379
28379
|
}
|
|
28380
28380
|
s("Bad object");
|
|
28381
28381
|
};
|
|
28382
28382
|
return m = function() {
|
|
28383
|
-
switch (
|
|
28383
|
+
switch (l(), e) {
|
|
28384
28384
|
case "{":
|
|
28385
28385
|
return b();
|
|
28386
28386
|
case "[":
|
|
28387
28387
|
return g();
|
|
28388
28388
|
case '"':
|
|
28389
|
-
return
|
|
28389
|
+
return c();
|
|
28390
28390
|
case "-":
|
|
28391
28391
|
return o();
|
|
28392
28392
|
default:
|
|
@@ -28394,16 +28394,16 @@ v.JSONDecode = function() {
|
|
|
28394
28394
|
}
|
|
28395
28395
|
}, function(y) {
|
|
28396
28396
|
var S;
|
|
28397
|
-
return i = y, n = 0, e = " ", S = m(),
|
|
28397
|
+
return i = y, n = 0, e = " ", S = m(), l(), e && s("Syntax error"), S;
|
|
28398
28398
|
};
|
|
28399
28399
|
}();
|
|
28400
28400
|
v.base64Encode = function(n) {
|
|
28401
|
-
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", t, i, s, a, o,
|
|
28401
|
+
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", t, i, s, a, o, c, l, p, m = 0, g = 0, b = "", y = [];
|
|
28402
28402
|
if (!n)
|
|
28403
28403
|
return n;
|
|
28404
28404
|
n = v.utf8Encode(n);
|
|
28405
28405
|
do
|
|
28406
|
-
t = n.charCodeAt(m++), i = n.charCodeAt(m++), s = n.charCodeAt(m++), p = t << 16 | i << 8 | s, a = p >> 18 & 63, o = p >> 12 & 63,
|
|
28406
|
+
t = n.charCodeAt(m++), i = n.charCodeAt(m++), s = n.charCodeAt(m++), p = t << 16 | i << 8 | s, a = p >> 18 & 63, o = p >> 12 & 63, c = p >> 6 & 63, l = p & 63, y[g++] = e.charAt(a) + e.charAt(o) + e.charAt(c) + e.charAt(l);
|
|
28407
28407
|
while (m < n.length);
|
|
28408
28408
|
switch (b = y.join(""), n.length % 3) {
|
|
28409
28409
|
case 1:
|
|
@@ -28421,8 +28421,8 @@ v.utf8Encode = function(n) {
|
|
|
28421
28421
|
`);
|
|
28422
28422
|
var e = "", t, i, s = 0, a;
|
|
28423
28423
|
for (t = i = 0, s = n.length, a = 0; a < s; a++) {
|
|
28424
|
-
var o = n.charCodeAt(a),
|
|
28425
|
-
o < 128 ? i++ : o > 127 && o < 2048 ?
|
|
28424
|
+
var o = n.charCodeAt(a), c = null;
|
|
28425
|
+
o < 128 ? i++ : o > 127 && o < 2048 ? c = String.fromCharCode(o >> 6 | 192, o & 63 | 128) : c = String.fromCharCode(o >> 12 | 224, o >> 6 & 63 | 128, o & 63 | 128), c !== null && (i > t && (e += n.substring(t, i)), e += c, t = i = a + 1);
|
|
28426
28426
|
}
|
|
28427
28427
|
return i > t && (e += n.substring(t, n.length)), e;
|
|
28428
28428
|
};
|
|
@@ -28438,16 +28438,16 @@ v.UUID = /* @__PURE__ */ function() {
|
|
|
28438
28438
|
}, e = function() {
|
|
28439
28439
|
return Math.random().toString(16).replace(".", "");
|
|
28440
28440
|
}, t = function() {
|
|
28441
|
-
var i = dn, s, a, o = [],
|
|
28442
|
-
function
|
|
28441
|
+
var i = dn, s, a, o = [], c = 0;
|
|
28442
|
+
function l(p, m) {
|
|
28443
28443
|
var g, b = 0;
|
|
28444
28444
|
for (g = 0; g < m.length; g++)
|
|
28445
28445
|
b |= o[g] << g * 8;
|
|
28446
28446
|
return p ^ b;
|
|
28447
28447
|
}
|
|
28448
28448
|
for (s = 0; s < i.length; s++)
|
|
28449
|
-
a = i.charCodeAt(s), o.unshift(a & 255), o.length >= 4 && (
|
|
28450
|
-
return o.length > 0 && (
|
|
28449
|
+
a = i.charCodeAt(s), o.unshift(a & 255), o.length >= 4 && (c = l(c, o), o = []);
|
|
28450
|
+
return o.length > 0 && (c = l(c, o)), c.toString(16);
|
|
28451
28451
|
};
|
|
28452
28452
|
return function() {
|
|
28453
28453
|
var i = (Si.height * Si.width).toString(16);
|
|
@@ -28526,33 +28526,33 @@ v.cookie = {
|
|
|
28526
28526
|
return e;
|
|
28527
28527
|
},
|
|
28528
28528
|
set_seconds: function(n, e, t, i, s, a, o) {
|
|
28529
|
-
var
|
|
28529
|
+
var c = "", l = "", p = "";
|
|
28530
28530
|
if (o)
|
|
28531
|
-
|
|
28531
|
+
c = "; domain=" + o;
|
|
28532
28532
|
else if (i) {
|
|
28533
28533
|
var m = ra(ae.location.hostname);
|
|
28534
|
-
|
|
28534
|
+
c = m ? "; domain=." + m : "";
|
|
28535
28535
|
}
|
|
28536
28536
|
if (t) {
|
|
28537
28537
|
var g = /* @__PURE__ */ new Date();
|
|
28538
|
-
g.setTime(g.getTime() + t * 1e3),
|
|
28538
|
+
g.setTime(g.getTime() + t * 1e3), l = "; expires=" + g.toGMTString();
|
|
28539
28539
|
}
|
|
28540
|
-
a && (s = !0, p = "; SameSite=None"), s && (p += "; secure"), ae.cookie = n + "=" + encodeURIComponent(e) +
|
|
28540
|
+
a && (s = !0, p = "; SameSite=None"), s && (p += "; secure"), ae.cookie = n + "=" + encodeURIComponent(e) + l + "; path=/" + c + p;
|
|
28541
28541
|
},
|
|
28542
28542
|
set: function(n, e, t, i, s, a, o) {
|
|
28543
|
-
var
|
|
28543
|
+
var c = "", l = "", p = "";
|
|
28544
28544
|
if (o)
|
|
28545
|
-
|
|
28545
|
+
c = "; domain=" + o;
|
|
28546
28546
|
else if (i) {
|
|
28547
28547
|
var m = ra(ae.location.hostname);
|
|
28548
|
-
|
|
28548
|
+
c = m ? "; domain=." + m : "";
|
|
28549
28549
|
}
|
|
28550
28550
|
if (t) {
|
|
28551
28551
|
var g = /* @__PURE__ */ new Date();
|
|
28552
|
-
g.setTime(g.getTime() + t * 24 * 60 * 60 * 1e3),
|
|
28552
|
+
g.setTime(g.getTime() + t * 24 * 60 * 60 * 1e3), l = "; expires=" + g.toGMTString();
|
|
28553
28553
|
}
|
|
28554
28554
|
a && (s = !0, p = "; SameSite=None"), s && (p += "; secure");
|
|
28555
|
-
var b = n + "=" + encodeURIComponent(e) +
|
|
28555
|
+
var b = n + "=" + encodeURIComponent(e) + l + "; path=/" + c + p;
|
|
28556
28556
|
return ae.cookie = b, b;
|
|
28557
28557
|
},
|
|
28558
28558
|
remove: function(n, e, t) {
|
|
@@ -28611,23 +28611,23 @@ v.localStorage = {
|
|
|
28611
28611
|
}
|
|
28612
28612
|
};
|
|
28613
28613
|
v.register_event = function() {
|
|
28614
|
-
var n = function(i, s, a, o,
|
|
28614
|
+
var n = function(i, s, a, o, c) {
|
|
28615
28615
|
if (!i) {
|
|
28616
28616
|
ne.error("No valid element provided to register_event");
|
|
28617
28617
|
return;
|
|
28618
28618
|
}
|
|
28619
28619
|
if (i.addEventListener && !o)
|
|
28620
|
-
i.addEventListener(s, a, !!
|
|
28620
|
+
i.addEventListener(s, a, !!c);
|
|
28621
28621
|
else {
|
|
28622
|
-
var
|
|
28623
|
-
i[
|
|
28622
|
+
var l = "on" + s, p = i[l];
|
|
28623
|
+
i[l] = e(i, a, p);
|
|
28624
28624
|
}
|
|
28625
28625
|
};
|
|
28626
28626
|
function e(i, s, a) {
|
|
28627
|
-
var o = function(
|
|
28628
|
-
if (
|
|
28629
|
-
var
|
|
28630
|
-
return v.isFunction(a) && (p = a(
|
|
28627
|
+
var o = function(c) {
|
|
28628
|
+
if (c = c || t(window.event), !!c) {
|
|
28629
|
+
var l = !0, p, m;
|
|
28630
|
+
return v.isFunction(a) && (p = a(c)), m = s.call(i, c), (p === !1 || m === !1) && (l = !1), l;
|
|
28631
28631
|
}
|
|
28632
28632
|
};
|
|
28633
28633
|
return o;
|
|
@@ -28654,21 +28654,21 @@ v.dom_query = /* @__PURE__ */ function() {
|
|
|
28654
28654
|
function i(s) {
|
|
28655
28655
|
if (!ae.getElementsByTagName)
|
|
28656
28656
|
return [];
|
|
28657
|
-
var a = s.split(" "), o,
|
|
28657
|
+
var a = s.split(" "), o, c, l, p, m, g, b, y, S, f, w = [ae];
|
|
28658
28658
|
for (g = 0; g < a.length; g++) {
|
|
28659
28659
|
if (o = a[g].replace(/^\s+/, "").replace(/\s+$/, ""), o.indexOf("#") > -1) {
|
|
28660
|
-
|
|
28661
|
-
var A =
|
|
28662
|
-
if (!M ||
|
|
28660
|
+
c = o.split("#"), l = c[0];
|
|
28661
|
+
var A = c[1], M = ae.getElementById(A);
|
|
28662
|
+
if (!M || l && M.nodeName.toLowerCase() != l)
|
|
28663
28663
|
return [];
|
|
28664
28664
|
w = [M];
|
|
28665
28665
|
continue;
|
|
28666
28666
|
}
|
|
28667
28667
|
if (o.indexOf(".") > -1) {
|
|
28668
|
-
|
|
28669
|
-
var x =
|
|
28670
|
-
for (
|
|
28671
|
-
for (
|
|
28668
|
+
c = o.split("."), l = c[0];
|
|
28669
|
+
var x = c[1];
|
|
28670
|
+
for (l || (l = "*"), p = [], m = 0, b = 0; b < w.length; b++)
|
|
28671
|
+
for (l == "*" ? S = n(w[b]) : S = w[b].getElementsByTagName(l), y = 0; y < S.length; y++)
|
|
28672
28672
|
p[m++] = S[y];
|
|
28673
28673
|
for (w = [], f = 0, b = 0; b < p.length; b++)
|
|
28674
28674
|
p[b].className && v.isString(p[b].className) && // some SVG elements have classNames which are not strings
|
|
@@ -28677,10 +28677,10 @@ v.dom_query = /* @__PURE__ */ function() {
|
|
|
28677
28677
|
}
|
|
28678
28678
|
var E = o.match(dd);
|
|
28679
28679
|
if (E) {
|
|
28680
|
-
|
|
28680
|
+
l = E[1];
|
|
28681
28681
|
var D = E[2], F = E[3], q = E[4];
|
|
28682
|
-
for (
|
|
28683
|
-
for (
|
|
28682
|
+
for (l || (l = "*"), p = [], m = 0, b = 0; b < w.length; b++)
|
|
28683
|
+
for (l == "*" ? S = n(w[b]) : S = w[b].getElementsByTagName(l), y = 0; y < S.length; y++)
|
|
28684
28684
|
p[m++] = S[y];
|
|
28685
28685
|
w = [], f = 0;
|
|
28686
28686
|
var G;
|
|
@@ -28724,8 +28724,8 @@ v.dom_query = /* @__PURE__ */ function() {
|
|
|
28724
28724
|
G(p[b]) && (w[f++] = p[b]);
|
|
28725
28725
|
continue;
|
|
28726
28726
|
}
|
|
28727
|
-
for (
|
|
28728
|
-
for (S = w[b].getElementsByTagName(
|
|
28727
|
+
for (l = o, p = [], m = 0, b = 0; b < w.length; b++)
|
|
28728
|
+
for (S = w[b].getElementsByTagName(l), y = 0; y < S.length; y++)
|
|
28729
28729
|
p[m++] = S[y];
|
|
28730
28730
|
w = p;
|
|
28731
28731
|
}
|
|
@@ -28959,20 +28959,20 @@ function ds(n, e) {
|
|
|
28959
28959
|
return function() {
|
|
28960
28960
|
var t = !1;
|
|
28961
28961
|
try {
|
|
28962
|
-
var i = e.call(this, "token"), s = e.call(this, "ignore_dnt"), a = e.call(this, "opt_out_tracking_persistence_type"), o = e.call(this, "opt_out_tracking_cookie_prefix"),
|
|
28962
|
+
var i = e.call(this, "token"), s = e.call(this, "ignore_dnt"), a = e.call(this, "opt_out_tracking_persistence_type"), o = e.call(this, "opt_out_tracking_cookie_prefix"), c = e.call(this, "window");
|
|
28963
28963
|
i && (t = po(i, {
|
|
28964
28964
|
ignoreDnt: s,
|
|
28965
28965
|
persistenceType: a,
|
|
28966
28966
|
persistencePrefix: o,
|
|
28967
|
-
window:
|
|
28967
|
+
window: c
|
|
28968
28968
|
}));
|
|
28969
28969
|
} catch (p) {
|
|
28970
28970
|
ne.error("Unexpected error when checking tracking opt-out status: " + p);
|
|
28971
28971
|
}
|
|
28972
28972
|
if (!t)
|
|
28973
28973
|
return n.apply(this, arguments);
|
|
28974
|
-
var
|
|
28975
|
-
typeof
|
|
28974
|
+
var l = arguments[arguments.length - 1];
|
|
28975
|
+
typeof l == "function" && l(0);
|
|
28976
28976
|
};
|
|
28977
28977
|
}
|
|
28978
28978
|
var wd = Ei("lock"), fo = function(n, e) {
|
|
@@ -28980,11 +28980,11 @@ var wd = Ei("lock"), fo = function(n, e) {
|
|
|
28980
28980
|
};
|
|
28981
28981
|
fo.prototype.withLock = function(n, e, t) {
|
|
28982
28982
|
!t && typeof e != "function" && (t = e, e = null);
|
|
28983
|
-
var i = t || (/* @__PURE__ */ new Date()).getTime() + "|" + Math.random(), s = (/* @__PURE__ */ new Date()).getTime(), a = this.storageKey, o = this.pollIntervalMS,
|
|
28983
|
+
var i = t || (/* @__PURE__ */ new Date()).getTime() + "|" + Math.random(), s = (/* @__PURE__ */ new Date()).getTime(), a = this.storageKey, o = this.pollIntervalMS, c = this.timeoutMS, l = this.storage, p = a + ":X", m = a + ":Y", g = a + ":Z", b = function(M) {
|
|
28984
28984
|
e && e(M);
|
|
28985
28985
|
}, y = function(M) {
|
|
28986
|
-
if ((/* @__PURE__ */ new Date()).getTime() - s >
|
|
28987
|
-
wd.error("Timeout waiting for mutex on " + a + "; clearing lock. [" + i + "]"),
|
|
28986
|
+
if ((/* @__PURE__ */ new Date()).getTime() - s > c) {
|
|
28987
|
+
wd.error("Timeout waiting for mutex on " + a + "; clearing lock. [" + i + "]"), l.removeItem(g), l.removeItem(m), w();
|
|
28988
28988
|
return;
|
|
28989
28989
|
}
|
|
28990
28990
|
setTimeout(function() {
|
|
@@ -28999,40 +28999,40 @@ fo.prototype.withLock = function(n, e, t) {
|
|
|
28999
28999
|
S(M, x);
|
|
29000
29000
|
});
|
|
29001
29001
|
}, f = function() {
|
|
29002
|
-
var M =
|
|
29002
|
+
var M = l.getItem(m);
|
|
29003
29003
|
if (M && M !== i)
|
|
29004
29004
|
return !1;
|
|
29005
|
-
if (
|
|
29005
|
+
if (l.setItem(m, i), l.getItem(m) === i)
|
|
29006
29006
|
return !0;
|
|
29007
|
-
if (!wi(
|
|
29007
|
+
if (!wi(l, !0))
|
|
29008
29008
|
throw new Error("localStorage support dropped while acquiring lock");
|
|
29009
29009
|
return !1;
|
|
29010
29010
|
}, w = function() {
|
|
29011
|
-
|
|
29012
|
-
if (
|
|
29011
|
+
l.setItem(p, i), S(f, function() {
|
|
29012
|
+
if (l.getItem(p) === i) {
|
|
29013
29013
|
A();
|
|
29014
29014
|
return;
|
|
29015
29015
|
}
|
|
29016
29016
|
y(function() {
|
|
29017
|
-
if (
|
|
29017
|
+
if (l.getItem(m) !== i) {
|
|
29018
29018
|
w();
|
|
29019
29019
|
return;
|
|
29020
29020
|
}
|
|
29021
29021
|
S(function() {
|
|
29022
|
-
return !
|
|
29022
|
+
return !l.getItem(g);
|
|
29023
29023
|
}, A);
|
|
29024
29024
|
});
|
|
29025
29025
|
});
|
|
29026
29026
|
}, A = function() {
|
|
29027
|
-
|
|
29027
|
+
l.setItem(g, "1");
|
|
29028
29028
|
try {
|
|
29029
29029
|
n();
|
|
29030
29030
|
} finally {
|
|
29031
|
-
|
|
29031
|
+
l.removeItem(g), l.getItem(m) === i && l.removeItem(m), l.getItem(p) === i && l.removeItem(p);
|
|
29032
29032
|
}
|
|
29033
29033
|
};
|
|
29034
29034
|
try {
|
|
29035
|
-
if (wi(
|
|
29035
|
+
if (wi(l, !0))
|
|
29036
29036
|
w();
|
|
29037
29037
|
else
|
|
29038
29038
|
throw new Error("localStorage support check failed");
|
|
@@ -29100,8 +29100,8 @@ On.prototype.removeItemsByID = function(n, e) {
|
|
|
29100
29100
|
if (a = ca(a, t), s = this.saveToStorage(a), s) {
|
|
29101
29101
|
a = this.readFromStorage();
|
|
29102
29102
|
for (var o = 0; o < a.length; o++) {
|
|
29103
|
-
var
|
|
29104
|
-
if (
|
|
29103
|
+
var c = a[o];
|
|
29104
|
+
if (c.id && t[c.id])
|
|
29105
29105
|
return this.reportError("Item not removed from storage"), !1;
|
|
29106
29106
|
}
|
|
29107
29107
|
}
|
|
@@ -29118,8 +29118,8 @@ On.prototype.removeItemsByID = function(n, e) {
|
|
|
29118
29118
|
if (this.reportError("Error acquiring storage lock", a), !wi(this.storage, !0) && (o = i(), !o))
|
|
29119
29119
|
try {
|
|
29120
29120
|
this.storage.removeItem(this.storageKey);
|
|
29121
|
-
} catch (
|
|
29122
|
-
this.reportError("Error clearing queue",
|
|
29121
|
+
} catch (c) {
|
|
29122
|
+
this.reportError("Error clearing queue", c);
|
|
29123
29123
|
}
|
|
29124
29124
|
e && e(o);
|
|
29125
29125
|
}, this), this.pid);
|
|
@@ -29206,7 +29206,7 @@ tn.prototype.flush = function(n) {
|
|
|
29206
29206
|
return;
|
|
29207
29207
|
}
|
|
29208
29208
|
n = n || {};
|
|
29209
|
-
var e = this.libConfig.batch_request_timeout_ms, t = (/* @__PURE__ */ new Date()).getTime(), i = this.batchSize, s = this.queue.fillBatch(i), a = s.length === i, o = [],
|
|
29209
|
+
var e = this.libConfig.batch_request_timeout_ms, t = (/* @__PURE__ */ new Date()).getTime(), i = this.batchSize, s = this.queue.fillBatch(i), a = s.length === i, o = [], c = {};
|
|
29210
29210
|
if (v.each(s, function(m) {
|
|
29211
29211
|
var g = m.payload;
|
|
29212
29212
|
if (this.beforeSendHook && !m.orphaned && (g = this.beforeSendHook(g)), g) {
|
|
@@ -29222,18 +29222,18 @@ tn.prototype.flush = function(n) {
|
|
|
29222
29222
|
timesSent: this.itemIdsSentSuccessfully[y]
|
|
29223
29223
|
}), b = !1) : this.reportError("[dupe] found item with no ID", { item: m }), b && o.push(g);
|
|
29224
29224
|
}
|
|
29225
|
-
|
|
29225
|
+
c[m.id] = g;
|
|
29226
29226
|
}, this), o.length < 1) {
|
|
29227
29227
|
this.resetFlush();
|
|
29228
29228
|
return;
|
|
29229
29229
|
}
|
|
29230
29230
|
this.requestInProgress = !0;
|
|
29231
|
-
var
|
|
29231
|
+
var l = v.bind(function(m) {
|
|
29232
29232
|
this.requestInProgress = !1;
|
|
29233
29233
|
try {
|
|
29234
29234
|
var g = !1;
|
|
29235
29235
|
if (n.unloading)
|
|
29236
|
-
this.queue.updatePayloads(
|
|
29236
|
+
this.queue.updatePayloads(c);
|
|
29237
29237
|
else if (v.isObject(m) && m.error === "timeout" && (/* @__PURE__ */ new Date()).getTime() - t >= e)
|
|
29238
29238
|
this.reportError("Network timeout; retrying"), this.flush();
|
|
29239
29239
|
else if (v.isObject(m) && (m.httpStatusCode >= 500 || m.httpStatusCode === 429 || m.httpStatusCode <= 0 && !vd() || m.error === "timeout")) {
|
|
@@ -29273,7 +29273,7 @@ tn.prototype.flush = function(n) {
|
|
|
29273
29273
|
timeout_ms: e
|
|
29274
29274
|
// eslint-disable-line camelcase
|
|
29275
29275
|
};
|
|
29276
|
-
n.unloading && (p.transport = "sendBeacon"), Lt.log("MIXPANEL REQUEST:", o), this.sendRequest(o, p,
|
|
29276
|
+
n.unloading && (p.transport = "sendBeacon"), Lt.log("MIXPANEL REQUEST:", o), this.sendRequest(o, p, l);
|
|
29277
29277
|
} catch (m) {
|
|
29278
29278
|
this.reportError("Error flushing request queue", m), this.resetFlush();
|
|
29279
29279
|
}
|
|
@@ -29387,23 +29387,23 @@ sn.prototype._flushEvents = Hn(function(n, e, t) {
|
|
|
29387
29387
|
if (i > 0) {
|
|
29388
29388
|
var s = this.replayId, a = n[0].timestamp;
|
|
29389
29389
|
(this.seqNo === 0 || !this.replayStartTime) && (this.seqNo !== 0 && this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."), this.replayStartTime = a);
|
|
29390
|
-
var o = n[i - 1].timestamp - this.replayStartTime,
|
|
29390
|
+
var o = n[i - 1].timestamp - this.replayStartTime, c = {
|
|
29391
29391
|
distinct_id: String(this._mixpanel.get_distinct_id()),
|
|
29392
29392
|
seq: this.seqNo,
|
|
29393
29393
|
batch_start_time: a / 1e3,
|
|
29394
29394
|
replay_id: s,
|
|
29395
29395
|
replay_length_ms: o,
|
|
29396
29396
|
replay_start_time: this.replayStartTime / 1e3
|
|
29397
|
-
},
|
|
29398
|
-
p && (
|
|
29397
|
+
}, l = v.JSONEncode(n), p = this._mixpanel.get_property("$device_id");
|
|
29398
|
+
p && (c.$device_id = p);
|
|
29399
29399
|
var m = this._mixpanel.get_property("$user_id");
|
|
29400
|
-
if (m && (
|
|
29401
|
-
var g = new Blob([
|
|
29400
|
+
if (m && (c.$user_id = m), ua) {
|
|
29401
|
+
var g = new Blob([l], { type: "application/json" }).stream(), b = g.pipeThrough(new ua("gzip"));
|
|
29402
29402
|
new Response(b).blob().then(v.bind(function(y) {
|
|
29403
|
-
|
|
29403
|
+
c.format = "gzip", this._sendRequest(s, c, y, t);
|
|
29404
29404
|
}, this));
|
|
29405
29405
|
} else
|
|
29406
|
-
|
|
29406
|
+
c.format = "body", this._sendRequest(s, c, l, t);
|
|
29407
29407
|
}
|
|
29408
29408
|
});
|
|
29409
29409
|
sn.prototype.reportError = function(n, e) {
|
|
@@ -29433,9 +29433,9 @@ kn.prototype.track = function(n, e, t, i) {
|
|
|
29433
29433
|
return;
|
|
29434
29434
|
}
|
|
29435
29435
|
return v.each(a, function(o) {
|
|
29436
|
-
v.register_event(o, this.override_event, function(
|
|
29437
|
-
var
|
|
29438
|
-
s.event_handler(
|
|
29436
|
+
v.register_event(o, this.override_event, function(c) {
|
|
29437
|
+
var l = {}, p = s.create_properties(t, this), m = s.mp.get_config("track_links_timeout");
|
|
29438
|
+
s.event_handler(c, this, l), window.setTimeout(s.track_callback(i, p, l, !0), m), s.mp.track(e, p, s.track_callback(i, p, l));
|
|
29439
29439
|
});
|
|
29440
29440
|
}, this), !0;
|
|
29441
29441
|
};
|
|
@@ -29669,27 +29669,27 @@ V.prototype._enqueue = function(n) {
|
|
|
29669
29669
|
};
|
|
29670
29670
|
V.prototype._flush_one_queue = function(n, e, t, i) {
|
|
29671
29671
|
var s = this, a = v.extend({}, this._mixpanel.persistence.load_queue(n)), o = a;
|
|
29672
|
-
!v.isUndefined(a) && v.isObject(a) && !v.isEmptyObject(a) && (s._mixpanel.persistence._pop_from_people_queue(n, a), s._mixpanel.persistence.save(), i && (o = i(a)), e.call(s, o, function(
|
|
29673
|
-
|
|
29672
|
+
!v.isUndefined(a) && v.isObject(a) && !v.isEmptyObject(a) && (s._mixpanel.persistence._pop_from_people_queue(n, a), s._mixpanel.persistence.save(), i && (o = i(a)), e.call(s, o, function(c, l) {
|
|
29673
|
+
c === 0 && s._mixpanel.persistence._add_to_people_queue(n, a), v.isUndefined(t) || t(c, l);
|
|
29674
29674
|
}));
|
|
29675
29675
|
};
|
|
29676
29676
|
V.prototype._flush = function(n, e, t, i, s, a, o) {
|
|
29677
|
-
var
|
|
29677
|
+
var c = this;
|
|
29678
29678
|
this._flush_one_queue(Rn, this.set, n), this._flush_one_queue(ht, this.set_once, i), this._flush_one_queue($e, this.unset, a, function(w) {
|
|
29679
29679
|
return v.keys(w);
|
|
29680
29680
|
}), this._flush_one_queue(Zn, this.increment, e), this._flush_one_queue(Qn, this.union, s);
|
|
29681
|
-
var
|
|
29682
|
-
if (!v.isUndefined(
|
|
29681
|
+
var l = this._mixpanel.persistence.load_queue(un);
|
|
29682
|
+
if (!v.isUndefined(l) && v.isArray(l) && l.length)
|
|
29683
29683
|
for (var p, m = function(w, A) {
|
|
29684
|
-
w === 0 &&
|
|
29685
|
-
}, g =
|
|
29686
|
-
|
|
29684
|
+
w === 0 && c._mixpanel.persistence._add_to_people_queue(un, p), v.isUndefined(t) || t(w, A);
|
|
29685
|
+
}, g = l.length - 1; g >= 0; g--)
|
|
29686
|
+
l = this._mixpanel.persistence.load_queue(un), p = l.pop(), c._mixpanel.persistence.save(), v.isEmptyObject(p) || c.append(p, m);
|
|
29687
29687
|
var b = this._mixpanel.persistence.load_queue(wn);
|
|
29688
29688
|
if (!v.isUndefined(b) && v.isArray(b) && b.length)
|
|
29689
29689
|
for (var y, S = function(w, A) {
|
|
29690
|
-
w === 0 &&
|
|
29690
|
+
w === 0 && c._mixpanel.persistence._add_to_people_queue(wn, y), v.isUndefined(o) || o(w, A);
|
|
29691
29691
|
}, f = b.length - 1; f >= 0; f--)
|
|
29692
|
-
b = this._mixpanel.persistence.load_queue(wn), y = b.pop(),
|
|
29692
|
+
b = this._mixpanel.persistence.load_queue(wn), y = b.pop(), c._mixpanel.persistence.save(), v.isEmptyObject(y) || c.remove(y, S);
|
|
29693
29693
|
};
|
|
29694
29694
|
V.prototype._is_reserved_property = function(n) {
|
|
29695
29695
|
return n === "$distinct_id" || n === "$token" || n === "$device_id" || n === "$user_id" || n === "$had_persisted_distinct_id";
|
|
@@ -29805,19 +29805,19 @@ Q.prototype.set_secure = function(n) {
|
|
|
29805
29805
|
n !== this.secure && (this.secure = !!n, this.remove(), this.save());
|
|
29806
29806
|
};
|
|
29807
29807
|
Q.prototype._add_to_people_queue = function(n, e) {
|
|
29808
|
-
var t = this._get_queue_key(n), i = e[n], s = this._get_or_create_queue(Rn), a = this._get_or_create_queue(ht), o = this._get_or_create_queue($e),
|
|
29808
|
+
var t = this._get_queue_key(n), i = e[n], s = this._get_or_create_queue(Rn), a = this._get_or_create_queue(ht), o = this._get_or_create_queue($e), c = this._get_or_create_queue(Zn), l = this._get_or_create_queue(Qn), p = this._get_or_create_queue(wn, []), m = this._get_or_create_queue(un, []);
|
|
29809
29809
|
t === us ? (v.extend(s, i), this._pop_from_people_queue(Zn, i), this._pop_from_people_queue(Qn, i), this._pop_from_people_queue($e, i)) : t === hs ? (v.each(i, function(g, b) {
|
|
29810
29810
|
b in a || (a[b] = g);
|
|
29811
29811
|
}), this._pop_from_people_queue($e, i)) : t === ms ? v.each(i, function(g) {
|
|
29812
|
-
v.each([s, a,
|
|
29812
|
+
v.each([s, a, c, l], function(b) {
|
|
29813
29813
|
g in b && delete b[g];
|
|
29814
29814
|
}), v.each(m, function(b) {
|
|
29815
29815
|
g in b && delete b[g];
|
|
29816
29816
|
}), o[g] = !0;
|
|
29817
29817
|
}) : t === ps ? (v.each(i, function(g, b) {
|
|
29818
|
-
b in s ? s[b] += g : (b in
|
|
29818
|
+
b in s ? s[b] += g : (b in c || (c[b] = 0), c[b] += g);
|
|
29819
29819
|
}, this), this._pop_from_people_queue($e, i)) : t === fs ? (v.each(i, function(g, b) {
|
|
29820
|
-
v.isArray(g) && (b in
|
|
29820
|
+
v.isArray(g) && (b in l || (l[b] = []), l[b] = l[b].concat(g));
|
|
29821
29821
|
}), this._pop_from_people_queue($e, i)) : t === bs ? (p.push(i), this._pop_from_people_queue(un, i)) : t === vs && (m.push(i), this._pop_from_people_queue($e, i)), ne.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"), ne.log(e), this.save();
|
|
29822
29822
|
};
|
|
29823
29823
|
Q.prototype._pop_from_people_queue = function(n, e) {
|
|
@@ -29947,10 +29947,10 @@ var Ao = {
|
|
|
29947
29947
|
i = new L();
|
|
29948
29948
|
}
|
|
29949
29949
|
if (i._cached_groups = {}, i._init(n, e, t), i.people = new V(), i.people._init(i), !i.get_config("skip_first_touch_marketing")) {
|
|
29950
|
-
var a = v.info.campaignParams(null), o = {},
|
|
29951
|
-
v.each(a, function(
|
|
29952
|
-
o["initial_" + p] =
|
|
29953
|
-
}),
|
|
29950
|
+
var a = v.info.campaignParams(null), o = {}, c = !1;
|
|
29951
|
+
v.each(a, function(l, p) {
|
|
29952
|
+
o["initial_" + p] = l, l && (c = !0);
|
|
29953
|
+
}), c && i.people.set_once(o);
|
|
29954
29954
|
}
|
|
29955
29955
|
return Sn.DEBUG = Sn.DEBUG || i.get_config("debug"), !v.isUndefined(s) && v.isArray(s) && (i._execute_array.call(i.people, s.people), i._execute_array(s)), i;
|
|
29956
29956
|
};
|
|
@@ -29982,15 +29982,15 @@ L.prototype._init = function(n, e, t) {
|
|
|
29982
29982
|
identify_called: !1
|
|
29983
29983
|
}, this.request_batchers = {}, this._batch_requests = this.get_config("batch_requests"), this._batch_requests) {
|
|
29984
29984
|
if (!v.localStorage.is_supported(!0) || !lt)
|
|
29985
|
-
this._batch_requests = !1, ne.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"), v.each(this.get_batcher_configs(), function(
|
|
29986
|
-
ne.log("Clearing batch queue " +
|
|
29985
|
+
this._batch_requests = !1, ne.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"), v.each(this.get_batcher_configs(), function(l) {
|
|
29986
|
+
ne.log("Clearing batch queue " + l.queue_key), v.localStorage.remove(l.queue_key);
|
|
29987
29987
|
});
|
|
29988
29988
|
else if (this.init_batchers(), xi && U.addEventListener) {
|
|
29989
29989
|
var a = v.bind(function() {
|
|
29990
29990
|
this.request_batchers.events.stopped || this.request_batchers.events.flush({ unloading: !0 });
|
|
29991
29991
|
}, this);
|
|
29992
|
-
U.addEventListener("pagehide", function(
|
|
29993
|
-
|
|
29992
|
+
U.addEventListener("pagehide", function(l) {
|
|
29993
|
+
l.persisted && a();
|
|
29994
29994
|
}), U.addEventListener("visibilitychange", function() {
|
|
29995
29995
|
ae.visibilityState === "hidden" && a();
|
|
29996
29996
|
});
|
|
@@ -30002,8 +30002,8 @@ L.prototype._init = function(n, e, t) {
|
|
|
30002
30002
|
distinct_id: ys + o,
|
|
30003
30003
|
$device_id: o
|
|
30004
30004
|
}, "");
|
|
30005
|
-
var
|
|
30006
|
-
|
|
30005
|
+
var c = this.get_config("track_pageview");
|
|
30006
|
+
c && this._init_url_change_tracking(c), this.get_config("record_sessions_percent") > 0 && Math.random() * 100 <= this.get_config("record_sessions_percent") && this.start_session_recording();
|
|
30007
30007
|
};
|
|
30008
30008
|
L.prototype.start_session_recording = Hn(function() {
|
|
30009
30009
|
if (!U.MutationObserver) {
|
|
@@ -30061,17 +30061,17 @@ L.prototype._init_url_change_tracking = function(n) {
|
|
|
30061
30061
|
U.dispatchEvent(new Event("mp_locationchange"));
|
|
30062
30062
|
});
|
|
30063
30063
|
var i = U.history.pushState;
|
|
30064
|
-
typeof i == "function" && (U.history.pushState = function(a, o,
|
|
30065
|
-
i.call(U.history, a, o,
|
|
30064
|
+
typeof i == "function" && (U.history.pushState = function(a, o, c) {
|
|
30065
|
+
i.call(U.history, a, o, c), U.dispatchEvent(new Event("mp_locationchange"));
|
|
30066
30066
|
});
|
|
30067
30067
|
var s = U.history.replaceState;
|
|
30068
|
-
typeof s == "function" && (U.history.replaceState = function(a, o,
|
|
30069
|
-
s.call(U.history, a, o,
|
|
30068
|
+
typeof s == "function" && (U.history.replaceState = function(a, o, c) {
|
|
30069
|
+
s.call(U.history, a, o, c), U.dispatchEvent(new Event("mp_locationchange"));
|
|
30070
30070
|
}), U.addEventListener("mp_locationchange", (function() {
|
|
30071
30071
|
var a = v.info.currentUrl(), o = !1;
|
|
30072
30072
|
if (n === "full-url" ? o = a !== e : n === "url-with-path-and-query-string" ? o = a.split("#")[0] !== e.split("#")[0] : n === "url-with-path" && (o = a.split("#")[0].split("?")[0] !== e.split("#")[0].split("?")[0]), o) {
|
|
30073
|
-
var
|
|
30074
|
-
|
|
30073
|
+
var c = this.track_pageview();
|
|
30074
|
+
c && (e = a);
|
|
30075
30075
|
}
|
|
30076
30076
|
}).bind(this));
|
|
30077
30077
|
}
|
|
@@ -30101,13 +30101,13 @@ L.prototype._send_request = function(n, e, t, i) {
|
|
|
30101
30101
|
verbose: this.get_config("verbose")
|
|
30102
30102
|
}, o = null;
|
|
30103
30103
|
!i && (v.isFunction(t) || typeof t == "string") && (i = t, t = null), t = v.extend(a, t || {}), lt || (t.method = "GET");
|
|
30104
|
-
var
|
|
30105
|
-
e.verbose && (p = !0), this.get_config("test") && (e.test = 1), p && (e.verbose = 1), this.get_config("img") && (e.img = 1), lt || (i ? e.callback = i : (p || this.get_config("test")) && (e.callback = "(function(){})")), e.ip = this.get_config("ip") ? 1 : 0, e._ = (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
30104
|
+
var c = t.method === "POST", l = xi && c && t.transport.toLowerCase() === "sendbeacon", p = t.verbose;
|
|
30105
|
+
e.verbose && (p = !0), this.get_config("test") && (e.test = 1), p && (e.verbose = 1), this.get_config("img") && (e.img = 1), lt || (i ? e.callback = i : (p || this.get_config("test")) && (e.callback = "(function(){})")), e.ip = this.get_config("ip") ? 1 : 0, e._ = (/* @__PURE__ */ new Date()).getTime().toString(), c && (o = "data=" + encodeURIComponent(e.data), delete e.data), n += "?" + v.HTTPBuildQuery(e);
|
|
30106
30106
|
var m = this;
|
|
30107
30107
|
if ("img" in e) {
|
|
30108
30108
|
var g = ae.createElement("img");
|
|
30109
30109
|
g.src = n, ae.body.appendChild(g);
|
|
30110
|
-
} else if (
|
|
30110
|
+
} else if (l) {
|
|
30111
30111
|
try {
|
|
30112
30112
|
s = xi(n, o);
|
|
30113
30113
|
} catch (A) {
|
|
@@ -30123,7 +30123,7 @@ L.prototype._send_request = function(n, e, t, i) {
|
|
|
30123
30123
|
var b = new XMLHttpRequest();
|
|
30124
30124
|
b.open(t.method, n, !0);
|
|
30125
30125
|
var y = this.get_config("xhr_headers");
|
|
30126
|
-
if (
|
|
30126
|
+
if (c && (y["Content-Type"] = "application/x-www-form-urlencoded"), v.each(y, function(A, M) {
|
|
30127
30127
|
b.setRequestHeader(M, A);
|
|
30128
30128
|
}), t.timeout_ms && typeof b.timeout < "u") {
|
|
30129
30129
|
b.timeout = t.timeout_ms;
|
|
@@ -30172,16 +30172,16 @@ L.prototype._execute_array = function(n) {
|
|
|
30172
30172
|
v.each(n, function(o) {
|
|
30173
30173
|
o && (e = o[0], v.isArray(e) ? s.push(o) : typeof o == "function" ? o.call(this) : v.isArray(o) && e === "alias" ? t.push(o) : v.isArray(o) && e.indexOf("track") !== -1 && typeof this[e] == "function" ? s.push(o) : i.push(o));
|
|
30174
30174
|
}, this);
|
|
30175
|
-
var a = function(o,
|
|
30176
|
-
v.each(o, function(
|
|
30177
|
-
if (v.isArray(
|
|
30178
|
-
var p =
|
|
30179
|
-
v.each(
|
|
30175
|
+
var a = function(o, c) {
|
|
30176
|
+
v.each(o, function(l) {
|
|
30177
|
+
if (v.isArray(l[0])) {
|
|
30178
|
+
var p = c;
|
|
30179
|
+
v.each(l, function(m) {
|
|
30180
30180
|
p = p[m[0]].apply(p, m.slice(1));
|
|
30181
30181
|
});
|
|
30182
30182
|
} else
|
|
30183
|
-
this[
|
|
30184
|
-
},
|
|
30183
|
+
this[l[0]].apply(this, l.slice(1));
|
|
30184
|
+
}, c);
|
|
30185
30185
|
};
|
|
30186
30186
|
a(t, this), a(i, this), a(s, this);
|
|
30187
30187
|
};
|
|
@@ -30251,7 +30251,7 @@ L.prototype._encode_data_for_request = function(n) {
|
|
|
30251
30251
|
L.prototype._track_or_batch = function(n, e) {
|
|
30252
30252
|
var t = v.truncate(n.data, 255), i = n.endpoint, s = n.batcher, a = n.should_send_immediately, o = n.send_request_options || {};
|
|
30253
30253
|
e = e || Pt;
|
|
30254
|
-
var
|
|
30254
|
+
var c = !0, l = v.bind(function() {
|
|
30255
30255
|
return o.skip_hooks || (t = this._run_hook("before_send_" + n.type, t)), t ? (ne.log("MIXPANEL REQUEST:"), ne.log(t), this._send_request(
|
|
30256
30256
|
i,
|
|
30257
30257
|
this._encode_data_for_request(t),
|
|
@@ -30260,8 +30260,8 @@ L.prototype._track_or_batch = function(n, e) {
|
|
|
30260
30260
|
)) : null;
|
|
30261
30261
|
}, this);
|
|
30262
30262
|
return this._batch_requests && !a ? s.enqueue(t, function(p) {
|
|
30263
|
-
p ? e(1, t) :
|
|
30264
|
-
}) :
|
|
30263
|
+
p ? e(1, t) : l();
|
|
30264
|
+
}) : c = l(), c && t;
|
|
30265
30265
|
};
|
|
30266
30266
|
L.prototype.track = Hn(function(n, e, t, i) {
|
|
30267
30267
|
!i && typeof t == "function" && (i = t, t = null), t = t || {};
|
|
@@ -30279,15 +30279,15 @@ L.prototype.track = Hn(function(n, e, t, i) {
|
|
|
30279
30279
|
e = v.extend({}, e), e.token = this.get_config("token");
|
|
30280
30280
|
var o = this.persistence.remove_event_timer(n);
|
|
30281
30281
|
if (!v.isUndefined(o)) {
|
|
30282
|
-
var
|
|
30283
|
-
e.$duration = parseFloat((
|
|
30282
|
+
var c = (/* @__PURE__ */ new Date()).getTime() - o;
|
|
30283
|
+
e.$duration = parseFloat((c / 1e3).toFixed(3));
|
|
30284
30284
|
}
|
|
30285
30285
|
this._set_default_superprops();
|
|
30286
|
-
var
|
|
30286
|
+
var l = this.get_config("track_marketing") ? v.info.marketingParams() : {};
|
|
30287
30287
|
e = v.extend(
|
|
30288
30288
|
{},
|
|
30289
30289
|
v.info.properties({ mp_loader: this.get_config("mp_loader") }),
|
|
30290
|
-
|
|
30290
|
+
l,
|
|
30291
30291
|
this.persistence.properties(),
|
|
30292
30292
|
this.unpersisted_superprops,
|
|
30293
30293
|
this.get_session_recording_properties(),
|
|
@@ -30392,23 +30392,23 @@ L.prototype._register_single = function(n, e) {
|
|
|
30392
30392
|
var t = {};
|
|
30393
30393
|
t[n] = e, this.register(t);
|
|
30394
30394
|
};
|
|
30395
|
-
L.prototype.identify = function(n, e, t, i, s, a, o,
|
|
30396
|
-
var
|
|
30397
|
-
if (n &&
|
|
30395
|
+
L.prototype.identify = function(n, e, t, i, s, a, o, c) {
|
|
30396
|
+
var l = this.get_distinct_id();
|
|
30397
|
+
if (n && l !== n) {
|
|
30398
30398
|
if (typeof n == "string" && n.indexOf(ys) === 0)
|
|
30399
30399
|
return this.report_error("distinct_id cannot have $device: prefix"), -1;
|
|
30400
30400
|
this.register({ $user_id: n });
|
|
30401
30401
|
}
|
|
30402
30402
|
if (!this.get_property("$device_id")) {
|
|
30403
|
-
var p =
|
|
30403
|
+
var p = l;
|
|
30404
30404
|
this.register_once({
|
|
30405
30405
|
$had_persisted_distinct_id: !0,
|
|
30406
30406
|
$device_id: p
|
|
30407
30407
|
}, "");
|
|
30408
30408
|
}
|
|
30409
|
-
n !==
|
|
30409
|
+
n !== l && n !== this.get_property(Mi) && (this.unregister(Mi), this.register({ distinct_id: n })), this._flags.identify_called = !0, this.people._flush(e, t, i, s, a, o, c), n !== l && this.track("$identify", {
|
|
30410
30410
|
distinct_id: n,
|
|
30411
|
-
$anon_distinct_id:
|
|
30411
|
+
$anon_distinct_id: l
|
|
30412
30412
|
}, { skip_hooks: !0 });
|
|
30413
30413
|
};
|
|
30414
30414
|
L.prototype.reset = function() {
|
|
@@ -30754,8 +30754,8 @@ class Vd {
|
|
|
30754
30754
|
this.verifyCardPayment(
|
|
30755
30755
|
this.token,
|
|
30756
30756
|
a,
|
|
30757
|
-
({ data: o, headers:
|
|
30758
|
-
this.onAction(this.step.success), this.redirectTo(o,
|
|
30757
|
+
({ data: o, headers: c }) => {
|
|
30758
|
+
this.onAction(this.step.success), this.redirectTo(o, c, "success");
|
|
30759
30759
|
},
|
|
30760
30760
|
() => {
|
|
30761
30761
|
this.onAction(this.step.failed);
|
|
@@ -30764,11 +30764,11 @@ class Vd {
|
|
|
30764
30764
|
}, 5e3), this.startTimer();
|
|
30765
30765
|
}
|
|
30766
30766
|
async verifyCardPayment(e, t, i, s) {
|
|
30767
|
-
let a = 0, o = t,
|
|
30768
|
-
this.abortController && (
|
|
30767
|
+
let a = 0, o = t, c = !0, l;
|
|
30768
|
+
this.abortController && (l = this.abortController.signal);
|
|
30769
30769
|
const p = async () => {
|
|
30770
30770
|
if (this.timeLeft <= 0) {
|
|
30771
|
-
|
|
30771
|
+
c = !1, this.onAction(this.step.end);
|
|
30772
30772
|
return;
|
|
30773
30773
|
}
|
|
30774
30774
|
a += 1;
|
|
@@ -30776,19 +30776,19 @@ class Vd {
|
|
|
30776
30776
|
const m = await en(
|
|
30777
30777
|
e,
|
|
30778
30778
|
this.ref,
|
|
30779
|
-
|
|
30779
|
+
l,
|
|
30780
30780
|
this.rdtCode,
|
|
30781
30781
|
this.url
|
|
30782
30782
|
);
|
|
30783
|
-
m.data.status === "failed" && (
|
|
30783
|
+
m.data.status === "failed" && (c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), this.setPaymentResponses(m.data, m.headers), _.track("verify_payment", {
|
|
30784
30784
|
payment_method: this.paymentMethod,
|
|
30785
30785
|
verification_status: "Failed"
|
|
30786
|
-
}), s(m)), m.data.status === "inProgress" && (
|
|
30786
|
+
}), s(m)), m.data.status === "inProgress" && (c && (o = t * (a + 1), this.timer = setTimeout(p, o)), this.setPaymentResponses(m.data, m.headers)), (m.data.status === "success" || m.data.status === "successful") && (this.setPaymentResponses(m.data, m.headers), c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), _.track("verify_payment", {
|
|
30787
30787
|
payment_method: this.paymentMethod,
|
|
30788
30788
|
verification_status: "Success"
|
|
30789
30789
|
}), i(m));
|
|
30790
30790
|
} catch {
|
|
30791
|
-
|
|
30791
|
+
c && (o = t * (a + 1), this.timer = setTimeout(p, o));
|
|
30792
30792
|
}
|
|
30793
30793
|
};
|
|
30794
30794
|
p();
|
|
@@ -31176,12 +31176,12 @@ class Lo {
|
|
|
31176
31176
|
e == null || e.addEventListener("click", () => this.closeCallback());
|
|
31177
31177
|
const t = this.container.querySelectorAll(
|
|
31178
31178
|
"#test-card-tabs .tab-btn"
|
|
31179
|
-
), i = this.container.querySelector("#no-auth-text"), s = this.container.querySelectorAll(".number-text"), a = this.container.querySelectorAll(".expiry-text"), o = this.container.querySelector("#address-text"),
|
|
31179
|
+
), i = this.container.querySelector("#no-auth-text"), s = this.container.querySelectorAll(".number-text"), a = this.container.querySelectorAll(".expiry-text"), o = this.container.querySelector("#address-text"), c = this.container.querySelector("#city-text"), l = this.container.querySelector("#state-text"), p = this.container.querySelector("#country-text"), m = this.container.querySelector("#zip-text");
|
|
31180
31180
|
i && (i.innerHTML = Xe["no-auth"]), s.forEach((y) => {
|
|
31181
31181
|
y.innerHTML = Xe.number;
|
|
31182
31182
|
}), a.forEach((y) => {
|
|
31183
31183
|
y.innerHTML = Xe.expiry;
|
|
31184
|
-
}), o && (o.innerHTML = Xe.address),
|
|
31184
|
+
}), o && (o.innerHTML = Xe.address), c && (c.innerHTML = Xe.city), l && (l.innerHTML = Xe.state), p && (p.innerHTML = Xe.country), m && (m.innerHTML = Xe.zip);
|
|
31185
31185
|
const g = this.container.querySelectorAll(".tab-content");
|
|
31186
31186
|
t.forEach((y) => {
|
|
31187
31187
|
y.addEventListener("click", () => {
|
|
@@ -31289,8 +31289,8 @@ class jd {
|
|
|
31289
31289
|
encryption: a,
|
|
31290
31290
|
planId: o,
|
|
31291
31291
|
// switchTab,
|
|
31292
|
-
token:
|
|
31293
|
-
currency:
|
|
31292
|
+
token: c,
|
|
31293
|
+
currency: l,
|
|
31294
31294
|
rdtCode: p,
|
|
31295
31295
|
url: m,
|
|
31296
31296
|
reference: g,
|
|
@@ -31354,7 +31354,7 @@ class jd {
|
|
|
31354
31354
|
d(this, "otpMessage");
|
|
31355
31355
|
d(this, "rawAvsData");
|
|
31356
31356
|
d(this, "translatedAvsData");
|
|
31357
|
-
this.currency =
|
|
31357
|
+
this.currency = l, this.onSuccess = b || (() => null), this.keys = D, this.testcardIsVisible = F, this.metadata = S, this.container = i, this.encryption = a, this.token = c, this.customer = s, this.planId = o, this.merchantDetails = {}, this.amount = e, this.totalAmount = t, this.rdtCode = p, this.url = m, this.reference = g, this.callBackUrl = y, this.metadata = S, this.localCurrency = f, this._currentStep = 1, this.activeRef = "", this.contents = this.container.querySelector(
|
|
31358
31358
|
"#payment-content-view"
|
|
31359
31359
|
), this.cardResponse = {}, this.cardResponseHeader = {}, this.hidePaymentMethods = w, this.showPaymentMethods = A, this.onClose = M, this.restartTransactionProcess = x, this.retryingPayment = E, this.isMaxRetriesReached = !1, this.isCancelledPlan = !1, this.errorText = "", this.otpMessage = "", this.renderCardContent(), this.rawAvsData = {
|
|
31360
31360
|
"billing-address": "Billing address",
|
|
@@ -31419,7 +31419,7 @@ class jd {
|
|
|
31419
31419
|
i && s && (i.classList.remove("hidden"), s.classList.add("hidden"));
|
|
31420
31420
|
const o = ft();
|
|
31421
31421
|
(() => {
|
|
31422
|
-
var
|
|
31422
|
+
var l, p, m, g, b, y, S;
|
|
31423
31423
|
if (this.retryingPayment) {
|
|
31424
31424
|
const f = {
|
|
31425
31425
|
channel: "card",
|
|
@@ -31434,7 +31434,7 @@ class jd {
|
|
|
31434
31434
|
);
|
|
31435
31435
|
} else {
|
|
31436
31436
|
const f = {
|
|
31437
|
-
amount: ((g = (m = (p = (
|
|
31437
|
+
amount: ((g = (m = (p = (l = this.merchantPlanDetail) == null ? void 0 : l.plan) == null ? void 0 : p.trial) == null ? void 0 : m.pricingList[0]) == null ? void 0 : g.amount) ?? this.amount,
|
|
31438
31438
|
// send trial amount if available
|
|
31439
31439
|
channel: "card",
|
|
31440
31440
|
applyDiscount: !0,
|
|
@@ -31464,44 +31464,44 @@ class jd {
|
|
|
31464
31464
|
this.url
|
|
31465
31465
|
);
|
|
31466
31466
|
}
|
|
31467
|
-
})().then(async ({ data:
|
|
31467
|
+
})().then(async ({ data: l, headers: p }) => {
|
|
31468
31468
|
var m, g, b, y, S, f, w, A;
|
|
31469
|
-
if (
|
|
31469
|
+
if (l.providerMessage) {
|
|
31470
31470
|
const M = await W(
|
|
31471
|
-
|
|
31471
|
+
l.providerMessage,
|
|
31472
31472
|
R()
|
|
31473
31473
|
);
|
|
31474
31474
|
this.errorText = M;
|
|
31475
31475
|
}
|
|
31476
|
-
if (
|
|
31477
|
-
this.currentStep = 4, this.reference =
|
|
31476
|
+
if (l.status === "failed")
|
|
31477
|
+
this.currentStep = 4, this.reference = l.reference, _.track("verify_payment", {
|
|
31478
31478
|
payment_method: "Card",
|
|
31479
31479
|
verification_status: "Failed",
|
|
31480
31480
|
authentication_type: "None"
|
|
31481
|
-
}), this.cardResponse =
|
|
31481
|
+
}), this.cardResponse = l, this.cardResponseHeader = p, l.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
31482
31482
|
P["payment-failed"]
|
|
31483
31483
|
), this.warningScreen.hideReportIssue();
|
|
31484
|
-
else if (["success", "successful"].includes(
|
|
31485
|
-
this.currentStep = 5, this.cardResponse =
|
|
31484
|
+
else if (["success", "successful"].includes(l.status))
|
|
31485
|
+
this.currentStep = 5, this.cardResponse = l, this.cardResponseHeader = p, _.track("verify_payment", {
|
|
31486
31486
|
payment_method: "Card",
|
|
31487
31487
|
verification_status: "Success",
|
|
31488
31488
|
authentication_type: "PIN"
|
|
31489
|
-
}), this.redirectTo(
|
|
31490
|
-
else if (!["success", "successful"].includes(
|
|
31491
|
-
if (this.cardResponse =
|
|
31492
|
-
if (this.activeRef =
|
|
31489
|
+
}), this.redirectTo(l, p, "success");
|
|
31490
|
+
else if (!["success", "successful"].includes(l.status) && l.status !== "failed")
|
|
31491
|
+
if (this.cardResponse = l, this.cardResponseHeader = p, l != null && l.authorization) {
|
|
31492
|
+
if (this.activeRef = l.reference, ((m = l == null ? void 0 : l.authorization) == null ? void 0 : m.mode) === "pin") {
|
|
31493
31493
|
this.currentStep = 2;
|
|
31494
31494
|
return;
|
|
31495
31495
|
}
|
|
31496
|
-
if (((g =
|
|
31497
|
-
(b =
|
|
31496
|
+
if (((g = l == null ? void 0 : l.authorization) == null ? void 0 : g.mode) === "3DS") {
|
|
31497
|
+
(b = l == null ? void 0 : l.authorization) != null && b.redirectUrl && this.redirectTo3DS((y = l == null ? void 0 : l.authorization) == null ? void 0 : y.redirectUrl), (S = l == null ? void 0 : l.authorization) != null && S.embeddedHtml && this.redirectToPreciumDoc((f = l == null ? void 0 : l.authorization) == null ? void 0 : f.embeddedHtml);
|
|
31498
31498
|
return;
|
|
31499
31499
|
}
|
|
31500
|
-
if (((w =
|
|
31501
|
-
this.cardResponse =
|
|
31500
|
+
if (((w = l == null ? void 0 : l.authorization) == null ? void 0 : w.mode) === "otp") {
|
|
31501
|
+
this.cardResponse = l, this.currentStep = 3;
|
|
31502
31502
|
return;
|
|
31503
31503
|
}
|
|
31504
|
-
if (((A =
|
|
31504
|
+
if (((A = l == null ? void 0 : l.authorization) == null ? void 0 : A.mode) === "avs") {
|
|
31505
31505
|
if (R() !== "en") {
|
|
31506
31506
|
this.showLoader();
|
|
31507
31507
|
const M = Object.values(this.rawAvsData);
|
|
@@ -31513,15 +31513,15 @@ class jd {
|
|
|
31513
31513
|
return;
|
|
31514
31514
|
}
|
|
31515
31515
|
} else
|
|
31516
|
-
this.currentStep = 4,
|
|
31516
|
+
this.currentStep = 4, l.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
31517
31517
|
P["error-with-payment"]
|
|
31518
31518
|
), this.warningScreen.hideReportIssue();
|
|
31519
|
-
}).catch(async (
|
|
31519
|
+
}).catch(async (l) => {
|
|
31520
31520
|
if (_.track("verify_payment", {
|
|
31521
31521
|
payment_method: "Card",
|
|
31522
31522
|
verification_status: "Null",
|
|
31523
31523
|
authentication_type: "None"
|
|
31524
|
-
}),
|
|
31524
|
+
}), l.code === "payment_max_retry_attempts")
|
|
31525
31525
|
this.isMaxRetriesReached = !0, this.verifyPaymentProcess(), this.currentStep = 4, _.track("max_retries_reached", {
|
|
31526
31526
|
payment_method: "Card"
|
|
31527
31527
|
}), this.warningScreen.setPaymentError(
|
|
@@ -31530,12 +31530,12 @@ class jd {
|
|
|
31530
31530
|
Z["merchant-back"]
|
|
31531
31531
|
);
|
|
31532
31532
|
else {
|
|
31533
|
-
if (
|
|
31533
|
+
if (l.message) {
|
|
31534
31534
|
const p = await W(
|
|
31535
|
-
|
|
31535
|
+
l.message,
|
|
31536
31536
|
R()
|
|
31537
31537
|
);
|
|
31538
|
-
this.errorText = p,
|
|
31538
|
+
this.errorText = p, l.code === "7137" ? (this.isCancelledPlan = !0, this.currentStep = 4, _.track("cancelled_plan", {
|
|
31539
31539
|
payment_method: "Card"
|
|
31540
31540
|
}), this.warningScreen.setPaymentError(
|
|
31541
31541
|
this.errorText,
|
|
@@ -31575,8 +31575,8 @@ class jd {
|
|
|
31575
31575
|
t,
|
|
31576
31576
|
this.rdtCode,
|
|
31577
31577
|
this.url
|
|
31578
|
-
).then(async ({ data: o, headers:
|
|
31579
|
-
var
|
|
31578
|
+
).then(async ({ data: o, headers: c }) => {
|
|
31579
|
+
var l, p, m, g, b, y, S, f, w, A;
|
|
31580
31580
|
if (o.providerMessage) {
|
|
31581
31581
|
const M = await W(
|
|
31582
31582
|
o.providerMessage,
|
|
@@ -31593,13 +31593,13 @@ class jd {
|
|
|
31593
31593
|
P["payment-failed"]
|
|
31594
31594
|
), this.warningScreen.hideReportIssue();
|
|
31595
31595
|
else if (["success", "successful", "failed"].includes(o.status))
|
|
31596
|
-
this.currentStep = 5, this.redirectTo(o,
|
|
31596
|
+
this.currentStep = 5, this.redirectTo(o, c, "success"), _.track("verify_payment", {
|
|
31597
31597
|
payment_method: "Card",
|
|
31598
31598
|
verification_status: "Success",
|
|
31599
31599
|
authentication_type: "PIN"
|
|
31600
31600
|
});
|
|
31601
31601
|
else {
|
|
31602
|
-
if (((
|
|
31602
|
+
if (((l = o == null ? void 0 : o.authorization) == null ? void 0 : l.mode) === "3DS") {
|
|
31603
31603
|
(p = o == null ? void 0 : o.authorization) != null && p.redirectUrl && this.redirectTo3DS((m = o == null ? void 0 : o.authorization) == null ? void 0 : m.redirectUrl), (g = o == null ? void 0 : o.authorization) != null && g.embeddedHtml && this.redirectToPreciumDoc((b = o == null ? void 0 : o.authorization) == null ? void 0 : b.embeddedHtml), (y = o == null ? void 0 : o.authorization) != null && y.jwt && ((S = o == null ? void 0 : o.authorization) != null && S.acsUrl) && ((f = o == null ? void 0 : o.authorization) != null && f.md) && (this.cardResponse = o, this.currentStep = 11);
|
|
31604
31604
|
return;
|
|
31605
31605
|
}
|
|
@@ -31628,11 +31628,11 @@ class jd {
|
|
|
31628
31628
|
verification_status: "Null",
|
|
31629
31629
|
authentication_type: "PIN"
|
|
31630
31630
|
}), o.message) {
|
|
31631
|
-
const
|
|
31631
|
+
const c = await W(
|
|
31632
31632
|
o.message,
|
|
31633
31633
|
R()
|
|
31634
31634
|
);
|
|
31635
|
-
this.errorText =
|
|
31635
|
+
this.errorText = c, this.currentStep = 4, this.warningScreen.setPaymentError(this.errorText);
|
|
31636
31636
|
} else
|
|
31637
31637
|
this.currentStep = 4, this.warningScreen.setPaymentError(
|
|
31638
31638
|
P["payment-failed"]
|
|
@@ -31665,55 +31665,55 @@ class jd {
|
|
|
31665
31665
|
a,
|
|
31666
31666
|
this.rdtCode,
|
|
31667
31667
|
this.url
|
|
31668
|
-
).then(async ({ data:
|
|
31668
|
+
).then(async ({ data: c, headers: l }) => {
|
|
31669
31669
|
var p, m, g, b, y, S, f;
|
|
31670
|
-
if (
|
|
31670
|
+
if (c.providerMessage) {
|
|
31671
31671
|
const w = await W(
|
|
31672
|
-
|
|
31672
|
+
c.providerMessage,
|
|
31673
31673
|
R()
|
|
31674
31674
|
);
|
|
31675
31675
|
this.errorText = w;
|
|
31676
31676
|
}
|
|
31677
|
-
if (
|
|
31677
|
+
if (c.status === "failed")
|
|
31678
31678
|
this.currentStep = 4, _.track("verify_payment", {
|
|
31679
31679
|
payment_method: "Card",
|
|
31680
31680
|
verification_status: "Failed",
|
|
31681
31681
|
authentication_type: "AVS"
|
|
31682
|
-
}),
|
|
31682
|
+
}), c.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
31683
31683
|
P["payment-failed"]
|
|
31684
31684
|
), this.warningScreen.hideReportIssue();
|
|
31685
|
-
else if (["success", "successful", "failed"].includes(
|
|
31686
|
-
["success", "successful"].includes(
|
|
31685
|
+
else if (["success", "successful", "failed"].includes(c.status))
|
|
31686
|
+
["success", "successful"].includes(c.status) && (this.currentStep = 5, this.redirectTo(c, l, "success"), _.track("verify_payment", {
|
|
31687
31687
|
payment_method: "Card",
|
|
31688
31688
|
verification_status: "Success",
|
|
31689
31689
|
authentication_type: "AVS"
|
|
31690
31690
|
}));
|
|
31691
31691
|
else {
|
|
31692
|
-
if (((p =
|
|
31692
|
+
if (((p = c == null ? void 0 : c.authorization) == null ? void 0 : p.mode) === "pin") {
|
|
31693
31693
|
this.currentStep = 2;
|
|
31694
31694
|
return;
|
|
31695
31695
|
}
|
|
31696
|
-
if (((m =
|
|
31697
|
-
(g =
|
|
31696
|
+
if (((m = c == null ? void 0 : c.authorization) == null ? void 0 : m.mode) === "3DS") {
|
|
31697
|
+
(g = c == null ? void 0 : c.authorization) != null && g.redirectUrl && this.redirectTo3DS((b = c == null ? void 0 : c.authorization) == null ? void 0 : b.redirectUrl), (y = c == null ? void 0 : c.authorization) != null && y.embeddedHtml && this.redirectToPreciumDoc((S = c == null ? void 0 : c.authorization) == null ? void 0 : S.embeddedHtml);
|
|
31698
31698
|
return;
|
|
31699
31699
|
}
|
|
31700
|
-
if (((f =
|
|
31701
|
-
this.cardResponse =
|
|
31700
|
+
if (((f = c == null ? void 0 : c.authorization) == null ? void 0 : f.mode) === "otp") {
|
|
31701
|
+
this.cardResponse = c, this.currentStep = 3;
|
|
31702
31702
|
return;
|
|
31703
31703
|
}
|
|
31704
31704
|
this.currentStep = 10;
|
|
31705
31705
|
}
|
|
31706
|
-
}).catch(async (
|
|
31706
|
+
}).catch(async (c) => {
|
|
31707
31707
|
if (_.track("verify_payment", {
|
|
31708
31708
|
payment_method: "Card",
|
|
31709
31709
|
verification_status: "Null",
|
|
31710
31710
|
authentication_type: "AVS"
|
|
31711
|
-
}),
|
|
31712
|
-
const
|
|
31713
|
-
|
|
31711
|
+
}), c.message) {
|
|
31712
|
+
const l = await W(
|
|
31713
|
+
c.message,
|
|
31714
31714
|
R()
|
|
31715
31715
|
);
|
|
31716
|
-
this.errorText =
|
|
31716
|
+
this.errorText = l, this.currentStep = 4, this.warningScreen.setPaymentError(this.errorText);
|
|
31717
31717
|
} else
|
|
31718
31718
|
this.currentStep = 4, this.warningScreen.setPaymentError(
|
|
31719
31719
|
P["payment-failed"]
|
|
@@ -31741,7 +31741,7 @@ class jd {
|
|
|
31741
31741
|
this.rdtCode,
|
|
31742
31742
|
this.url
|
|
31743
31743
|
).then(async ({ data: a, headers: o }) => {
|
|
31744
|
-
var
|
|
31744
|
+
var c, l, p, m, g, b, y;
|
|
31745
31745
|
if (a.providerMessage) {
|
|
31746
31746
|
const S = await W(
|
|
31747
31747
|
a.providerMessage,
|
|
@@ -31764,11 +31764,11 @@ class jd {
|
|
|
31764
31764
|
authentication_type: "PIN+0TP"
|
|
31765
31765
|
}));
|
|
31766
31766
|
else {
|
|
31767
|
-
if (this.activeRef = a.reference, ((
|
|
31767
|
+
if (this.activeRef = a.reference, ((c = a == null ? void 0 : a.authorization) == null ? void 0 : c.mode) === "pin") {
|
|
31768
31768
|
this.currentStep = 2;
|
|
31769
31769
|
return;
|
|
31770
31770
|
}
|
|
31771
|
-
if (((
|
|
31771
|
+
if (((l = a == null ? void 0 : a.authorization) == null ? void 0 : l.mode) === "3DS") {
|
|
31772
31772
|
(p = a == null ? void 0 : a.authorization) != null && p.redirectUrl && this.redirectTo3DS((m = a == null ? void 0 : a.authorization) == null ? void 0 : m.redirectUrl), (g = a == null ? void 0 : a.authorization) != null && g.embeddedHtml && this.redirectToPreciumDoc((b = a == null ? void 0 : a.authorization) == null ? void 0 : b.embeddedHtml);
|
|
31773
31773
|
return;
|
|
31774
31774
|
}
|
|
@@ -31852,22 +31852,22 @@ class jd {
|
|
|
31852
31852
|
}), this.currentStep = 6, this.showLoader();
|
|
31853
31853
|
const o = setInterval(() => {
|
|
31854
31854
|
a.closed && (clearInterval(o), this.verifyPayment(
|
|
31855
|
-
({ data:
|
|
31855
|
+
({ data: c, headers: l }) => {
|
|
31856
31856
|
this.currentStep = 5, _.track("verify_payment", {
|
|
31857
31857
|
payment_method: "Card",
|
|
31858
31858
|
verification_status: "Success",
|
|
31859
31859
|
authentication_type: "3DS"
|
|
31860
|
-
}), this.redirectTo(
|
|
31860
|
+
}), this.redirectTo(c, l, "success");
|
|
31861
31861
|
},
|
|
31862
|
-
async ({ data:
|
|
31863
|
-
if (
|
|
31864
|
-
const
|
|
31865
|
-
|
|
31862
|
+
async ({ data: c }) => {
|
|
31863
|
+
if (c.providerMessage) {
|
|
31864
|
+
const l = await W(
|
|
31865
|
+
c.providerMessage,
|
|
31866
31866
|
R()
|
|
31867
31867
|
);
|
|
31868
|
-
this.errorText =
|
|
31868
|
+
this.errorText = l;
|
|
31869
31869
|
}
|
|
31870
|
-
this.currentStep = 4,
|
|
31870
|
+
this.currentStep = 4, c.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
31871
31871
|
P["payment-failed"]
|
|
31872
31872
|
), this.warningScreen.hideReportIssue(), _.track("verify_payment", {
|
|
31873
31873
|
payment_method: "Card",
|
|
@@ -31979,7 +31979,7 @@ class jd {
|
|
|
31979
31979
|
);
|
|
31980
31980
|
}
|
|
31981
31981
|
renderCardContent(e) {
|
|
31982
|
-
var a, o,
|
|
31982
|
+
var a, o, c, l, p, m, g, b, y, S, f;
|
|
31983
31983
|
e && (this.merchantPlanDetail = e);
|
|
31984
31984
|
const t = document.getElementById(
|
|
31985
31985
|
"test-container"
|
|
@@ -32021,7 +32021,7 @@ class jd {
|
|
|
32021
32021
|
case 5:
|
|
32022
32022
|
this.successScreen = new Jn({
|
|
32023
32023
|
container: this.contents,
|
|
32024
|
-
amount: ((
|
|
32024
|
+
amount: ((l = (c = (o = (a = this.merchantPlanDetail) == null ? void 0 : a.plan) == null ? void 0 : o.trial) == null ? void 0 : c.pricingList[0]) == null ? void 0 : l.amount) ?? this.totalAmount,
|
|
32025
32025
|
// show trial amount if available
|
|
32026
32026
|
currency: this.currency,
|
|
32027
32027
|
localCurrency: this.localCurrency,
|
|
@@ -32138,12 +32138,12 @@ class jd {
|
|
|
32138
32138
|
}, 1800) : i === "success" && this.onSuccess(e);
|
|
32139
32139
|
}
|
|
32140
32140
|
displayButtonText(e) {
|
|
32141
|
-
var i, s, a, o,
|
|
32141
|
+
var i, s, a, o, c, l, p, m, g, b;
|
|
32142
32142
|
const t = this.container.querySelector(
|
|
32143
32143
|
"#details-form-button-text"
|
|
32144
32144
|
);
|
|
32145
32145
|
if (t) {
|
|
32146
|
-
const y = (s = (i = this == null ? void 0 : this.merchantPlanDetail) == null ? void 0 : i.plan) == null ? void 0 : s.trial, S = (
|
|
32146
|
+
const y = (s = (i = this == null ? void 0 : this.merchantPlanDetail) == null ? void 0 : i.plan) == null ? void 0 : s.trial, S = (l = (c = (o = (a = this == null ? void 0 : this.merchantPlanDetail) == null ? void 0 : a.plan) == null ? void 0 : o.trial) == null ? void 0 : c.pricingList[0]) == null ? void 0 : l.amount, f = In(this.currency, this.localCurrency), w = f === "USD" ? (m = (p = this.merchantPlanDetail) == null ? void 0 : p.rate) == null ? void 0 : m.from : f;
|
|
32147
32147
|
e ? t.textContent = e : t.textContent = `${pe["continue-to"]} ${w} ${_e(
|
|
32148
32148
|
y && S != null ? S : this.totalAmount !== this.amount ? this.totalAmount : (this.amount || 0) * (this.currency === "USD" ? (b = (g = this.merchantPlanDetail) == null ? void 0 : g.rate) == null ? void 0 : b.rate : 1),
|
|
32149
32149
|
2
|
|
@@ -32274,17 +32274,17 @@ var To = { exports: {} };
|
|
|
32274
32274
|
};
|
|
32275
32275
|
return t[a].call(o.exports, o, o.exports, s), o.l = !0, o.exports;
|
|
32276
32276
|
}
|
|
32277
|
-
return s.m = t, s.c = i, s.d = function(a, o,
|
|
32278
|
-
s.o(a, o) || Object.defineProperty(a, o, { enumerable: !0, get:
|
|
32277
|
+
return s.m = t, s.c = i, s.d = function(a, o, c) {
|
|
32278
|
+
s.o(a, o) || Object.defineProperty(a, o, { enumerable: !0, get: c });
|
|
32279
32279
|
}, s.r = function(a) {
|
|
32280
32280
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(a, "__esModule", { value: !0 });
|
|
32281
32281
|
}, s.t = function(a, o) {
|
|
32282
32282
|
if (o & 1 && (a = s(a)), o & 8 || o & 4 && typeof a == "object" && a && a.__esModule) return a;
|
|
32283
|
-
var
|
|
32284
|
-
if (s.r(
|
|
32283
|
+
var c = /* @__PURE__ */ Object.create(null);
|
|
32284
|
+
if (s.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: a }), o & 2 && typeof a != "string") for (var l in a) s.d(c, l, (function(p) {
|
|
32285
32285
|
return a[p];
|
|
32286
|
-
}).bind(null,
|
|
32287
|
-
return
|
|
32286
|
+
}).bind(null, l));
|
|
32287
|
+
return c;
|
|
32288
32288
|
}, s.n = function(a) {
|
|
32289
32289
|
var o = a && a.__esModule ? (
|
|
32290
32290
|
/******/
|
|
@@ -32322,7 +32322,7 @@ var To = { exports: {} };
|
|
|
32322
32322
|
};
|
|
32323
32323
|
}();
|
|
32324
32324
|
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
32325
|
-
var o = 256,
|
|
32325
|
+
var o = 256, c = (
|
|
32326
32326
|
/** @class */
|
|
32327
32327
|
function() {
|
|
32328
32328
|
function f(w) {
|
|
@@ -32371,14 +32371,14 @@ var To = { exports: {} };
|
|
|
32371
32371
|
}, f;
|
|
32372
32372
|
}()
|
|
32373
32373
|
);
|
|
32374
|
-
i.Coder =
|
|
32375
|
-
var
|
|
32374
|
+
i.Coder = c;
|
|
32375
|
+
var l = new c();
|
|
32376
32376
|
function p(f) {
|
|
32377
|
-
return
|
|
32377
|
+
return l.encode(f);
|
|
32378
32378
|
}
|
|
32379
32379
|
i.encode = p;
|
|
32380
32380
|
function m(f) {
|
|
32381
|
-
return
|
|
32381
|
+
return l.decode(f);
|
|
32382
32382
|
}
|
|
32383
32383
|
i.decode = m;
|
|
32384
32384
|
var g = (
|
|
@@ -32395,7 +32395,7 @@ var To = { exports: {} };
|
|
|
32395
32395
|
var M = o;
|
|
32396
32396
|
return M += (44 - A & A - 46) >>> 8 & -o + A - 45 + 62, M += (94 - A & A - 96) >>> 8 & -o + A - 95 + 63, M += (47 - A & A - 58) >>> 8 & -o + A - 48 + 52, M += (64 - A & A - 91) >>> 8 & -o + A - 65 + 0, M += (96 - A & A - 123) >>> 8 & -o + A - 97 + 26, M;
|
|
32397
32397
|
}, w;
|
|
32398
|
-
}(
|
|
32398
|
+
}(c)
|
|
32399
32399
|
);
|
|
32400
32400
|
i.URLSafeCoder = g;
|
|
32401
32401
|
var b = new g();
|
|
@@ -32407,11 +32407,11 @@ var To = { exports: {} };
|
|
|
32407
32407
|
return b.decode(f);
|
|
32408
32408
|
}
|
|
32409
32409
|
i.decodeURLSafe = S, i.encodedLength = function(f) {
|
|
32410
|
-
return
|
|
32410
|
+
return l.encodedLength(f);
|
|
32411
32411
|
}, i.maxDecodedLength = function(f) {
|
|
32412
|
-
return
|
|
32412
|
+
return l.maxDecodedLength(f);
|
|
32413
32413
|
}, i.decodedLength = function(f) {
|
|
32414
|
-
return
|
|
32414
|
+
return l.decodedLength(f);
|
|
32415
32415
|
};
|
|
32416
32416
|
},
|
|
32417
32417
|
/* 1 */
|
|
@@ -32419,15 +32419,15 @@ var To = { exports: {} };
|
|
|
32419
32419
|
function(t, i, s) {
|
|
32420
32420
|
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
32421
32421
|
var a = "utf8: invalid string", o = "utf8: invalid source encoding";
|
|
32422
|
-
function
|
|
32423
|
-
for (var g = new Uint8Array(
|
|
32422
|
+
function c(m) {
|
|
32423
|
+
for (var g = new Uint8Array(l(m)), b = 0, y = 0; y < m.length; y++) {
|
|
32424
32424
|
var S = m.charCodeAt(y);
|
|
32425
32425
|
S < 128 ? g[b++] = S : S < 2048 ? (g[b++] = 192 | S >> 6, g[b++] = 128 | S & 63) : S < 55296 ? (g[b++] = 224 | S >> 12, g[b++] = 128 | S >> 6 & 63, g[b++] = 128 | S & 63) : (y++, S = (S & 1023) << 10, S |= m.charCodeAt(y) & 1023, S += 65536, g[b++] = 240 | S >> 18, g[b++] = 128 | S >> 12 & 63, g[b++] = 128 | S >> 6 & 63, g[b++] = 128 | S & 63);
|
|
32426
32426
|
}
|
|
32427
32427
|
return g;
|
|
32428
32428
|
}
|
|
32429
|
-
i.encode =
|
|
32430
|
-
function
|
|
32429
|
+
i.encode = c;
|
|
32430
|
+
function l(m) {
|
|
32431
32431
|
for (var g = 0, b = 0; b < m.length; b++) {
|
|
32432
32432
|
var y = m.charCodeAt(b);
|
|
32433
32433
|
if (y < 128)
|
|
@@ -32445,7 +32445,7 @@ var To = { exports: {} };
|
|
|
32445
32445
|
}
|
|
32446
32446
|
return g;
|
|
32447
32447
|
}
|
|
32448
|
-
i.encodedLength =
|
|
32448
|
+
i.encodedLength = l;
|
|
32449
32449
|
function p(m) {
|
|
32450
32450
|
for (var g = [], b = 0; b < m.length; b++) {
|
|
32451
32451
|
var y = m[b];
|
|
@@ -32512,7 +32512,7 @@ var To = { exports: {} };
|
|
|
32512
32512
|
delete this[r.number];
|
|
32513
32513
|
}
|
|
32514
32514
|
}
|
|
32515
|
-
var o = new a("_pusher_script_", "Pusher.ScriptReceivers"),
|
|
32515
|
+
var o = new a("_pusher_script_", "Pusher.ScriptReceivers"), c = {
|
|
32516
32516
|
VERSION: "8.4.0",
|
|
32517
32517
|
PROTOCOL: 7,
|
|
32518
32518
|
wsPort: 80,
|
|
@@ -32539,7 +32539,7 @@ var To = { exports: {} };
|
|
|
32539
32539
|
cdn_http: "http://js.pusher.com",
|
|
32540
32540
|
cdn_https: "https://js.pusher.com",
|
|
32541
32541
|
dependency_suffix: ""
|
|
32542
|
-
},
|
|
32542
|
+
}, l = c;
|
|
32543
32543
|
class p {
|
|
32544
32544
|
constructor(r) {
|
|
32545
32545
|
this.options = r, this.receivers = r.receivers || o, this.loading = {};
|
|
@@ -32572,10 +32572,10 @@ var To = { exports: {} };
|
|
|
32572
32572
|
}
|
|
32573
32573
|
}
|
|
32574
32574
|
var m = new a("_pusher_dependencies", "Pusher.DependenciesReceivers"), g = new p({
|
|
32575
|
-
cdn_http:
|
|
32576
|
-
cdn_https:
|
|
32577
|
-
version:
|
|
32578
|
-
suffix:
|
|
32575
|
+
cdn_http: l.cdn_http,
|
|
32576
|
+
cdn_https: l.cdn_https,
|
|
32577
|
+
version: l.VERSION,
|
|
32578
|
+
suffix: l.dependency_suffix,
|
|
32579
32579
|
receivers: m
|
|
32580
32580
|
});
|
|
32581
32581
|
const b = {
|
|
@@ -32975,7 +32975,7 @@ var To = { exports: {} };
|
|
|
32975
32975
|
return C + "://" + k + u;
|
|
32976
32976
|
}
|
|
32977
32977
|
function Xn(h, r) {
|
|
32978
|
-
var u = "/app/" + h, C = "?protocol=" +
|
|
32978
|
+
var u = "/app/" + h, C = "?protocol=" + l.PROTOCOL + "&client=js&version=" + l.VERSION + (r ? "&" + r : "");
|
|
32979
32979
|
return u + C;
|
|
32980
32980
|
}
|
|
32981
32981
|
var Wt = {
|
|
@@ -34693,17 +34693,17 @@ var To = { exports: {} };
|
|
|
34693
34693
|
};
|
|
34694
34694
|
function Nr(h, r) {
|
|
34695
34695
|
let u = {
|
|
34696
|
-
activityTimeout: h.activityTimeout ||
|
|
34696
|
+
activityTimeout: h.activityTimeout || l.activityTimeout,
|
|
34697
34697
|
cluster: h.cluster,
|
|
34698
|
-
httpPath: h.httpPath ||
|
|
34699
|
-
httpPort: h.httpPort ||
|
|
34700
|
-
httpsPort: h.httpsPort ||
|
|
34701
|
-
pongTimeout: h.pongTimeout ||
|
|
34702
|
-
statsHost: h.statsHost ||
|
|
34703
|
-
unavailableTimeout: h.unavailableTimeout ||
|
|
34704
|
-
wsPath: h.wsPath ||
|
|
34705
|
-
wsPort: h.wsPort ||
|
|
34706
|
-
wssPort: h.wssPort ||
|
|
34698
|
+
httpPath: h.httpPath || l.httpPath,
|
|
34699
|
+
httpPort: h.httpPort || l.httpPort,
|
|
34700
|
+
httpsPort: h.httpsPort || l.httpsPort,
|
|
34701
|
+
pongTimeout: h.pongTimeout || l.pongTimeout,
|
|
34702
|
+
statsHost: h.statsHost || l.stats_host,
|
|
34703
|
+
unavailableTimeout: h.unavailableTimeout || l.unavailableTimeout,
|
|
34704
|
+
wsPath: h.wsPath || l.wsPath,
|
|
34705
|
+
wsPort: h.wsPort || l.wsPort,
|
|
34706
|
+
wssPort: h.wssPort || l.wssPort,
|
|
34707
34707
|
enableStats: Kr(h),
|
|
34708
34708
|
httpHost: Or(h),
|
|
34709
34709
|
useTLS: Fr(h),
|
|
@@ -34714,7 +34714,7 @@ var To = { exports: {} };
|
|
|
34714
34714
|
return "disabledTransports" in h && (u.disabledTransports = h.disabledTransports), "enabledTransports" in h && (u.enabledTransports = h.enabledTransports), "ignoreNullOrigin" in h && (u.ignoreNullOrigin = h.ignoreNullOrigin), "timelineParams" in h && (u.timelineParams = h.timelineParams), "nacl" in h && (u.nacl = h.nacl), u;
|
|
34715
34715
|
}
|
|
34716
34716
|
function Or(h) {
|
|
34717
|
-
return h.httpHost ? h.httpHost : h.cluster ? `sockjs-${h.cluster}.pusher.com` :
|
|
34717
|
+
return h.httpHost ? h.httpHost : h.cluster ? `sockjs-${h.cluster}.pusher.com` : l.httpHost;
|
|
34718
34718
|
}
|
|
34719
34719
|
function Ur(h) {
|
|
34720
34720
|
return h.wsHost ? h.wsHost : Vr(h.cluster);
|
|
@@ -34729,14 +34729,14 @@ var To = { exports: {} };
|
|
|
34729
34729
|
return "enableStats" in h ? h.enableStats : "disableStats" in h ? !h.disableStats : !1;
|
|
34730
34730
|
}
|
|
34731
34731
|
function Gr(h) {
|
|
34732
|
-
const r = Object.assign(Object.assign({},
|
|
34732
|
+
const r = Object.assign(Object.assign({}, l.userAuthentication), h.userAuthentication);
|
|
34733
34733
|
return "customHandler" in r && r.customHandler != null ? r.customHandler : Dr(r);
|
|
34734
34734
|
}
|
|
34735
34735
|
function jr(h, r) {
|
|
34736
34736
|
let u;
|
|
34737
|
-
return "channelAuthorization" in h ? u = Object.assign(Object.assign({},
|
|
34738
|
-
transport: h.authTransport ||
|
|
34739
|
-
endpoint: h.authEndpoint ||
|
|
34737
|
+
return "channelAuthorization" in h ? u = Object.assign(Object.assign({}, l.channelAuthorization), h.channelAuthorization) : (u = {
|
|
34738
|
+
transport: h.authTransport || l.authTransport,
|
|
34739
|
+
endpoint: h.authEndpoint || l.authEndpoint
|
|
34740
34740
|
}, "auth" in h && ("params" in h.auth && (u.params = h.auth.params), "headers" in h.auth && (u.headers = h.auth.headers)), "authorizer" in h && (u.customHandler = Hr(r, u, h.authorizer))), u;
|
|
34741
34741
|
}
|
|
34742
34742
|
function qr(h, r) {
|
|
@@ -34849,7 +34849,7 @@ var To = { exports: {} };
|
|
|
34849
34849
|
params: this.config.timelineParams || {},
|
|
34850
34850
|
limit: 50,
|
|
34851
34851
|
level: ti.INFO,
|
|
34852
|
-
version:
|
|
34852
|
+
version: l.VERSION
|
|
34853
34853
|
}), this.config.enableStats && (this.timelineSender = fn.createTimelineSender(this.timeline, {
|
|
34854
34854
|
host: this.config.statsHost,
|
|
34855
34855
|
path: "/timeline/v2/" + K.TimelineTransport.name
|
|
@@ -34961,7 +34961,7 @@ class pa {
|
|
|
34961
34961
|
this.container = e.container, this.onAction = e.onAction, this.onFail = e.onFail, this.initialTime = 1800, this.timeLeft = this.initialTime, this.timerId = null;
|
|
34962
34962
|
}
|
|
34963
34963
|
attachListener() {
|
|
34964
|
-
const e = this.container.querySelector("#transfer-acn"), t = this.container.querySelector("#transfer-bank"), i = this.container.querySelector("#copy-acn"), s = this.container.querySelector("#acn-tooltip"), a = this.container.querySelector("#transfer-amount"), o = this.container.querySelector("#copy-amount"),
|
|
34964
|
+
const e = this.container.querySelector("#transfer-acn"), t = this.container.querySelector("#transfer-bank"), i = this.container.querySelector("#copy-acn"), s = this.container.querySelector("#acn-tooltip"), a = this.container.querySelector("#transfer-amount"), o = this.container.querySelector("#copy-amount"), c = this.container.querySelector("#amount-tooltip"), l = this.container.querySelector("#transfer-button"), p = this.container.querySelector(
|
|
34965
34965
|
"#transfer-header-text"
|
|
34966
34966
|
), m = this.container.querySelector("#bank-name-text"), g = this.container.querySelector("#beneficiary-text"), b = this.container.querySelector("#amount-text"), y = this.container.querySelectorAll(".copy-text"), S = this.container.querySelector(
|
|
34967
34967
|
"#account-number-text"
|
|
@@ -34976,14 +34976,14 @@ class pa {
|
|
|
34976
34976
|
bank_name: t.innerHTML
|
|
34977
34977
|
}), this.copyToClipboard(e.innerHTML, s));
|
|
34978
34978
|
}), o && a && o.addEventListener("click", () => {
|
|
34979
|
-
|
|
34979
|
+
c && (_.track("copy_transferAmount", {
|
|
34980
34980
|
payment_method: "Transfer",
|
|
34981
34981
|
amount: a.innerHTML.split(" ")[1].replace(/,/g, "")
|
|
34982
34982
|
}), this.copyToClipboard(
|
|
34983
34983
|
a.innerHTML.split(" ")[1].replace(/,/g, ""),
|
|
34984
|
-
|
|
34984
|
+
c
|
|
34985
34985
|
));
|
|
34986
|
-
}),
|
|
34986
|
+
}), l && (l.innerHTML = Fe["made-transfer"], l.addEventListener("click", () => {
|
|
34987
34987
|
this.onAction(5), _.track("initiate_payment_verification", {
|
|
34988
34988
|
payment_method: "Transfer"
|
|
34989
34989
|
});
|
|
@@ -35012,9 +35012,9 @@ class pa {
|
|
|
35012
35012
|
renderComponent(e) {
|
|
35013
35013
|
var g, b, y, S, f, w;
|
|
35014
35014
|
e && (this.payment = e), this.container.innerHTML = this.render();
|
|
35015
|
-
const t = this.container.querySelector("#transfer-amount"), i = this.container.querySelector("#transfer-bank"), s = this.container.querySelector("#account-name"), a = this.container.querySelector("#transfer-acn"), o = this.container.querySelector("#time-left"),
|
|
35016
|
-
if (t && (t.innerHTML = `${
|
|
35017
|
-
this.payment.totalTaxAmount ? this.payment.totalLocalAmount :
|
|
35015
|
+
const t = this.container.querySelector("#transfer-amount"), i = this.container.querySelector("#transfer-bank"), s = this.container.querySelector("#account-name"), a = this.container.querySelector("#transfer-acn"), o = this.container.querySelector("#time-left"), c = ((g = this.payment) == null ? void 0 : g.currency) || "USD", l = c === "USD" ? (b = this.payment) == null ? void 0 : b.localCurrency : c;
|
|
35016
|
+
if (t && (t.innerHTML = `${l} ${_e(
|
|
35017
|
+
this.payment.totalTaxAmount ? this.payment.totalLocalAmount : c === "USD" ? (y = this.payment) == null ? void 0 : y.localAmount : (S = this.payment) == null ? void 0 : S.amount,
|
|
35018
35018
|
2
|
|
35019
35019
|
)}`), i && this.payment.bankDetails && (i.innerHTML = (f = this.payment.bankDetails) == null ? void 0 : f.bankName), s && this.payment.bankDetails && (s.innerHTML = (w = this.payment.bankDetails) == null ? void 0 : w.accountName), a && this.payment.bankDetails && (a.innerHTML = this.payment.bankDetails.accountNumber), o && (o.innerHTML = ct(this.initialTime)), this.startTimer("poll"), e.status === "inProgress") {
|
|
35020
35020
|
const A = "45654f3ce4c9512ea9a4", M = "us2";
|
|
@@ -35149,8 +35149,8 @@ class Jd {
|
|
|
35149
35149
|
"#confirming-txn-status-end-text"
|
|
35150
35150
|
), i = this.container.querySelector(
|
|
35151
35151
|
"#account-details-text"
|
|
35152
|
-
), s = this.container.querySelector("#please-wait-text"), a = this.container.querySelector("#minutes-text"), o = this.container.querySelector("#bankname-text"),
|
|
35153
|
-
e && (e.innerHTML = P["confirming-txn-status"]), t && (t.innerHTML = P["few-minutes"]), s && (s.innerHTML = P["please-wait-for"]), a && (a.innerHTML = P.minutes), o && (o.innerHTML = Fe["bank-name"]),
|
|
35152
|
+
), s = this.container.querySelector("#please-wait-text"), a = this.container.querySelector("#minutes-text"), o = this.container.querySelector("#bankname-text"), c = this.container.querySelector("#beneficiary-text"), l = this.container.querySelector("#transfer-bank"), p = this.container.querySelector("#transfer-acn-pr"), m = this.container.querySelector("#copy-acn-pr"), g = this.container.querySelector("#acn-tooltip-pr");
|
|
35153
|
+
e && (e.innerHTML = P["confirming-txn-status"]), t && (t.innerHTML = P["few-minutes"]), s && (s.innerHTML = P["please-wait-for"]), a && (a.innerHTML = P.minutes), o && (o.innerHTML = Fe["bank-name"]), c && (c.innerHTML = Fe.beneficiary), i && (i.innerHTML = Fe["account-details"]);
|
|
35154
35154
|
const b = this.container.querySelector("#show-acn");
|
|
35155
35155
|
b && b.addEventListener("click", () => {
|
|
35156
35156
|
this.onAction(1), clearTimeout(this.timer);
|
|
@@ -35159,7 +35159,7 @@ class Jd {
|
|
|
35159
35159
|
payment_method: "Transfer",
|
|
35160
35160
|
payment_process: "Payment Verification",
|
|
35161
35161
|
account_number: p.innerHTML,
|
|
35162
|
-
bank_name:
|
|
35162
|
+
bank_name: l == null ? void 0 : l.innerHTML
|
|
35163
35163
|
}), g && (g.innerHTML = P.copy, this.copyToClipboard(p.innerHTML, g));
|
|
35164
35164
|
}), this.initialTime = 300, this.timeLeft = this.initialTime;
|
|
35165
35165
|
const y = 3e4;
|
|
@@ -35174,9 +35174,9 @@ class Jd {
|
|
|
35174
35174
|
a && (a.setAttribute("stroke-dasharray", `${t}`), a.setAttribute("stroke-dashoffset", `${s}`));
|
|
35175
35175
|
}
|
|
35176
35176
|
async verifyTransfer(e, t, i) {
|
|
35177
|
-
let s = 0, a = t, o = !0,
|
|
35178
|
-
this.abortController && (
|
|
35179
|
-
const
|
|
35177
|
+
let s = 0, a = t, o = !0, c;
|
|
35178
|
+
this.abortController && (c = this.abortController.signal);
|
|
35179
|
+
const l = async () => {
|
|
35180
35180
|
if (this.timeLeft <= 0) {
|
|
35181
35181
|
o = !1, this.onAction(8);
|
|
35182
35182
|
return;
|
|
@@ -35186,11 +35186,11 @@ class Jd {
|
|
|
35186
35186
|
const p = await en(
|
|
35187
35187
|
e,
|
|
35188
35188
|
this.ref,
|
|
35189
|
-
|
|
35189
|
+
c,
|
|
35190
35190
|
this.rdtCode,
|
|
35191
35191
|
this.url
|
|
35192
35192
|
);
|
|
35193
|
-
p.data.status === "inProgress" ? (o && (a = t * (s + 1), this.timer = setTimeout(
|
|
35193
|
+
p.data.status === "inProgress" ? (o && (a = t * (s + 1), this.timer = setTimeout(l, a)), this.setPaymentResponses(p.data, p.headers)) : p.data.status === "successful" || p.data.status === "success" ? (this.setPaymentResponses(p.data, p.headers), o = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), _.track("verify_payment", {
|
|
35194
35194
|
payment_method: "Transfer",
|
|
35195
35195
|
verification_status: "Success"
|
|
35196
35196
|
}), i(p)) : p.data.status === "failed" && (this.setPaymentResponses(p.data, p.headers), o = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), this.onAction(7, "Transfer failed"), _.track("verify_payment", {
|
|
@@ -35198,10 +35198,10 @@ class Jd {
|
|
|
35198
35198
|
verification_status: "Failed"
|
|
35199
35199
|
}));
|
|
35200
35200
|
} catch {
|
|
35201
|
-
o && (a = t * (s + 1), this.timer = setTimeout(
|
|
35201
|
+
o && (a = t * (s + 1), this.timer = setTimeout(l, a));
|
|
35202
35202
|
}
|
|
35203
35203
|
};
|
|
35204
|
-
|
|
35204
|
+
l();
|
|
35205
35205
|
}
|
|
35206
35206
|
redirectTo(e, t) {
|
|
35207
35207
|
const i = t.get("spf-redirect-url");
|
|
@@ -35287,8 +35287,8 @@ class $d {
|
|
|
35287
35287
|
container: s,
|
|
35288
35288
|
customer: a,
|
|
35289
35289
|
token: o,
|
|
35290
|
-
currency:
|
|
35291
|
-
rdtCode:
|
|
35290
|
+
currency: c,
|
|
35291
|
+
rdtCode: l,
|
|
35292
35292
|
url: p,
|
|
35293
35293
|
reference: m,
|
|
35294
35294
|
callBackUrl: g,
|
|
@@ -35335,9 +35335,9 @@ class $d {
|
|
|
35335
35335
|
d(this, "isMaxRetriesReached");
|
|
35336
35336
|
d(this, "isMobile", !1);
|
|
35337
35337
|
d(this, "errorText");
|
|
35338
|
-
this.currency =
|
|
35338
|
+
this.currency = c, this.container = s, this.contents = this.container.querySelector(
|
|
35339
35339
|
"#payment-content-view"
|
|
35340
|
-
), this.closeModal = i, this.token = o, this.customer = a, this.amount = e, this.totalAmount = t, this.rdtCode =
|
|
35340
|
+
), this.closeModal = i, this.token = o, this.customer = a, this.amount = e, this.totalAmount = t, this.rdtCode = l, this.url = p, this.reference = m, this._currentStep = 1, this.callBackUrl = g, this.metadata = b, this.localCurrency = y, this.disablePaymentMethods = S, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.restartTransactionProcess = f, this.hidePaymentMethods = w, this.retryingPayment = A, this.isMaxRetriesReached = !1, this.renderTransferContent(), this.paymentResponse = {}, this.activeRef = "", this.timerId = null, this.errorText = "", this.mainLoader = new Ae(this.contents), this.mainLoader.mountLoader("25dvh"), this.currentStep === 1 && (this.abortController = new AbortController(), this.createTransfer()), this.isMobile = window.matchMedia("(max-width: 767px)").matches;
|
|
35341
35341
|
}
|
|
35342
35342
|
get currentStep() {
|
|
35343
35343
|
return this._currentStep;
|
|
@@ -35384,18 +35384,18 @@ class $d {
|
|
|
35384
35384
|
(() => {
|
|
35385
35385
|
var a, o;
|
|
35386
35386
|
if (this.retryingPayment) {
|
|
35387
|
-
const
|
|
35387
|
+
const c = {
|
|
35388
35388
|
channel: "bank_transfer",
|
|
35389
35389
|
reference: this.reference
|
|
35390
35390
|
};
|
|
35391
35391
|
return mt(
|
|
35392
35392
|
this.token,
|
|
35393
|
-
|
|
35393
|
+
c,
|
|
35394
35394
|
this.rdtCode,
|
|
35395
35395
|
this.url
|
|
35396
35396
|
);
|
|
35397
35397
|
} else {
|
|
35398
|
-
const
|
|
35398
|
+
const c = {
|
|
35399
35399
|
amount: this.amount,
|
|
35400
35400
|
channel: "bank_transfer",
|
|
35401
35401
|
currency: this.currency,
|
|
@@ -35412,18 +35412,18 @@ class $d {
|
|
|
35412
35412
|
};
|
|
35413
35413
|
return ns(
|
|
35414
35414
|
this.token,
|
|
35415
|
-
|
|
35415
|
+
c,
|
|
35416
35416
|
this.rdtCode,
|
|
35417
35417
|
this.url
|
|
35418
35418
|
);
|
|
35419
35419
|
}
|
|
35420
35420
|
})().then(async ({ data: a, headers: o }) => {
|
|
35421
35421
|
if (this.paymentResponse = a, this.paymentResponseHeaders = o, a.providerMessage) {
|
|
35422
|
-
const
|
|
35422
|
+
const c = await W(
|
|
35423
35423
|
a.providerMessage,
|
|
35424
35424
|
R()
|
|
35425
35425
|
);
|
|
35426
|
-
this.errorText =
|
|
35426
|
+
this.errorText = c;
|
|
35427
35427
|
}
|
|
35428
35428
|
if (a.status === "failed")
|
|
35429
35429
|
this.currentStep = 7, _.track("stop_transferProcess", {
|
|
@@ -35435,13 +35435,13 @@ class $d {
|
|
|
35435
35435
|
else if (e && t && (e.classList.add("hidden"), t.classList.remove("hidden")), this.activeRef = a.reference, this.paymentResponse = a, a.bankDetails && a.bankDetails.accountNumber)
|
|
35436
35436
|
this.transferDetails = new pa({
|
|
35437
35437
|
container: this.contents,
|
|
35438
|
-
onAction: (
|
|
35439
|
-
this.onSentVerify.bind(this)(
|
|
35438
|
+
onAction: (c) => {
|
|
35439
|
+
this.onSentVerify.bind(this)(c);
|
|
35440
35440
|
},
|
|
35441
|
-
onFail: async (
|
|
35442
|
-
if (this.currentStep =
|
|
35441
|
+
onFail: async (c, l) => {
|
|
35442
|
+
if (this.currentStep = c, c === 7 && l) {
|
|
35443
35443
|
const p = await W(
|
|
35444
|
-
|
|
35444
|
+
l,
|
|
35445
35445
|
R()
|
|
35446
35446
|
);
|
|
35447
35447
|
this.errorText = p, this.warningScreen.setPaymentError(this.errorText);
|
|
@@ -35451,17 +35451,17 @@ class $d {
|
|
|
35451
35451
|
this.paymentResponse || a
|
|
35452
35452
|
);
|
|
35453
35453
|
else if (a.providerMessage) {
|
|
35454
|
-
const
|
|
35454
|
+
const c = await W(
|
|
35455
35455
|
a.providerMessage,
|
|
35456
35456
|
R()
|
|
35457
35457
|
);
|
|
35458
|
-
this.errorText =
|
|
35458
|
+
this.errorText = c, this.currentStep = 7, this.warningScreen.setPaymentError(this.errorText);
|
|
35459
35459
|
} else {
|
|
35460
|
-
const
|
|
35460
|
+
const c = await W(
|
|
35461
35461
|
"Error fetching bank details",
|
|
35462
35462
|
R()
|
|
35463
35463
|
);
|
|
35464
|
-
this.currentStep = 7, this.warningScreen.setPaymentError(
|
|
35464
|
+
this.currentStep = 7, this.warningScreen.setPaymentError(c);
|
|
35465
35465
|
}
|
|
35466
35466
|
}).catch(async (a) => {
|
|
35467
35467
|
if (_.track("verify_payment", {
|
|
@@ -35915,10 +35915,10 @@ class ba {
|
|
|
35915
35915
|
"#ussd-bank-button"
|
|
35916
35916
|
), s = document.querySelector("#ussdBanks");
|
|
35917
35917
|
e && e.addEventListener("change", (a) => {
|
|
35918
|
-
var o,
|
|
35918
|
+
var o, c;
|
|
35919
35919
|
if (a.stopPropagation(), this.selectedBank = {
|
|
35920
35920
|
code: e.value,
|
|
35921
|
-
name: ((
|
|
35921
|
+
name: ((c = (o = this.bank_list.filter((l) => l.code == e.value)) == null ? void 0 : o[0]) == null ? void 0 : c.name) || ""
|
|
35922
35922
|
}, this.validateForm())
|
|
35923
35923
|
i && i.removeAttribute("disabled");
|
|
35924
35924
|
else if (i) {
|
|
@@ -35927,10 +35927,10 @@ class ba {
|
|
|
35927
35927
|
i.setAttribute("disabled", "");
|
|
35928
35928
|
}
|
|
35929
35929
|
}), t && Array.from(t).forEach((o) => {
|
|
35930
|
-
o.addEventListener("click", function(
|
|
35930
|
+
o.addEventListener("click", function(c) {
|
|
35931
35931
|
_.track("select_bank", {
|
|
35932
35932
|
payment_method: "USSD"
|
|
35933
|
-
}),
|
|
35933
|
+
}), c.stopPropagation();
|
|
35934
35934
|
});
|
|
35935
35935
|
}), s && s.addEventListener("submit", (a) => {
|
|
35936
35936
|
a.preventDefault(), this.onAction(this.selectedBank);
|
|
@@ -36068,8 +36068,8 @@ class su {
|
|
|
36068
36068
|
".bank-dial-code"
|
|
36069
36069
|
), o = this.container.querySelector("#bank-dial-code");
|
|
36070
36070
|
o && (o.innerHTML = ((s = t == null ? void 0 : t.ussd) == null ? void 0 : s.paymentCode) || "");
|
|
36071
|
-
const
|
|
36072
|
-
|
|
36071
|
+
const c = this.container.querySelector("#bank-name-ussd");
|
|
36072
|
+
c && (c.innerHTML = this.selected.name), Array.from(a).forEach((p) => {
|
|
36073
36073
|
var m;
|
|
36074
36074
|
p.innerHTML = ((m = t == null ? void 0 : t.ussd) == null ? void 0 : m.code) || "";
|
|
36075
36075
|
}), this.attachListener();
|
|
@@ -36093,18 +36093,18 @@ class su {
|
|
|
36093
36093
|
"#bank-completed-payment"
|
|
36094
36094
|
);
|
|
36095
36095
|
Array.from(e).forEach((o) => {
|
|
36096
|
-
o.addEventListener("click", (
|
|
36097
|
-
var
|
|
36096
|
+
o.addEventListener("click", (c) => {
|
|
36097
|
+
var l;
|
|
36098
36098
|
_.track("copy_ussdCode", {
|
|
36099
36099
|
payment_method: "USSD"
|
|
36100
|
-
}), window.navigator.clipboard.writeText(((
|
|
36100
|
+
}), window.navigator.clipboard.writeText(((l = this.ussd_detail) == null ? void 0 : l.code) || "");
|
|
36101
36101
|
});
|
|
36102
36102
|
}), Array.from(t).forEach((o) => {
|
|
36103
|
-
o.addEventListener("click", (
|
|
36104
|
-
var
|
|
36103
|
+
o.addEventListener("click", (c) => {
|
|
36104
|
+
var l;
|
|
36105
36105
|
_.track("copy_ussdCode", {
|
|
36106
36106
|
payment_method: "USSD"
|
|
36107
|
-
}), window.navigator.clipboard.writeText(((
|
|
36107
|
+
}), window.navigator.clipboard.writeText(((l = this.ussd_detail) == null ? void 0 : l.code) || "");
|
|
36108
36108
|
});
|
|
36109
36109
|
}), i && i.addEventListener("click", (o) => {
|
|
36110
36110
|
o.preventDefault(), this.onAction(this.selected, this.activeRef);
|
|
@@ -36140,8 +36140,8 @@ class Eo {
|
|
|
36140
36140
|
amount: s,
|
|
36141
36141
|
totalAmount: a,
|
|
36142
36142
|
currency: o,
|
|
36143
|
-
customer:
|
|
36144
|
-
reference:
|
|
36143
|
+
customer: c,
|
|
36144
|
+
reference: l,
|
|
36145
36145
|
rdtCode: p,
|
|
36146
36146
|
url: m,
|
|
36147
36147
|
// closeModal,
|
|
@@ -36185,7 +36185,7 @@ class Eo {
|
|
|
36185
36185
|
d(this, "hidePaymentMethods");
|
|
36186
36186
|
d(this, "showPaymentMethods");
|
|
36187
36187
|
d(this, "disablePaymentMethods");
|
|
36188
|
-
this.onSuccess = t || (() => null), this.container = e, this.secret = i, this.amount = s, this.totalAmount = a, this.currency = o, this.reference =
|
|
36188
|
+
this.onSuccess = t || (() => null), this.container = e, this.secret = i, this.amount = s, this.totalAmount = a, this.currency = o, this.reference = l, this.customer = c, this.rdtCode = p, this.url = m, this.callBackUrl = g, this.metadata = b, this.localCurrency = y, this.merchantDetails = {}, this.hidePaymentMethods = S, this.showPaymentMethods = f, this.disablePaymentMethods = w, this.contents = this.container.querySelector(
|
|
36189
36189
|
"#payment-content-view"
|
|
36190
36190
|
), this._currentStep = 1, this.paymentService = new _o({
|
|
36191
36191
|
token: this.secret,
|
|
@@ -36529,8 +36529,8 @@ class hu {
|
|
|
36529
36529
|
attachListeners() {
|
|
36530
36530
|
const e = this.container.querySelectorAll(".tab-button");
|
|
36531
36531
|
Array.from(e).forEach((a) => {
|
|
36532
|
-
const o = a.dataset.name || "",
|
|
36533
|
-
|
|
36532
|
+
const o = a.dataset.name || "", c = a.querySelector(".tab-button-icon"), l = a.querySelector(".tab-button-label");
|
|
36533
|
+
c && (c.innerHTML = se[o].icon), l && (l.textContent = se[o].label), a.addEventListener("click", (p) => {
|
|
36534
36534
|
p.preventDefault(), this.onAction(o);
|
|
36535
36535
|
});
|
|
36536
36536
|
});
|
|
@@ -36552,9 +36552,9 @@ class hu {
|
|
|
36552
36552
|
"#merchant-email-mob"
|
|
36553
36553
|
), a = this.container.querySelector("#trial-info"), o = this.container.querySelector(
|
|
36554
36554
|
"#todays-total-amount"
|
|
36555
|
-
), l = this.container.querySelector(
|
|
36556
|
-
"#plan-name"
|
|
36557
36555
|
), c = this.container.querySelector(
|
|
36556
|
+
"#plan-name"
|
|
36557
|
+
), l = this.container.querySelector(
|
|
36558
36558
|
"#plan-name-mob"
|
|
36559
36559
|
), p = this.container.querySelector("#payment-fees"), m = this.container.querySelector("#currency-cursor"), g = this.container.querySelector(
|
|
36560
36560
|
"#currency-cursor-mob"
|
|
@@ -36592,21 +36592,21 @@ class hu {
|
|
|
36592
36592
|
}
|
|
36593
36593
|
});
|
|
36594
36594
|
}
|
|
36595
|
-
if (q && (q.innerHTML = Z.select_payment_method_text), G && (G.innerHTML = `${Z.amount}:`), Ke && (Ke.innerHTML = `${Z["to-pay"]}:`), z && (z.innerHTML = P["what-is-this"]), ce && (ce.innerHTML = P["rate-reflect-note"]), Le && (Le.innerHTML = P["rate-please-note"]), j && (j.innerHTML = P["what-is-this"]), Be && (Be.innerHTML = P["rate-reflect-note"]), ve && (ve.innerHTML = P["rate-please-note"]), (Un = this.merchantDetail) != null && Un.merchantLogo ? t && t.setAttribute("src", (An = this.merchantDetail) == null ? void 0 : An.merchantLogo) : e && (t == null || t.remove(), e.innerHTML = `<div class="font-semibold text-tone-100 rounded-2xl w-8 h-8 bg-tone-10 container-center uppercase">${this.merchantDetail.merchantName[0]}</div>`), i && (i.innerHTML = this.email), s && (s.innerHTML = this.email),
|
|
36595
|
+
if (q && (q.innerHTML = Z.select_payment_method_text), G && (G.innerHTML = `${Z.amount}:`), Ke && (Ke.innerHTML = `${Z["to-pay"]}:`), z && (z.innerHTML = P["what-is-this"]), ce && (ce.innerHTML = P["rate-reflect-note"]), Le && (Le.innerHTML = P["rate-please-note"]), j && (j.innerHTML = P["what-is-this"]), Be && (Be.innerHTML = P["rate-reflect-note"]), ve && (ve.innerHTML = P["rate-please-note"]), (Un = this.merchantDetail) != null && Un.merchantLogo ? t && t.setAttribute("src", (An = this.merchantDetail) == null ? void 0 : An.merchantLogo) : e && (t == null || t.remove(), e.innerHTML = `<div class="font-semibold text-tone-100 rounded-2xl w-8 h-8 bg-tone-10 container-center uppercase">${this.merchantDetail.merchantName[0]}</div>`), i && (i.innerHTML = this.email), s && (s.innerHTML = this.email), c) {
|
|
36596
36596
|
if ((pn = (Ge = this.merchantDetail) == null ? void 0 : Ge.plan) != null && pn.title) {
|
|
36597
36597
|
const Je = ((he = (Vn = this.merchantDetail) == null ? void 0 : Vn.plan) == null ? void 0 : he.title) || "";
|
|
36598
|
-
|
|
36598
|
+
c.textContent = li(Je);
|
|
36599
36599
|
}
|
|
36600
|
-
(ke = this.metadata) != null && ke.productName && (
|
|
36600
|
+
(ke = this.metadata) != null && ke.productName && (c.textContent = li(
|
|
36601
36601
|
this.metadata.productName
|
|
36602
36602
|
));
|
|
36603
36603
|
}
|
|
36604
|
-
if (
|
|
36604
|
+
if (l) {
|
|
36605
36605
|
if ((je = (ze = this.merchantDetail) == null ? void 0 : ze.plan) != null && je.title) {
|
|
36606
36606
|
const Je = ((on = (Pe = this.merchantDetail) == null ? void 0 : Pe.plan) == null ? void 0 : on.title) || "";
|
|
36607
|
-
|
|
36607
|
+
l.textContent = li(Je);
|
|
36608
36608
|
}
|
|
36609
|
-
(H = this.metadata) != null && H.productName && (
|
|
36609
|
+
(H = this.metadata) != null && H.productName && (l.textContent = li(
|
|
36610
36610
|
this.metadata.productName
|
|
36611
36611
|
));
|
|
36612
36612
|
}
|
|
@@ -36616,7 +36616,7 @@ class hu {
|
|
|
36616
36616
|
)} `) : m.innerHTML = ""), g && (this.currency === "USD" ? y && (y.innerHTML = `1 ${((gt = (Mn = this.merchantDetail) == null ? void 0 : Mn.rate) == null ? void 0 : gt.to) || "-"} = ${((Ht = (Rt = this.merchantDetail) == null ? void 0 : Rt.rate) == null ? void 0 : Ht.from) || "-"} ${_e(
|
|
36617
36617
|
((Nt = this.merchantDetail.rate) == null ? void 0 : Nt.rate) || 1,
|
|
36618
36618
|
2
|
|
36619
|
-
)} `) : g.innerHTML = ""), (Fn = (Ot = this.merchantDetail) == null ? void 0 : Ot.plan) != null && Fn.title || (Ut = this.metadata) != null && Ut.productName ? S && (((Vt = (oe = this.merchantDetail) == null ? void 0 : oe.plan) == null ? void 0 : Vt.trial) ? (a == null || a.classList.remove("hidden"), S.innerHTML = `${this.currency} ${_e(this.amount, 2)}`) : (S.innerHTML = `${this.currency} ${_e(this.amount, 2)}`, a == null || a.classList.add("hidden"))) : (w && (w.innerHTML = `<span> ${this.currency} ${_e(this.amount, 2)} </span>`),
|
|
36619
|
+
)} `) : g.innerHTML = ""), (Fn = (Ot = this.merchantDetail) == null ? void 0 : Ot.plan) != null && Fn.title || (Ut = this.metadata) != null && Ut.productName ? S && (((Vt = (oe = this.merchantDetail) == null ? void 0 : oe.plan) == null ? void 0 : Vt.trial) ? (a == null || a.classList.remove("hidden"), S.innerHTML = `${this.currency} ${_e(this.amount, 2)}`) : (S.innerHTML = `${this.currency} ${_e(this.amount, 2)}`, a == null || a.classList.add("hidden"))) : (w && (w.innerHTML = `<span> ${this.currency} ${_e(this.amount, 2)} </span>`), c && l && (c.remove(), l == null || l.remove()), this.localCurrency ? S == null || S.remove() : p && p.remove()), f) {
|
|
36620
36620
|
const Je = (Kt = (Ft = this.merchantDetail) == null ? void 0 : Ft.plan) == null ? void 0 : Kt.trial, xn = (zt = (qt = (jt = (Gt = this.merchantDetail) == null ? void 0 : Gt.plan) == null ? void 0 : jt.trial) == null ? void 0 : qt.pricingList[0]) == null ? void 0 : zt.amount;
|
|
36621
36621
|
Je && o ? (o.textContent = `${this.currency} ${_e(xn, 2)}`, f.innerHTML = `${this.currency} ${_e(this.amount, 2)}`) : f.innerHTML = `${this.currency} ${_e(this.amount, 2)}`;
|
|
36622
36622
|
}
|
|
@@ -36627,14 +36627,18 @@ class hu {
|
|
|
36627
36627
|
D && this.localCurrency && (D.innerHTML = an ? `${an} (${this.localCurrency})` : this.localCurrency), F && this.localCurrency && (F.innerHTML = an ? `${an} (${this.localCurrency})` : this.localCurrency), this.renderPaymentOptions(this.container), this.attachListeners();
|
|
36628
36628
|
}
|
|
36629
36629
|
renderPaymentOptions(e) {
|
|
36630
|
-
var s;
|
|
36630
|
+
var s, a;
|
|
36631
36631
|
const t = e.querySelector(".payment-options"), i = In(this.currency, this.localCurrency);
|
|
36632
36632
|
if (t) {
|
|
36633
|
-
const
|
|
36634
|
-
if (this.
|
|
36635
|
-
|
|
36636
|
-
|
|
36637
|
-
|
|
36633
|
+
const o = this.merchantDetail.plan && !((s = this.metadata) != null && s.subscription_id) ? [se.mobile_money, se.card] : this.merchantDetail.paymentMethods.filter((c) => c !== "ussd").filter((c) => !(i !== "USD" && c === "stablecoin")).map((c) => se[c]);
|
|
36634
|
+
if (this.merchantDetail.plan && !((a = this.metadata) != null && a.subscription_id) && i === "NGN" && o.splice(
|
|
36635
|
+
0,
|
|
36636
|
+
o.length,
|
|
36637
|
+
se.card
|
|
36638
|
+
), this.isMobile) {
|
|
36639
|
+
let c = '<div class="">';
|
|
36640
|
+
o.forEach((l) => {
|
|
36641
|
+
c += `
|
|
36638
36642
|
<div key=${l.key}>
|
|
36639
36643
|
<button class="tab-button gap-2 mb-4 group" data-name="${l.key}">
|
|
36640
36644
|
<div class="lg:block">${l.icon}</div>
|
|
@@ -36645,19 +36649,19 @@ class hu {
|
|
|
36645
36649
|
</button>
|
|
36646
36650
|
</div>
|
|
36647
36651
|
`;
|
|
36648
|
-
}),
|
|
36652
|
+
}), c += "</div>", t.innerHTML = c;
|
|
36649
36653
|
} else {
|
|
36650
|
-
const
|
|
36654
|
+
const c = o.length % 2 === 0;
|
|
36651
36655
|
let l = '<div class="grid gap-2">';
|
|
36652
|
-
if (
|
|
36653
|
-
l += '<div class="grid grid-cols-2 gap-2">',
|
|
36656
|
+
if (c)
|
|
36657
|
+
l += '<div class="grid grid-cols-2 gap-2">', o.forEach((p) => {
|
|
36654
36658
|
l += `
|
|
36655
|
-
<div key=${
|
|
36656
|
-
<button class="tab-button gap-2 group" data-name="${
|
|
36657
|
-
<div class="md:container-center lg:block">${
|
|
36659
|
+
<div key=${p.key}>
|
|
36660
|
+
<button class="tab-button gap-2 group" data-name="${p.key}">
|
|
36661
|
+
<div class="md:container-center lg:block">${p.icon}</div>
|
|
36658
36662
|
<div class="flex items-center gap-2">
|
|
36659
|
-
<span class="pm-label" data-translate=${
|
|
36660
|
-
${
|
|
36663
|
+
<span class="pm-label" data-translate=${p.translateKey}>${p.label} </span>
|
|
36664
|
+
${p.key === "card" ? ` <div class="bg-tone-100 rounded-[40px] h-[22px] text-xxs text-white align-center px-2"> ${i} </div>` : ""}
|
|
36661
36665
|
</div>
|
|
36662
36666
|
</button>
|
|
36663
36667
|
</div>
|
|
@@ -36666,24 +36670,24 @@ class hu {
|
|
|
36666
36670
|
else {
|
|
36667
36671
|
if (l += `
|
|
36668
36672
|
<div>
|
|
36669
|
-
<button class="tab-button gap-2 group" data-name="${
|
|
36670
|
-
<div class="md:container-center lg:block"> ${
|
|
36673
|
+
<button class="tab-button gap-2 group" data-name="${o[0].key}">
|
|
36674
|
+
<div class="md:container-center lg:block"> ${o[0].icon}</div>
|
|
36671
36675
|
<div class="flex items-center gap-2">
|
|
36672
|
-
<span class="pm-label" data-translate=${
|
|
36673
|
-
${
|
|
36676
|
+
<span class="pm-label" data-translate=${o[0].translateKey}>${o[0].label} </span>
|
|
36677
|
+
${o[0].key === "card" ? ` <div class="bg-tone-100 rounded-[40px] h-[22px] text-xxs text-white align-center px-2"> ${i} </div>` : ""}
|
|
36674
36678
|
</div>
|
|
36675
36679
|
</button>
|
|
36676
36680
|
</div>
|
|
36677
|
-
`,
|
|
36681
|
+
`, o.length > 1) {
|
|
36678
36682
|
l += '<div class="grid grid-cols-2 gap-2">';
|
|
36679
|
-
for (let
|
|
36683
|
+
for (let p = 1; p < o.length; p++)
|
|
36680
36684
|
l += `
|
|
36681
36685
|
<div>
|
|
36682
|
-
<button class="tab-button gap-2 group" data-name="${
|
|
36683
|
-
<div class="md:container-center lg:block">${
|
|
36686
|
+
<button class="tab-button gap-2 group" data-name="${o[p].key}">
|
|
36687
|
+
<div class="md:container-center lg:block">${o[p].icon}</div>
|
|
36684
36688
|
<div class="flex items-center gap-2">
|
|
36685
|
-
<span class="pm-label" data-translate=${
|
|
36686
|
-
${
|
|
36689
|
+
<span class="pm-label" data-translate=${o[p].translateKey}>${o[p].label} </span>
|
|
36690
|
+
${o[p].key === "card" ? ` <div class="bg-tone-100 rounded-[40px] h-[22px] text-xxs text-white align-center px-2"> ${i} </div>` : ""}
|
|
36687
36691
|
</div>
|
|
36688
36692
|
</button>
|
|
36689
36693
|
</div>
|
|
@@ -36771,8 +36775,8 @@ class pu {
|
|
|
36771
36775
|
this.verifyMobileMoney(
|
|
36772
36776
|
this.token,
|
|
36773
36777
|
a,
|
|
36774
|
-
({ data: o, headers:
|
|
36775
|
-
this.onAction(4), this.redirectTo(o,
|
|
36778
|
+
({ data: o, headers: c }) => {
|
|
36779
|
+
this.onAction(4), this.redirectTo(o, c, "success");
|
|
36776
36780
|
},
|
|
36777
36781
|
() => {
|
|
36778
36782
|
this.onAction(5);
|
|
@@ -36781,11 +36785,11 @@ class pu {
|
|
|
36781
36785
|
}, 5e3), this.startTimer();
|
|
36782
36786
|
}
|
|
36783
36787
|
async verifyMobileMoney(e, t, i, s) {
|
|
36784
|
-
let a = 0, o = t,
|
|
36785
|
-
this.abortController && (
|
|
36788
|
+
let a = 0, o = t, c = !0, l;
|
|
36789
|
+
this.abortController && (l = this.abortController.signal);
|
|
36786
36790
|
const p = async () => {
|
|
36787
36791
|
if (this.timeLeft <= 0) {
|
|
36788
|
-
|
|
36792
|
+
c = !1, this.onAction(8);
|
|
36789
36793
|
return;
|
|
36790
36794
|
}
|
|
36791
36795
|
a += 1;
|
|
@@ -36793,19 +36797,19 @@ class pu {
|
|
|
36793
36797
|
const m = await en(
|
|
36794
36798
|
e,
|
|
36795
36799
|
this.ref,
|
|
36796
|
-
|
|
36800
|
+
l,
|
|
36797
36801
|
this.rdtCode,
|
|
36798
36802
|
this.url
|
|
36799
36803
|
);
|
|
36800
|
-
m.data.status === "failed" && (
|
|
36804
|
+
m.data.status === "failed" && (c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), this.setPaymentResponses(m.data, m.headers), _.track("verify_payment", {
|
|
36801
36805
|
payment_method: "Mobile Money",
|
|
36802
36806
|
verification_status: "Failed"
|
|
36803
|
-
}), s(m)), m.data.status === "inProgress" && (
|
|
36807
|
+
}), s(m)), m.data.status === "inProgress" && (c && (o = t * (a + 1), this.timer = setTimeout(p, o)), this.setPaymentResponses(m.data, m.headers)), (m.data.status === "success" || m.data.status === "successful") && (this.setPaymentResponses(m.data, m.headers), c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), _.track("verify_payment", {
|
|
36804
36808
|
payment_method: "Mobile Money",
|
|
36805
36809
|
verification_status: "Success"
|
|
36806
36810
|
}), i(m));
|
|
36807
36811
|
} catch {
|
|
36808
|
-
|
|
36812
|
+
c && (o = t * (a + 1), this.timer = setTimeout(p, o));
|
|
36809
36813
|
}
|
|
36810
36814
|
};
|
|
36811
36815
|
p();
|
|
@@ -36948,10 +36952,10 @@ class bu {
|
|
|
36948
36952
|
"#phone-number-error"
|
|
36949
36953
|
);
|
|
36950
36954
|
if (!e || !t || !s) return;
|
|
36951
|
-
const
|
|
36952
|
-
(p) => p.name === (this.countryCode ||
|
|
36955
|
+
const c = this.localCurrency ? this.localCurrency : this.currency, l = _n.find(
|
|
36956
|
+
(p) => p.name === (this.countryCode || c)
|
|
36953
36957
|
);
|
|
36954
|
-
e.value.length > Number((
|
|
36958
|
+
e.value.length > Number((l == null ? void 0 : l.length) || "9") ? (a && (a.classList.remove("border-tone-40"), a.classList.add("border-[#D62020]"), e.classList.remove("text-tone-100"), e.classList.add("text-[#D62020]")), o && (o.classList.remove("hidden"), o.classList.add("block"), o.innerHTML = Me["valid-number-message"])) : (a && (a.classList.remove("border-[#D62020]"), a.classList.add("border-tone-40"), e.classList.remove("text-[#D62020]"), e.classList.add("text-tone-100")), o && (o.classList.remove("block"), o.classList.add("hidden"))), e.value.length > 0 && e.value.length === Number((l == null ? void 0 : l.length) || "9") && t.value ? t.value === "orange" ? i && i.value.length >= 4 && i.value.length <= 6 ? s.disabled = !1 : s.disabled = !0 : s.disabled = !1 : s.disabled = !0;
|
|
36955
36959
|
}
|
|
36956
36960
|
attachListener() {
|
|
36957
36961
|
const e = document.querySelector("#mobile-money-form"), t = document.querySelector("#pci-dss"), i = this.container.querySelector(
|
|
@@ -36960,8 +36964,8 @@ class bu {
|
|
|
36960
36964
|
"#network-search-input"
|
|
36961
36965
|
), a = this.container.querySelector("#otp-input"), o = this.container.querySelector(
|
|
36962
36966
|
".details-form-button"
|
|
36963
|
-
),
|
|
36964
|
-
|
|
36967
|
+
), c = this.container.querySelector("#header-text"), l = this.container.querySelector("#network-text"), p = this.container.querySelector("#generate-otp-text"), m = this.container.querySelector("#certified-text");
|
|
36968
|
+
c && (c.innerHTML = Me["header-text"]), l && (l.innerHTML = Me.network), p && (p.innerHTML = Me["generate-otp"]), m && (m.innerHTML = Me.certified), a && a.setAttribute("placeholder", Me["enter-otp"]), o && (o.disabled = !0), i && s && (s.setAttribute(
|
|
36965
36969
|
"placeholder",
|
|
36966
36970
|
Me["select-network"]
|
|
36967
36971
|
), i.setAttribute(
|
|
@@ -37032,9 +37036,9 @@ class bu {
|
|
|
37032
37036
|
!0,
|
|
37033
37037
|
!0
|
|
37034
37038
|
);
|
|
37035
|
-
o.disabled = !0, o.setAttribute("data-translate", "select-network"), t.appendChild(o), t.classList.remove("text-tone-100"), t.classList.add("text-tone-50"), t && e.forEach((
|
|
37036
|
-
const
|
|
37037
|
-
t.appendChild(
|
|
37039
|
+
o.disabled = !0, o.setAttribute("data-translate", "select-network"), t.appendChild(o), t.classList.remove("text-tone-100"), t.classList.add("text-tone-50"), t && e.forEach((c) => {
|
|
37040
|
+
const l = new Option(c.name, c.code);
|
|
37041
|
+
t.appendChild(l), t.classList.remove("text-tone-50"), t.classList.add("text-tone-100");
|
|
37038
37042
|
});
|
|
37039
37043
|
}
|
|
37040
37044
|
const i = this.container.querySelector("#region-code"), s = In(this.currency, this.localCurrency), a = _n.find(
|
|
@@ -37240,8 +37244,8 @@ class Su {
|
|
|
37240
37244
|
metadata: s,
|
|
37241
37245
|
callBackUrl: a,
|
|
37242
37246
|
rdtCode: o,
|
|
37243
|
-
reference:
|
|
37244
|
-
onSuccess:
|
|
37247
|
+
reference: c,
|
|
37248
|
+
onSuccess: l,
|
|
37245
37249
|
url: p,
|
|
37246
37250
|
customer: m,
|
|
37247
37251
|
amount: g,
|
|
@@ -37297,9 +37301,9 @@ class Su {
|
|
|
37297
37301
|
d(this, "countryCode");
|
|
37298
37302
|
d(this, "errorText");
|
|
37299
37303
|
d(this, "otpMessage");
|
|
37300
|
-
this.container = e, this.onSuccess =
|
|
37304
|
+
this.container = e, this.onSuccess = l || (() => null), this.token = y, this.currency = S, this.amount = g, this.totalAmount = b, this.contents = this.container.querySelector(
|
|
37301
37305
|
"#payment-content-view"
|
|
37302
|
-
), this._currentStep = 1, this.activeRef = "", this.token = t, this.customer = m, this.metadata = s, this.localCurrency = i, this.callBackUrl = a, this.localCurrency = i, this.rdtCode = o, this.url = p, this.reference =
|
|
37306
|
+
), this._currentStep = 1, this.activeRef = "", this.token = t, this.customer = m, this.metadata = s, this.localCurrency = i, this.callBackUrl = a, this.localCurrency = i, this.rdtCode = o, this.url = p, this.reference = c, this.planId = F, this.merchantDetails = {}, this.disablePaymentMethods = f, this.hidePaymentMethods = w, this.showPaymentMethods = A, this.onClose = M, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.restartTransactionProcess = x, this.retryingPayment = E, this.isMaxRetriesReached = !1, this.countryCode = D, this.errorText = "", this.otpMessage = "", _.track("mobile_money_opens", {
|
|
37303
37307
|
payment_method: "Mobile Money"
|
|
37304
37308
|
}), this.isMobile = window.matchMedia("(max-width: 767px)").matches;
|
|
37305
37309
|
}
|
|
@@ -37319,7 +37323,7 @@ class Su {
|
|
|
37319
37323
|
i && s && (i.classList.remove("hidden"), s.classList.add("hidden"));
|
|
37320
37324
|
const a = ft();
|
|
37321
37325
|
(() => {
|
|
37322
|
-
var
|
|
37326
|
+
var c, l, p, m;
|
|
37323
37327
|
if (this.retryingPayment) {
|
|
37324
37328
|
const g = {
|
|
37325
37329
|
channel: "mobile_money",
|
|
@@ -37350,8 +37354,8 @@ class Su {
|
|
|
37350
37354
|
callBackUrl: this.callBackUrl,
|
|
37351
37355
|
metadata: {
|
|
37352
37356
|
...this.metadata,
|
|
37353
|
-
...((
|
|
37354
|
-
subscription_id: (
|
|
37357
|
+
...((c = this.merchantDetails) == null ? void 0 : c.subscription_id) && {
|
|
37358
|
+
subscription_id: (l = this.merchantDetails) == null ? void 0 : l.subscription_id
|
|
37355
37359
|
}
|
|
37356
37360
|
},
|
|
37357
37361
|
mobileMoney: {
|
|
@@ -37383,19 +37387,19 @@ class Su {
|
|
|
37383
37387
|
this.url
|
|
37384
37388
|
);
|
|
37385
37389
|
}
|
|
37386
|
-
})().then(async ({ data:
|
|
37390
|
+
})().then(async ({ data: c, headers: l }) => {
|
|
37387
37391
|
var p, m;
|
|
37388
|
-
if (this.paymentResponse =
|
|
37392
|
+
if (this.paymentResponse = c, this.paymentResponseHeaders = l, c.providerMessage) {
|
|
37389
37393
|
const g = await W(
|
|
37390
|
-
|
|
37394
|
+
c.providerMessage,
|
|
37391
37395
|
R()
|
|
37392
37396
|
);
|
|
37393
37397
|
this.errorText = g;
|
|
37394
37398
|
}
|
|
37395
|
-
if (
|
|
37396
|
-
if (
|
|
37399
|
+
if (c.status === "failed") {
|
|
37400
|
+
if (c.providerMessage) {
|
|
37397
37401
|
const g = await W(
|
|
37398
|
-
|
|
37402
|
+
c.providerMessage,
|
|
37399
37403
|
R()
|
|
37400
37404
|
);
|
|
37401
37405
|
this.currentStep = 5, this.warningScreen.setPaymentError(g), this.warningScreen.hideReportIssue();
|
|
@@ -37406,17 +37410,17 @@ class Su {
|
|
|
37406
37410
|
_.track("start_payment_failed", {
|
|
37407
37411
|
payment_method: "Mobile Money",
|
|
37408
37412
|
verification_status: "Failed",
|
|
37409
|
-
payment_error:
|
|
37413
|
+
payment_error: c.providerMessage || "Payment failed"
|
|
37410
37414
|
});
|
|
37411
37415
|
return;
|
|
37412
|
-
} else if (
|
|
37416
|
+
} else if (c.status === "success" || c.status === "successful") {
|
|
37413
37417
|
this.currentStep = 4, _.track("start_payment_success", {
|
|
37414
37418
|
payment_method: "Mobile Money",
|
|
37415
37419
|
verification_status: "Success"
|
|
37416
|
-
}), De(l, c
|
|
37420
|
+
}), De(c, l, c == null ? void 0 : c.callBackUrl);
|
|
37417
37421
|
return;
|
|
37418
|
-
} else if (((p =
|
|
37419
|
-
this.activeRef =
|
|
37422
|
+
} else if (((p = c == null ? void 0 : c.authorization) == null ? void 0 : p.mode) === "otp") {
|
|
37423
|
+
this.activeRef = c.reference;
|
|
37420
37424
|
const g = await W(
|
|
37421
37425
|
(m = this.paymentResponse) == null ? void 0 : m.providerMessage,
|
|
37422
37426
|
R()
|
|
@@ -37425,22 +37429,22 @@ class Su {
|
|
|
37425
37429
|
return;
|
|
37426
37430
|
} else
|
|
37427
37431
|
this.currentStep = 3;
|
|
37428
|
-
}).catch(async (
|
|
37432
|
+
}).catch(async (c) => {
|
|
37429
37433
|
if (_.track("verify_payment", {
|
|
37430
37434
|
payment_method: "Mobile Money",
|
|
37431
37435
|
verification_status: "Null"
|
|
37432
|
-
}),
|
|
37436
|
+
}), c.code === "payment_max_retry_attempts")
|
|
37433
37437
|
this.isMaxRetriesReached = !0, this.verifyPaymentProcess(), this.currentStep = 5, this.warningScreen.setPaymentError(
|
|
37434
37438
|
P["maximum-retries"],
|
|
37435
37439
|
P["maximum-retries-desc"],
|
|
37436
37440
|
Z["merchant-back"]
|
|
37437
37441
|
);
|
|
37438
37442
|
else {
|
|
37439
|
-
const
|
|
37440
|
-
|
|
37443
|
+
const l = await W(
|
|
37444
|
+
c.message,
|
|
37441
37445
|
R()
|
|
37442
37446
|
);
|
|
37443
|
-
this.errorText =
|
|
37447
|
+
this.errorText = l, c.message ? (this.currentStep = 5, this.warningScreen.setPaymentError(this.errorText)) : (this.currentStep = 5, this.warningScreen.setPaymentError(
|
|
37444
37448
|
P["payment-failed"]
|
|
37445
37449
|
));
|
|
37446
37450
|
}
|
|
@@ -37470,22 +37474,22 @@ class Su {
|
|
|
37470
37474
|
a,
|
|
37471
37475
|
this.rdtCode,
|
|
37472
37476
|
this.url
|
|
37473
|
-
).then(({ data:
|
|
37474
|
-
|
|
37475
|
-
}).catch(async (
|
|
37477
|
+
).then(({ data: c }) => {
|
|
37478
|
+
c.status === "failed" ? (this.activeRef = c.reference, this.currentStep = 3) : ["success", "successful", "failed"].includes(c.status) ? ["success", "successful"].includes(c.status) && (this.activeRef = c.reference, this.currentStep = 3) : (this.activeRef = c.reference, this.currentStep = 3);
|
|
37479
|
+
}).catch(async (c) => {
|
|
37476
37480
|
_.track("verify_payment", {
|
|
37477
37481
|
payment_method: "Mobile Money",
|
|
37478
37482
|
verification_status: "Failed",
|
|
37479
37483
|
authentication_type: "OTP"
|
|
37480
37484
|
});
|
|
37481
|
-
const
|
|
37482
|
-
if (
|
|
37483
|
-
if (
|
|
37485
|
+
const l = this.container.querySelector("#otp-error");
|
|
37486
|
+
if (c.code === "invalid_otp") {
|
|
37487
|
+
if (l) {
|
|
37484
37488
|
const p = await W(
|
|
37485
|
-
|
|
37489
|
+
c.message,
|
|
37486
37490
|
R()
|
|
37487
37491
|
);
|
|
37488
|
-
|
|
37492
|
+
l.innerHTML = p;
|
|
37489
37493
|
}
|
|
37490
37494
|
_.track("verify_payment", {
|
|
37491
37495
|
payment_method: "Mobile Money",
|
|
@@ -37705,8 +37709,8 @@ class ku {
|
|
|
37705
37709
|
customer: s,
|
|
37706
37710
|
token: a,
|
|
37707
37711
|
currency: o,
|
|
37708
|
-
rdtCode:
|
|
37709
|
-
url:
|
|
37712
|
+
rdtCode: c,
|
|
37713
|
+
url: l,
|
|
37710
37714
|
reference: p,
|
|
37711
37715
|
callBackUrl: m,
|
|
37712
37716
|
metadata: g,
|
|
@@ -37747,7 +37751,7 @@ class ku {
|
|
|
37747
37751
|
d(this, "paymentResponse");
|
|
37748
37752
|
d(this, "paymentResponseHeaders");
|
|
37749
37753
|
d(this, "errorText");
|
|
37750
|
-
this.currency = o, this.container = i, this.token = a, this.customer = s, this.amount = e, this.totalAmount = t, this.rdtCode =
|
|
37754
|
+
this.currency = o, this.container = i, this.token = a, this.customer = s, this.amount = e, this.totalAmount = t, this.rdtCode = c, this.url = l, this.reference = p, this.callBackUrl = m, this.metadata = g, this.localCurrency = b, this._currentStep = 1, this.contents = this.container.querySelector(
|
|
37751
37755
|
"#payment-content-view"
|
|
37752
37756
|
), this.hidePaymentMethods = y, this.showPaymentMethods = S, this.restartTransactionProcess = f, this.retryingPayment = w, this.isMaxRetriesReached = !1, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.errorText = "", this.renderEftContent(), _.track("eft_opens", {
|
|
37753
37757
|
payment_method: "EFT"
|
|
@@ -37778,18 +37782,18 @@ class ku {
|
|
|
37778
37782
|
(() => {
|
|
37779
37783
|
var a, o;
|
|
37780
37784
|
if (this.retryingPayment) {
|
|
37781
|
-
const
|
|
37785
|
+
const c = {
|
|
37782
37786
|
channel: "eft",
|
|
37783
37787
|
reference: this.reference
|
|
37784
37788
|
};
|
|
37785
37789
|
return mt(
|
|
37786
37790
|
this.token,
|
|
37787
|
-
|
|
37791
|
+
c,
|
|
37788
37792
|
this.rdtCode,
|
|
37789
37793
|
this.url
|
|
37790
37794
|
);
|
|
37791
37795
|
} else {
|
|
37792
|
-
const
|
|
37796
|
+
const c = {
|
|
37793
37797
|
amount: this.amount,
|
|
37794
37798
|
channel: "eft",
|
|
37795
37799
|
currency: this.currency,
|
|
@@ -37806,13 +37810,13 @@ class ku {
|
|
|
37806
37810
|
};
|
|
37807
37811
|
return ns(
|
|
37808
37812
|
this.token,
|
|
37809
|
-
|
|
37813
|
+
c,
|
|
37810
37814
|
this.rdtCode,
|
|
37811
37815
|
this.url
|
|
37812
37816
|
);
|
|
37813
37817
|
}
|
|
37814
37818
|
})().then(async ({ data: a, headers: o }) => {
|
|
37815
|
-
var
|
|
37819
|
+
var c, l, p;
|
|
37816
37820
|
if (this.paymentResponse = a, this.paymentResponseHeaders = o, a.providerMessage) {
|
|
37817
37821
|
const m = await W(
|
|
37818
37822
|
a.providerMessage,
|
|
@@ -37828,8 +37832,8 @@ class ku {
|
|
|
37828
37832
|
verification_status: "Failed"
|
|
37829
37833
|
});
|
|
37830
37834
|
return;
|
|
37831
|
-
} else if (((
|
|
37832
|
-
(
|
|
37835
|
+
} else if (((c = a == null ? void 0 : a.authorization) == null ? void 0 : c.mode) === "redirect") {
|
|
37836
|
+
(l = a == null ? void 0 : a.authorization) != null && l.redirectUrl && this.redirectToOzow((p = a == null ? void 0 : a.authorization) == null ? void 0 : p.redirectUrl);
|
|
37833
37837
|
return;
|
|
37834
37838
|
} else
|
|
37835
37839
|
this.currentStep = 4, a != null && a.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
@@ -38076,8 +38080,8 @@ class ga {
|
|
|
38076
38080
|
e.innerHTML = "";
|
|
38077
38081
|
const a = document.createElement("option");
|
|
38078
38082
|
a.value = "", a.textContent = i, a.disabled = !0, a.selected = !0, e.appendChild(a), t.forEach((o) => {
|
|
38079
|
-
const
|
|
38080
|
-
|
|
38083
|
+
const c = document.createElement("option");
|
|
38084
|
+
c.value = o.value, c.textContent = s ? o.label.toUpperCase() : du(o.label), e.appendChild(c);
|
|
38081
38085
|
});
|
|
38082
38086
|
}
|
|
38083
38087
|
get currentStep() {
|
|
@@ -38136,7 +38140,7 @@ class ga {
|
|
|
38136
38140
|
this.chainsList,
|
|
38137
38141
|
Ve["select-chain"]
|
|
38138
38142
|
);
|
|
38139
|
-
},
|
|
38143
|
+
}, c = async () => {
|
|
38140
38144
|
if (this.assetList.length === 0)
|
|
38141
38145
|
try {
|
|
38142
38146
|
const b = await Cl(
|
|
@@ -38158,8 +38162,8 @@ class ga {
|
|
|
38158
38162
|
!0
|
|
38159
38163
|
);
|
|
38160
38164
|
};
|
|
38161
|
-
o(),
|
|
38162
|
-
const
|
|
38165
|
+
o(), c();
|
|
38166
|
+
const l = this.container.querySelector(
|
|
38163
38167
|
"#qr-code"
|
|
38164
38168
|
), p = (g = Ve["payment-text"]) == null ? void 0 : g.replace("{amount}", `${this.amount.toString()} ${this.currency}`), m = async () => {
|
|
38165
38169
|
var S, f;
|
|
@@ -38167,7 +38171,7 @@ class ga {
|
|
|
38167
38171
|
if (b && y) {
|
|
38168
38172
|
i.disabled = !0, s.disabled = !0, await this.createStablecoinPayment({ chain: b, asset: y });
|
|
38169
38173
|
const w = (f = (S = this.paymentResponse) == null ? void 0 : S.stablecoin) == null ? void 0 : f.depositAddress, A = Mu(w);
|
|
38170
|
-
|
|
38174
|
+
l.innerHTML = `
|
|
38171
38175
|
<div>
|
|
38172
38176
|
<div class='mb-4 mt-2'>
|
|
38173
38177
|
<p class=" text-black text-xs font-medium" id="payment-text">${p || ""}</p>
|
|
@@ -38199,9 +38203,9 @@ class ga {
|
|
|
38199
38203
|
</div>
|
|
38200
38204
|
</div>
|
|
38201
38205
|
`;
|
|
38202
|
-
const M =
|
|
38206
|
+
const M = l.querySelector(
|
|
38203
38207
|
"#confirm-payment-btn"
|
|
38204
|
-
), x =
|
|
38208
|
+
), x = l.querySelector(
|
|
38205
38209
|
"#wallet-address"
|
|
38206
38210
|
);
|
|
38207
38211
|
x && (x.textContent = Ve["copy-text"]), M && (M.textContent = Ve["payment-confirmation"]), M == null || M.addEventListener("click", async () => {
|
|
@@ -38210,7 +38214,7 @@ class ga {
|
|
|
38210
38214
|
this.copyToClipboard(w, x);
|
|
38211
38215
|
});
|
|
38212
38216
|
} else
|
|
38213
|
-
|
|
38217
|
+
l.innerHTML = "";
|
|
38214
38218
|
};
|
|
38215
38219
|
i.addEventListener("change", m), s.addEventListener("change", m);
|
|
38216
38220
|
}
|
|
@@ -38219,7 +38223,7 @@ class ga {
|
|
|
38219
38223
|
t && s && (t.classList.remove("hidden"), s.classList.add("hidden"));
|
|
38220
38224
|
const a = ft();
|
|
38221
38225
|
return (() => {
|
|
38222
|
-
var
|
|
38226
|
+
var c, l;
|
|
38223
38227
|
if (this.retryingPayment) {
|
|
38224
38228
|
const p = {
|
|
38225
38229
|
channel: "stablecoin",
|
|
@@ -38247,8 +38251,8 @@ class ga {
|
|
|
38247
38251
|
isCheckout: !0,
|
|
38248
38252
|
...this.localCurrency && { localCurrency: this.localCurrency },
|
|
38249
38253
|
deviceInformation: a,
|
|
38250
|
-
...((
|
|
38251
|
-
taxQuoteId: (
|
|
38254
|
+
...((c = this.merchantPlanDetail) == null ? void 0 : c.taxQuoteId) && {
|
|
38255
|
+
taxQuoteId: (l = this.merchantPlanDetail) == null ? void 0 : l.taxQuoteId
|
|
38252
38256
|
},
|
|
38253
38257
|
stablecoin: {
|
|
38254
38258
|
asset: e.asset,
|
|
@@ -38262,12 +38266,12 @@ class ga {
|
|
|
38262
38266
|
this.url
|
|
38263
38267
|
);
|
|
38264
38268
|
}
|
|
38265
|
-
})().then(async ({ data:
|
|
38269
|
+
})().then(async ({ data: c, headers: l }) => {
|
|
38266
38270
|
var p;
|
|
38267
|
-
if (this.paymentResponse =
|
|
38268
|
-
if ((p = this.onStepChange) == null || p.call(this, 4),
|
|
38271
|
+
if (this.paymentResponse = c, c.status === "failed") {
|
|
38272
|
+
if ((p = this.onStepChange) == null || p.call(this, 4), c.providerMessage) {
|
|
38269
38273
|
const m = await W(
|
|
38270
|
-
|
|
38274
|
+
c.providerMessage,
|
|
38271
38275
|
wt.language
|
|
38272
38276
|
);
|
|
38273
38277
|
this.errorText = m, this.warningScreen.setPaymentError(this.errorText);
|
|
@@ -38280,27 +38284,27 @@ class ga {
|
|
|
38280
38284
|
verification_status: "Failed"
|
|
38281
38285
|
});
|
|
38282
38286
|
return;
|
|
38283
|
-
} else if (
|
|
38287
|
+
} else if (c.status === "success")
|
|
38284
38288
|
this.currentStep = 2, _.track("start_payment_success", {
|
|
38285
38289
|
payment_method: "Mobile Money",
|
|
38286
38290
|
verification_status: "Success"
|
|
38287
|
-
}), De(l, c
|
|
38291
|
+
}), De(c, l, c == null ? void 0 : c.callBackUrl);
|
|
38288
38292
|
else
|
|
38289
38293
|
return;
|
|
38290
|
-
}).catch(async (
|
|
38291
|
-
var
|
|
38294
|
+
}).catch(async (c) => {
|
|
38295
|
+
var l, p;
|
|
38292
38296
|
if (_.track("verify_payment", {
|
|
38293
38297
|
payment_method: "Stablecoins",
|
|
38294
38298
|
verification_status: "Null"
|
|
38295
|
-
}),
|
|
38296
|
-
this.isMaxRetriesReached = !0, (
|
|
38299
|
+
}), c.code === "payment_max_retry_attempts")
|
|
38300
|
+
this.isMaxRetriesReached = !0, (l = this.onStepChange) == null || l.call(this, 4), this.warningScreen.setPaymentError(
|
|
38297
38301
|
P["maximum-retries"],
|
|
38298
38302
|
P["maximum-retries-desc"],
|
|
38299
38303
|
Z["merchant-back"]
|
|
38300
38304
|
);
|
|
38301
|
-
else if ((p = this.onStepChange) == null || p.call(this, 4),
|
|
38305
|
+
else if ((p = this.onStepChange) == null || p.call(this, 4), c.message) {
|
|
38302
38306
|
const m = await W(
|
|
38303
|
-
|
|
38307
|
+
c.message,
|
|
38304
38308
|
wt == null ? void 0 : wt.language
|
|
38305
38309
|
);
|
|
38306
38310
|
this.errorText = m, this.warningScreen.setPaymentError(this.errorText);
|
|
@@ -38390,8 +38394,8 @@ class Lu {
|
|
|
38390
38394
|
this.verifyStablecoins(
|
|
38391
38395
|
this.token,
|
|
38392
38396
|
a,
|
|
38393
|
-
({ data: o, headers:
|
|
38394
|
-
this.onAction(2), this.redirectTo(o,
|
|
38397
|
+
({ data: o, headers: c }) => {
|
|
38398
|
+
this.onAction(2), this.redirectTo(o, c, "success");
|
|
38395
38399
|
},
|
|
38396
38400
|
() => {
|
|
38397
38401
|
this.onAction(4);
|
|
@@ -38400,11 +38404,11 @@ class Lu {
|
|
|
38400
38404
|
}, 5e3), this.startTimer();
|
|
38401
38405
|
}
|
|
38402
38406
|
async verifyStablecoins(e, t, i, s) {
|
|
38403
|
-
let a = 0, o = t,
|
|
38404
|
-
this.abortController && (
|
|
38407
|
+
let a = 0, o = t, c = !0, l;
|
|
38408
|
+
this.abortController && (l = this.abortController.signal);
|
|
38405
38409
|
const p = async () => {
|
|
38406
38410
|
if (this.timeLeft <= 0) {
|
|
38407
|
-
|
|
38411
|
+
c = !1, this.onAction(7);
|
|
38408
38412
|
return;
|
|
38409
38413
|
}
|
|
38410
38414
|
a += 1;
|
|
@@ -38412,19 +38416,19 @@ class Lu {
|
|
|
38412
38416
|
const m = await en(
|
|
38413
38417
|
e,
|
|
38414
38418
|
this.ref,
|
|
38415
|
-
|
|
38419
|
+
l,
|
|
38416
38420
|
this.rdtCode,
|
|
38417
38421
|
this.url
|
|
38418
38422
|
);
|
|
38419
|
-
m.data.status === "failed" && (
|
|
38423
|
+
m.data.status === "failed" && (c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), this.setPaymentResponses(m.data, m.headers), _.track("verify_payment", {
|
|
38420
38424
|
payment_method: "Stablecoins",
|
|
38421
38425
|
verification_status: "Failed"
|
|
38422
|
-
}), s(m)), m.data.status === "inProgress" && (
|
|
38426
|
+
}), s(m)), m.data.status === "inProgress" && (c && (o = t * (a + 1), this.timer = setTimeout(p, o)), this.setPaymentResponses(m.data, m.headers)), (m.data.status === "success" || m.data.status === "successful") && (this.setPaymentResponses(m.data, m.headers), c = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), _.track("verify_payment", {
|
|
38423
38427
|
payment_method: "Stablecoins",
|
|
38424
38428
|
verification_status: "Success"
|
|
38425
38429
|
}), i(m));
|
|
38426
38430
|
} catch {
|
|
38427
|
-
|
|
38431
|
+
c && (o = t * (a + 1), this.timer = setTimeout(p, o));
|
|
38428
38432
|
}
|
|
38429
38433
|
};
|
|
38430
38434
|
p();
|
|
@@ -38523,8 +38527,8 @@ class Eu {
|
|
|
38523
38527
|
currency: s,
|
|
38524
38528
|
customer: a,
|
|
38525
38529
|
callBackUrl: o,
|
|
38526
|
-
metadata:
|
|
38527
|
-
reference:
|
|
38530
|
+
metadata: c,
|
|
38531
|
+
reference: l,
|
|
38528
38532
|
rdtCode: p,
|
|
38529
38533
|
url: m,
|
|
38530
38534
|
token: g,
|
|
@@ -38561,7 +38565,7 @@ class Eu {
|
|
|
38561
38565
|
d(this, "token");
|
|
38562
38566
|
d(this, "localCurrency");
|
|
38563
38567
|
d(this, "errorText");
|
|
38564
|
-
this.token = g, this.amount = i, this.totalAmount = y, this.currency = s, this.customer = a, this.rdtCode = p, this.url = m, this.reference =
|
|
38568
|
+
this.token = g, this.amount = i, this.totalAmount = y, this.currency = s, this.customer = a, this.rdtCode = p, this.url = m, this.reference = l, this.callBackUrl = o, this.metadata = c, this.retryingPayment = b, this.container = e, this.restartTransactionProcess = t, this.isMaxRetriesReached = !1, this.localCurrency = S, this.paymentResponseHeaders = {}, this.paymentResponse = {}, this.contents = this.container.querySelector(
|
|
38565
38569
|
"#payment-content-view"
|
|
38566
38570
|
), this._currentStep = 1, this.onSuccess = f || (() => null), this.errorText = "";
|
|
38567
38571
|
}
|
|
@@ -38817,8 +38821,8 @@ class Iu {
|
|
|
38817
38821
|
customer: s,
|
|
38818
38822
|
token: a,
|
|
38819
38823
|
currency: o,
|
|
38820
|
-
rdtCode:
|
|
38821
|
-
url:
|
|
38824
|
+
rdtCode: c,
|
|
38825
|
+
url: l,
|
|
38822
38826
|
reference: p,
|
|
38823
38827
|
callBackUrl: m,
|
|
38824
38828
|
metadata: g,
|
|
@@ -38861,7 +38865,7 @@ class Iu {
|
|
|
38861
38865
|
d(this, "countdownInterval");
|
|
38862
38866
|
d(this, "popupInterval");
|
|
38863
38867
|
d(this, "errorText");
|
|
38864
|
-
this.currency = o, this.container = i, this.token = a, this.customer = s, this.amount = e, this.totalAmount = t, this.rdtCode =
|
|
38868
|
+
this.currency = o, this.container = i, this.token = a, this.customer = s, this.amount = e, this.totalAmount = t, this.rdtCode = c, this.url = l, this.reference = p, this.callBackUrl = m, this.metadata = g, this.localCurrency = b, this._currentStep = 1, this.countdownInterval, this.contents = this.container.querySelector(
|
|
38865
38869
|
"#payment-content-view"
|
|
38866
38870
|
), this.hidePaymentMethods = y, this.showPaymentMethods = S, this.restartTransactionProcess = f, this.retryingPayment = w, this.isMaxRetriesReached = !1, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.errorText = "", this.renderOpayContent(), _.track("pay_with_opay_opens", {
|
|
38867
38871
|
payment_method: "OPAY"
|
|
@@ -38892,18 +38896,18 @@ class Iu {
|
|
|
38892
38896
|
(() => {
|
|
38893
38897
|
var a, o;
|
|
38894
38898
|
if (this.retryingPayment) {
|
|
38895
|
-
const
|
|
38899
|
+
const c = {
|
|
38896
38900
|
channel: "pay_with_opay",
|
|
38897
38901
|
reference: this.reference
|
|
38898
38902
|
};
|
|
38899
38903
|
return mt(
|
|
38900
38904
|
this.token,
|
|
38901
|
-
|
|
38905
|
+
c,
|
|
38902
38906
|
this.rdtCode,
|
|
38903
38907
|
this.url
|
|
38904
38908
|
);
|
|
38905
38909
|
} else {
|
|
38906
|
-
const
|
|
38910
|
+
const c = {
|
|
38907
38911
|
amount: this.amount,
|
|
38908
38912
|
channel: "pay_with_opay",
|
|
38909
38913
|
currency: this.currency,
|
|
@@ -38920,13 +38924,13 @@ class Iu {
|
|
|
38920
38924
|
};
|
|
38921
38925
|
return ns(
|
|
38922
38926
|
this.token,
|
|
38923
|
-
|
|
38927
|
+
c,
|
|
38924
38928
|
this.rdtCode,
|
|
38925
38929
|
this.url
|
|
38926
38930
|
);
|
|
38927
38931
|
}
|
|
38928
38932
|
})().then(async ({ data: a, headers: o }) => {
|
|
38929
|
-
var
|
|
38933
|
+
var c, l, p;
|
|
38930
38934
|
if (this.paymentResponse = a, this.paymentResponseHeaders = o, a.providerMessage) {
|
|
38931
38935
|
const m = await W(
|
|
38932
38936
|
a.providerMessage,
|
|
@@ -38942,8 +38946,8 @@ class Iu {
|
|
|
38942
38946
|
verification_status: "Failed"
|
|
38943
38947
|
});
|
|
38944
38948
|
return;
|
|
38945
|
-
} else if (((
|
|
38946
|
-
(
|
|
38949
|
+
} else if (((c = a == null ? void 0 : a.authorization) == null ? void 0 : c.mode) === "redirect") {
|
|
38950
|
+
(l = a == null ? void 0 : a.authorization) != null && l.redirectUrl && this.redirectToOpay((p = a == null ? void 0 : a.authorization) == null ? void 0 : p.redirectUrl);
|
|
38947
38951
|
return;
|
|
38948
38952
|
} else
|
|
38949
38953
|
this.currentStep = 4, a != null && a.providerMessage ? this.warningScreen.setPaymentError(this.errorText) : this.warningScreen.setPaymentError(
|
|
@@ -39115,8 +39119,8 @@ class Du {
|
|
|
39115
39119
|
merchantKey: s,
|
|
39116
39120
|
modalContainer: a,
|
|
39117
39121
|
amount: o,
|
|
39118
|
-
planId:
|
|
39119
|
-
rdtCode:
|
|
39122
|
+
planId: c,
|
|
39123
|
+
rdtCode: l,
|
|
39120
39124
|
url: p,
|
|
39121
39125
|
reference: m,
|
|
39122
39126
|
callBackUrl: g,
|
|
@@ -39164,12 +39168,12 @@ class Du {
|
|
|
39164
39168
|
d(this, "mainLoader");
|
|
39165
39169
|
d(this, "mode");
|
|
39166
39170
|
d(this, "selectedMethods");
|
|
39167
|
-
this.validChannels = [], this.disabledChannels = [], this.selectedChannel = "", this.modalContainer = a, this.encryption = i, this.planId =
|
|
39171
|
+
this.validChannels = [], this.disabledChannels = [], this.selectedChannel = "", this.modalContainer = a, this.encryption = i, this.planId = c || "", this.merchantKey = s, this.amount = o || 0, this.rdtCode = l || "", this.url = p || "", this.reference = m, this.mainLayout = e, this.callBackUrl = g, this.metadata = b || {}, this.localCurrency = y || "", this.isMobile = window.matchMedia("(max-width: 767px)").matches, this.currentPaymentMethod = "", this.currency = "", this.closePayment = S, this.retryingPayment = !1, this.totalAmount = 0, this.countryCode = f || "", this.customerDetails = t, this.mode = w, this.selectedMethods = [];
|
|
39168
39172
|
}
|
|
39169
39173
|
mountScreen(e, t, i, s) {
|
|
39170
|
-
var
|
|
39174
|
+
var l, p;
|
|
39171
39175
|
i && (this.validChannels = i), s && (this.disabledChannels = s), this.mainLayout.innerHTML = this.render(), this.merchantPlanDetail = e, this.currency = t;
|
|
39172
|
-
const a = (p = (
|
|
39176
|
+
const a = (p = (l = this.merchantPlanDetail.plan) == null ? void 0 : l.pricingOptions) == null ? void 0 : p.find(
|
|
39173
39177
|
(m) => m.currency === this.currency
|
|
39174
39178
|
);
|
|
39175
39179
|
this.amount = (a == null ? void 0 : a.amount) || this.amount, this.totalAmount = this.merchantPlanDetail.totalAmount || this.amount, this.mainHeader = new hu({
|
|
@@ -39196,13 +39200,13 @@ class Du {
|
|
|
39196
39200
|
m && (m.innerHTML = "", m.classList.add("hidden"));
|
|
39197
39201
|
}
|
|
39198
39202
|
});
|
|
39199
|
-
const o = !1,
|
|
39203
|
+
const o = !1, c = Vs(this.merchantKey);
|
|
39200
39204
|
this.mainFooter = new ma({
|
|
39201
39205
|
container: document.getElementById("main-footer"),
|
|
39202
39206
|
testCardContainer: document.getElementById(
|
|
39203
39207
|
"test-container"
|
|
39204
39208
|
),
|
|
39205
|
-
keyEnvironment:
|
|
39209
|
+
keyEnvironment: c || (this.mode ? this.mode : null),
|
|
39206
39210
|
isVisible: o
|
|
39207
39211
|
}), document.addEventListener("DOMContentLoaded", () => {
|
|
39208
39212
|
const m = document.getElementById(
|
|
@@ -39213,7 +39217,7 @@ class Du {
|
|
|
39213
39217
|
new ma({
|
|
39214
39218
|
container: m,
|
|
39215
39219
|
testCardContainer: g,
|
|
39216
|
-
keyEnvironment:
|
|
39220
|
+
keyEnvironment: c || (this.mode ? this.mode : null),
|
|
39217
39221
|
isVisible: o
|
|
39218
39222
|
}).renderComponent();
|
|
39219
39223
|
}), this.mainFooter.renderComponent(), this.setupPaymentMethodButtons(), this.selectedChannel && (this.currentPaymentMethod = this.selectedChannel), this.updatePaymentMethodView(
|
|
@@ -39726,8 +39730,8 @@ class Fu {
|
|
|
39726
39730
|
merchantKey: s,
|
|
39727
39731
|
planId: a,
|
|
39728
39732
|
amount: o,
|
|
39729
|
-
rdtCode:
|
|
39730
|
-
reference:
|
|
39733
|
+
rdtCode: c,
|
|
39734
|
+
reference: l,
|
|
39731
39735
|
currency: p,
|
|
39732
39736
|
url: m,
|
|
39733
39737
|
callBackUrl: g,
|
|
@@ -39739,7 +39743,7 @@ class Fu {
|
|
|
39739
39743
|
mode: A
|
|
39740
39744
|
// subscriptionId,
|
|
39741
39745
|
} = e;
|
|
39742
|
-
if (this.merchantKey = s || "", this.email = t || "", this.amount = o || 0, this.encryption = i || "", this.planId = a || "", this.rdtCode =
|
|
39746
|
+
if (this.merchantKey = s || "", this.email = t || "", this.amount = o || 0, this.encryption = i || "", this.planId = a || "", this.rdtCode = c || "", this.reference = l || kl(), this.url = m || "", this.callBackUrl = g || "", this.metadata = b || {}, this.countryCode = S || "", this.phoneNumber = f || "", this.name = w || "", this.mode = A, !s || !t)
|
|
39743
39747
|
throw this.mainError = new Qi(this.mainLayout), this.mainError.renderContent(
|
|
39744
39748
|
Z["merchant-email-required"],
|
|
39745
39749
|
this.callBackUrl
|
|
@@ -39783,9 +39787,9 @@ class Fu {
|
|
|
39783
39787
|
getAvailableChannels() {
|
|
39784
39788
|
var a, o;
|
|
39785
39789
|
const e = ((a = this.merchantPlanDetail) == null ? void 0 : a.paymentMethods) ?? [], t = ((o = this.merchantPlanDetail) == null ? void 0 : o.limits) ?? [], i = [], s = [];
|
|
39786
|
-
return e.forEach((
|
|
39787
|
-
const
|
|
39788
|
-
!
|
|
39790
|
+
return e.forEach((c) => {
|
|
39791
|
+
const l = t.find((p) => p.channel === c);
|
|
39792
|
+
!l || this.amount <= l.amount ? i.push(c) : s.push(c);
|
|
39789
39793
|
}), { validChannels: i, disabledChannels: s };
|
|
39790
39794
|
}
|
|
39791
39795
|
async getPlanDetails() {
|
|
@@ -39829,14 +39833,14 @@ class Fu {
|
|
|
39829
39833
|
}), _.track("checkout_opens");
|
|
39830
39834
|
const { validChannels: a, disabledChannels: o } = this.getAvailableChannels();
|
|
39831
39835
|
if (((i = this.merchantPlanDetail) == null ? void 0 : i.limits) && this.merchantPlanDetail.limits.length > 0 && (a.length === 0 || a[0] === "ussd" && a.length === 1)) {
|
|
39832
|
-
const
|
|
39836
|
+
const l = new Ru(
|
|
39833
39837
|
this.mainLayout
|
|
39834
39838
|
);
|
|
39835
|
-
this.mainError =
|
|
39839
|
+
this.mainError = l;
|
|
39836
39840
|
let p = 0;
|
|
39837
39841
|
throw (s = this.merchantPlanDetail) != null && s.limits && this.merchantPlanDetail.limits.length > 0 && (p = Math.max(
|
|
39838
39842
|
...this.merchantPlanDetail.limits.map((m) => m.amount)
|
|
39839
|
-
)),
|
|
39843
|
+
)), l.setLimitInfo(e, p), this.mainError.renderContent(
|
|
39840
39844
|
Z["transaction-limit"],
|
|
39841
39845
|
this.callBackUrl
|
|
39842
39846
|
), this.showErrorIcon(), new Error("Transaction limit reached");
|