@odynn/awayz-core 0.8.0 → 0.9.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/{TripsService-A25R9nj7.js → TripsService-ByimRRRe.js} +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +6 -7
- package/dist/components/CashValue/CashValue.stories.js +19 -20
- package/dist/components/ClientPointsValue/ClientPointsValue.js +39 -247
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Wallet/Card/Card.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +11 -12
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +64 -65
- package/dist/hooks/useBookingManagement/useBookingManagement.js +8 -9
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +3 -4
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +11 -12
- package/dist/hooks/useTripManagement/useTripManagement.js +5 -6
- package/dist/hooks/useTripManagement/useTripManagement.test.js +3 -4
- package/dist/hooks/useWallet/useWallet.js +24 -25
- package/dist/hooks/useWallet/useWallet.test.js +2 -3
- package/dist/{index-jyHfrLRo.js → index-C8p5kinH.js} +18 -18
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-CNXX0Siw.js → noRetryInstance-oiHCni_Z.js} +465 -463
- package/dist/providers/AwayzProvider.js +7 -8
- package/dist/services/account/AccountService.js +2 -3
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +12 -13
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +9 -10
- 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/RewardsService-CB88je4D.js +0 -118952
- package/dist/assets/ClientPointsValue.css +0 -1
- package/dist/assets/RewardsService.css +0 -1
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import './assets/_styles3.css';import './assets/_styles4.css';import './assets/_styles.css';import './assets/_styles2.css';import './assets/noRetryInstance.css';var pt = Object.defineProperty;
|
|
2
2
|
var ht = (e, t, n) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var U = (e, t, n) => ht(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { a as
|
|
5
|
+
import { a as I } from "./_styles.flight-booking-DEUJthTJ.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { getBaseUrl as
|
|
8
|
-
import { EAuthEndpoints as
|
|
7
|
+
import { getBaseUrl as He } from "./configs/baseUrl.js";
|
|
8
|
+
import { EAuthEndpoints as b } from "./configs/endpoints.js";
|
|
9
9
|
import { getGatewayBaseUrl as mt } from "./configs/gatewayBaseUrl.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "react/jsx-runtime";
|
|
12
12
|
import "react-i18next";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { E as z } from "./RewardsService-CB88je4D.js";
|
|
16
15
|
import { awayzClient as $ } from "./configs/awayzClient.js";
|
|
17
16
|
/* empty css */
|
|
18
|
-
/* empty css */
|
|
19
17
|
import "./context/AwayzContext.js";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
/* empty css */
|
|
19
|
+
import { EAuthFlow as Et } from "./types/EAuthFlow.js";
|
|
20
|
+
const P = (e) => Array.isArray(e) ? e.map((t) => P(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
21
|
+
const r = gt(n);
|
|
22
|
+
return t[r] = P(e[n]), t;
|
|
24
23
|
}, {}) : e;
|
|
25
|
-
function
|
|
24
|
+
function Rt(e) {
|
|
26
25
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
27
26
|
}
|
|
28
|
-
const
|
|
29
|
-
const r =
|
|
30
|
-
return t[r] =
|
|
31
|
-
}, {}) : e,
|
|
27
|
+
const Te = (e) => Array.isArray(e) ? e.map((t) => Te(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
28
|
+
const r = Rt(n);
|
|
29
|
+
return t[r] = Te(e[n]), t;
|
|
30
|
+
}, {}) : e, St = (e) => (Object.keys(e).forEach(
|
|
32
31
|
(t) => !e[t] && delete e[t]
|
|
33
|
-
), e),
|
|
34
|
-
|
|
32
|
+
), e), gt = (e) => (e = e.replace(/^_+/, ""), e.replace(/_([a-z])/gi, (t, n) => n.toUpperCase()));
|
|
33
|
+
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.GET_USER_REGION = "get_user_region", e.PRICING = "pricing", e.FAQS = "faqs", e.FEATURES = "features", e.AIRLINE_HEALTH = "airline_health", e))(j || {}), yt = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(yt || {});
|
|
34
|
+
function Me(e, t) {
|
|
35
35
|
return function() {
|
|
36
36
|
return e.apply(t, arguments);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
const { toString:
|
|
40
|
-
const n =
|
|
39
|
+
const { toString: wt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: te, toStringTag: je } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
40
|
+
const n = wt.call(t);
|
|
41
41
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
42
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
43
|
-
function
|
|
44
|
-
return e !== null && !
|
|
42
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), re = (e) => (t) => typeof t === e, { isArray: z } = Array, V = re("undefined");
|
|
43
|
+
function Tt(e) {
|
|
44
|
+
return e !== null && !V(e) && e.constructor !== null && !V(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const ze = x("ArrayBuffer");
|
|
47
47
|
function bt(e) {
|
|
48
48
|
let t;
|
|
49
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
49
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ze(e.buffer), t;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Ot = re("string"), _ = re("function"), Ge = re("number"), se = (e) => e !== null && typeof e == "object", At = (e) => e === !0 || e === !1, X = (e) => {
|
|
52
52
|
if (ne(e) !== "object")
|
|
53
53
|
return !1;
|
|
54
|
-
const t =
|
|
55
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
56
|
-
},
|
|
54
|
+
const t = Se(e);
|
|
55
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(je in e) && !(te in e);
|
|
56
|
+
}, _t = x("Date"), Nt = x("File"), Ct = x("Blob"), It = x("FileList"), Ut = (e) => se(e) && _(e.pipe), xt = (e) => {
|
|
57
57
|
let t;
|
|
58
58
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
59
59
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
60
|
-
},
|
|
61
|
-
function
|
|
60
|
+
}, Lt = x("URLSearchParams"), [kt, Pt, Ft, Dt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
61
|
+
function v(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
62
62
|
if (e === null || typeof e > "u")
|
|
63
63
|
return;
|
|
64
64
|
let r, s;
|
|
65
|
-
if (typeof e != "object" && (e = [e]),
|
|
65
|
+
if (typeof e != "object" && (e = [e]), z(e))
|
|
66
66
|
for (r = 0, s = e.length; r < s; r++)
|
|
67
67
|
t.call(null, e[r], r, e);
|
|
68
68
|
else {
|
|
@@ -81,71 +81,71 @@ function $e(e, t) {
|
|
|
81
81
|
return s;
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
84
|
+
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ke = (e) => !V(e) && e !== q;
|
|
85
85
|
function fe() {
|
|
86
|
-
const { caseless: e } =
|
|
86
|
+
const { caseless: e } = Ke(this) && this || {}, t = {}, n = (r, s) => {
|
|
87
87
|
const o = e && $e(t, s) || s;
|
|
88
|
-
X(t[o]) && X(r) ? t[o] = fe(t[o], r) : X(r) ? t[o] = fe({}, r) :
|
|
88
|
+
X(t[o]) && X(r) ? t[o] = fe(t[o], r) : X(r) ? t[o] = fe({}, r) : z(r) ? t[o] = r.slice() : t[o] = r;
|
|
89
89
|
};
|
|
90
90
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
91
|
-
arguments[r] &&
|
|
91
|
+
arguments[r] && v(arguments[r], n);
|
|
92
92
|
return t;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
n && _(s) ? e[o] =
|
|
96
|
-
}, { allOwnKeys: r }), e),
|
|
94
|
+
const qt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
95
|
+
n && _(s) ? e[o] = Me(s, n) : e[o] = s;
|
|
96
|
+
}, { allOwnKeys: r }), e), Ht = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Mt = (e, t, n, r) => {
|
|
97
97
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
98
98
|
value: t.prototype
|
|
99
99
|
}), n && Object.assign(e.prototype, n);
|
|
100
|
-
},
|
|
100
|
+
}, jt = (e, t, n, r) => {
|
|
101
101
|
let s, o, i;
|
|
102
102
|
const c = {};
|
|
103
103
|
if (t = t || {}, e == null) return t;
|
|
104
104
|
do {
|
|
105
105
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
106
106
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
107
|
-
e = n !== !1 &&
|
|
107
|
+
e = n !== !1 && Se(e);
|
|
108
108
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
109
109
|
return t;
|
|
110
|
-
},
|
|
110
|
+
}, zt = (e, t, n) => {
|
|
111
111
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
112
112
|
const r = e.indexOf(t, n);
|
|
113
113
|
return r !== -1 && r === n;
|
|
114
|
-
},
|
|
114
|
+
}, Gt = (e) => {
|
|
115
115
|
if (!e) return null;
|
|
116
|
-
if (
|
|
116
|
+
if (z(e)) return e;
|
|
117
117
|
let t = e.length;
|
|
118
|
-
if (!
|
|
118
|
+
if (!Ge(t)) return null;
|
|
119
119
|
const n = new Array(t);
|
|
120
120
|
for (; t-- > 0; )
|
|
121
121
|
n[t] = e[t];
|
|
122
122
|
return n;
|
|
123
|
-
},
|
|
123
|
+
}, $t = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Se(Uint8Array)), Kt = (e, t) => {
|
|
124
124
|
const r = (e && e[te]).call(e);
|
|
125
125
|
let s;
|
|
126
126
|
for (; (s = r.next()) && !s.done; ) {
|
|
127
127
|
const o = s.value;
|
|
128
128
|
t.call(e, o[0], o[1]);
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, Vt = (e, t) => {
|
|
131
131
|
let n;
|
|
132
132
|
const r = [];
|
|
133
133
|
for (; (n = e.exec(t)) !== null; )
|
|
134
134
|
r.push(n);
|
|
135
135
|
return r;
|
|
136
|
-
}, vt =
|
|
136
|
+
}, vt = x("HTMLFormElement"), Jt = (e) => e.toLowerCase().replace(
|
|
137
137
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
138
138
|
function(n, r, s) {
|
|
139
139
|
return r.toUpperCase() + s;
|
|
140
140
|
}
|
|
141
|
-
),
|
|
141
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wt = x("RegExp"), Ve = (e, t) => {
|
|
142
142
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
143
|
-
|
|
143
|
+
v(n, (s, o) => {
|
|
144
144
|
let i;
|
|
145
145
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
146
146
|
}), Object.defineProperties(e, r);
|
|
147
|
-
},
|
|
148
|
-
|
|
147
|
+
}, Xt = (e) => {
|
|
148
|
+
Ve(e, (t, n) => {
|
|
149
149
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
150
150
|
return !1;
|
|
151
151
|
const r = e[n];
|
|
@@ -159,105 +159,105 @@ const Bt = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
|
-
},
|
|
162
|
+
}, Yt = (e, t) => {
|
|
163
163
|
const n = {}, r = (s) => {
|
|
164
164
|
s.forEach((o) => {
|
|
165
165
|
n[o] = !0;
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
|
-
return
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
function
|
|
172
|
-
return !!(e && _(e.append) && e[
|
|
168
|
+
return z(e) ? r(e) : r(String(e).split(t)), n;
|
|
169
|
+
}, Zt = () => {
|
|
170
|
+
}, Qt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
171
|
+
function en(e) {
|
|
172
|
+
return !!(e && _(e.append) && e[je] === "FormData" && e[te]);
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const tn = (e) => {
|
|
175
175
|
const t = new Array(10), n = (r, s) => {
|
|
176
176
|
if (se(r)) {
|
|
177
177
|
if (t.indexOf(r) >= 0)
|
|
178
178
|
return;
|
|
179
179
|
if (!("toJSON" in r)) {
|
|
180
180
|
t[s] = r;
|
|
181
|
-
const o =
|
|
182
|
-
return
|
|
181
|
+
const o = z(r) ? [] : {};
|
|
182
|
+
return v(r, (i, c) => {
|
|
183
183
|
const f = n(i, s + 1);
|
|
184
|
-
!
|
|
184
|
+
!V(f) && (o[c] = f);
|
|
185
185
|
}), t[s] = void 0, o;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
return r;
|
|
189
189
|
};
|
|
190
190
|
return n(e, 0);
|
|
191
|
-
},
|
|
191
|
+
}, nn = x("AsyncFunction"), rn = (e) => e && (se(e) || _(e)) && _(e.then) && _(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
192
192
|
s === q && o === n && r.length && r.shift()();
|
|
193
193
|
}, !1), (s) => {
|
|
194
194
|
r.push(s), q.postMessage(n, "*");
|
|
195
195
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
196
196
|
typeof setImmediate == "function",
|
|
197
197
|
_(q.postMessage)
|
|
198
|
-
),
|
|
199
|
-
isArray:
|
|
200
|
-
isArrayBuffer:
|
|
201
|
-
isBuffer:
|
|
202
|
-
isFormData:
|
|
198
|
+
), sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ve, on = (e) => e != null && _(e[te]), a = {
|
|
199
|
+
isArray: z,
|
|
200
|
+
isArrayBuffer: ze,
|
|
201
|
+
isBuffer: Tt,
|
|
202
|
+
isFormData: xt,
|
|
203
203
|
isArrayBufferView: bt,
|
|
204
|
-
isString:
|
|
205
|
-
isNumber:
|
|
206
|
-
isBoolean:
|
|
204
|
+
isString: Ot,
|
|
205
|
+
isNumber: Ge,
|
|
206
|
+
isBoolean: At,
|
|
207
207
|
isObject: se,
|
|
208
208
|
isPlainObject: X,
|
|
209
|
-
isReadableStream:
|
|
209
|
+
isReadableStream: kt,
|
|
210
210
|
isRequest: Pt,
|
|
211
|
-
isResponse:
|
|
212
|
-
isHeaders:
|
|
213
|
-
isUndefined:
|
|
214
|
-
isDate:
|
|
215
|
-
isFile:
|
|
216
|
-
isBlob:
|
|
217
|
-
isRegExp:
|
|
211
|
+
isResponse: Ft,
|
|
212
|
+
isHeaders: Dt,
|
|
213
|
+
isUndefined: V,
|
|
214
|
+
isDate: _t,
|
|
215
|
+
isFile: Nt,
|
|
216
|
+
isBlob: Ct,
|
|
217
|
+
isRegExp: Wt,
|
|
218
218
|
isFunction: _,
|
|
219
|
-
isStream:
|
|
220
|
-
isURLSearchParams:
|
|
221
|
-
isTypedArray:
|
|
222
|
-
isFileList:
|
|
223
|
-
forEach:
|
|
219
|
+
isStream: Ut,
|
|
220
|
+
isURLSearchParams: Lt,
|
|
221
|
+
isTypedArray: $t,
|
|
222
|
+
isFileList: It,
|
|
223
|
+
forEach: v,
|
|
224
224
|
merge: fe,
|
|
225
|
-
extend:
|
|
226
|
-
trim:
|
|
227
|
-
stripBOM:
|
|
228
|
-
inherits:
|
|
229
|
-
toFlatObject:
|
|
225
|
+
extend: qt,
|
|
226
|
+
trim: Bt,
|
|
227
|
+
stripBOM: Ht,
|
|
228
|
+
inherits: Mt,
|
|
229
|
+
toFlatObject: jt,
|
|
230
230
|
kindOf: ne,
|
|
231
|
-
kindOfTest:
|
|
232
|
-
endsWith:
|
|
233
|
-
toArray:
|
|
234
|
-
forEachEntry:
|
|
235
|
-
matchAll:
|
|
231
|
+
kindOfTest: x,
|
|
232
|
+
endsWith: zt,
|
|
233
|
+
toArray: Gt,
|
|
234
|
+
forEachEntry: Kt,
|
|
235
|
+
matchAll: Vt,
|
|
236
236
|
isHTMLForm: vt,
|
|
237
|
-
hasOwnProperty:
|
|
238
|
-
hasOwnProp:
|
|
237
|
+
hasOwnProperty: be,
|
|
238
|
+
hasOwnProp: be,
|
|
239
239
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
240
|
-
reduceDescriptors:
|
|
241
|
-
freezeMethods:
|
|
242
|
-
toObjectSet:
|
|
243
|
-
toCamelCase:
|
|
244
|
-
noop:
|
|
245
|
-
toFiniteNumber:
|
|
240
|
+
reduceDescriptors: Ve,
|
|
241
|
+
freezeMethods: Xt,
|
|
242
|
+
toObjectSet: Yt,
|
|
243
|
+
toCamelCase: Jt,
|
|
244
|
+
noop: Zt,
|
|
245
|
+
toFiniteNumber: Qt,
|
|
246
246
|
findKey: $e,
|
|
247
247
|
global: q,
|
|
248
|
-
isContextDefined:
|
|
249
|
-
isSpecCompliantForm:
|
|
250
|
-
toJSONObject:
|
|
251
|
-
isAsyncFn:
|
|
252
|
-
isThenable:
|
|
253
|
-
setImmediate:
|
|
254
|
-
asap:
|
|
255
|
-
isIterable:
|
|
248
|
+
isContextDefined: Ke,
|
|
249
|
+
isSpecCompliantForm: en,
|
|
250
|
+
toJSONObject: tn,
|
|
251
|
+
isAsyncFn: nn,
|
|
252
|
+
isThenable: rn,
|
|
253
|
+
setImmediate: ve,
|
|
254
|
+
asap: sn,
|
|
255
|
+
isIterable: on
|
|
256
256
|
};
|
|
257
|
-
function
|
|
257
|
+
function E(e, t, n, r, s) {
|
|
258
258
|
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), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
259
259
|
}
|
|
260
|
-
a.inherits(
|
|
260
|
+
a.inherits(E, Error, {
|
|
261
261
|
toJSON: function() {
|
|
262
262
|
return {
|
|
263
263
|
// Standard
|
|
@@ -278,7 +278,7 @@ a.inherits(y, Error, {
|
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
|
-
const
|
|
281
|
+
const Je = E.prototype, We = {};
|
|
282
282
|
[
|
|
283
283
|
"ERR_BAD_OPTION_VALUE",
|
|
284
284
|
"ERR_BAD_OPTION",
|
|
@@ -296,15 +296,15 @@ const Ge = y.prototype, We = {};
|
|
|
296
296
|
].forEach((e) => {
|
|
297
297
|
We[e] = { value: e };
|
|
298
298
|
});
|
|
299
|
-
Object.defineProperties(
|
|
300
|
-
Object.defineProperty(
|
|
301
|
-
|
|
302
|
-
const i = Object.create(
|
|
299
|
+
Object.defineProperties(E, We);
|
|
300
|
+
Object.defineProperty(Je, "isAxiosError", { value: !0 });
|
|
301
|
+
E.from = (e, t, n, r, s, o) => {
|
|
302
|
+
const i = Object.create(Je);
|
|
303
303
|
return a.toFlatObject(e, i, function(f) {
|
|
304
304
|
return f !== Error.prototype;
|
|
305
|
-
}, (c) => c !== "isAxiosError"),
|
|
305
|
+
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
306
306
|
};
|
|
307
|
-
const
|
|
307
|
+
const an = null;
|
|
308
308
|
function de(e) {
|
|
309
309
|
return a.isPlainObject(e) || a.isArray(e);
|
|
310
310
|
}
|
|
@@ -316,10 +316,10 @@ function Oe(e, t, n) {
|
|
|
316
316
|
return s = Xe(s), !n && o ? "[" + s + "]" : s;
|
|
317
317
|
}).join(n ? "." : "") : t;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function cn(e) {
|
|
320
320
|
return a.isArray(e) && !e.some(de);
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const un = a.toFlatObject(a, {}, null, function(t) {
|
|
323
323
|
return /^is[A-Z]/.test(t);
|
|
324
324
|
});
|
|
325
325
|
function oe(e, t, n) {
|
|
@@ -340,48 +340,48 @@ function oe(e, t, n) {
|
|
|
340
340
|
if (a.isDate(h))
|
|
341
341
|
return h.toISOString();
|
|
342
342
|
if (!f && a.isBlob(h))
|
|
343
|
-
throw new
|
|
343
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
344
344
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
345
345
|
}
|
|
346
346
|
function l(h, m, p) {
|
|
347
|
-
let
|
|
347
|
+
let y = h;
|
|
348
348
|
if (h && !p && typeof h == "object") {
|
|
349
349
|
if (a.endsWith(m, "{}"))
|
|
350
350
|
m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
351
|
-
else if (a.isArray(h) &&
|
|
352
|
-
return m = Xe(m),
|
|
353
|
-
!(a.isUndefined(
|
|
351
|
+
else if (a.isArray(h) && cn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (y = a.toArray(h)))
|
|
352
|
+
return m = Xe(m), y.forEach(function(T, k) {
|
|
353
|
+
!(a.isUndefined(T) || T === null) && t.append(
|
|
354
354
|
// eslint-disable-next-line no-nested-ternary
|
|
355
|
-
i === !0 ? Oe([m],
|
|
356
|
-
u(
|
|
355
|
+
i === !0 ? Oe([m], k, o) : i === null ? m : m + "[]",
|
|
356
|
+
u(T)
|
|
357
357
|
);
|
|
358
358
|
}), !1;
|
|
359
359
|
}
|
|
360
360
|
return de(h) ? !0 : (t.append(Oe(p, m, o), u(h)), !1);
|
|
361
361
|
}
|
|
362
|
-
const d = [],
|
|
362
|
+
const d = [], R = Object.assign(un, {
|
|
363
363
|
defaultVisitor: l,
|
|
364
364
|
convertValue: u,
|
|
365
365
|
isVisitable: de
|
|
366
366
|
});
|
|
367
|
-
function
|
|
367
|
+
function S(h, m) {
|
|
368
368
|
if (!a.isUndefined(h)) {
|
|
369
369
|
if (d.indexOf(h) !== -1)
|
|
370
370
|
throw Error("Circular reference detected in " + m.join("."));
|
|
371
|
-
d.push(h), a.forEach(h, function(
|
|
372
|
-
(!(a.isUndefined(
|
|
371
|
+
d.push(h), a.forEach(h, function(y, w) {
|
|
372
|
+
(!(a.isUndefined(y) || y === null) && s.call(
|
|
373
373
|
t,
|
|
374
|
-
|
|
375
|
-
a.isString(
|
|
374
|
+
y,
|
|
375
|
+
a.isString(w) ? w.trim() : w,
|
|
376
376
|
m,
|
|
377
|
-
|
|
378
|
-
)) === !0 &&
|
|
377
|
+
R
|
|
378
|
+
)) === !0 && S(y, m ? m.concat(w) : [w]);
|
|
379
379
|
}), d.pop();
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
if (!a.isObject(e))
|
|
383
383
|
throw new TypeError("data must be an object");
|
|
384
|
-
return
|
|
384
|
+
return S(e), t;
|
|
385
385
|
}
|
|
386
386
|
function Ae(e) {
|
|
387
387
|
const t = {
|
|
@@ -397,14 +397,14 @@ function Ae(e) {
|
|
|
397
397
|
return t[r];
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function ge(e, t) {
|
|
401
401
|
this._pairs = [], e && oe(e, this, t);
|
|
402
402
|
}
|
|
403
|
-
const
|
|
404
|
-
|
|
403
|
+
const Ye = ge.prototype;
|
|
404
|
+
Ye.append = function(t, n) {
|
|
405
405
|
this._pairs.push([t, n]);
|
|
406
406
|
};
|
|
407
|
-
|
|
407
|
+
Ye.toString = function(t) {
|
|
408
408
|
const n = t ? function(r) {
|
|
409
409
|
return t.call(this, r, Ae);
|
|
410
410
|
} : Ae;
|
|
@@ -412,19 +412,19 @@ Qe.toString = function(t) {
|
|
|
412
412
|
return n(s[0]) + "=" + n(s[1]);
|
|
413
413
|
}, "").join("&");
|
|
414
414
|
};
|
|
415
|
-
function
|
|
415
|
+
function ln(e) {
|
|
416
416
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
417
417
|
}
|
|
418
418
|
function Ze(e, t, n) {
|
|
419
419
|
if (!t)
|
|
420
420
|
return e;
|
|
421
|
-
const r = n && n.encode ||
|
|
421
|
+
const r = n && n.encode || ln;
|
|
422
422
|
a.isFunction(n) && (n = {
|
|
423
423
|
serialize: n
|
|
424
424
|
});
|
|
425
425
|
const s = n && n.serialize;
|
|
426
426
|
let o;
|
|
427
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
427
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ge(t, n).toString(r), o) {
|
|
428
428
|
const i = e.indexOf("#");
|
|
429
429
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
430
430
|
}
|
|
@@ -484,29 +484,29 @@ class _e {
|
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
const
|
|
487
|
+
const Qe = {
|
|
488
488
|
silentJSONParsing: !0,
|
|
489
489
|
forcedJSONParsing: !0,
|
|
490
490
|
clarifyTimeoutError: !1
|
|
491
|
-
},
|
|
491
|
+
}, fn = typeof URLSearchParams < "u" ? URLSearchParams : ge, dn = typeof FormData < "u" ? FormData : null, pn = typeof Blob < "u" ? Blob : null, hn = {
|
|
492
492
|
isBrowser: !0,
|
|
493
493
|
classes: {
|
|
494
|
-
URLSearchParams:
|
|
495
|
-
FormData:
|
|
496
|
-
Blob:
|
|
494
|
+
URLSearchParams: fn,
|
|
495
|
+
FormData: dn,
|
|
496
|
+
Blob: pn
|
|
497
497
|
},
|
|
498
498
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
499
|
-
},
|
|
500
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
499
|
+
}, ye = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, mn = ye && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), En = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
500
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Rn = ye && window.location.href || "http://localhost", Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
501
501
|
__proto__: null,
|
|
502
|
-
hasBrowserEnv:
|
|
503
|
-
hasStandardBrowserEnv:
|
|
504
|
-
hasStandardBrowserWebWorkerEnv:
|
|
502
|
+
hasBrowserEnv: ye,
|
|
503
|
+
hasStandardBrowserEnv: mn,
|
|
504
|
+
hasStandardBrowserWebWorkerEnv: En,
|
|
505
505
|
navigator: pe,
|
|
506
|
-
origin:
|
|
506
|
+
origin: Rn
|
|
507
507
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
508
|
-
...
|
|
509
|
-
...
|
|
508
|
+
...Sn,
|
|
509
|
+
...hn
|
|
510
510
|
};
|
|
511
511
|
function gn(e, t) {
|
|
512
512
|
return oe(e, new O.classes.URLSearchParams(), Object.assign({
|
|
@@ -515,10 +515,10 @@ function gn(e, t) {
|
|
|
515
515
|
}
|
|
516
516
|
}, t));
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function yn(e) {
|
|
519
519
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function wn(e) {
|
|
522
522
|
const t = {}, n = Object.keys(e);
|
|
523
523
|
let r;
|
|
524
524
|
const s = n.length;
|
|
@@ -532,17 +532,17 @@ function et(e) {
|
|
|
532
532
|
let i = n[o++];
|
|
533
533
|
if (i === "__proto__") return !0;
|
|
534
534
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
535
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
535
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = wn(s[i])), !c);
|
|
536
536
|
}
|
|
537
537
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
538
538
|
const n = {};
|
|
539
539
|
return a.forEachEntry(e, (r, s) => {
|
|
540
|
-
t(
|
|
540
|
+
t(yn(r), s, n, 0);
|
|
541
541
|
}), n;
|
|
542
542
|
}
|
|
543
543
|
return null;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Tn(e, t, n) {
|
|
546
546
|
if (a.isString(e))
|
|
547
547
|
try {
|
|
548
548
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -552,8 +552,8 @@ function Sn(e, t, n) {
|
|
|
552
552
|
}
|
|
553
553
|
return (n || JSON.stringify)(e);
|
|
554
554
|
}
|
|
555
|
-
const
|
|
556
|
-
transitional:
|
|
555
|
+
const J = {
|
|
556
|
+
transitional: Qe,
|
|
557
557
|
adapter: ["xhr", "http", "fetch"],
|
|
558
558
|
transformRequest: [function(t, n) {
|
|
559
559
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
@@ -578,10 +578,10 @@ const G = {
|
|
|
578
578
|
);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
581
|
+
return o || s ? (n.setContentType("application/json", !1), Tn(t)) : t;
|
|
582
582
|
}],
|
|
583
583
|
transformResponse: [function(t) {
|
|
584
|
-
const n = this.transitional ||
|
|
584
|
+
const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
585
585
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
586
586
|
return t;
|
|
587
587
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -590,7 +590,7 @@ const G = {
|
|
|
590
590
|
return JSON.parse(t);
|
|
591
591
|
} catch (c) {
|
|
592
592
|
if (i)
|
|
593
|
-
throw c.name === "SyntaxError" ?
|
|
593
|
+
throw c.name === "SyntaxError" ? E.from(c, E.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
return t;
|
|
@@ -619,7 +619,7 @@ const G = {
|
|
|
619
619
|
}
|
|
620
620
|
};
|
|
621
621
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
622
|
-
|
|
622
|
+
J.headers[e] = {};
|
|
623
623
|
});
|
|
624
624
|
const bn = a.toObjectSet([
|
|
625
625
|
"age",
|
|
@@ -639,7 +639,7 @@ const bn = a.toObjectSet([
|
|
|
639
639
|
"referer",
|
|
640
640
|
"retry-after",
|
|
641
641
|
"user-agent"
|
|
642
|
-
]),
|
|
642
|
+
]), On = (e) => {
|
|
643
643
|
const t = {};
|
|
644
644
|
let n, r, s;
|
|
645
645
|
return e && e.split(`
|
|
@@ -647,20 +647,20 @@ const bn = a.toObjectSet([
|
|
|
647
647
|
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && bn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
648
648
|
}), t;
|
|
649
649
|
}, Ne = Symbol("internals");
|
|
650
|
-
function
|
|
650
|
+
function K(e) {
|
|
651
651
|
return e && String(e).trim().toLowerCase();
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
653
|
+
function Y(e) {
|
|
654
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function An(e) {
|
|
657
657
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
658
658
|
let r;
|
|
659
659
|
for (; r = n.exec(e); )
|
|
660
660
|
t[r[1]] = r[2];
|
|
661
661
|
return t;
|
|
662
662
|
}
|
|
663
|
-
const
|
|
663
|
+
const _n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
664
664
|
function ce(e, t, n, r, s) {
|
|
665
665
|
if (a.isFunction(r))
|
|
666
666
|
return r.call(this, t, n);
|
|
@@ -671,10 +671,10 @@ function ce(e, t, n, r, s) {
|
|
|
671
671
|
return r.test(t);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Nn(e) {
|
|
675
675
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Cn(e, t) {
|
|
678
678
|
const n = a.toCamelCase(" " + t);
|
|
679
679
|
["get", "set", "has"].forEach((r) => {
|
|
680
680
|
Object.defineProperty(e, r + n, {
|
|
@@ -692,17 +692,17 @@ let N = class {
|
|
|
692
692
|
set(t, n, r) {
|
|
693
693
|
const s = this;
|
|
694
694
|
function o(c, f, u) {
|
|
695
|
-
const l =
|
|
695
|
+
const l = K(f);
|
|
696
696
|
if (!l)
|
|
697
697
|
throw new Error("header name must be a non-empty string");
|
|
698
698
|
const d = a.findKey(s, l);
|
|
699
|
-
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] =
|
|
699
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Y(c));
|
|
700
700
|
}
|
|
701
701
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
702
702
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
703
703
|
i(t, n);
|
|
704
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
705
|
-
i(
|
|
704
|
+
else if (a.isString(t) && (t = t.trim()) && !_n(t))
|
|
705
|
+
i(On(t), n);
|
|
706
706
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
707
707
|
let c = {}, f, u;
|
|
708
708
|
for (const l of t) {
|
|
@@ -716,14 +716,14 @@ let N = class {
|
|
|
716
716
|
return this;
|
|
717
717
|
}
|
|
718
718
|
get(t, n) {
|
|
719
|
-
if (t =
|
|
719
|
+
if (t = K(t), t) {
|
|
720
720
|
const r = a.findKey(this, t);
|
|
721
721
|
if (r) {
|
|
722
722
|
const s = this[r];
|
|
723
723
|
if (!n)
|
|
724
724
|
return s;
|
|
725
725
|
if (n === !0)
|
|
726
|
-
return
|
|
726
|
+
return An(s);
|
|
727
727
|
if (a.isFunction(n))
|
|
728
728
|
return n.call(this, s, r);
|
|
729
729
|
if (a.isRegExp(n))
|
|
@@ -733,7 +733,7 @@ let N = class {
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
has(t, n) {
|
|
736
|
-
if (t =
|
|
736
|
+
if (t = K(t), t) {
|
|
737
737
|
const r = a.findKey(this, t);
|
|
738
738
|
return !!(r && this[r] !== void 0 && (!n || ce(this, this[r], r, n)));
|
|
739
739
|
}
|
|
@@ -743,7 +743,7 @@ let N = class {
|
|
|
743
743
|
const r = this;
|
|
744
744
|
let s = !1;
|
|
745
745
|
function o(i) {
|
|
746
|
-
if (i =
|
|
746
|
+
if (i = K(i), i) {
|
|
747
747
|
const c = a.findKey(r, i);
|
|
748
748
|
c && (!n || ce(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
749
749
|
}
|
|
@@ -764,11 +764,11 @@ let N = class {
|
|
|
764
764
|
return a.forEach(this, (s, o) => {
|
|
765
765
|
const i = a.findKey(r, o);
|
|
766
766
|
if (i) {
|
|
767
|
-
n[i] =
|
|
767
|
+
n[i] = Y(s), delete n[o];
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
|
-
const c = t ?
|
|
771
|
-
c !== o && delete n[o], n[c] =
|
|
770
|
+
const c = t ? Nn(o) : String(o).trim();
|
|
771
|
+
c !== o && delete n[o], n[c] = Y(s), r[c] = !0;
|
|
772
772
|
}), this;
|
|
773
773
|
}
|
|
774
774
|
concat(...t) {
|
|
@@ -805,8 +805,8 @@ let N = class {
|
|
|
805
805
|
accessors: {}
|
|
806
806
|
}).accessors, s = this.prototype;
|
|
807
807
|
function o(i) {
|
|
808
|
-
const c =
|
|
809
|
-
r[c] || (
|
|
808
|
+
const c = K(i);
|
|
809
|
+
r[c] || (Cn(s, i), r[c] = !0);
|
|
810
810
|
}
|
|
811
811
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
812
812
|
}
|
|
@@ -823,7 +823,7 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
823
823
|
});
|
|
824
824
|
a.freezeMethods(N);
|
|
825
825
|
function ue(e, t) {
|
|
826
|
-
const n = this ||
|
|
826
|
+
const n = this || J, r = t || n, s = N.from(r.headers);
|
|
827
827
|
let o = r.data;
|
|
828
828
|
return a.forEach(e, function(c) {
|
|
829
829
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
@@ -832,43 +832,43 @@ function ue(e, t) {
|
|
|
832
832
|
function tt(e) {
|
|
833
833
|
return !!(e && e.__CANCEL__);
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
|
|
835
|
+
function G(e, t, n) {
|
|
836
|
+
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
837
837
|
}
|
|
838
|
-
a.inherits(
|
|
838
|
+
a.inherits(G, E, {
|
|
839
839
|
__CANCEL__: !0
|
|
840
840
|
});
|
|
841
841
|
function nt(e, t, n) {
|
|
842
842
|
const r = n.config.validateStatus;
|
|
843
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
843
|
+
!n.status || !r || r(n.status) ? e(n) : t(new E(
|
|
844
844
|
"Request failed with status code " + n.status,
|
|
845
|
-
[
|
|
845
|
+
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
846
846
|
n.config,
|
|
847
847
|
n.request,
|
|
848
848
|
n
|
|
849
849
|
));
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function In(e) {
|
|
852
852
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
853
853
|
return t && t[1] || "";
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Un(e, t) {
|
|
856
856
|
e = e || 10;
|
|
857
857
|
const n = new Array(e), r = new Array(e);
|
|
858
858
|
let s = 0, o = 0, i;
|
|
859
859
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
860
860
|
const u = Date.now(), l = r[o];
|
|
861
861
|
i || (i = u), n[s] = f, r[s] = u;
|
|
862
|
-
let d = o,
|
|
862
|
+
let d = o, R = 0;
|
|
863
863
|
for (; d !== s; )
|
|
864
|
-
|
|
864
|
+
R += n[d++], d = d % e;
|
|
865
865
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
866
866
|
return;
|
|
867
|
-
const
|
|
868
|
-
return
|
|
867
|
+
const S = l && u - l;
|
|
868
|
+
return S ? Math.round(R * 1e3 / S) : void 0;
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function xn(e, t) {
|
|
872
872
|
let n = 0, r = 1e3 / t, s, o;
|
|
873
873
|
const i = (u, l = Date.now()) => {
|
|
874
874
|
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
@@ -880,10 +880,10 @@ function kn(e, t) {
|
|
|
880
880
|
}, r - d)));
|
|
881
881
|
}, () => s && i(s)];
|
|
882
882
|
}
|
|
883
|
-
const
|
|
883
|
+
const Q = (e, t, n = 3) => {
|
|
884
884
|
let r = 0;
|
|
885
|
-
const s =
|
|
886
|
-
return
|
|
885
|
+
const s = Un(50, 250);
|
|
886
|
+
return xn((o) => {
|
|
887
887
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
888
888
|
r = i;
|
|
889
889
|
const d = {
|
|
@@ -906,10 +906,10 @@ const Y = (e, t, n = 3) => {
|
|
|
906
906
|
total: e,
|
|
907
907
|
loaded: r
|
|
908
908
|
}), t[1]];
|
|
909
|
-
},
|
|
909
|
+
}, Ie = (e) => (...t) => a.asap(() => e(...t)), Ln = 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)))(
|
|
910
910
|
new URL(O.origin),
|
|
911
911
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
912
|
-
) : () => !0,
|
|
912
|
+
) : () => !0, kn = O.hasStandardBrowserEnv ? (
|
|
913
913
|
// Standard browser envs support document.cookie
|
|
914
914
|
{
|
|
915
915
|
write(e, t, n, r, s, o) {
|
|
@@ -939,25 +939,25 @@ const Y = (e, t, n = 3) => {
|
|
|
939
939
|
function Pn(e) {
|
|
940
940
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Fn(e, t) {
|
|
943
943
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
944
944
|
}
|
|
945
945
|
function rt(e, t, n) {
|
|
946
946
|
let r = !Pn(t);
|
|
947
|
-
return e && (r || n == !1) ?
|
|
947
|
+
return e && (r || n == !1) ? Fn(e, t) : t;
|
|
948
948
|
}
|
|
949
|
-
const
|
|
950
|
-
function
|
|
949
|
+
const Ue = (e) => e instanceof N ? { ...e } : e;
|
|
950
|
+
function M(e, t) {
|
|
951
951
|
t = t || {};
|
|
952
952
|
const n = {};
|
|
953
|
-
function r(u, l, d,
|
|
954
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
953
|
+
function r(u, l, d, R) {
|
|
954
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: R }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
955
955
|
}
|
|
956
|
-
function s(u, l, d,
|
|
956
|
+
function s(u, l, d, R) {
|
|
957
957
|
if (a.isUndefined(l)) {
|
|
958
958
|
if (!a.isUndefined(u))
|
|
959
|
-
return r(void 0, u, d,
|
|
960
|
-
} else return r(u, l, d,
|
|
959
|
+
return r(void 0, u, d, R);
|
|
960
|
+
} else return r(u, l, d, R);
|
|
961
961
|
}
|
|
962
962
|
function o(u, l) {
|
|
963
963
|
if (!a.isUndefined(l))
|
|
@@ -1004,15 +1004,15 @@ function H(e, t) {
|
|
|
1004
1004
|
socketPath: i,
|
|
1005
1005
|
responseEncoding: i,
|
|
1006
1006
|
validateStatus: c,
|
|
1007
|
-
headers: (u, l, d) => s(
|
|
1007
|
+
headers: (u, l, d) => s(Ue(u), Ue(l), d, !0)
|
|
1008
1008
|
};
|
|
1009
1009
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1010
|
-
const d = f[l] || s,
|
|
1011
|
-
a.isUndefined(
|
|
1010
|
+
const d = f[l] || s, R = d(e[l], t[l], l);
|
|
1011
|
+
a.isUndefined(R) && d !== c || (n[l] = R);
|
|
1012
1012
|
}), n;
|
|
1013
1013
|
}
|
|
1014
1014
|
const st = (e) => {
|
|
1015
|
-
const t =
|
|
1015
|
+
const t = M({}, e);
|
|
1016
1016
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1017
1017
|
t.headers = i = N.from(i), t.url = Ze(rt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1018
1018
|
"Authorization",
|
|
@@ -1027,32 +1027,32 @@ const st = (e) => {
|
|
|
1027
1027
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1031
|
-
const u = s && o &&
|
|
1030
|
+
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Ln(t.url))) {
|
|
1031
|
+
const u = s && o && kn.read(o);
|
|
1032
1032
|
u && i.set(s, u);
|
|
1033
1033
|
}
|
|
1034
1034
|
return t;
|
|
1035
|
-
},
|
|
1035
|
+
}, Dn = typeof XMLHttpRequest < "u", Bn = Dn && function(e) {
|
|
1036
1036
|
return new Promise(function(n, r) {
|
|
1037
1037
|
const s = st(e);
|
|
1038
1038
|
let o = s.data;
|
|
1039
1039
|
const i = N.from(s.headers).normalize();
|
|
1040
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d,
|
|
1040
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, R, S, h;
|
|
1041
1041
|
function m() {
|
|
1042
|
-
|
|
1042
|
+
S && S(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1043
1043
|
}
|
|
1044
1044
|
let p = new XMLHttpRequest();
|
|
1045
1045
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1046
|
-
function
|
|
1046
|
+
function y() {
|
|
1047
1047
|
if (!p)
|
|
1048
1048
|
return;
|
|
1049
|
-
const
|
|
1049
|
+
const T = N.from(
|
|
1050
1050
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1051
1051
|
), A = {
|
|
1052
1052
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1053
1053
|
status: p.status,
|
|
1054
1054
|
statusText: p.statusText,
|
|
1055
|
-
headers:
|
|
1055
|
+
headers: T,
|
|
1056
1056
|
config: e,
|
|
1057
1057
|
request: p
|
|
1058
1058
|
};
|
|
@@ -1062,34 +1062,34 @@ const st = (e) => {
|
|
|
1062
1062
|
r(B), m();
|
|
1063
1063
|
}, A), p = null;
|
|
1064
1064
|
}
|
|
1065
|
-
"onloadend" in p ? p.onloadend =
|
|
1066
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1065
|
+
"onloadend" in p ? p.onloadend = y : p.onreadystatechange = function() {
|
|
1066
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
1067
1067
|
}, p.onabort = function() {
|
|
1068
|
-
p && (r(new
|
|
1068
|
+
p && (r(new E("Request aborted", E.ECONNABORTED, e, p)), p = null);
|
|
1069
1069
|
}, p.onerror = function() {
|
|
1070
|
-
r(new
|
|
1070
|
+
r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1071
1071
|
}, p.ontimeout = function() {
|
|
1072
|
-
let
|
|
1073
|
-
const A = s.transitional ||
|
|
1074
|
-
s.timeoutErrorMessage && (
|
|
1075
|
-
|
|
1076
|
-
A.clarifyTimeoutError ?
|
|
1072
|
+
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1073
|
+
const A = s.transitional || Qe;
|
|
1074
|
+
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new E(
|
|
1075
|
+
k,
|
|
1076
|
+
A.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1077
1077
|
e,
|
|
1078
1078
|
p
|
|
1079
1079
|
)), p = null;
|
|
1080
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1081
|
-
p.setRequestHeader(A,
|
|
1082
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([
|
|
1083
|
-
p && (r(!
|
|
1080
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(k, A) {
|
|
1081
|
+
p.setRequestHeader(A, k);
|
|
1082
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([R, h] = Q(u, !0), p.addEventListener("progress", R)), f && p.upload && ([d, S] = Q(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (T) => {
|
|
1083
|
+
p && (r(!T || T.type ? new G(null, e, p) : T), p.abort(), p = null);
|
|
1084
1084
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
r(new
|
|
1085
|
+
const w = In(s.url);
|
|
1086
|
+
if (w && O.protocols.indexOf(w) === -1) {
|
|
1087
|
+
r(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
p.send(o || null);
|
|
1091
1091
|
});
|
|
1092
|
-
},
|
|
1092
|
+
}, qn = (e, t) => {
|
|
1093
1093
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1094
1094
|
if (t || n) {
|
|
1095
1095
|
let r = new AbortController(), s;
|
|
@@ -1097,11 +1097,11 @@ const st = (e) => {
|
|
|
1097
1097
|
if (!s) {
|
|
1098
1098
|
s = !0, c();
|
|
1099
1099
|
const l = u instanceof Error ? u : this.reason;
|
|
1100
|
-
r.abort(l instanceof
|
|
1100
|
+
r.abort(l instanceof E ? l : new G(l instanceof Error ? l.message : l));
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
let i = t && setTimeout(() => {
|
|
1104
|
-
i = null, o(new
|
|
1104
|
+
i = null, o(new E(`timeout ${t} of ms exceeded`, E.ETIMEDOUT));
|
|
1105
1105
|
}, t);
|
|
1106
1106
|
const c = () => {
|
|
1107
1107
|
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
@@ -1112,7 +1112,7 @@ const st = (e) => {
|
|
|
1112
1112
|
const { signal: f } = r;
|
|
1113
1113
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1114
1114
|
}
|
|
1115
|
-
},
|
|
1115
|
+
}, Hn = function* (e, t) {
|
|
1116
1116
|
let n = e.byteLength;
|
|
1117
1117
|
if (n < t) {
|
|
1118
1118
|
yield e;
|
|
@@ -1121,10 +1121,10 @@ const st = (e) => {
|
|
|
1121
1121
|
let r = 0, s;
|
|
1122
1122
|
for (; r < n; )
|
|
1123
1123
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1124
|
-
},
|
|
1125
|
-
for await (const n of
|
|
1126
|
-
yield*
|
|
1127
|
-
},
|
|
1124
|
+
}, Mn = async function* (e, t) {
|
|
1125
|
+
for await (const n of jn(e))
|
|
1126
|
+
yield* Hn(n, t);
|
|
1127
|
+
}, jn = async function* (e) {
|
|
1128
1128
|
if (e[Symbol.asyncIterator]) {
|
|
1129
1129
|
yield* e;
|
|
1130
1130
|
return;
|
|
@@ -1140,8 +1140,8 @@ const st = (e) => {
|
|
|
1140
1140
|
} finally {
|
|
1141
1141
|
await t.cancel();
|
|
1142
1142
|
}
|
|
1143
|
-
},
|
|
1144
|
-
const s =
|
|
1143
|
+
}, xe = (e, t, n, r) => {
|
|
1144
|
+
const s = Mn(e, t);
|
|
1145
1145
|
let o = 0, i, c = (f) => {
|
|
1146
1146
|
i || (i = !0, r && r(f));
|
|
1147
1147
|
};
|
|
@@ -1155,8 +1155,8 @@ const st = (e) => {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
let d = l.byteLength;
|
|
1157
1157
|
if (n) {
|
|
1158
|
-
let
|
|
1159
|
-
n(
|
|
1158
|
+
let R = o += d;
|
|
1159
|
+
n(R);
|
|
1160
1160
|
}
|
|
1161
1161
|
f.enqueue(new Uint8Array(l));
|
|
1162
1162
|
} catch (u) {
|
|
@@ -1169,13 +1169,13 @@ const st = (e) => {
|
|
|
1169
1169
|
}, {
|
|
1170
1170
|
highWaterMark: 2
|
|
1171
1171
|
});
|
|
1172
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ot = ie && typeof ReadableStream == "function",
|
|
1172
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ot = ie && typeof ReadableStream == "function", zn = ie && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), it = (e, ...t) => {
|
|
1173
1173
|
try {
|
|
1174
1174
|
return !!e(...t);
|
|
1175
1175
|
} catch {
|
|
1176
1176
|
return !1;
|
|
1177
1177
|
}
|
|
1178
|
-
},
|
|
1178
|
+
}, Gn = ot && it(() => {
|
|
1179
1179
|
let e = !1;
|
|
1180
1180
|
const t = new Request(O.origin, {
|
|
1181
1181
|
body: new ReadableStream(),
|
|
@@ -1185,17 +1185,17 @@ const st = (e) => {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
}).headers.has("Content-Type");
|
|
1187
1187
|
return e && !t;
|
|
1188
|
-
}),
|
|
1188
|
+
}), Le = 64 * 1024, he = ot && it(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1189
1189
|
stream: he && ((e) => e.body)
|
|
1190
1190
|
};
|
|
1191
1191
|
ie && ((e) => {
|
|
1192
1192
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1193
1193
|
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1194
|
-
throw new
|
|
1194
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1195
1195
|
});
|
|
1196
1196
|
});
|
|
1197
1197
|
})(new Response());
|
|
1198
|
-
const
|
|
1198
|
+
const $n = async (e) => {
|
|
1199
1199
|
if (e == null)
|
|
1200
1200
|
return 0;
|
|
1201
1201
|
if (a.isBlob(e))
|
|
@@ -1208,11 +1208,11 @@ const zn = async (e) => {
|
|
|
1208
1208
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1209
1209
|
return e.byteLength;
|
|
1210
1210
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1211
|
-
return (await
|
|
1212
|
-
},
|
|
1211
|
+
return (await zn(e)).byteLength;
|
|
1212
|
+
}, Kn = async (e, t) => {
|
|
1213
1213
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1214
|
-
return n ??
|
|
1215
|
-
},
|
|
1214
|
+
return n ?? $n(t);
|
|
1215
|
+
}, Vn = ie && (async (e) => {
|
|
1216
1216
|
let {
|
|
1217
1217
|
url: t,
|
|
1218
1218
|
method: n,
|
|
@@ -1225,82 +1225,82 @@ const zn = async (e) => {
|
|
|
1225
1225
|
responseType: u,
|
|
1226
1226
|
headers: l,
|
|
1227
1227
|
withCredentials: d = "same-origin",
|
|
1228
|
-
fetchOptions:
|
|
1228
|
+
fetchOptions: R
|
|
1229
1229
|
} = st(e);
|
|
1230
1230
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1231
|
-
let
|
|
1232
|
-
const m =
|
|
1233
|
-
|
|
1231
|
+
let S = qn([s, o && o.toAbortSignal()], i), h;
|
|
1232
|
+
const m = S && S.unsubscribe && (() => {
|
|
1233
|
+
S.unsubscribe();
|
|
1234
1234
|
});
|
|
1235
1235
|
let p;
|
|
1236
1236
|
try {
|
|
1237
|
-
if (f &&
|
|
1237
|
+
if (f && Gn && n !== "get" && n !== "head" && (p = await Kn(l, r)) !== 0) {
|
|
1238
1238
|
let A = new Request(t, {
|
|
1239
1239
|
method: "POST",
|
|
1240
1240
|
body: r,
|
|
1241
1241
|
duplex: "half"
|
|
1242
|
-
}),
|
|
1243
|
-
if (a.isFormData(r) && (
|
|
1242
|
+
}), F;
|
|
1243
|
+
if (a.isFormData(r) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1244
1244
|
const [B, W] = Ce(
|
|
1245
1245
|
p,
|
|
1246
|
-
|
|
1246
|
+
Q(Ie(f))
|
|
1247
1247
|
);
|
|
1248
|
-
r =
|
|
1248
|
+
r = xe(A.body, Le, B, W);
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1252
|
-
const
|
|
1252
|
+
const y = "credentials" in Request.prototype;
|
|
1253
1253
|
h = new Request(t, {
|
|
1254
|
-
...
|
|
1255
|
-
signal:
|
|
1254
|
+
...R,
|
|
1255
|
+
signal: S,
|
|
1256
1256
|
method: n.toUpperCase(),
|
|
1257
1257
|
headers: l.normalize().toJSON(),
|
|
1258
1258
|
body: r,
|
|
1259
1259
|
duplex: "half",
|
|
1260
|
-
credentials:
|
|
1260
|
+
credentials: y ? d : void 0
|
|
1261
1261
|
});
|
|
1262
|
-
let
|
|
1263
|
-
const
|
|
1264
|
-
if (he && (c ||
|
|
1262
|
+
let w = await fetch(h);
|
|
1263
|
+
const T = he && (u === "stream" || u === "response");
|
|
1264
|
+
if (he && (c || T && m)) {
|
|
1265
1265
|
const A = {};
|
|
1266
|
-
["status", "statusText", "headers"].forEach((
|
|
1267
|
-
A[
|
|
1266
|
+
["status", "statusText", "headers"].forEach((we) => {
|
|
1267
|
+
A[we] = w[we];
|
|
1268
1268
|
});
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
|
|
1269
|
+
const F = a.toFiniteNumber(w.headers.get("content-length")), [B, W] = c && Ce(
|
|
1270
|
+
F,
|
|
1271
|
+
Q(Ie(c), !0)
|
|
1272
1272
|
) || [];
|
|
1273
|
-
|
|
1274
|
-
|
|
1273
|
+
w = new Response(
|
|
1274
|
+
xe(w.body, Le, B, () => {
|
|
1275
1275
|
W && W(), m && m();
|
|
1276
1276
|
}),
|
|
1277
1277
|
A
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
1280
1280
|
u = u || "text";
|
|
1281
|
-
let
|
|
1282
|
-
return !
|
|
1283
|
-
nt(A,
|
|
1284
|
-
data:
|
|
1285
|
-
headers: N.from(
|
|
1286
|
-
status:
|
|
1287
|
-
statusText:
|
|
1281
|
+
let k = await ee[a.findKey(ee, u) || "text"](w, e);
|
|
1282
|
+
return !T && m && m(), await new Promise((A, F) => {
|
|
1283
|
+
nt(A, F, {
|
|
1284
|
+
data: k,
|
|
1285
|
+
headers: N.from(w.headers),
|
|
1286
|
+
status: w.status,
|
|
1287
|
+
statusText: w.statusText,
|
|
1288
1288
|
config: e,
|
|
1289
1289
|
request: h
|
|
1290
1290
|
});
|
|
1291
1291
|
});
|
|
1292
|
-
} catch (
|
|
1293
|
-
throw m && m(),
|
|
1294
|
-
new
|
|
1292
|
+
} catch (y) {
|
|
1293
|
+
throw m && m(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
|
|
1294
|
+
new E("Network Error", E.ERR_NETWORK, e, h),
|
|
1295
1295
|
{
|
|
1296
|
-
cause:
|
|
1296
|
+
cause: y.cause || y
|
|
1297
1297
|
}
|
|
1298
|
-
) :
|
|
1298
|
+
) : E.from(y, y && y.code, e, h);
|
|
1299
1299
|
}
|
|
1300
1300
|
}), me = {
|
|
1301
|
-
http:
|
|
1302
|
-
xhr:
|
|
1303
|
-
fetch:
|
|
1301
|
+
http: an,
|
|
1302
|
+
xhr: Bn,
|
|
1303
|
+
fetch: Vn
|
|
1304
1304
|
};
|
|
1305
1305
|
a.forEach(me, (e, t) => {
|
|
1306
1306
|
if (e) {
|
|
@@ -1311,7 +1311,7 @@ a.forEach(me, (e, t) => {
|
|
|
1311
1311
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1312
1312
|
}
|
|
1313
1313
|
});
|
|
1314
|
-
const
|
|
1314
|
+
const ke = (e) => `- ${e}`, vn = (e) => a.isFunction(e) || e === null || e === !1, at = {
|
|
1315
1315
|
getAdapter: (e) => {
|
|
1316
1316
|
e = a.isArray(e) ? e : [e];
|
|
1317
1317
|
const { length: t } = e;
|
|
@@ -1321,7 +1321,7 @@ const Pe = (e) => `- ${e}`, vn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1321
1321
|
n = e[o];
|
|
1322
1322
|
let i;
|
|
1323
1323
|
if (r = n, !vn(n) && (r = me[(i = String(n)).toLowerCase()], r === void 0))
|
|
1324
|
-
throw new
|
|
1324
|
+
throw new E(`Unknown adapter '${i}'`);
|
|
1325
1325
|
if (r)
|
|
1326
1326
|
break;
|
|
1327
1327
|
s[i || "#" + o] = r;
|
|
@@ -1331,9 +1331,9 @@ const Pe = (e) => `- ${e}`, vn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1331
1331
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1332
1332
|
);
|
|
1333
1333
|
let i = t ? o.length > 1 ? `since :
|
|
1334
|
-
` + o.map(
|
|
1335
|
-
`) : " " +
|
|
1336
|
-
throw new
|
|
1334
|
+
` + o.map(ke).join(`
|
|
1335
|
+
`) : " " + ke(o[0]) : "as no adapter specified";
|
|
1336
|
+
throw new E(
|
|
1337
1337
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1338
1338
|
"ERR_NOT_SUPPORT"
|
|
1339
1339
|
);
|
|
@@ -1344,13 +1344,13 @@ const Pe = (e) => `- ${e}`, vn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1344
1344
|
};
|
|
1345
1345
|
function le(e) {
|
|
1346
1346
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1347
|
-
throw new
|
|
1347
|
+
throw new G(null, e);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Pe(e) {
|
|
1350
1350
|
return le(e), e.headers = N.from(e.headers), e.data = ue.call(
|
|
1351
1351
|
e,
|
|
1352
1352
|
e.transformRequest
|
|
1353
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), at.getAdapter(e.adapter ||
|
|
1353
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), at.getAdapter(e.adapter || J.adapter)(e).then(function(r) {
|
|
1354
1354
|
return le(e), r.data = ue.call(
|
|
1355
1355
|
e,
|
|
1356
1356
|
e.transformResponse,
|
|
@@ -1370,18 +1370,18 @@ const ct = "1.9.0", ae = {};
|
|
|
1370
1370
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1371
1371
|
};
|
|
1372
1372
|
});
|
|
1373
|
-
const
|
|
1373
|
+
const Fe = {};
|
|
1374
1374
|
ae.transitional = function(t, n, r) {
|
|
1375
1375
|
function s(o, i) {
|
|
1376
1376
|
return "[Axios v" + ct + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1377
1377
|
}
|
|
1378
1378
|
return (o, i, c) => {
|
|
1379
1379
|
if (t === !1)
|
|
1380
|
-
throw new
|
|
1380
|
+
throw new E(
|
|
1381
1381
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1382
|
-
|
|
1382
|
+
E.ERR_DEPRECATED
|
|
1383
1383
|
);
|
|
1384
|
-
return n && !
|
|
1384
|
+
return n && !Fe[i] && (Fe[i] = !0, console.warn(
|
|
1385
1385
|
s(
|
|
1386
1386
|
i,
|
|
1387
1387
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1392,9 +1392,9 @@ ae.transitional = function(t, n, r) {
|
|
|
1392
1392
|
ae.spelling = function(t) {
|
|
1393
1393
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1394
1394
|
};
|
|
1395
|
-
function
|
|
1395
|
+
function Jn(e, t, n) {
|
|
1396
1396
|
if (typeof e != "object")
|
|
1397
|
-
throw new
|
|
1397
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1398
1398
|
const r = Object.keys(e);
|
|
1399
1399
|
let s = r.length;
|
|
1400
1400
|
for (; s-- > 0; ) {
|
|
@@ -1402,18 +1402,18 @@ function Vn(e, t, n) {
|
|
|
1402
1402
|
if (i) {
|
|
1403
1403
|
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1404
1404
|
if (f !== !0)
|
|
1405
|
-
throw new
|
|
1405
|
+
throw new E("option " + o + " must be " + f, E.ERR_BAD_OPTION_VALUE);
|
|
1406
1406
|
continue;
|
|
1407
1407
|
}
|
|
1408
1408
|
if (n !== !0)
|
|
1409
|
-
throw new
|
|
1409
|
+
throw new E("Unknown option " + o, E.ERR_BAD_OPTION);
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
const Z = {
|
|
1413
|
-
assertOptions:
|
|
1413
|
+
assertOptions: Jn,
|
|
1414
1414
|
validators: ae
|
|
1415
|
-
},
|
|
1416
|
-
let
|
|
1415
|
+
}, L = Z.validators;
|
|
1416
|
+
let H = class {
|
|
1417
1417
|
constructor(t) {
|
|
1418
1418
|
this.defaults = t || {}, this.interceptors = {
|
|
1419
1419
|
request: new _e(),
|
|
@@ -1446,20 +1446,20 @@ let j = class {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
_request(t, n) {
|
|
1449
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1449
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1450
1450
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1451
1451
|
r !== void 0 && Z.assertOptions(r, {
|
|
1452
|
-
silentJSONParsing:
|
|
1453
|
-
forcedJSONParsing:
|
|
1454
|
-
clarifyTimeoutError:
|
|
1452
|
+
silentJSONParsing: L.transitional(L.boolean),
|
|
1453
|
+
forcedJSONParsing: L.transitional(L.boolean),
|
|
1454
|
+
clarifyTimeoutError: L.transitional(L.boolean)
|
|
1455
1455
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1456
1456
|
serialize: s
|
|
1457
1457
|
} : Z.assertOptions(s, {
|
|
1458
|
-
encode:
|
|
1459
|
-
serialize:
|
|
1458
|
+
encode: L.function,
|
|
1459
|
+
serialize: L.function
|
|
1460
1460
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
1461
|
-
baseUrl:
|
|
1462
|
-
withXsrfToken:
|
|
1461
|
+
baseUrl: L.spelling("baseURL"),
|
|
1462
|
+
withXsrfToken: L.spelling("withXSRFToken")
|
|
1463
1463
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1464
1464
|
let i = o && a.merge(
|
|
1465
1465
|
o.common,
|
|
@@ -1480,42 +1480,42 @@ let j = class {
|
|
|
1480
1480
|
this.interceptors.response.forEach(function(m) {
|
|
1481
1481
|
u.push(m.fulfilled, m.rejected);
|
|
1482
1482
|
});
|
|
1483
|
-
let l, d = 0,
|
|
1483
|
+
let l, d = 0, R;
|
|
1484
1484
|
if (!f) {
|
|
1485
|
-
const h = [
|
|
1486
|
-
for (h.unshift.apply(h, c), h.push.apply(h, u),
|
|
1485
|
+
const h = [Pe.bind(this), void 0];
|
|
1486
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), R = h.length, l = Promise.resolve(n); d < R; )
|
|
1487
1487
|
l = l.then(h[d++], h[d++]);
|
|
1488
1488
|
return l;
|
|
1489
1489
|
}
|
|
1490
|
-
|
|
1491
|
-
let
|
|
1492
|
-
for (d = 0; d <
|
|
1490
|
+
R = c.length;
|
|
1491
|
+
let S = n;
|
|
1492
|
+
for (d = 0; d < R; ) {
|
|
1493
1493
|
const h = c[d++], m = c[d++];
|
|
1494
1494
|
try {
|
|
1495
|
-
|
|
1495
|
+
S = h(S);
|
|
1496
1496
|
} catch (p) {
|
|
1497
1497
|
m.call(this, p);
|
|
1498
1498
|
break;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
try {
|
|
1502
|
-
l =
|
|
1502
|
+
l = Pe.call(this, S);
|
|
1503
1503
|
} catch (h) {
|
|
1504
1504
|
return Promise.reject(h);
|
|
1505
1505
|
}
|
|
1506
|
-
for (d = 0,
|
|
1506
|
+
for (d = 0, R = u.length; d < R; )
|
|
1507
1507
|
l = l.then(u[d++], u[d++]);
|
|
1508
1508
|
return l;
|
|
1509
1509
|
}
|
|
1510
1510
|
getUri(t) {
|
|
1511
|
-
t =
|
|
1511
|
+
t = M(this.defaults, t);
|
|
1512
1512
|
const n = rt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1513
1513
|
return Ze(n, t.params, t.paramsSerializer);
|
|
1514
1514
|
}
|
|
1515
1515
|
};
|
|
1516
1516
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1517
|
-
|
|
1518
|
-
return this.request(
|
|
1517
|
+
H.prototype[t] = function(n, r) {
|
|
1518
|
+
return this.request(M(r || {}, {
|
|
1519
1519
|
method: t,
|
|
1520
1520
|
url: n,
|
|
1521
1521
|
data: (r || {}).data
|
|
@@ -1525,7 +1525,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1525
1525
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1526
1526
|
function n(r) {
|
|
1527
1527
|
return function(o, i, c) {
|
|
1528
|
-
return this.request(
|
|
1528
|
+
return this.request(M(c || {}, {
|
|
1529
1529
|
method: t,
|
|
1530
1530
|
headers: r ? {
|
|
1531
1531
|
"Content-Type": "multipart/form-data"
|
|
@@ -1535,9 +1535,9 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1535
1535
|
}));
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
|
|
1538
|
+
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1539
1539
|
});
|
|
1540
|
-
let
|
|
1540
|
+
let Wn = class ut {
|
|
1541
1541
|
constructor(t) {
|
|
1542
1542
|
if (typeof t != "function")
|
|
1543
1543
|
throw new TypeError("executor must be a function.");
|
|
@@ -1561,7 +1561,7 @@ let Gn = class ut {
|
|
|
1561
1561
|
r.unsubscribe(o);
|
|
1562
1562
|
}, i;
|
|
1563
1563
|
}, t(function(o, i, c) {
|
|
1564
|
-
r.reason || (r.reason = new
|
|
1564
|
+
r.reason || (r.reason = new G(o, i, c), n(r.reason));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
/**
|
|
@@ -1610,15 +1610,15 @@ let Gn = class ut {
|
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
|
-
function
|
|
1613
|
+
function Xn(e) {
|
|
1614
1614
|
return function(n) {
|
|
1615
1615
|
return e.apply(null, n);
|
|
1616
1616
|
};
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function Yn(e) {
|
|
1619
1619
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1620
1620
|
}
|
|
1621
|
-
const
|
|
1621
|
+
const Ee = {
|
|
1622
1622
|
Continue: 100,
|
|
1623
1623
|
SwitchingProtocols: 101,
|
|
1624
1624
|
Processing: 102,
|
|
@@ -1683,61 +1683,61 @@ const ye = {
|
|
|
1683
1683
|
NotExtended: 510,
|
|
1684
1684
|
NetworkAuthenticationRequired: 511
|
|
1685
1685
|
};
|
|
1686
|
-
Object.entries(
|
|
1687
|
-
|
|
1686
|
+
Object.entries(Ee).forEach(([e, t]) => {
|
|
1687
|
+
Ee[t] = e;
|
|
1688
1688
|
});
|
|
1689
1689
|
function lt(e) {
|
|
1690
|
-
const t = new
|
|
1691
|
-
return a.extend(n,
|
|
1692
|
-
return lt(
|
|
1690
|
+
const t = new H(e), n = Me(H.prototype.request, t);
|
|
1691
|
+
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1692
|
+
return lt(M(e, s));
|
|
1693
1693
|
}, n;
|
|
1694
1694
|
}
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1695
|
+
const g = lt(J);
|
|
1696
|
+
g.Axios = H;
|
|
1697
|
+
g.CanceledError = G;
|
|
1698
|
+
g.CancelToken = Wn;
|
|
1699
|
+
g.isCancel = tt;
|
|
1700
|
+
g.VERSION = ct;
|
|
1701
|
+
g.toFormData = oe;
|
|
1702
|
+
g.AxiosError = E;
|
|
1703
|
+
g.Cancel = g.CanceledError;
|
|
1704
|
+
g.all = function(t) {
|
|
1705
1705
|
return Promise.all(t);
|
|
1706
1706
|
};
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1707
|
+
g.spread = Xn;
|
|
1708
|
+
g.isAxiosError = Yn;
|
|
1709
|
+
g.mergeConfig = M;
|
|
1710
|
+
g.AxiosHeaders = N;
|
|
1711
|
+
g.formToJSON = (e) => et(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1712
|
+
g.getAdapter = at.getAdapter;
|
|
1713
|
+
g.HttpStatusCode = Ee;
|
|
1714
|
+
g.default = g;
|
|
1715
1715
|
const {
|
|
1716
|
-
Axios:
|
|
1717
|
-
AxiosError:
|
|
1718
|
-
CanceledError:
|
|
1719
|
-
isCancel:
|
|
1720
|
-
CancelToken:
|
|
1721
|
-
VERSION:
|
|
1722
|
-
all:
|
|
1716
|
+
Axios: Ur,
|
|
1717
|
+
AxiosError: Zn,
|
|
1718
|
+
CanceledError: xr,
|
|
1719
|
+
isCancel: Lr,
|
|
1720
|
+
CancelToken: kr,
|
|
1721
|
+
VERSION: Pr,
|
|
1722
|
+
all: Fr,
|
|
1723
1723
|
Cancel: Dr,
|
|
1724
1724
|
isAxiosError: Br,
|
|
1725
1725
|
spread: qr,
|
|
1726
|
-
toFormData:
|
|
1727
|
-
AxiosHeaders:
|
|
1726
|
+
toFormData: Hr,
|
|
1727
|
+
AxiosHeaders: Mr,
|
|
1728
1728
|
HttpStatusCode: D,
|
|
1729
|
-
formToJSON:
|
|
1730
|
-
getAdapter:
|
|
1731
|
-
mergeConfig:
|
|
1732
|
-
} =
|
|
1729
|
+
formToJSON: jr,
|
|
1730
|
+
getAdapter: zr,
|
|
1731
|
+
mergeConfig: Gr
|
|
1732
|
+
} = g, ft = (e) => (e.baseURL = He(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.headers["client-id"] = localStorage.getItem(I.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Qn = (e) => (e.baseURL = mt(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.headers["client-id"] = localStorage.getItem(I.CLIENT_ID), e.headers["Api-Version"] = "1.0", e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), De = (e, t, n) => {
|
|
1733
1733
|
for (const r of e)
|
|
1734
1734
|
t ? r.rej(t) : r.res(n);
|
|
1735
|
-
},
|
|
1735
|
+
}, er = async (e) => new Promise((t, n) => {
|
|
1736
1736
|
setTimeout(t, e);
|
|
1737
|
-
}),
|
|
1737
|
+
}), tr = async (e, t) => (await er(t), e()), Be = (e, t) => {
|
|
1738
1738
|
var s, o;
|
|
1739
1739
|
let n = "", r = t;
|
|
1740
|
-
typeof t == "string" ? n = t : t instanceof
|
|
1740
|
+
typeof t == "string" ? n = t : t instanceof Zn ? (n = t.message, r = {
|
|
1741
1741
|
message: t.message,
|
|
1742
1742
|
cause: t.cause,
|
|
1743
1743
|
status: t.status,
|
|
@@ -1748,26 +1748,26 @@ const {
|
|
|
1748
1748
|
);
|
|
1749
1749
|
}, dt = async (e, t, n, r, s) => {
|
|
1750
1750
|
var f, u, l;
|
|
1751
|
-
const o = t.config, i = localStorage.getItem(
|
|
1751
|
+
const o = t.config, i = localStorage.getItem(I.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || D.InternalServerError;
|
|
1752
1752
|
if (!o || o.__retries === n)
|
|
1753
1753
|
throw t;
|
|
1754
|
-
if (c === D.Unauthorized && o.url !==
|
|
1754
|
+
if (c === D.Unauthorized && o.url !== b.REFRESH_EMBED_TOKEN && o.url !== b.REFRESH_TOKEN && o.url !== b.SIGN_IN && o.url !== b.SIGN_UP) {
|
|
1755
1755
|
if (!i)
|
|
1756
1756
|
throw Be(
|
|
1757
1757
|
"refresh_token",
|
|
1758
1758
|
"no refresh token found to reauthenticate user"
|
|
1759
1759
|
), t;
|
|
1760
1760
|
if (r)
|
|
1761
|
-
return new Promise((p,
|
|
1762
|
-
e.push({ res: p, rej:
|
|
1761
|
+
return new Promise((p, y) => {
|
|
1762
|
+
e.push({ res: p, rej: y });
|
|
1763
1763
|
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`), s(o))).catch((p) => {
|
|
1764
1764
|
throw p;
|
|
1765
1765
|
});
|
|
1766
1766
|
r = !0;
|
|
1767
|
-
const
|
|
1767
|
+
const R = localStorage.getItem(I.AUTH_FLOW) === Et.POST_MESSAGE ? qe.refreshEmbedToken : qe.refreshToken, { data: S, success: h, message: m } = await R(i);
|
|
1768
1768
|
if (!h)
|
|
1769
|
-
throw (u = o == null ? void 0 : o.url) != null && u.includes(
|
|
1770
|
-
return (l = o.url) != null && l.includes(
|
|
1769
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(b.EXCHANGE_TOKEN) || Be("refresh_token", m), r = !1, De(e, t), t;
|
|
1770
|
+
return (l = o.url) != null && l.includes(b.EXCHANGE_TOKEN) && "id_token" in S && (o.data = JSON.stringify({ idToken: S.id_token })), r = !1, o.headers && (o.headers.Authorization = `Bearer ${S.token}`), De(e, null, S.token), s(o);
|
|
1771
1771
|
}
|
|
1772
1772
|
if ([
|
|
1773
1773
|
D.BadRequest,
|
|
@@ -1778,31 +1778,31 @@ const {
|
|
|
1778
1778
|
D.NotFound
|
|
1779
1779
|
].includes(c) || (o.__retries || (o.__retries = 0), o.__retries += 1, o.__retries > n))
|
|
1780
1780
|
throw t;
|
|
1781
|
-
return
|
|
1781
|
+
return tr(
|
|
1782
1782
|
() => s(o),
|
|
1783
1783
|
Math.pow(10, o.__retries + 1) / 2
|
|
1784
1784
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1785
1785
|
);
|
|
1786
|
-
},
|
|
1787
|
-
|
|
1788
|
-
const C =
|
|
1786
|
+
}, nr = g.create();
|
|
1787
|
+
nr.interceptors.request.use((e) => (e.baseURL = He(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1788
|
+
const C = g.create();
|
|
1789
1789
|
C.interceptors.request.use((e) => (e = ft(e), e));
|
|
1790
|
-
const
|
|
1791
|
-
|
|
1792
|
-
const
|
|
1793
|
-
let
|
|
1794
|
-
const
|
|
1790
|
+
const rr = g.create();
|
|
1791
|
+
rr.interceptors.request.use((e) => (e = Qn(e), e));
|
|
1792
|
+
const sr = 3;
|
|
1793
|
+
let or = !1;
|
|
1794
|
+
const ir = [];
|
|
1795
1795
|
C.interceptors.response.use(
|
|
1796
1796
|
null,
|
|
1797
1797
|
(e) => dt(
|
|
1798
|
-
|
|
1798
|
+
ir,
|
|
1799
1799
|
e,
|
|
1800
|
-
rr,
|
|
1801
1800
|
sr,
|
|
1801
|
+
or,
|
|
1802
1802
|
C
|
|
1803
1803
|
)
|
|
1804
1804
|
);
|
|
1805
|
-
class
|
|
1805
|
+
class ar {
|
|
1806
1806
|
constructor() {
|
|
1807
1807
|
/**
|
|
1808
1808
|
* Logs in a user with the provided email and password.
|
|
@@ -1810,19 +1810,19 @@ class ir {
|
|
|
1810
1810
|
* @param params - The sign-in parameters containing email and password.
|
|
1811
1811
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1812
1812
|
*/
|
|
1813
|
-
|
|
1813
|
+
U(this, "login", async (t) => {
|
|
1814
1814
|
var n, r, s, o;
|
|
1815
1815
|
try {
|
|
1816
|
-
const { data: i } = await C.post(
|
|
1816
|
+
const { data: i } = await C.post(b.SIGN_IN, {
|
|
1817
1817
|
email_address: t.email,
|
|
1818
1818
|
password: t.password
|
|
1819
1819
|
}), c = await $.ensureQueryData({
|
|
1820
|
-
queryKey: [
|
|
1820
|
+
queryKey: [j.USER_REGIONS],
|
|
1821
1821
|
queryFn: this.getRegions
|
|
1822
|
-
}), f =
|
|
1823
|
-
return localStorage.setItem(
|
|
1822
|
+
}), f = P(i.data), u = (n = i.data) == null ? void 0 : n.accessToken;
|
|
1823
|
+
return localStorage.setItem(I.TOKEN, u), {
|
|
1824
1824
|
success: !0,
|
|
1825
|
-
data:
|
|
1825
|
+
data: P({
|
|
1826
1826
|
...i.data,
|
|
1827
1827
|
token: u,
|
|
1828
1828
|
user: {
|
|
@@ -1846,10 +1846,10 @@ class ir {
|
|
|
1846
1846
|
* @param params - The sign-up parameters containing email, password, and region.
|
|
1847
1847
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1848
1848
|
*/
|
|
1849
|
-
|
|
1849
|
+
U(this, "signUp", async (t) => {
|
|
1850
1850
|
var n, r, s, o, i;
|
|
1851
1851
|
try {
|
|
1852
|
-
const { data: c } = await C.post(
|
|
1852
|
+
const { data: c } = await C.post(b.SIGN_UP, {
|
|
1853
1853
|
user: {
|
|
1854
1854
|
email_address: t.email,
|
|
1855
1855
|
password: t.password,
|
|
@@ -1859,10 +1859,10 @@ class ir {
|
|
|
1859
1859
|
cancel_url: t.cancelUrl,
|
|
1860
1860
|
price_id: t.priceId
|
|
1861
1861
|
}), f = await $.ensureQueryData({
|
|
1862
|
-
queryKey: [
|
|
1862
|
+
queryKey: [j.USER_REGIONS],
|
|
1863
1863
|
queryFn: this.getRegions
|
|
1864
|
-
}), u =
|
|
1865
|
-
return localStorage.setItem(
|
|
1864
|
+
}), u = P(c.data), l = (n = c.data) == null ? void 0 : n.tokens.accessToken;
|
|
1865
|
+
return localStorage.setItem(I.TOKEN, l), {
|
|
1866
1866
|
success: !0,
|
|
1867
1867
|
data: {
|
|
1868
1868
|
token: l,
|
|
@@ -1882,17 +1882,17 @@ class ir {
|
|
|
1882
1882
|
};
|
|
1883
1883
|
}
|
|
1884
1884
|
});
|
|
1885
|
-
|
|
1885
|
+
U(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1886
1886
|
var r, s, o, i, c;
|
|
1887
1887
|
try {
|
|
1888
|
-
const { data: f } = await C.post(
|
|
1888
|
+
const { data: f } = await C.post(b.GOOGLE_AUTH, {
|
|
1889
1889
|
google_access_token: t,
|
|
1890
1890
|
user_region: n
|
|
1891
1891
|
}), u = await $.ensureQueryData({
|
|
1892
|
-
queryKey: [
|
|
1892
|
+
queryKey: [j.USER_REGIONS],
|
|
1893
1893
|
queryFn: this.getRegions
|
|
1894
|
-
}), l =
|
|
1895
|
-
return localStorage.setItem(
|
|
1894
|
+
}), l = P(f.data), d = (r = f.data) == null ? void 0 : r.tokens.accessToken;
|
|
1895
|
+
return localStorage.setItem(I.TOKEN, d), {
|
|
1896
1896
|
success: !0,
|
|
1897
1897
|
data: {
|
|
1898
1898
|
token: d,
|
|
@@ -1900,7 +1900,7 @@ class ir {
|
|
|
1900
1900
|
user: {
|
|
1901
1901
|
...l.user,
|
|
1902
1902
|
userRegion: u.find(
|
|
1903
|
-
(
|
|
1903
|
+
(R) => R.code === f.data.user.user_region
|
|
1904
1904
|
)
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
@@ -1912,11 +1912,11 @@ class ir {
|
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
1914
|
});
|
|
1915
|
-
|
|
1915
|
+
U(this, "resendVerificationEmail", async (t) => {
|
|
1916
1916
|
var n, r, s;
|
|
1917
1917
|
try {
|
|
1918
1918
|
return (await C.post(
|
|
1919
|
-
|
|
1919
|
+
b.RESEND_VERIFICATION_EMAIL,
|
|
1920
1920
|
{
|
|
1921
1921
|
email_address: t.email,
|
|
1922
1922
|
success_url: t.successUrl,
|
|
@@ -1937,20 +1937,20 @@ class ir {
|
|
|
1937
1937
|
* @param refreshToken - The refresh token for user
|
|
1938
1938
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1939
1939
|
*/
|
|
1940
|
-
|
|
1940
|
+
U(this, "authenticateWithToken", async (t, n, r) => {
|
|
1941
1941
|
var s, o, i;
|
|
1942
1942
|
try {
|
|
1943
1943
|
const { data: c } = await C.post(
|
|
1944
|
-
|
|
1945
|
-
|
|
1944
|
+
b.EXCHANGE_TOKEN,
|
|
1945
|
+
St({
|
|
1946
1946
|
idToken: t,
|
|
1947
1947
|
refreshToken: n,
|
|
1948
1948
|
exchangeTokenEndPoint: r
|
|
1949
1949
|
})
|
|
1950
1950
|
), f = await $.ensureQueryData({
|
|
1951
|
-
queryKey: [
|
|
1951
|
+
queryKey: [j.USER_REGIONS],
|
|
1952
1952
|
queryFn: this.getRegions
|
|
1953
|
-
}), u =
|
|
1953
|
+
}), u = P(c.data);
|
|
1954
1954
|
return {
|
|
1955
1955
|
success: !0,
|
|
1956
1956
|
data: {
|
|
@@ -1975,10 +1975,10 @@ class ir {
|
|
|
1975
1975
|
*
|
|
1976
1976
|
* @returns A promise that resolves to a service response containing the user details.
|
|
1977
1977
|
*/
|
|
1978
|
-
|
|
1978
|
+
U(this, "checkUser", async () => {
|
|
1979
1979
|
try {
|
|
1980
|
-
const { data: t } = await C.get(
|
|
1981
|
-
queryKey: [
|
|
1980
|
+
const { data: t } = await C.get(b.ME), n = await $.ensureQueryData({
|
|
1981
|
+
queryKey: [j.USER_REGIONS],
|
|
1982
1982
|
queryFn: this.getRegions
|
|
1983
1983
|
}), r = {
|
|
1984
1984
|
...t.data,
|
|
@@ -1988,7 +1988,7 @@ class ir {
|
|
|
1988
1988
|
};
|
|
1989
1989
|
return {
|
|
1990
1990
|
success: !0,
|
|
1991
|
-
data:
|
|
1991
|
+
data: P(r)
|
|
1992
1992
|
};
|
|
1993
1993
|
} catch (t) {
|
|
1994
1994
|
console.error(t);
|
|
@@ -2005,15 +2005,15 @@ class ir {
|
|
|
2005
2005
|
*
|
|
2006
2006
|
* @param refreshToken - The refresh token
|
|
2007
2007
|
*/
|
|
2008
|
-
|
|
2008
|
+
U(this, "refreshEmbedToken", async (t) => {
|
|
2009
2009
|
try {
|
|
2010
2010
|
const { data: n } = await C.post(
|
|
2011
|
-
|
|
2011
|
+
b.REFRESH_EMBED_TOKEN,
|
|
2012
2012
|
{
|
|
2013
2013
|
refreshToken: t
|
|
2014
2014
|
}
|
|
2015
2015
|
), r = n.data.token;
|
|
2016
|
-
return localStorage.setItem(
|
|
2016
|
+
return localStorage.setItem(I.TOKEN, r), {
|
|
2017
2017
|
success: !0,
|
|
2018
2018
|
data: n.data
|
|
2019
2019
|
};
|
|
@@ -2030,15 +2030,15 @@ class ir {
|
|
|
2030
2030
|
*
|
|
2031
2031
|
* @param refreshToken - The refresh token
|
|
2032
2032
|
*/
|
|
2033
|
-
|
|
2033
|
+
U(this, "refreshToken", async (t) => {
|
|
2034
2034
|
try {
|
|
2035
2035
|
const { data: n } = await C.post(
|
|
2036
|
-
|
|
2036
|
+
b.REFRESH_TOKEN,
|
|
2037
2037
|
{
|
|
2038
2038
|
refreshToken: t
|
|
2039
2039
|
}
|
|
2040
2040
|
), r = n.data.accessToken;
|
|
2041
|
-
return localStorage.setItem(
|
|
2041
|
+
return localStorage.setItem(I.TOKEN, r), {
|
|
2042
2042
|
success: !0,
|
|
2043
2043
|
data: {
|
|
2044
2044
|
...n.data,
|
|
@@ -2058,41 +2058,43 @@ class ir {
|
|
|
2058
2058
|
*
|
|
2059
2059
|
* @returns A promise that resolves to a service response containing the request limit data.
|
|
2060
2060
|
*/
|
|
2061
|
-
|
|
2061
|
+
U(this, "getRequestLimit", async () => (await C.get(b.REQUEST_LIMIT)).data);
|
|
2062
2062
|
/**
|
|
2063
2063
|
* Retrieves the regions available for user registration.
|
|
2064
2064
|
*
|
|
2065
2065
|
* @returns A promise that resolves to a service response containing the available regions.
|
|
2066
2066
|
*/
|
|
2067
|
-
|
|
2067
|
+
U(this, "getRegions", async () => {
|
|
2068
2068
|
var n;
|
|
2069
|
-
const t = await C.get(
|
|
2070
|
-
return
|
|
2069
|
+
const t = await C.get(b.REGIONS);
|
|
2070
|
+
return P((n = t.data) == null ? void 0 : n.data);
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
|
-
const qe = new
|
|
2075
|
-
|
|
2076
|
-
const
|
|
2077
|
-
let
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2074
|
+
const qe = new ar(), Re = g.create();
|
|
2075
|
+
Re.interceptors.request.use((e) => (e = ft(e), e));
|
|
2076
|
+
const cr = 1;
|
|
2077
|
+
let ur = !1;
|
|
2078
|
+
const lr = [];
|
|
2079
|
+
Re.interceptors.response.use(null, (e) => dt(lr, e, cr, ur, Re));
|
|
2080
2080
|
export {
|
|
2081
2081
|
qe as A,
|
|
2082
|
-
|
|
2083
|
-
|
|
2082
|
+
j as E,
|
|
2083
|
+
Re as a,
|
|
2084
|
+
P as b,
|
|
2084
2085
|
C as c,
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2086
|
+
yt as d,
|
|
2087
|
+
Zn as e,
|
|
2088
|
+
Te as f,
|
|
2089
|
+
rr as g,
|
|
2090
|
+
ft as h,
|
|
2091
|
+
nr as i,
|
|
2092
|
+
Qn as j,
|
|
2092
2093
|
er as k,
|
|
2093
|
-
|
|
2094
|
-
|
|
2094
|
+
tr as l,
|
|
2095
|
+
Be as m,
|
|
2096
|
+
dt as n,
|
|
2095
2097
|
De as p,
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
+
St as r,
|
|
2099
|
+
gt as t
|
|
2098
2100
|
};
|