@odynn/awayz-core 0.6.24 → 0.6.26
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/{AccountService-09PHtExa.js → AccountService-B9DbWoCe.js} +305 -301
- package/dist/{TripsService-CnFuoL9Z.js → TripsService-DJhDDtrv.js} +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +73 -69
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
- package/dist/hooks/useWallet/useWallet.js +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/keys-BcBfU51M.js +5 -0
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.types.d.ts +1 -0
- package/dist/lib/services/account/AccountService.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +10 -9
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +2 -2
- package/dist/services/instanceConfig.js +2 -2
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +1 -1
- package/dist/keys-D66VvSIm.js +0 -5
|
@@ -2,7 +2,7 @@ var lt = Object.defineProperty;
|
|
|
2
2
|
var ft = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var k = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { a as x } from "./keys-
|
|
5
|
+
import { a as x } from "./keys-BcBfU51M.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { awayzClient as $ } from "./configs/awayzClient.js";
|
|
8
8
|
import { EAuthEndpoints as b } from "./configs/endpoints.js";
|
|
@@ -21,37 +21,37 @@ function ht(e) {
|
|
|
21
21
|
const we = (e) => Array.isArray(e) ? e.map((t) => we(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
22
22
|
const s = ht(n);
|
|
23
23
|
return t[s] = we(e[n]), t;
|
|
24
|
-
}, {}) : e,
|
|
24
|
+
}, {}) : e, mt = (e) => (Object.keys(e).forEach(
|
|
25
25
|
(t) => !e[t] && delete e[t]
|
|
26
26
|
), e);
|
|
27
|
-
var j = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e))(j || {}),
|
|
27
|
+
var j = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e))(j || {}), Et = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(Et || {});
|
|
28
28
|
function He(e, t) {
|
|
29
29
|
return function() {
|
|
30
30
|
return e.apply(t, arguments);
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
const { toString:
|
|
34
|
-
const n =
|
|
33
|
+
const { toString: yt } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: te, toStringTag: Me } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
34
|
+
const n = yt.call(t);
|
|
35
35
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
36
36
|
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array, v = se("undefined");
|
|
37
|
-
function
|
|
37
|
+
function Rt(e) {
|
|
38
38
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
39
39
|
}
|
|
40
40
|
const je = U("ArrayBuffer");
|
|
41
|
-
function
|
|
41
|
+
function St(e) {
|
|
42
42
|
let t;
|
|
43
43
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const gt = se("string"), _ = se("function"), ze = se("number"), re = (e) => e !== null && typeof e == "object", wt = (e) => e === !0 || e === !1, X = (e) => {
|
|
46
46
|
if (ne(e) !== "object")
|
|
47
47
|
return !1;
|
|
48
48
|
const t = ye(e);
|
|
49
49
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Me in e) && !(te in e);
|
|
50
|
-
},
|
|
50
|
+
}, Tt = U("Date"), bt = U("File"), Ot = U("Blob"), At = U("FileList"), _t = (e) => re(e) && _(e.pipe), Nt = (e) => {
|
|
51
51
|
let t;
|
|
52
52
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
53
53
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
54
|
-
},
|
|
54
|
+
}, Ct = U("URLSearchParams"), [kt, Ut, It, xt] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
55
55
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
56
56
|
if (e === null || typeof e > "u")
|
|
57
57
|
return;
|
|
@@ -85,13 +85,13 @@ function fe() {
|
|
|
85
85
|
arguments[s] && V(arguments[s], n);
|
|
86
86
|
return t;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
88
|
+
const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
89
89
|
n && _(r) ? e[o] = He(r, n) : e[o] = r;
|
|
90
|
-
}, { allOwnKeys: s }), e),
|
|
90
|
+
}, { allOwnKeys: s }), e), Ft = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dt = (e, t, n, s) => {
|
|
91
91
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
92
92
|
value: t.prototype
|
|
93
93
|
}), n && Object.assign(e.prototype, n);
|
|
94
|
-
},
|
|
94
|
+
}, Bt = (e, t, n, s) => {
|
|
95
95
|
let r, o, i;
|
|
96
96
|
const c = {};
|
|
97
97
|
if (t = t || {}, e == null) return t;
|
|
@@ -101,11 +101,11 @@ const Pt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
101
101
|
e = n !== !1 && ye(e);
|
|
102
102
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
103
103
|
return t;
|
|
104
|
-
},
|
|
104
|
+
}, qt = (e, t, n) => {
|
|
105
105
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
106
106
|
const s = e.indexOf(t, n);
|
|
107
107
|
return s !== -1 && s === n;
|
|
108
|
-
},
|
|
108
|
+
}, Ht = (e) => {
|
|
109
109
|
if (!e) return null;
|
|
110
110
|
if (z(e)) return e;
|
|
111
111
|
let t = e.length;
|
|
@@ -114,31 +114,31 @@ const Pt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
114
114
|
for (; t-- > 0; )
|
|
115
115
|
n[t] = e[t];
|
|
116
116
|
return n;
|
|
117
|
-
},
|
|
117
|
+
}, Mt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), jt = (e, t) => {
|
|
118
118
|
const s = (e && e[te]).call(e);
|
|
119
119
|
let r;
|
|
120
120
|
for (; (r = s.next()) && !r.done; ) {
|
|
121
121
|
const o = r.value;
|
|
122
122
|
t.call(e, o[0], o[1]);
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, zt = (e, t) => {
|
|
125
125
|
let n;
|
|
126
126
|
const s = [];
|
|
127
127
|
for (; (n = e.exec(t)) !== null; )
|
|
128
128
|
s.push(n);
|
|
129
129
|
return s;
|
|
130
|
-
},
|
|
130
|
+
}, Kt = U("HTMLFormElement"), $t = (e) => e.toLowerCase().replace(
|
|
131
131
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
132
132
|
function(n, s, r) {
|
|
133
133
|
return s.toUpperCase() + r;
|
|
134
134
|
}
|
|
135
|
-
), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
135
|
+
), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Gt = U("RegExp"), Ge = (e, t) => {
|
|
136
136
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
137
137
|
V(n, (r, o) => {
|
|
138
138
|
let i;
|
|
139
139
|
(i = t(r, o, e)) !== !1 && (s[o] = i || r);
|
|
140
140
|
}), Object.defineProperties(e, s);
|
|
141
|
-
},
|
|
141
|
+
}, vt = (e) => {
|
|
142
142
|
Ge(e, (t, n) => {
|
|
143
143
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
144
144
|
return !1;
|
|
@@ -153,19 +153,19 @@ const Pt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
},
|
|
156
|
+
}, Vt = (e, t) => {
|
|
157
157
|
const n = {}, s = (r) => {
|
|
158
158
|
r.forEach((o) => {
|
|
159
159
|
n[o] = !0;
|
|
160
160
|
});
|
|
161
161
|
};
|
|
162
162
|
return z(e) ? s(e) : s(String(e).split(t)), n;
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
function
|
|
163
|
+
}, Jt = () => {
|
|
164
|
+
}, Wt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
165
|
+
function Xt(e) {
|
|
166
166
|
return !!(e && _(e.append) && e[Me] === "FormData" && e[te]);
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const Yt = (e) => {
|
|
169
169
|
const t = new Array(10), n = (s, r) => {
|
|
170
170
|
if (re(s)) {
|
|
171
171
|
if (t.indexOf(s) >= 0)
|
|
@@ -182,71 +182,71 @@ const Xt = (e) => {
|
|
|
182
182
|
return s;
|
|
183
183
|
};
|
|
184
184
|
return n(e, 0);
|
|
185
|
-
},
|
|
185
|
+
}, Zt = U("AsyncFunction"), Qt = (e) => e && (re(e) || _(e)) && _(e.then) && _(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, s) => (q.addEventListener("message", ({ source: r, data: o }) => {
|
|
186
186
|
r === q && o === n && s.length && s.shift()();
|
|
187
187
|
}, !1), (r) => {
|
|
188
188
|
s.push(r), q.postMessage(n, "*");
|
|
189
189
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
190
190
|
typeof setImmediate == "function",
|
|
191
191
|
_(q.postMessage)
|
|
192
|
-
),
|
|
192
|
+
), en = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ve, tn = (e) => e != null && _(e[te]), a = {
|
|
193
193
|
isArray: z,
|
|
194
194
|
isArrayBuffer: je,
|
|
195
|
-
isBuffer:
|
|
196
|
-
isFormData:
|
|
197
|
-
isArrayBufferView:
|
|
198
|
-
isString:
|
|
195
|
+
isBuffer: Rt,
|
|
196
|
+
isFormData: Nt,
|
|
197
|
+
isArrayBufferView: St,
|
|
198
|
+
isString: gt,
|
|
199
199
|
isNumber: ze,
|
|
200
|
-
isBoolean:
|
|
200
|
+
isBoolean: wt,
|
|
201
201
|
isObject: re,
|
|
202
202
|
isPlainObject: X,
|
|
203
|
-
isReadableStream:
|
|
204
|
-
isRequest:
|
|
205
|
-
isResponse:
|
|
206
|
-
isHeaders:
|
|
203
|
+
isReadableStream: kt,
|
|
204
|
+
isRequest: Ut,
|
|
205
|
+
isResponse: It,
|
|
206
|
+
isHeaders: xt,
|
|
207
207
|
isUndefined: v,
|
|
208
|
-
isDate:
|
|
209
|
-
isFile:
|
|
210
|
-
isBlob:
|
|
211
|
-
isRegExp:
|
|
208
|
+
isDate: Tt,
|
|
209
|
+
isFile: bt,
|
|
210
|
+
isBlob: Ot,
|
|
211
|
+
isRegExp: Gt,
|
|
212
212
|
isFunction: _,
|
|
213
|
-
isStream:
|
|
214
|
-
isURLSearchParams:
|
|
215
|
-
isTypedArray:
|
|
216
|
-
isFileList:
|
|
213
|
+
isStream: _t,
|
|
214
|
+
isURLSearchParams: Ct,
|
|
215
|
+
isTypedArray: Mt,
|
|
216
|
+
isFileList: At,
|
|
217
217
|
forEach: V,
|
|
218
218
|
merge: fe,
|
|
219
|
-
extend:
|
|
220
|
-
trim:
|
|
221
|
-
stripBOM:
|
|
222
|
-
inherits:
|
|
223
|
-
toFlatObject:
|
|
219
|
+
extend: Lt,
|
|
220
|
+
trim: Pt,
|
|
221
|
+
stripBOM: Ft,
|
|
222
|
+
inherits: Dt,
|
|
223
|
+
toFlatObject: Bt,
|
|
224
224
|
kindOf: ne,
|
|
225
225
|
kindOfTest: U,
|
|
226
|
-
endsWith:
|
|
227
|
-
toArray:
|
|
228
|
-
forEachEntry:
|
|
229
|
-
matchAll:
|
|
230
|
-
isHTMLForm:
|
|
226
|
+
endsWith: qt,
|
|
227
|
+
toArray: Ht,
|
|
228
|
+
forEachEntry: jt,
|
|
229
|
+
matchAll: zt,
|
|
230
|
+
isHTMLForm: Kt,
|
|
231
231
|
hasOwnProperty: Te,
|
|
232
232
|
hasOwnProp: Te,
|
|
233
233
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
234
|
reduceDescriptors: Ge,
|
|
235
|
-
freezeMethods:
|
|
236
|
-
toObjectSet:
|
|
237
|
-
toCamelCase:
|
|
238
|
-
noop:
|
|
239
|
-
toFiniteNumber:
|
|
235
|
+
freezeMethods: vt,
|
|
236
|
+
toObjectSet: Vt,
|
|
237
|
+
toCamelCase: $t,
|
|
238
|
+
noop: Jt,
|
|
239
|
+
toFiniteNumber: Wt,
|
|
240
240
|
findKey: Ke,
|
|
241
241
|
global: q,
|
|
242
242
|
isContextDefined: $e,
|
|
243
|
-
isSpecCompliantForm:
|
|
244
|
-
toJSONObject:
|
|
245
|
-
isAsyncFn:
|
|
246
|
-
isThenable:
|
|
243
|
+
isSpecCompliantForm: Xt,
|
|
244
|
+
toJSONObject: Yt,
|
|
245
|
+
isAsyncFn: Zt,
|
|
246
|
+
isThenable: Qt,
|
|
247
247
|
setImmediate: ve,
|
|
248
|
-
asap:
|
|
249
|
-
isIterable:
|
|
248
|
+
asap: en,
|
|
249
|
+
isIterable: tn
|
|
250
250
|
};
|
|
251
251
|
function E(e, t, n, s, r) {
|
|
252
252
|
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), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
|
|
@@ -298,7 +298,7 @@ E.from = (e, t, n, s, r, o) => {
|
|
|
298
298
|
return f !== Error.prototype;
|
|
299
299
|
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
300
300
|
};
|
|
301
|
-
const
|
|
301
|
+
const nn = null;
|
|
302
302
|
function de(e) {
|
|
303
303
|
return a.isPlainObject(e) || a.isArray(e);
|
|
304
304
|
}
|
|
@@ -310,10 +310,10 @@ function be(e, t, n) {
|
|
|
310
310
|
return r = We(r), !n && o ? "[" + r + "]" : r;
|
|
311
311
|
}).join(n ? "." : "") : t;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function sn(e) {
|
|
314
314
|
return a.isArray(e) && !e.some(de);
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const rn = a.toFlatObject(a, {}, null, function(t) {
|
|
317
317
|
return /^is[A-Z]/.test(t);
|
|
318
318
|
});
|
|
319
319
|
function oe(e, t, n) {
|
|
@@ -326,10 +326,10 @@ function oe(e, t, n) {
|
|
|
326
326
|
}, !1, function(m, p) {
|
|
327
327
|
return !a.isUndefined(p[m]);
|
|
328
328
|
});
|
|
329
|
-
const s = n.metaTokens, r = n.visitor ||
|
|
329
|
+
const s = n.metaTokens, r = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
330
330
|
if (!a.isFunction(r))
|
|
331
331
|
throw new TypeError("visitor must be a function");
|
|
332
|
-
function
|
|
332
|
+
function u(h) {
|
|
333
333
|
if (h === null) return "";
|
|
334
334
|
if (a.isDate(h))
|
|
335
335
|
return h.toISOString();
|
|
@@ -337,25 +337,25 @@ function oe(e, t, n) {
|
|
|
337
337
|
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
338
338
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function l(h, m, p) {
|
|
341
341
|
let S = h;
|
|
342
342
|
if (h && !p && typeof h == "object") {
|
|
343
343
|
if (a.endsWith(m, "{}"))
|
|
344
344
|
m = s ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
345
|
-
else if (a.isArray(h) &&
|
|
345
|
+
else if (a.isArray(h) && sn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (S = a.toArray(h)))
|
|
346
346
|
return m = We(m), S.forEach(function(T, P) {
|
|
347
347
|
!(a.isUndefined(T) || T === null) && t.append(
|
|
348
348
|
// eslint-disable-next-line no-nested-ternary
|
|
349
349
|
i === !0 ? be([m], P, o) : i === null ? m : m + "[]",
|
|
350
|
-
|
|
350
|
+
u(T)
|
|
351
351
|
);
|
|
352
352
|
}), !1;
|
|
353
353
|
}
|
|
354
|
-
return de(h) ? !0 : (t.append(be(p, m, o),
|
|
354
|
+
return de(h) ? !0 : (t.append(be(p, m, o), u(h)), !1);
|
|
355
355
|
}
|
|
356
|
-
const d = [], y = Object.assign(
|
|
357
|
-
defaultVisitor:
|
|
358
|
-
convertValue:
|
|
356
|
+
const d = [], y = Object.assign(rn, {
|
|
357
|
+
defaultVisitor: l,
|
|
358
|
+
convertValue: u,
|
|
359
359
|
isVisitable: de
|
|
360
360
|
});
|
|
361
361
|
function R(h, m) {
|
|
@@ -406,13 +406,13 @@ Xe.toString = function(t) {
|
|
|
406
406
|
return n(r[0]) + "=" + n(r[1]);
|
|
407
407
|
}, "").join("&");
|
|
408
408
|
};
|
|
409
|
-
function
|
|
409
|
+
function on(e) {
|
|
410
410
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
411
411
|
}
|
|
412
412
|
function Ye(e, t, n) {
|
|
413
413
|
if (!t)
|
|
414
414
|
return e;
|
|
415
|
-
const s = n && n.encode ||
|
|
415
|
+
const s = n && n.encode || on;
|
|
416
416
|
a.isFunction(n) && (n = {
|
|
417
417
|
serialize: n
|
|
418
418
|
});
|
|
@@ -482,37 +482,37 @@ const Ze = {
|
|
|
482
482
|
silentJSONParsing: !0,
|
|
483
483
|
forcedJSONParsing: !0,
|
|
484
484
|
clarifyTimeoutError: !1
|
|
485
|
-
},
|
|
485
|
+
}, an = typeof URLSearchParams < "u" ? URLSearchParams : Re, cn = typeof FormData < "u" ? FormData : null, un = typeof Blob < "u" ? Blob : null, ln = {
|
|
486
486
|
isBrowser: !0,
|
|
487
487
|
classes: {
|
|
488
|
-
URLSearchParams:
|
|
489
|
-
FormData:
|
|
490
|
-
Blob:
|
|
488
|
+
URLSearchParams: an,
|
|
489
|
+
FormData: cn,
|
|
490
|
+
Blob: un
|
|
491
491
|
},
|
|
492
492
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
493
|
-
}, Se = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0,
|
|
494
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
493
|
+
}, Se = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, fn = Se && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
494
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn = Se && window.location.href || "http://localhost", hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
495
495
|
__proto__: null,
|
|
496
496
|
hasBrowserEnv: Se,
|
|
497
|
-
hasStandardBrowserEnv:
|
|
498
|
-
hasStandardBrowserWebWorkerEnv:
|
|
497
|
+
hasStandardBrowserEnv: fn,
|
|
498
|
+
hasStandardBrowserWebWorkerEnv: dn,
|
|
499
499
|
navigator: pe,
|
|
500
|
-
origin:
|
|
500
|
+
origin: pn
|
|
501
501
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
502
|
-
...
|
|
503
|
-
...
|
|
502
|
+
...hn,
|
|
503
|
+
...ln
|
|
504
504
|
};
|
|
505
|
-
function
|
|
505
|
+
function mn(e, t) {
|
|
506
506
|
return oe(e, new O.classes.URLSearchParams(), Object.assign({
|
|
507
507
|
visitor: function(n, s, r, o) {
|
|
508
508
|
return O.isNode && a.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
509
509
|
}
|
|
510
510
|
}, t));
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function En(e) {
|
|
513
513
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function yn(e) {
|
|
516
516
|
const t = {}, n = Object.keys(e);
|
|
517
517
|
let s;
|
|
518
518
|
const r = n.length;
|
|
@@ -526,17 +526,17 @@ function Qe(e) {
|
|
|
526
526
|
let i = n[o++];
|
|
527
527
|
if (i === "__proto__") return !0;
|
|
528
528
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
529
|
-
return i = !i && a.isArray(r) ? r.length : i, f ? (a.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !c) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && a.isArray(r[i]) && (r[i] =
|
|
529
|
+
return i = !i && a.isArray(r) ? r.length : i, f ? (a.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !c) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && a.isArray(r[i]) && (r[i] = yn(r[i])), !c);
|
|
530
530
|
}
|
|
531
531
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
532
532
|
const n = {};
|
|
533
533
|
return a.forEachEntry(e, (s, r) => {
|
|
534
|
-
t(
|
|
534
|
+
t(En(s), r, n, 0);
|
|
535
535
|
}), n;
|
|
536
536
|
}
|
|
537
537
|
return null;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Rn(e, t, n) {
|
|
540
540
|
if (a.isString(e))
|
|
541
541
|
try {
|
|
542
542
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -562,7 +562,7 @@ const J = {
|
|
|
562
562
|
let c;
|
|
563
563
|
if (o) {
|
|
564
564
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
565
|
-
return
|
|
565
|
+
return mn(t, this.formSerializer).toString();
|
|
566
566
|
if ((c = a.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
567
567
|
const f = this.env && this.env.FormData;
|
|
568
568
|
return oe(
|
|
@@ -572,7 +572,7 @@ const J = {
|
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
return o || r ? (n.setContentType("application/json", !1),
|
|
575
|
+
return o || r ? (n.setContentType("application/json", !1), Rn(t)) : t;
|
|
576
576
|
}],
|
|
577
577
|
transformResponse: [function(t) {
|
|
578
578
|
const n = this.transitional || J.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
@@ -615,7 +615,7 @@ const J = {
|
|
|
615
615
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
616
616
|
J.headers[e] = {};
|
|
617
617
|
});
|
|
618
|
-
const
|
|
618
|
+
const Sn = a.toObjectSet([
|
|
619
619
|
"age",
|
|
620
620
|
"authorization",
|
|
621
621
|
"content-length",
|
|
@@ -633,12 +633,12 @@ const Rn = a.toObjectSet([
|
|
|
633
633
|
"referer",
|
|
634
634
|
"retry-after",
|
|
635
635
|
"user-agent"
|
|
636
|
-
]),
|
|
636
|
+
]), gn = (e) => {
|
|
637
637
|
const t = {};
|
|
638
638
|
let n, s, r;
|
|
639
639
|
return e && e.split(`
|
|
640
640
|
`).forEach(function(i) {
|
|
641
|
-
r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] &&
|
|
641
|
+
r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] && Sn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
642
642
|
}), t;
|
|
643
643
|
}, _e = Symbol("internals");
|
|
644
644
|
function G(e) {
|
|
@@ -647,14 +647,14 @@ function G(e) {
|
|
|
647
647
|
function Y(e) {
|
|
648
648
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function wn(e) {
|
|
651
651
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
652
652
|
let s;
|
|
653
653
|
for (; s = n.exec(e); )
|
|
654
654
|
t[s[1]] = s[2];
|
|
655
655
|
return t;
|
|
656
656
|
}
|
|
657
|
-
const
|
|
657
|
+
const Tn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
658
658
|
function ce(e, t, n, s, r) {
|
|
659
659
|
if (a.isFunction(s))
|
|
660
660
|
return s.call(this, t, n);
|
|
@@ -665,10 +665,10 @@ function ce(e, t, n, s, r) {
|
|
|
665
665
|
return s.test(t);
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function bn(e) {
|
|
669
669
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function On(e, t) {
|
|
672
672
|
const n = a.toCamelCase(" " + t);
|
|
673
673
|
["get", "set", "has"].forEach((s) => {
|
|
674
674
|
Object.defineProperty(e, s + n, {
|
|
@@ -685,24 +685,24 @@ let N = class {
|
|
|
685
685
|
}
|
|
686
686
|
set(t, n, s) {
|
|
687
687
|
const r = this;
|
|
688
|
-
function o(c, f,
|
|
689
|
-
const
|
|
690
|
-
if (!
|
|
688
|
+
function o(c, f, u) {
|
|
689
|
+
const l = G(f);
|
|
690
|
+
if (!l)
|
|
691
691
|
throw new Error("header name must be a non-empty string");
|
|
692
|
-
const d = a.findKey(r,
|
|
693
|
-
(!d || r[d] === void 0 ||
|
|
692
|
+
const d = a.findKey(r, l);
|
|
693
|
+
(!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || f] = Y(c));
|
|
694
694
|
}
|
|
695
|
-
const i = (c, f) => a.forEach(c, (
|
|
695
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
696
696
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
697
697
|
i(t, n);
|
|
698
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
699
|
-
i(
|
|
698
|
+
else if (a.isString(t) && (t = t.trim()) && !Tn(t))
|
|
699
|
+
i(gn(t), n);
|
|
700
700
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
701
|
-
let c = {}, f,
|
|
702
|
-
for (const
|
|
703
|
-
if (!a.isArray(
|
|
701
|
+
let c = {}, f, u;
|
|
702
|
+
for (const l of t) {
|
|
703
|
+
if (!a.isArray(l))
|
|
704
704
|
throw TypeError("Object iterator must return a key-value pair");
|
|
705
|
-
c[
|
|
705
|
+
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
706
706
|
}
|
|
707
707
|
i(c, n);
|
|
708
708
|
} else
|
|
@@ -717,7 +717,7 @@ let N = class {
|
|
|
717
717
|
if (!n)
|
|
718
718
|
return r;
|
|
719
719
|
if (n === !0)
|
|
720
|
-
return
|
|
720
|
+
return wn(r);
|
|
721
721
|
if (a.isFunction(n))
|
|
722
722
|
return n.call(this, r, s);
|
|
723
723
|
if (a.isRegExp(n))
|
|
@@ -761,7 +761,7 @@ let N = class {
|
|
|
761
761
|
n[i] = Y(r), delete n[o];
|
|
762
762
|
return;
|
|
763
763
|
}
|
|
764
|
-
const c = t ?
|
|
764
|
+
const c = t ? bn(o) : String(o).trim();
|
|
765
765
|
c !== o && delete n[o], n[c] = Y(r), s[c] = !0;
|
|
766
766
|
}), this;
|
|
767
767
|
}
|
|
@@ -800,7 +800,7 @@ let N = class {
|
|
|
800
800
|
}).accessors, r = this.prototype;
|
|
801
801
|
function o(i) {
|
|
802
802
|
const c = G(i);
|
|
803
|
-
s[c] || (
|
|
803
|
+
s[c] || (On(r, i), s[c] = !0);
|
|
804
804
|
}
|
|
805
805
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
806
806
|
}
|
|
@@ -842,51 +842,51 @@ function tt(e, t, n) {
|
|
|
842
842
|
n
|
|
843
843
|
));
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function An(e) {
|
|
846
846
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
847
847
|
return t && t[1] || "";
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function _n(e, t) {
|
|
850
850
|
e = e || 10;
|
|
851
851
|
const n = new Array(e), s = new Array(e);
|
|
852
852
|
let r = 0, o = 0, i;
|
|
853
853
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
854
|
-
const
|
|
855
|
-
i || (i =
|
|
854
|
+
const u = Date.now(), l = s[o];
|
|
855
|
+
i || (i = u), n[r] = f, s[r] = u;
|
|
856
856
|
let d = o, y = 0;
|
|
857
857
|
for (; d !== r; )
|
|
858
858
|
y += n[d++], d = d % e;
|
|
859
|
-
if (r = (r + 1) % e, r === o && (o = (o + 1) % e),
|
|
859
|
+
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - i < t)
|
|
860
860
|
return;
|
|
861
|
-
const R =
|
|
861
|
+
const R = l && u - l;
|
|
862
862
|
return R ? Math.round(y * 1e3 / R) : void 0;
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Nn(e, t) {
|
|
866
866
|
let n = 0, s = 1e3 / t, r, o;
|
|
867
|
-
const i = (
|
|
868
|
-
n =
|
|
867
|
+
const i = (u, l = Date.now()) => {
|
|
868
|
+
n = l, r = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
869
869
|
};
|
|
870
|
-
return [(...
|
|
871
|
-
const
|
|
872
|
-
d >= s ? i(
|
|
870
|
+
return [(...u) => {
|
|
871
|
+
const l = Date.now(), d = l - n;
|
|
872
|
+
d >= s ? i(u, l) : (r = u, o || (o = setTimeout(() => {
|
|
873
873
|
o = null, i(r);
|
|
874
874
|
}, s - d)));
|
|
875
875
|
}, () => r && i(r)];
|
|
876
876
|
}
|
|
877
877
|
const Q = (e, t, n = 3) => {
|
|
878
878
|
let s = 0;
|
|
879
|
-
const r =
|
|
880
|
-
return
|
|
881
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - s,
|
|
879
|
+
const r = _n(50, 250);
|
|
880
|
+
return Nn((o) => {
|
|
881
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - s, u = r(f), l = i <= c;
|
|
882
882
|
s = i;
|
|
883
883
|
const d = {
|
|
884
884
|
loaded: i,
|
|
885
885
|
total: c,
|
|
886
886
|
progress: c ? i / c : void 0,
|
|
887
887
|
bytes: f,
|
|
888
|
-
rate:
|
|
889
|
-
estimated:
|
|
888
|
+
rate: u || void 0,
|
|
889
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
890
890
|
event: o,
|
|
891
891
|
lengthComputable: c != null,
|
|
892
892
|
[t ? "download" : "upload"]: !0
|
|
@@ -900,10 +900,10 @@ const Q = (e, t, n = 3) => {
|
|
|
900
900
|
total: e,
|
|
901
901
|
loaded: s
|
|
902
902
|
}), t[1]];
|
|
903
|
-
}, Ce = (e) => (...t) => a.asap(() => e(...t)),
|
|
903
|
+
}, Ce = (e) => (...t) => a.asap(() => e(...t)), Cn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
904
904
|
new URL(O.origin),
|
|
905
905
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
906
|
-
) : () => !0,
|
|
906
|
+
) : () => !0, kn = O.hasStandardBrowserEnv ? (
|
|
907
907
|
// Standard browser envs support document.cookie
|
|
908
908
|
{
|
|
909
909
|
write(e, t, n, s, r, o) {
|
|
@@ -930,44 +930,44 @@ const Q = (e, t, n = 3) => {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
function
|
|
933
|
+
function Un(e) {
|
|
934
934
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function In(e, t) {
|
|
937
937
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
938
|
}
|
|
939
939
|
function nt(e, t, n) {
|
|
940
|
-
let s = !
|
|
941
|
-
return e && (s || n == !1) ?
|
|
940
|
+
let s = !Un(t);
|
|
941
|
+
return e && (s || n == !1) ? In(e, t) : t;
|
|
942
942
|
}
|
|
943
943
|
const ke = (e) => e instanceof N ? { ...e } : e;
|
|
944
944
|
function M(e, t) {
|
|
945
945
|
t = t || {};
|
|
946
946
|
const n = {};
|
|
947
|
-
function s(
|
|
948
|
-
return a.isPlainObject(
|
|
947
|
+
function s(u, l, d, y) {
|
|
948
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: y }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
949
949
|
}
|
|
950
|
-
function r(
|
|
951
|
-
if (a.isUndefined(
|
|
952
|
-
if (!a.isUndefined(
|
|
953
|
-
return s(void 0,
|
|
954
|
-
} else return s(
|
|
950
|
+
function r(u, l, d, y) {
|
|
951
|
+
if (a.isUndefined(l)) {
|
|
952
|
+
if (!a.isUndefined(u))
|
|
953
|
+
return s(void 0, u, d, y);
|
|
954
|
+
} else return s(u, l, d, y);
|
|
955
955
|
}
|
|
956
|
-
function o(
|
|
957
|
-
if (!a.isUndefined(
|
|
958
|
-
return s(void 0,
|
|
956
|
+
function o(u, l) {
|
|
957
|
+
if (!a.isUndefined(l))
|
|
958
|
+
return s(void 0, l);
|
|
959
959
|
}
|
|
960
|
-
function i(
|
|
961
|
-
if (a.isUndefined(
|
|
962
|
-
if (!a.isUndefined(
|
|
963
|
-
return s(void 0,
|
|
964
|
-
} else return s(void 0,
|
|
960
|
+
function i(u, l) {
|
|
961
|
+
if (a.isUndefined(l)) {
|
|
962
|
+
if (!a.isUndefined(u))
|
|
963
|
+
return s(void 0, u);
|
|
964
|
+
} else return s(void 0, l);
|
|
965
965
|
}
|
|
966
|
-
function c(
|
|
966
|
+
function c(u, l, d) {
|
|
967
967
|
if (d in t)
|
|
968
|
-
return s(
|
|
968
|
+
return s(u, l);
|
|
969
969
|
if (d in e)
|
|
970
|
-
return s(void 0,
|
|
970
|
+
return s(void 0, u);
|
|
971
971
|
}
|
|
972
972
|
const f = {
|
|
973
973
|
url: o,
|
|
@@ -998,11 +998,11 @@ function M(e, t) {
|
|
|
998
998
|
socketPath: i,
|
|
999
999
|
responseEncoding: i,
|
|
1000
1000
|
validateStatus: c,
|
|
1001
|
-
headers: (
|
|
1001
|
+
headers: (u, l, d) => r(ke(u), ke(l), d, !0)
|
|
1002
1002
|
};
|
|
1003
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1004
|
-
const d = f[
|
|
1005
|
-
a.isUndefined(y) && d !== c || (n[
|
|
1003
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1004
|
+
const d = f[l] || r, y = d(e[l], t[l], l);
|
|
1005
|
+
a.isUndefined(y) && d !== c || (n[l] = y);
|
|
1006
1006
|
}), n;
|
|
1007
1007
|
}
|
|
1008
1008
|
const st = (e) => {
|
|
@@ -1017,23 +1017,23 @@ const st = (e) => {
|
|
|
1017
1017
|
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
1018
1018
|
i.setContentType(void 0);
|
|
1019
1019
|
else if ((f = i.getContentType()) !== !1) {
|
|
1020
|
-
const [
|
|
1021
|
-
i.setContentType([
|
|
1020
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1021
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
if (O.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 &&
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1024
|
+
if (O.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 && Cn(t.url))) {
|
|
1025
|
+
const u = r && o && kn.read(o);
|
|
1026
|
+
u && i.set(r, u);
|
|
1027
1027
|
}
|
|
1028
1028
|
return t;
|
|
1029
|
-
},
|
|
1029
|
+
}, xn = typeof XMLHttpRequest < "u", Pn = xn && function(e) {
|
|
1030
1030
|
return new Promise(function(n, s) {
|
|
1031
1031
|
const r = st(e);
|
|
1032
1032
|
let o = r.data;
|
|
1033
1033
|
const i = N.from(r.headers).normalize();
|
|
1034
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress:
|
|
1034
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = r, l, d, y, R, h;
|
|
1035
1035
|
function m() {
|
|
1036
|
-
R && R(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(
|
|
1036
|
+
R && R(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1037
1037
|
}
|
|
1038
1038
|
let p = new XMLHttpRequest();
|
|
1039
1039
|
p.open(r.method.toUpperCase(), r.url, !0), p.timeout = r.timeout;
|
|
@@ -1073,40 +1073,40 @@ const st = (e) => {
|
|
|
1073
1073
|
)), p = null;
|
|
1074
1074
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(P, A) {
|
|
1075
1075
|
p.setRequestHeader(A, P);
|
|
1076
|
-
}), a.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType),
|
|
1076
|
+
}), a.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([y, h] = Q(u, !0), p.addEventListener("progress", y)), f && p.upload && ([d, R] = Q(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", R)), (r.cancelToken || r.signal) && (l = (T) => {
|
|
1077
1077
|
p && (s(!T || T.type ? new K(null, e, p) : T), p.abort(), p = null);
|
|
1078
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
1079
|
-
const w =
|
|
1078
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1079
|
+
const w = An(r.url);
|
|
1080
1080
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
1081
1081
|
s(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
p.send(o || null);
|
|
1085
1085
|
});
|
|
1086
|
-
},
|
|
1086
|
+
}, Ln = (e, t) => {
|
|
1087
1087
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1088
1088
|
if (t || n) {
|
|
1089
1089
|
let s = new AbortController(), r;
|
|
1090
|
-
const o = function(
|
|
1090
|
+
const o = function(u) {
|
|
1091
1091
|
if (!r) {
|
|
1092
1092
|
r = !0, c();
|
|
1093
|
-
const
|
|
1094
|
-
s.abort(
|
|
1093
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1094
|
+
s.abort(l instanceof E ? l : new K(l instanceof Error ? l.message : l));
|
|
1095
1095
|
}
|
|
1096
1096
|
};
|
|
1097
1097
|
let i = t && setTimeout(() => {
|
|
1098
1098
|
i = null, o(new E(`timeout ${t} of ms exceeded`, E.ETIMEDOUT));
|
|
1099
1099
|
}, t);
|
|
1100
1100
|
const c = () => {
|
|
1101
|
-
e && (i && clearTimeout(i), i = null, e.forEach((
|
|
1102
|
-
|
|
1101
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1102
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1103
1103
|
}), e = null);
|
|
1104
1104
|
};
|
|
1105
|
-
e.forEach((
|
|
1105
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1106
1106
|
const { signal: f } = s;
|
|
1107
1107
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1108
1108
|
}
|
|
1109
|
-
},
|
|
1109
|
+
}, Fn = function* (e, t) {
|
|
1110
1110
|
let n = e.byteLength;
|
|
1111
1111
|
if (n < t) {
|
|
1112
1112
|
yield e;
|
|
@@ -1115,10 +1115,10 @@ const st = (e) => {
|
|
|
1115
1115
|
let s = 0, r;
|
|
1116
1116
|
for (; s < n; )
|
|
1117
1117
|
r = s + t, yield e.slice(s, r), s = r;
|
|
1118
|
-
},
|
|
1119
|
-
for await (const n of
|
|
1120
|
-
yield*
|
|
1121
|
-
},
|
|
1118
|
+
}, Dn = async function* (e, t) {
|
|
1119
|
+
for await (const n of Bn(e))
|
|
1120
|
+
yield* Fn(n, t);
|
|
1121
|
+
}, Bn = async function* (e) {
|
|
1122
1122
|
if (e[Symbol.asyncIterator]) {
|
|
1123
1123
|
yield* e;
|
|
1124
1124
|
return;
|
|
@@ -1135,26 +1135,26 @@ const st = (e) => {
|
|
|
1135
1135
|
await t.cancel();
|
|
1136
1136
|
}
|
|
1137
1137
|
}, Ue = (e, t, n, s) => {
|
|
1138
|
-
const r =
|
|
1138
|
+
const r = Dn(e, t);
|
|
1139
1139
|
let o = 0, i, c = (f) => {
|
|
1140
1140
|
i || (i = !0, s && s(f));
|
|
1141
1141
|
};
|
|
1142
1142
|
return new ReadableStream({
|
|
1143
1143
|
async pull(f) {
|
|
1144
1144
|
try {
|
|
1145
|
-
const { done:
|
|
1146
|
-
if (
|
|
1145
|
+
const { done: u, value: l } = await r.next();
|
|
1146
|
+
if (u) {
|
|
1147
1147
|
c(), f.close();
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
|
-
let d =
|
|
1150
|
+
let d = l.byteLength;
|
|
1151
1151
|
if (n) {
|
|
1152
1152
|
let y = o += d;
|
|
1153
1153
|
n(y);
|
|
1154
1154
|
}
|
|
1155
|
-
f.enqueue(new Uint8Array(
|
|
1156
|
-
} catch (
|
|
1157
|
-
throw c(
|
|
1155
|
+
f.enqueue(new Uint8Array(l));
|
|
1156
|
+
} catch (u) {
|
|
1157
|
+
throw c(u), u;
|
|
1158
1158
|
}
|
|
1159
1159
|
},
|
|
1160
1160
|
cancel(f) {
|
|
@@ -1163,13 +1163,13 @@ const st = (e) => {
|
|
|
1163
1163
|
}, {
|
|
1164
1164
|
highWaterMark: 2
|
|
1165
1165
|
});
|
|
1166
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rt = ie && typeof ReadableStream == "function",
|
|
1166
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rt = ie && typeof ReadableStream == "function", qn = ie && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ot = (e, ...t) => {
|
|
1167
1167
|
try {
|
|
1168
1168
|
return !!e(...t);
|
|
1169
1169
|
} catch {
|
|
1170
1170
|
return !1;
|
|
1171
1171
|
}
|
|
1172
|
-
},
|
|
1172
|
+
}, Hn = rt && ot(() => {
|
|
1173
1173
|
let e = !1;
|
|
1174
1174
|
const t = new Request(O.origin, {
|
|
1175
1175
|
body: new ReadableStream(),
|
|
@@ -1189,7 +1189,7 @@ ie && ((e) => {
|
|
|
1189
1189
|
});
|
|
1190
1190
|
});
|
|
1191
1191
|
})(new Response());
|
|
1192
|
-
const
|
|
1192
|
+
const Mn = async (e) => {
|
|
1193
1193
|
if (e == null)
|
|
1194
1194
|
return 0;
|
|
1195
1195
|
if (a.isBlob(e))
|
|
@@ -1202,11 +1202,11 @@ const Hn = async (e) => {
|
|
|
1202
1202
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1203
1203
|
return e.byteLength;
|
|
1204
1204
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1205
|
-
return (await
|
|
1206
|
-
},
|
|
1205
|
+
return (await qn(e)).byteLength;
|
|
1206
|
+
}, jn = async (e, t) => {
|
|
1207
1207
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1208
|
-
return n ??
|
|
1209
|
-
},
|
|
1208
|
+
return n ?? Mn(t);
|
|
1209
|
+
}, zn = ie && (async (e) => {
|
|
1210
1210
|
let {
|
|
1211
1211
|
url: t,
|
|
1212
1212
|
method: n,
|
|
@@ -1216,25 +1216,25 @@ const Hn = async (e) => {
|
|
|
1216
1216
|
timeout: i,
|
|
1217
1217
|
onDownloadProgress: c,
|
|
1218
1218
|
onUploadProgress: f,
|
|
1219
|
-
responseType:
|
|
1220
|
-
headers:
|
|
1219
|
+
responseType: u,
|
|
1220
|
+
headers: l,
|
|
1221
1221
|
withCredentials: d = "same-origin",
|
|
1222
1222
|
fetchOptions: y
|
|
1223
1223
|
} = st(e);
|
|
1224
|
-
|
|
1225
|
-
let R =
|
|
1224
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1225
|
+
let R = Ln([r, o && o.toAbortSignal()], i), h;
|
|
1226
1226
|
const m = R && R.unsubscribe && (() => {
|
|
1227
1227
|
R.unsubscribe();
|
|
1228
1228
|
});
|
|
1229
1229
|
let p;
|
|
1230
1230
|
try {
|
|
1231
|
-
if (f &&
|
|
1231
|
+
if (f && Hn && n !== "get" && n !== "head" && (p = await jn(l, s)) !== 0) {
|
|
1232
1232
|
let A = new Request(t, {
|
|
1233
1233
|
method: "POST",
|
|
1234
1234
|
body: s,
|
|
1235
1235
|
duplex: "half"
|
|
1236
1236
|
}), F;
|
|
1237
|
-
if (a.isFormData(s) && (F = A.headers.get("content-type")) &&
|
|
1237
|
+
if (a.isFormData(s) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1238
1238
|
const [B, W] = Ne(
|
|
1239
1239
|
p,
|
|
1240
1240
|
Q(Ce(f))
|
|
@@ -1248,13 +1248,13 @@ const Hn = async (e) => {
|
|
|
1248
1248
|
...y,
|
|
1249
1249
|
signal: R,
|
|
1250
1250
|
method: n.toUpperCase(),
|
|
1251
|
-
headers:
|
|
1251
|
+
headers: l.normalize().toJSON(),
|
|
1252
1252
|
body: s,
|
|
1253
1253
|
duplex: "half",
|
|
1254
1254
|
credentials: S ? d : void 0
|
|
1255
1255
|
});
|
|
1256
1256
|
let w = await fetch(h);
|
|
1257
|
-
const T = he && (
|
|
1257
|
+
const T = he && (u === "stream" || u === "response");
|
|
1258
1258
|
if (he && (c || T && m)) {
|
|
1259
1259
|
const A = {};
|
|
1260
1260
|
["status", "statusText", "headers"].forEach((ge) => {
|
|
@@ -1271,8 +1271,8 @@ const Hn = async (e) => {
|
|
|
1271
1271
|
A
|
|
1272
1272
|
);
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1275
|
-
let P = await ee[a.findKey(ee,
|
|
1274
|
+
u = u || "text";
|
|
1275
|
+
let P = await ee[a.findKey(ee, u) || "text"](w, e);
|
|
1276
1276
|
return !T && m && m(), await new Promise((A, F) => {
|
|
1277
1277
|
tt(A, F, {
|
|
1278
1278
|
data: P,
|
|
@@ -1292,9 +1292,9 @@ const Hn = async (e) => {
|
|
|
1292
1292
|
) : E.from(S, S && S.code, e, h);
|
|
1293
1293
|
}
|
|
1294
1294
|
}), me = {
|
|
1295
|
-
http:
|
|
1296
|
-
xhr:
|
|
1297
|
-
fetch:
|
|
1295
|
+
http: nn,
|
|
1296
|
+
xhr: Pn,
|
|
1297
|
+
fetch: zn
|
|
1298
1298
|
};
|
|
1299
1299
|
a.forEach(me, (e, t) => {
|
|
1300
1300
|
if (e) {
|
|
@@ -1305,7 +1305,7 @@ a.forEach(me, (e, t) => {
|
|
|
1305
1305
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
|
-
const xe = (e) => `- ${e}`,
|
|
1308
|
+
const xe = (e) => `- ${e}`, Kn = (e) => a.isFunction(e) || e === null || e === !1, it = {
|
|
1309
1309
|
getAdapter: (e) => {
|
|
1310
1310
|
e = a.isArray(e) ? e : [e];
|
|
1311
1311
|
const { length: t } = e;
|
|
@@ -1314,7 +1314,7 @@ const xe = (e) => `- ${e}`, zn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1314
1314
|
for (let o = 0; o < t; o++) {
|
|
1315
1315
|
n = e[o];
|
|
1316
1316
|
let i;
|
|
1317
|
-
if (s = n, !
|
|
1317
|
+
if (s = n, !Kn(n) && (s = me[(i = String(n)).toLowerCase()], s === void 0))
|
|
1318
1318
|
throw new E(`Unknown adapter '${i}'`);
|
|
1319
1319
|
if (s)
|
|
1320
1320
|
break;
|
|
@@ -1386,7 +1386,7 @@ ae.transitional = function(t, n, s) {
|
|
|
1386
1386
|
ae.spelling = function(t) {
|
|
1387
1387
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1388
1388
|
};
|
|
1389
|
-
function
|
|
1389
|
+
function $n(e, t, n) {
|
|
1390
1390
|
if (typeof e != "object")
|
|
1391
1391
|
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1392
1392
|
const s = Object.keys(e);
|
|
@@ -1404,7 +1404,7 @@ function Kn(e, t, n) {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
const Z = {
|
|
1407
|
-
assertOptions:
|
|
1407
|
+
assertOptions: $n,
|
|
1408
1408
|
validators: ae
|
|
1409
1409
|
}, I = Z.validators;
|
|
1410
1410
|
let H = class {
|
|
@@ -1470,16 +1470,16 @@ let H = class {
|
|
|
1470
1470
|
this.interceptors.request.forEach(function(m) {
|
|
1471
1471
|
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1472
1472
|
});
|
|
1473
|
-
const
|
|
1473
|
+
const u = [];
|
|
1474
1474
|
this.interceptors.response.forEach(function(m) {
|
|
1475
|
-
|
|
1475
|
+
u.push(m.fulfilled, m.rejected);
|
|
1476
1476
|
});
|
|
1477
|
-
let
|
|
1477
|
+
let l, d = 0, y;
|
|
1478
1478
|
if (!f) {
|
|
1479
1479
|
const h = [Pe.bind(this), void 0];
|
|
1480
|
-
for (h.unshift.apply(h, c), h.push.apply(h,
|
|
1481
|
-
|
|
1482
|
-
return
|
|
1480
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), y = h.length, l = Promise.resolve(n); d < y; )
|
|
1481
|
+
l = l.then(h[d++], h[d++]);
|
|
1482
|
+
return l;
|
|
1483
1483
|
}
|
|
1484
1484
|
y = c.length;
|
|
1485
1485
|
let R = n;
|
|
@@ -1493,13 +1493,13 @@ let H = class {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
try {
|
|
1496
|
-
|
|
1496
|
+
l = Pe.call(this, R);
|
|
1497
1497
|
} catch (h) {
|
|
1498
1498
|
return Promise.reject(h);
|
|
1499
1499
|
}
|
|
1500
|
-
for (d = 0, y =
|
|
1501
|
-
|
|
1502
|
-
return
|
|
1500
|
+
for (d = 0, y = u.length; d < y; )
|
|
1501
|
+
l = l.then(u[d++], u[d++]);
|
|
1502
|
+
return l;
|
|
1503
1503
|
}
|
|
1504
1504
|
getUri(t) {
|
|
1505
1505
|
t = M(this.defaults, t);
|
|
@@ -1531,7 +1531,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1533
1533
|
});
|
|
1534
|
-
let
|
|
1534
|
+
let Gn = class ct {
|
|
1535
1535
|
constructor(t) {
|
|
1536
1536
|
if (typeof t != "function")
|
|
1537
1537
|
throw new TypeError("executor must be a function.");
|
|
@@ -1604,12 +1604,12 @@ let $n = class ct {
|
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
function
|
|
1607
|
+
function vn(e) {
|
|
1608
1608
|
return function(n) {
|
|
1609
1609
|
return e.apply(null, n);
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Vn(e) {
|
|
1613
1613
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1614
1614
|
}
|
|
1615
1615
|
const Ee = {
|
|
@@ -1689,7 +1689,7 @@ function ut(e) {
|
|
|
1689
1689
|
const g = ut(J);
|
|
1690
1690
|
g.Axios = H;
|
|
1691
1691
|
g.CanceledError = K;
|
|
1692
|
-
g.CancelToken =
|
|
1692
|
+
g.CancelToken = Gn;
|
|
1693
1693
|
g.isCancel = et;
|
|
1694
1694
|
g.VERSION = at;
|
|
1695
1695
|
g.toFormData = oe;
|
|
@@ -1698,8 +1698,8 @@ g.Cancel = g.CanceledError;
|
|
|
1698
1698
|
g.all = function(t) {
|
|
1699
1699
|
return Promise.all(t);
|
|
1700
1700
|
};
|
|
1701
|
-
g.spread =
|
|
1702
|
-
g.isAxiosError =
|
|
1701
|
+
g.spread = vn;
|
|
1702
|
+
g.isAxiosError = Vn;
|
|
1703
1703
|
g.mergeConfig = M;
|
|
1704
1704
|
g.AxiosHeaders = N;
|
|
1705
1705
|
g.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1708,7 +1708,7 @@ g.HttpStatusCode = Ee;
|
|
|
1708
1708
|
g.default = g;
|
|
1709
1709
|
const {
|
|
1710
1710
|
Axios: hs,
|
|
1711
|
-
AxiosError:
|
|
1711
|
+
AxiosError: Jn,
|
|
1712
1712
|
CanceledError: ms,
|
|
1713
1713
|
isCancel: Es,
|
|
1714
1714
|
CancelToken: ys,
|
|
@@ -1723,15 +1723,15 @@ const {
|
|
|
1723
1723
|
formToJSON: As,
|
|
1724
1724
|
getAdapter: _s,
|
|
1725
1725
|
mergeConfig: Ns
|
|
1726
|
-
} = g,
|
|
1726
|
+
} = g, Wn = (e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(x.TOKEN), e.headers["client-id"] = localStorage.getItem(x.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Fe = (e, t, n) => {
|
|
1727
1727
|
for (const s of e)
|
|
1728
1728
|
t ? s.rej(t) : s.res(n);
|
|
1729
|
-
},
|
|
1729
|
+
}, Xn = async (e) => new Promise((t, n) => {
|
|
1730
1730
|
setTimeout(t, e);
|
|
1731
|
-
}),
|
|
1731
|
+
}), Yn = async (e, t) => (await Xn(t), e()), De = (e, t) => {
|
|
1732
1732
|
var r, o;
|
|
1733
1733
|
let n = "", s = t;
|
|
1734
|
-
typeof t == "string" ? n = t : t instanceof
|
|
1734
|
+
typeof t == "string" ? n = t : t instanceof Jn ? (n = t.message, s = {
|
|
1735
1735
|
message: t.message,
|
|
1736
1736
|
cause: t.cause,
|
|
1737
1737
|
status: t.status,
|
|
@@ -1740,8 +1740,8 @@ const {
|
|
|
1740
1740
|
{ type: "auth_error", details: { message: n, action: e, info: s } },
|
|
1741
1741
|
"*"
|
|
1742
1742
|
);
|
|
1743
|
-
},
|
|
1744
|
-
var f,
|
|
1743
|
+
}, Zn = async (e, t, n, s, r) => {
|
|
1744
|
+
var f, u, l;
|
|
1745
1745
|
const o = t.config, i = localStorage.getItem(x.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || D.InternalServerError;
|
|
1746
1746
|
if (!o || o.__retries === n)
|
|
1747
1747
|
throw t;
|
|
@@ -1760,8 +1760,8 @@ const {
|
|
|
1760
1760
|
s = !0;
|
|
1761
1761
|
const y = localStorage.getItem(x.AUTH_FLOW) === dt.POST_MESSAGE ? Be.refreshEmbedToken : Be.refreshToken, { data: R, success: h, message: m } = await y(i);
|
|
1762
1762
|
if (!h)
|
|
1763
|
-
throw (
|
|
1764
|
-
return (
|
|
1763
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(b.EXCHANGE_TOKEN) || De("refresh_token", m), s = !1, Fe(e, t), t;
|
|
1764
|
+
return (l = o.url) != null && l.includes(b.EXCHANGE_TOKEN) && "id_token" in R && (o.data = JSON.stringify({ idToken: R.id_token })), s = !1, o.headers && (o.headers.Authorization = `Bearer ${R.token}`), Fe(e, null, R.token), r(o);
|
|
1765
1765
|
}
|
|
1766
1766
|
if ([
|
|
1767
1767
|
D.BadRequest,
|
|
@@ -1772,29 +1772,29 @@ const {
|
|
|
1772
1772
|
D.NotFound
|
|
1773
1773
|
].includes(c) || (o.__retries || (o.__retries = 0), o.__retries += 1, o.__retries > n))
|
|
1774
1774
|
throw t;
|
|
1775
|
-
return
|
|
1775
|
+
return Yn(
|
|
1776
1776
|
() => r(o),
|
|
1777
1777
|
Math.pow(10, o.__retries + 1) / 2
|
|
1778
1778
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1779
1779
|
);
|
|
1780
|
-
},
|
|
1781
|
-
|
|
1780
|
+
}, Qn = g.create();
|
|
1781
|
+
Qn.interceptors.request.use((e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(x.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1782
1782
|
const C = g.create();
|
|
1783
|
-
C.interceptors.request.use((e) => (e =
|
|
1784
|
-
const
|
|
1785
|
-
let
|
|
1786
|
-
const
|
|
1783
|
+
C.interceptors.request.use((e) => (e = Wn(e), e));
|
|
1784
|
+
const es = 3;
|
|
1785
|
+
let ts = !1;
|
|
1786
|
+
const ns = [];
|
|
1787
1787
|
C.interceptors.response.use(
|
|
1788
1788
|
null,
|
|
1789
|
-
(e) =>
|
|
1790
|
-
|
|
1789
|
+
(e) => Zn(
|
|
1790
|
+
ns,
|
|
1791
1791
|
e,
|
|
1792
|
-
Qn,
|
|
1793
1792
|
es,
|
|
1793
|
+
ts,
|
|
1794
1794
|
C
|
|
1795
1795
|
)
|
|
1796
1796
|
);
|
|
1797
|
-
class
|
|
1797
|
+
class ss {
|
|
1798
1798
|
constructor() {
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Logs in a user with the provided email and password.
|
|
@@ -1811,14 +1811,14 @@ class ns {
|
|
|
1811
1811
|
}), f = await $.ensureQueryData({
|
|
1812
1812
|
queryKey: [j.USER_REGIONS],
|
|
1813
1813
|
queryFn: this.getRegions
|
|
1814
|
-
}),
|
|
1815
|
-
return localStorage.setItem(x.TOKEN,
|
|
1814
|
+
}), u = L(c.data), l = (n = c.data) == null ? void 0 : n.accessToken;
|
|
1815
|
+
return localStorage.setItem(x.TOKEN, l), {
|
|
1816
1816
|
success: !0,
|
|
1817
1817
|
data: L({
|
|
1818
1818
|
...c.data,
|
|
1819
1819
|
token: (s = c.data) == null ? void 0 : s.accessToken,
|
|
1820
1820
|
user: {
|
|
1821
|
-
...
|
|
1821
|
+
...u.user,
|
|
1822
1822
|
userRegion: f.find(
|
|
1823
1823
|
(d) => d.code === c.data.user.user_region
|
|
1824
1824
|
)
|
|
@@ -1841,7 +1841,7 @@ class ns {
|
|
|
1841
1841
|
k(this, "signUp", async (t) => {
|
|
1842
1842
|
var n, s, r, o, i, c, f;
|
|
1843
1843
|
try {
|
|
1844
|
-
const { data:
|
|
1844
|
+
const { data: u } = await C.post(b.SIGN_UP, {
|
|
1845
1845
|
user: {
|
|
1846
1846
|
email_address: t.email,
|
|
1847
1847
|
password: t.password,
|
|
@@ -1850,59 +1850,59 @@ class ns {
|
|
|
1850
1850
|
success_url: t.successUrl,
|
|
1851
1851
|
cancel_url: t.cancelUrl,
|
|
1852
1852
|
price_id: t.priceId
|
|
1853
|
-
}),
|
|
1853
|
+
}), l = await $.ensureQueryData({
|
|
1854
1854
|
queryKey: [j.USER_REGIONS],
|
|
1855
1855
|
queryFn: this.getRegions
|
|
1856
|
-
}), d = L(
|
|
1856
|
+
}), d = L(u.data), y = (n = u.data) == null ? void 0 : n.tokens.accessToken;
|
|
1857
1857
|
return localStorage.setItem(x.TOKEN, y), {
|
|
1858
1858
|
success: !0,
|
|
1859
1859
|
data: {
|
|
1860
|
-
token: (s =
|
|
1861
|
-
accessToken: (r =
|
|
1862
|
-
refreshToken: (o =
|
|
1860
|
+
token: (s = u.data) == null ? void 0 : s.tokens.accessToken,
|
|
1861
|
+
accessToken: (r = u.data) == null ? void 0 : r.tokens.accessToken,
|
|
1862
|
+
refreshToken: (o = u.data) == null ? void 0 : o.tokens.refreshToken,
|
|
1863
1863
|
user: {
|
|
1864
1864
|
...d.user,
|
|
1865
|
-
userRegion:
|
|
1866
|
-
(R) => R.code ===
|
|
1865
|
+
userRegion: l.find(
|
|
1866
|
+
(R) => R.code === u.data.user.user_region
|
|
1867
1867
|
)
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
};
|
|
1871
|
-
} catch (
|
|
1872
|
-
return console.error(
|
|
1871
|
+
} catch (u) {
|
|
1872
|
+
return console.error(u), {
|
|
1873
1873
|
success: !1,
|
|
1874
|
-
message: ((c = (i =
|
|
1874
|
+
message: ((c = (i = u.response) == null ? void 0 : i.data) == null ? void 0 : c.message) || ((f = u.response) == null ? void 0 : f.data) || u.message || "error signing up"
|
|
1875
1875
|
};
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
1878
|
k(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1879
|
-
var s, r, o, i, c, f,
|
|
1879
|
+
var s, r, o, i, c, f, u;
|
|
1880
1880
|
try {
|
|
1881
|
-
const { data:
|
|
1881
|
+
const { data: l } = await C.post(b.GOOGLE_AUTH, {
|
|
1882
1882
|
google_access_token: t,
|
|
1883
1883
|
user_region: n
|
|
1884
1884
|
}), d = await $.ensureQueryData({
|
|
1885
1885
|
queryKey: [j.USER_REGIONS],
|
|
1886
1886
|
queryFn: this.getRegions
|
|
1887
|
-
}), y = L(
|
|
1887
|
+
}), y = L(l.data), R = (s = l.data) == null ? void 0 : s.tokens.accessToken;
|
|
1888
1888
|
return localStorage.setItem(x.TOKEN, R), {
|
|
1889
1889
|
success: !0,
|
|
1890
1890
|
data: {
|
|
1891
|
-
token: (r =
|
|
1892
|
-
accessToken: (o =
|
|
1893
|
-
refreshToken: (i =
|
|
1891
|
+
token: (r = l.data) == null ? void 0 : r.tokens.accessToken,
|
|
1892
|
+
accessToken: (o = l.data) == null ? void 0 : o.tokens.accessToken,
|
|
1893
|
+
refreshToken: (i = l.data) == null ? void 0 : i.tokens.refreshToken,
|
|
1894
1894
|
user: {
|
|
1895
1895
|
...y.user,
|
|
1896
1896
|
userRegion: d.find(
|
|
1897
|
-
(h) => h.code ===
|
|
1897
|
+
(h) => h.code === l.data.user.user_region
|
|
1898
1898
|
)
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
};
|
|
1902
|
-
} catch (
|
|
1903
|
-
return console.error(
|
|
1902
|
+
} catch (l) {
|
|
1903
|
+
return console.error(l), {
|
|
1904
1904
|
success: !1,
|
|
1905
|
-
message: ((f = (c =
|
|
1905
|
+
message: ((f = (c = l.response) == null ? void 0 : c.data) == null ? void 0 : f.message) || ((u = l == null ? void 0 : l.response) == null ? void 0 : u.data) || l.message || "error getting or creating google user"
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
1908
|
});
|
|
@@ -1930,31 +1930,35 @@ class ns {
|
|
|
1930
1930
|
* @param idToken - The ID token to authenticate with.
|
|
1931
1931
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1932
1932
|
*/
|
|
1933
|
-
k(this, "authenticateWithToken", async (t) => {
|
|
1934
|
-
var
|
|
1933
|
+
k(this, "authenticateWithToken", async (t, n) => {
|
|
1934
|
+
var s, r, o;
|
|
1935
1935
|
try {
|
|
1936
|
-
const { data:
|
|
1937
|
-
|
|
1938
|
-
|
|
1936
|
+
const { data: i } = await C.post(
|
|
1937
|
+
b.EXCHANGE_TOKEN,
|
|
1938
|
+
mt({
|
|
1939
|
+
idToken: t,
|
|
1940
|
+
exchangeTokenEndPoint: n
|
|
1941
|
+
})
|
|
1942
|
+
), c = await $.ensureQueryData({
|
|
1939
1943
|
queryKey: [j.USER_REGIONS],
|
|
1940
1944
|
queryFn: this.getRegions
|
|
1941
|
-
}),
|
|
1945
|
+
}), f = L(i.data);
|
|
1942
1946
|
return {
|
|
1943
1947
|
success: !0,
|
|
1944
1948
|
data: {
|
|
1945
|
-
...
|
|
1949
|
+
...f,
|
|
1946
1950
|
user: {
|
|
1947
|
-
...
|
|
1948
|
-
userRegion:
|
|
1949
|
-
(
|
|
1951
|
+
...f.user,
|
|
1952
|
+
userRegion: c.find(
|
|
1953
|
+
(u) => u.code === i.data.user.user_region
|
|
1950
1954
|
)
|
|
1951
1955
|
}
|
|
1952
1956
|
}
|
|
1953
1957
|
};
|
|
1954
|
-
} catch (
|
|
1955
|
-
return console.error(
|
|
1958
|
+
} catch (i) {
|
|
1959
|
+
return console.error(i), {
|
|
1956
1960
|
success: !1,
|
|
1957
|
-
message: ((
|
|
1961
|
+
message: ((r = (s = i.response) == null ? void 0 : s.data) == null ? void 0 : r.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error exchanging token"
|
|
1958
1962
|
};
|
|
1959
1963
|
}
|
|
1960
1964
|
});
|
|
@@ -2059,22 +2063,22 @@ class ns {
|
|
|
2059
2063
|
});
|
|
2060
2064
|
}
|
|
2061
2065
|
}
|
|
2062
|
-
const Be = new
|
|
2066
|
+
const Be = new ss();
|
|
2063
2067
|
export {
|
|
2064
2068
|
Be as A,
|
|
2065
2069
|
j as E,
|
|
2066
2070
|
L as a,
|
|
2067
|
-
|
|
2071
|
+
Et as b,
|
|
2068
2072
|
C as c,
|
|
2069
2073
|
g as d,
|
|
2070
|
-
|
|
2074
|
+
Jn as e,
|
|
2071
2075
|
we as f,
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2076
|
+
Wn as g,
|
|
2077
|
+
Zn as h,
|
|
2078
|
+
Qn as i,
|
|
2079
|
+
Xn as j,
|
|
2080
|
+
Yn as k,
|
|
2077
2081
|
De as l,
|
|
2078
2082
|
Fe as p,
|
|
2079
|
-
|
|
2083
|
+
mt as r
|
|
2080
2084
|
};
|