@odynn/awayz-core 0.6.27 → 0.6.30
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-B9DbWoCe.js → AccountService-CysoI2i-.js} +689 -688
- package/dist/{TripsService-DJhDDtrv.js → TripsService-DLwg0lrN.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/configs/endpoints.js +1 -1
- package/dist/configs/msBaseUrl.js +8 -0
- package/dist/context/AwayzContext.js +4 -2
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +72 -0
- 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 +49 -48
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/configs/endpoints.d.ts +2 -1
- package/dist/lib/configs/msBaseUrl.d.ts +2 -0
- package/dist/lib/context/AwayzContext.d.ts +3 -0
- package/dist/lib/hooks/useFeatureFlags.d.ts +19 -0
- package/dist/lib/services/features/featureService.d.ts +8 -0
- package/dist/lib/services/instance.d.ts +1 -0
- package/dist/lib/services/instanceConfig.d.ts +50 -0
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +24 -20
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/features/featureService.js +27 -0
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +4 -3
- package/dist/services/instanceConfig.js +7 -5
- 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 +25 -25
- package/package.json +1 -1
|
@@ -1,111 +1,109 @@
|
|
|
1
1
|
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
|
-
var
|
|
3
|
+
var U = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { a as
|
|
5
|
+
import { a as I } from "./keys-BcBfU51M.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { awayzClient as $ } from "./configs/awayzClient.js";
|
|
8
|
-
import { EAuthEndpoints as
|
|
8
|
+
import { EAuthEndpoints as T } from "./configs/endpoints.js";
|
|
9
9
|
import { getBaseUrl as qe } from "./configs/baseUrl.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const s = pt(n);
|
|
16
|
-
return t[s] = L(e[n]), t;
|
|
10
|
+
import { getMsBaseUrl as dt } from "./configs/msBaseUrl.js";
|
|
11
|
+
import { EAuthFlow as pt } from "./types/EAuthFlow.js";
|
|
12
|
+
const P = (e) => Array.isArray(e) ? e.map((t) => P(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
13
|
+
const r = Et(n);
|
|
14
|
+
return t[r] = P(e[n]), t;
|
|
17
15
|
}, {}) : e;
|
|
18
16
|
function ht(e) {
|
|
19
17
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
20
18
|
}
|
|
21
19
|
const we = (e) => Array.isArray(e) ? e.map((t) => we(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
22
|
-
const
|
|
23
|
-
return t[
|
|
20
|
+
const r = ht(n);
|
|
21
|
+
return t[r] = we(e[n]), t;
|
|
24
22
|
}, {}) : e, mt = (e) => (Object.keys(e).forEach(
|
|
25
23
|
(t) => !e[t] && delete e[t]
|
|
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 || {}),
|
|
24
|
+
), e), Et = (e) => e.toLowerCase().replace(/_([a-z])/g, (t, n) => n.toUpperCase());
|
|
25
|
+
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 || {}), Rt = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(Rt || {});
|
|
28
26
|
function He(e, t) {
|
|
29
27
|
return function() {
|
|
30
28
|
return e.apply(t, arguments);
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
|
-
const { toString:
|
|
34
|
-
const n =
|
|
31
|
+
const { toString: St } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: te, toStringTag: Me } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
32
|
+
const n = St.call(t);
|
|
35
33
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
36
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
37
|
-
function
|
|
34
|
+
})(/* @__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");
|
|
35
|
+
function gt(e) {
|
|
38
36
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
39
37
|
}
|
|
40
|
-
const je =
|
|
41
|
-
function
|
|
38
|
+
const je = x("ArrayBuffer");
|
|
39
|
+
function yt(e) {
|
|
42
40
|
let t;
|
|
43
41
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
|
|
44
42
|
}
|
|
45
|
-
const
|
|
43
|
+
const wt = re("string"), _ = re("function"), ze = re("number"), se = (e) => e !== null && typeof e == "object", bt = (e) => e === !0 || e === !1, X = (e) => {
|
|
46
44
|
if (ne(e) !== "object")
|
|
47
45
|
return !1;
|
|
48
|
-
const t =
|
|
46
|
+
const t = Re(e);
|
|
49
47
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Me in e) && !(te in e);
|
|
50
|
-
}, Tt =
|
|
48
|
+
}, Tt = x("Date"), Ot = x("File"), At = x("Blob"), _t = x("FileList"), Nt = (e) => se(e) && _(e.pipe), Ct = (e) => {
|
|
51
49
|
let t;
|
|
52
50
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
53
51
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
54
|
-
},
|
|
52
|
+
}, It = x("URLSearchParams"), [Ut, xt, Lt, kt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
55
53
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
56
54
|
if (e === null || typeof e > "u")
|
|
57
55
|
return;
|
|
58
|
-
let
|
|
56
|
+
let r, s;
|
|
59
57
|
if (typeof e != "object" && (e = [e]), z(e))
|
|
60
|
-
for (
|
|
61
|
-
t.call(null, e[
|
|
58
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
59
|
+
t.call(null, e[r], r, e);
|
|
62
60
|
else {
|
|
63
61
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
64
62
|
let c;
|
|
65
|
-
for (
|
|
66
|
-
c = o[
|
|
63
|
+
for (r = 0; r < i; r++)
|
|
64
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
|
-
function
|
|
67
|
+
function Ge(e, t) {
|
|
70
68
|
t = t.toLowerCase();
|
|
71
69
|
const n = Object.keys(e);
|
|
72
|
-
let
|
|
73
|
-
for (;
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
70
|
+
let r = n.length, s;
|
|
71
|
+
for (; r-- > 0; )
|
|
72
|
+
if (s = n[r], t === s.toLowerCase())
|
|
73
|
+
return s;
|
|
76
74
|
return null;
|
|
77
75
|
}
|
|
78
76
|
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $e = (e) => !v(e) && e !== q;
|
|
79
77
|
function fe() {
|
|
80
|
-
const { caseless: e } = $e(this) && this || {}, t = {}, n = (
|
|
81
|
-
const o = e &&
|
|
82
|
-
X(t[o]) && X(
|
|
78
|
+
const { caseless: e } = $e(this) && this || {}, t = {}, n = (r, s) => {
|
|
79
|
+
const o = e && Ge(t, s) || s;
|
|
80
|
+
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;
|
|
83
81
|
};
|
|
84
|
-
for (let
|
|
85
|
-
arguments[
|
|
82
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
83
|
+
arguments[r] && V(arguments[r], n);
|
|
86
84
|
return t;
|
|
87
85
|
}
|
|
88
|
-
const
|
|
89
|
-
n && _(
|
|
90
|
-
}, { allOwnKeys:
|
|
91
|
-
e.prototype = Object.create(t.prototype,
|
|
86
|
+
const Ft = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
87
|
+
n && _(s) ? e[o] = He(s, n) : e[o] = s;
|
|
88
|
+
}, { allOwnKeys: r }), e), Dt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Bt = (e, t, n, r) => {
|
|
89
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
92
90
|
value: t.prototype
|
|
93
91
|
}), n && Object.assign(e.prototype, n);
|
|
94
|
-
},
|
|
95
|
-
let
|
|
92
|
+
}, qt = (e, t, n, r) => {
|
|
93
|
+
let s, o, i;
|
|
96
94
|
const c = {};
|
|
97
95
|
if (t = t || {}, e == null) return t;
|
|
98
96
|
do {
|
|
99
|
-
for (
|
|
100
|
-
i =
|
|
101
|
-
e = n !== !1 &&
|
|
97
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
98
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
99
|
+
e = n !== !1 && Re(e);
|
|
102
100
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
103
101
|
return t;
|
|
104
|
-
},
|
|
102
|
+
}, Ht = (e, t, n) => {
|
|
105
103
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
},
|
|
104
|
+
const r = e.indexOf(t, n);
|
|
105
|
+
return r !== -1 && r === n;
|
|
106
|
+
}, Mt = (e) => {
|
|
109
107
|
if (!e) return null;
|
|
110
108
|
if (z(e)) return e;
|
|
111
109
|
let t = e.length;
|
|
@@ -114,36 +112,36 @@ const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
114
112
|
for (; t-- > 0; )
|
|
115
113
|
n[t] = e[t];
|
|
116
114
|
return n;
|
|
117
|
-
},
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
for (; (
|
|
121
|
-
const o =
|
|
115
|
+
}, jt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), zt = (e, t) => {
|
|
116
|
+
const r = (e && e[te]).call(e);
|
|
117
|
+
let s;
|
|
118
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
119
|
+
const o = s.value;
|
|
122
120
|
t.call(e, o[0], o[1]);
|
|
123
121
|
}
|
|
124
|
-
},
|
|
122
|
+
}, Gt = (e, t) => {
|
|
125
123
|
let n;
|
|
126
|
-
const
|
|
124
|
+
const r = [];
|
|
127
125
|
for (; (n = e.exec(t)) !== null; )
|
|
128
|
-
|
|
129
|
-
return
|
|
130
|
-
},
|
|
126
|
+
r.push(n);
|
|
127
|
+
return r;
|
|
128
|
+
}, $t = x("HTMLFormElement"), Kt = (e) => e.toLowerCase().replace(
|
|
131
129
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
132
|
-
function(n,
|
|
133
|
-
return
|
|
130
|
+
function(n, r, s) {
|
|
131
|
+
return r.toUpperCase() + s;
|
|
134
132
|
}
|
|
135
|
-
),
|
|
136
|
-
const n = Object.getOwnPropertyDescriptors(e),
|
|
137
|
-
V(n, (
|
|
133
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), vt = x("RegExp"), Ke = (e, t) => {
|
|
134
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
135
|
+
V(n, (s, o) => {
|
|
138
136
|
let i;
|
|
139
|
-
(i = t(
|
|
140
|
-
}), Object.defineProperties(e,
|
|
141
|
-
},
|
|
142
|
-
|
|
137
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
138
|
+
}), Object.defineProperties(e, r);
|
|
139
|
+
}, Vt = (e) => {
|
|
140
|
+
Ke(e, (t, n) => {
|
|
143
141
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
144
142
|
return !1;
|
|
145
|
-
const
|
|
146
|
-
if (_(
|
|
143
|
+
const r = e[n];
|
|
144
|
+
if (_(r)) {
|
|
147
145
|
if (t.enumerable = !1, "writable" in t) {
|
|
148
146
|
t.writable = !1;
|
|
149
147
|
return;
|
|
@@ -153,103 +151,103 @@ const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
153
151
|
});
|
|
154
152
|
}
|
|
155
153
|
});
|
|
156
|
-
},
|
|
157
|
-
const n = {},
|
|
158
|
-
|
|
154
|
+
}, Jt = (e, t) => {
|
|
155
|
+
const n = {}, r = (s) => {
|
|
156
|
+
s.forEach((o) => {
|
|
159
157
|
n[o] = !0;
|
|
160
158
|
});
|
|
161
159
|
};
|
|
162
|
-
return z(e) ?
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
function
|
|
160
|
+
return z(e) ? r(e) : r(String(e).split(t)), n;
|
|
161
|
+
}, Wt = () => {
|
|
162
|
+
}, Xt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
163
|
+
function Yt(e) {
|
|
166
164
|
return !!(e && _(e.append) && e[Me] === "FormData" && e[te]);
|
|
167
165
|
}
|
|
168
|
-
const
|
|
169
|
-
const t = new Array(10), n = (
|
|
170
|
-
if (
|
|
171
|
-
if (t.indexOf(
|
|
166
|
+
const Zt = (e) => {
|
|
167
|
+
const t = new Array(10), n = (r, s) => {
|
|
168
|
+
if (se(r)) {
|
|
169
|
+
if (t.indexOf(r) >= 0)
|
|
172
170
|
return;
|
|
173
|
-
if (!("toJSON" in
|
|
174
|
-
t[
|
|
175
|
-
const o = z(
|
|
176
|
-
return V(
|
|
177
|
-
const f = n(i,
|
|
171
|
+
if (!("toJSON" in r)) {
|
|
172
|
+
t[s] = r;
|
|
173
|
+
const o = z(r) ? [] : {};
|
|
174
|
+
return V(r, (i, c) => {
|
|
175
|
+
const f = n(i, s + 1);
|
|
178
176
|
!v(f) && (o[c] = f);
|
|
179
|
-
}), t[
|
|
177
|
+
}), t[s] = void 0, o;
|
|
180
178
|
}
|
|
181
179
|
}
|
|
182
|
-
return
|
|
180
|
+
return r;
|
|
183
181
|
};
|
|
184
182
|
return n(e, 0);
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
}, !1), (
|
|
188
|
-
|
|
183
|
+
}, Qt = x("AsyncFunction"), en = (e) => e && (se(e) || _(e)) && _(e.then) && _(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
184
|
+
s === q && o === n && r.length && r.shift()();
|
|
185
|
+
}, !1), (s) => {
|
|
186
|
+
r.push(s), q.postMessage(n, "*");
|
|
189
187
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
190
188
|
typeof setImmediate == "function",
|
|
191
189
|
_(q.postMessage)
|
|
192
|
-
),
|
|
190
|
+
), tn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ve, nn = (e) => e != null && _(e[te]), a = {
|
|
193
191
|
isArray: z,
|
|
194
192
|
isArrayBuffer: je,
|
|
195
|
-
isBuffer:
|
|
196
|
-
isFormData:
|
|
197
|
-
isArrayBufferView:
|
|
198
|
-
isString:
|
|
193
|
+
isBuffer: gt,
|
|
194
|
+
isFormData: Ct,
|
|
195
|
+
isArrayBufferView: yt,
|
|
196
|
+
isString: wt,
|
|
199
197
|
isNumber: ze,
|
|
200
|
-
isBoolean:
|
|
201
|
-
isObject:
|
|
198
|
+
isBoolean: bt,
|
|
199
|
+
isObject: se,
|
|
202
200
|
isPlainObject: X,
|
|
203
|
-
isReadableStream:
|
|
204
|
-
isRequest:
|
|
205
|
-
isResponse:
|
|
206
|
-
isHeaders:
|
|
201
|
+
isReadableStream: Ut,
|
|
202
|
+
isRequest: xt,
|
|
203
|
+
isResponse: Lt,
|
|
204
|
+
isHeaders: kt,
|
|
207
205
|
isUndefined: v,
|
|
208
206
|
isDate: Tt,
|
|
209
|
-
isFile:
|
|
210
|
-
isBlob:
|
|
211
|
-
isRegExp:
|
|
207
|
+
isFile: Ot,
|
|
208
|
+
isBlob: At,
|
|
209
|
+
isRegExp: vt,
|
|
212
210
|
isFunction: _,
|
|
213
|
-
isStream:
|
|
214
|
-
isURLSearchParams:
|
|
215
|
-
isTypedArray:
|
|
216
|
-
isFileList:
|
|
211
|
+
isStream: Nt,
|
|
212
|
+
isURLSearchParams: It,
|
|
213
|
+
isTypedArray: jt,
|
|
214
|
+
isFileList: _t,
|
|
217
215
|
forEach: V,
|
|
218
216
|
merge: fe,
|
|
219
|
-
extend:
|
|
217
|
+
extend: Ft,
|
|
220
218
|
trim: Pt,
|
|
221
|
-
stripBOM:
|
|
222
|
-
inherits:
|
|
223
|
-
toFlatObject:
|
|
219
|
+
stripBOM: Dt,
|
|
220
|
+
inherits: Bt,
|
|
221
|
+
toFlatObject: qt,
|
|
224
222
|
kindOf: ne,
|
|
225
|
-
kindOfTest:
|
|
226
|
-
endsWith:
|
|
227
|
-
toArray:
|
|
228
|
-
forEachEntry:
|
|
229
|
-
matchAll:
|
|
230
|
-
isHTMLForm:
|
|
231
|
-
hasOwnProperty:
|
|
232
|
-
hasOwnProp:
|
|
223
|
+
kindOfTest: x,
|
|
224
|
+
endsWith: Ht,
|
|
225
|
+
toArray: Mt,
|
|
226
|
+
forEachEntry: zt,
|
|
227
|
+
matchAll: Gt,
|
|
228
|
+
isHTMLForm: $t,
|
|
229
|
+
hasOwnProperty: be,
|
|
230
|
+
hasOwnProp: be,
|
|
233
231
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
|
-
reduceDescriptors:
|
|
235
|
-
freezeMethods:
|
|
236
|
-
toObjectSet:
|
|
237
|
-
toCamelCase:
|
|
238
|
-
noop:
|
|
239
|
-
toFiniteNumber:
|
|
240
|
-
findKey:
|
|
232
|
+
reduceDescriptors: Ke,
|
|
233
|
+
freezeMethods: Vt,
|
|
234
|
+
toObjectSet: Jt,
|
|
235
|
+
toCamelCase: Kt,
|
|
236
|
+
noop: Wt,
|
|
237
|
+
toFiniteNumber: Xt,
|
|
238
|
+
findKey: Ge,
|
|
241
239
|
global: q,
|
|
242
240
|
isContextDefined: $e,
|
|
243
|
-
isSpecCompliantForm:
|
|
244
|
-
toJSONObject:
|
|
245
|
-
isAsyncFn:
|
|
246
|
-
isThenable:
|
|
241
|
+
isSpecCompliantForm: Yt,
|
|
242
|
+
toJSONObject: Zt,
|
|
243
|
+
isAsyncFn: Qt,
|
|
244
|
+
isThenable: en,
|
|
247
245
|
setImmediate: ve,
|
|
248
|
-
asap:
|
|
249
|
-
isIterable:
|
|
246
|
+
asap: tn,
|
|
247
|
+
isIterable: nn
|
|
250
248
|
};
|
|
251
|
-
function E(e, t, n,
|
|
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),
|
|
249
|
+
function E(e, t, n, r, s) {
|
|
250
|
+
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);
|
|
253
251
|
}
|
|
254
252
|
a.inherits(E, Error, {
|
|
255
253
|
toJSON: function() {
|
|
@@ -292,28 +290,28 @@ const Ve = E.prototype, Je = {};
|
|
|
292
290
|
});
|
|
293
291
|
Object.defineProperties(E, Je);
|
|
294
292
|
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
295
|
-
E.from = (e, t, n,
|
|
293
|
+
E.from = (e, t, n, r, s, o) => {
|
|
296
294
|
const i = Object.create(Ve);
|
|
297
295
|
return a.toFlatObject(e, i, function(f) {
|
|
298
296
|
return f !== Error.prototype;
|
|
299
|
-
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n,
|
|
297
|
+
}, (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;
|
|
300
298
|
};
|
|
301
|
-
const
|
|
299
|
+
const rn = null;
|
|
302
300
|
function de(e) {
|
|
303
301
|
return a.isPlainObject(e) || a.isArray(e);
|
|
304
302
|
}
|
|
305
303
|
function We(e) {
|
|
306
304
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
307
305
|
}
|
|
308
|
-
function
|
|
309
|
-
return e ? e.concat(t).map(function(
|
|
310
|
-
return
|
|
306
|
+
function Te(e, t, n) {
|
|
307
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
308
|
+
return s = We(s), !n && o ? "[" + s + "]" : s;
|
|
311
309
|
}).join(n ? "." : "") : t;
|
|
312
310
|
}
|
|
313
311
|
function sn(e) {
|
|
314
312
|
return a.isArray(e) && !e.some(de);
|
|
315
313
|
}
|
|
316
|
-
const
|
|
314
|
+
const on = a.toFlatObject(a, {}, null, function(t) {
|
|
317
315
|
return /^is[A-Z]/.test(t);
|
|
318
316
|
});
|
|
319
317
|
function oe(e, t, n) {
|
|
@@ -326,8 +324,8 @@ function oe(e, t, n) {
|
|
|
326
324
|
}, !1, function(m, p) {
|
|
327
325
|
return !a.isUndefined(p[m]);
|
|
328
326
|
});
|
|
329
|
-
const
|
|
330
|
-
if (!a.isFunction(
|
|
327
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
328
|
+
if (!a.isFunction(s))
|
|
331
329
|
throw new TypeError("visitor must be a function");
|
|
332
330
|
function u(h) {
|
|
333
331
|
if (h === null) return "";
|
|
@@ -338,44 +336,44 @@ function oe(e, t, n) {
|
|
|
338
336
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
339
337
|
}
|
|
340
338
|
function l(h, m, p) {
|
|
341
|
-
let
|
|
339
|
+
let g = h;
|
|
342
340
|
if (h && !p && typeof h == "object") {
|
|
343
341
|
if (a.endsWith(m, "{}"))
|
|
344
|
-
m =
|
|
345
|
-
else if (a.isArray(h) && sn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (
|
|
346
|
-
return m = We(m),
|
|
347
|
-
!(a.isUndefined(
|
|
342
|
+
m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
343
|
+
else if (a.isArray(h) && sn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (g = a.toArray(h)))
|
|
344
|
+
return m = We(m), g.forEach(function(b, k) {
|
|
345
|
+
!(a.isUndefined(b) || b === null) && t.append(
|
|
348
346
|
// eslint-disable-next-line no-nested-ternary
|
|
349
|
-
i === !0 ?
|
|
350
|
-
u(
|
|
347
|
+
i === !0 ? Te([m], k, o) : i === null ? m : m + "[]",
|
|
348
|
+
u(b)
|
|
351
349
|
);
|
|
352
350
|
}), !1;
|
|
353
351
|
}
|
|
354
|
-
return de(h) ? !0 : (t.append(
|
|
352
|
+
return de(h) ? !0 : (t.append(Te(p, m, o), u(h)), !1);
|
|
355
353
|
}
|
|
356
|
-
const d = [],
|
|
354
|
+
const d = [], R = Object.assign(on, {
|
|
357
355
|
defaultVisitor: l,
|
|
358
356
|
convertValue: u,
|
|
359
357
|
isVisitable: de
|
|
360
358
|
});
|
|
361
|
-
function
|
|
359
|
+
function S(h, m) {
|
|
362
360
|
if (!a.isUndefined(h)) {
|
|
363
361
|
if (d.indexOf(h) !== -1)
|
|
364
362
|
throw Error("Circular reference detected in " + m.join("."));
|
|
365
|
-
d.push(h), a.forEach(h, function(
|
|
366
|
-
(!(a.isUndefined(
|
|
363
|
+
d.push(h), a.forEach(h, function(g, w) {
|
|
364
|
+
(!(a.isUndefined(g) || g === null) && s.call(
|
|
367
365
|
t,
|
|
368
|
-
|
|
366
|
+
g,
|
|
369
367
|
a.isString(w) ? w.trim() : w,
|
|
370
368
|
m,
|
|
371
|
-
|
|
372
|
-
)) === !0 &&
|
|
369
|
+
R
|
|
370
|
+
)) === !0 && S(g, m ? m.concat(w) : [w]);
|
|
373
371
|
}), d.pop();
|
|
374
372
|
}
|
|
375
373
|
}
|
|
376
374
|
if (!a.isObject(e))
|
|
377
375
|
throw new TypeError("data must be an object");
|
|
378
|
-
return
|
|
376
|
+
return S(e), t;
|
|
379
377
|
}
|
|
380
378
|
function Oe(e) {
|
|
381
379
|
const t = {
|
|
@@ -387,38 +385,38 @@ function Oe(e) {
|
|
|
387
385
|
"%20": "+",
|
|
388
386
|
"%00": "\0"
|
|
389
387
|
};
|
|
390
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
391
|
-
return t[
|
|
388
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
389
|
+
return t[r];
|
|
392
390
|
});
|
|
393
391
|
}
|
|
394
|
-
function
|
|
392
|
+
function Se(e, t) {
|
|
395
393
|
this._pairs = [], e && oe(e, this, t);
|
|
396
394
|
}
|
|
397
|
-
const Xe =
|
|
395
|
+
const Xe = Se.prototype;
|
|
398
396
|
Xe.append = function(t, n) {
|
|
399
397
|
this._pairs.push([t, n]);
|
|
400
398
|
};
|
|
401
399
|
Xe.toString = function(t) {
|
|
402
|
-
const n = t ? function(
|
|
403
|
-
return t.call(this,
|
|
400
|
+
const n = t ? function(r) {
|
|
401
|
+
return t.call(this, r, Oe);
|
|
404
402
|
} : Oe;
|
|
405
|
-
return this._pairs.map(function(
|
|
406
|
-
return n(
|
|
403
|
+
return this._pairs.map(function(s) {
|
|
404
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
407
405
|
}, "").join("&");
|
|
408
406
|
};
|
|
409
|
-
function
|
|
407
|
+
function an(e) {
|
|
410
408
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
411
409
|
}
|
|
412
410
|
function Ye(e, t, n) {
|
|
413
411
|
if (!t)
|
|
414
412
|
return e;
|
|
415
|
-
const
|
|
413
|
+
const r = n && n.encode || an;
|
|
416
414
|
a.isFunction(n) && (n = {
|
|
417
415
|
serialize: n
|
|
418
416
|
});
|
|
419
|
-
const
|
|
417
|
+
const s = n && n.serialize;
|
|
420
418
|
let o;
|
|
421
|
-
if (
|
|
419
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Se(t, n).toString(r), o) {
|
|
422
420
|
const i = e.indexOf("#");
|
|
423
421
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
424
422
|
}
|
|
@@ -436,12 +434,12 @@ class Ae {
|
|
|
436
434
|
*
|
|
437
435
|
* @return {Number} An ID used to remove interceptor later
|
|
438
436
|
*/
|
|
439
|
-
use(t, n,
|
|
437
|
+
use(t, n, r) {
|
|
440
438
|
return this.handlers.push({
|
|
441
439
|
fulfilled: t,
|
|
442
440
|
rejected: n,
|
|
443
|
-
synchronous:
|
|
444
|
-
runWhen:
|
|
441
|
+
synchronous: r ? r.synchronous : !1,
|
|
442
|
+
runWhen: r ? r.runWhen : null
|
|
445
443
|
}), this.handlers.length - 1;
|
|
446
444
|
}
|
|
447
445
|
/**
|
|
@@ -473,8 +471,8 @@ class Ae {
|
|
|
473
471
|
* @returns {void}
|
|
474
472
|
*/
|
|
475
473
|
forEach(t) {
|
|
476
|
-
a.forEach(this.handlers, function(
|
|
477
|
-
|
|
474
|
+
a.forEach(this.handlers, function(r) {
|
|
475
|
+
r !== null && t(r);
|
|
478
476
|
});
|
|
479
477
|
}
|
|
480
478
|
}
|
|
@@ -482,67 +480,67 @@ const Ze = {
|
|
|
482
480
|
silentJSONParsing: !0,
|
|
483
481
|
forcedJSONParsing: !0,
|
|
484
482
|
clarifyTimeoutError: !1
|
|
485
|
-
},
|
|
483
|
+
}, cn = typeof URLSearchParams < "u" ? URLSearchParams : Se, un = typeof FormData < "u" ? FormData : null, ln = typeof Blob < "u" ? Blob : null, fn = {
|
|
486
484
|
isBrowser: !0,
|
|
487
485
|
classes: {
|
|
488
|
-
URLSearchParams:
|
|
489
|
-
FormData:
|
|
490
|
-
Blob:
|
|
486
|
+
URLSearchParams: cn,
|
|
487
|
+
FormData: un,
|
|
488
|
+
Blob: ln
|
|
491
489
|
},
|
|
492
490
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
493
|
-
},
|
|
494
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
491
|
+
}, ge = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, dn = ge && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
492
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", hn = ge && window.location.href || "http://localhost", mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
495
493
|
__proto__: null,
|
|
496
|
-
hasBrowserEnv:
|
|
497
|
-
hasStandardBrowserEnv:
|
|
498
|
-
hasStandardBrowserWebWorkerEnv:
|
|
494
|
+
hasBrowserEnv: ge,
|
|
495
|
+
hasStandardBrowserEnv: dn,
|
|
496
|
+
hasStandardBrowserWebWorkerEnv: pn,
|
|
499
497
|
navigator: pe,
|
|
500
|
-
origin:
|
|
498
|
+
origin: hn
|
|
501
499
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
502
|
-
...
|
|
503
|
-
...
|
|
500
|
+
...mn,
|
|
501
|
+
...fn
|
|
504
502
|
};
|
|
505
|
-
function
|
|
503
|
+
function En(e, t) {
|
|
506
504
|
return oe(e, new O.classes.URLSearchParams(), Object.assign({
|
|
507
|
-
visitor: function(n,
|
|
508
|
-
return O.isNode && a.isBuffer(n) ? (this.append(
|
|
505
|
+
visitor: function(n, r, s, o) {
|
|
506
|
+
return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
509
507
|
}
|
|
510
508
|
}, t));
|
|
511
509
|
}
|
|
512
|
-
function
|
|
510
|
+
function Rn(e) {
|
|
513
511
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
514
512
|
}
|
|
515
|
-
function
|
|
513
|
+
function Sn(e) {
|
|
516
514
|
const t = {}, n = Object.keys(e);
|
|
517
|
-
let
|
|
518
|
-
const
|
|
515
|
+
let r;
|
|
516
|
+
const s = n.length;
|
|
519
517
|
let o;
|
|
520
|
-
for (
|
|
521
|
-
o = n[
|
|
518
|
+
for (r = 0; r < s; r++)
|
|
519
|
+
o = n[r], t[o] = e[o];
|
|
522
520
|
return t;
|
|
523
521
|
}
|
|
524
522
|
function Qe(e) {
|
|
525
|
-
function t(n,
|
|
523
|
+
function t(n, r, s, o) {
|
|
526
524
|
let i = n[o++];
|
|
527
525
|
if (i === "__proto__") return !0;
|
|
528
526
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
529
|
-
return i = !i && a.isArray(
|
|
527
|
+
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] = Sn(s[i])), !c);
|
|
530
528
|
}
|
|
531
529
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
532
530
|
const n = {};
|
|
533
|
-
return a.forEachEntry(e, (
|
|
534
|
-
t(
|
|
531
|
+
return a.forEachEntry(e, (r, s) => {
|
|
532
|
+
t(Rn(r), s, n, 0);
|
|
535
533
|
}), n;
|
|
536
534
|
}
|
|
537
535
|
return null;
|
|
538
536
|
}
|
|
539
|
-
function
|
|
537
|
+
function gn(e, t, n) {
|
|
540
538
|
if (a.isString(e))
|
|
541
539
|
try {
|
|
542
540
|
return (t || JSON.parse)(e), a.trim(e);
|
|
543
|
-
} catch (
|
|
544
|
-
if (
|
|
545
|
-
throw
|
|
541
|
+
} catch (r) {
|
|
542
|
+
if (r.name !== "SyntaxError")
|
|
543
|
+
throw r;
|
|
546
544
|
}
|
|
547
545
|
return (n || JSON.stringify)(e);
|
|
548
546
|
}
|
|
@@ -550,9 +548,9 @@ const J = {
|
|
|
550
548
|
transitional: Ze,
|
|
551
549
|
adapter: ["xhr", "http", "fetch"],
|
|
552
550
|
transformRequest: [function(t, n) {
|
|
553
|
-
const
|
|
551
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
554
552
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
555
|
-
return
|
|
553
|
+
return s ? JSON.stringify(Qe(t)) : t;
|
|
556
554
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
557
555
|
return t;
|
|
558
556
|
if (a.isArrayBufferView(t))
|
|
@@ -561,9 +559,9 @@ const J = {
|
|
|
561
559
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
562
560
|
let c;
|
|
563
561
|
if (o) {
|
|
564
|
-
if (
|
|
565
|
-
return
|
|
566
|
-
if ((c = a.isFileList(t)) ||
|
|
562
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
563
|
+
return En(t, this.formSerializer).toString();
|
|
564
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
567
565
|
const f = this.env && this.env.FormData;
|
|
568
566
|
return oe(
|
|
569
567
|
c ? { "files[]": t } : t,
|
|
@@ -572,14 +570,14 @@ const J = {
|
|
|
572
570
|
);
|
|
573
571
|
}
|
|
574
572
|
}
|
|
575
|
-
return o ||
|
|
573
|
+
return o || s ? (n.setContentType("application/json", !1), gn(t)) : t;
|
|
576
574
|
}],
|
|
577
575
|
transformResponse: [function(t) {
|
|
578
|
-
const n = this.transitional || J.transitional,
|
|
576
|
+
const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
579
577
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
580
578
|
return t;
|
|
581
|
-
if (t && a.isString(t) && (
|
|
582
|
-
const i = !(n && n.silentJSONParsing) &&
|
|
579
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
580
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
583
581
|
try {
|
|
584
582
|
return JSON.parse(t);
|
|
585
583
|
} catch (c) {
|
|
@@ -615,7 +613,7 @@ const J = {
|
|
|
615
613
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
616
614
|
J.headers[e] = {};
|
|
617
615
|
});
|
|
618
|
-
const
|
|
616
|
+
const yn = a.toObjectSet([
|
|
619
617
|
"age",
|
|
620
618
|
"authorization",
|
|
621
619
|
"content-length",
|
|
@@ -633,47 +631,47 @@ const Sn = a.toObjectSet([
|
|
|
633
631
|
"referer",
|
|
634
632
|
"retry-after",
|
|
635
633
|
"user-agent"
|
|
636
|
-
]),
|
|
634
|
+
]), wn = (e) => {
|
|
637
635
|
const t = {};
|
|
638
|
-
let n,
|
|
636
|
+
let n, r, s;
|
|
639
637
|
return e && e.split(`
|
|
640
638
|
`).forEach(function(i) {
|
|
641
|
-
|
|
639
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && yn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
642
640
|
}), t;
|
|
643
641
|
}, _e = Symbol("internals");
|
|
644
|
-
function
|
|
642
|
+
function K(e) {
|
|
645
643
|
return e && String(e).trim().toLowerCase();
|
|
646
644
|
}
|
|
647
645
|
function Y(e) {
|
|
648
646
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
649
647
|
}
|
|
650
|
-
function
|
|
648
|
+
function bn(e) {
|
|
651
649
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
652
|
-
let
|
|
653
|
-
for (;
|
|
654
|
-
t[
|
|
650
|
+
let r;
|
|
651
|
+
for (; r = n.exec(e); )
|
|
652
|
+
t[r[1]] = r[2];
|
|
655
653
|
return t;
|
|
656
654
|
}
|
|
657
655
|
const Tn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
658
|
-
function ce(e, t, n,
|
|
659
|
-
if (a.isFunction(
|
|
660
|
-
return
|
|
661
|
-
if (
|
|
662
|
-
if (a.isString(
|
|
663
|
-
return t.indexOf(
|
|
664
|
-
if (a.isRegExp(
|
|
665
|
-
return
|
|
656
|
+
function ce(e, t, n, r, s) {
|
|
657
|
+
if (a.isFunction(r))
|
|
658
|
+
return r.call(this, t, n);
|
|
659
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
660
|
+
if (a.isString(r))
|
|
661
|
+
return t.indexOf(r) !== -1;
|
|
662
|
+
if (a.isRegExp(r))
|
|
663
|
+
return r.test(t);
|
|
666
664
|
}
|
|
667
665
|
}
|
|
668
|
-
function
|
|
669
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n,
|
|
666
|
+
function On(e) {
|
|
667
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
670
668
|
}
|
|
671
|
-
function
|
|
669
|
+
function An(e, t) {
|
|
672
670
|
const n = a.toCamelCase(" " + t);
|
|
673
|
-
["get", "set", "has"].forEach((
|
|
674
|
-
Object.defineProperty(e,
|
|
675
|
-
value: function(
|
|
676
|
-
return this[
|
|
671
|
+
["get", "set", "has"].forEach((r) => {
|
|
672
|
+
Object.defineProperty(e, r + n, {
|
|
673
|
+
value: function(s, o, i) {
|
|
674
|
+
return this[r].call(this, t, s, o, i);
|
|
677
675
|
},
|
|
678
676
|
configurable: !0
|
|
679
677
|
});
|
|
@@ -683,20 +681,20 @@ let N = class {
|
|
|
683
681
|
constructor(t) {
|
|
684
682
|
t && this.set(t);
|
|
685
683
|
}
|
|
686
|
-
set(t, n,
|
|
687
|
-
const
|
|
684
|
+
set(t, n, r) {
|
|
685
|
+
const s = this;
|
|
688
686
|
function o(c, f, u) {
|
|
689
|
-
const l =
|
|
687
|
+
const l = K(f);
|
|
690
688
|
if (!l)
|
|
691
689
|
throw new Error("header name must be a non-empty string");
|
|
692
|
-
const d = a.findKey(
|
|
693
|
-
(!d ||
|
|
690
|
+
const d = a.findKey(s, l);
|
|
691
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Y(c));
|
|
694
692
|
}
|
|
695
693
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
696
694
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
697
695
|
i(t, n);
|
|
698
696
|
else if (a.isString(t) && (t = t.trim()) && !Tn(t))
|
|
699
|
-
i(
|
|
697
|
+
i(wn(t), n);
|
|
700
698
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
701
699
|
let c = {}, f, u;
|
|
702
700
|
for (const l of t) {
|
|
@@ -706,63 +704,63 @@ let N = class {
|
|
|
706
704
|
}
|
|
707
705
|
i(c, n);
|
|
708
706
|
} else
|
|
709
|
-
t != null && o(n, t,
|
|
707
|
+
t != null && o(n, t, r);
|
|
710
708
|
return this;
|
|
711
709
|
}
|
|
712
710
|
get(t, n) {
|
|
713
|
-
if (t =
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const
|
|
711
|
+
if (t = K(t), t) {
|
|
712
|
+
const r = a.findKey(this, t);
|
|
713
|
+
if (r) {
|
|
714
|
+
const s = this[r];
|
|
717
715
|
if (!n)
|
|
718
|
-
return
|
|
716
|
+
return s;
|
|
719
717
|
if (n === !0)
|
|
720
|
-
return
|
|
718
|
+
return bn(s);
|
|
721
719
|
if (a.isFunction(n))
|
|
722
|
-
return n.call(this,
|
|
720
|
+
return n.call(this, s, r);
|
|
723
721
|
if (a.isRegExp(n))
|
|
724
|
-
return n.exec(
|
|
722
|
+
return n.exec(s);
|
|
725
723
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
726
724
|
}
|
|
727
725
|
}
|
|
728
726
|
}
|
|
729
727
|
has(t, n) {
|
|
730
|
-
if (t =
|
|
731
|
-
const
|
|
732
|
-
return !!(
|
|
728
|
+
if (t = K(t), t) {
|
|
729
|
+
const r = a.findKey(this, t);
|
|
730
|
+
return !!(r && this[r] !== void 0 && (!n || ce(this, this[r], r, n)));
|
|
733
731
|
}
|
|
734
732
|
return !1;
|
|
735
733
|
}
|
|
736
734
|
delete(t, n) {
|
|
737
|
-
const
|
|
738
|
-
let
|
|
735
|
+
const r = this;
|
|
736
|
+
let s = !1;
|
|
739
737
|
function o(i) {
|
|
740
|
-
if (i =
|
|
741
|
-
const c = a.findKey(
|
|
742
|
-
c && (!n || ce(
|
|
738
|
+
if (i = K(i), i) {
|
|
739
|
+
const c = a.findKey(r, i);
|
|
740
|
+
c && (!n || ce(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
743
741
|
}
|
|
744
742
|
}
|
|
745
|
-
return a.isArray(t) ? t.forEach(o) : o(t),
|
|
743
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
746
744
|
}
|
|
747
745
|
clear(t) {
|
|
748
746
|
const n = Object.keys(this);
|
|
749
|
-
let
|
|
750
|
-
for (;
|
|
751
|
-
const o = n[
|
|
752
|
-
(!t || ce(this, this[o], o, t, !0)) && (delete this[o],
|
|
747
|
+
let r = n.length, s = !1;
|
|
748
|
+
for (; r--; ) {
|
|
749
|
+
const o = n[r];
|
|
750
|
+
(!t || ce(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
753
751
|
}
|
|
754
|
-
return
|
|
752
|
+
return s;
|
|
755
753
|
}
|
|
756
754
|
normalize(t) {
|
|
757
|
-
const n = this,
|
|
758
|
-
return a.forEach(this, (
|
|
759
|
-
const i = a.findKey(
|
|
755
|
+
const n = this, r = {};
|
|
756
|
+
return a.forEach(this, (s, o) => {
|
|
757
|
+
const i = a.findKey(r, o);
|
|
760
758
|
if (i) {
|
|
761
|
-
n[i] = Y(
|
|
759
|
+
n[i] = Y(s), delete n[o];
|
|
762
760
|
return;
|
|
763
761
|
}
|
|
764
|
-
const c = t ?
|
|
765
|
-
c !== o && delete n[o], n[c] = Y(
|
|
762
|
+
const c = t ? On(o) : String(o).trim();
|
|
763
|
+
c !== o && delete n[o], n[c] = Y(s), r[c] = !0;
|
|
766
764
|
}), this;
|
|
767
765
|
}
|
|
768
766
|
concat(...t) {
|
|
@@ -770,8 +768,8 @@ let N = class {
|
|
|
770
768
|
}
|
|
771
769
|
toJSON(t) {
|
|
772
770
|
const n = /* @__PURE__ */ Object.create(null);
|
|
773
|
-
return a.forEach(this, (
|
|
774
|
-
|
|
771
|
+
return a.forEach(this, (r, s) => {
|
|
772
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
775
773
|
}), n;
|
|
776
774
|
}
|
|
777
775
|
[Symbol.iterator]() {
|
|
@@ -791,16 +789,16 @@ let N = class {
|
|
|
791
789
|
return t instanceof this ? t : new this(t);
|
|
792
790
|
}
|
|
793
791
|
static concat(t, ...n) {
|
|
794
|
-
const
|
|
795
|
-
return n.forEach((
|
|
792
|
+
const r = new this(t);
|
|
793
|
+
return n.forEach((s) => r.set(s)), r;
|
|
796
794
|
}
|
|
797
795
|
static accessor(t) {
|
|
798
|
-
const
|
|
796
|
+
const r = (this[_e] = this[_e] = {
|
|
799
797
|
accessors: {}
|
|
800
|
-
}).accessors,
|
|
798
|
+
}).accessors, s = this.prototype;
|
|
801
799
|
function o(i) {
|
|
802
|
-
const c =
|
|
803
|
-
|
|
800
|
+
const c = K(i);
|
|
801
|
+
r[c] || (An(s, i), r[c] = !0);
|
|
804
802
|
}
|
|
805
803
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
806
804
|
}
|
|
@@ -810,31 +808,31 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
810
808
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
811
809
|
return {
|
|
812
810
|
get: () => e,
|
|
813
|
-
set(
|
|
814
|
-
this[n] =
|
|
811
|
+
set(r) {
|
|
812
|
+
this[n] = r;
|
|
815
813
|
}
|
|
816
814
|
};
|
|
817
815
|
});
|
|
818
816
|
a.freezeMethods(N);
|
|
819
817
|
function ue(e, t) {
|
|
820
|
-
const n = this || J,
|
|
821
|
-
let o =
|
|
818
|
+
const n = this || J, r = t || n, s = N.from(r.headers);
|
|
819
|
+
let o = r.data;
|
|
822
820
|
return a.forEach(e, function(c) {
|
|
823
|
-
o = c.call(n, o,
|
|
824
|
-
}),
|
|
821
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
822
|
+
}), s.normalize(), o;
|
|
825
823
|
}
|
|
826
824
|
function et(e) {
|
|
827
825
|
return !!(e && e.__CANCEL__);
|
|
828
826
|
}
|
|
829
|
-
function
|
|
827
|
+
function G(e, t, n) {
|
|
830
828
|
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
831
829
|
}
|
|
832
|
-
a.inherits(
|
|
830
|
+
a.inherits(G, E, {
|
|
833
831
|
__CANCEL__: !0
|
|
834
832
|
});
|
|
835
833
|
function tt(e, t, n) {
|
|
836
|
-
const
|
|
837
|
-
!n.status || !
|
|
834
|
+
const r = n.config.validateStatus;
|
|
835
|
+
!n.status || !r || r(n.status) ? e(n) : t(new E(
|
|
838
836
|
"Request failed with status code " + n.status,
|
|
839
837
|
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
840
838
|
n.config,
|
|
@@ -842,44 +840,44 @@ function tt(e, t, n) {
|
|
|
842
840
|
n
|
|
843
841
|
));
|
|
844
842
|
}
|
|
845
|
-
function
|
|
843
|
+
function _n(e) {
|
|
846
844
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
847
845
|
return t && t[1] || "";
|
|
848
846
|
}
|
|
849
|
-
function
|
|
847
|
+
function Nn(e, t) {
|
|
850
848
|
e = e || 10;
|
|
851
|
-
const n = new Array(e),
|
|
852
|
-
let
|
|
849
|
+
const n = new Array(e), r = new Array(e);
|
|
850
|
+
let s = 0, o = 0, i;
|
|
853
851
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
854
|
-
const u = Date.now(), l =
|
|
855
|
-
i || (i = u), n[
|
|
856
|
-
let d = o,
|
|
857
|
-
for (; d !==
|
|
858
|
-
|
|
859
|
-
if (
|
|
852
|
+
const u = Date.now(), l = r[o];
|
|
853
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
854
|
+
let d = o, R = 0;
|
|
855
|
+
for (; d !== s; )
|
|
856
|
+
R += n[d++], d = d % e;
|
|
857
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
860
858
|
return;
|
|
861
|
-
const
|
|
862
|
-
return
|
|
859
|
+
const S = l && u - l;
|
|
860
|
+
return S ? Math.round(R * 1e3 / S) : void 0;
|
|
863
861
|
};
|
|
864
862
|
}
|
|
865
|
-
function
|
|
866
|
-
let n = 0,
|
|
863
|
+
function Cn(e, t) {
|
|
864
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
867
865
|
const i = (u, l = Date.now()) => {
|
|
868
|
-
n = l,
|
|
866
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
869
867
|
};
|
|
870
868
|
return [(...u) => {
|
|
871
869
|
const l = Date.now(), d = l - n;
|
|
872
|
-
d >=
|
|
873
|
-
o = null, i(
|
|
874
|
-
},
|
|
875
|
-
}, () =>
|
|
870
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
871
|
+
o = null, i(s);
|
|
872
|
+
}, r - d)));
|
|
873
|
+
}, () => s && i(s)];
|
|
876
874
|
}
|
|
877
875
|
const Q = (e, t, n = 3) => {
|
|
878
|
-
let
|
|
879
|
-
const
|
|
880
|
-
return
|
|
881
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i -
|
|
882
|
-
|
|
876
|
+
let r = 0;
|
|
877
|
+
const s = Nn(50, 250);
|
|
878
|
+
return Cn((o) => {
|
|
879
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
880
|
+
r = i;
|
|
883
881
|
const d = {
|
|
884
882
|
loaded: i,
|
|
885
883
|
total: c,
|
|
@@ -895,20 +893,20 @@ const Q = (e, t, n = 3) => {
|
|
|
895
893
|
}, n);
|
|
896
894
|
}, Ne = (e, t) => {
|
|
897
895
|
const n = e != null;
|
|
898
|
-
return [(
|
|
896
|
+
return [(r) => t[0]({
|
|
899
897
|
lengthComputable: n,
|
|
900
898
|
total: e,
|
|
901
|
-
loaded:
|
|
899
|
+
loaded: r
|
|
902
900
|
}), t[1]];
|
|
903
|
-
}, Ce = (e) => (...t) => a.asap(() => e(...t)),
|
|
901
|
+
}, Ce = (e) => (...t) => a.asap(() => e(...t)), In = 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
902
|
new URL(O.origin),
|
|
905
903
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
906
|
-
) : () => !0,
|
|
904
|
+
) : () => !0, Un = O.hasStandardBrowserEnv ? (
|
|
907
905
|
// Standard browser envs support document.cookie
|
|
908
906
|
{
|
|
909
|
-
write(e, t, n,
|
|
907
|
+
write(e, t, n, r, s, o) {
|
|
910
908
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
911
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(
|
|
909
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
912
910
|
},
|
|
913
911
|
read(e) {
|
|
914
912
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -930,44 +928,44 @@ const Q = (e, t, n = 3) => {
|
|
|
930
928
|
}
|
|
931
929
|
}
|
|
932
930
|
);
|
|
933
|
-
function
|
|
931
|
+
function xn(e) {
|
|
934
932
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
933
|
}
|
|
936
|
-
function
|
|
934
|
+
function Ln(e, t) {
|
|
937
935
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
936
|
}
|
|
939
937
|
function nt(e, t, n) {
|
|
940
|
-
let
|
|
941
|
-
return e && (
|
|
938
|
+
let r = !xn(t);
|
|
939
|
+
return e && (r || n == !1) ? Ln(e, t) : t;
|
|
942
940
|
}
|
|
943
|
-
const
|
|
941
|
+
const Ie = (e) => e instanceof N ? { ...e } : e;
|
|
944
942
|
function M(e, t) {
|
|
945
943
|
t = t || {};
|
|
946
944
|
const n = {};
|
|
947
|
-
function
|
|
948
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
945
|
+
function r(u, l, d, R) {
|
|
946
|
+
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;
|
|
949
947
|
}
|
|
950
|
-
function
|
|
948
|
+
function s(u, l, d, R) {
|
|
951
949
|
if (a.isUndefined(l)) {
|
|
952
950
|
if (!a.isUndefined(u))
|
|
953
|
-
return
|
|
954
|
-
} else return
|
|
951
|
+
return r(void 0, u, d, R);
|
|
952
|
+
} else return r(u, l, d, R);
|
|
955
953
|
}
|
|
956
954
|
function o(u, l) {
|
|
957
955
|
if (!a.isUndefined(l))
|
|
958
|
-
return
|
|
956
|
+
return r(void 0, l);
|
|
959
957
|
}
|
|
960
958
|
function i(u, l) {
|
|
961
959
|
if (a.isUndefined(l)) {
|
|
962
960
|
if (!a.isUndefined(u))
|
|
963
|
-
return
|
|
964
|
-
} else return
|
|
961
|
+
return r(void 0, u);
|
|
962
|
+
} else return r(void 0, l);
|
|
965
963
|
}
|
|
966
964
|
function c(u, l, d) {
|
|
967
965
|
if (d in t)
|
|
968
|
-
return
|
|
966
|
+
return r(u, l);
|
|
969
967
|
if (d in e)
|
|
970
|
-
return
|
|
968
|
+
return r(void 0, u);
|
|
971
969
|
}
|
|
972
970
|
const f = {
|
|
973
971
|
url: o,
|
|
@@ -998,16 +996,16 @@ function M(e, t) {
|
|
|
998
996
|
socketPath: i,
|
|
999
997
|
responseEncoding: i,
|
|
1000
998
|
validateStatus: c,
|
|
1001
|
-
headers: (u, l, d) =>
|
|
999
|
+
headers: (u, l, d) => s(Ie(u), Ie(l), d, !0)
|
|
1002
1000
|
};
|
|
1003
1001
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1004
|
-
const d = f[l] ||
|
|
1005
|
-
a.isUndefined(
|
|
1002
|
+
const d = f[l] || s, R = d(e[l], t[l], l);
|
|
1003
|
+
a.isUndefined(R) && d !== c || (n[l] = R);
|
|
1006
1004
|
}), n;
|
|
1007
1005
|
}
|
|
1008
|
-
const
|
|
1006
|
+
const rt = (e) => {
|
|
1009
1007
|
const t = M({}, e);
|
|
1010
|
-
let { data: n, withXSRFToken:
|
|
1008
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1011
1009
|
t.headers = i = N.from(i), t.url = Ye(nt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1012
1010
|
"Authorization",
|
|
1013
1011
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1021,77 +1019,77 @@ const st = (e) => {
|
|
|
1021
1019
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1022
1020
|
}
|
|
1023
1021
|
}
|
|
1024
|
-
if (O.hasStandardBrowserEnv && (
|
|
1025
|
-
const u =
|
|
1026
|
-
u && i.set(
|
|
1022
|
+
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && In(t.url))) {
|
|
1023
|
+
const u = s && o && Un.read(o);
|
|
1024
|
+
u && i.set(s, u);
|
|
1027
1025
|
}
|
|
1028
1026
|
return t;
|
|
1029
|
-
},
|
|
1030
|
-
return new Promise(function(n,
|
|
1031
|
-
const
|
|
1032
|
-
let o =
|
|
1033
|
-
const i = N.from(
|
|
1034
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } =
|
|
1027
|
+
}, kn = typeof XMLHttpRequest < "u", Pn = kn && function(e) {
|
|
1028
|
+
return new Promise(function(n, r) {
|
|
1029
|
+
const s = rt(e);
|
|
1030
|
+
let o = s.data;
|
|
1031
|
+
const i = N.from(s.headers).normalize();
|
|
1032
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, R, S, h;
|
|
1035
1033
|
function m() {
|
|
1036
|
-
|
|
1034
|
+
S && S(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1037
1035
|
}
|
|
1038
1036
|
let p = new XMLHttpRequest();
|
|
1039
|
-
p.open(
|
|
1040
|
-
function
|
|
1037
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1038
|
+
function g() {
|
|
1041
1039
|
if (!p)
|
|
1042
1040
|
return;
|
|
1043
|
-
const
|
|
1041
|
+
const b = N.from(
|
|
1044
1042
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1045
1043
|
), A = {
|
|
1046
1044
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1047
1045
|
status: p.status,
|
|
1048
1046
|
statusText: p.statusText,
|
|
1049
|
-
headers:
|
|
1047
|
+
headers: b,
|
|
1050
1048
|
config: e,
|
|
1051
1049
|
request: p
|
|
1052
1050
|
};
|
|
1053
1051
|
tt(function(B) {
|
|
1054
1052
|
n(B), m();
|
|
1055
1053
|
}, function(B) {
|
|
1056
|
-
|
|
1054
|
+
r(B), m();
|
|
1057
1055
|
}, A), p = null;
|
|
1058
1056
|
}
|
|
1059
|
-
"onloadend" in p ? p.onloadend =
|
|
1060
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1057
|
+
"onloadend" in p ? p.onloadend = g : p.onreadystatechange = function() {
|
|
1058
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1061
1059
|
}, p.onabort = function() {
|
|
1062
|
-
p && (
|
|
1060
|
+
p && (r(new E("Request aborted", E.ECONNABORTED, e, p)), p = null);
|
|
1063
1061
|
}, p.onerror = function() {
|
|
1064
|
-
|
|
1062
|
+
r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1065
1063
|
}, p.ontimeout = function() {
|
|
1066
|
-
let
|
|
1067
|
-
const A =
|
|
1068
|
-
|
|
1069
|
-
|
|
1064
|
+
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1065
|
+
const A = s.transitional || Ze;
|
|
1066
|
+
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new E(
|
|
1067
|
+
k,
|
|
1070
1068
|
A.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1071
1069
|
e,
|
|
1072
1070
|
p
|
|
1073
1071
|
)), p = null;
|
|
1074
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1075
|
-
p.setRequestHeader(A,
|
|
1076
|
-
}), a.isUndefined(
|
|
1077
|
-
p && (
|
|
1078
|
-
},
|
|
1079
|
-
const w =
|
|
1072
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(k, A) {
|
|
1073
|
+
p.setRequestHeader(A, k);
|
|
1074
|
+
}), 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 = (b) => {
|
|
1075
|
+
p && (r(!b || b.type ? new G(null, e, p) : b), p.abort(), p = null);
|
|
1076
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1077
|
+
const w = _n(s.url);
|
|
1080
1078
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
1081
|
-
|
|
1079
|
+
r(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1082
1080
|
return;
|
|
1083
1081
|
}
|
|
1084
1082
|
p.send(o || null);
|
|
1085
1083
|
});
|
|
1086
|
-
},
|
|
1084
|
+
}, Fn = (e, t) => {
|
|
1087
1085
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1088
1086
|
if (t || n) {
|
|
1089
|
-
let
|
|
1087
|
+
let r = new AbortController(), s;
|
|
1090
1088
|
const o = function(u) {
|
|
1091
|
-
if (!
|
|
1092
|
-
|
|
1089
|
+
if (!s) {
|
|
1090
|
+
s = !0, c();
|
|
1093
1091
|
const l = u instanceof Error ? u : this.reason;
|
|
1094
|
-
|
|
1092
|
+
r.abort(l instanceof E ? l : new G(l instanceof Error ? l.message : l));
|
|
1095
1093
|
}
|
|
1096
1094
|
};
|
|
1097
1095
|
let i = t && setTimeout(() => {
|
|
@@ -1103,22 +1101,22 @@ const st = (e) => {
|
|
|
1103
1101
|
}), e = null);
|
|
1104
1102
|
};
|
|
1105
1103
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1106
|
-
const { signal: f } =
|
|
1104
|
+
const { signal: f } = r;
|
|
1107
1105
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1108
1106
|
}
|
|
1109
|
-
},
|
|
1107
|
+
}, Dn = function* (e, t) {
|
|
1110
1108
|
let n = e.byteLength;
|
|
1111
1109
|
if (n < t) {
|
|
1112
1110
|
yield e;
|
|
1113
1111
|
return;
|
|
1114
1112
|
}
|
|
1115
|
-
let
|
|
1116
|
-
for (;
|
|
1117
|
-
|
|
1118
|
-
},
|
|
1119
|
-
for await (const n of
|
|
1120
|
-
yield*
|
|
1121
|
-
},
|
|
1113
|
+
let r = 0, s;
|
|
1114
|
+
for (; r < n; )
|
|
1115
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1116
|
+
}, Bn = async function* (e, t) {
|
|
1117
|
+
for await (const n of qn(e))
|
|
1118
|
+
yield* Dn(n, t);
|
|
1119
|
+
}, qn = async function* (e) {
|
|
1122
1120
|
if (e[Symbol.asyncIterator]) {
|
|
1123
1121
|
yield* e;
|
|
1124
1122
|
return;
|
|
@@ -1126,31 +1124,31 @@ const st = (e) => {
|
|
|
1126
1124
|
const t = e.getReader();
|
|
1127
1125
|
try {
|
|
1128
1126
|
for (; ; ) {
|
|
1129
|
-
const { done: n, value:
|
|
1127
|
+
const { done: n, value: r } = await t.read();
|
|
1130
1128
|
if (n)
|
|
1131
1129
|
break;
|
|
1132
|
-
yield
|
|
1130
|
+
yield r;
|
|
1133
1131
|
}
|
|
1134
1132
|
} finally {
|
|
1135
1133
|
await t.cancel();
|
|
1136
1134
|
}
|
|
1137
|
-
}, Ue = (e, t, n,
|
|
1138
|
-
const
|
|
1135
|
+
}, Ue = (e, t, n, r) => {
|
|
1136
|
+
const s = Bn(e, t);
|
|
1139
1137
|
let o = 0, i, c = (f) => {
|
|
1140
|
-
i || (i = !0,
|
|
1138
|
+
i || (i = !0, r && r(f));
|
|
1141
1139
|
};
|
|
1142
1140
|
return new ReadableStream({
|
|
1143
1141
|
async pull(f) {
|
|
1144
1142
|
try {
|
|
1145
|
-
const { done: u, value: l } = await
|
|
1143
|
+
const { done: u, value: l } = await s.next();
|
|
1146
1144
|
if (u) {
|
|
1147
1145
|
c(), f.close();
|
|
1148
1146
|
return;
|
|
1149
1147
|
}
|
|
1150
1148
|
let d = l.byteLength;
|
|
1151
1149
|
if (n) {
|
|
1152
|
-
let
|
|
1153
|
-
n(
|
|
1150
|
+
let R = o += d;
|
|
1151
|
+
n(R);
|
|
1154
1152
|
}
|
|
1155
1153
|
f.enqueue(new Uint8Array(l));
|
|
1156
1154
|
} catch (u) {
|
|
@@ -1158,18 +1156,18 @@ const st = (e) => {
|
|
|
1158
1156
|
}
|
|
1159
1157
|
},
|
|
1160
1158
|
cancel(f) {
|
|
1161
|
-
return c(f),
|
|
1159
|
+
return c(f), s.return();
|
|
1162
1160
|
}
|
|
1163
1161
|
}, {
|
|
1164
1162
|
highWaterMark: 2
|
|
1165
1163
|
});
|
|
1166
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1164
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", st = ie && typeof ReadableStream == "function", Hn = 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
1165
|
try {
|
|
1168
1166
|
return !!e(...t);
|
|
1169
1167
|
} catch {
|
|
1170
1168
|
return !1;
|
|
1171
1169
|
}
|
|
1172
|
-
},
|
|
1170
|
+
}, Mn = st && ot(() => {
|
|
1173
1171
|
let e = !1;
|
|
1174
1172
|
const t = new Request(O.origin, {
|
|
1175
1173
|
body: new ReadableStream(),
|
|
@@ -1179,17 +1177,17 @@ const st = (e) => {
|
|
|
1179
1177
|
}
|
|
1180
1178
|
}).headers.has("Content-Type");
|
|
1181
1179
|
return e && !t;
|
|
1182
|
-
}),
|
|
1180
|
+
}), xe = 64 * 1024, he = st && ot(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1183
1181
|
stream: he && ((e) => e.body)
|
|
1184
1182
|
};
|
|
1185
1183
|
ie && ((e) => {
|
|
1186
1184
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1187
|
-
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n,
|
|
1188
|
-
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT,
|
|
1185
|
+
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1186
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1189
1187
|
});
|
|
1190
1188
|
});
|
|
1191
1189
|
})(new Response());
|
|
1192
|
-
const
|
|
1190
|
+
const jn = async (e) => {
|
|
1193
1191
|
if (e == null)
|
|
1194
1192
|
return 0;
|
|
1195
1193
|
if (a.isBlob(e))
|
|
@@ -1202,16 +1200,16 @@ const Mn = async (e) => {
|
|
|
1202
1200
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1203
1201
|
return e.byteLength;
|
|
1204
1202
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1205
|
-
return (await
|
|
1206
|
-
},
|
|
1203
|
+
return (await Hn(e)).byteLength;
|
|
1204
|
+
}, zn = async (e, t) => {
|
|
1207
1205
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1208
|
-
return n ??
|
|
1209
|
-
},
|
|
1206
|
+
return n ?? jn(t);
|
|
1207
|
+
}, Gn = ie && (async (e) => {
|
|
1210
1208
|
let {
|
|
1211
1209
|
url: t,
|
|
1212
1210
|
method: n,
|
|
1213
|
-
data:
|
|
1214
|
-
signal:
|
|
1211
|
+
data: r,
|
|
1212
|
+
signal: s,
|
|
1215
1213
|
cancelToken: o,
|
|
1216
1214
|
timeout: i,
|
|
1217
1215
|
onDownloadProgress: c,
|
|
@@ -1219,63 +1217,63 @@ const Mn = async (e) => {
|
|
|
1219
1217
|
responseType: u,
|
|
1220
1218
|
headers: l,
|
|
1221
1219
|
withCredentials: d = "same-origin",
|
|
1222
|
-
fetchOptions:
|
|
1223
|
-
} =
|
|
1220
|
+
fetchOptions: R
|
|
1221
|
+
} = rt(e);
|
|
1224
1222
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1225
|
-
let
|
|
1226
|
-
const m =
|
|
1227
|
-
|
|
1223
|
+
let S = Fn([s, o && o.toAbortSignal()], i), h;
|
|
1224
|
+
const m = S && S.unsubscribe && (() => {
|
|
1225
|
+
S.unsubscribe();
|
|
1228
1226
|
});
|
|
1229
1227
|
let p;
|
|
1230
1228
|
try {
|
|
1231
|
-
if (f &&
|
|
1229
|
+
if (f && Mn && n !== "get" && n !== "head" && (p = await zn(l, r)) !== 0) {
|
|
1232
1230
|
let A = new Request(t, {
|
|
1233
1231
|
method: "POST",
|
|
1234
|
-
body:
|
|
1232
|
+
body: r,
|
|
1235
1233
|
duplex: "half"
|
|
1236
1234
|
}), F;
|
|
1237
|
-
if (a.isFormData(
|
|
1235
|
+
if (a.isFormData(r) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1238
1236
|
const [B, W] = Ne(
|
|
1239
1237
|
p,
|
|
1240
1238
|
Q(Ce(f))
|
|
1241
1239
|
);
|
|
1242
|
-
|
|
1240
|
+
r = Ue(A.body, xe, B, W);
|
|
1243
1241
|
}
|
|
1244
1242
|
}
|
|
1245
1243
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1246
|
-
const
|
|
1244
|
+
const g = "credentials" in Request.prototype;
|
|
1247
1245
|
h = new Request(t, {
|
|
1248
|
-
...
|
|
1249
|
-
signal:
|
|
1246
|
+
...R,
|
|
1247
|
+
signal: S,
|
|
1250
1248
|
method: n.toUpperCase(),
|
|
1251
1249
|
headers: l.normalize().toJSON(),
|
|
1252
|
-
body:
|
|
1250
|
+
body: r,
|
|
1253
1251
|
duplex: "half",
|
|
1254
|
-
credentials:
|
|
1252
|
+
credentials: g ? d : void 0
|
|
1255
1253
|
});
|
|
1256
1254
|
let w = await fetch(h);
|
|
1257
|
-
const
|
|
1258
|
-
if (he && (c ||
|
|
1255
|
+
const b = he && (u === "stream" || u === "response");
|
|
1256
|
+
if (he && (c || b && m)) {
|
|
1259
1257
|
const A = {};
|
|
1260
|
-
["status", "statusText", "headers"].forEach((
|
|
1261
|
-
A[
|
|
1258
|
+
["status", "statusText", "headers"].forEach((ye) => {
|
|
1259
|
+
A[ye] = w[ye];
|
|
1262
1260
|
});
|
|
1263
1261
|
const F = a.toFiniteNumber(w.headers.get("content-length")), [B, W] = c && Ne(
|
|
1264
1262
|
F,
|
|
1265
1263
|
Q(Ce(c), !0)
|
|
1266
1264
|
) || [];
|
|
1267
1265
|
w = new Response(
|
|
1268
|
-
Ue(w.body,
|
|
1266
|
+
Ue(w.body, xe, B, () => {
|
|
1269
1267
|
W && W(), m && m();
|
|
1270
1268
|
}),
|
|
1271
1269
|
A
|
|
1272
1270
|
);
|
|
1273
1271
|
}
|
|
1274
1272
|
u = u || "text";
|
|
1275
|
-
let
|
|
1276
|
-
return !
|
|
1273
|
+
let k = await ee[a.findKey(ee, u) || "text"](w, e);
|
|
1274
|
+
return !b && m && m(), await new Promise((A, F) => {
|
|
1277
1275
|
tt(A, F, {
|
|
1278
|
-
data:
|
|
1276
|
+
data: k,
|
|
1279
1277
|
headers: N.from(w.headers),
|
|
1280
1278
|
status: w.status,
|
|
1281
1279
|
statusText: w.statusText,
|
|
@@ -1283,18 +1281,18 @@ const Mn = async (e) => {
|
|
|
1283
1281
|
request: h
|
|
1284
1282
|
});
|
|
1285
1283
|
});
|
|
1286
|
-
} catch (
|
|
1287
|
-
throw m && m(),
|
|
1284
|
+
} catch (g) {
|
|
1285
|
+
throw m && m(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign(
|
|
1288
1286
|
new E("Network Error", E.ERR_NETWORK, e, h),
|
|
1289
1287
|
{
|
|
1290
|
-
cause:
|
|
1288
|
+
cause: g.cause || g
|
|
1291
1289
|
}
|
|
1292
|
-
) : E.from(
|
|
1290
|
+
) : E.from(g, g && g.code, e, h);
|
|
1293
1291
|
}
|
|
1294
1292
|
}), me = {
|
|
1295
|
-
http:
|
|
1293
|
+
http: rn,
|
|
1296
1294
|
xhr: Pn,
|
|
1297
|
-
fetch:
|
|
1295
|
+
fetch: Gn
|
|
1298
1296
|
};
|
|
1299
1297
|
a.forEach(me, (e, t) => {
|
|
1300
1298
|
if (e) {
|
|
@@ -1305,78 +1303,78 @@ a.forEach(me, (e, t) => {
|
|
|
1305
1303
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1306
1304
|
}
|
|
1307
1305
|
});
|
|
1308
|
-
const
|
|
1306
|
+
const Le = (e) => `- ${e}`, $n = (e) => a.isFunction(e) || e === null || e === !1, it = {
|
|
1309
1307
|
getAdapter: (e) => {
|
|
1310
1308
|
e = a.isArray(e) ? e : [e];
|
|
1311
1309
|
const { length: t } = e;
|
|
1312
|
-
let n,
|
|
1313
|
-
const
|
|
1310
|
+
let n, r;
|
|
1311
|
+
const s = {};
|
|
1314
1312
|
for (let o = 0; o < t; o++) {
|
|
1315
1313
|
n = e[o];
|
|
1316
1314
|
let i;
|
|
1317
|
-
if (
|
|
1315
|
+
if (r = n, !$n(n) && (r = me[(i = String(n)).toLowerCase()], r === void 0))
|
|
1318
1316
|
throw new E(`Unknown adapter '${i}'`);
|
|
1319
|
-
if (
|
|
1317
|
+
if (r)
|
|
1320
1318
|
break;
|
|
1321
|
-
|
|
1319
|
+
s[i || "#" + o] = r;
|
|
1322
1320
|
}
|
|
1323
|
-
if (!
|
|
1324
|
-
const o = Object.entries(
|
|
1321
|
+
if (!r) {
|
|
1322
|
+
const o = Object.entries(s).map(
|
|
1325
1323
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1326
1324
|
);
|
|
1327
1325
|
let i = t ? o.length > 1 ? `since :
|
|
1328
|
-
` + o.map(
|
|
1329
|
-
`) : " " +
|
|
1326
|
+
` + o.map(Le).join(`
|
|
1327
|
+
`) : " " + Le(o[0]) : "as no adapter specified";
|
|
1330
1328
|
throw new E(
|
|
1331
1329
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1332
1330
|
"ERR_NOT_SUPPORT"
|
|
1333
1331
|
);
|
|
1334
1332
|
}
|
|
1335
|
-
return
|
|
1333
|
+
return r;
|
|
1336
1334
|
},
|
|
1337
1335
|
adapters: me
|
|
1338
1336
|
};
|
|
1339
1337
|
function le(e) {
|
|
1340
1338
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1341
|
-
throw new
|
|
1339
|
+
throw new G(null, e);
|
|
1342
1340
|
}
|
|
1343
|
-
function
|
|
1341
|
+
function ke(e) {
|
|
1344
1342
|
return le(e), e.headers = N.from(e.headers), e.data = ue.call(
|
|
1345
1343
|
e,
|
|
1346
1344
|
e.transformRequest
|
|
1347
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(
|
|
1348
|
-
return le(e),
|
|
1345
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(r) {
|
|
1346
|
+
return le(e), r.data = ue.call(
|
|
1349
1347
|
e,
|
|
1350
1348
|
e.transformResponse,
|
|
1351
|
-
|
|
1352
|
-
),
|
|
1353
|
-
}, function(
|
|
1354
|
-
return et(
|
|
1349
|
+
r
|
|
1350
|
+
), r.headers = N.from(r.headers), r;
|
|
1351
|
+
}, function(r) {
|
|
1352
|
+
return et(r) || (le(e), r && r.response && (r.response.data = ue.call(
|
|
1355
1353
|
e,
|
|
1356
1354
|
e.transformResponse,
|
|
1357
|
-
|
|
1358
|
-
),
|
|
1355
|
+
r.response
|
|
1356
|
+
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1359
1357
|
});
|
|
1360
1358
|
}
|
|
1361
1359
|
const at = "1.9.0", ae = {};
|
|
1362
1360
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1363
|
-
ae[e] = function(
|
|
1364
|
-
return typeof
|
|
1361
|
+
ae[e] = function(r) {
|
|
1362
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1365
1363
|
};
|
|
1366
1364
|
});
|
|
1367
|
-
const
|
|
1368
|
-
ae.transitional = function(t, n,
|
|
1369
|
-
function
|
|
1370
|
-
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (
|
|
1365
|
+
const Pe = {};
|
|
1366
|
+
ae.transitional = function(t, n, r) {
|
|
1367
|
+
function s(o, i) {
|
|
1368
|
+
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1371
1369
|
}
|
|
1372
1370
|
return (o, i, c) => {
|
|
1373
1371
|
if (t === !1)
|
|
1374
1372
|
throw new E(
|
|
1375
|
-
|
|
1373
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1376
1374
|
E.ERR_DEPRECATED
|
|
1377
1375
|
);
|
|
1378
|
-
return n && !
|
|
1379
|
-
|
|
1376
|
+
return n && !Pe[i] && (Pe[i] = !0, console.warn(
|
|
1377
|
+
s(
|
|
1380
1378
|
i,
|
|
1381
1379
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1382
1380
|
)
|
|
@@ -1384,15 +1382,15 @@ ae.transitional = function(t, n, s) {
|
|
|
1384
1382
|
};
|
|
1385
1383
|
};
|
|
1386
1384
|
ae.spelling = function(t) {
|
|
1387
|
-
return (n,
|
|
1385
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1388
1386
|
};
|
|
1389
|
-
function
|
|
1387
|
+
function Kn(e, t, n) {
|
|
1390
1388
|
if (typeof e != "object")
|
|
1391
1389
|
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
for (;
|
|
1395
|
-
const o = s
|
|
1390
|
+
const r = Object.keys(e);
|
|
1391
|
+
let s = r.length;
|
|
1392
|
+
for (; s-- > 0; ) {
|
|
1393
|
+
const o = r[s], i = t[o];
|
|
1396
1394
|
if (i) {
|
|
1397
1395
|
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1398
1396
|
if (f !== !0)
|
|
@@ -1404,9 +1402,9 @@ function $n(e, t, n) {
|
|
|
1404
1402
|
}
|
|
1405
1403
|
}
|
|
1406
1404
|
const Z = {
|
|
1407
|
-
assertOptions:
|
|
1405
|
+
assertOptions: Kn,
|
|
1408
1406
|
validators: ae
|
|
1409
|
-
},
|
|
1407
|
+
}, L = Z.validators;
|
|
1410
1408
|
let H = class {
|
|
1411
1409
|
constructor(t) {
|
|
1412
1410
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1425,35 +1423,35 @@ let H = class {
|
|
|
1425
1423
|
async request(t, n) {
|
|
1426
1424
|
try {
|
|
1427
1425
|
return await this._request(t, n);
|
|
1428
|
-
} catch (
|
|
1429
|
-
if (
|
|
1430
|
-
let
|
|
1431
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1432
|
-
const o =
|
|
1426
|
+
} catch (r) {
|
|
1427
|
+
if (r instanceof Error) {
|
|
1428
|
+
let s = {};
|
|
1429
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1430
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1433
1431
|
try {
|
|
1434
|
-
|
|
1435
|
-
` + o) :
|
|
1432
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1433
|
+
` + o) : r.stack = o;
|
|
1436
1434
|
} catch {
|
|
1437
1435
|
}
|
|
1438
1436
|
}
|
|
1439
|
-
throw
|
|
1437
|
+
throw r;
|
|
1440
1438
|
}
|
|
1441
1439
|
}
|
|
1442
1440
|
_request(t, n) {
|
|
1443
1441
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1444
|
-
const { transitional:
|
|
1445
|
-
|
|
1446
|
-
silentJSONParsing:
|
|
1447
|
-
forcedJSONParsing:
|
|
1448
|
-
clarifyTimeoutError:
|
|
1449
|
-
}, !1),
|
|
1450
|
-
serialize:
|
|
1451
|
-
} : Z.assertOptions(
|
|
1452
|
-
encode:
|
|
1453
|
-
serialize:
|
|
1442
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1443
|
+
r !== void 0 && Z.assertOptions(r, {
|
|
1444
|
+
silentJSONParsing: L.transitional(L.boolean),
|
|
1445
|
+
forcedJSONParsing: L.transitional(L.boolean),
|
|
1446
|
+
clarifyTimeoutError: L.transitional(L.boolean)
|
|
1447
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1448
|
+
serialize: s
|
|
1449
|
+
} : Z.assertOptions(s, {
|
|
1450
|
+
encode: L.function,
|
|
1451
|
+
serialize: L.function
|
|
1454
1452
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
1455
|
-
baseUrl:
|
|
1456
|
-
withXsrfToken:
|
|
1453
|
+
baseUrl: L.spelling("baseURL"),
|
|
1454
|
+
withXsrfToken: L.spelling("withXSRFToken")
|
|
1457
1455
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1458
1456
|
let i = o && a.merge(
|
|
1459
1457
|
o.common,
|
|
@@ -1474,30 +1472,30 @@ let H = class {
|
|
|
1474
1472
|
this.interceptors.response.forEach(function(m) {
|
|
1475
1473
|
u.push(m.fulfilled, m.rejected);
|
|
1476
1474
|
});
|
|
1477
|
-
let l, d = 0,
|
|
1475
|
+
let l, d = 0, R;
|
|
1478
1476
|
if (!f) {
|
|
1479
|
-
const h = [
|
|
1480
|
-
for (h.unshift.apply(h, c), h.push.apply(h, u),
|
|
1477
|
+
const h = [ke.bind(this), void 0];
|
|
1478
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), R = h.length, l = Promise.resolve(n); d < R; )
|
|
1481
1479
|
l = l.then(h[d++], h[d++]);
|
|
1482
1480
|
return l;
|
|
1483
1481
|
}
|
|
1484
|
-
|
|
1485
|
-
let
|
|
1486
|
-
for (d = 0; d <
|
|
1482
|
+
R = c.length;
|
|
1483
|
+
let S = n;
|
|
1484
|
+
for (d = 0; d < R; ) {
|
|
1487
1485
|
const h = c[d++], m = c[d++];
|
|
1488
1486
|
try {
|
|
1489
|
-
|
|
1487
|
+
S = h(S);
|
|
1490
1488
|
} catch (p) {
|
|
1491
1489
|
m.call(this, p);
|
|
1492
1490
|
break;
|
|
1493
1491
|
}
|
|
1494
1492
|
}
|
|
1495
1493
|
try {
|
|
1496
|
-
l =
|
|
1494
|
+
l = ke.call(this, S);
|
|
1497
1495
|
} catch (h) {
|
|
1498
1496
|
return Promise.reject(h);
|
|
1499
1497
|
}
|
|
1500
|
-
for (d = 0,
|
|
1498
|
+
for (d = 0, R = u.length; d < R; )
|
|
1501
1499
|
l = l.then(u[d++], u[d++]);
|
|
1502
1500
|
return l;
|
|
1503
1501
|
}
|
|
@@ -1508,20 +1506,20 @@ let H = class {
|
|
|
1508
1506
|
}
|
|
1509
1507
|
};
|
|
1510
1508
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1511
|
-
H.prototype[t] = function(n,
|
|
1512
|
-
return this.request(M(
|
|
1509
|
+
H.prototype[t] = function(n, r) {
|
|
1510
|
+
return this.request(M(r || {}, {
|
|
1513
1511
|
method: t,
|
|
1514
1512
|
url: n,
|
|
1515
|
-
data: (
|
|
1513
|
+
data: (r || {}).data
|
|
1516
1514
|
}));
|
|
1517
1515
|
};
|
|
1518
1516
|
});
|
|
1519
1517
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1520
|
-
function n(
|
|
1518
|
+
function n(r) {
|
|
1521
1519
|
return function(o, i, c) {
|
|
1522
1520
|
return this.request(M(c || {}, {
|
|
1523
1521
|
method: t,
|
|
1524
|
-
headers:
|
|
1522
|
+
headers: r ? {
|
|
1525
1523
|
"Content-Type": "multipart/form-data"
|
|
1526
1524
|
} : {},
|
|
1527
1525
|
url: o,
|
|
@@ -1531,7 +1529,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1531
1529
|
}
|
|
1532
1530
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1533
1531
|
});
|
|
1534
|
-
let
|
|
1532
|
+
let vn = class ct {
|
|
1535
1533
|
constructor(t) {
|
|
1536
1534
|
if (typeof t != "function")
|
|
1537
1535
|
throw new TypeError("executor must be a function.");
|
|
@@ -1539,23 +1537,23 @@ let Gn = class ct {
|
|
|
1539
1537
|
this.promise = new Promise(function(o) {
|
|
1540
1538
|
n = o;
|
|
1541
1539
|
});
|
|
1542
|
-
const
|
|
1543
|
-
this.promise.then((
|
|
1544
|
-
if (!
|
|
1545
|
-
let o =
|
|
1540
|
+
const r = this;
|
|
1541
|
+
this.promise.then((s) => {
|
|
1542
|
+
if (!r._listeners) return;
|
|
1543
|
+
let o = r._listeners.length;
|
|
1546
1544
|
for (; o-- > 0; )
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}), this.promise.then = (
|
|
1545
|
+
r._listeners[o](s);
|
|
1546
|
+
r._listeners = null;
|
|
1547
|
+
}), this.promise.then = (s) => {
|
|
1550
1548
|
let o;
|
|
1551
1549
|
const i = new Promise((c) => {
|
|
1552
|
-
|
|
1553
|
-
}).then(
|
|
1550
|
+
r.subscribe(c), o = c;
|
|
1551
|
+
}).then(s);
|
|
1554
1552
|
return i.cancel = function() {
|
|
1555
|
-
|
|
1553
|
+
r.unsubscribe(o);
|
|
1556
1554
|
}, i;
|
|
1557
1555
|
}, t(function(o, i, c) {
|
|
1558
|
-
|
|
1556
|
+
r.reason || (r.reason = new G(o, i, c), n(r.reason));
|
|
1559
1557
|
});
|
|
1560
1558
|
}
|
|
1561
1559
|
/**
|
|
@@ -1585,8 +1583,8 @@ let Gn = class ct {
|
|
|
1585
1583
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1586
1584
|
}
|
|
1587
1585
|
toAbortSignal() {
|
|
1588
|
-
const t = new AbortController(), n = (
|
|
1589
|
-
t.abort(
|
|
1586
|
+
const t = new AbortController(), n = (r) => {
|
|
1587
|
+
t.abort(r);
|
|
1590
1588
|
};
|
|
1591
1589
|
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1592
1590
|
}
|
|
@@ -1597,19 +1595,19 @@ let Gn = class ct {
|
|
|
1597
1595
|
static source() {
|
|
1598
1596
|
let t;
|
|
1599
1597
|
return {
|
|
1600
|
-
token: new ct(function(
|
|
1601
|
-
t =
|
|
1598
|
+
token: new ct(function(s) {
|
|
1599
|
+
t = s;
|
|
1602
1600
|
}),
|
|
1603
1601
|
cancel: t
|
|
1604
1602
|
};
|
|
1605
1603
|
}
|
|
1606
1604
|
};
|
|
1607
|
-
function
|
|
1605
|
+
function Vn(e) {
|
|
1608
1606
|
return function(n) {
|
|
1609
1607
|
return e.apply(null, n);
|
|
1610
1608
|
};
|
|
1611
1609
|
}
|
|
1612
|
-
function
|
|
1610
|
+
function Jn(e) {
|
|
1613
1611
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1614
1612
|
}
|
|
1615
1613
|
const Ee = {
|
|
@@ -1682,86 +1680,86 @@ Object.entries(Ee).forEach(([e, t]) => {
|
|
|
1682
1680
|
});
|
|
1683
1681
|
function ut(e) {
|
|
1684
1682
|
const t = new H(e), n = He(H.prototype.request, t);
|
|
1685
|
-
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(
|
|
1686
|
-
return ut(M(e,
|
|
1683
|
+
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1684
|
+
return ut(M(e, s));
|
|
1687
1685
|
}, n;
|
|
1688
1686
|
}
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1687
|
+
const y = ut(J);
|
|
1688
|
+
y.Axios = H;
|
|
1689
|
+
y.CanceledError = G;
|
|
1690
|
+
y.CancelToken = vn;
|
|
1691
|
+
y.isCancel = et;
|
|
1692
|
+
y.VERSION = at;
|
|
1693
|
+
y.toFormData = oe;
|
|
1694
|
+
y.AxiosError = E;
|
|
1695
|
+
y.Cancel = y.CanceledError;
|
|
1696
|
+
y.all = function(t) {
|
|
1699
1697
|
return Promise.all(t);
|
|
1700
1698
|
};
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1699
|
+
y.spread = Vn;
|
|
1700
|
+
y.isAxiosError = Jn;
|
|
1701
|
+
y.mergeConfig = M;
|
|
1702
|
+
y.AxiosHeaders = N;
|
|
1703
|
+
y.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1704
|
+
y.getAdapter = it.getAdapter;
|
|
1705
|
+
y.HttpStatusCode = Ee;
|
|
1706
|
+
y.default = y;
|
|
1709
1707
|
const {
|
|
1710
|
-
Axios:
|
|
1711
|
-
AxiosError:
|
|
1712
|
-
CanceledError:
|
|
1713
|
-
isCancel:
|
|
1714
|
-
CancelToken:
|
|
1715
|
-
VERSION:
|
|
1716
|
-
all:
|
|
1717
|
-
Cancel:
|
|
1718
|
-
isAxiosError:
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1721
|
-
AxiosHeaders:
|
|
1708
|
+
Axios: Sr,
|
|
1709
|
+
AxiosError: Wn,
|
|
1710
|
+
CanceledError: gr,
|
|
1711
|
+
isCancel: yr,
|
|
1712
|
+
CancelToken: wr,
|
|
1713
|
+
VERSION: br,
|
|
1714
|
+
all: Tr,
|
|
1715
|
+
Cancel: Or,
|
|
1716
|
+
isAxiosError: Ar,
|
|
1717
|
+
spread: _r,
|
|
1718
|
+
toFormData: Nr,
|
|
1719
|
+
AxiosHeaders: Cr,
|
|
1722
1720
|
HttpStatusCode: D,
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} =
|
|
1727
|
-
for (const
|
|
1728
|
-
t ?
|
|
1729
|
-
},
|
|
1721
|
+
formToJSON: Ir,
|
|
1722
|
+
getAdapter: Ur,
|
|
1723
|
+
mergeConfig: xr
|
|
1724
|
+
} = y, Xn = (e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.headers["client-id"] = localStorage.getItem(I.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Yn = (e) => (e.baseURL = dt(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.headers["client-id"] = localStorage.getItem(I.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Fe = (e, t, n) => {
|
|
1725
|
+
for (const r of e)
|
|
1726
|
+
t ? r.rej(t) : r.res(n);
|
|
1727
|
+
}, Zn = async (e) => new Promise((t, n) => {
|
|
1730
1728
|
setTimeout(t, e);
|
|
1731
|
-
}),
|
|
1732
|
-
var
|
|
1733
|
-
let n = "",
|
|
1734
|
-
typeof t == "string" ? n = t : t instanceof
|
|
1729
|
+
}), Qn = async (e, t) => (await Zn(t), e()), De = (e, t) => {
|
|
1730
|
+
var s, o;
|
|
1731
|
+
let n = "", r = t;
|
|
1732
|
+
typeof t == "string" ? n = t : t instanceof Wn ? (n = t.message, r = {
|
|
1735
1733
|
message: t.message,
|
|
1736
1734
|
cause: t.cause,
|
|
1737
1735
|
status: t.status,
|
|
1738
|
-
data: (
|
|
1736
|
+
data: (s = t == null ? void 0 : t.response) == null ? void 0 : s.data
|
|
1739
1737
|
}) : n = t.message, (o = window.parent) == null || o.postMessage(
|
|
1740
|
-
{ type: "auth_error", details: { message: n, action: e, info:
|
|
1738
|
+
{ type: "auth_error", details: { message: n, action: e, info: r } },
|
|
1741
1739
|
"*"
|
|
1742
1740
|
);
|
|
1743
|
-
},
|
|
1741
|
+
}, er = async (e, t, n, r, s) => {
|
|
1744
1742
|
var f, u, l;
|
|
1745
|
-
const o = t.config, i = localStorage.getItem(
|
|
1743
|
+
const o = t.config, i = localStorage.getItem(I.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || D.InternalServerError;
|
|
1746
1744
|
if (!o || o.__retries === n)
|
|
1747
1745
|
throw t;
|
|
1748
|
-
if (c === D.Unauthorized && o.url !==
|
|
1746
|
+
if (c === D.Unauthorized && o.url !== T.REFRESH_EMBED_TOKEN && o.url !== T.REFRESH_TOKEN && o.url !== T.SIGN_IN && o.url !== T.SIGN_UP) {
|
|
1749
1747
|
if (!i)
|
|
1750
1748
|
throw De(
|
|
1751
1749
|
"refresh_token",
|
|
1752
1750
|
"no refresh token found to reauthenticate user"
|
|
1753
1751
|
), t;
|
|
1754
|
-
if (
|
|
1755
|
-
return new Promise((p,
|
|
1756
|
-
e.push({ res: p, rej:
|
|
1757
|
-
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`),
|
|
1752
|
+
if (r)
|
|
1753
|
+
return new Promise((p, g) => {
|
|
1754
|
+
e.push({ res: p, rej: g });
|
|
1755
|
+
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`), s(o))).catch((p) => {
|
|
1758
1756
|
throw p;
|
|
1759
1757
|
});
|
|
1760
|
-
|
|
1761
|
-
const
|
|
1758
|
+
r = !0;
|
|
1759
|
+
const R = localStorage.getItem(I.AUTH_FLOW) === pt.POST_MESSAGE ? Be.refreshEmbedToken : Be.refreshToken, { data: S, success: h, message: m } = await R(i);
|
|
1762
1760
|
if (!h)
|
|
1763
|
-
throw (u = o == null ? void 0 : o.url) != null && u.includes(
|
|
1764
|
-
return (l = o.url) != null && l.includes(
|
|
1761
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(T.EXCHANGE_TOKEN) || De("refresh_token", m), r = !1, Fe(e, t), t;
|
|
1762
|
+
return (l = o.url) != null && l.includes(T.EXCHANGE_TOKEN) && "id_token" in S && (o.data = JSON.stringify({ idToken: S.id_token })), r = !1, o.headers && (o.headers.Authorization = `Bearer ${S.token}`), Fe(e, null, S.token), s(o);
|
|
1765
1763
|
}
|
|
1766
1764
|
if ([
|
|
1767
1765
|
D.BadRequest,
|
|
@@ -1772,29 +1770,31 @@ const {
|
|
|
1772
1770
|
D.NotFound
|
|
1773
1771
|
].includes(c) || (o.__retries || (o.__retries = 0), o.__retries += 1, o.__retries > n))
|
|
1774
1772
|
throw t;
|
|
1775
|
-
return
|
|
1776
|
-
() =>
|
|
1773
|
+
return Qn(
|
|
1774
|
+
() => s(o),
|
|
1777
1775
|
Math.pow(10, o.__retries + 1) / 2
|
|
1778
1776
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1779
1777
|
);
|
|
1780
|
-
},
|
|
1781
|
-
|
|
1782
|
-
const C =
|
|
1783
|
-
C.interceptors.request.use((e) => (e =
|
|
1784
|
-
const
|
|
1785
|
-
|
|
1786
|
-
const
|
|
1778
|
+
}, tr = y.create();
|
|
1779
|
+
tr.interceptors.request.use((e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(I.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1780
|
+
const C = y.create();
|
|
1781
|
+
C.interceptors.request.use((e) => (e = Xn(e), e));
|
|
1782
|
+
const nr = y.create();
|
|
1783
|
+
nr.interceptors.request.use((e) => (e = Yn(e), e));
|
|
1784
|
+
const rr = 3;
|
|
1785
|
+
let sr = !1;
|
|
1786
|
+
const or = [];
|
|
1787
1787
|
C.interceptors.response.use(
|
|
1788
1788
|
null,
|
|
1789
|
-
(e) =>
|
|
1790
|
-
|
|
1789
|
+
(e) => er(
|
|
1790
|
+
or,
|
|
1791
1791
|
e,
|
|
1792
|
-
|
|
1793
|
-
|
|
1792
|
+
rr,
|
|
1793
|
+
sr,
|
|
1794
1794
|
C
|
|
1795
1795
|
)
|
|
1796
1796
|
);
|
|
1797
|
-
class
|
|
1797
|
+
class ir {
|
|
1798
1798
|
constructor() {
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Logs in a user with the provided email and password.
|
|
@@ -1802,33 +1802,33 @@ class ss {
|
|
|
1802
1802
|
* @param params - The sign-in parameters containing email and password.
|
|
1803
1803
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1804
1804
|
*/
|
|
1805
|
-
|
|
1806
|
-
var n,
|
|
1805
|
+
U(this, "login", async (t) => {
|
|
1806
|
+
var n, r, s, o;
|
|
1807
1807
|
try {
|
|
1808
|
-
const { data:
|
|
1808
|
+
const { data: i } = await C.post(T.SIGN_IN, {
|
|
1809
1809
|
email_address: t.email,
|
|
1810
1810
|
password: t.password
|
|
1811
|
-
}),
|
|
1811
|
+
}), c = await $.ensureQueryData({
|
|
1812
1812
|
queryKey: [j.USER_REGIONS],
|
|
1813
1813
|
queryFn: this.getRegions
|
|
1814
|
-
}),
|
|
1815
|
-
return localStorage.setItem(
|
|
1814
|
+
}), f = P(i.data), u = (n = i.data) == null ? void 0 : n.accessToken;
|
|
1815
|
+
return localStorage.setItem(I.TOKEN, u), {
|
|
1816
1816
|
success: !0,
|
|
1817
|
-
data:
|
|
1818
|
-
...
|
|
1819
|
-
token:
|
|
1817
|
+
data: P({
|
|
1818
|
+
...i.data,
|
|
1819
|
+
token: u,
|
|
1820
1820
|
user: {
|
|
1821
|
-
...
|
|
1822
|
-
userRegion:
|
|
1823
|
-
(
|
|
1821
|
+
...f.user,
|
|
1822
|
+
userRegion: c.find(
|
|
1823
|
+
(l) => l.code === i.data.user.user_region
|
|
1824
1824
|
)
|
|
1825
1825
|
}
|
|
1826
1826
|
})
|
|
1827
1827
|
};
|
|
1828
|
-
} catch (
|
|
1829
|
-
return console.error(
|
|
1828
|
+
} catch (i) {
|
|
1829
|
+
return console.error(i), {
|
|
1830
1830
|
success: !1,
|
|
1831
|
-
message: ((
|
|
1831
|
+
message: ((s = (r = i.response) == null ? void 0 : r.data) == null ? void 0 : s.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error signing in"
|
|
1832
1832
|
};
|
|
1833
1833
|
}
|
|
1834
1834
|
});
|
|
@@ -1838,10 +1838,10 @@ class ss {
|
|
|
1838
1838
|
* @param params - The sign-up parameters containing email, password, and region.
|
|
1839
1839
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1840
1840
|
*/
|
|
1841
|
-
|
|
1842
|
-
var n,
|
|
1841
|
+
U(this, "signUp", async (t) => {
|
|
1842
|
+
var n, r, s, o, i;
|
|
1843
1843
|
try {
|
|
1844
|
-
const { data:
|
|
1844
|
+
const { data: c } = await C.post(T.SIGN_UP, {
|
|
1845
1845
|
user: {
|
|
1846
1846
|
email_address: t.email,
|
|
1847
1847
|
password: t.password,
|
|
@@ -1850,67 +1850,65 @@ class ss {
|
|
|
1850
1850
|
success_url: t.successUrl,
|
|
1851
1851
|
cancel_url: t.cancelUrl,
|
|
1852
1852
|
price_id: t.priceId
|
|
1853
|
-
}),
|
|
1853
|
+
}), f = await $.ensureQueryData({
|
|
1854
1854
|
queryKey: [j.USER_REGIONS],
|
|
1855
1855
|
queryFn: this.getRegions
|
|
1856
|
-
}),
|
|
1857
|
-
return localStorage.setItem(
|
|
1856
|
+
}), u = P(c.data), l = (n = c.data) == null ? void 0 : n.tokens.accessToken;
|
|
1857
|
+
return localStorage.setItem(I.TOKEN, l), {
|
|
1858
1858
|
success: !0,
|
|
1859
1859
|
data: {
|
|
1860
|
-
token:
|
|
1861
|
-
|
|
1862
|
-
refreshToken: (o = u.data) == null ? void 0 : o.tokens.refreshToken,
|
|
1860
|
+
token: l,
|
|
1861
|
+
...(r = c.data) == null ? void 0 : r.tokens,
|
|
1863
1862
|
user: {
|
|
1864
|
-
...
|
|
1865
|
-
userRegion:
|
|
1866
|
-
(
|
|
1863
|
+
...u.user,
|
|
1864
|
+
userRegion: f.find(
|
|
1865
|
+
(d) => d.code === c.data.user.user_region
|
|
1867
1866
|
)
|
|
1868
1867
|
}
|
|
1869
1868
|
}
|
|
1870
1869
|
};
|
|
1871
|
-
} catch (
|
|
1872
|
-
return console.error(
|
|
1870
|
+
} catch (c) {
|
|
1871
|
+
return console.error(c), {
|
|
1873
1872
|
success: !1,
|
|
1874
|
-
message: ((
|
|
1873
|
+
message: ((o = (s = c.response) == null ? void 0 : s.data) == null ? void 0 : o.message) || ((i = c.response) == null ? void 0 : i.data) || c.message || "error signing up"
|
|
1875
1874
|
};
|
|
1876
1875
|
}
|
|
1877
1876
|
});
|
|
1878
|
-
|
|
1879
|
-
var
|
|
1877
|
+
U(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1878
|
+
var r, s, o, i, c;
|
|
1880
1879
|
try {
|
|
1881
|
-
const { data:
|
|
1880
|
+
const { data: f } = await C.post(T.GOOGLE_AUTH, {
|
|
1882
1881
|
google_access_token: t,
|
|
1883
1882
|
user_region: n
|
|
1884
|
-
}),
|
|
1883
|
+
}), u = await $.ensureQueryData({
|
|
1885
1884
|
queryKey: [j.USER_REGIONS],
|
|
1886
1885
|
queryFn: this.getRegions
|
|
1887
|
-
}),
|
|
1888
|
-
return localStorage.setItem(
|
|
1886
|
+
}), l = P(f.data), d = (r = f.data) == null ? void 0 : r.tokens.accessToken;
|
|
1887
|
+
return localStorage.setItem(I.TOKEN, d), {
|
|
1889
1888
|
success: !0,
|
|
1890
1889
|
data: {
|
|
1891
|
-
token:
|
|
1892
|
-
|
|
1893
|
-
refreshToken: (i = l.data) == null ? void 0 : i.tokens.refreshToken,
|
|
1890
|
+
token: d,
|
|
1891
|
+
...(s = f.data) == null ? void 0 : s.tokens,
|
|
1894
1892
|
user: {
|
|
1895
|
-
...
|
|
1896
|
-
userRegion:
|
|
1897
|
-
(
|
|
1893
|
+
...l.user,
|
|
1894
|
+
userRegion: u.find(
|
|
1895
|
+
(R) => R.code === f.data.user.user_region
|
|
1898
1896
|
)
|
|
1899
1897
|
}
|
|
1900
1898
|
}
|
|
1901
1899
|
};
|
|
1902
|
-
} catch (
|
|
1903
|
-
return console.error(
|
|
1900
|
+
} catch (f) {
|
|
1901
|
+
return console.error(f), {
|
|
1904
1902
|
success: !1,
|
|
1905
|
-
message: ((
|
|
1903
|
+
message: ((i = (o = f.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || ((c = f == null ? void 0 : f.response) == null ? void 0 : c.data) || f.message || "error getting or creating google user"
|
|
1906
1904
|
};
|
|
1907
1905
|
}
|
|
1908
1906
|
});
|
|
1909
|
-
|
|
1910
|
-
var n,
|
|
1907
|
+
U(this, "resendVerificationEmail", async (t) => {
|
|
1908
|
+
var n, r, s;
|
|
1911
1909
|
try {
|
|
1912
1910
|
return (await C.post(
|
|
1913
|
-
|
|
1911
|
+
T.RESEND_VERIFICATION_EMAIL,
|
|
1914
1912
|
{
|
|
1915
1913
|
email_address: t.email,
|
|
1916
1914
|
success_url: t.successUrl,
|
|
@@ -1920,7 +1918,7 @@ class ss {
|
|
|
1920
1918
|
} catch (o) {
|
|
1921
1919
|
return console.error(o), {
|
|
1922
1920
|
success: !1,
|
|
1923
|
-
message: ((
|
|
1921
|
+
message: ((r = (n = o.response) == null ? void 0 : n.data) == null ? void 0 : r.message) || ((s = o.response) == null ? void 0 : s.data) || o.message || "error resending verification email"
|
|
1924
1922
|
};
|
|
1925
1923
|
}
|
|
1926
1924
|
});
|
|
@@ -1930,11 +1928,11 @@ class ss {
|
|
|
1930
1928
|
* @param idToken - The ID token to authenticate with.
|
|
1931
1929
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1932
1930
|
*/
|
|
1933
|
-
|
|
1934
|
-
var
|
|
1931
|
+
U(this, "authenticateWithToken", async (t, n) => {
|
|
1932
|
+
var r, s, o;
|
|
1935
1933
|
try {
|
|
1936
1934
|
const { data: i } = await C.post(
|
|
1937
|
-
|
|
1935
|
+
T.EXCHANGE_TOKEN,
|
|
1938
1936
|
mt({
|
|
1939
1937
|
idToken: t,
|
|
1940
1938
|
exchangeTokenEndPoint: n
|
|
@@ -1942,7 +1940,7 @@ class ss {
|
|
|
1942
1940
|
), c = await $.ensureQueryData({
|
|
1943
1941
|
queryKey: [j.USER_REGIONS],
|
|
1944
1942
|
queryFn: this.getRegions
|
|
1945
|
-
}), f =
|
|
1943
|
+
}), f = P(i.data);
|
|
1946
1944
|
return {
|
|
1947
1945
|
success: !0,
|
|
1948
1946
|
data: {
|
|
@@ -1958,7 +1956,7 @@ class ss {
|
|
|
1958
1956
|
} catch (i) {
|
|
1959
1957
|
return console.error(i), {
|
|
1960
1958
|
success: !1,
|
|
1961
|
-
message: ((
|
|
1959
|
+
message: ((s = (r = i.response) == null ? void 0 : r.data) == null ? void 0 : s.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error exchanging token"
|
|
1962
1960
|
};
|
|
1963
1961
|
}
|
|
1964
1962
|
});
|
|
@@ -1967,20 +1965,20 @@ class ss {
|
|
|
1967
1965
|
*
|
|
1968
1966
|
* @returns A promise that resolves to a service response containing the user details.
|
|
1969
1967
|
*/
|
|
1970
|
-
|
|
1968
|
+
U(this, "checkUser", async () => {
|
|
1971
1969
|
try {
|
|
1972
|
-
const { data: t } = await C.get(
|
|
1970
|
+
const { data: t } = await C.get(T.ME), n = await $.ensureQueryData({
|
|
1973
1971
|
queryKey: [j.USER_REGIONS],
|
|
1974
1972
|
queryFn: this.getRegions
|
|
1975
|
-
}),
|
|
1973
|
+
}), r = {
|
|
1976
1974
|
...t.data,
|
|
1977
1975
|
userRegion: n.find(
|
|
1978
|
-
(
|
|
1976
|
+
(s) => s.code === t.data.user_region
|
|
1979
1977
|
)
|
|
1980
1978
|
};
|
|
1981
1979
|
return {
|
|
1982
1980
|
success: !0,
|
|
1983
|
-
data:
|
|
1981
|
+
data: P(r)
|
|
1984
1982
|
};
|
|
1985
1983
|
} catch (t) {
|
|
1986
1984
|
console.error(t);
|
|
@@ -1997,23 +1995,23 @@ class ss {
|
|
|
1997
1995
|
*
|
|
1998
1996
|
* @param refreshToken - The refresh token
|
|
1999
1997
|
*/
|
|
2000
|
-
|
|
1998
|
+
U(this, "refreshEmbedToken", async (t) => {
|
|
2001
1999
|
try {
|
|
2002
2000
|
const { data: n } = await C.post(
|
|
2003
|
-
|
|
2001
|
+
T.REFRESH_EMBED_TOKEN,
|
|
2004
2002
|
{
|
|
2005
2003
|
refreshToken: t
|
|
2006
2004
|
}
|
|
2007
|
-
),
|
|
2008
|
-
return localStorage.setItem(
|
|
2005
|
+
), r = n.data.token;
|
|
2006
|
+
return localStorage.setItem(I.TOKEN, r), {
|
|
2009
2007
|
success: !0,
|
|
2010
2008
|
data: n.data
|
|
2011
2009
|
};
|
|
2012
2010
|
} catch (n) {
|
|
2013
|
-
const { response:
|
|
2011
|
+
const { response: r } = n;
|
|
2014
2012
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2015
2013
|
success: !1,
|
|
2016
|
-
message:
|
|
2014
|
+
message: r == null ? void 0 : r.data.message
|
|
2017
2015
|
};
|
|
2018
2016
|
}
|
|
2019
2017
|
});
|
|
@@ -2022,26 +2020,26 @@ class ss {
|
|
|
2022
2020
|
*
|
|
2023
2021
|
* @param refreshToken - The refresh token
|
|
2024
2022
|
*/
|
|
2025
|
-
|
|
2023
|
+
U(this, "refreshToken", async (t) => {
|
|
2026
2024
|
try {
|
|
2027
2025
|
const { data: n } = await C.post(
|
|
2028
|
-
|
|
2026
|
+
T.REFRESH_TOKEN,
|
|
2029
2027
|
{
|
|
2030
2028
|
refreshToken: t
|
|
2031
2029
|
}
|
|
2032
|
-
),
|
|
2033
|
-
return localStorage.setItem(
|
|
2030
|
+
), r = n.data.accessToken;
|
|
2031
|
+
return localStorage.setItem(I.TOKEN, r), {
|
|
2034
2032
|
success: !0,
|
|
2035
2033
|
data: {
|
|
2036
2034
|
...n.data,
|
|
2037
|
-
token:
|
|
2035
|
+
token: r
|
|
2038
2036
|
}
|
|
2039
2037
|
};
|
|
2040
2038
|
} catch (n) {
|
|
2041
|
-
const { response:
|
|
2039
|
+
const { response: r } = n;
|
|
2042
2040
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2043
2041
|
success: !1,
|
|
2044
|
-
message:
|
|
2042
|
+
message: r == null ? void 0 : r.data.message
|
|
2045
2043
|
};
|
|
2046
2044
|
}
|
|
2047
2045
|
});
|
|
@@ -2050,35 +2048,38 @@ class ss {
|
|
|
2050
2048
|
*
|
|
2051
2049
|
* @returns A promise that resolves to a service response containing the request limit data.
|
|
2052
2050
|
*/
|
|
2053
|
-
|
|
2051
|
+
U(this, "getRequestLimit", async () => (await C.get(T.REQUEST_LIMIT)).data);
|
|
2054
2052
|
/**
|
|
2055
2053
|
* Retrieves the regions available for user registration.
|
|
2056
2054
|
*
|
|
2057
2055
|
* @returns A promise that resolves to a service response containing the available regions.
|
|
2058
2056
|
*/
|
|
2059
|
-
|
|
2057
|
+
U(this, "getRegions", async () => {
|
|
2060
2058
|
var n;
|
|
2061
|
-
const t = await C.get(
|
|
2062
|
-
return
|
|
2059
|
+
const t = await C.get(T.REGIONS);
|
|
2060
|
+
return P((n = t.data) == null ? void 0 : n.data);
|
|
2063
2061
|
});
|
|
2064
2062
|
}
|
|
2065
2063
|
}
|
|
2066
|
-
const Be = new
|
|
2064
|
+
const Be = new ir();
|
|
2067
2065
|
export {
|
|
2068
2066
|
Be as A,
|
|
2069
2067
|
j as E,
|
|
2070
|
-
|
|
2071
|
-
|
|
2068
|
+
P as a,
|
|
2069
|
+
Rt as b,
|
|
2072
2070
|
C as c,
|
|
2073
|
-
|
|
2074
|
-
|
|
2071
|
+
y as d,
|
|
2072
|
+
Wn as e,
|
|
2075
2073
|
we as f,
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2074
|
+
Xn as g,
|
|
2075
|
+
er as h,
|
|
2076
|
+
tr as i,
|
|
2077
|
+
Yn as j,
|
|
2078
|
+
Zn as k,
|
|
2079
|
+
Qn as l,
|
|
2080
|
+
nr as m,
|
|
2081
|
+
De as n,
|
|
2082
2082
|
Fe as p,
|
|
2083
|
-
mt as r
|
|
2083
|
+
mt as r,
|
|
2084
|
+
Et as t
|
|
2084
2085
|
};
|