@odynn/awayz-flights 0.10.19 → 0.10.20
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.
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useAwayzContext as
|
|
2
|
-
import { useQuery as
|
|
1
|
+
import { useAwayzContext as jt, awayzClient as te, getBaseUrl as Mt, AccountService as vt } from "@odynn/awayz-core";
|
|
2
|
+
import { useQuery as Ht, useMutation as ge } from "@tanstack/react-query";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../moment-BGjjqtLQ.js";
|
|
5
5
|
import "../../arrayExtensions-Ce8YopTP.js";
|
|
6
|
-
import { F as J, c as
|
|
7
|
-
import { a as
|
|
6
|
+
import { F as J, c as ze } from "../../FlightsService-BgXzj6SR.js";
|
|
7
|
+
import { a as zt } from "../../keys-C7jV6nZg.js";
|
|
8
8
|
import { useState as Oe, useRef as Te } from "react";
|
|
9
|
-
import
|
|
10
|
-
import { EFlightType as
|
|
11
|
-
import { ECabinClass as
|
|
12
|
-
import { passengerValues as
|
|
13
|
-
async function
|
|
9
|
+
import $t from "../../stores/useFlightStore.js";
|
|
10
|
+
import { EFlightType as it, EFlightPaymentType as ne } from "../../types/enums.js";
|
|
11
|
+
import { ECabinClass as Vt } from "../../types/ECabinClass.js";
|
|
12
|
+
import { passengerValues as Jt, mapDataToFlightDetails as Wt, groupFlightResults as Gt, buildFlightSearchQuery as Kt } from "../../utils/flightUtils.js";
|
|
13
|
+
async function Xt(e, t) {
|
|
14
14
|
const n = e.getReader();
|
|
15
15
|
let r;
|
|
16
16
|
for (; !(r = await n.read()).done; )
|
|
17
17
|
t(r.value);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Yt(e) {
|
|
20
20
|
let t, n, r, s = !1;
|
|
21
21
|
return function(o) {
|
|
22
|
-
t === void 0 ? (t = o, n = 0, r = -1) : t =
|
|
22
|
+
t === void 0 ? (t = o, n = 0, r = -1) : t = Qt(t, o);
|
|
23
23
|
const c = t.length;
|
|
24
24
|
let f = 0;
|
|
25
25
|
for (; n < c; ) {
|
|
@@ -43,12 +43,12 @@ function Kt(e) {
|
|
|
43
43
|
f === c ? t = void 0 : f !== 0 && (t = t.subarray(f), n -= f);
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
let r =
|
|
46
|
+
function Zt(e, t, n) {
|
|
47
|
+
let r = $e();
|
|
48
48
|
const s = new TextDecoder();
|
|
49
49
|
return function(o, c) {
|
|
50
50
|
if (o.length === 0)
|
|
51
|
-
n == null || n(r), r =
|
|
51
|
+
n == null || n(r), r = $e();
|
|
52
52
|
else if (c > 0) {
|
|
53
53
|
const f = s.decode(o.subarray(0, c)), l = c + (o[c + 1] === 32 ? 2 : 1), u = s.decode(o.subarray(l));
|
|
54
54
|
switch (f) {
|
|
@@ -70,11 +70,11 @@ function Xt(e, t, n) {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Qt(e, t) {
|
|
74
74
|
const n = new Uint8Array(e.length + t.length);
|
|
75
75
|
return n.set(e), n.set(t, e.length), n;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function $e() {
|
|
78
78
|
return {
|
|
79
79
|
data: "",
|
|
80
80
|
event: "",
|
|
@@ -82,7 +82,7 @@ function ze() {
|
|
|
82
82
|
retry: void 0
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var en = function(e, t) {
|
|
86
86
|
var n = {};
|
|
87
87
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
88
88
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -90,9 +90,9 @@ var Zt = function(e, t) {
|
|
|
90
90
|
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
|
91
91
|
return n;
|
|
92
92
|
};
|
|
93
|
-
const Pe = "text/event-stream",
|
|
94
|
-
function
|
|
95
|
-
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: l } = t, u =
|
|
93
|
+
const Pe = "text/event-stream", tn = 1e3, Ve = "last-event-id";
|
|
94
|
+
function nn(e, t) {
|
|
95
|
+
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: l } = t, u = en(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
96
96
|
return new Promise((h, w) => {
|
|
97
97
|
const S = Object.assign({}, r);
|
|
98
98
|
S.accept || (S.accept = Pe);
|
|
@@ -101,21 +101,21 @@ function en(e, t) {
|
|
|
101
101
|
d.abort(), document.hidden || T();
|
|
102
102
|
}
|
|
103
103
|
f || document.addEventListener("visibilitychange", m);
|
|
104
|
-
let p =
|
|
104
|
+
let p = tn, y = 0;
|
|
105
105
|
function E() {
|
|
106
106
|
document.removeEventListener("visibilitychange", m), window.clearTimeout(y), d.abort();
|
|
107
107
|
}
|
|
108
108
|
n == null || n.addEventListener("abort", () => {
|
|
109
109
|
E(), h();
|
|
110
110
|
});
|
|
111
|
-
const g = l ?? window.fetch, x = s ??
|
|
111
|
+
const g = l ?? window.fetch, x = s ?? rn;
|
|
112
112
|
async function T() {
|
|
113
113
|
var L;
|
|
114
114
|
d = new AbortController();
|
|
115
115
|
try {
|
|
116
116
|
const U = await g(e, Object.assign(Object.assign({}, u), { headers: S, signal: d.signal }));
|
|
117
|
-
await x(U), await
|
|
118
|
-
F ? S[
|
|
117
|
+
await x(U), await Xt(U.body, Yt(Zt((F) => {
|
|
118
|
+
F ? S[Ve] = F : delete S[Ve];
|
|
119
119
|
}, (F) => {
|
|
120
120
|
p = F;
|
|
121
121
|
}, i))), o == null || o(), E(), h();
|
|
@@ -132,39 +132,39 @@ function en(e, t) {
|
|
|
132
132
|
T();
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function rn(e) {
|
|
136
136
|
const t = e.headers.get("content-type");
|
|
137
137
|
if (!(t != null && t.startsWith(Pe)))
|
|
138
138
|
throw new Error(`Expected content-type to be ${Pe}, Actual: ${t}`);
|
|
139
139
|
}
|
|
140
140
|
var z = /* @__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.SUPPORTED_AIRLINE_PROGRAMS = "supported_airline_programs", e.CLIENT_DETAILS = "client-details", e))(z || {});
|
|
141
|
-
function
|
|
141
|
+
function at(e, t) {
|
|
142
142
|
return function() {
|
|
143
143
|
return e.apply(t, arguments);
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
const { toString:
|
|
147
|
-
const n =
|
|
146
|
+
const { toString: sn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: ue, toStringTag: ct } = Symbol, fe = /* @__PURE__ */ ((e) => (t) => {
|
|
147
|
+
const n = sn.call(t);
|
|
148
148
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
149
149
|
})(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => fe(t) === e), de = (e) => (t) => typeof t === e, { isArray: $ } = Array, G = de("undefined");
|
|
150
|
-
function
|
|
150
|
+
function on(e) {
|
|
151
151
|
return e !== null && !G(e) && e.constructor !== null && !G(e.constructor) && k(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
152
152
|
}
|
|
153
|
-
const
|
|
154
|
-
function
|
|
153
|
+
const lt = B("ArrayBuffer");
|
|
154
|
+
function an(e) {
|
|
155
155
|
let t;
|
|
156
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
156
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lt(e.buffer), t;
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const cn = de("string"), k = de("function"), ut = de("number"), he = (e) => e !== null && typeof e == "object", ln = (e) => e === !0 || e === !1, se = (e) => {
|
|
159
159
|
if (fe(e) !== "object")
|
|
160
160
|
return !1;
|
|
161
161
|
const t = De(e);
|
|
162
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
163
|
-
},
|
|
162
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ct in e) && !(ue in e);
|
|
163
|
+
}, un = B("Date"), fn = B("File"), dn = B("Blob"), hn = B("FileList"), pn = (e) => he(e) && k(e.pipe), mn = (e) => {
|
|
164
164
|
let t;
|
|
165
165
|
return e && (typeof FormData == "function" && e instanceof FormData || k(e.append) && ((t = fe(e)) === "formdata" || // detect form-data instance
|
|
166
166
|
t === "object" && k(e.toString) && e.toString() === "[object FormData]"));
|
|
167
|
-
},
|
|
167
|
+
}, bn = B("URLSearchParams"), [Rn, wn, Sn, yn] = ["ReadableStream", "Request", "Response", "Headers"].map(B), En = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
168
168
|
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
169
169
|
if (e === null || typeof e > "u")
|
|
170
170
|
return;
|
|
@@ -179,7 +179,7 @@ function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
179
179
|
c = i[r], t.call(null, e[c], c, e);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function ft(e, t) {
|
|
183
183
|
t = t.toLowerCase();
|
|
184
184
|
const n = Object.keys(e);
|
|
185
185
|
let r = n.length, s;
|
|
@@ -188,23 +188,23 @@ function ut(e, t) {
|
|
|
188
188
|
return s;
|
|
189
189
|
return null;
|
|
190
190
|
}
|
|
191
|
-
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
191
|
+
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, dt = (e) => !G(e) && e !== M;
|
|
192
192
|
function Ie() {
|
|
193
|
-
const { caseless: e } =
|
|
194
|
-
const i = e &&
|
|
193
|
+
const { caseless: e } = dt(this) && this || {}, t = {}, n = (r, s) => {
|
|
194
|
+
const i = e && ft(t, s) || s;
|
|
195
195
|
se(t[i]) && se(r) ? t[i] = Ie(t[i], r) : se(r) ? t[i] = Ie({}, r) : $(r) ? t[i] = r.slice() : t[i] = r;
|
|
196
196
|
};
|
|
197
197
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
198
198
|
arguments[r] && K(arguments[r], n);
|
|
199
199
|
return t;
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
n && k(s) ? e[i] =
|
|
203
|
-
}, { allOwnKeys: r }), e),
|
|
201
|
+
const gn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
202
|
+
n && k(s) ? e[i] = at(s, n) : e[i] = s;
|
|
203
|
+
}, { allOwnKeys: r }), e), On = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tn = (e, t, n, r) => {
|
|
204
204
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
205
205
|
value: t.prototype
|
|
206
206
|
}), n && Object.assign(e.prototype, n);
|
|
207
|
-
},
|
|
207
|
+
}, An = (e, t, n, r) => {
|
|
208
208
|
let s, i, o;
|
|
209
209
|
const c = {};
|
|
210
210
|
if (t = t || {}, e == null) return t;
|
|
@@ -214,45 +214,45 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
|
214
214
|
e = n !== !1 && De(e);
|
|
215
215
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
216
216
|
return t;
|
|
217
|
-
},
|
|
217
|
+
}, Cn = (e, t, n) => {
|
|
218
218
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
219
219
|
const r = e.indexOf(t, n);
|
|
220
220
|
return r !== -1 && r === n;
|
|
221
|
-
},
|
|
221
|
+
}, Nn = (e) => {
|
|
222
222
|
if (!e) return null;
|
|
223
223
|
if ($(e)) return e;
|
|
224
224
|
let t = e.length;
|
|
225
|
-
if (!
|
|
225
|
+
if (!ut(t)) return null;
|
|
226
226
|
const n = new Array(t);
|
|
227
227
|
for (; t-- > 0; )
|
|
228
228
|
n[t] = e[t];
|
|
229
229
|
return n;
|
|
230
|
-
},
|
|
230
|
+
}, _n = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Pn = (e, t) => {
|
|
231
231
|
const r = (e && e[ue]).call(e);
|
|
232
232
|
let s;
|
|
233
233
|
for (; (s = r.next()) && !s.done; ) {
|
|
234
234
|
const i = s.value;
|
|
235
235
|
t.call(e, i[0], i[1]);
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, In = (e, t) => {
|
|
238
238
|
let n;
|
|
239
239
|
const r = [];
|
|
240
240
|
for (; (n = e.exec(t)) !== null; )
|
|
241
241
|
r.push(n);
|
|
242
242
|
return r;
|
|
243
|
-
},
|
|
243
|
+
}, xn = B("HTMLFormElement"), Fn = (e) => e.toLowerCase().replace(
|
|
244
244
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
245
245
|
function(n, r, s) {
|
|
246
246
|
return r.toUpperCase() + s;
|
|
247
247
|
}
|
|
248
|
-
),
|
|
248
|
+
), Je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ln = B("RegExp"), ht = (e, t) => {
|
|
249
249
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
250
250
|
K(n, (s, i) => {
|
|
251
251
|
let o;
|
|
252
252
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
253
253
|
}), Object.defineProperties(e, r);
|
|
254
|
-
},
|
|
255
|
-
|
|
254
|
+
}, Un = (e) => {
|
|
255
|
+
ht(e, (t, n) => {
|
|
256
256
|
if (k(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
257
257
|
return !1;
|
|
258
258
|
const r = e[n];
|
|
@@ -266,19 +266,19 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
},
|
|
269
|
+
}, kn = (e, t) => {
|
|
270
270
|
const n = {}, r = (s) => {
|
|
271
271
|
s.forEach((i) => {
|
|
272
272
|
n[i] = !0;
|
|
273
273
|
});
|
|
274
274
|
};
|
|
275
275
|
return $(e) ? r(e) : r(String(e).split(t)), n;
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
function
|
|
279
|
-
return !!(e && k(e.append) && e[
|
|
276
|
+
}, Dn = () => {
|
|
277
|
+
}, Bn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
278
|
+
function qn(e) {
|
|
279
|
+
return !!(e && k(e.append) && e[ct] === "FormData" && e[ue]);
|
|
280
280
|
}
|
|
281
|
-
const
|
|
281
|
+
const jn = (e) => {
|
|
282
282
|
const t = new Array(10), n = (r, s) => {
|
|
283
283
|
if (he(r)) {
|
|
284
284
|
if (t.indexOf(r) >= 0)
|
|
@@ -295,71 +295,71 @@ const Bn = (e) => {
|
|
|
295
295
|
return r;
|
|
296
296
|
};
|
|
297
297
|
return n(e, 0);
|
|
298
|
-
},
|
|
298
|
+
}, Mn = B("AsyncFunction"), vn = (e) => e && (he(e) || k(e)) && k(e.then) && k(e.catch), pt = ((e, t) => e ? setImmediate : t ? ((n, r) => (M.addEventListener("message", ({ source: s, data: i }) => {
|
|
299
299
|
s === M && i === n && r.length && r.shift()();
|
|
300
300
|
}, !1), (s) => {
|
|
301
301
|
r.push(s), M.postMessage(n, "*");
|
|
302
302
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
303
303
|
typeof setImmediate == "function",
|
|
304
304
|
k(M.postMessage)
|
|
305
|
-
),
|
|
305
|
+
), Hn = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || pt, zn = (e) => e != null && k(e[ue]), a = {
|
|
306
306
|
isArray: $,
|
|
307
|
-
isArrayBuffer:
|
|
308
|
-
isBuffer:
|
|
309
|
-
isFormData:
|
|
310
|
-
isArrayBufferView:
|
|
311
|
-
isString:
|
|
312
|
-
isNumber:
|
|
313
|
-
isBoolean:
|
|
307
|
+
isArrayBuffer: lt,
|
|
308
|
+
isBuffer: on,
|
|
309
|
+
isFormData: mn,
|
|
310
|
+
isArrayBufferView: an,
|
|
311
|
+
isString: cn,
|
|
312
|
+
isNumber: ut,
|
|
313
|
+
isBoolean: ln,
|
|
314
314
|
isObject: he,
|
|
315
315
|
isPlainObject: se,
|
|
316
|
-
isReadableStream:
|
|
317
|
-
isRequest:
|
|
318
|
-
isResponse:
|
|
319
|
-
isHeaders:
|
|
316
|
+
isReadableStream: Rn,
|
|
317
|
+
isRequest: wn,
|
|
318
|
+
isResponse: Sn,
|
|
319
|
+
isHeaders: yn,
|
|
320
320
|
isUndefined: G,
|
|
321
|
-
isDate:
|
|
322
|
-
isFile:
|
|
323
|
-
isBlob:
|
|
324
|
-
isRegExp:
|
|
321
|
+
isDate: un,
|
|
322
|
+
isFile: fn,
|
|
323
|
+
isBlob: dn,
|
|
324
|
+
isRegExp: Ln,
|
|
325
325
|
isFunction: k,
|
|
326
|
-
isStream:
|
|
327
|
-
isURLSearchParams:
|
|
328
|
-
isTypedArray:
|
|
329
|
-
isFileList:
|
|
326
|
+
isStream: pn,
|
|
327
|
+
isURLSearchParams: bn,
|
|
328
|
+
isTypedArray: _n,
|
|
329
|
+
isFileList: hn,
|
|
330
330
|
forEach: K,
|
|
331
331
|
merge: Ie,
|
|
332
|
-
extend:
|
|
333
|
-
trim:
|
|
334
|
-
stripBOM:
|
|
335
|
-
inherits:
|
|
336
|
-
toFlatObject:
|
|
332
|
+
extend: gn,
|
|
333
|
+
trim: En,
|
|
334
|
+
stripBOM: On,
|
|
335
|
+
inherits: Tn,
|
|
336
|
+
toFlatObject: An,
|
|
337
337
|
kindOf: fe,
|
|
338
338
|
kindOfTest: B,
|
|
339
|
-
endsWith:
|
|
340
|
-
toArray:
|
|
341
|
-
forEachEntry:
|
|
342
|
-
matchAll:
|
|
343
|
-
isHTMLForm:
|
|
344
|
-
hasOwnProperty:
|
|
345
|
-
hasOwnProp:
|
|
339
|
+
endsWith: Cn,
|
|
340
|
+
toArray: Nn,
|
|
341
|
+
forEachEntry: Pn,
|
|
342
|
+
matchAll: In,
|
|
343
|
+
isHTMLForm: xn,
|
|
344
|
+
hasOwnProperty: Je,
|
|
345
|
+
hasOwnProp: Je,
|
|
346
346
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
347
|
-
reduceDescriptors:
|
|
348
|
-
freezeMethods:
|
|
349
|
-
toObjectSet:
|
|
350
|
-
toCamelCase:
|
|
351
|
-
noop:
|
|
352
|
-
toFiniteNumber:
|
|
353
|
-
findKey:
|
|
347
|
+
reduceDescriptors: ht,
|
|
348
|
+
freezeMethods: Un,
|
|
349
|
+
toObjectSet: kn,
|
|
350
|
+
toCamelCase: Fn,
|
|
351
|
+
noop: Dn,
|
|
352
|
+
toFiniteNumber: Bn,
|
|
353
|
+
findKey: ft,
|
|
354
354
|
global: M,
|
|
355
|
-
isContextDefined:
|
|
356
|
-
isSpecCompliantForm:
|
|
357
|
-
toJSONObject:
|
|
358
|
-
isAsyncFn:
|
|
359
|
-
isThenable:
|
|
360
|
-
setImmediate:
|
|
361
|
-
asap:
|
|
362
|
-
isIterable:
|
|
355
|
+
isContextDefined: dt,
|
|
356
|
+
isSpecCompliantForm: qn,
|
|
357
|
+
toJSONObject: jn,
|
|
358
|
+
isAsyncFn: Mn,
|
|
359
|
+
isThenable: vn,
|
|
360
|
+
setImmediate: pt,
|
|
361
|
+
asap: Hn,
|
|
362
|
+
isIterable: zn
|
|
363
363
|
};
|
|
364
364
|
function R(e, t, n, r, s) {
|
|
365
365
|
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);
|
|
@@ -385,7 +385,7 @@ a.inherits(R, Error, {
|
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
|
-
const
|
|
388
|
+
const mt = R.prototype, bt = {};
|
|
389
389
|
[
|
|
390
390
|
"ERR_BAD_OPTION_VALUE",
|
|
391
391
|
"ERR_BAD_OPTION",
|
|
@@ -401,32 +401,32 @@ const pt = R.prototype, mt = {};
|
|
|
401
401
|
"ERR_INVALID_URL"
|
|
402
402
|
// eslint-disable-next-line func-names
|
|
403
403
|
].forEach((e) => {
|
|
404
|
-
|
|
404
|
+
bt[e] = { value: e };
|
|
405
405
|
});
|
|
406
|
-
Object.defineProperties(R,
|
|
407
|
-
Object.defineProperty(
|
|
406
|
+
Object.defineProperties(R, bt);
|
|
407
|
+
Object.defineProperty(mt, "isAxiosError", { value: !0 });
|
|
408
408
|
R.from = (e, t, n, r, s, i) => {
|
|
409
|
-
const o = Object.create(
|
|
409
|
+
const o = Object.create(mt);
|
|
410
410
|
return a.toFlatObject(e, o, function(f) {
|
|
411
411
|
return f !== Error.prototype;
|
|
412
412
|
}, (c) => c !== "isAxiosError"), R.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
413
413
|
};
|
|
414
|
-
const
|
|
414
|
+
const $n = null;
|
|
415
415
|
function xe(e) {
|
|
416
416
|
return a.isPlainObject(e) || a.isArray(e);
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Rt(e) {
|
|
419
419
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function We(e, t, n) {
|
|
422
422
|
return e ? e.concat(t).map(function(s, i) {
|
|
423
|
-
return s =
|
|
423
|
+
return s = Rt(s), !n && i ? "[" + s + "]" : s;
|
|
424
424
|
}).join(n ? "." : "") : t;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Vn(e) {
|
|
427
427
|
return a.isArray(e) && !e.some(xe);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
429
|
+
const Jn = a.toFlatObject(a, {}, null, function(t) {
|
|
430
430
|
return /^is[A-Z]/.test(t);
|
|
431
431
|
});
|
|
432
432
|
function pe(e, t, n) {
|
|
@@ -455,18 +455,18 @@ function pe(e, t, n) {
|
|
|
455
455
|
if (d && !p && typeof d == "object") {
|
|
456
456
|
if (a.endsWith(m, "{}"))
|
|
457
457
|
m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
|
|
458
|
-
else if (a.isArray(d) &&
|
|
459
|
-
return m =
|
|
458
|
+
else if (a.isArray(d) && Vn(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (y = a.toArray(d)))
|
|
459
|
+
return m = Rt(m), y.forEach(function(g, x) {
|
|
460
460
|
!(a.isUndefined(g) || g === null) && t.append(
|
|
461
461
|
// eslint-disable-next-line no-nested-ternary
|
|
462
|
-
o === !0 ?
|
|
462
|
+
o === !0 ? We([m], x, i) : o === null ? m : m + "[]",
|
|
463
463
|
l(g)
|
|
464
464
|
);
|
|
465
465
|
}), !1;
|
|
466
466
|
}
|
|
467
|
-
return xe(d) ? !0 : (t.append(
|
|
467
|
+
return xe(d) ? !0 : (t.append(We(p, m, i), l(d)), !1);
|
|
468
468
|
}
|
|
469
|
-
const h = [], w = Object.assign(
|
|
469
|
+
const h = [], w = Object.assign(Jn, {
|
|
470
470
|
defaultVisitor: u,
|
|
471
471
|
convertValue: l,
|
|
472
472
|
isVisitable: xe
|
|
@@ -490,7 +490,7 @@ function pe(e, t, n) {
|
|
|
490
490
|
throw new TypeError("data must be an object");
|
|
491
491
|
return S(e), t;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Ge(e) {
|
|
494
494
|
const t = {
|
|
495
495
|
"!": "%21",
|
|
496
496
|
"'": "%27",
|
|
@@ -507,25 +507,25 @@ function We(e) {
|
|
|
507
507
|
function Be(e, t) {
|
|
508
508
|
this._pairs = [], e && pe(e, this, t);
|
|
509
509
|
}
|
|
510
|
-
const
|
|
511
|
-
|
|
510
|
+
const wt = Be.prototype;
|
|
511
|
+
wt.append = function(t, n) {
|
|
512
512
|
this._pairs.push([t, n]);
|
|
513
513
|
};
|
|
514
|
-
|
|
514
|
+
wt.toString = function(t) {
|
|
515
515
|
const n = t ? function(r) {
|
|
516
|
-
return t.call(this, r,
|
|
517
|
-
} :
|
|
516
|
+
return t.call(this, r, Ge);
|
|
517
|
+
} : Ge;
|
|
518
518
|
return this._pairs.map(function(s) {
|
|
519
519
|
return n(s[0]) + "=" + n(s[1]);
|
|
520
520
|
}, "").join("&");
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function Wn(e) {
|
|
523
523
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function St(e, t, n) {
|
|
526
526
|
if (!t)
|
|
527
527
|
return e;
|
|
528
|
-
const r = n && n.encode ||
|
|
528
|
+
const r = n && n.encode || Wn;
|
|
529
529
|
a.isFunction(n) && (n = {
|
|
530
530
|
serialize: n
|
|
531
531
|
});
|
|
@@ -537,7 +537,7 @@ function wt(e, t, n) {
|
|
|
537
537
|
}
|
|
538
538
|
return e;
|
|
539
539
|
}
|
|
540
|
-
class
|
|
540
|
+
class Ke {
|
|
541
541
|
constructor() {
|
|
542
542
|
this.handlers = [];
|
|
543
543
|
}
|
|
@@ -591,41 +591,41 @@ class Ge {
|
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const yt = {
|
|
595
595
|
silentJSONParsing: !0,
|
|
596
596
|
forcedJSONParsing: !0,
|
|
597
597
|
clarifyTimeoutError: !1
|
|
598
|
-
},
|
|
598
|
+
}, Gn = typeof URLSearchParams < "u" ? URLSearchParams : Be, Kn = typeof FormData < "u" ? FormData : null, Xn = typeof Blob < "u" ? Blob : null, Yn = {
|
|
599
599
|
isBrowser: !0,
|
|
600
600
|
classes: {
|
|
601
|
-
URLSearchParams:
|
|
602
|
-
FormData:
|
|
603
|
-
Blob:
|
|
601
|
+
URLSearchParams: Gn,
|
|
602
|
+
FormData: Kn,
|
|
603
|
+
Blob: Xn
|
|
604
604
|
},
|
|
605
605
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
606
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
607
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
606
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Zn = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), Qn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
607
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", er = qe && window.location.href || "http://localhost", tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
608
608
|
__proto__: null,
|
|
609
609
|
hasBrowserEnv: qe,
|
|
610
|
-
hasStandardBrowserEnv:
|
|
611
|
-
hasStandardBrowserWebWorkerEnv:
|
|
610
|
+
hasStandardBrowserEnv: Zn,
|
|
611
|
+
hasStandardBrowserWebWorkerEnv: Qn,
|
|
612
612
|
navigator: Fe,
|
|
613
|
-
origin:
|
|
613
|
+
origin: er
|
|
614
614
|
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
615
|
-
...
|
|
616
|
-
...
|
|
615
|
+
...tr,
|
|
616
|
+
...Yn
|
|
617
617
|
};
|
|
618
|
-
function
|
|
618
|
+
function nr(e, t) {
|
|
619
619
|
return pe(e, new I.classes.URLSearchParams(), Object.assign({
|
|
620
620
|
visitor: function(n, r, s, i) {
|
|
621
621
|
return I.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
622
622
|
}
|
|
623
623
|
}, t));
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function rr(e) {
|
|
626
626
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function sr(e) {
|
|
629
629
|
const t = {}, n = Object.keys(e);
|
|
630
630
|
let r;
|
|
631
631
|
const s = n.length;
|
|
@@ -634,22 +634,22 @@ function nr(e) {
|
|
|
634
634
|
i = n[r], t[i] = e[i];
|
|
635
635
|
return t;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function Et(e) {
|
|
638
638
|
function t(n, r, s, i) {
|
|
639
639
|
let o = n[i++];
|
|
640
640
|
if (o === "__proto__") return !0;
|
|
641
641
|
const c = Number.isFinite(+o), f = i >= n.length;
|
|
642
|
-
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
642
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = sr(s[o])), !c);
|
|
643
643
|
}
|
|
644
644
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
645
645
|
const n = {};
|
|
646
646
|
return a.forEachEntry(e, (r, s) => {
|
|
647
|
-
t(
|
|
647
|
+
t(rr(r), s, n, 0);
|
|
648
648
|
}), n;
|
|
649
649
|
}
|
|
650
650
|
return null;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function or(e, t, n) {
|
|
653
653
|
if (a.isString(e))
|
|
654
654
|
try {
|
|
655
655
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -660,12 +660,12 @@ function rr(e, t, n) {
|
|
|
660
660
|
return (n || JSON.stringify)(e);
|
|
661
661
|
}
|
|
662
662
|
const X = {
|
|
663
|
-
transitional:
|
|
663
|
+
transitional: yt,
|
|
664
664
|
adapter: ["xhr", "http", "fetch"],
|
|
665
665
|
transformRequest: [function(t, n) {
|
|
666
666
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
667
667
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
668
|
-
return s ? JSON.stringify(
|
|
668
|
+
return s ? JSON.stringify(Et(t)) : t;
|
|
669
669
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
670
670
|
return t;
|
|
671
671
|
if (a.isArrayBufferView(t))
|
|
@@ -675,7 +675,7 @@ const X = {
|
|
|
675
675
|
let c;
|
|
676
676
|
if (i) {
|
|
677
677
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
678
|
-
return
|
|
678
|
+
return nr(t, this.formSerializer).toString();
|
|
679
679
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
680
680
|
const f = this.env && this.env.FormData;
|
|
681
681
|
return pe(
|
|
@@ -685,7 +685,7 @@ const X = {
|
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
688
|
+
return i || s ? (n.setContentType("application/json", !1), or(t)) : t;
|
|
689
689
|
}],
|
|
690
690
|
transformResponse: [function(t) {
|
|
691
691
|
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -728,7 +728,7 @@ const X = {
|
|
|
728
728
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
729
729
|
X.headers[e] = {};
|
|
730
730
|
});
|
|
731
|
-
const
|
|
731
|
+
const ir = a.toObjectSet([
|
|
732
732
|
"age",
|
|
733
733
|
"authorization",
|
|
734
734
|
"content-length",
|
|
@@ -746,28 +746,28 @@ const sr = a.toObjectSet([
|
|
|
746
746
|
"referer",
|
|
747
747
|
"retry-after",
|
|
748
748
|
"user-agent"
|
|
749
|
-
]),
|
|
749
|
+
]), ar = (e) => {
|
|
750
750
|
const t = {};
|
|
751
751
|
let n, r, s;
|
|
752
752
|
return e && e.split(`
|
|
753
753
|
`).forEach(function(o) {
|
|
754
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
754
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && ir[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
755
755
|
}), t;
|
|
756
|
-
},
|
|
756
|
+
}, Xe = Symbol("internals");
|
|
757
757
|
function W(e) {
|
|
758
758
|
return e && String(e).trim().toLowerCase();
|
|
759
759
|
}
|
|
760
760
|
function oe(e) {
|
|
761
761
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(oe) : String(e);
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function cr(e) {
|
|
764
764
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
765
765
|
let r;
|
|
766
766
|
for (; r = n.exec(e); )
|
|
767
767
|
t[r[1]] = r[2];
|
|
768
768
|
return t;
|
|
769
769
|
}
|
|
770
|
-
const
|
|
770
|
+
const lr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
771
771
|
function Ae(e, t, n, r, s) {
|
|
772
772
|
if (a.isFunction(r))
|
|
773
773
|
return r.call(this, t, n);
|
|
@@ -778,10 +778,10 @@ function Ae(e, t, n, r, s) {
|
|
|
778
778
|
return r.test(t);
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function ur(e) {
|
|
782
782
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function fr(e, t) {
|
|
785
785
|
const n = a.toCamelCase(" " + t);
|
|
786
786
|
["get", "set", "has"].forEach((r) => {
|
|
787
787
|
Object.defineProperty(e, r + n, {
|
|
@@ -808,8 +808,8 @@ let D = class {
|
|
|
808
808
|
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
809
809
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
810
810
|
o(t, n);
|
|
811
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
812
|
-
o(
|
|
811
|
+
else if (a.isString(t) && (t = t.trim()) && !lr(t))
|
|
812
|
+
o(ar(t), n);
|
|
813
813
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
814
814
|
let c = {}, f, l;
|
|
815
815
|
for (const u of t) {
|
|
@@ -830,7 +830,7 @@ let D = class {
|
|
|
830
830
|
if (!n)
|
|
831
831
|
return s;
|
|
832
832
|
if (n === !0)
|
|
833
|
-
return
|
|
833
|
+
return cr(s);
|
|
834
834
|
if (a.isFunction(n))
|
|
835
835
|
return n.call(this, s, r);
|
|
836
836
|
if (a.isRegExp(n))
|
|
@@ -874,7 +874,7 @@ let D = class {
|
|
|
874
874
|
n[o] = oe(s), delete n[i];
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
|
-
const c = t ?
|
|
877
|
+
const c = t ? ur(i) : String(i).trim();
|
|
878
878
|
c !== i && delete n[i], n[c] = oe(s), r[c] = !0;
|
|
879
879
|
}), this;
|
|
880
880
|
}
|
|
@@ -908,12 +908,12 @@ let D = class {
|
|
|
908
908
|
return n.forEach((s) => r.set(s)), r;
|
|
909
909
|
}
|
|
910
910
|
static accessor(t) {
|
|
911
|
-
const r = (this[
|
|
911
|
+
const r = (this[Xe] = this[Xe] = {
|
|
912
912
|
accessors: {}
|
|
913
913
|
}).accessors, s = this.prototype;
|
|
914
914
|
function i(o) {
|
|
915
915
|
const c = W(o);
|
|
916
|
-
r[c] || (
|
|
916
|
+
r[c] || (fr(s, o), r[c] = !0);
|
|
917
917
|
}
|
|
918
918
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
919
919
|
}
|
|
@@ -936,7 +936,7 @@ function Ce(e, t) {
|
|
|
936
936
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
937
937
|
}), s.normalize(), i;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function gt(e) {
|
|
940
940
|
return !!(e && e.__CANCEL__);
|
|
941
941
|
}
|
|
942
942
|
function V(e, t, n) {
|
|
@@ -945,7 +945,7 @@ function V(e, t, n) {
|
|
|
945
945
|
a.inherits(V, R, {
|
|
946
946
|
__CANCEL__: !0
|
|
947
947
|
});
|
|
948
|
-
function
|
|
948
|
+
function Ot(e, t, n) {
|
|
949
949
|
const r = n.config.validateStatus;
|
|
950
950
|
!n.status || !r || r(n.status) ? e(n) : t(new R(
|
|
951
951
|
"Request failed with status code " + n.status,
|
|
@@ -955,11 +955,11 @@ function gt(e, t, n) {
|
|
|
955
955
|
n
|
|
956
956
|
));
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function dr(e) {
|
|
959
959
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
960
960
|
return t && t[1] || "";
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function hr(e, t) {
|
|
963
963
|
e = e || 10;
|
|
964
964
|
const n = new Array(e), r = new Array(e);
|
|
965
965
|
let s = 0, i = 0, o;
|
|
@@ -975,7 +975,7 @@ function fr(e, t) {
|
|
|
975
975
|
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function pr(e, t) {
|
|
979
979
|
let n = 0, r = 1e3 / t, s, i;
|
|
980
980
|
const o = (l, u = Date.now()) => {
|
|
981
981
|
n = u, s = null, i && (clearTimeout(i), i = null), e.apply(null, l);
|
|
@@ -989,8 +989,8 @@ function dr(e, t) {
|
|
|
989
989
|
}
|
|
990
990
|
const ae = (e, t, n = 3) => {
|
|
991
991
|
let r = 0;
|
|
992
|
-
const s =
|
|
993
|
-
return
|
|
992
|
+
const s = hr(50, 250);
|
|
993
|
+
return pr((i) => {
|
|
994
994
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
|
|
995
995
|
r = o;
|
|
996
996
|
const h = {
|
|
@@ -1006,17 +1006,17 @@ const ae = (e, t, n = 3) => {
|
|
|
1006
1006
|
};
|
|
1007
1007
|
e(h);
|
|
1008
1008
|
}, n);
|
|
1009
|
-
},
|
|
1009
|
+
}, Ye = (e, t) => {
|
|
1010
1010
|
const n = e != null;
|
|
1011
1011
|
return [(r) => t[0]({
|
|
1012
1012
|
lengthComputable: n,
|
|
1013
1013
|
total: e,
|
|
1014
1014
|
loaded: r
|
|
1015
1015
|
}), t[1]];
|
|
1016
|
-
},
|
|
1016
|
+
}, Ze = (e) => (...t) => a.asap(() => e(...t)), mr = I.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, I.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1017
1017
|
new URL(I.origin),
|
|
1018
1018
|
I.navigator && /(msie|trident)/i.test(I.navigator.userAgent)
|
|
1019
|
-
) : () => !0,
|
|
1019
|
+
) : () => !0, br = I.hasStandardBrowserEnv ? (
|
|
1020
1020
|
// Standard browser envs support document.cookie
|
|
1021
1021
|
{
|
|
1022
1022
|
write(e, t, n, r, s, i) {
|
|
@@ -1043,17 +1043,17 @@ const ae = (e, t, n = 3) => {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
);
|
|
1046
|
-
function
|
|
1046
|
+
function Rr(e) {
|
|
1047
1047
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function wr(e, t) {
|
|
1050
1050
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
let r = !
|
|
1054
|
-
return e && (r || n == !1) ?
|
|
1052
|
+
function Tt(e, t, n) {
|
|
1053
|
+
let r = !Rr(t);
|
|
1054
|
+
return e && (r || n == !1) ? wr(e, t) : t;
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Qe = (e) => e instanceof D ? { ...e } : e;
|
|
1057
1057
|
function H(e, t) {
|
|
1058
1058
|
t = t || {};
|
|
1059
1059
|
const n = {};
|
|
@@ -1111,17 +1111,17 @@ function H(e, t) {
|
|
|
1111
1111
|
socketPath: o,
|
|
1112
1112
|
responseEncoding: o,
|
|
1113
1113
|
validateStatus: c,
|
|
1114
|
-
headers: (l, u, h) => s(
|
|
1114
|
+
headers: (l, u, h) => s(Qe(l), Qe(u), h, !0)
|
|
1115
1115
|
};
|
|
1116
1116
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1117
1117
|
const h = f[u] || s, w = h(e[u], t[u], u);
|
|
1118
1118
|
a.isUndefined(w) && h !== c || (n[u] = w);
|
|
1119
1119
|
}), n;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1121
|
+
const At = (e) => {
|
|
1122
1122
|
const t = H({}, e);
|
|
1123
1123
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1124
|
-
t.headers = o = D.from(o), t.url =
|
|
1124
|
+
t.headers = o = D.from(o), t.url = St(Tt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1125
1125
|
"Authorization",
|
|
1126
1126
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1127
1127
|
);
|
|
@@ -1134,14 +1134,14 @@ const Tt = (e) => {
|
|
|
1134
1134
|
o.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
|
-
if (I.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1138
|
-
const l = s && i &&
|
|
1137
|
+
if (I.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && mr(t.url))) {
|
|
1138
|
+
const l = s && i && br.read(i);
|
|
1139
1139
|
l && o.set(s, l);
|
|
1140
1140
|
}
|
|
1141
1141
|
return t;
|
|
1142
|
-
},
|
|
1142
|
+
}, Sr = typeof XMLHttpRequest < "u", yr = Sr && function(e) {
|
|
1143
1143
|
return new Promise(function(n, r) {
|
|
1144
|
-
const s =
|
|
1144
|
+
const s = At(e);
|
|
1145
1145
|
let i = s.data;
|
|
1146
1146
|
const o = D.from(s.headers).normalize();
|
|
1147
1147
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, w, S, d;
|
|
@@ -1163,7 +1163,7 @@ const Tt = (e) => {
|
|
|
1163
1163
|
config: e,
|
|
1164
1164
|
request: p
|
|
1165
1165
|
};
|
|
1166
|
-
|
|
1166
|
+
Ot(function(U) {
|
|
1167
1167
|
n(U), m();
|
|
1168
1168
|
}, function(U) {
|
|
1169
1169
|
r(U), m();
|
|
@@ -1177,7 +1177,7 @@ const Tt = (e) => {
|
|
|
1177
1177
|
r(new R("Network Error", R.ERR_NETWORK, e, p)), p = null;
|
|
1178
1178
|
}, p.ontimeout = function() {
|
|
1179
1179
|
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1180
|
-
const T = s.transitional ||
|
|
1180
|
+
const T = s.transitional || yt;
|
|
1181
1181
|
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new R(
|
|
1182
1182
|
x,
|
|
1183
1183
|
T.clarifyTimeoutError ? R.ETIMEDOUT : R.ECONNABORTED,
|
|
@@ -1189,14 +1189,14 @@ const Tt = (e) => {
|
|
|
1189
1189
|
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([w, d] = ae(l, !0), p.addEventListener("progress", w)), f && p.upload && ([h, S] = ae(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (u = (g) => {
|
|
1190
1190
|
p && (r(!g || g.type ? new V(null, e, p) : g), p.abort(), p = null);
|
|
1191
1191
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1192
|
-
const E =
|
|
1192
|
+
const E = dr(s.url);
|
|
1193
1193
|
if (E && I.protocols.indexOf(E) === -1) {
|
|
1194
1194
|
r(new R("Unsupported protocol " + E + ":", R.ERR_BAD_REQUEST, e));
|
|
1195
1195
|
return;
|
|
1196
1196
|
}
|
|
1197
1197
|
p.send(i || null);
|
|
1198
1198
|
});
|
|
1199
|
-
},
|
|
1199
|
+
}, Er = (e, t) => {
|
|
1200
1200
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1201
1201
|
if (t || n) {
|
|
1202
1202
|
let r = new AbortController(), s;
|
|
@@ -1219,7 +1219,7 @@ const Tt = (e) => {
|
|
|
1219
1219
|
const { signal: f } = r;
|
|
1220
1220
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1221
1221
|
}
|
|
1222
|
-
},
|
|
1222
|
+
}, gr = function* (e, t) {
|
|
1223
1223
|
let n = e.byteLength;
|
|
1224
1224
|
if (n < t) {
|
|
1225
1225
|
yield e;
|
|
@@ -1228,10 +1228,10 @@ const Tt = (e) => {
|
|
|
1228
1228
|
let r = 0, s;
|
|
1229
1229
|
for (; r < n; )
|
|
1230
1230
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1231
|
-
},
|
|
1232
|
-
for await (const n of
|
|
1233
|
-
yield*
|
|
1234
|
-
},
|
|
1231
|
+
}, Or = async function* (e, t) {
|
|
1232
|
+
for await (const n of Tr(e))
|
|
1233
|
+
yield* gr(n, t);
|
|
1234
|
+
}, Tr = async function* (e) {
|
|
1235
1235
|
if (e[Symbol.asyncIterator]) {
|
|
1236
1236
|
yield* e;
|
|
1237
1237
|
return;
|
|
@@ -1247,8 +1247,8 @@ const Tt = (e) => {
|
|
|
1247
1247
|
} finally {
|
|
1248
1248
|
await t.cancel();
|
|
1249
1249
|
}
|
|
1250
|
-
},
|
|
1251
|
-
const s =
|
|
1250
|
+
}, et = (e, t, n, r) => {
|
|
1251
|
+
const s = Or(e, t);
|
|
1252
1252
|
let i = 0, o, c = (f) => {
|
|
1253
1253
|
o || (o = !0, r && r(f));
|
|
1254
1254
|
};
|
|
@@ -1276,13 +1276,13 @@ const Tt = (e) => {
|
|
|
1276
1276
|
}, {
|
|
1277
1277
|
highWaterMark: 2
|
|
1278
1278
|
});
|
|
1279
|
-
}, me = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1279
|
+
}, me = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ct = me && typeof ReadableStream == "function", Ar = me && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Nt = (e, ...t) => {
|
|
1280
1280
|
try {
|
|
1281
1281
|
return !!e(...t);
|
|
1282
1282
|
} catch {
|
|
1283
1283
|
return !1;
|
|
1284
1284
|
}
|
|
1285
|
-
},
|
|
1285
|
+
}, Cr = Ct && Nt(() => {
|
|
1286
1286
|
let e = !1;
|
|
1287
1287
|
const t = new Request(I.origin, {
|
|
1288
1288
|
body: new ReadableStream(),
|
|
@@ -1292,7 +1292,7 @@ const Tt = (e) => {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
}).headers.has("Content-Type");
|
|
1294
1294
|
return e && !t;
|
|
1295
|
-
}),
|
|
1295
|
+
}), tt = 64 * 1024, Le = Ct && Nt(() => a.isReadableStream(new Response("").body)), ce = {
|
|
1296
1296
|
stream: Le && ((e) => e.body)
|
|
1297
1297
|
};
|
|
1298
1298
|
me && ((e) => {
|
|
@@ -1302,7 +1302,7 @@ me && ((e) => {
|
|
|
1302
1302
|
});
|
|
1303
1303
|
});
|
|
1304
1304
|
})(new Response());
|
|
1305
|
-
const
|
|
1305
|
+
const Nr = async (e) => {
|
|
1306
1306
|
if (e == null)
|
|
1307
1307
|
return 0;
|
|
1308
1308
|
if (a.isBlob(e))
|
|
@@ -1315,11 +1315,11 @@ const Ar = async (e) => {
|
|
|
1315
1315
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1316
1316
|
return e.byteLength;
|
|
1317
1317
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1318
|
-
return (await
|
|
1319
|
-
},
|
|
1318
|
+
return (await Ar(e)).byteLength;
|
|
1319
|
+
}, _r = async (e, t) => {
|
|
1320
1320
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1321
|
-
return n ??
|
|
1322
|
-
},
|
|
1321
|
+
return n ?? Nr(t);
|
|
1322
|
+
}, Pr = me && (async (e) => {
|
|
1323
1323
|
let {
|
|
1324
1324
|
url: t,
|
|
1325
1325
|
method: n,
|
|
@@ -1333,26 +1333,26 @@ const Ar = async (e) => {
|
|
|
1333
1333
|
headers: u,
|
|
1334
1334
|
withCredentials: h = "same-origin",
|
|
1335
1335
|
fetchOptions: w
|
|
1336
|
-
} =
|
|
1336
|
+
} = At(e);
|
|
1337
1337
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1338
|
-
let S =
|
|
1338
|
+
let S = Er([s, i && i.toAbortSignal()], o), d;
|
|
1339
1339
|
const m = S && S.unsubscribe && (() => {
|
|
1340
1340
|
S.unsubscribe();
|
|
1341
1341
|
});
|
|
1342
1342
|
let p;
|
|
1343
1343
|
try {
|
|
1344
|
-
if (f &&
|
|
1344
|
+
if (f && Cr && n !== "get" && n !== "head" && (p = await _r(u, r)) !== 0) {
|
|
1345
1345
|
let T = new Request(t, {
|
|
1346
1346
|
method: "POST",
|
|
1347
1347
|
body: r,
|
|
1348
1348
|
duplex: "half"
|
|
1349
1349
|
}), L;
|
|
1350
1350
|
if (a.isFormData(r) && (L = T.headers.get("content-type")) && u.setContentType(L), T.body) {
|
|
1351
|
-
const [U, F] =
|
|
1351
|
+
const [U, F] = Ye(
|
|
1352
1352
|
p,
|
|
1353
|
-
ae(
|
|
1353
|
+
ae(Ze(f))
|
|
1354
1354
|
);
|
|
1355
|
-
r =
|
|
1355
|
+
r = et(T.body, tt, U, F);
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
a.isString(h) || (h = h ? "include" : "omit");
|
|
@@ -1373,12 +1373,12 @@ const Ar = async (e) => {
|
|
|
1373
1373
|
["status", "statusText", "headers"].forEach((Y) => {
|
|
1374
1374
|
T[Y] = E[Y];
|
|
1375
1375
|
});
|
|
1376
|
-
const L = a.toFiniteNumber(E.headers.get("content-length")), [U, F] = c &&
|
|
1376
|
+
const L = a.toFiniteNumber(E.headers.get("content-length")), [U, F] = c && Ye(
|
|
1377
1377
|
L,
|
|
1378
|
-
ae(
|
|
1378
|
+
ae(Ze(c), !0)
|
|
1379
1379
|
) || [];
|
|
1380
1380
|
E = new Response(
|
|
1381
|
-
|
|
1381
|
+
et(E.body, tt, U, () => {
|
|
1382
1382
|
F && F(), m && m();
|
|
1383
1383
|
}),
|
|
1384
1384
|
T
|
|
@@ -1387,7 +1387,7 @@ const Ar = async (e) => {
|
|
|
1387
1387
|
l = l || "text";
|
|
1388
1388
|
let x = await ce[a.findKey(ce, l) || "text"](E, e);
|
|
1389
1389
|
return !g && m && m(), await new Promise((T, L) => {
|
|
1390
|
-
|
|
1390
|
+
Ot(T, L, {
|
|
1391
1391
|
data: x,
|
|
1392
1392
|
headers: D.from(E.headers),
|
|
1393
1393
|
status: E.status,
|
|
@@ -1405,9 +1405,9 @@ const Ar = async (e) => {
|
|
|
1405
1405
|
) : R.from(y, y && y.code, e, d);
|
|
1406
1406
|
}
|
|
1407
1407
|
}), Ue = {
|
|
1408
|
-
http:
|
|
1409
|
-
xhr:
|
|
1410
|
-
fetch:
|
|
1408
|
+
http: $n,
|
|
1409
|
+
xhr: yr,
|
|
1410
|
+
fetch: Pr
|
|
1411
1411
|
};
|
|
1412
1412
|
a.forEach(Ue, (e, t) => {
|
|
1413
1413
|
if (e) {
|
|
@@ -1418,7 +1418,7 @@ a.forEach(Ue, (e, t) => {
|
|
|
1418
1418
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1419
1419
|
}
|
|
1420
1420
|
});
|
|
1421
|
-
const
|
|
1421
|
+
const nt = (e) => `- ${e}`, Ir = (e) => a.isFunction(e) || e === null || e === !1, _t = {
|
|
1422
1422
|
getAdapter: (e) => {
|
|
1423
1423
|
e = a.isArray(e) ? e : [e];
|
|
1424
1424
|
const { length: t } = e;
|
|
@@ -1427,7 +1427,7 @@ const tt = (e) => `- ${e}`, _r = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1427
1427
|
for (let i = 0; i < t; i++) {
|
|
1428
1428
|
n = e[i];
|
|
1429
1429
|
let o;
|
|
1430
|
-
if (r = n, !
|
|
1430
|
+
if (r = n, !Ir(n) && (r = Ue[(o = String(n)).toLowerCase()], r === void 0))
|
|
1431
1431
|
throw new R(`Unknown adapter '${o}'`);
|
|
1432
1432
|
if (r)
|
|
1433
1433
|
break;
|
|
@@ -1438,8 +1438,8 @@ const tt = (e) => `- ${e}`, _r = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1438
1438
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1439
1439
|
);
|
|
1440
1440
|
let o = t ? i.length > 1 ? `since :
|
|
1441
|
-
` + i.map(
|
|
1442
|
-
`) : " " +
|
|
1441
|
+
` + i.map(nt).join(`
|
|
1442
|
+
`) : " " + nt(i[0]) : "as no adapter specified";
|
|
1443
1443
|
throw new R(
|
|
1444
1444
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1445
1445
|
"ERR_NOT_SUPPORT"
|
|
@@ -1453,34 +1453,34 @@ function Ne(e) {
|
|
|
1453
1453
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1454
1454
|
throw new V(null, e);
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function rt(e) {
|
|
1457
1457
|
return Ne(e), e.headers = D.from(e.headers), e.data = Ce.call(
|
|
1458
1458
|
e,
|
|
1459
1459
|
e.transformRequest
|
|
1460
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1460
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), _t.getAdapter(e.adapter || X.adapter)(e).then(function(r) {
|
|
1461
1461
|
return Ne(e), r.data = Ce.call(
|
|
1462
1462
|
e,
|
|
1463
1463
|
e.transformResponse,
|
|
1464
1464
|
r
|
|
1465
1465
|
), r.headers = D.from(r.headers), r;
|
|
1466
1466
|
}, function(r) {
|
|
1467
|
-
return
|
|
1467
|
+
return gt(r) || (Ne(e), r && r.response && (r.response.data = Ce.call(
|
|
1468
1468
|
e,
|
|
1469
1469
|
e.transformResponse,
|
|
1470
1470
|
r.response
|
|
1471
1471
|
), r.response.headers = D.from(r.response.headers))), Promise.reject(r);
|
|
1472
1472
|
});
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1474
|
+
const Pt = "1.9.0", be = {};
|
|
1475
1475
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1476
1476
|
be[e] = function(r) {
|
|
1477
1477
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1478
1478
|
};
|
|
1479
1479
|
});
|
|
1480
|
-
const
|
|
1480
|
+
const st = {};
|
|
1481
1481
|
be.transitional = function(t, n, r) {
|
|
1482
1482
|
function s(i, o) {
|
|
1483
|
-
return "[Axios v" +
|
|
1483
|
+
return "[Axios v" + Pt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1484
1484
|
}
|
|
1485
1485
|
return (i, o, c) => {
|
|
1486
1486
|
if (t === !1)
|
|
@@ -1488,7 +1488,7 @@ be.transitional = function(t, n, r) {
|
|
|
1488
1488
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1489
1489
|
R.ERR_DEPRECATED
|
|
1490
1490
|
);
|
|
1491
|
-
return n && !
|
|
1491
|
+
return n && !st[o] && (st[o] = !0, console.warn(
|
|
1492
1492
|
s(
|
|
1493
1493
|
o,
|
|
1494
1494
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1499,7 +1499,7 @@ be.transitional = function(t, n, r) {
|
|
|
1499
1499
|
be.spelling = function(t) {
|
|
1500
1500
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1501
1501
|
};
|
|
1502
|
-
function
|
|
1502
|
+
function xr(e, t, n) {
|
|
1503
1503
|
if (typeof e != "object")
|
|
1504
1504
|
throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
|
|
1505
1505
|
const r = Object.keys(e);
|
|
@@ -1517,14 +1517,14 @@ function Pr(e, t, n) {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
const ie = {
|
|
1520
|
-
assertOptions:
|
|
1520
|
+
assertOptions: xr,
|
|
1521
1521
|
validators: be
|
|
1522
1522
|
}, q = ie.validators;
|
|
1523
1523
|
let v = class {
|
|
1524
1524
|
constructor(t) {
|
|
1525
1525
|
this.defaults = t || {}, this.interceptors = {
|
|
1526
|
-
request: new
|
|
1527
|
-
response: new
|
|
1526
|
+
request: new Ke(),
|
|
1527
|
+
response: new Ke()
|
|
1528
1528
|
};
|
|
1529
1529
|
}
|
|
1530
1530
|
/**
|
|
@@ -1589,7 +1589,7 @@ let v = class {
|
|
|
1589
1589
|
});
|
|
1590
1590
|
let u, h = 0, w;
|
|
1591
1591
|
if (!f) {
|
|
1592
|
-
const d = [
|
|
1592
|
+
const d = [rt.bind(this), void 0];
|
|
1593
1593
|
for (d.unshift.apply(d, c), d.push.apply(d, l), w = d.length, u = Promise.resolve(n); h < w; )
|
|
1594
1594
|
u = u.then(d[h++], d[h++]);
|
|
1595
1595
|
return u;
|
|
@@ -1606,7 +1606,7 @@ let v = class {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
try {
|
|
1609
|
-
u =
|
|
1609
|
+
u = rt.call(this, S);
|
|
1610
1610
|
} catch (d) {
|
|
1611
1611
|
return Promise.reject(d);
|
|
1612
1612
|
}
|
|
@@ -1616,8 +1616,8 @@ let v = class {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
getUri(t) {
|
|
1618
1618
|
t = H(this.defaults, t);
|
|
1619
|
-
const n =
|
|
1620
|
-
return
|
|
1619
|
+
const n = Tt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1620
|
+
return St(n, t.params, t.paramsSerializer);
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
1623
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1644,7 +1644,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
v.prototype[t] = n(), v.prototype[t + "Form"] = n(!0);
|
|
1646
1646
|
});
|
|
1647
|
-
let
|
|
1647
|
+
let Fr = class It {
|
|
1648
1648
|
constructor(t) {
|
|
1649
1649
|
if (typeof t != "function")
|
|
1650
1650
|
throw new TypeError("executor must be a function.");
|
|
@@ -1710,19 +1710,19 @@ let Ir = class Pt {
|
|
|
1710
1710
|
static source() {
|
|
1711
1711
|
let t;
|
|
1712
1712
|
return {
|
|
1713
|
-
token: new
|
|
1713
|
+
token: new It(function(s) {
|
|
1714
1714
|
t = s;
|
|
1715
1715
|
}),
|
|
1716
1716
|
cancel: t
|
|
1717
1717
|
};
|
|
1718
1718
|
}
|
|
1719
1719
|
};
|
|
1720
|
-
function
|
|
1720
|
+
function Lr(e) {
|
|
1721
1721
|
return function(n) {
|
|
1722
1722
|
return e.apply(null, n);
|
|
1723
1723
|
};
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function Ur(e) {
|
|
1726
1726
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1727
1727
|
}
|
|
1728
1728
|
const ke = {
|
|
@@ -1793,66 +1793,66 @@ const ke = {
|
|
|
1793
1793
|
Object.entries(ke).forEach(([e, t]) => {
|
|
1794
1794
|
ke[t] = e;
|
|
1795
1795
|
});
|
|
1796
|
-
function
|
|
1797
|
-
const t = new v(e), n =
|
|
1796
|
+
function xt(e) {
|
|
1797
|
+
const t = new v(e), n = at(v.prototype.request, t);
|
|
1798
1798
|
return a.extend(n, v.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1799
|
-
return
|
|
1799
|
+
return xt(H(e, s));
|
|
1800
1800
|
}, n;
|
|
1801
1801
|
}
|
|
1802
|
-
const N =
|
|
1802
|
+
const N = xt(X);
|
|
1803
1803
|
N.Axios = v;
|
|
1804
1804
|
N.CanceledError = V;
|
|
1805
|
-
N.CancelToken =
|
|
1806
|
-
N.isCancel =
|
|
1807
|
-
N.VERSION =
|
|
1805
|
+
N.CancelToken = Fr;
|
|
1806
|
+
N.isCancel = gt;
|
|
1807
|
+
N.VERSION = Pt;
|
|
1808
1808
|
N.toFormData = pe;
|
|
1809
1809
|
N.AxiosError = R;
|
|
1810
1810
|
N.Cancel = N.CanceledError;
|
|
1811
1811
|
N.all = function(t) {
|
|
1812
1812
|
return Promise.all(t);
|
|
1813
1813
|
};
|
|
1814
|
-
N.spread =
|
|
1815
|
-
N.isAxiosError =
|
|
1814
|
+
N.spread = Lr;
|
|
1815
|
+
N.isAxiosError = Ur;
|
|
1816
1816
|
N.mergeConfig = H;
|
|
1817
1817
|
N.AxiosHeaders = D;
|
|
1818
|
-
N.formToJSON = (e) =>
|
|
1819
|
-
N.getAdapter =
|
|
1818
|
+
N.formToJSON = (e) => Et(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1819
|
+
N.getAdapter = _t.getAdapter;
|
|
1820
1820
|
N.HttpStatusCode = ke;
|
|
1821
1821
|
N.default = N;
|
|
1822
1822
|
const {
|
|
1823
|
-
Axios:
|
|
1824
|
-
AxiosError:
|
|
1825
|
-
CanceledError:
|
|
1826
|
-
isCancel:
|
|
1827
|
-
CancelToken:
|
|
1828
|
-
VERSION:
|
|
1829
|
-
all:
|
|
1830
|
-
Cancel:
|
|
1831
|
-
isAxiosError:
|
|
1832
|
-
spread:
|
|
1833
|
-
toFormData:
|
|
1834
|
-
AxiosHeaders:
|
|
1823
|
+
Axios: ns,
|
|
1824
|
+
AxiosError: rs,
|
|
1825
|
+
CanceledError: ss,
|
|
1826
|
+
isCancel: os,
|
|
1827
|
+
CancelToken: is,
|
|
1828
|
+
VERSION: as,
|
|
1829
|
+
all: cs,
|
|
1830
|
+
Cancel: ls,
|
|
1831
|
+
isAxiosError: us,
|
|
1832
|
+
spread: fs,
|
|
1833
|
+
toFormData: ds,
|
|
1834
|
+
AxiosHeaders: hs,
|
|
1835
1835
|
HttpStatusCode: le,
|
|
1836
|
-
formToJSON:
|
|
1837
|
-
getAdapter:
|
|
1838
|
-
mergeConfig:
|
|
1839
|
-
} = N, re =
|
|
1836
|
+
formToJSON: ps,
|
|
1837
|
+
getAdapter: ms,
|
|
1838
|
+
mergeConfig: bs
|
|
1839
|
+
} = N, re = Vt.ECONOMY, kr = 3 * 60 * 1e3, _e = "Flight stream received a 401, refreshed the token, and restarted the stream.", ot = (e) => {
|
|
1840
1840
|
if (!e.origin || !e.destination)
|
|
1841
1841
|
throw new Error("Origin and destination are required.");
|
|
1842
1842
|
if (!e.dates)
|
|
1843
1843
|
throw new Error("At least one date is required.");
|
|
1844
|
-
if (e.flightType ===
|
|
1844
|
+
if (e.flightType === it.ROUND_TRIP && e.dates.length != 2)
|
|
1845
1845
|
throw new Error(
|
|
1846
1846
|
"Two dates are required for round-trip flights: departure and return."
|
|
1847
1847
|
);
|
|
1848
|
-
},
|
|
1848
|
+
}, Dr = (e, t, n) => e[t] === le.Ok ? e : {
|
|
1849
1849
|
...e,
|
|
1850
1850
|
[t]: n ?? le.MultipleChoices
|
|
1851
|
-
},
|
|
1852
|
-
const { token: e } = await
|
|
1851
|
+
}, Br = (e) => localStorage.getItem(zt.TOKEN) || e || "", qr = async () => {
|
|
1852
|
+
const { token: e } = await vt.refreshAccessToken();
|
|
1853
1853
|
return e;
|
|
1854
|
-
},
|
|
1855
|
-
const { token: e, config: t } =
|
|
1854
|
+
}, Rs = () => {
|
|
1855
|
+
const { token: e, config: t } = jt(), [n, r] = Oe(""), [s, i] = Oe([]), [o, c] = Oe(!1), f = Te(null), l = Te(null), u = Te(0), {
|
|
1856
1856
|
inboundResults: h,
|
|
1857
1857
|
outboundResults: w,
|
|
1858
1858
|
setInboundResults: S,
|
|
@@ -1861,29 +1861,29 @@ const {
|
|
|
1861
1861
|
setPartialOfferRequestId: p,
|
|
1862
1862
|
airlineStatuses: y,
|
|
1863
1863
|
setAirlineStatuses: E
|
|
1864
|
-
} =
|
|
1864
|
+
} = $t(), { data: g } = Ht({
|
|
1865
1865
|
queryKey: [z.SUPPORTED_AIRLINE_PROGRAMS],
|
|
1866
1866
|
queryFn: J.getSupportedAirlinePrograms
|
|
1867
1867
|
}), x = ({
|
|
1868
1868
|
data: b,
|
|
1869
1869
|
inbound: O
|
|
1870
1870
|
}) => {
|
|
1871
|
-
const A =
|
|
1872
|
-
return (O ? S : d)(
|
|
1871
|
+
const A = Wt(b);
|
|
1872
|
+
return (O ? S : d)(Gt(A)), A;
|
|
1873
1873
|
}, {
|
|
1874
1874
|
mutate: T,
|
|
1875
1875
|
status: L,
|
|
1876
1876
|
error: U
|
|
1877
1877
|
} = ge({
|
|
1878
1878
|
mutationFn: async (b) => {
|
|
1879
|
-
|
|
1880
|
-
const { passengerList: O } =
|
|
1879
|
+
ot(b);
|
|
1880
|
+
const { passengerList: O } = Jt(b.passengers), A = {
|
|
1881
1881
|
passengers: O,
|
|
1882
1882
|
origin: b.origin || "",
|
|
1883
1883
|
destination: b.destination || "",
|
|
1884
1884
|
cabin_class: b.cabinClass ?? re
|
|
1885
1885
|
};
|
|
1886
|
-
if (b.flightType ===
|
|
1886
|
+
if (b.flightType === it.ONE_WAY) {
|
|
1887
1887
|
const _ = await J.cashOnlySearch({
|
|
1888
1888
|
...A,
|
|
1889
1889
|
departure_dates: b.dates
|
|
@@ -1922,7 +1922,7 @@ const {
|
|
|
1922
1922
|
}), {
|
|
1923
1923
|
mutate: F,
|
|
1924
1924
|
status: Y,
|
|
1925
|
-
error:
|
|
1925
|
+
error: Ft
|
|
1926
1926
|
} = ge({
|
|
1927
1927
|
mutationFn: async ({
|
|
1928
1928
|
outboundOfferId: b,
|
|
@@ -1950,9 +1950,9 @@ const {
|
|
|
1950
1950
|
te.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1951
1951
|
}
|
|
1952
1952
|
}), {
|
|
1953
|
-
mutate:
|
|
1954
|
-
status:
|
|
1955
|
-
error:
|
|
1953
|
+
mutate: Lt,
|
|
1954
|
+
status: Ut,
|
|
1955
|
+
error: kt
|
|
1956
1956
|
} = ge({
|
|
1957
1957
|
mutationFn: async ({
|
|
1958
1958
|
inboundOfferId: b,
|
|
@@ -1971,7 +1971,7 @@ const {
|
|
|
1971
1971
|
const { success: O, data: A } = b;
|
|
1972
1972
|
if (!O) return;
|
|
1973
1973
|
const _ = A.offers;
|
|
1974
|
-
i(
|
|
1974
|
+
i(ze(_));
|
|
1975
1975
|
},
|
|
1976
1976
|
onError: (b) => {
|
|
1977
1977
|
console.error("Error in round-trip fare search:", b);
|
|
@@ -1980,18 +1980,19 @@ const {
|
|
|
1980
1980
|
te.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1981
1981
|
}
|
|
1982
1982
|
}), Re = async (b, O) => {
|
|
1983
|
-
var je, Me, ve;
|
|
1983
|
+
var je, Me, ve, He;
|
|
1984
1984
|
const A = u.current + 1;
|
|
1985
1985
|
u.current = A, (O == null ? void 0 : O.resetAirlineStatuses) !== !1 && E(() => ({
|
|
1986
1986
|
...g == null ? void 0 : g.reduce((C, P) => (C[P] = -1, C), {})
|
|
1987
1987
|
})), c(!0);
|
|
1988
|
-
const _ = b.paymentType === ne.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], Z = ((je = b.passengers) == null ? void 0 : je.adults) ?? 1, Q = ((Me = b.passengers) == null ? void 0 : Me.children) ?? 0,
|
|
1988
|
+
const _ = b.paymentType === ne.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], Z = ((je = b.passengers) == null ? void 0 : je.adults) ?? 1, Q = ((Me = b.passengers) == null ? void 0 : Me.children) ?? 0, Dt = ((ve = b.passengers) == null ? void 0 : ve.infants) ?? 0, Bt = Kt({
|
|
1989
1989
|
originCode: b.origin,
|
|
1990
1990
|
destinationCode: b.destination,
|
|
1991
1991
|
dates: b.dates,
|
|
1992
1992
|
cabinClass: b.cabinClass ?? re,
|
|
1993
1993
|
adults: Z,
|
|
1994
1994
|
children: Q,
|
|
1995
|
+
infants: Dt,
|
|
1995
1996
|
paymentType: _
|
|
1996
1997
|
});
|
|
1997
1998
|
let Se = [], ye = 0;
|
|
@@ -2004,20 +2005,20 @@ const {
|
|
|
2004
2005
|
() => {
|
|
2005
2006
|
j();
|
|
2006
2007
|
},
|
|
2007
|
-
(((
|
|
2008
|
+
(((He = t == null ? void 0 : t.flightsConfig) == null ? void 0 : He.streamTimeoutTotalSeconds) ?? kr) * 1e3
|
|
2008
2009
|
);
|
|
2009
2010
|
try {
|
|
2010
|
-
await
|
|
2011
|
+
await nn(Mt() + Bt, {
|
|
2011
2012
|
headers: {
|
|
2012
2013
|
"Content-Type": "application/json",
|
|
2013
|
-
Authorization:
|
|
2014
|
+
Authorization: Br(e),
|
|
2014
2015
|
"client-id": (t == null ? void 0 : t.clientId) ?? ""
|
|
2015
2016
|
},
|
|
2016
2017
|
openWhenHidden: !0,
|
|
2017
2018
|
signal: ee.signal,
|
|
2018
2019
|
async onopen(C) {
|
|
2019
2020
|
if (C.status === le.Unauthorized && !(O != null && O.hasRetriedAfterAuthRefresh))
|
|
2020
|
-
throw f.current && (clearTimeout(f.current), f.current = null), ee.abort(), await
|
|
2021
|
+
throw f.current && (clearTimeout(f.current), f.current = null), ee.abort(), await qr(), A === u.current && Re(b, {
|
|
2021
2022
|
hasRetriedAfterAuthRefresh: !0,
|
|
2022
2023
|
resetAirlineStatuses: !1
|
|
2023
2024
|
}), new Error(_e);
|
|
@@ -2028,7 +2029,7 @@ const {
|
|
|
2028
2029
|
},
|
|
2029
2030
|
onmessage(C) {
|
|
2030
2031
|
try {
|
|
2031
|
-
const P =
|
|
2032
|
+
const P = ze(JSON.parse(C.data));
|
|
2032
2033
|
if (P.success === !1)
|
|
2033
2034
|
return;
|
|
2034
2035
|
if (P.close === !0) {
|
|
@@ -2036,15 +2037,15 @@ const {
|
|
|
2036
2037
|
return;
|
|
2037
2038
|
}
|
|
2038
2039
|
if (P.airlineProgram && E(
|
|
2039
|
-
(Ee) =>
|
|
2040
|
+
(Ee) => Dr(
|
|
2040
2041
|
Ee,
|
|
2041
2042
|
P.airlineProgram,
|
|
2042
2043
|
P.status ?? P.statusCode
|
|
2043
2044
|
)
|
|
2044
2045
|
), P.status === le.Ok && P.flights && P.flights.length > 0) {
|
|
2045
2046
|
ye = 0;
|
|
2046
|
-
const Ee = P.flights.map((
|
|
2047
|
-
...
|
|
2047
|
+
const Ee = P.flights.map((qt) => ({
|
|
2048
|
+
...qt,
|
|
2048
2049
|
partners: P.partners ?? []
|
|
2049
2050
|
}));
|
|
2050
2051
|
Se = [...Se, ...Ee], x({ data: Se });
|
|
@@ -2090,10 +2091,10 @@ const {
|
|
|
2090
2091
|
* @type {boolean}
|
|
2091
2092
|
* @default false
|
|
2092
2093
|
*/
|
|
2093
|
-
loadingFares:
|
|
2094
|
+
loadingFares: Ut === "pending",
|
|
2094
2095
|
outboundError: U,
|
|
2095
|
-
inboundError:
|
|
2096
|
-
roundTripFaresError:
|
|
2096
|
+
inboundError: Ft,
|
|
2097
|
+
roundTripFaresError: kt,
|
|
2097
2098
|
// Results
|
|
2098
2099
|
outboundResults: w,
|
|
2099
2100
|
inboundResults: h,
|
|
@@ -2106,7 +2107,7 @@ const {
|
|
|
2106
2107
|
* @param {ISearchFlightArgs} args - The search arguments
|
|
2107
2108
|
*/
|
|
2108
2109
|
searchOutboundFlights: async (b) => {
|
|
2109
|
-
switch (
|
|
2110
|
+
switch (ot(b), d([]), we(), b.paymentType) {
|
|
2110
2111
|
case ne.CASH_AND_MILES:
|
|
2111
2112
|
Re(b);
|
|
2112
2113
|
break;
|
|
@@ -2131,7 +2132,7 @@ const {
|
|
|
2131
2132
|
*
|
|
2132
2133
|
* @param {{ inboundOfferId: string; cabinClass: ECabinClass }} args - The fare search arguments
|
|
2133
2134
|
*/
|
|
2134
|
-
getRoundTripFares:
|
|
2135
|
+
getRoundTripFares: Lt,
|
|
2135
2136
|
/**
|
|
2136
2137
|
* Resets the flight search state, clearing all results and selections
|
|
2137
2138
|
* @type {function}
|
|
@@ -2154,5 +2155,5 @@ const {
|
|
|
2154
2155
|
};
|
|
2155
2156
|
};
|
|
2156
2157
|
export {
|
|
2157
|
-
|
|
2158
|
+
Rs as useFlightSearch
|
|
2158
2159
|
};
|