@odynn/awayz-flights 0.9.13 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +1,80 @@
1
- import { useAwayzContext as te, awayzClient as P, getBaseUrl as ne } from "@odynn/awayz-core";
2
- import { useQuery as re, useMutation as x } from "@tanstack/react-query";
1
+ import { useAwayzContext as xt, awayzClient as Y, getBaseUrl as Ft } from "@odynn/awayz-core";
2
+ import { useQuery as Nt, useMutation as me } from "@tanstack/react-query";
3
3
  import "../../moment-BGjjqtLQ.js";
4
4
  import "../../arrayExtensions-Ce8YopTP.js";
5
- import { c as z } from "../../objectUtils-3IeCVocm.js";
6
- import { E as A } from "../../enums-tLvxh02p.js";
7
- import { useState as D, useRef as oe } from "react";
8
- import { FlightService as _ } from "../../services/flights/FlightsService.js";
9
- import se from "../../stores/useFlightStore.js";
10
- import { EFlightType as J, EFlightPaymentType as k } from "../../types/enums.js";
11
- import { ECabinClass as ae } from "../../types/ECabinClass.js";
12
- import { mapDataToFlightDetails as ie, groupFlightResults as ue, buildFlightSearchQuery as ce } from "../../utils/flightUtils.js";
13
- async function le(o, t) {
14
- const r = o.getReader();
15
- let n;
16
- for (; !(n = await r.read()).done; )
17
- t(n.value);
18
- }
19
- function de(o) {
20
- let t, r, n, s = !1;
21
- return function(f) {
22
- t === void 0 ? (t = f, r = 0, n = -1) : t = pe(t, f);
23
- const d = t.length;
24
- let u = 0;
25
- for (; r < d; ) {
26
- s && (t[r] === 10 && (u = ++r), s = !1);
27
- let p = -1;
28
- for (; r < d && p === -1; ++r)
29
- switch (t[r]) {
5
+ import { c as Ue } from "../../objectUtils-3IeCVocm.js";
6
+ import { E as J } from "../../enums-DPFgYLjY.js";
7
+ import { useState as ye, useRef as Pt } from "react";
8
+ import { FlightService as W } from "../../services/flights/FlightsService.js";
9
+ import _t from "../../stores/useFlightStore.js";
10
+ import { EFlightType as Ye, EFlightPaymentType as Z } from "../../types/enums.js";
11
+ import { ECabinClass as Lt } from "../../types/ECabinClass.js";
12
+ import { mapDataToFlightDetails as kt, groupFlightResults as Ut, buildFlightSearchQuery as Dt } from "../../utils/flightUtils.js";
13
+ async function Bt(e, t) {
14
+ const n = e.getReader();
15
+ let r;
16
+ for (; !(r = await n.read()).done; )
17
+ t(r.value);
18
+ }
19
+ function It(e) {
20
+ let t, n, r, s = !1;
21
+ return function(o) {
22
+ t === void 0 ? (t = o, n = 0, r = -1) : t = jt(t, o);
23
+ const c = t.length;
24
+ let f = 0;
25
+ for (; n < c; ) {
26
+ s && (t[n] === 10 && (f = ++n), s = !1);
27
+ let u = -1;
28
+ for (; n < c && u === -1; ++n)
29
+ switch (t[n]) {
30
30
  case 58:
31
- n === -1 && (n = r - u);
31
+ r === -1 && (r = n - f);
32
32
  break;
33
33
  case 13:
34
34
  s = !0;
35
35
  case 10:
36
- p = r;
36
+ u = n;
37
37
  break;
38
38
  }
39
- if (p === -1)
39
+ if (u === -1)
40
40
  break;
41
- o(t.subarray(u, p), n), u = r, n = -1;
41
+ e(t.subarray(f, u), r), f = n, r = -1;
42
42
  }
43
- u === d ? t = void 0 : u !== 0 && (t = t.subarray(u), r -= u);
43
+ f === c ? t = void 0 : f !== 0 && (t = t.subarray(f), n -= f);
44
44
  };
45
45
  }
46
- function fe(o, t, r) {
47
- let n = B();
46
+ function qt(e, t, n) {
47
+ let r = De();
48
48
  const s = new TextDecoder();
49
- return function(f, d) {
50
- if (f.length === 0)
51
- r == null || r(n), n = B();
52
- else if (d > 0) {
53
- const u = s.decode(f.subarray(0, d)), p = d + (f[d + 1] === 32 ? 2 : 1), m = s.decode(f.subarray(p));
54
- switch (u) {
49
+ return function(o, c) {
50
+ if (o.length === 0)
51
+ n == null || n(r), r = De();
52
+ else if (c > 0) {
53
+ const f = s.decode(o.subarray(0, c)), u = c + (o[c + 1] === 32 ? 2 : 1), l = s.decode(o.subarray(u));
54
+ switch (f) {
55
55
  case "data":
56
- n.data = n.data ? n.data + `
57
- ` + m : m;
56
+ r.data = r.data ? r.data + `
57
+ ` + l : l;
58
58
  break;
59
59
  case "event":
60
- n.event = m;
60
+ r.event = l;
61
61
  break;
62
62
  case "id":
63
- o(n.id = m);
63
+ e(r.id = l);
64
64
  break;
65
65
  case "retry":
66
- const y = parseInt(m, 10);
67
- isNaN(y) || t(n.retry = y);
66
+ const d = parseInt(l, 10);
67
+ isNaN(d) || t(r.retry = d);
68
68
  break;
69
69
  }
70
70
  }
71
71
  };
72
72
  }
73
- function pe(o, t) {
74
- const r = new Uint8Array(o.length + t.length);
75
- return r.set(o), r.set(t, o.length), r;
73
+ function jt(e, t) {
74
+ const n = new Uint8Array(e.length + t.length);
75
+ return n.set(e), n.set(t, e.length), n;
76
76
  }
77
- function B() {
77
+ function De() {
78
78
  return {
79
79
  data: "",
80
80
  event: "",
@@ -82,271 +82,1975 @@ function B() {
82
82
  retry: void 0
83
83
  };
84
84
  }
85
- var he = function(o, t) {
86
- var r = {};
87
- for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && t.indexOf(n) < 0 && (r[n] = o[n]);
88
- if (o != null && typeof Object.getOwnPropertySymbols == "function")
89
- for (var s = 0, n = Object.getOwnPropertySymbols(o); s < n.length; s++)
90
- t.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(o, n[s]) && (r[n[s]] = o[n[s]]);
91
- return r;
85
+ var vt = function(e, t) {
86
+ var n = {};
87
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
88
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
89
+ for (var s = 0, r = Object.getOwnPropertySymbols(e); s < r.length; s++)
90
+ t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
91
+ return n;
92
92
  };
93
- const Q = "text/event-stream", ge = 1e3, Y = "last-event-id";
94
- function me(o, t) {
95
- var { signal: r, headers: n, onopen: s, onmessage: E, onclose: f, onerror: d, openWhenHidden: u, fetch: p } = t, m = he(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
96
- return new Promise((y, R) => {
97
- const h = Object.assign({}, n);
98
- h.accept || (h.accept = Q);
99
- let b;
100
- function q() {
101
- b.abort(), document.hidden || I();
102
- }
103
- u || document.addEventListener("visibilitychange", q);
104
- let C = ge, v = 0;
105
- function S() {
106
- document.removeEventListener("visibilitychange", q), window.clearTimeout(v), b.abort();
107
- }
108
- r == null || r.addEventListener("abort", () => {
109
- S(), y();
93
+ const Re = "text/event-stream", Ht = 1e3, Be = "last-event-id";
94
+ function Mt(e, t) {
95
+ var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: u } = t, l = vt(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
96
+ return new Promise((d, w) => {
97
+ const g = Object.assign({}, r);
98
+ g.accept || (g.accept = Re);
99
+ let p;
100
+ function m() {
101
+ p.abort(), document.hidden || O();
102
+ }
103
+ f || document.addEventListener("visibilitychange", m);
104
+ let h = Ht, E = 0;
105
+ function R() {
106
+ document.removeEventListener("visibilitychange", m), window.clearTimeout(E), p.abort();
107
+ }
108
+ n == null || n.addEventListener("abort", () => {
109
+ R(), d();
110
110
  });
111
- const N = p ?? window.fetch, H = s ?? ye;
112
- async function I() {
113
- var F;
114
- b = new AbortController();
111
+ const S = u ?? window.fetch, D = s ?? zt;
112
+ async function O() {
113
+ var _;
114
+ p = new AbortController();
115
115
  try {
116
- const T = await N(o, Object.assign(Object.assign({}, m), { headers: h, signal: b.signal }));
117
- await H(T), await le(T.body, de(fe((g) => {
118
- g ? h[Y] = g : delete h[Y];
119
- }, (g) => {
120
- C = g;
121
- }, E))), f == null || f(), S(), y();
122
- } catch (T) {
123
- if (!b.signal.aborted)
116
+ const L = await S(e, Object.assign(Object.assign({}, l), { headers: g, signal: p.signal }));
117
+ await D(L), await Bt(L.body, It(qt((P) => {
118
+ P ? g[Be] = P : delete g[Be];
119
+ }, (P) => {
120
+ h = P;
121
+ }, i))), o == null || o(), R(), d();
122
+ } catch (L) {
123
+ if (!p.signal.aborted)
124
124
  try {
125
- const g = (F = d == null ? void 0 : d(T)) !== null && F !== void 0 ? F : C;
126
- window.clearTimeout(v), v = window.setTimeout(I, g);
127
- } catch (g) {
128
- S(), R(g);
125
+ const P = (_ = c == null ? void 0 : c(L)) !== null && _ !== void 0 ? _ : h;
126
+ window.clearTimeout(E), E = window.setTimeout(O, P);
127
+ } catch (P) {
128
+ R(), w(P);
129
129
  }
130
130
  }
131
131
  }
132
- I();
132
+ O();
133
+ });
134
+ }
135
+ function zt(e) {
136
+ const t = e.headers.get("content-type");
137
+ if (!(t != null && t.startsWith(Re)))
138
+ throw new Error(`Expected content-type to be ${Re}, Actual: ${t}`);
139
+ }
140
+ function Ze(e, t) {
141
+ return function() {
142
+ return e.apply(t, arguments);
143
+ };
144
+ }
145
+ const { toString: $t } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: ie, toStringTag: et } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
146
+ const n = $t.call(t);
147
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
148
+ })(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: z } = Array, V = ce("undefined");
149
+ function Jt(e) {
150
+ return e !== null && !V(e) && e.constructor !== null && !V(e.constructor) && k(e.constructor.isBuffer) && e.constructor.isBuffer(e);
151
+ }
152
+ const tt = B("ArrayBuffer");
153
+ function Wt(e) {
154
+ let t;
155
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
156
+ }
157
+ const Kt = ce("string"), k = ce("function"), nt = ce("number"), ue = (e) => e !== null && typeof e == "object", Vt = (e) => e === !0 || e === !1, te = (e) => {
158
+ if (ae(e) !== "object")
159
+ return !1;
160
+ const t = Ne(e);
161
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(ie in e);
162
+ }, Xt = B("Date"), Qt = B("File"), Gt = B("Blob"), Yt = B("FileList"), Zt = (e) => ue(e) && k(e.pipe), en = (e) => {
163
+ let t;
164
+ return e && (typeof FormData == "function" && e instanceof FormData || k(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
165
+ t === "object" && k(e.toString) && e.toString() === "[object FormData]"));
166
+ }, tn = B("URLSearchParams"), [nn, rn, sn, on] = ["ReadableStream", "Request", "Response", "Headers"].map(B), an = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
167
+ function X(e, t, { allOwnKeys: n = !1 } = {}) {
168
+ if (e === null || typeof e > "u")
169
+ return;
170
+ let r, s;
171
+ if (typeof e != "object" && (e = [e]), z(e))
172
+ for (r = 0, s = e.length; r < s; r++)
173
+ t.call(null, e[r], r, e);
174
+ else {
175
+ const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
176
+ let c;
177
+ for (r = 0; r < o; r++)
178
+ c = i[r], t.call(null, e[c], c, e);
179
+ }
180
+ }
181
+ function rt(e, t) {
182
+ t = t.toLowerCase();
183
+ const n = Object.keys(e);
184
+ let r = n.length, s;
185
+ for (; r-- > 0; )
186
+ if (s = n[r], t === s.toLowerCase())
187
+ return s;
188
+ return null;
189
+ }
190
+ const v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !V(e) && e !== v;
191
+ function Se() {
192
+ const { caseless: e } = st(this) && this || {}, t = {}, n = (r, s) => {
193
+ const i = e && rt(t, s) || s;
194
+ te(t[i]) && te(r) ? t[i] = Se(t[i], r) : te(r) ? t[i] = Se({}, r) : z(r) ? t[i] = r.slice() : t[i] = r;
195
+ };
196
+ for (let r = 0, s = arguments.length; r < s; r++)
197
+ arguments[r] && X(arguments[r], n);
198
+ return t;
199
+ }
200
+ const cn = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
201
+ n && k(s) ? e[i] = Ze(s, n) : e[i] = s;
202
+ }, { allOwnKeys: r }), e), un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ln = (e, t, n, r) => {
203
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
204
+ value: t.prototype
205
+ }), n && Object.assign(e.prototype, n);
206
+ }, fn = (e, t, n, r) => {
207
+ let s, i, o;
208
+ const c = {};
209
+ if (t = t || {}, e == null) return t;
210
+ do {
211
+ for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
212
+ o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
213
+ e = n !== !1 && Ne(e);
214
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
215
+ return t;
216
+ }, dn = (e, t, n) => {
217
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
218
+ const r = e.indexOf(t, n);
219
+ return r !== -1 && r === n;
220
+ }, pn = (e) => {
221
+ if (!e) return null;
222
+ if (z(e)) return e;
223
+ let t = e.length;
224
+ if (!nt(t)) return null;
225
+ const n = new Array(t);
226
+ for (; t-- > 0; )
227
+ n[t] = e[t];
228
+ return n;
229
+ }, hn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), mn = (e, t) => {
230
+ const r = (e && e[ie]).call(e);
231
+ let s;
232
+ for (; (s = r.next()) && !s.done; ) {
233
+ const i = s.value;
234
+ t.call(e, i[0], i[1]);
235
+ }
236
+ }, yn = (e, t) => {
237
+ let n;
238
+ const r = [];
239
+ for (; (n = e.exec(t)) !== null; )
240
+ r.push(n);
241
+ return r;
242
+ }, bn = B("HTMLFormElement"), wn = (e) => e.toLowerCase().replace(
243
+ /[-_\s]([a-z\d])(\w*)/g,
244
+ function(n, r, s) {
245
+ return r.toUpperCase() + s;
246
+ }
247
+ ), Ie = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), gn = B("RegExp"), ot = (e, t) => {
248
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
249
+ X(n, (s, i) => {
250
+ let o;
251
+ (o = t(s, i, e)) !== !1 && (r[i] = o || s);
252
+ }), Object.defineProperties(e, r);
253
+ }, En = (e) => {
254
+ ot(e, (t, n) => {
255
+ if (k(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
256
+ return !1;
257
+ const r = e[n];
258
+ if (k(r)) {
259
+ if (t.enumerable = !1, "writable" in t) {
260
+ t.writable = !1;
261
+ return;
262
+ }
263
+ t.set || (t.set = () => {
264
+ throw Error("Can not rewrite read-only method '" + n + "'");
265
+ });
266
+ }
267
+ });
268
+ }, Rn = (e, t) => {
269
+ const n = {}, r = (s) => {
270
+ s.forEach((i) => {
271
+ n[i] = !0;
272
+ });
273
+ };
274
+ return z(e) ? r(e) : r(String(e).split(t)), n;
275
+ }, Sn = () => {
276
+ }, On = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
277
+ function Tn(e) {
278
+ return !!(e && k(e.append) && e[et] === "FormData" && e[ie]);
279
+ }
280
+ const An = (e) => {
281
+ const t = new Array(10), n = (r, s) => {
282
+ if (ue(r)) {
283
+ if (t.indexOf(r) >= 0)
284
+ return;
285
+ if (!("toJSON" in r)) {
286
+ t[s] = r;
287
+ const i = z(r) ? [] : {};
288
+ return X(r, (o, c) => {
289
+ const f = n(o, s + 1);
290
+ !V(f) && (i[c] = f);
291
+ }), t[s] = void 0, i;
292
+ }
293
+ }
294
+ return r;
295
+ };
296
+ return n(e, 0);
297
+ }, Cn = B("AsyncFunction"), xn = (e) => e && (ue(e) || k(e)) && k(e.then) && k(e.catch), it = ((e, t) => e ? setImmediate : t ? ((n, r) => (v.addEventListener("message", ({ source: s, data: i }) => {
298
+ s === v && i === n && r.length && r.shift()();
299
+ }, !1), (s) => {
300
+ r.push(s), v.postMessage(n, "*");
301
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
302
+ typeof setImmediate == "function",
303
+ k(v.postMessage)
304
+ ), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(v) : typeof process < "u" && process.nextTick || it, Nn = (e) => e != null && k(e[ie]), a = {
305
+ isArray: z,
306
+ isArrayBuffer: tt,
307
+ isBuffer: Jt,
308
+ isFormData: en,
309
+ isArrayBufferView: Wt,
310
+ isString: Kt,
311
+ isNumber: nt,
312
+ isBoolean: Vt,
313
+ isObject: ue,
314
+ isPlainObject: te,
315
+ isReadableStream: nn,
316
+ isRequest: rn,
317
+ isResponse: sn,
318
+ isHeaders: on,
319
+ isUndefined: V,
320
+ isDate: Xt,
321
+ isFile: Qt,
322
+ isBlob: Gt,
323
+ isRegExp: gn,
324
+ isFunction: k,
325
+ isStream: Zt,
326
+ isURLSearchParams: tn,
327
+ isTypedArray: hn,
328
+ isFileList: Yt,
329
+ forEach: X,
330
+ merge: Se,
331
+ extend: cn,
332
+ trim: an,
333
+ stripBOM: un,
334
+ inherits: ln,
335
+ toFlatObject: fn,
336
+ kindOf: ae,
337
+ kindOfTest: B,
338
+ endsWith: dn,
339
+ toArray: pn,
340
+ forEachEntry: mn,
341
+ matchAll: yn,
342
+ isHTMLForm: bn,
343
+ hasOwnProperty: Ie,
344
+ hasOwnProp: Ie,
345
+ // an alias to avoid ESLint no-prototype-builtins detection
346
+ reduceDescriptors: ot,
347
+ freezeMethods: En,
348
+ toObjectSet: Rn,
349
+ toCamelCase: wn,
350
+ noop: Sn,
351
+ toFiniteNumber: On,
352
+ findKey: rt,
353
+ global: v,
354
+ isContextDefined: st,
355
+ isSpecCompliantForm: Tn,
356
+ toJSONObject: An,
357
+ isAsyncFn: Cn,
358
+ isThenable: xn,
359
+ setImmediate: it,
360
+ asap: Fn,
361
+ isIterable: Nn
362
+ };
363
+ function b(e, t, n, r, s) {
364
+ 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);
365
+ }
366
+ a.inherits(b, Error, {
367
+ toJSON: function() {
368
+ return {
369
+ // Standard
370
+ message: this.message,
371
+ name: this.name,
372
+ // Microsoft
373
+ description: this.description,
374
+ number: this.number,
375
+ // Mozilla
376
+ fileName: this.fileName,
377
+ lineNumber: this.lineNumber,
378
+ columnNumber: this.columnNumber,
379
+ stack: this.stack,
380
+ // Axios
381
+ config: a.toJSONObject(this.config),
382
+ code: this.code,
383
+ status: this.status
384
+ };
385
+ }
386
+ });
387
+ const at = b.prototype, ct = {};
388
+ [
389
+ "ERR_BAD_OPTION_VALUE",
390
+ "ERR_BAD_OPTION",
391
+ "ECONNABORTED",
392
+ "ETIMEDOUT",
393
+ "ERR_NETWORK",
394
+ "ERR_FR_TOO_MANY_REDIRECTS",
395
+ "ERR_DEPRECATED",
396
+ "ERR_BAD_RESPONSE",
397
+ "ERR_BAD_REQUEST",
398
+ "ERR_CANCELED",
399
+ "ERR_NOT_SUPPORT",
400
+ "ERR_INVALID_URL"
401
+ // eslint-disable-next-line func-names
402
+ ].forEach((e) => {
403
+ ct[e] = { value: e };
404
+ });
405
+ Object.defineProperties(b, ct);
406
+ Object.defineProperty(at, "isAxiosError", { value: !0 });
407
+ b.from = (e, t, n, r, s, i) => {
408
+ const o = Object.create(at);
409
+ return a.toFlatObject(e, o, function(f) {
410
+ return f !== Error.prototype;
411
+ }, (c) => c !== "isAxiosError"), b.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
412
+ };
413
+ const Pn = null;
414
+ function Oe(e) {
415
+ return a.isPlainObject(e) || a.isArray(e);
416
+ }
417
+ function ut(e) {
418
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
419
+ }
420
+ function qe(e, t, n) {
421
+ return e ? e.concat(t).map(function(s, i) {
422
+ return s = ut(s), !n && i ? "[" + s + "]" : s;
423
+ }).join(n ? "." : "") : t;
424
+ }
425
+ function _n(e) {
426
+ return a.isArray(e) && !e.some(Oe);
427
+ }
428
+ const Ln = a.toFlatObject(a, {}, null, function(t) {
429
+ return /^is[A-Z]/.test(t);
430
+ });
431
+ function le(e, t, n) {
432
+ if (!a.isObject(e))
433
+ throw new TypeError("target must be an object");
434
+ t = t || new FormData(), n = a.toFlatObject(n, {
435
+ metaTokens: !0,
436
+ dots: !1,
437
+ indexes: !1
438
+ }, !1, function(m, h) {
439
+ return !a.isUndefined(h[m]);
440
+ });
441
+ const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
442
+ if (!a.isFunction(s))
443
+ throw new TypeError("visitor must be a function");
444
+ function u(p) {
445
+ if (p === null) return "";
446
+ if (a.isDate(p))
447
+ return p.toISOString();
448
+ if (!f && a.isBlob(p))
449
+ throw new b("Blob is not supported. Use a Buffer instead.");
450
+ return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
451
+ }
452
+ function l(p, m, h) {
453
+ let E = p;
454
+ if (p && !h && typeof p == "object") {
455
+ if (a.endsWith(m, "{}"))
456
+ m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
457
+ else if (a.isArray(p) && _n(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
458
+ return m = ut(m), E.forEach(function(S, D) {
459
+ !(a.isUndefined(S) || S === null) && t.append(
460
+ // eslint-disable-next-line no-nested-ternary
461
+ o === !0 ? qe([m], D, i) : o === null ? m : m + "[]",
462
+ u(S)
463
+ );
464
+ }), !1;
465
+ }
466
+ return Oe(p) ? !0 : (t.append(qe(h, m, i), u(p)), !1);
467
+ }
468
+ const d = [], w = Object.assign(Ln, {
469
+ defaultVisitor: l,
470
+ convertValue: u,
471
+ isVisitable: Oe
472
+ });
473
+ function g(p, m) {
474
+ if (!a.isUndefined(p)) {
475
+ if (d.indexOf(p) !== -1)
476
+ throw Error("Circular reference detected in " + m.join("."));
477
+ d.push(p), a.forEach(p, function(E, R) {
478
+ (!(a.isUndefined(E) || E === null) && s.call(
479
+ t,
480
+ E,
481
+ a.isString(R) ? R.trim() : R,
482
+ m,
483
+ w
484
+ )) === !0 && g(E, m ? m.concat(R) : [R]);
485
+ }), d.pop();
486
+ }
487
+ }
488
+ if (!a.isObject(e))
489
+ throw new TypeError("data must be an object");
490
+ return g(e), t;
491
+ }
492
+ function je(e) {
493
+ const t = {
494
+ "!": "%21",
495
+ "'": "%27",
496
+ "(": "%28",
497
+ ")": "%29",
498
+ "~": "%7E",
499
+ "%20": "+",
500
+ "%00": "\0"
501
+ };
502
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
503
+ return t[r];
504
+ });
505
+ }
506
+ function Pe(e, t) {
507
+ this._pairs = [], e && le(e, this, t);
508
+ }
509
+ const lt = Pe.prototype;
510
+ lt.append = function(t, n) {
511
+ this._pairs.push([t, n]);
512
+ };
513
+ lt.toString = function(t) {
514
+ const n = t ? function(r) {
515
+ return t.call(this, r, je);
516
+ } : je;
517
+ return this._pairs.map(function(s) {
518
+ return n(s[0]) + "=" + n(s[1]);
519
+ }, "").join("&");
520
+ };
521
+ function kn(e) {
522
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
523
+ }
524
+ function ft(e, t, n) {
525
+ if (!t)
526
+ return e;
527
+ const r = n && n.encode || kn;
528
+ a.isFunction(n) && (n = {
529
+ serialize: n
530
+ });
531
+ const s = n && n.serialize;
532
+ let i;
533
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new Pe(t, n).toString(r), i) {
534
+ const o = e.indexOf("#");
535
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
536
+ }
537
+ return e;
538
+ }
539
+ class ve {
540
+ constructor() {
541
+ this.handlers = [];
542
+ }
543
+ /**
544
+ * Add a new interceptor to the stack
545
+ *
546
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
547
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
548
+ *
549
+ * @return {Number} An ID used to remove interceptor later
550
+ */
551
+ use(t, n, r) {
552
+ return this.handlers.push({
553
+ fulfilled: t,
554
+ rejected: n,
555
+ synchronous: r ? r.synchronous : !1,
556
+ runWhen: r ? r.runWhen : null
557
+ }), this.handlers.length - 1;
558
+ }
559
+ /**
560
+ * Remove an interceptor from the stack
561
+ *
562
+ * @param {Number} id The ID that was returned by `use`
563
+ *
564
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
565
+ */
566
+ eject(t) {
567
+ this.handlers[t] && (this.handlers[t] = null);
568
+ }
569
+ /**
570
+ * Clear all interceptors from the stack
571
+ *
572
+ * @returns {void}
573
+ */
574
+ clear() {
575
+ this.handlers && (this.handlers = []);
576
+ }
577
+ /**
578
+ * Iterate over all the registered interceptors
579
+ *
580
+ * This method is particularly useful for skipping over any
581
+ * interceptors that may have become `null` calling `eject`.
582
+ *
583
+ * @param {Function} fn The function to call for each interceptor
584
+ *
585
+ * @returns {void}
586
+ */
587
+ forEach(t) {
588
+ a.forEach(this.handlers, function(r) {
589
+ r !== null && t(r);
590
+ });
591
+ }
592
+ }
593
+ const dt = {
594
+ silentJSONParsing: !0,
595
+ forcedJSONParsing: !0,
596
+ clarifyTimeoutError: !1
597
+ }, Un = typeof URLSearchParams < "u" ? URLSearchParams : Pe, Dn = typeof FormData < "u" ? FormData : null, Bn = typeof Blob < "u" ? Blob : null, In = {
598
+ isBrowser: !0,
599
+ classes: {
600
+ URLSearchParams: Un,
601
+ FormData: Dn,
602
+ Blob: Bn
603
+ },
604
+ protocols: ["http", "https", "file", "blob", "url", "data"]
605
+ }, _e = typeof window < "u" && typeof document < "u", Te = typeof navigator == "object" && navigator || void 0, qn = _e && (!Te || ["ReactNative", "NativeScript", "NS"].indexOf(Te.product) < 0), jn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
606
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vn = _e && window.location.href || "http://localhost", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
607
+ __proto__: null,
608
+ hasBrowserEnv: _e,
609
+ hasStandardBrowserEnv: qn,
610
+ hasStandardBrowserWebWorkerEnv: jn,
611
+ navigator: Te,
612
+ origin: vn
613
+ }, Symbol.toStringTag, { value: "Module" })), N = {
614
+ ...Hn,
615
+ ...In
616
+ };
617
+ function Mn(e, t) {
618
+ return le(e, new N.classes.URLSearchParams(), Object.assign({
619
+ visitor: function(n, r, s, i) {
620
+ return N.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
621
+ }
622
+ }, t));
623
+ }
624
+ function zn(e) {
625
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
626
+ }
627
+ function $n(e) {
628
+ const t = {}, n = Object.keys(e);
629
+ let r;
630
+ const s = n.length;
631
+ let i;
632
+ for (r = 0; r < s; r++)
633
+ i = n[r], t[i] = e[i];
634
+ return t;
635
+ }
636
+ function pt(e) {
637
+ function t(n, r, s, i) {
638
+ let o = n[i++];
639
+ if (o === "__proto__") return !0;
640
+ const c = Number.isFinite(+o), f = i >= n.length;
641
+ 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] = $n(s[o])), !c);
642
+ }
643
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
644
+ const n = {};
645
+ return a.forEachEntry(e, (r, s) => {
646
+ t(zn(r), s, n, 0);
647
+ }), n;
648
+ }
649
+ return null;
650
+ }
651
+ function Jn(e, t, n) {
652
+ if (a.isString(e))
653
+ try {
654
+ return (t || JSON.parse)(e), a.trim(e);
655
+ } catch (r) {
656
+ if (r.name !== "SyntaxError")
657
+ throw r;
658
+ }
659
+ return (n || JSON.stringify)(e);
660
+ }
661
+ const Q = {
662
+ transitional: dt,
663
+ adapter: ["xhr", "http", "fetch"],
664
+ transformRequest: [function(t, n) {
665
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
666
+ if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
667
+ return s ? JSON.stringify(pt(t)) : t;
668
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
669
+ return t;
670
+ if (a.isArrayBufferView(t))
671
+ return t.buffer;
672
+ if (a.isURLSearchParams(t))
673
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
674
+ let c;
675
+ if (i) {
676
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
677
+ return Mn(t, this.formSerializer).toString();
678
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
679
+ const f = this.env && this.env.FormData;
680
+ return le(
681
+ c ? { "files[]": t } : t,
682
+ f && new f(),
683
+ this.formSerializer
684
+ );
685
+ }
686
+ }
687
+ return i || s ? (n.setContentType("application/json", !1), Jn(t)) : t;
688
+ }],
689
+ transformResponse: [function(t) {
690
+ const n = this.transitional || Q.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
691
+ if (a.isResponse(t) || a.isReadableStream(t))
692
+ return t;
693
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
694
+ const o = !(n && n.silentJSONParsing) && s;
695
+ try {
696
+ return JSON.parse(t);
697
+ } catch (c) {
698
+ if (o)
699
+ throw c.name === "SyntaxError" ? b.from(c, b.ERR_BAD_RESPONSE, this, null, this.response) : c;
700
+ }
701
+ }
702
+ return t;
703
+ }],
704
+ /**
705
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
706
+ * timeout is not created.
707
+ */
708
+ timeout: 0,
709
+ xsrfCookieName: "XSRF-TOKEN",
710
+ xsrfHeaderName: "X-XSRF-TOKEN",
711
+ maxContentLength: -1,
712
+ maxBodyLength: -1,
713
+ env: {
714
+ FormData: N.classes.FormData,
715
+ Blob: N.classes.Blob
716
+ },
717
+ validateStatus: function(t) {
718
+ return t >= 200 && t < 300;
719
+ },
720
+ headers: {
721
+ common: {
722
+ Accept: "application/json, text/plain, */*",
723
+ "Content-Type": void 0
724
+ }
725
+ }
726
+ };
727
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
728
+ Q.headers[e] = {};
729
+ });
730
+ const Wn = a.toObjectSet([
731
+ "age",
732
+ "authorization",
733
+ "content-length",
734
+ "content-type",
735
+ "etag",
736
+ "expires",
737
+ "from",
738
+ "host",
739
+ "if-modified-since",
740
+ "if-unmodified-since",
741
+ "last-modified",
742
+ "location",
743
+ "max-forwards",
744
+ "proxy-authorization",
745
+ "referer",
746
+ "retry-after",
747
+ "user-agent"
748
+ ]), Kn = (e) => {
749
+ const t = {};
750
+ let n, r, s;
751
+ return e && e.split(`
752
+ `).forEach(function(o) {
753
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Wn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
754
+ }), t;
755
+ }, He = Symbol("internals");
756
+ function K(e) {
757
+ return e && String(e).trim().toLowerCase();
758
+ }
759
+ function ne(e) {
760
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(ne) : String(e);
761
+ }
762
+ function Vn(e) {
763
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
764
+ let r;
765
+ for (; r = n.exec(e); )
766
+ t[r[1]] = r[2];
767
+ return t;
768
+ }
769
+ const Xn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
770
+ function be(e, t, n, r, s) {
771
+ if (a.isFunction(r))
772
+ return r.call(this, t, n);
773
+ if (s && (t = n), !!a.isString(t)) {
774
+ if (a.isString(r))
775
+ return t.indexOf(r) !== -1;
776
+ if (a.isRegExp(r))
777
+ return r.test(t);
778
+ }
779
+ }
780
+ function Qn(e) {
781
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
782
+ }
783
+ function Gn(e, t) {
784
+ const n = a.toCamelCase(" " + t);
785
+ ["get", "set", "has"].forEach((r) => {
786
+ Object.defineProperty(e, r + n, {
787
+ value: function(s, i, o) {
788
+ return this[r].call(this, t, s, i, o);
789
+ },
790
+ configurable: !0
791
+ });
792
+ });
793
+ }
794
+ let U = class {
795
+ constructor(t) {
796
+ t && this.set(t);
797
+ }
798
+ set(t, n, r) {
799
+ const s = this;
800
+ function i(c, f, u) {
801
+ const l = K(f);
802
+ if (!l)
803
+ throw new Error("header name must be a non-empty string");
804
+ const d = a.findKey(s, l);
805
+ (!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = ne(c));
806
+ }
807
+ const o = (c, f) => a.forEach(c, (u, l) => i(u, l, f));
808
+ if (a.isPlainObject(t) || t instanceof this.constructor)
809
+ o(t, n);
810
+ else if (a.isString(t) && (t = t.trim()) && !Xn(t))
811
+ o(Kn(t), n);
812
+ else if (a.isObject(t) && a.isIterable(t)) {
813
+ let c = {}, f, u;
814
+ for (const l of t) {
815
+ if (!a.isArray(l))
816
+ throw TypeError("Object iterator must return a key-value pair");
817
+ c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
818
+ }
819
+ o(c, n);
820
+ } else
821
+ t != null && i(n, t, r);
822
+ return this;
823
+ }
824
+ get(t, n) {
825
+ if (t = K(t), t) {
826
+ const r = a.findKey(this, t);
827
+ if (r) {
828
+ const s = this[r];
829
+ if (!n)
830
+ return s;
831
+ if (n === !0)
832
+ return Vn(s);
833
+ if (a.isFunction(n))
834
+ return n.call(this, s, r);
835
+ if (a.isRegExp(n))
836
+ return n.exec(s);
837
+ throw new TypeError("parser must be boolean|regexp|function");
838
+ }
839
+ }
840
+ }
841
+ has(t, n) {
842
+ if (t = K(t), t) {
843
+ const r = a.findKey(this, t);
844
+ return !!(r && this[r] !== void 0 && (!n || be(this, this[r], r, n)));
845
+ }
846
+ return !1;
847
+ }
848
+ delete(t, n) {
849
+ const r = this;
850
+ let s = !1;
851
+ function i(o) {
852
+ if (o = K(o), o) {
853
+ const c = a.findKey(r, o);
854
+ c && (!n || be(r, r[c], c, n)) && (delete r[c], s = !0);
855
+ }
856
+ }
857
+ return a.isArray(t) ? t.forEach(i) : i(t), s;
858
+ }
859
+ clear(t) {
860
+ const n = Object.keys(this);
861
+ let r = n.length, s = !1;
862
+ for (; r--; ) {
863
+ const i = n[r];
864
+ (!t || be(this, this[i], i, t, !0)) && (delete this[i], s = !0);
865
+ }
866
+ return s;
867
+ }
868
+ normalize(t) {
869
+ const n = this, r = {};
870
+ return a.forEach(this, (s, i) => {
871
+ const o = a.findKey(r, i);
872
+ if (o) {
873
+ n[o] = ne(s), delete n[i];
874
+ return;
875
+ }
876
+ const c = t ? Qn(i) : String(i).trim();
877
+ c !== i && delete n[i], n[c] = ne(s), r[c] = !0;
878
+ }), this;
879
+ }
880
+ concat(...t) {
881
+ return this.constructor.concat(this, ...t);
882
+ }
883
+ toJSON(t) {
884
+ const n = /* @__PURE__ */ Object.create(null);
885
+ return a.forEach(this, (r, s) => {
886
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
887
+ }), n;
888
+ }
889
+ [Symbol.iterator]() {
890
+ return Object.entries(this.toJSON())[Symbol.iterator]();
891
+ }
892
+ toString() {
893
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
894
+ `);
895
+ }
896
+ getSetCookie() {
897
+ return this.get("set-cookie") || [];
898
+ }
899
+ get [Symbol.toStringTag]() {
900
+ return "AxiosHeaders";
901
+ }
902
+ static from(t) {
903
+ return t instanceof this ? t : new this(t);
904
+ }
905
+ static concat(t, ...n) {
906
+ const r = new this(t);
907
+ return n.forEach((s) => r.set(s)), r;
908
+ }
909
+ static accessor(t) {
910
+ const r = (this[He] = this[He] = {
911
+ accessors: {}
912
+ }).accessors, s = this.prototype;
913
+ function i(o) {
914
+ const c = K(o);
915
+ r[c] || (Gn(s, o), r[c] = !0);
916
+ }
917
+ return a.isArray(t) ? t.forEach(i) : i(t), this;
918
+ }
919
+ };
920
+ U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
921
+ a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
922
+ let n = t[0].toUpperCase() + t.slice(1);
923
+ return {
924
+ get: () => e,
925
+ set(r) {
926
+ this[n] = r;
927
+ }
928
+ };
929
+ });
930
+ a.freezeMethods(U);
931
+ function we(e, t) {
932
+ const n = this || Q, r = t || n, s = U.from(r.headers);
933
+ let i = r.data;
934
+ return a.forEach(e, function(c) {
935
+ i = c.call(n, i, s.normalize(), t ? t.status : void 0);
936
+ }), s.normalize(), i;
937
+ }
938
+ function ht(e) {
939
+ return !!(e && e.__CANCEL__);
940
+ }
941
+ function $(e, t, n) {
942
+ b.call(this, e ?? "canceled", b.ERR_CANCELED, t, n), this.name = "CanceledError";
943
+ }
944
+ a.inherits($, b, {
945
+ __CANCEL__: !0
946
+ });
947
+ function mt(e, t, n) {
948
+ const r = n.config.validateStatus;
949
+ !n.status || !r || r(n.status) ? e(n) : t(new b(
950
+ "Request failed with status code " + n.status,
951
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
952
+ n.config,
953
+ n.request,
954
+ n
955
+ ));
956
+ }
957
+ function Yn(e) {
958
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
959
+ return t && t[1] || "";
960
+ }
961
+ function Zn(e, t) {
962
+ e = e || 10;
963
+ const n = new Array(e), r = new Array(e);
964
+ let s = 0, i = 0, o;
965
+ return t = t !== void 0 ? t : 1e3, function(f) {
966
+ const u = Date.now(), l = r[i];
967
+ o || (o = u), n[s] = f, r[s] = u;
968
+ let d = i, w = 0;
969
+ for (; d !== s; )
970
+ w += n[d++], d = d % e;
971
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
972
+ return;
973
+ const g = l && u - l;
974
+ return g ? Math.round(w * 1e3 / g) : void 0;
975
+ };
976
+ }
977
+ function er(e, t) {
978
+ let n = 0, r = 1e3 / t, s, i;
979
+ const o = (u, l = Date.now()) => {
980
+ n = l, s = null, i && (clearTimeout(i), i = null), e.apply(null, u);
981
+ };
982
+ return [(...u) => {
983
+ const l = Date.now(), d = l - n;
984
+ d >= r ? o(u, l) : (s = u, i || (i = setTimeout(() => {
985
+ i = null, o(s);
986
+ }, r - d)));
987
+ }, () => s && o(s)];
988
+ }
989
+ const se = (e, t, n = 3) => {
990
+ let r = 0;
991
+ const s = Zn(50, 250);
992
+ return er((i) => {
993
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, u = s(f), l = o <= c;
994
+ r = o;
995
+ const d = {
996
+ loaded: o,
997
+ total: c,
998
+ progress: c ? o / c : void 0,
999
+ bytes: f,
1000
+ rate: u || void 0,
1001
+ estimated: u && c && l ? (c - o) / u : void 0,
1002
+ event: i,
1003
+ lengthComputable: c != null,
1004
+ [t ? "download" : "upload"]: !0
1005
+ };
1006
+ e(d);
1007
+ }, n);
1008
+ }, Me = (e, t) => {
1009
+ const n = e != null;
1010
+ return [(r) => t[0]({
1011
+ lengthComputable: n,
1012
+ total: e,
1013
+ loaded: r
1014
+ }), t[1]];
1015
+ }, ze = (e) => (...t) => a.asap(() => e(...t)), tr = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, N.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1016
+ new URL(N.origin),
1017
+ N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
1018
+ ) : () => !0, nr = N.hasStandardBrowserEnv ? (
1019
+ // Standard browser envs support document.cookie
1020
+ {
1021
+ write(e, t, n, r, s, i) {
1022
+ const o = [e + "=" + encodeURIComponent(t)];
1023
+ a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
1024
+ },
1025
+ read(e) {
1026
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
1027
+ return t ? decodeURIComponent(t[3]) : null;
1028
+ },
1029
+ remove(e) {
1030
+ this.write(e, "", Date.now() - 864e5);
1031
+ }
1032
+ }
1033
+ ) : (
1034
+ // Non-standard browser env (web workers, react-native) lack needed support.
1035
+ {
1036
+ write() {
1037
+ },
1038
+ read() {
1039
+ return null;
1040
+ },
1041
+ remove() {
1042
+ }
1043
+ }
1044
+ );
1045
+ function rr(e) {
1046
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1047
+ }
1048
+ function sr(e, t) {
1049
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1050
+ }
1051
+ function yt(e, t, n) {
1052
+ let r = !rr(t);
1053
+ return e && (r || n == !1) ? sr(e, t) : t;
1054
+ }
1055
+ const $e = (e) => e instanceof U ? { ...e } : e;
1056
+ function M(e, t) {
1057
+ t = t || {};
1058
+ const n = {};
1059
+ function r(u, l, d, w) {
1060
+ return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: w }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1061
+ }
1062
+ function s(u, l, d, w) {
1063
+ if (a.isUndefined(l)) {
1064
+ if (!a.isUndefined(u))
1065
+ return r(void 0, u, d, w);
1066
+ } else return r(u, l, d, w);
1067
+ }
1068
+ function i(u, l) {
1069
+ if (!a.isUndefined(l))
1070
+ return r(void 0, l);
1071
+ }
1072
+ function o(u, l) {
1073
+ if (a.isUndefined(l)) {
1074
+ if (!a.isUndefined(u))
1075
+ return r(void 0, u);
1076
+ } else return r(void 0, l);
1077
+ }
1078
+ function c(u, l, d) {
1079
+ if (d in t)
1080
+ return r(u, l);
1081
+ if (d in e)
1082
+ return r(void 0, u);
1083
+ }
1084
+ const f = {
1085
+ url: i,
1086
+ method: i,
1087
+ data: i,
1088
+ baseURL: o,
1089
+ transformRequest: o,
1090
+ transformResponse: o,
1091
+ paramsSerializer: o,
1092
+ timeout: o,
1093
+ timeoutMessage: o,
1094
+ withCredentials: o,
1095
+ withXSRFToken: o,
1096
+ adapter: o,
1097
+ responseType: o,
1098
+ xsrfCookieName: o,
1099
+ xsrfHeaderName: o,
1100
+ onUploadProgress: o,
1101
+ onDownloadProgress: o,
1102
+ decompress: o,
1103
+ maxContentLength: o,
1104
+ maxBodyLength: o,
1105
+ beforeRedirect: o,
1106
+ transport: o,
1107
+ httpAgent: o,
1108
+ httpsAgent: o,
1109
+ cancelToken: o,
1110
+ socketPath: o,
1111
+ responseEncoding: o,
1112
+ validateStatus: c,
1113
+ headers: (u, l, d) => s($e(u), $e(l), d, !0)
1114
+ };
1115
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1116
+ const d = f[l] || s, w = d(e[l], t[l], l);
1117
+ a.isUndefined(w) && d !== c || (n[l] = w);
1118
+ }), n;
1119
+ }
1120
+ const bt = (e) => {
1121
+ const t = M({}, e);
1122
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
1123
+ t.headers = o = U.from(o), t.url = ft(yt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
1124
+ "Authorization",
1125
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1126
+ );
1127
+ let f;
1128
+ if (a.isFormData(n)) {
1129
+ if (N.hasStandardBrowserEnv || N.hasStandardBrowserWebWorkerEnv)
1130
+ o.setContentType(void 0);
1131
+ else if ((f = o.getContentType()) !== !1) {
1132
+ const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1133
+ o.setContentType([u || "multipart/form-data", ...l].join("; "));
1134
+ }
1135
+ }
1136
+ if (N.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && tr(t.url))) {
1137
+ const u = s && i && nr.read(i);
1138
+ u && o.set(s, u);
1139
+ }
1140
+ return t;
1141
+ }, or = typeof XMLHttpRequest < "u", ir = or && function(e) {
1142
+ return new Promise(function(n, r) {
1143
+ const s = bt(e);
1144
+ let i = s.data;
1145
+ const o = U.from(s.headers).normalize();
1146
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, w, g, p;
1147
+ function m() {
1148
+ g && g(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1149
+ }
1150
+ let h = new XMLHttpRequest();
1151
+ h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1152
+ function E() {
1153
+ if (!h)
1154
+ return;
1155
+ const S = U.from(
1156
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1157
+ ), O = {
1158
+ data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1159
+ status: h.status,
1160
+ statusText: h.statusText,
1161
+ headers: S,
1162
+ config: e,
1163
+ request: h
1164
+ };
1165
+ mt(function(L) {
1166
+ n(L), m();
1167
+ }, function(L) {
1168
+ r(L), m();
1169
+ }, O), h = null;
1170
+ }
1171
+ "onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
1172
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
1173
+ }, h.onabort = function() {
1174
+ h && (r(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
1175
+ }, h.onerror = function() {
1176
+ r(new b("Network Error", b.ERR_NETWORK, e, h)), h = null;
1177
+ }, h.ontimeout = function() {
1178
+ let D = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1179
+ const O = s.transitional || dt;
1180
+ s.timeoutErrorMessage && (D = s.timeoutErrorMessage), r(new b(
1181
+ D,
1182
+ O.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1183
+ e,
1184
+ h
1185
+ )), h = null;
1186
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(D, O) {
1187
+ h.setRequestHeader(O, D);
1188
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([w, p] = se(u, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = se(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (l = (S) => {
1189
+ h && (r(!S || S.type ? new $(null, e, h) : S), h.abort(), h = null);
1190
+ }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1191
+ const R = Yn(s.url);
1192
+ if (R && N.protocols.indexOf(R) === -1) {
1193
+ r(new b("Unsupported protocol " + R + ":", b.ERR_BAD_REQUEST, e));
1194
+ return;
1195
+ }
1196
+ h.send(i || null);
1197
+ });
1198
+ }, ar = (e, t) => {
1199
+ const { length: n } = e = e ? e.filter(Boolean) : [];
1200
+ if (t || n) {
1201
+ let r = new AbortController(), s;
1202
+ const i = function(u) {
1203
+ if (!s) {
1204
+ s = !0, c();
1205
+ const l = u instanceof Error ? u : this.reason;
1206
+ r.abort(l instanceof b ? l : new $(l instanceof Error ? l.message : l));
1207
+ }
1208
+ };
1209
+ let o = t && setTimeout(() => {
1210
+ o = null, i(new b(`timeout ${t} of ms exceeded`, b.ETIMEDOUT));
1211
+ }, t);
1212
+ const c = () => {
1213
+ e && (o && clearTimeout(o), o = null, e.forEach((u) => {
1214
+ u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
1215
+ }), e = null);
1216
+ };
1217
+ e.forEach((u) => u.addEventListener("abort", i));
1218
+ const { signal: f } = r;
1219
+ return f.unsubscribe = () => a.asap(c), f;
1220
+ }
1221
+ }, cr = function* (e, t) {
1222
+ let n = e.byteLength;
1223
+ if (n < t) {
1224
+ yield e;
1225
+ return;
1226
+ }
1227
+ let r = 0, s;
1228
+ for (; r < n; )
1229
+ s = r + t, yield e.slice(r, s), r = s;
1230
+ }, ur = async function* (e, t) {
1231
+ for await (const n of lr(e))
1232
+ yield* cr(n, t);
1233
+ }, lr = async function* (e) {
1234
+ if (e[Symbol.asyncIterator]) {
1235
+ yield* e;
1236
+ return;
1237
+ }
1238
+ const t = e.getReader();
1239
+ try {
1240
+ for (; ; ) {
1241
+ const { done: n, value: r } = await t.read();
1242
+ if (n)
1243
+ break;
1244
+ yield r;
1245
+ }
1246
+ } finally {
1247
+ await t.cancel();
1248
+ }
1249
+ }, Je = (e, t, n, r) => {
1250
+ const s = ur(e, t);
1251
+ let i = 0, o, c = (f) => {
1252
+ o || (o = !0, r && r(f));
1253
+ };
1254
+ return new ReadableStream({
1255
+ async pull(f) {
1256
+ try {
1257
+ const { done: u, value: l } = await s.next();
1258
+ if (u) {
1259
+ c(), f.close();
1260
+ return;
1261
+ }
1262
+ let d = l.byteLength;
1263
+ if (n) {
1264
+ let w = i += d;
1265
+ n(w);
1266
+ }
1267
+ f.enqueue(new Uint8Array(l));
1268
+ } catch (u) {
1269
+ throw c(u), u;
1270
+ }
1271
+ },
1272
+ cancel(f) {
1273
+ return c(f), s.return();
1274
+ }
1275
+ }, {
1276
+ highWaterMark: 2
1277
+ });
1278
+ }, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = fe && typeof ReadableStream == "function", fr = fe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
1279
+ try {
1280
+ return !!e(...t);
1281
+ } catch {
1282
+ return !1;
1283
+ }
1284
+ }, dr = wt && gt(() => {
1285
+ let e = !1;
1286
+ const t = new Request(N.origin, {
1287
+ body: new ReadableStream(),
1288
+ method: "POST",
1289
+ get duplex() {
1290
+ return e = !0, "half";
1291
+ }
1292
+ }).headers.has("Content-Type");
1293
+ return e && !t;
1294
+ }), We = 64 * 1024, Ae = wt && gt(() => a.isReadableStream(new Response("").body)), oe = {
1295
+ stream: Ae && ((e) => e.body)
1296
+ };
1297
+ fe && ((e) => {
1298
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1299
+ !oe[t] && (oe[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1300
+ throw new b(`Response type '${t}' is not supported`, b.ERR_NOT_SUPPORT, r);
1301
+ });
133
1302
  });
1303
+ })(new Response());
1304
+ const pr = async (e) => {
1305
+ if (e == null)
1306
+ return 0;
1307
+ if (a.isBlob(e))
1308
+ return e.size;
1309
+ if (a.isSpecCompliantForm(e))
1310
+ return (await new Request(N.origin, {
1311
+ method: "POST",
1312
+ body: e
1313
+ }).arrayBuffer()).byteLength;
1314
+ if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1315
+ return e.byteLength;
1316
+ if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1317
+ return (await fr(e)).byteLength;
1318
+ }, hr = async (e, t) => {
1319
+ const n = a.toFiniteNumber(e.getContentLength());
1320
+ return n ?? pr(t);
1321
+ }, mr = fe && (async (e) => {
1322
+ let {
1323
+ url: t,
1324
+ method: n,
1325
+ data: r,
1326
+ signal: s,
1327
+ cancelToken: i,
1328
+ timeout: o,
1329
+ onDownloadProgress: c,
1330
+ onUploadProgress: f,
1331
+ responseType: u,
1332
+ headers: l,
1333
+ withCredentials: d = "same-origin",
1334
+ fetchOptions: w
1335
+ } = bt(e);
1336
+ u = u ? (u + "").toLowerCase() : "text";
1337
+ let g = ar([s, i && i.toAbortSignal()], o), p;
1338
+ const m = g && g.unsubscribe && (() => {
1339
+ g.unsubscribe();
1340
+ });
1341
+ let h;
1342
+ try {
1343
+ if (f && dr && n !== "get" && n !== "head" && (h = await hr(l, r)) !== 0) {
1344
+ let O = new Request(t, {
1345
+ method: "POST",
1346
+ body: r,
1347
+ duplex: "half"
1348
+ }), _;
1349
+ if (a.isFormData(r) && (_ = O.headers.get("content-type")) && l.setContentType(_), O.body) {
1350
+ const [L, P] = Me(
1351
+ h,
1352
+ se(ze(f))
1353
+ );
1354
+ r = Je(O.body, We, L, P);
1355
+ }
1356
+ }
1357
+ a.isString(d) || (d = d ? "include" : "omit");
1358
+ const E = "credentials" in Request.prototype;
1359
+ p = new Request(t, {
1360
+ ...w,
1361
+ signal: g,
1362
+ method: n.toUpperCase(),
1363
+ headers: l.normalize().toJSON(),
1364
+ body: r,
1365
+ duplex: "half",
1366
+ credentials: E ? d : void 0
1367
+ });
1368
+ let R = await fetch(p);
1369
+ const S = Ae && (u === "stream" || u === "response");
1370
+ if (Ae && (c || S && m)) {
1371
+ const O = {};
1372
+ ["status", "statusText", "headers"].forEach((G) => {
1373
+ O[G] = R[G];
1374
+ });
1375
+ const _ = a.toFiniteNumber(R.headers.get("content-length")), [L, P] = c && Me(
1376
+ _,
1377
+ se(ze(c), !0)
1378
+ ) || [];
1379
+ R = new Response(
1380
+ Je(R.body, We, L, () => {
1381
+ P && P(), m && m();
1382
+ }),
1383
+ O
1384
+ );
1385
+ }
1386
+ u = u || "text";
1387
+ let D = await oe[a.findKey(oe, u) || "text"](R, e);
1388
+ return !S && m && m(), await new Promise((O, _) => {
1389
+ mt(O, _, {
1390
+ data: D,
1391
+ headers: U.from(R.headers),
1392
+ status: R.status,
1393
+ statusText: R.statusText,
1394
+ config: e,
1395
+ request: p
1396
+ });
1397
+ });
1398
+ } catch (E) {
1399
+ throw m && m(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
1400
+ new b("Network Error", b.ERR_NETWORK, e, p),
1401
+ {
1402
+ cause: E.cause || E
1403
+ }
1404
+ ) : b.from(E, E && E.code, e, p);
1405
+ }
1406
+ }), Ce = {
1407
+ http: Pn,
1408
+ xhr: ir,
1409
+ fetch: mr
1410
+ };
1411
+ a.forEach(Ce, (e, t) => {
1412
+ if (e) {
1413
+ try {
1414
+ Object.defineProperty(e, "name", { value: t });
1415
+ } catch {
1416
+ }
1417
+ Object.defineProperty(e, "adapterName", { value: t });
1418
+ }
1419
+ });
1420
+ const Ke = (e) => `- ${e}`, yr = (e) => a.isFunction(e) || e === null || e === !1, Et = {
1421
+ getAdapter: (e) => {
1422
+ e = a.isArray(e) ? e : [e];
1423
+ const { length: t } = e;
1424
+ let n, r;
1425
+ const s = {};
1426
+ for (let i = 0; i < t; i++) {
1427
+ n = e[i];
1428
+ let o;
1429
+ if (r = n, !yr(n) && (r = Ce[(o = String(n)).toLowerCase()], r === void 0))
1430
+ throw new b(`Unknown adapter '${o}'`);
1431
+ if (r)
1432
+ break;
1433
+ s[o || "#" + i] = r;
1434
+ }
1435
+ if (!r) {
1436
+ const i = Object.entries(s).map(
1437
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1438
+ );
1439
+ let o = t ? i.length > 1 ? `since :
1440
+ ` + i.map(Ke).join(`
1441
+ `) : " " + Ke(i[0]) : "as no adapter specified";
1442
+ throw new b(
1443
+ "There is no suitable adapter to dispatch the request " + o,
1444
+ "ERR_NOT_SUPPORT"
1445
+ );
1446
+ }
1447
+ return r;
1448
+ },
1449
+ adapters: Ce
1450
+ };
1451
+ function ge(e) {
1452
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1453
+ throw new $(null, e);
1454
+ }
1455
+ function Ve(e) {
1456
+ return ge(e), e.headers = U.from(e.headers), e.data = we.call(
1457
+ e,
1458
+ e.transformRequest
1459
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || Q.adapter)(e).then(function(r) {
1460
+ return ge(e), r.data = we.call(
1461
+ e,
1462
+ e.transformResponse,
1463
+ r
1464
+ ), r.headers = U.from(r.headers), r;
1465
+ }, function(r) {
1466
+ return ht(r) || (ge(e), r && r.response && (r.response.data = we.call(
1467
+ e,
1468
+ e.transformResponse,
1469
+ r.response
1470
+ ), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
1471
+ });
1472
+ }
1473
+ const Rt = "1.9.0", de = {};
1474
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1475
+ de[e] = function(r) {
1476
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1477
+ };
1478
+ });
1479
+ const Xe = {};
1480
+ de.transitional = function(t, n, r) {
1481
+ function s(i, o) {
1482
+ return "[Axios v" + Rt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1483
+ }
1484
+ return (i, o, c) => {
1485
+ if (t === !1)
1486
+ throw new b(
1487
+ s(o, " has been removed" + (n ? " in " + n : "")),
1488
+ b.ERR_DEPRECATED
1489
+ );
1490
+ return n && !Xe[o] && (Xe[o] = !0, console.warn(
1491
+ s(
1492
+ o,
1493
+ " has been deprecated since v" + n + " and will be removed in the near future"
1494
+ )
1495
+ )), t ? t(i, o, c) : !0;
1496
+ };
1497
+ };
1498
+ de.spelling = function(t) {
1499
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1500
+ };
1501
+ function br(e, t, n) {
1502
+ if (typeof e != "object")
1503
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1504
+ const r = Object.keys(e);
1505
+ let s = r.length;
1506
+ for (; s-- > 0; ) {
1507
+ const i = r[s], o = t[i];
1508
+ if (o) {
1509
+ const c = e[i], f = c === void 0 || o(c, i, e);
1510
+ if (f !== !0)
1511
+ throw new b("option " + i + " must be " + f, b.ERR_BAD_OPTION_VALUE);
1512
+ continue;
1513
+ }
1514
+ if (n !== !0)
1515
+ throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1516
+ }
1517
+ }
1518
+ const re = {
1519
+ assertOptions: br,
1520
+ validators: de
1521
+ }, I = re.validators;
1522
+ let H = class {
1523
+ constructor(t) {
1524
+ this.defaults = t || {}, this.interceptors = {
1525
+ request: new ve(),
1526
+ response: new ve()
1527
+ };
1528
+ }
1529
+ /**
1530
+ * Dispatch a request
1531
+ *
1532
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1533
+ * @param {?Object} config
1534
+ *
1535
+ * @returns {Promise} The Promise to be fulfilled
1536
+ */
1537
+ async request(t, n) {
1538
+ try {
1539
+ return await this._request(t, n);
1540
+ } catch (r) {
1541
+ if (r instanceof Error) {
1542
+ let s = {};
1543
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1544
+ const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1545
+ try {
1546
+ r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
1547
+ ` + i) : r.stack = i;
1548
+ } catch {
1549
+ }
1550
+ }
1551
+ throw r;
1552
+ }
1553
+ }
1554
+ _request(t, n) {
1555
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
1556
+ const { transitional: r, paramsSerializer: s, headers: i } = n;
1557
+ r !== void 0 && re.assertOptions(r, {
1558
+ silentJSONParsing: I.transitional(I.boolean),
1559
+ forcedJSONParsing: I.transitional(I.boolean),
1560
+ clarifyTimeoutError: I.transitional(I.boolean)
1561
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1562
+ serialize: s
1563
+ } : re.assertOptions(s, {
1564
+ encode: I.function,
1565
+ serialize: I.function
1566
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), re.assertOptions(n, {
1567
+ baseUrl: I.spelling("baseURL"),
1568
+ withXsrfToken: I.spelling("withXSRFToken")
1569
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1570
+ let o = i && a.merge(
1571
+ i.common,
1572
+ i[n.method]
1573
+ );
1574
+ i && a.forEach(
1575
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1576
+ (p) => {
1577
+ delete i[p];
1578
+ }
1579
+ ), n.headers = U.concat(o, i);
1580
+ const c = [];
1581
+ let f = !0;
1582
+ this.interceptors.request.forEach(function(m) {
1583
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1584
+ });
1585
+ const u = [];
1586
+ this.interceptors.response.forEach(function(m) {
1587
+ u.push(m.fulfilled, m.rejected);
1588
+ });
1589
+ let l, d = 0, w;
1590
+ if (!f) {
1591
+ const p = [Ve.bind(this), void 0];
1592
+ for (p.unshift.apply(p, c), p.push.apply(p, u), w = p.length, l = Promise.resolve(n); d < w; )
1593
+ l = l.then(p[d++], p[d++]);
1594
+ return l;
1595
+ }
1596
+ w = c.length;
1597
+ let g = n;
1598
+ for (d = 0; d < w; ) {
1599
+ const p = c[d++], m = c[d++];
1600
+ try {
1601
+ g = p(g);
1602
+ } catch (h) {
1603
+ m.call(this, h);
1604
+ break;
1605
+ }
1606
+ }
1607
+ try {
1608
+ l = Ve.call(this, g);
1609
+ } catch (p) {
1610
+ return Promise.reject(p);
1611
+ }
1612
+ for (d = 0, w = u.length; d < w; )
1613
+ l = l.then(u[d++], u[d++]);
1614
+ return l;
1615
+ }
1616
+ getUri(t) {
1617
+ t = M(this.defaults, t);
1618
+ const n = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
1619
+ return ft(n, t.params, t.paramsSerializer);
1620
+ }
1621
+ };
1622
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1623
+ H.prototype[t] = function(n, r) {
1624
+ return this.request(M(r || {}, {
1625
+ method: t,
1626
+ url: n,
1627
+ data: (r || {}).data
1628
+ }));
1629
+ };
1630
+ });
1631
+ a.forEach(["post", "put", "patch"], function(t) {
1632
+ function n(r) {
1633
+ return function(i, o, c) {
1634
+ return this.request(M(c || {}, {
1635
+ method: t,
1636
+ headers: r ? {
1637
+ "Content-Type": "multipart/form-data"
1638
+ } : {},
1639
+ url: i,
1640
+ data: o
1641
+ }));
1642
+ };
1643
+ }
1644
+ H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
1645
+ });
1646
+ let wr = class St {
1647
+ constructor(t) {
1648
+ if (typeof t != "function")
1649
+ throw new TypeError("executor must be a function.");
1650
+ let n;
1651
+ this.promise = new Promise(function(i) {
1652
+ n = i;
1653
+ });
1654
+ const r = this;
1655
+ this.promise.then((s) => {
1656
+ if (!r._listeners) return;
1657
+ let i = r._listeners.length;
1658
+ for (; i-- > 0; )
1659
+ r._listeners[i](s);
1660
+ r._listeners = null;
1661
+ }), this.promise.then = (s) => {
1662
+ let i;
1663
+ const o = new Promise((c) => {
1664
+ r.subscribe(c), i = c;
1665
+ }).then(s);
1666
+ return o.cancel = function() {
1667
+ r.unsubscribe(i);
1668
+ }, o;
1669
+ }, t(function(i, o, c) {
1670
+ r.reason || (r.reason = new $(i, o, c), n(r.reason));
1671
+ });
1672
+ }
1673
+ /**
1674
+ * Throws a `CanceledError` if cancellation has been requested.
1675
+ */
1676
+ throwIfRequested() {
1677
+ if (this.reason)
1678
+ throw this.reason;
1679
+ }
1680
+ /**
1681
+ * Subscribe to the cancel signal
1682
+ */
1683
+ subscribe(t) {
1684
+ if (this.reason) {
1685
+ t(this.reason);
1686
+ return;
1687
+ }
1688
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1689
+ }
1690
+ /**
1691
+ * Unsubscribe from the cancel signal
1692
+ */
1693
+ unsubscribe(t) {
1694
+ if (!this._listeners)
1695
+ return;
1696
+ const n = this._listeners.indexOf(t);
1697
+ n !== -1 && this._listeners.splice(n, 1);
1698
+ }
1699
+ toAbortSignal() {
1700
+ const t = new AbortController(), n = (r) => {
1701
+ t.abort(r);
1702
+ };
1703
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1704
+ }
1705
+ /**
1706
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1707
+ * cancels the `CancelToken`.
1708
+ */
1709
+ static source() {
1710
+ let t;
1711
+ return {
1712
+ token: new St(function(s) {
1713
+ t = s;
1714
+ }),
1715
+ cancel: t
1716
+ };
1717
+ }
1718
+ };
1719
+ function gr(e) {
1720
+ return function(n) {
1721
+ return e.apply(null, n);
1722
+ };
134
1723
  }
135
- function ye(o) {
136
- const t = o.headers.get("content-type");
137
- if (!(t != null && t.startsWith(Q)))
138
- throw new Error(`Expected content-type to be ${Q}, Actual: ${t}`);
1724
+ function Er(e) {
1725
+ return a.isObject(e) && e.isAxiosError === !0;
139
1726
  }
140
- const $ = 1, L = ae.ECONOMY;
141
- let K = new AbortController();
142
- const be = 3 * 60 * 1e3, G = (o) => {
143
- if (!o.origin || !o.destination)
1727
+ const xe = {
1728
+ Continue: 100,
1729
+ SwitchingProtocols: 101,
1730
+ Processing: 102,
1731
+ EarlyHints: 103,
1732
+ Ok: 200,
1733
+ Created: 201,
1734
+ Accepted: 202,
1735
+ NonAuthoritativeInformation: 203,
1736
+ NoContent: 204,
1737
+ ResetContent: 205,
1738
+ PartialContent: 206,
1739
+ MultiStatus: 207,
1740
+ AlreadyReported: 208,
1741
+ ImUsed: 226,
1742
+ MultipleChoices: 300,
1743
+ MovedPermanently: 301,
1744
+ Found: 302,
1745
+ SeeOther: 303,
1746
+ NotModified: 304,
1747
+ UseProxy: 305,
1748
+ Unused: 306,
1749
+ TemporaryRedirect: 307,
1750
+ PermanentRedirect: 308,
1751
+ BadRequest: 400,
1752
+ Unauthorized: 401,
1753
+ PaymentRequired: 402,
1754
+ Forbidden: 403,
1755
+ NotFound: 404,
1756
+ MethodNotAllowed: 405,
1757
+ NotAcceptable: 406,
1758
+ ProxyAuthenticationRequired: 407,
1759
+ RequestTimeout: 408,
1760
+ Conflict: 409,
1761
+ Gone: 410,
1762
+ LengthRequired: 411,
1763
+ PreconditionFailed: 412,
1764
+ PayloadTooLarge: 413,
1765
+ UriTooLong: 414,
1766
+ UnsupportedMediaType: 415,
1767
+ RangeNotSatisfiable: 416,
1768
+ ExpectationFailed: 417,
1769
+ ImATeapot: 418,
1770
+ MisdirectedRequest: 421,
1771
+ UnprocessableEntity: 422,
1772
+ Locked: 423,
1773
+ FailedDependency: 424,
1774
+ TooEarly: 425,
1775
+ UpgradeRequired: 426,
1776
+ PreconditionRequired: 428,
1777
+ TooManyRequests: 429,
1778
+ RequestHeaderFieldsTooLarge: 431,
1779
+ UnavailableForLegalReasons: 451,
1780
+ InternalServerError: 500,
1781
+ NotImplemented: 501,
1782
+ BadGateway: 502,
1783
+ ServiceUnavailable: 503,
1784
+ GatewayTimeout: 504,
1785
+ HttpVersionNotSupported: 505,
1786
+ VariantAlsoNegotiates: 506,
1787
+ InsufficientStorage: 507,
1788
+ LoopDetected: 508,
1789
+ NotExtended: 510,
1790
+ NetworkAuthenticationRequired: 511
1791
+ };
1792
+ Object.entries(xe).forEach(([e, t]) => {
1793
+ xe[t] = e;
1794
+ });
1795
+ function Ot(e) {
1796
+ const t = new H(e), n = Ze(H.prototype.request, t);
1797
+ return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1798
+ return Ot(M(e, s));
1799
+ }, n;
1800
+ }
1801
+ const T = Ot(Q);
1802
+ T.Axios = H;
1803
+ T.CanceledError = $;
1804
+ T.CancelToken = wr;
1805
+ T.isCancel = ht;
1806
+ T.VERSION = Rt;
1807
+ T.toFormData = le;
1808
+ T.AxiosError = b;
1809
+ T.Cancel = T.CanceledError;
1810
+ T.all = function(t) {
1811
+ return Promise.all(t);
1812
+ };
1813
+ T.spread = gr;
1814
+ T.isAxiosError = Er;
1815
+ T.mergeConfig = M;
1816
+ T.AxiosHeaders = U;
1817
+ T.formToJSON = (e) => pt(a.isHTMLForm(e) ? new FormData(e) : e);
1818
+ T.getAdapter = Et.getAdapter;
1819
+ T.HttpStatusCode = xe;
1820
+ T.default = T;
1821
+ const {
1822
+ Axios: vr,
1823
+ AxiosError: Hr,
1824
+ CanceledError: Mr,
1825
+ isCancel: zr,
1826
+ CancelToken: $r,
1827
+ VERSION: Jr,
1828
+ all: Wr,
1829
+ Cancel: Kr,
1830
+ isAxiosError: Vr,
1831
+ spread: Xr,
1832
+ toFormData: Qr,
1833
+ AxiosHeaders: Gr,
1834
+ HttpStatusCode: Fe,
1835
+ formToJSON: Yr,
1836
+ getAdapter: Zr,
1837
+ mergeConfig: es
1838
+ } = T, Qe = 1, ee = Lt.ECONOMY;
1839
+ let Ee = new AbortController();
1840
+ const Rr = 3 * 60 * 1e3, Ge = (e) => {
1841
+ if (!e.origin || !e.destination)
144
1842
  throw new Error("Origin and destination are required.");
145
- if (!o.dates)
1843
+ if (!e.dates)
146
1844
  throw new Error("At least one date is required.");
147
- if (o.flightType === J.ROUND_TRIP && o.dates.length != 2)
1845
+ if (e.flightType === Ye.ROUND_TRIP && e.dates.length != 2)
148
1846
  throw new Error(
149
1847
  "Two dates are required for round-trip flights: departure and return."
150
1848
  );
151
- }, Le = () => {
152
- const { token: o, config: t } = te(), [r, n] = D(""), [s, E] = D([]), [f, d] = D(!1), u = oe(null), {
153
- inboundResults: p,
154
- outboundResults: m,
155
- setInboundResults: y,
156
- setOutboundResults: R,
157
- partialOfferRequestId: h,
158
- setPartialOfferRequestId: b,
159
- airlineStatuses: q,
160
- setAirlineStatuses: C
161
- } = se(), { data: v } = re({
162
- queryKey: [A.SUPPORTED_AIRLINE_PROGRAMS],
163
- queryFn: _.getSupportedAirlinePrograms
164
- }), S = ({
165
- data: e,
166
- inbound: c
1849
+ }, Sr = (e, t, n) => e[t] === Fe.Ok ? e : {
1850
+ ...e,
1851
+ [t]: n ?? Fe.MultipleChoices
1852
+ }, ts = () => {
1853
+ const { token: e, config: t } = xt(), [n, r] = ye(""), [s, i] = ye([]), [o, c] = ye(!1), f = Pt(null), {
1854
+ inboundResults: u,
1855
+ outboundResults: l,
1856
+ setInboundResults: d,
1857
+ setOutboundResults: w,
1858
+ partialOfferRequestId: g,
1859
+ setPartialOfferRequestId: p,
1860
+ airlineStatuses: m,
1861
+ setAirlineStatuses: h
1862
+ } = _t(), { data: E } = Nt({
1863
+ queryKey: [J.SUPPORTED_AIRLINE_PROGRAMS],
1864
+ queryFn: W.getSupportedAirlinePrograms
1865
+ }), R = ({
1866
+ data: y,
1867
+ inbound: x
167
1868
  }) => {
168
- const i = ie(e);
169
- return (c ? y : R)(ue(i)), i;
1869
+ const C = kt(y);
1870
+ return (x ? d : w)(Ut(C)), C;
170
1871
  }, {
171
- mutate: N,
172
- status: H,
173
- error: I
174
- } = x({
175
- mutationFn: async (e) => {
176
- G(e);
177
- const i = {
1872
+ mutate: S,
1873
+ status: D,
1874
+ error: O
1875
+ } = me({
1876
+ mutationFn: async (y) => {
1877
+ Ge(y);
1878
+ const C = {
178
1879
  passengers: Array.from(
179
- { length: e.passengers ?? $ },
1880
+ { length: y.passengers ?? Qe },
180
1881
  () => ({ type: "adult" })
181
1882
  ),
182
- origin: e.origin || "",
183
- destination: e.destination || "",
184
- cabin_class: e.cabinClass ?? L
1883
+ origin: y.origin || "",
1884
+ destination: y.destination || "",
1885
+ cabin_class: y.cabinClass ?? ee
185
1886
  };
186
- if (e.flightType === J.ONE_WAY) {
187
- const a = await _.cashOnlySearch({
188
- ...i,
189
- departure_dates: e.dates
1887
+ if (y.flightType === Ye.ONE_WAY) {
1888
+ const A = await W.cashOnlySearch({
1889
+ ...C,
1890
+ departure_dates: y.dates
190
1891
  });
191
1892
  return {
192
- success: a.success,
193
- data: a.data
1893
+ success: A.success,
1894
+ data: A.data
194
1895
  };
195
1896
  } else {
196
- const a = await _.roundTripOutboundSearch({
197
- ...i,
198
- departure_date: e.dates[0],
199
- return_date: e.dates[1]
1897
+ const A = await W.roundTripOutboundSearch({
1898
+ ...C,
1899
+ departure_date: y.dates[0],
1900
+ return_date: y.dates[1]
200
1901
  });
201
1902
  return {
202
- success: a.success,
203
- data: a.data.offers,
204
- partialOfferRequestId: a.data.id
1903
+ success: A.success,
1904
+ data: A.data.offers,
1905
+ partialOfferRequestId: A.data.id
205
1906
  };
206
1907
  }
207
1908
  },
208
- onSuccess: (e) => {
209
- const { success: c, data: i, partialOfferRequestId: a } = e;
210
- if (!c) {
1909
+ onSuccess: (y) => {
1910
+ const { success: x, data: C, partialOfferRequestId: A } = y;
1911
+ if (!x) {
211
1912
  console.log("oh lol, it didn't work");
212
1913
  return;
213
1914
  }
214
- S({ data: i }), a && b(a);
1915
+ R({ data: C }), A && p(A);
215
1916
  },
216
- onError: (e) => {
217
- console.error("Error in outbound flight search:", e);
1917
+ onError: (y) => {
1918
+ console.error("Error in outbound flight search:", y);
218
1919
  },
219
1920
  onSettled: () => {
220
- P.invalidateQueries({ queryKey: [A.SEARCH_LIMIT] });
1921
+ Y.invalidateQueries({ queryKey: [J.SEARCH_LIMIT] });
221
1922
  }
222
1923
  }), {
223
- mutate: F,
224
- status: T,
225
- error: g
226
- } = x({
1924
+ mutate: _,
1925
+ status: L,
1926
+ error: P
1927
+ } = me({
227
1928
  mutationFn: async ({
228
- outboundOfferId: e,
229
- cabinClass: c
1929
+ outboundOfferId: y,
1930
+ cabinClass: x
230
1931
  }) => {
231
- if (!h)
1932
+ if (!g)
232
1933
  throw new Error("No partialOfferRequestId found for inbound search.");
233
- return n(e), await _.roundTripInboundSearch({
234
- outboundOfferId: e,
235
- outboundOfferRequestId: h,
236
- cabinClass: c || L
1934
+ return r(y), await W.roundTripInboundSearch({
1935
+ outboundOfferId: y,
1936
+ outboundOfferRequestId: g,
1937
+ cabinClass: x || ee
237
1938
  });
238
1939
  },
239
- onSuccess: (e) => {
240
- const { success: c, data: i } = e;
241
- c && S({
242
- data: i.offers,
1940
+ onSuccess: (y) => {
1941
+ const { success: x, data: C } = y;
1942
+ x && R({
1943
+ data: C.offers,
243
1944
  inbound: !0
244
1945
  });
245
1946
  },
246
- onError: (e) => {
247
- console.error("Error in inbound flight search:", e);
1947
+ onError: (y) => {
1948
+ console.error("Error in inbound flight search:", y);
248
1949
  },
249
1950
  onSettled: () => {
250
- P.invalidateQueries({ queryKey: [A.SEARCH_LIMIT] });
1951
+ Y.invalidateQueries({ queryKey: [J.SEARCH_LIMIT] });
251
1952
  }
252
1953
  }), {
253
- mutate: V,
254
- status: X,
255
- error: Z
256
- } = x({
1954
+ mutate: G,
1955
+ status: Tt,
1956
+ error: At
1957
+ } = me({
257
1958
  mutationFn: async ({
258
- inboundOfferId: e,
259
- cabinClass: c
1959
+ inboundOfferId: y,
1960
+ cabinClass: x
260
1961
  }) => {
261
- if (!h)
1962
+ if (!g)
262
1963
  throw new Error("No partialOfferRequestId found for round-trip fares.");
263
- return await _.getRoundTripFares({
264
- outboundOfferId: r,
265
- outboundOfferRequestId: h,
266
- inboundOfferId: e,
267
- cabinClass: c || L
1964
+ return await W.getRoundTripFares({
1965
+ outboundOfferId: n,
1966
+ outboundOfferRequestId: g,
1967
+ inboundOfferId: y,
1968
+ cabinClass: x || ee
268
1969
  });
269
1970
  },
270
- onSuccess: (e) => {
271
- const { success: c, data: i } = e;
272
- if (!c) return;
273
- const a = i.offers;
274
- E(z(a));
1971
+ onSuccess: (y) => {
1972
+ const { success: x, data: C } = y;
1973
+ if (!x) return;
1974
+ const A = C.offers;
1975
+ i(Ue(A));
275
1976
  },
276
- onError: (e) => {
277
- console.error("Error in round-trip fare search:", e);
1977
+ onError: (y) => {
1978
+ console.error("Error in round-trip fare search:", y);
278
1979
  },
279
1980
  onSettled: () => {
280
- P.invalidateQueries({ queryKey: [A.SEARCH_LIMIT] });
281
- }
282
- }), W = async (e) => {
283
- var U;
284
- C(() => ({
285
- ...v == null ? void 0 : v.reduce((O, l) => (O[l] = -1, O), {})
286
- })), d(!0);
287
- const c = e.paymentType === k.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], i = ce({
288
- originCode: e.origin,
289
- destinationCode: e.destination,
290
- dates: e.dates,
291
- cabinClass: e.cabinClass ?? L,
292
- passengerCount: e.passengers ?? $,
293
- paymentType: c
1981
+ Y.invalidateQueries({ queryKey: [J.SEARCH_LIMIT] });
1982
+ }
1983
+ }), Le = async (y) => {
1984
+ var ke;
1985
+ h(() => ({
1986
+ ...E == null ? void 0 : E.reduce((j, F) => (j[F] = -1, j), {})
1987
+ })), c(!0);
1988
+ const x = y.paymentType === Z.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], C = Dt({
1989
+ originCode: y.origin,
1990
+ destinationCode: y.destination,
1991
+ dates: y.dates,
1992
+ cabinClass: y.cabinClass ?? ee,
1993
+ passengerCount: y.passengers ?? Qe,
1994
+ paymentType: x
294
1995
  });
295
- let a = [], M = 0;
296
- K = new AbortController(), u.current = setTimeout(
1996
+ let A = [], pe = 0;
1997
+ Ee = new AbortController(), f.current = setTimeout(
297
1998
  () => {
298
- w();
1999
+ q();
299
2000
  },
300
- (((U = t == null ? void 0 : t.flightsConfig) == null ? void 0 : U.streamTimeoutTotalSeconds) ?? be) * 1e3
301
- ), me(ne() + i, {
2001
+ (((ke = t == null ? void 0 : t.flightsConfig) == null ? void 0 : ke.streamTimeoutTotalSeconds) ?? Rr) * 1e3
2002
+ ), Mt(Ft() + C, {
302
2003
  headers: {
303
2004
  "Content-Type": "application/json",
304
- Authorization: o ?? "",
2005
+ Authorization: e ?? "",
305
2006
  "client-id": (t == null ? void 0 : t.clientId) ?? ""
306
2007
  },
307
2008
  openWhenHidden: !0,
308
- signal: K.signal,
309
- onmessage(O) {
2009
+ signal: Ee.signal,
2010
+ onmessage(j) {
310
2011
  try {
311
- const l = z(JSON.parse(O.data));
312
- if (l.success === !1)
2012
+ const F = Ue(JSON.parse(j.data));
2013
+ if (F.success === !1)
313
2014
  return;
314
- if (l.close === !0) {
315
- w();
2015
+ if (F.close === !0) {
2016
+ q();
316
2017
  return;
317
2018
  }
318
- if (l.airlineProgram && C((j) => ({
319
- ...j,
320
- [l.airlineProgram]: l.status ?? l.statusCode ?? 300
321
- })), l.status === 200 && l.flights && l.flights.length > 0) {
322
- M = 0;
323
- const j = l.flights.map((ee) => ({
324
- ...ee,
325
- partners: l.partners ?? []
2019
+ if (F.airlineProgram && h(
2020
+ (he) => Sr(
2021
+ he,
2022
+ F.airlineProgram,
2023
+ F.status ?? F.statusCode
2024
+ )
2025
+ ), F.status === Fe.Ok && F.flights && F.flights.length > 0) {
2026
+ pe = 0;
2027
+ const he = F.flights.map((Ct) => ({
2028
+ ...Ct,
2029
+ partners: F.partners ?? []
326
2030
  }));
327
- a = [...a, ...j], S({ data: a });
2031
+ A = [...A, ...he], R({ data: A });
328
2032
  }
329
- l.ping && (M++, M >= t.flightsConfig.streamTimeoutPingCount && w());
330
- } catch (l) {
331
- console.error("Error parsing message:", l), w();
2033
+ F.ping && (pe++, pe >= t.flightsConfig.streamTimeoutPingCount && q());
2034
+ } catch (F) {
2035
+ console.error("Error parsing message:", F), q();
332
2036
  }
333
2037
  },
334
- onerror(O) {
335
- throw console.error("EventSource error:", O), w(), O;
2038
+ onerror(j) {
2039
+ throw console.error("EventSource error:", j), q(), j;
336
2040
  },
337
2041
  onclose() {
338
- w();
2042
+ q();
339
2043
  },
340
2044
  keepalive: !1
341
2045
  });
342
- }, w = () => {
343
- K.abort(), u.current && (clearTimeout(u.current), u.current = null), d(!1), P.invalidateQueries({ queryKey: [A.SEARCH_LIMIT] }), C((e) => {
344
- const c = {};
345
- for (const i in e) {
346
- const a = e[i];
347
- a !== -1 && (c[i] = a);
2046
+ }, q = () => {
2047
+ Ee.abort(), f.current && (clearTimeout(f.current), f.current = null), c(!1), Y.invalidateQueries({ queryKey: [J.SEARCH_LIMIT] }), h((y) => {
2048
+ const x = {};
2049
+ for (const C in y) {
2050
+ const A = y[C];
2051
+ A !== -1 && (x[C] = A);
348
2052
  }
349
- return c;
2053
+ return x;
350
2054
  });
351
2055
  };
352
2056
  return {
@@ -355,19 +2059,19 @@ const be = 3 * 60 * 1e3, G = (o) => {
355
2059
  * @type {boolean}
356
2060
  * @default false
357
2061
  */
358
- loading: H === "pending" || T === "pending" || f,
2062
+ loading: D === "pending" || L === "pending" || o,
359
2063
  /**
360
2064
  * Loading status for fares
361
2065
  * @type {boolean}
362
2066
  * @default false
363
2067
  */
364
- loadingFares: X === "pending",
365
- outboundError: I,
366
- inboundError: g,
367
- roundTripFaresError: Z,
2068
+ loadingFares: Tt === "pending",
2069
+ outboundError: O,
2070
+ inboundError: P,
2071
+ roundTripFaresError: At,
368
2072
  // Results
369
- outboundResults: m,
370
- inboundResults: p,
2073
+ outboundResults: l,
2074
+ inboundResults: u,
371
2075
  roundTripFares: s,
372
2076
  // Mutation triggers
373
2077
  /**
@@ -376,16 +2080,16 @@ const be = 3 * 60 * 1e3, G = (o) => {
376
2080
  *
377
2081
  * @param {ISearchFlightArgs} args - The search arguments
378
2082
  */
379
- searchOutboundFlights: async (e) => {
380
- switch (G(e), R([]), w(), e.paymentType) {
381
- case k.CASH_AND_MILES:
382
- W(e);
2083
+ searchOutboundFlights: async (y) => {
2084
+ switch (Ge(y), w([]), q(), y.paymentType) {
2085
+ case Z.CASH_AND_MILES:
2086
+ Le(y);
383
2087
  break;
384
- case k.CASH:
385
- N(e);
2088
+ case Z.CASH:
2089
+ S(y);
386
2090
  break;
387
- case k.MILES:
388
- W(e);
2091
+ case Z.MILES:
2092
+ Le(y);
389
2093
  break;
390
2094
  }
391
2095
  },
@@ -395,14 +2099,14 @@ const be = 3 * 60 * 1e3, G = (o) => {
395
2099
  *
396
2100
  * @param {{ outboundOfferId: string; cabinClass: ECabinClass }} args - The search arguments
397
2101
  */
398
- searchInboundFlights: F,
2102
+ searchInboundFlights: _,
399
2103
  /**
400
2104
  * Used to get round-trip fares after selecting both outbound and inbound flights
401
2105
  * @type {function}
402
2106
  *
403
2107
  * @param {{ inboundOfferId: string; cabinClass: ECabinClass }} args - The fare search arguments
404
2108
  */
405
- getRoundTripFares: V,
2109
+ getRoundTripFares: G,
406
2110
  /**
407
2111
  * Resets the flight search state, clearing all results and selections
408
2112
  * @type {function}
@@ -410,15 +2114,15 @@ const be = 3 * 60 * 1e3, G = (o) => {
410
2114
  * @returns {void}
411
2115
  */
412
2116
  reset: () => {
413
- w(), R([]), y([]), E([]), b(""), n("");
2117
+ q(), w([]), d([]), i([]), p(""), r("");
414
2118
  },
415
2119
  /**
416
2120
  * Points search statuses of airlines during the flight search
417
2121
  * @type {IAirlineStatuses}
418
2122
  */
419
- airlineStatuses: q
2123
+ airlineStatuses: m
420
2124
  };
421
2125
  };
422
2126
  export {
423
- Le as useFlightSearch
2127
+ ts as useFlightSearch
424
2128
  };