@starfish-codes/hellgate 3.5.4 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card/ui/typings.d.ts +8 -0
- package/dist/hellgate-sdk.mjs +1042 -1062
- package/dist/hellgate-sdk.umd.js +6 -6
- package/package.json +1 -1
package/dist/hellgate-sdk.mjs
CHANGED
|
@@ -12,13 +12,13 @@ function ae(e, t) {
|
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Bt(e) {
|
|
16
16
|
if (!e.ok)
|
|
17
17
|
throw e;
|
|
18
18
|
return e.json();
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
class
|
|
20
|
+
const Qn = 2e3;
|
|
21
|
+
class es {
|
|
22
22
|
constructor(t, r) {
|
|
23
23
|
Object.defineProperty(this, "session", {
|
|
24
24
|
enumerable: !0,
|
|
@@ -121,13 +121,13 @@ class ts {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
}), this.domContainer = r.domContainer ??
|
|
124
|
+
}), this.domContainer = r.domContainer ?? mt(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle)), this.labelText = r.labelText;
|
|
125
125
|
}
|
|
126
126
|
dispose() {
|
|
127
127
|
this.disposers.forEach((t) => t()), this.check3dsIframeDisposers.forEach((t) => t());
|
|
128
128
|
}
|
|
129
129
|
initCheck3DSIframes(t, r) {
|
|
130
|
-
const n =
|
|
130
|
+
const n = mt();
|
|
131
131
|
n.insertAdjacentHTML("beforeend", `<iframe id="check_3ds_${this.iframeId}" width="0" height="0" style="border:0;visibility: hidden;" src="${t}"></iframe>`);
|
|
132
132
|
const s = n.querySelector(`#check_3ds_${this.iframeId}`);
|
|
133
133
|
if (s) {
|
|
@@ -146,7 +146,7 @@ class ts {
|
|
|
146
146
|
this.check3dsIframeDisposers.forEach((t) => t()), this.check3dsIframeDisposers = [];
|
|
147
147
|
}
|
|
148
148
|
startChallenge(t, r) {
|
|
149
|
-
const n =
|
|
149
|
+
const n = mt(), s = `<div style="display: flex; flex-direction: column; gap: 10px; align-items: center; ${this.domContainer === n ? 'border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width:100% " ' : 'border:0;" width="100%" height="100%"'}><iframe id="cha_${this.iframeId}" src="${t}" width="100%" height="500"></iframe>${this.labelText ? '<span id="tds_label_text" style="font-size: large;">' + this.labelText + "</span>" : ""}<div>`;
|
|
150
150
|
this.domContainer.insertAdjacentHTML("beforeend", this.domContainer === n ? `<div id="cha_${this.iframeId}_wrap" style="background: #fff; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 10000;">${s}</div>` : s);
|
|
151
151
|
const i = this.domContainer.querySelector(`#cha_${this.iframeId}`), a = this.domContainer.querySelector(`#cha_${this.iframeId}_wrap`);
|
|
152
152
|
if (!i)
|
|
@@ -184,17 +184,17 @@ class ts {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
startAuthResultPolling(t, r) {
|
|
187
|
-
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) =>
|
|
187
|
+
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => Bt(n)).then((n) => {
|
|
188
188
|
this.startAuthResultPolling(t, r), r(n);
|
|
189
189
|
}).catch(() => {
|
|
190
|
-
}),
|
|
190
|
+
}), Qn), () => window.clearTimeout(this.resultPollingTimer);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function mt() {
|
|
194
194
|
return document.body;
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
function
|
|
196
|
+
var ts = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
197
|
+
function rs(e) {
|
|
198
198
|
if (e.__esModule) return e;
|
|
199
199
|
var t = e.default;
|
|
200
200
|
if (typeof t == "function") {
|
|
@@ -213,12 +213,12 @@ function ns(e) {
|
|
|
213
213
|
});
|
|
214
214
|
}), r;
|
|
215
215
|
}
|
|
216
|
-
var Mr = {},
|
|
216
|
+
var Mr = {}, qe = {}, ue = {};
|
|
217
217
|
Object.defineProperty(ue, "__esModule", {
|
|
218
218
|
value: !0
|
|
219
219
|
});
|
|
220
220
|
ue.makeRequestWithoutElementsPayloadCheck = ue.makeRequestWithElementsPayloadCheck = void 0;
|
|
221
|
-
function
|
|
221
|
+
function ns(e) {
|
|
222
222
|
function t() {
|
|
223
223
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
224
224
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -232,54 +232,54 @@ function ss(e) {
|
|
|
232
232
|
}
|
|
233
233
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
234
234
|
}
|
|
235
|
-
class Ir extends
|
|
235
|
+
class Ir extends ns(Error) {
|
|
236
236
|
constructor(t) {
|
|
237
237
|
super(t), this.name = "NoElementsError";
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const ss = (e, t, r, n, s = {}) => {
|
|
241
241
|
if (e != null && e.hasElement(n))
|
|
242
242
|
return e.client[t](r, n, s);
|
|
243
243
|
let i = "Elements not initialized.";
|
|
244
244
|
throw e && (i = "Element not found in payload."), new Ir(`${i} Use a regular HTTP client if no elements are needed.`);
|
|
245
245
|
};
|
|
246
|
-
ue.makeRequestWithElementsPayloadCheck =
|
|
247
|
-
const
|
|
246
|
+
ue.makeRequestWithElementsPayloadCheck = ss;
|
|
247
|
+
const is = (e, t, r, n = {}) => {
|
|
248
248
|
if (e)
|
|
249
249
|
return e.client[t](r, n);
|
|
250
250
|
throw new Ir("Elements not initialized. Use a regular HTTP client if no elements are needed.");
|
|
251
251
|
};
|
|
252
|
-
ue.makeRequestWithoutElementsPayloadCheck =
|
|
253
|
-
var $r = {},
|
|
252
|
+
ue.makeRequestWithoutElementsPayloadCheck = is;
|
|
253
|
+
var $r = {}, Fe = {}, U = {}, _ = {};
|
|
254
254
|
Object.defineProperty(_, "__esModule", {
|
|
255
255
|
value: !0
|
|
256
256
|
});
|
|
257
257
|
_.USER_AGENT_HEADER = _.USER_AGENT_CLIENT = _.MERGE_CONTENT_TYPE = _.DEFAULT_ELEMENTS_BASE_URL = _.DEFAULT_BASE_URL = _.CONTENT_TYPE_HEADER = _.CLIENT_USER_AGENT_HEADER = _.CLIENT_BASE_PATHS = _.BT_TRANSACTION_ID_HEADER = _.BT_TRACE_ID_HEADER = _.BT_IDEMPOTENCY_KEY_HEADER = _.BT_EXPOSE_PROXY_RESPONSE_HEADER = _.BROWSER_LIST = _.API_KEY_HEADER = void 0;
|
|
258
|
-
const
|
|
259
|
-
_.API_KEY_HEADER =
|
|
260
|
-
const
|
|
261
|
-
_.BT_TRACE_ID_HEADER =
|
|
262
|
-
const
|
|
263
|
-
_.BT_IDEMPOTENCY_KEY_HEADER =
|
|
264
|
-
const
|
|
265
|
-
_.BT_EXPOSE_PROXY_RESPONSE_HEADER =
|
|
266
|
-
const
|
|
267
|
-
_.BT_TRANSACTION_ID_HEADER =
|
|
268
|
-
const
|
|
269
|
-
_.CONTENT_TYPE_HEADER =
|
|
270
|
-
const
|
|
271
|
-
_.MERGE_CONTENT_TYPE =
|
|
272
|
-
const
|
|
273
|
-
_.USER_AGENT_HEADER =
|
|
274
|
-
const
|
|
275
|
-
_.CLIENT_USER_AGENT_HEADER =
|
|
276
|
-
const
|
|
277
|
-
_.USER_AGENT_CLIENT =
|
|
258
|
+
const as = "BT-API-KEY";
|
|
259
|
+
_.API_KEY_HEADER = as;
|
|
260
|
+
const os = "bt-trace-id";
|
|
261
|
+
_.BT_TRACE_ID_HEADER = os;
|
|
262
|
+
const cs = "bt-idempotency-key";
|
|
263
|
+
_.BT_IDEMPOTENCY_KEY_HEADER = cs;
|
|
264
|
+
const us = "BT-EXPOSE-RAW-PROXY-RESPONSE";
|
|
265
|
+
_.BT_EXPOSE_PROXY_RESPONSE_HEADER = us;
|
|
266
|
+
const ls = "BT-TRANSACTION-ID";
|
|
267
|
+
_.BT_TRANSACTION_ID_HEADER = ls;
|
|
268
|
+
const ds = "Content-Type";
|
|
269
|
+
_.CONTENT_TYPE_HEADER = ds;
|
|
270
|
+
const fs = "application/merge-patch+json";
|
|
271
|
+
_.MERGE_CONTENT_TYPE = fs;
|
|
272
|
+
const hs = "User-Agent";
|
|
273
|
+
_.USER_AGENT_HEADER = hs;
|
|
274
|
+
const ps = "BT-CLIENT-USER-AGENT";
|
|
275
|
+
_.CLIENT_USER_AGENT_HEADER = ps;
|
|
276
|
+
const ms = "BasisTheoryJS";
|
|
277
|
+
_.USER_AGENT_CLIENT = ms;
|
|
278
278
|
const Es = "https://api.basistheory.com";
|
|
279
279
|
_.DEFAULT_BASE_URL = Es;
|
|
280
|
-
const
|
|
281
|
-
_.DEFAULT_ELEMENTS_BASE_URL =
|
|
282
|
-
const
|
|
280
|
+
const ys = "https://js.basistheory.com/hosted-elements";
|
|
281
|
+
_.DEFAULT_ELEMENTS_BASE_URL = ys;
|
|
282
|
+
const bs = {
|
|
283
283
|
tokens: "tokens",
|
|
284
284
|
tokenize: "tokenize",
|
|
285
285
|
applications: "applications",
|
|
@@ -293,8 +293,8 @@ const _s = {
|
|
|
293
293
|
sessions: "sessions",
|
|
294
294
|
transactions: "transactions"
|
|
295
295
|
};
|
|
296
|
-
_.CLIENT_BASE_PATHS =
|
|
297
|
-
const
|
|
296
|
+
_.CLIENT_BASE_PATHS = bs;
|
|
297
|
+
const _s = [{
|
|
298
298
|
browserName: "Firefox",
|
|
299
299
|
browserUA: "Firefox"
|
|
300
300
|
}, {
|
|
@@ -322,35 +322,36 @@ const gs = [{
|
|
|
322
322
|
browserName: "Safari",
|
|
323
323
|
browserUA: "Safari"
|
|
324
324
|
}];
|
|
325
|
-
_.BROWSER_LIST =
|
|
325
|
+
_.BROWSER_LIST = _s;
|
|
326
326
|
var m = {};
|
|
327
|
+
/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
327
328
|
function qr(e, t) {
|
|
328
329
|
return function() {
|
|
329
330
|
return e.apply(t, arguments);
|
|
330
331
|
};
|
|
331
332
|
}
|
|
332
|
-
const { toString:
|
|
333
|
-
const r =
|
|
333
|
+
const { toString: gs } = Object.prototype, { getPrototypeOf: Kt } = Object, Ke = /* @__PURE__ */ ((e) => (t) => {
|
|
334
|
+
const r = gs.call(t);
|
|
334
335
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
335
|
-
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) =>
|
|
336
|
-
function
|
|
336
|
+
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) => Ke(t) === e), ze = (e) => (t) => typeof t === e, { isArray: de } = Array, be = ze("undefined");
|
|
337
|
+
function ws(e) {
|
|
337
338
|
return e !== null && !be(e) && e.constructor !== null && !be(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
338
339
|
}
|
|
339
340
|
const Fr = I("ArrayBuffer");
|
|
340
|
-
function
|
|
341
|
+
function Ss(e) {
|
|
341
342
|
let t;
|
|
342
343
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fr(e.buffer), t;
|
|
343
344
|
}
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
345
|
+
const Ts = ze("string"), j = ze("function"), Kr = ze("number"), We = (e) => e !== null && typeof e == "object", Rs = (e) => e === !0 || e === !1, Ne = (e) => {
|
|
346
|
+
if (Ke(e) !== "object")
|
|
346
347
|
return !1;
|
|
347
348
|
const t = Kt(e);
|
|
348
349
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
349
|
-
},
|
|
350
|
+
}, As = I("Date"), vs = I("File"), Cs = I("Blob"), Os = I("FileList"), Ps = (e) => We(e) && j(e.pipe), Bs = (e) => {
|
|
350
351
|
let t;
|
|
351
|
-
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t =
|
|
352
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Ke(e)) === "formdata" || // detect form-data instance
|
|
352
353
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
353
|
-
},
|
|
354
|
+
}, xs = I("URLSearchParams"), [Ns, js, Us, Ds] = ["ReadableStream", "Request", "Response", "Headers"].map(I), Ls = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
354
355
|
function _e(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
355
356
|
if (e === null || typeof e > "u")
|
|
356
357
|
return;
|
|
@@ -374,23 +375,23 @@ function zr(e, t) {
|
|
|
374
375
|
return s;
|
|
375
376
|
return null;
|
|
376
377
|
}
|
|
377
|
-
const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window :
|
|
378
|
-
function
|
|
378
|
+
const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ts, Wr = (e) => !be(e) && e !== ee;
|
|
379
|
+
function xt() {
|
|
379
380
|
const { caseless: e } = Wr(this) && this || {}, t = {}, r = (n, s) => {
|
|
380
381
|
const i = e && zr(t, s) || s;
|
|
381
|
-
Ne(t[i]) && Ne(n) ? t[i] =
|
|
382
|
+
Ne(t[i]) && Ne(n) ? t[i] = xt(t[i], n) : Ne(n) ? t[i] = xt({}, n) : de(n) ? t[i] = n.slice() : t[i] = n;
|
|
382
383
|
};
|
|
383
384
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
384
385
|
arguments[n] && _e(arguments[n], r);
|
|
385
386
|
return t;
|
|
386
387
|
}
|
|
387
|
-
const
|
|
388
|
+
const Hs = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
388
389
|
r && j(s) ? e[i] = qr(s, r) : e[i] = s;
|
|
389
|
-
}, { allOwnKeys: n }), e),
|
|
390
|
+
}, { allOwnKeys: n }), e), Ms = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Is = (e, t, r, n) => {
|
|
390
391
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
391
392
|
value: t.prototype
|
|
392
393
|
}), r && Object.assign(e.prototype, r);
|
|
393
|
-
},
|
|
394
|
+
}, $s = (e, t, r, n) => {
|
|
394
395
|
let s, i, a;
|
|
395
396
|
const o = {};
|
|
396
397
|
if (t = t || {}, e == null) return t;
|
|
@@ -400,11 +401,11 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
400
401
|
e = r !== !1 && Kt(e);
|
|
401
402
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
402
403
|
return t;
|
|
403
|
-
},
|
|
404
|
+
}, qs = (e, t, r) => {
|
|
404
405
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
405
406
|
const n = e.indexOf(t, r);
|
|
406
407
|
return n !== -1 && n === r;
|
|
407
|
-
},
|
|
408
|
+
}, Fs = (e) => {
|
|
408
409
|
if (!e) return null;
|
|
409
410
|
if (de(e)) return e;
|
|
410
411
|
let t = e.length;
|
|
@@ -413,31 +414,31 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
413
414
|
for (; t-- > 0; )
|
|
414
415
|
r[t] = e[t];
|
|
415
416
|
return r;
|
|
416
|
-
},
|
|
417
|
+
}, Ks = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Kt(Uint8Array)), zs = (e, t) => {
|
|
417
418
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
418
419
|
let s;
|
|
419
420
|
for (; (s = n.next()) && !s.done; ) {
|
|
420
421
|
const i = s.value;
|
|
421
422
|
t.call(e, i[0], i[1]);
|
|
422
423
|
}
|
|
423
|
-
},
|
|
424
|
+
}, Ws = (e, t) => {
|
|
424
425
|
let r;
|
|
425
426
|
const n = [];
|
|
426
427
|
for (; (r = e.exec(t)) !== null; )
|
|
427
428
|
n.push(r);
|
|
428
429
|
return n;
|
|
429
|
-
},
|
|
430
|
+
}, ks = I("HTMLFormElement"), Vs = (e) => e.toLowerCase().replace(
|
|
430
431
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
431
432
|
function(r, n, s) {
|
|
432
433
|
return n.toUpperCase() + s;
|
|
433
434
|
}
|
|
434
|
-
),
|
|
435
|
+
), or = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Gs = I("RegExp"), kr = (e, t) => {
|
|
435
436
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
436
437
|
_e(r, (s, i) => {
|
|
437
438
|
let a;
|
|
438
439
|
(a = t(s, i, e)) !== !1 && (n[i] = a || s);
|
|
439
440
|
}), Object.defineProperties(e, n);
|
|
440
|
-
},
|
|
441
|
+
}, Js = (e) => {
|
|
441
442
|
kr(e, (t, r) => {
|
|
442
443
|
if (j(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
443
444
|
return !1;
|
|
@@ -452,31 +453,21 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
452
453
|
});
|
|
453
454
|
}
|
|
454
455
|
});
|
|
455
|
-
},
|
|
456
|
+
}, Ys = (e, t) => {
|
|
456
457
|
const r = {}, n = (s) => {
|
|
457
458
|
s.forEach((i) => {
|
|
458
459
|
r[i] = !0;
|
|
459
460
|
});
|
|
460
461
|
};
|
|
461
462
|
return de(e) ? n(e) : n(String(e).split(t)), r;
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
ALPHA: pt,
|
|
466
|
-
ALPHA_DIGIT: pt + pt.toUpperCase() + ur
|
|
467
|
-
}, ei = (e = 16, t = Gr.ALPHA_DIGIT) => {
|
|
468
|
-
let r = "";
|
|
469
|
-
const { length: n } = t;
|
|
470
|
-
for (; e--; )
|
|
471
|
-
r += t[Math.random() * n | 0];
|
|
472
|
-
return r;
|
|
473
|
-
};
|
|
474
|
-
function ti(e) {
|
|
463
|
+
}, Xs = () => {
|
|
464
|
+
}, Zs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
465
|
+
function Qs(e) {
|
|
475
466
|
return !!(e && j(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
476
467
|
}
|
|
477
|
-
const
|
|
468
|
+
const ei = (e) => {
|
|
478
469
|
const t = new Array(10), r = (n, s) => {
|
|
479
|
-
if (
|
|
470
|
+
if (We(n)) {
|
|
480
471
|
if (t.indexOf(n) >= 0)
|
|
481
472
|
return;
|
|
482
473
|
if (!("toJSON" in n)) {
|
|
@@ -491,78 +482,76 @@ const ri = (e) => {
|
|
|
491
482
|
return n;
|
|
492
483
|
};
|
|
493
484
|
return r(e, 0);
|
|
494
|
-
},
|
|
485
|
+
}, ti = I("AsyncFunction"), ri = (e) => e && (We(e) || j(e)) && j(e.then) && j(e.catch), Vr = ((e, t) => e ? setImmediate : t ? ((r, n) => (ee.addEventListener("message", ({ source: s, data: i }) => {
|
|
495
486
|
s === ee && i === r && n.length && n.shift()();
|
|
496
487
|
}, !1), (s) => {
|
|
497
488
|
n.push(s), ee.postMessage(r, "*");
|
|
498
489
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
499
490
|
typeof setImmediate == "function",
|
|
500
491
|
j(ee.postMessage)
|
|
501
|
-
),
|
|
492
|
+
), ni = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Vr;
|
|
502
493
|
var c = {
|
|
503
494
|
isArray: de,
|
|
504
495
|
isArrayBuffer: Fr,
|
|
505
|
-
isBuffer:
|
|
506
|
-
isFormData:
|
|
507
|
-
isArrayBufferView:
|
|
508
|
-
isString:
|
|
496
|
+
isBuffer: ws,
|
|
497
|
+
isFormData: Bs,
|
|
498
|
+
isArrayBufferView: Ss,
|
|
499
|
+
isString: Ts,
|
|
509
500
|
isNumber: Kr,
|
|
510
|
-
isBoolean:
|
|
511
|
-
isObject:
|
|
501
|
+
isBoolean: Rs,
|
|
502
|
+
isObject: We,
|
|
512
503
|
isPlainObject: Ne,
|
|
513
|
-
isReadableStream:
|
|
514
|
-
isRequest:
|
|
504
|
+
isReadableStream: Ns,
|
|
505
|
+
isRequest: js,
|
|
515
506
|
isResponse: Us,
|
|
516
|
-
isHeaders:
|
|
507
|
+
isHeaders: Ds,
|
|
517
508
|
isUndefined: be,
|
|
518
|
-
isDate:
|
|
519
|
-
isFile:
|
|
520
|
-
isBlob:
|
|
521
|
-
isRegExp:
|
|
509
|
+
isDate: As,
|
|
510
|
+
isFile: vs,
|
|
511
|
+
isBlob: Cs,
|
|
512
|
+
isRegExp: Gs,
|
|
522
513
|
isFunction: j,
|
|
523
|
-
isStream:
|
|
524
|
-
isURLSearchParams:
|
|
525
|
-
isTypedArray:
|
|
526
|
-
isFileList:
|
|
514
|
+
isStream: Ps,
|
|
515
|
+
isURLSearchParams: xs,
|
|
516
|
+
isTypedArray: Ks,
|
|
517
|
+
isFileList: Os,
|
|
527
518
|
forEach: _e,
|
|
528
|
-
merge:
|
|
529
|
-
extend:
|
|
530
|
-
trim:
|
|
531
|
-
stripBOM:
|
|
532
|
-
inherits:
|
|
533
|
-
toFlatObject:
|
|
534
|
-
kindOf:
|
|
519
|
+
merge: xt,
|
|
520
|
+
extend: Hs,
|
|
521
|
+
trim: Ls,
|
|
522
|
+
stripBOM: Ms,
|
|
523
|
+
inherits: Is,
|
|
524
|
+
toFlatObject: $s,
|
|
525
|
+
kindOf: Ke,
|
|
535
526
|
kindOfTest: I,
|
|
536
|
-
endsWith:
|
|
537
|
-
toArray:
|
|
538
|
-
forEachEntry:
|
|
539
|
-
matchAll:
|
|
540
|
-
isHTMLForm:
|
|
541
|
-
hasOwnProperty:
|
|
542
|
-
hasOwnProp:
|
|
527
|
+
endsWith: qs,
|
|
528
|
+
toArray: Fs,
|
|
529
|
+
forEachEntry: zs,
|
|
530
|
+
matchAll: Ws,
|
|
531
|
+
isHTMLForm: ks,
|
|
532
|
+
hasOwnProperty: or,
|
|
533
|
+
hasOwnProp: or,
|
|
543
534
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
544
535
|
reduceDescriptors: kr,
|
|
545
|
-
freezeMethods:
|
|
546
|
-
toObjectSet:
|
|
536
|
+
freezeMethods: Js,
|
|
537
|
+
toObjectSet: Ys,
|
|
547
538
|
toCamelCase: Vs,
|
|
548
|
-
noop:
|
|
549
|
-
toFiniteNumber:
|
|
539
|
+
noop: Xs,
|
|
540
|
+
toFiniteNumber: Zs,
|
|
550
541
|
findKey: zr,
|
|
551
542
|
global: ee,
|
|
552
543
|
isContextDefined: Wr,
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
isAsyncFn: ni,
|
|
558
|
-
isThenable: si,
|
|
544
|
+
isSpecCompliantForm: Qs,
|
|
545
|
+
toJSONObject: ei,
|
|
546
|
+
isAsyncFn: ti,
|
|
547
|
+
isThenable: ri,
|
|
559
548
|
setImmediate: Vr,
|
|
560
|
-
asap:
|
|
549
|
+
asap: ni
|
|
561
550
|
};
|
|
562
|
-
function
|
|
551
|
+
function y(e, t, r, n, s) {
|
|
563
552
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
564
553
|
}
|
|
565
|
-
c.inherits(
|
|
554
|
+
c.inherits(y, Error, {
|
|
566
555
|
toJSON: function() {
|
|
567
556
|
return {
|
|
568
557
|
// Standard
|
|
@@ -583,7 +572,7 @@ c.inherits(E, Error, {
|
|
|
583
572
|
};
|
|
584
573
|
}
|
|
585
574
|
});
|
|
586
|
-
const
|
|
575
|
+
const Gr = y.prototype, Jr = {};
|
|
587
576
|
[
|
|
588
577
|
"ERR_BAD_OPTION_VALUE",
|
|
589
578
|
"ERR_BAD_OPTION",
|
|
@@ -599,43 +588,43 @@ const Jr = E.prototype, Yr = {};
|
|
|
599
588
|
"ERR_INVALID_URL"
|
|
600
589
|
// eslint-disable-next-line func-names
|
|
601
590
|
].forEach((e) => {
|
|
602
|
-
|
|
591
|
+
Jr[e] = { value: e };
|
|
603
592
|
});
|
|
604
|
-
Object.defineProperties(
|
|
605
|
-
Object.defineProperty(
|
|
606
|
-
|
|
607
|
-
const a = Object.create(
|
|
593
|
+
Object.defineProperties(y, Jr);
|
|
594
|
+
Object.defineProperty(Gr, "isAxiosError", { value: !0 });
|
|
595
|
+
y.from = (e, t, r, n, s, i) => {
|
|
596
|
+
const a = Object.create(Gr);
|
|
608
597
|
return c.toFlatObject(e, a, function(d) {
|
|
609
598
|
return d !== Error.prototype;
|
|
610
|
-
}, (o) => o !== "isAxiosError"),
|
|
599
|
+
}, (o) => o !== "isAxiosError"), y.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
611
600
|
};
|
|
612
|
-
var
|
|
613
|
-
function
|
|
601
|
+
var si = null;
|
|
602
|
+
function Nt(e) {
|
|
614
603
|
return c.isPlainObject(e) || c.isArray(e);
|
|
615
604
|
}
|
|
616
|
-
function
|
|
605
|
+
function Yr(e) {
|
|
617
606
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
618
607
|
}
|
|
619
|
-
function
|
|
608
|
+
function cr(e, t, r) {
|
|
620
609
|
return e ? e.concat(t).map(function(s, i) {
|
|
621
|
-
return s =
|
|
610
|
+
return s = Yr(s), !r && i ? "[" + s + "]" : s;
|
|
622
611
|
}).join(r ? "." : "") : t;
|
|
623
612
|
}
|
|
624
|
-
function
|
|
625
|
-
return c.isArray(e) && !e.some(
|
|
613
|
+
function ii(e) {
|
|
614
|
+
return c.isArray(e) && !e.some(Nt);
|
|
626
615
|
}
|
|
627
|
-
const
|
|
616
|
+
const ai = c.toFlatObject(c, {}, null, function(t) {
|
|
628
617
|
return /^is[A-Z]/.test(t);
|
|
629
618
|
});
|
|
630
|
-
function
|
|
619
|
+
function ke(e, t, r) {
|
|
631
620
|
if (!c.isObject(e))
|
|
632
621
|
throw new TypeError("target must be an object");
|
|
633
622
|
t = t || new FormData(), r = c.toFlatObject(r, {
|
|
634
623
|
metaTokens: !0,
|
|
635
624
|
dots: !1,
|
|
636
625
|
indexes: !1
|
|
637
|
-
}, !1, function(
|
|
638
|
-
return !c.isUndefined(p[
|
|
626
|
+
}, !1, function(E, p) {
|
|
627
|
+
return !c.isUndefined(p[E]);
|
|
639
628
|
});
|
|
640
629
|
const n = r.metaTokens, s = r.visitor || l, i = r.dots, a = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
641
630
|
if (!c.isFunction(s))
|
|
@@ -645,42 +634,42 @@ function We(e, t, r) {
|
|
|
645
634
|
if (c.isDate(h))
|
|
646
635
|
return h.toISOString();
|
|
647
636
|
if (!d && c.isBlob(h))
|
|
648
|
-
throw new
|
|
637
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
649
638
|
return c.isArrayBuffer(h) || c.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
650
639
|
}
|
|
651
|
-
function l(h,
|
|
640
|
+
function l(h, E, p) {
|
|
652
641
|
let S = h;
|
|
653
642
|
if (h && !p && typeof h == "object") {
|
|
654
|
-
if (c.endsWith(
|
|
655
|
-
|
|
656
|
-
else if (c.isArray(h) &&
|
|
657
|
-
return
|
|
643
|
+
if (c.endsWith(E, "{}"))
|
|
644
|
+
E = n ? E : E.slice(0, -2), h = JSON.stringify(h);
|
|
645
|
+
else if (c.isArray(h) && ii(h) || (c.isFileList(h) || c.endsWith(E, "[]")) && (S = c.toArray(h)))
|
|
646
|
+
return E = Yr(E), S.forEach(function(C, k) {
|
|
658
647
|
!(c.isUndefined(C) || C === null) && t.append(
|
|
659
648
|
// eslint-disable-next-line no-nested-ternary
|
|
660
|
-
a === !0 ?
|
|
649
|
+
a === !0 ? cr([E], k, i) : a === null ? E : E + "[]",
|
|
661
650
|
u(C)
|
|
662
651
|
);
|
|
663
652
|
}), !1;
|
|
664
653
|
}
|
|
665
|
-
return
|
|
654
|
+
return Nt(h) ? !0 : (t.append(cr(p, E, i), u(h)), !1);
|
|
666
655
|
}
|
|
667
|
-
const f = [], b = Object.assign(
|
|
656
|
+
const f = [], b = Object.assign(ai, {
|
|
668
657
|
defaultVisitor: l,
|
|
669
658
|
convertValue: u,
|
|
670
|
-
isVisitable:
|
|
659
|
+
isVisitable: Nt
|
|
671
660
|
});
|
|
672
|
-
function w(h,
|
|
661
|
+
function w(h, E) {
|
|
673
662
|
if (!c.isUndefined(h)) {
|
|
674
663
|
if (f.indexOf(h) !== -1)
|
|
675
|
-
throw Error("Circular reference detected in " +
|
|
664
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
676
665
|
f.push(h), c.forEach(h, function(S, v) {
|
|
677
666
|
(!(c.isUndefined(S) || S === null) && s.call(
|
|
678
667
|
t,
|
|
679
668
|
S,
|
|
680
669
|
c.isString(v) ? v.trim() : v,
|
|
681
|
-
|
|
670
|
+
E,
|
|
682
671
|
b
|
|
683
|
-
)) === !0 && w(S,
|
|
672
|
+
)) === !0 && w(S, E ? E.concat(v) : [v]);
|
|
684
673
|
}), f.pop();
|
|
685
674
|
}
|
|
686
675
|
}
|
|
@@ -688,7 +677,7 @@ function We(e, t, r) {
|
|
|
688
677
|
throw new TypeError("data must be an object");
|
|
689
678
|
return w(e), t;
|
|
690
679
|
}
|
|
691
|
-
function
|
|
680
|
+
function ur(e) {
|
|
692
681
|
const t = {
|
|
693
682
|
"!": "%21",
|
|
694
683
|
"'": "%27",
|
|
@@ -703,27 +692,31 @@ function dr(e) {
|
|
|
703
692
|
});
|
|
704
693
|
}
|
|
705
694
|
function zt(e, t) {
|
|
706
|
-
this._pairs = [], e &&
|
|
695
|
+
this._pairs = [], e && ke(e, this, t);
|
|
707
696
|
}
|
|
708
|
-
const
|
|
709
|
-
|
|
697
|
+
const Xr = zt.prototype;
|
|
698
|
+
Xr.append = function(t, r) {
|
|
710
699
|
this._pairs.push([t, r]);
|
|
711
700
|
};
|
|
712
|
-
|
|
701
|
+
Xr.toString = function(t) {
|
|
713
702
|
const r = t ? function(n) {
|
|
714
|
-
return t.call(this, n,
|
|
715
|
-
} :
|
|
703
|
+
return t.call(this, n, ur);
|
|
704
|
+
} : ur;
|
|
716
705
|
return this._pairs.map(function(s) {
|
|
717
706
|
return r(s[0]) + "=" + r(s[1]);
|
|
718
707
|
}, "").join("&");
|
|
719
708
|
};
|
|
720
|
-
function
|
|
709
|
+
function oi(e) {
|
|
721
710
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
722
711
|
}
|
|
723
|
-
function
|
|
712
|
+
function Zr(e, t, r) {
|
|
724
713
|
if (!t)
|
|
725
714
|
return e;
|
|
726
|
-
const n = r && r.encode ||
|
|
715
|
+
const n = r && r.encode || oi;
|
|
716
|
+
c.isFunction(r) && (r = {
|
|
717
|
+
serialize: r
|
|
718
|
+
});
|
|
719
|
+
const s = r && r.serialize;
|
|
727
720
|
let i;
|
|
728
721
|
if (s ? i = s(t, r) : i = c.isURLSearchParams(t) ? t.toString() : new zt(t, r).toString(n), i) {
|
|
729
722
|
const a = e.indexOf("#");
|
|
@@ -731,7 +724,7 @@ function Qr(e, t, r) {
|
|
|
731
724
|
}
|
|
732
725
|
return e;
|
|
733
726
|
}
|
|
734
|
-
class
|
|
727
|
+
class ci {
|
|
735
728
|
constructor() {
|
|
736
729
|
this.handlers = [];
|
|
737
730
|
}
|
|
@@ -785,43 +778,43 @@ class li {
|
|
|
785
778
|
});
|
|
786
779
|
}
|
|
787
780
|
}
|
|
788
|
-
var
|
|
781
|
+
var lr = ci, Qr = {
|
|
789
782
|
silentJSONParsing: !0,
|
|
790
783
|
forcedJSONParsing: !0,
|
|
791
784
|
clarifyTimeoutError: !1
|
|
792
|
-
},
|
|
785
|
+
}, ui = typeof URLSearchParams < "u" ? URLSearchParams : zt, li = typeof FormData < "u" ? FormData : null, di = typeof Blob < "u" ? Blob : null, fi = {
|
|
793
786
|
isBrowser: !0,
|
|
794
787
|
classes: {
|
|
795
|
-
URLSearchParams:
|
|
796
|
-
FormData:
|
|
797
|
-
Blob:
|
|
788
|
+
URLSearchParams: ui,
|
|
789
|
+
FormData: li,
|
|
790
|
+
Blob: di
|
|
798
791
|
},
|
|
799
792
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
800
793
|
};
|
|
801
|
-
const Wt = typeof window < "u" && typeof document < "u",
|
|
802
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
803
|
-
var
|
|
794
|
+
const Wt = typeof window < "u" && typeof document < "u", jt = typeof navigator == "object" && navigator || void 0, hi = Wt && (!jt || ["ReactNative", "NativeScript", "NS"].indexOf(jt.product) < 0), pi = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
795
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", mi = Wt && window.location.href || "http://localhost";
|
|
796
|
+
var Ei = /* @__PURE__ */ Object.freeze({
|
|
804
797
|
__proto__: null,
|
|
805
798
|
hasBrowserEnv: Wt,
|
|
806
|
-
hasStandardBrowserWebWorkerEnv:
|
|
807
|
-
hasStandardBrowserEnv:
|
|
808
|
-
navigator:
|
|
809
|
-
origin:
|
|
810
|
-
}),
|
|
811
|
-
...
|
|
812
|
-
...
|
|
799
|
+
hasStandardBrowserWebWorkerEnv: pi,
|
|
800
|
+
hasStandardBrowserEnv: hi,
|
|
801
|
+
navigator: jt,
|
|
802
|
+
origin: mi
|
|
803
|
+
}), P = {
|
|
804
|
+
...Ei,
|
|
805
|
+
...fi
|
|
813
806
|
};
|
|
814
|
-
function
|
|
815
|
-
return
|
|
807
|
+
function yi(e, t) {
|
|
808
|
+
return ke(e, new P.classes.URLSearchParams(), Object.assign({
|
|
816
809
|
visitor: function(r, n, s, i) {
|
|
817
|
-
return
|
|
810
|
+
return P.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
818
811
|
}
|
|
819
812
|
}, t));
|
|
820
813
|
}
|
|
821
|
-
function
|
|
814
|
+
function bi(e) {
|
|
822
815
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
823
816
|
}
|
|
824
|
-
function
|
|
817
|
+
function _i(e) {
|
|
825
818
|
const t = {}, r = Object.keys(e);
|
|
826
819
|
let n;
|
|
827
820
|
const s = r.length;
|
|
@@ -830,22 +823,22 @@ function wi(e) {
|
|
|
830
823
|
i = r[n], t[i] = e[i];
|
|
831
824
|
return t;
|
|
832
825
|
}
|
|
833
|
-
function
|
|
826
|
+
function en(e) {
|
|
834
827
|
function t(r, n, s, i) {
|
|
835
828
|
let a = r[i++];
|
|
836
829
|
if (a === "__proto__") return !0;
|
|
837
830
|
const o = Number.isFinite(+a), d = i >= r.length;
|
|
838
|
-
return a = !a && c.isArray(s) ? s.length : a, d ? (c.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !c.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && c.isArray(s[a]) && (s[a] =
|
|
831
|
+
return a = !a && c.isArray(s) ? s.length : a, d ? (c.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !c.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && c.isArray(s[a]) && (s[a] = _i(s[a])), !o);
|
|
839
832
|
}
|
|
840
833
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
841
834
|
const r = {};
|
|
842
835
|
return c.forEachEntry(e, (n, s) => {
|
|
843
|
-
t(
|
|
836
|
+
t(bi(n), s, r, 0);
|
|
844
837
|
}), r;
|
|
845
838
|
}
|
|
846
839
|
return null;
|
|
847
840
|
}
|
|
848
|
-
function
|
|
841
|
+
function gi(e, t, r) {
|
|
849
842
|
if (c.isString(e))
|
|
850
843
|
try {
|
|
851
844
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -856,12 +849,12 @@ function Si(e, t, r) {
|
|
|
856
849
|
return (r || JSON.stringify)(e);
|
|
857
850
|
}
|
|
858
851
|
const kt = {
|
|
859
|
-
transitional:
|
|
852
|
+
transitional: Qr,
|
|
860
853
|
adapter: ["xhr", "http", "fetch"],
|
|
861
854
|
transformRequest: [function(t, r) {
|
|
862
855
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = c.isObject(t);
|
|
863
856
|
if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
864
|
-
return s ? JSON.stringify(
|
|
857
|
+
return s ? JSON.stringify(en(t)) : t;
|
|
865
858
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
866
859
|
return t;
|
|
867
860
|
if (c.isArrayBufferView(t))
|
|
@@ -871,17 +864,17 @@ const kt = {
|
|
|
871
864
|
let o;
|
|
872
865
|
if (i) {
|
|
873
866
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
874
|
-
return
|
|
867
|
+
return yi(t, this.formSerializer).toString();
|
|
875
868
|
if ((o = c.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
876
869
|
const d = this.env && this.env.FormData;
|
|
877
|
-
return
|
|
870
|
+
return ke(
|
|
878
871
|
o ? { "files[]": t } : t,
|
|
879
872
|
d && new d(),
|
|
880
873
|
this.formSerializer
|
|
881
874
|
);
|
|
882
875
|
}
|
|
883
876
|
}
|
|
884
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
877
|
+
return i || s ? (r.setContentType("application/json", !1), gi(t)) : t;
|
|
885
878
|
}],
|
|
886
879
|
transformResponse: [function(t) {
|
|
887
880
|
const r = this.transitional || kt.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -893,7 +886,7 @@ const kt = {
|
|
|
893
886
|
return JSON.parse(t);
|
|
894
887
|
} catch (o) {
|
|
895
888
|
if (a)
|
|
896
|
-
throw o.name === "SyntaxError" ?
|
|
889
|
+
throw o.name === "SyntaxError" ? y.from(o, y.ERR_BAD_RESPONSE, this, null, this.response) : o;
|
|
897
890
|
}
|
|
898
891
|
}
|
|
899
892
|
return t;
|
|
@@ -908,8 +901,8 @@ const kt = {
|
|
|
908
901
|
maxContentLength: -1,
|
|
909
902
|
maxBodyLength: -1,
|
|
910
903
|
env: {
|
|
911
|
-
FormData:
|
|
912
|
-
Blob:
|
|
904
|
+
FormData: P.classes.FormData,
|
|
905
|
+
Blob: P.classes.Blob
|
|
913
906
|
},
|
|
914
907
|
validateStatus: function(t) {
|
|
915
908
|
return t >= 200 && t < 300;
|
|
@@ -924,8 +917,8 @@ const kt = {
|
|
|
924
917
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
925
918
|
kt.headers[e] = {};
|
|
926
919
|
});
|
|
927
|
-
var
|
|
928
|
-
const
|
|
920
|
+
var Vt = kt;
|
|
921
|
+
const wi = c.toObjectSet([
|
|
929
922
|
"age",
|
|
930
923
|
"authorization",
|
|
931
924
|
"content-length",
|
|
@@ -944,30 +937,30 @@ const Ti = c.toObjectSet([
|
|
|
944
937
|
"retry-after",
|
|
945
938
|
"user-agent"
|
|
946
939
|
]);
|
|
947
|
-
var
|
|
940
|
+
var Si = (e) => {
|
|
948
941
|
const t = {};
|
|
949
942
|
let r, n, s;
|
|
950
943
|
return e && e.split(`
|
|
951
944
|
`).forEach(function(a) {
|
|
952
|
-
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] &&
|
|
945
|
+
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && wi[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
953
946
|
}), t;
|
|
954
947
|
};
|
|
955
|
-
const
|
|
948
|
+
const dr = Symbol("internals");
|
|
956
949
|
function he(e) {
|
|
957
950
|
return e && String(e).trim().toLowerCase();
|
|
958
951
|
}
|
|
959
952
|
function je(e) {
|
|
960
953
|
return e === !1 || e == null ? e : c.isArray(e) ? e.map(je) : String(e);
|
|
961
954
|
}
|
|
962
|
-
function
|
|
955
|
+
function Ti(e) {
|
|
963
956
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
964
957
|
let n;
|
|
965
958
|
for (; n = r.exec(e); )
|
|
966
959
|
t[n[1]] = n[2];
|
|
967
960
|
return t;
|
|
968
961
|
}
|
|
969
|
-
const
|
|
970
|
-
function
|
|
962
|
+
const Ri = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
963
|
+
function Et(e, t, r, n, s) {
|
|
971
964
|
if (c.isFunction(n))
|
|
972
965
|
return n.call(this, t, r);
|
|
973
966
|
if (s && (t = r), !!c.isString(t)) {
|
|
@@ -977,10 +970,10 @@ function mt(e, t, r, n, s) {
|
|
|
977
970
|
return n.test(t);
|
|
978
971
|
}
|
|
979
972
|
}
|
|
980
|
-
function
|
|
973
|
+
function Ai(e) {
|
|
981
974
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
982
975
|
}
|
|
983
|
-
function
|
|
976
|
+
function vi(e, t) {
|
|
984
977
|
const r = c.toCamelCase(" " + t);
|
|
985
978
|
["get", "set", "has"].forEach((n) => {
|
|
986
979
|
Object.defineProperty(e, n + r, {
|
|
@@ -991,7 +984,7 @@ function Oi(e, t) {
|
|
|
991
984
|
});
|
|
992
985
|
});
|
|
993
986
|
}
|
|
994
|
-
class
|
|
987
|
+
class Ve {
|
|
995
988
|
constructor(t) {
|
|
996
989
|
t && this.set(t);
|
|
997
990
|
}
|
|
@@ -1007,8 +1000,8 @@ class ke {
|
|
|
1007
1000
|
const a = (o, d) => c.forEach(o, (u, l) => i(u, l, d));
|
|
1008
1001
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1009
1002
|
a(t, r);
|
|
1010
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
1011
|
-
a(
|
|
1003
|
+
else if (c.isString(t) && (t = t.trim()) && !Ri(t))
|
|
1004
|
+
a(Si(t), r);
|
|
1012
1005
|
else if (c.isHeaders(t))
|
|
1013
1006
|
for (const [o, d] of t.entries())
|
|
1014
1007
|
i(d, o, n);
|
|
@@ -1024,7 +1017,7 @@ class ke {
|
|
|
1024
1017
|
if (!r)
|
|
1025
1018
|
return s;
|
|
1026
1019
|
if (r === !0)
|
|
1027
|
-
return
|
|
1020
|
+
return Ti(s);
|
|
1028
1021
|
if (c.isFunction(r))
|
|
1029
1022
|
return r.call(this, s, n);
|
|
1030
1023
|
if (c.isRegExp(r))
|
|
@@ -1036,7 +1029,7 @@ class ke {
|
|
|
1036
1029
|
has(t, r) {
|
|
1037
1030
|
if (t = he(t), t) {
|
|
1038
1031
|
const n = c.findKey(this, t);
|
|
1039
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1032
|
+
return !!(n && this[n] !== void 0 && (!r || Et(this, this[n], n, r)));
|
|
1040
1033
|
}
|
|
1041
1034
|
return !1;
|
|
1042
1035
|
}
|
|
@@ -1046,7 +1039,7 @@ class ke {
|
|
|
1046
1039
|
function i(a) {
|
|
1047
1040
|
if (a = he(a), a) {
|
|
1048
1041
|
const o = c.findKey(n, a);
|
|
1049
|
-
o && (!r ||
|
|
1042
|
+
o && (!r || Et(n, n[o], o, r)) && (delete n[o], s = !0);
|
|
1050
1043
|
}
|
|
1051
1044
|
}
|
|
1052
1045
|
return c.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -1056,7 +1049,7 @@ class ke {
|
|
|
1056
1049
|
let n = r.length, s = !1;
|
|
1057
1050
|
for (; n--; ) {
|
|
1058
1051
|
const i = r[n];
|
|
1059
|
-
(!t ||
|
|
1052
|
+
(!t || Et(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
1060
1053
|
}
|
|
1061
1054
|
return s;
|
|
1062
1055
|
}
|
|
@@ -1068,7 +1061,7 @@ class ke {
|
|
|
1068
1061
|
r[a] = je(s), delete r[i];
|
|
1069
1062
|
return;
|
|
1070
1063
|
}
|
|
1071
|
-
const o = t ?
|
|
1064
|
+
const o = t ? Ai(i) : String(i).trim();
|
|
1072
1065
|
o !== i && delete r[i], r[o] = je(s), n[o] = !0;
|
|
1073
1066
|
}), this;
|
|
1074
1067
|
}
|
|
@@ -1099,18 +1092,18 @@ class ke {
|
|
|
1099
1092
|
return r.forEach((s) => n.set(s)), n;
|
|
1100
1093
|
}
|
|
1101
1094
|
static accessor(t) {
|
|
1102
|
-
const n = (this[
|
|
1095
|
+
const n = (this[dr] = this[dr] = {
|
|
1103
1096
|
accessors: {}
|
|
1104
1097
|
}).accessors, s = this.prototype;
|
|
1105
1098
|
function i(a) {
|
|
1106
1099
|
const o = he(a);
|
|
1107
|
-
n[o] || (
|
|
1100
|
+
n[o] || (vi(s, a), n[o] = !0);
|
|
1108
1101
|
}
|
|
1109
1102
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1110
1103
|
}
|
|
1111
1104
|
}
|
|
1112
|
-
|
|
1113
|
-
c.reduceDescriptors(
|
|
1105
|
+
Ve.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1106
|
+
c.reduceDescriptors(Ve.prototype, ({ value: e }, t) => {
|
|
1114
1107
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
1115
1108
|
return {
|
|
1116
1109
|
get: () => e,
|
|
@@ -1119,39 +1112,39 @@ c.reduceDescriptors(ke.prototype, ({ value: e }, t) => {
|
|
|
1119
1112
|
}
|
|
1120
1113
|
};
|
|
1121
1114
|
});
|
|
1122
|
-
c.freezeMethods(
|
|
1123
|
-
var H =
|
|
1115
|
+
c.freezeMethods(Ve);
|
|
1116
|
+
var H = Ve;
|
|
1124
1117
|
function yt(e, t) {
|
|
1125
|
-
const r = this ||
|
|
1118
|
+
const r = this || Vt, n = t || r, s = H.from(n.headers);
|
|
1126
1119
|
let i = n.data;
|
|
1127
1120
|
return c.forEach(e, function(o) {
|
|
1128
1121
|
i = o.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
1129
1122
|
}), s.normalize(), i;
|
|
1130
1123
|
}
|
|
1131
|
-
function
|
|
1124
|
+
function tn(e) {
|
|
1132
1125
|
return !!(e && e.__CANCEL__);
|
|
1133
1126
|
}
|
|
1134
1127
|
function fe(e, t, r) {
|
|
1135
|
-
|
|
1128
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1136
1129
|
}
|
|
1137
|
-
c.inherits(fe,
|
|
1130
|
+
c.inherits(fe, y, {
|
|
1138
1131
|
__CANCEL__: !0
|
|
1139
1132
|
});
|
|
1140
|
-
function
|
|
1133
|
+
function rn(e, t, r) {
|
|
1141
1134
|
const n = r.config.validateStatus;
|
|
1142
|
-
!r.status || !n || n(r.status) ? e(r) : t(new
|
|
1135
|
+
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1143
1136
|
"Request failed with status code " + r.status,
|
|
1144
|
-
[
|
|
1137
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1145
1138
|
r.config,
|
|
1146
1139
|
r.request,
|
|
1147
1140
|
r
|
|
1148
1141
|
));
|
|
1149
1142
|
}
|
|
1150
|
-
function
|
|
1143
|
+
function Ci(e) {
|
|
1151
1144
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1152
1145
|
return t && t[1] || "";
|
|
1153
1146
|
}
|
|
1154
|
-
function
|
|
1147
|
+
function Oi(e, t) {
|
|
1155
1148
|
e = e || 10;
|
|
1156
1149
|
const r = new Array(e), n = new Array(e);
|
|
1157
1150
|
let s = 0, i = 0, a;
|
|
@@ -1167,7 +1160,7 @@ function Bi(e, t) {
|
|
|
1167
1160
|
return w ? Math.round(b * 1e3 / w) : void 0;
|
|
1168
1161
|
};
|
|
1169
1162
|
}
|
|
1170
|
-
function
|
|
1163
|
+
function Pi(e, t) {
|
|
1171
1164
|
let r = 0, n = 1e3 / t, s, i;
|
|
1172
1165
|
const a = (u, l = Date.now()) => {
|
|
1173
1166
|
r = l, s = null, i && (clearTimeout(i), i = null), e.apply(null, u);
|
|
@@ -1179,10 +1172,10 @@ function xi(e, t) {
|
|
|
1179
1172
|
}, n - f)));
|
|
1180
1173
|
}, () => s && a(s)];
|
|
1181
1174
|
}
|
|
1182
|
-
const
|
|
1175
|
+
const Le = (e, t, r = 3) => {
|
|
1183
1176
|
let n = 0;
|
|
1184
|
-
const s =
|
|
1185
|
-
return
|
|
1177
|
+
const s = Oi(50, 250);
|
|
1178
|
+
return Pi((i) => {
|
|
1186
1179
|
const a = i.loaded, o = i.lengthComputable ? i.total : void 0, d = a - n, u = s(d), l = a <= o;
|
|
1187
1180
|
n = a;
|
|
1188
1181
|
const f = {
|
|
@@ -1198,46 +1191,18 @@ const Ue = (e, t, r = 3) => {
|
|
|
1198
1191
|
};
|
|
1199
1192
|
e(f);
|
|
1200
1193
|
}, r);
|
|
1201
|
-
},
|
|
1194
|
+
}, fr = (e, t) => {
|
|
1202
1195
|
const r = e != null;
|
|
1203
1196
|
return [(n) => t[0]({
|
|
1204
1197
|
lengthComputable: r,
|
|
1205
1198
|
total: e,
|
|
1206
1199
|
loaded: n
|
|
1207
1200
|
}), t[1]];
|
|
1208
|
-
},
|
|
1209
|
-
var
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
const t = N.navigator && /(msie|trident)/i.test(N.navigator.userAgent), r = document.createElement("a");
|
|
1214
|
-
let n;
|
|
1215
|
-
function s(i) {
|
|
1216
|
-
let a = i;
|
|
1217
|
-
return t && (r.setAttribute("href", a), a = r.href), r.setAttribute("href", a), {
|
|
1218
|
-
href: r.href,
|
|
1219
|
-
protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
|
|
1220
|
-
host: r.host,
|
|
1221
|
-
search: r.search ? r.search.replace(/^\?/, "") : "",
|
|
1222
|
-
hash: r.hash ? r.hash.replace(/^#/, "") : "",
|
|
1223
|
-
hostname: r.hostname,
|
|
1224
|
-
port: r.port,
|
|
1225
|
-
pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
|
|
1226
|
-
};
|
|
1227
|
-
}
|
|
1228
|
-
return n = s(window.location.href), function(a) {
|
|
1229
|
-
const o = c.isString(a) ? s(a) : a;
|
|
1230
|
-
return o.protocol === n.protocol && o.host === n.host;
|
|
1231
|
-
};
|
|
1232
|
-
}()
|
|
1233
|
-
) : (
|
|
1234
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
1235
|
-
/* @__PURE__ */ function() {
|
|
1236
|
-
return function() {
|
|
1237
|
-
return !0;
|
|
1238
|
-
};
|
|
1239
|
-
}()
|
|
1240
|
-
), ji = N.hasStandardBrowserEnv ? (
|
|
1201
|
+
}, hr = (e) => (...t) => c.asap(() => e(...t));
|
|
1202
|
+
var Bi = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, P.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
1203
|
+
new URL(P.origin),
|
|
1204
|
+
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1205
|
+
) : () => !0, xi = P.hasStandardBrowserEnv ? (
|
|
1241
1206
|
// Standard browser envs support document.cookie
|
|
1242
1207
|
{
|
|
1243
1208
|
write(e, t, r, n, s, i) {
|
|
@@ -1264,27 +1229,28 @@ var Ni = N.hasStandardBrowserEnv ? (
|
|
|
1264
1229
|
}
|
|
1265
1230
|
}
|
|
1266
1231
|
);
|
|
1267
|
-
function
|
|
1232
|
+
function Ni(e) {
|
|
1268
1233
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1269
1234
|
}
|
|
1270
|
-
function
|
|
1235
|
+
function ji(e, t) {
|
|
1271
1236
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1272
1237
|
}
|
|
1273
|
-
function
|
|
1274
|
-
|
|
1238
|
+
function nn(e, t, r) {
|
|
1239
|
+
let n = !Ni(t);
|
|
1240
|
+
return e && n || r == !1 ? ji(e, t) : t;
|
|
1275
1241
|
}
|
|
1276
|
-
const
|
|
1242
|
+
const pr = (e) => e instanceof H ? { ...e } : e;
|
|
1277
1243
|
function ne(e, t) {
|
|
1278
1244
|
t = t || {};
|
|
1279
1245
|
const r = {};
|
|
1280
|
-
function n(u, l, f) {
|
|
1281
|
-
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless:
|
|
1246
|
+
function n(u, l, f, b) {
|
|
1247
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: b }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1282
1248
|
}
|
|
1283
|
-
function s(u, l, f) {
|
|
1249
|
+
function s(u, l, f, b) {
|
|
1284
1250
|
if (c.isUndefined(l)) {
|
|
1285
1251
|
if (!c.isUndefined(u))
|
|
1286
|
-
return n(void 0, u, f);
|
|
1287
|
-
} else return n(u, l, f);
|
|
1252
|
+
return n(void 0, u, f, b);
|
|
1253
|
+
} else return n(u, l, f, b);
|
|
1288
1254
|
}
|
|
1289
1255
|
function i(u, l) {
|
|
1290
1256
|
if (!c.isUndefined(l))
|
|
@@ -1331,43 +1297,43 @@ function ne(e, t) {
|
|
|
1331
1297
|
socketPath: a,
|
|
1332
1298
|
responseEncoding: a,
|
|
1333
1299
|
validateStatus: o,
|
|
1334
|
-
headers: (u, l) => s(
|
|
1300
|
+
headers: (u, l, f) => s(pr(u), pr(l), f, !0)
|
|
1335
1301
|
};
|
|
1336
1302
|
return c.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1337
1303
|
const f = d[l] || s, b = f(e[l], t[l], l);
|
|
1338
1304
|
c.isUndefined(b) && f !== o || (r[l] = b);
|
|
1339
1305
|
}), r;
|
|
1340
1306
|
}
|
|
1341
|
-
var
|
|
1307
|
+
var sn = (e) => {
|
|
1342
1308
|
const t = ne({}, e);
|
|
1343
1309
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: a, auth: o } = t;
|
|
1344
|
-
t.headers = a = H.from(a), t.url =
|
|
1310
|
+
t.headers = a = H.from(a), t.url = Zr(nn(t.baseURL, t.url), e.params, e.paramsSerializer), o && a.set(
|
|
1345
1311
|
"Authorization",
|
|
1346
1312
|
"Basic " + btoa((o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : ""))
|
|
1347
1313
|
);
|
|
1348
1314
|
let d;
|
|
1349
1315
|
if (c.isFormData(r)) {
|
|
1350
|
-
if (
|
|
1316
|
+
if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
|
|
1351
1317
|
a.setContentType(void 0);
|
|
1352
1318
|
else if ((d = a.getContentType()) !== !1) {
|
|
1353
1319
|
const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1354
1320
|
a.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1355
1321
|
}
|
|
1356
1322
|
}
|
|
1357
|
-
if (
|
|
1358
|
-
const u = s && i &&
|
|
1323
|
+
if (P.hasStandardBrowserEnv && (n && c.isFunction(n) && (n = n(t)), n || n !== !1 && Bi(t.url))) {
|
|
1324
|
+
const u = s && i && xi.read(i);
|
|
1359
1325
|
u && a.set(s, u);
|
|
1360
1326
|
}
|
|
1361
1327
|
return t;
|
|
1362
1328
|
};
|
|
1363
|
-
const
|
|
1364
|
-
var
|
|
1329
|
+
const Ui = typeof XMLHttpRequest < "u";
|
|
1330
|
+
var Di = Ui && function(e) {
|
|
1365
1331
|
return new Promise(function(r, n) {
|
|
1366
|
-
const s =
|
|
1332
|
+
const s = sn(e);
|
|
1367
1333
|
let i = s.data;
|
|
1368
1334
|
const a = H.from(s.headers).normalize();
|
|
1369
1335
|
let { responseType: o, onUploadProgress: d, onDownloadProgress: u } = s, l, f, b, w, h;
|
|
1370
|
-
function
|
|
1336
|
+
function E() {
|
|
1371
1337
|
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1372
1338
|
}
|
|
1373
1339
|
let p = new XMLHttpRequest();
|
|
@@ -1377,7 +1343,7 @@ var Hi = Li && function(e) {
|
|
|
1377
1343
|
return;
|
|
1378
1344
|
const C = H.from(
|
|
1379
1345
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1380
|
-
),
|
|
1346
|
+
), B = {
|
|
1381
1347
|
data: !o || o === "text" || o === "json" ? p.responseText : p.response,
|
|
1382
1348
|
status: p.status,
|
|
1383
1349
|
statusText: p.statusText,
|
|
@@ -1385,41 +1351,41 @@ var Hi = Li && function(e) {
|
|
|
1385
1351
|
config: e,
|
|
1386
1352
|
request: p
|
|
1387
1353
|
};
|
|
1388
|
-
|
|
1389
|
-
r(Z),
|
|
1354
|
+
rn(function(Z) {
|
|
1355
|
+
r(Z), E();
|
|
1390
1356
|
}, function(Z) {
|
|
1391
|
-
n(Z),
|
|
1392
|
-
},
|
|
1357
|
+
n(Z), E();
|
|
1358
|
+
}, B), p = null;
|
|
1393
1359
|
}
|
|
1394
1360
|
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1395
1361
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1396
1362
|
}, p.onabort = function() {
|
|
1397
|
-
p && (n(new
|
|
1363
|
+
p && (n(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
|
|
1398
1364
|
}, p.onerror = function() {
|
|
1399
|
-
n(new
|
|
1365
|
+
n(new y("Network Error", y.ERR_NETWORK, e, p)), p = null;
|
|
1400
1366
|
}, p.ontimeout = function() {
|
|
1401
|
-
let
|
|
1402
|
-
const
|
|
1403
|
-
s.timeoutErrorMessage && (
|
|
1404
|
-
|
|
1405
|
-
|
|
1367
|
+
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1368
|
+
const B = s.transitional || Qr;
|
|
1369
|
+
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), n(new y(
|
|
1370
|
+
k,
|
|
1371
|
+
B.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1406
1372
|
e,
|
|
1407
1373
|
p
|
|
1408
1374
|
)), p = null;
|
|
1409
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in p && c.forEach(a.toJSON(), function(
|
|
1410
|
-
p.setRequestHeader(
|
|
1411
|
-
}), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), o && o !== "json" && (p.responseType = s.responseType), u && ([b, h] =
|
|
1375
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in p && c.forEach(a.toJSON(), function(k, B) {
|
|
1376
|
+
p.setRequestHeader(B, k);
|
|
1377
|
+
}), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), o && o !== "json" && (p.responseType = s.responseType), u && ([b, h] = Le(u, !0), p.addEventListener("progress", b)), d && p.upload && ([f, w] = Le(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (C) => {
|
|
1412
1378
|
p && (n(!C || C.type ? new fe(null, e, p) : C), p.abort(), p = null);
|
|
1413
1379
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1414
|
-
const v =
|
|
1415
|
-
if (v &&
|
|
1416
|
-
n(new
|
|
1380
|
+
const v = Ci(s.url);
|
|
1381
|
+
if (v && P.protocols.indexOf(v) === -1) {
|
|
1382
|
+
n(new y("Unsupported protocol " + v + ":", y.ERR_BAD_REQUEST, e));
|
|
1417
1383
|
return;
|
|
1418
1384
|
}
|
|
1419
1385
|
p.send(i || null);
|
|
1420
1386
|
});
|
|
1421
1387
|
};
|
|
1422
|
-
const
|
|
1388
|
+
const Li = (e, t) => {
|
|
1423
1389
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1424
1390
|
if (t || r) {
|
|
1425
1391
|
let n = new AbortController(), s;
|
|
@@ -1427,11 +1393,11 @@ const Mi = (e, t) => {
|
|
|
1427
1393
|
if (!s) {
|
|
1428
1394
|
s = !0, o();
|
|
1429
1395
|
const l = u instanceof Error ? u : this.reason;
|
|
1430
|
-
n.abort(l instanceof
|
|
1396
|
+
n.abort(l instanceof y ? l : new fe(l instanceof Error ? l.message : l));
|
|
1431
1397
|
}
|
|
1432
1398
|
};
|
|
1433
1399
|
let a = t && setTimeout(() => {
|
|
1434
|
-
a = null, i(new
|
|
1400
|
+
a = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1435
1401
|
}, t);
|
|
1436
1402
|
const o = () => {
|
|
1437
1403
|
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
|
|
@@ -1443,8 +1409,8 @@ const Mi = (e, t) => {
|
|
|
1443
1409
|
return d.unsubscribe = () => c.asap(o), d;
|
|
1444
1410
|
}
|
|
1445
1411
|
};
|
|
1446
|
-
var
|
|
1447
|
-
const
|
|
1412
|
+
var Hi = Li;
|
|
1413
|
+
const Mi = function* (e, t) {
|
|
1448
1414
|
let r = e.byteLength;
|
|
1449
1415
|
if (r < t) {
|
|
1450
1416
|
yield e;
|
|
@@ -1453,10 +1419,10 @@ const $i = function* (e, t) {
|
|
|
1453
1419
|
let n = 0, s;
|
|
1454
1420
|
for (; n < r; )
|
|
1455
1421
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1456
|
-
},
|
|
1457
|
-
for await (const r of
|
|
1458
|
-
yield*
|
|
1459
|
-
},
|
|
1422
|
+
}, Ii = async function* (e, t) {
|
|
1423
|
+
for await (const r of $i(e))
|
|
1424
|
+
yield* Mi(r, t);
|
|
1425
|
+
}, $i = async function* (e) {
|
|
1460
1426
|
if (e[Symbol.asyncIterator]) {
|
|
1461
1427
|
yield* e;
|
|
1462
1428
|
return;
|
|
@@ -1472,8 +1438,8 @@ const $i = function* (e, t) {
|
|
|
1472
1438
|
} finally {
|
|
1473
1439
|
await t.cancel();
|
|
1474
1440
|
}
|
|
1475
|
-
},
|
|
1476
|
-
const s =
|
|
1441
|
+
}, mr = (e, t, r, n) => {
|
|
1442
|
+
const s = Ii(e, t);
|
|
1477
1443
|
let i = 0, a, o = (d) => {
|
|
1478
1444
|
a || (a = !0, n && n(d));
|
|
1479
1445
|
};
|
|
@@ -1501,15 +1467,15 @@ const $i = function* (e, t) {
|
|
|
1501
1467
|
}, {
|
|
1502
1468
|
highWaterMark: 2
|
|
1503
1469
|
});
|
|
1504
|
-
}, Ge = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1470
|
+
}, Ge = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", an = Ge && typeof ReadableStream == "function", qi = Ge && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), on = (e, ...t) => {
|
|
1505
1471
|
try {
|
|
1506
1472
|
return !!e(...t);
|
|
1507
1473
|
} catch {
|
|
1508
1474
|
return !1;
|
|
1509
1475
|
}
|
|
1510
|
-
},
|
|
1476
|
+
}, Fi = an && on(() => {
|
|
1511
1477
|
let e = !1;
|
|
1512
|
-
const t = new Request(
|
|
1478
|
+
const t = new Request(P.origin, {
|
|
1513
1479
|
body: new ReadableStream(),
|
|
1514
1480
|
method: "POST",
|
|
1515
1481
|
get duplex() {
|
|
@@ -1517,35 +1483,35 @@ const $i = function* (e, t) {
|
|
|
1517
1483
|
}
|
|
1518
1484
|
}).headers.has("Content-Type");
|
|
1519
1485
|
return e && !t;
|
|
1520
|
-
}),
|
|
1521
|
-
stream:
|
|
1486
|
+
}), Er = 64 * 1024, Ut = an && on(() => c.isReadableStream(new Response("").body)), He = {
|
|
1487
|
+
stream: Ut && ((e) => e.body)
|
|
1522
1488
|
};
|
|
1523
1489
|
Ge && ((e) => {
|
|
1524
1490
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1525
|
-
!
|
|
1526
|
-
throw new
|
|
1491
|
+
!He[t] && (He[t] = c.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1492
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, n);
|
|
1527
1493
|
});
|
|
1528
1494
|
});
|
|
1529
1495
|
})(new Response());
|
|
1530
|
-
const
|
|
1496
|
+
const Ki = async (e) => {
|
|
1531
1497
|
if (e == null)
|
|
1532
1498
|
return 0;
|
|
1533
1499
|
if (c.isBlob(e))
|
|
1534
1500
|
return e.size;
|
|
1535
1501
|
if (c.isSpecCompliantForm(e))
|
|
1536
|
-
return (await new Request(
|
|
1502
|
+
return (await new Request(P.origin, {
|
|
1537
1503
|
method: "POST",
|
|
1538
1504
|
body: e
|
|
1539
1505
|
}).arrayBuffer()).byteLength;
|
|
1540
1506
|
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1541
1507
|
return e.byteLength;
|
|
1542
1508
|
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1543
|
-
return (await
|
|
1544
|
-
},
|
|
1509
|
+
return (await qi(e)).byteLength;
|
|
1510
|
+
}, zi = async (e, t) => {
|
|
1545
1511
|
const r = c.toFiniteNumber(e.getContentLength());
|
|
1546
|
-
return r ??
|
|
1512
|
+
return r ?? Ki(t);
|
|
1547
1513
|
};
|
|
1548
|
-
var
|
|
1514
|
+
var Wi = Ge && (async (e) => {
|
|
1549
1515
|
let {
|
|
1550
1516
|
url: t,
|
|
1551
1517
|
method: r,
|
|
@@ -1559,26 +1525,26 @@ var Gi = Ge && (async (e) => {
|
|
|
1559
1525
|
headers: l,
|
|
1560
1526
|
withCredentials: f = "same-origin",
|
|
1561
1527
|
fetchOptions: b
|
|
1562
|
-
} =
|
|
1528
|
+
} = sn(e);
|
|
1563
1529
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1564
|
-
let w =
|
|
1565
|
-
const
|
|
1530
|
+
let w = Hi([s, i && i.toAbortSignal()], a), h;
|
|
1531
|
+
const E = w && w.unsubscribe && (() => {
|
|
1566
1532
|
w.unsubscribe();
|
|
1567
1533
|
});
|
|
1568
1534
|
let p;
|
|
1569
1535
|
try {
|
|
1570
|
-
if (d &&
|
|
1571
|
-
let
|
|
1536
|
+
if (d && Fi && r !== "get" && r !== "head" && (p = await zi(l, n)) !== 0) {
|
|
1537
|
+
let B = new Request(t, {
|
|
1572
1538
|
method: "POST",
|
|
1573
1539
|
body: n,
|
|
1574
1540
|
duplex: "half"
|
|
1575
1541
|
}), G;
|
|
1576
|
-
if (c.isFormData(n) && (G =
|
|
1577
|
-
const [Z, Re] =
|
|
1542
|
+
if (c.isFormData(n) && (G = B.headers.get("content-type")) && l.setContentType(G), B.body) {
|
|
1543
|
+
const [Z, Re] = fr(
|
|
1578
1544
|
p,
|
|
1579
|
-
|
|
1545
|
+
Le(hr(d))
|
|
1580
1546
|
);
|
|
1581
|
-
n =
|
|
1547
|
+
n = mr(B.body, Er, Z, Re);
|
|
1582
1548
|
}
|
|
1583
1549
|
}
|
|
1584
1550
|
c.isString(f) || (f = f ? "include" : "omit");
|
|
@@ -1593,28 +1559,28 @@ var Gi = Ge && (async (e) => {
|
|
|
1593
1559
|
credentials: S ? f : void 0
|
|
1594
1560
|
});
|
|
1595
1561
|
let v = await fetch(h);
|
|
1596
|
-
const C =
|
|
1597
|
-
if (
|
|
1598
|
-
const
|
|
1599
|
-
["status", "statusText", "headers"].forEach((
|
|
1600
|
-
|
|
1562
|
+
const C = Ut && (u === "stream" || u === "response");
|
|
1563
|
+
if (Ut && (o || C && E)) {
|
|
1564
|
+
const B = {};
|
|
1565
|
+
["status", "statusText", "headers"].forEach((ar) => {
|
|
1566
|
+
B[ar] = v[ar];
|
|
1601
1567
|
});
|
|
1602
|
-
const G = c.toFiniteNumber(v.headers.get("content-length")), [Z, Re] = o &&
|
|
1568
|
+
const G = c.toFiniteNumber(v.headers.get("content-length")), [Z, Re] = o && fr(
|
|
1603
1569
|
G,
|
|
1604
|
-
|
|
1570
|
+
Le(hr(o), !0)
|
|
1605
1571
|
) || [];
|
|
1606
1572
|
v = new Response(
|
|
1607
|
-
|
|
1608
|
-
Re && Re(),
|
|
1573
|
+
mr(v.body, Er, Z, () => {
|
|
1574
|
+
Re && Re(), E && E();
|
|
1609
1575
|
}),
|
|
1610
|
-
|
|
1576
|
+
B
|
|
1611
1577
|
);
|
|
1612
1578
|
}
|
|
1613
1579
|
u = u || "text";
|
|
1614
|
-
let
|
|
1615
|
-
return !C &&
|
|
1616
|
-
|
|
1617
|
-
data:
|
|
1580
|
+
let k = await He[c.findKey(He, u) || "text"](v, e);
|
|
1581
|
+
return !C && E && E(), await new Promise((B, G) => {
|
|
1582
|
+
rn(B, G, {
|
|
1583
|
+
data: k,
|
|
1618
1584
|
headers: H.from(v.headers),
|
|
1619
1585
|
status: v.status,
|
|
1620
1586
|
statusText: v.statusText,
|
|
@@ -1623,18 +1589,18 @@ var Gi = Ge && (async (e) => {
|
|
|
1623
1589
|
});
|
|
1624
1590
|
});
|
|
1625
1591
|
} catch (S) {
|
|
1626
|
-
throw
|
|
1627
|
-
new
|
|
1592
|
+
throw E && E(), S && S.name === "TypeError" && /fetch/i.test(S.message) ? Object.assign(
|
|
1593
|
+
new y("Network Error", y.ERR_NETWORK, e, h),
|
|
1628
1594
|
{
|
|
1629
1595
|
cause: S.cause || S
|
|
1630
1596
|
}
|
|
1631
|
-
) :
|
|
1597
|
+
) : y.from(S, S && S.code, e, h);
|
|
1632
1598
|
}
|
|
1633
1599
|
});
|
|
1634
1600
|
const Dt = {
|
|
1635
|
-
http:
|
|
1636
|
-
xhr:
|
|
1637
|
-
fetch:
|
|
1601
|
+
http: si,
|
|
1602
|
+
xhr: Di,
|
|
1603
|
+
fetch: Wi
|
|
1638
1604
|
};
|
|
1639
1605
|
c.forEach(Dt, (e, t) => {
|
|
1640
1606
|
if (e) {
|
|
@@ -1645,8 +1611,8 @@ c.forEach(Dt, (e, t) => {
|
|
|
1645
1611
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1646
1612
|
}
|
|
1647
1613
|
});
|
|
1648
|
-
const
|
|
1649
|
-
var
|
|
1614
|
+
const yr = (e) => `- ${e}`, ki = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1615
|
+
var cn = {
|
|
1650
1616
|
getAdapter: (e) => {
|
|
1651
1617
|
e = c.isArray(e) ? e : [e];
|
|
1652
1618
|
const { length: t } = e;
|
|
@@ -1655,8 +1621,8 @@ var un = {
|
|
|
1655
1621
|
for (let i = 0; i < t; i++) {
|
|
1656
1622
|
r = e[i];
|
|
1657
1623
|
let a;
|
|
1658
|
-
if (n = r, !
|
|
1659
|
-
throw new
|
|
1624
|
+
if (n = r, !ki(r) && (n = Dt[(a = String(r)).toLowerCase()], n === void 0))
|
|
1625
|
+
throw new y(`Unknown adapter '${a}'`);
|
|
1660
1626
|
if (n)
|
|
1661
1627
|
break;
|
|
1662
1628
|
s[a || "#" + i] = n;
|
|
@@ -1666,9 +1632,9 @@ var un = {
|
|
|
1666
1632
|
([o, d]) => `adapter ${o} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1667
1633
|
);
|
|
1668
1634
|
let a = t ? i.length > 1 ? `since :
|
|
1669
|
-
` + i.map(
|
|
1670
|
-
`) : " " +
|
|
1671
|
-
throw new
|
|
1635
|
+
` + i.map(yr).join(`
|
|
1636
|
+
`) : " " + yr(i[0]) : "as no adapter specified";
|
|
1637
|
+
throw new y(
|
|
1672
1638
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1673
1639
|
"ERR_NOT_SUPPORT"
|
|
1674
1640
|
);
|
|
@@ -1677,46 +1643,46 @@ var un = {
|
|
|
1677
1643
|
},
|
|
1678
1644
|
adapters: Dt
|
|
1679
1645
|
};
|
|
1680
|
-
function
|
|
1646
|
+
function bt(e) {
|
|
1681
1647
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1682
1648
|
throw new fe(null, e);
|
|
1683
1649
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return
|
|
1650
|
+
function br(e) {
|
|
1651
|
+
return bt(e), e.headers = H.from(e.headers), e.data = yt.call(
|
|
1686
1652
|
e,
|
|
1687
1653
|
e.transformRequest
|
|
1688
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1689
|
-
return
|
|
1654
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), cn.getAdapter(e.adapter || Vt.adapter)(e).then(function(n) {
|
|
1655
|
+
return bt(e), n.data = yt.call(
|
|
1690
1656
|
e,
|
|
1691
1657
|
e.transformResponse,
|
|
1692
1658
|
n
|
|
1693
1659
|
), n.headers = H.from(n.headers), n;
|
|
1694
1660
|
}, function(n) {
|
|
1695
|
-
return
|
|
1661
|
+
return tn(n) || (bt(e), n && n.response && (n.response.data = yt.call(
|
|
1696
1662
|
e,
|
|
1697
1663
|
e.transformResponse,
|
|
1698
1664
|
n.response
|
|
1699
1665
|
), n.response.headers = H.from(n.response.headers))), Promise.reject(n);
|
|
1700
1666
|
});
|
|
1701
1667
|
}
|
|
1702
|
-
const
|
|
1668
|
+
const un = "1.8.2", Je = {};
|
|
1703
1669
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1704
|
-
|
|
1670
|
+
Je[e] = function(n) {
|
|
1705
1671
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1706
1672
|
};
|
|
1707
1673
|
});
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1674
|
+
const _r = {};
|
|
1675
|
+
Je.transitional = function(t, r, n) {
|
|
1710
1676
|
function s(i, a) {
|
|
1711
|
-
return "[Axios v" +
|
|
1677
|
+
return "[Axios v" + un + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
|
|
1712
1678
|
}
|
|
1713
1679
|
return (i, a, o) => {
|
|
1714
1680
|
if (t === !1)
|
|
1715
|
-
throw new
|
|
1681
|
+
throw new y(
|
|
1716
1682
|
s(a, " has been removed" + (r ? " in " + r : "")),
|
|
1717
|
-
|
|
1683
|
+
y.ERR_DEPRECATED
|
|
1718
1684
|
);
|
|
1719
|
-
return r && !
|
|
1685
|
+
return r && !_r[a] && (_r[a] = !0, console.warn(
|
|
1720
1686
|
s(
|
|
1721
1687
|
a,
|
|
1722
1688
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1724,9 +1690,12 @@ Vt.transitional = function(t, r, n) {
|
|
|
1724
1690
|
)), t ? t(i, a, o) : !0;
|
|
1725
1691
|
};
|
|
1726
1692
|
};
|
|
1727
|
-
function
|
|
1693
|
+
Je.spelling = function(t) {
|
|
1694
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1695
|
+
};
|
|
1696
|
+
function Vi(e, t, r) {
|
|
1728
1697
|
if (typeof e != "object")
|
|
1729
|
-
throw new
|
|
1698
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1730
1699
|
const n = Object.keys(e);
|
|
1731
1700
|
let s = n.length;
|
|
1732
1701
|
for (; s-- > 0; ) {
|
|
@@ -1734,23 +1703,23 @@ function Ji(e, t, r) {
|
|
|
1734
1703
|
if (a) {
|
|
1735
1704
|
const o = e[i], d = o === void 0 || a(o, i, e);
|
|
1736
1705
|
if (d !== !0)
|
|
1737
|
-
throw new
|
|
1706
|
+
throw new y("option " + i + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
1738
1707
|
continue;
|
|
1739
1708
|
}
|
|
1740
1709
|
if (r !== !0)
|
|
1741
|
-
throw new
|
|
1710
|
+
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1742
1711
|
}
|
|
1743
1712
|
}
|
|
1744
|
-
var
|
|
1745
|
-
assertOptions:
|
|
1746
|
-
validators:
|
|
1713
|
+
var Ue = {
|
|
1714
|
+
assertOptions: Vi,
|
|
1715
|
+
validators: Je
|
|
1747
1716
|
};
|
|
1748
|
-
const
|
|
1749
|
-
class
|
|
1717
|
+
const $ = Ue.validators;
|
|
1718
|
+
class Me {
|
|
1750
1719
|
constructor(t) {
|
|
1751
1720
|
this.defaults = t, this.interceptors = {
|
|
1752
|
-
request: new
|
|
1753
|
-
response: new
|
|
1721
|
+
request: new lr(),
|
|
1722
|
+
response: new lr()
|
|
1754
1723
|
};
|
|
1755
1724
|
}
|
|
1756
1725
|
/**
|
|
@@ -1766,8 +1735,8 @@ class He {
|
|
|
1766
1735
|
return await this._request(t, r);
|
|
1767
1736
|
} catch (n) {
|
|
1768
1737
|
if (n instanceof Error) {
|
|
1769
|
-
let s;
|
|
1770
|
-
Error.captureStackTrace ? Error.captureStackTrace(s
|
|
1738
|
+
let s = {};
|
|
1739
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1771
1740
|
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1772
1741
|
try {
|
|
1773
1742
|
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
@@ -1781,16 +1750,19 @@ class He {
|
|
|
1781
1750
|
_request(t, r) {
|
|
1782
1751
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = ne(this.defaults, r);
|
|
1783
1752
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1784
|
-
n !== void 0 &&
|
|
1785
|
-
silentJSONParsing:
|
|
1786
|
-
forcedJSONParsing:
|
|
1787
|
-
clarifyTimeoutError:
|
|
1753
|
+
n !== void 0 && Ue.assertOptions(n, {
|
|
1754
|
+
silentJSONParsing: $.transitional($.boolean),
|
|
1755
|
+
forcedJSONParsing: $.transitional($.boolean),
|
|
1756
|
+
clarifyTimeoutError: $.transitional($.boolean)
|
|
1788
1757
|
}, !1), s != null && (c.isFunction(s) ? r.paramsSerializer = {
|
|
1789
1758
|
serialize: s
|
|
1790
|
-
} :
|
|
1791
|
-
encode:
|
|
1792
|
-
serialize:
|
|
1793
|
-
}, !0)), r.
|
|
1759
|
+
} : Ue.assertOptions(s, {
|
|
1760
|
+
encode: $.function,
|
|
1761
|
+
serialize: $.function
|
|
1762
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Ue.assertOptions(r, {
|
|
1763
|
+
baseUrl: $.spelling("baseURL"),
|
|
1764
|
+
withXsrfToken: $.spelling("withXSRFToken")
|
|
1765
|
+
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1794
1766
|
let a = i && c.merge(
|
|
1795
1767
|
i.common,
|
|
1796
1768
|
i[r.method]
|
|
@@ -1803,16 +1775,16 @@ class He {
|
|
|
1803
1775
|
), r.headers = H.concat(a, i);
|
|
1804
1776
|
const o = [];
|
|
1805
1777
|
let d = !0;
|
|
1806
|
-
this.interceptors.request.forEach(function(
|
|
1807
|
-
typeof
|
|
1778
|
+
this.interceptors.request.forEach(function(E) {
|
|
1779
|
+
typeof E.runWhen == "function" && E.runWhen(r) === !1 || (d = d && E.synchronous, o.unshift(E.fulfilled, E.rejected));
|
|
1808
1780
|
});
|
|
1809
1781
|
const u = [];
|
|
1810
|
-
this.interceptors.response.forEach(function(
|
|
1811
|
-
u.push(
|
|
1782
|
+
this.interceptors.response.forEach(function(E) {
|
|
1783
|
+
u.push(E.fulfilled, E.rejected);
|
|
1812
1784
|
});
|
|
1813
1785
|
let l, f = 0, b;
|
|
1814
1786
|
if (!d) {
|
|
1815
|
-
const h = [
|
|
1787
|
+
const h = [br.bind(this), void 0];
|
|
1816
1788
|
for (h.unshift.apply(h, o), h.push.apply(h, u), b = h.length, l = Promise.resolve(r); f < b; )
|
|
1817
1789
|
l = l.then(h[f++], h[f++]);
|
|
1818
1790
|
return l;
|
|
@@ -1820,16 +1792,16 @@ class He {
|
|
|
1820
1792
|
b = o.length;
|
|
1821
1793
|
let w = r;
|
|
1822
1794
|
for (f = 0; f < b; ) {
|
|
1823
|
-
const h = o[f++],
|
|
1795
|
+
const h = o[f++], E = o[f++];
|
|
1824
1796
|
try {
|
|
1825
1797
|
w = h(w);
|
|
1826
1798
|
} catch (p) {
|
|
1827
|
-
|
|
1799
|
+
E.call(this, p);
|
|
1828
1800
|
break;
|
|
1829
1801
|
}
|
|
1830
1802
|
}
|
|
1831
1803
|
try {
|
|
1832
|
-
l =
|
|
1804
|
+
l = br.call(this, w);
|
|
1833
1805
|
} catch (h) {
|
|
1834
1806
|
return Promise.reject(h);
|
|
1835
1807
|
}
|
|
@@ -1839,12 +1811,12 @@ class He {
|
|
|
1839
1811
|
}
|
|
1840
1812
|
getUri(t) {
|
|
1841
1813
|
t = ne(this.defaults, t);
|
|
1842
|
-
const r =
|
|
1843
|
-
return
|
|
1814
|
+
const r = nn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1815
|
+
return Zr(r, t.params, t.paramsSerializer);
|
|
1844
1816
|
}
|
|
1845
1817
|
}
|
|
1846
1818
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1847
|
-
|
|
1819
|
+
Me.prototype[t] = function(r, n) {
|
|
1848
1820
|
return this.request(ne(n || {}, {
|
|
1849
1821
|
method: t,
|
|
1850
1822
|
url: r,
|
|
@@ -1865,10 +1837,10 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1865
1837
|
}));
|
|
1866
1838
|
};
|
|
1867
1839
|
}
|
|
1868
|
-
|
|
1840
|
+
Me.prototype[t] = r(), Me.prototype[t + "Form"] = r(!0);
|
|
1869
1841
|
});
|
|
1870
|
-
var De =
|
|
1871
|
-
class
|
|
1842
|
+
var De = Me;
|
|
1843
|
+
class Gt {
|
|
1872
1844
|
constructor(t) {
|
|
1873
1845
|
if (typeof t != "function")
|
|
1874
1846
|
throw new TypeError("executor must be a function.");
|
|
@@ -1934,20 +1906,20 @@ class Jt {
|
|
|
1934
1906
|
static source() {
|
|
1935
1907
|
let t;
|
|
1936
1908
|
return {
|
|
1937
|
-
token: new
|
|
1909
|
+
token: new Gt(function(s) {
|
|
1938
1910
|
t = s;
|
|
1939
1911
|
}),
|
|
1940
1912
|
cancel: t
|
|
1941
1913
|
};
|
|
1942
1914
|
}
|
|
1943
1915
|
}
|
|
1944
|
-
var
|
|
1945
|
-
function
|
|
1916
|
+
var Gi = Gt;
|
|
1917
|
+
function Ji(e) {
|
|
1946
1918
|
return function(r) {
|
|
1947
1919
|
return e.apply(null, r);
|
|
1948
1920
|
};
|
|
1949
1921
|
}
|
|
1950
|
-
function
|
|
1922
|
+
function Yi(e) {
|
|
1951
1923
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1952
1924
|
}
|
|
1953
1925
|
const Lt = {
|
|
@@ -2018,35 +1990,35 @@ const Lt = {
|
|
|
2018
1990
|
Object.entries(Lt).forEach(([e, t]) => {
|
|
2019
1991
|
Lt[t] = e;
|
|
2020
1992
|
});
|
|
2021
|
-
var
|
|
2022
|
-
function
|
|
1993
|
+
var Xi = Lt;
|
|
1994
|
+
function ln(e) {
|
|
2023
1995
|
const t = new De(e), r = qr(De.prototype.request, t);
|
|
2024
1996
|
return c.extend(r, De.prototype, t, { allOwnKeys: !0 }), c.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2025
|
-
return
|
|
1997
|
+
return ln(ne(e, s));
|
|
2026
1998
|
}, r;
|
|
2027
1999
|
}
|
|
2028
|
-
const A =
|
|
2000
|
+
const A = ln(Vt);
|
|
2029
2001
|
A.Axios = De;
|
|
2030
2002
|
A.CanceledError = fe;
|
|
2031
|
-
A.CancelToken =
|
|
2032
|
-
A.isCancel =
|
|
2033
|
-
A.VERSION =
|
|
2034
|
-
A.toFormData =
|
|
2035
|
-
A.AxiosError =
|
|
2003
|
+
A.CancelToken = Gi;
|
|
2004
|
+
A.isCancel = tn;
|
|
2005
|
+
A.VERSION = un;
|
|
2006
|
+
A.toFormData = ke;
|
|
2007
|
+
A.AxiosError = y;
|
|
2036
2008
|
A.Cancel = A.CanceledError;
|
|
2037
2009
|
A.all = function(t) {
|
|
2038
2010
|
return Promise.all(t);
|
|
2039
2011
|
};
|
|
2040
|
-
A.spread =
|
|
2041
|
-
A.isAxiosError =
|
|
2012
|
+
A.spread = Ji;
|
|
2013
|
+
A.isAxiosError = Yi;
|
|
2042
2014
|
A.mergeConfig = ne;
|
|
2043
2015
|
A.AxiosHeaders = H;
|
|
2044
|
-
A.formToJSON = (e) =>
|
|
2045
|
-
A.getAdapter =
|
|
2046
|
-
A.HttpStatusCode =
|
|
2016
|
+
A.formToJSON = (e) => en(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2017
|
+
A.getAdapter = cn.getAdapter;
|
|
2018
|
+
A.HttpStatusCode = Xi;
|
|
2047
2019
|
A.default = A;
|
|
2048
|
-
var
|
|
2049
|
-
const
|
|
2020
|
+
var dn = A, Jt = { exports: {} };
|
|
2021
|
+
const fn = (e) => typeof e == "object" && e !== null, hn = Symbol("skip"), gr = (e) => fn(e) && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Ht = (e, t, r, n = /* @__PURE__ */ new WeakMap()) => {
|
|
2050
2022
|
if (r = {
|
|
2051
2023
|
deep: !1,
|
|
2052
2024
|
target: {},
|
|
@@ -2056,45 +2028,45 @@ const hn = (e) => typeof e == "object" && e !== null, pn = Symbol("skip"), Sr =
|
|
|
2056
2028
|
n.set(e, r.target);
|
|
2057
2029
|
const { target: s } = r;
|
|
2058
2030
|
delete r.target;
|
|
2059
|
-
const i = (a) => a.map((o) =>
|
|
2031
|
+
const i = (a) => a.map((o) => gr(o) ? Ht(o, t, r, n) : o);
|
|
2060
2032
|
if (Array.isArray(e))
|
|
2061
2033
|
return i(e);
|
|
2062
2034
|
for (const [a, o] of Object.entries(e)) {
|
|
2063
2035
|
const d = t(a, o, e);
|
|
2064
|
-
if (d ===
|
|
2036
|
+
if (d === hn)
|
|
2065
2037
|
continue;
|
|
2066
2038
|
let [u, l, { shouldRecurse: f = !0 } = {}] = d;
|
|
2067
|
-
u !== "__proto__" && (r.deep && f &&
|
|
2039
|
+
u !== "__proto__" && (r.deep && f && gr(l) && (l = Array.isArray(l) ? i(l) : Ht(l, t, r, n)), s[u] = l);
|
|
2068
2040
|
}
|
|
2069
2041
|
return s;
|
|
2070
2042
|
};
|
|
2071
|
-
|
|
2072
|
-
if (!
|
|
2043
|
+
Jt.exports = (e, t, r) => {
|
|
2044
|
+
if (!fn(e))
|
|
2073
2045
|
throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);
|
|
2074
2046
|
return Ht(e, t, r);
|
|
2075
2047
|
};
|
|
2076
|
-
|
|
2077
|
-
var
|
|
2078
|
-
const
|
|
2048
|
+
Jt.exports.mapObjectSkip = hn;
|
|
2049
|
+
var pn = Jt.exports, Yt = { exports: {} };
|
|
2050
|
+
const Zi = (e) => {
|
|
2079
2051
|
let t = !1, r = !1, n = !1;
|
|
2080
2052
|
for (let s = 0; s < e.length; s++) {
|
|
2081
2053
|
const i = e[s];
|
|
2082
2054
|
t && /[a-zA-Z]/.test(i) && i.toUpperCase() === i ? (e = e.slice(0, s) + "-" + e.slice(s), t = !1, n = r, r = !0, s++) : r && n && /[a-zA-Z]/.test(i) && i.toLowerCase() === i ? (e = e.slice(0, s - 1) + "-" + e.slice(s - 1), n = r, r = !1, t = !0) : (t = i.toLowerCase() === i && i.toUpperCase() !== i, n = r, r = i.toUpperCase() === i && i.toLowerCase() !== i);
|
|
2083
2055
|
}
|
|
2084
2056
|
return e;
|
|
2085
|
-
},
|
|
2057
|
+
}, mn = (e, t) => {
|
|
2086
2058
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
2087
2059
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
2088
2060
|
t = Object.assign({
|
|
2089
2061
|
pascalCase: !1
|
|
2090
2062
|
}, t);
|
|
2091
2063
|
const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
2092
|
-
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e =
|
|
2064
|
+
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e = Zi(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
|
|
2093
2065
|
};
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
var
|
|
2097
|
-
class
|
|
2066
|
+
Yt.exports = mn;
|
|
2067
|
+
Yt.exports.default = mn;
|
|
2068
|
+
var Qi = Yt.exports;
|
|
2069
|
+
class ea {
|
|
2098
2070
|
constructor(t = {}) {
|
|
2099
2071
|
if (!(t.maxSize && t.maxSize > 0))
|
|
2100
2072
|
throw new TypeError("`maxSize` must be a number greater than 0");
|
|
@@ -2153,9 +2125,9 @@ class ra {
|
|
|
2153
2125
|
return this._size + t;
|
|
2154
2126
|
}
|
|
2155
2127
|
}
|
|
2156
|
-
var
|
|
2157
|
-
const
|
|
2158
|
-
if (!
|
|
2128
|
+
var ta = ea;
|
|
2129
|
+
const wr = pn, ra = Qi, na = ta, sa = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), _t = new na({ maxSize: 1e5 }), Sr = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Tr = (e, t) => {
|
|
2130
|
+
if (!Sr(e))
|
|
2159
2131
|
return e;
|
|
2160
2132
|
t = {
|
|
2161
2133
|
deep: !1,
|
|
@@ -2163,99 +2135,99 @@ const Tr = mn, sa = ta, ia = na, aa = (e, t) => e.some((r) => typeof r == "strin
|
|
|
2163
2135
|
...t
|
|
2164
2136
|
};
|
|
2165
2137
|
const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (d) => (u, l) => {
|
|
2166
|
-
if (i &&
|
|
2138
|
+
if (i && Sr(l)) {
|
|
2167
2139
|
const f = d === void 0 ? u : `${d}.${u}`;
|
|
2168
|
-
a.has(f) || (l =
|
|
2140
|
+
a.has(f) || (l = wr(l, o(f)));
|
|
2169
2141
|
}
|
|
2170
|
-
if (!(r &&
|
|
2142
|
+
if (!(r && sa(r, u))) {
|
|
2171
2143
|
const f = n ? `${u}_` : u;
|
|
2172
|
-
if (
|
|
2173
|
-
u =
|
|
2144
|
+
if (_t.has(f))
|
|
2145
|
+
u = _t.get(f);
|
|
2174
2146
|
else {
|
|
2175
|
-
const b =
|
|
2176
|
-
u.length < 100 &&
|
|
2147
|
+
const b = ra(u, { pascalCase: n });
|
|
2148
|
+
u.length < 100 && _t.set(f, b), u = b;
|
|
2177
2149
|
}
|
|
2178
2150
|
}
|
|
2179
2151
|
return [u, l];
|
|
2180
2152
|
};
|
|
2181
|
-
return
|
|
2153
|
+
return wr(e, o(void 0));
|
|
2182
2154
|
};
|
|
2183
|
-
var
|
|
2155
|
+
var ia = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => Tr(e[r], t)) : Tr(e, t), gt, Rr;
|
|
2184
2156
|
function En() {
|
|
2185
|
-
return
|
|
2157
|
+
return Rr || (Rr = 1, gt = En()), gt;
|
|
2186
2158
|
}
|
|
2187
|
-
var
|
|
2188
|
-
return
|
|
2159
|
+
var Ie = function() {
|
|
2160
|
+
return Ie = Object.assign || function(t) {
|
|
2189
2161
|
for (var r, n = 1, s = arguments.length; n < s; n++) {
|
|
2190
2162
|
r = arguments[n];
|
|
2191
2163
|
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
|
|
2192
2164
|
}
|
|
2193
2165
|
return t;
|
|
2194
|
-
},
|
|
2166
|
+
}, Ie.apply(this, arguments);
|
|
2195
2167
|
};
|
|
2196
|
-
function
|
|
2168
|
+
function aa(e) {
|
|
2197
2169
|
return e.toLowerCase();
|
|
2198
2170
|
}
|
|
2199
|
-
var
|
|
2200
|
-
function
|
|
2171
|
+
var oa = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], ca = /[^A-Z0-9]+/gi;
|
|
2172
|
+
function ua(e, t) {
|
|
2201
2173
|
t === void 0 && (t = {});
|
|
2202
|
-
for (var r = t.splitRegexp, n = r === void 0 ?
|
|
2174
|
+
for (var r = t.splitRegexp, n = r === void 0 ? oa : r, s = t.stripRegexp, i = s === void 0 ? ca : s, a = t.transform, o = a === void 0 ? aa : a, d = t.delimiter, u = d === void 0 ? " " : d, l = Ar(Ar(e, n, "$1\0$2"), i, "\0"), f = 0, b = l.length; l.charAt(f) === "\0"; )
|
|
2203
2175
|
f++;
|
|
2204
2176
|
for (; l.charAt(b - 1) === "\0"; )
|
|
2205
2177
|
b--;
|
|
2206
2178
|
return l.slice(f, b).split("\0").map(o).join(u);
|
|
2207
2179
|
}
|
|
2208
|
-
function
|
|
2180
|
+
function Ar(e, t, r) {
|
|
2209
2181
|
return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(n, s) {
|
|
2210
2182
|
return n.replace(s, r);
|
|
2211
2183
|
}, e);
|
|
2212
2184
|
}
|
|
2213
|
-
function
|
|
2214
|
-
return t === void 0 && (t = {}),
|
|
2185
|
+
function la(e, t) {
|
|
2186
|
+
return t === void 0 && (t = {}), ua(e, Ie({ delimiter: "." }, t));
|
|
2215
2187
|
}
|
|
2216
|
-
function
|
|
2217
|
-
return t === void 0 && (t = {}),
|
|
2188
|
+
function da(e, t) {
|
|
2189
|
+
return t === void 0 && (t = {}), la(e, Ie({ delimiter: "_" }, t));
|
|
2218
2190
|
}
|
|
2219
|
-
const
|
|
2191
|
+
const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2220
2192
|
__proto__: null,
|
|
2221
|
-
snakeCase:
|
|
2222
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2223
|
-
var
|
|
2224
|
-
function
|
|
2225
|
-
return
|
|
2193
|
+
snakeCase: da
|
|
2194
|
+
}, Symbol.toStringTag, { value: "Module" })), ha = /* @__PURE__ */ rs(fa);
|
|
2195
|
+
var pa = ba, ma = /\s/, Ea = /(_|-|\.|:)/, ya = /([a-z][A-Z]|[A-Z][a-z])/;
|
|
2196
|
+
function ba(e) {
|
|
2197
|
+
return ma.test(e) ? e.toLowerCase() : Ea.test(e) ? (ga(e) || e).toLowerCase() : ya.test(e) ? Sa(e).toLowerCase() : e.toLowerCase();
|
|
2226
2198
|
}
|
|
2227
|
-
var
|
|
2228
|
-
function
|
|
2229
|
-
return e.replace(
|
|
2199
|
+
var _a = /[\W_]+(.|$)/g;
|
|
2200
|
+
function ga(e) {
|
|
2201
|
+
return e.replace(_a, function(t, r) {
|
|
2230
2202
|
return r ? " " + r : "";
|
|
2231
2203
|
});
|
|
2232
2204
|
}
|
|
2233
|
-
var
|
|
2234
|
-
function
|
|
2235
|
-
return e.replace(
|
|
2205
|
+
var wa = /(.)([A-Z]+)/g;
|
|
2206
|
+
function Sa(e) {
|
|
2207
|
+
return e.replace(wa, function(t, r, n) {
|
|
2236
2208
|
return r + " " + n.toLowerCase().split("").join(" ");
|
|
2237
2209
|
});
|
|
2238
2210
|
}
|
|
2239
|
-
var
|
|
2240
|
-
function
|
|
2241
|
-
return
|
|
2211
|
+
var Ta = pa, Ra = Aa;
|
|
2212
|
+
function Aa(e) {
|
|
2213
|
+
return Ta(e).replace(/[\W_]+(.|$)/g, function(t, r) {
|
|
2242
2214
|
return r ? " " + r : "";
|
|
2243
2215
|
}).trim();
|
|
2244
2216
|
}
|
|
2245
|
-
var
|
|
2246
|
-
function
|
|
2247
|
-
return
|
|
2217
|
+
var va = Ra, Ca = Oa;
|
|
2218
|
+
function Oa(e) {
|
|
2219
|
+
return va(e).replace(/\s/g, "_");
|
|
2248
2220
|
}
|
|
2249
|
-
const
|
|
2250
|
-
var
|
|
2251
|
-
return t = Object.assign({ deep: !0, exclude: [] }, t),
|
|
2221
|
+
const Pa = pn, Ba = Ca;
|
|
2222
|
+
var xa = function(e, t) {
|
|
2223
|
+
return t = Object.assign({ deep: !0, exclude: [] }, t), Pa(e, function(r, n) {
|
|
2252
2224
|
return [
|
|
2253
|
-
|
|
2225
|
+
Na(t.exclude, r) ? r : Ba(r),
|
|
2254
2226
|
n
|
|
2255
2227
|
];
|
|
2256
2228
|
}, t);
|
|
2257
2229
|
};
|
|
2258
|
-
function
|
|
2230
|
+
function Na(e, t) {
|
|
2259
2231
|
return e.some(function(r) {
|
|
2260
2232
|
return typeof r == "string" ? r === t : r.test(t);
|
|
2261
2233
|
});
|
|
@@ -2265,7 +2237,7 @@ Object.defineProperty(ge, "__esModule", {
|
|
|
2265
2237
|
value: !0
|
|
2266
2238
|
});
|
|
2267
2239
|
ge.BasisTheoryApiError = void 0;
|
|
2268
|
-
function
|
|
2240
|
+
function ja(e) {
|
|
2269
2241
|
function t() {
|
|
2270
2242
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2271
2243
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2279,36 +2251,36 @@ function Ua(e) {
|
|
|
2279
2251
|
}
|
|
2280
2252
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2281
2253
|
}
|
|
2282
|
-
class
|
|
2254
|
+
class Xt extends ja(Error) {
|
|
2283
2255
|
constructor(t, r, n) {
|
|
2284
|
-
super(t), this.status = r, this.data = n, this.name = "BasisTheoryApiError", Object.setPrototypeOf(this,
|
|
2256
|
+
super(t), this.status = r, this.data = n, this.name = "BasisTheoryApiError", Object.setPrototypeOf(this, Xt.prototype);
|
|
2285
2257
|
}
|
|
2286
2258
|
}
|
|
2287
|
-
ge.BasisTheoryApiError =
|
|
2259
|
+
ge.BasisTheoryApiError = Xt;
|
|
2288
2260
|
Object.defineProperty(m, "__esModule", {
|
|
2289
2261
|
value: !0
|
|
2290
2262
|
});
|
|
2291
2263
|
m.transformTokenResponseCamelCase = m.transformTokenRequestSnakeCase = m.transformResponseCamelCase = m.transformRequestSnakeCase = m.transformReactorResponseCamelCase = m.transformReactorRequestSnakeCase = m.transformProxyResponseCamelCase = m.transformProxyRequestSnakeCase = m.proxyRaw = m.getRuntime = m.getQueryParams = m.getOSVersion = m.getBrowser = m.errorInterceptor = m.dataExtractor = m.dataAndHeadersExtractor = m.createRequestConfig = m.concatResponseTransformerWithDefault = m.concatRequestTransformerWithDefault = m.buildUserAgentString = m.buildClientUserAgentString = m.assertInit = void 0;
|
|
2292
|
-
var
|
|
2293
|
-
function
|
|
2264
|
+
var yn = Ye(dn), F = Ye(ia), vr = Ye(En()), Ua = ha, we = Ye(xa), Da = ge, te = _;
|
|
2265
|
+
function Ye(e) {
|
|
2294
2266
|
return e && e.__esModule ? e : { default: e };
|
|
2295
2267
|
}
|
|
2296
|
-
const
|
|
2268
|
+
const La = (e) => {
|
|
2297
2269
|
if (e == null)
|
|
2298
2270
|
throw new Error("BasisTheory has not yet been properly initialized.");
|
|
2299
2271
|
return e;
|
|
2300
2272
|
};
|
|
2301
|
-
m.assertInit =
|
|
2302
|
-
const
|
|
2273
|
+
m.assertInit = La;
|
|
2274
|
+
const Ha = (e) => {
|
|
2303
2275
|
if (!(typeof e > "u"))
|
|
2304
2276
|
return (0, we.default)(e, {
|
|
2305
2277
|
deep: !0
|
|
2306
2278
|
});
|
|
2307
2279
|
};
|
|
2308
|
-
m.transformRequestSnakeCase =
|
|
2309
|
-
const
|
|
2310
|
-
m.proxyRaw =
|
|
2311
|
-
const
|
|
2280
|
+
m.transformRequestSnakeCase = Ha;
|
|
2281
|
+
const Ma = (e) => e;
|
|
2282
|
+
m.proxyRaw = Ma;
|
|
2283
|
+
const Ia = (e) => {
|
|
2312
2284
|
if (!(typeof e > "u"))
|
|
2313
2285
|
return {
|
|
2314
2286
|
...(0, we.default)(e, {
|
|
@@ -2319,8 +2291,8 @@ const qa = (e) => {
|
|
|
2319
2291
|
} : {}
|
|
2320
2292
|
};
|
|
2321
2293
|
};
|
|
2322
|
-
m.transformReactorRequestSnakeCase =
|
|
2323
|
-
const
|
|
2294
|
+
m.transformReactorRequestSnakeCase = Ia;
|
|
2295
|
+
const $a = (e) => {
|
|
2324
2296
|
if (!(typeof e > "u"))
|
|
2325
2297
|
return {
|
|
2326
2298
|
...(0, we.default)(e, {
|
|
@@ -2331,8 +2303,8 @@ const Fa = (e) => {
|
|
|
2331
2303
|
} : {}
|
|
2332
2304
|
};
|
|
2333
2305
|
};
|
|
2334
|
-
m.transformProxyRequestSnakeCase =
|
|
2335
|
-
const
|
|
2306
|
+
m.transformProxyRequestSnakeCase = $a;
|
|
2307
|
+
const qa = (e) => {
|
|
2336
2308
|
if (!(typeof e > "u"))
|
|
2337
2309
|
return {
|
|
2338
2310
|
...(0, we.default)(e, {
|
|
@@ -2346,12 +2318,12 @@ const Ka = (e) => {
|
|
|
2346
2318
|
} : {}
|
|
2347
2319
|
};
|
|
2348
2320
|
};
|
|
2349
|
-
m.transformTokenRequestSnakeCase =
|
|
2350
|
-
const
|
|
2321
|
+
m.transformTokenRequestSnakeCase = qa;
|
|
2322
|
+
const Zt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, Fa = (e) => {
|
|
2351
2323
|
if (!(typeof e > "u"))
|
|
2352
|
-
return
|
|
2324
|
+
return Zt(e) ? {
|
|
2353
2325
|
data: e.data.map((n) => ({
|
|
2354
|
-
...(0,
|
|
2326
|
+
...(0, F.default)(n, {
|
|
2355
2327
|
deep: !0
|
|
2356
2328
|
}),
|
|
2357
2329
|
...n.data !== void 0 ? {
|
|
@@ -2361,11 +2333,11 @@ const Qt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
|
|
|
2361
2333
|
metadata: n.metadata
|
|
2362
2334
|
} : {}
|
|
2363
2335
|
})),
|
|
2364
|
-
pagination: (0,
|
|
2336
|
+
pagination: (0, F.default)(e.pagination, {
|
|
2365
2337
|
deep: !0
|
|
2366
2338
|
})
|
|
2367
2339
|
} : {
|
|
2368
|
-
...(0,
|
|
2340
|
+
...(0, F.default)(e, {
|
|
2369
2341
|
deep: !0
|
|
2370
2342
|
}),
|
|
2371
2343
|
...e.data !== void 0 ? {
|
|
@@ -2376,23 +2348,23 @@ const Qt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
|
|
|
2376
2348
|
} : {}
|
|
2377
2349
|
};
|
|
2378
2350
|
};
|
|
2379
|
-
m.transformTokenResponseCamelCase =
|
|
2380
|
-
const
|
|
2351
|
+
m.transformTokenResponseCamelCase = Fa;
|
|
2352
|
+
const Ka = (e) => {
|
|
2381
2353
|
if (!(typeof e > "u"))
|
|
2382
|
-
return
|
|
2354
|
+
return Zt(e) ? {
|
|
2383
2355
|
data: e.data.map((n) => ({
|
|
2384
|
-
...(0,
|
|
2356
|
+
...(0, F.default)(n, {
|
|
2385
2357
|
deep: !0
|
|
2386
2358
|
}),
|
|
2387
2359
|
...n.configuration !== void 0 ? {
|
|
2388
2360
|
configuration: n.configuration
|
|
2389
2361
|
} : {}
|
|
2390
2362
|
})),
|
|
2391
|
-
pagination: (0,
|
|
2363
|
+
pagination: (0, F.default)(e.pagination, {
|
|
2392
2364
|
deep: !0
|
|
2393
2365
|
})
|
|
2394
2366
|
} : {
|
|
2395
|
-
...(0,
|
|
2367
|
+
...(0, F.default)(e, {
|
|
2396
2368
|
deep: !0
|
|
2397
2369
|
}),
|
|
2398
2370
|
...e.configuration !== void 0 ? {
|
|
@@ -2400,23 +2372,23 @@ const Wa = (e) => {
|
|
|
2400
2372
|
} : {}
|
|
2401
2373
|
};
|
|
2402
2374
|
};
|
|
2403
|
-
m.transformReactorResponseCamelCase =
|
|
2404
|
-
const
|
|
2375
|
+
m.transformReactorResponseCamelCase = Ka;
|
|
2376
|
+
const za = (e) => {
|
|
2405
2377
|
if (!(typeof e > "u"))
|
|
2406
|
-
return
|
|
2378
|
+
return Zt(e) ? {
|
|
2407
2379
|
data: e.data.map((n) => ({
|
|
2408
|
-
...(0,
|
|
2380
|
+
...(0, F.default)(n, {
|
|
2409
2381
|
deep: !0
|
|
2410
2382
|
}),
|
|
2411
2383
|
...n.configuration !== void 0 ? {
|
|
2412
2384
|
configuration: n.configuration
|
|
2413
2385
|
} : {}
|
|
2414
2386
|
})),
|
|
2415
|
-
pagination: (0,
|
|
2387
|
+
pagination: (0, F.default)(e.pagination, {
|
|
2416
2388
|
deep: !0
|
|
2417
2389
|
})
|
|
2418
2390
|
} : {
|
|
2419
|
-
...(0,
|
|
2391
|
+
...(0, F.default)(e, {
|
|
2420
2392
|
deep: !0
|
|
2421
2393
|
}),
|
|
2422
2394
|
...e.configuration !== void 0 ? {
|
|
@@ -2424,26 +2396,26 @@ const ka = (e) => {
|
|
|
2424
2396
|
} : {}
|
|
2425
2397
|
};
|
|
2426
2398
|
};
|
|
2427
|
-
m.transformProxyResponseCamelCase =
|
|
2428
|
-
const
|
|
2399
|
+
m.transformProxyResponseCamelCase = za;
|
|
2400
|
+
const Wa = (e) => {
|
|
2429
2401
|
if (!(typeof e > "u"))
|
|
2430
|
-
return (0,
|
|
2402
|
+
return (0, F.default)(e, {
|
|
2431
2403
|
deep: !0
|
|
2432
2404
|
});
|
|
2433
2405
|
};
|
|
2434
|
-
m.transformResponseCamelCase =
|
|
2435
|
-
const
|
|
2436
|
-
m.dataExtractor =
|
|
2437
|
-
const
|
|
2406
|
+
m.transformResponseCamelCase = Wa;
|
|
2407
|
+
const ka = (e) => e == null ? void 0 : e.data;
|
|
2408
|
+
m.dataExtractor = ka;
|
|
2409
|
+
const Va = (e) => ({
|
|
2438
2410
|
data: e == null ? void 0 : e.data,
|
|
2439
2411
|
headers: e == null ? void 0 : e.headers
|
|
2440
2412
|
});
|
|
2441
|
-
m.dataAndHeadersExtractor =
|
|
2442
|
-
const Mt = (e) => [e, ...
|
|
2413
|
+
m.dataAndHeadersExtractor = Va;
|
|
2414
|
+
const Mt = (e) => [e, ...yn.default.defaults.transformRequest];
|
|
2443
2415
|
m.concatRequestTransformerWithDefault = Mt;
|
|
2444
|
-
const It = (e) => [...
|
|
2416
|
+
const It = (e) => [...yn.default.defaults.transformResponse, e];
|
|
2445
2417
|
m.concatResponseTransformerWithDefault = It;
|
|
2446
|
-
const
|
|
2418
|
+
const Ga = (e, t) => {
|
|
2447
2419
|
if (!e)
|
|
2448
2420
|
return t ? {
|
|
2449
2421
|
...t.transformRequest !== void 0 ? {
|
|
@@ -2490,18 +2462,18 @@ const Ya = (e, t) => {
|
|
|
2490
2462
|
} : {}
|
|
2491
2463
|
};
|
|
2492
2464
|
};
|
|
2493
|
-
m.createRequestConfig =
|
|
2494
|
-
const
|
|
2465
|
+
m.createRequestConfig = Ga;
|
|
2466
|
+
const Ja = (e) => {
|
|
2495
2467
|
var t, r;
|
|
2496
2468
|
const n = ((t = e.response) === null || t === void 0 ? void 0 : t.status) || -1, s = (r = e.response) === null || r === void 0 ? void 0 : r.data;
|
|
2497
|
-
throw new
|
|
2469
|
+
throw new Da.BasisTheoryApiError(e.message, n, s);
|
|
2498
2470
|
};
|
|
2499
|
-
m.errorInterceptor =
|
|
2500
|
-
const
|
|
2471
|
+
m.errorInterceptor = Ja;
|
|
2472
|
+
const Ya = (e = {}) => {
|
|
2501
2473
|
const t = Object.keys(e);
|
|
2502
2474
|
if (t.length) {
|
|
2503
2475
|
const r = new URLSearchParams(), n = (s, i, a = !1) => {
|
|
2504
|
-
const o = typeof i, d = a ? s : (0,
|
|
2476
|
+
const o = typeof i, d = a ? s : (0, Ua.snakeCase)(s);
|
|
2505
2477
|
(i === null || ["boolean", "number", "string"].includes(o)) && r.append(d, i);
|
|
2506
2478
|
};
|
|
2507
2479
|
return t.forEach((s) => {
|
|
@@ -2515,13 +2487,13 @@ const Za = (e = {}) => {
|
|
|
2515
2487
|
}
|
|
2516
2488
|
return "";
|
|
2517
2489
|
};
|
|
2518
|
-
m.getQueryParams =
|
|
2519
|
-
const
|
|
2490
|
+
m.getQueryParams = Ya;
|
|
2491
|
+
const Xa = (e) => `(${e.name || ""}; ${e.version || ""}; ${e.url || ""})`, Za = (e) => {
|
|
2520
2492
|
let t = `${te.USER_AGENT_CLIENT}/unknown`;
|
|
2521
|
-
return e && Object.keys(e || {}).length && (t += ` ${
|
|
2493
|
+
return e && Object.keys(e || {}).length && (t += ` ${Xa(e)}`), t;
|
|
2522
2494
|
};
|
|
2523
|
-
m.buildUserAgentString =
|
|
2524
|
-
const
|
|
2495
|
+
m.buildUserAgentString = Za;
|
|
2496
|
+
const bn = () => {
|
|
2525
2497
|
const {
|
|
2526
2498
|
userAgent: e
|
|
2527
2499
|
} = window.navigator;
|
|
@@ -2535,13 +2507,13 @@ const _n = () => {
|
|
|
2535
2507
|
}
|
|
2536
2508
|
return `${(r == null ? void 0 : r.browserName) || "unknown"}/${t}`;
|
|
2537
2509
|
};
|
|
2538
|
-
m.getBrowser =
|
|
2539
|
-
const
|
|
2540
|
-
if (
|
|
2510
|
+
m.getBrowser = bn;
|
|
2511
|
+
const _n = () => typeof window == "object" && window.navigator.product === "ReactNative", gn = () => {
|
|
2512
|
+
if (_n())
|
|
2541
2513
|
return "ReactNative";
|
|
2542
2514
|
if (typeof window > "u")
|
|
2543
2515
|
try {
|
|
2544
|
-
return `${
|
|
2516
|
+
return `${vr.default.type()}/${vr.default.version()}`;
|
|
2545
2517
|
} catch {
|
|
2546
2518
|
return "unknown";
|
|
2547
2519
|
}
|
|
@@ -2552,26 +2524,26 @@ const gn = () => typeof window == "object" && window.navigator.product === "Reac
|
|
|
2552
2524
|
return "unknown";
|
|
2553
2525
|
}
|
|
2554
2526
|
};
|
|
2555
|
-
m.getOSVersion =
|
|
2556
|
-
const
|
|
2557
|
-
m.getRuntime =
|
|
2558
|
-
const
|
|
2527
|
+
m.getOSVersion = gn;
|
|
2528
|
+
const wn = () => _n() ? "ReactNative" : typeof window > "u" ? `NodeJS/${process.version}` : bn();
|
|
2529
|
+
m.getRuntime = wn;
|
|
2530
|
+
const Qa = (e) => {
|
|
2559
2531
|
const t = {
|
|
2560
2532
|
client: te.USER_AGENT_CLIENT,
|
|
2561
2533
|
clientVersion: "unknown",
|
|
2562
|
-
osVersion:
|
|
2563
|
-
runtimeVersion:
|
|
2534
|
+
osVersion: gn(),
|
|
2535
|
+
runtimeVersion: wn(),
|
|
2564
2536
|
application: {}
|
|
2565
2537
|
};
|
|
2566
2538
|
return e && (t.application = e), JSON.stringify((0, we.default)(t));
|
|
2567
2539
|
};
|
|
2568
|
-
m.buildClientUserAgentString =
|
|
2569
|
-
var
|
|
2570
|
-
Object.defineProperty(
|
|
2540
|
+
m.buildClientUserAgentString = Qa;
|
|
2541
|
+
var Xe = {};
|
|
2542
|
+
Object.defineProperty(Xe, "__esModule", {
|
|
2571
2543
|
value: !0
|
|
2572
2544
|
});
|
|
2573
|
-
|
|
2574
|
-
function
|
|
2545
|
+
Xe.BasisTheoryValidationError = void 0;
|
|
2546
|
+
function eo(e) {
|
|
2575
2547
|
function t() {
|
|
2576
2548
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2577
2549
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2585,18 +2557,18 @@ function ro(e) {
|
|
|
2585
2557
|
}
|
|
2586
2558
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2587
2559
|
}
|
|
2588
|
-
class
|
|
2560
|
+
class Qt extends eo(Error) {
|
|
2589
2561
|
constructor(t, r, n) {
|
|
2590
|
-
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this,
|
|
2562
|
+
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, Qt.prototype);
|
|
2591
2563
|
}
|
|
2592
2564
|
}
|
|
2593
|
-
|
|
2594
|
-
var
|
|
2595
|
-
Object.defineProperty(
|
|
2565
|
+
Xe.BasisTheoryValidationError = Qt;
|
|
2566
|
+
var Ze = {};
|
|
2567
|
+
Object.defineProperty(Ze, "__esModule", {
|
|
2596
2568
|
value: !0
|
|
2597
2569
|
});
|
|
2598
|
-
|
|
2599
|
-
function
|
|
2570
|
+
Ze.HttpClientError = void 0;
|
|
2571
|
+
function to(e) {
|
|
2600
2572
|
function t() {
|
|
2601
2573
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2602
2574
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2610,12 +2582,12 @@ function no(e) {
|
|
|
2610
2582
|
}
|
|
2611
2583
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2612
2584
|
}
|
|
2613
|
-
class
|
|
2585
|
+
class er extends to(Error) {
|
|
2614
2586
|
constructor(t, r, n, s) {
|
|
2615
|
-
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this,
|
|
2587
|
+
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, er.prototype);
|
|
2616
2588
|
}
|
|
2617
2589
|
}
|
|
2618
|
-
|
|
2590
|
+
Ze.HttpClientError = er;
|
|
2619
2591
|
(function(e) {
|
|
2620
2592
|
Object.defineProperty(e, "__esModule", {
|
|
2621
2593
|
value: !0
|
|
@@ -2659,18 +2631,18 @@ Ye.HttpClientError = tr;
|
|
|
2659
2631
|
}
|
|
2660
2632
|
});
|
|
2661
2633
|
});
|
|
2662
|
-
var s = ge, i =
|
|
2663
|
-
})(
|
|
2664
|
-
var
|
|
2665
|
-
Object.defineProperty(
|
|
2634
|
+
var s = ge, i = Xe, a = Ze;
|
|
2635
|
+
})(U);
|
|
2636
|
+
var D = {}, ro = {}, Qe = {};
|
|
2637
|
+
Object.defineProperty(Qe, "__esModule", {
|
|
2666
2638
|
value: !0
|
|
2667
2639
|
});
|
|
2668
|
-
|
|
2669
|
-
var Ae =
|
|
2670
|
-
function
|
|
2640
|
+
Qe.BasisTheoryService = void 0;
|
|
2641
|
+
var Ae = no(dn), J = U;
|
|
2642
|
+
function no(e) {
|
|
2671
2643
|
return e && e.__esModule ? e : { default: e };
|
|
2672
2644
|
}
|
|
2673
|
-
class
|
|
2645
|
+
class so {
|
|
2674
2646
|
constructor(t) {
|
|
2675
2647
|
const {
|
|
2676
2648
|
apiKey: r,
|
|
@@ -2697,12 +2669,12 @@ class ao {
|
|
|
2697
2669
|
}), this.client.interceptors.response.use(void 0, J.errorInterceptor);
|
|
2698
2670
|
}
|
|
2699
2671
|
}
|
|
2700
|
-
|
|
2672
|
+
Qe.BasisTheoryService = so;
|
|
2701
2673
|
(function(e) {
|
|
2702
2674
|
Object.defineProperty(e, "__esModule", {
|
|
2703
2675
|
value: !0
|
|
2704
2676
|
});
|
|
2705
|
-
var t =
|
|
2677
|
+
var t = ro;
|
|
2706
2678
|
Object.keys(t).forEach(function(n) {
|
|
2707
2679
|
n === "default" || n === "__esModule" || n in e && e[n] === t[n] || Object.defineProperty(e, n, {
|
|
2708
2680
|
enumerable: !0,
|
|
@@ -2711,7 +2683,7 @@ Xe.BasisTheoryService = ao;
|
|
|
2711
2683
|
}
|
|
2712
2684
|
});
|
|
2713
2685
|
});
|
|
2714
|
-
var r =
|
|
2686
|
+
var r = Qe;
|
|
2715
2687
|
Object.keys(r).forEach(function(n) {
|
|
2716
2688
|
n === "default" || n === "__esModule" || n in e && e[n] === r[n] || Object.defineProperty(e, n, {
|
|
2717
2689
|
enumerable: !0,
|
|
@@ -2720,13 +2692,13 @@ Xe.BasisTheoryService = ao;
|
|
|
2720
2692
|
}
|
|
2721
2693
|
});
|
|
2722
2694
|
});
|
|
2723
|
-
})(
|
|
2724
|
-
Object.defineProperty(
|
|
2695
|
+
})(D);
|
|
2696
|
+
Object.defineProperty(Fe, "__esModule", {
|
|
2725
2697
|
value: !0
|
|
2726
2698
|
});
|
|
2727
|
-
|
|
2728
|
-
var
|
|
2729
|
-
class
|
|
2699
|
+
Fe.BasisTheoryTransactions = void 0;
|
|
2700
|
+
var wt = U, pe = m, io = D;
|
|
2701
|
+
class ao extends io.BasisTheoryService {
|
|
2730
2702
|
constructor(t) {
|
|
2731
2703
|
const r = {
|
|
2732
2704
|
...t
|
|
@@ -2734,23 +2706,23 @@ class co extends oo.BasisTheoryService {
|
|
|
2734
2706
|
r.transformRequest = [].concat(pe.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(pe.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
2735
2707
|
}
|
|
2736
2708
|
create(t = {}) {
|
|
2737
|
-
return this.client.post("/", void 0, (0,
|
|
2709
|
+
return this.client.post("/", void 0, (0, wt.createRequestConfig)(t)).then(pe.dataExtractor);
|
|
2738
2710
|
}
|
|
2739
2711
|
commit(t, r = {}) {
|
|
2740
2712
|
const n = `/${t}/commit`;
|
|
2741
|
-
return this.client.post(n, void 0, (0,
|
|
2713
|
+
return this.client.post(n, void 0, (0, wt.createRequestConfig)(r)).then(pe.dataExtractor);
|
|
2742
2714
|
}
|
|
2743
2715
|
rollback(t, r = {}) {
|
|
2744
2716
|
const n = `/${t}/rollback`;
|
|
2745
|
-
return this.client.post(n, void 0, (0,
|
|
2717
|
+
return this.client.post(n, void 0, (0, wt.createRequestConfig)(r)).then(pe.dataExtractor);
|
|
2746
2718
|
}
|
|
2747
2719
|
}
|
|
2748
|
-
|
|
2720
|
+
Fe.BasisTheoryTransactions = ao;
|
|
2749
2721
|
(function(e) {
|
|
2750
2722
|
Object.defineProperty(e, "__esModule", {
|
|
2751
2723
|
value: !0
|
|
2752
2724
|
});
|
|
2753
|
-
var t =
|
|
2725
|
+
var t = Fe;
|
|
2754
2726
|
Object.keys(t).forEach(function(r) {
|
|
2755
2727
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
2756
2728
|
enumerable: !0,
|
|
@@ -2760,78 +2732,78 @@ qe.BasisTheoryTransactions = co;
|
|
|
2760
2732
|
});
|
|
2761
2733
|
});
|
|
2762
2734
|
})($r);
|
|
2763
|
-
var
|
|
2764
|
-
Object.defineProperty(
|
|
2735
|
+
var tr = {}, et = {}, W = {};
|
|
2736
|
+
Object.defineProperty(W, "__esModule", {
|
|
2765
2737
|
value: !0
|
|
2766
2738
|
});
|
|
2767
|
-
|
|
2768
|
-
var
|
|
2769
|
-
const
|
|
2739
|
+
W.CrudBuilder = void 0;
|
|
2740
|
+
var x = U;
|
|
2741
|
+
const oo = (e) => class extends e {
|
|
2770
2742
|
create(r, n) {
|
|
2771
|
-
return this.client.post("/", r, (0,
|
|
2743
|
+
return this.client.post("/", r, (0, x.createRequestConfig)(n)).then(x.dataExtractor);
|
|
2772
2744
|
}
|
|
2773
|
-
},
|
|
2745
|
+
}, co = (e) => class extends e {
|
|
2774
2746
|
retrieve(r, n) {
|
|
2775
|
-
return this.client.get(r, (0,
|
|
2747
|
+
return this.client.get(r, (0, x.createRequestConfig)(n)).then(x.dataExtractor);
|
|
2776
2748
|
}
|
|
2777
|
-
},
|
|
2749
|
+
}, uo = (e) => class extends e {
|
|
2778
2750
|
update(r, n, s) {
|
|
2779
|
-
return this.client.put(r, n, (0,
|
|
2751
|
+
return this.client.put(r, n, (0, x.createRequestConfig)(s)).then(x.dataExtractor);
|
|
2780
2752
|
}
|
|
2781
|
-
},
|
|
2753
|
+
}, lo = (e) => class extends e {
|
|
2782
2754
|
patch(r, n, s) {
|
|
2783
|
-
const i = (0,
|
|
2755
|
+
const i = (0, x.createRequestConfig)(s);
|
|
2784
2756
|
return this.client.patch(r, n, {
|
|
2785
2757
|
...i,
|
|
2786
2758
|
headers: {
|
|
2787
2759
|
...(i == null ? void 0 : i.headers) || {},
|
|
2788
|
-
[
|
|
2760
|
+
[x.CONTENT_TYPE_HEADER]: x.MERGE_CONTENT_TYPE
|
|
2789
2761
|
}
|
|
2790
|
-
}).then(
|
|
2762
|
+
}).then(x.dataExtractor);
|
|
2791
2763
|
}
|
|
2792
|
-
},
|
|
2764
|
+
}, fo = (e) => class extends e {
|
|
2793
2765
|
async delete(r, n) {
|
|
2794
|
-
await this.client.delete(r, (0,
|
|
2766
|
+
await this.client.delete(r, (0, x.createRequestConfig)(n));
|
|
2795
2767
|
}
|
|
2796
|
-
},
|
|
2768
|
+
}, ho = (e) => class extends e {
|
|
2797
2769
|
list(r = {}, n = {}) {
|
|
2798
|
-
const s = `/${(0,
|
|
2799
|
-
return this.client.get(s, (0,
|
|
2770
|
+
const s = `/${(0, x.getQueryParams)(r)}`;
|
|
2771
|
+
return this.client.get(s, (0, x.createRequestConfig)(n)).then(x.dataExtractor);
|
|
2800
2772
|
}
|
|
2801
2773
|
};
|
|
2802
|
-
class
|
|
2774
|
+
class po {
|
|
2803
2775
|
constructor(t) {
|
|
2804
2776
|
this.BaseService = t;
|
|
2805
2777
|
}
|
|
2806
2778
|
create() {
|
|
2807
|
-
return this.BaseService =
|
|
2779
|
+
return this.BaseService = oo(this.BaseService), this;
|
|
2808
2780
|
}
|
|
2809
2781
|
retrieve() {
|
|
2810
|
-
return this.BaseService =
|
|
2782
|
+
return this.BaseService = co(this.BaseService), this;
|
|
2811
2783
|
}
|
|
2812
2784
|
update() {
|
|
2813
|
-
return this.BaseService =
|
|
2785
|
+
return this.BaseService = uo(this.BaseService), this;
|
|
2814
2786
|
}
|
|
2815
2787
|
patch() {
|
|
2816
|
-
return this.BaseService =
|
|
2788
|
+
return this.BaseService = lo(this.BaseService), this;
|
|
2817
2789
|
}
|
|
2818
2790
|
delete() {
|
|
2819
|
-
return this.BaseService =
|
|
2791
|
+
return this.BaseService = fo(this.BaseService), this;
|
|
2820
2792
|
}
|
|
2821
2793
|
list() {
|
|
2822
|
-
return this.BaseService =
|
|
2794
|
+
return this.BaseService = ho(this.BaseService), this;
|
|
2823
2795
|
}
|
|
2824
2796
|
build() {
|
|
2825
2797
|
return this.BaseService;
|
|
2826
2798
|
}
|
|
2827
2799
|
}
|
|
2828
|
-
|
|
2829
|
-
Object.defineProperty(
|
|
2800
|
+
W.CrudBuilder = po;
|
|
2801
|
+
Object.defineProperty(et, "__esModule", {
|
|
2830
2802
|
value: !0
|
|
2831
2803
|
});
|
|
2832
|
-
|
|
2833
|
-
var ve =
|
|
2834
|
-
const
|
|
2804
|
+
et.BasisTheoryApplications = void 0;
|
|
2805
|
+
var ve = U, mo = D, Eo = W;
|
|
2806
|
+
const yo = new Eo.CrudBuilder(class extends mo.BasisTheoryService {
|
|
2835
2807
|
/**
|
|
2836
2808
|
* @deprecated use {@link retrieveByKey} instead
|
|
2837
2809
|
*/
|
|
@@ -2845,7 +2817,7 @@ const _o = new bo.CrudBuilder(class extends Eo.BasisTheoryService {
|
|
|
2845
2817
|
return this.client.post(`${t}/regenerate`, void 0, (0, ve.createRequestConfig)(r)).then(ve.dataExtractor);
|
|
2846
2818
|
}
|
|
2847
2819
|
}).create().retrieve().update().delete().list().build();
|
|
2848
|
-
|
|
2820
|
+
et.BasisTheoryApplications = yo;
|
|
2849
2821
|
(function(e) {
|
|
2850
2822
|
Object.defineProperty(e, "__esModule", {
|
|
2851
2823
|
value: !0
|
|
@@ -2855,15 +2827,15 @@ Ze.BasisTheoryApplications = _o;
|
|
|
2855
2827
|
return t.BasisTheoryApplications;
|
|
2856
2828
|
}
|
|
2857
2829
|
});
|
|
2858
|
-
var t =
|
|
2859
|
-
})(
|
|
2860
|
-
var
|
|
2861
|
-
Object.defineProperty(
|
|
2830
|
+
var t = et;
|
|
2831
|
+
})(tr);
|
|
2832
|
+
var Sn = {}, Tn = {}, tt = {}, Rn = {}, rt = {};
|
|
2833
|
+
Object.defineProperty(rt, "__esModule", {
|
|
2862
2834
|
value: !0
|
|
2863
2835
|
});
|
|
2864
|
-
|
|
2865
|
-
var Ce =
|
|
2866
|
-
class
|
|
2836
|
+
rt.BasisTheoryTokenize = void 0;
|
|
2837
|
+
var Ce = U, bo = D;
|
|
2838
|
+
class _o extends bo.BasisTheoryService {
|
|
2867
2839
|
tokenize(t, r = {}) {
|
|
2868
2840
|
return this.client.post("/", t, (0, Ce.createRequestConfig)(r, {
|
|
2869
2841
|
transformRequest: Ce.proxyRaw,
|
|
@@ -2871,7 +2843,7 @@ class wo extends go.BasisTheoryService {
|
|
|
2871
2843
|
})).then(Ce.dataExtractor);
|
|
2872
2844
|
}
|
|
2873
2845
|
}
|
|
2874
|
-
|
|
2846
|
+
rt.BasisTheoryTokenize = _o;
|
|
2875
2847
|
(function(e) {
|
|
2876
2848
|
Object.defineProperty(e, "__esModule", {
|
|
2877
2849
|
value: !0
|
|
@@ -2881,65 +2853,65 @@ et.BasisTheoryTokenize = wo;
|
|
|
2881
2853
|
return t.BasisTheoryTokenize;
|
|
2882
2854
|
}
|
|
2883
2855
|
});
|
|
2884
|
-
var t =
|
|
2885
|
-
})(
|
|
2886
|
-
Object.defineProperty(
|
|
2856
|
+
var t = rt;
|
|
2857
|
+
})(Rn);
|
|
2858
|
+
Object.defineProperty(tt, "__esModule", {
|
|
2887
2859
|
value: !0
|
|
2888
2860
|
});
|
|
2889
|
-
|
|
2890
|
-
var
|
|
2891
|
-
const
|
|
2861
|
+
tt.delegateTokenize = void 0;
|
|
2862
|
+
var go = Rn;
|
|
2863
|
+
const wo = (e) => class extends go.BasisTheoryTokenize {
|
|
2892
2864
|
tokenize(r, n) {
|
|
2893
2865
|
return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
|
|
2894
2866
|
}
|
|
2895
2867
|
};
|
|
2896
|
-
|
|
2897
|
-
var
|
|
2898
|
-
Object.defineProperty(
|
|
2868
|
+
tt.delegateTokenize = wo;
|
|
2869
|
+
var nt = {}, rr = {}, st = {};
|
|
2870
|
+
Object.defineProperty(st, "__esModule", {
|
|
2899
2871
|
value: !0
|
|
2900
2872
|
});
|
|
2901
|
-
|
|
2902
|
-
var
|
|
2903
|
-
const
|
|
2873
|
+
st.BasisTheoryTokens = void 0;
|
|
2874
|
+
var q = U, Q = m, So = D, To = W;
|
|
2875
|
+
const Ro = new To.CrudBuilder(class extends So.BasisTheoryService {
|
|
2904
2876
|
constructor(t) {
|
|
2905
2877
|
const r = t;
|
|
2906
2878
|
r.transformRequest = [].concat(Q.transformTokenRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Q.transformTokenResponseCamelCase, t.transformResponse || []), super(r);
|
|
2907
2879
|
}
|
|
2908
2880
|
retrieve(t, r = {}) {
|
|
2909
2881
|
const n = `/${t}`;
|
|
2910
|
-
return this.client.get(n, (0,
|
|
2882
|
+
return this.client.get(n, (0, q.createRequestConfig)(r)).then(Q.dataExtractor);
|
|
2911
2883
|
}
|
|
2912
2884
|
update(t, r, n = {}) {
|
|
2913
|
-
const s = `/${t}`, i = (0,
|
|
2885
|
+
const s = `/${t}`, i = (0, q.createRequestConfig)(n);
|
|
2914
2886
|
return this.client.patch(s, r, {
|
|
2915
2887
|
...i,
|
|
2916
2888
|
headers: {
|
|
2917
2889
|
...(i == null ? void 0 : i.headers) || {},
|
|
2918
|
-
[
|
|
2890
|
+
[q.CONTENT_TYPE_HEADER]: q.MERGE_CONTENT_TYPE
|
|
2919
2891
|
}
|
|
2920
2892
|
}).then(Q.dataExtractor);
|
|
2921
2893
|
}
|
|
2922
2894
|
async createAssociation(t, r, n) {
|
|
2923
2895
|
const s = `/${t}/children/${r}`;
|
|
2924
|
-
await this.client.post(s, {}, (0,
|
|
2896
|
+
await this.client.post(s, {}, (0, q.createRequestConfig)(n));
|
|
2925
2897
|
}
|
|
2926
2898
|
async deleteAssociation(t, r, n) {
|
|
2927
2899
|
const s = `/${t}/children/${r}`;
|
|
2928
|
-
await this.client.delete(s, (0,
|
|
2900
|
+
await this.client.delete(s, (0, q.createRequestConfig)(n));
|
|
2929
2901
|
}
|
|
2930
2902
|
createChild(t, r, n) {
|
|
2931
2903
|
const s = `/${t}/children`;
|
|
2932
|
-
return this.client.post(s, r, (0,
|
|
2904
|
+
return this.client.post(s, r, (0, q.createRequestConfig)(n)).then(Q.dataExtractor);
|
|
2933
2905
|
}
|
|
2934
2906
|
listChildren(t, r = {}, n = {}) {
|
|
2935
|
-
const s = `/${t}/children${(0,
|
|
2936
|
-
return this.client.get(s, (0,
|
|
2907
|
+
const s = `/${t}/children${(0, q.getQueryParams)(r)}`;
|
|
2908
|
+
return this.client.get(s, (0, q.createRequestConfig)(n)).then(Q.dataExtractor);
|
|
2937
2909
|
}
|
|
2938
2910
|
search(t, r) {
|
|
2939
|
-
return this.client.post("/search", t, (0,
|
|
2911
|
+
return this.client.post("/search", t, (0, q.createRequestConfig)(r)).then(Q.dataExtractor);
|
|
2940
2912
|
}
|
|
2941
2913
|
}).create().delete().list().build();
|
|
2942
|
-
|
|
2914
|
+
st.BasisTheoryTokens = Ro;
|
|
2943
2915
|
(function(e) {
|
|
2944
2916
|
Object.defineProperty(e, "__esModule", {
|
|
2945
2917
|
value: !0
|
|
@@ -2949,14 +2921,14 @@ rt.BasisTheoryTokens = vo;
|
|
|
2949
2921
|
return t.BasisTheoryTokens;
|
|
2950
2922
|
}
|
|
2951
2923
|
});
|
|
2952
|
-
var t =
|
|
2953
|
-
})(
|
|
2954
|
-
Object.defineProperty(
|
|
2924
|
+
var t = st;
|
|
2925
|
+
})(rr);
|
|
2926
|
+
Object.defineProperty(nt, "__esModule", {
|
|
2955
2927
|
value: !0
|
|
2956
2928
|
});
|
|
2957
|
-
|
|
2958
|
-
var
|
|
2959
|
-
const
|
|
2929
|
+
nt.delegateTokens = void 0;
|
|
2930
|
+
var Ao = rr;
|
|
2931
|
+
const vo = (e) => class extends Ao.BasisTheoryTokens {
|
|
2960
2932
|
create(r, n) {
|
|
2961
2933
|
return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
|
|
2962
2934
|
}
|
|
@@ -2967,14 +2939,14 @@ const Oo = (e) => class extends Co.BasisTheoryTokens {
|
|
|
2967
2939
|
return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
|
|
2968
2940
|
}
|
|
2969
2941
|
};
|
|
2970
|
-
|
|
2971
|
-
var
|
|
2972
|
-
Object.defineProperty(
|
|
2942
|
+
nt.delegateTokens = vo;
|
|
2943
|
+
var it = {}, An = {}, at = {};
|
|
2944
|
+
Object.defineProperty(at, "__esModule", {
|
|
2973
2945
|
value: !0
|
|
2974
2946
|
});
|
|
2975
|
-
|
|
2976
|
-
var
|
|
2977
|
-
class
|
|
2947
|
+
at.BasisTheoryProxy = void 0;
|
|
2948
|
+
var V = U, Co = D;
|
|
2949
|
+
class Oo extends Co.BasisTheoryService {
|
|
2978
2950
|
get(t) {
|
|
2979
2951
|
return this.proxyRequest("get", t);
|
|
2980
2952
|
}
|
|
@@ -2994,24 +2966,24 @@ class Bo extends Po.BasisTheoryService {
|
|
|
2994
2966
|
var n;
|
|
2995
2967
|
if (t === "post" || t === "put" || t === "patch") {
|
|
2996
2968
|
var s, i;
|
|
2997
|
-
const a = r != null && r.includeResponseHeaders && t === "post" ?
|
|
2998
|
-
return this.client[t]((s = r == null ? void 0 : r.path) !== null && s !== void 0 ? s : "", (i = r == null ? void 0 : r.body) !== null && i !== void 0 ? i : void 0, (0,
|
|
2999
|
-
transformRequest:
|
|
3000
|
-
transformResponse:
|
|
2969
|
+
const a = r != null && r.includeResponseHeaders && t === "post" ? V.dataAndHeadersExtractor : V.dataExtractor;
|
|
2970
|
+
return this.client[t]((s = r == null ? void 0 : r.path) !== null && s !== void 0 ? s : "", (i = r == null ? void 0 : r.body) !== null && i !== void 0 ? i : void 0, (0, V.createRequestConfig)(r, {
|
|
2971
|
+
transformRequest: V.proxyRaw,
|
|
2972
|
+
transformResponse: V.proxyRaw
|
|
3001
2973
|
})).then(a);
|
|
3002
2974
|
}
|
|
3003
|
-
return this.client[t]((n = r == null ? void 0 : r.path) !== null && n !== void 0 ? n : "/", (0,
|
|
3004
|
-
transformRequest:
|
|
3005
|
-
transformResponse:
|
|
3006
|
-
})).then(
|
|
2975
|
+
return this.client[t]((n = r == null ? void 0 : r.path) !== null && n !== void 0 ? n : "/", (0, V.createRequestConfig)(r, {
|
|
2976
|
+
transformRequest: V.proxyRaw,
|
|
2977
|
+
transformResponse: V.proxyRaw
|
|
2978
|
+
})).then(V.dataExtractor);
|
|
3007
2979
|
}
|
|
3008
2980
|
}
|
|
3009
|
-
|
|
2981
|
+
at.BasisTheoryProxy = Oo;
|
|
3010
2982
|
(function(e) {
|
|
3011
2983
|
Object.defineProperty(e, "__esModule", {
|
|
3012
2984
|
value: !0
|
|
3013
2985
|
});
|
|
3014
|
-
var t =
|
|
2986
|
+
var t = at;
|
|
3015
2987
|
Object.keys(t).forEach(function(r) {
|
|
3016
2988
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
3017
2989
|
enumerable: !0,
|
|
@@ -3020,13 +2992,13 @@ st.BasisTheoryProxy = Bo;
|
|
|
3020
2992
|
}
|
|
3021
2993
|
});
|
|
3022
2994
|
});
|
|
3023
|
-
})(
|
|
3024
|
-
Object.defineProperty(
|
|
2995
|
+
})(An);
|
|
2996
|
+
Object.defineProperty(it, "__esModule", {
|
|
3025
2997
|
value: !0
|
|
3026
2998
|
});
|
|
3027
|
-
|
|
3028
|
-
var
|
|
3029
|
-
const
|
|
2999
|
+
it.delegateProxy = void 0;
|
|
3000
|
+
var Po = An;
|
|
3001
|
+
const Bo = (e) => class extends Po.BasisTheoryProxy {
|
|
3030
3002
|
get(r) {
|
|
3031
3003
|
return e !== void 0 ? e.proxy.get(r) : super.get(r);
|
|
3032
3004
|
}
|
|
@@ -3043,12 +3015,12 @@ const No = (e) => class extends xo.BasisTheoryProxy {
|
|
|
3043
3015
|
return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
|
|
3044
3016
|
}
|
|
3045
3017
|
};
|
|
3046
|
-
|
|
3018
|
+
it.delegateProxy = Bo;
|
|
3047
3019
|
(function(e) {
|
|
3048
3020
|
Object.defineProperty(e, "__esModule", {
|
|
3049
3021
|
value: !0
|
|
3050
3022
|
});
|
|
3051
|
-
var t =
|
|
3023
|
+
var t = tt;
|
|
3052
3024
|
Object.keys(t).forEach(function(s) {
|
|
3053
3025
|
s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
|
|
3054
3026
|
enumerable: !0,
|
|
@@ -3057,7 +3029,7 @@ nt.delegateProxy = No;
|
|
|
3057
3029
|
}
|
|
3058
3030
|
});
|
|
3059
3031
|
});
|
|
3060
|
-
var r =
|
|
3032
|
+
var r = nt;
|
|
3061
3033
|
Object.keys(r).forEach(function(s) {
|
|
3062
3034
|
s === "default" || s === "__esModule" || s in e && e[s] === r[s] || Object.defineProperty(e, s, {
|
|
3063
3035
|
enumerable: !0,
|
|
@@ -3066,7 +3038,7 @@ nt.delegateProxy = No;
|
|
|
3066
3038
|
}
|
|
3067
3039
|
});
|
|
3068
3040
|
});
|
|
3069
|
-
var n =
|
|
3041
|
+
var n = it;
|
|
3070
3042
|
Object.keys(n).forEach(function(s) {
|
|
3071
3043
|
s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
|
|
3072
3044
|
enumerable: !0,
|
|
@@ -3075,15 +3047,15 @@ nt.delegateProxy = No;
|
|
|
3075
3047
|
}
|
|
3076
3048
|
});
|
|
3077
3049
|
});
|
|
3078
|
-
})(
|
|
3050
|
+
})(Tn);
|
|
3079
3051
|
var se = {};
|
|
3080
3052
|
Object.defineProperty(se, "__esModule", {
|
|
3081
3053
|
value: !0
|
|
3082
3054
|
});
|
|
3083
3055
|
se.injectScript = se.findScript = void 0;
|
|
3084
|
-
const
|
|
3085
|
-
se.findScript =
|
|
3086
|
-
const
|
|
3056
|
+
const xo = (e) => document.querySelector(`script[src^="${e}"]`);
|
|
3057
|
+
se.findScript = xo;
|
|
3058
|
+
const No = (e) => {
|
|
3087
3059
|
const t = document.createElement("script");
|
|
3088
3060
|
t.src = e;
|
|
3089
3061
|
const r = document.head || document.body;
|
|
@@ -3091,35 +3063,35 @@ const Do = (e) => {
|
|
|
3091
3063
|
throw new Error("No <head> or <body> elements found in document.");
|
|
3092
3064
|
return r.append(t), t;
|
|
3093
3065
|
};
|
|
3094
|
-
se.injectScript =
|
|
3095
|
-
var
|
|
3066
|
+
se.injectScript = No;
|
|
3067
|
+
var ot = {}, O = {};
|
|
3096
3068
|
Object.defineProperty(O, "__esModule", {
|
|
3097
3069
|
value: !0
|
|
3098
3070
|
});
|
|
3099
3071
|
O.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = O.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = O.ELEMENTS_NOM_DOM_ERROR_MESSAGE = O.ELEMENTS_INIT_ERROR_MESSAGE = O.CARD_ICON_POSITIONS = O.CARD_BRANDS = O.AUTOCOMPLETE_VALUES = void 0;
|
|
3100
|
-
const
|
|
3101
|
-
O.ELEMENTS_INIT_ERROR_MESSAGE =
|
|
3102
|
-
const
|
|
3103
|
-
O.ELEMENTS_NOM_DOM_ERROR_MESSAGE =
|
|
3104
|
-
const
|
|
3105
|
-
O.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE =
|
|
3106
|
-
const
|
|
3107
|
-
O.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE =
|
|
3108
|
-
const
|
|
3109
|
-
O.CARD_BRANDS =
|
|
3110
|
-
const
|
|
3111
|
-
O.CARD_ICON_POSITIONS =
|
|
3112
|
-
const
|
|
3113
|
-
O.AUTOCOMPLETE_VALUES =
|
|
3114
|
-
Object.defineProperty(
|
|
3072
|
+
const jo = "BasisTheory Elements was not properly initialized.";
|
|
3073
|
+
O.ELEMENTS_INIT_ERROR_MESSAGE = jo;
|
|
3074
|
+
const Uo = "Tried to load BasisTheoryElements in a non-DOM environment.";
|
|
3075
|
+
O.ELEMENTS_NOM_DOM_ERROR_MESSAGE = Uo;
|
|
3076
|
+
const Do = "Basis Theory Elements did not load properly.";
|
|
3077
|
+
O.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = Do;
|
|
3078
|
+
const Lo = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
|
|
3079
|
+
O.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = Lo;
|
|
3080
|
+
const Ho = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
3081
|
+
O.CARD_BRANDS = Ho;
|
|
3082
|
+
const Mo = ["left", "right", "none"];
|
|
3083
|
+
O.CARD_ICON_POSITIONS = Mo;
|
|
3084
|
+
const Io = ["off", "on"];
|
|
3085
|
+
O.AUTOCOMPLETE_VALUES = Io;
|
|
3086
|
+
Object.defineProperty(ot, "__esModule", {
|
|
3115
3087
|
value: !0
|
|
3116
3088
|
});
|
|
3117
|
-
|
|
3118
|
-
var
|
|
3119
|
-
let
|
|
3120
|
-
const
|
|
3089
|
+
ot.loadElements = void 0;
|
|
3090
|
+
var St = O, Cr = se;
|
|
3091
|
+
let Tt;
|
|
3092
|
+
const $o = (e) => (Tt || (Tt = new Promise((t, r) => {
|
|
3121
3093
|
if (typeof window != "object") {
|
|
3122
|
-
r(new Error(
|
|
3094
|
+
r(new Error(St.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
3123
3095
|
return;
|
|
3124
3096
|
}
|
|
3125
3097
|
if (window.BasisTheoryElements) {
|
|
@@ -3134,23 +3106,23 @@ const Fo = (e) => (St || (St = new Promise((t, r) => {
|
|
|
3134
3106
|
} catch {
|
|
3135
3107
|
throw new Error("Invalid format for the given Elements client url.");
|
|
3136
3108
|
}
|
|
3137
|
-
let s = (0,
|
|
3138
|
-
s || (s = (0,
|
|
3139
|
-
window.BasisTheoryElements ? t(window.BasisTheoryElements) : r(new Error(
|
|
3109
|
+
let s = (0, Cr.findScript)(n);
|
|
3110
|
+
s || (s = (0, Cr.injectScript)(n)), s.addEventListener("load", () => {
|
|
3111
|
+
window.BasisTheoryElements ? t(window.BasisTheoryElements) : r(new Error(St.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE));
|
|
3140
3112
|
}), s.addEventListener("error", (i) => {
|
|
3141
|
-
r((i == null ? void 0 : i.error) || new Error(
|
|
3113
|
+
r((i == null ? void 0 : i.error) || new Error(St.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE));
|
|
3142
3114
|
});
|
|
3143
3115
|
} catch (n) {
|
|
3144
3116
|
r(n);
|
|
3145
3117
|
return;
|
|
3146
3118
|
}
|
|
3147
|
-
})),
|
|
3148
|
-
|
|
3119
|
+
})), Tt);
|
|
3120
|
+
ot.loadElements = $o;
|
|
3149
3121
|
(function(e) {
|
|
3150
3122
|
Object.defineProperty(e, "__esModule", {
|
|
3151
3123
|
value: !0
|
|
3152
3124
|
});
|
|
3153
|
-
var t =
|
|
3125
|
+
var t = Tn;
|
|
3154
3126
|
Object.keys(t).forEach(function(s) {
|
|
3155
3127
|
s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
|
|
3156
3128
|
enumerable: !0,
|
|
@@ -3168,7 +3140,7 @@ it.loadElements = Fo;
|
|
|
3168
3140
|
}
|
|
3169
3141
|
});
|
|
3170
3142
|
});
|
|
3171
|
-
var n =
|
|
3143
|
+
var n = ot;
|
|
3172
3144
|
Object.keys(n).forEach(function(s) {
|
|
3173
3145
|
s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
|
|
3174
3146
|
enumerable: !0,
|
|
@@ -3177,16 +3149,16 @@ it.loadElements = Fo;
|
|
|
3177
3149
|
}
|
|
3178
3150
|
});
|
|
3179
3151
|
});
|
|
3180
|
-
})(
|
|
3181
|
-
var
|
|
3182
|
-
Object.defineProperty(
|
|
3152
|
+
})(Sn);
|
|
3153
|
+
var vn = {}, ct = {};
|
|
3154
|
+
Object.defineProperty(ct, "__esModule", {
|
|
3183
3155
|
value: !0
|
|
3184
3156
|
});
|
|
3185
|
-
|
|
3186
|
-
var
|
|
3187
|
-
const
|
|
3157
|
+
ct.BasisTheoryLogs = void 0;
|
|
3158
|
+
var qo = D, Fo = W;
|
|
3159
|
+
const Ko = new Fo.CrudBuilder(class extends qo.BasisTheoryService {
|
|
3188
3160
|
}).list().build();
|
|
3189
|
-
|
|
3161
|
+
ct.BasisTheoryLogs = Ko;
|
|
3190
3162
|
(function(e) {
|
|
3191
3163
|
Object.defineProperty(e, "__esModule", {
|
|
3192
3164
|
value: !0
|
|
@@ -3196,20 +3168,20 @@ at.BasisTheoryLogs = Wo;
|
|
|
3196
3168
|
return t.BasisTheoryLogs;
|
|
3197
3169
|
}
|
|
3198
3170
|
});
|
|
3199
|
-
var t =
|
|
3200
|
-
})(
|
|
3201
|
-
var
|
|
3202
|
-
Object.defineProperty(
|
|
3171
|
+
var t = ct;
|
|
3172
|
+
})(vn);
|
|
3173
|
+
var Cn = {}, ut = {};
|
|
3174
|
+
Object.defineProperty(ut, "__esModule", {
|
|
3203
3175
|
value: !0
|
|
3204
3176
|
});
|
|
3205
|
-
|
|
3206
|
-
var
|
|
3207
|
-
class
|
|
3177
|
+
ut.BasisTheoryPermissions = void 0;
|
|
3178
|
+
var Or = U, zo = D;
|
|
3179
|
+
class Wo extends zo.BasisTheoryService {
|
|
3208
3180
|
list(t) {
|
|
3209
|
-
return this.client.get("/", (0,
|
|
3181
|
+
return this.client.get("/", (0, Or.createRequestConfig)(t)).then(Or.dataExtractor);
|
|
3210
3182
|
}
|
|
3211
3183
|
}
|
|
3212
|
-
|
|
3184
|
+
ut.BasisTheoryPermissions = Wo;
|
|
3213
3185
|
(function(e) {
|
|
3214
3186
|
Object.defineProperty(e, "__esModule", {
|
|
3215
3187
|
value: !0
|
|
@@ -3219,28 +3191,28 @@ ot.BasisTheoryPermissions = Go;
|
|
|
3219
3191
|
return t.BasisTheoryPermissions;
|
|
3220
3192
|
}
|
|
3221
3193
|
});
|
|
3222
|
-
var t =
|
|
3223
|
-
})(
|
|
3224
|
-
var
|
|
3225
|
-
Object.defineProperty(
|
|
3194
|
+
var t = ut;
|
|
3195
|
+
})(Cn);
|
|
3196
|
+
var On = {}, lt = {};
|
|
3197
|
+
Object.defineProperty(lt, "__esModule", {
|
|
3226
3198
|
value: !0
|
|
3227
3199
|
});
|
|
3228
|
-
|
|
3229
|
-
var
|
|
3230
|
-
const
|
|
3200
|
+
lt.BasisTheoryProxies = void 0;
|
|
3201
|
+
var Pr = m, ko = D, Vo = W;
|
|
3202
|
+
const Go = new Vo.CrudBuilder(class extends ko.BasisTheoryService {
|
|
3231
3203
|
constructor(t) {
|
|
3232
3204
|
const r = {
|
|
3233
3205
|
...t
|
|
3234
3206
|
};
|
|
3235
|
-
r.transformRequest = [].concat(
|
|
3207
|
+
r.transformRequest = [].concat(Pr.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Pr.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
3236
3208
|
}
|
|
3237
3209
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3238
|
-
|
|
3210
|
+
lt.BasisTheoryProxies = Go;
|
|
3239
3211
|
(function(e) {
|
|
3240
3212
|
Object.defineProperty(e, "__esModule", {
|
|
3241
3213
|
value: !0
|
|
3242
3214
|
});
|
|
3243
|
-
var t =
|
|
3215
|
+
var t = lt;
|
|
3244
3216
|
Object.keys(t).forEach(function(r) {
|
|
3245
3217
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
3246
3218
|
enumerable: !0,
|
|
@@ -3249,16 +3221,16 @@ ct.BasisTheoryProxies = Yo;
|
|
|
3249
3221
|
}
|
|
3250
3222
|
});
|
|
3251
3223
|
});
|
|
3252
|
-
})(
|
|
3253
|
-
var
|
|
3254
|
-
Object.defineProperty(
|
|
3224
|
+
})(On);
|
|
3225
|
+
var Pn = {}, dt = {};
|
|
3226
|
+
Object.defineProperty(dt, "__esModule", {
|
|
3255
3227
|
value: !0
|
|
3256
3228
|
});
|
|
3257
|
-
|
|
3258
|
-
var
|
|
3259
|
-
const
|
|
3229
|
+
dt.BasisTheoryReactorFormulas = void 0;
|
|
3230
|
+
var Jo = D, Yo = W;
|
|
3231
|
+
const Xo = new Yo.CrudBuilder(class extends Jo.BasisTheoryService {
|
|
3260
3232
|
}).create().retrieve().update().delete().list().build();
|
|
3261
|
-
|
|
3233
|
+
dt.BasisTheoryReactorFormulas = Xo;
|
|
3262
3234
|
(function(e) {
|
|
3263
3235
|
Object.defineProperty(e, "__esModule", {
|
|
3264
3236
|
value: !0
|
|
@@ -3268,20 +3240,20 @@ ut.BasisTheoryReactorFormulas = Qo;
|
|
|
3268
3240
|
return t.BasisTheoryReactorFormulas;
|
|
3269
3241
|
}
|
|
3270
3242
|
});
|
|
3271
|
-
var t =
|
|
3272
|
-
})(
|
|
3273
|
-
var
|
|
3274
|
-
Object.defineProperty(
|
|
3243
|
+
var t = dt;
|
|
3244
|
+
})(Pn);
|
|
3245
|
+
var Bn = {}, ft = {};
|
|
3246
|
+
Object.defineProperty(ft, "__esModule", {
|
|
3275
3247
|
value: !0
|
|
3276
3248
|
});
|
|
3277
|
-
|
|
3278
|
-
var Oe =
|
|
3279
|
-
const
|
|
3249
|
+
ft.BasisTheoryReactors = void 0;
|
|
3250
|
+
var Oe = U, Br = m, Zo = D, Qo = W;
|
|
3251
|
+
const ec = new Qo.CrudBuilder(class extends Zo.BasisTheoryService {
|
|
3280
3252
|
constructor(t) {
|
|
3281
3253
|
const r = {
|
|
3282
3254
|
...t
|
|
3283
3255
|
};
|
|
3284
|
-
r.transformRequest = [].concat(
|
|
3256
|
+
r.transformRequest = [].concat(Br.transformReactorRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Br.transformReactorResponseCamelCase, t.transformResponse || []), super(r);
|
|
3285
3257
|
}
|
|
3286
3258
|
react(t, r, n) {
|
|
3287
3259
|
return this.client.post(`/${t}/react`, r, (0, Oe.createRequestConfig)(n, {
|
|
@@ -3290,7 +3262,7 @@ const rc = new tc.CrudBuilder(class extends ec.BasisTheoryService {
|
|
|
3290
3262
|
})).then(Oe.dataExtractor);
|
|
3291
3263
|
}
|
|
3292
3264
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3293
|
-
|
|
3265
|
+
ft.BasisTheoryReactors = ec;
|
|
3294
3266
|
(function(e) {
|
|
3295
3267
|
Object.defineProperty(e, "__esModule", {
|
|
3296
3268
|
value: !0
|
|
@@ -3300,15 +3272,15 @@ lt.BasisTheoryReactors = rc;
|
|
|
3300
3272
|
return t.BasisTheoryReactors;
|
|
3301
3273
|
}
|
|
3302
3274
|
});
|
|
3303
|
-
var t =
|
|
3304
|
-
})(
|
|
3305
|
-
var
|
|
3306
|
-
Object.defineProperty(
|
|
3275
|
+
var t = ft;
|
|
3276
|
+
})(Bn);
|
|
3277
|
+
var xn = {}, ht = {};
|
|
3278
|
+
Object.defineProperty(ht, "__esModule", {
|
|
3307
3279
|
value: !0
|
|
3308
3280
|
});
|
|
3309
|
-
|
|
3310
|
-
var
|
|
3311
|
-
class
|
|
3281
|
+
ht.BasisTheorySessions = void 0;
|
|
3282
|
+
var xr = U, Pe = m, tc = D;
|
|
3283
|
+
class rc extends tc.BasisTheoryService {
|
|
3312
3284
|
constructor(t) {
|
|
3313
3285
|
const r = {
|
|
3314
3286
|
...t
|
|
@@ -3316,13 +3288,13 @@ class sc extends nc.BasisTheoryService {
|
|
|
3316
3288
|
r.transformRequest = [].concat(Pe.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Pe.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
3317
3289
|
}
|
|
3318
3290
|
create(t = {}) {
|
|
3319
|
-
return this.client.post("/", void 0, (0,
|
|
3291
|
+
return this.client.post("/", void 0, (0, xr.createRequestConfig)(t)).then(Pe.dataExtractor);
|
|
3320
3292
|
}
|
|
3321
3293
|
authorize(t, r = {}) {
|
|
3322
|
-
return this.client.post("/authorize", t, (0,
|
|
3294
|
+
return this.client.post("/authorize", t, (0, xr.createRequestConfig)(r)).then(Pe.dataExtractor);
|
|
3323
3295
|
}
|
|
3324
3296
|
}
|
|
3325
|
-
|
|
3297
|
+
ht.BasisTheorySessions = rc;
|
|
3326
3298
|
(function(e) {
|
|
3327
3299
|
Object.defineProperty(e, "__esModule", {
|
|
3328
3300
|
value: !0
|
|
@@ -3332,15 +3304,15 @@ dt.BasisTheorySessions = sc;
|
|
|
3332
3304
|
return t.BasisTheorySessions;
|
|
3333
3305
|
}
|
|
3334
3306
|
});
|
|
3335
|
-
var t =
|
|
3336
|
-
})(
|
|
3337
|
-
var
|
|
3338
|
-
Object.defineProperty(
|
|
3307
|
+
var t = ht;
|
|
3308
|
+
})(xn);
|
|
3309
|
+
var Nn = {}, pt = {};
|
|
3310
|
+
Object.defineProperty(pt, "__esModule", {
|
|
3339
3311
|
value: !0
|
|
3340
3312
|
});
|
|
3341
|
-
|
|
3342
|
-
var R =
|
|
3343
|
-
const
|
|
3313
|
+
pt.BasisTheoryTenants = void 0;
|
|
3314
|
+
var R = U, nc = D, sc = W;
|
|
3315
|
+
const ic = new sc.CrudBuilder(class extends nc.BasisTheoryService {
|
|
3344
3316
|
retrieve(t) {
|
|
3345
3317
|
return this.client.get("/", (0, R.createRequestConfig)(t)).then(R.dataExtractor);
|
|
3346
3318
|
}
|
|
@@ -3377,7 +3349,7 @@ const oc = new ac.CrudBuilder(class extends ic.BasisTheoryService {
|
|
|
3377
3349
|
await this.client.delete(`/members/${t}`, (0, R.createRequestConfig)(r));
|
|
3378
3350
|
}
|
|
3379
3351
|
}).build();
|
|
3380
|
-
|
|
3352
|
+
pt.BasisTheoryTenants = ic;
|
|
3381
3353
|
(function(e) {
|
|
3382
3354
|
Object.defineProperty(e, "__esModule", {
|
|
3383
3355
|
value: !0
|
|
@@ -3387,24 +3359,24 @@ ft.BasisTheoryTenants = oc;
|
|
|
3387
3359
|
return t.BasisTheoryTenants;
|
|
3388
3360
|
}
|
|
3389
3361
|
});
|
|
3390
|
-
var t =
|
|
3391
|
-
})(
|
|
3392
|
-
Object.defineProperty(
|
|
3362
|
+
var t = pt;
|
|
3363
|
+
})(Nn);
|
|
3364
|
+
Object.defineProperty(qe, "__esModule", {
|
|
3393
3365
|
value: !0
|
|
3394
3366
|
});
|
|
3395
|
-
|
|
3396
|
-
var me = ue,
|
|
3397
|
-
function
|
|
3367
|
+
qe.BasisTheory = void 0;
|
|
3368
|
+
var me = ue, ac = $r, oc = tr, g = U, Be = Sn, cc = O, uc = vn, lc = Cn, dc = On, fc = Pn, hc = Bn, pc = xn, mc = Nn;
|
|
3369
|
+
function Ec(e, t, r) {
|
|
3398
3370
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3399
3371
|
}
|
|
3400
|
-
const
|
|
3372
|
+
const yc = {
|
|
3401
3373
|
apiBaseUrl: g.DEFAULT_BASE_URL,
|
|
3402
3374
|
elements: !1,
|
|
3403
3375
|
appInfo: {}
|
|
3404
3376
|
};
|
|
3405
|
-
class
|
|
3377
|
+
class bc {
|
|
3406
3378
|
constructor() {
|
|
3407
|
-
|
|
3379
|
+
Ec(this, "_initStatus", "not-started");
|
|
3408
3380
|
}
|
|
3409
3381
|
async init(t, r = {}) {
|
|
3410
3382
|
if (this._initStatus !== "not-started" && this._initStatus !== "error")
|
|
@@ -3412,7 +3384,7 @@ class gc {
|
|
|
3412
3384
|
this._initStatus = "in-progress";
|
|
3413
3385
|
try {
|
|
3414
3386
|
this._initOptions = Object.freeze({
|
|
3415
|
-
...
|
|
3387
|
+
...yc,
|
|
3416
3388
|
...r
|
|
3417
3389
|
});
|
|
3418
3390
|
let n = this._initOptions.apiBaseUrl;
|
|
@@ -3431,31 +3403,31 @@ class gc {
|
|
|
3431
3403
|
apiKey: t,
|
|
3432
3404
|
baseURL: new URL(g.CLIENT_BASE_PATHS.tokenize, n).toString(),
|
|
3433
3405
|
appInfo: s
|
|
3434
|
-
}), this._applications = new
|
|
3406
|
+
}), this._applications = new oc.BasisTheoryApplications({
|
|
3435
3407
|
apiKey: t,
|
|
3436
3408
|
baseURL: new URL(g.CLIENT_BASE_PATHS.applications, n).toString(),
|
|
3437
3409
|
appInfo: s
|
|
3438
|
-
}), this._tenants = new
|
|
3410
|
+
}), this._tenants = new mc.BasisTheoryTenants({
|
|
3439
3411
|
apiKey: t,
|
|
3440
3412
|
baseURL: new URL(g.CLIENT_BASE_PATHS.tenants, n).toString(),
|
|
3441
3413
|
appInfo: s
|
|
3442
|
-
}), this._logs = new
|
|
3414
|
+
}), this._logs = new uc.BasisTheoryLogs({
|
|
3443
3415
|
apiKey: t,
|
|
3444
3416
|
baseURL: new URL(g.CLIENT_BASE_PATHS.logs, n).toString(),
|
|
3445
3417
|
appInfo: s
|
|
3446
|
-
}), this._reactorFormulas = new
|
|
3418
|
+
}), this._reactorFormulas = new fc.BasisTheoryReactorFormulas({
|
|
3447
3419
|
apiKey: t,
|
|
3448
3420
|
baseURL: new URL(g.CLIENT_BASE_PATHS.reactorFormulas, n).toString(),
|
|
3449
3421
|
appInfo: s
|
|
3450
|
-
}), this._reactors = new
|
|
3422
|
+
}), this._reactors = new hc.BasisTheoryReactors({
|
|
3451
3423
|
apiKey: t,
|
|
3452
3424
|
baseURL: new URL(g.CLIENT_BASE_PATHS.reactors, n).toString(),
|
|
3453
3425
|
appInfo: s
|
|
3454
|
-
}), this._permissions = new
|
|
3426
|
+
}), this._permissions = new lc.BasisTheoryPermissions({
|
|
3455
3427
|
apiKey: t,
|
|
3456
3428
|
baseURL: new URL(g.CLIENT_BASE_PATHS.permissions, n).toString(),
|
|
3457
3429
|
appInfo: s
|
|
3458
|
-
}), this._proxies = new
|
|
3430
|
+
}), this._proxies = new dc.BasisTheoryProxies({
|
|
3459
3431
|
apiKey: t,
|
|
3460
3432
|
baseURL: new URL(g.CLIENT_BASE_PATHS.proxies, n).toString(),
|
|
3461
3433
|
appInfo: s
|
|
@@ -3463,11 +3435,11 @@ class gc {
|
|
|
3463
3435
|
apiKey: t,
|
|
3464
3436
|
baseURL: new URL(g.CLIENT_BASE_PATHS.proxy, n).toString(),
|
|
3465
3437
|
appInfo: s
|
|
3466
|
-
}), this._sessions = new
|
|
3438
|
+
}), this._sessions = new pc.BasisTheorySessions({
|
|
3467
3439
|
apiKey: t,
|
|
3468
3440
|
baseURL: new URL(g.CLIENT_BASE_PATHS.sessions, n).toString(),
|
|
3469
3441
|
appInfo: s
|
|
3470
|
-
}), this._transactions = new
|
|
3442
|
+
}), this._transactions = new ac.BasisTheoryTransactions({
|
|
3471
3443
|
apiKey: t,
|
|
3472
3444
|
baseURL: new URL(g.CLIENT_BASE_PATHS.transactions, n).toString(),
|
|
3473
3445
|
appInfo: s
|
|
@@ -3479,7 +3451,7 @@ class gc {
|
|
|
3479
3451
|
}
|
|
3480
3452
|
createElement(t, r) {
|
|
3481
3453
|
if (!this._elements)
|
|
3482
|
-
throw new Error(
|
|
3454
|
+
throw new Error(cc.ELEMENTS_INIT_ERROR_MESSAGE);
|
|
3483
3455
|
return this._elements.createElement(t, r);
|
|
3484
3456
|
}
|
|
3485
3457
|
tokenize(t, r) {
|
|
@@ -3559,7 +3531,7 @@ class gc {
|
|
|
3559
3531
|
this._elements = t;
|
|
3560
3532
|
}
|
|
3561
3533
|
}
|
|
3562
|
-
|
|
3534
|
+
qe.BasisTheory = bc;
|
|
3563
3535
|
(function(e) {
|
|
3564
3536
|
Object.defineProperty(e, "__esModule", {
|
|
3565
3537
|
value: !0
|
|
@@ -3568,7 +3540,7 @@ $e.BasisTheory = gc;
|
|
|
3568
3540
|
_instance: !0
|
|
3569
3541
|
};
|
|
3570
3542
|
e._instance = void 0;
|
|
3571
|
-
var r =
|
|
3543
|
+
var r = qe;
|
|
3572
3544
|
Object.keys(r).forEach(function(a) {
|
|
3573
3545
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === r[a] || Object.defineProperty(e, a, {
|
|
3574
3546
|
enumerable: !0,
|
|
@@ -3577,7 +3549,7 @@ $e.BasisTheory = gc;
|
|
|
3577
3549
|
}
|
|
3578
3550
|
});
|
|
3579
3551
|
});
|
|
3580
|
-
var n =
|
|
3552
|
+
var n = tr;
|
|
3581
3553
|
Object.keys(n).forEach(function(a) {
|
|
3582
3554
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === n[a] || Object.defineProperty(e, a, {
|
|
3583
3555
|
enumerable: !0,
|
|
@@ -3586,7 +3558,7 @@ $e.BasisTheory = gc;
|
|
|
3586
3558
|
}
|
|
3587
3559
|
});
|
|
3588
3560
|
});
|
|
3589
|
-
var s =
|
|
3561
|
+
var s = rr;
|
|
3590
3562
|
Object.keys(s).forEach(function(a) {
|
|
3591
3563
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === s[a] || Object.defineProperty(e, a, {
|
|
3592
3564
|
enumerable: !0,
|
|
@@ -3598,10 +3570,10 @@ $e.BasisTheory = gc;
|
|
|
3598
3570
|
const i = new r.BasisTheory();
|
|
3599
3571
|
e._instance = i;
|
|
3600
3572
|
})(Mr);
|
|
3601
|
-
const T = crypto,
|
|
3573
|
+
const T = crypto, K = (e) => e instanceof CryptoKey, _c = async (e, t) => {
|
|
3602
3574
|
const r = `SHA-${e.slice(-3)}`;
|
|
3603
3575
|
return new Uint8Array(await T.subtle.digest(r, t));
|
|
3604
|
-
}, re = new TextEncoder(),
|
|
3576
|
+
}, re = new TextEncoder(), jn = new TextDecoder(), $e = 2 ** 32;
|
|
3605
3577
|
function Se(...e) {
|
|
3606
3578
|
const t = e.reduce((s, { length: i }) => s + i, 0), r = new Uint8Array(t);
|
|
3607
3579
|
let n = 0;
|
|
@@ -3609,55 +3581,55 @@ function Se(...e) {
|
|
|
3609
3581
|
r.set(s, n), n += s.length;
|
|
3610
3582
|
return r;
|
|
3611
3583
|
}
|
|
3612
|
-
function
|
|
3584
|
+
function gc(e, t) {
|
|
3613
3585
|
return Se(re.encode(e), new Uint8Array([0]), t);
|
|
3614
3586
|
}
|
|
3615
3587
|
function $t(e, t, r) {
|
|
3616
|
-
if (t < 0 || t >=
|
|
3617
|
-
throw new RangeError(`value must be >= 0 and <= ${
|
|
3588
|
+
if (t < 0 || t >= $e)
|
|
3589
|
+
throw new RangeError(`value must be >= 0 and <= ${$e - 1}. Received ${t}`);
|
|
3618
3590
|
e.set([t >>> 24, t >>> 16, t >>> 8, t & 255], r);
|
|
3619
3591
|
}
|
|
3620
|
-
function
|
|
3621
|
-
const t = Math.floor(e /
|
|
3592
|
+
function wc(e) {
|
|
3593
|
+
const t = Math.floor(e / $e), r = e % $e, n = new Uint8Array(8);
|
|
3622
3594
|
return $t(n, t, 0), $t(n, r, 4), n;
|
|
3623
3595
|
}
|
|
3624
|
-
function
|
|
3596
|
+
function nr(e) {
|
|
3625
3597
|
const t = new Uint8Array(4);
|
|
3626
3598
|
return $t(t, e), t;
|
|
3627
3599
|
}
|
|
3628
|
-
function
|
|
3629
|
-
return Se(
|
|
3600
|
+
function Rt(e) {
|
|
3601
|
+
return Se(nr(e.length), e);
|
|
3630
3602
|
}
|
|
3631
|
-
async function
|
|
3603
|
+
async function Sc(e, t, r) {
|
|
3632
3604
|
const n = Math.ceil((t >> 3) / 32), s = new Uint8Array(n * 32);
|
|
3633
3605
|
for (let i = 0; i < n; i++) {
|
|
3634
3606
|
const a = new Uint8Array(4 + e.length + r.length);
|
|
3635
|
-
a.set(
|
|
3607
|
+
a.set(nr(i + 1)), a.set(e, 4), a.set(r, 4 + e.length), s.set(await _c("sha256", a), i * 32);
|
|
3636
3608
|
}
|
|
3637
3609
|
return s.slice(0, t >> 3);
|
|
3638
3610
|
}
|
|
3639
|
-
const
|
|
3611
|
+
const Tc = (e) => {
|
|
3640
3612
|
let t = e;
|
|
3641
3613
|
typeof t == "string" && (t = re.encode(t));
|
|
3642
3614
|
const r = 32768, n = [];
|
|
3643
3615
|
for (let s = 0; s < t.length; s += r)
|
|
3644
3616
|
n.push(String.fromCharCode.apply(null, t.subarray(s, s + r)));
|
|
3645
3617
|
return btoa(n.join(""));
|
|
3646
|
-
}, L = (e) =>
|
|
3618
|
+
}, L = (e) => Tc(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"), Rc = (e) => {
|
|
3647
3619
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
3648
3620
|
for (let n = 0; n < t.length; n++)
|
|
3649
3621
|
r[n] = t.charCodeAt(n);
|
|
3650
3622
|
return r;
|
|
3651
3623
|
}, Un = (e) => {
|
|
3652
3624
|
let t = e;
|
|
3653
|
-
t instanceof Uint8Array && (t =
|
|
3625
|
+
t instanceof Uint8Array && (t = jn.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
3654
3626
|
try {
|
|
3655
|
-
return
|
|
3627
|
+
return Rc(t);
|
|
3656
3628
|
} catch {
|
|
3657
3629
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
3658
3630
|
}
|
|
3659
3631
|
};
|
|
3660
|
-
class
|
|
3632
|
+
class Dn extends Error {
|
|
3661
3633
|
static get code() {
|
|
3662
3634
|
return "ERR_JOSE_GENERIC";
|
|
3663
3635
|
}
|
|
@@ -3666,7 +3638,7 @@ class Ln extends Error {
|
|
|
3666
3638
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
3667
3639
|
}
|
|
3668
3640
|
}
|
|
3669
|
-
class
|
|
3641
|
+
class N extends Dn {
|
|
3670
3642
|
constructor() {
|
|
3671
3643
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
3672
3644
|
}
|
|
@@ -3674,7 +3646,7 @@ class x extends Ln {
|
|
|
3674
3646
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
3675
3647
|
}
|
|
3676
3648
|
}
|
|
3677
|
-
class X extends
|
|
3649
|
+
class X extends Dn {
|
|
3678
3650
|
constructor() {
|
|
3679
3651
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
3680
3652
|
}
|
|
@@ -3682,8 +3654,8 @@ class X extends Ln {
|
|
|
3682
3654
|
return "ERR_JWE_INVALID";
|
|
3683
3655
|
}
|
|
3684
3656
|
}
|
|
3685
|
-
const
|
|
3686
|
-
function
|
|
3657
|
+
const sr = T.getRandomValues.bind(T);
|
|
3658
|
+
function Ln(e) {
|
|
3687
3659
|
switch (e) {
|
|
3688
3660
|
case "A128GCM":
|
|
3689
3661
|
case "A128GCMKW":
|
|
@@ -3697,13 +3669,13 @@ function Hn(e) {
|
|
|
3697
3669
|
case "A256CBC-HS512":
|
|
3698
3670
|
return 128;
|
|
3699
3671
|
default:
|
|
3700
|
-
throw new
|
|
3672
|
+
throw new N(`Unsupported JWE Algorithm: ${e}`);
|
|
3701
3673
|
}
|
|
3702
3674
|
}
|
|
3703
|
-
const
|
|
3704
|
-
if (t.length << 3 !==
|
|
3675
|
+
const Ac = (e) => sr(new Uint8Array(Ln(e) >> 3)), vc = (e, t) => {
|
|
3676
|
+
if (t.length << 3 !== Ln(e))
|
|
3705
3677
|
throw new X("Invalid Initialization Vector length");
|
|
3706
|
-
},
|
|
3678
|
+
}, Nr = (e, t) => {
|
|
3707
3679
|
const r = e.byteLength << 3;
|
|
3708
3680
|
if (r !== t)
|
|
3709
3681
|
throw new X(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`);
|
|
@@ -3714,10 +3686,10 @@ function Y(e, t = "algorithm.name") {
|
|
|
3714
3686
|
function xe(e, t) {
|
|
3715
3687
|
return e.name === t;
|
|
3716
3688
|
}
|
|
3717
|
-
function
|
|
3689
|
+
function Cc(e) {
|
|
3718
3690
|
return parseInt(e.name.slice(4), 10);
|
|
3719
3691
|
}
|
|
3720
|
-
function
|
|
3692
|
+
function Oc(e, t) {
|
|
3721
3693
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
3722
3694
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
3723
3695
|
if (t.length > 2) {
|
|
@@ -3773,16 +3745,16 @@ function le(e, t, ...r) {
|
|
|
3773
3745
|
if (!xe(e.algorithm, "RSA-OAEP"))
|
|
3774
3746
|
throw Y("RSA-OAEP");
|
|
3775
3747
|
const n = parseInt(t.slice(9), 10) || 1;
|
|
3776
|
-
if (
|
|
3748
|
+
if (Cc(e.algorithm.hash) !== n)
|
|
3777
3749
|
throw Y(`SHA-${n}`, "algorithm.hash");
|
|
3778
3750
|
break;
|
|
3779
3751
|
}
|
|
3780
3752
|
default:
|
|
3781
3753
|
throw new TypeError("CryptoKey does not support this operation");
|
|
3782
3754
|
}
|
|
3783
|
-
|
|
3755
|
+
Oc(e, r);
|
|
3784
3756
|
}
|
|
3785
|
-
function
|
|
3757
|
+
function Hn(e, t, ...r) {
|
|
3786
3758
|
var n;
|
|
3787
3759
|
if (r.length > 2) {
|
|
3788
3760
|
const s = r.pop();
|
|
@@ -3790,11 +3762,11 @@ function Mn(e, t, ...r) {
|
|
|
3790
3762
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
3791
3763
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
3792
3764
|
}
|
|
3793
|
-
const
|
|
3794
|
-
function
|
|
3795
|
-
return
|
|
3765
|
+
const z = (e, ...t) => Hn("Key must be ", e, ...t);
|
|
3766
|
+
function Mn(e, t, ...r) {
|
|
3767
|
+
return Hn(`Key for the ${e} algorithm must be `, t, ...r);
|
|
3796
3768
|
}
|
|
3797
|
-
const
|
|
3769
|
+
const In = (e) => K(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", M = ["CryptoKey"], Pc = (...e) => {
|
|
3798
3770
|
const t = e.filter(Boolean);
|
|
3799
3771
|
if (t.length === 0 || t.length === 1)
|
|
3800
3772
|
return !0;
|
|
@@ -3813,11 +3785,11 @@ const $n = (e) => F(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "
|
|
|
3813
3785
|
}
|
|
3814
3786
|
return !0;
|
|
3815
3787
|
};
|
|
3816
|
-
function
|
|
3788
|
+
function Bc(e) {
|
|
3817
3789
|
return typeof e == "object" && e !== null;
|
|
3818
3790
|
}
|
|
3819
|
-
function
|
|
3820
|
-
if (!
|
|
3791
|
+
function xc(e) {
|
|
3792
|
+
if (!Bc(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
3821
3793
|
return !1;
|
|
3822
3794
|
if (Object.getPrototypeOf(e) === null)
|
|
3823
3795
|
return !0;
|
|
@@ -3826,67 +3798,67 @@ function jc(e) {
|
|
|
3826
3798
|
t = Object.getPrototypeOf(t);
|
|
3827
3799
|
return Object.getPrototypeOf(e) === t;
|
|
3828
3800
|
}
|
|
3829
|
-
const
|
|
3801
|
+
const $n = [
|
|
3830
3802
|
{ hash: "SHA-256", name: "HMAC" },
|
|
3831
3803
|
!0,
|
|
3832
3804
|
["sign"]
|
|
3833
3805
|
];
|
|
3834
|
-
function
|
|
3806
|
+
function Nc(e, t) {
|
|
3835
3807
|
if (e.algorithm.length !== parseInt(t.slice(1, 4), 10))
|
|
3836
3808
|
throw new TypeError(`Invalid key size for alg: ${t}`);
|
|
3837
3809
|
}
|
|
3838
|
-
function
|
|
3839
|
-
if (
|
|
3810
|
+
function jc(e, t, r) {
|
|
3811
|
+
if (K(e))
|
|
3840
3812
|
return le(e, t, r), e;
|
|
3841
3813
|
if (e instanceof Uint8Array)
|
|
3842
3814
|
return T.subtle.importKey("raw", e, "AES-KW", !0, [r]);
|
|
3843
|
-
throw new TypeError(
|
|
3815
|
+
throw new TypeError(z(e, ...M, "Uint8Array"));
|
|
3844
3816
|
}
|
|
3845
3817
|
const qt = async (e, t, r) => {
|
|
3846
|
-
const n = await
|
|
3847
|
-
|
|
3848
|
-
const s = await T.subtle.importKey("raw", r,
|
|
3818
|
+
const n = await jc(t, e, "wrapKey");
|
|
3819
|
+
Nc(n, e);
|
|
3820
|
+
const s = await T.subtle.importKey("raw", r, ...$n);
|
|
3849
3821
|
return new Uint8Array(await T.subtle.wrapKey("raw", s, n, "AES-KW"));
|
|
3850
3822
|
};
|
|
3851
|
-
async function
|
|
3852
|
-
if (!
|
|
3853
|
-
throw new TypeError(
|
|
3854
|
-
if (le(e, "ECDH"), !
|
|
3855
|
-
throw new TypeError(
|
|
3823
|
+
async function Uc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
3824
|
+
if (!K(e))
|
|
3825
|
+
throw new TypeError(z(e, ...M));
|
|
3826
|
+
if (le(e, "ECDH"), !K(t))
|
|
3827
|
+
throw new TypeError(z(t, ...M));
|
|
3856
3828
|
le(t, "ECDH", "deriveBits");
|
|
3857
|
-
const a = Se(
|
|
3829
|
+
const a = Se(Rt(re.encode(r)), Rt(s), Rt(i), nr(n));
|
|
3858
3830
|
let o;
|
|
3859
3831
|
e.algorithm.name === "X25519" ? o = 256 : e.algorithm.name === "X448" ? o = 448 : o = Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3), 10) / 8) << 3;
|
|
3860
3832
|
const d = new Uint8Array(await T.subtle.deriveBits({
|
|
3861
3833
|
name: e.algorithm.name,
|
|
3862
3834
|
public: e
|
|
3863
3835
|
}, t, o));
|
|
3864
|
-
return
|
|
3836
|
+
return Sc(d, n, a);
|
|
3865
3837
|
}
|
|
3866
|
-
async function
|
|
3867
|
-
if (!
|
|
3868
|
-
throw new TypeError(
|
|
3838
|
+
async function Dc(e) {
|
|
3839
|
+
if (!K(e))
|
|
3840
|
+
throw new TypeError(z(e, ...M));
|
|
3869
3841
|
return T.subtle.generateKey(e.algorithm, !0, ["deriveBits"]);
|
|
3870
3842
|
}
|
|
3871
|
-
function
|
|
3872
|
-
if (!
|
|
3873
|
-
throw new TypeError(
|
|
3843
|
+
function Lc(e) {
|
|
3844
|
+
if (!K(e))
|
|
3845
|
+
throw new TypeError(z(e, ...M));
|
|
3874
3846
|
return ["P-256", "P-384", "P-521"].includes(e.algorithm.namedCurve) || e.algorithm.name === "X25519" || e.algorithm.name === "X448";
|
|
3875
3847
|
}
|
|
3876
|
-
function
|
|
3848
|
+
function Hc(e) {
|
|
3877
3849
|
if (!(e instanceof Uint8Array) || e.length < 8)
|
|
3878
3850
|
throw new X("PBES2 Salt Input must be 8 or more octets");
|
|
3879
3851
|
}
|
|
3880
|
-
function
|
|
3852
|
+
function Mc(e, t) {
|
|
3881
3853
|
if (e instanceof Uint8Array)
|
|
3882
3854
|
return T.subtle.importKey("raw", e, "PBKDF2", !1, ["deriveBits"]);
|
|
3883
|
-
if (
|
|
3855
|
+
if (K(e))
|
|
3884
3856
|
return le(e, t, "deriveBits", "deriveKey"), e;
|
|
3885
|
-
throw new TypeError(
|
|
3857
|
+
throw new TypeError(z(e, ...M, "Uint8Array"));
|
|
3886
3858
|
}
|
|
3887
|
-
async function
|
|
3888
|
-
|
|
3889
|
-
const s =
|
|
3859
|
+
async function Ic(e, t, r, n) {
|
|
3860
|
+
Hc(e);
|
|
3861
|
+
const s = gc(t, e), i = parseInt(t.slice(13, 16), 10), a = {
|
|
3890
3862
|
hash: `SHA-${t.slice(8, 11)}`,
|
|
3891
3863
|
iterations: r,
|
|
3892
3864
|
name: "PBKDF2",
|
|
@@ -3894,18 +3866,18 @@ async function qc(e, t, r, n) {
|
|
|
3894
3866
|
}, o = {
|
|
3895
3867
|
length: i,
|
|
3896
3868
|
name: "AES-KW"
|
|
3897
|
-
}, d = await
|
|
3869
|
+
}, d = await Mc(n, t);
|
|
3898
3870
|
if (d.usages.includes("deriveBits"))
|
|
3899
3871
|
return new Uint8Array(await T.subtle.deriveBits(a, d, i));
|
|
3900
3872
|
if (d.usages.includes("deriveKey"))
|
|
3901
3873
|
return T.subtle.deriveKey(a, d, o, !1, ["wrapKey", "unwrapKey"]);
|
|
3902
3874
|
throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
|
|
3903
3875
|
}
|
|
3904
|
-
const
|
|
3905
|
-
const i = await
|
|
3876
|
+
const $c = async (e, t, r, n = 2048, s = sr(new Uint8Array(16))) => {
|
|
3877
|
+
const i = await Ic(s, e, n, t);
|
|
3906
3878
|
return { encryptedKey: await qt(e.slice(-6), i, r), p2c: n, p2s: L(s) };
|
|
3907
3879
|
};
|
|
3908
|
-
function
|
|
3880
|
+
function jr(e) {
|
|
3909
3881
|
switch (e) {
|
|
3910
3882
|
case "RSA-OAEP":
|
|
3911
3883
|
case "RSA-OAEP-256":
|
|
@@ -3913,27 +3885,27 @@ function Ur(e) {
|
|
|
3913
3885
|
case "RSA-OAEP-512":
|
|
3914
3886
|
return "RSA-OAEP";
|
|
3915
3887
|
default:
|
|
3916
|
-
throw new
|
|
3888
|
+
throw new N(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
3917
3889
|
}
|
|
3918
3890
|
}
|
|
3919
|
-
const
|
|
3891
|
+
const qc = (e, t) => {
|
|
3920
3892
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
3921
3893
|
const { modulusLength: r } = t.algorithm;
|
|
3922
3894
|
if (typeof r != "number" || r < 2048)
|
|
3923
3895
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
3924
3896
|
}
|
|
3925
|
-
},
|
|
3926
|
-
if (!
|
|
3927
|
-
throw new TypeError(
|
|
3928
|
-
if (le(t, e, "encrypt", "wrapKey"),
|
|
3929
|
-
return new Uint8Array(await T.subtle.encrypt(
|
|
3897
|
+
}, Fc = async (e, t, r) => {
|
|
3898
|
+
if (!K(t))
|
|
3899
|
+
throw new TypeError(z(t, ...M));
|
|
3900
|
+
if (le(t, e, "encrypt", "wrapKey"), qc(e, t), t.usages.includes("encrypt"))
|
|
3901
|
+
return new Uint8Array(await T.subtle.encrypt(jr(e), t, r));
|
|
3930
3902
|
if (t.usages.includes("wrapKey")) {
|
|
3931
|
-
const n = await T.subtle.importKey("raw", r,
|
|
3932
|
-
return new Uint8Array(await T.subtle.wrapKey("raw", n, t,
|
|
3903
|
+
const n = await T.subtle.importKey("raw", r, ...$n);
|
|
3904
|
+
return new Uint8Array(await T.subtle.wrapKey("raw", n, t, jr(e)));
|
|
3933
3905
|
}
|
|
3934
3906
|
throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation');
|
|
3935
3907
|
};
|
|
3936
|
-
function
|
|
3908
|
+
function Kc(e) {
|
|
3937
3909
|
let t, r;
|
|
3938
3910
|
switch (e.kty) {
|
|
3939
3911
|
case "RSA": {
|
|
@@ -3958,7 +3930,7 @@ function Wc(e) {
|
|
|
3958
3930
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
3959
3931
|
break;
|
|
3960
3932
|
default:
|
|
3961
|
-
throw new
|
|
3933
|
+
throw new N('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
3962
3934
|
}
|
|
3963
3935
|
break;
|
|
3964
3936
|
}
|
|
@@ -3980,7 +3952,7 @@ function Wc(e) {
|
|
|
3980
3952
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
3981
3953
|
break;
|
|
3982
3954
|
default:
|
|
3983
|
-
throw new
|
|
3955
|
+
throw new N('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
3984
3956
|
}
|
|
3985
3957
|
break;
|
|
3986
3958
|
}
|
|
@@ -3996,46 +3968,46 @@ function Wc(e) {
|
|
|
3996
3968
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
3997
3969
|
break;
|
|
3998
3970
|
default:
|
|
3999
|
-
throw new
|
|
3971
|
+
throw new N('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
4000
3972
|
}
|
|
4001
3973
|
break;
|
|
4002
3974
|
}
|
|
4003
3975
|
default:
|
|
4004
|
-
throw new
|
|
3976
|
+
throw new N('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
4005
3977
|
}
|
|
4006
3978
|
return { algorithm: t, keyUsages: r };
|
|
4007
3979
|
}
|
|
4008
|
-
const
|
|
3980
|
+
const qn = async (e) => {
|
|
4009
3981
|
if (!e.alg)
|
|
4010
3982
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
4011
|
-
const { algorithm: t, keyUsages: r } =
|
|
3983
|
+
const { algorithm: t, keyUsages: r } = Kc(e), n = [
|
|
4012
3984
|
t,
|
|
4013
3985
|
e.ext ?? !1,
|
|
4014
3986
|
e.key_ops ?? r
|
|
4015
3987
|
], s = { ...e };
|
|
4016
3988
|
return delete s.alg, delete s.use, T.subtle.importKey("jwk", s, ...n);
|
|
4017
|
-
},
|
|
4018
|
-
let
|
|
4019
|
-
const
|
|
3989
|
+
}, Fn = (e) => Un(e);
|
|
3990
|
+
let At, vt;
|
|
3991
|
+
const Kn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", zn = async (e, t, r, n) => {
|
|
4020
3992
|
let s = e.get(t);
|
|
4021
3993
|
if (s != null && s[n])
|
|
4022
3994
|
return s[n];
|
|
4023
|
-
const i = await
|
|
3995
|
+
const i = await qn({ ...r, alg: n });
|
|
4024
3996
|
return s ? s[n] = i : e.set(t, { [n]: i }), i;
|
|
4025
|
-
},
|
|
4026
|
-
if (
|
|
3997
|
+
}, zc = (e, t) => {
|
|
3998
|
+
if (Kn(e)) {
|
|
4027
3999
|
let r = e.export({ format: "jwk" });
|
|
4028
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
4000
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Fn(r.k) : (vt || (vt = /* @__PURE__ */ new WeakMap()), zn(vt, e, r, t));
|
|
4029
4001
|
}
|
|
4030
4002
|
return e;
|
|
4031
|
-
},
|
|
4032
|
-
if (
|
|
4003
|
+
}, Wc = (e, t) => {
|
|
4004
|
+
if (Kn(e)) {
|
|
4033
4005
|
let r = e.export({ format: "jwk" });
|
|
4034
|
-
return r.k ?
|
|
4006
|
+
return r.k ? Fn(r.k) : (At || (At = /* @__PURE__ */ new WeakMap()), zn(At, e, r, t));
|
|
4035
4007
|
}
|
|
4036
4008
|
return e;
|
|
4037
|
-
},
|
|
4038
|
-
function
|
|
4009
|
+
}, Ct = { normalizePublicKey: zc, normalizePrivateKey: Wc };
|
|
4010
|
+
function Wn(e) {
|
|
4039
4011
|
switch (e) {
|
|
4040
4012
|
case "A128GCM":
|
|
4041
4013
|
return 128;
|
|
@@ -4049,12 +4021,12 @@ function kn(e) {
|
|
|
4049
4021
|
case "A256CBC-HS512":
|
|
4050
4022
|
return 512;
|
|
4051
4023
|
default:
|
|
4052
|
-
throw new
|
|
4024
|
+
throw new N(`Unsupported JWE Algorithm: ${e}`);
|
|
4053
4025
|
}
|
|
4054
4026
|
}
|
|
4055
|
-
const
|
|
4056
|
-
async function
|
|
4057
|
-
if (!
|
|
4027
|
+
const Ee = (e) => sr(new Uint8Array(Wn(e) >> 3));
|
|
4028
|
+
async function kc(e, t) {
|
|
4029
|
+
if (!xc(e))
|
|
4058
4030
|
throw new TypeError("JWK must be an object");
|
|
4059
4031
|
switch (e.kty) {
|
|
4060
4032
|
case "oct":
|
|
@@ -4063,44 +4035,44 @@ async function Vc(e, t) {
|
|
|
4063
4035
|
return Un(e.k);
|
|
4064
4036
|
case "RSA":
|
|
4065
4037
|
if (e.oth !== void 0)
|
|
4066
|
-
throw new
|
|
4038
|
+
throw new N('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
4067
4039
|
case "EC":
|
|
4068
4040
|
case "OKP":
|
|
4069
|
-
return
|
|
4041
|
+
return qn({ ...e, alg: t });
|
|
4070
4042
|
default:
|
|
4071
|
-
throw new
|
|
4043
|
+
throw new N('Unsupported "kty" (Key Type) Parameter value');
|
|
4072
4044
|
}
|
|
4073
4045
|
}
|
|
4074
|
-
const Ft = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
4046
|
+
const Ft = (e) => e == null ? void 0 : e[Symbol.toStringTag], Vc = (e, t) => {
|
|
4075
4047
|
if (!(t instanceof Uint8Array)) {
|
|
4076
|
-
if (
|
|
4077
|
-
throw new TypeError(
|
|
4048
|
+
if (!In(t))
|
|
4049
|
+
throw new TypeError(Mn(e, t, ...M, "Uint8Array"));
|
|
4078
4050
|
if (t.type !== "secret")
|
|
4079
4051
|
throw new TypeError(`${Ft(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
4080
4052
|
}
|
|
4081
|
-
},
|
|
4082
|
-
if (
|
|
4083
|
-
throw new TypeError(
|
|
4053
|
+
}, Gc = (e, t, r) => {
|
|
4054
|
+
if (!In(t))
|
|
4055
|
+
throw new TypeError(Mn(e, t, ...M));
|
|
4084
4056
|
if (t.type === "secret")
|
|
4085
4057
|
throw new TypeError(`${Ft(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
4086
4058
|
if (t.algorithm, t.algorithm && r === "encrypt" && t.type === "private")
|
|
4087
4059
|
throw new TypeError(`${Ft(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
4088
|
-
},
|
|
4089
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
4060
|
+
}, Jc = (e, t, r) => {
|
|
4061
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Vc(e, t) : Gc(e, t, r);
|
|
4090
4062
|
};
|
|
4091
|
-
async function
|
|
4063
|
+
async function Yc(e, t, r, n, s) {
|
|
4092
4064
|
if (!(r instanceof Uint8Array))
|
|
4093
|
-
throw new TypeError(
|
|
4065
|
+
throw new TypeError(z(r, "Uint8Array"));
|
|
4094
4066
|
const i = parseInt(e.slice(1, 4), 10), a = await T.subtle.importKey("raw", r.subarray(i >> 3), "AES-CBC", !1, ["encrypt"]), o = await T.subtle.importKey("raw", r.subarray(0, i >> 3), {
|
|
4095
4067
|
hash: `SHA-${i << 1}`,
|
|
4096
4068
|
name: "HMAC"
|
|
4097
4069
|
}, !1, ["sign"]), d = new Uint8Array(await T.subtle.encrypt({
|
|
4098
4070
|
iv: n,
|
|
4099
4071
|
name: "AES-CBC"
|
|
4100
|
-
}, a, t)), u = Se(s, n, d,
|
|
4072
|
+
}, a, t)), u = Se(s, n, d, wc(s.length << 3)), l = new Uint8Array((await T.subtle.sign("HMAC", o, u)).slice(0, i >> 3));
|
|
4101
4073
|
return { ciphertext: d, tag: l, iv: n };
|
|
4102
4074
|
}
|
|
4103
|
-
async function
|
|
4075
|
+
async function Xc(e, t, r, n, s) {
|
|
4104
4076
|
let i;
|
|
4105
4077
|
r instanceof Uint8Array ? i = await T.subtle.importKey("raw", r, "AES-GCM", !1, ["encrypt"]) : (le(r, e, "encrypt"), i = r);
|
|
4106
4078
|
const a = new Uint8Array(await T.subtle.encrypt({
|
|
@@ -4111,31 +4083,31 @@ async function Qc(e, t, r, n, s) {
|
|
|
4111
4083
|
}, i, t)), o = a.slice(-16);
|
|
4112
4084
|
return { ciphertext: a.slice(0, -16), tag: o, iv: n };
|
|
4113
4085
|
}
|
|
4114
|
-
const
|
|
4115
|
-
if (!
|
|
4116
|
-
throw new TypeError(
|
|
4117
|
-
switch (n ?
|
|
4086
|
+
const kn = async (e, t, r, n, s) => {
|
|
4087
|
+
if (!K(r) && !(r instanceof Uint8Array))
|
|
4088
|
+
throw new TypeError(z(r, ...M, "Uint8Array"));
|
|
4089
|
+
switch (n ? vc(e, n) : n = Ac(e), e) {
|
|
4118
4090
|
case "A128CBC-HS256":
|
|
4119
4091
|
case "A192CBC-HS384":
|
|
4120
4092
|
case "A256CBC-HS512":
|
|
4121
|
-
return r instanceof Uint8Array &&
|
|
4093
|
+
return r instanceof Uint8Array && Nr(r, parseInt(e.slice(-3), 10)), Yc(e, t, r, n, s);
|
|
4122
4094
|
case "A128GCM":
|
|
4123
4095
|
case "A192GCM":
|
|
4124
4096
|
case "A256GCM":
|
|
4125
|
-
return r instanceof Uint8Array &&
|
|
4097
|
+
return r instanceof Uint8Array && Nr(r, parseInt(e.slice(1, 4), 10)), Xc(e, t, r, n, s);
|
|
4126
4098
|
default:
|
|
4127
|
-
throw new
|
|
4099
|
+
throw new N("Unsupported JWE Content Encryption Algorithm");
|
|
4128
4100
|
}
|
|
4129
4101
|
};
|
|
4130
|
-
async function
|
|
4131
|
-
const s = e.slice(0, 7), i = await
|
|
4102
|
+
async function Zc(e, t, r, n) {
|
|
4103
|
+
const s = e.slice(0, 7), i = await kn(s, r, t, n, new Uint8Array(0));
|
|
4132
4104
|
return {
|
|
4133
4105
|
encryptedKey: i.ciphertext,
|
|
4134
4106
|
iv: L(i.iv),
|
|
4135
4107
|
tag: L(i.tag)
|
|
4136
4108
|
};
|
|
4137
4109
|
}
|
|
4138
|
-
function
|
|
4110
|
+
function Qc(e, t, r, n, s) {
|
|
4139
4111
|
if (s.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
4140
4112
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
4141
4113
|
if (!n || n.crit === void 0)
|
|
@@ -4146,7 +4118,7 @@ function tu(e, t, r, n, s) {
|
|
|
4146
4118
|
r !== void 0 ? i = new Map([...Object.entries(r), ...t.entries()]) : i = t;
|
|
4147
4119
|
for (const a of n.crit) {
|
|
4148
4120
|
if (!i.has(a))
|
|
4149
|
-
throw new
|
|
4121
|
+
throw new N(`Extension Header Parameter "${a}" is not recognized`);
|
|
4150
4122
|
if (s[a] === void 0)
|
|
4151
4123
|
throw new e(`Extension Header Parameter "${a}" is missing`);
|
|
4152
4124
|
if (i.get(a) && n[a] === void 0)
|
|
@@ -4154,26 +4126,26 @@ function tu(e, t, r, n, s) {
|
|
|
4154
4126
|
}
|
|
4155
4127
|
return new Set(n.crit);
|
|
4156
4128
|
}
|
|
4157
|
-
const
|
|
4129
|
+
const eu = async (e) => {
|
|
4158
4130
|
if (e instanceof Uint8Array)
|
|
4159
4131
|
return {
|
|
4160
4132
|
kty: "oct",
|
|
4161
4133
|
k: L(e)
|
|
4162
4134
|
};
|
|
4163
|
-
if (!
|
|
4164
|
-
throw new TypeError(
|
|
4135
|
+
if (!K(e))
|
|
4136
|
+
throw new TypeError(z(e, ...M, "Uint8Array"));
|
|
4165
4137
|
if (!e.extractable)
|
|
4166
4138
|
throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");
|
|
4167
4139
|
const { ext: t, key_ops: r, alg: n, use: s, ...i } = await T.subtle.exportKey("jwk", e);
|
|
4168
4140
|
return i;
|
|
4169
4141
|
};
|
|
4170
|
-
async function
|
|
4171
|
-
return
|
|
4142
|
+
async function tu(e) {
|
|
4143
|
+
return eu(e);
|
|
4172
4144
|
}
|
|
4173
|
-
async function
|
|
4145
|
+
async function ru(e, t, r, n, s = {}) {
|
|
4174
4146
|
var d;
|
|
4175
4147
|
let i, a, o;
|
|
4176
|
-
switch (
|
|
4148
|
+
switch (Jc(e, r, "encrypt"), r = await ((d = Ct.normalizePublicKey) == null ? void 0 : d.call(Ct, r, e)) || r, e) {
|
|
4177
4149
|
case "dir": {
|
|
4178
4150
|
o = r;
|
|
4179
4151
|
break;
|
|
@@ -4182,17 +4154,17 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4182
4154
|
case "ECDH-ES+A128KW":
|
|
4183
4155
|
case "ECDH-ES+A192KW":
|
|
4184
4156
|
case "ECDH-ES+A256KW": {
|
|
4185
|
-
if (!
|
|
4186
|
-
throw new
|
|
4157
|
+
if (!Lc(r))
|
|
4158
|
+
throw new N("ECDH with the provided key is not allowed or not supported by your javascript runtime");
|
|
4187
4159
|
const { apu: u, apv: l } = s;
|
|
4188
4160
|
let { epk: f } = s;
|
|
4189
|
-
f || (f = (await
|
|
4190
|
-
const { x: b, y: w, crv: h, kty:
|
|
4191
|
-
if (a = { epk: { x: b, crv: h, kty:
|
|
4161
|
+
f || (f = (await Dc(r)).privateKey);
|
|
4162
|
+
const { x: b, y: w, crv: h, kty: E } = await tu(f), p = await Uc(r, f, e === "ECDH-ES" ? t : e, e === "ECDH-ES" ? Wn(t) : parseInt(e.slice(-5, -2), 10), u, l);
|
|
4163
|
+
if (a = { epk: { x: b, crv: h, kty: E } }, E === "EC" && (a.epk.y = w), u && (a.apu = L(u)), l && (a.apv = L(l)), e === "ECDH-ES") {
|
|
4192
4164
|
o = p;
|
|
4193
4165
|
break;
|
|
4194
4166
|
}
|
|
4195
|
-
o = n ||
|
|
4167
|
+
o = n || Ee(t);
|
|
4196
4168
|
const S = e.slice(-6);
|
|
4197
4169
|
i = await qt(S, p, o);
|
|
4198
4170
|
break;
|
|
@@ -4202,38 +4174,38 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4202
4174
|
case "RSA-OAEP-256":
|
|
4203
4175
|
case "RSA-OAEP-384":
|
|
4204
4176
|
case "RSA-OAEP-512": {
|
|
4205
|
-
o = n ||
|
|
4177
|
+
o = n || Ee(t), i = await Fc(e, r, o);
|
|
4206
4178
|
break;
|
|
4207
4179
|
}
|
|
4208
4180
|
case "PBES2-HS256+A128KW":
|
|
4209
4181
|
case "PBES2-HS384+A192KW":
|
|
4210
4182
|
case "PBES2-HS512+A256KW": {
|
|
4211
|
-
o = n ||
|
|
4183
|
+
o = n || Ee(t);
|
|
4212
4184
|
const { p2c: u, p2s: l } = s;
|
|
4213
|
-
({ encryptedKey: i, ...a } = await
|
|
4185
|
+
({ encryptedKey: i, ...a } = await $c(e, r, o, u, l));
|
|
4214
4186
|
break;
|
|
4215
4187
|
}
|
|
4216
4188
|
case "A128KW":
|
|
4217
4189
|
case "A192KW":
|
|
4218
4190
|
case "A256KW": {
|
|
4219
|
-
o = n ||
|
|
4191
|
+
o = n || Ee(t), i = await qt(e, r, o);
|
|
4220
4192
|
break;
|
|
4221
4193
|
}
|
|
4222
4194
|
case "A128GCMKW":
|
|
4223
4195
|
case "A192GCMKW":
|
|
4224
4196
|
case "A256GCMKW": {
|
|
4225
|
-
o = n ||
|
|
4197
|
+
o = n || Ee(t);
|
|
4226
4198
|
const { iv: u } = s;
|
|
4227
|
-
({ encryptedKey: i, ...a } = await
|
|
4199
|
+
({ encryptedKey: i, ...a } = await Zc(e, r, o, u));
|
|
4228
4200
|
break;
|
|
4229
4201
|
}
|
|
4230
4202
|
default:
|
|
4231
|
-
throw new
|
|
4203
|
+
throw new N('Invalid or unsupported "alg" (JWE Algorithm) header value');
|
|
4232
4204
|
}
|
|
4233
4205
|
return { cek: o, encryptedKey: i, parameters: a };
|
|
4234
4206
|
}
|
|
4235
|
-
const
|
|
4236
|
-
class
|
|
4207
|
+
const nu = Symbol();
|
|
4208
|
+
class su {
|
|
4237
4209
|
constructor(t) {
|
|
4238
4210
|
if (!(t instanceof Uint8Array))
|
|
4239
4211
|
throw new TypeError("plaintext must be an instance of Uint8Array");
|
|
@@ -4275,15 +4247,15 @@ class au {
|
|
|
4275
4247
|
async encrypt(t, r) {
|
|
4276
4248
|
if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader)
|
|
4277
4249
|
throw new X("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");
|
|
4278
|
-
if (!
|
|
4250
|
+
if (!Pc(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader))
|
|
4279
4251
|
throw new X("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
|
|
4280
4252
|
const n = {
|
|
4281
4253
|
...this._protectedHeader,
|
|
4282
4254
|
...this._unprotectedHeader,
|
|
4283
4255
|
...this._sharedUnprotectedHeader
|
|
4284
4256
|
};
|
|
4285
|
-
if (
|
|
4286
|
-
throw new
|
|
4257
|
+
if (Qc(X, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, this._protectedHeader, n), n.zip !== void 0)
|
|
4258
|
+
throw new N('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
4287
4259
|
const { alg: s, enc: i } = n;
|
|
4288
4260
|
if (typeof s != "string" || !s)
|
|
4289
4261
|
throw new X('JWE "alg" (Algorithm) Header Parameter missing or invalid');
|
|
@@ -4294,20 +4266,20 @@ class au {
|
|
|
4294
4266
|
throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${s}`);
|
|
4295
4267
|
let o;
|
|
4296
4268
|
{
|
|
4297
|
-
let
|
|
4298
|
-
({ cek: o, encryptedKey: a, parameters:
|
|
4269
|
+
let E;
|
|
4270
|
+
({ cek: o, encryptedKey: a, parameters: E } = await ru(s, i, t, this._cek, this._keyManagementParameters)), E && (r && nu in r ? this._unprotectedHeader ? this._unprotectedHeader = { ...this._unprotectedHeader, ...E } : this.setUnprotectedHeader(E) : this._protectedHeader ? this._protectedHeader = { ...this._protectedHeader, ...E } : this.setProtectedHeader(E));
|
|
4299
4271
|
}
|
|
4300
4272
|
let d, u, l;
|
|
4301
4273
|
this._protectedHeader ? u = re.encode(L(JSON.stringify(this._protectedHeader))) : u = re.encode(""), this._aad ? (l = L(this._aad), d = Se(u, re.encode("."), re.encode(l))) : d = u;
|
|
4302
|
-
const { ciphertext: f, tag: b, iv: w } = await
|
|
4274
|
+
const { ciphertext: f, tag: b, iv: w } = await kn(i, this._plaintext, o, this._iv, d), h = {
|
|
4303
4275
|
ciphertext: L(f)
|
|
4304
4276
|
};
|
|
4305
|
-
return w && (h.iv = L(w)), b && (h.tag = L(b)), a && (h.encrypted_key = L(a)), l && (h.aad = l), this._protectedHeader && (h.protected =
|
|
4277
|
+
return w && (h.iv = L(w)), b && (h.tag = L(b)), a && (h.encrypted_key = L(a)), l && (h.aad = l), this._protectedHeader && (h.protected = jn.decode(u)), this._sharedUnprotectedHeader && (h.unprotected = this._sharedUnprotectedHeader), this._unprotectedHeader && (h.header = this._unprotectedHeader), h;
|
|
4306
4278
|
}
|
|
4307
4279
|
}
|
|
4308
|
-
class
|
|
4280
|
+
class iu {
|
|
4309
4281
|
constructor(t) {
|
|
4310
|
-
this._flattened = new
|
|
4282
|
+
this._flattened = new su(t);
|
|
4311
4283
|
}
|
|
4312
4284
|
setContentEncryptionKey(t) {
|
|
4313
4285
|
return this._flattened.setContentEncryptionKey(t), this;
|
|
@@ -4326,19 +4298,24 @@ class ou {
|
|
|
4326
4298
|
return [n.protected, n.encrypted_key, n.iv, n.ciphertext, n.tag].join(".");
|
|
4327
4299
|
}
|
|
4328
4300
|
}
|
|
4329
|
-
const
|
|
4301
|
+
const Ot = {
|
|
4330
4302
|
base: {
|
|
4331
4303
|
":disabled": {
|
|
4332
4304
|
backgroundColor: "transparent"
|
|
4333
4305
|
}
|
|
4334
4306
|
}
|
|
4335
|
-
},
|
|
4307
|
+
}, au = {
|
|
4336
4308
|
mask: {
|
|
4337
4309
|
number: "{{ data.number | card_mask: 'true', 'true' }}",
|
|
4338
4310
|
expiration_month: "{{ data.expiration_month }}",
|
|
4339
4311
|
expiration_year: "{{ data.expiration_year }}"
|
|
4340
4312
|
}
|
|
4341
|
-
},
|
|
4313
|
+
}, ou = au, cu = "DOM Element was not found";
|
|
4314
|
+
var Ur;
|
|
4315
|
+
(function(e) {
|
|
4316
|
+
e.NOT_COMPLETE = "NOT_COMPLETE", e.SCHEME_NOT_SUPPORTED = "SCHEME_NOT_SUPPORTED", e.LUHN_CHECK_FAILED = "LUHN_CHECK_FAILED", e.INVALID_EXPIRY_DATE = "INVALID_EXPIRY_DATE";
|
|
4317
|
+
})(Ur || (Ur = {}));
|
|
4318
|
+
const Vn = (e) => e != null, uu = "v3.6.0";
|
|
4342
4319
|
class Te {
|
|
4343
4320
|
constructor(t, r) {
|
|
4344
4321
|
if (Object.defineProperty(this, "options", {
|
|
@@ -4403,14 +4380,14 @@ class Te {
|
|
|
4403
4380
|
var n;
|
|
4404
4381
|
(n = this.iframe) == null || n.remove(), this.iframe = null;
|
|
4405
4382
|
}
|
|
4406
|
-
}), this.IFRAME_BASE_URL =
|
|
4383
|
+
}), this.IFRAME_BASE_URL = lu(uu), !this.IFRAME_BASE_URL)
|
|
4407
4384
|
throw new Error("IFRAME_BASE_URL not found");
|
|
4408
|
-
r &&
|
|
4385
|
+
r && Pt.set(this, { key: r });
|
|
4409
4386
|
}
|
|
4410
4387
|
mount(t) {
|
|
4411
4388
|
const r = typeof t == "string" ? document.querySelector(t) : t;
|
|
4412
4389
|
if (!r)
|
|
4413
|
-
throw new Error(
|
|
4390
|
+
throw new Error(cu);
|
|
4414
4391
|
r.innerHTML = `<iframe width="100%" height="29" src="${this.IFRAME_BASE_URL}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
|
|
4415
4392
|
const n = (s) => {
|
|
4416
4393
|
var i;
|
|
@@ -4418,7 +4395,7 @@ class Te {
|
|
|
4418
4395
|
if (s.data.type === "change") {
|
|
4419
4396
|
const a = this.extractValue(s.data.data.value), o = { ...s.data.data };
|
|
4420
4397
|
delete o.value;
|
|
4421
|
-
const d =
|
|
4398
|
+
const d = Pt.get(this);
|
|
4422
4399
|
d && (d.value = a), this.emitEvent({
|
|
4423
4400
|
...s.data,
|
|
4424
4401
|
data: o
|
|
@@ -4438,7 +4415,7 @@ class Te {
|
|
|
4438
4415
|
};
|
|
4439
4416
|
}
|
|
4440
4417
|
secureValue(t) {
|
|
4441
|
-
const r =
|
|
4418
|
+
const r = Pt.get(this);
|
|
4442
4419
|
return (r == null ? void 0 : r.key) !== t ? null : (r == null ? void 0 : r.value) ?? null;
|
|
4443
4420
|
}
|
|
4444
4421
|
emitEvent(t) {
|
|
@@ -4450,15 +4427,15 @@ class Te {
|
|
|
4450
4427
|
(n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, this.IFRAME_BASE_URL);
|
|
4451
4428
|
}
|
|
4452
4429
|
}
|
|
4453
|
-
function
|
|
4430
|
+
function lu(e) {
|
|
4454
4431
|
return `https://${window.HG_IFRAME_HOST ?? "sdk.hellgate.io"}/web/${e}/iframe/`;
|
|
4455
4432
|
}
|
|
4456
|
-
const
|
|
4457
|
-
function
|
|
4433
|
+
const Pt = /* @__PURE__ */ new Map();
|
|
4434
|
+
function Gn(e) {
|
|
4458
4435
|
const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
|
|
4459
4436
|
return { month: t, year: r && r > 10 ? +`20${r}` : null };
|
|
4460
4437
|
}
|
|
4461
|
-
function
|
|
4438
|
+
function Jn(e) {
|
|
4462
4439
|
if (!e)
|
|
4463
4440
|
return null;
|
|
4464
4441
|
const { month: t, year: r } = e;
|
|
@@ -4467,7 +4444,7 @@ function Yn(e) {
|
|
|
4467
4444
|
r && r >= 100 ? String(r).slice(-2) : r
|
|
4468
4445
|
].filter(Vn).join(" / ");
|
|
4469
4446
|
}
|
|
4470
|
-
class
|
|
4447
|
+
class du extends Te {
|
|
4471
4448
|
constructor() {
|
|
4472
4449
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4473
4450
|
enumerable: !0,
|
|
@@ -4478,22 +4455,22 @@ class hu extends Te {
|
|
|
4478
4455
|
enumerable: !0,
|
|
4479
4456
|
configurable: !0,
|
|
4480
4457
|
writable: !0,
|
|
4481
|
-
value:
|
|
4458
|
+
value: Gn
|
|
4482
4459
|
}), Object.defineProperty(this, "putValue", {
|
|
4483
4460
|
enumerable: !0,
|
|
4484
4461
|
configurable: !0,
|
|
4485
4462
|
writable: !0,
|
|
4486
|
-
value:
|
|
4463
|
+
value: Jn
|
|
4487
4464
|
});
|
|
4488
4465
|
}
|
|
4489
4466
|
}
|
|
4490
|
-
function
|
|
4467
|
+
function Yn(e) {
|
|
4491
4468
|
return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
|
|
4492
4469
|
}
|
|
4493
|
-
function
|
|
4470
|
+
function fu(e) {
|
|
4494
4471
|
return e;
|
|
4495
4472
|
}
|
|
4496
|
-
class
|
|
4473
|
+
class hu extends Te {
|
|
4497
4474
|
constructor() {
|
|
4498
4475
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4499
4476
|
enumerable: !0,
|
|
@@ -4504,16 +4481,16 @@ class mu extends Te {
|
|
|
4504
4481
|
enumerable: !0,
|
|
4505
4482
|
configurable: !0,
|
|
4506
4483
|
writable: !0,
|
|
4507
|
-
value:
|
|
4484
|
+
value: Yn
|
|
4508
4485
|
}), Object.defineProperty(this, "putValue", {
|
|
4509
4486
|
enumerable: !0,
|
|
4510
4487
|
configurable: !0,
|
|
4511
4488
|
writable: !0,
|
|
4512
|
-
value:
|
|
4489
|
+
value: fu
|
|
4513
4490
|
});
|
|
4514
4491
|
}
|
|
4515
4492
|
}
|
|
4516
|
-
class
|
|
4493
|
+
class pu extends Te {
|
|
4517
4494
|
constructor() {
|
|
4518
4495
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4519
4496
|
enumerable: !0,
|
|
@@ -4525,8 +4502,8 @@ class yu extends Te {
|
|
|
4525
4502
|
configurable: !0,
|
|
4526
4503
|
writable: !0,
|
|
4527
4504
|
value: (t) => t ? {
|
|
4528
|
-
number: t.cardNumber ?
|
|
4529
|
-
expiry_date: t.cardExpirationDate ?
|
|
4505
|
+
number: t.cardNumber ? Yn(t.cardNumber) : null,
|
|
4506
|
+
expiry_date: t.cardExpirationDate ? Gn(t.cardExpirationDate) : null,
|
|
4530
4507
|
cvc: t.cardVerificationCode ?? null
|
|
4531
4508
|
} : null
|
|
4532
4509
|
}), Object.defineProperty(this, "putValue", {
|
|
@@ -4535,13 +4512,13 @@ class yu extends Te {
|
|
|
4535
4512
|
writable: !0,
|
|
4536
4513
|
value: (t) => t ? {
|
|
4537
4514
|
cardNumber: t.number ? t.number : null,
|
|
4538
|
-
cardExpirationDate: t.expiry_date ?
|
|
4515
|
+
cardExpirationDate: t.expiry_date ? Jn(t.expiry_date) : null,
|
|
4539
4516
|
cardVerificationCode: t.cvc ?? null
|
|
4540
4517
|
} : null
|
|
4541
4518
|
});
|
|
4542
4519
|
}
|
|
4543
4520
|
}
|
|
4544
|
-
class
|
|
4521
|
+
class mu extends Te {
|
|
4545
4522
|
constructor() {
|
|
4546
4523
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4547
4524
|
enumerable: !0,
|
|
@@ -4561,7 +4538,7 @@ class Eu extends Te {
|
|
|
4561
4538
|
});
|
|
4562
4539
|
}
|
|
4563
4540
|
}
|
|
4564
|
-
class
|
|
4541
|
+
class Xn extends Te {
|
|
4565
4542
|
constructor() {
|
|
4566
4543
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4567
4544
|
enumerable: !0,
|
|
@@ -4581,39 +4558,39 @@ class Zn extends Te {
|
|
|
4581
4558
|
});
|
|
4582
4559
|
}
|
|
4583
4560
|
}
|
|
4584
|
-
function
|
|
4561
|
+
function ye(e, t, r) {
|
|
4585
4562
|
switch (e) {
|
|
4586
4563
|
case "card":
|
|
4587
|
-
return new
|
|
4564
|
+
return new pu(t, r);
|
|
4588
4565
|
case "cardNumber":
|
|
4589
|
-
return new mu(t, r);
|
|
4590
|
-
case "cardExpirationDate":
|
|
4591
4566
|
return new hu(t, r);
|
|
4567
|
+
case "cardExpirationDate":
|
|
4568
|
+
return new du(t, r);
|
|
4592
4569
|
case "cardVerificationCode":
|
|
4593
|
-
return new
|
|
4570
|
+
return new mu(t, r);
|
|
4594
4571
|
case "text":
|
|
4595
|
-
return new
|
|
4572
|
+
return new Xn(t, r);
|
|
4596
4573
|
default:
|
|
4597
4574
|
ASSERT_EXHAUSTIVE(e);
|
|
4598
4575
|
}
|
|
4599
4576
|
}
|
|
4600
|
-
function
|
|
4577
|
+
function Eu() {
|
|
4601
4578
|
return Date.now().toString(36) + Math.random().toString(36).slice(2);
|
|
4602
4579
|
}
|
|
4603
|
-
function
|
|
4580
|
+
function Dr(e) {
|
|
4604
4581
|
return [
|
|
4605
4582
|
e.issuer_identification_number,
|
|
4606
4583
|
"".padEnd(e.account_number_length - e.issuer_identification_number.length - e.account_number_last_four.length, "*"),
|
|
4607
4584
|
e.account_number_last_four
|
|
4608
4585
|
].join(" ");
|
|
4609
4586
|
}
|
|
4610
|
-
class
|
|
4587
|
+
class ir {
|
|
4611
4588
|
static async init(t) {
|
|
4612
4589
|
var n;
|
|
4613
4590
|
const r = t.isNextAction("tokenize_card") && ((n = t.state) == null ? void 0 : n.data.provider) === "basis_theory" ? await new Mr.BasisTheory().init(t.state.data.api_key, {
|
|
4614
4591
|
elements: !1
|
|
4615
4592
|
}) : void 0;
|
|
4616
|
-
return new
|
|
4593
|
+
return new ir(t, r);
|
|
4617
4594
|
}
|
|
4618
4595
|
constructor(t, r) {
|
|
4619
4596
|
Object.defineProperty(this, "session", {
|
|
@@ -4665,12 +4642,12 @@ class ar {
|
|
|
4665
4642
|
const i = ae({
|
|
4666
4643
|
disabled: !1,
|
|
4667
4644
|
autocomplete: "on",
|
|
4668
|
-
style: { ...
|
|
4645
|
+
style: { ...Ot }
|
|
4669
4646
|
}, n);
|
|
4670
4647
|
if (this.session.isNextAction("refresh_security_code") && ((o = this.session.state) != null && o.data)) {
|
|
4671
4648
|
const d = this.session.state.data;
|
|
4672
4649
|
i.cvcOnly = !0, i.value = {
|
|
4673
|
-
number:
|
|
4650
|
+
number: Dr(d),
|
|
4674
4651
|
expiry_date: {
|
|
4675
4652
|
month: (d == null ? void 0 : d.expiry_month) ?? null,
|
|
4676
4653
|
year: (d == null ? void 0 : d.expiry_year) ?? null
|
|
@@ -4678,7 +4655,7 @@ class ar {
|
|
|
4678
4655
|
cvc: null
|
|
4679
4656
|
};
|
|
4680
4657
|
}
|
|
4681
|
-
const a =
|
|
4658
|
+
const a = ye("card", i, s);
|
|
4682
4659
|
return this.cardElements.card = {
|
|
4683
4660
|
element: a,
|
|
4684
4661
|
state: this.createFieldDefaultState()
|
|
@@ -4698,15 +4675,15 @@ class ar {
|
|
|
4698
4675
|
const i = {
|
|
4699
4676
|
disabled: this.cvcOnlyEnabled,
|
|
4700
4677
|
autocomplete: "on",
|
|
4701
|
-
style: { ...
|
|
4702
|
-
}, { cardNumber: a = {}, expiryDate: o = {}, securityCode: d = {}, ...u } = n, l =
|
|
4678
|
+
style: { ...Ot }
|
|
4679
|
+
}, { cardNumber: a = {}, expiryDate: o = {}, securityCode: d = {}, ...u } = n, l = ye("cardNumber", {
|
|
4703
4680
|
...ae(i, {
|
|
4704
4681
|
...u,
|
|
4705
4682
|
...a,
|
|
4706
4683
|
cvcOnly: this.cvcOnlyEnabled,
|
|
4707
|
-
value: this.session.isNextAction("refresh_security_code") && ((w = this.session.state) != null && w.data) ?
|
|
4684
|
+
value: this.session.isNextAction("refresh_security_code") && ((w = this.session.state) != null && w.data) ? Dr(this.session.state.data) : null
|
|
4708
4685
|
})
|
|
4709
|
-
}, s), f =
|
|
4686
|
+
}, s), f = ye("cardExpirationDate", {
|
|
4710
4687
|
...ae(i, {
|
|
4711
4688
|
...u,
|
|
4712
4689
|
...o,
|
|
@@ -4715,7 +4692,7 @@ class ar {
|
|
|
4715
4692
|
year: this.session.state.data.expiry_year
|
|
4716
4693
|
} : null
|
|
4717
4694
|
})
|
|
4718
|
-
}, s), b =
|
|
4695
|
+
}, s), b = ye("cardVerificationCode", {
|
|
4719
4696
|
...ae({
|
|
4720
4697
|
...i,
|
|
4721
4698
|
disabled: !1,
|
|
@@ -4751,8 +4728,8 @@ class ar {
|
|
|
4751
4728
|
const i = {
|
|
4752
4729
|
disabled: !1,
|
|
4753
4730
|
autocomplete: "on",
|
|
4754
|
-
style: { ...
|
|
4755
|
-
}, a =
|
|
4731
|
+
style: { ...Ot }
|
|
4732
|
+
}, a = ye("text", {
|
|
4756
4733
|
...ae(i, { ...n })
|
|
4757
4734
|
}, s);
|
|
4758
4735
|
return this.textElements.push(a), a;
|
|
@@ -4781,7 +4758,7 @@ class ar {
|
|
|
4781
4758
|
return this.bt.tokenize({
|
|
4782
4759
|
type: "card",
|
|
4783
4760
|
data: s,
|
|
4784
|
-
...
|
|
4761
|
+
...ou
|
|
4785
4762
|
}).then((l) => Array.isArray(l) ? null : {
|
|
4786
4763
|
token_id: l.id,
|
|
4787
4764
|
additional_data: i
|
|
@@ -4849,7 +4826,7 @@ class ar {
|
|
|
4849
4826
|
throw this.disableFormElements(!1), s;
|
|
4850
4827
|
}
|
|
4851
4828
|
}
|
|
4852
|
-
}), ce.set(this,
|
|
4829
|
+
}), ce.set(this, Eu()), this.cvcOnlyEnabled = this.session.isNextAction("refresh_security_code");
|
|
4853
4830
|
}
|
|
4854
4831
|
async refreshSecurityCode() {
|
|
4855
4832
|
const t = this.getFormValue();
|
|
@@ -4909,8 +4886,8 @@ class ar {
|
|
|
4909
4886
|
});
|
|
4910
4887
|
}
|
|
4911
4888
|
async encryptCardData(t, r) {
|
|
4912
|
-
const n = await
|
|
4913
|
-
return { enc_payload: await new
|
|
4889
|
+
const n = await kc(r, "RSA-OAEP"), s = JSON.stringify(t), i = new TextEncoder().encode(s);
|
|
4890
|
+
return { enc_payload: await new iu(i).setProtectedHeader({ alg: "RSA-OAEP", enc: "A256GCM" }).encrypt(n) };
|
|
4914
4891
|
}
|
|
4915
4892
|
addElementStateListener(t) {
|
|
4916
4893
|
const r = this.cardElements[t];
|
|
@@ -4920,11 +4897,10 @@ class ar {
|
|
|
4920
4897
|
}
|
|
4921
4898
|
updateFormState() {
|
|
4922
4899
|
const t = this.cvcOnlyEnabled && this.cardElements.cardVerificationCode ? [this.cardElements.cardVerificationCode] : Object.values(this.cardElements);
|
|
4923
|
-
t.length ? this.state = t.reduce((r, { state: n }) => (r.valid = !!r.valid && !!n.valid, r.complete = !!r.complete && !!n.complete, r.empty = !!r.empty && !!n.empty, r.error = r.error || n.error, r), {
|
|
4900
|
+
t.length ? this.state = t.reduce((r, { state: n }) => (r.valid = !!r.valid && !!n.valid, r.complete = !!r.complete && !!n.complete, r.empty = !!r.empty && !!n.empty, r.error = r.error || n.error, r.errorCode = r.errorCode || n.errorCode, r), {
|
|
4924
4901
|
valid: !0,
|
|
4925
4902
|
complete: !0,
|
|
4926
|
-
empty: !0
|
|
4927
|
-
value: null
|
|
4903
|
+
empty: !0
|
|
4928
4904
|
}) : this.state = this.createFieldDefaultState(), this.stateChangeHandlers.forEach((r) => r(this.state));
|
|
4929
4905
|
}
|
|
4930
4906
|
createFieldDefaultState() {
|
|
@@ -4948,9 +4924,9 @@ function oe(e, t) {
|
|
|
4948
4924
|
}
|
|
4949
4925
|
function ie(e, t) {
|
|
4950
4926
|
const r = ce.get(e);
|
|
4951
|
-
return t instanceof
|
|
4927
|
+
return t instanceof Xn && r ? oe(e, t) ?? void 0 : t;
|
|
4952
4928
|
}
|
|
4953
|
-
class
|
|
4929
|
+
class yu {
|
|
4954
4930
|
constructor(t = "https://api.hellgate.io", r = new AbortController()) {
|
|
4955
4931
|
Object.defineProperty(this, "abortCtrl", {
|
|
4956
4932
|
enumerable: !0,
|
|
@@ -4967,7 +4943,7 @@ class _u {
|
|
|
4967
4943
|
getSession(t) {
|
|
4968
4944
|
return fetch(`${this.baseUrl}/sessions/${t}`, {
|
|
4969
4945
|
signal: this.abortCtrl.signal
|
|
4970
|
-
}).then((r) =>
|
|
4946
|
+
}).then((r) => Bt(r));
|
|
4971
4947
|
}
|
|
4972
4948
|
completeAction(t, r) {
|
|
4973
4949
|
return fetch(`${this.baseUrl}/sessions/${t}/complete-action`, {
|
|
@@ -4978,14 +4954,14 @@ class _u {
|
|
|
4978
4954
|
mode: "cors",
|
|
4979
4955
|
body: JSON.stringify(r),
|
|
4980
4956
|
signal: this.abortCtrl.signal
|
|
4981
|
-
}).then((n) =>
|
|
4957
|
+
}).then((n) => Bt(n));
|
|
4982
4958
|
}
|
|
4983
4959
|
cancelAll() {
|
|
4984
4960
|
this.abortCtrl.abort();
|
|
4985
4961
|
}
|
|
4986
4962
|
}
|
|
4987
|
-
const
|
|
4988
|
-
class
|
|
4963
|
+
const bu = 2e3;
|
|
4964
|
+
class _u {
|
|
4989
4965
|
constructor(t, r) {
|
|
4990
4966
|
Object.defineProperty(this, "id", {
|
|
4991
4967
|
enumerable: !0,
|
|
@@ -5051,9 +5027,9 @@ class wu {
|
|
|
5051
5027
|
const s = this.state;
|
|
5052
5028
|
return new Promise((i, a) => {
|
|
5053
5029
|
const o = this.onStateChange((d) => {
|
|
5054
|
-
d.next_action !== (s == null ? void 0 : s.next_action) && d.next_action === null && (i(d), o());
|
|
5030
|
+
d.next_action !== (s == null ? void 0 : s.next_action) && d.next_action === null && (i(Lr(d)), o());
|
|
5055
5031
|
});
|
|
5056
|
-
this.api.completeAction(this.id, n).then((d) => this.newStateHandle(d, a)).catch(async (d) => a(await
|
|
5032
|
+
this.api.completeAction(this.id, n).then((d) => this.newStateHandle(d, a)).catch(async (d) => a(await gu(d)));
|
|
5057
5033
|
});
|
|
5058
5034
|
}
|
|
5059
5035
|
}), Object.defineProperty(this, "completeSession", {
|
|
@@ -5089,20 +5065,24 @@ class wu {
|
|
|
5089
5065
|
case "wait": {
|
|
5090
5066
|
window.clearTimeout(this.pollingTimer), this.pollingTimer = window.setTimeout(() => this.updateSessionState(r).catch((s) => {
|
|
5091
5067
|
s instanceof Response && s.status === 404 && (r == null || r(new Error(`Session ${this.id} has expired`)));
|
|
5092
|
-
}),
|
|
5068
|
+
}), bu);
|
|
5093
5069
|
break;
|
|
5094
5070
|
}
|
|
5095
5071
|
}
|
|
5096
|
-
t.next_action !== ((n = this.state) == null ? void 0 : n.next_action) && this.stateChangeHandlers.forEach((s) => s(t)), t.next_action === null && this.completeSession(t), this.state = t;
|
|
5072
|
+
t.next_action !== ((n = this.state) == null ? void 0 : n.next_action) && this.stateChangeHandlers.forEach((s) => s(t)), t.next_action === null && this.completeSession(Lr(t)), this.state = t;
|
|
5097
5073
|
}
|
|
5098
5074
|
}
|
|
5099
|
-
async function
|
|
5075
|
+
async function gu(e) {
|
|
5100
5076
|
return !e.ok && e.status >= 400 && e.status <= 500 ? e.json() : e;
|
|
5101
5077
|
}
|
|
5102
|
-
|
|
5078
|
+
function Lr(e) {
|
|
5079
|
+
const t = { ...e };
|
|
5080
|
+
return delete t.next_action, t;
|
|
5081
|
+
}
|
|
5082
|
+
const wu = {
|
|
5103
5083
|
base_url: "https://api.hellgate.io"
|
|
5104
5084
|
};
|
|
5105
|
-
class
|
|
5085
|
+
class Zn {
|
|
5106
5086
|
constructor(t, r) {
|
|
5107
5087
|
Object.defineProperty(this, "session", {
|
|
5108
5088
|
enumerable: !0,
|
|
@@ -5128,25 +5108,25 @@ class Qn {
|
|
|
5128
5108
|
}
|
|
5129
5109
|
static async init(t, r = {}) {
|
|
5130
5110
|
const { session: n, cardHandler: s, handler3DS: i } = await this.initHandlers(t, r);
|
|
5131
|
-
return new
|
|
5111
|
+
return new Zn(n, {
|
|
5132
5112
|
CARD: s,
|
|
5133
5113
|
"3DS": i
|
|
5134
5114
|
});
|
|
5135
5115
|
}
|
|
5136
5116
|
static async initHandlers(t, r) {
|
|
5137
5117
|
const n = {
|
|
5138
|
-
...
|
|
5118
|
+
...wu,
|
|
5139
5119
|
...r
|
|
5140
|
-
}, s = new
|
|
5120
|
+
}, s = new yu(n.base_url, n.abortCtrl), i = new _u(t, s);
|
|
5141
5121
|
await i.init();
|
|
5142
5122
|
const a = i.isNextAction("tokenize_card") || i.isNextAction("refresh_security_code") ? await this.createCardHandler(i) : void 0, o = this.create3DSHandler(i, r);
|
|
5143
5123
|
return { session: i, cardHandler: a, handler3DS: o };
|
|
5144
5124
|
}
|
|
5145
5125
|
static createCardHandler(t) {
|
|
5146
|
-
return
|
|
5126
|
+
return ir.init(t);
|
|
5147
5127
|
}
|
|
5148
5128
|
static create3DSHandler(t, r) {
|
|
5149
|
-
return new
|
|
5129
|
+
return new es(t, {
|
|
5150
5130
|
domContainer: r.challenge_3ds_container,
|
|
5151
5131
|
labelText: r.challenge_3ds_label_text
|
|
5152
5132
|
});
|
|
@@ -5154,18 +5134,18 @@ class Qn {
|
|
|
5154
5134
|
}
|
|
5155
5135
|
globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
|
|
5156
5136
|
export {
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5137
|
+
pu as CardElement,
|
|
5138
|
+
du as CardExpirationDateElement,
|
|
5139
|
+
hu as CardNumberElement,
|
|
5140
|
+
mu as CardVerificationCodeElement,
|
|
5141
|
+
Zn as Hellgate,
|
|
5142
|
+
es as Hellgate3DSHandler,
|
|
5143
|
+
ir as HellgateCardHandler,
|
|
5144
|
+
Xn as TextElement,
|
|
5145
|
+
ye as createElement,
|
|
5146
|
+
Yn as extractCardNumberValue,
|
|
5147
|
+
Gn as extractExpiryDateValue,
|
|
5148
|
+
fu as putCardNumberValue,
|
|
5149
|
+
Jn as putExpiryDateValue,
|
|
5150
|
+
Eu as uid
|
|
5171
5151
|
};
|