@ranty/ranty-sdk 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +962 -910
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var du = Object.defineProperty, pu = Object.defineProperties;
|
|
2
2
|
var gu = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Ys = Object.getOwnPropertySymbols, mu = Object.getPrototypeOf, yu = Object.prototype.hasOwnProperty, vu = Object.prototype.propertyIsEnumerable, bu = Reflect.get;
|
|
4
|
-
var Js = (r, e, t) => e in r ? du(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t,
|
|
4
|
+
var Js = (r, e, t) => e in r ? du(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Mt = (r, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
6
|
yu.call(e, t) && Js(r, t, e[t]);
|
|
7
7
|
if (Ys)
|
|
@@ -10,7 +10,7 @@ var Js = (r, e, t) => e in r ? du(r, e, { enumerable: !0, configurable: !0, writ
|
|
|
10
10
|
return r;
|
|
11
11
|
}, ir = (r, e) => pu(r, gu(e));
|
|
12
12
|
var xr = (r, e, t) => bu(mu(r), t, e);
|
|
13
|
-
var
|
|
13
|
+
var L = (r, e, t) => new Promise((n, i) => {
|
|
14
14
|
var s = (c) => {
|
|
15
15
|
try {
|
|
16
16
|
a(t.next(c));
|
|
@@ -26,7 +26,7 @@ var V = (r, e, t) => new Promise((n, i) => {
|
|
|
26
26
|
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(s, o);
|
|
27
27
|
a((t = t.apply(r, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { css as te, unsafeCSS as re, LitElement as Q, html as
|
|
29
|
+
import { css as te, unsafeCSS as re, LitElement as Q, html as P } from "lit";
|
|
30
30
|
import { property as w, customElement as ee, state as $ } from "lit/decorators.js";
|
|
31
31
|
import { TemplateResultType as wu } from "lit-html/directive-helpers.js";
|
|
32
32
|
const _u = `body{background:#ffffff}.clickeable{cursor:pointer}*{user-select:none}.footer{background:#ffffff;text-align:center;padding:10px;position:fixed;bottom:0;width:100%;border:1px solid #ccc}.footer_title{display:flex;padding-top:.75rem;padding-bottom:.75rem}.footer_link{display:flex;flex-direction:row;justify-content:center;align-items:center;margin-left:auto;margin-right:auto}.footer_span{margin-top:.25rem;margin-right:.25rem;color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-weight:400;font-size:14px;line-height:1.25rem}a{text-decoration:none}.footer_icon{margin-right:.25rem}
|
|
@@ -41,7 +41,7 @@ let Nr = class extends Q {
|
|
|
41
41
|
super(...arguments), this.title = "Nave", this.image = "https://ranty-sdk-js.naranjax.com/images/nave-icono.svg", this.icon = "https://ranty-sdk-js.naranjax.com/images/popup.svg";
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return
|
|
44
|
+
return P`
|
|
45
45
|
<div class="footer">
|
|
46
46
|
<div class="footer_title">
|
|
47
47
|
<a
|
|
@@ -80,7 +80,7 @@ var Cu = Object.defineProperty, Tu = Object.getOwnPropertyDescriptor, We = (r, e
|
|
|
80
80
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
81
81
|
return n && i && Cu(e, t, i), i;
|
|
82
82
|
};
|
|
83
|
-
let
|
|
83
|
+
let Fe = class extends Q {
|
|
84
84
|
constructor() {
|
|
85
85
|
super(...arguments), this.type = "text", this.id = "", this.label = "", this.value = "", this.creditNumber = "", this.minLength = 0, this.maxLength = Number.MAX_SAFE_INTEGER, this.customClass = "", this.messageWarning = "", this.messageError = "", this.placeHolder = "", this.errorInput = !1;
|
|
86
86
|
}
|
|
@@ -105,7 +105,7 @@ let Be = class extends Q {
|
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
|
-
return
|
|
108
|
+
return P`
|
|
109
109
|
<div class="input ${this.customClass}">
|
|
110
110
|
<label for="${this.id}">${this.label}</label>
|
|
111
111
|
<input
|
|
@@ -122,49 +122,49 @@ let Be = class extends Q {
|
|
|
122
122
|
`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
Fe.styles = te`
|
|
126
126
|
${re(Eu)}
|
|
127
127
|
`;
|
|
128
128
|
We([
|
|
129
129
|
w({ type: String })
|
|
130
|
-
],
|
|
130
|
+
], Fe.prototype, "type", 2);
|
|
131
131
|
We([
|
|
132
132
|
w({ type: String })
|
|
133
|
-
],
|
|
133
|
+
], Fe.prototype, "id", 2);
|
|
134
134
|
We([
|
|
135
135
|
w({ type: String })
|
|
136
|
-
],
|
|
136
|
+
], Fe.prototype, "label", 2);
|
|
137
137
|
We([
|
|
138
138
|
w({ type: String })
|
|
139
|
-
],
|
|
139
|
+
], Fe.prototype, "value", 2);
|
|
140
140
|
We([
|
|
141
141
|
w({ type: String })
|
|
142
|
-
],
|
|
142
|
+
], Fe.prototype, "creditNumber", 2);
|
|
143
143
|
We([
|
|
144
144
|
w({ type: Number })
|
|
145
|
-
],
|
|
145
|
+
], Fe.prototype, "minLength", 2);
|
|
146
146
|
We([
|
|
147
147
|
w({ type: Number })
|
|
148
|
-
],
|
|
148
|
+
], Fe.prototype, "maxLength", 2);
|
|
149
149
|
We([
|
|
150
150
|
w({ type: String })
|
|
151
|
-
],
|
|
151
|
+
], Fe.prototype, "customClass", 2);
|
|
152
152
|
We([
|
|
153
153
|
w({ type: String })
|
|
154
|
-
],
|
|
154
|
+
], Fe.prototype, "messageWarning", 2);
|
|
155
155
|
We([
|
|
156
156
|
w({ type: String })
|
|
157
|
-
],
|
|
157
|
+
], Fe.prototype, "messageError", 2);
|
|
158
158
|
We([
|
|
159
159
|
w({ type: String })
|
|
160
|
-
],
|
|
160
|
+
], Fe.prototype, "placeHolder", 2);
|
|
161
161
|
We([
|
|
162
162
|
w({ type: Boolean })
|
|
163
|
-
],
|
|
164
|
-
|
|
163
|
+
], Fe.prototype, "errorInput", 2);
|
|
164
|
+
Fe = We([
|
|
165
165
|
ee("my-input")
|
|
166
|
-
],
|
|
167
|
-
const
|
|
166
|
+
], Fe);
|
|
167
|
+
const rr = `body{background:#ffffff}.clickeable{cursor:pointer}.error{color:red;padding:5px;padding-left:0!important;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;font-weight:200;position:relative;bottom:35px}span p{font-family:Inter,Arial,"sans-serif";font-size:12px;color:#888;position:relative;bottom:45px}@media only screen and (max-width: 360px){.error{width:140px!important}}
|
|
168
168
|
`;
|
|
169
169
|
var Au = Object.defineProperty, Iu = Object.getOwnPropertyDescriptor, mn = (r, e, t, n) => {
|
|
170
170
|
for (var i = n > 1 ? void 0 : n ? Iu(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
@@ -200,7 +200,7 @@ let dr = class extends Q {
|
|
|
200
200
|
}
|
|
201
201
|
render() {
|
|
202
202
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.codSeg, t = this.isError;
|
|
203
|
-
return this.codSeg.trim() !== "" && (this.isTouched = !0),
|
|
203
|
+
return this.codSeg.trim() !== "" && (this.isTouched = !0), P`
|
|
204
204
|
<my-input
|
|
205
205
|
type="text"
|
|
206
206
|
id="${this.codSeg}"
|
|
@@ -211,13 +211,13 @@ let dr = class extends Q {
|
|
|
211
211
|
@handleBlur="${this.handleBlurInput}"
|
|
212
212
|
customClass="${e || t ? "error" : ""}"
|
|
213
213
|
></my-input>
|
|
214
|
-
${e ?
|
|
215
|
-
${t && !e && !this.formSubmitted ?
|
|
214
|
+
${e ? P`<div class="error" id="error">Tenés que completar el código de seguridad</div>` : ""}
|
|
215
|
+
${t && !e && !this.formSubmitted ? P`<div class="error" id="error">El código de seguridad está incompleto</div>` : ""}
|
|
216
216
|
`;
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
dr.styles = te`
|
|
220
|
-
${re(
|
|
220
|
+
${re(rr)}
|
|
221
221
|
`;
|
|
222
222
|
mn([
|
|
223
223
|
w({ type: String })
|
|
@@ -578,11 +578,11 @@ function si(r, e, t) {
|
|
|
578
578
|
if (C.endsWith(b, "{}"))
|
|
579
579
|
b = n ? b : b.slice(0, -2), g = JSON.stringify(g);
|
|
580
580
|
else if (C.isArray(g) && hc(g) || (C.isFileList(g) || C.endsWith(b, "[]")) && (E = C.toArray(g)))
|
|
581
|
-
return b = la(b), E.forEach(function(
|
|
582
|
-
!(C.isUndefined(
|
|
581
|
+
return b = la(b), E.forEach(function(R, U) {
|
|
582
|
+
!(C.isUndefined(R) || R === null) && e.append(
|
|
583
583
|
// eslint-disable-next-line no-nested-ternary
|
|
584
584
|
o === !0 ? Qs([b], U, s) : o === null ? b : b + "[]",
|
|
585
|
-
u(
|
|
585
|
+
u(R)
|
|
586
586
|
);
|
|
587
587
|
}), !1;
|
|
588
588
|
}
|
|
@@ -1403,7 +1403,7 @@ function Lc(r, e, t) {
|
|
|
1403
1403
|
const Ki = {
|
|
1404
1404
|
assertOptions: Lc,
|
|
1405
1405
|
validators: Ts
|
|
1406
|
-
},
|
|
1406
|
+
}, Lt = Ki.validators;
|
|
1407
1407
|
class Vn {
|
|
1408
1408
|
constructor(e) {
|
|
1409
1409
|
this.defaults = e, this.interceptors = {
|
|
@@ -1423,14 +1423,14 @@ class Vn {
|
|
|
1423
1423
|
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = Br(this.defaults, t);
|
|
1424
1424
|
const { transitional: n, paramsSerializer: i, headers: s } = t;
|
|
1425
1425
|
n !== void 0 && Ki.assertOptions(n, {
|
|
1426
|
-
silentJSONParsing:
|
|
1427
|
-
forcedJSONParsing:
|
|
1428
|
-
clarifyTimeoutError:
|
|
1426
|
+
silentJSONParsing: Lt.transitional(Lt.boolean),
|
|
1427
|
+
forcedJSONParsing: Lt.transitional(Lt.boolean),
|
|
1428
|
+
clarifyTimeoutError: Lt.transitional(Lt.boolean)
|
|
1429
1429
|
}, !1), i != null && (C.isFunction(i) ? t.paramsSerializer = {
|
|
1430
1430
|
serialize: i
|
|
1431
1431
|
} : Ki.assertOptions(i, {
|
|
1432
|
-
encode:
|
|
1433
|
-
serialize:
|
|
1432
|
+
encode: Lt.function,
|
|
1433
|
+
serialize: Lt.function
|
|
1434
1434
|
}, !0)), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1435
1435
|
let o = s && C.merge(
|
|
1436
1436
|
s.common,
|
|
@@ -1818,19 +1818,19 @@ var Gc = function() {
|
|
|
1818
1818
|
bn.ReCaptchaInstance = Gc;
|
|
1819
1819
|
Object.defineProperty(Fr, "__esModule", { value: !0 });
|
|
1820
1820
|
Fr.getInstance = Fr.load = void 0;
|
|
1821
|
-
var Wc = bn,
|
|
1821
|
+
var Wc = bn, Vt;
|
|
1822
1822
|
(function(r) {
|
|
1823
1823
|
r[r.NOT_LOADED = 0] = "NOT_LOADED", r[r.LOADING = 1] = "LOADING", r[r.LOADED = 2] = "LOADED";
|
|
1824
|
-
})(
|
|
1824
|
+
})(Vt || (Vt = {}));
|
|
1825
1825
|
var _a = function() {
|
|
1826
1826
|
function r() {
|
|
1827
1827
|
}
|
|
1828
1828
|
return r.load = function(e, t) {
|
|
1829
1829
|
if (t === void 0 && (t = {}), typeof document == "undefined")
|
|
1830
1830
|
return Promise.reject(new Error("This is a library for the browser!"));
|
|
1831
|
-
if (r.getLoadingState() ===
|
|
1831
|
+
if (r.getLoadingState() === Vt.LOADED)
|
|
1832
1832
|
return r.instance.getSiteKey() === e ? Promise.resolve(r.instance) : Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));
|
|
1833
|
-
if (r.getLoadingState() ===
|
|
1833
|
+
if (r.getLoadingState() === Vt.LOADING)
|
|
1834
1834
|
return e !== r.instanceSiteKey ? Promise.reject(new Error("reCAPTCHA already loaded with different site key!")) : new Promise(function(i, s) {
|
|
1835
1835
|
r.successfulLoadingConsumers.push(function(o) {
|
|
1836
1836
|
return i(o);
|
|
@@ -1838,11 +1838,11 @@ var _a = function() {
|
|
|
1838
1838
|
return s(o);
|
|
1839
1839
|
});
|
|
1840
1840
|
});
|
|
1841
|
-
r.instanceSiteKey = e, r.setLoadingState(
|
|
1841
|
+
r.instanceSiteKey = e, r.setLoadingState(Vt.LOADING);
|
|
1842
1842
|
var n = new r();
|
|
1843
1843
|
return new Promise(function(i, s) {
|
|
1844
1844
|
n.loadScript(e, t.useRecaptchaNet || !1, t.useEnterprise || !1, t.renderParameters ? t.renderParameters : {}, t.customUrl).then(function() {
|
|
1845
|
-
r.setLoadingState(
|
|
1845
|
+
r.setLoadingState(Vt.LOADED);
|
|
1846
1846
|
var o = n.doExplicitRender(grecaptcha, e, t.explicitRenderParameters ? t.explicitRenderParameters : {}, t.useEnterprise || !1), a = new Wc.ReCaptchaInstance(e, o, grecaptcha);
|
|
1847
1847
|
r.successfulLoadingConsumers.forEach(function(c) {
|
|
1848
1848
|
return c(a);
|
|
@@ -1858,7 +1858,7 @@ var _a = function() {
|
|
|
1858
1858
|
}, r.setLoadingState = function(e) {
|
|
1859
1859
|
r.loadingState = e;
|
|
1860
1860
|
}, r.getLoadingState = function() {
|
|
1861
|
-
return r.loadingState === null ?
|
|
1861
|
+
return r.loadingState === null ? Vt.NOT_LOADED : r.loadingState;
|
|
1862
1862
|
}, r.prototype.loadScript = function(e, t, n, i, s) {
|
|
1863
1863
|
var o = this;
|
|
1864
1864
|
t === void 0 && (t = !1), n === void 0 && (n = !1), i === void 0 && (i = {}), s === void 0 && (s = "");
|
|
@@ -1871,7 +1871,7 @@ var _a = function() {
|
|
|
1871
1871
|
a.addEventListener("load", o.waitForScriptToLoad(function() {
|
|
1872
1872
|
l(a);
|
|
1873
1873
|
}, n), !1), a.onerror = function(p) {
|
|
1874
|
-
r.setLoadingState(
|
|
1874
|
+
r.setLoadingState(Vt.NOT_LOADED), d(p);
|
|
1875
1875
|
}, document.head.appendChild(a);
|
|
1876
1876
|
});
|
|
1877
1877
|
}, r.prototype.buildQueryString = function(e) {
|
|
@@ -1917,28 +1917,28 @@ Fr.getInstance = _a.getInstance;
|
|
|
1917
1917
|
return t.ReCaptchaInstance;
|
|
1918
1918
|
} });
|
|
1919
1919
|
})(wa);
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1920
|
+
const kt = Is.create();
|
|
1921
|
+
kt.interceptors.request.use(
|
|
1922
1922
|
(r) => {
|
|
1923
1923
|
r.baseURL = "https://e3-api.ranty.io", r.headers["content-type"] = "application/json";
|
|
1924
1924
|
const e = sessionStorage.getItem("key");
|
|
1925
|
-
return
|
|
1925
|
+
return e && (r.params = ir(Mt({}, r.params), {
|
|
1926
1926
|
publicKey: e
|
|
1927
1927
|
})), r;
|
|
1928
1928
|
},
|
|
1929
1929
|
(r) => Promise.reject(r)
|
|
1930
1930
|
);
|
|
1931
|
-
class
|
|
1931
|
+
class xe {
|
|
1932
1932
|
static createTokenCaptcha(e) {
|
|
1933
|
-
return
|
|
1933
|
+
return L(this, null, function* () {
|
|
1934
1934
|
const n = yield (yield wa.load(e)).execute("submit");
|
|
1935
1935
|
return sessionStorage.setItem("key", e), sessionStorage.setItem("token", n), n;
|
|
1936
1936
|
});
|
|
1937
1937
|
}
|
|
1938
1938
|
static signer(e) {
|
|
1939
|
-
return
|
|
1939
|
+
return L(this, null, function* () {
|
|
1940
1940
|
try {
|
|
1941
|
-
const t = yield
|
|
1941
|
+
const t = yield xe.createTokenCaptcha(e), { data: n } = yield kt.post(
|
|
1942
1942
|
"/sdk/signer",
|
|
1943
1943
|
{},
|
|
1944
1944
|
{
|
|
@@ -1954,23 +1954,23 @@ class Te {
|
|
|
1954
1954
|
});
|
|
1955
1955
|
}
|
|
1956
1956
|
static createToken(e) {
|
|
1957
|
-
return
|
|
1957
|
+
return L(this, null, function* () {
|
|
1958
1958
|
try {
|
|
1959
|
-
const { headers: t, url: n, region: i } = yield
|
|
1960
|
-
delete t.host, sessionStorage.setItem("region", i),
|
|
1959
|
+
const { headers: t, url: n, region: i } = yield xe.signer(e);
|
|
1960
|
+
delete t.host, sessionStorage.setItem("region", i), xe.headers = t;
|
|
1961
1961
|
const { data: s } = yield Is.post(n, null, { headers: t });
|
|
1962
|
-
return
|
|
1962
|
+
return xe.token = `${s.token_type} ${s.access_token}`, xe.region = `${i}`, s;
|
|
1963
1963
|
} catch (t) {
|
|
1964
1964
|
throw new Error("Error al crear token.");
|
|
1965
1965
|
}
|
|
1966
1966
|
});
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
|
-
const Sa = (r) =>
|
|
1969
|
+
const Sa = (r) => L(void 0, null, function* () {
|
|
1970
1970
|
try {
|
|
1971
|
-
const { data: e } = yield
|
|
1971
|
+
const { data: e } = yield kt.get("/sdk/bin/" + r, {
|
|
1972
1972
|
headers: {
|
|
1973
|
-
Authorization:
|
|
1973
|
+
Authorization: xe.token
|
|
1974
1974
|
}
|
|
1975
1975
|
});
|
|
1976
1976
|
return e;
|
|
@@ -1999,8 +1999,8 @@ class Yc {
|
|
|
1999
1999
|
document.dispatchEvent(n);
|
|
2000
2000
|
}
|
|
2001
2001
|
}
|
|
2002
|
-
const
|
|
2003
|
-
var Jc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor,
|
|
2002
|
+
const Gt = new Yc();
|
|
2003
|
+
var Jc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor, Nt = (r, e, t, n) => {
|
|
2004
2004
|
for (var i = n > 1 ? void 0 : n ? Zc(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2005
2005
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
2006
2006
|
return n && i && Jc(e, t, i), i;
|
|
@@ -2017,36 +2017,37 @@ let ht = class extends Q {
|
|
|
2017
2017
|
return !/^\d*$/.test(t) || t.length !== 16 || this.isBrand === !1 ? !1 : e.test(t);
|
|
2018
2018
|
}
|
|
2019
2019
|
handleInput(r) {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2020
|
+
return L(this, null, function* () {
|
|
2021
|
+
const e = r.target, n = e.value.replace(/\D/g, ""), i = this.formatCardNumber(n);
|
|
2022
|
+
e.value = i;
|
|
2023
|
+
const s = i.replace(/\s/g, "");
|
|
2024
|
+
s.length === 16 ? this.shouldValidateBin ? yield Sa(s.slice(0, 6)).then((a) => {
|
|
2025
|
+
this.validCredit = a.response.data.bines, this.validCredit && this.validCredit.brand === "NARANJA" ? (this.isError = !1, this.isBrand = !0, this.isTouched = !0) : (this.isTouched = !0, this.isBrand = !1, this.isError = !0);
|
|
2026
|
+
}).catch((a) => {
|
|
2027
|
+
console.log(a), this.serviceError();
|
|
2028
|
+
}) : (this.isBrand = !0, this.isTouched = !0) : this.isError = !1;
|
|
2029
|
+
const o = new CustomEvent("onChange", {
|
|
2030
|
+
bubbles: !0,
|
|
2031
|
+
composed: !0,
|
|
2032
|
+
detail: { creditNumber: i, isBrand: this.isBrand, error: this.isError, touched: this.isTouched }
|
|
2033
|
+
});
|
|
2034
|
+
this.dispatchEvent(o), this.requestUpdate();
|
|
2032
2035
|
});
|
|
2033
|
-
this.dispatchEvent(o), this.requestUpdate();
|
|
2034
2036
|
}
|
|
2035
2037
|
serviceError() {
|
|
2036
|
-
|
|
2038
|
+
Gt.handleServiceError("SERVICE_ERROR", "service failed.");
|
|
2037
2039
|
}
|
|
2038
2040
|
handleBlurInput(r) {
|
|
2039
|
-
return
|
|
2041
|
+
return L(this, null, function* () {
|
|
2040
2042
|
const t = r.target.value;
|
|
2041
|
-
this.isTouched = !0, this.isCreditCardValid(t) ? this.isError = !1 : this.isError = !0;
|
|
2043
|
+
this.isTouched = !0, this.isCreditCardValid(t) ? (this.isError = !1, this.isTouched = !0) : (this.isError = !0, this.isTouched = !0);
|
|
2042
2044
|
const n = new CustomEvent("onChangeBlur", {
|
|
2043
2045
|
bubbles: !0,
|
|
2044
2046
|
composed: !0,
|
|
2045
2047
|
detail: {
|
|
2046
|
-
creditNumber:
|
|
2048
|
+
creditNumber: t,
|
|
2047
2049
|
error: this.isError,
|
|
2048
|
-
touched: this.isTouched
|
|
2049
|
-
isBrand: this.isBrand
|
|
2050
|
+
touched: this.isTouched
|
|
2050
2051
|
}
|
|
2051
2052
|
});
|
|
2052
2053
|
this.dispatchEvent(n), this.requestUpdate();
|
|
@@ -2054,7 +2055,7 @@ let ht = class extends Q {
|
|
|
2054
2055
|
}
|
|
2055
2056
|
render() {
|
|
2056
2057
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.creditNumber, t = this.isError && this.creditNumber.length !== 19, n = this.isError;
|
|
2057
|
-
return this.creditNumber !== "" && (this.isTouched = !0),
|
|
2058
|
+
return this.creditNumber !== "" && (this.isTouched = !0), P`
|
|
2058
2059
|
<my-input
|
|
2059
2060
|
type="text"
|
|
2060
2061
|
id="${this.creditNumber}"
|
|
@@ -2066,15 +2067,16 @@ let ht = class extends Q {
|
|
|
2066
2067
|
@handleBlur="${this.handleBlurInput}"
|
|
2067
2068
|
customClass="${e || t || n ? "error" : ""}"
|
|
2068
2069
|
></my-input>
|
|
2069
|
-
${e ?
|
|
2070
|
-
${t && (!e || !n) ?
|
|
2071
|
-
${n && !(e || t) ?
|
|
2070
|
+
${e ? P` <div class="errorBin" id="error">Tenés que completar el número de tarjeta</div>` : ""}
|
|
2071
|
+
${t && (!e || !n) ? P` <div class="errorBin" id="error">Revisá el número de tarjeta está incompleto</div>` : ""}
|
|
2072
|
+
${n && !(e || t) ? P` <div class="errorBin" id="error">
|
|
2072
2073
|
Revisá el número de tarjeta. Tiene que ser Naranja X
|
|
2073
2074
|
</div>` : ""}
|
|
2074
2075
|
`;
|
|
2075
2076
|
}
|
|
2076
2077
|
};
|
|
2077
2078
|
ht.styles = te`
|
|
2079
|
+
|
|
2078
2080
|
.errorBin {
|
|
2079
2081
|
color: red;
|
|
2080
2082
|
padding: 5px;
|
|
@@ -2086,36 +2088,36 @@ ht.styles = te`
|
|
|
2086
2088
|
bottom: 35px;
|
|
2087
2089
|
}
|
|
2088
2090
|
|
|
2089
|
-
${re(
|
|
2091
|
+
${re(rr)}
|
|
2090
2092
|
`;
|
|
2091
|
-
|
|
2093
|
+
Nt([
|
|
2092
2094
|
w({ type: String })
|
|
2093
2095
|
], ht.prototype, "creditNumber", 2);
|
|
2094
|
-
|
|
2096
|
+
Nt([
|
|
2095
2097
|
w({ type: String })
|
|
2096
2098
|
], ht.prototype, "validCredit", 2);
|
|
2097
|
-
|
|
2099
|
+
Nt([
|
|
2098
2100
|
w({ type: Boolean })
|
|
2099
2101
|
], ht.prototype, "isTouched", 2);
|
|
2100
|
-
|
|
2102
|
+
Nt([
|
|
2101
2103
|
w({ type: Boolean })
|
|
2102
2104
|
], ht.prototype, "isBrand", 2);
|
|
2103
|
-
|
|
2105
|
+
Nt([
|
|
2104
2106
|
w({ type: Boolean })
|
|
2105
2107
|
], ht.prototype, "isError", 2);
|
|
2106
|
-
|
|
2108
|
+
Nt([
|
|
2107
2109
|
w({ type: Boolean })
|
|
2108
2110
|
], ht.prototype, "formSubmitted", 2);
|
|
2109
|
-
|
|
2111
|
+
Nt([
|
|
2110
2112
|
w({ type: Boolean })
|
|
2111
2113
|
], ht.prototype, "validateCreditCard", 2);
|
|
2112
|
-
|
|
2114
|
+
Nt([
|
|
2113
2115
|
w({ type: Boolean })
|
|
2114
2116
|
], ht.prototype, "shouldValidateBin", 2);
|
|
2115
|
-
ht =
|
|
2117
|
+
ht = Nt([
|
|
2116
2118
|
ee("input-credit-card")
|
|
2117
2119
|
], ht);
|
|
2118
|
-
var Xc = Object.defineProperty, Qc = Object.getOwnPropertyDescriptor,
|
|
2120
|
+
var Xc = Object.defineProperty, Qc = Object.getOwnPropertyDescriptor, nr = (r, e, t, n) => {
|
|
2119
2121
|
for (var i = n > 1 ? void 0 : n ? Qc(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2120
2122
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
2121
2123
|
return n && i && Xc(e, t, i), i;
|
|
@@ -2160,7 +2162,7 @@ let yt = class extends Q {
|
|
|
2160
2162
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.dni, t = this.isError && !e && !this.formSubmitted;
|
|
2161
2163
|
this.dni.trim() !== "" && (this.isTouched = !0);
|
|
2162
2164
|
const n = !this.formSubmitted && !e || !this.formSubmitted && this.dni.trim() === "";
|
|
2163
|
-
return
|
|
2165
|
+
return P`
|
|
2164
2166
|
<my-input
|
|
2165
2167
|
type="text"
|
|
2166
2168
|
id="${this.dni}"
|
|
@@ -2172,37 +2174,37 @@ let yt = class extends Q {
|
|
|
2172
2174
|
@click="${this.handleClick}"
|
|
2173
2175
|
customClass="${e ? "error" : ""}"
|
|
2174
2176
|
></my-input>
|
|
2175
|
-
${n && !e && !t ?
|
|
2176
|
-
${e ?
|
|
2177
|
-
${t ?
|
|
2177
|
+
${n && !e && !t ? P`<span><p>Del titular de la tarjeta</p></span>` : ""}
|
|
2178
|
+
${e ? P`<div class="error" id="error">Tenés que completar el número</div>` : ""}
|
|
2179
|
+
${t ? P`<div class="error" id="error">Revisá el número, está incompleto</div>` : ""}
|
|
2178
2180
|
`;
|
|
2179
2181
|
}
|
|
2180
2182
|
};
|
|
2181
2183
|
yt.styles = te`
|
|
2182
|
-
${re(
|
|
2184
|
+
${re(rr)}
|
|
2183
2185
|
`;
|
|
2184
|
-
|
|
2186
|
+
nr([
|
|
2185
2187
|
w({ type: String })
|
|
2186
2188
|
], yt.prototype, "dni", 2);
|
|
2187
|
-
|
|
2189
|
+
nr([
|
|
2188
2190
|
w({ type: String })
|
|
2189
2191
|
], yt.prototype, "passport", 2);
|
|
2190
|
-
|
|
2192
|
+
nr([
|
|
2191
2193
|
w({ type: String })
|
|
2192
2194
|
], yt.prototype, "documentType", 2);
|
|
2193
|
-
|
|
2195
|
+
nr([
|
|
2194
2196
|
w({ type: Boolean })
|
|
2195
2197
|
], yt.prototype, "isTouched", 2);
|
|
2196
|
-
|
|
2198
|
+
nr([
|
|
2197
2199
|
w({ type: Boolean })
|
|
2198
2200
|
], yt.prototype, "isError", 2);
|
|
2199
|
-
|
|
2201
|
+
nr([
|
|
2200
2202
|
w({ type: Boolean })
|
|
2201
2203
|
], yt.prototype, "formSubmitted", 2);
|
|
2202
|
-
|
|
2204
|
+
nr([
|
|
2203
2205
|
w({ type: Boolean })
|
|
2204
2206
|
], yt.prototype, "showError", 2);
|
|
2205
|
-
yt =
|
|
2207
|
+
yt = nr([
|
|
2206
2208
|
ee("input-dni")
|
|
2207
2209
|
], yt);
|
|
2208
2210
|
var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, mr = (r, e, t, n) => {
|
|
@@ -2212,7 +2214,7 @@ var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, mr = (r, e
|
|
|
2212
2214
|
};
|
|
2213
2215
|
let It = class extends Q {
|
|
2214
2216
|
constructor() {
|
|
2215
|
-
super(...arguments), this.email = "", this.isTouched = !1, this.isError = !1, this.formSubmitted = !1, this.label = "Email", this.placeholder =
|
|
2217
|
+
super(...arguments), this.email = "", this.isTouched = !1, this.isError = !1, this.formSubmitted = !1, this.label = "Email", this.placeholder = P``;
|
|
2216
2218
|
}
|
|
2217
2219
|
isValidEmail(r) {
|
|
2218
2220
|
return /^[a-zA-Z0-9._+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/i.test(r);
|
|
@@ -2239,7 +2241,7 @@ let It = class extends Q {
|
|
|
2239
2241
|
}
|
|
2240
2242
|
render() {
|
|
2241
2243
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.email, t = this.isError && !e && !this.formSubmitted;
|
|
2242
|
-
return this.email.trim() !== "" && (this.isTouched = !0),
|
|
2244
|
+
return this.email.trim() !== "" && (this.isTouched = !0), P`
|
|
2243
2245
|
<my-input
|
|
2244
2246
|
type="email"
|
|
2245
2247
|
id="${this.email}"
|
|
@@ -2249,13 +2251,13 @@ let It = class extends Q {
|
|
|
2249
2251
|
@handleBlur="${this.handleBlurInput}"
|
|
2250
2252
|
customClass="${e ? "error" : ""}"
|
|
2251
2253
|
></my-input>
|
|
2252
|
-
${e ?
|
|
2253
|
-
${t ?
|
|
2254
|
+
${e ? P` <div class="error" id="error">Tenés que completar el email</div>` : P`<span><p>${this.placeholder}</p></span>`}
|
|
2255
|
+
${t ? P` <div class="error" id="error">Revisá el email, no tiene el formato correcto</div>` : ""}
|
|
2254
2256
|
`;
|
|
2255
2257
|
}
|
|
2256
2258
|
};
|
|
2257
2259
|
It.styles = te`
|
|
2258
|
-
${re(
|
|
2260
|
+
${re(rr)}
|
|
2259
2261
|
`;
|
|
2260
2262
|
mr([
|
|
2261
2263
|
w({ type: String })
|
|
@@ -2301,7 +2303,7 @@ var nl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, Vr = (r, e
|
|
|
2301
2303
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
2302
2304
|
return n && i && nl(e, t, i), i;
|
|
2303
2305
|
};
|
|
2304
|
-
let
|
|
2306
|
+
let Xt = class extends Q {
|
|
2305
2307
|
constructor() {
|
|
2306
2308
|
super(...arguments), this.expired = "", this.msgError = "", this.isTouched = !1, this.isError = !1, this.formSubmitted = !1;
|
|
2307
2309
|
}
|
|
@@ -2328,7 +2330,7 @@ let Jt = class extends Q {
|
|
|
2328
2330
|
}
|
|
2329
2331
|
render() {
|
|
2330
2332
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.expired, t = this.isError && !e, n = this.isError && this.expired.length !== 5;
|
|
2331
|
-
return this.expired.trim() !== "" && (this.isTouched = !0), this.requestUpdate(),
|
|
2333
|
+
return this.expired.trim() !== "" && (this.isTouched = !0), this.requestUpdate(), P`
|
|
2332
2334
|
<my-input
|
|
2333
2335
|
type="text"
|
|
2334
2336
|
id="${this.expired}"
|
|
@@ -2339,33 +2341,33 @@ let Jt = class extends Q {
|
|
|
2339
2341
|
@handleBlur="${this.handleBlurInput}"
|
|
2340
2342
|
customClass="${e || t || n ? "error" : ""}"
|
|
2341
2343
|
></my-input>
|
|
2342
|
-
${e ?
|
|
2343
|
-
${t && !n ?
|
|
2344
|
-
${n && !e && !this.formSubmitted ?
|
|
2344
|
+
${e ? P`<div class="error" id="error">Tenés que completar la fecha de vencimiento</div>` : ""}
|
|
2345
|
+
${t && !n ? P`<div class="error" id="error">Revisá la fecha, está vencida</div>` : ""}
|
|
2346
|
+
${n && !e && !this.formSubmitted ? P`<div class="error" id="error">Revisá la fecha, está incompleta</div>` : ""}
|
|
2345
2347
|
`;
|
|
2346
2348
|
}
|
|
2347
2349
|
};
|
|
2348
|
-
|
|
2349
|
-
${re(
|
|
2350
|
+
Xt.styles = te`
|
|
2351
|
+
${re(rr)}
|
|
2350
2352
|
`;
|
|
2351
2353
|
Vr([
|
|
2352
2354
|
w({ type: String })
|
|
2353
|
-
],
|
|
2355
|
+
], Xt.prototype, "expired", 2);
|
|
2354
2356
|
Vr([
|
|
2355
2357
|
w({ type: String })
|
|
2356
|
-
],
|
|
2358
|
+
], Xt.prototype, "msgError", 2);
|
|
2357
2359
|
Vr([
|
|
2358
2360
|
w({ type: Boolean })
|
|
2359
|
-
],
|
|
2361
|
+
], Xt.prototype, "isTouched", 2);
|
|
2360
2362
|
Vr([
|
|
2361
2363
|
w({ type: Boolean })
|
|
2362
|
-
],
|
|
2364
|
+
], Xt.prototype, "isError", 2);
|
|
2363
2365
|
Vr([
|
|
2364
2366
|
w({ type: Boolean })
|
|
2365
|
-
],
|
|
2366
|
-
|
|
2367
|
+
], Xt.prototype, "formSubmitted", 2);
|
|
2368
|
+
Xt = Vr([
|
|
2367
2369
|
ee("input-expired")
|
|
2368
|
-
],
|
|
2370
|
+
], Xt);
|
|
2369
2371
|
var sl = Object.defineProperty, ol = Object.getOwnPropertyDescriptor, yr = (r, e, t, n) => {
|
|
2370
2372
|
for (var i = n > 1 ? void 0 : n ? ol(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2371
2373
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
@@ -2405,7 +2407,7 @@ let Dt = class extends Q {
|
|
|
2405
2407
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.name;
|
|
2406
2408
|
this.name.trim() !== "" && (this.isTouched = !0), this.requestUpdate();
|
|
2407
2409
|
const t = !this.formSubmitted && !e || !this.formSubmitted && this.name.trim() === "";
|
|
2408
|
-
return
|
|
2410
|
+
return P`
|
|
2409
2411
|
<my-input
|
|
2410
2412
|
type="text"
|
|
2411
2413
|
id="${this.name}"
|
|
@@ -2415,8 +2417,8 @@ let Dt = class extends Q {
|
|
|
2415
2417
|
@blur="${this.handleBlurInput}"
|
|
2416
2418
|
customClass="${e ? "error" : ""}"
|
|
2417
2419
|
></my-input>
|
|
2418
|
-
${t && !e ?
|
|
2419
|
-
${e ?
|
|
2420
|
+
${t && !e ? P`<span class="placeholder"><p>${this.placeholder}</p></span>` : ""}
|
|
2421
|
+
${e ? P` <div class="errorBin" id="error">Tenés que completar el nombre</div>` : ""}
|
|
2420
2422
|
`;
|
|
2421
2423
|
}
|
|
2422
2424
|
};
|
|
@@ -2437,7 +2439,7 @@ Dt.styles = te`
|
|
|
2437
2439
|
justify-content: start;
|
|
2438
2440
|
height: 0px;
|
|
2439
2441
|
}
|
|
2440
|
-
${re(
|
|
2442
|
+
${re(rr)}
|
|
2441
2443
|
`;
|
|
2442
2444
|
yr([
|
|
2443
2445
|
w({ type: String })
|
|
@@ -2465,7 +2467,7 @@ var al = Object.defineProperty, ul = Object.getOwnPropertyDescriptor, qr = (r, e
|
|
|
2465
2467
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
2466
2468
|
return n && i && al(e, t, i), i;
|
|
2467
2469
|
};
|
|
2468
|
-
let
|
|
2470
|
+
let Qt = class extends Q {
|
|
2469
2471
|
constructor() {
|
|
2470
2472
|
super(...arguments), this.dateOfBirth = "", this.isTouched = !1, this.isError = !1, this.formSubmitted = !1, this.showError = !1;
|
|
2471
2473
|
}
|
|
@@ -2508,7 +2510,7 @@ let Zt = class extends Q {
|
|
|
2508
2510
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.dateOfBirth, t = this.isError && !e;
|
|
2509
2511
|
this.dateOfBirth.trim() !== "" && (this.isTouched = !0), this.requestUpdate();
|
|
2510
2512
|
const n = !this.formSubmitted && !e || !this.formSubmitted && this.dateOfBirth.trim() === "";
|
|
2511
|
-
return
|
|
2513
|
+
return P`
|
|
2512
2514
|
<my-input
|
|
2513
2515
|
type="text"
|
|
2514
2516
|
id="${this.dateOfBirth}"
|
|
@@ -2520,33 +2522,33 @@ let Zt = class extends Q {
|
|
|
2520
2522
|
@handleBlur="${this.handleBlurInput}"
|
|
2521
2523
|
customClass="${e || t ? "error" : ""}"
|
|
2522
2524
|
></my-input>
|
|
2523
|
-
${n && !e && !t ?
|
|
2524
|
-
${e ?
|
|
2525
|
-
${t && !this.formSubmitted ?
|
|
2525
|
+
${n && !e && !t ? P`<span><p>Del titular de la tarjeta</p></span>` : ""}
|
|
2526
|
+
${e ? P`<div class="error" id="error">Tenés que completar la fecha de nacimiento</div>` : ""}
|
|
2527
|
+
${t && !this.formSubmitted ? P`<div class="error" id="error">El formato debe ser similar a 02/06/1978</div>` : ""}
|
|
2526
2528
|
`;
|
|
2527
2529
|
}
|
|
2528
2530
|
};
|
|
2529
|
-
|
|
2530
|
-
${re(
|
|
2531
|
+
Qt.styles = te`
|
|
2532
|
+
${re(rr)},
|
|
2531
2533
|
`;
|
|
2532
2534
|
qr([
|
|
2533
2535
|
w({ type: String })
|
|
2534
|
-
],
|
|
2536
|
+
], Qt.prototype, "dateOfBirth", 2);
|
|
2535
2537
|
qr([
|
|
2536
2538
|
w({ type: Boolean })
|
|
2537
|
-
],
|
|
2539
|
+
], Qt.prototype, "isTouched", 2);
|
|
2538
2540
|
qr([
|
|
2539
2541
|
w({ type: Boolean })
|
|
2540
|
-
],
|
|
2542
|
+
], Qt.prototype, "isError", 2);
|
|
2541
2543
|
qr([
|
|
2542
2544
|
w({ type: Boolean })
|
|
2543
|
-
],
|
|
2545
|
+
], Qt.prototype, "formSubmitted", 2);
|
|
2544
2546
|
qr([
|
|
2545
2547
|
w({ type: Boolean })
|
|
2546
|
-
],
|
|
2547
|
-
|
|
2548
|
+
], Qt.prototype, "showError", 2);
|
|
2549
|
+
Qt = qr([
|
|
2548
2550
|
ee("input-date-of-birth")
|
|
2549
|
-
],
|
|
2551
|
+
], Qt);
|
|
2550
2552
|
var cl = Object.defineProperty, ll = Object.getOwnPropertyDescriptor, ai = (r, e, t, n) => {
|
|
2551
2553
|
for (var i = n > 1 ? void 0 : n ? ll(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2552
2554
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
@@ -2584,7 +2586,7 @@ let $r = class extends Q {
|
|
|
2584
2586
|
}
|
|
2585
2587
|
render() {
|
|
2586
2588
|
const e = (this.isTouched || !1) && !this.formSubmitted && !this.passport;
|
|
2587
|
-
return this.passport.trim() !== "" && (this.isTouched = !0),
|
|
2589
|
+
return this.passport.trim() !== "" && (this.isTouched = !0), P`
|
|
2588
2590
|
<my-input
|
|
2589
2591
|
type="text"
|
|
2590
2592
|
id="${this.passport}"
|
|
@@ -2595,12 +2597,12 @@ let $r = class extends Q {
|
|
|
2595
2597
|
@handleBlur="${this.handleBlurInput}"
|
|
2596
2598
|
customClass="${e ? "error" : ""}"
|
|
2597
2599
|
></my-input>
|
|
2598
|
-
${e ?
|
|
2600
|
+
${e ? P`<div class="error" id="error">Tenés que completar el número</div>` : ""}
|
|
2599
2601
|
`;
|
|
2600
2602
|
}
|
|
2601
2603
|
};
|
|
2602
2604
|
$r.styles = te`
|
|
2603
|
-
${re(
|
|
2605
|
+
${re(rr)}
|
|
2604
2606
|
`;
|
|
2605
2607
|
ai([
|
|
2606
2608
|
w({ type: String })
|
|
@@ -2621,12 +2623,12 @@ var fl = Object.defineProperty, dl = Object.getOwnPropertyDescriptor, Hr = (r, e
|
|
|
2621
2623
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
2622
2624
|
return n && i && fl(e, t, i), i;
|
|
2623
2625
|
};
|
|
2624
|
-
let
|
|
2626
|
+
let er = class extends Q {
|
|
2625
2627
|
constructor() {
|
|
2626
2628
|
super(...arguments), this.image = "https://ranty-sdk-js.naranjax.com/images/shopping-bag.svg", this.description_purchase = "", this.unit_value = "", this.total_amount = "", this.quantity = "";
|
|
2627
2629
|
}
|
|
2628
2630
|
render() {
|
|
2629
|
-
return
|
|
2631
|
+
return P`
|
|
2630
2632
|
<!--TODO PASAR VARIABLES REACTIVAS PARA QUE LAS CARDS TOMEN LOS VALORES DE LAS RESPUESTAS-->
|
|
2631
2633
|
<div class="card card__payment">
|
|
2632
2634
|
<div class="card__image">
|
|
@@ -2646,27 +2648,27 @@ let Xt = class extends Q {
|
|
|
2646
2648
|
`;
|
|
2647
2649
|
}
|
|
2648
2650
|
};
|
|
2649
|
-
|
|
2651
|
+
er.styles = te`
|
|
2650
2652
|
${re(hl)}
|
|
2651
2653
|
`;
|
|
2652
2654
|
Hr([
|
|
2653
2655
|
w({ type: String })
|
|
2654
|
-
],
|
|
2656
|
+
], er.prototype, "image", 2);
|
|
2655
2657
|
Hr([
|
|
2656
2658
|
w({ type: String })
|
|
2657
|
-
],
|
|
2659
|
+
], er.prototype, "description_purchase", 2);
|
|
2658
2660
|
Hr([
|
|
2659
2661
|
w({ type: String })
|
|
2660
|
-
],
|
|
2662
|
+
], er.prototype, "unit_value", 2);
|
|
2661
2663
|
Hr([
|
|
2662
2664
|
w({ type: String })
|
|
2663
|
-
],
|
|
2665
|
+
], er.prototype, "total_amount", 2);
|
|
2664
2666
|
Hr([
|
|
2665
2667
|
w({ type: String })
|
|
2666
|
-
],
|
|
2667
|
-
|
|
2668
|
+
], er.prototype, "quantity", 2);
|
|
2669
|
+
er = Hr([
|
|
2668
2670
|
ee("card-payment")
|
|
2669
|
-
],
|
|
2671
|
+
], er);
|
|
2670
2672
|
const pl = `body{background:#ffffff}.clickeable{cursor:pointer}.card{align-items:center;background:#ffffff;border:1px solid #e5e7eb;border-radius:1rem;display:flex;height:6.25rem;justify-content:space-between;padding:.75rem 1rem}.card__content{width:100%}.card__content p,.card__content h3{margin:0}.font_semiBold{font-family:Inter,Arial,"sans-serif";font-size:16px;font-weight:600;line-height:2}.font_regular{font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;color:#6a6a6a}.card__icon-qr{margin-right:1.25rem}.card__icon-qr .image{width:34px;height:34px}
|
|
2671
2673
|
`;
|
|
2672
2674
|
var gl = Object.defineProperty, ml = Object.getOwnPropertyDescriptor, wn = (r, e, t, n) => {
|
|
@@ -2679,7 +2681,7 @@ let pr = class extends Q {
|
|
|
2679
2681
|
super(...arguments), this.title = "Código QR", this.subtitle = "Escaneá con cualquier app. Por MODO o una app bancaria podés aprovechar los beneficios de tu banco.", this.image = "https://ranty-sdk-js.naranjax.com/images/qr.svg", this.icon = "https://ranty-sdk-js.naranjax.com/images/chevron-right.svg";
|
|
2680
2682
|
}
|
|
2681
2683
|
render() {
|
|
2682
|
-
return
|
|
2684
|
+
return P`
|
|
2683
2685
|
<div class="card">
|
|
2684
2686
|
<div class="card__icon-qr">
|
|
2685
2687
|
<img class="image" alt="qr" src=${this.image ? this.image : "/avatar.png"} />
|
|
@@ -2716,11 +2718,11 @@ pr = wn([
|
|
|
2716
2718
|
ee("card-home")
|
|
2717
2719
|
], pr);
|
|
2718
2720
|
const yl = `@charset "UTF-8";body{background:#ffffff}.clickeable{cursor:pointer}.card-plan__card-style{background:#ffffff;border:1px solid #e5e7eb;border-radius:22px;padding:38px 40px 1px}.card-plan__content{display:flex;flex-direction:column;gap:14px}.card-plan__content-subtitle{border:3px solid #e5e7eb;border-radius:8px;padding:17px 63px 11px 17px;position:relative;height:47px}.card-plan__items-circle{align-items:center;display:flex}.card-plan__image-circle{margin-top:3%}.card-plan__circle-dot{margin-left:10px}.card-plan__buttons{display:flex;justify-content:space-between;margin:26px 0 15px}.font_semiBold{font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:600;margin-bottom:0;margin-top:0}.font_regular{font-family:Inter,Arial,"sans-serif";font-size:12px;font-weight:400;color:#6a6a6a;margin-left:32px}.font_regular p{margin-top:0;margin-bottom:0}.text{font-family:Inter,Arial,"sans-serif";font-size:14px}.card-plan__no-interest{background-color:#e4d7ff;border:1px solid #e4d7ff;font-family:Inter,Arial,"sans-serif";border-radius:4px;color:#2f0092;display:inline-block;font-size:14px;font-weight:600;padding:2px 8px;position:absolute;bottom:31%;right:6%}.card-form__title{color:var(--card-form-title-color)}.card-form__subtitle{color:var(--card-form-subtitle-color)}@media only screen and (max-width: 360px){.card-plan__card-style{background:#ffffff;border:1px solid #e5e7eb;border-radius:16px;width:89%;height:100%;margin-bottom:0;padding:20px}.card-plan__content-subtitle{border:1px solid #e5e7eb;border-radius:8px;padding-top:10px;padding-bottom:44px}.card-plan__buttons{display:flex;align-items:center;margin:14px 0 0}.card-plan__no-interest{background-color:#e4d7ff;border:1px solid #e4d7ff;font-family:Inter,Arial,"sans-serif";border-radius:4px;color:#2f0092;display:inline-block;font-size:14px;font-weight:500;padding:2px 8px;position:relative;top:-1px;left:139px}.card-plan__content{display:flex;flex-direction:column;gap:5px}my-button{padding-bottom:10px}}@media only screen and (min-width: 370px) and (max-width: 560px){.card-plan__card-style{background:#ffffff;border:1px solid #e5e7eb;border-radius:16px;width:90%;margin-bottom:0;padding:20px}.card-plan__content-subtitle{border:1px solid #e5e7eb;border-radius:8px;padding:20px 10px}.card-plan__buttons{display:flex;align-items:center}.card-plan__no-interest{background-color:#e4d7ff;border:1px solid rgb(228,215,255);font-family:Inter,Arial,"sans-serif";border-radius:4px;color:#2f0092;display:inline-block;font-size:14px;top:21px;font-weight:500;position:relative;left:147px}my-button{padding-bottom:10px}}
|
|
2719
|
-
`, vl = (r, e) =>
|
|
2721
|
+
`, vl = (r, e) => L(void 0, null, function* () {
|
|
2720
2722
|
try {
|
|
2721
|
-
const { data: t } = yield
|
|
2723
|
+
const { data: t } = yield kt.get(`/sdk/customers/${r}/is-client`, {
|
|
2722
2724
|
headers: {
|
|
2723
|
-
Authorization:
|
|
2725
|
+
Authorization: xe.token
|
|
2724
2726
|
},
|
|
2725
2727
|
params: {
|
|
2726
2728
|
birthDate: e
|
|
@@ -2737,12 +2739,12 @@ const yl = `@charset "UTF-8";body{background:#ffffff}.clickeable{cursor:pointer}
|
|
|
2737
2739
|
throw new nt("Post Customer", "666");
|
|
2738
2740
|
}), rn = class {
|
|
2739
2741
|
};
|
|
2740
|
-
rn.createPaymentRequest = (r) =>
|
|
2742
|
+
rn.createPaymentRequest = (r) => L(void 0, null, function* () {
|
|
2741
2743
|
try {
|
|
2742
|
-
rn.paymentRequest =
|
|
2743
|
-
const { data: e } = yield
|
|
2744
|
+
rn.paymentRequest = Mt({}, r);
|
|
2745
|
+
const { data: e } = yield kt.post("/sdk/payment_request", r, {
|
|
2744
2746
|
headers: {
|
|
2745
|
-
Authorization:
|
|
2747
|
+
Authorization: xe.token
|
|
2746
2748
|
}
|
|
2747
2749
|
});
|
|
2748
2750
|
return rn.paymentRequestResponse = e.response.data, e;
|
|
@@ -2754,7 +2756,7 @@ rn.createPaymentRequest = (r) => V(void 0, null, function* () {
|
|
|
2754
2756
|
throw new nt("Post Create Payment Request", "666");
|
|
2755
2757
|
}
|
|
2756
2758
|
});
|
|
2757
|
-
rn.retryPaymentRequest = (r) =>
|
|
2759
|
+
rn.retryPaymentRequest = (r) => L(void 0, null, function* () {
|
|
2758
2760
|
try {
|
|
2759
2761
|
const { data: e } = yield Is.post(
|
|
2760
2762
|
`/payment_request/${r}/retry`,
|
|
@@ -2763,7 +2765,7 @@ rn.retryPaymentRequest = (r) => V(void 0, null, function* () {
|
|
|
2763
2765
|
baseURL: "https://e3-api.ranty.io",
|
|
2764
2766
|
headers: {
|
|
2765
2767
|
"content-type": "application/json",
|
|
2766
|
-
Authorization:
|
|
2768
|
+
Authorization: xe.token
|
|
2767
2769
|
}
|
|
2768
2770
|
}
|
|
2769
2771
|
);
|
|
@@ -2777,12 +2779,12 @@ rn.retryPaymentRequest = (r) => V(void 0, null, function* () {
|
|
|
2777
2779
|
}
|
|
2778
2780
|
});
|
|
2779
2781
|
let cn = rn;
|
|
2780
|
-
const bl = (r) =>
|
|
2781
|
-
return (yield
|
|
2782
|
+
const bl = (r) => L(void 0, null, function* () {
|
|
2783
|
+
return (yield kt.get(`/sdk/payment_request/${r}`, {
|
|
2782
2784
|
baseURL: "https://e3-api.ranty.io",
|
|
2783
2785
|
headers: {
|
|
2784
2786
|
"content-type": "application/json",
|
|
2785
|
-
Authorization:
|
|
2787
|
+
Authorization: xe.token
|
|
2786
2788
|
}
|
|
2787
2789
|
})).data;
|
|
2788
2790
|
});
|
|
@@ -3256,7 +3258,7 @@ var Ai = (
|
|
|
3256
3258
|
return this.tagClass === 0 && this.tagNumber === 0;
|
|
3257
3259
|
}, r;
|
|
3258
3260
|
}()
|
|
3259
|
-
),
|
|
3261
|
+
), Yt, Il = 244837814094590, fo = (Il & 16777215) == 15715070, Ne = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], Dl = (1 << 26) / Ne[Ne.length - 1], q = (
|
|
3260
3262
|
/** @class */
|
|
3261
3263
|
function() {
|
|
3262
3264
|
function r(e, t, n) {
|
|
@@ -3402,7 +3404,7 @@ var Ai = (
|
|
|
3402
3404
|
var t = K(), n = K();
|
|
3403
3405
|
return this.divRemTo(e, t, n), [t, n];
|
|
3404
3406
|
}, r.prototype.modPow = function(e, t) {
|
|
3405
|
-
var n = e.bitLength(), i, s =
|
|
3407
|
+
var n = e.bitLength(), i, s = qt(1), o;
|
|
3406
3408
|
if (n <= 0)
|
|
3407
3409
|
return s;
|
|
3408
3410
|
n < 18 ? i = 1 : n < 48 ? i = 3 : n < 144 ? i = 4 : n < 768 ? i = 5 : i = 6, n < 8 ? o = new po(t) : t.isEven() ? o = new Rl(t) : o = new go(t);
|
|
@@ -3431,7 +3433,7 @@ var Ai = (
|
|
|
3431
3433
|
var t = e.isEven();
|
|
3432
3434
|
if (this.isEven() && t || e.signum() == 0)
|
|
3433
3435
|
return r.ZERO;
|
|
3434
|
-
for (var n = e.clone(), i = this.clone(), s =
|
|
3436
|
+
for (var n = e.clone(), i = this.clone(), s = qt(1), o = qt(0), a = qt(0), c = qt(1); n.signum() != 0; ) {
|
|
3435
3437
|
for (; n.isEven(); )
|
|
3436
3438
|
n.rShiftTo(1, n), t ? ((!s.isEven() || !o.isEven()) && (s.addTo(this, s), o.subTo(e, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(e, o), o.rShiftTo(1, o);
|
|
3437
3439
|
for (; i.isEven(); )
|
|
@@ -3463,19 +3465,19 @@ var Ai = (
|
|
|
3463
3465
|
return o > 0 && n.lShiftTo(o, n), n;
|
|
3464
3466
|
}, r.prototype.isProbablePrime = function(e) {
|
|
3465
3467
|
var t, n = this.abs();
|
|
3466
|
-
if (n.t == 1 && n[0] <=
|
|
3467
|
-
for (t = 0; t <
|
|
3468
|
-
if (n[0] ==
|
|
3468
|
+
if (n.t == 1 && n[0] <= Ne[Ne.length - 1]) {
|
|
3469
|
+
for (t = 0; t < Ne.length; ++t)
|
|
3470
|
+
if (n[0] == Ne[t])
|
|
3469
3471
|
return !0;
|
|
3470
3472
|
return !1;
|
|
3471
3473
|
}
|
|
3472
3474
|
if (n.isEven())
|
|
3473
3475
|
return !1;
|
|
3474
|
-
for (t = 1; t <
|
|
3475
|
-
for (var i =
|
|
3476
|
-
i *=
|
|
3476
|
+
for (t = 1; t < Ne.length; ) {
|
|
3477
|
+
for (var i = Ne[t], s = t + 1; s < Ne.length && i < Dl; )
|
|
3478
|
+
i *= Ne[s++];
|
|
3477
3479
|
for (i = n.modInt(i); t < s; )
|
|
3478
|
-
if (i %
|
|
3480
|
+
if (i % Ne[t++] == 0)
|
|
3479
3481
|
return !1;
|
|
3480
3482
|
}
|
|
3481
3483
|
return n.millerRabin(e);
|
|
@@ -3590,9 +3592,9 @@ var Ai = (
|
|
|
3590
3592
|
for (o.dlShiftTo(E, x), n.compareTo(x) >= 0 && (n[n.t++] = 1, n.subTo(x, n)), r.ONE.dlShiftTo(l, x), x.subTo(o, o); o.t < l; )
|
|
3591
3593
|
o[o.t++] = 0;
|
|
3592
3594
|
for (; --E >= 0; ) {
|
|
3593
|
-
var
|
|
3594
|
-
if ((n[S] += o.am(0,
|
|
3595
|
-
for (o.dlShiftTo(E, x), n.subTo(x, n); n[S] < --
|
|
3595
|
+
var R = n[--S] == d ? this.DM : Math.floor(n[S] * m + (n[S - 1] + b) * g);
|
|
3596
|
+
if ((n[S] += o.am(0, R, n, E, 0, l)) < R)
|
|
3597
|
+
for (o.dlShiftTo(E, x), n.subTo(x, n); n[S] < --R; )
|
|
3596
3598
|
n.subTo(x, n);
|
|
3597
3599
|
}
|
|
3598
3600
|
t != null && (n.drShiftTo(l, t), a != c && r.ZERO.subTo(t, t)), n.t = l, n.clamp(), u > 0 && n.rShiftTo(u, n), a < 0 && r.ZERO.subTo(n, n);
|
|
@@ -3625,7 +3627,7 @@ var Ai = (
|
|
|
3625
3627
|
}, r.prototype.toRadix = function(e) {
|
|
3626
3628
|
if (e == null && (e = 10), this.signum() == 0 || e < 2 || e > 36)
|
|
3627
3629
|
return "0";
|
|
3628
|
-
var t = this.chunkSize(e), n = Math.pow(e, t), i =
|
|
3630
|
+
var t = this.chunkSize(e), n = Math.pow(e, t), i = qt(n), s = K(), o = K(), a = "";
|
|
3629
3631
|
for (this.divRemTo(i, s, o); s.signum() > 0; )
|
|
3630
3632
|
a = (n + o.intValue()).toString(e).substr(1) + a, s.divRemTo(i, s, o);
|
|
3631
3633
|
return o.intValue().toString(e) + a;
|
|
@@ -3723,9 +3725,9 @@ var Ai = (
|
|
|
3723
3725
|
if (n <= 0)
|
|
3724
3726
|
return !1;
|
|
3725
3727
|
var i = t.shiftRight(n);
|
|
3726
|
-
e = e + 1 >> 1, e >
|
|
3728
|
+
e = e + 1 >> 1, e > Ne.length && (e = Ne.length);
|
|
3727
3729
|
for (var s = K(), o = 0; o < e; ++o) {
|
|
3728
|
-
s.fromInt(
|
|
3730
|
+
s.fromInt(Ne[Math.floor(Math.random() * Ne.length)]);
|
|
3729
3731
|
var a = s.modPow(i, this);
|
|
3730
3732
|
if (a.compareTo(r.ONE) != 0 && a.compareTo(t) != 0) {
|
|
3731
3733
|
for (var c = 1; c++ < n && a.compareTo(t) != 0; )
|
|
@@ -3876,26 +3878,26 @@ mo && fo && navigator.appName == "Microsoft Internet Explorer" ? (q.prototype.am
|
|
|
3876
3878
|
u = a * u + ((d & 32767) << 15) + n[i] + (s & 1073741823), s = (u >>> 30) + (d >>> 15) + c * l + (s >>> 30), n[i++] = u & 1073741823;
|
|
3877
3879
|
}
|
|
3878
3880
|
return s;
|
|
3879
|
-
},
|
|
3881
|
+
}, Yt = 30) : mo && fo && navigator.appName != "Netscape" ? (q.prototype.am = function(e, t, n, i, s, o) {
|
|
3880
3882
|
for (; --o >= 0; ) {
|
|
3881
3883
|
var a = t * this[e++] + n[i] + s;
|
|
3882
3884
|
s = Math.floor(a / 67108864), n[i++] = a & 67108863;
|
|
3883
3885
|
}
|
|
3884
3886
|
return s;
|
|
3885
|
-
},
|
|
3887
|
+
}, Yt = 26) : (q.prototype.am = function(e, t, n, i, s, o) {
|
|
3886
3888
|
for (var a = t & 16383, c = t >> 14; --o >= 0; ) {
|
|
3887
3889
|
var u = this[e] & 16383, l = this[e++] >> 14, d = c * u + l * a;
|
|
3888
3890
|
u = a * u + ((d & 16383) << 14) + n[i] + s, s = (u >> 28) + (d >> 14) + c * l, n[i++] = u & 268435455;
|
|
3889
3891
|
}
|
|
3890
3892
|
return s;
|
|
3891
|
-
},
|
|
3892
|
-
q.prototype.DB =
|
|
3893
|
-
q.prototype.DM = (1 <<
|
|
3894
|
-
q.prototype.DV = 1 <<
|
|
3893
|
+
}, Yt = 28);
|
|
3894
|
+
q.prototype.DB = Yt;
|
|
3895
|
+
q.prototype.DM = (1 << Yt) - 1;
|
|
3896
|
+
q.prototype.DV = 1 << Yt;
|
|
3895
3897
|
var Rs = 52;
|
|
3896
3898
|
q.prototype.FV = Math.pow(2, Rs);
|
|
3897
|
-
q.prototype.F1 = Rs -
|
|
3898
|
-
q.prototype.F2 = 2 *
|
|
3899
|
+
q.prototype.F1 = Rs - Yt;
|
|
3900
|
+
q.prototype.F2 = 2 * Yt - Rs;
|
|
3899
3901
|
var ui = [], Kr, tt;
|
|
3900
3902
|
Kr = "0".charCodeAt(0);
|
|
3901
3903
|
for (tt = 0; tt <= 9; ++tt)
|
|
@@ -3910,7 +3912,7 @@ function yo(r, e) {
|
|
|
3910
3912
|
var t = ui[r.charCodeAt(e)];
|
|
3911
3913
|
return t == null ? -1 : t;
|
|
3912
3914
|
}
|
|
3913
|
-
function
|
|
3915
|
+
function qt(r) {
|
|
3914
3916
|
var e = K();
|
|
3915
3917
|
return e.fromInt(r), e;
|
|
3916
3918
|
}
|
|
@@ -3918,8 +3920,8 @@ function En(r) {
|
|
|
3918
3920
|
var e = 1, t;
|
|
3919
3921
|
return (t = r >>> 16) != 0 && (r = t, e += 16), (t = r >> 8) != 0 && (r = t, e += 8), (t = r >> 4) != 0 && (r = t, e += 4), (t = r >> 2) != 0 && (r = t, e += 2), (t = r >> 1) != 0 && (r = t, e += 1), e;
|
|
3920
3922
|
}
|
|
3921
|
-
q.ZERO =
|
|
3922
|
-
q.ONE =
|
|
3923
|
+
q.ZERO = qt(0);
|
|
3924
|
+
q.ONE = qt(1);
|
|
3923
3925
|
var Ol = (
|
|
3924
3926
|
/** @class */
|
|
3925
3927
|
function() {
|
|
@@ -3942,14 +3944,14 @@ var Ol = (
|
|
|
3942
3944
|
function Ul() {
|
|
3943
3945
|
return new Ol();
|
|
3944
3946
|
}
|
|
3945
|
-
var Ta = 256, Cn,
|
|
3946
|
-
if (
|
|
3947
|
-
|
|
3947
|
+
var Ta = 256, Cn, Wt = null, lt;
|
|
3948
|
+
if (Wt == null) {
|
|
3949
|
+
Wt = [], lt = 0;
|
|
3948
3950
|
var Tn = void 0;
|
|
3949
3951
|
if (typeof window != "undefined" && window.crypto && window.crypto.getRandomValues) {
|
|
3950
3952
|
var Ii = new Uint32Array(256);
|
|
3951
3953
|
for (window.crypto.getRandomValues(Ii), Tn = 0; Tn < Ii.length; ++Tn)
|
|
3952
|
-
|
|
3954
|
+
Wt[lt++] = Ii[Tn] & 255;
|
|
3953
3955
|
}
|
|
3954
3956
|
var An = 0, In = function(r) {
|
|
3955
3957
|
if (An = An || 0, An >= 256 || lt >= Ta) {
|
|
@@ -3958,7 +3960,7 @@ if (zt == null) {
|
|
|
3958
3960
|
}
|
|
3959
3961
|
try {
|
|
3960
3962
|
var e = r.x + r.y;
|
|
3961
|
-
|
|
3963
|
+
Wt[lt++] = e & 255, An += 1;
|
|
3962
3964
|
} catch (t) {
|
|
3963
3965
|
}
|
|
3964
3966
|
};
|
|
@@ -3968,10 +3970,10 @@ function kl() {
|
|
|
3968
3970
|
if (Cn == null) {
|
|
3969
3971
|
for (Cn = Ul(); lt < Ta; ) {
|
|
3970
3972
|
var r = Math.floor(65536 * Math.random());
|
|
3971
|
-
|
|
3973
|
+
Wt[lt++] = r & 255;
|
|
3972
3974
|
}
|
|
3973
|
-
for (Cn.init(
|
|
3974
|
-
|
|
3975
|
+
for (Cn.init(Wt), lt = 0; lt < Wt.length; ++lt)
|
|
3976
|
+
Wt[lt] = 0;
|
|
3975
3977
|
lt = 0;
|
|
3976
3978
|
}
|
|
3977
3979
|
return Cn.next();
|
|
@@ -4220,7 +4222,7 @@ T.asn1.ASN1Util = new function() {
|
|
|
4220
4222
|
}, this.getPEMStringFromHex = function(r, e) {
|
|
4221
4223
|
return hextopem(r, e);
|
|
4222
4224
|
}, this.newObject = function(r) {
|
|
4223
|
-
var e = T, t = e.asn1, n = t.DERBoolean, i = t.DERInteger, s = t.DERBitString, o = t.DEROctetString, a = t.DERNull, c = t.DERObjectIdentifier, u = t.DEREnumerated, l = t.DERUTF8String, d = t.DERNumericString, p = t.DERPrintableString, m = t.DERTeletexString, g = t.DERIA5String, b = t.DERUTCTime, S = t.DERGeneralizedTime, E = t.DERSequence, x = t.DERSet,
|
|
4225
|
+
var e = T, t = e.asn1, n = t.DERBoolean, i = t.DERInteger, s = t.DERBitString, o = t.DEROctetString, a = t.DERNull, c = t.DERObjectIdentifier, u = t.DEREnumerated, l = t.DERUTF8String, d = t.DERNumericString, p = t.DERPrintableString, m = t.DERTeletexString, g = t.DERIA5String, b = t.DERUTCTime, S = t.DERGeneralizedTime, E = t.DERSequence, x = t.DERSet, R = t.DERTaggedObject, U = t.ASN1Util.newObject, F = Object.keys(r);
|
|
4224
4226
|
if (F.length != 1)
|
|
4225
4227
|
throw "key of param shall be only one.";
|
|
4226
4228
|
var O = F[0];
|
|
@@ -4255,33 +4257,33 @@ T.asn1.ASN1Util = new function() {
|
|
|
4255
4257
|
if (O == "gentime")
|
|
4256
4258
|
return new S(r[O]);
|
|
4257
4259
|
if (O == "seq") {
|
|
4258
|
-
for (var
|
|
4259
|
-
var me = U(
|
|
4260
|
-
|
|
4260
|
+
for (var j = r[O], V = [], z = 0; z < j.length; z++) {
|
|
4261
|
+
var me = U(j[z]);
|
|
4262
|
+
V.push(me);
|
|
4261
4263
|
}
|
|
4262
|
-
return new E({ array:
|
|
4264
|
+
return new E({ array: V });
|
|
4263
4265
|
}
|
|
4264
4266
|
if (O == "set") {
|
|
4265
|
-
for (var
|
|
4266
|
-
var me = U(
|
|
4267
|
-
|
|
4267
|
+
for (var j = r[O], V = [], z = 0; z < j.length; z++) {
|
|
4268
|
+
var me = U(j[z]);
|
|
4269
|
+
V.push(me);
|
|
4268
4270
|
}
|
|
4269
|
-
return new x({ array:
|
|
4271
|
+
return new x({ array: V });
|
|
4270
4272
|
}
|
|
4271
4273
|
if (O == "tag") {
|
|
4272
|
-
var
|
|
4273
|
-
if (Object.prototype.toString.call(
|
|
4274
|
-
var He = U(
|
|
4275
|
-
return new
|
|
4276
|
-
tag:
|
|
4277
|
-
explicit:
|
|
4274
|
+
var ce = r[O];
|
|
4275
|
+
if (Object.prototype.toString.call(ce) === "[object Array]" && ce.length == 3) {
|
|
4276
|
+
var He = U(ce[2]);
|
|
4277
|
+
return new R({
|
|
4278
|
+
tag: ce[0],
|
|
4279
|
+
explicit: ce[1],
|
|
4278
4280
|
obj: He
|
|
4279
4281
|
});
|
|
4280
4282
|
} else {
|
|
4281
4283
|
var we = {};
|
|
4282
|
-
if (
|
|
4284
|
+
if (ce.explicit !== void 0 && (we.explicit = ce.explicit), ce.tag !== void 0 && (we.tag = ce.tag), ce.obj === void 0)
|
|
4283
4285
|
throw "obj shall be specified for 'tag'.";
|
|
4284
|
-
return we.obj = U(
|
|
4286
|
+
return we.obj = U(ce.obj), new R(we);
|
|
4285
4287
|
}
|
|
4286
4288
|
}
|
|
4287
4289
|
}, this.jsonToASN1HEX = function(r) {
|
|
@@ -4748,14 +4750,14 @@ var jl = globalThis && globalThis.__extends || function() {
|
|
|
4748
4750
|
}, r.version = Vl, r;
|
|
4749
4751
|
}()
|
|
4750
4752
|
);
|
|
4751
|
-
const Hl = (r, e, t, n) =>
|
|
4753
|
+
const Hl = (r, e, t, n) => L(void 0, null, function* () {
|
|
4752
4754
|
try {
|
|
4753
|
-
const { data: i } = yield
|
|
4755
|
+
const { data: i } = yield kt.post(
|
|
4754
4756
|
"/sdk/payments/direct",
|
|
4755
4757
|
zl(r, e, t, n),
|
|
4756
4758
|
{
|
|
4757
4759
|
headers: {
|
|
4758
|
-
Authorization:
|
|
4760
|
+
Authorization: xe.token
|
|
4759
4761
|
}
|
|
4760
4762
|
}
|
|
4761
4763
|
);
|
|
@@ -4771,21 +4773,21 @@ const Hl = (r, e, t, n) => V(void 0, null, function* () {
|
|
|
4771
4773
|
return [
|
|
4772
4774
|
{
|
|
4773
4775
|
products: [
|
|
4774
|
-
ir(
|
|
4776
|
+
ir(Mt({}, e[0]), {
|
|
4775
4777
|
unit_price: {
|
|
4776
4778
|
currency: e[0].unit_price.currency,
|
|
4777
4779
|
value: Yi(e[0].unit_price.value, !1).toString()
|
|
4778
4780
|
}
|
|
4779
4781
|
})
|
|
4780
4782
|
],
|
|
4781
|
-
amount: ir(
|
|
4783
|
+
amount: ir(Mt({}, t), {
|
|
4782
4784
|
value: Yi(t.value, !1).toString()
|
|
4783
4785
|
}),
|
|
4784
4786
|
soft_descriptor: "sdk"
|
|
4785
4787
|
}
|
|
4786
4788
|
];
|
|
4787
4789
|
}, zl = (r, e, t, n) => {
|
|
4788
|
-
const { platform: i, store_id: s, order_id: o, payment_request: a } = cn.paymentRequest, { payment_request_id: c, transaction_id: u } = cn.paymentRequestResponse, { creditNumber: l, codSeg: d, expired: p, dni: m, passport: g, dateOfBirth: b, email: S, name: E } = e, x = Yi(`${l.replaceAll(" ", "")}:${d}:${p}`, !0),
|
|
4790
|
+
const { platform: i, store_id: s, order_id: o, payment_request: a } = cn.paymentRequest, { payment_request_id: c, transaction_id: u } = cn.paymentRequestResponse, { creditNumber: l, codSeg: d, expired: p, dni: m, passport: g, dateOfBirth: b, email: S, name: E } = e, x = Yi(`${l.replaceAll(" ", "")}:${d}:${p}`, !0), R = m ? "DNI" : "PASAPORTE", U = m || g;
|
|
4789
4791
|
return {
|
|
4790
4792
|
platform: "sdk",
|
|
4791
4793
|
payment_type: "ecommerce",
|
|
@@ -4807,7 +4809,7 @@ const Hl = (r, e, t, n) => V(void 0, null, function* () {
|
|
|
4807
4809
|
holder: {
|
|
4808
4810
|
name: E,
|
|
4809
4811
|
email: S,
|
|
4810
|
-
doc_type:
|
|
4812
|
+
doc_type: R,
|
|
4811
4813
|
doc_number: U
|
|
4812
4814
|
},
|
|
4813
4815
|
card_payment: "card_payment"
|
|
@@ -4824,14 +4826,14 @@ const Hl = (r, e, t, n) => V(void 0, null, function* () {
|
|
|
4824
4826
|
}, Yi = (r, e) => {
|
|
4825
4827
|
let t = "";
|
|
4826
4828
|
e ? t = `-----BEGIN PUBLIC KEY-----
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
-----END PUBLIC KEY-----` : t = `-----BEGIN PUBLIC KEY-----
|
|
4829
|
+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqK0PGswYkVZPDQR6EfYp
|
|
4830
|
+
bC6xUuBLV+rCkiQWS6Q+pTVTlN6YgfaNKpjXZE7llXE8GmYeCRa8pX+w0pBoU6ly
|
|
4831
|
+
SlKKjCkYQ6DNt+HF+hMC2araAaSUYBkT3eYfIAfUhreaPNI1yJ9bUwW+mEL3GTuP
|
|
4832
|
+
qOgbCyVB4cKJ9iQI1JA6Vx7RnJMzA7cP4uikbt2R0zymVZIaY7q3MaHJ5K2YpWjj
|
|
4833
|
+
txoRxAMhR08TCUvQEywZCpEVZNfUJbyAbFljCgNAbQwXQbUJxH1QVcUKqnmD153I
|
|
4834
|
+
xZwjO15Av5Xz0BmkVLHzrWKqEEInkKk0ntam8HQHtBtuYtOCtUhJMW1zI0+hIE+r
|
|
4835
|
+
iwIDAQAB
|
|
4836
|
+
-----END PUBLIC KEY-----` : t = `-----BEGIN PUBLIC KEY-----
|
|
4835
4837
|
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRy6sijOKT2M8XV52tZkO5y3n/
|
|
4836
4838
|
vWN4TyVrKQqg+TQrr8rH8LfDdtiyAs1gmW33GmNNxgP0mZgs8QjVfEsMMXa2SptP
|
|
4837
4839
|
ldU78wQB2LsQ058s4+LOvr46qeuGwhlqMFW1o+Mc1htKWmORKjNrYBSbQc8goWhe
|
|
@@ -4846,11 +4848,11 @@ function Gl(r, e) {
|
|
|
4846
4848
|
}
|
|
4847
4849
|
const Ji = class {
|
|
4848
4850
|
};
|
|
4849
|
-
Ji.getInstallmentPlans = (r, e, t) =>
|
|
4851
|
+
Ji.getInstallmentPlans = (r, e, t) => L(void 0, null, function* () {
|
|
4850
4852
|
try {
|
|
4851
|
-
const { data: n } = yield
|
|
4853
|
+
const { data: n } = yield kt.get("/sdk/installment/stores/" + r, {
|
|
4852
4854
|
headers: {
|
|
4853
|
-
Authorization:
|
|
4855
|
+
Authorization: xe.token
|
|
4854
4856
|
},
|
|
4855
4857
|
params: {
|
|
4856
4858
|
paymentRequestId: e,
|
|
@@ -4867,7 +4869,7 @@ Ji.getInstallmentPlans = (r, e, t) => V(void 0, null, function* () {
|
|
|
4867
4869
|
}
|
|
4868
4870
|
});
|
|
4869
4871
|
let Os = Ji;
|
|
4870
|
-
const Wl = (r) =>
|
|
4872
|
+
const Wl = (r) => L(void 0, null, function* () {
|
|
4871
4873
|
const { order_id: e, platform: t } = r.additional_info;
|
|
4872
4874
|
return (yield Os.getInstallmentPlans(e, r.id, t)).response.data;
|
|
4873
4875
|
}), Yl = (r, e, t) => r == null ? void 0 : r.plans.cards.reduce((i, s) => s.type === t && s.name === e ? s.installment_plans : i, null);
|
|
@@ -5598,7 +5600,7 @@ function Oh(r, e, t, n) {
|
|
|
5598
5600
|
}, n && n.then(function() {
|
|
5599
5601
|
u = !0, clearTimeout(l), d();
|
|
5600
5602
|
}), m = function() {
|
|
5601
|
-
var S, E, x,
|
|
5603
|
+
var S, E, x, R;
|
|
5602
5604
|
return Ui(this, function(U) {
|
|
5603
5605
|
switch (U.label) {
|
|
5604
5606
|
case 0:
|
|
@@ -5608,10 +5610,10 @@ function Oh(r, e, t, n) {
|
|
|
5608
5610
|
case 2:
|
|
5609
5611
|
return [2, (S.value = E.apply(void 0, [U.sent()]), S)];
|
|
5610
5612
|
case 3:
|
|
5611
|
-
return x = U.sent(), p = x, Dn.debug("error on ".concat(r.name), x), Rh(x) ? (Dn.debug("".concat(r.name, " non retryable error"), x), [2, { value: a(x) }]) : (
|
|
5613
|
+
return x = U.sent(), p = x, Dn.debug("error on ".concat(r.name), x), Rh(x) ? (Dn.debug("".concat(r.name, " non retryable error"), x), [2, { value: a(x) }]) : (R = t(c, e, x), Dn.debug("".concat(r.name, " retrying in ").concat(R, " ms")), R === !1 || u ? [2, { value: a(x) }] : [3, 4]);
|
|
5612
5614
|
case 4:
|
|
5613
5615
|
return [4, new Promise(function(F) {
|
|
5614
|
-
d = F, l = setTimeout(d,
|
|
5616
|
+
d = F, l = setTimeout(d, R);
|
|
5615
5617
|
})];
|
|
5616
5618
|
case 5:
|
|
5617
5619
|
U.sent(), U.label = 6;
|
|
@@ -5743,7 +5745,7 @@ var Ua = function(r) {
|
|
|
5743
5745
|
signingService: s,
|
|
5744
5746
|
uriEscapePath: a
|
|
5745
5747
|
};
|
|
5746
|
-
},
|
|
5748
|
+
}, Jt = {};
|
|
5747
5749
|
/*! *****************************************************************************
|
|
5748
5750
|
Copyright (c) Microsoft Corporation.
|
|
5749
5751
|
|
|
@@ -6367,7 +6369,7 @@ function kf(r) {
|
|
|
6367
6369
|
Object.defineProperty(r, "__esModule", { value: !0 });
|
|
6368
6370
|
var e = $a;
|
|
6369
6371
|
(0, e.__exportStar)(hi, r);
|
|
6370
|
-
})(
|
|
6372
|
+
})(Jt);
|
|
6371
6373
|
var La = {};
|
|
6372
6374
|
for (var Pn = 0; Pn < 256; Pn++) {
|
|
6373
6375
|
var Rn = Pn.toString(16).toLowerCase();
|
|
@@ -6379,7 +6381,7 @@ function Nf(r) {
|
|
|
6379
6381
|
return e;
|
|
6380
6382
|
}
|
|
6381
6383
|
var tn = function(r, e) {
|
|
6382
|
-
var t = new
|
|
6384
|
+
var t = new Jt.Sha256(r);
|
|
6383
6385
|
t.update(e);
|
|
6384
6386
|
var n = t.digestSync();
|
|
6385
6387
|
return n;
|
|
@@ -6536,16 +6538,16 @@ var tn = function(r, e) {
|
|
|
6536
6538
|
}, Jf = function(r, e) {
|
|
6537
6539
|
var t, n, i, s, o = r.body, a = r.method, c = a === void 0 ? "GET" : a, u = r.url, l = e.expiration, d = Wf(e, ["expiration"]), p = Ba(d), m = p.accessKeyId, g = p.credentialScope, b = p.longDate, S = p.sessionToken, E = new URL(u);
|
|
6538
6540
|
Object.entries(zn(zn((t = {}, t[$h] = Fs, t[Mh] = "".concat(m, "/").concat(g), t[ka] = b, t[Vh] = Qi, t), l && (n = {}, n[Lh] = l.toString(), n)), S && (i = {}, i[Bs] = S, i))).forEach(function(U) {
|
|
6539
|
-
var F = Yf(U, 2), O = F[0],
|
|
6540
|
-
E.searchParams.append(O,
|
|
6541
|
+
var F = Yf(U, 2), O = F[0], j = F[1];
|
|
6542
|
+
E.searchParams.append(O, j);
|
|
6541
6543
|
});
|
|
6542
6544
|
var x = {
|
|
6543
6545
|
body: o,
|
|
6544
6546
|
headers: (s = {}, s[Qi] = u.host, s),
|
|
6545
6547
|
method: c,
|
|
6546
6548
|
url: E
|
|
6547
|
-
},
|
|
6548
|
-
return E.searchParams.append(jh,
|
|
6549
|
+
}, R = ja(x, p);
|
|
6550
|
+
return E.searchParams.append(jh, R), E;
|
|
6549
6551
|
}, Mr = globalThis && globalThis.__assign || function() {
|
|
6550
6552
|
return Mr = Object.assign || function(r) {
|
|
6551
6553
|
for (var e, t = 1, n = arguments.length; t < n; t++) {
|
|
@@ -6714,12 +6716,12 @@ var tn = function(r, e) {
|
|
|
6714
6716
|
throw u[1];
|
|
6715
6717
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
6716
6718
|
}
|
|
6717
|
-
},
|
|
6719
|
+
}, Ht = new ft("CognitoCredentials"), id = new Promise(function(r, e) {
|
|
6718
6720
|
if (!Pt().isBrowser)
|
|
6719
|
-
return
|
|
6721
|
+
return Ht.debug("not in the browser, directly resolved"), r();
|
|
6720
6722
|
var t = window.gapi && window.gapi.auth2 ? window.gapi.auth2 : null;
|
|
6721
6723
|
if (t)
|
|
6722
|
-
return
|
|
6724
|
+
return Ht.debug("google api already loaded"), r();
|
|
6723
6725
|
setTimeout(function() {
|
|
6724
6726
|
return r();
|
|
6725
6727
|
}, 2e3);
|
|
@@ -6734,9 +6736,9 @@ var tn = function(r, e) {
|
|
|
6734
6736
|
return nd(this, function(e) {
|
|
6735
6737
|
switch (e.label) {
|
|
6736
6738
|
case 0:
|
|
6737
|
-
return this.initialized ? [3, 2] : (
|
|
6739
|
+
return this.initialized ? [3, 2] : (Ht.debug("need to wait for the Google SDK loaded"), [4, id]);
|
|
6738
6740
|
case 1:
|
|
6739
|
-
e.sent(), this.initialized = !0,
|
|
6741
|
+
e.sent(), this.initialized = !0, Ht.debug("finish waiting"), e.label = 2;
|
|
6740
6742
|
case 2:
|
|
6741
6743
|
return [2, this._refreshGoogleTokenImpl()];
|
|
6742
6744
|
}
|
|
@@ -6746,18 +6748,18 @@ var tn = function(r, e) {
|
|
|
6746
6748
|
var e = null;
|
|
6747
6749
|
return Pt().isBrowser && (e = window.gapi && window.gapi.auth2 ? window.gapi.auth2 : null), e ? new Promise(function(t, n) {
|
|
6748
6750
|
e.getAuthInstance().then(function(i) {
|
|
6749
|
-
i || (
|
|
6751
|
+
i || (Ht.debug("google Auth undefined"), n(new hr("google Auth undefined")));
|
|
6750
6752
|
var s = i.currentUser.get();
|
|
6751
|
-
s.isSignedIn() ? (
|
|
6753
|
+
s.isSignedIn() ? (Ht.debug("refreshing the google access token"), s.reloadAuthResponse().then(function(o) {
|
|
6752
6754
|
var a = o.id_token, c = o.expires_at;
|
|
6753
6755
|
t({ token: a, expires_at: c });
|
|
6754
6756
|
}).catch(function(o) {
|
|
6755
6757
|
o && o.error === "network_error" ? n("Network error reloading google auth response") : n(new hr("Failed to reload google auth response"));
|
|
6756
6758
|
})) : n(new hr("User is not signed in with Google"));
|
|
6757
6759
|
}).catch(function(i) {
|
|
6758
|
-
|
|
6760
|
+
Ht.debug("Failed to refresh google token", i), n(new hr("Failed to refresh google token"));
|
|
6759
6761
|
});
|
|
6760
|
-
}) : (
|
|
6762
|
+
}) : (Ht.debug("no gapi auth2 available"), Promise.reject("no gapi auth2 available"));
|
|
6761
6763
|
}, r;
|
|
6762
6764
|
}()
|
|
6763
6765
|
), od = globalThis && globalThis.__awaiter || function(r, e, t, n) {
|
|
@@ -8234,7 +8236,7 @@ var Ja = function(r) {
|
|
|
8234
8236
|
}
|
|
8235
8237
|
return r;
|
|
8236
8238
|
}, Zn.apply(this, arguments);
|
|
8237
|
-
},
|
|
8239
|
+
}, Re = globalThis && globalThis.__awaiter || function(r, e, t, n) {
|
|
8238
8240
|
function i(s) {
|
|
8239
8241
|
return s instanceof t ? s : new t(function(o) {
|
|
8240
8242
|
o(s);
|
|
@@ -8260,7 +8262,7 @@ var Ja = function(r) {
|
|
|
8260
8262
|
}
|
|
8261
8263
|
u((n = n.apply(r, e || [])).next());
|
|
8262
8264
|
});
|
|
8263
|
-
},
|
|
8265
|
+
}, Oe = globalThis && globalThis.__generator || function(r, e) {
|
|
8264
8266
|
var t = { label: 0, sent: function() {
|
|
8265
8267
|
if (s[0] & 1)
|
|
8266
8268
|
throw s[1];
|
|
@@ -8349,9 +8351,9 @@ var Ja = function(r) {
|
|
|
8349
8351
|
}, r.prototype._pickupCredentials = function() {
|
|
8350
8352
|
return H.debug("picking up credentials"), !this._gettingCredPromise || !this._gettingCredPromise.isPending() ? (H.debug("getting new cred promise"), this._gettingCredPromise = Ah(this._keepAlive())) : H.debug("getting old cred promise"), this._gettingCredPromise;
|
|
8351
8353
|
}, r.prototype._keepAlive = function() {
|
|
8352
|
-
return
|
|
8354
|
+
return Re(this, void 0, void 0, function() {
|
|
8353
8355
|
var e, t, n, i, s, o, a, c;
|
|
8354
|
-
return
|
|
8356
|
+
return Oe(this, function(u) {
|
|
8355
8357
|
switch (u.label) {
|
|
8356
8358
|
case 0:
|
|
8357
8359
|
if (H.debug("checking if credentials exists and not expired"), e = this._credentials, e && !this._isExpired(e) && !this._isPastTTL())
|
|
@@ -8420,17 +8422,17 @@ var Ja = function(r) {
|
|
|
8420
8422
|
return this._nextCredentialsRefresh <= Date.now();
|
|
8421
8423
|
}, r.prototype._setCredentialsForGuest = function() {
|
|
8422
8424
|
var e;
|
|
8423
|
-
return
|
|
8425
|
+
return Re(this, void 0, void 0, function() {
|
|
8424
8426
|
var t, n, i, s, o, a, c, u, l, d, p = this;
|
|
8425
|
-
return
|
|
8427
|
+
return Oe(this, function(m) {
|
|
8426
8428
|
switch (m.label) {
|
|
8427
8429
|
case 0:
|
|
8428
8430
|
return H.debug("setting credentials for guest"), !((e = this._config) === null || e === void 0) && e.identityPoolId || (this._config = Object.assign({}, this._config, qa(this._config || {}).Auth)), t = this._config, n = t.identityPoolId, i = t.region, s = t.mandatorySignIn, o = t.identityPoolRegion, s ? [2, Promise.reject("cannot get guest credentials when mandatory signin enabled")] : n ? !o && !i ? (H.debug("region is not configured for getting the credentials"), [2, Promise.reject("region is not configured for getting the credentials")]) : (c = this, [4, this._getGuestIdentityId()]) : (H.debug("No Cognito Identity pool provided for unauthenticated access"), [2, Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);
|
|
8429
8431
|
case 1:
|
|
8430
8432
|
return a = c._identityId = m.sent(), u = { region: o != null ? o : i }, l = function() {
|
|
8431
|
-
return
|
|
8433
|
+
return Re(p, void 0, void 0, function() {
|
|
8432
8434
|
var g, b;
|
|
8433
|
-
return
|
|
8435
|
+
return Oe(this, function(S) {
|
|
8434
8436
|
switch (S.label) {
|
|
8435
8437
|
case 0:
|
|
8436
8438
|
return a ? [3, 2] : [4, On(u, {
|
|
@@ -8454,25 +8456,25 @@ var Ja = function(r) {
|
|
|
8454
8456
|
});
|
|
8455
8457
|
});
|
|
8456
8458
|
}, d = l().catch(function(g) {
|
|
8457
|
-
return
|
|
8458
|
-
return
|
|
8459
|
+
return Re(p, void 0, void 0, function() {
|
|
8460
|
+
return Oe(this, function(b) {
|
|
8459
8461
|
throw g;
|
|
8460
8462
|
});
|
|
8461
8463
|
});
|
|
8462
8464
|
}), [2, this._loadCredentials(d, "guest", !1, null).then(function(g) {
|
|
8463
8465
|
return g;
|
|
8464
8466
|
}).catch(function(g) {
|
|
8465
|
-
return
|
|
8467
|
+
return Re(p, void 0, void 0, function() {
|
|
8466
8468
|
var b, S = this;
|
|
8467
|
-
return
|
|
8469
|
+
return Oe(this, function(E) {
|
|
8468
8470
|
switch (E.label) {
|
|
8469
8471
|
case 0:
|
|
8470
8472
|
return g.name === "ResourceNotFoundException" && g.message === "Identity '".concat(a, "' not found.") ? (H.debug("Failed to load guest credentials"), [4, this._removeGuestIdentityId()]) : [3, 2];
|
|
8471
8473
|
case 1:
|
|
8472
8474
|
return E.sent(), b = function() {
|
|
8473
|
-
return
|
|
8474
|
-
var x,
|
|
8475
|
-
return
|
|
8475
|
+
return Re(S, void 0, void 0, function() {
|
|
8476
|
+
var x, R;
|
|
8477
|
+
return Oe(this, function(U) {
|
|
8476
8478
|
switch (U.label) {
|
|
8477
8479
|
case 0:
|
|
8478
8480
|
return [4, On(u, {
|
|
@@ -8483,19 +8485,19 @@ var Ja = function(r) {
|
|
|
8483
8485
|
IdentityId: x
|
|
8484
8486
|
})];
|
|
8485
8487
|
case 2:
|
|
8486
|
-
return
|
|
8488
|
+
return R = U.sent().Credentials, [2, {
|
|
8487
8489
|
identityId: x,
|
|
8488
|
-
accessKeyId:
|
|
8489
|
-
secretAccessKey:
|
|
8490
|
-
sessionToken:
|
|
8491
|
-
expiration:
|
|
8490
|
+
accessKeyId: R.AccessKeyId,
|
|
8491
|
+
secretAccessKey: R.SecretKey,
|
|
8492
|
+
sessionToken: R.SessionToken,
|
|
8493
|
+
expiration: R.Expiration
|
|
8492
8494
|
}];
|
|
8493
8495
|
}
|
|
8494
8496
|
});
|
|
8495
8497
|
});
|
|
8496
8498
|
}, d = b().catch(function(x) {
|
|
8497
|
-
return
|
|
8498
|
-
return
|
|
8499
|
+
return Re(S, void 0, void 0, function() {
|
|
8500
|
+
return Oe(this, function(R) {
|
|
8499
8501
|
throw x;
|
|
8500
8502
|
});
|
|
8501
8503
|
});
|
|
@@ -8526,9 +8528,9 @@ var Ja = function(r) {
|
|
|
8526
8528
|
if (!p && !d)
|
|
8527
8529
|
return H.debug("region is not configured for getting the credentials"), Promise.reject("region is not configured for getting the credentials");
|
|
8528
8530
|
var m = { region: p != null ? p : d }, g = function() {
|
|
8529
|
-
return
|
|
8531
|
+
return Re(t, void 0, void 0, function() {
|
|
8530
8532
|
var S, E;
|
|
8531
|
-
return
|
|
8533
|
+
return Oe(this, function(x) {
|
|
8532
8534
|
switch (x.label) {
|
|
8533
8535
|
case 0:
|
|
8534
8536
|
return s ? [3, 2] : [4, On(m, {
|
|
@@ -8554,8 +8556,8 @@ var Ja = function(r) {
|
|
|
8554
8556
|
});
|
|
8555
8557
|
});
|
|
8556
8558
|
}, b = g().catch(function(S) {
|
|
8557
|
-
return
|
|
8558
|
-
return
|
|
8559
|
+
return Re(t, void 0, void 0, function() {
|
|
8560
|
+
return Oe(this, function(E) {
|
|
8559
8561
|
throw S;
|
|
8560
8562
|
});
|
|
8561
8563
|
});
|
|
@@ -8572,42 +8574,42 @@ var Ja = function(r) {
|
|
|
8572
8574
|
var u = "cognito-idp." + s + ".amazonaws.com/" + o, l = {};
|
|
8573
8575
|
l[u] = n;
|
|
8574
8576
|
var d = { region: c != null ? c : s }, p = function() {
|
|
8575
|
-
return
|
|
8576
|
-
var g, b, S, E, x,
|
|
8577
|
-
return
|
|
8578
|
-
switch (
|
|
8577
|
+
return Re(t, void 0, void 0, function() {
|
|
8578
|
+
var g, b, S, E, x, R, U, F, O, j;
|
|
8579
|
+
return Oe(this, function(V) {
|
|
8580
|
+
switch (V.label) {
|
|
8579
8581
|
case 0:
|
|
8580
8582
|
return [4, this._getGuestIdentityId()];
|
|
8581
8583
|
case 1:
|
|
8582
|
-
return g =
|
|
8584
|
+
return g = V.sent(), g ? [3, 3] : [4, On(d, {
|
|
8583
8585
|
IdentityPoolId: a,
|
|
8584
8586
|
Logins: l
|
|
8585
8587
|
})];
|
|
8586
8588
|
case 2:
|
|
8587
|
-
S =
|
|
8589
|
+
S = V.sent().IdentityId, b = S, V.label = 3;
|
|
8588
8590
|
case 3:
|
|
8589
8591
|
return [4, Un(d, {
|
|
8590
8592
|
IdentityId: g || b,
|
|
8591
8593
|
Logins: l
|
|
8592
8594
|
})];
|
|
8593
8595
|
case 4:
|
|
8594
|
-
return E =
|
|
8596
|
+
return E = V.sent(), x = E.Credentials, R = x.AccessKeyId, U = x.Expiration, F = x.SecretKey, O = x.SessionToken, j = E.IdentityId, this._identityId = j, g ? (H.debug("The guest identity ".concat(g, " has been successfully linked to the logins")), g === j && H.debug("The guest identity ".concat(g, " has become the primary identity")), [4, this._removeGuestIdentityId()]) : [3, 6];
|
|
8595
8597
|
case 5:
|
|
8596
|
-
|
|
8598
|
+
V.sent(), V.label = 6;
|
|
8597
8599
|
case 6:
|
|
8598
8600
|
return [2, {
|
|
8599
|
-
accessKeyId:
|
|
8601
|
+
accessKeyId: R,
|
|
8600
8602
|
secretAccessKey: F,
|
|
8601
8603
|
sessionToken: O,
|
|
8602
8604
|
expiration: U,
|
|
8603
|
-
identityId:
|
|
8605
|
+
identityId: j
|
|
8604
8606
|
}];
|
|
8605
8607
|
}
|
|
8606
8608
|
});
|
|
8607
8609
|
});
|
|
8608
8610
|
}, m = p().catch(function(g) {
|
|
8609
|
-
return
|
|
8610
|
-
return
|
|
8611
|
+
return Re(t, void 0, void 0, function() {
|
|
8612
|
+
return Oe(this, function(b) {
|
|
8611
8613
|
throw g;
|
|
8612
8614
|
});
|
|
8613
8615
|
});
|
|
@@ -8617,9 +8619,9 @@ var Ja = function(r) {
|
|
|
8617
8619
|
var s = this, o = this;
|
|
8618
8620
|
return new Promise(function(a, c) {
|
|
8619
8621
|
e.then(function(u) {
|
|
8620
|
-
return
|
|
8622
|
+
return Re(s, void 0, void 0, function() {
|
|
8621
8623
|
var l, d, p, m, g;
|
|
8622
|
-
return
|
|
8624
|
+
return Oe(this, function(b) {
|
|
8623
8625
|
switch (b.label) {
|
|
8624
8626
|
case 0:
|
|
8625
8627
|
if (H.debug("Load credentials successfully", u), this._identityId && !u.identityId && (u.identityId = this._identityId), o._credentials = u, o._credentials.authenticated = n, o._credentials_source = t, o._nextCredentialsRefresh = (/* @__PURE__ */ new Date()).getTime() + op, t === "federated") {
|
|
@@ -8657,8 +8659,8 @@ var Ja = function(r) {
|
|
|
8657
8659
|
}, r.prototype.set = function(e, t) {
|
|
8658
8660
|
return t === "session" ? this._setCredentialsFromSession(e) : t === "federation" ? this._setCredentialsFromFederation(e) : t === "guest" ? this._setCredentialsForGuest() : (H.debug("no source specified for setting credentials"), Promise.reject("invalid source"));
|
|
8659
8661
|
}, r.prototype.clear = function() {
|
|
8660
|
-
return
|
|
8661
|
-
return
|
|
8662
|
+
return Re(this, void 0, void 0, function() {
|
|
8663
|
+
return Oe(this, function(e) {
|
|
8662
8664
|
return this._credentials = null, this._credentials_source = null, H.debug("removing aws-amplify-federatedInfo from storage"), this._storage.removeItem("aws-amplify-federatedInfo"), [
|
|
8663
8665
|
2
|
|
8664
8666
|
/*return*/
|
|
@@ -8666,9 +8668,9 @@ var Ja = function(r) {
|
|
|
8666
8668
|
});
|
|
8667
8669
|
});
|
|
8668
8670
|
}, r.prototype._getGuestIdentityId = function() {
|
|
8669
|
-
return
|
|
8671
|
+
return Re(this, void 0, void 0, function() {
|
|
8670
8672
|
var e, t;
|
|
8671
|
-
return
|
|
8673
|
+
return Oe(this, function(n) {
|
|
8672
8674
|
switch (n.label) {
|
|
8673
8675
|
case 0:
|
|
8674
8676
|
e = this._config.identityPoolId, n.label = 1;
|
|
@@ -8687,9 +8689,9 @@ var Ja = function(r) {
|
|
|
8687
8689
|
});
|
|
8688
8690
|
});
|
|
8689
8691
|
}, r.prototype._setGuestIdentityId = function(e) {
|
|
8690
|
-
return
|
|
8692
|
+
return Re(this, void 0, void 0, function() {
|
|
8691
8693
|
var t, n;
|
|
8692
|
-
return
|
|
8694
|
+
return Oe(this, function(i) {
|
|
8693
8695
|
switch (i.label) {
|
|
8694
8696
|
case 0:
|
|
8695
8697
|
t = this._config.identityPoolId, i.label = 1;
|
|
@@ -8708,9 +8710,9 @@ var Ja = function(r) {
|
|
|
8708
8710
|
});
|
|
8709
8711
|
});
|
|
8710
8712
|
}, r.prototype._removeGuestIdentityId = function() {
|
|
8711
|
-
return
|
|
8713
|
+
return Re(this, void 0, void 0, function() {
|
|
8712
8714
|
var e;
|
|
8713
|
-
return
|
|
8715
|
+
return Oe(this, function(t) {
|
|
8714
8716
|
return e = this._config.identityPoolId, H.debug("removing ".concat(this._getCognitoIdentityIdStorageKey(e), " from storage")), this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)), [
|
|
8715
8717
|
2
|
|
8716
8718
|
/*return*/
|
|
@@ -8984,15 +8986,15 @@ function tu(r, e) {
|
|
|
8984
8986
|
}
|
|
8985
8987
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
8986
8988
|
}
|
|
8987
|
-
var
|
|
8988
|
-
return
|
|
8989
|
+
var Te = function() {
|
|
8990
|
+
return Te = Object.assign || function(e) {
|
|
8989
8991
|
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
|
8990
8992
|
t = arguments[n];
|
|
8991
8993
|
for (var s in t)
|
|
8992
8994
|
Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
8993
8995
|
}
|
|
8994
8996
|
return e;
|
|
8995
|
-
},
|
|
8997
|
+
}, Te.apply(this, arguments);
|
|
8996
8998
|
};
|
|
8997
8999
|
function J(r, e, t, n) {
|
|
8998
9000
|
function i(s) {
|
|
@@ -9163,7 +9165,7 @@ var qo = /* @__PURE__ */ function() {
|
|
|
9163
9165
|
}, e.getClientMetadata = function() {
|
|
9164
9166
|
return this.clientMetadata;
|
|
9165
9167
|
}, r;
|
|
9166
|
-
}(),
|
|
9168
|
+
}(), se = {}, vi = {};
|
|
9167
9169
|
vi.byteLength = Dp;
|
|
9168
9170
|
vi.toByteArray = Rp;
|
|
9169
9171
|
vi.fromByteArray = kp;
|
|
@@ -9426,7 +9428,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9426
9428
|
case "utf8":
|
|
9427
9429
|
case "utf-8":
|
|
9428
9430
|
case void 0:
|
|
9429
|
-
return
|
|
9431
|
+
return Ee(y).length;
|
|
9430
9432
|
case "ucs2":
|
|
9431
9433
|
case "ucs-2":
|
|
9432
9434
|
case "utf16le":
|
|
@@ -9438,12 +9440,12 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9438
9440
|
return pt(y).length;
|
|
9439
9441
|
default:
|
|
9440
9442
|
if (v)
|
|
9441
|
-
return
|
|
9443
|
+
return Ee(y).length;
|
|
9442
9444
|
h = ("" + h).toLowerCase(), v = !0;
|
|
9443
9445
|
}
|
|
9444
9446
|
}
|
|
9445
9447
|
a.byteLength = x;
|
|
9446
|
-
function
|
|
9448
|
+
function R(y, h, f) {
|
|
9447
9449
|
var v = !1;
|
|
9448
9450
|
if ((h === void 0 || h < 0) && (h = 0), h > this.length || ((f === void 0 || f > this.length) && (f = this.length), f <= 0) || (f >>>= 0, h >>>= 0, f <= h))
|
|
9449
9451
|
return "";
|
|
@@ -9500,7 +9502,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9500
9502
|
return this;
|
|
9501
9503
|
}, a.prototype.toString = function() {
|
|
9502
9504
|
var h = this.length | 0;
|
|
9503
|
-
return h === 0 ? "" : arguments.length === 0 ? Je(this, 0, h) :
|
|
9505
|
+
return h === 0 ? "" : arguments.length === 0 ? Je(this, 0, h) : R.apply(this, arguments);
|
|
9504
9506
|
}, a.prototype.equals = function(h) {
|
|
9505
9507
|
if (!a.isBuffer(h))
|
|
9506
9508
|
throw new TypeError("Argument must be a Buffer");
|
|
@@ -9521,9 +9523,9 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9521
9523
|
return 1;
|
|
9522
9524
|
if (f >>>= 0, v >>>= 0, _ >>>= 0, A >>>= 0, this === h)
|
|
9523
9525
|
return 0;
|
|
9524
|
-
for (var D = A - _, Y = v - f, ae = Math.min(D, Y), le = this.slice(_, A),
|
|
9525
|
-
if (le[he] !==
|
|
9526
|
-
D = le[he], Y =
|
|
9526
|
+
for (var D = A - _, Y = v - f, ae = Math.min(D, Y), le = this.slice(_, A), Pe = h.slice(f, v), he = 0; he < ae; ++he)
|
|
9527
|
+
if (le[he] !== Pe[he]) {
|
|
9528
|
+
D = le[he], Y = Pe[he];
|
|
9527
9529
|
break;
|
|
9528
9530
|
}
|
|
9529
9531
|
return D < Y ? -1 : Y < D ? 1 : 0;
|
|
@@ -9558,13 +9560,13 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9558
9560
|
}
|
|
9559
9561
|
var le;
|
|
9560
9562
|
if (_) {
|
|
9561
|
-
var
|
|
9563
|
+
var Pe = -1;
|
|
9562
9564
|
for (le = f; le < D; le++)
|
|
9563
|
-
if (ae(y, le) === ae(h,
|
|
9564
|
-
if (
|
|
9565
|
-
return
|
|
9565
|
+
if (ae(y, le) === ae(h, Pe === -1 ? 0 : le - Pe)) {
|
|
9566
|
+
if (Pe === -1 && (Pe = le), le - Pe + 1 === Y)
|
|
9567
|
+
return Pe * A;
|
|
9566
9568
|
} else
|
|
9567
|
-
|
|
9569
|
+
Pe !== -1 && (le -= le - Pe), Pe = -1;
|
|
9568
9570
|
} else
|
|
9569
9571
|
for (f + Y > D && (f = D - Y), le = f; le >= 0; le--) {
|
|
9570
9572
|
for (var he = !0, Sn = 0; Sn < Y; Sn++)
|
|
@@ -9584,7 +9586,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9584
9586
|
}, a.prototype.lastIndexOf = function(h, f, v) {
|
|
9585
9587
|
return F(this, h, f, v, !1);
|
|
9586
9588
|
};
|
|
9587
|
-
function
|
|
9589
|
+
function j(y, h, f, v) {
|
|
9588
9590
|
f = Number(f) || 0;
|
|
9589
9591
|
var _ = y.length - f;
|
|
9590
9592
|
v ? (v = Number(v), v > _ && (v = _)) : v = _;
|
|
@@ -9600,20 +9602,20 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9600
9602
|
}
|
|
9601
9603
|
return D;
|
|
9602
9604
|
}
|
|
9603
|
-
function
|
|
9604
|
-
return
|
|
9605
|
+
function V(y, h, f, v) {
|
|
9606
|
+
return $t(Ee(h, y.length - f), y, f, v);
|
|
9605
9607
|
}
|
|
9606
9608
|
function z(y, h, f, v) {
|
|
9607
|
-
return
|
|
9609
|
+
return $t(ze(h), y, f, v);
|
|
9608
9610
|
}
|
|
9609
9611
|
function me(y, h, f, v) {
|
|
9610
9612
|
return z(y, h, f, v);
|
|
9611
9613
|
}
|
|
9612
|
-
function
|
|
9613
|
-
return
|
|
9614
|
+
function ce(y, h, f, v) {
|
|
9615
|
+
return $t(pt(h), y, f, v);
|
|
9614
9616
|
}
|
|
9615
9617
|
function He(y, h, f, v) {
|
|
9616
|
-
return
|
|
9618
|
+
return $t(dt(h, y.length - f), y, f, v);
|
|
9617
9619
|
}
|
|
9618
9620
|
a.prototype.write = function(h, f, v, _) {
|
|
9619
9621
|
if (f === void 0)
|
|
@@ -9633,17 +9635,17 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9633
9635
|
for (var D = !1; ; )
|
|
9634
9636
|
switch (_) {
|
|
9635
9637
|
case "hex":
|
|
9636
|
-
return
|
|
9638
|
+
return j(this, h, f, v);
|
|
9637
9639
|
case "utf8":
|
|
9638
9640
|
case "utf-8":
|
|
9639
|
-
return
|
|
9641
|
+
return V(this, h, f, v);
|
|
9640
9642
|
case "ascii":
|
|
9641
9643
|
return z(this, h, f, v);
|
|
9642
9644
|
case "latin1":
|
|
9643
9645
|
case "binary":
|
|
9644
9646
|
return me(this, h, f, v);
|
|
9645
9647
|
case "base64":
|
|
9646
|
-
return
|
|
9648
|
+
return ce(this, h, f, v);
|
|
9647
9649
|
case "ucs2":
|
|
9648
9650
|
case "ucs-2":
|
|
9649
9651
|
case "utf16le":
|
|
@@ -9668,7 +9670,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9668
9670
|
for (var v = [], _ = h; _ < f; ) {
|
|
9669
9671
|
var A = y[_], D = null, Y = A > 239 ? 4 : A > 223 ? 3 : A > 191 ? 2 : 1;
|
|
9670
9672
|
if (_ + Y <= f) {
|
|
9671
|
-
var ae, le,
|
|
9673
|
+
var ae, le, Pe, he;
|
|
9672
9674
|
switch (Y) {
|
|
9673
9675
|
case 1:
|
|
9674
9676
|
A < 128 && (D = A);
|
|
@@ -9680,7 +9682,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9680
9682
|
ae = y[_ + 1], le = y[_ + 2], (ae & 192) === 128 && (le & 192) === 128 && (he = (A & 15) << 12 | (ae & 63) << 6 | le & 63, he > 2047 && (he < 55296 || he > 57343) && (D = he));
|
|
9681
9683
|
break;
|
|
9682
9684
|
case 4:
|
|
9683
|
-
ae = y[_ + 1], le = y[_ + 2],
|
|
9685
|
+
ae = y[_ + 1], le = y[_ + 2], Pe = y[_ + 3], (ae & 192) === 128 && (le & 192) === 128 && (Pe & 192) === 128 && (he = (A & 15) << 18 | (ae & 63) << 12 | (le & 63) << 6 | Pe & 63, he > 65535 && he < 1114112 && (D = he));
|
|
9684
9686
|
}
|
|
9685
9687
|
}
|
|
9686
9688
|
D === null ? (D = 65533, Y = 1) : D > 65535 && (D -= 65536, v.push(D >>> 10 & 1023 | 55296), D = 56320 | D & 1023), v.push(D), _ += Y;
|
|
@@ -9889,13 +9891,13 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9889
9891
|
}, a.prototype.writeFloatBE = function(h, f, v) {
|
|
9890
9892
|
return ye(this, h, f, !1, v);
|
|
9891
9893
|
};
|
|
9892
|
-
function
|
|
9894
|
+
function De(y, h, f, v, _) {
|
|
9893
9895
|
return _ || _e(y, h, f, 8), t.write(y, h, f, v, 52, 8), f + 8;
|
|
9894
9896
|
}
|
|
9895
9897
|
a.prototype.writeDoubleLE = function(h, f, v) {
|
|
9896
|
-
return
|
|
9898
|
+
return De(this, h, f, !0, v);
|
|
9897
9899
|
}, a.prototype.writeDoubleBE = function(h, f, v) {
|
|
9898
|
-
return
|
|
9900
|
+
return De(this, h, f, !1, v);
|
|
9899
9901
|
}, a.prototype.copy = function(h, f, v, _) {
|
|
9900
9902
|
if (v || (v = 0), !_ && _ !== 0 && (_ = this.length), f >= h.length && (f = h.length), f || (f = 0), _ > 0 && _ < v && (_ = v), _ === v || h.length === 0 || this.length === 0)
|
|
9901
9903
|
return 0;
|
|
@@ -9942,7 +9944,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9942
9944
|
for (D = f; D < v; ++D)
|
|
9943
9945
|
this[D] = h;
|
|
9944
9946
|
else {
|
|
9945
|
-
var Y = a.isBuffer(h) ? h :
|
|
9947
|
+
var Y = a.isBuffer(h) ? h : Ee(new a(h, _).toString()), ae = Y.length;
|
|
9946
9948
|
for (D = 0; D < v - f; ++D)
|
|
9947
9949
|
this[D + f] = Y[D % ae];
|
|
9948
9950
|
}
|
|
@@ -9962,7 +9964,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
9962
9964
|
function Se(y) {
|
|
9963
9965
|
return y < 16 ? "0" + y.toString(16) : y.toString(16);
|
|
9964
9966
|
}
|
|
9965
|
-
function
|
|
9967
|
+
function Ee(y, h) {
|
|
9966
9968
|
h = h || 1 / 0;
|
|
9967
9969
|
for (var f, v = y.length, _ = null, A = [], D = 0; D < v; ++D) {
|
|
9968
9970
|
if (f = y.charCodeAt(D), f > 55295 && f < 57344) {
|
|
@@ -10030,7 +10032,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
10030
10032
|
function pt(y) {
|
|
10031
10033
|
return e.toByteArray(Ze(y));
|
|
10032
10034
|
}
|
|
10033
|
-
function
|
|
10035
|
+
function $t(y, h, f, v) {
|
|
10034
10036
|
for (var _ = 0; _ < v && !(_ + f >= h.length || _ >= y.length); ++_)
|
|
10035
10037
|
h[_ + f] = y[_];
|
|
10036
10038
|
return _;
|
|
@@ -10038,7 +10040,7 @@ var Np = {}.toString, Bp = Array.isArray || function(r) {
|
|
|
10038
10040
|
function fu(y) {
|
|
10039
10041
|
return y !== y;
|
|
10040
10042
|
}
|
|
10041
|
-
})(
|
|
10043
|
+
})(se);
|
|
10042
10044
|
var et;
|
|
10043
10045
|
typeof window != "undefined" && window.crypto && (et = window.crypto);
|
|
10044
10046
|
!et && typeof window != "undefined" && window.msCrypto && (et = window.msCrypto);
|
|
@@ -10086,10 +10088,10 @@ var Mp = /* @__PURE__ */ function() {
|
|
|
10086
10088
|
function k(r, e) {
|
|
10087
10089
|
r != null && this.fromString(r, e);
|
|
10088
10090
|
}
|
|
10089
|
-
function
|
|
10091
|
+
function Be() {
|
|
10090
10092
|
return new k(null);
|
|
10091
10093
|
}
|
|
10092
|
-
var
|
|
10094
|
+
var Zt, Lp = 244837814094590, Ho = (Lp & 16777215) == 15715070;
|
|
10093
10095
|
function jp(r, e, t, n, i, s) {
|
|
10094
10096
|
for (; --s >= 0; ) {
|
|
10095
10097
|
var o = e * this[r++] + t[n] + i;
|
|
@@ -10112,14 +10114,14 @@ function qp(r, e, t, n, i, s) {
|
|
|
10112
10114
|
return i;
|
|
10113
10115
|
}
|
|
10114
10116
|
var Ko = typeof navigator != "undefined";
|
|
10115
|
-
Ko && Ho && navigator.appName == "Microsoft Internet Explorer" ? (k.prototype.am = Vp,
|
|
10116
|
-
k.prototype.DB =
|
|
10117
|
-
k.prototype.DM = (1 <<
|
|
10118
|
-
k.prototype.DV = 1 <<
|
|
10117
|
+
Ko && Ho && navigator.appName == "Microsoft Internet Explorer" ? (k.prototype.am = Vp, Zt = 30) : Ko && Ho && navigator.appName != "Netscape" ? (k.prototype.am = jp, Zt = 26) : (k.prototype.am = qp, Zt = 28);
|
|
10118
|
+
k.prototype.DB = Zt;
|
|
10119
|
+
k.prototype.DM = (1 << Zt) - 1;
|
|
10120
|
+
k.prototype.DV = 1 << Zt;
|
|
10119
10121
|
var Vs = 52;
|
|
10120
10122
|
k.prototype.FV = Math.pow(2, Vs);
|
|
10121
|
-
k.prototype.F1 = Vs -
|
|
10122
|
-
k.prototype.F2 = 2 *
|
|
10123
|
+
k.prototype.F1 = Vs - Zt;
|
|
10124
|
+
k.prototype.F2 = 2 * Zt - Vs;
|
|
10123
10125
|
var Hp = "0123456789abcdefghijklmnopqrstuvwxyz", bi = new Array(), Gr, rt;
|
|
10124
10126
|
Gr = "0".charCodeAt(0);
|
|
10125
10127
|
for (rt = 0; rt <= 9; ++rt)
|
|
@@ -10146,7 +10148,7 @@ function Gp(r) {
|
|
|
10146
10148
|
this.t = 1, this.s = r < 0 ? -1 : 0, r > 0 ? this[0] = r : r < -1 ? this[0] = r + this.DV : this.t = 0;
|
|
10147
10149
|
}
|
|
10148
10150
|
function qs(r) {
|
|
10149
|
-
var e =
|
|
10151
|
+
var e = Be();
|
|
10150
10152
|
return e.fromInt(r), e;
|
|
10151
10153
|
}
|
|
10152
10154
|
function Wp(r, e) {
|
|
@@ -10201,7 +10203,7 @@ function Jp(r) {
|
|
|
10201
10203
|
return i ? s : "0";
|
|
10202
10204
|
}
|
|
10203
10205
|
function Zp() {
|
|
10204
|
-
var r =
|
|
10206
|
+
var r = Be();
|
|
10205
10207
|
return k.ZERO.subTo(this, r), r;
|
|
10206
10208
|
}
|
|
10207
10209
|
function Xp() {
|
|
@@ -10299,12 +10301,12 @@ function ug(r, e, t) {
|
|
|
10299
10301
|
e != null && e.fromInt(0), t != null && this.copyTo(t);
|
|
10300
10302
|
return;
|
|
10301
10303
|
}
|
|
10302
|
-
t == null && (t =
|
|
10303
|
-
var s =
|
|
10304
|
+
t == null && (t = Be());
|
|
10305
|
+
var s = Be(), o = this.s, a = r.s, c = this.DB - Hs(n[n.t - 1]);
|
|
10304
10306
|
c > 0 ? (n.lShiftTo(c, s), i.lShiftTo(c, t)) : (n.copyTo(s), i.copyTo(t));
|
|
10305
10307
|
var u = s.t, l = s[u - 1];
|
|
10306
10308
|
if (l != 0) {
|
|
10307
|
-
var d = l * (1 << this.F1) + (u > 1 ? s[u - 2] >> this.F2 : 0), p = this.FV / d, m = (1 << this.F1) / d, g = 1 << this.F2, b = t.t, S = b - u, E = e == null ?
|
|
10309
|
+
var d = l * (1 << this.F1) + (u > 1 ? s[u - 2] >> this.F2 : 0), p = this.FV / d, m = (1 << this.F1) / d, g = 1 << this.F2, b = t.t, S = b - u, E = e == null ? Be() : e;
|
|
10308
10310
|
for (s.dlShiftTo(S, E), t.compareTo(E) >= 0 && (t[t.t++] = 1, t.subTo(E, t)), k.ONE.dlShiftTo(u, E), E.subTo(s, s); s.t < u; )
|
|
10309
10311
|
s[s.t++] = 0;
|
|
10310
10312
|
for (; --S >= 0; ) {
|
|
@@ -10318,7 +10320,7 @@ function ug(r, e, t) {
|
|
|
10318
10320
|
}
|
|
10319
10321
|
}
|
|
10320
10322
|
function cg(r) {
|
|
10321
|
-
var e =
|
|
10323
|
+
var e = Be();
|
|
10322
10324
|
return this.abs().divRemTo(r, null, e), this.s < 0 && e.compareTo(k.ZERO) > 0 && r.subTo(e, e), e;
|
|
10323
10325
|
}
|
|
10324
10326
|
function lg() {
|
|
@@ -10348,30 +10350,30 @@ function fg(r, e) {
|
|
|
10348
10350
|
e.s = n < 0 ? -1 : 0, n > 0 ? e[t++] = n : n < -1 && (e[t++] = this.DV + n), e.t = t, e.clamp();
|
|
10349
10351
|
}
|
|
10350
10352
|
function dg(r) {
|
|
10351
|
-
var e =
|
|
10353
|
+
var e = Be();
|
|
10352
10354
|
return this.addTo(r, e), e;
|
|
10353
10355
|
}
|
|
10354
10356
|
function pg(r) {
|
|
10355
|
-
var e =
|
|
10357
|
+
var e = Be();
|
|
10356
10358
|
return this.subTo(r, e), e;
|
|
10357
10359
|
}
|
|
10358
10360
|
function gg(r) {
|
|
10359
|
-
var e =
|
|
10361
|
+
var e = Be();
|
|
10360
10362
|
return this.multiplyTo(r, e), e;
|
|
10361
10363
|
}
|
|
10362
10364
|
function mg(r) {
|
|
10363
|
-
var e =
|
|
10365
|
+
var e = Be();
|
|
10364
10366
|
return this.divRemTo(r, e, null), e;
|
|
10365
10367
|
}
|
|
10366
10368
|
function Wr(r) {
|
|
10367
10369
|
this.m = r, this.mp = r.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << r.DB - 15) - 1, this.mt2 = 2 * r.t;
|
|
10368
10370
|
}
|
|
10369
10371
|
function yg(r) {
|
|
10370
|
-
var e =
|
|
10372
|
+
var e = Be();
|
|
10371
10373
|
return r.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), r.s < 0 && e.compareTo(k.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
10372
10374
|
}
|
|
10373
10375
|
function vg(r) {
|
|
10374
|
-
var e =
|
|
10376
|
+
var e = Be();
|
|
10375
10377
|
return r.copyTo(e), this.reduce(e), e;
|
|
10376
10378
|
}
|
|
10377
10379
|
function bg(r) {
|
|
@@ -10402,11 +10404,11 @@ function Sg(r, e, t) {
|
|
|
10402
10404
|
n < 18 ? i = 1 : n < 48 ? i = 3 : n < 144 ? i = 4 : n < 768 ? i = 5 : i = 6;
|
|
10403
10405
|
var a = new Array(), c = 3, u = i - 1, l = (1 << i) - 1;
|
|
10404
10406
|
if (a[1] = o.convert(this), i > 1) {
|
|
10405
|
-
var d =
|
|
10407
|
+
var d = Be();
|
|
10406
10408
|
for (o.sqrTo(a[1], d); c <= l; )
|
|
10407
|
-
a[c] =
|
|
10409
|
+
a[c] = Be(), o.mulTo(d, a[c - 2], a[c]), c += 2;
|
|
10408
10410
|
}
|
|
10409
|
-
var p = r.t - 1, m, g = !0, b =
|
|
10411
|
+
var p = r.t - 1, m, g = !0, b = Be(), S;
|
|
10410
10412
|
for (n = Hs(r[p]) - 1; p >= 0; ) {
|
|
10411
10413
|
for (n >= u ? m = r[p] >> n - u & l : (m = (r[p] & (1 << n + 1) - 1) << u - n, p > 0 && (m |= r[p - 1] >> this.DB + n - u)), c = i; !(m & 1); )
|
|
10412
10414
|
m >>= 1, --c;
|
|
@@ -10456,12 +10458,12 @@ k.ONE = qs(1);
|
|
|
10456
10458
|
* SPDX-License-Identifier: Apache-2.0
|
|
10457
10459
|
*/
|
|
10458
10460
|
function Mi(r) {
|
|
10459
|
-
return
|
|
10461
|
+
return se.Buffer.from(new Mp().random(r).toString(), "hex");
|
|
10460
10462
|
}
|
|
10461
10463
|
var xg = /^[89a-f]/i, Eg = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Cg = "userAttributes.", Dr = /* @__PURE__ */ function() {
|
|
10462
10464
|
function r(t) {
|
|
10463
10465
|
this.N = new k(Eg, 16), this.g = new k("2", 16), this.k = new k(this.hexHash("" + this.padHex(this.N) + this.padHex(this.g)), 16), this.smallAValue = this.generateRandomSmallA(), this.getLargeAValue(function() {
|
|
10464
|
-
}), this.infoBits =
|
|
10466
|
+
}), this.infoBits = se.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
|
|
10465
10467
|
}
|
|
10466
10468
|
var e = r.prototype;
|
|
10467
10469
|
return e.getSmallAValue = function() {
|
|
@@ -10499,16 +10501,16 @@ var xg = /^[89a-f]/i, Eg = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
10499
10501
|
var s = new k(this.UHexHash, 16);
|
|
10500
10502
|
return s;
|
|
10501
10503
|
}, e.hash = function(n) {
|
|
10502
|
-
var i = new
|
|
10504
|
+
var i = new Jt.Sha256();
|
|
10503
10505
|
i.update(n);
|
|
10504
|
-
var s = i.digestSync(), o =
|
|
10506
|
+
var s = i.digestSync(), o = se.Buffer.from(s).toString("hex");
|
|
10505
10507
|
return new Array(64 - o.length).join("0") + o;
|
|
10506
10508
|
}, e.hexHash = function(n) {
|
|
10507
|
-
return this.hash(
|
|
10509
|
+
return this.hash(se.Buffer.from(n, "hex"));
|
|
10508
10510
|
}, e.computehkdf = function(n, i) {
|
|
10509
|
-
var s =
|
|
10511
|
+
var s = se.Buffer.concat([this.infoBits, se.Buffer.from(String.fromCharCode(1), "utf8")]), o = new Jt.Sha256(i);
|
|
10510
10512
|
o.update(n);
|
|
10511
|
-
var a = o.digestSync(), c = new
|
|
10513
|
+
var a = o.digestSync(), c = new Jt.Sha256(a);
|
|
10512
10514
|
c.update(s);
|
|
10513
10515
|
var u = c.digestSync(), l = u, d = l.slice(0, 16);
|
|
10514
10516
|
return d;
|
|
@@ -10521,7 +10523,7 @@ var xg = /^[89a-f]/i, Eg = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
10521
10523
|
var u = "" + this.poolName + n + ":" + i, l = this.hash(u), d = new k(this.hexHash(this.padHex(o) + l), 16);
|
|
10522
10524
|
this.calculateS(d, s, function(p, m) {
|
|
10523
10525
|
p && a(p, null);
|
|
10524
|
-
var g = c.computehkdf(
|
|
10526
|
+
var g = c.computehkdf(se.Buffer.from(c.padHex(m), "hex"), se.Buffer.from(c.padHex(c.UValue), "hex"));
|
|
10525
10527
|
a(null, g);
|
|
10526
10528
|
});
|
|
10527
10529
|
}, e.calculateS = function(n, i, s) {
|
|
@@ -10567,7 +10569,7 @@ var nu = /* @__PURE__ */ function() {
|
|
|
10567
10569
|
}, e.decodePayload = function() {
|
|
10568
10570
|
var n = this.jwtToken.split(".")[1];
|
|
10569
10571
|
try {
|
|
10570
|
-
return JSON.parse(
|
|
10572
|
+
return JSON.parse(se.Buffer.from(n, "base64").toString("utf8"));
|
|
10571
10573
|
} catch (i) {
|
|
10572
10574
|
return {};
|
|
10573
10575
|
}
|
|
@@ -10784,24 +10786,24 @@ var kg = typeof navigator != "undefined", Wo = kg ? iu.isReactNative ? "react-na
|
|
|
10784
10786
|
if (b)
|
|
10785
10787
|
return i.onFailure(b);
|
|
10786
10788
|
var E = S.ChallengeParameters;
|
|
10787
|
-
s.username = E.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", c = new k(E.SRP_B, 16), u = new k(E.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, n.getPassword(), c, u, function(x,
|
|
10789
|
+
s.username = E.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", c = new k(E.SRP_B, 16), u = new k(E.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, n.getPassword(), c, u, function(x, R) {
|
|
10788
10790
|
x && i.onFailure(x);
|
|
10789
|
-
var U = a.getNowString(), F =
|
|
10791
|
+
var U = a.getNowString(), F = se.Buffer.concat([se.Buffer.from(s.pool.getUserPoolName(), "utf8"), se.Buffer.from(s.username, "utf8"), se.Buffer.from(E.SECRET_BLOCK, "base64"), se.Buffer.from(U, "utf8")]), O = new Jt.Sha256(R);
|
|
10790
10792
|
O.update(F);
|
|
10791
|
-
var
|
|
10792
|
-
z.USERNAME = s.username, z.PASSWORD_CLAIM_SECRET_BLOCK = E.SECRET_BLOCK, z.TIMESTAMP = U, z.PASSWORD_CLAIM_SIGNATURE =
|
|
10793
|
+
var j = O.digestSync(), V = se.Buffer.from(j).toString("base64"), z = {};
|
|
10794
|
+
z.USERNAME = s.username, z.PASSWORD_CLAIM_SECRET_BLOCK = E.SECRET_BLOCK, z.TIMESTAMP = U, z.PASSWORD_CLAIM_SIGNATURE = V, s.deviceKey != null && (z.DEVICE_KEY = s.deviceKey);
|
|
10793
10795
|
var me = function He(we, Je) {
|
|
10794
10796
|
return s.client.request("RespondToAuthChallenge", we, function(Le, at) {
|
|
10795
10797
|
return Le && Le.code === "ResourceNotFoundException" && Le.message.toLowerCase().indexOf("device") !== -1 ? (z.DEVICE_KEY = null, s.deviceKey = null, s.randomPassword = null, s.deviceGroupKey = null, s.clearCachedDeviceKeyAndPassword(), He(we, Je)) : Je(Le, at);
|
|
10796
10798
|
});
|
|
10797
|
-
},
|
|
10799
|
+
}, ce = {
|
|
10798
10800
|
ChallengeName: "PASSWORD_VERIFIER",
|
|
10799
10801
|
ClientId: s.pool.getClientId(),
|
|
10800
10802
|
ChallengeResponses: z,
|
|
10801
10803
|
Session: S.Session,
|
|
10802
10804
|
ClientMetadata: m
|
|
10803
10805
|
};
|
|
10804
|
-
s.getUserContextData() && (
|
|
10806
|
+
s.getUserContextData() && (ce.UserContextData = s.getUserContextData()), me(ce, function(He, we) {
|
|
10805
10807
|
return He ? i.onFailure(He) : s.authenticateUserInternal(we, o, i);
|
|
10806
10808
|
});
|
|
10807
10809
|
});
|
|
@@ -10856,8 +10858,8 @@ var kg = typeof navigator != "undefined", Wo = kg ? iu.isReactNative ? "react-na
|
|
|
10856
10858
|
if (b)
|
|
10857
10859
|
return s.onFailure(b);
|
|
10858
10860
|
var S = {
|
|
10859
|
-
Salt:
|
|
10860
|
-
PasswordVerifier:
|
|
10861
|
+
Salt: se.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
|
|
10862
|
+
PasswordVerifier: se.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
|
|
10861
10863
|
};
|
|
10862
10864
|
o.verifierDevices = S.PasswordVerifier, o.deviceGroupKey = g.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
|
|
10863
10865
|
DeviceKey: g.DeviceKey,
|
|
@@ -10904,18 +10906,18 @@ var kg = typeof navigator != "undefined", Wo = kg ? iu.isReactNative ? "react-na
|
|
|
10904
10906
|
o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, b, S, function(E, x) {
|
|
10905
10907
|
if (E)
|
|
10906
10908
|
return n.onFailure(E);
|
|
10907
|
-
var
|
|
10909
|
+
var R = a.getNowString(), U = se.Buffer.concat([se.Buffer.from(s.deviceGroupKey, "utf8"), se.Buffer.from(s.deviceKey, "utf8"), se.Buffer.from(g.SECRET_BLOCK, "base64"), se.Buffer.from(R, "utf8")]), F = new Jt.Sha256(x);
|
|
10908
10910
|
F.update(U);
|
|
10909
|
-
var O = F.digestSync(),
|
|
10910
|
-
|
|
10911
|
+
var O = F.digestSync(), j = se.Buffer.from(O).toString("base64"), V = {};
|
|
10912
|
+
V.USERNAME = s.username, V.PASSWORD_CLAIM_SECRET_BLOCK = g.SECRET_BLOCK, V.TIMESTAMP = R, V.PASSWORD_CLAIM_SIGNATURE = j, V.DEVICE_KEY = s.deviceKey;
|
|
10911
10913
|
var z = {
|
|
10912
10914
|
ChallengeName: "DEVICE_PASSWORD_VERIFIER",
|
|
10913
10915
|
ClientId: s.pool.getClientId(),
|
|
10914
|
-
ChallengeResponses:
|
|
10916
|
+
ChallengeResponses: V,
|
|
10915
10917
|
Session: m.Session
|
|
10916
10918
|
};
|
|
10917
|
-
s.getUserContextData() && (z.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", z, function(me,
|
|
10918
|
-
return me ? n.onFailure(me) : (s.signInUserSession = s.getCognitoUserSession(
|
|
10919
|
+
s.getUserContextData() && (z.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", z, function(me, ce) {
|
|
10920
|
+
return me ? n.onFailure(me) : (s.signInUserSession = s.getCognitoUserSession(ce.AuthenticationResult), s.cacheTokens(), n.onSuccess(s.signInUserSession));
|
|
10919
10921
|
});
|
|
10920
10922
|
});
|
|
10921
10923
|
});
|
|
@@ -10973,8 +10975,8 @@ var kg = typeof navigator != "undefined", Wo = kg ? iu.isReactNative ? "react-na
|
|
|
10973
10975
|
if (b)
|
|
10974
10976
|
return i.onFailure(b);
|
|
10975
10977
|
var S = {
|
|
10976
|
-
Salt:
|
|
10977
|
-
PasswordVerifier:
|
|
10978
|
+
Salt: se.Buffer.from(g.getSaltDevices(), "hex").toString("base64"),
|
|
10979
|
+
PasswordVerifier: se.Buffer.from(g.getVerifierDevices(), "hex").toString("base64")
|
|
10978
10980
|
};
|
|
10979
10981
|
a.verifierDevices = S.PasswordVerifier, a.deviceGroupKey = p.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, a.randomPassword = g.getRandomPassword(), a.client.request("ConfirmDevice", {
|
|
10980
10982
|
DeviceKey: p.AuthenticationResult.NewDeviceMetadata.DeviceKey,
|
|
@@ -11447,15 +11449,15 @@ var kg = typeof navigator != "undefined", Wo = kg ? iu.isReactNative ? "react-na
|
|
|
11447
11449
|
});
|
|
11448
11450
|
}, r;
|
|
11449
11451
|
}(), Ng = "auth";
|
|
11450
|
-
function
|
|
11452
|
+
function zt() {
|
|
11451
11453
|
}
|
|
11452
|
-
|
|
11454
|
+
zt.prototype.userAgent = Pg();
|
|
11453
11455
|
var Bg = function() {
|
|
11454
|
-
|
|
11456
|
+
zt.category = Ng;
|
|
11455
11457
|
}, Yo = function(e) {
|
|
11456
|
-
|
|
11458
|
+
zt.framework = e;
|
|
11457
11459
|
}, Fg = function(e) {
|
|
11458
|
-
var t =
|
|
11460
|
+
var t = zt.category ? " " + zt.category : "", n = zt.framework ? " framework/" + zt.framework : "", i = "" + zt.prototype.userAgent + t + n;
|
|
11459
11461
|
return i;
|
|
11460
11462
|
};
|
|
11461
11463
|
function $g(r, e) {
|
|
@@ -11824,13 +11826,13 @@ ei.exports;
|
|
|
11824
11826
|
(function(t) {
|
|
11825
11827
|
var n = e && !e.nodeType && e, i = r && !r.nodeType && r, s = typeof Tt == "object" && Tt;
|
|
11826
11828
|
(s.global === s || s.window === s || s.self === s) && (t = s);
|
|
11827
|
-
var o, a = 2147483647, c = 36, u = 1, l = 26, d = 38, p = 700, m = 72, g = 128, b = "-", S = /^xn--/, E = /[^\x20-\x7E]/, x = /[\x2E\u3002\uFF0E\uFF61]/g,
|
|
11829
|
+
var o, a = 2147483647, c = 36, u = 1, l = 26, d = 38, p = 700, m = 72, g = 128, b = "-", S = /^xn--/, E = /[^\x20-\x7E]/, x = /[\x2E\u3002\uFF0E\uFF61]/g, R = {
|
|
11828
11830
|
overflow: "Overflow: input needs wider integers to process",
|
|
11829
11831
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
11830
11832
|
"invalid-input": "Invalid input"
|
|
11831
|
-
}, U = c - u, F = Math.floor, O = String.fromCharCode,
|
|
11832
|
-
function
|
|
11833
|
-
throw RangeError(
|
|
11833
|
+
}, U = c - u, F = Math.floor, O = String.fromCharCode, j;
|
|
11834
|
+
function V(B) {
|
|
11835
|
+
throw RangeError(R[B]);
|
|
11834
11836
|
}
|
|
11835
11837
|
function z(B, N) {
|
|
11836
11838
|
for (var M = B.length, ne = []; M--; )
|
|
@@ -11843,7 +11845,7 @@ ei.exports;
|
|
|
11843
11845
|
var oe = B.split("."), _e = z(oe, N).join(".");
|
|
11844
11846
|
return ne + _e;
|
|
11845
11847
|
}
|
|
11846
|
-
function
|
|
11848
|
+
function ce(B) {
|
|
11847
11849
|
for (var N = [], M = 0, ne = B.length, oe, _e; M < ne; )
|
|
11848
11850
|
oe = B.charCodeAt(M++), oe >= 55296 && oe <= 56319 && M < ne ? (_e = B.charCodeAt(M++), (_e & 64512) == 56320 ? N.push(((oe & 1023) << 10) + (_e & 1023) + 65536) : (N.push(oe), M--)) : N.push(oe);
|
|
11849
11851
|
return N;
|
|
@@ -11867,34 +11869,34 @@ ei.exports;
|
|
|
11867
11869
|
return F(ne + (U + 1) * B / (B + d));
|
|
11868
11870
|
}
|
|
11869
11871
|
function at(B) {
|
|
11870
|
-
var N = [], M = B.length, ne, oe = 0, _e = g, ye = m,
|
|
11871
|
-
for (
|
|
11872
|
-
B.charCodeAt(Ke) >= 128 &&
|
|
11873
|
-
for (Ze =
|
|
11874
|
-
for (ut = oe, Se = 1,
|
|
11875
|
-
pt = c - dt, Se > F(a / pt) &&
|
|
11876
|
-
ne = N.length + 1, ye = Le(oe - ut, ne, ut == 0), F(oe / ne) > a - _e &&
|
|
11872
|
+
var N = [], M = B.length, ne, oe = 0, _e = g, ye = m, De, Ke, Ze, ut, Se, Ee, ze, dt, pt;
|
|
11873
|
+
for (De = B.lastIndexOf(b), De < 0 && (De = 0), Ke = 0; Ke < De; ++Ke)
|
|
11874
|
+
B.charCodeAt(Ke) >= 128 && V("not-basic"), N.push(B.charCodeAt(Ke));
|
|
11875
|
+
for (Ze = De > 0 ? De + 1 : 0; Ze < M; ) {
|
|
11876
|
+
for (ut = oe, Se = 1, Ee = c; Ze >= M && V("invalid-input"), ze = we(B.charCodeAt(Ze++)), (ze >= c || ze > F((a - oe) / Se)) && V("overflow"), oe += ze * Se, dt = Ee <= ye ? u : Ee >= ye + l ? l : Ee - ye, !(ze < dt); Ee += c)
|
|
11877
|
+
pt = c - dt, Se > F(a / pt) && V("overflow"), Se *= pt;
|
|
11878
|
+
ne = N.length + 1, ye = Le(oe - ut, ne, ut == 0), F(oe / ne) > a - _e && V("overflow"), _e += F(oe / ne), oe %= ne, N.splice(oe++, 0, _e);
|
|
11877
11879
|
}
|
|
11878
11880
|
return He(N);
|
|
11879
11881
|
}
|
|
11880
11882
|
function Sr(B) {
|
|
11881
|
-
var N, M, ne, oe, _e, ye,
|
|
11882
|
-
for (B =
|
|
11883
|
-
Se = B[ye], Se < 128 &&
|
|
11884
|
-
for (ne = oe =
|
|
11885
|
-
for (
|
|
11886
|
-
Se = B[ye], Se >= N && Se <
|
|
11887
|
-
for (dt = ne + 1,
|
|
11888
|
-
if (Se = B[ye], Se < N && ++M > a &&
|
|
11883
|
+
var N, M, ne, oe, _e, ye, De, Ke, Ze, ut, Se, Ee = [], ze, dt, pt, $t;
|
|
11884
|
+
for (B = ce(B), ze = B.length, N = g, M = 0, _e = m, ye = 0; ye < ze; ++ye)
|
|
11885
|
+
Se = B[ye], Se < 128 && Ee.push(O(Se));
|
|
11886
|
+
for (ne = oe = Ee.length, oe && Ee.push(b); ne < ze; ) {
|
|
11887
|
+
for (De = a, ye = 0; ye < ze; ++ye)
|
|
11888
|
+
Se = B[ye], Se >= N && Se < De && (De = Se);
|
|
11889
|
+
for (dt = ne + 1, De - N > F((a - M) / dt) && V("overflow"), M += (De - N) * dt, N = De, ye = 0; ye < ze; ++ye)
|
|
11890
|
+
if (Se = B[ye], Se < N && ++M > a && V("overflow"), Se == N) {
|
|
11889
11891
|
for (Ke = M, Ze = c; ut = Ze <= _e ? u : Ze >= _e + l ? l : Ze - _e, !(Ke < ut); Ze += c)
|
|
11890
|
-
|
|
11891
|
-
O(Je(ut +
|
|
11892
|
-
), Ke = F(
|
|
11893
|
-
|
|
11892
|
+
$t = Ke - ut, pt = c - ut, Ee.push(
|
|
11893
|
+
O(Je(ut + $t % pt, 0))
|
|
11894
|
+
), Ke = F($t / pt);
|
|
11895
|
+
Ee.push(O(Je(Ke, 0))), _e = Le(M, dt, ne == oe), M = 0, ++ne;
|
|
11894
11896
|
}
|
|
11895
11897
|
++M, ++N;
|
|
11896
11898
|
}
|
|
11897
|
-
return
|
|
11899
|
+
return Ee.join("");
|
|
11898
11900
|
}
|
|
11899
11901
|
function _i(B) {
|
|
11900
11902
|
return me(B, function(N) {
|
|
@@ -11921,7 +11923,7 @@ ei.exports;
|
|
|
11921
11923
|
* @type Object
|
|
11922
11924
|
*/
|
|
11923
11925
|
ucs2: {
|
|
11924
|
-
decode:
|
|
11926
|
+
decode: ce,
|
|
11925
11927
|
encode: He
|
|
11926
11928
|
},
|
|
11927
11929
|
decode: at,
|
|
@@ -11932,8 +11934,8 @@ ei.exports;
|
|
|
11932
11934
|
if (r.exports == n)
|
|
11933
11935
|
i.exports = o;
|
|
11934
11936
|
else
|
|
11935
|
-
for (
|
|
11936
|
-
o.hasOwnProperty(
|
|
11937
|
+
for (j in o)
|
|
11938
|
+
o.hasOwnProperty(j) && (n[j] = o[j]);
|
|
11937
11939
|
else
|
|
11938
11940
|
t.punycode = o;
|
|
11939
11941
|
})(Tt);
|
|
@@ -11992,7 +11994,7 @@ var Qg = function(r, e, t, n) {
|
|
|
11992
11994
|
};
|
|
11993
11995
|
dn.decode = dn.parse = Qg;
|
|
11994
11996
|
dn.encode = dn.stringify = em;
|
|
11995
|
-
var tm = Jg, Et = Zg,
|
|
11997
|
+
var tm = Jg, Et = Zg, Kt = uu;
|
|
11996
11998
|
function At() {
|
|
11997
11999
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
11998
12000
|
}
|
|
@@ -12056,24 +12058,24 @@ At.prototype.parse = function(r, e, t) {
|
|
|
12056
12058
|
p === -1 && (p = a.length), this.host = a.slice(0, p), a = a.slice(p), this.parseHost(), this.hostname = this.hostname || "";
|
|
12057
12059
|
var E = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
12058
12060
|
if (!E)
|
|
12059
|
-
for (var x = this.hostname.split(/\./), m = 0,
|
|
12061
|
+
for (var x = this.hostname.split(/\./), m = 0, R = x.length; m < R; m++) {
|
|
12060
12062
|
var U = x[m];
|
|
12061
12063
|
if (U && !U.match(Xo)) {
|
|
12062
|
-
for (var F = "", O = 0,
|
|
12064
|
+
for (var F = "", O = 0, j = U.length; O < j; O++)
|
|
12063
12065
|
U.charCodeAt(O) > 127 ? F += "x" : F += U[O];
|
|
12064
12066
|
if (!F.match(Xo)) {
|
|
12065
|
-
var
|
|
12066
|
-
me && (
|
|
12067
|
+
var V = x.slice(0, m), z = x.slice(m + 1), me = U.match(um);
|
|
12068
|
+
me && (V.push(me[1]), z.unshift(me[2])), z.length && (a = "/" + z.join(".") + a), this.hostname = V.join(".");
|
|
12067
12069
|
break;
|
|
12068
12070
|
}
|
|
12069
12071
|
}
|
|
12070
12072
|
}
|
|
12071
12073
|
this.hostname.length > am ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), E || (this.hostname = tm.toASCII(this.hostname));
|
|
12072
|
-
var
|
|
12073
|
-
this.host = He +
|
|
12074
|
+
var ce = this.port ? ":" + this.port : "", He = this.hostname || "";
|
|
12075
|
+
this.host = He + ce, this.href += this.host, E && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), a[0] !== "/" && (a = "/" + a));
|
|
12074
12076
|
}
|
|
12075
12077
|
if (!cm[l])
|
|
12076
|
-
for (var m = 0,
|
|
12078
|
+
for (var m = 0, R = ms.length; m < R; m++) {
|
|
12077
12079
|
var we = ms[m];
|
|
12078
12080
|
if (a.indexOf(we) !== -1) {
|
|
12079
12081
|
var Je = encodeURIComponent(we);
|
|
@@ -12084,8 +12086,8 @@ At.prototype.parse = function(r, e, t) {
|
|
|
12084
12086
|
Le !== -1 && (this.hash = a.substr(Le), a = a.slice(0, Le));
|
|
12085
12087
|
var at = a.indexOf("?");
|
|
12086
12088
|
if (at !== -1 ? (this.search = a.substr(at), this.query = a.substr(at + 1), e && (this.query = vs.parse(this.query)), a = a.slice(0, at)) : e && (this.search = "", this.query = {}), a && (this.pathname = a), kr[l] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
12087
|
-
var
|
|
12088
|
-
this.path =
|
|
12089
|
+
var ce = this.pathname || "", Sr = this.search || "";
|
|
12090
|
+
this.path = ce + Sr;
|
|
12089
12091
|
}
|
|
12090
12092
|
return this.href = this.format(), this;
|
|
12091
12093
|
};
|
|
@@ -12129,9 +12131,9 @@ At.prototype.resolveObject = function(r) {
|
|
|
12129
12131
|
return t.href = t.format(), t;
|
|
12130
12132
|
}
|
|
12131
12133
|
if (t.protocol = r.protocol, !r.host && !ys[r.protocol]) {
|
|
12132
|
-
for (var
|
|
12134
|
+
for (var R = (r.pathname || "").split("/"); R.length && !(r.host = R.shift()); )
|
|
12133
12135
|
;
|
|
12134
|
-
r.host || (r.host = ""), r.hostname || (r.hostname = ""),
|
|
12136
|
+
r.host || (r.host = ""), r.hostname || (r.hostname = ""), R[0] !== "" && R.unshift(""), R.length < 2 && R.unshift(""), t.pathname = R.join("/");
|
|
12135
12137
|
} else
|
|
12136
12138
|
t.pathname = r.pathname;
|
|
12137
12139
|
if (t.search = r.search, t.query = r.query, t.host = r.host || "", t.auth = r.auth, t.hostname = r.hostname || r.host, t.port = r.port, t.pathname || t.search) {
|
|
@@ -12140,11 +12142,11 @@ At.prototype.resolveObject = function(r) {
|
|
|
12140
12142
|
}
|
|
12141
12143
|
return t.slashes = t.slashes || r.slashes, t.href = t.format(), t;
|
|
12142
12144
|
}
|
|
12143
|
-
var g = t.pathname && t.pathname.charAt(0) === "/", b = r.host || r.pathname && r.pathname.charAt(0) === "/", S = b || g || t.host && r.pathname, E = S, x = t.pathname && t.pathname.split("/") || [],
|
|
12144
|
-
if (U && (t.hostname = "", t.port = null, t.host && (x[0] === "" ? x[0] = t.host : x.unshift(t.host)), t.host = "", r.protocol && (r.hostname = null, r.port = null, r.host && (
|
|
12145
|
-
t.host = r.host || r.host === "" ? r.host : t.host, t.hostname = r.hostname || r.hostname === "" ? r.hostname : t.hostname, t.search = r.search, t.query = r.query, x =
|
|
12146
|
-
else if (
|
|
12147
|
-
x || (x = []), x.pop(), x = x.concat(
|
|
12145
|
+
var g = t.pathname && t.pathname.charAt(0) === "/", b = r.host || r.pathname && r.pathname.charAt(0) === "/", S = b || g || t.host && r.pathname, E = S, x = t.pathname && t.pathname.split("/") || [], R = r.pathname && r.pathname.split("/") || [], U = t.protocol && !kr[t.protocol];
|
|
12146
|
+
if (U && (t.hostname = "", t.port = null, t.host && (x[0] === "" ? x[0] = t.host : x.unshift(t.host)), t.host = "", r.protocol && (r.hostname = null, r.port = null, r.host && (R[0] === "" ? R[0] = r.host : R.unshift(r.host)), r.host = null), S = S && (R[0] === "" || x[0] === "")), b)
|
|
12147
|
+
t.host = r.host || r.host === "" ? r.host : t.host, t.hostname = r.hostname || r.hostname === "" ? r.hostname : t.hostname, t.search = r.search, t.query = r.query, x = R;
|
|
12148
|
+
else if (R.length)
|
|
12149
|
+
x || (x = []), x.pop(), x = x.concat(R), t.search = r.search, t.query = r.query;
|
|
12148
12150
|
else if (!Et.isNullOrUndefined(r.search)) {
|
|
12149
12151
|
if (U) {
|
|
12150
12152
|
t.hostname = t.host = x.shift();
|
|
@@ -12155,12 +12157,12 @@ At.prototype.resolveObject = function(r) {
|
|
|
12155
12157
|
}
|
|
12156
12158
|
if (!x.length)
|
|
12157
12159
|
return t.pathname = null, t.search ? t.path = "/" + t.search : t.path = null, t.href = t.format(), t;
|
|
12158
|
-
for (var O = x.slice(-1)[0],
|
|
12159
|
-
O = x[z], O === "." ? x.splice(z, 1) : O === ".." ? (x.splice(z, 1),
|
|
12160
|
+
for (var O = x.slice(-1)[0], j = (t.host || r.host || x.length > 1) && (O === "." || O === "..") || O === "", V = 0, z = x.length; z >= 0; z--)
|
|
12161
|
+
O = x[z], O === "." ? x.splice(z, 1) : O === ".." ? (x.splice(z, 1), V++) : V && (x.splice(z, 1), V--);
|
|
12160
12162
|
if (!S && !E)
|
|
12161
|
-
for (;
|
|
12163
|
+
for (; V--; V)
|
|
12162
12164
|
x.unshift("..");
|
|
12163
|
-
S && x[0] !== "" && (!x[0] || x[0].charAt(0) !== "/") && x.unshift(""),
|
|
12165
|
+
S && x[0] !== "" && (!x[0] || x[0].charAt(0) !== "/") && x.unshift(""), j && x.join("/").substr(-1) !== "/" && x.push("");
|
|
12164
12166
|
var me = x[0] === "" || x[0] && x[0].charAt(0) === "/";
|
|
12165
12167
|
if (U) {
|
|
12166
12168
|
t.hostname = t.host = me ? "" : x.length ? x.shift() : "";
|
|
@@ -12207,7 +12209,7 @@ var lm = "_self", hm = function(r) {
|
|
|
12207
12209
|
fm(c);
|
|
12208
12210
|
var u = this._generateRandom(128);
|
|
12209
12211
|
pm(u);
|
|
12210
|
-
var l = this._generateChallenge(u), d = "S256", p = this._scopes.join(" "), m = Object.entries(
|
|
12212
|
+
var l = this._generateChallenge(u), d = "S256", p = this._scopes.join(" "), m = Object.entries(Te(Te({ redirect_uri: n, response_type: e, client_id: i, identity_provider: s, scope: p, state: c }, e === "code" ? { code_challenge: l } : {}), e === "code" ? { code_challenge_method: d } : {})).map(function(b) {
|
|
12211
12213
|
var S = St(b, 2), E = S[0], x = S[1];
|
|
12212
12214
|
return encodeURIComponent(E) + "=" + encodeURIComponent(x);
|
|
12213
12215
|
}).join("&"), g = "https://" + t + "/oauth2/authorize?" + m;
|
|
@@ -12218,21 +12220,21 @@ var lm = "_self", hm = function(r) {
|
|
|
12218
12220
|
return Z(this, function(x) {
|
|
12219
12221
|
switch (x.label) {
|
|
12220
12222
|
case 0:
|
|
12221
|
-
return t = (
|
|
12222
|
-
return
|
|
12223
|
-
}).reduce(function(
|
|
12224
|
-
var F, O = St(U, 2),
|
|
12225
|
-
return
|
|
12226
|
-
}, { code: void 0 }).code, n =
|
|
12223
|
+
return t = (Kt(e).query || "").split("&").map(function(R) {
|
|
12224
|
+
return R.split("=");
|
|
12225
|
+
}).reduce(function(R, U) {
|
|
12226
|
+
var F, O = St(U, 2), j = O[0], V = O[1];
|
|
12227
|
+
return Te(Te({}, R), (F = {}, F[j] = V, F));
|
|
12228
|
+
}, { code: void 0 }).code, n = Kt(e).pathname || "/", i = Kt(this._config.redirectSignIn).pathname || "/", !t || n !== i ? [
|
|
12227
12229
|
2
|
|
12228
12230
|
/*return*/
|
|
12229
|
-
] : (s = "https://" + this._config.domain + "/oauth2/token", Li("codeFlow", {}, "Retrieving tokens from " + s), o = fr(this._config) ? this._cognitoClientId : this._config.clientID, a = fr(this._config) ? this._config.redirectSignIn : this._config.redirectUri, c = gm(), u =
|
|
12231
|
+
] : (s = "https://" + this._config.domain + "/oauth2/token", Li("codeFlow", {}, "Retrieving tokens from " + s), o = fr(this._config) ? this._cognitoClientId : this._config.clientID, a = fr(this._config) ? this._config.redirectSignIn : this._config.redirectUri, c = gm(), u = Te({
|
|
12230
12232
|
grant_type: "authorization_code",
|
|
12231
12233
|
code: t,
|
|
12232
12234
|
client_id: o,
|
|
12233
12235
|
redirect_uri: a
|
|
12234
|
-
}, c ? { code_verifier: c } : {}), Pr.debug("Calling token endpoint: " + s + " with", u), l = Object.entries(u).map(function(
|
|
12235
|
-
var U = St(
|
|
12236
|
+
}, c ? { code_verifier: c } : {}), Pr.debug("Calling token endpoint: " + s + " with", u), l = Object.entries(u).map(function(R) {
|
|
12237
|
+
var U = St(R, 2), F = U[0], O = U[1];
|
|
12236
12238
|
return encodeURIComponent(F) + "=" + encodeURIComponent(O);
|
|
12237
12239
|
}).join("&"), d = {
|
|
12238
12240
|
category: Zi.Auth,
|
|
@@ -12261,11 +12263,11 @@ var lm = "_self", hm = function(r) {
|
|
|
12261
12263
|
return J(this, void 0, void 0, function() {
|
|
12262
12264
|
var t, n, i;
|
|
12263
12265
|
return Z(this, function(s) {
|
|
12264
|
-
return t = (
|
|
12266
|
+
return t = (Kt(e).hash || "#").substr(1).split("&").map(function(o) {
|
|
12265
12267
|
return o.split("=");
|
|
12266
12268
|
}).reduce(function(o, a) {
|
|
12267
12269
|
var c, u = St(a, 2), l = u[0], d = u[1];
|
|
12268
|
-
return
|
|
12270
|
+
return Te(Te({}, o), (c = {}, c[l] = d, c));
|
|
12269
12271
|
}, {
|
|
12270
12272
|
id_token: void 0,
|
|
12271
12273
|
access_token: void 0
|
|
@@ -12282,12 +12284,12 @@ var lm = "_self", hm = function(r) {
|
|
|
12282
12284
|
return Z(this, function(u) {
|
|
12283
12285
|
switch (u.label) {
|
|
12284
12286
|
case 0:
|
|
12285
|
-
if (u.trys.push([0, 5, , 6]), t = e ?
|
|
12287
|
+
if (u.trys.push([0, 5, , 6]), t = e ? Te(Te({}, (Kt(e).hash || "#").substr(1).split("&").map(function(l) {
|
|
12286
12288
|
return l.split("=");
|
|
12287
12289
|
}).reduce(function(l, d) {
|
|
12288
12290
|
var p = St(d, 2), m = p[0], g = p[1];
|
|
12289
12291
|
return l[m] = g, l;
|
|
12290
|
-
}, {})), (
|
|
12292
|
+
}, {})), (Kt(e).query || "").split("&").map(function(l) {
|
|
12291
12293
|
return l.split("=");
|
|
12292
12294
|
}).reduce(function(l, d) {
|
|
12293
12295
|
var p = St(d, 2), m = p[0], g = p[1];
|
|
@@ -12296,11 +12298,11 @@ var lm = "_self", hm = function(r) {
|
|
|
12296
12298
|
throw new Error(i);
|
|
12297
12299
|
return s = this._validateState(t), Pr.debug("Starting " + this._config.responseType + " flow with " + e), this._config.responseType !== "code" ? [3, 2] : (o = [{}], [4, this._handleCodeFlow(e)]);
|
|
12298
12300
|
case 1:
|
|
12299
|
-
return [2,
|
|
12301
|
+
return [2, Te.apply(void 0, [Te.apply(void 0, o.concat([u.sent()])), { state: s }])];
|
|
12300
12302
|
case 2:
|
|
12301
12303
|
return a = [{}], [4, this._handleImplicitFlow(e)];
|
|
12302
12304
|
case 3:
|
|
12303
|
-
return [2,
|
|
12305
|
+
return [2, Te.apply(void 0, [Te.apply(void 0, a.concat([u.sent()])), { state: s }])];
|
|
12304
12306
|
case 4:
|
|
12305
12307
|
return [3, 6];
|
|
12306
12308
|
case 5:
|
|
@@ -12338,9 +12340,9 @@ var lm = "_self", hm = function(r) {
|
|
|
12338
12340
|
t += i[Math.round(Math.random() * (i.length - 1))];
|
|
12339
12341
|
return t;
|
|
12340
12342
|
}, r.prototype._generateChallenge = function(e) {
|
|
12341
|
-
var t = new
|
|
12343
|
+
var t = new Jt.Sha256();
|
|
12342
12344
|
t.update(e);
|
|
12343
|
-
var n = t.digestSync(), i =
|
|
12345
|
+
var n = t.digestSync(), i = se.Buffer.from(n).toString("base64"), s = this._base64URL(i);
|
|
12344
12346
|
return s;
|
|
12345
12347
|
}, r.prototype._base64URL = function(e) {
|
|
12346
12348
|
return e.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
@@ -12368,11 +12370,11 @@ const vm = ym, bm = function(r) {
|
|
|
12368
12370
|
} else if (!Pt().isNode)
|
|
12369
12371
|
throw new Error("Not supported");
|
|
12370
12372
|
};
|
|
12371
|
-
var
|
|
12373
|
+
var Ce;
|
|
12372
12374
|
(function(r) {
|
|
12373
12375
|
r.DEFAULT_MSG = "Authentication Error", r.EMPTY_EMAIL = "Email cannot be empty", r.EMPTY_PHONE = "Phone number cannot be empty", r.EMPTY_USERNAME = "Username cannot be empty", r.INVALID_USERNAME = "The username should either be a string or one of the sign in types", r.EMPTY_PASSWORD = "Password cannot be empty", r.EMPTY_CODE = "Confirmation code cannot be empty", r.SIGN_UP_ERROR = "Error creating account", r.NO_MFA = "No valid MFA method provided", r.INVALID_MFA = "Invalid MFA type", r.EMPTY_CHALLENGE = "Challenge response cannot be empty", r.NO_USER_SESSION = "Failed to get the session because the user is empty", r.NETWORK_ERROR = "Network Error", r.DEVICE_CONFIG = "Device tracking has not been configured in this User Pool", r.AUTOSIGNIN_ERROR = "Please use your credentials to sign in";
|
|
12374
|
-
})(
|
|
12375
|
-
var wm = new ft("AuthError"),
|
|
12376
|
+
})(Ce || (Ce = {}));
|
|
12377
|
+
var wm = new ft("AuthError"), jt = (
|
|
12376
12378
|
/** @class */
|
|
12377
12379
|
function(r) {
|
|
12378
12380
|
tu(e, r);
|
|
@@ -12391,10 +12393,10 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12391
12393
|
return n.constructor = e, Object.setPrototypeOf(n, e.prototype), n.name = "NoUserPoolError", n;
|
|
12392
12394
|
}
|
|
12393
12395
|
return e;
|
|
12394
|
-
}(
|
|
12396
|
+
}(jt)
|
|
12395
12397
|
), Sm = {
|
|
12396
12398
|
noConfig: {
|
|
12397
|
-
message:
|
|
12399
|
+
message: Ce.DEFAULT_MSG,
|
|
12398
12400
|
log: `
|
|
12399
12401
|
Error: Amplify has not been configured correctly.
|
|
12400
12402
|
This error is typically caused by one of the following scenarios:
|
|
@@ -12407,7 +12409,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12407
12409
|
`
|
|
12408
12410
|
},
|
|
12409
12411
|
missingAuthConfig: {
|
|
12410
|
-
message:
|
|
12412
|
+
message: Ce.DEFAULT_MSG,
|
|
12411
12413
|
log: `
|
|
12412
12414
|
Error: Amplify has not been configured correctly.
|
|
12413
12415
|
The configuration object is missing required auth properties.
|
|
@@ -12420,45 +12422,45 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12420
12422
|
`
|
|
12421
12423
|
},
|
|
12422
12424
|
emptyUsername: {
|
|
12423
|
-
message:
|
|
12425
|
+
message: Ce.EMPTY_USERNAME
|
|
12424
12426
|
},
|
|
12425
12427
|
// TODO: should include a list of valid sign-in types
|
|
12426
12428
|
invalidUsername: {
|
|
12427
|
-
message:
|
|
12429
|
+
message: Ce.INVALID_USERNAME
|
|
12428
12430
|
},
|
|
12429
12431
|
emptyPassword: {
|
|
12430
|
-
message:
|
|
12432
|
+
message: Ce.EMPTY_PASSWORD
|
|
12431
12433
|
},
|
|
12432
12434
|
emptyCode: {
|
|
12433
|
-
message:
|
|
12435
|
+
message: Ce.EMPTY_CODE
|
|
12434
12436
|
},
|
|
12435
12437
|
signUpError: {
|
|
12436
|
-
message:
|
|
12438
|
+
message: Ce.SIGN_UP_ERROR,
|
|
12437
12439
|
log: "The first parameter should either be non-null string or object"
|
|
12438
12440
|
},
|
|
12439
12441
|
noMFA: {
|
|
12440
|
-
message:
|
|
12442
|
+
message: Ce.NO_MFA
|
|
12441
12443
|
},
|
|
12442
12444
|
invalidMFA: {
|
|
12443
|
-
message:
|
|
12445
|
+
message: Ce.INVALID_MFA
|
|
12444
12446
|
},
|
|
12445
12447
|
emptyChallengeResponse: {
|
|
12446
|
-
message:
|
|
12448
|
+
message: Ce.EMPTY_CHALLENGE
|
|
12447
12449
|
},
|
|
12448
12450
|
noUserSession: {
|
|
12449
|
-
message:
|
|
12451
|
+
message: Ce.NO_USER_SESSION
|
|
12450
12452
|
},
|
|
12451
12453
|
deviceConfig: {
|
|
12452
|
-
message:
|
|
12454
|
+
message: Ce.DEVICE_CONFIG
|
|
12453
12455
|
},
|
|
12454
12456
|
networkError: {
|
|
12455
|
-
message:
|
|
12457
|
+
message: Ce.NETWORK_ERROR
|
|
12456
12458
|
},
|
|
12457
12459
|
autoSignInError: {
|
|
12458
|
-
message:
|
|
12460
|
+
message: Ce.AUTOSIGNIN_ERROR
|
|
12459
12461
|
},
|
|
12460
12462
|
default: {
|
|
12461
|
-
message:
|
|
12463
|
+
message: Ce.DEFAULT_MSG
|
|
12462
12464
|
}
|
|
12463
12465
|
}, I = new ft("AuthClass"), Qo = "aws.cognito.signin.user.admin", xm = 10 * 1e3, Em = typeof Symbol != "undefined" && typeof Symbol.for == "function" ? Symbol.for("amplify_default") : "@@amplify_default", G = function(r, e, t) {
|
|
12464
12466
|
xt.dispatch("auth", { event: r, data: e, message: t }, "Auth", Em);
|
|
@@ -12526,7 +12528,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12526
12528
|
});
|
|
12527
12529
|
var x = c ? fr(this._config.oauth) ? c : c.awsCognito : void 0;
|
|
12528
12530
|
if (x) {
|
|
12529
|
-
var
|
|
12531
|
+
var R = Object.assign({
|
|
12530
12532
|
cognitoClientId: o,
|
|
12531
12533
|
UserPoolId: s,
|
|
12532
12534
|
domain: x.domain,
|
|
@@ -12539,14 +12541,14 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12539
12541
|
clientMetadata: g
|
|
12540
12542
|
}, x.options);
|
|
12541
12543
|
this._oAuthHandler = new vm({
|
|
12542
|
-
scopes:
|
|
12543
|
-
config:
|
|
12544
|
-
cognitoClientId:
|
|
12544
|
+
scopes: R.scopes,
|
|
12545
|
+
config: R,
|
|
12546
|
+
cognitoClientId: R.cognitoClientId
|
|
12545
12547
|
});
|
|
12546
12548
|
var U = {};
|
|
12547
12549
|
bm(function(O) {
|
|
12548
|
-
var
|
|
12549
|
-
U[
|
|
12550
|
+
var j = O.url;
|
|
12551
|
+
U[j] || (U[j] = !0, t._handleAuthResponse(j));
|
|
12550
12552
|
});
|
|
12551
12553
|
}
|
|
12552
12554
|
if (G("configured", null, "The Auth category has been configured successfully"), !this.autoSignInInitiated && typeof this._storage.getItem == "function") {
|
|
@@ -12574,18 +12576,18 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12574
12576
|
x && Object.keys(x).map(function(U) {
|
|
12575
12577
|
l.push(new Or({ Name: U, Value: x[U] }));
|
|
12576
12578
|
});
|
|
12577
|
-
var
|
|
12578
|
-
|
|
12579
|
+
var R = e.validationData;
|
|
12580
|
+
R && (d = [], Object.keys(R).map(function(U) {
|
|
12579
12581
|
d.push(new Or({
|
|
12580
12582
|
Name: U,
|
|
12581
|
-
Value:
|
|
12583
|
+
Value: R[U]
|
|
12582
12584
|
}));
|
|
12583
12585
|
})), m = (s = e.autoSignIn) !== null && s !== void 0 ? s : { enabled: !1 }, m.enabled && (this._storage.setItem("amplify-auto-sign-in", "true"), g = (o = m.validationData) !== null && o !== void 0 ? o : {}, b = (a = m.clientMetaData) !== null && a !== void 0 ? a : {});
|
|
12584
12586
|
} else
|
|
12585
12587
|
return this.rejectAuthError(X.SignUpError);
|
|
12586
12588
|
return c ? u ? (I.debug("signUp attrs:", l), I.debug("signUp validation data:", d), new Promise(function(U, F) {
|
|
12587
|
-
t.userPool.signUp(c, u, l, d, function(O,
|
|
12588
|
-
O ? (G("signUp_failure", O, c + " failed to signup"), F(O)) : (G("signUp",
|
|
12589
|
+
t.userPool.signUp(c, u, l, d, function(O, j) {
|
|
12590
|
+
O ? (G("signUp_failure", O, c + " failed to signup"), F(O)) : (G("signUp", j, c + " has signed up successfully"), m.enabled && t.handleAutoSignIn(c, u, g, b, j), U(j));
|
|
12589
12591
|
}, p);
|
|
12590
12592
|
})) : this.rejectAuthError(X.EmptyPassword) : this.rejectAuthError(X.EmptyUsername);
|
|
12591
12593
|
}, r.prototype.handleAutoSignIn = function(e, t, n, i, s) {
|
|
@@ -12943,20 +12945,20 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
12943
12945
|
I.debug("Set user mfa success", b), I.debug("Caching the latest user data into local"), e.getUserData(function(S, E) {
|
|
12944
12946
|
return J(l, void 0, void 0, function() {
|
|
12945
12947
|
var x;
|
|
12946
|
-
return Z(this, function(
|
|
12947
|
-
switch (
|
|
12948
|
+
return Z(this, function(R) {
|
|
12949
|
+
switch (R.label) {
|
|
12948
12950
|
case 0:
|
|
12949
12951
|
if (!S)
|
|
12950
12952
|
return [3, 5];
|
|
12951
12953
|
if (I.debug("getting user data failed", S), !this.isSessionInvalid(S))
|
|
12952
12954
|
return [3, 4];
|
|
12953
|
-
|
|
12955
|
+
R.label = 1;
|
|
12954
12956
|
case 1:
|
|
12955
|
-
return
|
|
12957
|
+
return R.trys.push([1, 3, , 4]), [4, this.cleanUpInvalidSession(e)];
|
|
12956
12958
|
case 2:
|
|
12957
|
-
return
|
|
12959
|
+
return R.sent(), [3, 4];
|
|
12958
12960
|
case 3:
|
|
12959
|
-
return x =
|
|
12961
|
+
return x = R.sent(), m(new Error("Session is invalid due to: " + S.message + " and failed to clean up invalid session: " + x.message)), [
|
|
12960
12962
|
2
|
|
12961
12963
|
/*return*/
|
|
12962
12964
|
];
|
|
@@ -13319,8 +13321,8 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13319
13321
|
}, xm);
|
|
13320
13322
|
xt.listen("auth", S);
|
|
13321
13323
|
function S(E) {
|
|
13322
|
-
var x = E.payload,
|
|
13323
|
-
(
|
|
13324
|
+
var x = E.payload, R = x.event;
|
|
13325
|
+
(R === "cognitoHostedUI" || R === "cognitoHostedUI_failure") && (I.debug("OAuth signIn resolved: " + R), clearTimeout(b), xt.remove("auth", S), g());
|
|
13324
13326
|
}
|
|
13325
13327
|
})]) : [3, 2];
|
|
13326
13328
|
case 1:
|
|
@@ -13342,38 +13344,38 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13342
13344
|
if (c = this._config.clientMetadata, u = o.getAccessToken().decodePayload().scope, l = u === void 0 ? "" : u, l.split(" ").includes(Qo))
|
|
13343
13345
|
s.getUserData(function(g, b) {
|
|
13344
13346
|
return J(p, void 0, void 0, function() {
|
|
13345
|
-
var S, E, x,
|
|
13346
|
-
return Z(this, function(
|
|
13347
|
-
switch (
|
|
13347
|
+
var S, E, x, R, U, F, O;
|
|
13348
|
+
return Z(this, function(j) {
|
|
13349
|
+
switch (j.label) {
|
|
13348
13350
|
case 0:
|
|
13349
13351
|
if (!g)
|
|
13350
13352
|
return [3, 7];
|
|
13351
13353
|
if (I.debug("getting user data failed", g), !this.isSessionInvalid(g))
|
|
13352
13354
|
return [3, 5];
|
|
13353
|
-
|
|
13355
|
+
j.label = 1;
|
|
13354
13356
|
case 1:
|
|
13355
|
-
return
|
|
13357
|
+
return j.trys.push([1, 3, , 4]), [4, this.cleanUpInvalidSession(s)];
|
|
13356
13358
|
case 2:
|
|
13357
|
-
return
|
|
13359
|
+
return j.sent(), [3, 4];
|
|
13358
13360
|
case 3:
|
|
13359
|
-
return S =
|
|
13361
|
+
return S = j.sent(), i(new Error("Session is invalid due to: " + g.message + " and failed to clean up invalid session: " + S.message)), [
|
|
13360
13362
|
2
|
|
13361
13363
|
/*return*/
|
|
13362
13364
|
];
|
|
13363
13365
|
case 4:
|
|
13364
13366
|
return i(g), [3, 6];
|
|
13365
13367
|
case 5:
|
|
13366
|
-
n(s),
|
|
13368
|
+
n(s), j.label = 6;
|
|
13367
13369
|
case 6:
|
|
13368
13370
|
return [
|
|
13369
13371
|
2
|
|
13370
13372
|
/*return*/
|
|
13371
13373
|
];
|
|
13372
13374
|
case 7:
|
|
13373
|
-
for (E = b.PreferredMfaSetting || "NOMFA", x = [],
|
|
13375
|
+
for (E = b.PreferredMfaSetting || "NOMFA", x = [], R = 0; R < b.UserAttributes.length; R++)
|
|
13374
13376
|
U = {
|
|
13375
|
-
Name: b.UserAttributes[
|
|
13376
|
-
Value: b.UserAttributes[
|
|
13377
|
+
Name: b.UserAttributes[R].Name,
|
|
13378
|
+
Value: b.UserAttributes[R].Value
|
|
13377
13379
|
}, F = new Or(U), x.push(F);
|
|
13378
13380
|
return O = this.attributesToObject(x), Object.assign(s, { attributes: O, preferredMFA: E }), [2, n(s)];
|
|
13379
13381
|
}
|
|
@@ -13414,7 +13416,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13414
13416
|
throw n = a.sent(), I.debug("Failed to sync cache info into memory", n), n;
|
|
13415
13417
|
case 4:
|
|
13416
13418
|
try {
|
|
13417
|
-
i = JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")), i && (t =
|
|
13419
|
+
i = JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")), i && (t = Te(Te({}, i.user), { token: i.token }));
|
|
13418
13420
|
} catch (c) {
|
|
13419
13421
|
I.debug("cannot load federated user from auth storage");
|
|
13420
13422
|
}
|
|
@@ -13825,16 +13827,16 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13825
13827
|
case 1:
|
|
13826
13828
|
if (S.trys.push([1, , 8, 9]), this.oAuthFlowInProgress = !0, !this._config.userPoolId)
|
|
13827
13829
|
throw new Error("OAuth responses require a User Pool defined in config");
|
|
13828
|
-
if (G("parsingCallbackUrl", { url: e }, "The callback url is being parsed"), t = e || (Pt().isBrowser ? window.location.href : ""), n = !!(
|
|
13830
|
+
if (G("parsingCallbackUrl", { url: e }, "The callback url is being parsed"), t = e || (Pt().isBrowser ? window.location.href : ""), n = !!(Kt(t).query || "").split("&").map(function(E) {
|
|
13829
13831
|
return E.split("=");
|
|
13830
13832
|
}).find(function(E) {
|
|
13831
|
-
var x = St(E, 1),
|
|
13832
|
-
return
|
|
13833
|
-
}), i = !!(
|
|
13833
|
+
var x = St(E, 1), R = x[0];
|
|
13834
|
+
return R === "code" || R === "error";
|
|
13835
|
+
}), i = !!(Kt(t).hash || "#").substr(1).split("&").map(function(E) {
|
|
13834
13836
|
return E.split("=");
|
|
13835
13837
|
}).find(function(E) {
|
|
13836
|
-
var x = St(E, 1),
|
|
13837
|
-
return
|
|
13838
|
+
var x = St(E, 1), R = x[0];
|
|
13839
|
+
return R === "access_token" || R === "error";
|
|
13838
13840
|
}), !(n || i))
|
|
13839
13841
|
return [3, 7];
|
|
13840
13842
|
this._storage.setItem("amplify-redirected-from-hosted-ui", "true"), S.label = 2;
|
|
@@ -13899,7 +13901,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13899
13901
|
}, r.prototype.noUserPoolErrorHandler = function(e) {
|
|
13900
13902
|
return e && (!e.userPoolId || !e.identityPoolId) ? X.MissingAuthConfig : X.NoConfig;
|
|
13901
13903
|
}, r.prototype.rejectAuthError = function(e) {
|
|
13902
|
-
return Promise.reject(new
|
|
13904
|
+
return Promise.reject(new jt(e));
|
|
13903
13905
|
}, r.prototype.rejectNoUserPool = function() {
|
|
13904
13906
|
var e = this.noUserPoolErrorHandler(this._config);
|
|
13905
13907
|
return Promise.reject(new _m(e));
|
|
@@ -13921,7 +13923,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13921
13923
|
i(o);
|
|
13922
13924
|
},
|
|
13923
13925
|
onFailure: function(o) {
|
|
13924
|
-
o.code === "InvalidParameterException" ? s(new
|
|
13926
|
+
o.code === "InvalidParameterException" ? s(new jt(X.DeviceConfig)) : o.code === "NetworkError" ? s(new jt(X.NetworkError)) : s(o);
|
|
13925
13927
|
}
|
|
13926
13928
|
});
|
|
13927
13929
|
})];
|
|
@@ -13946,7 +13948,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13946
13948
|
i(o);
|
|
13947
13949
|
},
|
|
13948
13950
|
onFailure: function(o) {
|
|
13949
|
-
o.code === "InvalidParameterException" ? s(new
|
|
13951
|
+
o.code === "InvalidParameterException" ? s(new jt(X.DeviceConfig)) : o.code === "NetworkError" ? s(new jt(X.NetworkError)) : s(o);
|
|
13950
13952
|
}
|
|
13951
13953
|
});
|
|
13952
13954
|
})];
|
|
@@ -13981,7 +13983,7 @@ var wm = new ft("AuthError"), Mt = (
|
|
|
13981
13983
|
i(c);
|
|
13982
13984
|
},
|
|
13983
13985
|
onFailure: function(a) {
|
|
13984
|
-
a.code === "InvalidParameterException" ? s(new
|
|
13986
|
+
a.code === "InvalidParameterException" ? s(new jt(X.DeviceConfig)) : a.code === "NetworkError" ? s(new jt(X.NetworkError)) : s(a);
|
|
13985
13987
|
}
|
|
13986
13988
|
};
|
|
13987
13989
|
e.listDevices(Cm, null, o);
|
|
@@ -13998,9 +14000,9 @@ function cu(r, e) {
|
|
|
13998
14000
|
e || r.send("heartbeat"), cu(r, void 0);
|
|
13999
14001
|
}, 24e3);
|
|
14000
14002
|
}
|
|
14001
|
-
const Im = (r) =>
|
|
14002
|
-
return new Promise((e, t) =>
|
|
14003
|
-
const n =
|
|
14003
|
+
const Im = (r) => L(void 0, null, function* () {
|
|
14004
|
+
return new Promise((e, t) => L(void 0, null, function* () {
|
|
14005
|
+
const n = xe.region === "us-east-1" ? "us-east-1:67b00843-e478-4219-a56f-e3cca46708a6" : "us-east-2:beab94d8-ef4e-4291-b1fb-2c9240f84313", i = "execute-api", s = xe.region === "us-east-1" ? "us-east-1" : "us-east-2", o = "wss://e3-ranty-ws.apinaranja.com/notify";
|
|
14004
14006
|
ci.configure({ identityPoolId: n, identityPoolRegion: s, identityPoolService: i });
|
|
14005
14007
|
const a = bs.essentialCredentials(yield bs.currentCredentials());
|
|
14006
14008
|
if (!a.accessKeyId) {
|
|
@@ -14182,7 +14184,7 @@ class Om extends Pm {
|
|
|
14182
14184
|
const hu = ({ finisher: r, descriptor: e }) => (t, n) => {
|
|
14183
14185
|
var i;
|
|
14184
14186
|
if (n === void 0) {
|
|
14185
|
-
const s = (i = t.originalKey) !== null && i !== void 0 ? i : t.key, o = e != null ? { kind: "method", placement: "prototype", key: s, descriptor: e(t.key) } : ir(
|
|
14187
|
+
const s = (i = t.originalKey) !== null && i !== void 0 ? i : t.key, o = e != null ? { kind: "method", placement: "prototype", key: s, descriptor: e(t.key) } : ir(Mt({}, t), { key: s });
|
|
14186
14188
|
return r != null && (o.finisher = function(a) {
|
|
14187
14189
|
r(a, s);
|
|
14188
14190
|
}), o;
|
|
@@ -14203,7 +14205,7 @@ function Um({ context: r }) {
|
|
|
14203
14205
|
e.addInitializer((a) => {
|
|
14204
14206
|
n.set(a, new Om(a, { context: r }));
|
|
14205
14207
|
});
|
|
14206
|
-
const i = Object.getOwnPropertyDescriptor(e.prototype, t), s = i == null ? void 0 : i.set, o = ir(
|
|
14208
|
+
const i = Object.getOwnPropertyDescriptor(e.prototype, t), s = i == null ? void 0 : i.set, o = ir(Mt({}, i), { set: function(a) {
|
|
14207
14209
|
var c;
|
|
14208
14210
|
(c = n.get(this)) === null || c === void 0 || c.setValue(a), s && s.call(this, a);
|
|
14209
14211
|
} });
|
|
@@ -14234,103 +14236,112 @@ const km = (r, e, t, n) => ({
|
|
|
14234
14236
|
},
|
|
14235
14237
|
srcDpaId: r
|
|
14236
14238
|
});
|
|
14237
|
-
function
|
|
14239
|
+
function Bt() {
|
|
14238
14240
|
dispatchEvent(new Event("errorOnClick2pay"));
|
|
14239
14241
|
}
|
|
14240
14242
|
function Nm(r, e) {
|
|
14241
|
-
return
|
|
14243
|
+
return L(this, null, function* () {
|
|
14242
14244
|
try {
|
|
14243
14245
|
console.log("init payload", e);
|
|
14244
14246
|
const t = yield r.init(e);
|
|
14245
14247
|
return console.log("init result", t), t;
|
|
14246
14248
|
} catch (t) {
|
|
14247
|
-
console.error(t.details),
|
|
14249
|
+
console.error(t.details), Bt();
|
|
14248
14250
|
}
|
|
14249
14251
|
});
|
|
14250
14252
|
}
|
|
14251
14253
|
function Bm(r) {
|
|
14252
|
-
return
|
|
14254
|
+
return L(this, null, function* () {
|
|
14253
14255
|
try {
|
|
14254
14256
|
const e = yield r.getCards();
|
|
14255
14257
|
return console.log("getCards", e), e;
|
|
14256
14258
|
} catch (e) {
|
|
14257
|
-
throw console.error(e.details),
|
|
14259
|
+
throw console.error(e.details), Bt(), e;
|
|
14258
14260
|
}
|
|
14259
14261
|
});
|
|
14260
14262
|
}
|
|
14261
14263
|
function Fm(r, e) {
|
|
14262
|
-
return
|
|
14264
|
+
return L(this, null, function* () {
|
|
14263
14265
|
try {
|
|
14264
14266
|
const t = yield r.idLookup({
|
|
14265
14267
|
email: e
|
|
14266
14268
|
});
|
|
14267
14269
|
return console.log("idLookup", t), t;
|
|
14268
14270
|
} catch (t) {
|
|
14269
|
-
return console.error(t.details),
|
|
14271
|
+
return console.error(t.details), Bt(), {
|
|
14270
14272
|
consumerPresent: !1
|
|
14271
14273
|
};
|
|
14272
14274
|
}
|
|
14273
14275
|
});
|
|
14274
14276
|
}
|
|
14275
14277
|
function $m(r) {
|
|
14276
|
-
return
|
|
14278
|
+
return L(this, null, function* () {
|
|
14277
14279
|
try {
|
|
14278
14280
|
const e = yield r.initiateValidation();
|
|
14279
14281
|
return console.log("initiateValidation", e), e;
|
|
14280
14282
|
} catch (e) {
|
|
14281
|
-
throw console.error(e.details),
|
|
14283
|
+
throw console.error(e.details), Bt(), e;
|
|
14282
14284
|
}
|
|
14283
14285
|
});
|
|
14284
14286
|
}
|
|
14285
14287
|
function Mm(r, e) {
|
|
14286
|
-
return
|
|
14288
|
+
return L(this, null, function* () {
|
|
14287
14289
|
try {
|
|
14288
14290
|
const t = yield r.encryptCard(e);
|
|
14289
14291
|
return console.log("encryptCardHandler", t), t;
|
|
14290
14292
|
} catch (t) {
|
|
14291
|
-
console.error(t.details),
|
|
14293
|
+
console.error(t.details), Bt();
|
|
14292
14294
|
}
|
|
14293
14295
|
});
|
|
14294
14296
|
}
|
|
14295
14297
|
function Lm(r, e) {
|
|
14296
|
-
return
|
|
14298
|
+
return L(this, null, function* () {
|
|
14297
14299
|
try {
|
|
14298
14300
|
const t = yield r.validate({ value: e });
|
|
14299
14301
|
return console.log("validateHandler", t), t;
|
|
14300
14302
|
} catch (t) {
|
|
14301
|
-
console.error(t.details),
|
|
14303
|
+
console.error(t.details), Bt();
|
|
14302
14304
|
}
|
|
14303
14305
|
return [];
|
|
14304
14306
|
});
|
|
14305
14307
|
}
|
|
14306
14308
|
function jm(r, e) {
|
|
14307
|
-
return
|
|
14309
|
+
return L(this, null, function* () {
|
|
14308
14310
|
try {
|
|
14309
14311
|
const t = yield r.checkoutWithNewCard(e);
|
|
14310
14312
|
return console.log("checkoutWithNewCardHandler", t), t;
|
|
14311
14313
|
} catch (t) {
|
|
14312
|
-
console.error(t.details),
|
|
14314
|
+
console.error(t.details), Bt();
|
|
14313
14315
|
}
|
|
14314
14316
|
});
|
|
14315
14317
|
}
|
|
14316
14318
|
function Vm(r, e) {
|
|
14317
|
-
return
|
|
14319
|
+
return L(this, null, function* () {
|
|
14318
14320
|
try {
|
|
14319
14321
|
const t = yield r.checkoutWithCard(e);
|
|
14320
14322
|
return console.log("checkoutWithCardHandler", t), t;
|
|
14321
14323
|
} catch (t) {
|
|
14322
|
-
throw console.error(t.details),
|
|
14324
|
+
throw console.error(t.details), Bt(), t;
|
|
14323
14325
|
}
|
|
14324
14326
|
});
|
|
14325
14327
|
}
|
|
14326
|
-
const qm = (r) =>
|
|
14327
|
-
|
|
14328
|
-
|
|
14328
|
+
const qm = (r) => L(void 0, null, function* () {
|
|
14329
|
+
try {
|
|
14330
|
+
const e = yield kt.post("sdk/click2pay", r, {
|
|
14331
|
+
headers: { Authorization: xe.token }
|
|
14332
|
+
});
|
|
14333
|
+
return console.log("makeC2PCheckout", e), e.data;
|
|
14334
|
+
} catch (e) {
|
|
14335
|
+
throw console.error(e), Bt(), e;
|
|
14336
|
+
}
|
|
14337
|
+
}), Hm = (r) => r !== "CREDIT" ? "DEBIT" : "CREDIT";
|
|
14338
|
+
var Km = Object.defineProperty, zm = Object.getOwnPropertyDescriptor, ke = (r, e, t, n) => {
|
|
14339
|
+
for (var i = n > 1 ? void 0 : n ? zm(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14329
14340
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14330
|
-
return n && i &&
|
|
14341
|
+
return n && i && Km(e, t, i), i;
|
|
14331
14342
|
};
|
|
14332
14343
|
const vr = "click2pay-context";
|
|
14333
|
-
let
|
|
14344
|
+
let Ae = class r extends Q {
|
|
14334
14345
|
constructor() {
|
|
14335
14346
|
super(...arguments), this.contextData = {
|
|
14336
14347
|
componentsVisibility: {
|
|
@@ -14357,11 +14368,11 @@ let Oe = class r extends Q {
|
|
|
14357
14368
|
totalAmount: "",
|
|
14358
14369
|
quantity: ""
|
|
14359
14370
|
}
|
|
14360
|
-
}, this.paymentRequestId = "", this.dpaName = "", this.dpaId = "", this.locale = "es_AR", this.publicKey = "", this.transactionAmount = 0, this.transactionCurrency = "ARS", this.seller = "", this.description_purchase = "", this.unit_value = "", this.total_amount = "", this.quantity = "", this.
|
|
14371
|
+
}, this.paymentRequestId = "", this.dpaName = "", this.dpaId = "", this.locale = "es_AR", this.publicKey = "", this.transactionAmount = 0, this.transactionCurrency = "ARS", this.seller = "", this.description_purchase = "", this.unit_value = "", this.total_amount = "", this.quantity = "", this._isLoading = !0;
|
|
14361
14372
|
}
|
|
14362
14373
|
firstUpdated(e) {
|
|
14363
|
-
return
|
|
14364
|
-
xr(r.prototype, this, "firstUpdated").call(this, e), yield
|
|
14374
|
+
return L(this, null, function* () {
|
|
14375
|
+
xr(r.prototype, this, "firstUpdated").call(this, e), yield xe.createToken(this.publicKey), yield this.getPaymentRequest(), this._isLoading = !1, this.contextData.installmentsData = yield Wl(this.contextData.paymentRequest), this.contextData = ir(Mt({}, this.contextData), {
|
|
14365
14376
|
locale: this.locale,
|
|
14366
14377
|
dpaId: this.dpaId,
|
|
14367
14378
|
rememberMe: !0,
|
|
@@ -14370,7 +14381,7 @@ let Oe = class r extends Q {
|
|
|
14370
14381
|
});
|
|
14371
14382
|
}
|
|
14372
14383
|
getPaymentRequest() {
|
|
14373
|
-
return
|
|
14384
|
+
return L(this, null, function* () {
|
|
14374
14385
|
yield bl(this.paymentRequestId).then((e) => {
|
|
14375
14386
|
const t = e.response;
|
|
14376
14387
|
this.contextData.paymentRequest = t, this.contextData.orderInfo.seller = t.seller.fantasy_name, this.contextData.orderInfo.totalAmount = t.transactions[0].amount.value, this.contextData.orderInfo.descriptionPurchase = t.transactions[0].products[0].description, this.contextData.orderInfo.unitValue = t.transactions[0].products[0].unit_price.value, this.contextData.orderInfo.quantity = t.transactions[0].products[0].quantity;
|
|
@@ -14398,14 +14409,27 @@ let Oe = class r extends Q {
|
|
|
14398
14409
|
this.contextData.componentsVisibility.showInstallmentPlan = !1;
|
|
14399
14410
|
}), this.addEventListener("setCardTypeAndBrand", (e) => {
|
|
14400
14411
|
const t = e;
|
|
14401
|
-
this.contextData.cardBrand = t.detail.brand.toUpperCase(), this.contextData.cardType =
|
|
14402
|
-
}), this.addEventListener("
|
|
14412
|
+
this.contextData.cardBrand = t.detail.brand.toUpperCase(), this.contextData.cardType = Hm(t.detail.type).toUpperCase();
|
|
14413
|
+
}), this.addEventListener("checkoutCompleted", (e) => {
|
|
14414
|
+
const t = e;
|
|
14415
|
+
this._checkoutResponse = t.detail.checkoutResponse;
|
|
14416
|
+
}), this.addEventListener("triggerC2PCheckout", () => L(this, null, function* () {
|
|
14417
|
+
var t, n, i, s;
|
|
14418
|
+
const e = {
|
|
14419
|
+
merchantTransactionId: (n = (t = this._checkoutResponse) == null ? void 0 : t.headers["merchant-transaction-id"]) != null ? n : "",
|
|
14420
|
+
srcDpaId: this.dpaId,
|
|
14421
|
+
srcCorrelationId: (s = (i = this._checkoutResponse) == null ? void 0 : i.checkoutResponseData.srcCorrelationId) != null ? s : "",
|
|
14422
|
+
transactionAmount: this.transactionAmount,
|
|
14423
|
+
transactionCurrencyCode: this.transactionCurrency
|
|
14424
|
+
};
|
|
14425
|
+
yield qm(e);
|
|
14426
|
+
})), this.addEventListener("newCardSelected", (e) => L(this, null, function* () {
|
|
14403
14427
|
const t = e;
|
|
14404
14428
|
if (console.log("newCardSelected on click2pay context", e), t.detail.srcDigitalCardId) {
|
|
14405
14429
|
console.log("srcDigitalCardId set on click2pay context", e), this.contextData.srcDigitalCardId = t.detail.srcDigitalCardId, delete this.contextData.encryptedCardData, this.contextData.componentsVisibility.showInstallmentPlan = !0;
|
|
14406
14430
|
return;
|
|
14407
14431
|
}
|
|
14408
|
-
this.
|
|
14432
|
+
this._isLoading = !0, delete this.contextData.srcDigitalCardId;
|
|
14409
14433
|
const [n, i] = t.detail.expired.split("/"), s = yield Sa(t.detail.creditNumber.slice(0, 6));
|
|
14410
14434
|
console.log("binData", s), this.contextData.cardBrand = s.response.data.bines.brand, this.contextData.cardType = s.response.data.bines.card.type;
|
|
14411
14435
|
const o = {
|
|
@@ -14429,7 +14453,7 @@ let Oe = class r extends Q {
|
|
|
14429
14453
|
this.contextData.encryptedCardData = yield Mm(
|
|
14430
14454
|
this.contextData.mcService,
|
|
14431
14455
|
o
|
|
14432
|
-
), this.
|
|
14456
|
+
), this._isLoading = !1, this.contextData.componentsVisibility.showInstallmentPlan = !0;
|
|
14433
14457
|
}));
|
|
14434
14458
|
}
|
|
14435
14459
|
_getMasterSDKUrl() {
|
|
@@ -14443,74 +14467,77 @@ let Oe = class r extends Q {
|
|
|
14443
14467
|
return km(this.dpaId, this.dpaName, this.locale, e);
|
|
14444
14468
|
}
|
|
14445
14469
|
render() {
|
|
14446
|
-
return
|
|
14470
|
+
return P`
|
|
14447
14471
|
<div>
|
|
14448
14472
|
<app-home
|
|
14449
14473
|
masterLibUrl="${this._getMasterSDKUrl()}"
|
|
14450
14474
|
.initPayload="${this._getInitPayload()}"
|
|
14451
|
-
.isLoading="${this.
|
|
14475
|
+
.isLoading="${this._isLoading}"
|
|
14452
14476
|
></app-home>
|
|
14453
14477
|
</div>
|
|
14454
14478
|
`;
|
|
14455
14479
|
}
|
|
14456
14480
|
};
|
|
14457
|
-
|
|
14481
|
+
ke([
|
|
14458
14482
|
Um({ context: vr }),
|
|
14459
14483
|
w()
|
|
14460
|
-
],
|
|
14461
|
-
|
|
14484
|
+
], Ae.prototype, "contextData", 2);
|
|
14485
|
+
ke([
|
|
14462
14486
|
w({ type: String })
|
|
14463
|
-
],
|
|
14464
|
-
|
|
14487
|
+
], Ae.prototype, "paymentRequestId", 2);
|
|
14488
|
+
ke([
|
|
14465
14489
|
w({ type: String })
|
|
14466
|
-
],
|
|
14467
|
-
|
|
14490
|
+
], Ae.prototype, "dpaName", 2);
|
|
14491
|
+
ke([
|
|
14468
14492
|
w({ type: String })
|
|
14469
|
-
],
|
|
14470
|
-
|
|
14493
|
+
], Ae.prototype, "dpaId", 2);
|
|
14494
|
+
ke([
|
|
14471
14495
|
w({ type: String })
|
|
14472
|
-
],
|
|
14473
|
-
|
|
14496
|
+
], Ae.prototype, "locale", 2);
|
|
14497
|
+
ke([
|
|
14474
14498
|
w({ type: String })
|
|
14475
|
-
],
|
|
14476
|
-
|
|
14499
|
+
], Ae.prototype, "publicKey", 2);
|
|
14500
|
+
ke([
|
|
14477
14501
|
w({ type: Number })
|
|
14478
|
-
],
|
|
14479
|
-
|
|
14502
|
+
], Ae.prototype, "transactionAmount", 2);
|
|
14503
|
+
ke([
|
|
14480
14504
|
w({ type: String })
|
|
14481
|
-
],
|
|
14482
|
-
|
|
14505
|
+
], Ae.prototype, "transactionCurrency", 2);
|
|
14506
|
+
ke([
|
|
14483
14507
|
w({ type: String })
|
|
14484
|
-
],
|
|
14485
|
-
|
|
14508
|
+
], Ae.prototype, "seller", 2);
|
|
14509
|
+
ke([
|
|
14486
14510
|
w({ type: String })
|
|
14487
|
-
],
|
|
14488
|
-
|
|
14511
|
+
], Ae.prototype, "description_purchase", 2);
|
|
14512
|
+
ke([
|
|
14489
14513
|
w({ type: String })
|
|
14490
|
-
],
|
|
14491
|
-
|
|
14514
|
+
], Ae.prototype, "unit_value", 2);
|
|
14515
|
+
ke([
|
|
14492
14516
|
w({ type: String })
|
|
14493
|
-
],
|
|
14494
|
-
|
|
14517
|
+
], Ae.prototype, "total_amount", 2);
|
|
14518
|
+
ke([
|
|
14495
14519
|
w({ type: String })
|
|
14496
|
-
],
|
|
14497
|
-
|
|
14520
|
+
], Ae.prototype, "quantity", 2);
|
|
14521
|
+
ke([
|
|
14498
14522
|
$()
|
|
14499
|
-
],
|
|
14500
|
-
|
|
14523
|
+
], Ae.prototype, "_isLoading", 2);
|
|
14524
|
+
ke([
|
|
14525
|
+
$()
|
|
14526
|
+
], Ae.prototype, "_checkoutResponse", 2);
|
|
14527
|
+
Ae = ke([
|
|
14501
14528
|
ee("click2pay-context")
|
|
14502
|
-
],
|
|
14503
|
-
var
|
|
14504
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14529
|
+
], Ae);
|
|
14530
|
+
var Gm = Object.defineProperty, Wm = Object.getOwnPropertyDescriptor, br = (r, e, t, n) => {
|
|
14531
|
+
for (var i = n > 1 ? void 0 : n ? Wm(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14505
14532
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14506
|
-
return n && i &&
|
|
14533
|
+
return n && i && Gm(e, t, i), i;
|
|
14507
14534
|
};
|
|
14508
14535
|
let Rt = class r extends Q {
|
|
14509
14536
|
constructor() {
|
|
14510
14537
|
super(...arguments), this.hasPrevState = !1, this.selectedInstallment = "", this._isButtonDisabled = !0;
|
|
14511
14538
|
}
|
|
14512
14539
|
connectedCallback() {
|
|
14513
|
-
return
|
|
14540
|
+
return L(this, null, function* () {
|
|
14514
14541
|
xr(r.prototype, this, "connectedCallback").call(this);
|
|
14515
14542
|
});
|
|
14516
14543
|
}
|
|
@@ -14518,9 +14545,9 @@ let Rt = class r extends Q {
|
|
|
14518
14545
|
super.updated(e), this._isButtonDisabled = this.selectedInstallment.trim() === "";
|
|
14519
14546
|
}
|
|
14520
14547
|
_renderOptionPanel(e) {
|
|
14521
|
-
return
|
|
14548
|
+
return P`
|
|
14522
14549
|
<div class="card-plan__content-subtitle">
|
|
14523
|
-
${e.has_interest ? "" :
|
|
14550
|
+
${e.has_interest ? "" : P`<span class="card-plan__no-interest">Sin interés</span>`}
|
|
14524
14551
|
<div class="card-plan__items-circle">
|
|
14525
14552
|
<input
|
|
14526
14553
|
type="radio"
|
|
@@ -14585,7 +14612,7 @@ let Rt = class r extends Q {
|
|
|
14585
14612
|
this.dispatchEvent(e);
|
|
14586
14613
|
}
|
|
14587
14614
|
render() {
|
|
14588
|
-
return
|
|
14615
|
+
return P`
|
|
14589
14616
|
<div class="card-plan__card-style">
|
|
14590
14617
|
<div class="card-plan__content">
|
|
14591
14618
|
${this._getInstallmentPlans().map((e) => this._renderOptionPanel(e))}
|
|
@@ -14637,19 +14664,19 @@ br([
|
|
|
14637
14664
|
Rt = br([
|
|
14638
14665
|
ee("plan-component")
|
|
14639
14666
|
], Rt);
|
|
14640
|
-
const
|
|
14667
|
+
const Ym = `body{background:#ffffff}.clickeable{cursor:pointer}*{user-select:none}.card-summary__title{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:24px;font-weight:600;margin-top:120px;margin-left:440px}.card-summary__subtitle{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:20px;font-weight:600;margin-left:440px}.card-summary__cards{display:flex;gap:1.25rem;justify-content:center}.card-summary__card-style{background:#ffffff;border:1px solid #e5e7eb;border-radius:16px;padding:16px 24px;width:483px}.card-summary__text{border-radius:8px;padding:10px}.card-summary__items-circle{display:flex;align-items:center;justify-content:flex-start;margin-top:20px}.font_semibold{font-family:Inter,Arial,"sans-serif";font-size:16px;font-weight:600;margin-bottom:0;margin-top:0}.font_regular{color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:16px;font-weight:400}.font_regular p{margin-top:0;margin-bottom:0}.card-summary__buttons{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:10px}.card-summary__button{background:none;border-radius:8px;border:2px solid #652bdf!important;color:#652bdf;height:40px;padding:10px 16px;width:111px}.card-summary__button-continue{background:#652bdf;border-radius:.5rem;border:2px solid #652bdf;color:#fff;height:40px;padding:10px 16px;width:111px}.margin_bottom{margin-bottom:0}.margin_top{margin-top:0}.card-form__footer-summary{padding-top:320px}
|
|
14641
14668
|
`;
|
|
14642
|
-
var
|
|
14643
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14669
|
+
var Jm = Object.defineProperty, Zm = Object.getOwnPropertyDescriptor, _n = (r, e, t, n) => {
|
|
14670
|
+
for (var i = n > 1 ? void 0 : n ? Zm(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14644
14671
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14645
|
-
return n && i &&
|
|
14672
|
+
return n && i && Jm(e, t, i), i;
|
|
14646
14673
|
};
|
|
14647
14674
|
let gr = class extends Q {
|
|
14648
14675
|
constructor() {
|
|
14649
14676
|
super(...arguments), this.title = "Crédito terminada en 8785", this.subtitle_price = "1 CUOTA de $ 900.00", this.subtitle = "CFT: 0.00 % + IVA | Precio financiado: $ 900,00", this.image = "https://ranty-sdk-js.naranjax.com/images/ctp-footer.svg";
|
|
14650
14677
|
}
|
|
14651
14678
|
render() {
|
|
14652
|
-
return
|
|
14679
|
+
return P`
|
|
14653
14680
|
<div class="card-summary">
|
|
14654
14681
|
<h1 class="card-summary__title">Pago con tarjeta de crédito o débito</h1>
|
|
14655
14682
|
<h2 class="card-summary__subtitle">Resumen del pago</h2>
|
|
@@ -14690,7 +14717,7 @@ let gr = class extends Q {
|
|
|
14690
14717
|
}
|
|
14691
14718
|
};
|
|
14692
14719
|
gr.styles = te`
|
|
14693
|
-
${re(
|
|
14720
|
+
${re(Ym)}
|
|
14694
14721
|
`;
|
|
14695
14722
|
_n([
|
|
14696
14723
|
w()
|
|
@@ -14707,12 +14734,12 @@ _n([
|
|
|
14707
14734
|
gr = _n([
|
|
14708
14735
|
ee("payment-summary")
|
|
14709
14736
|
], gr);
|
|
14710
|
-
const
|
|
14737
|
+
const Xm = `body{background:#ffffff}.clickeable{cursor:pointer}*{user-select:none}.font-inter{font-family:Inter,Arial,"sans-serif";font-size:17px;font-weight:400;color:#fff}.font-inter-bold{font-family:Inter,Arial,"sans-serif";font-size:24px;font-weight:600;color:#fff}.cards-grid{display:flex;grid-gap:80px}.flip-card{height:400px;width:260px;perspective:2000px}.flip-card-inner{position:relative;width:100%;height:100%;box-shadow:0 4px 20px #0003;border-radius:14px;transition:all .55s cubic-bezier(.1,.22,.8,1.13);transform-style:preserve-3d}.flip-card-front,.flip-card-back{position:absolute;width:100%;height:100%;border-radius:14px;backface-visibility:hidden}.flip-card-front{display:flex;background:#fe5000;flex-direction:column;text-align:start;justify-content:center}.flip-card-back{background:#fe5000;transform:rotateY(-180deg)}.flip-card:active .flip-card-inner,.rotar{transform:rotateY(-180deg)}.flip-title{display:flex;flex-direction:column;align-items:flex-start;padding-top:20px}.flip-text{padding-left:20px}.flip-text-middle{display:flex;margin-top:30px;padding-left:20px}.flip-text-below{display:flex;padding-left:20px}.flip-group-expired{margin-top:160px}.mt{margin-top:0;margin-bottom:0}.pl{padding-left:18px}.pr{padding-right:18px}.cvv{padding-left:15px}.imagen{width:150px;padding-left:15px}
|
|
14711
14738
|
`;
|
|
14712
|
-
var
|
|
14713
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14739
|
+
var Qm = Object.defineProperty, ey = Object.getOwnPropertyDescriptor, wr = (r, e, t, n) => {
|
|
14740
|
+
for (var i = n > 1 ? void 0 : n ? ey(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14714
14741
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14715
|
-
return n && i &&
|
|
14742
|
+
return n && i && Qm(e, t, i), i;
|
|
14716
14743
|
};
|
|
14717
14744
|
let Ot = class extends Q {
|
|
14718
14745
|
constructor() {
|
|
@@ -14723,7 +14750,7 @@ let Ot = class extends Q {
|
|
|
14723
14750
|
}, this.cardNumber = "", this.cardName = "", this.cardMonth = "", this.cardCCV = "", this.customClass = "";
|
|
14724
14751
|
}
|
|
14725
14752
|
render() {
|
|
14726
|
-
return
|
|
14753
|
+
return P` <div class="cards-grid">
|
|
14727
14754
|
<div class="flip-card">
|
|
14728
14755
|
<div class="${"flip-card-inner " + this.customClass}">
|
|
14729
14756
|
<div class="flip-card-front">
|
|
@@ -14756,7 +14783,7 @@ let Ot = class extends Q {
|
|
|
14756
14783
|
}
|
|
14757
14784
|
};
|
|
14758
14785
|
Ot.styles = te`
|
|
14759
|
-
${re(
|
|
14786
|
+
${re(Xm)}
|
|
14760
14787
|
`;
|
|
14761
14788
|
wr([
|
|
14762
14789
|
w({ type: Object })
|
|
@@ -14779,12 +14806,12 @@ wr([
|
|
|
14779
14806
|
Ot = wr([
|
|
14780
14807
|
ee("credit-card")
|
|
14781
14808
|
], Ot);
|
|
14782
|
-
const
|
|
14809
|
+
const ty = `body{background:#ffffff}.clickeable{cursor:pointer}.panel-container{padding:12px 32px 8px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px}.continue{width:238px;display:flex;justify-content:flex-end}.back{width:248px;display:flex;justify-content:flex-start;align-items:flex-center}.panel-id-selection{display:flex;gap:15px}.panel-id-selection>*{flex:1;max-width:50%}.card-form__title-form{font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:500;color:#888}.credit-info{display:flex}.credit-info input-credit-card{flex:1}.credit-info img{margin-bottom:20px;margin-left:20px}.panel-title{display:flex;margin-bottom:23px;align-items:end}.panel-title span{color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:12px;font-weight:400;padding-top:10px}.panel-title img{width:120px}.card-form__input-icon{display:flex;gap:12px}.card-form__buttons{display:flex;justify-content:space-between;margin-bottom:10px;margin-top:30px}@media only screen and (max-width: 800px){.panel-container{padding:8px 10px}.card-form__buttons{margin-top:0}}
|
|
14783
14810
|
`;
|
|
14784
|
-
var
|
|
14785
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14811
|
+
var ry = Object.defineProperty, ny = Object.getOwnPropertyDescriptor, qe = (r, e, t, n) => {
|
|
14812
|
+
for (var i = n > 1 ? void 0 : n ? ny(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14786
14813
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14787
|
-
return n && i &&
|
|
14814
|
+
return n && i && ry(e, t, i), i;
|
|
14788
14815
|
};
|
|
14789
14816
|
let Ue = class extends Q {
|
|
14790
14817
|
constructor() {
|
|
@@ -14815,7 +14842,7 @@ let Ue = class extends Q {
|
|
|
14815
14842
|
}
|
|
14816
14843
|
renderForm() {
|
|
14817
14844
|
var r;
|
|
14818
|
-
return
|
|
14845
|
+
return P`
|
|
14819
14846
|
<form>
|
|
14820
14847
|
<div class="credit-info">
|
|
14821
14848
|
<input-credit-card
|
|
@@ -14884,7 +14911,7 @@ let Ue = class extends Q {
|
|
|
14884
14911
|
`;
|
|
14885
14912
|
}
|
|
14886
14913
|
render() {
|
|
14887
|
-
return
|
|
14914
|
+
return P`
|
|
14888
14915
|
<div class="container">
|
|
14889
14916
|
<div class="panel-container">
|
|
14890
14917
|
<div class="panel-title">
|
|
@@ -14898,7 +14925,7 @@ let Ue = class extends Q {
|
|
|
14898
14925
|
}
|
|
14899
14926
|
};
|
|
14900
14927
|
Ue.styles = te`
|
|
14901
|
-
${re(
|
|
14928
|
+
${re(ty)}
|
|
14902
14929
|
`;
|
|
14903
14930
|
qe([
|
|
14904
14931
|
w({ type: Boolean })
|
|
@@ -14943,19 +14970,19 @@ qe([
|
|
|
14943
14970
|
Ue = qe([
|
|
14944
14971
|
ee("form-credit-card")
|
|
14945
14972
|
], Ue);
|
|
14946
|
-
const
|
|
14973
|
+
const iy = `body{background:#ffffff}.clickeable{cursor:pointer}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;width:50px;height:50px;margin-bottom:130px}.spinner .path{stroke:#652bdf;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}.container{display:flex;justify-content:center;align-items:center;height:100%;width:468.45px}span{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:500}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}.loading-container{margin-top:65px}@media only screen and (max-width: 660px){.container{width:300px}.loading-container{margin-top:163px}}
|
|
14947
14974
|
`;
|
|
14948
|
-
var
|
|
14949
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14975
|
+
var sy = Object.defineProperty, oy = Object.getOwnPropertyDescriptor, Ks = (r, e, t, n) => {
|
|
14976
|
+
for (var i = n > 1 ? void 0 : n ? oy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14950
14977
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14951
|
-
return n && i &&
|
|
14978
|
+
return n && i && sy(e, t, i), i;
|
|
14952
14979
|
};
|
|
14953
14980
|
let pn = class extends Q {
|
|
14954
14981
|
constructor() {
|
|
14955
14982
|
super(...arguments), this.message = "", this.customClass = "";
|
|
14956
14983
|
}
|
|
14957
14984
|
render() {
|
|
14958
|
-
return
|
|
14985
|
+
return P`
|
|
14959
14986
|
<div class="${"container " + this.customClass}">
|
|
14960
14987
|
<svg class="spinner" viewBox="0 0 50 50">
|
|
14961
14988
|
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
|
|
@@ -14966,7 +14993,7 @@ let pn = class extends Q {
|
|
|
14966
14993
|
}
|
|
14967
14994
|
};
|
|
14968
14995
|
pn.styles = te`
|
|
14969
|
-
${re(
|
|
14996
|
+
${re(iy)}
|
|
14970
14997
|
`;
|
|
14971
14998
|
Ks([
|
|
14972
14999
|
w({ type: String })
|
|
@@ -14977,14 +15004,14 @@ Ks([
|
|
|
14977
15004
|
pn = Ks([
|
|
14978
15005
|
ee("app-loading")
|
|
14979
15006
|
], pn);
|
|
14980
|
-
const
|
|
15007
|
+
const ay = `body{background:#ffffff}.clickeable{cursor:pointer}.btn{height:47px;user-select:none;width:144px}button[disabled]{cursor:not-allowed;background:#6a6a6a;border:#6a6a6a;color:#fff}.primary{background:#652bdf;border:2px solid #652bdf;color:#fff}.secondary{background:white;border:2px solid #652bdf;color:#652bdf}.ter{background:#1f7cd5;border:2px solid #1f7cd5;color:#fff;height:36px;user-select:none;width:150px}.info{height:47px;user-select:none;width:412px;background:#652bdf;border:2px solid #652bdf;color:#fff}.success{color:#000;background:MediumAquamarine}.regular{font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:19px;cursor:pointer;outline:0;border-radius:8px}.semibold{font-family:Inter,Arial,"sans-serif";font-weight:600}@media only screen and (min-width: 360px) and (max-width: 559px){.info{height:47px;user-select:none;width:319px;background:#652bdf;border:2px solid #652bdf;color:#fff}}@media only screen and (min-width: 560px) and (max-width: 800px){.info{height:47px;user-select:none;width:364px;background:#652bdf;border:2px solid #652bdf;color:#fff}}
|
|
14981
15008
|
`;
|
|
14982
|
-
var
|
|
14983
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15009
|
+
var uy = Object.defineProperty, cy = Object.getOwnPropertyDescriptor, Jr = (r, e, t, n) => {
|
|
15010
|
+
for (var i = n > 1 ? void 0 : n ? cy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
14984
15011
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14985
|
-
return n && i &&
|
|
15012
|
+
return n && i && uy(e, t, i), i;
|
|
14986
15013
|
};
|
|
14987
|
-
let
|
|
15014
|
+
let tr = class extends Q {
|
|
14988
15015
|
constructor() {
|
|
14989
15016
|
super(...arguments), this.title = "", this.color = "primary", this.font = "regular", this.type = "submit", this.buttonDisabled = !1;
|
|
14990
15017
|
}
|
|
@@ -14999,7 +15026,7 @@ let Qt = class extends Q {
|
|
|
14999
15026
|
this.dispatchEvent(r);
|
|
15000
15027
|
}
|
|
15001
15028
|
render() {
|
|
15002
|
-
return
|
|
15029
|
+
return P`
|
|
15003
15030
|
<button
|
|
15004
15031
|
class="btn ${this.color} ${this.font}"
|
|
15005
15032
|
?disabled=${this.buttonDisabled}
|
|
@@ -15011,33 +15038,33 @@ let Qt = class extends Q {
|
|
|
15011
15038
|
`;
|
|
15012
15039
|
}
|
|
15013
15040
|
};
|
|
15014
|
-
|
|
15015
|
-
${re(
|
|
15041
|
+
tr.styles = te`
|
|
15042
|
+
${re(ay)}
|
|
15016
15043
|
`;
|
|
15017
15044
|
Jr([
|
|
15018
15045
|
w({ type: String, attribute: "button-title" })
|
|
15019
|
-
],
|
|
15046
|
+
], tr.prototype, "title", 2);
|
|
15020
15047
|
Jr([
|
|
15021
15048
|
w({ type: String, attribute: "button-color" })
|
|
15022
|
-
],
|
|
15049
|
+
], tr.prototype, "color", 2);
|
|
15023
15050
|
Jr([
|
|
15024
15051
|
w({ type: String, attribute: "button-text" })
|
|
15025
|
-
],
|
|
15052
|
+
], tr.prototype, "font", 2);
|
|
15026
15053
|
Jr([
|
|
15027
15054
|
w({ type: String, attribute: "button-type" })
|
|
15028
|
-
],
|
|
15055
|
+
], tr.prototype, "type", 2);
|
|
15029
15056
|
Jr([
|
|
15030
15057
|
w({ type: Boolean })
|
|
15031
|
-
],
|
|
15032
|
-
|
|
15058
|
+
], tr.prototype, "buttonDisabled", 2);
|
|
15059
|
+
tr = Jr([
|
|
15033
15060
|
ee("my-button")
|
|
15034
|
-
],
|
|
15035
|
-
const
|
|
15061
|
+
], tr);
|
|
15062
|
+
const ly = `body{background:#ffffff}.clickeable{cursor:pointer}*{box-sizing:border-box;padding:0;margin:0;user-select:none}* gray{background:gray}p{max-width:600px}.items{max-width:1100px;margin:0 auto}.container{gap:24px;display:flex;flex-direction:row-reverse;justify-content:center}.container__items{display:flex;flex-direction:column;gap:24px}.panel-container{background:#ffffff;border:1px solid #e5e7eb;border-radius:20px;display:flex;justify-content:center;align-items:center;max-width:500px;min-height:600px}.panel{background:#ffffff;border-radius:20px;width:100%}.form{padding:0 18px}.card-form__select{align-self:start;border-top:none;border-left:none;border-right:none;color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;padding-top:8px;width:100%;height:28px}.credit-details__select-type{color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;min-width:135px}.credit-details__select-type :focus-visible{outline:none}.card-form__placeholder{align-self:end;color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400}.container__span{color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:12px;padding-top:20px}.credit-details{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-height:95px;max-width:425px}.card-form__buttons{display:flex;justify-content:center}.card__description{align-items:center;display:flex;justify-content:space-between}:host{--flipped-class: "flipped"}.error{color:red;padding:5px;padding-left:0!important;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;font-weight:200;position:relative;max-height:40px;bottom:35px}.input-credit-card{max-height:85px}.left{left:218px}.validate-card{position:relative;bottom:30px;color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400}.bottom{bottom:59px}.bottomDni{bottom:48px}.left{left:221px}@media only screen and (max-width: 660px){.panel-container{grid-column:1/span 12}.card-form__buttons{flex-direction:column;align-items:center;margin-top:20px}.items{padding-top:0!important;padding-bottom:0!important}#container{display:flex;flex-direction:column;align-items:center;padding:24px}.container__items{display:flex;flex-direction:column;align-items:center}.credit-details{width:292px;max-height:110px}.left{left:150px}.form{padding:30px 18px 18px 24px}}
|
|
15036
15063
|
`;
|
|
15037
|
-
var
|
|
15038
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15064
|
+
var hy = Object.defineProperty, fy = Object.getOwnPropertyDescriptor, be = (r, e, t, n) => {
|
|
15065
|
+
for (var i = n > 1 ? void 0 : n ? fy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15039
15066
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15040
|
-
return n && i &&
|
|
15067
|
+
return n && i && hy(e, t, i), i;
|
|
15041
15068
|
};
|
|
15042
15069
|
let pe = class extends Q {
|
|
15043
15070
|
constructor() {
|
|
@@ -15050,13 +15077,13 @@ let pe = class extends Q {
|
|
|
15050
15077
|
}
|
|
15051
15078
|
wsPaymentResponse() {
|
|
15052
15079
|
this.isLoading = !0, Im(cn.paymentRequestResponse.payment_request_id).then((r) => {
|
|
15053
|
-
this.isLoading = !0, r.status === "FAILURE_PROCESSED" ? (this.isLoading = !1,
|
|
15080
|
+
this.isLoading = !0, r.status === "FAILURE_PROCESSED" ? (this.isLoading = !1, Gt.handleServiceError("PAYMENT_RESULT", "REJECTED.")) : r.status === "SUCCESS_PROCESSED" && (this.isLoading = !1, Gt.handleServiceError("PAYMENT_RESULT", "SUCCESS."));
|
|
15054
15081
|
}).catch((r) => {
|
|
15055
15082
|
this.isLoading = !1, this.error = !0, this.formLoadingMessage = "", console.log(r);
|
|
15056
15083
|
});
|
|
15057
15084
|
}
|
|
15058
15085
|
submit(r) {
|
|
15059
|
-
return
|
|
15086
|
+
return L(this, null, function* () {
|
|
15060
15087
|
if (r.preventDefault(), this.formSubmitted = !0, this.formLoadingMessage = "Estamos procesando la transacción", this.inputsComplete() && this.isBrand) {
|
|
15061
15088
|
this.isLoading = !0;
|
|
15062
15089
|
try {
|
|
@@ -15068,7 +15095,7 @@ let pe = class extends Q {
|
|
|
15068
15095
|
});
|
|
15069
15096
|
}
|
|
15070
15097
|
processPayment() {
|
|
15071
|
-
return
|
|
15098
|
+
return L(this, null, function* () {
|
|
15072
15099
|
const r = {
|
|
15073
15100
|
creditNumber: this.creditNumber,
|
|
15074
15101
|
name: this.name,
|
|
@@ -15091,7 +15118,7 @@ let pe = class extends Q {
|
|
|
15091
15118
|
this.isTouched = !0, this.isLoading = !0, this.formLoadingMessage = "Estamos procesando la transacción", this.cleanFiledsInput(), this.requestUpdate();
|
|
15092
15119
|
}
|
|
15093
15120
|
handleError(r) {
|
|
15094
|
-
this.isLoading = !1, this.messageError = r, this.isclientSuccess === !1 ? (this.showError = !0,
|
|
15121
|
+
this.isLoading = !1, this.messageError = r, this.isclientSuccess === !1 ? (this.showError = !0, Gt.handleServiceError("CUSTOMER_VALIDATION", "A client with the document number and date of birth was not found.")) : this.isDirectPaymentSuccess === !1 && Gt.handleServiceError("PAYMENT_PROCESSING", "Error processing payment.");
|
|
15095
15122
|
}
|
|
15096
15123
|
cleanFiledsInput() {
|
|
15097
15124
|
this.creditNumber = "", this.name = "", this.expired = "", this.codSeg = "", this.email = "", this.dni = "", this.dateOfBirth = "", this.passport = "", this.isBrand = !0, this.showError = !0, this.isFlipper = !1, this.formSubmitted = !1, this.isTouched = !1, this.isError = !1, this.requestUpdate();
|
|
@@ -15105,7 +15132,7 @@ let pe = class extends Q {
|
|
|
15105
15132
|
this.selectedDocumentType = e;
|
|
15106
15133
|
}
|
|
15107
15134
|
getValuesDniAndPassport() {
|
|
15108
|
-
return this.selectedDocumentType === "dni" ?
|
|
15135
|
+
return this.selectedDocumentType === "dni" ? P` <input-dni
|
|
15109
15136
|
.dni="${this.dni}"
|
|
15110
15137
|
.formSubmitted="${this.formSubmitted}"
|
|
15111
15138
|
@onChange="${(r) => {
|
|
@@ -15118,9 +15145,9 @@ let pe = class extends Q {
|
|
|
15118
15145
|
this.showError = r.detail.showError;
|
|
15119
15146
|
}}"
|
|
15120
15147
|
></input-dni>
|
|
15121
|
-
${this.formSubmitted && !this.dni ?
|
|
15122
|
-
${this.showError && this.dni ?
|
|
15123
|
-
` :
|
|
15148
|
+
${this.formSubmitted && !this.dni ? P`<div class="error bottomDni left">Tenés que completar el número de dni</div>` : ""}
|
|
15149
|
+
${this.showError && this.dni ? P`<div class="error bottomDni left">Revisá el número, debe ser del titular</div>` : ""}
|
|
15150
|
+
` : P` <input-passport
|
|
15124
15151
|
.passport="${this.passport}"
|
|
15125
15152
|
.formSubmitted="${this.formSubmitted}"
|
|
15126
15153
|
@onChange="${(r) => {
|
|
@@ -15130,11 +15157,11 @@ let pe = class extends Q {
|
|
|
15130
15157
|
this.isTouched = r.detail.touched;
|
|
15131
15158
|
}}"
|
|
15132
15159
|
></input-passport>
|
|
15133
|
-
${this.formSubmitted && !this.passport ?
|
|
15160
|
+
${this.formSubmitted && !this.passport ? P`<div class="error bottom">Tenés que completar el número de pasaporte</div>` : ""}`;
|
|
15134
15161
|
}
|
|
15135
15162
|
renderCreditCard() {
|
|
15136
15163
|
const r = this.isFlipper ? "rotar" : "";
|
|
15137
|
-
return
|
|
15164
|
+
return P`
|
|
15138
15165
|
<div class="container__items-credit">
|
|
15139
15166
|
<credit-card
|
|
15140
15167
|
.cardNumber="${this.creditNumber}"
|
|
@@ -15147,20 +15174,16 @@ let pe = class extends Q {
|
|
|
15147
15174
|
`;
|
|
15148
15175
|
}
|
|
15149
15176
|
renderFormInput() {
|
|
15150
|
-
return
|
|
15151
|
-
${!this.isLoading && !this.error ?
|
|
15177
|
+
return P`
|
|
15178
|
+
${!this.isLoading && !this.error ? P` <div class="form">
|
|
15152
15179
|
<form @submit="${(r) => this.submit(r)}">
|
|
15153
15180
|
<div class="input-credit-card">
|
|
15154
15181
|
<input-credit-card .creditNumber="${this.creditNumber}" .formSubmitted="${this.formSubmitted}"
|
|
15155
|
-
@onChange="${
|
|
15156
|
-
|
|
15157
|
-
}}"
|
|
15158
|
-
@onChangeBlur="${(r) => {
|
|
15159
|
-
this.isError = r.detail.error, this.isTouched = r.detail.touched, this.isBrand = r.detail.isBrand;
|
|
15160
|
-
}}"
|
|
15182
|
+
@onChange="${this.handleCreditCardChange}"
|
|
15183
|
+
@onChangeBlur="${this.handleBlurCreditCardChange}"
|
|
15161
15184
|
></input-credit-card>
|
|
15162
15185
|
</div>
|
|
15163
|
-
${this.formSubmitted && !this.creditNumber ?
|
|
15186
|
+
${this.formSubmitted && !this.creditNumber ? P`<div class="error" id="errorRequired">
|
|
15164
15187
|
Tenés que completar el número de tarjeta
|
|
15165
15188
|
</div>` : ""}
|
|
15166
15189
|
<div class="input-credit-card">
|
|
@@ -15172,7 +15195,7 @@ let pe = class extends Q {
|
|
|
15172
15195
|
this.isError = r.detail.error, this.isTouched = r.detail.isTouched;
|
|
15173
15196
|
}}"
|
|
15174
15197
|
></input-name>
|
|
15175
|
-
${this.formSubmitted && !this.name ?
|
|
15198
|
+
${this.formSubmitted && !this.name ? P`<div class="error" id="errorRequired">Tenés que completar el nombre</div>` : ""}
|
|
15176
15199
|
</div>
|
|
15177
15200
|
<div class="credit-details">
|
|
15178
15201
|
<input-expired .expired="${this.expired}" .formSubmitted="${this.formSubmitted}"
|
|
@@ -15191,8 +15214,8 @@ let pe = class extends Q {
|
|
|
15191
15214
|
this.isError = r.detail.error, this.isTouched = r.detail.touched;
|
|
15192
15215
|
}}"
|
|
15193
15216
|
></input-cod-seg>
|
|
15194
|
-
${this.formSubmitted && !this.expired ?
|
|
15195
|
-
${this.formSubmitted && !this.codSeg ?
|
|
15217
|
+
${this.formSubmitted && !this.expired ? P`<div class="error bottomDni" id="errorRequired"> Tenés que completar la fecha de vencimiento</div>` : ""}
|
|
15218
|
+
${this.formSubmitted && !this.codSeg ? P`<div class="error bottomDni" id="errorRequired">
|
|
15196
15219
|
Tenés que completar el codigo de seguridad
|
|
15197
15220
|
</div>` : ""}
|
|
15198
15221
|
</div>
|
|
@@ -15233,13 +15256,13 @@ let pe = class extends Q {
|
|
|
15233
15256
|
this.showError = r.detail.showError;
|
|
15234
15257
|
}}"
|
|
15235
15258
|
></input-date-of-birth>
|
|
15236
|
-
${this.formSubmitted && !this.email ?
|
|
15259
|
+
${this.formSubmitted && !this.email ? P`<div class="error bottom" id="errorRequired">
|
|
15237
15260
|
Tenés que completar el email
|
|
15238
15261
|
</div>` : ""}
|
|
15239
|
-
${this.formSubmitted && !this.dateOfBirth ?
|
|
15262
|
+
${this.formSubmitted && !this.dateOfBirth ? P`<div class="error bottom" id="errorRequired">
|
|
15240
15263
|
Tenés que completar la fecha de nacimiento
|
|
15241
15264
|
</div>` : ""}
|
|
15242
|
-
${this.showError && this.dateOfBirth ?
|
|
15265
|
+
${this.showError && this.dateOfBirth ? P`<div class="error bottom left" id="errorRequired">
|
|
15243
15266
|
Revisá la fecha, debe ser del titular
|
|
15244
15267
|
</div>` : ""}
|
|
15245
15268
|
</div>
|
|
@@ -15255,11 +15278,19 @@ let pe = class extends Q {
|
|
|
15255
15278
|
></my-button>
|
|
15256
15279
|
</div>
|
|
15257
15280
|
</form>
|
|
15258
|
-
</div>` :
|
|
15281
|
+
</div>` : P` <app-loading .message="${this.formLoadingMessage}"></app-loading>`}
|
|
15259
15282
|
`;
|
|
15260
15283
|
}
|
|
15284
|
+
handleCreditCardChange(r) {
|
|
15285
|
+
const { creditNumber: e, isBrand: t, error: n, touched: i } = r.detail;
|
|
15286
|
+
this.creditNumber = e, this.isBrand = t, this.isError = n, this.isTouched = i;
|
|
15287
|
+
}
|
|
15288
|
+
handleBlurCreditCardChange(r) {
|
|
15289
|
+
const { creditNumber: e, touched: t, error: n } = r.detail;
|
|
15290
|
+
this.creditNumber = e, this.isTouched = t, this.isError = n;
|
|
15291
|
+
}
|
|
15261
15292
|
render() {
|
|
15262
|
-
return
|
|
15293
|
+
return P`
|
|
15263
15294
|
<div class="items">
|
|
15264
15295
|
<div class="container" id="container">
|
|
15265
15296
|
<div class="container__items">${this.renderCreditCard()}</div>
|
|
@@ -15275,7 +15306,7 @@ let pe = class extends Q {
|
|
|
15275
15306
|
}
|
|
15276
15307
|
};
|
|
15277
15308
|
pe.styles = te`
|
|
15278
|
-
${re(
|
|
15309
|
+
${re(ly)}
|
|
15279
15310
|
`;
|
|
15280
15311
|
be([
|
|
15281
15312
|
w({ type: String })
|
|
@@ -15337,12 +15368,12 @@ be([
|
|
|
15337
15368
|
pe = be([
|
|
15338
15369
|
ee("form-rentas")
|
|
15339
15370
|
], pe);
|
|
15340
|
-
const
|
|
15371
|
+
const dy = `body{background:#ffffff}.clickeable{cursor:pointer}*{-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out;-webkit-text-size-adjust:none}.checkbox input[type=checkbox]:checked{accent-color:#040404}.drawerContainer{display:flex;flex-direction:column;text-align:center}.drawerHeader{margin-top:25px}.drawerHeader h2{margin:6px;font-size:16px;font-weight:700;font-family:sans-serif}.mainText{margin:6px;font-weight:100;font-size:14px;font-family:sans-serif}.subText{margin:6px;font-family:sans-serif}.drawerHeader p{margin:6px;font-size:14px;font-weight:500;font-family:sans-serif}.container iframe{border-style:hidden}.inputContainer{margin-top:24px;background-color:#fff;border-radius:10px;display:flex;flex-direction:column;gap:10px;padding:20px}.inputContainer input{height:35px;padding:4px;border-width:1.8px;border-radius:5px;border-color:#7d7d7d}.inputContainer p{font-size:10px;font-weight:lighter;font-family:sans-serif}.checkbox{font-size:14px;font-weight:500;font-family:sans-serif}.footerContainer{position:fixed;bottom:0;width:inherit;padding:5px}.footerContent{display:flex;flex-direction:column}.buttonContinue{background-color:#040404;border:none;border-radius:10px;color:#fff;padding:10px;text-align:center;text-decoration:none;display:inline-block;font-size:14px;margin:4px 2px}.buttonCancel{background-color:transparent;border:none;border-radius:10px;color:#090909;padding:10px;text-align:center;text-decoration:underline;display:inline-block;font-size:14px;margin:4px 2px}.drawer{position:fixed;top:0;right:-320px;height:100%;width:320px;background:#f7f7f7;z-index:1000;-webkit-overflow-scrolling:touch}.visible{right:0}#page-content{margin-left:0;margin-top:50px;width:100%;height:calc(100% - 50px);overflow-x:hidden;overflow-y:scroll;-webkit-overflow-scrolling:touch;padding:20px}#drawer-toggle:checked~#drawer{right:0}#drawer-toggle:checked~#page-content{margin-left:300px}#drawer ul{list-style-type:none}#drawer ul a{display:block;padding:10px;color:#c7c7c7;text-decoration:none}#drawer ul a:hover{color:#fff}.cardIcon{margin-top:80px;margin-left:90px;margin-right:90px}.check{display:inline-block;transform:rotate(45deg);height:24px;width:12px;border-bottom:7px solid #78b13f;border-right:7px solid #78b13f}@media all and (max-width: 350px){#drawer-toggle:checked~#drawer{width:calc(100% - 50px);padding:20px}}
|
|
15341
15372
|
`;
|
|
15342
|
-
var
|
|
15343
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15373
|
+
var py = Object.defineProperty, gy = Object.getOwnPropertyDescriptor, _r = (r, e, t, n) => {
|
|
15374
|
+
for (var i = n > 1 ? void 0 : n ? gy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15344
15375
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15345
|
-
return n && i &&
|
|
15376
|
+
return n && i && py(e, t, i), i;
|
|
15346
15377
|
};
|
|
15347
15378
|
let Ut = class extends Q {
|
|
15348
15379
|
constructor() {
|
|
@@ -15353,7 +15384,7 @@ let Ut = class extends Q {
|
|
|
15353
15384
|
render() {
|
|
15354
15385
|
switch (this.drawerContent) {
|
|
15355
15386
|
case "inputs":
|
|
15356
|
-
return
|
|
15387
|
+
return P`
|
|
15357
15388
|
<nav class="drawer ${this.isVisible ? "visible" : ""}">
|
|
15358
15389
|
<!-- <click2pay-header></click2pay-header>-->
|
|
15359
15390
|
<!-- <div class="drawerHeader">-->
|
|
@@ -15397,7 +15428,7 @@ let Ut = class extends Q {
|
|
|
15397
15428
|
</nav>
|
|
15398
15429
|
`;
|
|
15399
15430
|
case "cardAdded":
|
|
15400
|
-
return
|
|
15431
|
+
return P`
|
|
15401
15432
|
<nav class="drawer ${this.isVisible ? "visible" : ""}">
|
|
15402
15433
|
<click2pay-header></click2pay-header>
|
|
15403
15434
|
<div class="drawerContainer">
|
|
@@ -15414,7 +15445,7 @@ let Ut = class extends Q {
|
|
|
15414
15445
|
</nav>
|
|
15415
15446
|
`;
|
|
15416
15447
|
case "paymentSecured":
|
|
15417
|
-
return
|
|
15448
|
+
return P`
|
|
15418
15449
|
<nav class="drawer ${this.isVisible ? "visible" : ""}">
|
|
15419
15450
|
<click2pay-header></click2pay-header>
|
|
15420
15451
|
<div class="drawerContainer">
|
|
@@ -15434,7 +15465,7 @@ let Ut = class extends Q {
|
|
|
15434
15465
|
}
|
|
15435
15466
|
};
|
|
15436
15467
|
Ut.styles = te`
|
|
15437
|
-
${re(
|
|
15468
|
+
${re(dy)}
|
|
15438
15469
|
`;
|
|
15439
15470
|
_r([
|
|
15440
15471
|
w({ type: Boolean })
|
|
@@ -15457,34 +15488,34 @@ _r([
|
|
|
15457
15488
|
Ut = _r([
|
|
15458
15489
|
ee("drawer-component")
|
|
15459
15490
|
], Ut);
|
|
15460
|
-
const
|
|
15491
|
+
const my = `body{background:#ffffff}.clickeable{cursor:pointer}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;width:50px;height:50px;margin-bottom:130px}.spinner .path{stroke:#652bdf;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}.container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff;z-index:9}span{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:500}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
|
|
15461
15492
|
`;
|
|
15462
|
-
var
|
|
15463
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15493
|
+
var yy = Object.defineProperty, vy = Object.getOwnPropertyDescriptor, zs = (r, e, t, n) => {
|
|
15494
|
+
for (var i = n > 1 ? void 0 : n ? vy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15464
15495
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15465
|
-
return n && i &&
|
|
15496
|
+
return n && i && yy(e, t, i), i;
|
|
15466
15497
|
};
|
|
15467
15498
|
let gn = class extends Q {
|
|
15468
15499
|
constructor() {
|
|
15469
|
-
super(), this.isVisible = !1, this.message = "", this.addEventListener("isLoading", () =>
|
|
15500
|
+
super(), this.isVisible = !1, this.message = "", this.addEventListener("isLoading", () => L(this, null, function* () {
|
|
15470
15501
|
console.log("isLoading"), this.isVisible = !0;
|
|
15471
|
-
})), this.addEventListener("loadingCompleted", () =>
|
|
15502
|
+
})), this.addEventListener("loadingCompleted", () => L(this, null, function* () {
|
|
15472
15503
|
console.log("loadingCompleted"), this.isVisible = !1;
|
|
15473
15504
|
}));
|
|
15474
15505
|
}
|
|
15475
15506
|
render() {
|
|
15476
|
-
return this.isVisible ?
|
|
15507
|
+
return this.isVisible ? P`
|
|
15477
15508
|
<div class="${"container"}">
|
|
15478
15509
|
<svg class="spinner" viewBox="0 0 50 50">
|
|
15479
15510
|
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
|
|
15480
15511
|
</svg>
|
|
15481
15512
|
<span id="message">${this.message}</span>
|
|
15482
15513
|
</div>
|
|
15483
|
-
` :
|
|
15514
|
+
` : P`<!nothing to show here!>`;
|
|
15484
15515
|
}
|
|
15485
15516
|
};
|
|
15486
15517
|
gn.styles = te`
|
|
15487
|
-
${re(
|
|
15518
|
+
${re(my)}
|
|
15488
15519
|
`;
|
|
15489
15520
|
zs([
|
|
15490
15521
|
w({ type: Boolean })
|
|
@@ -15495,14 +15526,14 @@ zs([
|
|
|
15495
15526
|
gn = zs([
|
|
15496
15527
|
ee("click2pay-loading")
|
|
15497
15528
|
], gn);
|
|
15498
|
-
const
|
|
15529
|
+
const by = `body{background:#ffffff}.clickeable{cursor:pointer}.container{display:flex;max-width:500px}.panel-container{padding:20px;background:#ffffff;width:500px;border:1px solid #e5e7eb;border-radius:20px;font-family:Inter,Arial,"sans-serif"}.data-text{margin-top:.5em;margin-bottom:.5em;font-size:13px;font-weight:400;opacity:.5}.title{margin-top:.5em;margin-bottom:.5em}.top-half{padding:5px;border-bottom:solid 1px rgba(147,146,146,.6039215686)}.bottom-half{padding:5px}.button-container{margin-top:24px;display:flex;justify-content:space-between;flex-wrap:wrap}src-card{--src-card-art-width: 54px;--src-card-art-height: 35px}
|
|
15499
15530
|
`;
|
|
15500
|
-
var
|
|
15501
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15531
|
+
var wy = Object.defineProperty, _y = Object.getOwnPropertyDescriptor, Ye = (r, e, t, n) => {
|
|
15532
|
+
for (var i = n > 1 ? void 0 : n ? _y(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15502
15533
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15503
|
-
return n && i &&
|
|
15534
|
+
return n && i && wy(e, t, i), i;
|
|
15504
15535
|
};
|
|
15505
|
-
let
|
|
15536
|
+
let $e = class extends Q {
|
|
15506
15537
|
constructor() {
|
|
15507
15538
|
super(...arguments), this.paymentCardDescriptor = "World Elite Mastercard", this.panLastFour = "", this.maskedEmailAddress = "", this.paymentCardOwner = "", this.cardOwnerDni = "", this.amountOfPayments = "", this.paymentAmount = "", this.paymentTotalAmount = "", this.paymentCFT = "", this.cardArt = "", this.hasPrevState = !1;
|
|
15508
15539
|
}
|
|
@@ -15513,101 +15544,110 @@ let Fe = class extends Q {
|
|
|
15513
15544
|
_dataAssignment() {
|
|
15514
15545
|
this.paymentCFT = this.orderData.total_financial_cost, this.amountOfPayments = this.orderData.name, this.paymentAmount = this.orderData.installment_amount.value, this.paymentTotalAmount = this.orderData.total_amount.value;
|
|
15515
15546
|
}
|
|
15547
|
+
_triggerC2PCheckout() {
|
|
15548
|
+
this.dispatchEvent(new Event("triggerC2PCheckout", { bubbles: !0, composed: !0 }));
|
|
15549
|
+
}
|
|
15516
15550
|
render() {
|
|
15517
|
-
return this._dataAssignment(),
|
|
15551
|
+
return this._dataAssignment(), P`
|
|
15518
15552
|
<div class="container">
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
|
|
15527
|
-
|
|
15528
|
-
|
|
15529
|
-
|
|
15530
|
-
|
|
15531
|
-
|
|
15532
|
-
|
|
15533
|
-
|
|
15534
|
-
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15553
|
+
<div class="panel-container">
|
|
15554
|
+
<div class="top-half">
|
|
15555
|
+
<h4 class="title">Titular de la tarjeta</h4>
|
|
15556
|
+
<p class="data-text">${this.paymentCardOwner}</p>
|
|
15557
|
+
<p class="data-text">DNI: ${this.cardOwnerDni}</p>
|
|
15558
|
+
</div>
|
|
15559
|
+
<div class="bottom-half">
|
|
15560
|
+
<src-card
|
|
15561
|
+
descriptor-name="${this.paymentCardDescriptor}"
|
|
15562
|
+
account-number-suffix="${this.panLastFour}"
|
|
15563
|
+
card-art="${this.cardArt ? this.cardArt : "https://ranty-sdk-js.naranjax.com/images/generic-credit-card.svg"}"
|
|
15564
|
+
></src-card>
|
|
15565
|
+
<p class="data-text">${this.amountOfPayments} DE $${this.paymentAmount}</p>
|
|
15566
|
+
<p class="data-text">
|
|
15567
|
+
CFT: ${this.paymentCFT}% + IVA | Total financiado: $${this.paymentTotalAmount}
|
|
15568
|
+
</p>
|
|
15569
|
+
<div class="button-container">
|
|
15570
|
+
<div>
|
|
15571
|
+
<my-button
|
|
15572
|
+
button-title="Volver"
|
|
15573
|
+
button-type="submit"
|
|
15574
|
+
button-text="regular"
|
|
15575
|
+
?buttonDisabled="${this.hasPrevState}"
|
|
15576
|
+
button-color="secondary"
|
|
15577
|
+
@myClick="${this._back}"
|
|
15578
|
+
></my-button>
|
|
15579
|
+
</div>
|
|
15580
|
+
<div>
|
|
15581
|
+
<my-button
|
|
15582
|
+
button-title="Pagar"
|
|
15583
|
+
button-type="submit"
|
|
15584
|
+
button-text="regular"
|
|
15585
|
+
button-color="primary"
|
|
15586
|
+
@myClick="${this._triggerC2PCheckout}"
|
|
15587
|
+
></my-button>
|
|
15588
|
+
</div>
|
|
15589
|
+
</div>
|
|
15590
|
+
</div>
|
|
15549
15591
|
</div>
|
|
15550
15592
|
</div>
|
|
15551
|
-
</div>
|
|
15552
|
-
</div>
|
|
15553
15593
|
`;
|
|
15554
15594
|
}
|
|
15555
15595
|
};
|
|
15556
|
-
|
|
15557
|
-
${re(
|
|
15596
|
+
$e.styles = te`
|
|
15597
|
+
${re(by)}
|
|
15558
15598
|
`;
|
|
15559
15599
|
Ye([
|
|
15560
15600
|
w({ type: String })
|
|
15561
|
-
],
|
|
15601
|
+
], $e.prototype, "paymentCardDescriptor", 2);
|
|
15562
15602
|
Ye([
|
|
15563
15603
|
w({ type: String })
|
|
15564
|
-
],
|
|
15604
|
+
], $e.prototype, "panLastFour", 2);
|
|
15565
15605
|
Ye([
|
|
15566
15606
|
w({ type: String })
|
|
15567
|
-
],
|
|
15607
|
+
], $e.prototype, "maskedEmailAddress", 2);
|
|
15568
15608
|
Ye([
|
|
15569
15609
|
w({ type: String })
|
|
15570
|
-
],
|
|
15610
|
+
], $e.prototype, "paymentCardOwner", 2);
|
|
15571
15611
|
Ye([
|
|
15572
15612
|
w({ type: String })
|
|
15573
|
-
],
|
|
15613
|
+
], $e.prototype, "cardOwnerDni", 2);
|
|
15574
15614
|
Ye([
|
|
15575
15615
|
w({ type: String })
|
|
15576
|
-
],
|
|
15616
|
+
], $e.prototype, "amountOfPayments", 2);
|
|
15577
15617
|
Ye([
|
|
15578
15618
|
w({ type: String })
|
|
15579
|
-
],
|
|
15619
|
+
], $e.prototype, "paymentAmount", 2);
|
|
15580
15620
|
Ye([
|
|
15581
15621
|
w({ type: String })
|
|
15582
|
-
],
|
|
15622
|
+
], $e.prototype, "paymentTotalAmount", 2);
|
|
15583
15623
|
Ye([
|
|
15584
15624
|
w({ type: String })
|
|
15585
|
-
],
|
|
15625
|
+
], $e.prototype, "paymentCFT", 2);
|
|
15586
15626
|
Ye([
|
|
15587
15627
|
w({ type: String })
|
|
15588
|
-
],
|
|
15628
|
+
], $e.prototype, "cardArt", 2);
|
|
15589
15629
|
Ye([
|
|
15590
15630
|
w()
|
|
15591
|
-
],
|
|
15631
|
+
], $e.prototype, "orderData", 2);
|
|
15592
15632
|
Ye([
|
|
15593
15633
|
w({ type: Boolean })
|
|
15594
|
-
],
|
|
15595
|
-
|
|
15634
|
+
], $e.prototype, "hasPrevState", 2);
|
|
15635
|
+
$e = Ye([
|
|
15596
15636
|
ee("click2pay-order-review")
|
|
15597
|
-
],
|
|
15598
|
-
const
|
|
15637
|
+
], $e);
|
|
15638
|
+
const Sy = `body{background:#ffffff}.clickeable{cursor:pointer}.container{text-align:center;display:flex;border-radius:12px;justify-content:center;align-items:center;flex-direction:column;margin:0 auto;width:600px;height:600px;border:1px solid rgb(229,231,235)}.container .title{font-family:Inter,Arial,"sans-serif";font-weight:600;font-size:16px!important;color:#2b2b2b;margin-top:20px}.container .subtitle{font-family:Inter,Arial,"sans-serif";font-weight:400;font-size:14px!important;color:#2b2b2b;margin-top:20px}.container img{width:60px;height:60px}.button{margin-top:30px}
|
|
15599
15639
|
`;
|
|
15600
|
-
var
|
|
15601
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15640
|
+
var xy = Object.defineProperty, Ey = Object.getOwnPropertyDescriptor, wi = (r, e, t, n) => {
|
|
15641
|
+
for (var i = n > 1 ? void 0 : n ? Ey(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15602
15642
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15603
|
-
return n && i &&
|
|
15643
|
+
return n && i && xy(e, t, i), i;
|
|
15604
15644
|
};
|
|
15605
15645
|
let Lr = class extends Q {
|
|
15606
15646
|
constructor() {
|
|
15607
15647
|
super(...arguments), this.messageError = "No pudimos realizar el pago", this.subtitleError = "No llegó a cobrarse nada. Podés volver a intentarlo. ", this.isVisible = !1;
|
|
15608
15648
|
}
|
|
15609
15649
|
render() {
|
|
15610
|
-
return
|
|
15650
|
+
return P`
|
|
15611
15651
|
<div class="container">
|
|
15612
15652
|
<img src="./error.svg" />
|
|
15613
15653
|
<spa class="title">${this.messageError}</spa>
|
|
@@ -15625,7 +15665,7 @@ let Lr = class extends Q {
|
|
|
15625
15665
|
}
|
|
15626
15666
|
};
|
|
15627
15667
|
Lr.styles = te`
|
|
15628
|
-
${re(
|
|
15668
|
+
${re(Sy)}
|
|
15629
15669
|
`;
|
|
15630
15670
|
wi([
|
|
15631
15671
|
w({ type: String })
|
|
@@ -15639,12 +15679,12 @@ wi([
|
|
|
15639
15679
|
Lr = wi([
|
|
15640
15680
|
ee("click2pay-error")
|
|
15641
15681
|
], Lr);
|
|
15642
|
-
const
|
|
15682
|
+
const Cy = `body{background:#ffffff}.clickeable{cursor:pointer}.src_btn{margin:1rem 0}
|
|
15643
15683
|
`;
|
|
15644
|
-
var
|
|
15645
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15684
|
+
var Ty = Object.defineProperty, Ay = Object.getOwnPropertyDescriptor, Iy = (r, e, t, n) => {
|
|
15685
|
+
for (var i = n > 1 ? void 0 : n ? Ay(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15646
15686
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15647
|
-
return n && i &&
|
|
15687
|
+
return n && i && Ty(e, t, i), i;
|
|
15648
15688
|
};
|
|
15649
15689
|
let ws = class extends Q {
|
|
15650
15690
|
constructor() {
|
|
@@ -15660,7 +15700,7 @@ let ws = class extends Q {
|
|
|
15660
15700
|
console.log("CLICK EVENT: ", r);
|
|
15661
15701
|
}
|
|
15662
15702
|
render() {
|
|
15663
|
-
return
|
|
15703
|
+
return P`
|
|
15664
15704
|
<div class="src_btn">
|
|
15665
15705
|
<src-button card-brands="mastercard,visa"></src-button>
|
|
15666
15706
|
</div>
|
|
@@ -15668,17 +15708,17 @@ let ws = class extends Q {
|
|
|
15668
15708
|
}
|
|
15669
15709
|
};
|
|
15670
15710
|
ws.styles = te`
|
|
15671
|
-
${re(
|
|
15711
|
+
${re(Cy)}
|
|
15672
15712
|
`;
|
|
15673
|
-
ws =
|
|
15713
|
+
ws = Iy([
|
|
15674
15714
|
ee("click2pay-src-btn")
|
|
15675
15715
|
], ws);
|
|
15676
|
-
const
|
|
15716
|
+
const Dy = `body{background:#ffffff}.clickeable{cursor:pointer}.card_list{display:flex;flex-direction:column;background-color:#fff;position:relative;border-width:1px;border-style:solid;border-color:#9797974c;border-radius:12px}.card_list .card_list_input_extension{display:flex;flex-direction:column;text-align:right;padding:20px;width:-webkit-fill-available}.card_list .card_list_input_extension .credit-info{text-align:left;display:flex}.card_list .card_list_input_extension .credit-info input-credit-card{flex:1}.card_list .card_list_input_extension .credit-info img{margin-bottom:20px;margin-left:20px}.card_list .card_list_input_extension .panel-id-selection{text-align:left;display:flex;gap:15px}.card_list .card_list_input_extension .panel-id-selection>*{flex:1;max-width:50%}.card_list .button-container{display:flex;justify-content:space-between}@media only screen and (max-width: 800px){.card_list{width:350px}}
|
|
15677
15717
|
`;
|
|
15678
|
-
var
|
|
15679
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15718
|
+
var Py = Object.defineProperty, Ry = Object.getOwnPropertyDescriptor, st = (r, e, t, n) => {
|
|
15719
|
+
for (var i = n > 1 ? void 0 : n ? Ry(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15680
15720
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15681
|
-
return n && i &&
|
|
15721
|
+
return n && i && Py(e, t, i), i;
|
|
15682
15722
|
};
|
|
15683
15723
|
let je = class r extends Q {
|
|
15684
15724
|
constructor() {
|
|
@@ -15690,7 +15730,7 @@ let je = class r extends Q {
|
|
|
15690
15730
|
this._srcDigitalCardId = t.detail, this._isButtonDisabled = !1, this._showCardForm = !1;
|
|
15691
15731
|
}), this.addEventListener("clickAddCardLink", () => {
|
|
15692
15732
|
this._srcDigitalCardId = "", this._isButtonDisabled = !0, this._showCardForm = !0;
|
|
15693
|
-
}), this.addEventListener("clickSignOutLink", (e) =>
|
|
15733
|
+
}), this.addEventListener("clickSignOutLink", (e) => L(this, null, function* () {
|
|
15694
15734
|
var n;
|
|
15695
15735
|
console.log(e), yield (n = this._contextData) == null ? void 0 : n.mcService.signOut(), location.reload();
|
|
15696
15736
|
}));
|
|
@@ -15700,7 +15740,7 @@ let je = class r extends Q {
|
|
|
15700
15740
|
this.dispatchEvent(e);
|
|
15701
15741
|
}
|
|
15702
15742
|
firstUpdated(e) {
|
|
15703
|
-
return
|
|
15743
|
+
return L(this, null, function* () {
|
|
15704
15744
|
xr(r.prototype, this, "firstUpdated").call(this, e);
|
|
15705
15745
|
const t = this.renderRoot.querySelector("src-card-list");
|
|
15706
15746
|
yield t == null ? void 0 : t.loadCards(this.cards);
|
|
@@ -15730,7 +15770,7 @@ let je = class r extends Q {
|
|
|
15730
15770
|
return this._creditNumber.length >= 16 && this._codSeg.length >= 3 && Ps(this._expired);
|
|
15731
15771
|
}
|
|
15732
15772
|
renderForm() {
|
|
15733
|
-
return
|
|
15773
|
+
return P`
|
|
15734
15774
|
<form>
|
|
15735
15775
|
<div class="credit-info">
|
|
15736
15776
|
<input-credit-card
|
|
@@ -15771,7 +15811,7 @@ let je = class r extends Q {
|
|
|
15771
15811
|
}
|
|
15772
15812
|
render() {
|
|
15773
15813
|
var e;
|
|
15774
|
-
return
|
|
15814
|
+
return P`
|
|
15775
15815
|
<div class="card_list">
|
|
15776
15816
|
<src-card-list
|
|
15777
15817
|
id="srcCardList"
|
|
@@ -15788,7 +15828,7 @@ let je = class r extends Q {
|
|
|
15788
15828
|
background="default"
|
|
15789
15829
|
></src-card-list>
|
|
15790
15830
|
<div class="card_list_input_extension">
|
|
15791
|
-
${this._showCardForm ?
|
|
15831
|
+
${this._showCardForm ? P` ${this.renderForm()} ` : ""}
|
|
15792
15832
|
<div class="button-container">
|
|
15793
15833
|
<my-button
|
|
15794
15834
|
button-title="Volver"
|
|
@@ -15812,7 +15852,7 @@ let je = class r extends Q {
|
|
|
15812
15852
|
}
|
|
15813
15853
|
};
|
|
15814
15854
|
je.styles = te`
|
|
15815
|
-
${re(
|
|
15855
|
+
${re(Dy)}
|
|
15816
15856
|
`;
|
|
15817
15857
|
st([
|
|
15818
15858
|
w({ type: Array })
|
|
@@ -15851,14 +15891,14 @@ st([
|
|
|
15851
15891
|
je = st([
|
|
15852
15892
|
ee("click2pay-card-list")
|
|
15853
15893
|
], je);
|
|
15854
|
-
const
|
|
15894
|
+
const Oy = `body{background:#ffffff}.clickeable{cursor:pointer}.otp_input{display:flex;flex-direction:column;background-color:#fff;position:relative}src-otp-input{--src-btn-border-radius: 10px;--src-otp-input-content-container-margin-bottom: 40px --src-btn-width: 100% }.otp_input_extension{padding-left:28px;border-color:#9797974c;padding-bottom:20px;position:absolute;background-color:#fff;bottom:-30px;width:-webkit-fill-available;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-bottom-width:1px;border-bottom-style:solid;border-left-style:solid;border-left-width:1px;border-right-style:solid;border-right-width:1px}.otp_input_extension my-button{min-height:48px;max-height:64px;min-width:180px}@media only screen and (max-width: 800px){.otp_input{margin-left:0}}
|
|
15855
15895
|
`;
|
|
15856
|
-
var
|
|
15857
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15896
|
+
var Uy = Object.defineProperty, ky = Object.getOwnPropertyDescriptor, Me = (r, e, t, n) => {
|
|
15897
|
+
for (var i = n > 1 ? void 0 : n ? ky(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15858
15898
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15859
|
-
return n && i &&
|
|
15899
|
+
return n && i && Uy(e, t, i), i;
|
|
15860
15900
|
};
|
|
15861
|
-
let
|
|
15901
|
+
let Ie = class r extends Q {
|
|
15862
15902
|
constructor() {
|
|
15863
15903
|
super(), this.icon = "https://ranty-sdk-js.naranjax.com/images/card.svg", this._rememberMe = !1, this._isButtonDisabled = !1, this._showCardForm = !1, this._showC2pOtpInput = !0, this._isError = !1, this._isTouched = !1, this._expired = "", this._codSeg = "", this.addEventListener("otpChanged", (e) => {
|
|
15864
15904
|
const t = e;
|
|
@@ -15893,7 +15933,7 @@ let Ae = class r extends Q {
|
|
|
15893
15933
|
});
|
|
15894
15934
|
}
|
|
15895
15935
|
firstUpdated(e) {
|
|
15896
|
-
return
|
|
15936
|
+
return L(this, null, function* () {
|
|
15897
15937
|
xr(r.prototype, this, "firstUpdated").call(this, e);
|
|
15898
15938
|
const t = this.renderRoot.querySelector("src-otp-input");
|
|
15899
15939
|
console.log("firstUpdated otpOptions", this.otpOptions), console.log("firstUpdated maskedIdentityValue", this.maskedIdentityValue), yield t == null ? void 0 : t.loadSupportedValidationChannels(this.otpOptions), t == null || t.addEventListener("notYouRequested", () => {
|
|
@@ -15909,9 +15949,9 @@ let Ae = class r extends Q {
|
|
|
15909
15949
|
}
|
|
15910
15950
|
render() {
|
|
15911
15951
|
var e;
|
|
15912
|
-
return
|
|
15952
|
+
return P`
|
|
15913
15953
|
<div class="otp_input">
|
|
15914
|
-
${this._showCardForm ?
|
|
15954
|
+
${this._showCardForm ? P` <form-credit-card></form-credit-card>` : P`
|
|
15915
15955
|
<src-otp-input
|
|
15916
15956
|
class='otp_input_inner'
|
|
15917
15957
|
.displayCancelOption='${!1}'
|
|
@@ -15941,68 +15981,68 @@ let Ae = class r extends Q {
|
|
|
15941
15981
|
`;
|
|
15942
15982
|
}
|
|
15943
15983
|
};
|
|
15944
|
-
|
|
15945
|
-
${re(
|
|
15984
|
+
Ie.styles = te`
|
|
15985
|
+
${re(Oy)}
|
|
15946
15986
|
`;
|
|
15947
15987
|
Me([
|
|
15948
15988
|
w({ type: Number })
|
|
15949
|
-
],
|
|
15989
|
+
], Ie.prototype, "otpOptions", 2);
|
|
15950
15990
|
Me([
|
|
15951
15991
|
w({ type: String })
|
|
15952
|
-
],
|
|
15992
|
+
], Ie.prototype, "maskedIdentityValue", 2);
|
|
15953
15993
|
Me([
|
|
15954
15994
|
w()
|
|
15955
|
-
],
|
|
15995
|
+
], Ie.prototype, "icon", 2);
|
|
15956
15996
|
Me([
|
|
15957
15997
|
$()
|
|
15958
|
-
],
|
|
15998
|
+
], Ie.prototype, "_otpValue", 2);
|
|
15959
15999
|
Me([
|
|
15960
16000
|
$()
|
|
15961
|
-
],
|
|
16001
|
+
], Ie.prototype, "_rememberMe", 2);
|
|
15962
16002
|
Me([
|
|
15963
16003
|
$()
|
|
15964
|
-
],
|
|
16004
|
+
], Ie.prototype, "_isButtonDisabled", 2);
|
|
15965
16005
|
Me([
|
|
15966
16006
|
$()
|
|
15967
|
-
],
|
|
16007
|
+
], Ie.prototype, "_showCardForm", 2);
|
|
15968
16008
|
Me([
|
|
15969
16009
|
$()
|
|
15970
|
-
],
|
|
16010
|
+
], Ie.prototype, "_showC2pOtpInput", 2);
|
|
15971
16011
|
Me([
|
|
15972
16012
|
$()
|
|
15973
|
-
],
|
|
16013
|
+
], Ie.prototype, "_isError", 2);
|
|
15974
16014
|
Me([
|
|
15975
16015
|
$()
|
|
15976
|
-
],
|
|
16016
|
+
], Ie.prototype, "_isTouched", 2);
|
|
15977
16017
|
Me([
|
|
15978
16018
|
$()
|
|
15979
|
-
],
|
|
16019
|
+
], Ie.prototype, "_creditNumber", 2);
|
|
15980
16020
|
Me([
|
|
15981
16021
|
$()
|
|
15982
|
-
],
|
|
16022
|
+
], Ie.prototype, "_expired", 2);
|
|
15983
16023
|
Me([
|
|
15984
16024
|
$()
|
|
15985
|
-
],
|
|
16025
|
+
], Ie.prototype, "_codSeg", 2);
|
|
15986
16026
|
Me([
|
|
15987
16027
|
Yr({ context: vr, subscribe: !0 }),
|
|
15988
16028
|
$()
|
|
15989
|
-
],
|
|
15990
|
-
|
|
16029
|
+
], Ie.prototype, "_contextData", 2);
|
|
16030
|
+
Ie = Me([
|
|
15991
16031
|
ee("click2pay-otp-input")
|
|
15992
|
-
],
|
|
15993
|
-
const
|
|
16032
|
+
], Ie);
|
|
16033
|
+
const Ny = `body{background:#ffffff}.clickeable{cursor:pointer}
|
|
15994
16034
|
`;
|
|
15995
|
-
var
|
|
15996
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
16035
|
+
var By = Object.defineProperty, Fy = Object.getOwnPropertyDescriptor, $y = (r, e, t, n) => {
|
|
16036
|
+
for (var i = n > 1 ? void 0 : n ? Fy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
15997
16037
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15998
|
-
return n && i &&
|
|
16038
|
+
return n && i && By(e, t, i), i;
|
|
15999
16039
|
};
|
|
16000
16040
|
let _s = class extends Q {
|
|
16001
16041
|
constructor() {
|
|
16002
16042
|
super(), this.isReady = !1;
|
|
16003
16043
|
}
|
|
16004
16044
|
render() {
|
|
16005
|
-
return
|
|
16045
|
+
return P`
|
|
16006
16046
|
<div class="otp_channel_selection">
|
|
16007
16047
|
<src-otp-channel-selection card-brands="visa,mastercard" display-pay-another-way="false">
|
|
16008
16048
|
</src-otp-channel-selection>
|
|
@@ -16011,21 +16051,21 @@ let _s = class extends Q {
|
|
|
16011
16051
|
}
|
|
16012
16052
|
};
|
|
16013
16053
|
_s.styles = te`
|
|
16014
|
-
${re(
|
|
16054
|
+
${re(Ny)}
|
|
16015
16055
|
`;
|
|
16016
|
-
_s =
|
|
16056
|
+
_s = $y([
|
|
16017
16057
|
ee("click2pay-otp-channel-selection")
|
|
16018
16058
|
], _s);
|
|
16019
|
-
const
|
|
16059
|
+
const My = `body{background:#ffffff}.clickeable{cursor:pointer}.panel-container{padding:38px 40px 1px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px}.card-form__select{align-self:start;border-top:none;border-left:none;border-right:none;color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;padding-top:8px;width:100%;height:28px}.credit-details__select-type{color:#6a6a6a;font-family:Inter,Arial,"sans-serif";font-size:14px;font-weight:400;min-width:135px}.credit-details__select-type :focus-visible{outline:none}.panel-id-selection{display:flex;gap:15px}.panel-id-selection>*{flex:1;max-width:50%}.panel-footer{display:flex;justify-content:space-between;text-align:right}@media only screen and (max-width: 800px){.panel-container{border-radius:20px;padding:20px}}
|
|
16020
16060
|
`;
|
|
16021
|
-
var
|
|
16022
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
16061
|
+
var Ly = Object.defineProperty, jy = Object.getOwnPropertyDescriptor, ot = (r, e, t, n) => {
|
|
16062
|
+
for (var i = n > 1 ? void 0 : n ? jy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
16023
16063
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
16024
|
-
return n && i &&
|
|
16064
|
+
return n && i && Ly(e, t, i), i;
|
|
16025
16065
|
};
|
|
16026
16066
|
let Ve = class extends Q {
|
|
16027
16067
|
constructor() {
|
|
16028
|
-
super(...arguments), this.name = "", this.email = "", this.selectedDocumentType = "dni", this.dni = "", this.inputDni = "", this.isValidDni = !0, this.hasPrevState = !1, this._isButtonDisabled = !0, this._isError = !0, this._isTouched = !0, this.emailPlaceholder =
|
|
16068
|
+
super(...arguments), this.name = "", this.email = "", this.selectedDocumentType = "dni", this.dni = "", this.inputDni = "", this.isValidDni = !0, this.hasPrevState = !1, this._isButtonDisabled = !0, this._isError = !0, this._isTouched = !0, this.emailPlaceholder = P`
|
|
16029
16069
|
<img
|
|
16030
16070
|
src="https://src.mastercard.com/srci/integration/components/src-ui-kit/assets/src.svg"
|
|
16031
16071
|
alt="src"
|
|
@@ -16066,7 +16106,7 @@ let Ve = class extends Q {
|
|
|
16066
16106
|
);
|
|
16067
16107
|
}
|
|
16068
16108
|
renderForm() {
|
|
16069
|
-
return
|
|
16109
|
+
return P`
|
|
16070
16110
|
<form>
|
|
16071
16111
|
<input-name
|
|
16072
16112
|
.name="${this.name}"
|
|
@@ -16130,7 +16170,7 @@ let Ve = class extends Q {
|
|
|
16130
16170
|
`;
|
|
16131
16171
|
}
|
|
16132
16172
|
render() {
|
|
16133
|
-
return
|
|
16173
|
+
return P`
|
|
16134
16174
|
<div class="container">
|
|
16135
16175
|
<div class="panel-container">${this.renderForm()}</div>
|
|
16136
16176
|
</div>
|
|
@@ -16138,7 +16178,7 @@ let Ve = class extends Q {
|
|
|
16138
16178
|
}
|
|
16139
16179
|
};
|
|
16140
16180
|
Ve.styles = te`
|
|
16141
|
-
${re(
|
|
16181
|
+
${re(My)}
|
|
16142
16182
|
`;
|
|
16143
16183
|
ot([
|
|
16144
16184
|
w({ type: String })
|
|
@@ -16177,8 +16217,8 @@ ot([
|
|
|
16177
16217
|
Ve = ot([
|
|
16178
16218
|
ee("click2pay-personal-data")
|
|
16179
16219
|
], Ve);
|
|
16180
|
-
const
|
|
16181
|
-
`,
|
|
16220
|
+
const Vy = `body{background:#ffffff}.clickeable{cursor:pointer}*{user-select:none}code{font-family:monospace;white-space:pre}.drawerOpen{opacity:.5;pointer-events:none}.card-form{display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:repeat(6,1fr);width:100vh;height:100vh;margin:0 auto}.card-form-text{grid-column:1/span 6;grid-row:1/1}.card-form__title{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:25px;font-weight:600}.card-form__subtitle{color:#2b2b2b;font-family:Inter,Arial,"sans-serif";font-size:20px;font-weight:600}.card-form__content{grid-column:1/span 6}.payment__detail{grid-column:7/span 4;padding-left:34px}.contentContainer{opacity:.5;transition:opacity .3s ease-in-out}.card-form__subtitle-mobile{display:none}.title{margin-bottom:1rem;margin-left:.75rem;margin-top:0}.card-payments-methods{display:flex;gap:2.5rem}@media only screen and (min-width: 360px) and (max-width: 559px){.card-form{display:grid;width:100%;height:100%;grid-template-columns:repeat(6,1fr)}.card-form__title{margin-bottom:10px}.card-form__content{margin-bottom:0;grid-column:span 6}.payment__detail{grid-column:1/span 7;grid-row:2/2;padding-left:0;margin-bottom:20px}}@media only screen and (min-width: 560px) and (max-width: 800px){.card-form{display:grid;width:100%;height:100%}.card-form-text{grid-column:2/span 6}.card-form__content{margin-bottom:0;grid-column:2/span 7}.payment__detail{grid-column:2/span 7;grid-row:2/2;padding-left:0;margin-bottom:20px}}
|
|
16221
|
+
`, qy = (r) => {
|
|
16182
16222
|
r.dispatchEvent(
|
|
16183
16223
|
new Event("renderInstallmentPlans", {
|
|
16184
16224
|
bubbles: !0,
|
|
@@ -16193,22 +16233,22 @@ const jy = `body{background:#ffffff}.clickeable{cursor:pointer}*{user-select:non
|
|
|
16193
16233
|
})
|
|
16194
16234
|
);
|
|
16195
16235
|
};
|
|
16196
|
-
var
|
|
16197
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
16236
|
+
var Hy = Object.defineProperty, Ky = Object.getOwnPropertyDescriptor, ue = (r, e, t, n) => {
|
|
16237
|
+
for (var i = n > 1 ? void 0 : n ? Ky(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
16198
16238
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
16199
|
-
return n && i &&
|
|
16239
|
+
return n && i && Hy(e, t, i), i;
|
|
16200
16240
|
};
|
|
16201
|
-
let
|
|
16241
|
+
let ie = class r extends Q {
|
|
16202
16242
|
constructor() {
|
|
16203
|
-
super(...arguments), this.email = "", this.firstName = "", this.lastName = "", this.dni = "", this.masterLibUrl = "", this.isLoading = !0, this._cards = [], this._showDrawerComponent = !1, this._showInitialPanels = !0, this._showPersonalDataForm = !1, this._showC2pOtpChannelSelection = !1, this._showOrderReview = !1, this._showC2pOtpInput = !1, this._showCardForm = !1, this._showC2pCardList = !1, this._loadingMsg = "Estamos cargando las opciones de pago...", this.lastPanFour = "";
|
|
16243
|
+
super(...arguments), this.email = "", this.firstName = "", this.lastName = "", this.dni = "", this.masterLibUrl = "", this.isLoading = !0, this._cards = [], this._showDrawerComponent = !1, this._showInitialPanels = !0, this._showPersonalDataForm = !1, this._showC2pOtpChannelSelection = !1, this._showOrderReview = !1, this._showOrderCompleted = !1, this._showC2pOtpInput = !1, this._showCardForm = !1, this._showC2pCardList = !1, this._loadingMsg = "Estamos cargando las opciones de pago...", this.lastPanFour = "";
|
|
16204
16244
|
}
|
|
16205
16245
|
firstUpdated(e) {
|
|
16206
|
-
return
|
|
16246
|
+
return L(this, null, function* () {
|
|
16207
16247
|
xr(r.prototype, this, "firstUpdated").call(this, e), yield this.loadClick2paySDK();
|
|
16208
16248
|
});
|
|
16209
16249
|
}
|
|
16210
16250
|
loadClick2paySDK() {
|
|
16211
|
-
return
|
|
16251
|
+
return L(this, null, function* () {
|
|
16212
16252
|
var s, o, a;
|
|
16213
16253
|
const e = document.createElement("script");
|
|
16214
16254
|
e.type = "module", e.src = "https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js";
|
|
@@ -16244,7 +16284,7 @@ let se = class r extends Q {
|
|
|
16244
16284
|
});
|
|
16245
16285
|
}
|
|
16246
16286
|
makeCheckoutNewCard() {
|
|
16247
|
-
return
|
|
16287
|
+
return L(this, null, function* () {
|
|
16248
16288
|
var s, o, a, c, u, l, d, p, m, g;
|
|
16249
16289
|
const e = (o = (s = this.renderRoot.querySelector("drawer-component")) == null ? void 0 : s.shadowRoot) == null ? void 0 : o.querySelector("#checkoutIframe"), n = {
|
|
16250
16290
|
windowRef: e != null && e.contentWindow ? e.contentWindow : e == null ? void 0 : e.contentDocument.defaultView,
|
|
@@ -16282,7 +16322,7 @@ let se = class r extends Q {
|
|
|
16282
16322
|
});
|
|
16283
16323
|
}
|
|
16284
16324
|
makeCheckout() {
|
|
16285
|
-
return
|
|
16325
|
+
return L(this, null, function* () {
|
|
16286
16326
|
var u, l, d, p, m, g, b;
|
|
16287
16327
|
const e = (u = this._contextData) == null ? void 0 : u.srcDigitalCardId, t = (d = (l = this.renderRoot.querySelector("drawer-component")) == null ? void 0 : l.shadowRoot) == null ? void 0 : d.querySelector("#checkoutIframe"), n = t != null && t.contentWindow ? t.contentWindow : t == null ? void 0 : t.contentDocument.defaultView, i = {
|
|
16288
16328
|
srcDigitalCardId: e,
|
|
@@ -16332,7 +16372,7 @@ let se = class r extends Q {
|
|
|
16332
16372
|
});
|
|
16333
16373
|
}
|
|
16334
16374
|
getSrcDigitalCardId(e) {
|
|
16335
|
-
return
|
|
16375
|
+
return L(this, null, function* () {
|
|
16336
16376
|
if (console.log("getSrcDigitalCardId()", e), e.detail.srcDigitalCardId) {
|
|
16337
16377
|
const t = this._cards.reduce((n, i) => i.srcDigitalCardId === e.detail.srcDigitalCardId ? i : n, null);
|
|
16338
16378
|
this.dispatchEvent(
|
|
@@ -16350,7 +16390,7 @@ let se = class r extends Q {
|
|
|
16350
16390
|
});
|
|
16351
16391
|
}
|
|
16352
16392
|
validateUser(e) {
|
|
16353
|
-
return
|
|
16393
|
+
return L(this, null, function* () {
|
|
16354
16394
|
var t, n;
|
|
16355
16395
|
if (console.log("validateUser", e), (t = this._contextData) != null && t.otpValue) {
|
|
16356
16396
|
const { otpValue: i } = this._contextData;
|
|
@@ -16365,7 +16405,7 @@ let se = class r extends Q {
|
|
|
16365
16405
|
this._showInitialPanels = !1, this._showPersonalDataForm = !0;
|
|
16366
16406
|
}
|
|
16367
16407
|
identifyUser(e) {
|
|
16368
|
-
return
|
|
16408
|
+
return L(this, null, function* () {
|
|
16369
16409
|
var s, o, a;
|
|
16370
16410
|
this.dni = e.detail.dni, this.isLoading = !0, this._loadingMsg = "Estamos recuperando información...", this.email = e.detail.email;
|
|
16371
16411
|
const { firstName: t, lastName: n } = xa(e.detail.name);
|
|
@@ -16408,7 +16448,7 @@ let se = class r extends Q {
|
|
|
16408
16448
|
e = "Ingresá los datos de la Tarjeta";
|
|
16409
16449
|
break;
|
|
16410
16450
|
}
|
|
16411
|
-
return
|
|
16451
|
+
return P`
|
|
16412
16452
|
<h2
|
|
16413
16453
|
class="${this._showDrawerComponent ? this.openDrawerClass("card-form__subtitle") : "card-form__subtitle"}"
|
|
16414
16454
|
>
|
|
@@ -16417,7 +16457,7 @@ let se = class r extends Q {
|
|
|
16417
16457
|
`;
|
|
16418
16458
|
}
|
|
16419
16459
|
renderMobileSubtitle(e) {
|
|
16420
|
-
return
|
|
16460
|
+
return P`
|
|
16421
16461
|
<h2
|
|
16422
16462
|
class="${this._showDrawerComponent ? this.openDrawerClass("card-form__subtitle-mobile") : "card-form__subtitle-mobile"}"
|
|
16423
16463
|
>
|
|
@@ -16426,7 +16466,7 @@ let se = class r extends Q {
|
|
|
16426
16466
|
`;
|
|
16427
16467
|
}
|
|
16428
16468
|
renderCardPaymentPanel() {
|
|
16429
|
-
return
|
|
16469
|
+
return P`
|
|
16430
16470
|
<card-home class="clickeable"></card-home>
|
|
16431
16471
|
<br />
|
|
16432
16472
|
<card-home
|
|
@@ -16439,7 +16479,7 @@ let se = class r extends Q {
|
|
|
16439
16479
|
`;
|
|
16440
16480
|
}
|
|
16441
16481
|
_prepareCheckout() {
|
|
16442
|
-
return
|
|
16482
|
+
return L(this, null, function* () {
|
|
16443
16483
|
var e;
|
|
16444
16484
|
this._showDrawerComponent = !0, (e = this._contextData) != null && e.srcDigitalCardId ? yield this.makeCheckout() : yield this.makeCheckoutNewCard(), this._showDrawerComponent = !1;
|
|
16445
16485
|
});
|
|
@@ -16448,7 +16488,10 @@ let se = class r extends Q {
|
|
|
16448
16488
|
ji(this), this._showC2pCardList = !0;
|
|
16449
16489
|
}
|
|
16450
16490
|
_backToInstallmentPlans() {
|
|
16451
|
-
this._showOrderReview = !1, console.log(this._orderReview),
|
|
16491
|
+
this._showOrderReview = !1, console.log(this._orderReview), qy(this);
|
|
16492
|
+
}
|
|
16493
|
+
_showOrderFinale() {
|
|
16494
|
+
this._showOrderReview = !1, this._showOrderCompleted = !0;
|
|
16452
16495
|
}
|
|
16453
16496
|
_backToPersonalData() {
|
|
16454
16497
|
this._showC2pCardList = !1, this._showCardForm = !1, this._showPersonalDataForm = !0;
|
|
@@ -16460,21 +16503,21 @@ let se = class r extends Q {
|
|
|
16460
16503
|
this._showC2pOtpInput = !1, this._showCardForm = !0;
|
|
16461
16504
|
}
|
|
16462
16505
|
_renderLoading() {
|
|
16463
|
-
return console.log("entro al _RenderLoading"),
|
|
16506
|
+
return console.log("entro al _RenderLoading"), P`
|
|
16464
16507
|
<click2pay-loading .isVisible="${this.isLoading}" .message="${this._loadingMsg}">
|
|
16465
16508
|
</click2pay-loading>
|
|
16466
16509
|
`;
|
|
16467
16510
|
}
|
|
16468
16511
|
render() {
|
|
16469
16512
|
var e, t, n, i, s, o, a, c, u, l, d;
|
|
16470
|
-
return
|
|
16513
|
+
return P`
|
|
16471
16514
|
<div class="card-form">
|
|
16472
16515
|
<drawer-component .isVisible="${this._showDrawerComponent}"></drawer-component>
|
|
16473
16516
|
<div class="card-form-text">
|
|
16474
16517
|
<h1
|
|
16475
16518
|
class="${this._showDrawerComponent ? this.openDrawerClass("card-form__title") : "card-form__title"}"
|
|
16476
16519
|
>
|
|
16477
|
-
${this._showInitialPanels ?
|
|
16520
|
+
${this._showInitialPanels ? P`<p>Pago a ${(e = this._contextData) == null ? void 0 : e.orderInfo.seller}</p>` : P`<p>Pago con tarjeta de crédito o débito</p>`}
|
|
16478
16521
|
</h1>
|
|
16479
16522
|
${this.renderSubtitle()}
|
|
16480
16523
|
</div>
|
|
@@ -16482,35 +16525,35 @@ let se = class r extends Q {
|
|
|
16482
16525
|
class="${this._showDrawerComponent ? this.openDrawerClass("card-form__content") : "card-form__content"}"
|
|
16483
16526
|
>
|
|
16484
16527
|
${this._renderLoading()} ${this._showInitialPanels ? this.renderCardPaymentPanel() : ""}
|
|
16485
|
-
${this._showPersonalDataForm ?
|
|
16528
|
+
${this._showPersonalDataForm ? P`
|
|
16486
16529
|
<click2pay-personal-data
|
|
16487
16530
|
@goToPrevState="${this._backToShowInitialPanels}"
|
|
16488
16531
|
@personalDataSubmitted="${this.identifyUser}"
|
|
16489
16532
|
></click2pay-personal-data>
|
|
16490
16533
|
` : ""}
|
|
16491
|
-
${this._showCardForm ?
|
|
16534
|
+
${this._showCardForm ? P`
|
|
16492
16535
|
<form-credit-card
|
|
16493
16536
|
?hasPrevState="${!0}"
|
|
16494
16537
|
@goToPrevState="${this._backToPersonalData}"
|
|
16495
16538
|
@newCardSelected="${this._showCardForm = !1}"
|
|
16496
16539
|
></form-credit-card>
|
|
16497
16540
|
` : ""}
|
|
16498
|
-
${this._showC2pOtpInput ?
|
|
16541
|
+
${this._showC2pOtpInput ? P`
|
|
16499
16542
|
<click2pay-otp-input
|
|
16500
|
-
|
|
16543
|
+
@goToCardForm="${this._backToCreditCardForm}"
|
|
16501
16544
|
@submitOtpValue="${this.validateUser}"
|
|
16502
16545
|
.otpOptions="${(t = this._otpValidationChannel) == null ? void 0 : t.supportedValidationChannels}"
|
|
16503
16546
|
.maskedIdentityValue="${(n = this._otpValidationChannel) == null ? void 0 : n.maskedValidationChannel}"
|
|
16504
16547
|
></click2pay-otp-input>
|
|
16505
16548
|
` : ""}
|
|
16506
|
-
${this._showC2pCardList ?
|
|
16549
|
+
${this._showC2pCardList ? P`
|
|
16507
16550
|
<click2pay-card-list
|
|
16508
16551
|
@goToPrevState="${this._backToPersonalData}"
|
|
16509
16552
|
@newCardSelected="${this.getSrcDigitalCardId}"
|
|
16510
16553
|
.cards="${this._cards}"
|
|
16511
16554
|
></click2pay-card-list>
|
|
16512
16555
|
` : ""}
|
|
16513
|
-
${(i = this._contextData) != null && i.componentsVisibility.showInstallmentPlan ?
|
|
16556
|
+
${(i = this._contextData) != null && i.componentsVisibility.showInstallmentPlan ? P`
|
|
16514
16557
|
<plan-component
|
|
16515
16558
|
.hasPrevState="${!0}"
|
|
16516
16559
|
@goToPrevState="${this._backToCardSelection}"
|
|
@@ -16520,8 +16563,8 @@ let se = class r extends Q {
|
|
|
16520
16563
|
@installmentSelected="${this._prepareCheckout}"
|
|
16521
16564
|
></plan-component>
|
|
16522
16565
|
` : ""}
|
|
16523
|
-
${this._showC2pOtpChannelSelection ?
|
|
16524
|
-
${this._showOrderReview ?
|
|
16566
|
+
${this._showC2pOtpChannelSelection ? P` <click2pay-otp-channel-selection></click2pay-otp-channel-selection> ` : ""}
|
|
16567
|
+
${this._showOrderReview ? P`
|
|
16525
16568
|
<click2pay-order-review
|
|
16526
16569
|
paymentCardProtector="asd"
|
|
16527
16570
|
.panLastFour="${(s = this._orderReview) == null ? void 0 : s.maskedCard.panLastFour}"
|
|
@@ -16531,8 +16574,14 @@ let se = class r extends Q {
|
|
|
16531
16574
|
.paymentTotalAmount="${(a = this._contextData) == null ? void 0 : a.orderInfo.totalAmount}"
|
|
16532
16575
|
.orderData="${this.orderData}"
|
|
16533
16576
|
@goToPrevState="${this._backToInstallmentPlans}"
|
|
16577
|
+
@triggerC2PCheckout="${this._showOrderFinale}"
|
|
16534
16578
|
></click2pay-order-review>
|
|
16535
16579
|
` : ""}
|
|
16580
|
+
${this._showOrderCompleted ? P`
|
|
16581
|
+
<div>
|
|
16582
|
+
<h1>ORDER COMPLETA</h1>
|
|
16583
|
+
</div>
|
|
16584
|
+
` : ""}
|
|
16536
16585
|
</div>
|
|
16537
16586
|
${this._showInitialPanels ? this.renderMobileSubtitle("Ingresá los datos de la tarjeta") : this.renderMobileSubtitle("Ingresá los datos de la persona titular")}
|
|
16538
16587
|
<div
|
|
@@ -16549,90 +16598,93 @@ let se = class r extends Q {
|
|
|
16549
16598
|
`;
|
|
16550
16599
|
}
|
|
16551
16600
|
};
|
|
16552
|
-
|
|
16553
|
-
${re(
|
|
16601
|
+
ie.styles = te`
|
|
16602
|
+
${re(Vy)}
|
|
16554
16603
|
`;
|
|
16555
|
-
|
|
16604
|
+
ue([
|
|
16556
16605
|
w({ type: String })
|
|
16557
|
-
],
|
|
16558
|
-
|
|
16606
|
+
], ie.prototype, "email", 2);
|
|
16607
|
+
ue([
|
|
16559
16608
|
w({ type: String })
|
|
16560
|
-
],
|
|
16561
|
-
|
|
16609
|
+
], ie.prototype, "firstName", 2);
|
|
16610
|
+
ue([
|
|
16562
16611
|
w({ type: String })
|
|
16563
|
-
],
|
|
16564
|
-
|
|
16612
|
+
], ie.prototype, "lastName", 2);
|
|
16613
|
+
ue([
|
|
16565
16614
|
w({ type: String })
|
|
16566
|
-
],
|
|
16567
|
-
|
|
16615
|
+
], ie.prototype, "dni", 2);
|
|
16616
|
+
ue([
|
|
16568
16617
|
w({ type: String })
|
|
16569
|
-
],
|
|
16570
|
-
|
|
16618
|
+
], ie.prototype, "masterLibUrl", 2);
|
|
16619
|
+
ue([
|
|
16571
16620
|
w({ type: Object })
|
|
16572
|
-
],
|
|
16573
|
-
|
|
16621
|
+
], ie.prototype, "initPayload", 2);
|
|
16622
|
+
ue([
|
|
16574
16623
|
w({ type: Boolean })
|
|
16575
|
-
],
|
|
16576
|
-
|
|
16624
|
+
], ie.prototype, "isLoading", 2);
|
|
16625
|
+
ue([
|
|
16626
|
+
$()
|
|
16627
|
+
], ie.prototype, "_cards", 2);
|
|
16628
|
+
ue([
|
|
16577
16629
|
$()
|
|
16578
|
-
],
|
|
16579
|
-
|
|
16630
|
+
], ie.prototype, "_showDrawerComponent", 2);
|
|
16631
|
+
ue([
|
|
16580
16632
|
$()
|
|
16581
|
-
],
|
|
16582
|
-
|
|
16633
|
+
], ie.prototype, "_showInitialPanels", 2);
|
|
16634
|
+
ue([
|
|
16583
16635
|
$()
|
|
16584
|
-
],
|
|
16585
|
-
|
|
16636
|
+
], ie.prototype, "_showPersonalDataForm", 2);
|
|
16637
|
+
ue([
|
|
16586
16638
|
$()
|
|
16587
|
-
],
|
|
16588
|
-
|
|
16639
|
+
], ie.prototype, "_showC2pOtpChannelSelection", 2);
|
|
16640
|
+
ue([
|
|
16589
16641
|
$()
|
|
16590
|
-
],
|
|
16591
|
-
|
|
16642
|
+
], ie.prototype, "_initResponse", 2);
|
|
16643
|
+
ue([
|
|
16592
16644
|
$()
|
|
16593
|
-
],
|
|
16594
|
-
|
|
16645
|
+
], ie.prototype, "_otpOptions", 2);
|
|
16646
|
+
ue([
|
|
16595
16647
|
$()
|
|
16596
|
-
],
|
|
16597
|
-
|
|
16648
|
+
], ie.prototype, "_otpValidationChannel", 2);
|
|
16649
|
+
ue([
|
|
16598
16650
|
$()
|
|
16599
|
-
],
|
|
16600
|
-
|
|
16651
|
+
], ie.prototype, "_orderReview", 2);
|
|
16652
|
+
ue([
|
|
16601
16653
|
$()
|
|
16602
|
-
],
|
|
16603
|
-
|
|
16654
|
+
], ie.prototype, "_showOrderReview", 2);
|
|
16655
|
+
ue([
|
|
16604
16656
|
$()
|
|
16605
|
-
],
|
|
16606
|
-
|
|
16657
|
+
], ie.prototype, "_showOrderCompleted", 2);
|
|
16658
|
+
ue([
|
|
16607
16659
|
$()
|
|
16608
|
-
],
|
|
16609
|
-
|
|
16660
|
+
], ie.prototype, "_showC2pOtpInput", 2);
|
|
16661
|
+
ue([
|
|
16610
16662
|
$()
|
|
16611
|
-
],
|
|
16612
|
-
|
|
16663
|
+
], ie.prototype, "_showCardForm", 2);
|
|
16664
|
+
ue([
|
|
16613
16665
|
$()
|
|
16614
|
-
],
|
|
16615
|
-
|
|
16666
|
+
], ie.prototype, "_showC2pCardList", 2);
|
|
16667
|
+
ue([
|
|
16616
16668
|
$()
|
|
16617
|
-
],
|
|
16618
|
-
|
|
16669
|
+
], ie.prototype, "_loadingMsg", 2);
|
|
16670
|
+
ue([
|
|
16619
16671
|
w({ type: String })
|
|
16620
|
-
],
|
|
16621
|
-
|
|
16672
|
+
], ie.prototype, "lastPanFour", 2);
|
|
16673
|
+
ue([
|
|
16622
16674
|
w()
|
|
16623
|
-
],
|
|
16624
|
-
|
|
16675
|
+
], ie.prototype, "orderData", 2);
|
|
16676
|
+
ue([
|
|
16625
16677
|
Yr({ context: vr, subscribe: !0 }),
|
|
16626
16678
|
$()
|
|
16627
|
-
],
|
|
16628
|
-
|
|
16679
|
+
], ie.prototype, "_contextData", 2);
|
|
16680
|
+
ie = ue([
|
|
16629
16681
|
ee("app-home")
|
|
16630
|
-
],
|
|
16631
|
-
var
|
|
16632
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
16682
|
+
], ie);
|
|
16683
|
+
var zy = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, Ft = (r, e, t, n) => {
|
|
16684
|
+
for (var i = n > 1 ? void 0 : n ? Gy(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
16633
16685
|
(o = r[s]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
16634
|
-
return n && i &&
|
|
16635
|
-
},
|
|
16686
|
+
return n && i && zy(e, t, i), i;
|
|
16687
|
+
}, Wy = /* @__PURE__ */ ((r) => (r[r.LOADING = 0] = "LOADING", r[r.HOME = 1] = "HOME", r[r.RENTAS = 2] = "RENTAS", r[r.ERROR = 3] = "ERROR", r))(Wy || {});
|
|
16636
16688
|
let vt = class extends Q {
|
|
16637
16689
|
constructor() {
|
|
16638
16690
|
super(...arguments), this.state = 0, this.isLoading = !0, this.paymentData = [], this.messageError = "", this.settings = {
|
|
@@ -16695,10 +16747,10 @@ let vt = class extends Q {
|
|
|
16695
16747
|
this.updateSettings(), this.loading();
|
|
16696
16748
|
}
|
|
16697
16749
|
loading() {
|
|
16698
|
-
return
|
|
16750
|
+
return L(this, null, function* () {
|
|
16699
16751
|
let r = !1, e = !1, t = !1;
|
|
16700
16752
|
try {
|
|
16701
|
-
yield
|
|
16753
|
+
yield xe.createToken(this.publicKey), r = !0;
|
|
16702
16754
|
const { response: n } = yield cn.createPaymentRequest(this.paymentRequest);
|
|
16703
16755
|
e = !0;
|
|
16704
16756
|
const { store_id: i, platform: s } = this.paymentRequest;
|
|
@@ -16708,7 +16760,7 @@ let vt = class extends Q {
|
|
|
16708
16760
|
s
|
|
16709
16761
|
), t = !0, this.isLoading = !1, this.error = !1;
|
|
16710
16762
|
} catch (n) {
|
|
16711
|
-
this.isLoading = !1, this.error = !0, r ? e ? t ||
|
|
16763
|
+
this.isLoading = !1, this.error = !0, r ? e ? t || Gt.handleServiceError("SERVICE_ERROR", "service request failed.") : Gt.handleServiceError("PAYMENT_ERROR", "Payment request failed.") : Gt.handleServiceError("AUTH_ERROR", "Authentication failed.");
|
|
16712
16764
|
}
|
|
16713
16765
|
});
|
|
16714
16766
|
}
|
|
@@ -16718,11 +16770,11 @@ let vt = class extends Q {
|
|
|
16718
16770
|
render() {
|
|
16719
16771
|
switch (this.state) {
|
|
16720
16772
|
case 3:
|
|
16721
|
-
return
|
|
16773
|
+
return P` <app-error .error="${this.error}"></app-error> `;
|
|
16722
16774
|
case 1:
|
|
16723
|
-
return
|
|
16775
|
+
return P` <app-home></app-home>`;
|
|
16724
16776
|
default:
|
|
16725
|
-
return
|
|
16777
|
+
return P`
|
|
16726
16778
|
<form-rentas .error="${this.error}" .isLoading="${this.isLoading}"></form-rentas>
|
|
16727
16779
|
`;
|
|
16728
16780
|
}
|
|
@@ -16746,49 +16798,49 @@ let vt = class extends Q {
|
|
|
16746
16798
|
), document.head.appendChild(r);
|
|
16747
16799
|
}
|
|
16748
16800
|
};
|
|
16749
|
-
|
|
16801
|
+
Ft([
|
|
16750
16802
|
w()
|
|
16751
16803
|
], vt.prototype, "state", 2);
|
|
16752
|
-
|
|
16804
|
+
Ft([
|
|
16753
16805
|
w()
|
|
16754
16806
|
], vt.prototype, "error", 2);
|
|
16755
|
-
|
|
16807
|
+
Ft([
|
|
16756
16808
|
w({ type: Boolean })
|
|
16757
16809
|
], vt.prototype, "isLoading", 2);
|
|
16758
|
-
|
|
16810
|
+
Ft([
|
|
16759
16811
|
w({ type: Array })
|
|
16760
16812
|
], vt.prototype, "paymentData", 2);
|
|
16761
|
-
|
|
16813
|
+
Ft([
|
|
16762
16814
|
w({ type: String })
|
|
16763
16815
|
], vt.prototype, "messageError", 2);
|
|
16764
|
-
|
|
16816
|
+
Ft([
|
|
16765
16817
|
w({ type: Object })
|
|
16766
16818
|
], vt.prototype, "settings", 2);
|
|
16767
|
-
|
|
16819
|
+
Ft([
|
|
16768
16820
|
w({ type: Object })
|
|
16769
16821
|
], vt.prototype, "paymentRequest", 2);
|
|
16770
|
-
|
|
16822
|
+
Ft([
|
|
16771
16823
|
w({ type: String })
|
|
16772
16824
|
], vt.prototype, "publicKey", 2);
|
|
16773
|
-
vt =
|
|
16825
|
+
vt = Ft([
|
|
16774
16826
|
ee("ranty-sdk-min")
|
|
16775
16827
|
], vt);
|
|
16776
16828
|
export {
|
|
16777
|
-
|
|
16829
|
+
ie as AppHome,
|
|
16778
16830
|
pn as AppLoading,
|
|
16779
16831
|
pr as CardHome,
|
|
16780
|
-
|
|
16832
|
+
er as CardPaymentDetail,
|
|
16781
16833
|
Lr as Click2PayError,
|
|
16782
16834
|
gn as Click2payLoading,
|
|
16783
|
-
|
|
16835
|
+
$e as Click2payOrderReview,
|
|
16784
16836
|
dr as CodSegInput,
|
|
16785
16837
|
Ot as CreditCard,
|
|
16786
16838
|
ht as CreditCardInput,
|
|
16787
|
-
|
|
16839
|
+
Qt as DateOfBirth,
|
|
16788
16840
|
yt as DniInput,
|
|
16789
16841
|
Ut as DrawerComponent,
|
|
16790
16842
|
It as EmailInput,
|
|
16791
|
-
|
|
16843
|
+
Xt as ExpiredInput,
|
|
16792
16844
|
Nr as FooterComponent,
|
|
16793
16845
|
Ue as FormCreditCard,
|
|
16794
16846
|
pe as FormRentas,
|
|
@@ -16797,5 +16849,5 @@ export {
|
|
|
16797
16849
|
gr as PaymentSummary,
|
|
16798
16850
|
Rt as PlanComponent,
|
|
16799
16851
|
vt as RantySdkMin,
|
|
16800
|
-
|
|
16852
|
+
Wy as STATES
|
|
16801
16853
|
};
|