@odynn/awayz-core 0.3.22 → 0.3.24

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.
Files changed (37) hide show
  1. package/dist/{AccountService-D_6U8vP6.js → AccountService-cvx__9rR.js} +55 -55
  2. package/dist/{TripsService-BbbkMtx6.js → TripsService-G1T_Co8r.js} +1 -1
  3. package/dist/components/CashValue/CashValue.js +47 -47
  4. package/dist/components/CashValue/CashValue.stories.js +2 -2
  5. package/dist/components/Wallet/Card/Card.stories.js +2 -2
  6. package/dist/configs/endpoints.js +3 -2
  7. package/dist/context/AwayzContext.js +4 -3
  8. package/dist/hooks/useAwayzAuth/useAwayzAuth.js +100 -83
  9. package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
  10. package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
  11. package/dist/hooks/useSearchLimit.js +17 -15
  12. package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
  13. package/dist/hooks/useTripManagement/useTripManagement.test.js +3 -3
  14. package/dist/hooks/useWallet/useWallet.js +72 -42
  15. package/dist/hooks/useWallet/useWallet.test.js +80 -46
  16. package/dist/lib/components/CashValue/CashValue.d.ts +1 -1
  17. package/dist/lib/configs/endpoints.d.ts +3 -0
  18. package/dist/lib/context/AwayzContext.d.ts +2 -1
  19. package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.d.ts +2 -1
  20. package/dist/lib/hooks/useSearchLimit.d.ts +3 -1
  21. package/dist/lib/hooks/useWallet/useWallet.types.d.ts +16 -2
  22. package/dist/lib/services/account/AccountServices.types.d.ts +4 -0
  23. package/dist/lib/services/preferences/PreferencesService.d.ts +7 -0
  24. package/dist/lib/services/wallet/WalletService.d.ts +3 -0
  25. package/dist/main.js +1 -1
  26. package/dist/providers/AwayzProvider.js +1 -1
  27. package/dist/services/account/AccountService.js +1 -1
  28. package/dist/services/bookings/BookingService.js +1 -1
  29. package/dist/services/currency/CurrencyService.js +1 -1
  30. package/dist/services/index.js +1 -1
  31. package/dist/services/instance.js +1 -1
  32. package/dist/services/instanceConfig.js +1 -1
  33. package/dist/services/noRetryInstance.js +1 -1
  34. package/dist/services/preferences/PreferencesService.js +35 -0
  35. package/dist/services/trips/TripsService.js +2 -2
  36. package/dist/services/wallet/WalletService.js +55 -26
  37. package/package.json +1 -1
@@ -23,7 +23,7 @@ const ge = (e) => Array.isArray(e) ? e.map((t) => ge(t)) : typeof e == "object"
23
23
  }, {}) : e, lr = (e) => (Object.keys(e).forEach(
24
24
  (t) => !e[t] && delete e[t]
25
25
  ), e);
26
- var $ = /* @__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.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e))($ || {}), mt = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(mt || {}), F = /* @__PURE__ */ ((e) => (e.TOKEN = "token", e.REFRESH_TOKEN = "refreshToken", e.CLIENT_ID = "clientId", e.AUTH_FLOW = "authFlow", e))(F || {});
26
+ var $ = /* @__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.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e))($ || {}), mt = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(mt || {}), F = /* @__PURE__ */ ((e) => (e.TOKEN = "token", e.REFRESH_TOKEN = "refreshToken", e.CLIENT_ID = "clientId", e.AUTH_FLOW = "authFlow", e))(F || {});
27
27
  function He(e, t) {
28
28
  return function() {
29
29
  return e.apply(t, arguments);
@@ -51,7 +51,7 @@ const Rt = re("string"), _ = re("function"), ze = re("number"), se = (e) => e !=
51
51
  return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
52
52
  t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
53
53
  }, Nt = x("URLSearchParams"), [Ct, xt, kt, Ut] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ft = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
54
- function J(e, t, { allOwnKeys: n = !1 } = {}) {
54
+ function G(e, t, { allOwnKeys: n = !1 } = {}) {
55
55
  if (e === null || typeof e > "u")
56
56
  return;
57
57
  let r, s;
@@ -81,12 +81,12 @@ function fe() {
81
81
  X(t[o]) && X(r) ? t[o] = fe(t[o], r) : X(r) ? t[o] = fe({}, r) : j(r) ? t[o] = r.slice() : t[o] = r;
82
82
  };
83
83
  for (let r = 0, s = arguments.length; r < s; r++)
84
- arguments[r] && J(arguments[r], n);
84
+ arguments[r] && G(arguments[r], n);
85
85
  return t;
86
86
  }
87
- const It = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
87
+ const Pt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
88
88
  n && _(s) ? e[o] = He(s, n) : e[o] = s;
89
- }, { allOwnKeys: r }), e), Pt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Lt = (e, t, n, r) => {
89
+ }, { allOwnKeys: r }), e), It = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Lt = (e, t, n, r) => {
90
90
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
91
91
  value: t.prototype
92
92
  }), n && Object.assign(e.prototype, n);
@@ -133,7 +133,7 @@ const It = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
133
133
  }
134
134
  ), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), $t = x("RegExp"), ve = (e, t) => {
135
135
  const n = Object.getOwnPropertyDescriptors(e), r = {};
136
- J(n, (s, o) => {
136
+ G(n, (s, o) => {
137
137
  let i;
138
138
  (i = t(s, o, e)) !== !1 && (r[o] = i || s);
139
139
  }), Object.defineProperties(e, r);
@@ -152,14 +152,14 @@ const It = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
152
152
  });
153
153
  }
154
154
  });
155
- }, Jt = (e, t) => {
155
+ }, Gt = (e, t) => {
156
156
  const n = {}, r = (s) => {
157
157
  s.forEach((o) => {
158
158
  n[o] = !0;
159
159
  });
160
160
  };
161
161
  return j(e) ? r(e) : r(String(e).split(t)), n;
162
- }, Gt = () => {
162
+ }, Jt = () => {
163
163
  }, Vt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
164
164
  function Wt(e) {
165
165
  return !!(e && _(e.append) && e[Me] === "FormData" && e[te]);
@@ -172,7 +172,7 @@ const Xt = (e) => {
172
172
  if (!("toJSON" in r)) {
173
173
  t[s] = r;
174
174
  const o = j(r) ? [] : {};
175
- return J(r, (i, c) => {
175
+ return G(r, (i, c) => {
176
176
  const f = n(i, s + 1);
177
177
  !v(f) && (o[c] = f);
178
178
  }), t[s] = void 0, o;
@@ -181,14 +181,14 @@ const Xt = (e) => {
181
181
  return r;
182
182
  };
183
183
  return n(e, 0);
184
- }, Yt = x("AsyncFunction"), Zt = (e) => e && (se(e) || _(e)) && _(e.then) && _(e.catch), Je = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
184
+ }, Yt = x("AsyncFunction"), Zt = (e) => e && (se(e) || _(e)) && _(e.then) && _(e.catch), Ge = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
185
185
  s === q && o === n && r.length && r.shift()();
186
186
  }, !1), (s) => {
187
187
  r.push(s), q.postMessage(n, "*");
188
188
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
189
189
  typeof setImmediate == "function",
190
190
  _(q.postMessage)
191
- ), Qt = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Je, en = (e) => e != null && _(e[te]), a = {
191
+ ), Qt = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Ge, en = (e) => e != null && _(e[te]), a = {
192
192
  isArray: j,
193
193
  isArrayBuffer: je,
194
194
  isBuffer: yt,
@@ -213,11 +213,11 @@ const Xt = (e) => {
213
213
  isURLSearchParams: Nt,
214
214
  isTypedArray: Ht,
215
215
  isFileList: Ot,
216
- forEach: J,
216
+ forEach: G,
217
217
  merge: fe,
218
- extend: It,
218
+ extend: Pt,
219
219
  trim: Ft,
220
- stripBOM: Pt,
220
+ stripBOM: It,
221
221
  inherits: Lt,
222
222
  toFlatObject: Dt,
223
223
  kindOf: ne,
@@ -232,9 +232,9 @@ const Xt = (e) => {
232
232
  // an alias to avoid ESLint no-prototype-builtins detection
233
233
  reduceDescriptors: ve,
234
234
  freezeMethods: vt,
235
- toObjectSet: Jt,
235
+ toObjectSet: Gt,
236
236
  toCamelCase: Kt,
237
- noop: Gt,
237
+ noop: Jt,
238
238
  toFiniteNumber: Vt,
239
239
  findKey: Ke,
240
240
  global: q,
@@ -243,7 +243,7 @@ const Xt = (e) => {
243
243
  toJSONObject: Xt,
244
244
  isAsyncFn: Yt,
245
245
  isThenable: Zt,
246
- setImmediate: Je,
246
+ setImmediate: Ge,
247
247
  asap: Qt,
248
248
  isIterable: en
249
249
  };
@@ -271,7 +271,7 @@ a.inherits(E, Error, {
271
271
  };
272
272
  }
273
273
  });
274
- const Ge = E.prototype, Ve = {};
274
+ const Je = E.prototype, Ve = {};
275
275
  [
276
276
  "ERR_BAD_OPTION_VALUE",
277
277
  "ERR_BAD_OPTION",
@@ -290,9 +290,9 @@ const Ge = E.prototype, Ve = {};
290
290
  Ve[e] = { value: e };
291
291
  });
292
292
  Object.defineProperties(E, Ve);
293
- Object.defineProperty(Ge, "isAxiosError", { value: !0 });
293
+ Object.defineProperty(Je, "isAxiosError", { value: !0 });
294
294
  E.from = (e, t, n, r, s, o) => {
295
- const i = Object.create(Ge);
295
+ const i = Object.create(Je);
296
296
  return a.toFlatObject(e, i, function(f) {
297
297
  return f !== Error.prototype;
298
298
  }, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
@@ -342,10 +342,10 @@ function oe(e, t, n) {
342
342
  if (a.endsWith(m, "{}"))
343
343
  m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
344
344
  else if (a.isArray(h) && nn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (R = a.toArray(h)))
345
- return m = We(m), R.forEach(function(b, I) {
345
+ return m = We(m), R.forEach(function(b, P) {
346
346
  !(a.isUndefined(b) || b === null) && t.append(
347
347
  // eslint-disable-next-line no-nested-ternary
348
- i === !0 ? Te([m], I, o) : i === null ? m : m + "[]",
348
+ i === !0 ? Te([m], P, o) : i === null ? m : m + "[]",
349
349
  u(b)
350
350
  );
351
351
  }), !1;
@@ -545,7 +545,7 @@ function yn(e, t, n) {
545
545
  }
546
546
  return (n || JSON.stringify)(e);
547
547
  }
548
- const G = {
548
+ const J = {
549
549
  transitional: Ze,
550
550
  adapter: ["xhr", "http", "fetch"],
551
551
  transformRequest: [function(t, n) {
@@ -574,7 +574,7 @@ const G = {
574
574
  return o || s ? (n.setContentType("application/json", !1), yn(t)) : t;
575
575
  }],
576
576
  transformResponse: [function(t) {
577
- const n = this.transitional || G.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
577
+ const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
578
578
  if (a.isResponse(t) || a.isReadableStream(t))
579
579
  return t;
580
580
  if (t && a.isString(t) && (r && !this.responseType || s)) {
@@ -612,7 +612,7 @@ const G = {
612
612
  }
613
613
  };
614
614
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
615
- G.headers[e] = {};
615
+ J.headers[e] = {};
616
616
  });
617
617
  const wn = a.toObjectSet([
618
618
  "age",
@@ -816,7 +816,7 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
816
816
  });
817
817
  a.freezeMethods(N);
818
818
  function ue(e, t) {
819
- const n = this || G, r = t || n, s = N.from(r.headers);
819
+ const n = this || J, r = t || n, s = N.from(r.headers);
820
820
  let o = r.data;
821
821
  return a.forEach(e, function(c) {
822
822
  o = c.call(n, o, s.normalize(), t ? t.status : void 0);
@@ -1062,16 +1062,16 @@ const rt = (e) => {
1062
1062
  }, p.onerror = function() {
1063
1063
  r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
1064
1064
  }, p.ontimeout = function() {
1065
- let I = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1065
+ let P = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1066
1066
  const A = s.transitional || Ze;
1067
- s.timeoutErrorMessage && (I = s.timeoutErrorMessage), r(new E(
1068
- I,
1067
+ s.timeoutErrorMessage && (P = s.timeoutErrorMessage), r(new E(
1068
+ P,
1069
1069
  A.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
1070
1070
  e,
1071
1071
  p
1072
1072
  )), p = null;
1073
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(I, A) {
1074
- p.setRequestHeader(A, I);
1073
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(P, A) {
1074
+ p.setRequestHeader(A, P);
1075
1075
  }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([y, h] = Q(u, !0), p.addEventListener("progress", y)), f && p.upload && ([d, w] = Q(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (b) => {
1076
1076
  p && (r(!b || b.type ? new z(null, e, p) : b), p.abort(), p = null);
1077
1077
  }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
@@ -1082,7 +1082,7 @@ const rt = (e) => {
1082
1082
  }
1083
1083
  p.send(o || null);
1084
1084
  });
1085
- }, In = (e, t) => {
1085
+ }, Pn = (e, t) => {
1086
1086
  const { length: n } = e = e ? e.filter(Boolean) : [];
1087
1087
  if (t || n) {
1088
1088
  let r = new AbortController(), s;
@@ -1105,7 +1105,7 @@ const rt = (e) => {
1105
1105
  const { signal: f } = r;
1106
1106
  return f.unsubscribe = () => a.asap(c), f;
1107
1107
  }
1108
- }, Pn = function* (e, t) {
1108
+ }, In = function* (e, t) {
1109
1109
  let n = e.byteLength;
1110
1110
  if (n < t) {
1111
1111
  yield e;
@@ -1116,7 +1116,7 @@ const rt = (e) => {
1116
1116
  s = r + t, yield e.slice(r, s), r = s;
1117
1117
  }, Ln = async function* (e, t) {
1118
1118
  for await (const n of Dn(e))
1119
- yield* Pn(n, t);
1119
+ yield* In(n, t);
1120
1120
  }, Dn = async function* (e) {
1121
1121
  if (e[Symbol.asyncIterator]) {
1122
1122
  yield* e;
@@ -1221,7 +1221,7 @@ const Hn = async (e) => {
1221
1221
  fetchOptions: y
1222
1222
  } = rt(e);
1223
1223
  u = u ? (u + "").toLowerCase() : "text";
1224
- let w = In([s, o && o.toAbortSignal()], i), h;
1224
+ let w = Pn([s, o && o.toAbortSignal()], i), h;
1225
1225
  const m = w && w.unsubscribe && (() => {
1226
1226
  w.unsubscribe();
1227
1227
  });
@@ -1232,8 +1232,8 @@ const Hn = async (e) => {
1232
1232
  method: "POST",
1233
1233
  body: r,
1234
1234
  duplex: "half"
1235
- }), P;
1236
- if (a.isFormData(r) && (P = A.headers.get("content-type")) && l.setContentType(P), A.body) {
1235
+ }), I;
1236
+ if (a.isFormData(r) && (I = A.headers.get("content-type")) && l.setContentType(I), A.body) {
1237
1237
  const [D, V] = Ne(
1238
1238
  p,
1239
1239
  Q(Ce(f))
@@ -1259,8 +1259,8 @@ const Hn = async (e) => {
1259
1259
  ["status", "statusText", "headers"].forEach((Se) => {
1260
1260
  A[Se] = g[Se];
1261
1261
  });
1262
- const P = a.toFiniteNumber(g.headers.get("content-length")), [D, V] = c && Ne(
1263
- P,
1262
+ const I = a.toFiniteNumber(g.headers.get("content-length")), [D, V] = c && Ne(
1263
+ I,
1264
1264
  Q(Ce(c), !0)
1265
1265
  ) || [];
1266
1266
  g = new Response(
@@ -1271,10 +1271,10 @@ const Hn = async (e) => {
1271
1271
  );
1272
1272
  }
1273
1273
  u = u || "text";
1274
- let I = await ee[a.findKey(ee, u) || "text"](g, e);
1275
- return !b && m && m(), await new Promise((A, P) => {
1276
- tt(A, P, {
1277
- data: I,
1274
+ let P = await ee[a.findKey(ee, u) || "text"](g, e);
1275
+ return !b && m && m(), await new Promise((A, I) => {
1276
+ tt(A, I, {
1277
+ data: P,
1278
1278
  headers: N.from(g.headers),
1279
1279
  status: g.status,
1280
1280
  statusText: g.statusText,
@@ -1339,11 +1339,11 @@ function le(e) {
1339
1339
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1340
1340
  throw new z(null, e);
1341
1341
  }
1342
- function Ie(e) {
1342
+ function Pe(e) {
1343
1343
  return le(e), e.headers = N.from(e.headers), e.data = ue.call(
1344
1344
  e,
1345
1345
  e.transformRequest
1346
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || G.adapter)(e).then(function(r) {
1346
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(r) {
1347
1347
  return le(e), r.data = ue.call(
1348
1348
  e,
1349
1349
  e.transformResponse,
@@ -1363,7 +1363,7 @@ const at = "1.9.0", ae = {};
1363
1363
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1364
1364
  };
1365
1365
  });
1366
- const Pe = {};
1366
+ const Ie = {};
1367
1367
  ae.transitional = function(t, n, r) {
1368
1368
  function s(o, i) {
1369
1369
  return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
@@ -1374,7 +1374,7 @@ ae.transitional = function(t, n, r) {
1374
1374
  s(i, " has been removed" + (n ? " in " + n : "")),
1375
1375
  E.ERR_DEPRECATED
1376
1376
  );
1377
- return n && !Pe[i] && (Pe[i] = !0, console.warn(
1377
+ return n && !Ie[i] && (Ie[i] = !0, console.warn(
1378
1378
  s(
1379
1379
  i,
1380
1380
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1475,7 +1475,7 @@ let H = class {
1475
1475
  });
1476
1476
  let l, d = 0, y;
1477
1477
  if (!f) {
1478
- const h = [Ie.bind(this), void 0];
1478
+ const h = [Pe.bind(this), void 0];
1479
1479
  for (h.unshift.apply(h, c), h.push.apply(h, u), y = h.length, l = Promise.resolve(n); d < y; )
1480
1480
  l = l.then(h[d++], h[d++]);
1481
1481
  return l;
@@ -1492,7 +1492,7 @@ let H = class {
1492
1492
  }
1493
1493
  }
1494
1494
  try {
1495
- l = Ie.call(this, w);
1495
+ l = Pe.call(this, w);
1496
1496
  } catch (h) {
1497
1497
  return Promise.reject(h);
1498
1498
  }
@@ -1608,7 +1608,7 @@ function vn(e) {
1608
1608
  return e.apply(null, n);
1609
1609
  };
1610
1610
  }
1611
- function Jn(e) {
1611
+ function Gn(e) {
1612
1612
  return a.isObject(e) && e.isAxiosError === !0;
1613
1613
  }
1614
1614
  const Ee = {
@@ -1685,7 +1685,7 @@ function ut(e) {
1685
1685
  return ut(M(e, s));
1686
1686
  }, n;
1687
1687
  }
1688
- const S = ut(G);
1688
+ const S = ut(J);
1689
1689
  S.Axios = H;
1690
1690
  S.CanceledError = z;
1691
1691
  S.CancelToken = $n;
@@ -1698,7 +1698,7 @@ S.all = function(t) {
1698
1698
  return Promise.all(t);
1699
1699
  };
1700
1700
  S.spread = vn;
1701
- S.isAxiosError = Jn;
1701
+ S.isAxiosError = Gn;
1702
1702
  S.mergeConfig = M;
1703
1703
  S.AxiosHeaders = N;
1704
1704
  S.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
@@ -1707,7 +1707,7 @@ S.HttpStatusCode = Ee;
1707
1707
  S.default = S;
1708
1708
  const {
1709
1709
  Axios: pr,
1710
- AxiosError: Gn,
1710
+ AxiosError: Jn,
1711
1711
  CanceledError: hr,
1712
1712
  isCancel: mr,
1713
1713
  CancelToken: Er,
@@ -1730,7 +1730,7 @@ const {
1730
1730
  }), Xn = async (e, t) => (await Wn(t), e()), De = (e, t) => {
1731
1731
  var s, o;
1732
1732
  let n = "", r = t;
1733
- typeof t == "string" ? n = t : t instanceof Gn ? (n = t.message, r = {
1733
+ typeof t == "string" ? n = t : t instanceof Jn ? (n = t.message, r = {
1734
1734
  message: t.message,
1735
1735
  cause: t.cause,
1736
1736
  status: t.status,
@@ -2025,7 +2025,7 @@ export {
2025
2025
  C as c,
2026
2026
  F as d,
2027
2027
  S as e,
2028
- Gn as f,
2028
+ Jn as f,
2029
2029
  Vn as g,
2030
2030
  Yn as h,
2031
2031
  Zn as i,
@@ -1,7 +1,7 @@
1
1
  var _ = Object.defineProperty;
2
2
  var g = (a, e, s) => e in a ? _(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
3
3
  var r = (a, e, s) => g(a, typeof e != "symbol" ? e + "" : e, s);
4
- import { c as n, j as p, b as o, r as T } from "./AccountService-D_6U8vP6.js";
4
+ import { c as n, j as p, b as o, r as T } from "./AccountService-cvx__9rR.js";
5
5
  import { EBookingType as m } from "./services/trips/TripService.types.js";
6
6
  import { EMyTripsEndpoints as i } from "./configs/endpoints.js";
7
7
  import "./arrayExtensions-DlcBOj5a.js";
@@ -3,21 +3,21 @@ import * as i from "react";
3
3
  import { useMemo as nt } from "react";
4
4
  import { u as D, a as ot, c as A, b as q, d as ve, e as st, f as it, g as G, o as at, s as lt, h as ct, i as dt, j as ut, k as pt, l as ft, m as ht, n as vt, p as mt, P as me } from "../../index-BC-KTkxU.js";
5
5
  import { r as yt, R as gt } from "../../index-Cv-wvFlM.js";
6
- import { b as ue } from "../../index-CDh8vAM_.js";
6
+ import { useQuery as Ct } from "@tanstack/react-query";
7
7
  import "../../arrayExtensions-DlcBOj5a.js";
8
- import { E as Ct } from "../../AccountService-D_6U8vP6.js";
9
- import { useQuery as Et } from "@tanstack/react-query";
10
- import { CurrencyService as wt } from "../../services/currency/CurrencyService.js";
11
- import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';/* empty css */
8
+ import { E as Et } from "../../AccountService-cvx__9rR.js";
9
+ import { b as ue } from "../../index-CDh8vAM_.js";
12
10
  import "../../context/AwayzContext.js";
13
11
  import "../../configs/awayzClient.js";
14
- import { useAwayzContext as Pt } from "../../hooks/useAwayzContext.js";
12
+ import { useAwayzContext as wt } from "../../hooks/useAwayzContext.js";
15
13
  import "../../services/noRetryInstance.js";
14
+ import { CurrencyService as Pt } from "../../services/currency/CurrencyService.js";
16
15
  import { EInvalidAmountDisplayOption as N, EToolTipPosition as bt } from "./CashValueTypes.js";
17
- /* empty css */
16
+ import '../../assets/_styles.css';import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';/* empty css */
18
17
  /* empty css */
19
18
  /* empty css */
20
19
  /* empty css */
20
+ /* empty css */
21
21
  const Y = (e, t) => {
22
22
  var r = new Intl.NumberFormat("en-US", {
23
23
  style: "currency",
@@ -125,24 +125,24 @@ var _t = "DismissableLayer", z = "dismissableLayer.update", Lt = "dismissableLay
125
125
  onInteractOutside: a,
126
126
  onDismiss: u,
127
127
  ...l
128
- } = e, p = i.useContext(ge), [d, f] = i.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = i.useState({}), m = D(t, (g) => f(g)), y = Array.from(p.layers), [C] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1), w = y.indexOf(C), E = d ? y.indexOf(d) : -1, x = p.layersWithOutsidePointerEventsDisabled.size > 0, P = E >= w, T = kt((g) => {
128
+ } = e, p = i.useContext(ge), [d, f] = i.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = i.useState({}), m = D(t, (g) => f(g)), y = Array.from(p.layers), [C] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1), w = y.indexOf(C), E = d ? y.indexOf(d) : -1, x = p.layersWithOutsidePointerEventsDisabled.size > 0, P = E >= w, T = kt((g) => {
129
129
  const S = g.target, F = [...p.branches].some((I) => I.contains(S));
130
130
  !P || F || (n == null || n(g), a == null || a(g), g.defaultPrevented || u == null || u());
131
- }, h), b = Ft((g) => {
131
+ }, v), b = Ft((g) => {
132
132
  const S = g.target;
133
133
  [...p.branches].some((I) => I.contains(S)) || (s == null || s(g), a == null || a(g), g.defaultPrevented || u == null || u());
134
- }, h);
134
+ }, v);
135
135
  return ot((g) => {
136
136
  E === p.layers.size - 1 && (o == null || o(g), !g.defaultPrevented && u && (g.preventDefault(), u()));
137
- }, h), i.useEffect(() => {
137
+ }, v), i.useEffect(() => {
138
138
  if (d)
139
- return r && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (fe = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(d)), p.layers.add(d), he(), () => {
140
- r && p.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = fe);
139
+ return r && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (fe = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(d)), p.layers.add(d), he(), () => {
140
+ r && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = fe);
141
141
  };
142
- }, [d, h, r, p]), i.useEffect(() => () => {
142
+ }, [d, v, r, p]), i.useEffect(() => () => {
143
143
  d && (p.layers.delete(d), p.layersWithOutsidePointerEventsDisabled.delete(d), he());
144
144
  }, [d, p]), i.useEffect(() => {
145
- const g = () => v({});
145
+ const g = () => h({});
146
146
  return document.addEventListener(z, g), () => document.removeEventListener(z, g);
147
147
  }, []), /* @__PURE__ */ c(
148
148
  O.div,
@@ -271,8 +271,8 @@ var Q = "PopperContent", [Ut, Yt] = Pe(Q), Oe = i.forwardRef(
271
271
  collisionBoundary: p = [],
272
272
  collisionPadding: d = 0,
273
273
  sticky: f = "partial",
274
- hideWhenDetached: h = !1,
275
- updatePositionStrategy: v = "optimized",
274
+ hideWhenDetached: v = !1,
275
+ updatePositionStrategy: h = "optimized",
276
276
  onPlaced: m,
277
277
  ...y
278
278
  } = e, C = xe(Q, r), [w, E] = i.useState(null), x = D(t, (M) => E(M)), [P, T] = i.useState(null), b = st(P), g = (b == null ? void 0 : b.width) ?? 0, S = (b == null ? void 0 : b.height) ?? 0, F = o + (s !== "center" ? "-" + s : ""), I = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, te = Array.isArray(p) ? p : [p], Ye = te.length > 0, $ = {
@@ -285,7 +285,7 @@ var Q = "PopperContent", [Ut, Yt] = Pe(Q), Oe = i.forwardRef(
285
285
  strategy: "fixed",
286
286
  placement: F,
287
287
  whileElementsMounted: (...M) => ht(...M, {
288
- animationFrame: v === "always"
288
+ animationFrame: h === "always"
289
289
  }),
290
290
  elements: {
291
291
  reference: C.anchor
@@ -308,7 +308,7 @@ var Q = "PopperContent", [Ut, Yt] = Pe(Q), Oe = i.forwardRef(
308
308
  }),
309
309
  P && ut({ element: P, padding: u }),
310
310
  Gt({ arrowWidth: g, arrowHeight: S }),
311
- h && pt({ strategy: "referenceHidden", ...$ })
311
+ v && pt({ strategy: "referenceHidden", ...$ })
312
312
  ]
313
313
  }), [ne, Ge] = De(je), B = q(m);
314
314
  G(() => {
@@ -431,9 +431,9 @@ var Gt = (e) => ({
431
431
  options: e,
432
432
  fn(t) {
433
433
  var C, w, E;
434
- const { placement: r, rects: o, middlewareData: n } = t, a = ((C = n.arrow) == null ? void 0 : C.centerOffset) !== 0, u = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [p, d] = De(r), f = { start: "0%", center: "50%", end: "100%" }[d], h = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + u / 2, v = (((E = n.arrow) == null ? void 0 : E.y) ?? 0) + l / 2;
434
+ const { placement: r, rects: o, middlewareData: n } = t, a = ((C = n.arrow) == null ? void 0 : C.centerOffset) !== 0, u = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [p, d] = De(r), f = { start: "0%", center: "50%", end: "100%" }[d], v = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + u / 2, h = (((E = n.arrow) == null ? void 0 : E.y) ?? 0) + l / 2;
435
435
  let m = "", y = "";
436
- return p === "bottom" ? (m = a ? f : `${h}px`, y = `${-l}px`) : p === "top" ? (m = a ? f : `${h}px`, y = `${o.floating.height + l}px`) : p === "right" ? (m = `${-l}px`, y = a ? f : `${v}px`) : p === "left" && (m = `${o.floating.width + l}px`, y = a ? f : `${v}px`), { data: { x: m, y } };
436
+ return p === "bottom" ? (m = a ? f : `${v}px`, y = `${-l}px`) : p === "top" ? (m = a ? f : `${v}px`, y = `${o.floating.height + l}px`) : p === "right" ? (m = `${-l}px`, y = a ? f : `${h}px`) : p === "left" && (m = `${o.floating.width + l}px`, y = a ? f : `${h}px`), { data: { x: m, y } };
437
437
  }
438
438
  });
439
439
  function De(e) {
@@ -518,7 +518,7 @@ var H = "Tooltip", [nr, k] = V(H), He = (e) => {
518
518
  onOpenChange: s,
519
519
  disableHoverableContent: a,
520
520
  delayDuration: u
521
- } = e, l = J(H, e.__scopeTooltip), p = j(t), [d, f] = i.useState(null), h = vt(), v = i.useRef(0), m = a ?? l.disableHoverableContent, y = u ?? l.delayDuration, C = i.useRef(!1), [w, E] = mt({
521
+ } = e, l = J(H, e.__scopeTooltip), p = j(t), [d, f] = i.useState(null), v = vt(), h = i.useRef(0), m = a ?? l.disableHoverableContent, y = u ?? l.delayDuration, C = i.useRef(!1), [w, E] = mt({
522
522
  prop: o,
523
523
  defaultProp: n ?? !1,
524
524
  onChange: (g) => {
@@ -526,21 +526,21 @@ var H = "Tooltip", [nr, k] = V(H), He = (e) => {
526
526
  },
527
527
  caller: H
528
528
  }), x = i.useMemo(() => w ? C.current ? "delayed-open" : "instant-open" : "closed", [w]), P = i.useCallback(() => {
529
- window.clearTimeout(v.current), v.current = 0, C.current = !1, E(!0);
529
+ window.clearTimeout(h.current), h.current = 0, C.current = !1, E(!0);
530
530
  }, [E]), T = i.useCallback(() => {
531
- window.clearTimeout(v.current), v.current = 0, E(!1);
531
+ window.clearTimeout(h.current), h.current = 0, E(!1);
532
532
  }, [E]), b = i.useCallback(() => {
533
- window.clearTimeout(v.current), v.current = window.setTimeout(() => {
534
- C.current = !0, E(!0), v.current = 0;
533
+ window.clearTimeout(h.current), h.current = window.setTimeout(() => {
534
+ C.current = !0, E(!0), h.current = 0;
535
535
  }, y);
536
536
  }, [y, E]);
537
537
  return i.useEffect(() => () => {
538
- v.current && (window.clearTimeout(v.current), v.current = 0);
538
+ h.current && (window.clearTimeout(h.current), h.current = 0);
539
539
  }, []), /* @__PURE__ */ c(zt, { ...p, children: /* @__PURE__ */ c(
540
540
  nr,
541
541
  {
542
542
  scope: t,
543
- contentId: h,
543
+ contentId: v,
544
544
  open: w,
545
545
  stateAttribute: x,
546
546
  trigger: d,
@@ -549,7 +549,7 @@ var H = "Tooltip", [nr, k] = V(H), He = (e) => {
549
549
  l.isOpenDelayedRef.current ? b() : P();
550
550
  }, [l.isOpenDelayedRef, b, P]),
551
551
  onTriggerLeave: i.useCallback(() => {
552
- m ? T() : (window.clearTimeout(v.current), v.current = 0);
552
+ m ? T() : (window.clearTimeout(h.current), h.current = 0);
553
553
  }, [T, m]),
554
554
  onOpen: P,
555
555
  onClose: T,
@@ -569,8 +569,8 @@ var Z = "TooltipTrigger", ke = i.forwardRef(
569
569
  "data-state": n.stateAttribute,
570
570
  ...o,
571
571
  ref: l,
572
- onPointerMove: A(e.onPointerMove, (h) => {
573
- h.pointerType !== "touch" && !d.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), d.current = !0);
572
+ onPointerMove: A(e.onPointerMove, (v) => {
573
+ v.pointerType !== "touch" && !d.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), d.current = !0);
574
574
  }),
575
575
  onPointerLeave: A(e.onPointerLeave, () => {
576
576
  n.onTriggerLeave(), d.current = !1;
@@ -601,31 +601,31 @@ var L = "TooltipContent", $e = i.forwardRef(
601
601
  return /* @__PURE__ */ c(me, { present: o || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(We, { side: n, ...s, ref: t }) : /* @__PURE__ */ c(ir, { side: n, ...s, ref: t }) });
602
602
  }
603
603
  ), ir = i.forwardRef((e, t) => {
604
- const r = k(L, e.__scopeTooltip), o = J(L, e.__scopeTooltip), n = i.useRef(null), s = D(t, n), [a, u] = i.useState(null), { trigger: l, onClose: p } = r, d = n.current, { onPointerInTransitChange: f } = o, h = i.useCallback(() => {
604
+ const r = k(L, e.__scopeTooltip), o = J(L, e.__scopeTooltip), n = i.useRef(null), s = D(t, n), [a, u] = i.useState(null), { trigger: l, onClose: p } = r, d = n.current, { onPointerInTransitChange: f } = o, v = i.useCallback(() => {
605
605
  u(null), f(!1);
606
- }, [f]), v = i.useCallback(
606
+ }, [f]), h = i.useCallback(
607
607
  (m, y) => {
608
608
  const C = m.currentTarget, w = { x: m.clientX, y: m.clientY }, E = dr(w, C.getBoundingClientRect()), x = ur(w, E), P = pr(y.getBoundingClientRect()), T = hr([...x, ...P]);
609
609
  u(T), f(!0);
610
610
  },
611
611
  [f]
612
612
  );
613
- return i.useEffect(() => () => h(), [h]), i.useEffect(() => {
613
+ return i.useEffect(() => () => v(), [v]), i.useEffect(() => {
614
614
  if (l && d) {
615
- const m = (C) => v(C, d), y = (C) => v(C, l);
615
+ const m = (C) => h(C, d), y = (C) => h(C, l);
616
616
  return l.addEventListener("pointerleave", m), d.addEventListener("pointerleave", y), () => {
617
617
  l.removeEventListener("pointerleave", m), d.removeEventListener("pointerleave", y);
618
618
  };
619
619
  }
620
- }, [l, d, v, h]), i.useEffect(() => {
620
+ }, [l, d, h, v]), i.useEffect(() => {
621
621
  if (a) {
622
622
  const m = (y) => {
623
623
  const C = y.target, w = { x: y.clientX, y: y.clientY }, E = (l == null ? void 0 : l.contains(C)) || (d == null ? void 0 : d.contains(C)), x = !fr(w, a);
624
- E ? h() : x && (h(), p());
624
+ E ? v() : x && (v(), p());
625
625
  };
626
626
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
627
627
  }
628
- }, [l, d, a, p, h]), /* @__PURE__ */ c(We, { ...e, ref: s });
628
+ }, [l, d, a, p, v]), /* @__PURE__ */ c(We, { ...e, ref: s });
629
629
  }), [ar, lr] = V(H, { isInside: !1 }), cr = /* @__PURE__ */ At("TooltipContent"), We = i.forwardRef(
630
630
  (e, t) => {
631
631
  const {
@@ -638,9 +638,9 @@ var L = "TooltipContent", $e = i.forwardRef(
638
638
  } = e, l = k(L, r), p = j(r), { onClose: d } = l;
639
639
  return i.useEffect(() => (document.addEventListener(X, d), () => document.removeEventListener(X, d)), [d]), i.useEffect(() => {
640
640
  if (l.trigger) {
641
- const f = (h) => {
642
- const v = h.target;
643
- v != null && v.contains(l.trigger) && d();
641
+ const f = (v) => {
642
+ const h = v.target;
643
+ h != null && h.contains(l.trigger) && d();
644
644
  };
645
645
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
646
646
  }
@@ -747,8 +747,8 @@ function fr(e, t) {
747
747
  const { x: r, y: o } = e;
748
748
  let n = !1;
749
749
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
750
- const u = t[s], l = t[a], p = u.x, d = u.y, f = l.x, h = l.y;
751
- d > o != h > o && r < (f - p) * (o - d) / (h - d) + p && (n = !n);
750
+ const u = t[s], l = t[a], p = u.x, d = u.y, f = l.x, v = l.y;
751
+ d > o != v > o && r < (f - p) * (o - d) / (v - d) + p && (n = !n);
752
752
  }
753
753
  return n;
754
754
  }
@@ -789,10 +789,10 @@ const Pr = 1e3 * 60 * 60, Vr = ({
789
789
  zeroDisplayOption: o = N.NA,
790
790
  customDisplay: n
791
791
  }) => {
792
- var f;
793
- const { user: s } = Pt(), a = (f = s == null ? void 0 : s.userRegion) == null ? void 0 : f.currency, u = a !== t, { data: l, isPending: p } = Et({
794
- queryKey: [Ct.CONVERT_CURRENCY, t],
795
- queryFn: () => wt.convertCurrency({ baseCurrency: t }),
792
+ var f, v;
793
+ const { user: s } = wt(), a = ((f = s == null ? void 0 : s.preferences) == null ? void 0 : f.currency) ?? ((v = s == null ? void 0 : s.userRegion) == null ? void 0 : v.currency), u = a !== t, { data: l, isPending: p } = Ct({
794
+ queryKey: [Et.CONVERT_CURRENCY, t, a],
795
+ queryFn: () => Pt.convertCurrency({ baseCurrency: t }),
796
796
  enabled: u,
797
797
  staleTime: Pr
798
798
  }), d = nt(() => {
@@ -3,10 +3,10 @@ import { CashValue as n } from "./CashValue.js";
3
3
  import { AwayzProvider as a } from "../../providers/AwayzProvider.js";
4
4
  import "react";
5
5
  import "../../context/AwayzContext.js";
6
+ import "@tanstack/react-query";
6
7
  import "../../arrayExtensions-DlcBOj5a.js";
7
- import "../../AccountService-D_6U8vP6.js";
8
+ import "../../AccountService-cvx__9rR.js";
8
9
  import "../../configs/awayzClient.js";
9
- import "@tanstack/react-query";
10
10
  import { EAuthFlow as i } from "../../types/EAuthFlow.js";
11
11
  import "../../services/noRetryInstance.js";
12
12
  import { EToolTipPosition as t, EInvalidAmountDisplayOption as o } from "./CashValueTypes.js";
@@ -3,10 +3,10 @@ import { Card as r } from "./Card.js";
3
3
  import { AwayzProvider as a } from "../../../providers/AwayzProvider.js";
4
4
  import "react";
5
5
  import "../../../context/AwayzContext.js";
6
+ import "@tanstack/react-query";
6
7
  import "../../../arrayExtensions-DlcBOj5a.js";
7
- import "../../../AccountService-D_6U8vP6.js";
8
+ import "../../../AccountService-cvx__9rR.js";
8
9
  import "../../../configs/awayzClient.js";
9
- import "@tanstack/react-query";
10
10
  import { EAuthFlow as e } from "../../../types/EAuthFlow.js";
11
11
  import "../../../services/noRetryInstance.js";
12
12
  import '../../../assets/_styles5.css';import '../../../assets/_styles4.css';import '../../../assets/_styles3.css';import '../../../assets/_styles.css';/* empty css */