@odynn/awayz-flights 0.9.11 → 0.9.13

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,109 +1,105 @@
1
- import { jsx as r, jsxs as n, Fragment as L } from "react/jsx-runtime";
2
- import { useAwayzContext as Fe, useFeatureFlags as Pe, RewardsService as Y, EAmountsDisplayFeature as u, CashValue as Q, EToolTipPosition as j, ClientPointsValue as Ee, EInvalidAmountDisplayOption as Te, awayzClient as ne, EFlightBookingOptionsDisplayFeature as G, CurrencyService as Ae } from "@odynn/awayz-core";
1
+ import { jsx as i, jsxs as n, Fragment as R } from "react/jsx-runtime";
2
+ import { useAwayzContext as Fe, useFeatureFlags as Pe, RewardsService as Y, EAmountsDisplayFeature as u, CashValue as Q, EToolTipPosition as j, ClientPointsValue as Ee, EInvalidAmountDisplayOption as Ae, awayzClient as ne, EFlightBookingOptionsDisplayFeature as w, CurrencyService as Te } from "@odynn/awayz-core";
3
3
  import { useQuery as De } from "@tanstack/react-query";
4
- import { p as w, c as Oe, B as J } from "../../BookingOption-V-FzaupW.js";
4
+ import { p as G, c as Oe, B as J } from "../../BookingOption-D566Ie2y.js";
5
5
  import { g as X } from "../../dateUtils-Cb9VQiIL.js";
6
6
  import "../../arrayExtensions-Ce8YopTP.js";
7
- import { E as H } from "../../enums-tLvxh02p.js";
8
- import { E as T, F as Z } from "../../FlightItinerary-C4KPpVcF.js";
9
- import { useRef as Ce, useState as A, useMemo as v, useEffect as k } from "react";
10
- import { h as g } from "../../moment-BGjjqtLQ.js";
11
- import { useTranslation as be } from "react-i18next";
12
- import { b as W, c as _e, d as Se, e as Ie, f as x } from "../../index-9LVJi5JO.js";
13
- import { EPaymentType as d } from "../../enums/EPaymentType.js";
14
- import { DEFAULT_AIRLINE_PROGRAM as B, getFlightNumber as Re, getLogoPath as Le, getAirlineProgram as ke } from "../../utils/flightUtils.js";
7
+ import { E as x } from "../../enums-tLvxh02p.js";
8
+ import { E as P, F as Z } from "../../FlightItinerary-BvAVMr_3.js";
9
+ import { useRef as Ce, useState as E, useMemo as d, useEffect as L } from "react";
10
+ import { h as f } from "../../moment-BGjjqtLQ.js";
11
+ import { useTranslation as Se } from "react-i18next";
12
+ import { b as W, c as _e, d as be, e as Ie, f as k } from "../../index-9LVJi5JO.js";
13
+ import { EPaymentType as y } from "../../enums/EPaymentType.js";
14
+ import { DEFAULT_AIRLINE_PROGRAM as B, getLogoPath as Re, getAirlineProgram as Le } from "../../utils/flightUtils.js";
15
15
  import ee from "../Dialog/Dialog.js";
16
- import ie from "../HorizontalScroller/HorizontalScroller.js";
16
+ import re from "../HorizontalScroller/HorizontalScroller.js";
17
17
  import '../../assets/_styles.css';/* empty css */
18
- const xe = (...e) => e.join(" ");
19
- async function re(e, p, l) {
20
- if (!e || p === l) return e;
18
+ const ke = (...e) => e.join(" ");
19
+ async function ie(e, g, o) {
20
+ if (!e || g === o) return e;
21
21
  const c = await ne.ensureQueryData({
22
- queryKey: [H.CONVERT_CURRENCY, p, l],
22
+ queryKey: [x.CONVERT_CURRENCY, g, o],
23
23
  staleTime: 1e3 * 60 * 60,
24
24
  // 1 hour
25
- queryFn: () => Ae.convertCurrency({
26
- baseCurrency: p,
27
- targetCurrency: l
25
+ queryFn: () => Te.convertCurrency({
26
+ baseCurrency: g,
27
+ targetCurrency: o
28
28
  })
29
29
  });
30
30
  return e * c;
31
31
  }
32
- const ii = ({
32
+ const er = ({
33
33
  details: e,
34
- onClick: p,
35
- showBestValue: l = !1,
34
+ onClick: g,
35
+ showBestValue: o = !1,
36
36
  onShowBestValueCalculation: c,
37
37
  customStyling: se = !1,
38
38
  customCashComponent: ae,
39
39
  customPointsComponent: te,
40
- onBookWithCash: D,
41
- onBookWithPoints: O
40
+ onBookWithCash: A,
41
+ onBookWithPoints: T
42
42
  }) => {
43
- const { t: N } = be(), C = Ce(null), [U, ce] = A(!1), [F, le] = A(
43
+ const { t: N } = Se(), D = Ce(null), [H, ce] = E(!1), [v, oe] = E(
44
44
  "none"
45
45
  /* NONE */
46
- ), [oe, me] = A(!1), { config: b } = Fe(), he = e.origin, pe = e.destination, P = e.flightDetails, m = e.paymentOptions || [], { featureFlags: h } = Pe(), _ = v(
47
- () => m.filter((i) => i.points === -1),
48
- [m]
49
- ), S = v(
50
- () => m.filter((i) => i.points > -1),
51
- [m]
52
- ), V = m.filter((i) => i.points === -1).length === 1, ge = m.filter((i) => i.points > -1).length === 1, [fe, $] = A(B), a = v(() => {
53
- var i = m.filter((s) => s.points > -1).sort((s, t) => s.points - t.points);
54
- return i.find(
46
+ ), [le, me] = E(!1), { config: O } = Fe(), pe = e.origin, he = e.destination, F = e.flightDetails, l = e.paymentOptions || [], { featureFlags: m } = Pe(), C = d(
47
+ () => l.filter((r) => r.points === -1),
48
+ [l]
49
+ ), S = d(
50
+ () => l.filter((r) => r.points > -1),
51
+ [l]
52
+ ), U = l.filter((r) => r.points === -1).length === 1, ge = l.filter((r) => r.points > -1).length === 1, [fe, V] = E(B), a = d(() => {
53
+ var r = l.filter((s) => s.points > -1).sort((s, t) => s.points - t.points);
54
+ return r.find(
55
55
  (s) => s.program === e.airlineProgram
56
- ) || i[0];
57
- }, [m, e.airlineProgram]), ue = async () => {
56
+ ) || r[0];
57
+ }, [l, e.airlineProgram]), ue = async () => {
58
58
  if (!a) {
59
- $(B);
59
+ V(B);
60
60
  return;
61
61
  }
62
- const i = await ke(a.program);
63
- $(i);
62
+ const r = await Le(a.program);
63
+ V(r);
64
64
  };
65
- k(() => {
65
+ L(() => {
66
66
  ue();
67
67
  }, [a]);
68
- const { flightNumbers: de, airlines: y } = v(() => {
69
- const i = [], s = [];
68
+ const _ = d(() => ({ logo: Re(e.displayAirlineIataCode), airline: e.airline }), [e]), $ = d(() => {
69
+ const r = /* @__PURE__ */ new Set(), s = [];
70
70
  return e.flightDetails.slices.forEach((t) => {
71
- t.segments.forEach((o) => {
72
- const f = Re(o);
73
- i.includes(f) || i.push(f);
74
- const E = o.operatingCarrier;
75
- s.some((R) => R.airline === E.name) || s.push({
76
- logo: Le(E.iataCode),
77
- airline: E.name
78
- });
71
+ t.segments.forEach((p) => {
72
+ var I;
73
+ const h = (I = p.operatingCarrier) == null ? void 0 : I.name;
74
+ h && !r.has(h) && (r.add(h), s.push(h));
79
75
  });
80
- }), { flightNumbers: i, airlines: s };
81
- }, [e.flightDetails.slices]), Ne = () => {
82
- h.flightBookingOptionsDisplayFeature === G.SHEET || e.partial ? e.cash > 0 ? p(e, d.CASH) : p(e, d.POINTS) : K();
83
- }, I = e == null ? void 0 : e.airlineProgram, { data: M } = De({
84
- queryKey: [H.VALUE_CENTS, I, "test"],
85
- queryFn: () => Y.getCentPerPoint(I),
76
+ }), s;
77
+ }, [e]), de = () => {
78
+ m.flightBookingOptionsDisplayFeature === w.SHEET || e.partial ? e.cash > 0 ? g(e, y.CASH) : g(e, y.POINTS) : K();
79
+ }, b = e == null ? void 0 : e.airlineProgram, { data: M } = De({
80
+ queryKey: [x.VALUE_CENTS, b, "test"],
81
+ queryFn: () => Y.getCentPerPoint(b),
86
82
  staleTime: 1 / 0,
87
- enabled: !!I && l
88
- }), q = v(() => {
89
- var i, s;
90
- return (s = (i = e.paymentOptions) == null ? void 0 : i.find(
83
+ enabled: !!b && o
84
+ }), q = d(() => {
85
+ var r, s;
86
+ return (s = (r = e.paymentOptions) == null ? void 0 : r.find(
91
87
  (t) => {
92
- var o;
93
- return t.program === e.airlineProgram && ((o = t.cashFee) == null ? void 0 : o.amount) !== 0;
88
+ var p;
89
+ return t.program === e.airlineProgram && ((p = t.cashFee) == null ? void 0 : p.amount) !== 0;
94
90
  }
95
91
  )) == null ? void 0 : s.cashFee;
96
92
  }, [e.paymentOptions, e.airlineProgram]), ye = async () => {
97
93
  if (!e || !M || !e.points || !e.cash)
98
94
  return;
99
- const i = e.currency;
95
+ const r = e.currency;
100
96
  let s = {
101
97
  valueCents: 1,
102
- currency: i
98
+ currency: r
103
99
  };
104
100
  try {
105
101
  s = await ne.ensureQueryData({
106
- queryKey: [H.VALUE_CENTS, e.airlineProgram],
102
+ queryKey: [x.VALUE_CENTS, e.airlineProgram],
107
103
  staleTime: 1e3 * 60 * 60,
108
104
  // 1 hour
109
105
  queryFn: () => Y.getCentPerPoint(e.airlineProgram)
@@ -117,77 +113,74 @@ const ii = ({
117
113
  }
118
114
  const t = q ?? {
119
115
  amount: 0,
120
- currency: i
121
- }, [o, f] = await Promise.all([
122
- re(
116
+ currency: r
117
+ }, [p, h] = await Promise.all([
118
+ ie(
123
119
  t.amount,
124
120
  t.currency,
125
- i
121
+ r
126
122
  ),
127
- re(
123
+ ie(
128
124
  s.valueCents,
129
125
  s.currency,
130
- i
126
+ r
131
127
  )
132
- ]), R = f * e.points / 100 + o < e.cash;
133
- le(
134
- R ? "points" : "cash"
128
+ ]), Ne = h * e.points / 100 + p < e.cash;
129
+ oe(
130
+ Ne ? "points" : "cash"
135
131
  /* CASH */
136
132
  );
137
133
  };
138
- k(() => {
134
+ L(() => {
139
135
  ye();
140
- }, [e, M, q]), k(() => {
141
- const i = g(e.expiresAt), s = g();
142
- if (!(i.year() === g(0).year()) && i.isAfter(s)) {
143
- const o = i.diff(s), f = setTimeout(() => {
136
+ }, [e, M, q]), L(() => {
137
+ const r = f(e.expiresAt), s = f();
138
+ if (!(r.year() === f(0).year()) && r.isAfter(s)) {
139
+ const p = r.diff(s), h = setTimeout(() => {
144
140
  me(!0);
145
- }, o);
141
+ }, p);
146
142
  return () => {
147
- clearTimeout(f);
143
+ clearTimeout(h);
148
144
  };
149
145
  }
150
146
  }, [e.expiresAt]);
151
- const z = (i, s, t) => {
152
- i.stopPropagation(), h.flightBookingOptionsDisplayFeature === G.SHEET || t.partial ? p(t, s) : K();
147
+ const z = (r, s, t) => {
148
+ r.stopPropagation(), m.flightBookingOptionsDisplayFeature === w.SHEET || t.partial ? g(t, s) : K();
153
149
  }, K = () => {
154
- const i = !U;
155
- ce(i), i && C.current && C.current.scrollIntoView({ behavior: "smooth" });
150
+ const r = !H;
151
+ ce(r), r && D.current && D.current.scrollIntoView({ behavior: "smooth" });
156
152
  };
157
- return !(e.cash > 0) && !!!a ? null : /* @__PURE__ */ r(
153
+ return !(e.cash > 0) && !!!a ? null : /* @__PURE__ */ i(
158
154
  "div",
159
155
  {
160
156
  className: `${se ? "" : "awayz-"}flight-result`,
161
- onClick: Ne,
157
+ onClick: de,
162
158
  children: /* @__PURE__ */ n("div", { className: "content", children: [
163
159
  /* @__PURE__ */ n("div", { className: "flight-info", children: [
164
160
  /* @__PURE__ */ n("div", { className: "flight-info-header", children: [
165
161
  /* @__PURE__ */ n("div", { className: "airline-logo", children: [
166
- /* @__PURE__ */ r(
162
+ /* @__PURE__ */ i(
167
163
  "img",
168
164
  {
169
- src: y[0].logo,
170
- alt: y[0].airline,
171
- onError: (i) => i.currentTarget.src = (b == null ? void 0 : b.logoFallbackImageUrl) ?? ""
165
+ src: _.logo,
166
+ alt: _.airline,
167
+ onError: (r) => r.currentTarget.src = (O == null ? void 0 : O.logoFallbackImageUrl) ?? ""
172
168
  }
173
169
  ),
174
- /* @__PURE__ */ n("div", { children: [
175
- /* @__PURE__ */ n("p", { children: [
176
- y[0].airline,
177
- y.length > 1 && /* @__PURE__ */ n("sup", { className: "multiple-airlines", children: [
178
- "+",
179
- y.length - 1
180
- ] })
181
- ] }),
182
- /* @__PURE__ */ r("p", { children: de[0] })
183
- ] })
170
+ /* @__PURE__ */ i("div", { children: /* @__PURE__ */ n("p", { children: [
171
+ _.airline,
172
+ $.length > 1 && /* @__PURE__ */ n("sup", { className: "multiple-airlines", children: [
173
+ "+",
174
+ $.length - 1
175
+ ] })
176
+ ] }) })
184
177
  ] }),
185
178
  /* @__PURE__ */ n("div", { className: "flight-times", children: [
186
179
  /* @__PURE__ */ n("div", { className: "flight-duration", children: [
187
- /* @__PURE__ */ r(W, {}),
188
- /* @__PURE__ */ r("p", { children: X(P.slices[0].duration) })
180
+ /* @__PURE__ */ i(W, {}),
181
+ /* @__PURE__ */ i("p", { children: X(F.slices[0].duration) })
189
182
  ] }),
190
- /* @__PURE__ */ r("p", { children: e.numberOfStops > 0 ? `${e.numberOfStops} ${w(
183
+ /* @__PURE__ */ i("p", { children: e.numberOfStops > 0 ? `${e.numberOfStops} ${G(
191
184
  e.numberOfStops,
192
185
  "Stop"
193
186
  )}` : "Direct" })
@@ -195,88 +188,88 @@ const ii = ({
195
188
  ] }),
196
189
  /* @__PURE__ */ n("div", { className: "flight-info-content", children: [
197
190
  /* @__PURE__ */ n("div", { className: "flight-info-times", children: [
198
- /* @__PURE__ */ r("p", { className: "flight-info-date", children: g(e.departureTime).format(
199
- N(T.DISPLAY_MEDIUM)
191
+ /* @__PURE__ */ i("p", { className: "flight-info-date", children: f(e.departureTime).format(
192
+ N(P.DISPLAY_MEDIUM)
200
193
  ) }),
201
194
  /* @__PURE__ */ n("p", { className: "flight-info-time", children: [
202
- g(e.departureTime).format(
203
- N(T.TIME_ONLY)
195
+ f(e.departureTime).format(
196
+ N(P.TIME_ONLY)
204
197
  ),
205
198
  " "
206
199
  ] }),
207
200
  /* @__PURE__ */ n("div", { className: "flight-location", children: [
208
- /* @__PURE__ */ r("div", { className: "flight-location-icon", children: /* @__PURE__ */ r(_e, {}) }),
209
- /* @__PURE__ */ r("p", { children: he.airportCode })
201
+ /* @__PURE__ */ i("div", { className: "flight-location-icon", children: /* @__PURE__ */ i(_e, {}) }),
202
+ /* @__PURE__ */ i("p", { children: pe.airportCode })
210
203
  ] })
211
204
  ] }),
212
205
  /* @__PURE__ */ n("div", { className: "flight-icon", children: [
213
- /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(Se, {}) }),
206
+ /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(be, {}) }),
214
207
  /* @__PURE__ */ n("div", { className: "flight-times", children: [
215
208
  /* @__PURE__ */ n("div", { className: "flight-duration", children: [
216
- /* @__PURE__ */ r(W, {}),
217
- /* @__PURE__ */ r("p", { children: X(P.slices[0].duration) })
209
+ /* @__PURE__ */ i(W, {}),
210
+ /* @__PURE__ */ i("p", { children: X(F.slices[0].duration) })
218
211
  ] }),
219
- /* @__PURE__ */ r("p", { children: e.numberOfStops > 0 ? `${e.numberOfStops} ${w(
212
+ /* @__PURE__ */ i("p", { children: e.numberOfStops > 0 ? `${e.numberOfStops} ${G(
220
213
  e.numberOfStops,
221
214
  "Stop"
222
215
  )}` : "Direct" })
223
216
  ] }),
224
- /* @__PURE__ */ r(
217
+ /* @__PURE__ */ i(
225
218
  ee,
226
219
  {
227
220
  title: "Flight Details",
228
- trigger: /* @__PURE__ */ r("p", { className: "view-flight-details", children: "Flight Details" }),
229
- children: /* @__PURE__ */ r(Z, { itinerary: P.slices[0].segments })
221
+ trigger: /* @__PURE__ */ i("p", { className: "view-flight-details", children: "Flight Details" }),
222
+ children: /* @__PURE__ */ i(Z, { itinerary: F.slices[0].segments })
230
223
  }
231
224
  )
232
225
  ] }),
233
226
  /* @__PURE__ */ n("div", { className: "flight-info-times", children: [
234
- /* @__PURE__ */ r("p", { className: "flight-info-date", children: g(e.arrivalTime).format(
235
- N(T.DISPLAY_MEDIUM)
227
+ /* @__PURE__ */ i("p", { className: "flight-info-date", children: f(e.arrivalTime).format(
228
+ N(P.DISPLAY_MEDIUM)
236
229
  ) }),
237
230
  /* @__PURE__ */ n("p", { className: "flight-info-time", children: [
238
- g(e.arrivalTime).format(
239
- N(T.TIME_ONLY)
231
+ f(e.arrivalTime).format(
232
+ N(P.TIME_ONLY)
240
233
  ),
241
234
  " "
242
235
  ] }),
243
236
  /* @__PURE__ */ n("div", { className: "flight-location", children: [
244
- /* @__PURE__ */ r("p", { children: pe.airportCode }),
245
- /* @__PURE__ */ r("div", { className: "flight-location-icon", children: /* @__PURE__ */ r(Ie, {}) })
237
+ /* @__PURE__ */ i("p", { children: he.airportCode }),
238
+ /* @__PURE__ */ i("div", { className: "flight-location-icon", children: /* @__PURE__ */ i(Ie, {}) })
246
239
  ] })
247
240
  ] })
248
241
  ] })
249
242
  ] }),
250
243
  /* @__PURE__ */ n("div", { className: "flight-footer", children: [
251
- /* @__PURE__ */ r(
244
+ /* @__PURE__ */ i(
252
245
  ee,
253
246
  {
254
247
  title: "Flight Details",
255
- trigger: /* @__PURE__ */ r("p", { className: "view-flight-details", children: "View Flight Details" }),
256
- children: /* @__PURE__ */ r(Z, { itinerary: P.slices[0].segments })
248
+ trigger: /* @__PURE__ */ i("p", { className: "view-flight-details", children: "View Flight Details" }),
249
+ children: /* @__PURE__ */ i(Z, { itinerary: F.slices[0].segments })
257
250
  }
258
251
  ),
259
- /* @__PURE__ */ r("div", { className: "booking-options", children: oe ? /* @__PURE__ */ n("div", { className: "offer-expiry", children: [
260
- /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(x, {}) }),
261
- /* @__PURE__ */ r("p", { className: "expired-tip", children: "Offer Expired" })
262
- ] }) : /* @__PURE__ */ n(L, { children: [
252
+ /* @__PURE__ */ i("div", { className: "booking-options", children: le ? /* @__PURE__ */ n("div", { className: "offer-expiry", children: [
253
+ /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(k, {}) }),
254
+ /* @__PURE__ */ i("p", { className: "expired-tip", children: "Offer Expired" })
255
+ ] }) : /* @__PURE__ */ n(R, { children: [
263
256
  ae || e.cash > 0 && /* @__PURE__ */ n(
264
257
  "div",
265
258
  {
266
- className: xe(
259
+ className: ke(
267
260
  "amount-value",
268
- F === "cash" && l ? "show-best-value-flag" : "",
269
- h.amountsDisplayFeature !== u.CASH_AND_TRAVEL_PARTNER_POINTS ? "lg" : ""
261
+ v === "cash" && o ? "show-best-value-flag" : "",
262
+ m.amountsDisplayFeature !== u.CASH_AND_TRAVEL_PARTNER_POINTS ? "lg" : ""
270
263
  ),
271
- onClick: (i) => {
272
- z(i, d.CASH, e);
264
+ onClick: (r) => {
265
+ z(r, y.CASH, e);
273
266
  },
274
267
  children: [
275
- h.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS ? /* @__PURE__ */ r("b", { children: "Cash" }) : /* @__PURE__ */ r("b", { children: V ? "Book For" : "From" }),
268
+ m.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS ? /* @__PURE__ */ i("b", { children: "Cash" }) : /* @__PURE__ */ i("b", { children: U ? "Book For" : "From" }),
276
269
  /* @__PURE__ */ n("div", { children: [
277
- h.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && /* @__PURE__ */ r("label", { children: V ? "Book For" : "From" }),
270
+ m.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && /* @__PURE__ */ i("label", { children: U ? "Book For" : "From" }),
278
271
  /* @__PURE__ */ n("span", { className: "flight-cash-amount-value", children: [
279
- /* @__PURE__ */ r(
272
+ /* @__PURE__ */ i(
280
273
  Q,
281
274
  {
282
275
  amount: e.cash,
@@ -284,10 +277,10 @@ const ii = ({
284
277
  position: j.LEFT
285
278
  }
286
279
  ),
287
- h.amountsDisplayFeature === u.CASH_AND_CLIENT_POINTS && /* @__PURE__ */ n(L, { children: [
280
+ m.amountsDisplayFeature === u.CASH_AND_CLIENT_POINTS && /* @__PURE__ */ n(R, { children: [
288
281
  "/",
289
282
  " ",
290
- /* @__PURE__ */ r(
283
+ /* @__PURE__ */ i(
291
284
  Ee,
292
285
  {
293
286
  currency: e.currency,
@@ -297,61 +290,61 @@ const ii = ({
297
290
  ] })
298
291
  ] })
299
292
  ] }),
300
- F === "cash" && h.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && l && /* @__PURE__ */ n(
293
+ v === "cash" && m.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && o && /* @__PURE__ */ n(
301
294
  "div",
302
295
  {
303
296
  className: "best-value-flag tip",
304
- onClick: (i) => {
305
- i.stopPropagation(), c == null || c(e);
297
+ onClick: (r) => {
298
+ r.stopPropagation(), c == null || c(e);
306
299
  },
307
300
  children: [
308
- c && /* @__PURE__ */ r(x, {}),
309
- /* @__PURE__ */ r("p", { children: "Best Value" }),
310
- c && /* @__PURE__ */ r("span", { children: "Click to learn more" })
301
+ c && /* @__PURE__ */ i(k, {}),
302
+ /* @__PURE__ */ i("p", { children: "Best Value" }),
303
+ c && /* @__PURE__ */ i("span", { children: "Click to learn more" })
311
304
  ]
312
305
  }
313
306
  )
314
307
  ]
315
308
  }
316
309
  ),
317
- te || e.points > 0 && a && h.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && /* @__PURE__ */ n(
310
+ te || e.points > 0 && a && m.amountsDisplayFeature === u.CASH_AND_TRAVEL_PARTNER_POINTS && /* @__PURE__ */ n(
318
311
  "div",
319
312
  {
320
- className: `amount-value ${F === "points" && l ? "show-best-value-flag" : ""}`,
321
- onClick: (i) => {
322
- z(i, d.POINTS, e);
313
+ className: `amount-value ${v === "points" && o ? "show-best-value-flag" : ""}`,
314
+ onClick: (r) => {
315
+ z(r, y.POINTS, e);
323
316
  },
324
317
  children: [
325
- F === "points" && l && /* @__PURE__ */ n(
318
+ v === "points" && o && /* @__PURE__ */ n(
326
319
  "div",
327
320
  {
328
321
  className: "best-value-flag tip",
329
- onClick: (i) => {
330
- i.stopPropagation(), c == null || c(e);
322
+ onClick: (r) => {
323
+ r.stopPropagation(), c == null || c(e);
331
324
  },
332
325
  children: [
333
- c && /* @__PURE__ */ r(x, {}),
334
- /* @__PURE__ */ r("p", { children: "Best Value" }),
335
- c && /* @__PURE__ */ r("span", { children: "Click to learn more" })
326
+ c && /* @__PURE__ */ i(k, {}),
327
+ /* @__PURE__ */ i("p", { children: "Best Value" }),
328
+ c && /* @__PURE__ */ i("span", { children: "Click to learn more" })
336
329
  ]
337
330
  }
338
331
  ),
339
- /* @__PURE__ */ r("div", { className: "amount-airline-logo", children: /* @__PURE__ */ r("img", { src: fe.programLogo }) }),
332
+ /* @__PURE__ */ i("div", { className: "amount-airline-logo", children: /* @__PURE__ */ i("img", { src: fe.programLogo }) }),
340
333
  /* @__PURE__ */ n("div", { children: [
341
- /* @__PURE__ */ r("label", { children: ge ? "Book For" : "From" }),
334
+ /* @__PURE__ */ i("label", { children: ge ? "Book For" : "From" }),
342
335
  /* @__PURE__ */ n("p", { children: [
343
336
  `${Oe(
344
337
  a == null ? void 0 : a.points
345
338
  )} ${N("miles")}`,
346
- !!(a != null && a.cashFee) && /* @__PURE__ */ n(L, { children: [
339
+ !!(a != null && a.cashFee) && /* @__PURE__ */ n(R, { children: [
347
340
  " + ",
348
- /* @__PURE__ */ r(
341
+ /* @__PURE__ */ i(
349
342
  Q,
350
343
  {
351
344
  amount: a.cashFee.amount,
352
345
  currency: a.cashFee.currency,
353
346
  customDisplay: "No fee",
354
- zeroDisplayOption: Te.CUSTOM,
347
+ zeroDisplayOption: Ae.CUSTOM,
355
348
  position: j.LEFT
356
349
  }
357
350
  )
@@ -363,47 +356,47 @@ const ii = ({
363
356
  )
364
357
  ] }) })
365
358
  ] }),
366
- /* @__PURE__ */ r("div", { className: `flight-details ${U ? "is-open" : ""}`, children: /* @__PURE__ */ r("div", { ref: C, className: "inner", children: /* @__PURE__ */ n("div", { className: "flight-booking-options", children: [
367
- _.length > 0 && /* @__PURE__ */ n("div", { className: "booking-options-section", children: [
368
- S.length > 0 && /* @__PURE__ */ r("p", { className: "booking-options-title", children: "Cash Options" }),
369
- /* @__PURE__ */ r(ie, { children: _.map((i, s) => /* @__PURE__ */ r(
359
+ /* @__PURE__ */ i("div", { className: `flight-details ${H ? "is-open" : ""}`, children: /* @__PURE__ */ i("div", { ref: D, className: "inner", children: /* @__PURE__ */ n("div", { className: "flight-booking-options", children: [
360
+ C.length > 0 && /* @__PURE__ */ n("div", { className: "booking-options-section", children: [
361
+ S.length > 0 && /* @__PURE__ */ i("p", { className: "booking-options-title", children: "Cash Options" }),
362
+ /* @__PURE__ */ i(re, { children: C.map((r, s) => /* @__PURE__ */ i(
370
363
  J,
371
364
  {
372
- type: d.CASH,
373
- title: i.fareBrandName,
365
+ type: y.CASH,
366
+ title: r.fareBrandName,
374
367
  cashValue: {
375
- amount: i.cash,
368
+ amount: r.cash,
376
369
  currency: e.currency
377
370
  },
378
371
  milesValue: void 0,
379
- cashFee: i.cashFee,
372
+ cashFee: r.cashFee,
380
373
  setSelected: () => {
381
- D == null || D(i, e);
374
+ A == null || A(r, e);
382
375
  },
383
- conditions: i.conditions,
376
+ conditions: r.conditions,
384
377
  slices: e.flightDetails.slices,
385
- baggages: i.baggages
378
+ baggages: r.baggages
386
379
  },
387
380
  `cash-${s}`
388
381
  )) })
389
382
  ] }),
390
383
  S.length > 0 && /* @__PURE__ */ n("div", { className: "booking-options-section", children: [
391
- _.length > 0 && /* @__PURE__ */ r("p", { className: "booking-options-title", children: "Miles Options" }),
392
- /* @__PURE__ */ r(ie, { children: S.map((i, s) => /* @__PURE__ */ r(
384
+ C.length > 0 && /* @__PURE__ */ i("p", { className: "booking-options-title", children: "Miles Options" }),
385
+ /* @__PURE__ */ i(re, { children: S.map((r, s) => /* @__PURE__ */ i(
393
386
  J,
394
387
  {
395
- type: d.POINTS,
396
- title: i.fareBrandName,
388
+ type: y.POINTS,
389
+ title: r.fareBrandName,
397
390
  cashValue: void 0,
398
- milesValue: i.points,
399
- cashFee: i.cashFee,
391
+ milesValue: r.points,
392
+ cashFee: r.cashFee,
400
393
  setSelected: () => {
401
- O == null || O(i);
394
+ T == null || T(r);
402
395
  },
403
- conditions: i.conditions,
396
+ conditions: r.conditions,
404
397
  slices: e.flightDetails.slices,
405
- baggages: i.baggages,
406
- program: i.program
398
+ baggages: r.baggages,
399
+ program: r.program
407
400
  },
408
401
  `points-${s}`
409
402
  )) })
@@ -414,5 +407,5 @@ const ii = ({
414
407
  );
415
408
  };
416
409
  export {
417
- ii as FlightResult
410
+ er as FlightResult
418
411
  };
@@ -1,10 +1,13 @@
1
- import { F as o } from "../FlightItinerary-C4KPpVcF.js";
2
- import { FlightItineraryDropdown as e } from "./FlightItineraryDropdown/FlightItineraryDropdown.js";
3
- import { FlightResult as n } from "./FlightResult/FlightResult.js";
4
- import { MiniFlightItinerary as F } from "./MiniFlightItinerary/MiniFlightItinerary.js";
1
+ import { F as p } from "../FlightItinerary-BvAVMr_3.js";
2
+ import { FlightItineraryDropdown as l } from "./FlightItineraryDropdown/FlightItineraryDropdown.js";
3
+ import { FlightResult as F } from "./FlightResult/FlightResult.js";
4
+ import "react/jsx-runtime";
5
+ import "react";
6
+ import '../assets/_styles2.css';/* empty css */
7
+ import { MiniFlightItinerary as f } from "./MiniFlightItinerary/MiniFlightItinerary.js";
5
8
  export {
6
- o as FlightItinerary,
7
- e as FlightItineraryDropdown,
8
- n as FlightResult,
9
- F as MiniFlightItinerary
9
+ p as FlightItinerary,
10
+ l as FlightItineraryDropdown,
11
+ F as FlightResult,
12
+ f as MiniFlightItinerary
10
13
  };
@@ -1,4 +1,5 @@
1
1
  export * from './FlightItinerary/FlightItinerary';
2
2
  export * from './FlightItineraryDropdown/FlightItineraryDropdown';
3
3
  export * from './FlightResult/FlightResult';
4
+ export * from './HorizontalScroller/HorizontalScroller';
4
5
  export * from './MiniFlightItinerary/MiniFlightItinerary';
@@ -131,6 +131,7 @@ export interface IFlightResult {
131
131
  partial: boolean;
132
132
  airline: string;
133
133
  airlineLogo: string;
134
+ displayAirlineIataCode: string;
134
135
  flightNumber: string;
135
136
  origin: IAirportLocation;
136
137
  destination: IAirportLocation;