@sabstravtech/obtservices 0.0.22042501 → 0.0.22051001

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 (165) hide show
  1. package/angular/fetchers.d.ts +8 -0
  2. package/angular/lib/vendor/fetchers/fast-track-quote.fetcher.d.ts +7 -0
  3. package/angular/lib/vendor/fetchers/get-all-airlines.fetcher.d.ts +7 -0
  4. package/angular/lib/vendor/fetchers/get-cancellation-info.fetcher.d.ts +7 -0
  5. package/angular/lib/vendor/fetchers/get-car-hire-providers.fetcher.d.ts +7 -0
  6. package/angular/lib/vendor/fetchers/get-hotel-chains.fetcher.d.ts +7 -0
  7. package/angular/lib/vendor/fetchers/get-irl-supplier-station.fetcher.d.ts +7 -0
  8. package/angular/lib/vendor/fetchers/get-rail-providers.fetcher.d.ts +7 -0
  9. package/angular/lib/vendor/fetchers/send-offline-notification.fetcher.d.ts +7 -0
  10. package/angular/lib/vendor/services/enterprise-basket.service.d.ts +4 -3
  11. package/angular/lib/vendor/services/search.service.d.ts +10 -3
  12. package/angular/lib/vendor/services/ticket-queue.service.d.ts +6 -0
  13. package/angular/lib/vendor/services/user.service.d.ts +5 -3
  14. package/angular/lib/vendor/types/graphql.angular.types.d.ts +438 -16
  15. package/angular/lib/vendor/updaters/edit-user.updater.d.ts +6 -0
  16. package/angular/lib/vendor/updaters/set-user-language-updater.d.ts +6 -0
  17. package/angular/sabstravtech-obtservices-angular.d.ts +16 -13
  18. package/angular/sabstravtech-obtservices-angular.metadata.json +1 -1
  19. package/angular/services.d.ts +1 -0
  20. package/base/fetchers.d.ts +10 -0
  21. package/base/interfaces.d.ts +2 -0
  22. package/base/lib/vendor/classes/cabhire-enterprise-search.d.ts +2 -1
  23. package/base/lib/vendor/classes/carhire-enterprise-search.d.ts +1 -0
  24. package/base/lib/vendor/classes/eurostar-enterprise-search.d.ts +8 -2
  25. package/base/lib/vendor/classes/fast-track-enterprise-search.d.ts +57 -0
  26. package/base/lib/vendor/classes/flight-enterprise-search.d.ts +2 -1
  27. package/base/lib/vendor/classes/hotel-enterprise-search.d.ts +3 -1
  28. package/base/lib/vendor/classes/irl-enterprise-search.d.ts +27 -7
  29. package/base/lib/vendor/classes/lounges-enterprise-search.d.ts +1 -0
  30. package/base/lib/vendor/classes/management-info-and-valid.d.ts +6 -1
  31. package/base/lib/vendor/classes/modal-types.enum.d.ts +2 -0
  32. package/base/lib/vendor/classes/parking-enterprise-search.d.ts +1 -0
  33. package/base/lib/vendor/classes/rail-enterprise-search.d.ts +3 -2
  34. package/base/lib/vendor/fetchers/fast-track-quote.fetcher.d.ts +23 -0
  35. package/base/lib/vendor/fetchers/get-all-airlines.fetcher.d.ts +20 -0
  36. package/base/lib/vendor/fetchers/get-cancellation-info.fetcher.d.ts +20 -0
  37. package/base/lib/vendor/fetchers/get-car-hire-providers.fetcher.d.ts +20 -0
  38. package/base/lib/vendor/fetchers/get-hotel-chains.fetcher.d.ts +20 -0
  39. package/base/lib/vendor/fetchers/get-irl-supplier-station.fetcher.d.ts +21 -0
  40. package/base/lib/vendor/fetchers/get-rail-providers.fetcher.d.ts +20 -0
  41. package/base/lib/vendor/fetchers/send-offline-notification.fetcher.d.ts +21 -0
  42. package/base/lib/vendor/fetchers/user-fetcher.d.ts +2 -3
  43. package/base/lib/vendor/interfaces/Icabhire-enterprise-search.d.ts +1 -0
  44. package/base/lib/vendor/interfaces/Icarhire-enterprise-search.d.ts +1 -0
  45. package/base/lib/vendor/interfaces/Ienterprise-basket.service.d.ts +6 -3
  46. package/base/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +2 -0
  47. package/base/lib/vendor/interfaces/Ifast-track-enterprise-search.d.ts +26 -0
  48. package/base/lib/vendor/interfaces/Iflight-enterprise-search.d.ts +1 -0
  49. package/base/lib/vendor/interfaces/Ihotel-enterprise-search.d.ts +2 -0
  50. package/base/lib/vendor/interfaces/Iirl-enterprise-search.d.ts +11 -3
  51. package/base/lib/vendor/interfaces/Ilounges-enterprise-search.d.ts +1 -0
  52. package/base/lib/vendor/interfaces/Iparking-enterprise-search.d.ts +1 -0
  53. package/base/lib/vendor/interfaces/Irail-enterprise-search.d.ts +1 -0
  54. package/base/lib/vendor/interfaces/Isearch.service.d.ts +7 -1
  55. package/base/lib/vendor/interfaces/Iuser.service.d.ts +2 -1
  56. package/base/lib/vendor/interfaces/eurostar-search-arg.interface.d.ts +2 -0
  57. package/base/lib/vendor/interfaces/fast-track-filters.interface.d.ts +4 -0
  58. package/base/lib/vendor/interfaces/rail-basket-item.interface.d.ts +2 -0
  59. package/base/lib/vendor/interfaces/summary-interface.d.ts +2 -0
  60. package/base/lib/vendor/interfaces/user.data.d.ts +1 -0
  61. package/base/lib/vendor/models/traveller.object.d.ts +1 -0
  62. package/base/lib/vendor/services/enterprise-basket.service.d.ts +13 -6
  63. package/base/lib/vendor/services/requires-reason.service.d.ts +20 -0
  64. package/base/lib/vendor/services/search.service.d.ts +30 -5
  65. package/base/lib/vendor/services/user.service.d.ts +12 -5
  66. package/base/lib/vendor/services/webtoken.service.d.ts +1 -0
  67. package/base/lib/vendor/types/graphql.types.d.ts +398 -16
  68. package/base/lib/vendor/types/types.d.ts +53 -16
  69. package/base/lib/vendor/updaters/edit-user-updater.d.ts +19 -0
  70. package/base/lib/vendor/updaters/set-user-language-updater.d.ts +19 -0
  71. package/base/sabstravtech-obtservices-base.d.ts +5 -5
  72. package/base/sabstravtech-obtservices-base.metadata.json +1 -1
  73. package/base/services.d.ts +1 -0
  74. package/base/updaters.d.ts +2 -0
  75. package/bundles/sabstravtech-obtservices-angular.umd.js +499 -91
  76. package/bundles/sabstravtech-obtservices-angular.umd.js.map +1 -1
  77. package/bundles/sabstravtech-obtservices-angular.umd.min.js +1 -1
  78. package/bundles/sabstravtech-obtservices-angular.umd.min.js.map +1 -1
  79. package/bundles/sabstravtech-obtservices-base.umd.js +3204 -176
  80. package/bundles/sabstravtech-obtservices-base.umd.js.map +1 -1
  81. package/bundles/sabstravtech-obtservices-base.umd.min.js +2 -2
  82. package/bundles/sabstravtech-obtservices-base.umd.min.js.map +1 -1
  83. package/esm2015/angular/fetchers.js +9 -1
  84. package/esm2015/angular/lib/vendor/fetchers/fast-track-quote.fetcher.js +25 -0
  85. package/esm2015/angular/lib/vendor/fetchers/get-all-airlines.fetcher.js +25 -0
  86. package/esm2015/angular/lib/vendor/fetchers/get-cancellation-info.fetcher.js +25 -0
  87. package/esm2015/angular/lib/vendor/fetchers/get-car-hire-providers.fetcher.js +25 -0
  88. package/esm2015/angular/lib/vendor/fetchers/get-hotel-chains.fetcher.js +25 -0
  89. package/esm2015/angular/lib/vendor/fetchers/get-irl-supplier-station.fetcher.js +25 -0
  90. package/esm2015/angular/lib/vendor/fetchers/get-rail-providers.fetcher.js +25 -0
  91. package/esm2015/angular/lib/vendor/fetchers/send-offline-notification.fetcher.js +25 -0
  92. package/esm2015/angular/lib/vendor/services/enterprise-basket.service.js +8 -5
  93. package/esm2015/angular/lib/vendor/services/http-call.service.js +6 -2
  94. package/esm2015/angular/lib/vendor/services/search.service.js +58 -37
  95. package/esm2015/angular/lib/vendor/services/ticket-queue.service.js +23 -0
  96. package/esm2015/angular/lib/vendor/services/user.service.js +12 -6
  97. package/esm2015/angular/lib/vendor/types/graphql.angular.types.js +583 -5
  98. package/esm2015/angular/lib/vendor/updaters/edit-user.updater.js +22 -0
  99. package/esm2015/angular/lib/vendor/updaters/set-user-language-updater.js +22 -0
  100. package/esm2015/angular/obtservices.module.js +3 -1
  101. package/esm2015/angular/sabstravtech-obtservices-angular.js +17 -14
  102. package/esm2015/angular/services.js +2 -1
  103. package/esm2015/base/fetchers.js +11 -1
  104. package/esm2015/base/interfaces.js +3 -1
  105. package/esm2015/base/lib/vendor/classes/basket-info-mi-details.impl.js +4 -1
  106. package/esm2015/base/lib/vendor/classes/cabhire-enterprise-search.js +37 -5
  107. package/esm2015/base/lib/vendor/classes/carhire-enterprise-search.js +46 -16
  108. package/esm2015/base/lib/vendor/classes/eurostar-enterprise-search.js +77 -10
  109. package/esm2015/base/lib/vendor/classes/fast-track-enterprise-search.js +296 -0
  110. package/esm2015/base/lib/vendor/classes/flight-enterprise-search.js +44 -5
  111. package/esm2015/base/lib/vendor/classes/helpers.js +6 -2
  112. package/esm2015/base/lib/vendor/classes/hotel-enterprise-search.js +58 -19
  113. package/esm2015/base/lib/vendor/classes/irl-enterprise-search.js +214 -25
  114. package/esm2015/base/lib/vendor/classes/lounges-enterprise-search.js +22 -6
  115. package/esm2015/base/lib/vendor/classes/management-info-and-valid.js +1 -1
  116. package/esm2015/base/lib/vendor/classes/modal-types.enum.js +3 -1
  117. package/esm2015/base/lib/vendor/classes/parking-enterprise-search.js +27 -7
  118. package/esm2015/base/lib/vendor/classes/rail-enterprise-search.js +62 -13
  119. package/esm2015/base/lib/vendor/classes/supplementary-booking-info-impl.js +2 -2
  120. package/esm2015/base/lib/vendor/fetchers/fast-track-quote.fetcher.js +11 -0
  121. package/esm2015/base/lib/vendor/fetchers/get-all-airlines.fetcher.js +11 -0
  122. package/esm2015/base/lib/vendor/fetchers/get-cancellation-info.fetcher.js +10 -0
  123. package/esm2015/base/lib/vendor/fetchers/get-car-hire-providers.fetcher.js +11 -0
  124. package/esm2015/base/lib/vendor/fetchers/get-hotel-chains.fetcher.js +11 -0
  125. package/esm2015/base/lib/vendor/fetchers/get-irl-supplier-station.fetcher.js +11 -0
  126. package/esm2015/base/lib/vendor/fetchers/get-rail-providers.fetcher.js +11 -0
  127. package/esm2015/base/lib/vendor/fetchers/send-offline-notification.fetcher.js +11 -0
  128. package/esm2015/base/lib/vendor/fetchers/user-fetcher.js +1 -1
  129. package/esm2015/base/lib/vendor/interfaces/Icabhire-enterprise-search.js +1 -1
  130. package/esm2015/base/lib/vendor/interfaces/Icarhire-enterprise-search.js +1 -1
  131. package/esm2015/base/lib/vendor/interfaces/Ienterprise-basket.service.js +1 -1
  132. package/esm2015/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +1 -1
  133. package/esm2015/base/lib/vendor/interfaces/Ifast-track-enterprise-search.js +2 -0
  134. package/esm2015/base/lib/vendor/interfaces/Iflight-enterprise-search.js +1 -1
  135. package/esm2015/base/lib/vendor/interfaces/Ihotel-enterprise-search.js +1 -1
  136. package/esm2015/base/lib/vendor/interfaces/Iirl-enterprise-search.js +1 -1
  137. package/esm2015/base/lib/vendor/interfaces/Ilounges-enterprise-search.js +1 -1
  138. package/esm2015/base/lib/vendor/interfaces/Iparking-enterprise-search.js +1 -1
  139. package/esm2015/base/lib/vendor/interfaces/Irail-enterprise-search.js +1 -1
  140. package/esm2015/base/lib/vendor/interfaces/Isearch.service.js +1 -1
  141. package/esm2015/base/lib/vendor/interfaces/Iuser.service.js +1 -1
  142. package/esm2015/base/lib/vendor/interfaces/eurostar-search-arg.interface.js +1 -1
  143. package/esm2015/base/lib/vendor/interfaces/fast-track-filters.interface.js +2 -0
  144. package/esm2015/base/lib/vendor/interfaces/rail-basket-item.interface.js +1 -1
  145. package/esm2015/base/lib/vendor/interfaces/summary-interface.js +1 -1
  146. package/esm2015/base/lib/vendor/interfaces/user.data.js +1 -1
  147. package/esm2015/base/lib/vendor/models/traveller.object.js +3 -2
  148. package/esm2015/base/lib/vendor/services/enterprise-basket.service.js +63 -17
  149. package/esm2015/base/lib/vendor/services/hotel-avallibility.service.js +16 -12
  150. package/esm2015/base/lib/vendor/services/requires-reason.service.js +49 -0
  151. package/esm2015/base/lib/vendor/services/search.service.js +166 -20
  152. package/esm2015/base/lib/vendor/services/user.service.js +44 -6
  153. package/esm2015/base/lib/vendor/services/webtoken.service.js +9 -5
  154. package/esm2015/base/lib/vendor/types/graphql.types.js +9 -1
  155. package/esm2015/base/lib/vendor/types/types.js +1704 -1
  156. package/esm2015/base/lib/vendor/updaters/edit-user-updater.js +11 -0
  157. package/esm2015/base/lib/vendor/updaters/set-user-language-updater.js +11 -0
  158. package/esm2015/base/sabstravtech-obtservices-base.js +6 -5
  159. package/esm2015/base/services.js +2 -1
  160. package/esm2015/base/updaters.js +3 -1
  161. package/fesm2015/sabstravtech-obtservices-angular.js +790 -19
  162. package/fesm2015/sabstravtech-obtservices-angular.js.map +1 -1
  163. package/fesm2015/sabstravtech-obtservices-base.js +3041 -169
  164. package/fesm2015/sabstravtech-obtservices-base.js.map +1 -1
  165. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { BehaviorSubject, of, Subject, combineLatest, forkJoin } from 'rxjs';
1
+ import { BehaviorSubject, of, Subject, combineLatest, Subscription, forkJoin } from 'rxjs';
2
2
  import { take, map, catchError, debounceTime, distinctUntilChanged, switchMap, tap } from 'rxjs/operators';
3
3
  import _, { cloneDeep } from 'lodash';
4
4
  import { __awaiter, __decorate, __metadata, __rest } from 'tslib';
@@ -152,7 +152,9 @@ ModalTypes.AlternativeRailModalComponent = new ModalTypes('AlternativeRailModalC
152
152
  ModalTypes.WarningRemoveModalComponent = new ModalTypes('WarningRemoveModalComponent');
153
153
  ModalTypes.RailTicketsDialogComponent = new ModalTypes('RailTicketsDialogComponent');
154
154
  ModalTypes.ModalFlightFareComponent = new ModalTypes('ModalFlightFareComponent');
155
- ModalTypes.FlightExtrasDialogComponent = new ModalTypes('FlightExtrasDialogComponent');
155
+ ModalTypes.FlightExtrasDialogComponent = new ModalTypes('FlightExtrasDialogComponent');
156
+ ModalTypes.OfflineRequestDialogComponent = new ModalTypes('OfflineRequestDialogComponent');
157
+ ModalTypes.RequiresReasonDialogComponent = new ModalTypes('RequiresReasonDialogComponent');
156
158
 
157
159
  class BaseNetworkCall {
158
160
  constructor(modelService) {
@@ -193,6 +195,7 @@ var BasketItemStatus;
193
195
  (function (BasketItemStatus) {
194
196
  BasketItemStatus["Open"] = "OPEN";
195
197
  BasketItemStatus["Booked"] = "BOOKED";
198
+ BasketItemStatus["Cancelled"] = "CANCELLED";
196
199
  BasketItemStatus["BookingFailed"] = "BOOKING_FAILED";
197
200
  })(BasketItemStatus || (BasketItemStatus = {}));
198
201
  var BasketStatus;
@@ -598,6 +601,13 @@ var PreferenceKey;
598
601
  PreferenceKey["SeatPosition"] = "SEAT_POSITION";
599
602
  PreferenceKey["SeatDirection"] = "SEAT_DIRECTION";
600
603
  })(PreferenceKey || (PreferenceKey = {}));
604
+ var ProfileConfigOption;
605
+ (function (ProfileConfigOption) {
606
+ ProfileConfigOption["Inherited"] = "INHERITED";
607
+ ProfileConfigOption["Editable"] = "EDITABLE";
608
+ ProfileConfigOption["Visible"] = "VISIBLE";
609
+ ProfileConfigOption["Hidden"] = "HIDDEN";
610
+ })(ProfileConfigOption || (ProfileConfigOption = {}));
601
611
  var RailClass;
602
612
  (function (RailClass) {
603
613
  RailClass["All"] = "All";
@@ -915,6 +925,9 @@ class BasketInfoMiDetailsImpl {
915
925
  this.isValidObservers = [];
916
926
  this.basketItem = item;
917
927
  const { perItem, perUser } = item.managementInfo.reduce((miAccum, miItem) => {
928
+ if (miItem.reason && !item.requiresReason) {
929
+ return miAccum;
930
+ }
918
931
  const miItemObj = makeManagamentInfo(miItem, this.basketService);
919
932
  this.isValidObservers.push(miItemObj);
920
933
  if (miItem.perBooking) {
@@ -996,12 +1009,18 @@ var SchemaFormat;
996
1009
  SchemaFormat["integer"] = "integer";
997
1010
  SchemaFormat["object"] = "object";
998
1011
  SchemaFormat["select"] = "select";
1012
+ SchemaFormat["selectQueue"] = "select-queue";
999
1013
  SchemaFormat["string"] = "string";
1000
1014
  SchemaFormat["boolean"] = "boolean";
1001
1015
  SchemaFormat["countryCode"] = "countryCode";
1002
1016
  SchemaFormat["additionalSeatPreference"] = "t_additionalSeatPreference";
1003
1017
  SchemaFormat["seatPrefGroups"] = "a_seatPrefGroups";
1004
1018
  SchemaFormat["railSeating"] = "railSeating";
1019
+ SchemaFormat["passport"] = "passport";
1020
+ SchemaFormat["specialRequests"] = "specialRequests";
1021
+ SchemaFormat["apis"] = "apis";
1022
+ SchemaFormat["mandatoryIfEticket"] = "mandatory-if-eticket";
1023
+ SchemaFormat["mandatoryIfTod"] = "mandatory-if-tod";
1005
1024
  })(SchemaFormat || (SchemaFormat = {}));
1006
1025
  var Widgets;
1007
1026
  (function (Widgets) {
@@ -1134,7 +1153,1703 @@ var WellbeingEnum;
1134
1153
  (function (WellbeingEnum) {
1135
1154
  WellbeingEnum["WELLBEING"] = "/results/wellbeing";
1136
1155
  })(WellbeingEnum || (WellbeingEnum = {}));
1137
- const maxTravellerWellbeing = 4;
1156
+ const maxTravellerWellbeing = 4;
1157
+ const PersonTitles = [
1158
+ { title: 'Dr', gender: null },
1159
+ { title: 'Prof', gender: null },
1160
+ { title: 'Mr', gender: 'Male' },
1161
+ { title: 'Mrs', gender: 'Female' },
1162
+ { title: 'Ms', gender: 'Female' },
1163
+ { title: 'Miss', gender: 'Female' }
1164
+ ];
1165
+ const PREFERENCE_VALUES = [
1166
+ { label: 'Bland', type: PreferenceKey.MealRequest },
1167
+ { label: 'Child', type: PreferenceKey.MealRequest },
1168
+ { label: 'Diabetic', type: PreferenceKey.MealRequest },
1169
+ { label: 'Fruit Plate', type: PreferenceKey.MealRequest },
1170
+ { label: 'Gluten Free', type: PreferenceKey.MealRequest },
1171
+ { label: 'Hindu', type: PreferenceKey.MealRequest },
1172
+ { label: 'Kosher', type: PreferenceKey.MealRequest },
1173
+ { label: 'Low Fat/Cholesterol', type: PreferenceKey.MealRequest },
1174
+ { label: 'Low Sodium', type: PreferenceKey.MealRequest },
1175
+ { label: 'Muslim', type: PreferenceKey.MealRequest },
1176
+ { label: 'Non-Lactose', type: PreferenceKey.MealRequest },
1177
+ { label: 'Raw Vegeterian', type: PreferenceKey.MealRequest },
1178
+ { label: 'Seafood', type: PreferenceKey.MealRequest },
1179
+ { label: 'Vegan Vegeterian', type: PreferenceKey.MealRequest },
1180
+ { label: 'Vegeterain Lacto-Ovo', type: PreferenceKey.MealRequest },
1181
+ { label: 'Aisle', type: PreferenceKey.SeatingPreference },
1182
+ { label: 'Window', type: PreferenceKey.SeatingPreference },
1183
+ { label: 'Bassinet', type: PreferenceKey.SpeacialNeed },
1184
+ { label: 'Bicycle', type: PreferenceKey.SpeacialNeed },
1185
+ { label: 'Blind passenger', type: PreferenceKey.SpeacialNeed },
1186
+ { label: 'Deaf passenger', type: PreferenceKey.SpeacialNeed },
1187
+ { label: 'Meet and assist', type: PreferenceKey.SpeacialNeed },
1188
+ { label: 'Wheelchair, can ascend steps', type: PreferenceKey.SpeacialNeed },
1189
+ { label: 'Wheelchair, can walk to seat', type: PreferenceKey.SpeacialNeed },
1190
+ { label: 'Wheelchair, manual', type: PreferenceKey.SpeacialNeed },
1191
+ { label: 'Wheelchair, must be carried', type: PreferenceKey.SpeacialNeed },
1192
+ { label: 'Wheelchair, with dry battery', type: PreferenceKey.SpeacialNeed },
1193
+ { label: 'Wheelchair, with wet battery', type: PreferenceKey.SpeacialNeed },
1194
+ { label: 'Quiet', type: PreferenceKey.SeatLocation },
1195
+ { label: 'Business', type: PreferenceKey.SeatLocation },
1196
+ { label: 'Family', type: PreferenceKey.SeatLocation },
1197
+ { label: 'Aisle', type: PreferenceKey.SeatPosition },
1198
+ { label: 'Middle', type: PreferenceKey.SeatPosition },
1199
+ { label: 'Window', type: PreferenceKey.SeatPosition },
1200
+ { label: 'Individual', type: PreferenceKey.SeatPosition },
1201
+ { label: 'Front Facing', type: PreferenceKey.SeatDirection },
1202
+ { label: 'Back Facing', type: PreferenceKey.SeatDirection },
1203
+ { label: 'Airline Seat', type: PreferenceKey.SeatDirection }
1204
+ ];
1205
+ const DocTypes = [
1206
+ { label: 'Passport', type: DocType.Passport },
1207
+ { label: 'Visa', type: DocType.Visa },
1208
+ { label: 'IdCard', type: DocType.IdCard }
1209
+ ];
1210
+ const Genders = [
1211
+ { label: 'F', type: DocGender.F },
1212
+ { label: 'M', type: DocGender.M }
1213
+ ];
1214
+ const DistanceType = [
1215
+ { label: 'K', type: DistanceTypes.K },
1216
+ { label: 'M', type: DistanceTypes.M }
1217
+ ];
1218
+ const RailCompanies = [
1219
+ { label: 'Avanti West Coast', value: 'Avanti West Coast' },
1220
+ { label: 'East Coast', value: 'East Coast' },
1221
+ { label: 'IRL-Eurostar', value: 'IRL-Eurostar' },
1222
+ { label: 'IRL-Renfe Card', value: 'IRL-Renfe Card' },
1223
+ {
1224
+ label: 'IRL-SNCF - Carta Grand Voyageur',
1225
+ value: 'IRL-SNCF - Carta Grand Voyageur'
1226
+ },
1227
+ { label: 'IRL-Thalys', value: 'IRL-Thalys' }
1228
+ ];
1229
+ const CarCompanies = [
1230
+ { label: 'Advantage Rent A Car', value: 'Advantage Rent A Car' },
1231
+ { label: 'Alamo', value: 'Alamo' },
1232
+ { label: 'Avis', value: 'Avis' },
1233
+ { label: 'Budget Rent A Car', value: 'Budget Rent A Car' },
1234
+ { label: 'Dollar Rent A Car', value: 'Dollar Rent A Car' },
1235
+ { label: 'Enterprise', value: 'Enterprise' },
1236
+ { label: 'Euromobil', value: 'Euromobil' },
1237
+ { label: 'Europcar', value: 'Europcar' },
1238
+ { label: 'Fox Rent A Car', value: 'Fox Rent A Car' },
1239
+ { label: 'Hertz', value: 'Hertz' },
1240
+ { label: 'National Car Rental System', value: 'National Car Rental System' },
1241
+ { label: 'Payless Car Rental', value: 'Payless Car Rental' },
1242
+ { label: 'Sixt', value: 'Sixt' },
1243
+ { label: 'Southwest Car Rental', value: 'Southwest Car Rental' },
1244
+ { label: 'Thrifty Car Rental', value: 'Thrifty Car Rental' }
1245
+ ];
1246
+ const HotelChains = [
1247
+ { label: 'Abba Hotels', value: 'Abba Hotels' },
1248
+ { label: 'Abode Hotels', value: 'Abode Hotels' },
1249
+ { label: 'AC Hotels', value: 'AC Hotels' },
1250
+ { label: 'Accor Group', value: 'Accor Group' },
1251
+ { label: 'Accor', value: 'Accor' },
1252
+ { label: "Adam's Mark", value: "Adam's Mark" },
1253
+ { label: 'Affinia Hotels', value: 'Affinia Hotels' },
1254
+ { label: 'Alias Hotels', value: 'Alias Hotels' },
1255
+ { label: 'Amber Hotels Germany', value: 'Amber Hotels Germany' },
1256
+ { label: 'Americas Best Value Inns', value: 'Americas Best Value Inns' },
1257
+ { label: 'Americinn', value: 'Americinn' },
1258
+ { label: 'Amerihost Inn', value: 'Amerihost Inn' },
1259
+ { label: 'Amerisuites', value: 'Amerisuites' },
1260
+ { label: 'Ana Hotels', value: 'Ana Hotels' },
1261
+ { label: 'Antoinette Hotels', value: 'Antoinette Hotels' },
1262
+ { label: 'Apex Hotels', value: 'Apex Hotels' },
1263
+ { label: 'Arora International', value: 'Arora International' },
1264
+ { label: 'Ascott Group', value: 'Ascott Group' },
1265
+ { label: 'Atel Htl Network', value: 'Atel Htl Network' },
1266
+ {
1267
+ label: 'Austria Trend Hotel & Resorts',
1268
+ value: 'Austria Trend Hotel & Resorts'
1269
+ },
1270
+ { label: 'Barcelo Hotels', value: 'Barcelo Hotels' },
1271
+ { label: 'Bastion Hotels', value: 'Bastion Hotels' },
1272
+ { label: 'Baymont', value: 'Baymont' },
1273
+ { label: 'Beales Hotels', value: 'Beales Hotels' },
1274
+ { label: 'Best Eastern', value: 'Best Eastern' },
1275
+ { label: 'Best Inns', value: 'Best Inns' },
1276
+ { label: 'Best Western Hotels', value: 'Best Western Hotels' },
1277
+ { label: 'Bewleys', value: 'Bewleys' },
1278
+ { label: 'Bilderberg Group', value: 'Bilderberg Group' },
1279
+ { label: 'Blue Tree Hotels', value: 'Blue Tree Hotels' },
1280
+ { label: 'Boscolo Hotels', value: 'Boscolo Hotels' },
1281
+ { label: 'Brend Hotel Group', value: 'Brend Hotel Group' },
1282
+ { label: 'Bridgestreet', value: 'Bridgestreet' },
1283
+ { label: 'Britannia', value: 'Britannia' },
1284
+ { label: 'Caesar Park Hotels', value: 'Caesar Park Hotels' },
1285
+ { label: 'Cairn Hotels', value: 'Cairn Hotels' },
1286
+ { label: 'Camino Real', value: 'Camino Real' },
1287
+ { label: 'Campanile', value: 'Campanile' },
1288
+ { label: 'Candlewood Suites', value: 'Candlewood Suites' },
1289
+ { label: 'Carlton Hotel Collection', value: 'Carlton Hotel Collection' },
1290
+ { label: 'Castle Hotel Group', value: 'Castle Hotel Group' },
1291
+ { label: 'Cedar Court Hotels', value: 'Cedar Court Hotels' },
1292
+ { label: 'Cendant', value: 'Cendant' },
1293
+ { label: 'Choice Hotels', value: 'Choice Hotels' },
1294
+ { label: 'Citadine Hotels', value: 'Citadine Hotels' },
1295
+ { label: 'Clarion Hotels', value: 'Clarion Hotels' },
1296
+ { label: 'Clifton Hotels', value: 'Clifton Hotels' },
1297
+ { label: 'Club Quarters Hotels', value: 'Club Quarters Hotels' },
1298
+ { label: 'Coast Hotels & Resorts', value: 'Coast Hotels & Resorts' },
1299
+ { label: 'Comfort', value: 'Comfort' },
1300
+ { label: 'Concorde Hotels', value: 'Concorde Hotels' },
1301
+ { label: 'Conrad Hotels', value: 'Conrad Hotels' },
1302
+ { label: 'Contemporary Hotels', value: 'Contemporary Hotels' },
1303
+ {
1304
+ label: 'Copthorne & Millennium Hotels',
1305
+ value: 'Copthorne & Millennium Hotels'
1306
+ },
1307
+ { label: 'Corus', value: 'Corus' },
1308
+ {
1309
+ label: 'Country Inn & Suites Hotels',
1310
+ value: 'Country Inn & Suites Hotels'
1311
+ },
1312
+ { label: 'Courtyard By Marriott', value: 'Courtyard By Marriott' },
1313
+ { label: 'Crerar Hotels', value: 'Crerar Hotels' },
1314
+ { label: 'Crowne Plaza', value: 'Crowne Plaza' },
1315
+ { label: 'Cumulus Hotels', value: 'Cumulus Hotels' },
1316
+ { label: 'Dakota Hotel Group', value: 'Dakota Hotel Group' },
1317
+ { label: 'Dan Hotels Corporation', value: 'Dan Hotels Corporation' },
1318
+ { label: 'Days Inn', value: 'Days Inn' },
1319
+ { label: 'De Vere Hotels', value: 'De Vere Hotels' },
1320
+ { label: 'Delta Hotels', value: 'Delta Hotels' },
1321
+ { label: 'Derag Hotels', value: 'Derag Hotels' },
1322
+ { label: 'Design Hotels', value: 'Design Hotels' },
1323
+ { label: 'Destination Hotels', value: 'Destination Hotels' },
1324
+ { label: 'Dhillon Hotels', value: 'Dhillon Hotels' },
1325
+ { label: 'Disney World Hotels', value: 'Disney World Hotels' },
1326
+ { label: 'Distinct Hotels', value: 'Distinct Hotels' },
1327
+ { label: 'Distinguished Hotels', value: 'Distinguished Hotels' },
1328
+ { label: 'Dolce Hotels', value: 'Dolce Hotels' },
1329
+ { label: 'Dorint Hotels', value: 'Dorint Hotels' },
1330
+ { label: 'Doubletree Hotels', value: 'Doubletree Hotels' },
1331
+ { label: 'Doyle Collection', value: 'Doyle Collection' },
1332
+ { label: 'Drury Inn & Suites', value: 'Drury Inn & Suites' },
1333
+ { label: 'Econo Lodge', value: 'Econo Lodge' },
1334
+ { label: 'Elizabeth Hotels', value: 'Elizabeth Hotels' },
1335
+ { label: 'Embassy Suites', value: 'Embassy Suites' },
1336
+ { label: 'English Lakes Hotels', value: 'English Lakes Hotels' },
1337
+ { label: 'English Rose Hotels', value: 'English Rose Hotels' },
1338
+ { label: 'Etap', value: 'Etap' },
1339
+ { label: 'Eton Town House Group', value: 'Eton Town House Group' },
1340
+ { label: 'Exclusive Hotels', value: 'Exclusive Hotels' },
1341
+ {
1342
+ label: 'Executive Hotels And Resorts',
1343
+ value: 'Executive Hotels And Resorts'
1344
+ },
1345
+ { label: 'Extended Stayamerica', value: 'Extended Stayamerica' },
1346
+ { label: 'Fairfield Inn', value: 'Fairfield Inn' },
1347
+ { label: 'Fairmont Hotels', value: 'Fairmont Hotels' },
1348
+ { label: 'Fiesta Americana', value: 'Fiesta Americana' },
1349
+ { label: 'Fine Individual Hotels', value: 'Fine Individual Hotels' },
1350
+ { label: 'Firmdale Hotels', value: 'Firmdale Hotels' },
1351
+ { label: 'First Hotels', value: 'First Hotels' },
1352
+ { label: 'FJB Hotels', value: 'FJB Hotels' },
1353
+ { label: 'Focus Hotels', value: 'Focus Hotels' },
1354
+ { label: 'Folio Hotels', value: 'Folio Hotels' },
1355
+ { label: 'Forestdale Hotels', value: 'Forestdale Hotels' },
1356
+ { label: 'Formule 1', value: 'Formule 1' },
1357
+ { label: 'Four Pillars', value: 'Four Pillars' },
1358
+ { label: 'Four Seasons', value: 'Four Seasons' },
1359
+ { label: 'Fullers Hotels & Inns', value: 'Fullers Hotels & Inns' },
1360
+ { label: 'Gaylord Entertainment', value: 'Gaylord Entertainment' },
1361
+ { label: 'Genares Resrv SVC', value: 'Genares Resrv SVC' },
1362
+ { label: 'Golden Tulip', value: 'Golden Tulip' },
1363
+ { label: 'Grand Hospitality', value: 'Grand Hospitality' },
1364
+ { label: 'Grange Hotels', value: 'Grange Hotels' },
1365
+ { label: 'Great Southern Hotel Group', value: 'Great Southern Hotel Group' },
1366
+ { label: 'Greene King Pub Company', value: 'Greene King Pub Company' },
1367
+ { label: 'Gresham Hotel Group', value: 'Gresham Hotel Group' },
1368
+ { label: 'Guesthouse International', value: 'Guesthouse International' },
1369
+ { label: 'Guoman Hotel', value: 'Guoman Hotel' },
1370
+ { label: 'Hampton Inn', value: 'Hampton Inn' },
1371
+ { label: 'Hand Picked Hotels', value: 'Hand Picked Hotels' },
1372
+ {
1373
+ label: 'Hanover International Hotels',
1374
+ value: 'Hanover International Hotels'
1375
+ },
1376
+ { label: 'Harrahs Casinos', value: 'Harrahs Casinos' },
1377
+ { label: 'Hastings Hotels', value: 'Hastings Hotels' },
1378
+ { label: 'Hawthorn Suites', value: 'Hawthorn Suites' },
1379
+ {
1380
+ label: 'Heritage Serviced Apartments',
1381
+ value: 'Heritage Serviced Apartments'
1382
+ },
1383
+ { label: 'Hesperia Hotels', value: 'Hesperia Hotels' },
1384
+ { label: 'Hilton Garden Inn', value: 'Hilton Garden Inn' },
1385
+ { label: 'Hilton Hotels', value: 'Hilton Hotels' },
1386
+ { label: 'Historic House Hotels', value: 'Historic House Hotels' },
1387
+ { label: 'Holiday Inn Express', value: 'Holiday Inn Express' },
1388
+ { label: 'Holiday Inn Garden Court', value: 'Holiday Inn Garden Court' },
1389
+ { label: 'Holiday Inns', value: 'Holiday Inns' },
1390
+ { label: 'Homestead', value: 'Homestead' },
1391
+ { label: 'Homewood Suites By Hilton', value: 'Homewood Suites By Hilton' },
1392
+ { label: 'Hotel Indigo', value: 'Hotel Indigo' },
1393
+ { label: 'Hotel Sierra', value: 'Hotel Sierra' },
1394
+ { label: 'Hotusa', value: 'Hotusa' },
1395
+ { label: 'Howard Johnson', value: 'Howard Johnson' },
1396
+ { label: 'Hyatt', value: 'Hyatt' },
1397
+ { label: 'Ibis', value: 'Ibis' },
1398
+ { label: 'Indigo Hotels', value: 'Indigo Hotels' },
1399
+ { label: 'Innkeepers Lodge', value: 'Innkeepers Lodge' },
1400
+ { label: 'Inter Hotel', value: 'Inter Hotel' },
1401
+ { label: 'Intercontinental', value: 'Intercontinental' },
1402
+ { label: 'Interstate Htls/rsrts', value: 'Interstate Htls/rsrts' },
1403
+ { label: 'Jameson Inn', value: 'Jameson Inn' },
1404
+ { label: 'Joie De Vivre Hospitality', value: 'Joie De Vivre Hospitality' },
1405
+ { label: 'Jolly Hotels', value: 'Jolly Hotels' },
1406
+ { label: 'Jumeirah Hotels', value: 'Jumeirah Hotels' },
1407
+ { label: 'Jurys Hotel Group', value: 'Jurys Hotel Group' },
1408
+ { label: 'Kempinski Hotels', value: 'Kempinski Hotels' },
1409
+ { label: 'Keytel International', value: 'Keytel International' },
1410
+ { label: 'Kimpton Group', value: 'Kimpton Group' },
1411
+ { label: 'Knights Inn', value: 'Knights Inn' },
1412
+ { label: 'KSL Resorts', value: 'KSL Resorts' },
1413
+ { label: 'Kyriad Hotels', value: 'Kyriad Hotels' },
1414
+ { label: 'La Quinta Inns', value: 'La Quinta Inns' },
1415
+ { label: 'Lakeside Hotels', value: 'Lakeside Hotels' },
1416
+ { label: 'Lakeside International', value: 'Lakeside International' },
1417
+ { label: 'Le Meridien Hotels', value: 'Le Meridien Hotels' },
1418
+ {
1419
+ label: 'Leading Hotels Of The World',
1420
+ value: 'Leading Hotels Of The World'
1421
+ },
1422
+ { label: 'Legacy Hotels', value: 'Legacy Hotels' },
1423
+ { label: 'Lindner Hotels', value: 'Lindner Hotels' },
1424
+ { label: 'Loews', value: 'Loews' },
1425
+ { label: 'Luxe Worldwide Hotels', value: 'Luxe Worldwide Hotels' },
1426
+ { label: 'Lynch Group ', value: 'Lynch Group ' },
1427
+ { label: 'Macdonald Hotels', value: 'Macdonald Hotels' },
1428
+ { label: 'Magnolia Hotels', value: 'Magnolia Hotels' },
1429
+ { label: 'Mainstay Suites', value: 'Mainstay Suites' },
1430
+ { label: 'Maldron', value: 'Maldron' },
1431
+ { label: 'Malmaison', value: 'Malmaison' },
1432
+ { label: 'Mandarin Oriental', value: 'Mandarin Oriental' },
1433
+ { label: 'Mantra Group', value: 'Mantra Group' },
1434
+ { label: 'Marco Polo Hotels', value: 'Marco Polo Hotels' },
1435
+ { label: 'Maritim Hotels', value: 'Maritim Hotels' },
1436
+ { label: 'Maritime Inns and Resorts', value: 'Maritime Inns and Resorts' },
1437
+ { label: 'Marriott Hotels', value: 'Marriott Hotels' },
1438
+ { label: 'Menzies', value: 'Menzies' },
1439
+ { label: 'Mercure', value: 'Mercure' },
1440
+ { label: 'Mg Hotels', value: 'Mg Hotels' },
1441
+ { label: 'Mgm/mirage', value: 'Mgm/mirage' },
1442
+ { label: 'Microtel Inn & Suites', value: 'Microtel Inn & Suites' },
1443
+ { label: 'Minotel', value: 'Minotel' },
1444
+ { label: 'Mint Hotels', value: 'Mint Hotels' },
1445
+ { label: 'Moevenpick Hotels', value: 'Moevenpick Hotels' },
1446
+ { label: 'Montcalm Hotel Group', value: 'Montcalm Hotel Group' },
1447
+ { label: 'Moran Group', value: 'Moran Group' },
1448
+ { label: 'Morgans Hotel Group', value: 'Morgans Hotel Group' },
1449
+ { label: 'Motel 6', value: 'Motel 6' },
1450
+ { label: 'Myfidelio', value: 'Myfidelio' },
1451
+ { label: 'Myhotel', value: 'Myhotel' },
1452
+ { label: 'New Otani Hotels', value: 'New Otani Hotels' },
1453
+ { label: 'NH Hotels', value: 'NH Hotels' },
1454
+ { label: 'Nikko Hotels', value: 'Nikko Hotels' },
1455
+ { label: 'Nobles House Hotel', value: 'Nobles House Hotel' },
1456
+ { label: 'Non Branded Hotel', value: 'Non Branded Hotel' },
1457
+ { label: 'Novotel', value: 'Novotel' },
1458
+ { label: 'Oberoi Group Of Hotels', value: 'Oberoi Group Of Hotels' },
1459
+ { label: "O'Callaghan Hotels", value: "O'Callaghan Hotels" },
1460
+ { label: 'Occidental Hotels', value: 'Occidental Hotels' },
1461
+ { label: 'Omni Hotels', value: 'Omni Hotels' },
1462
+ { label: 'Orbis Hotels', value: 'Orbis Hotels' },
1463
+ { label: 'Orient Express Hotels', value: 'Orient Express Hotels' },
1464
+ { label: 'Outrigger Hotels', value: 'Outrigger Hotels' },
1465
+ {
1466
+ label: 'Oxford Hotel & Inns Managment Ltd',
1467
+ value: 'Oxford Hotel & Inns Managment Ltd'
1468
+ },
1469
+ { label: 'Pan Pacific Hotels', value: 'Pan Pacific Hotels' },
1470
+ { label: 'Park Inn International', value: 'Park Inn International' },
1471
+ { label: 'Park Plaza Hotels', value: 'Park Plaza Hotels' },
1472
+ { label: 'Park Plaza International', value: 'Park Plaza International' },
1473
+ { label: 'Parkhotel', value: 'Parkhotel' },
1474
+ { label: 'Peabody Hotels', value: 'Peabody Hotels' },
1475
+ { label: 'Pedersen Group', value: 'Pedersen Group' },
1476
+ { label: 'Peel Hotels', value: 'Peel Hotels' },
1477
+ { label: 'Peninsula Hotels', value: 'Peninsula Hotels' },
1478
+ {
1479
+ label: 'Preferred Hotels & Resorts Worldwide',
1480
+ value: 'Preferred Hotels & Resorts Worldwide'
1481
+ },
1482
+ { label: 'Prem Group', value: 'Prem Group' },
1483
+ { label: 'Premier Inn', value: 'Premier Inn' },
1484
+ { label: 'Prima Hotels', value: 'Prima Hotels' },
1485
+ { label: 'Prince Resorts', value: 'Prince Resorts' },
1486
+ {
1487
+ label: 'Principal Hayley Hotels & Conference Venues',
1488
+ value: 'Principal Hayley Hotels & Conference Venues'
1489
+ },
1490
+ { label: 'Protea Hotels', value: 'Protea Hotels' },
1491
+ { label: 'Pullman', value: 'Pullman' },
1492
+ { label: 'Punch Retail', value: 'Punch Retail' },
1493
+ { label: 'Purple Hotels', value: 'Purple Hotels' },
1494
+ { label: 'Q Hotels', value: 'Q Hotels' },
1495
+ { label: 'Quality Inns & Suites', value: 'Quality Inns & Suites' },
1496
+ { label: 'Radisson Blu Hotels', value: 'Radisson Blu Hotels' },
1497
+ { label: 'Radisson Edwardian Hotels', value: 'Radisson Edwardian Hotels' },
1498
+ { label: 'Radisson', value: 'Radisson' },
1499
+ { label: 'Raffles International', value: 'Raffles International' },
1500
+ { label: 'Ramada', value: 'Ramada' },
1501
+ { label: 'Reconline', value: 'Reconline' },
1502
+ { label: 'Red Carnation Hotels', value: 'Red Carnation Hotels' },
1503
+ { label: 'Red Roof Inns', value: 'Red Roof Inns' },
1504
+ { label: 'Regent International', value: 'Regent International' },
1505
+ { label: 'Relais & Chateaux', value: 'Relais & Chateaux' },
1506
+ { label: 'Relaxinnz', value: 'Relaxinnz' },
1507
+ { label: 'Rema Hotels', value: 'Rema Hotels' },
1508
+ { label: 'Renaissance Hotels', value: 'Renaissance Hotels' },
1509
+ { label: 'Reservhotel Intl', value: 'Reservhotel Intl' },
1510
+ { label: 'Residence Inns', value: 'Residence Inns' },
1511
+ { label: 'ResortQuest', value: 'ResortQuest' },
1512
+ { label: 'Rihga Royal Hotels', value: 'Rihga Royal Hotels' },
1513
+ { label: 'Ringhotels', value: 'Ringhotels' },
1514
+ { label: 'Ritz Carlton', value: 'Ritz Carlton' },
1515
+ { label: 'Roadchef', value: 'Roadchef' },
1516
+ { label: 'Rocco Forte Hotels', value: 'Rocco Forte Hotels' },
1517
+ { label: 'Rock Resorts', value: 'Rock Resorts' },
1518
+ { label: 'Rodeway Inns', value: 'Rodeway Inns' },
1519
+ { label: 'Rosewood Hotels', value: 'Rosewood Hotels' },
1520
+ { label: 'Rotana', value: 'Rotana' },
1521
+ { label: 'Rydges Hotel Group', value: 'Rydges Hotel Group' },
1522
+ { label: 'Saco Serviced Apartments', value: 'Saco Serviced Apartments' },
1523
+ { label: 'Sandman Hotels', value: 'Sandman Hotels' },
1524
+ { label: 'Sarova', value: 'Sarova' },
1525
+ { label: 'Savoy Group', value: 'Savoy Group' },
1526
+ { label: 'Scandic', value: 'Scandic' },
1527
+ { label: 'Select Hotels', value: 'Select Hotels' },
1528
+ {
1529
+ label: 'Self Catering Accommodation',
1530
+ value: 'Self Catering Accommodation'
1531
+ },
1532
+ { label: 'Sercotel', value: 'Sercotel' },
1533
+ { label: 'Seymour Hotels', value: 'Seymour Hotels' },
1534
+ {
1535
+ label: 'Shangri-La Hotels & Resorts',
1536
+ value: 'Shangri-La Hotels & Resorts'
1537
+ },
1538
+ { label: 'Sheraton Hotels', value: 'Sheraton Hotels' },
1539
+ { label: 'Shilo Inns', value: 'Shilo Inns' },
1540
+ { label: 'Shire Hotels Limited', value: 'Shire Hotels Limited' },
1541
+ { label: 'Sierra Suites', value: 'Sierra Suites' },
1542
+ { label: 'Sleep Inns', value: 'Sleep Inns' },
1543
+ { label: 'Sleepy Dragon Hotels', value: 'Sleepy Dragon Hotels' },
1544
+ {
1545
+ label: 'Small Luxury Hotels Of World',
1546
+ value: 'Small Luxury Hotels Of World'
1547
+ },
1548
+ { label: 'Sofitel', value: 'Sofitel' },
1549
+ { label: 'Sol / Melia Hotels', value: 'Sol / Melia Hotels' },
1550
+ { label: 'Sonesta Hotels', value: 'Sonesta Hotels' },
1551
+ { label: 'Sorat Hotels', value: 'Sorat Hotels' },
1552
+ { label: 'Southern Sun Hotels', value: 'Southern Sun Hotels' },
1553
+ { label: 'Spirit Hotels', value: 'Spirit Hotels' },
1554
+ { label: 'Springhill Suites', value: 'Springhill Suites' },
1555
+ { label: 'Starhotels', value: 'Starhotels' },
1556
+ { label: 'Staybridge Suites', value: 'Staybridge Suites' },
1557
+ { label: 'Stop Inn', value: 'Stop Inn' },
1558
+ { label: 'Studio 6', value: 'Studio 6' },
1559
+ { label: 'Suitehotel', value: 'Suitehotel' },
1560
+ { label: 'Summerfield Suites', value: 'Summerfield Suites' },
1561
+ { label: 'Summit Hotels', value: 'Summit Hotels' },
1562
+ { label: 'Super 8', value: 'Super 8' },
1563
+ { label: 'Supranational Hotels', value: 'Supranational Hotels' },
1564
+ { label: 'Surejogi Group', value: 'Surejogi Group' },
1565
+ { label: 'Swallow Hotels', value: 'Swallow Hotels' },
1566
+ { label: 'Swissotel', value: 'Swissotel' },
1567
+ { label: 'Synxis Corp', value: 'Synxis Corp' },
1568
+ { label: 'Taj Hotels & Resorts', value: 'Taj Hotels & Resorts' },
1569
+ { label: 'Thelsa Group', value: 'Thelsa Group' },
1570
+ { label: 'Thistle Hotels', value: 'Thistle Hotels' },
1571
+ { label: 'Tomahawk Hotels', value: 'Tomahawk Hotels' },
1572
+ { label: 'Top International Hotels', value: 'Top International Hotels' },
1573
+ { label: 'Tower Hotels Group', value: 'Tower Hotels Group' },
1574
+ { label: 'Towneplace Suites', value: 'Towneplace Suites' },
1575
+ { label: 'Travelclick', value: 'Travelclick' },
1576
+ { label: 'Travelodge International', value: 'Travelodge International' },
1577
+ { label: 'Travelodge UK & Ireland', value: 'Travelodge UK & Ireland' },
1578
+ { label: 'Trident Hotels', value: 'Trident Hotels' },
1579
+ { label: 'Una Hotels', value: 'Una Hotels' },
1580
+ { label: 'Unirez', value: 'Unirez' },
1581
+ { label: 'Universal Orlando', value: 'Universal Orlando' },
1582
+ { label: 'Utell', value: 'Utell' },
1583
+ { label: 'Vagabond Inns', value: 'Vagabond Inns' },
1584
+ { label: 'Van Der Valk Hotels', value: 'Van Der Valk Hotels' },
1585
+ { label: 'Village Hotels', value: 'Village Hotels' },
1586
+ { label: 'Von Essen Hotels', value: 'Von Essen Hotels' },
1587
+ { label: 'W Hotels', value: 'W Hotels' },
1588
+ { label: 'Warwick Hotels', value: 'Warwick Hotels' },
1589
+ { label: 'Westin Hotels', value: 'Westin Hotels' },
1590
+ { label: 'Westmark Hotels', value: 'Westmark Hotels' },
1591
+ { label: 'Wingate Hotels', value: 'Wingate Hotels' },
1592
+ { label: 'Woodfin Suites', value: 'Woodfin Suites' },
1593
+ { label: 'Worldhotels', value: 'Worldhotels' },
1594
+ { label: 'Worldres', value: 'Worldres' },
1595
+ { label: 'Wyndham', value: 'Wyndham' },
1596
+ { label: "Youngs & Co's Brewery", value: "Youngs & Co's Brewery" }
1597
+ ];
1598
+ const Airlines = [
1599
+ { label: '12 North', value: '12' },
1600
+ { label: '1time Airline', value: '1T' },
1601
+ { label: '3 Valleys Airlines', value: '3V' },
1602
+ { label: '40-mile Air', value: 'Q5' },
1603
+ { label: '88', value: '47' },
1604
+ { label: 'Aban Air', value: 'K5' },
1605
+ { label: 'Abelag Aviation', value: 'W9' },
1606
+ { label: 'Absa - Aerolinhas Brasileiras', value: 'M3' },
1607
+ { label: 'Abu Dhabi Amiri Flight', value: 'MO' },
1608
+ { label: 'Abx Air', value: 'GB' },
1609
+ { label: 'Access Air', value: 'ZA' },
1610
+ { label: 'Ada Air', value: 'ZY' },
1611
+ { label: 'Adam Air', value: 'KI' },
1612
+ { label: 'Adc Airlines', value: 'Z7' },
1613
+ { label: 'Adria Airways', value: 'JP' },
1614
+ { label: 'Aegean Airlines', value: 'A3' },
1615
+ { label: 'Aer Arann', value: 'RE' },
1616
+ { label: 'Aer Lingus', value: 'EI' },
1617
+ { label: 'Aereonautica Militare', value: 'JY' },
1618
+ { label: 'Aero Airlines', value: 'EE' },
1619
+ { label: 'Aero Asia International', value: 'E4' },
1620
+ { label: 'Aero Benin', value: 'EM' },
1621
+ { label: 'Aero Brazil', value: 'BZ' },
1622
+ { label: 'Aero California', value: 'JR' },
1623
+ { label: 'Aero Condor Peru', value: 'Q6' },
1624
+ { label: 'Aero Contractors', value: 'AJ' },
1625
+ { label: 'Aero Flight', value: 'GV' },
1626
+ { label: 'Aero Lanka', value: 'QL' },
1627
+ { label: 'Aero Lloyd (yp)', value: 'YP' },
1628
+ { label: 'Aero Mongolia', value: 'M0' },
1629
+ { label: 'Aero Services Executive', value: 'W4' },
1630
+ { label: 'Aero Vip', value: '2D' },
1631
+ { label: 'Aero-charter Ukraine', value: 'DW' },
1632
+ { label: 'Aero-service', value: 'BF' },
1633
+ { label: 'Aero-tropics Air Services', value: 'HC' },
1634
+ { label: 'Aerocondor', value: '2B' },
1635
+ { label: 'Aeroflot Russian Airlines', value: 'SU' },
1636
+ { label: 'Aeroflot-don', value: 'D9' },
1637
+ { label: 'Aerolane', value: 'XL' },
1638
+ { label: 'Aeroline Gmbh', value: '7E' },
1639
+ { label: 'Aerolineas Argentinas', value: 'AR' },
1640
+ { label: 'Aerolineas Galapagos (aerogal)', value: '2K' },
1641
+ { label: 'Aerolitoral', value: '5D' },
1642
+ { label: 'Aeromar', value: 'BQ' },
1643
+ { label: 'Aeromar', value: 'VW' },
1644
+ { label: 'Aeromexpress', value: 'QO' },
1645
+ { label: 'Aeromist-kharkiv', value: 'HT' },
1646
+ { label: 'Aerom�xico', value: 'AM' },
1647
+ { label: 'Aeropelican Air Services', value: 'OT' },
1648
+ { label: 'Aeroper', value: 'PL' },
1649
+ { label: 'Aerorep', value: 'P5' },
1650
+ { label: 'Aerosur', value: '5L' },
1651
+ { label: 'Aerosvit Airlines', value: 'VV' },
1652
+ { label: 'Aeroworld', value: 'W4' },
1653
+ { label: 'Africa West', value: 'FK' },
1654
+ { label: 'African Safari Airways', value: 'QS' },
1655
+ { label: 'Afrinat International Airlines', value: 'Q9' },
1656
+ { label: 'Afriqiyah Airways', value: '8U' },
1657
+ { label: 'Aguilar Connect', value: '3X' },
1658
+ { label: 'Aigle Azur', value: 'ZI' },
1659
+ { label: 'Air Afrique', value: 'RK' },
1660
+ { label: 'Air Algerie', value: 'AH' },
1661
+ { label: 'Air Alpha Greenland', value: 'GD' },
1662
+ { label: 'Air Alps Aviation', value: 'A6' },
1663
+ { label: 'Air Andaman (2y)', value: '2Y' },
1664
+ { label: 'Air Arabia Egypt', value: 'E5' },
1665
+ { label: 'Air Arabia', value: 'G9' },
1666
+ { label: 'Air Armenia', value: 'QN' },
1667
+ { label: 'Air Astana', value: 'KC' },
1668
+ { label: 'Air Atlanta Icelandic', value: 'CC' },
1669
+ { label: 'Air Atlantique', value: 'KI' },
1670
+ { label: 'Air Austral', value: 'UU' },
1671
+ { label: 'Air Bagan', value: 'W9' },
1672
+ { label: 'Air Baltic', value: 'BT' },
1673
+ { label: 'Air Bangladesh', value: 'B9' },
1674
+ { label: 'Air Berlin', value: 'AB' },
1675
+ { label: 'Air Bosna', value: 'JA' },
1676
+ { label: 'Air Botswana', value: 'BP' },
1677
+ { label: 'Air Bourbon', value: 'ZB' },
1678
+ { label: 'Air Burkina', value: '2J' },
1679
+ { label: 'Air Burundi', value: '8Y' },
1680
+ { label: 'Air Busan', value: 'BX' },
1681
+ { label: 'Air Cal', value: 'TY' },
1682
+ { label: 'Air Caledonie International', value: 'SB' },
1683
+ { label: 'Air Canada Jazz', value: 'QK' },
1684
+ { label: 'Air Canada', value: 'AC' },
1685
+ { label: 'Air Cara�bes', value: 'TX' },
1686
+ { label: 'Air Cargo Carriers', value: '2Q' },
1687
+ { label: 'Air Central', value: 'NV' },
1688
+ { label: 'Air Chathams', value: 'CV' },
1689
+ { label: 'Air China', value: 'CA' },
1690
+ { label: 'Air City', value: '4F' },
1691
+ { label: 'Air Class Lineas Aereas', value: 'QD' },
1692
+ { label: 'Air Comores International', value: 'GG' },
1693
+ { label: 'Air Contractors', value: 'AG' },
1694
+ { label: 'Air Corridor', value: 'QC' },
1695
+ { label: 'Air Dayiti', value: 'H9' },
1696
+ { label: 'Air Dolomiti', value: 'EN' },
1697
+ { label: 'Air Europa', value: 'UX' },
1698
+ { label: 'Air Europe', value: 'PE' },
1699
+ { label: 'Air Exel', value: 'XT' },
1700
+ { label: 'Air Fiji', value: 'PC' },
1701
+ { label: 'Air Finland', value: 'OF' },
1702
+ { label: 'Air Florida', value: 'QH' },
1703
+ { label: 'Air Foyle', value: 'GS' },
1704
+ { label: 'Air France', value: 'AF' },
1705
+ { label: 'Air Gabon', value: 'GN' },
1706
+ { label: 'Air Georgia', value: 'DA' },
1707
+ { label: 'Air Georgian', value: 'ZX' },
1708
+ { label: 'Air Glaciers', value: '7T' },
1709
+ { label: 'Air Greenland', value: 'GL' },
1710
+ { label: 'Air Guinee Express', value: '2U' },
1711
+ { label: 'Air Guyane', value: 'GG' },
1712
+ { label: 'Air Hamburg (aho)', value: 'HH' },
1713
+ { label: 'Air Hong Kong', value: 'LD' },
1714
+ { label: 'Air Horizon', value: '8C' },
1715
+ { label: 'Air Iceland', value: 'NY' },
1716
+ { label: 'Air India Express', value: 'IX' },
1717
+ { label: 'Air India Limited', value: 'AI' },
1718
+ { label: 'Air Indus', value: 'PP' },
1719
+ { label: 'Air Italy', value: 'I9' },
1720
+ { label: 'Air Ivoire', value: 'VU' },
1721
+ { label: 'Air Jamaica', value: 'JM' },
1722
+ { label: 'Air Japan', value: 'NQ' },
1723
+ { label: 'Air Kazakhstan', value: '9Y' },
1724
+ { label: 'Air Kiribati', value: '4A' },
1725
+ { label: 'Air Koryo', value: 'JS' },
1726
+ { label: 'Air Lithuania', value: 'TT' },
1727
+ { label: 'Air Lituanica', value: 'LT' },
1728
+ { label: 'Air Luxor Gb', value: 'L8' },
1729
+ { label: 'Air Luxor', value: 'LK' },
1730
+ { label: 'Air Macau', value: 'NX' },
1731
+ { label: 'Air Madagascar', value: 'MD' },
1732
+ { label: 'Air Madrid', value: 'NM' },
1733
+ { label: 'Air Malawi', value: 'QM' },
1734
+ { label: 'Air Malta', value: 'KM' },
1735
+ { label: 'Air Marshall Islands', value: 'CW' },
1736
+ { label: 'Air Mauritanie', value: 'MR' },
1737
+ { label: 'Air Mauritius', value: 'MK' },
1738
+ { label: 'Air Mediterranee', value: 'DR' },
1739
+ { label: 'Air Mekong', value: 'P8' },
1740
+ { label: 'Air Midwest', value: 'ZV' },
1741
+ { label: 'Air Mobility Command', value: 'MC' },
1742
+ { label: 'Air Moldova', value: '9U' },
1743
+ { label: 'Air Namibia', value: 'SW' },
1744
+ { label: 'Air New Zealand', value: 'NZ' },
1745
+ { label: 'Air Nippon Network Co. Ltd.', value: 'EH' },
1746
+ { label: 'Air Nippon', value: 'EL' },
1747
+ { label: 'Air Niugini', value: 'PX' },
1748
+ { label: 'Air North Charter - Canada', value: '4N' },
1749
+ { label: 'Air Nostrum', value: 'YW' },
1750
+ { label: 'Air One', value: 'AP' },
1751
+ { label: 'Air Pacific', value: 'FJ' },
1752
+ { label: 'Air Paradise International', value: 'AD' },
1753
+ { label: 'Air Pegasus', value: 'OP' },
1754
+ { label: 'Air Philippines', value: '2P' },
1755
+ { label: 'Air Plus Comet', value: 'A7' },
1756
+ { label: 'Air Rarotonga', value: 'GZ' },
1757
+ { label: 'Air S', value: 'KY' },
1758
+ { label: 'Air Sahara', value: 'S2' },
1759
+ { label: 'Air Saint Pierre', value: 'PJ' },
1760
+ { label: 'Air Salone', value: '20' },
1761
+ { label: 'Air Santo Domingo', value: 'EX' },
1762
+ { label: 'Air Senegal International', value: 'V7' },
1763
+ { label: 'Air Serbia', value: 'JU' },
1764
+ { label: 'Air Service Gabon', value: 'G8' },
1765
+ { label: 'Air Service', value: 'M3' },
1766
+ { label: 'Air Seychelles', value: 'HM' },
1767
+ { label: 'Air Sinai', value: '4D' },
1768
+ { label: 'Air Slovakia', value: 'GM' },
1769
+ { label: 'Air Srpska', value: 'RB' },
1770
+ { label: 'Air Tahiti Nui', value: 'TN' },
1771
+ { label: 'Air Tahiti', value: 'VT' },
1772
+ { label: 'Air Tanzania', value: 'TC' },
1773
+ { label: 'Air Togo', value: 'YT' },
1774
+ { label: 'Air Transat', value: 'TS' },
1775
+ { label: 'Air Transport International', value: '8C' },
1776
+ { label: 'Air Turks And Caicos', value: 'JY' },
1777
+ { label: 'Air Ukraine', value: '6U' },
1778
+ { label: 'Air Urga', value: '3N' },
1779
+ { label: 'Air Vanuatu', value: 'NF' },
1780
+ { label: 'Air Vegas', value: '6V' },
1781
+ { label: 'Air Via', value: 'VL' },
1782
+ { label: 'Air Vistara', value: 'UK' },
1783
+ { label: 'Air Wales', value: '6G' },
1784
+ { label: 'Air Wisconsin', value: 'ZW' },
1785
+ { label: 'Air Zimbabwe', value: 'UM' },
1786
+ { label: 'Airasia X', value: 'D7' },
1787
+ { label: 'Airasia', value: 'AK' },
1788
+ { label: 'Airblue', value: 'ED' },
1789
+ { label: 'Airborne Express', value: 'GB' },
1790
+ { label: 'Airbridge Cargo', value: 'RU' },
1791
+ { label: 'Airbus France', value: '4Y' },
1792
+ { label: 'Airbus Industrie', value: 'AP' },
1793
+ { label: 'Aircompany Yakutia', value: 'R3' },
1794
+ { label: 'Aires', value: '4C' },
1795
+ { label: 'Airlinair', value: 'A5' },
1796
+ { label: 'Airlines Of Tasmania', value: 'FO' },
1797
+ { label: 'Airlines Png', value: 'CG' },
1798
+ { label: 'Airlink Zambia', value: 'K8' },
1799
+ { label: 'Airnorth', value: 'TL' },
1800
+ { label: 'Airone Atlantic', value: '00' },
1801
+ { label: 'Airone Continental', value: '00' },
1802
+ { label: 'Airone Polska', value: 'U1' },
1803
+ { label: 'Airrussia', value: 'R8' },
1804
+ { label: 'Airstars', value: 'PL' },
1805
+ { label: 'Airtran Airways', value: 'FL' },
1806
+ { label: 'Alaska Airlines', value: 'AS' },
1807
+ { label: 'Alaska Central Express', value: 'KO' },
1808
+ { label: 'Albanian Airlines', value: 'LV' },
1809
+ { label: 'Albarka Air', value: 'F4' },
1810
+ { label: 'Alidaunia', value: 'D4' },
1811
+ { label: 'Alitalia Express', value: 'XM' },
1812
+ { label: 'Alitalia', value: 'AZ' },
1813
+ { label: 'All Africa', value: '9A' },
1814
+ { label: 'All America Ar', value: '2R' },
1815
+ { label: 'All America Bopy', value: '0P' },
1816
+ { label: 'All America Br', value: '1Y' },
1817
+ { label: 'All America Cl', value: '1R' },
1818
+ { label: 'All America Co', value: '0Y' },
1819
+ { label: 'All America Mx', value: '0M' },
1820
+ { label: 'All America Us', value: 'AG' },
1821
+ { label: 'All America', value: 'A2' },
1822
+ { label: 'All Argentina Express', value: 'Z0' },
1823
+ { label: 'All Argentina', value: 'L1' },
1824
+ { label: 'All Asia', value: 'L9' },
1825
+ { label: 'All Australia', value: '88' },
1826
+ { label: 'All Colombia', value: '7O' },
1827
+ { label: 'All Europe', value: 'N9' },
1828
+ { label: 'All Nippon Airways', value: 'NH' },
1829
+ { label: 'All Spain', value: 'N7' },
1830
+ { label: 'Allegiant Air', value: 'G4' },
1831
+ { label: 'Allegro', value: 'LL' },
1832
+ { label: 'Alliance Air', value: 'CD' },
1833
+ { label: 'Alliance Airlines', value: 'QQ' },
1834
+ { label: 'Almasria Universal Airlines', value: 'UJ' },
1835
+ { label: 'Aloha Airlines', value: 'AQ' },
1836
+ { label: 'Alpi Eagles', value: 'E8' },
1837
+ { label: 'Alpine Air Express', value: '5A' },
1838
+ { label: 'Alrosa Mirny Air Enterprise', value: '6R' },
1839
+ { label: 'Amadeus Global Travel Distribution', value: '1A' },
1840
+ { label: 'Amaszonas', value: 'Z8' },
1841
+ { label: 'Amber Air', value: '0A' },
1842
+ { label: 'America West Airlines', value: 'HP' },
1843
+ { label: 'American Airlines', value: 'AA' },
1844
+ { label: 'American Eagle Airlines', value: 'MQ' },
1845
+ { label: 'American Falcon', value: 'WK' },
1846
+ { label: 'Amerijet International', value: 'M6' },
1847
+ { label: 'Amsterdam Airlines', value: 'WD' },
1848
+ { label: 'Ansett Australia', value: 'AN' },
1849
+ { label: 'Antinea Airlines', value: 'HO' },
1850
+ { label: 'Antrak Air', value: '04' },
1851
+ { label: 'Aom French Airlines', value: 'IW' },
1852
+ { label: 'Apache Air', value: 'ZM' },
1853
+ { label: 'Arctic Circle Air Service', value: '5F' },
1854
+ { label: 'Arcus-air Logistic', value: 'ZE' },
1855
+ { label: 'Ariana Afghan Airlines', value: 'FG' },
1856
+ { label: 'Arik Air', value: 'W3' },
1857
+ { label: 'Arik Niger', value: 'Q9' },
1858
+ { label: 'Arkefly', value: 'OR' },
1859
+ { label: 'Arkia Israel Airlines', value: 'IZ' },
1860
+ { label: 'Armavia', value: 'U8' },
1861
+ { label: 'Armenian International Airways', value: 'MV' },
1862
+ { label: 'Arrow Air', value: 'JW' },
1863
+ { label: 'Aserca Airlines', value: 'R7' },
1864
+ { label: 'Asia Overnight Express', value: 'OE' },
1865
+ { label: 'Asia Wings', value: 'Y5' },
1866
+ { label: 'Asian Express Airlines', value: 'HJ' },
1867
+ { label: 'Asian Spirit', value: '6K' },
1868
+ { label: 'Asian Wings Airways', value: 'AW' },
1869
+ { label: 'Asiana Airlines', value: 'OZ' },
1870
+ { label: 'Askari Aviation', value: '4K' },
1871
+ { label: 'Astar Air Cargo', value: 'ER' },
1872
+ { label: 'Astraeus', value: '5W' },
1873
+ { label: 'Astrakhan Airlines', value: 'OB' },
1874
+ { label: 'Astral Aviation', value: '8V' },
1875
+ { label: 'Atifly', value: 'A1' },
1876
+ { label: 'Atlant-soyuz Airlines', value: '3G' },
1877
+ { label: 'Atlantic Airways', value: 'RC' },
1878
+ { label: 'Atlantic Southeast Airlines', value: 'EV' },
1879
+ { label: 'Atlantis European Airways', value: 'TD' },
1880
+ { label: 'Atlas Air', value: '5Y' },
1881
+ { label: 'Atlas Blue', value: '8A' },
1882
+ { label: 'Atlasjet', value: 'KK' },
1883
+ { label: 'Atran Cargo Airlines', value: 'V8' },
1884
+ { label: 'Atyrau Air Ways', value: 'IP' },
1885
+ { label: 'Augsburg Airways', value: 'IQ' },
1886
+ { label: 'Aurigny Air Services', value: 'GR' },
1887
+ { label: 'Aus-air', value: 'NO' },
1888
+ { label: 'Austral Lineas Aereas', value: 'AU' },
1889
+ { label: 'Australian Airlines', value: 'AO' },
1890
+ { label: 'Austrian Airlines', value: 'OS' },
1891
+ { label: 'Avcom', value: 'J6' },
1892
+ { label: 'Avensa', value: 'VE' },
1893
+ { label: 'Aviabus', value: 'U1' },
1894
+ { label: 'Aviaexpress', value: 'RX' },
1895
+ { label: 'Avialeasing Aviation Company', value: 'EC' },
1896
+ { label: 'Avianca - Aerovias Nacionales De Colombia', value: 'AV' },
1897
+ { label: 'Avient Aviation', value: 'Z3' },
1898
+ { label: 'Avies', value: 'U3' },
1899
+ { label: 'Avirex', value: 'G2' },
1900
+ { label: 'Avolar Aerolineas', value: 'V5' },
1901
+ { label: 'Aws Express', value: 'B0' },
1902
+ { label: 'Axis Airways', value: '6V' },
1903
+ { label: 'Azerbaijan Airlines', value: 'J2' },
1904
+ { label: 'Azul', value: 'AD' },
1905
+ { label: 'B&h Airlines', value: 'JA' },
1906
+ { label: 'BMI', value: 'BD' },
1907
+ { label: 'Ba Cityflyer', value: 'CJ' },
1908
+ { label: 'Bach Flugbetriebsges', value: 'B4' },
1909
+ { label: 'Bahamasair', value: 'UP' },
1910
+ { label: 'Baikotovitchestrian Airlines', value: 'BU' },
1911
+ { label: 'Baker Aviation', value: '8Q' },
1912
+ { label: 'Bal Bashkirian Airlines', value: 'V9' },
1913
+ { label: 'Baltic Air Lines', value: 'B1' },
1914
+ { label: 'Bangkok Airways', value: 'PG' },
1915
+ { label: 'Bankair', value: 'B4' },
1916
+ { label: 'Barents Airlink', value: '8N' },
1917
+ { label: 'Bassaka Airlines', value: '5B' },
1918
+ { label: 'Bayu Indonesia Air', value: 'BM' },
1919
+ { label: 'Bearskin Lake Air Service', value: 'JV' },
1920
+ { label: 'Belair Airlines', value: '4T' },
1921
+ { label: 'Belavia Belarusian Airlines', value: 'B2' },
1922
+ { label: 'Bellview Airlines', value: 'B3' },
1923
+ { label: 'Bemidji Airlines', value: 'CH' },
1924
+ { label: 'Benin Golf Air', value: 'A8' },
1925
+ { label: 'Bering Air', value: '8E' },
1926
+ { label: 'Berjaya Air', value: 'J8' },
1927
+ { label: 'Big Sky Airlines', value: 'GQ' },
1928
+ { label: 'Biman Bangladesh Airlines', value: 'BG' },
1929
+ { label: 'Binter Canarias', value: 'NT' },
1930
+ { label: 'Bismillah Airlines', value: '5Z' },
1931
+ { label: 'Black Stallion Airways', value: 'BZ' },
1932
+ { label: 'Blue Air', value: '0B' },
1933
+ { label: 'Blue Dart Aviation', value: 'BZ' },
1934
+ { label: 'Blue Panorama Airlines', value: 'BV' },
1935
+ { label: 'Blue Sky America', value: 'BU' },
1936
+ { label: 'Blue Wings', value: 'QW' },
1937
+ { label: 'Blue1', value: 'KF' },
1938
+ { label: 'Bluebird Cargo', value: 'BF' },
1939
+ { label: 'Bmibaby', value: 'WW' },
1940
+ { label: 'Boston-maine Airways', value: 'E9' },
1941
+ { label: 'Bouraq Indonesia Airlines', value: 'BO' },
1942
+ { label: 'Boutique Air (priv)', value: '4B' },
1943
+ { label: 'Bra-transportes Aereos', value: '7R' },
1944
+ { label: 'Braathens', value: 'BU' },
1945
+ { label: 'Braniff International Airways', value: 'BN' },
1946
+ { label: 'Bravo Air Congo', value: 'K6' },
1947
+ { label: 'Brazil Air', value: 'GB' },
1948
+ { label: 'Brit Air', value: 'DB' },
1949
+ { label: 'British Airways', value: 'BA' },
1950
+ { label: 'British International Helicopters', value: 'BS' },
1951
+ { label: 'British Mediterranean Airways', value: 'KJ' },
1952
+ { label: 'Brussels Airlines', value: 'SN' },
1953
+ { label: 'Budgetair', value: '1K' },
1954
+ { label: 'Buffalo Airways', value: 'J4' },
1955
+ { label: 'Bulgaria Air', value: 'FB' },
1956
+ { label: 'Buquebus L�neas A�reas', value: 'BQ' },
1957
+ { label: 'Businessair', value: '8B' },
1958
+ { label: 'Buzz', value: 'UK' },
1959
+ { label: 'Cal Cargo Air Lines', value: '5C' },
1960
+ { label: 'California Western', value: 'KT' },
1961
+ { label: 'Calima Aviacion', value: 'XG' },
1962
+ { label: 'Calm Air', value: 'MO' },
1963
+ { label: 'Camai Air', value: 'R9' },
1964
+ { label: 'Cameroon Airlines', value: 'UY' },
1965
+ { label: 'Canadian Airlines', value: 'CP' },
1966
+ { label: 'Canadian National Airways', value: 'CN' },
1967
+ { label: 'Canadian North', value: '5T' },
1968
+ { label: 'Canadian Western Airlines', value: 'W2' },
1969
+ { label: 'Canadian World', value: '10' },
1970
+ { label: 'Canjet', value: 'C6' },
1971
+ { label: 'Canxplorer', value: 'C2' },
1972
+ { label: 'Canxpress', value: 'C1' },
1973
+ { label: 'Cape Air', value: '9K' },
1974
+ { label: 'Capital Cargo International Airlines', value: 'PT' },
1975
+ { label: 'Cargo 360', value: 'GG' },
1976
+ { label: 'Cargo Plus Aviation', value: '8L' },
1977
+ { label: 'Cargoitalia', value: '2G' },
1978
+ { label: 'Cargojet Airways', value: 'W8' },
1979
+ { label: 'Cargolux', value: 'CV' },
1980
+ { label: 'Caribbean Airlines', value: 'BW' },
1981
+ { label: 'Caribbean Star Airlines', value: '8B' },
1982
+ { label: 'Caribbean Wings', value: 'XP' },
1983
+ { label: 'Carpatair', value: 'V3' },
1984
+ { label: 'Caspian Airlines', value: 'RV' },
1985
+ { label: 'Cathay Pacific', value: 'CX' },
1986
+ { label: 'Cayman Airways', value: 'KX' },
1987
+ { label: 'Cb Airways Uk ( Interliging Flights )', value: '1F' },
1988
+ { label: 'Ccml Airlines', value: 'CB' },
1989
+ { label: 'Cebu Pacific', value: '5J' },
1990
+ { label: 'Centavia', value: '7N' },
1991
+ { label: 'Centralwings', value: 'C0' },
1992
+ { label: 'Centre-avia', value: 'J7' },
1993
+ { label: 'Centurion Air Cargo', value: 'WE' },
1994
+ { label: 'Chalks Ocean Airways', value: 'OP' },
1995
+ { label: 'Champion Air', value: 'MG' },
1996
+ { label: 'Changan Airlines', value: '2Z' },
1997
+ { label: 'Chari Aviation Services', value: 'S8' },
1998
+ { label: 'Chautauqua Airlines', value: 'RP' },
1999
+ { label: 'Chc Airways', value: 'AW' },
2000
+ { label: 'Cheapflyinginternational', value: 'WL' },
2001
+ { label: 'Chicago Express', value: 'C8' },
2002
+ { label: 'China Airlines', value: 'CI' },
2003
+ { label: 'China Cargo Airlines', value: 'CK' },
2004
+ { label: 'China Eastern Airlines', value: 'MU' },
2005
+ { label: 'China Northern Airlines', value: 'CJ' },
2006
+ { label: 'China Northwest Airlines', value: 'WH' },
2007
+ { label: 'China Postal Airlines', value: '8Y' },
2008
+ { label: 'China Southern Airlines', value: 'CZ' },
2009
+ { label: 'China United Airlines', value: 'HR' },
2010
+ { label: 'China Xinhua Airlines', value: 'XO' },
2011
+ { label: 'Chitaavia', value: 'X7' },
2012
+ { label: 'Chongqing Airlines', value: 'OQ' },
2013
+ { label: 'Ciel Canadien', value: 'YC' },
2014
+ { label: 'Cielos Airlines', value: 'A2' },
2015
+ { label: 'Cimber Air', value: 'QI' },
2016
+ { label: 'Cirrus Airlines', value: 'C9' },
2017
+ { label: 'City Airline', value: 'CF' },
2018
+ { label: 'City Airways', value: 'E8' },
2019
+ { label: 'City Connexion Airlines', value: 'G3' },
2020
+ { label: 'Cityjet', value: 'WX' },
2021
+ { label: 'Civil Air Transport', value: 'CT' },
2022
+ { label: 'Club Air', value: '6P' },
2023
+ { label: 'Coast Air', value: 'BX' },
2024
+ { label: 'Colgan Air', value: '9L' },
2025
+ { label: 'Comair', value: 'MN' },
2026
+ { label: 'Comair', value: 'OH' },
2027
+ { label: 'Commutair', value: 'C5' },
2028
+ { label: 'Comores Airlines', value: 'KR' },
2029
+ { label: 'Compania Mexicargo', value: 'GJ' },
2030
+ { label: 'Compass Airlines', value: 'CP' },
2031
+ { label: 'Condor Flugdienst', value: 'DE' },
2032
+ { label: 'Consorcio Aviaxsa', value: '6A' },
2033
+ { label: 'Contact Air', value: 'C3' },
2034
+ { label: 'Continental Airlines', value: 'CO' },
2035
+ { label: 'Continental Airways', value: 'PC' },
2036
+ { label: 'Continental Micronesia', value: 'CS' },
2037
+ { label: 'Conviasa', value: 'V0' },
2038
+ { label: 'Copa Airlines', value: 'CM' },
2039
+ { label: 'Copenhagen Express', value: '0X' },
2040
+ { label: 'Corsairfly', value: 'SS' },
2041
+ { label: 'Corse-mediterranee', value: 'XK' },
2042
+ { label: 'Cosmic Air', value: 'F5' },
2043
+ { label: 'Croatia Airlines', value: 'OU' },
2044
+ { label: 'Crossair Europe', value: 'QE' },
2045
+ { label: 'Cubana De Aviaci�n', value: 'CU' },
2046
+ { label: 'Cyprus Airways', value: 'CY' },
2047
+ { label: 'Czech Airlines', value: 'OK' },
2048
+ { label: 'DBA', value: 'DI' },
2049
+ { label: 'Daallo Airlines', value: 'D3' },
2050
+ { label: 'Dagestan Airlines', value: 'N2' },
2051
+ { label: 'Dalavia', value: 'H8' },
2052
+ { label: 'Darwin Airline', value: '0D' },
2053
+ { label: 'Das Air Cargo', value: 'WD' },
2054
+ { label: 'Dat Danish Air Transport', value: 'DX' },
2055
+ { label: 'Dauair', value: 'D5' },
2056
+ { label: 'Delta Air Lines', value: 'DL' },
2057
+ { label: 'Dennis Sky', value: 'DH' },
2058
+ { label: 'Dense Airways', value: 'KP' },
2059
+ { label: 'Dense Connection', value: 'KZ' },
2060
+ { label: 'Deutsche Luftverkehrsgesellschaft (dlt)', value: 'DW' },
2061
+ { label: 'Deutsche Luftverkehrsgesellschaft', value: 'DW' },
2062
+ { label: 'Deutsche Rettungsflugwacht', value: '1I' },
2063
+ { label: 'Dhl De Guatemala', value: 'L3' },
2064
+ { label: 'Dhl International', value: 'ES' },
2065
+ { label: 'Dinar', value: 'D7' },
2066
+ { label: 'Dirgantara Air Service', value: 'AW' },
2067
+ { label: 'Discovery Airways', value: 'DH' },
2068
+ { label: 'Djibouti Airlines', value: 'D8' },
2069
+ { label: 'Dobrolet', value: 'QD' },
2070
+ { label: 'Domenican Airlines', value: 'D1' },
2071
+ { label: 'Dominicana De Aviaci', value: 'DO' },
2072
+ { label: 'Domodedovo Airlines', value: 'E3' },
2073
+ { label: 'Donbassaero', value: '5D' },
2074
+ { label: 'Dragonair', value: 'KA' },
2075
+ { label: 'Druk Air', value: 'KB' },
2076
+ { label: 'East African Safari Air', value: 'S9' },
2077
+ { label: 'East African', value: 'QU' },
2078
+ { label: 'Eastar Jet', value: 'ZE' },
2079
+ { label: 'Eastern Airways', value: 'T3' },
2080
+ { label: 'Eastern Atlantic Virtual Airlines', value: '13' },
2081
+ { label: 'Eastland Air', value: 'DK' },
2082
+ { label: 'Eastwind Airlines', value: 'W9' },
2083
+ { label: 'Easyjet', value: 'U2' },
2084
+ { label: 'Edelweiss Air', value: 'WK' },
2085
+ { label: 'Egyptair', value: 'MS' },
2086
+ { label: 'El Al Israel Airlines', value: 'LY' },
2087
+ { label: 'El-buraq Air Transport', value: 'UZ' },
2088
+ { label: 'Elk Airways', value: '--' },
2089
+ { label: 'Elysian Airlines', value: 'E4' },
2090
+ { label: 'Emirates', value: 'EK' },
2091
+ { label: 'Empire Airlines', value: 'EM' },
2092
+ { label: 'Empresa Ecuatoriana De Aviacion', value: 'EU' },
2093
+ { label: 'Enkor Jsc', value: 'G8' },
2094
+ { label: 'Eos Airlines', value: 'E0' },
2095
+ { label: 'Epic Holiday', value: 'FA' },
2096
+ { label: 'Era Alaska', value: '7H' },
2097
+ { label: 'Eritrean Airlines', value: 'B8' },
2098
+ { label: 'Estafeta Carga Aerea', value: 'E7' },
2099
+ { label: 'Estonian Air', value: 'OV' },
2100
+ { label: 'Ethiopian Airlines', value: 'ET' },
2101
+ { label: 'Etihad Airways', value: 'EY' },
2102
+ { label: 'Eujet', value: 'VE' },
2103
+ { label: 'Euro Harmony', value: 'EH' },
2104
+ { label: 'Eurocypria Airlines', value: 'UI' },
2105
+ { label: 'Eurofly Service', value: 'GJ' },
2106
+ { label: 'Euroline', value: '4L' },
2107
+ { label: 'Eurolot', value: 'K2' },
2108
+ { label: 'Euromanx Airways', value: '3W' },
2109
+ { label: 'Europe Jet', value: 'EX' },
2110
+ { label: 'European Air Express', value: 'EA' },
2111
+ { label: 'European Air Transport', value: 'QY' },
2112
+ { label: 'European Aviation Air Charter', value: 'E7' },
2113
+ { label: 'Europesky', value: 'ES' },
2114
+ { label: 'Eurowings', value: 'EW' },
2115
+ { label: 'Eva Air', value: 'BR' },
2116
+ { label: 'Evergreen International Airlines', value: 'EZ' },
2117
+ { label: 'Excel Airways', value: 'JN' },
2118
+ { label: 'Execair Aviation', value: 'MB' },
2119
+ { label: 'Executive Airlines', value: 'OW' },
2120
+ { label: 'Expo Aviation', value: '8D' },
2121
+ { label: 'Express One International', value: 'EO' },
2122
+ { label: 'Expressjet', value: 'XE' },
2123
+ { label: 'Far Eastern Air Transport', value: 'EF' },
2124
+ { label: 'Faroejet', value: 'F6' },
2125
+ { label: 'Faso Airways', value: 'F3' },
2126
+ { label: 'Federal Express', value: 'FX' },
2127
+ { label: 'Felix Airways', value: 'FU' },
2128
+ { label: 'Fika Salaama Airlines', value: 'N8' },
2129
+ { label: 'Finalair Congo', value: '4S' },
2130
+ { label: 'Finnair', value: 'AY' },
2131
+ { label: 'Finncomm Airlines', value: 'FC' },
2132
+ { label: 'Firefly', value: 'FY' },
2133
+ { label: 'First Air', value: '7F' },
2134
+ { label: 'First Choice Airways', value: 'DP' },
2135
+ { label: 'Fischer Air', value: '8F' },
2136
+ { label: 'Flightline', value: 'B5' },
2137
+ { label: 'Florida Coastal Airlines', value: 'PA' },
2138
+ { label: 'Florida West International Airways', value: 'RF' },
2139
+ { label: 'Fly Air', value: 'F2' },
2140
+ { label: 'Fly Brasil', value: 'F1' },
2141
+ { label: 'Fly Colombia ( Interliging Flights )', value: '3F' },
2142
+ { label: 'Fly Dubai', value: 'FZ' },
2143
+ { label: 'Fly Europa', value: 'ER' },
2144
+ { label: 'Fly France', value: 'FF' },
2145
+ { label: 'Fly Illi', value: 'IL' },
2146
+ { label: 'Fly Me Sweden', value: 'SH' },
2147
+ { label: 'Fly One', value: 'F5' },
2148
+ { label: 'Fly Romania', value: 'X5' },
2149
+ { label: 'Fly540', value: '5H' },
2150
+ { label: 'Flybaboo', value: 'F7' },
2151
+ { label: 'Flybe', value: 'BE' },
2152
+ { label: 'Flyglobespan', value: 'B4' },
2153
+ { label: 'Flyhigh Airlines Ireland (fh)', value: 'FH' },
2154
+ { label: 'Flylal', value: 'TE' },
2155
+ { label: 'Flynordic', value: 'LF' },
2156
+ { label: 'Flyportugal', value: 'PO' },
2157
+ { label: 'Formosa Airlines', value: 'VY' },
2158
+ { label: 'Four Star Aviation / Four Star Cargo', value: 'HK' },
2159
+ { label: 'Fox Linhas Aereas', value: 'FX' },
2160
+ { label: 'Fra Air', value: 'X9' },
2161
+ { label: 'Freedom Air', value: 'FP' },
2162
+ { label: 'Frontier Airlines', value: 'F9' },
2163
+ { label: 'Frontier Flying Service', value: '2F' },
2164
+ { label: 'Futura International Airways', value: 'FH' },
2165
+ { label: 'Gabon Airlines', value: 'GY' },
2166
+ { label: 'Gadair European Airlines', value: 'GP' },
2167
+ { label: 'Galaxy Air', value: '7O' },
2168
+ { label: 'Gambia International Airlines', value: 'GC' },
2169
+ { label: 'Gandalf Airlines', value: 'G7' },
2170
+ { label: 'Garuda Indonesia', value: 'GA' },
2171
+ { label: 'Gazpromavia', value: '4G' },
2172
+ { label: 'Gb Airways', value: 'GT' },
2173
+ { label: 'Gemini Air Cargo', value: 'GR' },
2174
+ { label: 'Georgian Airways', value: 'A9' },
2175
+ { label: 'Georgian National Airlines', value: 'QB' },
2176
+ { label: 'German International Air Lines', value: 'GM' },
2177
+ { label: 'Germania', value: 'ST' },
2178
+ { label: 'Germanwings', value: '4U' },
2179
+ { label: 'Germanxl', value: 'GX' },
2180
+ { label: 'Gestair', value: 'GP' },
2181
+ { label: 'Ghana International Airlines', value: 'G0' },
2182
+ { label: 'Global Airlines', value: '0G' },
2183
+ { label: 'Global Freightways', value: 'F5' },
2184
+ { label: 'Globus', value: 'GH' },
2185
+ { label: 'Go Air', value: 'G8' },
2186
+ { label: 'Godutch', value: 'GD' },
2187
+ { label: 'Gojet Airlines', value: 'G7' },
2188
+ { label: 'Gol Transportes A�reos', value: 'G3' },
2189
+ { label: 'Golden Air', value: 'DC' },
2190
+ { label: 'Gorkha Airlines', value: 'G1' },
2191
+ { label: 'Grant Aviation', value: 'GS' },
2192
+ { label: 'Great Lakes Airlines', value: 'ZK' },
2193
+ { label: 'Great Wall Airlines', value: 'IJ' },
2194
+ { label: 'Greenfly', value: 'XX' },
2195
+ { label: 'Grupo Taca', value: 'TA' },
2196
+ { label: 'Guine Bissaur Airlines', value: 'G6' },
2197
+ { label: 'Guinee Airlines', value: 'J9' },
2198
+ { label: 'Gujarat Airways', value: 'G8' },
2199
+ { label: 'Gulf Air Bahrain', value: 'GF' },
2200
+ { label: 'Gulisano Airways', value: 'GU' },
2201
+ { label: 'Hageland Aviation Services', value: 'H6' },
2202
+ { label: 'Hahn Air', value: 'HR' },
2203
+ { label: 'Hainan Airlines', value: 'HU' },
2204
+ { label: 'Haiti Ambassador Airlines', value: '2T' },
2205
+ { label: 'Hamburg International', value: '4R' },
2206
+ { label: 'Hankook Air Us', value: 'H1' },
2207
+ { label: 'Hankook Airline', value: 'HN' },
2208
+ { label: 'Hapagfly', value: 'HF' },
2209
+ { label: 'Harbor Airlines', value: 'HB' },
2210
+ { label: 'Harmony Airways', value: 'HQ' },
2211
+ { label: 'Hawaiian Airlines', value: 'HA' },
2212
+ { label: 'Heavylift Cargo Airlines', value: 'HN' },
2213
+ { label: 'Heli France', value: '8H' },
2214
+ { label: 'Helijet', value: 'JB' },
2215
+ { label: 'Helios Airways', value: 'ZU' },
2216
+ { label: 'Hellas Jet', value: 'T4' },
2217
+ { label: 'Hellenic Airways', value: '1H' },
2218
+ { label: 'Hellenic Imperial Airways', value: 'HT' },
2219
+ { label: 'Hello', value: 'HW' },
2220
+ { label: 'Helvetic Airways', value: '2L' },
2221
+ { label: 'Hemus Air', value: 'DU' },
2222
+ { label: 'Hewa Bora Airways', value: 'EO' },
2223
+ { label: 'Hexair', value: 'UD' },
2224
+ { label: 'Hi Fly', value: '5K' },
2225
+ { label: 'Himalayan Airlines', value: 'HC' },
2226
+ { label: 'Hokkaido International Airlines', value: 'HD' },
2227
+ { label: 'Hola Airlines', value: 'H5' },
2228
+ { label: 'Homer Air', value: 'MR' },
2229
+ { label: 'Hong Kong Airlines', value: 'HX' },
2230
+ { label: 'Hong Kong Express Airways', value: 'UO' },
2231
+ { label: 'Horizon Air', value: 'QX' },
2232
+ { label: 'Horizon Airlines', value: 'BN' },
2233
+ { label: 'I-fly', value: 'H5' },
2234
+ { label: 'Ibc Airways', value: 'II' },
2235
+ { label: 'Iberia Airlines', value: 'IB' },
2236
+ { label: 'Iberia Express', value: 'I2' },
2237
+ { label: 'Iberworld', value: 'TY' },
2238
+ { label: 'Ibex Airlines', value: 'FW' },
2239
+ { label: 'Icelandair', value: 'FI' },
2240
+ { label: 'Illinois Airways', value: 'IL' },
2241
+ { label: 'Imair Airlines', value: 'IK' },
2242
+ { label: 'Inavia Internacional', value: 'Z5' },
2243
+ { label: 'Independence Air', value: 'DH' },
2244
+ { label: 'Indian Airlines', value: 'IC' },
2245
+ { label: 'Indigo Airlines', value: '6E' },
2246
+ { label: 'Indigo', value: 'I9' },
2247
+ { label: 'Indonesia Airasia', value: 'QZ' },
2248
+ { label: 'Indonesia Sky', value: 'I5' },
2249
+ { label: 'Indonesian Airlines', value: 'IO' },
2250
+ { label: 'Indya Airline Group', value: 'G1' },
2251
+ { label: 'Intelijet Airways', value: 'IJ' },
2252
+ { label: 'Inter Islands Airlines', value: 'H4' },
2253
+ { label: 'Interair South Africa', value: 'D6' },
2254
+ { label: 'Interavia Airlines', value: 'ZA' },
2255
+ { label: 'Intercontinental De Aviaci', value: 'RS' },
2256
+ { label: 'Interlink Airlines', value: 'ID' },
2257
+ { label: 'International Business Air', value: '6I' },
2258
+ { label: 'International Europe', value: '9I' },
2259
+ { label: 'Intersky', value: '3L' },
2260
+ { label: 'Interstate Airline', value: 'I4' },
2261
+ { label: 'Iran Air', value: 'IR' },
2262
+ { label: 'Iran Aseman Airlines', value: 'EP' },
2263
+ { label: 'Iraqi Airways', value: 'IA' },
2264
+ { label: 'Island Air (wp)', value: 'WP' },
2265
+ { label: 'Island Express', value: '2S' },
2266
+ { label: 'Island Spirit', value: 'IP' },
2267
+ { label: 'Islas Airways', value: 'IF' },
2268
+ { label: 'Islena De Inversiones', value: 'WC' },
2269
+ { label: 'Israir', value: '6H' },
2270
+ { label: 'Itali Airlines', value: '9X' },
2271
+ { label: 'Itek Air', value: 'GI' },
2272
+ { label: 'Izair', value: 'H9' },
2273
+ { label: 'Jal Express', value: 'JC' },
2274
+ { label: 'Jalways', value: 'JO' },
2275
+ { label: 'Japan Air System', value: 'JD' },
2276
+ { label: 'Japan Airlines Domestic', value: 'JL' },
2277
+ { label: 'Japan Airlines', value: 'JL' },
2278
+ { label: 'Japan Asia Airways', value: 'EG' },
2279
+ { label: 'Japan Regio', value: 'ZX' },
2280
+ { label: 'Japan Transocean Air', value: 'NU' },
2281
+ { label: 'Jat Airways', value: 'JU' },
2282
+ { label: 'Jatayu Airlines', value: 'VJ' },
2283
+ { label: 'Jayrow', value: ',,' },
2284
+ { label: 'Jazeera Airways', value: 'J9' },
2285
+ { label: 'Jeju Air', value: '7C' },
2286
+ { label: 'Jet Airways', value: '9W' },
2287
+ { label: 'Jet2.com', value: 'LS' },
2288
+ { label: 'Jet4you', value: '8J' },
2289
+ { label: 'Jetairfly', value: 'JF' },
2290
+ { label: 'Jetblue Airways', value: 'B6' },
2291
+ { label: 'Jetclub', value: '0J' },
2292
+ { label: 'Jetsgo', value: 'SG' },
2293
+ { label: 'Jetstar Airways', value: 'JQ' },
2294
+ { label: 'Jetstar Asia Airways', value: '3K' },
2295
+ { label: 'Jetstar Pacific', value: 'BL' },
2296
+ { label: 'Jett8 Airlines Cargo', value: 'JX' },
2297
+ { label: 'Jettor Airlines', value: 'NR' },
2298
+ { label: 'Jetx Airlines', value: 'GX' },
2299
+ { label: 'Jin Air', value: 'LJ' },
2300
+ { label: 'Jordan Aviation', value: 'R5' },
2301
+ { label: 'Joy Air', value: 'JR' },
2302
+ { label: 'Juneyao Airlines', value: 'HO' },
2303
+ { label: 'Jusur Airways', value: 'JX' },
2304
+ { label: 'KSY', value: 'KY' },
2305
+ { label: 'Kabo Air', value: 'N2' },
2306
+ { label: 'Kalitta Air', value: 'K4' },
2307
+ { label: 'Kam Air', value: 'RQ' },
2308
+ { label: 'Kampuchea Airlines', value: 'E2' },
2309
+ { label: 'Karat', value: 'V2' },
2310
+ { label: 'Kavminvodyavia', value: 'KV' },
2311
+ { label: 'Kd Avia', value: 'KD' },
2312
+ { label: 'Kenmore Air', value: 'M5' },
2313
+ { label: 'Kenya Airways', value: 'KQ' },
2314
+ { label: 'Keystone Air Services', value: 'BZ' },
2315
+ { label: 'Kharkiv Airlines', value: 'KH' },
2316
+ { label: 'Kibris T', value: 'KY' },
2317
+ { label: 'Kingfisher Airlines', value: 'IT' },
2318
+ { label: 'Kish Air', value: 'Y9' },
2319
+ { label: 'Kiwi International Air Lines', value: 'KP' },
2320
+ { label: 'Klm Cityhopper', value: 'WA' },
2321
+ { label: 'Klm Royal Dutch Airlines', value: 'KL' },
2322
+ { label: 'Kogalymavia Air Company', value: '7K' },
2323
+ { label: 'Komiinteravia', value: '8J' },
2324
+ { label: 'Koralblue Airlines', value: 'K7' },
2325
+ { label: 'Korean Air', value: 'KE' },
2326
+ { label: 'Korongo Airlines', value: 'ZC' },
2327
+ { label: 'Kostromskie Avialinii', value: 'K1' },
2328
+ { label: 'Krasnojarsky Airlines', value: '7B' },
2329
+ { label: 'Krylo Airlines', value: 'K9' },
2330
+ { label: 'Kuban Airlines', value: 'GW' },
2331
+ { label: 'Kunpeng Airlines', value: 'VD' },
2332
+ { label: 'Kuwait Airways', value: 'KU' },
2333
+ { label: 'Kuzu Airlines Cargo', value: 'GO' },
2334
+ { label: 'Kyrgyz Airlines', value: 'N5' },
2335
+ { label: 'Kyrgyzstan Airlines', value: 'R8' },
2336
+ { label: 'Kyrgyzstan', value: 'QH' },
2337
+ { label: 'L', value: 'MJ' },
2338
+ { label: 'L.a.b. Flying Service', value: 'JF' },
2339
+ { label: 'Lacsa', value: 'LR' },
2340
+ { label: 'Lagun Air', value: 'N6' },
2341
+ { label: 'Lai - Linea Aerea Iaaca', value: 'KG' },
2342
+ { label: 'Lan Airlines', value: 'LA' },
2343
+ { label: 'Lan Argentina', value: '4M' },
2344
+ { label: 'Lan Express', value: 'LU' },
2345
+ { label: 'Lan Peru', value: 'LP' },
2346
+ { label: 'Lankair', value: 'IK' },
2347
+ { label: 'Lao Airlines', value: 'QV' },
2348
+ { label: 'Laoag International Airlines', value: 'L7' },
2349
+ { label: 'Lauda Air', value: 'NG' },
2350
+ { label: 'Lcm Airlines', value: 'LQ' },
2351
+ { label: 'Lebanese Air Transport', value: 'LQ' },
2352
+ { label: 'Leeward Islands Air Transport', value: 'LI' },
2353
+ { label: 'Liberty Airways', value: 'LE' },
2354
+ { label: 'Libyan Arab Airlines', value: 'LN' },
2355
+ { label: 'Line Blue', value: 'L8' },
2356
+ { label: 'Linea Aerea De Servicio Ejecutivo Regional', value: '8Z' },
2357
+ { label: 'Linea Aerea Sapsa', value: 'L7' },
2358
+ { label: 'Linea Turistica Aerotuy', value: 'LD' },
2359
+ { label: 'Lineas Aereas Azteca', value: 'ZE' },
2360
+ { label: 'Linhas A', value: 'LM' },
2361
+ { label: 'Lion Mentari Airlines', value: 'JT' },
2362
+ { label: 'Lionxpress', value: 'C4' },
2363
+ { label: 'Livingston', value: 'LM' },
2364
+ { label: 'Llloyd Helicopters', value: '::' },
2365
+ { label: 'Lloyd Aereo Boliviano', value: 'LB' },
2366
+ { label: 'Locair', value: 'ZQ' },
2367
+ { label: 'Lot Polish Airlines', value: 'LO' },
2368
+ { label: 'Lsm Airlines', value: 'PQ' },
2369
+ { label: 'Lsm Airlines', value: 'YZ' },
2370
+ { label: 'Lsm International', value: 'II' },
2371
+ { label: 'Lte International Airways', value: 'XO' },
2372
+ { label: 'Ltu Austria', value: 'L3' },
2373
+ { label: 'Ltu International', value: 'LT' },
2374
+ { label: 'Luchsh Airlines', value: 'L4' },
2375
+ { label: 'Luftfahrtgesellschaft Walter', value: 'HE' },
2376
+ { label: 'Lufthansa Cargo', value: 'LH' },
2377
+ { label: 'Lufthansa Cityline', value: 'CL' },
2378
+ { label: 'Lufthansa', value: 'LH' },
2379
+ { label: 'Lufttaxi Fluggesellschaft', value: 'DV' },
2380
+ { label: 'Lufttransport', value: 'L5' },
2381
+ { label: 'Luxair', value: 'LG' },
2382
+ { label: 'Lviv Airlines', value: '5V' },
2383
+ { label: 'Lynden Air Cargo', value: 'L2' },
2384
+ { label: 'Macair Airlines', value: 'CC' },
2385
+ { label: 'Mahan Air', value: 'W5' },
2386
+ { label: 'Mahfooz Aviation', value: 'M2' },
2387
+ { label: 'Malaysia Airlines', value: 'MH' },
2388
+ { label: 'Maldivo Airlines', value: 'ML' },
2389
+ { label: 'Malindo Air', value: 'OD' },
2390
+ { label: 'Malm� Aviation', value: 'TF' },
2391
+ { label: 'Malta Air Charter', value: 'R5' },
2392
+ { label: 'Mal�v', value: 'MA' },
2393
+ { label: 'Mandala Airlines', value: 'RI' },
2394
+ { label: 'Mandarin Airlines', value: 'AE' },
2395
+ { label: 'Mango', value: 'JE' },
2396
+ { label: 'Mars Rk', value: '6V' },
2397
+ { label: 'Marsland Aviation', value: 'M7' },
2398
+ { label: 'Martinair', value: 'MP' },
2399
+ { label: 'Marusya Airways', value: 'Y8' },
2400
+ { label: 'Maryland Air', value: 'M1' },
2401
+ { label: 'Marysya Airlines', value: 'M4' },
2402
+ { label: 'Masair', value: 'M7' },
2403
+ { label: 'Mat Airways', value: '6F' },
2404
+ { label: 'Mat Macedonian Airlines', value: 'IN' },
2405
+ { label: 'Mauritania Airlines International', value: 'L6' },
2406
+ { label: 'Mavial Magadan Airlines', value: 'H5' },
2407
+ { label: 'Maxair', value: '8M' },
2408
+ { label: 'Maxjet Airways', value: 'MY' },
2409
+ { label: 'Maya Island Air', value: 'MW' },
2410
+ { label: 'Menajet', value: 'IM' },
2411
+ { label: 'Meridiana', value: 'IG' },
2412
+ { label: 'Merpati Nusantara Airlines', value: 'MZ' },
2413
+ { label: 'Mesa Airlines', value: 'YV' },
2414
+ { label: 'Mesaba Airlines', value: 'XJ' },
2415
+ { label: 'Metro Batavia', value: '7P' },
2416
+ { label: 'Mexicana De Aviaci', value: 'MX' },
2417
+ { label: 'Mexicanalink', value: 'I6' },
2418
+ { label: 'Miami Air International', value: 'GL' },
2419
+ { label: 'Miat Mongolian Airlines', value: 'OM' },
2420
+ { label: 'Michael Airlines', value: 'DF' },
2421
+ { label: 'Middle East Airlines', value: 'ME' },
2422
+ { label: 'Midway Airlines', value: 'JI' },
2423
+ { label: 'Midwest Airlines (egypt)', value: 'MY' },
2424
+ { label: 'Midwest Airlines', value: 'YX' },
2425
+ { label: 'Mng Airlines', value: 'MB' },
2426
+ { label: 'Moldavian Airlines', value: '2M' },
2427
+ { label: 'Monarch Airlines', value: 'ZB' },
2428
+ { label: 'Mongolian International Air Lines', value: '7M' },
2429
+ { label: 'Montenegro Airlines', value: 'YM' },
2430
+ { label: 'Moskovia Airlines', value: '3R' },
2431
+ { label: 'Motor Sich', value: 'M9' },
2432
+ { label: 'Mount Cook Airlines', value: 'NM' },
2433
+ { label: 'Mountain Air Company', value: 'N4' },
2434
+ { label: 'Myanma Airways', value: 'UB' },
2435
+ { label: 'Myanmar Airways International', value: '8M' },
2436
+ { label: 'Mytravel Airways', value: 'VZ' },
2437
+ { label: 'NCCTEST', value: 'NC' },
2438
+ { label: 'Naka Nihon Airlines Service', value: 'NV' },
2439
+ { label: 'Nantucket Airlines', value: 'DV' },
2440
+ { label: 'Nas Air', value: 'XY' },
2441
+ { label: 'Nasair', value: 'UE' },
2442
+ { label: 'National Air Cargo', value: 'N8' },
2443
+ { label: 'National Airlines', value: 'N4' },
2444
+ { label: 'National Airlines', value: 'N7' },
2445
+ { label: 'National Airlines', value: 'NA' },
2446
+ { label: 'National Jet Systems', value: 'NC' },
2447
+ { label: 'Nationwide Airlines', value: 'CE' },
2448
+ { label: 'Nauru Air Corporation', value: 'ON' },
2449
+ { label: 'Neos', value: 'NO' },
2450
+ { label: 'Nepal Airlines', value: 'RA' },
2451
+ { label: 'Netjets', value: '1I' },
2452
+ { label: 'New England Airlines', value: 'EJ' },
2453
+ { label: 'Next Brasil', value: 'XB' },
2454
+ { label: 'Nextjet', value: '2N' },
2455
+ { label: 'Niki', value: 'HG' },
2456
+ { label: 'Nile Air', value: 'NP' },
2457
+ { label: 'Nippon Cargo Airlines', value: 'KZ' },
2458
+ { label: 'Nok Air', value: 'DD' },
2459
+ { label: 'Nordeste Linhas Aereas Regionais', value: 'JH' },
2460
+ { label: 'Nordic Global Airlines', value: 'NJ' },
2461
+ { label: 'Nordic Regional', value: '6N' },
2462
+ { label: 'North Flying', value: 'M3' },
2463
+ { label: 'North-wright Airways', value: 'HW' },
2464
+ { label: 'Northern Air Cargo', value: 'NC' },
2465
+ { label: 'Northwest Airlines', value: 'NW' },
2466
+ { label: 'Northwest Regional Airlines', value: 'FY' },
2467
+ { label: 'Northwestern Air', value: 'J3' },
2468
+ { label: 'Norwegian Air Shuttle', value: 'DY' },
2469
+ { label: 'Norwegian Long Haul As', value: 'DU' },
2470
+ { label: 'Nouvel Air Tunisie', value: 'BJ' },
2471
+ { label: 'Nova Airline', value: 'M4' },
2472
+ { label: 'Novair', value: '1I' },
2473
+ { label: 'Nuevo Continente', value: 'N6' },
2474
+ { label: 'Oasis Hong Kong Airlines', value: 'O8' },
2475
+ { label: 'Ocean Airlines', value: 'VC' },
2476
+ { label: 'Oceanair', value: 'O6' },
2477
+ { label: 'Oconnor Airlines', value: 'UQ' },
2478
+ { label: 'Olympic Airlines', value: 'OA' },
2479
+ { label: 'Oman Air', value: 'WY' },
2480
+ { label: 'Omni Air International', value: 'OY' },
2481
+ { label: 'Omskavia Airline', value: 'N3' },
2482
+ { label: 'Onechina', value: '1C' },
2483
+ { label: 'Onur Air', value: '8Q' },
2484
+ { label: 'Open Skies Consultative Commission', value: '1L' },
2485
+ { label: 'Orbit Airlines Azerbaijan', value: 'O1' },
2486
+ { label: 'Orchid Airlines', value: 'OI' },
2487
+ { label: 'Orenburg Airlines', value: 'R2' },
2488
+ { label: 'Orient Thai Airlines', value: 'OX' },
2489
+ { label: 'Origin Pacific Airways', value: 'QO' },
2490
+ { label: 'Ostfriesische Lufttransport', value: 'OL' },
2491
+ { label: 'Our Airline', value: 'ON' },
2492
+ { label: 'Overland Airways', value: 'OJ' },
2493
+ { label: 'Ozark Air Lines', value: 'OZ' },
2494
+ { label: 'Ozjet Airlines', value: 'O7' },
2495
+ { label: 'Pace Airlines', value: 'Y5' },
2496
+ { label: 'Pacific Blue', value: 'DJ' },
2497
+ { label: 'Pacific Coastal Airline', value: '8P' },
2498
+ { label: 'Pacific East Asia Cargo Airlines', value: 'Q8' },
2499
+ { label: 'Pacific Southwest Airlines', value: 'PS' },
2500
+ { label: 'Pacific Wings', value: 'LW' },
2501
+ { label: 'Pakistan International Airlines', value: 'PK' },
2502
+ { label: 'Palair Macedonia', value: '3D' },
2503
+ { label: 'Palau Trans Pacific Airline', value: 'GP' },
2504
+ { label: 'Palestinian Airlines', value: 'PF' },
2505
+ { label: 'Pamir Airways', value: 'NR' },
2506
+ { label: 'Pan Air', value: 'PV' },
2507
+ { label: 'Pan American Airways', value: 'PA' },
2508
+ { label: 'Pan American World Airways', value: 'PA' },
2509
+ { label: 'Panafrican Airways', value: 'PQ' },
2510
+ { label: 'Panam World Airways', value: 'WQ' },
2511
+ { label: 'Pantanal Linhas A�reas', value: 'P8' },
2512
+ { label: 'Paramount Airways', value: 'I7' },
2513
+ { label: 'Parmiss Airlines (ipv)', value: 'PA' },
2514
+ { label: 'Pb Air', value: '9Q' },
2515
+ { label: 'Pearl Airways', value: 'HP' },
2516
+ { label: 'Pegasus Airlines', value: 'PC' },
2517
+ { label: 'Peninsula Airways', value: 'KS' },
2518
+ { label: 'Perm Airlines', value: 'P9' },
2519
+ { label: 'Philippine Airlines', value: 'PR' },
2520
+ { label: 'Phuket Air', value: '9R' },
2521
+ { label: 'Piedmont Airlines (1948-1989)', value: 'PI' },
2522
+ { label: 'Pinnacle Airlines', value: '9E' },
2523
+ { label: 'Pluna', value: 'PU' },
2524
+ { label: 'Pmtair', value: 'U4' },
2525
+ { label: 'Polar Air Cargo', value: 'PO' },
2526
+ { label: 'Polynesian Airlines', value: 'PH' },
2527
+ { label: 'Polynesian Blue', value: 'DJ' },
2528
+ { label: 'Porter Airlines', value: 'PD' },
2529
+ { label: 'Portugalia', value: 'NI' },
2530
+ { label: 'Potomac Air', value: 'BK' },
2531
+ { label: 'Precision Air', value: 'PW' },
2532
+ { label: 'President Airlines', value: 'TO' },
2533
+ { label: 'Primaris Airlines', value: 'FE' },
2534
+ { label: 'Private Wings Flugcharter', value: '8W' },
2535
+ { label: 'Qantas', value: 'QF' },
2536
+ { label: 'Qatar Airways', value: 'QR' },
2537
+ { label: 'Qatxpress', value: 'C3' },
2538
+ { label: 'Rainbow Air (rai)', value: 'RN' },
2539
+ { label: 'Rainbow Air Canada', value: 'RY' },
2540
+ { label: 'Rainbow Air Euro', value: 'RU' },
2541
+ { label: 'Rainbow Air Polynesia', value: 'RX' },
2542
+ { label: 'Rainbow Air Us', value: 'RM' },
2543
+ { label: 'Red Wings', value: 'WZ' },
2544
+ { label: 'Redhill Aviation', value: '8L' },
2545
+ { label: 'Reem Air', value: 'V4' },
2546
+ { label: 'Regional Air Iceland', value: '9N' },
2547
+ { label: 'Regional Express', value: 'ZL' },
2548
+ { label: 'Regional Paraguaya', value: 'P7' },
2549
+ { label: 'Regionalia Chile', value: '9J' },
2550
+ { label: 'Regionalia M�xico', value: 'N4' },
2551
+ { label: 'Regionalia Uruguay', value: '2X' },
2552
+ { label: 'Regionalia Venezuela', value: '9X' },
2553
+ { label: 'Regionsair', value: '3C' },
2554
+ { label: 'Reno Air', value: 'QQ' },
2555
+ { label: 'Republic Airlines', value: 'RW' },
2556
+ { label: 'Republic Express Airlines', value: 'RH' },
2557
+ { label: 'Rexair Virtuel', value: 'RR' },
2558
+ { label: 'Rico Linhas A', value: 'C7' },
2559
+ { label: 'Rio Grande Air', value: 'E2' },
2560
+ { label: 'Rio Sul Servi', value: 'SL' },
2561
+ { label: 'Rossiya-russian Airlines', value: 'FV' },
2562
+ { label: 'Royal Air Cambodge', value: 'VJ' },
2563
+ { label: 'Royal Air Force Of Oman', value: 'RS' },
2564
+ { label: 'Royal Air Force', value: 'RR' },
2565
+ { label: 'Royal Air Maroc', value: 'AT' },
2566
+ { label: 'Royal Airlines', value: 'R0' },
2567
+ { label: 'Royal Airways', value: 'KG' },
2568
+ { label: 'Royal Aruban Airline', value: 'V5' },
2569
+ { label: 'Royal Britain', value: '7V' },
2570
+ { label: 'Royal Brunei Airlines', value: 'BI' },
2571
+ { label: 'Royal Falcon', value: 'RL' },
2572
+ { label: 'Royal Jordanian', value: 'RJ' },
2573
+ { label: 'Royal Khmer Airlines', value: 'RK' },
2574
+ { label: 'Royal Nepal Airlines', value: 'RA' },
2575
+ { label: 'Royal Southern Airlines.', value: 'R1' },
2576
+ { label: 'Royal Tongan Airlines', value: 'WR' },
2577
+ { label: 'Russian Sky Airlines', value: 'P7' },
2578
+ { label: 'Rwandair Express', value: 'WB' },
2579
+ { label: 'Ryan International Airlines', value: 'RD' },
2580
+ { label: 'Ryanair', value: 'FR' },
2581
+ { label: 'R�gional', value: 'YS' },
2582
+ { label: 'S7 Airlines', value: 'S7' },
2583
+ { label: 'Saeta', value: 'EH' },
2584
+ { label: 'Safair', value: 'FA' },
2585
+ { label: 'Salsa D,,haiti', value: 'SO' },
2586
+ { label: 'Sama Airlines', value: 'ZS' },
2587
+ { label: 'Samara Airlines', value: 'E5' },
2588
+ { label: 'Samurai Airlines', value: '07' },
2589
+ { label: 'San Juan Airlines', value: '2G' },
2590
+ { label: 'Santa Barbara Airlines', value: 'S3' },
2591
+ { label: 'Saratov Aviation Division', value: '6W' },
2592
+ { label: 'Sat Airlines', value: 'HZ' },
2593
+ { label: 'Sata Air Acores', value: 'SP' },
2594
+ { label: 'Sata International', value: 'S4' },
2595
+ { label: 'Satena', value: '9R' },
2596
+ { label: 'Saudi Arabian Airlines', value: 'SV' },
2597
+ { label: 'Scandinavian Airlines System', value: 'SK' },
2598
+ { label: 'Scat Air', value: 'DV' },
2599
+ { label: 'Scoot', value: 'TZ' },
2600
+ { label: 'Seaborne Airlines', value: 'BB' },
2601
+ { label: 'Seaport Airlines', value: 'K5' },
2602
+ { label: 'Senegal Airlines', value: 'DN' },
2603
+ { label: 'Serbian Airlines', value: 'S1' },
2604
+ { label: 'Servicios De Transportes A', value: 'FS' },
2605
+ { label: 'Shaheen Air International', value: 'NL' },
2606
+ { label: 'Shandong Airlines', value: 'SC' },
2607
+ { label: 'Shanghai Airlines', value: 'FM' },
2608
+ { label: 'Shanxi Airlines', value: '8C' },
2609
+ { label: 'Sharp Airlines', value: 'SH' },
2610
+ { label: 'Shenzhen Airlines', value: 'ZH' },
2611
+ { label: 'Shovkoviy Shlyah', value: 'S8' },
2612
+ { label: 'Shuttle America', value: 'S5' },
2613
+ { label: 'Sibaviatrans', value: '5M' },
2614
+ { label: 'Sichuan Airlines', value: '3U' },
2615
+ { label: 'Siem Reap Airways', value: 'FT' },
2616
+ { label: 'Sierra National Airlines', value: 'LJ' },
2617
+ { label: 'Silk Way Airlines', value: 'ZP' },
2618
+ { label: 'Silkair', value: 'MI' },
2619
+ { label: 'Singapore Airlines Cargo', value: 'SQ' },
2620
+ { label: 'Singapore Airlines', value: 'SQ' },
2621
+ { label: 'Sita', value: 'XS' },
2622
+ { label: 'Skagway Air Service', value: 'N5' },
2623
+ { label: 'Sky Airline', value: 'H2' },
2624
+ { label: 'Sky Express', value: 'G3' },
2625
+ { label: 'Sky Express', value: 'XW' },
2626
+ { label: 'Sky Eyes', value: 'I6' },
2627
+ { label: 'Sky Regional', value: 'RS' },
2628
+ { label: 'Sky Trek International Airlines', value: '1I' },
2629
+ { label: 'Sky Wing Pacific', value: 'C7' },
2630
+ { label: 'Sky Work Airlines', value: 'SX' },
2631
+ { label: 'Skybus Airlines', value: 'SX' },
2632
+ { label: 'Skyeurope', value: 'NE' },
2633
+ { label: 'Skyjet Airlines', value: 'UQ' },
2634
+ { label: 'Skyking Turks And Caicos Airways', value: 'RU' },
2635
+ { label: 'Skymark Airlines', value: 'BC' },
2636
+ { label: 'Skynet Airlines', value: 'SI' },
2637
+ { label: 'Skynet Asia Airways', value: '6J' },
2638
+ { label: 'Skyservice Airlines', value: '5G' },
2639
+ { label: 'Skywalk Airlines', value: 'AL' },
2640
+ { label: 'Skyways Express', value: 'JZ' },
2641
+ { label: 'Skywest', value: 'OO' },
2642
+ { label: 'Slok Air Gambia', value: 'S0' },
2643
+ { label: 'Slovak Airlines', value: '6Q' },
2644
+ { label: 'Snowbird Airlines', value: 'S8' },
2645
+ { label: 'Sochi Air Chater', value: 'Q3' },
2646
+ { label: 'Sochi Air Express', value: 'Q4' },
2647
+ { label: 'Sochi Air', value: 'CQ' },
2648
+ { label: 'Solomon Airlines', value: 'IE' },
2649
+ { label: 'Sosoliso Airlines', value: 'SO' },
2650
+ { label: 'South African Airways', value: 'SA' },
2651
+ { label: 'South East Asian Airlines', value: 'DG' },
2652
+ { label: 'Southern Winds Airlines', value: 'A4' },
2653
+ { label: 'Southjet Cargo', value: '78' },
2654
+ { label: 'Southjet Connect', value: '77' },
2655
+ { label: 'Southjet', value: '76' },
2656
+ { label: 'Southwest Airlines', value: 'WN' },
2657
+ { label: 'Spanair', value: 'JK' },
2658
+ { label: 'Spicejet', value: 'SG' },
2659
+ { label: 'Spike Airlines', value: 'S0' },
2660
+ { label: 'Spirit Airlines', value: 'NK' },
2661
+ { label: 'Spirit Of Manila Airlines', value: 'SM' },
2662
+ { label: 'Spring Airlines Japan', value: 'IJ' },
2663
+ { label: 'Spring Airlines', value: '9S' },
2664
+ { label: 'Srilankan Airlines', value: 'UL' },
2665
+ { label: 'Sriwijaya Air', value: 'SJ' },
2666
+ { label: 'Star Flyer', value: '7G' },
2667
+ { label: 'Star1 Airlines', value: 'V9' },
2668
+ { label: 'Starling Airlines Spain', value: 'SX' },
2669
+ { label: 'Sterling Airlines', value: 'NB' },
2670
+ { label: 'Stp Airways', value: '8F' },
2671
+ { label: 'Sudan Airways', value: 'SD' },
2672
+ { label: 'Sun Air (fiji)', value: 'PI' },
2673
+ { label: 'Sun Air Of Scandinavia', value: 'EZ' },
2674
+ { label: 'Sun Country Airlines', value: 'SY' },
2675
+ { label: 'Sun Dor', value: '7L' },
2676
+ { label: 'Sunexpress', value: 'XQ' },
2677
+ { label: 'Sunshine Express Airlines', value: 'CQ' },
2678
+ { label: 'Sunwing Airlines', value: 'WG' },
2679
+ { label: 'Superior Aviation', value: 'SO' },
2680
+ { label: 'Surinam Airways', value: 'PY' },
2681
+ { label: 'Svyaz Rossiya', value: '7R' },
2682
+ { label: 'Swe Fly', value: 'WV' },
2683
+ { label: 'Swedjet Airways', value: 'VD' },
2684
+ { label: 'Swedline Express', value: 'SM' },
2685
+ { label: 'Swiss International Air Lines', value: 'LX' },
2686
+ { label: 'Swissair', value: 'SR' },
2687
+ { label: 'Syrian Arab Airlines', value: 'RB' },
2688
+ { label: 'T.j. Air', value: 'TJ' },
2689
+ { label: 'Taag Angola Airlines', value: 'DT' },
2690
+ { label: 'Tacv', value: 'VR' },
2691
+ { label: 'Tam Brazilian Airlines', value: 'JJ' },
2692
+ { label: 'Tam Mercosur', value: 'PZ' },
2693
+ { label: 'Tame', value: 'EQ' },
2694
+ { label: 'Tampa', value: 'QT' },
2695
+ { label: 'Tandem Aero', value: 'TQ' },
2696
+ { label: 'Tap Portugal', value: 'TP' },
2697
+ { label: 'Tarom', value: 'RO' },
2698
+ { label: 'Tassili Airlines', value: 'SF' },
2699
+ { label: 'Tatarstan Airlines', value: 'U9' },
2700
+ { label: 'Tavrey Airlines', value: 'T6' },
2701
+ { label: 'Teamline Air', value: 'L9' },
2702
+ { label: 'Texas Spirit', value: 'XS' },
2703
+ { label: 'Texas Wings', value: 'TQ' },
2704
+ { label: 'Thai Air Cargo', value: 'T2' },
2705
+ { label: 'Thai Airasia', value: 'FD' },
2706
+ { label: 'Thai Airways International', value: 'TG' },
2707
+ { label: 'Thai Sky Airlines', value: '9I' },
2708
+ { label: 'Thai Star Airlines', value: 'T9' },
2709
+ { label: 'Thomas Cook Airlines', value: 'FQ' },
2710
+ { label: 'Thomas Cook Airlines', value: 'MT' },
2711
+ { label: 'Thomsonfly', value: 'BY' },
2712
+ { label: 'Three', value: 'H3' },
2713
+ { label: 'Tiara Air', value: '3P' },
2714
+ { label: 'Tiger Airways Australia', value: 'TT' },
2715
+ { label: 'Tiger Airways', value: 'TR' },
2716
+ { label: 'Titan Airways', value: 'ZT' },
2717
+ { label: 'Tnt Airways', value: '3V' },
2718
+ { label: 'Tobruk Air', value: '7T' },
2719
+ { label: 'Tol-air Services', value: 'TI' },
2720
+ { label: 'Tom,,s & Co Airliners', value: '&T' },
2721
+ { label: 'Tomp Airlines', value: 'ZT' },
2722
+ { label: 'Tower Air', value: 'FF' },
2723
+ { label: 'Tramm Airlines', value: '9F' },
2724
+ { label: 'Trans Maldivian Airways', value: 'M8' },
2725
+ { label: 'Trans Mediterranean Airlines', value: 'TL' },
2726
+ { label: 'Trans Pas Air', value: 'T6' },
2727
+ { label: 'Trans States Airlines', value: 'AX' },
2728
+ { label: 'Trans World Airlines', value: 'TW' },
2729
+ { label: 'Transaero Airlines', value: 'UN' },
2730
+ { label: 'Transasia Airways', value: 'GE' },
2731
+ { label: 'Transavia France', value: 'TO' },
2732
+ { label: 'Transavia Holland', value: 'HV' },
2733
+ { label: 'Transaviaexport', value: 'AL' },
2734
+ { label: 'Transbrasil Airlines', value: 'TH' },
2735
+ { label: 'Transeuropean Airlines', value: 'UE' },
2736
+ { label: 'Transholding System', value: 'YO' },
2737
+ { label: 'Transholding', value: 'TI' },
2738
+ { label: 'Transmeridian Airlines', value: 'T9' },
2739
+ { label: 'Transmile Air Services', value: 'TH' },
2740
+ { label: 'Transnusa Air', value: 'M8' },
2741
+ { label: 'Transrussiaairlines', value: '1E' },
2742
+ { label: 'Transwest Air', value: '9T' },
2743
+ { label: 'Trasbrasil', value: 'TB' },
2744
+ { label: 'Trast Aero', value: 'S5' },
2745
+ { label: 'Travel Service', value: 'QS' },
2746
+ { label: 'Tri-mg Intra Asia Airlines', value: 'GY' },
2747
+ { label: 'Trip Linhas A', value: '8R' },
2748
+ { label: 'Tropic Air', value: 'PM' },
2749
+ { label: 'Tropical Airways', value: 'M7' },
2750
+ { label: 'Tropical Linhas Aereas', value: 'T1' },
2751
+ { label: 'Tui Airlines Belgium', value: 'TB' },
2752
+ { label: 'Tuifly Nordic', value: '6B' },
2753
+ { label: 'Tuifly', value: 'X3' },
2754
+ { label: 'Tulip Air', value: 'TD' },
2755
+ { label: 'Tuninter', value: 'UG' },
2756
+ { label: 'Tunisair', value: 'TU' },
2757
+ { label: 'Turan Air', value: '3T' },
2758
+ { label: 'Turkish Airlines', value: 'TK' },
2759
+ { label: 'Turkmenistan Airlines', value: 'T5' },
2760
+ { label: 'Tway Airlines', value: 'TW' },
2761
+ { label: 'Twin Jet', value: 'T7' },
2762
+ { label: 'Tyrolean Airways', value: 'VO' },
2763
+ { label: 'Ukraine International Airlines', value: 'PS' },
2764
+ { label: 'Ukrainian Cargo Airways', value: '6Z' },
2765
+ { label: 'Um Airlines', value: 'UF' },
2766
+ { label: 'Uni Air', value: 'B7' },
2767
+ { label: 'United Airlines', value: 'UA' },
2768
+ { label: 'United Airways', value: '4H' },
2769
+ { label: 'United Parcel Service', value: '5X' },
2770
+ { label: 'Ural Airlines', value: 'U6' },
2771
+ { label: 'Us Airways', value: 'US' },
2772
+ { label: 'Usa Jet Airlines', value: 'U7' },
2773
+ { label: 'Usa Sky Cargo', value: 'E1' },
2774
+ { label: 'Usa3000 Airlines', value: 'U5' },
2775
+ { label: 'Utair Aviation', value: 'UT' },
2776
+ { label: 'Uzbekistan Airways', value: 'HY' },
2777
+ { label: 'V Air', value: 'ZV' },
2778
+ { label: 'V Australia Airlines', value: 'VA' },
2779
+ { label: 'Valuair', value: 'VF' },
2780
+ { label: 'Valuejet', value: 'J7' },
2781
+ { label: 'Varig Log', value: 'LC' },
2782
+ { label: 'Vasp', value: 'VP' },
2783
+ { label: 'Via Conectia Airlines', value: '6V' },
2784
+ { label: 'Via L�neas A�reas', value: 'V1' },
2785
+ { label: 'Viaggio Air', value: 'VM' },
2786
+ { label: 'Vickjet', value: 'KT' },
2787
+ { label: 'Vietnam Airlines', value: 'VN' },
2788
+ { label: 'Viking Hellas', value: 'VQ' },
2789
+ { label: 'Vim Airlines', value: 'NN' },
2790
+ { label: 'Virgin America', value: 'VX' },
2791
+ { label: 'Virgin Atlantic Airways', value: 'VS' },
2792
+ { label: 'Virgin Australia', value: 'VA' },
2793
+ { label: 'Virgin Blue', value: 'DJ' },
2794
+ { label: 'Virgin Express', value: 'TV' },
2795
+ { label: 'Virgin Nigeria Airways', value: 'VK' },
2796
+ { label: 'Virgin Pacific', value: 'VH' },
2797
+ { label: 'Virginwings', value: 'YY' },
2798
+ { label: 'Vision Airlines (v2)', value: 'V2' },
2799
+ { label: 'Viva Macau', value: 'ZG' },
2800
+ { label: 'Vivacolombia', value: '5Z' },
2801
+ { label: 'Vladivostok Air', value: 'XF' },
2802
+ { label: 'Vlm Airlines', value: 'VG' },
2803
+ { label: 'Voestar', value: '8K' },
2804
+ { label: 'Volare Airlines', value: 'VE' },
2805
+ { label: 'Volaris', value: 'Y4' },
2806
+ { label: 'Volga-dnepr Airlines', value: 'VI' },
2807
+ { label: 'Volotea Airways', value: 'V7' },
2808
+ { label: 'Volotea Costa Rica', value: '9V' },
2809
+ { label: 'Voyageur Airways', value: 'VC' },
2810
+ { label: 'Vrg Linhas Aereas', value: 'RG' },
2811
+ { label: 'Vuela Cuba', value: '6C' },
2812
+ { label: 'Vueling Airlines', value: 'VY' },
2813
+ { label: 'Vuola Italia', value: '4S' },
2814
+ { label: 'Webjet Linhas A', value: 'WJ' },
2815
+ { label: 'Welcome Air', value: '2W' },
2816
+ { label: 'West Air China', value: 'PN' },
2817
+ { label: 'West Air Sweden', value: 'PT' },
2818
+ { label: 'Western Airlines', value: 'WA' },
2819
+ { label: 'Westjet Encore', value: 'WR' },
2820
+ { label: 'Westjet', value: 'WS' },
2821
+ { label: 'Westward Airways', value: 'CN' },
2822
+ { label: 'Wider�e', value: 'WF' },
2823
+ { label: 'Wind Jet', value: 'IV' },
2824
+ { label: 'Wings Air', value: 'IW' },
2825
+ { label: 'Wings Of Alaska', value: 'K5' },
2826
+ { label: 'Wizz Air Hungary', value: '8Z' },
2827
+ { label: 'Wizz Air Ukraine', value: 'WU' },
2828
+ { label: 'Wizz Air', value: 'W6' },
2829
+ { label: 'World Airways', value: 'WO' },
2830
+ { label: 'World Experience Airline', value: 'W1' },
2831
+ { label: 'World Scale Airlines', value: 'W3' },
2832
+ { label: 'Worldways', value: 'WG' },
2833
+ { label: 'Wright Air Service', value: '8V' },
2834
+ { label: 'Xair Usa', value: 'XA' },
2835
+ { label: 'Xiamen Airlines', value: 'MF' },
2836
+ { label: 'Xl Airways France', value: 'SE' },
2837
+ { label: 'Xpto', value: 'XP' },
2838
+ { label: 'Xtra Airways', value: 'XP' },
2839
+ { label: 'Yamal Airlines', value: 'YL' },
2840
+ { label: 'Yangtze River Express', value: 'Y8' },
2841
+ { label: 'Yellowtail', value: 'YE' },
2842
+ { label: 'Yemenia', value: 'IY' },
2843
+ { label: 'Yunnan Airlines', value: '3Q' },
2844
+ { label: 'ZIP', value: '3J' },
2845
+ { label: 'Zabaikal Airlines', value: 'Z6' },
2846
+ { label: 'Zabaykalskii Airlines', value: 'ZP' },
2847
+ { label: 'Zambian Airways', value: 'Q3' },
2848
+ { label: 'Zenith International Airline', value: 'ZN' },
2849
+ { label: 'Zimex Aviation', value: 'C4' },
2850
+ { label: 'Zoom Airlines', value: 'Z4' },
2851
+ { label: 'Zuliana De Aviacion', value: 'OD' }
2852
+ ];
1138
2853
 
1139
2854
  class BookableBasket {
1140
2855
  constructor(basketService, helpers) {
@@ -2603,7 +4318,7 @@ class BaseHelperRoutines {
2603
4318
  : arrivalTimeReturn;
2604
4319
  (result1.inboundFlights || []).forEach(updateFlightItems);
2605
4320
  indexedFlight(result1.inboundFlights, 'depatureReturnAirport', 'originAirport', 'originAirportName', 0);
2606
- indexedFlight(result1.inboundFlights, 'arrivalReturnAirport', 'destinationAirport', 'destinationAirportName', result1.outboundFlights.length - 1);
4321
+ indexedFlight(result1.inboundFlights, 'arrivalReturnAirport', 'destinationAirport', 'destinationAirportName', result1.inboundFlights.length - 1);
2607
4322
  }
2608
4323
  return filters;
2609
4324
  }, this.clone(defaultFilters));
@@ -2708,6 +4423,10 @@ class BaseHelperRoutines {
2708
4423
  fare1.unavailable = rule.unavailable;
2709
4424
  fare1.unavailableMessage = rule.unavailableMessage;
2710
4425
  }
4426
+ if (isSet(rule === null || rule === void 0 ? void 0 : rule.requiresReason)) {
4427
+ fare1.requiresReason = rule.requiresReason;
4428
+ fare1.requiresReasonMessage = rule.requiresReasonMessage;
4429
+ }
2711
4430
  return fare1;
2712
4431
  }, fare);
2713
4432
  }
@@ -3311,13 +5030,13 @@ class CabHireEnterpriseSearch extends BaseEnterpriseSearch {
3311
5030
  this.viasTo = recentSearch.searchArgs.viasTo;
3312
5031
  this.searchService.startSearches();
3313
5032
  }
3314
- getSearchQuery() {
5033
+ getSearchQuery(simplifiedLocation = true) {
3315
5034
  const query = {
3316
5035
  adults: this.tempParams.adults,
3317
5036
  children: this.tempParams.children,
3318
5037
  departs: this.tempParams.departs,
3319
- fromLocation: this.createCabHireLocation(this.tempParams.fromAddress),
3320
- toLocation: this.createCabHireLocation(this.tempParams.toAddress),
5038
+ fromLocation: simplifiedLocation ? this.createCabHireLocation(this.tempParams.fromAddress) : this.tempParams.fromAddress,
5039
+ toLocation: simplifiedLocation ? this.createCabHireLocation(this.tempParams.toAddress) : this.tempParams.toAddress,
3321
5040
  infants: 0,
3322
5041
  vehicleType: this.vehicleType,
3323
5042
  vias: this._vias
@@ -3518,7 +5237,7 @@ class CabHireEnterpriseSearch extends BaseEnterpriseSearch {
3518
5237
  co2PerItem: cabHireQuote.co2PerItem,
3519
5238
  co2PerPassenger: cabHireQuote.co2PerPassenger,
3520
5239
  outboundDate: cabHireQuery.departs.format()
3521
- }, intBasket, this.searchService, this.travellers);
5240
+ }, intBasket, this.searchService, this.travellers, cabHireQuote.requiresReason);
3522
5241
  }
3523
5242
  return Promise.resolve(false); // TODO should this throw an error?
3524
5243
  });
@@ -3569,6 +5288,38 @@ class CabHireEnterpriseSearch extends BaseEnterpriseSearch {
3569
5288
  return this.searchService.saveFavouriteSearch(searchInfo);
3570
5289
  }
3571
5290
  }
5291
+ applyFavourite(fav) {
5292
+ return __awaiter(this, void 0, void 0, function* () {
5293
+ if (fav.fromLocation.Street && fav.toLocation.Street) {
5294
+ this.mode = TaxiFormMode.ADDRESS;
5295
+ }
5296
+ else {
5297
+ this.mode = TaxiFormMode.STATION;
5298
+ this.airportSearchType = fav.fromLocation.Street ? AirportSearchMode.DROPOFF : AirportSearchMode.PICKUP;
5299
+ this.searchService.getAirportsList(!fav.fromLocation.Street ? fav.fromLocation.House : fav.toLocation.House).subscribe(airport => {
5300
+ this.airport = airport[0];
5301
+ });
5302
+ }
5303
+ this.adults = fav.adults;
5304
+ this.children = fav.children;
5305
+ this.infants = fav.infants;
5306
+ // this.fromAddress.House = fav.fromLocation.House
5307
+ // this.fromAddress.Street = fav.fromLocation.Street
5308
+ // this.fromAddress.Town = fav.fromLocation.Town
5309
+ // this.fromAddress.Country = fav.fromLocation.Country
5310
+ // this.fromAddress.PostCode = fav.fromLocation.PostCode
5311
+ // this.fromAddress.placeDescription = fav.fromLocation.placeDescription
5312
+ // this.toAddress.House = fav.toLocation.House
5313
+ // this.toAddress.Street = fav.toLocation.Street
5314
+ // this.toAddress.Town = fav.toLocation.Town
5315
+ // this.toAddress.Country = fav.toLocation.Country
5316
+ // this.toAddress.PostCode = fav.toLocation.PostCode
5317
+ // this.toAddress.placeDescription = fav.toLocation.placeDescription
5318
+ this.fromAddress = fav.fromLocation;
5319
+ this.toAddress = fav.toLocation;
5320
+ this.vehicleType = fav.vehicleType;
5321
+ });
5322
+ }
3572
5323
  }
3573
5324
  CabHireEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_cab';
3574
5325
  CabHireEnterpriseSearch.SECONDARY_STORAGE_SESSION_PARAMS = 'secondary_search_cab';
@@ -3799,10 +5550,9 @@ class CarhireEnterpriseSearch extends BaseEnterpriseSearch {
3799
5550
  this.updateTempParams(searchService.makeCarHireQuery(data.tempParams));
3800
5551
  if (searchService.shouldAddTravellerSubscription()) {
3801
5552
  searchService.travellerInformation.subscribe((travellers) => {
3802
- const splitTravellers = this.helpers.selectedTravellers(travellers, ServiceType.Car);
3803
- this.adults = splitTravellers.adults.length;
3804
- this.children = splitTravellers.children.length;
3805
- this.travellers = travellers;
5553
+ this.adults = 1;
5554
+ this.children = 0;
5555
+ this.travellers = (travellers === null || travellers === void 0 ? void 0 : travellers.slice(0, 1)) || [];
3806
5556
  this._isValid();
3807
5557
  });
3808
5558
  }
@@ -4673,24 +6423,38 @@ class CarhireEnterpriseSearch extends BaseEnterpriseSearch {
4673
6423
  }
4674
6424
  updateFromPreviousSearches(previousItems) {
4675
6425
  var _a;
4676
- console.log("PREPOPULATING CARHIRE FORM");
6426
+ console.log('PREPOPULATING CARHIRE FORM');
4677
6427
  const flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
4678
6428
  if (flightItem) {
4679
6429
  try {
4680
6430
  let startDate = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
4681
6431
  let endDate = this.searchService.searches[ServiceType.Flight].inboundDate.toDate();
4682
6432
  this.locationType = LocationTypes.Airport;
4683
- this.pickup_datetime = this.searchService.searches[ServiceType.Flight].outBoundDate;
4684
- this.dropoff_datetime = this.searchService.searches[ServiceType.Flight].inboundDate;
4685
- this.pickup_date = { day: startDate.getUTCDate(), month: startDate.getUTCMonth() + 1, year: startDate.getUTCFullYear() };
4686
- this.dropoff_date = { day: endDate.getUTCDate(), month: endDate.getUTCMonth() + 1, year: endDate.getUTCFullYear() };
4687
- this.pickup_location = this.searchService.searches[ServiceType.Flight].arriveLocation;
4688
- this.dropoff_location = this.searchService.searches[ServiceType.Flight].arriveLocation;
4689
- this.pickup_country = this.searchService.searches[ServiceType.Flight].arriveLocation.countryCode;
4690
- this.dropoff_country = this.searchService.searches[ServiceType.Flight].arriveLocation.countryCode;
6433
+ this.pickup_datetime =
6434
+ this.searchService.searches[ServiceType.Flight].outBoundDate;
6435
+ this.dropoff_datetime =
6436
+ this.searchService.searches[ServiceType.Flight].inboundDate;
6437
+ this.pickup_date = {
6438
+ day: startDate.getUTCDate(),
6439
+ month: startDate.getUTCMonth() + 1,
6440
+ year: startDate.getUTCFullYear()
6441
+ };
6442
+ this.dropoff_date = {
6443
+ day: endDate.getUTCDate(),
6444
+ month: endDate.getUTCMonth() + 1,
6445
+ year: endDate.getUTCFullYear()
6446
+ };
6447
+ this.pickup_location = this.searchService.searches[ServiceType.Flight]
6448
+ .arriveLocation;
6449
+ this.dropoff_location = this.searchService.searches[ServiceType.Flight]
6450
+ .arriveLocation;
6451
+ this.pickup_country = this.searchService.searches[ServiceType.Flight]
6452
+ .arriveLocation.countryCode;
6453
+ this.dropoff_country = this.searchService.searches[ServiceType.Flight]
6454
+ .arriveLocation.countryCode;
4691
6455
  }
4692
6456
  catch (_b) {
4693
- console.error("Error trying to prepopulate carhire from flight item");
6457
+ console.error('Error trying to prepopulate carhire from flight item');
4694
6458
  }
4695
6459
  }
4696
6460
  }
@@ -4816,7 +6580,7 @@ class CarhireEnterpriseSearch extends BaseEnterpriseSearch {
4816
6580
  co2PerItem,
4817
6581
  co2PerPassenger,
4818
6582
  outboundDate: new Date(displayRecord.pickup).toISOString()
4819
- }, intBasket, this.searchService, this.travellers);
6583
+ }, intBasket, this.searchService, this.travellers, carHireVehicleAvailibility.requiresReason);
4820
6584
  }
4821
6585
  return Promise.resolve(false);
4822
6586
  });
@@ -4898,6 +6662,23 @@ class CarhireEnterpriseSearch extends BaseEnterpriseSearch {
4898
6662
  return this.searchService.saveFavouriteSearch(searchInfo);
4899
6663
  }
4900
6664
  }
6665
+ applyFavourite(fav) {
6666
+ return __awaiter(this, void 0, void 0, function* () {
6667
+ this.airCon = fav.aircon;
6668
+ this.carClass = fav.class;
6669
+ this.transmission = fav.transmission;
6670
+ this.chosenVendor = fav.vendor;
6671
+ this.carType = fav.type;
6672
+ this.return_to_pickup = fav.airport.pickupCode == fav.airport.dropoffCode;
6673
+ this.searchService.getAirportsList(fav.airport.pickupCode).subscribe(results => {
6674
+ this.pickup_location = results.find(a => a.gateway == fav.airport.pickupCode);
6675
+ });
6676
+ if (!this.return_to_pickup)
6677
+ this.searchService.getAirportsList(fav.airport.dropoffCode).subscribe(results => {
6678
+ this.dropoff_location = results.find(a => a.gateway == fav.airport.dropoffCode);
6679
+ });
6680
+ });
6681
+ }
4901
6682
  }
4902
6683
  CarhireEnterpriseSearch.STORAGE_SESSION_PARAMS = 'carhire_params';
4903
6684
  CarhireEnterpriseSearch.STORAGE_SESSION_RESULTS = 'carhire_results';
@@ -6274,7 +8055,7 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6274
8055
  };
6275
8056
  const selectedRuleSummary = this._ruleActionSummary.dualSingleWhenSelected[(_b = this.selectedGroupFlight) === null || _b === void 0 ? void 0 : _b.journeyHash] || {};
6276
8057
  const setSelected = (flight) => {
6277
- var _a, _b, _c, _d, _e, _f;
8058
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6278
8059
  flight.selected = flight.uid === ((_a = this.selectedGroupFlight) === null || _a === void 0 ? void 0 : _a.uid);
6279
8060
  flight.unavailable =
6280
8061
  ((_b = this._ruleActionSummary.journeyWhenSelected[flight.journeyHash]) === null || _b === void 0 ? void 0 : _b.unavailable) || ((_c = this._ruleActionSummary.whenSelectedAlone[flight.journeyHash]) === null || _c === void 0 ? void 0 : _c.unavailable) || ((_d = selectedRuleSummary[flight.journeyHash]) === null || _d === void 0 ? void 0 : _d.unavailable) ||
@@ -6282,6 +8063,12 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6282
8063
  flight.unavailableMessage =
6283
8064
  ((_e = this._ruleActionSummary.journeyWhenSelected[flight.journeyHash]) === null || _e === void 0 ? void 0 : _e.unavailableMessage) || ((_f = this._ruleActionSummary.whenSelectedAlone[flight.journeyHash]) === null || _f === void 0 ? void 0 : _f.unavailableMessage) ||
6284
8065
  '';
8066
+ flight.requiresReason =
8067
+ ((_g = this._ruleActionSummary.journeyWhenSelected[flight.journeyHash]) === null || _g === void 0 ? void 0 : _g.requiresReason) || ((_h = this._ruleActionSummary.whenSelectedAlone[flight.journeyHash]) === null || _h === void 0 ? void 0 : _h.requiresReason) || ((_j = selectedRuleSummary[flight.journeyHash]) === null || _j === void 0 ? void 0 : _j.requiresReason) ||
8068
+ false;
8069
+ flight.requiresReasonMessage =
8070
+ ((_k = this._ruleActionSummary.journeyWhenSelected[flight.journeyHash]) === null || _k === void 0 ? void 0 : _k.requiresReasonMessage) || ((_l = this._ruleActionSummary.whenSelectedAlone[flight.journeyHash]) === null || _l === void 0 ? void 0 : _l.requiresReasonMessage) ||
8071
+ '';
6285
8072
  return flight;
6286
8073
  };
6287
8074
  if (this.isGroupedFlights(this.fullResults)) {
@@ -6377,7 +8164,7 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6377
8164
  if (basket &&
6378
8165
  this.originalUserSearch.chosenSearchType === FlightSearchType.oneWay &&
6379
8166
  direction === FlightDirectionEnum.Outbound) {
6380
- // TODO becouse pop-up is not ready I commented the code.
8167
+ // TODO becouse pop-up is not ready I commented the code.
6381
8168
  // this.modalService.open( ModalTypes.FlightExtrasDialogComponent, { centered: true }, { flight: selectedFlight }).then(result => {
6382
8169
  // if (result) {
6383
8170
  this.bookSingleFlight(intBasket, selectedFlight);
@@ -6491,7 +8278,7 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6491
8278
  if (inboundDate) {
6492
8279
  booking.inboundDate = inboundDate;
6493
8280
  }
6494
- this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers);
8281
+ this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers, selectedFlight.requiresReason);
6495
8282
  }
6496
8283
  makeSchemaFlights(selectedFlight, flightGroup, groupIndex, segmentIndex) {
6497
8284
  return Object.assign(Object.assign({}, selectedFlight), { journeyInfo: {
@@ -6545,7 +8332,7 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6545
8332
  booking.inboundDate = inboundDate.format();
6546
8333
  schemaDetails.journeyType = 'roundtrip';
6547
8334
  }
6548
- return this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers);
8335
+ return this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers, flightQuote.requiresReason);
6549
8336
  }
6550
8337
  return Promise.resolve(false); // TODO should this throw an error?
6551
8338
  });
@@ -6726,6 +8513,39 @@ class FlightEnterpriseSearch extends BaseEnterpriseSearch {
6726
8513
  return this.searchService.saveFavouriteSearch(searchInfo);
6727
8514
  }
6728
8515
  }
8516
+ applyFavourite(fav) {
8517
+ return __awaiter(this, void 0, void 0, function* () {
8518
+ this.chosenSearchType = fav.multiDestination ? FlightSearchType.multiCity : fav.returnTrip ? FlightSearchType.return : FlightSearchType.oneWay;
8519
+ if (this.chosenSearchType == FlightSearchType.multiCity) {
8520
+ const multi = yield Promise.all(fav.multiDestination.map((a) => __awaiter(this, void 0, void 0, function* () {
8521
+ let destination = { date: undefined, dest: undefined, orig: undefined };
8522
+ destination.orig = yield this.searchService.getAirportsList(a.orig).toPromise().then(origResults => {
8523
+ return origResults.find(b => b.gateway == a.orig);
8524
+ });
8525
+ destination.dest = yield this.searchService.getAirportsList(a.dest).toPromise().then(destResults => {
8526
+ return destResults.find(b => b.gateway == a.dest);
8527
+ });
8528
+ return destination;
8529
+ })));
8530
+ this.multiDestination = multi;
8531
+ }
8532
+ else {
8533
+ this.searchService.getAirportsList(fav.originAirport).subscribe(results => {
8534
+ this.departLocation = results.find(a => a.gateway == fav.originAirport);
8535
+ });
8536
+ this.searchService.getAirportsList(fav.destinationAirport).subscribe(results => {
8537
+ this.arriveLocation = results.find(a => a.gateway == fav.destinationAirport);
8538
+ });
8539
+ }
8540
+ this.cabinClass = fav.outboundCabinClass[0];
8541
+ this.returnCabinClass = this.chosenSearchType != FlightSearchType.return ? null : fav.returnCabinClass[0];
8542
+ this.includeNearbyAirports = fav.includeNearbyAirports;
8543
+ this.adults = fav.passengers.filter((a) => a.type == "ADULT").length;
8544
+ this.children = fav.passengers.filter((a) => a.type == "CHILD").length;
8545
+ // this.preferredCarriers = fav.preferredCarriers.map((a: any) => {
8546
+ // })
8547
+ });
8548
+ }
6729
8549
  updateSerchQuery(query) {
6730
8550
  const searchQuery = query;
6731
8551
  switch (this.chosenSearchType) {
@@ -6844,17 +8664,18 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
6844
8664
  this.multiResultsSessionName = HotelEnterpriseSearch.STORAGE_SESSION_RESULTS;
6845
8665
  this.query = {};
6846
8666
  this.filterResults = () => {
6847
- this.results.next(this.fullResults.filter((hotel) => {
8667
+ this.resultsFilterMethod = (results) => results.filter((hotel) => {
6848
8668
  return (this.inPriceRange(hotel) &&
6849
8669
  this.inDistanceRange(hotel) &&
6850
8670
  this.containsHotelname(hotel) &&
6851
8671
  this.hasChain(hotel) &&
6852
8672
  this.breakfastTypeFilter(hotel));
6853
- }));
8673
+ });
8674
+ this.results.next(this.resultsFilterMethod(this.fullResults));
6854
8675
  };
6855
8676
  // Lightening Filters
6856
8677
  this.filterLighteningResults = () => {
6857
- this.results.next(this.fullResults.filter((hotel) => {
8678
+ this.resultsFilterMethod = (results) => results.filter((hotel) => {
6858
8679
  return (this.inLighteningPriceRange(hotel) &&
6859
8680
  this.containsHotelname(hotel) &&
6860
8681
  this.hasChain(hotel) &&
@@ -6862,7 +8683,8 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
6862
8683
  this.breakfastTypeFilter(hotel) &&
6863
8684
  this.getExtraFilter(hotel) &&
6864
8685
  this.getAmenitiesFilter(hotel));
6865
- }));
8686
+ });
8687
+ this.results.next(this.resultsFilterMethod(this.fullResults));
6866
8688
  };
6867
8689
  this.results_details.chains = new Set();
6868
8690
  const data = storageService.getSessionItem(HotelEnterpriseSearch.STORAGE_SESSION_PARAMS) || {
@@ -7091,6 +8913,9 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7091
8913
  get max_occupant_array() {
7092
8914
  return this._max_occupant_array;
7093
8915
  }
8916
+ get max_no_of_rooms() {
8917
+ return this._max_no_of_rooms;
8918
+ }
7094
8919
  get distance_list() {
7095
8920
  return this._distance_list;
7096
8921
  }
@@ -7143,12 +8968,14 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7143
8968
  })
7144
8969
  .pipe(take(1))
7145
8970
  .subscribe((data1) => {
7146
- this.results.next(this.fullResults.map((hotel) => {
8971
+ const filterResults = this.resultsFilterMethod(this.fullResults);
8972
+ const travleResults = filterResults.map((hotel) => {
7147
8973
  if (data1[hotel.id]) {
7148
8974
  return this.avaliabilityService.setHotelAvalability(data1[hotel.id]);
7149
8975
  }
7150
8976
  return hotel;
7151
- }));
8977
+ });
8978
+ this.results.next(travleResults);
7152
8979
  });
7153
8980
  }
7154
8981
  makeLocations(location) {
@@ -7368,7 +9195,7 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7368
9195
  break;
7369
9196
  case LocationTypes.TrainStation:
7370
9197
  this.getRailStationByCode(recentSearch.searchArgs.trainStationCode).subscribe((trainsStation) => {
7371
- this.trainsStation = trainsStation;
9198
+ this.trainsStation = Object.assign(Object.assign({}, trainsStation), { type: LocationTypes.TrainStation });
7372
9199
  this.searchService.startSearches();
7373
9200
  });
7374
9201
  break;
@@ -7674,33 +9501,41 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7674
9501
  }
7675
9502
  updateFromPreviousSearches(previousItems) {
7676
9503
  var _a, _b;
7677
- console.log("PREPOPULATING HOTEL FORM");
9504
+ console.log('PREPOPULATING HOTEL FORM');
7678
9505
  const flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
7679
9506
  const railItem = (_b = previousItems[ServiceType.Rail]) === null || _b === void 0 ? void 0 : _b.searchQuery;
7680
9507
  if (flightItem) {
7681
9508
  try {
7682
9509
  this.location_type_select = LocationTypes.Airport;
7683
- this.checkin_date = this.searchService.searches[ServiceType.Flight].outBoundDate;
7684
- this.checkout_date = this.searchService.searches[ServiceType.Flight].inboundDate;
9510
+ this.checkin_date =
9511
+ this.searchService.searches[ServiceType.Flight].outBoundDate;
9512
+ this.checkout_date =
9513
+ this.searchService.searches[ServiceType.Flight].inboundDate;
7685
9514
  this.location = {
7686
- name: this.searchService.searches[ServiceType.Flight].arriveLocation.destination,
9515
+ name: this.searchService.searches[ServiceType.Flight]
9516
+ .arriveLocation.destination,
7687
9517
  type: 'Airport',
7688
9518
  airport: this.searchService.searches[ServiceType.Flight].arriveLocation
7689
9519
  };
7690
9520
  }
7691
9521
  catch (_c) {
7692
- console.error("Error trying to prepopulate hotel from flight item");
9522
+ console.error('Error trying to prepopulate hotel from flight item');
7693
9523
  }
7694
9524
  }
7695
9525
  else if (railItem) {
7696
9526
  try {
7697
9527
  this.location_type_select = LocationTypes.TrainStation;
7698
- this.checkin_date = this.searchService.searches[ServiceType.Rail].outBoundDateTime;
7699
- this.checkout_date = this.searchService.searches[ServiceType.Rail].inBoundDateTime;
7700
- this.trainsStation = this.searchService.searches[ServiceType.Rail].travellingTo;
9528
+ this.checkin_date =
9529
+ this.searchService.searches[ServiceType.Rail].outBoundDateTime;
9530
+ this.checkout_date =
9531
+ this.searchService.searches[ServiceType.Rail].inBoundDateTime;
9532
+ this.trainsStation = this.searchService.searches[ServiceType.Rail]
9533
+ .travellingTo;
9534
+ this.location = this.searchService.searches[ServiceType.Rail]
9535
+ .travellingTo;
7701
9536
  }
7702
9537
  catch (_d) {
7703
- console.error("Error trying to prepopulate hotel from rail item");
9538
+ console.error('Error trying to prepopulate hotel from rail item');
7704
9539
  }
7705
9540
  }
7706
9541
  }
@@ -7931,7 +9766,7 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7931
9766
  }, intBasket, this.searchService,
7932
9767
  // this is an array of 1 or 2 travellers which go in 1 room
7933
9768
  // chunk
7934
- bookedTravellersChunks[index] || []);
9769
+ bookedTravellersChunks[index] || [], hotelRoom.requiresReason);
7935
9770
  // if (index === bookedTravellersChunks.length - 1) {
7936
9771
  if (index === roomArray.length - 1) {
7937
9772
  return Promise.resolve(true);
@@ -7979,8 +9814,32 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
7979
9814
  return this.searchService.saveFavouriteSearch(searchInfo);
7980
9815
  }
7981
9816
  }
9817
+ applyFavourite(fav) {
9818
+ return __awaiter(this, void 0, void 0, function* () {
9819
+ this.no_of_occupants = fav.adults;
9820
+ this.no_of_rooms = fav.rooms;
9821
+ this.distance = fav.distance;
9822
+ this.currency = fav.currency;
9823
+ let location = { latitude: fav.latitude, longitude: fav.longitude, countryCode: fav.countryCode, name: fav.cityName };
9824
+ if (fav.trainStationCode)
9825
+ location.type = LocationTypes.TrainStation;
9826
+ else if (fav.officeId)
9827
+ location.type = LocationTypes.Office;
9828
+ else if (fav.iata)
9829
+ location.type = LocationTypes.Airport;
9830
+ else if (fav.postOrZipCode)
9831
+ location.type = LocationTypes.Postcode;
9832
+ else
9833
+ location.type = LocationTypes.City;
9834
+ this.location = location;
9835
+ this.hotel_name = fav.hotelName;
9836
+ if (fav.groupName)
9837
+ this.hotel_chain = { name: fav.groupName };
9838
+ else
9839
+ this.hotel_chain = null;
9840
+ });
9841
+ }
7982
9842
  }
7983
- HotelEnterpriseSearch.MAX_HOTEL_ROOMS = 4;
7984
9843
  HotelEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_hotel';
7985
9844
  HotelEnterpriseSearch.STORAGE_SESSION_RESULTS = 'results_hotel';
7986
9845
 
@@ -8256,16 +10115,21 @@ class LoungesEnterpriseSearch extends BaseEnterpriseSearch {
8256
10115
  }
8257
10116
  updateFromPreviousSearches(previousItems) {
8258
10117
  var _a;
8259
- console.log("PREPOPULATING LOUNGE FORM");
10118
+ console.log('PREPOPULATING LOUNGE FORM');
8260
10119
  const flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
8261
10120
  if (flightItem) {
8262
10121
  try {
8263
10122
  let date = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
8264
- this.date = { day: date.getUTCDate(), month: date.getUTCMonth() + 1, year: date.getUTCFullYear() };
8265
- this.locationCode = this.searchService.searches[ServiceType.Flight].arriveLocation;
10123
+ this.date = {
10124
+ day: date.getUTCDate(),
10125
+ month: date.getUTCMonth() + 1,
10126
+ year: date.getUTCFullYear()
10127
+ };
10128
+ this.locationCode = this.searchService.searches[ServiceType.Flight]
10129
+ .arriveLocation;
8266
10130
  }
8267
10131
  catch (_b) {
8268
- console.error("Error trying to prepopulate parking from lounge item");
10132
+ console.error('Error trying to prepopulate parking from lounge item');
8269
10133
  }
8270
10134
  }
8271
10135
  }
@@ -8309,7 +10173,7 @@ class LoungesEnterpriseSearch extends BaseEnterpriseSearch {
8309
10173
  currency: loungeQuote.currency,
8310
10174
  searchQuery: loungeQuery,
8311
10175
  outboundDate: loungeQuery.arrivalDatetime.format()
8312
- }, intBasket, this.searchService, this.travellers);
10176
+ }, intBasket, this.searchService, this.travellers, loungeQuote.requiresReason);
8313
10177
  }
8314
10178
  return Promise.resolve(false); // TODO should this throw an error?
8315
10179
  });
@@ -8400,6 +10264,17 @@ class LoungesEnterpriseSearch extends BaseEnterpriseSearch {
8400
10264
  return this.searchService.saveFavouriteSearch(searchInfo);
8401
10265
  }
8402
10266
  }
10267
+ applyFavourite(fav) {
10268
+ return __awaiter(this, void 0, void 0, function* () {
10269
+ this.searchService.getAirportsList(fav.locationCode).subscribe(a => {
10270
+ this.locationCode = a.find(a => a.gateway == fav.locationCode);
10271
+ this.terminal = fav.terminal;
10272
+ });
10273
+ this.adults = fav.adults;
10274
+ this.children = fav.children;
10275
+ this.infants = fav.infants;
10276
+ });
10277
+ }
8403
10278
  }
8404
10279
  LoungesEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_lounge';
8405
10280
  LoungesEnterpriseSearch.STORAGE_SESSION_RESULTS = 'results_lounge';
@@ -8751,18 +10626,27 @@ class ParkingEnterpriseSearch extends BaseEnterpriseSearch {
8751
10626
  }
8752
10627
  updateFromPreviousSearches(previousItems) {
8753
10628
  var _a;
8754
- console.log("PREPOPULATING PARKING FORM");
10629
+ console.log('PREPOPULATING PARKING FORM');
8755
10630
  const flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
8756
10631
  if (flightItem) {
8757
10632
  try {
8758
10633
  let startDate = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
8759
10634
  let endDate = this.searchService.searches[ServiceType.Flight].inboundDate.toDate();
8760
- this.outdate = { day: startDate.getUTCDate(), month: startDate.getUTCMonth() + 1, year: startDate.getUTCFullYear() };
8761
- this.indate = { day: endDate.getUTCDate(), month: endDate.getUTCMonth() + 1, year: endDate.getUTCFullYear() };
8762
- this.locationCode = this.searchService.searches[ServiceType.Flight].arriveLocation;
10635
+ this.outdate = {
10636
+ day: startDate.getUTCDate(),
10637
+ month: startDate.getUTCMonth() + 1,
10638
+ year: startDate.getUTCFullYear()
10639
+ };
10640
+ this.indate = {
10641
+ day: endDate.getUTCDate(),
10642
+ month: endDate.getUTCMonth() + 1,
10643
+ year: endDate.getUTCFullYear()
10644
+ };
10645
+ this.locationCode = this.searchService.searches[ServiceType.Flight]
10646
+ .arriveLocation;
8763
10647
  }
8764
10648
  catch (_b) {
8765
- console.error("Error trying to prepopulate parking from flight item");
10649
+ console.error('Error trying to prepopulate parking from flight item');
8766
10650
  }
8767
10651
  }
8768
10652
  }
@@ -8790,7 +10674,7 @@ class ParkingEnterpriseSearch extends BaseEnterpriseSearch {
8790
10674
  searchQuery: parkingQuery,
8791
10675
  outboundDate: parkingQuery.arrivalDatetime.format(),
8792
10676
  inboundDate: parkingQuery.departDatetime.format()
8793
- }, intBasket, this.searchService, this.travellers);
10677
+ }, intBasket, this.searchService, this.travellers, parkingQuote.requiresReason);
8794
10678
  }
8795
10679
  return Promise.resolve(false);
8796
10680
  });
@@ -8861,6 +10745,17 @@ class ParkingEnterpriseSearch extends BaseEnterpriseSearch {
8861
10745
  return this.searchService.saveFavouriteSearch(searchInfo);
8862
10746
  }
8863
10747
  }
10748
+ applyFavourite(fav) {
10749
+ return __awaiter(this, void 0, void 0, function* () {
10750
+ this.searchService.getAirportsList(fav.locationCode).subscribe(a => {
10751
+ this.locationCode = a.find(a => a.gateway == fav.locationCode);
10752
+ this.terminal = fav.terminal;
10753
+ });
10754
+ // this.arrivalDatetime = moment((fav.arrivalDatetime as string).split("T")[0], "YYYY-MM-DD")
10755
+ // this.departDatetime = moment((fav.departDatetime as string).split("T")[0], "YYYY-MM-DD")
10756
+ // this.locationCode = fav.locationCode
10757
+ });
10758
+ }
8864
10759
  }
8865
10760
  ParkingEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_parking';
8866
10761
  ParkingEnterpriseSearch.STORAGE_SESSION_RESULTS = 'results_parking';
@@ -8932,11 +10827,12 @@ var SortMethod;
8932
10827
  SortMethod["sortByDate"] = "sortByDate";
8933
10828
  })(SortMethod || (SortMethod = {}));
8934
10829
  class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
8935
- constructor(eurostarFetcher, helpers, userService, basketService, storageService, searchService) {
10830
+ constructor(eurostarFetcher, helpers, userService, basketService, storageService, searchService, modalService) {
8936
10831
  super(storageService, helpers);
8937
10832
  this.eurostarFetcher = eurostarFetcher;
8938
10833
  this.basketService = basketService;
8939
10834
  this.searchService = searchService;
10835
+ this.modalService = modalService;
8940
10836
  this.type = ServiceType.Eurostar;
8941
10837
  this.avaliableClasses = new BehaviorSubject([]);
8942
10838
  this.timeCriteriaOptions = new BehaviorSubject([]);
@@ -9448,7 +11344,8 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
9448
11344
  price: NaN,
9449
11345
  currency: 'GBP',
9450
11346
  selected: false
9451
- }
11347
+ },
11348
+ requiresReason: false
9452
11349
  };
9453
11350
  // returnObject.duration = results.outboundTotalDuration;
9454
11351
  results.forEach((flight) => {
@@ -9517,7 +11414,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
9517
11414
  });
9518
11415
  this.validationMessages = [];
9519
11416
  if (!this._originAirport) {
9520
- this.validationMessages.push('Please add in a departutre location');
11417
+ this.validationMessages.push('Please add in a departure location');
9521
11418
  }
9522
11419
  if (!this._destinationAirport) {
9523
11420
  this.validationMessages.push('Please add in a arrival destination');
@@ -9535,10 +11432,31 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
9535
11432
  if (this.tempParams.outBoundDate.isSameOrAfter(this.tempParams.inTimeCriteria)) {
9536
11433
  this.validationMessages.push('Return date must be after the departure date');
9537
11434
  }
11435
+ // this is stuff for matching cabin classes
11436
+ if (!this.checkCabinMatchisValid()) {
11437
+ this.validationMessages.push('The types of cabin classes selected are not compatible. Examples of compatible cabin classes; Any - Any, Standard - Standard, Business - Business');
11438
+ }
9538
11439
  }
9539
11440
  this.isValid.next(this.validationMessages.length === 0);
9540
11441
  this.messages.next(this.validationMessages);
9541
11442
  }
11443
+ checkCabinMatchisValid() {
11444
+ switch (this.tempParams.cabinClass) {
11445
+ case FlightCabinClass.Any:
11446
+ return this.tempParams.returnCabinClass === FlightCabinClass.Any;
11447
+ case FlightCabinClass.Economy:
11448
+ case FlightCabinClass.PremiumEconomy:
11449
+ return (this.tempParams.returnCabinClass !== FlightCabinClass.Business &&
11450
+ this.tempParams.returnCabinClass !== FlightCabinClass.Any);
11451
+ case FlightCabinClass.Business:
11452
+ return !(this.tempParams.returnCabinClass === FlightCabinClass.Economy ||
11453
+ this.tempParams.returnCabinClass ===
11454
+ FlightCabinClass.PremiumEconomy ||
11455
+ this.tempParams.returnCabinClass === FlightCabinClass.Any);
11456
+ default:
11457
+ return true;
11458
+ }
11459
+ }
9542
11460
  startSearch() {
9543
11461
  this.results.next([]);
9544
11462
  this._isValid();
@@ -9573,8 +11491,20 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
9573
11491
  if (this.arriveLocation) {
9574
11492
  searchQuery.arriveLocation = this.arriveLocation;
9575
11493
  }
11494
+ searchQuery.outboundCabinClassName = this.turnCabinTypeToName(this.tempParams.cabinClass);
11495
+ if (this.isReturn) {
11496
+ searchQuery.returnCabinClassName =
11497
+ this.tempParams.cabinClass === this.tempParams.returnCabinClass
11498
+ ? searchQuery.outboundCabinClassName
11499
+ : this.turnCabinTypeToName(this.tempParams.returnCabinClass);
11500
+ }
9576
11501
  return searchQuery;
9577
11502
  }
11503
+ turnCabinTypeToName(classType) {
11504
+ const classes = this.avaliableClasses.value;
11505
+ const selectedCalssName = classes.find((classItem) => classItem.type === classType).name;
11506
+ return [selectedCalssName];
11507
+ }
9578
11508
  startRecentSearch(recentSearch) {
9579
11509
  if (recentSearch.searchArgs.outboundDate) {
9580
11510
  let outboundTimeWindow = recentSearch.searchArgs
@@ -9988,7 +11918,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
9988
11918
  outboundFlights: [this.makeSchemaFlights(fare.fare, 'outbound', 0)],
9989
11919
  inboundFlights: [],
9990
11920
  journeyType: 'single'
9991
- }, selectedEurostar.dateDeparture, null, fare.price);
11921
+ }, selectedEurostar.dateDeparture, null, fare.price, selectedEurostar.requiresReason);
9992
11922
  return;
9993
11923
  }
9994
11924
  // return logic needs updating - either accept outbound or return and somehow distiguish them
@@ -10010,7 +11940,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10010
11940
  this.makeSchemaFlights(fare.fare, 'outbound', 0)
10011
11941
  ],
10012
11942
  journeyType: 'roundtrip'
10013
- }, selectedEurostar.dateDeparture, this.selectedGroupEurostar.item.dateArrival, price);
11943
+ }, selectedEurostar.dateDeparture, this.selectedGroupEurostar.item.dateArrival, price, selectedEurostar.requiresReason);
10014
11944
  this.resetSelectedFares();
10015
11945
  this.basketService.toggleMenu();
10016
11946
  this.results.next(this.fullResults.map(this.removeSelectedFlags));
@@ -10050,7 +11980,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10050
11980
  ],
10051
11981
  inboundFlights: [this.makeSchemaFlights(fare.fare, 'inbound', 0)],
10052
11982
  journeyType: 'roundtrip'
10053
- }, selectedEurostar.dateDeparture, this.selectedGroupEurostar.item.dateArrival, price);
11983
+ }, selectedEurostar.dateDeparture, this.selectedGroupEurostar.item.dateArrival, price, selectedEurostar.requiresReason);
10054
11984
  this.resetSelectedFares();
10055
11985
  this.basketService.toggleMenu();
10056
11986
  this.results.next(this.fullResults.map(this.removeSelectedFlags));
@@ -10119,7 +12049,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10119
12049
  return cheapestPrice;
10120
12050
  }, { amount: Number.MAX_SAFE_INTEGER, currencyCode: currency });
10121
12051
  }
10122
- doBooking(intBasket, selectedFlight, schemaDetails, outboundDate, inboundDate, price) {
12052
+ doBooking(intBasket, selectedFlight, schemaDetails, outboundDate, inboundDate, price, requiresReason) {
10123
12053
  const { sourceId, co2PerItem, co2PerPassenger, total } = selectedFlight;
10124
12054
  const booking = {
10125
12055
  adults: this.adults,
@@ -10137,7 +12067,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10137
12067
  if (inboundDate) {
10138
12068
  booking.inboundDate = inboundDate;
10139
12069
  }
10140
- this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers);
12070
+ this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers, requiresReason);
10141
12071
  }
10142
12072
  makeSchemaFlights(selectedFlight, flightGroup, groupIndex, segmentIndex) {
10143
12073
  return Object.assign(Object.assign({}, selectedFlight), { journeyInfo: {
@@ -10252,7 +12182,7 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10252
12182
  booking.inboundDate = inboundDate.format();
10253
12183
  schemaDetails.journeyType = 'roundtrip';
10254
12184
  }
10255
- return this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers);
12185
+ return this.basketService.addToBasket(booking, intBasket, this.searchService, this.travellers, eurostarQuote.requiresReason);
10256
12186
  }
10257
12187
  return Promise.resolve(false); // TODO should this throw an error?
10258
12188
  });
@@ -10403,6 +12333,37 @@ class EurostarEnterpriseSearch extends BaseEnterpriseSearch {
10403
12333
  return this.searchService.saveFavouriteSearch(searchInfo);
10404
12334
  }
10405
12335
  }
12336
+ applyFavourite(fav) {
12337
+ return __awaiter(this, void 0, void 0, function* () {
12338
+ this.fareType = fav.fareType;
12339
+ this.includeNearbyAirports = fav.includeNearbyAirports;
12340
+ this.chosenSearchType = fav.returnTrip ? EurostarSearchType.return : EurostarSearchType.oneWay;
12341
+ this.searchService.getAirportsList(fav.originAirport).subscribe(results => {
12342
+ this.departLocation = results.find(a => a.gateway == fav.originAirport);
12343
+ });
12344
+ this.searchService.getAirportsList(fav.destinationAirport).subscribe(results => {
12345
+ this.arriveLocation = results.find(a => a.gateway == fav.destinationAirport);
12346
+ });
12347
+ this._passengers = fav.passengers;
12348
+ this.adults = fav.passengers.filter((a) => a.type == "ADULT").length;
12349
+ this.children = fav.passengers.filter((a) => a.type == "CHILD").length;
12350
+ });
12351
+ }
12352
+ openEurostarFareRules(basketItem) {
12353
+ const flights = [...basketItem.detail.outboundFlights];
12354
+ flights[0].fareInfo = flights[0].journeyInfo;
12355
+ delete flights[0].journeyInfo;
12356
+ const rulesFromCall = this.searchService.getFlightFareRules(flights[0]);
12357
+ rulesFromCall.subscribe((data) => {
12358
+ this.modalService.open(ModalTypes.ModalFlightFareComponent, null, {
12359
+ rules: data.results[0],
12360
+ from: flights[0].originAirport,
12361
+ to: flights[flights.length - 1].destinationAirport
12362
+ });
12363
+ }, (err) => {
12364
+ console.log(err);
12365
+ });
12366
+ }
10406
12367
  }
10407
12368
  EurostarEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_eurostar';
10408
12369
  EurostarEnterpriseSearch.STORAGE_SESSION_RESULTS = 'results_eurostar';
@@ -10682,6 +12643,9 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
10682
12643
  if ((_a = tt === null || tt === void 0 ? void 0 : tt.railstation) === null || _a === void 0 ? void 0 : _a.id) {
10683
12644
  this._travellingTo = tt.railstation.id;
10684
12645
  }
12646
+ else if (tt === null || tt === void 0 ? void 0 : tt.id) {
12647
+ this._travellingTo = tt.id;
12648
+ }
10685
12649
  this._isValid();
10686
12650
  }
10687
12651
  get travellingFrom() {
@@ -10694,6 +12658,9 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
10694
12658
  if ((_a = tt === null || tt === void 0 ? void 0 : tt.railstation) === null || _a === void 0 ? void 0 : _a.id) {
10695
12659
  this._travellingFrom = tt.railstation.id;
10696
12660
  }
12661
+ else if (tt === null || tt === void 0 ? void 0 : tt.id) {
12662
+ this._travellingFrom = tt.id;
12663
+ }
10697
12664
  this._isValid();
10698
12665
  }
10699
12666
  get chosenRailClass() {
@@ -11008,7 +12975,7 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11008
12975
  inboundCheapest: inPrices.cheapestTickets,
11009
12976
  cheapestClassTicket: inPrices.cheapestClassTicket,
11010
12977
  cheapestClassTicketReturn: outPrices.outboundClassTicket,
11011
- cheapestClassTicketDual: inPrices.outboundClassTicket,
12978
+ cheapestClassTicketDual: inPrices.outboundClassTicket
11012
12979
  });
11013
12980
  return Object.assign(Object.assign({}, railResult), { outbound, return: inbound });
11014
12981
  });
@@ -11100,7 +13067,8 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11100
13067
  if (isStandardClassSingle) {
11101
13068
  const inboundPrice = min(prices1.cheapestClassTicket.inboundStandardClassFare, dualSingleStandardJourneys, journey);
11102
13069
  const outboundTotalPrice = prices1.cheapestClassTicket.standardClassFare.price;
11103
- if (outboundTotalPrice > prices1.outboundClassTicket.standardClassFare.price) {
13070
+ if (outboundTotalPrice >
13071
+ prices1.outboundClassTicket.standardClassFare.price) {
11104
13072
  prices1.cheapestClassTicket.standardClassFare =
11105
13073
  prices1.outboundClassTicket.standardClassFare;
11106
13074
  // prices1.cheapestClassTicket.inboundStandardClassFare = {
@@ -11109,7 +13077,8 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11109
13077
  // fare: null
11110
13078
  // };
11111
13079
  }
11112
- else if (inboundPrice.price > prices1.cheapestClassTicket.inboundStandardClassFare.price) {
13080
+ else if (inboundPrice.price >
13081
+ prices1.cheapestClassTicket.inboundStandardClassFare.price) {
11113
13082
  prices1.cheapestClassTicket.inboundStandardClassFare =
11114
13083
  inboundPrice;
11115
13084
  }
@@ -11128,7 +13097,8 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11128
13097
  // fare: null
11129
13098
  // };
11130
13099
  }
11131
- else if (inboundPrice.price > prices1.cheapestClassTicket.inboundFirstClassFare.price) {
13100
+ else if (inboundPrice.price >
13101
+ prices1.cheapestClassTicket.inboundFirstClassFare.price) {
11132
13102
  prices1.cheapestClassTicket.inboundFirstClassFare = inboundPrice;
11133
13103
  }
11134
13104
  }
@@ -11471,14 +13441,16 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11471
13441
  fareIdentifiers: [outboundFare.identifiers.fareIdentifier],
11472
13442
  journeyIdentifier: outboundFare.identifiers.journeyIdentifier,
11473
13443
  isDualSingleReturn: true,
11474
- journeyLegs: this.removedScheduledPlatformFromCallingPoints(outbound.journeyLegs)
13444
+ journeyLegs: this.removedScheduledPlatformFromCallingPoints(outbound.journeyLegs),
13445
+ eTicket: !!outboundFare.eTicketAvailable
11475
13446
  },
11476
13447
  // ticketQueueList,
11477
13448
  return: {
11478
13449
  fareIdentifiers: [inboundFare.identifiers.fareIdentifier],
11479
13450
  journeyIdentifier: inboundFare.identifiers.journeyIdentifier,
11480
13451
  isDualSingleReturn: true,
11481
- journeyLegs: this.removedScheduledPlatformFromCallingPoints(inbound.journeyLegs)
13452
+ journeyLegs: this.removedScheduledPlatformFromCallingPoints(inbound.journeyLegs),
13453
+ eTicket: !!inboundFare.eTicketAvailable
11482
13454
  },
11483
13455
  termsAndCond: termsAndConditions
11484
13456
  },
@@ -11498,7 +13470,7 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11498
13470
  if (outTicketExtras) {
11499
13471
  basketItem.detail.outbound.ticketExtras = outTicketExtras;
11500
13472
  }
11501
- return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers);
13473
+ return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers, outboundFare.requiresReason || inboundFare.requiresReason);
11502
13474
  }
11503
13475
  return Promise.resolve();
11504
13476
  });
@@ -11819,6 +13791,7 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11819
13791
  },
11820
13792
  transactionIdentifier: railFare.identifiers.transactionIdentifier,
11821
13793
  outbound: {
13794
+ eTicket: !!railFare.eTicketAvailable,
11822
13795
  fareIdentifiers: [railFare.identifiers.fareIdentifier],
11823
13796
  journeyIdentifier: railFare.identifiers.journeyIdentifier,
11824
13797
  journeyLegs: this.removedScheduledPlatformFromCallingPoints(railJourneyOption.journeyLegs)
@@ -11838,7 +13811,7 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11838
13811
  if (outTicketExtras) {
11839
13812
  basketItem.detail.outbound.ticketExtras = outTicketExtras;
11840
13813
  }
11841
- return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers);
13814
+ return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers, railFare.requiresReason);
11842
13815
  }
11843
13816
  return Promise.resolve();
11844
13817
  });
@@ -11907,12 +13880,14 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11907
13880
  },
11908
13881
  transactionIdentifier: outboundFare.identifiers.transactionIdentifier,
11909
13882
  outbound: {
13883
+ eTicket: !!outboundFare.eTicketAvailable,
11910
13884
  fareIdentifiers: [outboundFare.identifiers.fareIdentifier],
11911
13885
  journeyIdentifier: outboundFare.identifiers.journeyIdentifier,
11912
13886
  journeyLegs: this.removedScheduledPlatformFromCallingPoints(outbound.journeyLegs)
11913
13887
  },
11914
13888
  // ticketQueueList,
11915
13889
  return: {
13890
+ eTicket: !!inboundFare.eTicketAvailable,
11916
13891
  fareIdentifiers: [inboundFare.identifiers.fareIdentifier],
11917
13892
  journeyIdentifier: inboundFare.identifiers.journeyIdentifier,
11918
13893
  journeyLegs: this.removedScheduledPlatformFromCallingPoints(inbound.journeyLegs)
@@ -11926,13 +13901,13 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11926
13901
  co2PerItem: outbound.co2PerItem,
11927
13902
  co2PerPassenger: outbound.co2PerPassenger,
11928
13903
  outboundDate: outbound.arriveDateTime,
11929
- inboundDate: inbound.arriveDateTime,
13904
+ inboundDate: inbound.arriveDateTime
11930
13905
  };
11931
13906
  // if ticketExtras exists add the object to basketItem
11932
13907
  if (ticketExtras) {
11933
13908
  basketItem.detail.outbound.ticketExtras = ticketExtras;
11934
13909
  }
11935
- return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers);
13910
+ return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers, outboundFare.requiresReason || inboundFare.requiresReason);
11936
13911
  }
11937
13912
  return Promise.resolve(false);
11938
13913
  });
@@ -11948,14 +13923,14 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
11948
13923
  return railLegs;
11949
13924
  }
11950
13925
  createTicketExtrasObject(railTicketExtra) {
11951
- let price = this.noOfChildren * (railTicketExtra === null || railTicketExtra === void 0 ? void 0 : railTicketExtra.childAmount) +
13926
+ const price = this.noOfChildren * (railTicketExtra === null || railTicketExtra === void 0 ? void 0 : railTicketExtra.childAmount) +
11952
13927
  this.noOfAdults * railTicketExtra.adultAmount;
11953
13928
  return [
11954
13929
  {
11955
13930
  type: railTicketExtra.identifiers.type,
11956
13931
  location: railTicketExtra.identifiers.location,
11957
13932
  date: railTicketExtra.identifiers.date,
11958
- price: price
13933
+ price
11959
13934
  }
11960
13935
  ];
11961
13936
  }
@@ -12121,6 +14096,41 @@ class RailEnterpriseSearch extends BaseEnterpriseSearch {
12121
14096
  return this.searchService.saveFavouriteSearch(searchInfo);
12122
14097
  }
12123
14098
  }
14099
+ applyFavourite(fav) {
14100
+ return __awaiter(this, void 0, void 0, function* () {
14101
+ this.noOfAdults = fav.adults;
14102
+ this.noOfChildren = fav.children;
14103
+ this.chosenSearchType = fav.journeyType;
14104
+ switch (fav.class) {
14105
+ case "First":
14106
+ this.chosenRailClass = RailClass.First;
14107
+ break;
14108
+ case "Any":
14109
+ this.chosenRailClass = RailClass.All;
14110
+ break;
14111
+ case "Standard":
14112
+ this.chosenRailClass = RailClass.Standard;
14113
+ break;
14114
+ }
14115
+ this.getRailStationFetcher.fetchList({ id: fav.departureLocationId }).subscribe(a => {
14116
+ this.travellingFrom = a;
14117
+ });
14118
+ this.getRailStationFetcher.fetchList({ id: fav.arrivalLocationId }).subscribe(a => {
14119
+ this.travellingTo = a;
14120
+ });
14121
+ if (fav.viaLocationId) {
14122
+ this.getRailStationFetcher.fetchList({ id: fav.viaLocationId }).subscribe(a => {
14123
+ this.viaLocation = a;
14124
+ });
14125
+ this.via = true;
14126
+ }
14127
+ else {
14128
+ this.viaLocation = null;
14129
+ this.via = false;
14130
+ }
14131
+ // this.
14132
+ });
14133
+ }
12124
14134
  }
12125
14135
  RailEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_rail';
12126
14136
  RailEnterpriseSearch.STORAGE_SESSION_RESULTS = 'rail_results';
@@ -12152,7 +14162,8 @@ class TravellerObject {
12152
14162
  isInfant: false,
12153
14163
  childDOB: null,
12154
14164
  guest: false,
12155
- name: user.surname + ' ' + user.forename
14165
+ name: user.surname + ' ' + user.forename,
14166
+ dob: user.dob
12156
14167
  };
12157
14168
  }
12158
14169
  static equals(first, second) {
@@ -12186,12 +14197,13 @@ var ClassType;
12186
14197
  ClassType["First_Class"] = "1st Class";
12187
14198
  })(ClassType || (ClassType = {}));
12188
14199
  class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12189
- constructor(Irlfetcher, irlDiscountCardsFetcher, helpers, basketService, storageService, searchService) {
14200
+ constructor(Irlfetcher, irlDiscountCardsFetcher, helpers, basketService, storageService, searchService, getIrlSupplierStationFetcher) {
12190
14201
  super(storageService, helpers);
12191
14202
  this.Irlfetcher = Irlfetcher;
12192
14203
  this.irlDiscountCardsFetcher = irlDiscountCardsFetcher;
12193
14204
  this.basketService = basketService;
12194
14205
  this.searchService = searchService;
14206
+ this.getIrlSupplierStationFetcher = getIrlSupplierStationFetcher;
12195
14207
  this.resultsSessionName = IRLEnterpriseSearch.STORAGE_SESSION_RESULTS;
12196
14208
  this.multiResultsSessionName = IRLEnterpriseSearch.STORAGE_SESSION_RESULTS;
12197
14209
  this._sortArray = [
@@ -12244,18 +14256,17 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12244
14256
  };
12245
14257
  this._supplier = null;
12246
14258
  this._countryCode = null;
12247
- this._class = null;
14259
+ this._class = IrlClass.All;
12248
14260
  this._outboundDepartureDateTime = null;
12249
14261
  this._departureLocationId = null;
12250
14262
  this._arrivalLocationId = null;
12251
- this._adults = 0;
12252
14263
  this._children = 0;
12253
14264
  this._cheapestStandard = null;
12254
14265
  this._cheapestFirst = null;
12255
14266
  this._returnDepartureDateTime = null;
12256
14267
  this._ageRange = null;
12257
- this._priceDir = false;
12258
- this._dateDir = false;
14268
+ this._priceDir = true;
14269
+ this._dateDir = true;
12259
14270
  this._irlDiscountCardsArray = [];
12260
14271
  // !date and time is handled differently for LU
12261
14272
  this._outbound_date = null;
@@ -12265,6 +14276,8 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12265
14276
  this._offline = false;
12266
14277
  this._irlClass = IrlClass.All;
12267
14278
  this._journeytype = IrlJourneyType.SingleJourney;
14279
+ this._trainNumber = null;
14280
+ this._additionalInstructions = null;
12268
14281
  const data = storageService.getSessionItem(IRLEnterpriseSearch.STORAGE_SESSION_PARAMS) || {
12269
14282
  query: {},
12270
14283
  tempParams: {},
@@ -12291,6 +14304,7 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12291
14304
  // searchService.startSearches();
12292
14305
  // }
12293
14306
  this._cheapestResultPrice = this.updateLowestPrice(results);
14307
+ this.fullResults = results;
12294
14308
  this.results.next(results || []);
12295
14309
  }
12296
14310
  get outboundJourneyOptions() {
@@ -12392,10 +14406,10 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12392
14406
  this._arrivalLocationId = data;
12393
14407
  }
12394
14408
  get adults() {
12395
- return this._adults;
14409
+ return this.tempParams.adults;
12396
14410
  }
12397
14411
  set adults(data) {
12398
- this._adults = data;
14412
+ this.tempParams.adults = data;
12399
14413
  }
12400
14414
  get children() {
12401
14415
  return this._children;
@@ -12566,6 +14580,18 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12566
14580
  get sortDropdownValues() {
12567
14581
  return this._sortArray;
12568
14582
  }
14583
+ get trainNumber() {
14584
+ return this._trainNumber;
14585
+ }
14586
+ set trainNumber(data) {
14587
+ this._trainNumber = data;
14588
+ }
14589
+ get additionalInstructions() {
14590
+ return this._additionalInstructions;
14591
+ }
14592
+ set additionalInstructions(data) {
14593
+ this._additionalInstructions = data;
14594
+ }
12569
14595
  processResults(results) {
12570
14596
  var _a;
12571
14597
  (_a = results[0]) === null || _a === void 0 ? void 0 : _a.outbound.forEach((item) => {
@@ -12684,10 +14710,16 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12684
14710
  }
12685
14711
  getSearchQuery() {
12686
14712
  // this.travellers = travellers;
12687
- this.noOfAdults = this.travellers.filter((traveller) => traveller.ageType === ages.Adult ||
12688
- traveller.ageType === ages.Youth ||
12689
- traveller.ageType === ages.Senior).length;
12690
- this.noOfChildren = this.travellers.filter((traveller) => traveller.ageType === ages.Child).length;
14713
+ if (!this.travellers) {
14714
+ this.noOfAdults = this.adults;
14715
+ this.noOfChildren = this.children;
14716
+ }
14717
+ else {
14718
+ this.noOfAdults = this.travellers.filter((traveller) => traveller.ageType === ages.Adult ||
14719
+ traveller.ageType === ages.Youth ||
14720
+ traveller.ageType === ages.Senior).length;
14721
+ this.noOfChildren = this.travellers.filter((traveller) => traveller.ageType === ages.Child).length;
14722
+ }
12691
14723
  if (!this.supplier && this.travellingFrom.name) {
12692
14724
  this.supplier = this.travellingFrom.railstation.supplier;
12693
14725
  this.getIrlDiscountCards().subscribe((data) => {
@@ -12698,7 +14730,7 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12698
14730
  supplier: this.supplier,
12699
14731
  countryCode: 'GB',
12700
14732
  irlDiscountCards: this.discountCard ? this.discountCard.id : null,
12701
- class: this.irlClass,
14733
+ class: this.class,
12702
14734
  outboundDepartureDateTime: this.tempParams.outboundDepartureDateTime,
12703
14735
  departureLocationId: this._travellingFrom,
12704
14736
  arrivalLocationId: this._travellingTo,
@@ -12802,15 +14834,16 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12802
14834
  // co2PerPassenger: irlJourneyOption.co2PerPassenger,
12803
14835
  outboundDate: irlJourneyOption.departDateTime
12804
14836
  };
12805
- return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers);
14837
+ return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers, false // TODO
14838
+ );
12806
14839
  }
12807
14840
  return Promise.resolve(false);
12808
14841
  });
12809
14842
  }
12810
- addReturnJourneyToBasket(serviceId, irlQuery, inbound, inJourneyOption) {
14843
+ addReturnJourneyToBasket(serviceId, irlQuery, inbound, inJourneyOption, outboundTicket, outboundJourney) {
12811
14844
  return __awaiter(this, void 0, void 0, function* () {
12812
- const outbound = this.outboundTicket;
12813
- const outJourneyOption = this.outboundJourneyOptions;
14845
+ const outbound = outboundTicket ? outboundTicket : this.outboundTicket;
14846
+ const outJourneyOption = outboundJourney ? outboundJourney : this.outboundJourneyOptions;
12814
14847
  const intBasket = yield this.basketService.getDefaultBasket();
12815
14848
  const basket = intBasket === null || intBasket === void 0 ? void 0 : intBasket.subject.value;
12816
14849
  if (basket) {
@@ -12848,7 +14881,7 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12848
14881
  supplierTickets: [
12849
14882
  {
12850
14883
  supplierName: inJourneyOption.providers[0].name,
12851
- ticketDescription: selectedIrlTicketOption.type,
14884
+ ticketDescription: inbound.type,
12852
14885
  legs: inboundLegs
12853
14886
  }
12854
14887
  ]
@@ -12864,7 +14897,7 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12864
14897
  termsAndCond: termsAndConditions
12865
14898
  },
12866
14899
  adults: irlQuery.adults,
12867
- price: selectedIrlTicketOption.price,
14900
+ price: Number((Number(selectedIrlTicketOption.price) + Number(inbound.price)).toFixed(2)),
12868
14901
  currency: selectedIrlTicketOption.currency,
12869
14902
  searchQuery: irlQuery,
12870
14903
  outboundDate: outJourneyOption.departDateTime
@@ -12872,15 +14905,18 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12872
14905
  // co2PerPassenger: outbound.co2PerPassenger
12873
14906
  };
12874
14907
  this.filterSelected();
12875
- return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers);
14908
+ console.log(basketItem);
14909
+ return this.basketService.addToBasket(basketItem, intBasket, this.searchService, this.travellers, false // TODO
14910
+ );
12876
14911
  }
12877
14912
  return Promise.resolve(false);
12878
14913
  });
12879
14914
  }
12880
14915
  updateLowestPrice(results) {
14916
+ var _a, _b, _c, _d;
12881
14917
  if (!results.length)
12882
14918
  return null;
12883
- const currency = results[0].outbound[0].providers[0].cheapestTicket.currency;
14919
+ const currency = (_d = (_c = (_b = (_a = results[0]) === null || _a === void 0 ? void 0 : _a.outbound[0]) === null || _b === void 0 ? void 0 : _b.providers[0]) === null || _c === void 0 ? void 0 : _c.cheapestTicket) === null || _d === void 0 ? void 0 : _d.currency;
12884
14920
  const price = this.findCheapestTicket(results);
12885
14921
  return {
12886
14922
  amount: price,
@@ -12925,8 +14961,10 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12925
14961
  * @returns
12926
14962
  * @memberof irl-enterprise-search
12927
14963
  */
12928
- sortByPrice() {
12929
- this.priceDir = !this.priceDir;
14964
+ sortByPrice(ignoreDirectionChange = false) {
14965
+ if (!ignoreDirectionChange) {
14966
+ this.priceDir = !this.priceDir;
14967
+ }
12930
14968
  const results = this.filterSelected(this._isFiltered);
12931
14969
  const byPrice = (a, b) => {
12932
14970
  return this.priceDir
@@ -12945,8 +14983,10 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
12945
14983
  * @returns
12946
14984
  * @memberof irl-enterprise-search
12947
14985
  */
12948
- sortByDate() {
12949
- this.dateDir = !this.dateDir;
14986
+ sortByDate(ignoreDirection = false) {
14987
+ if (!ignoreDirection) {
14988
+ this.dateDir = !this.dateDir;
14989
+ }
12950
14990
  const results = this.filterSelected(this._isFiltered);
12951
14991
  const byDate = (a, b) => {
12952
14992
  return this.dateDir
@@ -13029,6 +15069,166 @@ class IRLEnterpriseSearch extends BaseEnterpriseSearch {
13029
15069
  return this.searchService.saveFavouriteSearch(searchInfo);
13030
15070
  }
13031
15071
  }
15072
+ generateFilters(results) {
15073
+ // first of all we need to find the min price and the max price
15074
+ if (!(results === null || results === void 0 ? void 0 : results.length)) {
15075
+ return;
15076
+ }
15077
+ let priceMax = null;
15078
+ let priceMin = null;
15079
+ let dateDepMin = null;
15080
+ let dateDepMax = null;
15081
+ let dateArrMin = null;
15082
+ let dateArrMax = null;
15083
+ let classObject = {};
15084
+ let changesObject = {};
15085
+ results.forEach(result => {
15086
+ result.providers[0].ticketOptions.forEach(ticket => {
15087
+ if (!priceMax || priceMax < ticket.price) {
15088
+ priceMax = Math.ceil(ticket.price);
15089
+ }
15090
+ });
15091
+ if (!priceMin || priceMin > result.providers[0].cheapestTicket.price) {
15092
+ priceMin = Math.floor(result.providers[0].cheapestTicket.price);
15093
+ }
15094
+ if (!dateDepMin || moment(result.departDateTime).isBefore(moment(dateDepMin))) {
15095
+ dateDepMin = Number(moment(result.departDateTime).format('HHmm'));
15096
+ }
15097
+ if (!dateDepMax || moment(result.departDateTime).isAfter(moment(dateDepMax))) {
15098
+ dateDepMax = Number(moment(result.departDateTime).format('HHmm'));
15099
+ }
15100
+ if (!dateArrMin || moment(result.arriveDateTime).isBefore(moment(dateArrMin))) {
15101
+ dateArrMin = Number(moment(result.arriveDateTime).format('HHmm'));
15102
+ }
15103
+ if (!dateArrMax || moment(result.arriveDateTime).isAfter(moment(dateArrMax))) {
15104
+ dateArrMax = Number(moment(result.arriveDateTime).format('HHmm'));
15105
+ }
15106
+ changesObject[result.segments.length - 1] = {
15107
+ key: result.segments.length - 1,
15108
+ title: `${result.segments.length - 1} changes`,
15109
+ selected: false
15110
+ };
15111
+ result.providers[0].ticketOptions.forEach(ticket => {
15112
+ if (ticket.class === '1') {
15113
+ classObject['First'] = {
15114
+ key: ClassType.Class_1,
15115
+ title: 'First',
15116
+ selected: false
15117
+ };
15118
+ }
15119
+ else if (ticket.class === '2') {
15120
+ classObject['Second'] = {
15121
+ key: ClassType.Class_2,
15122
+ title: 'Second',
15123
+ selected: false
15124
+ };
15125
+ }
15126
+ });
15127
+ });
15128
+ const retObject = {
15129
+ priceMax,
15130
+ priceMin,
15131
+ dateArrMax,
15132
+ dateArrMin,
15133
+ dateDepMax,
15134
+ dateDepMin,
15135
+ classes: Object.values(classObject),
15136
+ changes: Object.values(changesObject)
15137
+ };
15138
+ console.log(retObject);
15139
+ return retObject;
15140
+ }
15141
+ applyFilters(filters, direction = 'O') {
15142
+ const fullResultsCopy = this.helpers.clone(this.fullResults);
15143
+ let dirResults;
15144
+ switch (direction) {
15145
+ case 'O':
15146
+ dirResults = fullResultsCopy[0].outbound;
15147
+ break;
15148
+ case 'I':
15149
+ dirResults = fullResultsCopy[0].return;
15150
+ break;
15151
+ }
15152
+ // now first of all - apply the price filters
15153
+ dirResults = dirResults.filter(result => {
15154
+ const tickets = result.providers[0].ticketOptions.filter(ticket => {
15155
+ return ticket.price >= filters.priceMin && ticket.price <= filters.priceMax;
15156
+ });
15157
+ result.providers[0].ticketOptions = tickets;
15158
+ return tickets.length;
15159
+ });
15160
+ // times
15161
+ // dep
15162
+ dirResults = dirResults.filter(result => {
15163
+ const depTime = Number(moment(result.departDateTime).format('HHmm'));
15164
+ return depTime >= filters.dateDepMin && depTime <= filters.dateDepMax;
15165
+ });
15166
+ // arr
15167
+ dirResults = dirResults.filter(result => {
15168
+ const arrTime = Number(moment(result.arriveDateTime).format('HHmm'));
15169
+ return arrTime >= filters.dateArrMin && arrTime <= filters.dateArrMax;
15170
+ });
15171
+ // classes
15172
+ // first of all determine if any are selected
15173
+ const selectedClasses = filters.classes.filter(classF => {
15174
+ return classF.selected;
15175
+ });
15176
+ if (selectedClasses === null || selectedClasses === void 0 ? void 0 : selectedClasses.length) {
15177
+ dirResults = dirResults.filter(result => {
15178
+ const newTickets = [];
15179
+ console.log('og tickets:', result.providers[0].ticketOptions);
15180
+ result.providers[0].ticketOptions.forEach(ticket => {
15181
+ selectedClasses.forEach(classS => {
15182
+ if (ticket.class === classS.key) {
15183
+ newTickets.push(ticket);
15184
+ }
15185
+ });
15186
+ });
15187
+ console.log(newTickets);
15188
+ result.providers[0].ticketOptions = newTickets;
15189
+ return newTickets.length > 0;
15190
+ });
15191
+ }
15192
+ console.log(dirResults);
15193
+ // finally stops
15194
+ const selectedStops = filters.changes.filter(change => {
15195
+ return change.selected;
15196
+ });
15197
+ if (selectedStops.length) {
15198
+ dirResults = dirResults.filter(result => {
15199
+ for (let i = 0; i < selectedStops.length; i++) {
15200
+ if (result.segments.length - 1 === selectedStops[i].key) {
15201
+ return result;
15202
+ }
15203
+ }
15204
+ });
15205
+ }
15206
+ switch (direction) {
15207
+ case 'O':
15208
+ fullResultsCopy[0].outbound = dirResults;
15209
+ break;
15210
+ case 'I':
15211
+ fullResultsCopy[0].return = dirResults;
15212
+ break;
15213
+ }
15214
+ this.results.next(fullResultsCopy);
15215
+ }
15216
+ applyFavourite(fav) {
15217
+ return __awaiter(this, void 0, void 0, function* () {
15218
+ this.getIrlSupplierStationFetcher.fetchList({ id: fav.departureLocationId }).subscribe(a => {
15219
+ this.travellingFrom = a;
15220
+ });
15221
+ this.getIrlSupplierStationFetcher.fetchList({ id: fav.arrivalLocationId }).subscribe(a => {
15222
+ this.travellingTo = a;
15223
+ });
15224
+ this.adults = fav.adults;
15225
+ this.children = fav.children;
15226
+ this.class = fav.class;
15227
+ this.countryCode = fav.countryCode;
15228
+ this.journeyType = fav.journeyType === "ReturnJourney" ? IrlJourneyType.ReturnJourney : IrlJourneyType.SingleJourney;
15229
+ this.supplier = fav.supplier;
15230
+ });
15231
+ }
13032
15232
  }
13033
15233
  IRLEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_irl';
13034
15234
  IRLEnterpriseSearch.STORAGE_SESSION_RESULTS = 'irl_results';
@@ -13217,7 +15417,7 @@ class SupplementaryBookingInfoImpl {
13217
15417
  item.format ||
13218
15418
  this.schemaWidgetToFormat(item.widget) ||
13219
15419
  this.schemaTypeToFormat(item.type);
13220
- if (item.oneOf && item.oneOf.length > 0 && item.format !== 'railSeating') {
15420
+ if (item.oneOf && item.oneOf.length > 0 && item.format !== 'railSeating' && item.format !== SchemaFormat.selectQueue) {
13221
15421
  item.format = SchemaFormat.select;
13222
15422
  }
13223
15423
  });
@@ -13520,6 +15720,16 @@ class BaseGetRailStationFetcher extends FetchableList {
13520
15720
  }
13521
15721
  }
13522
15722
 
15723
+ class BaseGetIrlSupplierStationFetcher extends FetchableList {
15724
+ constructor(gql, helpers, modalService) {
15725
+ super(gql, helpers, modalService);
15726
+ }
15727
+ getDataFromResult(results) {
15728
+ var _a;
15729
+ return (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.getIRLSupplierStation;
15730
+ }
15731
+ }
15732
+
13523
15733
  class BaseGetRiskAlertsFetcher extends FetchableList {
13524
15734
  constructor(gql, helpers, modalService) {
13525
15735
  super(gql, helpers, modalService);
@@ -13841,6 +16051,75 @@ class BaseEmailBasketFetcher extends FetchableList {
13841
16051
  }
13842
16052
  }
13843
16053
 
16054
+ class BaseFastTrackQuoteFetcher extends FetchableList {
16055
+ constructor(gql, helpers, modalService) {
16056
+ super(gql, helpers, modalService);
16057
+ }
16058
+ getDataFromResult(results) {
16059
+ var _a, _b;
16060
+ return (_b = (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.searchFastTrack) === null || _b === void 0 ? void 0 : _b.results;
16061
+ }
16062
+ }
16063
+
16064
+ class BaseSendOfflineNotificationFetcher extends FetchableObject {
16065
+ constructor(sendOfflineNotificationGQL, helpers, modalService) {
16066
+ super(sendOfflineNotificationGQL, modalService, helpers);
16067
+ }
16068
+ getDataFromResult(results) {
16069
+ var _a;
16070
+ return (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.sendOfflineNotification;
16071
+ }
16072
+ }
16073
+
16074
+ class BaseGetHotelChainsFetcher extends FetchableList {
16075
+ constructor(queryGQL, helpers, modalService) {
16076
+ super(queryGQL, helpers, modalService);
16077
+ }
16078
+ getDataFromResult(results) {
16079
+ var _a;
16080
+ return (_a = results.data) === null || _a === void 0 ? void 0 : _a.getHotelChains;
16081
+ }
16082
+ }
16083
+
16084
+ class BaseGetRailProvidersFetcher extends FetchableList {
16085
+ constructor(queryGQL, helpers, modalService) {
16086
+ super(queryGQL, helpers, modalService);
16087
+ }
16088
+ getDataFromResult(results) {
16089
+ var _a;
16090
+ return (_a = results.data) === null || _a === void 0 ? void 0 : _a.getRailProviders;
16091
+ }
16092
+ }
16093
+
16094
+ class BaseGetAllAirlinesFetcher extends FetchableList {
16095
+ constructor(queryGQL, helpers, modalService) {
16096
+ super(queryGQL, helpers, modalService);
16097
+ }
16098
+ getDataFromResult(results) {
16099
+ var _a;
16100
+ return (_a = results.data) === null || _a === void 0 ? void 0 : _a.getAllAirlines;
16101
+ }
16102
+ }
16103
+
16104
+ class BaseGetCarHireProvidersFetcher extends FetchableList {
16105
+ constructor(queryGQL, helpers, modalService) {
16106
+ super(queryGQL, helpers, modalService);
16107
+ }
16108
+ getDataFromResult(results) {
16109
+ var _a;
16110
+ return (_a = results.data) === null || _a === void 0 ? void 0 : _a.getCarHireProviders;
16111
+ }
16112
+ }
16113
+
16114
+ class BaseGetCancellationInfoFetcher extends FetchableObject {
16115
+ constructor(gql, modalService, helpers) {
16116
+ super(gql, modalService, helpers);
16117
+ }
16118
+ getDataFromResult(results) {
16119
+ return results === null || results === void 0 ? void 0 : results.data.getCancellationInfo;
16120
+ }
16121
+ }
16122
+
13844
16123
  // | 'fareTypes';
13845
16124
 
13846
16125
  ;
@@ -13928,20 +16207,68 @@ class AuthInfo {
13928
16207
  }
13929
16208
  }
13930
16209
 
13931
- const TEMPID = 'TEMPID_';
13932
- class InternalBasket {
13933
- constructor(basket, helpers, basketService, getUserFetcher) {
13934
- this.helpers = helpers;
16210
+ class BaseRequiresReasonService {
16211
+ constructor(modalService, basketService) {
16212
+ this.modalService = modalService;
13935
16213
  this.basketService = basketService;
13936
- this.getUserFetcher = getUserFetcher;
13937
- Object.assign(this, {
13938
- subject: new BehaviorSubject(Object.assign(Object.assign({}, basket), { prices: {}, mixedCurrency: false, count: 0, miGroups: [], basketInfoMiDetails: [], suppInfo: [] })),
13939
- tempid: basket.id,
13940
- id: basket.id,
13941
- title: basket.title,
13942
- prices: {},
13943
- mixedCurrency: false,
13944
- count: 0,
16214
+ }
16215
+ addBasketItem(basket) {
16216
+ return __awaiter(this, void 0, void 0, function* () {
16217
+ if (basket.id !== this.currentBasketid || this.workingOn) {
16218
+ return;
16219
+ }
16220
+ const basketItems = basket.basketItems.filter((bi) => {
16221
+ return (bi.requiresReason &&
16222
+ bi.managementInfo.filter((mi) => {
16223
+ return mi.reason && mi.selectedValues.length === 0;
16224
+ }).length !== 0);
16225
+ });
16226
+ if (basketItems.length > 0) {
16227
+ this.workingOn = {
16228
+ basket,
16229
+ required: basketItems.reduce((required, bi) => {
16230
+ required[bi.id] = bi.managementInfo.filter((mi) => {
16231
+ return mi.reason && mi.selectedValues.length === 0;
16232
+ });
16233
+ return required;
16234
+ }, {})
16235
+ };
16236
+ const results = yield this.modalService.open(ModalTypes.RequiresReasonDialogComponent, { backdrop: 'static' }, this.workingOn);
16237
+ if (results) {
16238
+ this.workingOn.basket.basketItems.forEach((bi) => {
16239
+ (bi.managementInfo || []).forEach((mi) => {
16240
+ if (results[mi.id]) {
16241
+ this.basketService.setMiSelectedValue(this.workingOn.basket.id, mi, results[mi.id], null);
16242
+ }
16243
+ });
16244
+ });
16245
+ }
16246
+ else {
16247
+ Object.entries(this.workingOn.required).forEach(([biId, mis]) => {
16248
+ this.basketService.removeBasketItem(this.workingOn.basket.id, this.workingOn.basket.basketItems.find((bi) => bi.id === biId));
16249
+ });
16250
+ }
16251
+ this.workingOn = null;
16252
+ }
16253
+ });
16254
+ }
16255
+ }
16256
+
16257
+ const TEMPID = 'TEMPID_';
16258
+ class InternalBasket {
16259
+ constructor(basket, helpers, basketService, getUserFetcher, requiresService) {
16260
+ this.helpers = helpers;
16261
+ this.basketService = basketService;
16262
+ this.getUserFetcher = getUserFetcher;
16263
+ this.requiresService = requiresService;
16264
+ Object.assign(this, {
16265
+ subject: new BehaviorSubject(Object.assign(Object.assign({}, basket), { prices: {}, mixedCurrency: false, count: 0, miGroups: [], basketInfoMiDetails: [], suppInfo: [] })),
16266
+ tempid: basket.id,
16267
+ id: basket.id,
16268
+ title: basket.title,
16269
+ prices: {},
16270
+ mixedCurrency: false,
16271
+ count: 0,
13945
16272
  miGroups: [],
13946
16273
  basketInfoMiDetails: [],
13947
16274
  suppInfo: []
@@ -13958,7 +16285,11 @@ class InternalBasket {
13958
16285
  basket.basketItems[0].perItemPhoneNumber === undefined) {
13959
16286
  // We're in approved state so we need to make sure we have the supplement stuff
13960
16287
  this.basketService
13961
- .getBasket({ convertCurrencyTo: 'GBP', id: basket.id, withSupplemental: true })
16288
+ .getBasket({
16289
+ convertCurrencyTo: 'GBP',
16290
+ id: basket.id,
16291
+ withSupplemental: true
16292
+ })
13962
16293
  .subscribe((newBasket) => {
13963
16294
  this.next(newBasket);
13964
16295
  });
@@ -13995,10 +16326,11 @@ class InternalBasket {
13995
16326
  }));
13996
16327
  toSend.mixedCurrency = Object.keys(toSend.prices).length > 1;
13997
16328
  this.subject.next(toSend);
16329
+ this.requiresService.addBasketItem(basket);
13998
16330
  }
13999
16331
  }
14000
16332
  class BaseEnterpriseBasketService {
14001
- constructor(acceptNewPriceUpdater, addItemToBasketUpdater, addUserToBasketItem, basketCreator, basketFetcher, bookBasketUpdater, deleteBasketUpdater, getMiAutoSugestionFetcher, helpers, removeItemFromBasketUpdater, revalidateBasketUpdater, setBasketItemMiGroupUpdater, setBasketItemMiValueUpdater, validateMiFreeValue, sendBasketForApprovalUpdater, getUserFetcher, getUserBasketsFetcher, SetBasketItemLeadPassenger, moveItemToADifferentBasket, updateBasketNotesUpdater, updateBasketTitleUpdater, setPaymentMethodUpdater, userService, modalService) {
16333
+ constructor(acceptNewPriceUpdater, addItemToBasketUpdater, addUserToBasketItem, basketCreator, basketFetcher, bookBasketUpdater, deleteBasketUpdater, getMiAutoSugestionFetcher, helpers, removeItemFromBasketUpdater, revalidateBasketUpdater, setBasketItemMiGroupUpdater, setBasketItemMiValueUpdater, validateMiFreeValue, sendBasketForApprovalUpdater, getUserFetcher, getUserBasketsFetcher, SetBasketItemLeadPassenger, moveItemToADifferentBasket, updateBasketNotesUpdater, updateBasketTitleUpdater, setPaymentMethodUpdater, getCancellationInfoFetcher, userService, modalService) {
14002
16334
  this.acceptNewPriceUpdater = acceptNewPriceUpdater;
14003
16335
  this.addItemToBasketUpdater = addItemToBasketUpdater;
14004
16336
  this.addUserToBasketItem = addUserToBasketItem;
@@ -14021,6 +16353,7 @@ class BaseEnterpriseBasketService {
14021
16353
  this.updateBasketNotesUpdater = updateBasketNotesUpdater;
14022
16354
  this.updateBasketTitleUpdater = updateBasketTitleUpdater;
14023
16355
  this.setPaymentMethodUpdater = setPaymentMethodUpdater;
16356
+ this.getCancellationInfoFetcher = getCancellationInfoFetcher;
14024
16357
  this.userService = userService;
14025
16358
  this.modalService = modalService;
14026
16359
  this.currentBaskets = [];
@@ -14086,6 +16419,7 @@ class BaseEnterpriseBasketService {
14086
16419
  ];
14087
16420
  this.basketPrices = new BehaviorSubject({ total: null, list: this.basketList });
14088
16421
  this.menuState = MenuSlideEnum.OUT;
16422
+ this.requiresService = new BaseRequiresReasonService(modalService, this);
14089
16423
  this.userService.changeUser.subscribe({
14090
16424
  next: (userDetails) => {
14091
16425
  this.reset();
@@ -14101,6 +16435,9 @@ class BaseEnterpriseBasketService {
14101
16435
  this.basketChangeEmitter.next(value);
14102
16436
  }
14103
16437
  }
16438
+ getRequiresReasonService() {
16439
+ return this.requiresService;
16440
+ }
14104
16441
  reset() {
14105
16442
  if (this.userService.getfullUserDetails(false).userData.value) {
14106
16443
  this.getUserBasketsFetcher
@@ -14116,7 +16453,7 @@ class BaseEnterpriseBasketService {
14116
16453
  if (basket) {
14117
16454
  let intBasket = this.findBasket(basket.id);
14118
16455
  if (!intBasket) {
14119
- intBasket = new InternalBasket(basket, this.helpers, this, this.getUserFetcher);
16456
+ intBasket = new InternalBasket(basket, this.helpers, this, this.getUserFetcher, this.requiresService);
14120
16457
  this.currentBaskets.push(intBasket);
14121
16458
  }
14122
16459
  return intBasket;
@@ -14150,7 +16487,7 @@ class BaseEnterpriseBasketService {
14150
16487
  if (results.length) {
14151
16488
  results.forEach((result) => {
14152
16489
  if (!this.findBasket(result.id)) {
14153
- const intBasket = new InternalBasket(result, this.helpers, this, this.getUserFetcher);
16490
+ const intBasket = new InternalBasket(result, this.helpers, this, this.getUserFetcher, this.requiresService);
14154
16491
  this.currentBaskets.push(intBasket);
14155
16492
  }
14156
16493
  });
@@ -14160,7 +16497,7 @@ class BaseEnterpriseBasketService {
14160
16497
  .toPromise();
14161
16498
  });
14162
16499
  }
14163
- addToBasket(item, intBasket, searchService, travellers = []) {
16500
+ addToBasket(item, intBasket, searchService, travellers = [], requiresReason) {
14164
16501
  return __awaiter(this, void 0, void 0, function* () {
14165
16502
  item.convertCurrencyTo = 'GBP';
14166
16503
  if ((travellers === null || travellers === void 0 ? void 0 : travellers.length) > 0) {
@@ -14173,6 +16510,7 @@ class BaseEnterpriseBasketService {
14173
16510
  item.inboundDate = item.inboundDate
14174
16511
  ? new Date(this.helpers.formatIsoDateTime(item.inboundDate))
14175
16512
  : item.inboundDate;
16513
+ item.requiresReason = requiresReason;
14176
16514
  item = this.checkDetails(item);
14177
16515
  if (item && intBasket) {
14178
16516
  this.addItemToBasketUpdater
@@ -14200,7 +16538,7 @@ class BaseEnterpriseBasketService {
14200
16538
  intBasket = new InternalBasket({
14201
16539
  id,
14202
16540
  basketItems: []
14203
- }, this.helpers, this, this.getUserFetcher);
16541
+ }, this.helpers, this, this.getUserFetcher, this.requiresService);
14204
16542
  this.currentBaskets.push(intBasket);
14205
16543
  }
14206
16544
  this.basketFetcher
@@ -14327,7 +16665,7 @@ class BaseEnterpriseBasketService {
14327
16665
  status: null,
14328
16666
  validated: false
14329
16667
  };
14330
- const intBasket = new InternalBasket(basket, this.helpers, this, this.getUserFetcher);
16668
+ const intBasket = new InternalBasket(basket, this.helpers, this, this.getUserFetcher, this.requiresService);
14331
16669
  // { subject: new BehaviorSubject<Basket>(basket), tempid: basket.id, id: basket.id, title: basket.id };
14332
16670
  // ent-2616 only place we need to add a basket to current baskets
14333
16671
  const toReturn = yield this.createBasketOnDB(intBasket);
@@ -14385,7 +16723,13 @@ class BaseEnterpriseBasketService {
14385
16723
  }
14386
16724
  return !isNaN(Date.parse(dateTimeString)); // any test that returns true/false
14387
16725
  });
14388
- ajv.addFormat('railSeating', (rilseating) => {
16726
+ ajv.addFormat('railSeating', (railseating) => {
16727
+ return true;
16728
+ });
16729
+ ajv.addFormat('passport', (passport) => {
16730
+ return true;
16731
+ });
16732
+ ajv.addFormat('specialRequest', (passport) => {
14389
16733
  return true;
14390
16734
  });
14391
16735
  const validateDetailSchema = ajv.compile(serviceToCheck.detailSchema);
@@ -14467,7 +16811,9 @@ class BaseEnterpriseBasketService {
14467
16811
  });
14468
16812
  }
14469
16813
  else {
14470
- this.basketFetcher.fetchOne({ convertCurrencyTo: 'GBP', id: basket.id }).subscribe((basket1) => {
16814
+ this.basketFetcher
16815
+ .fetchOne({ convertCurrencyTo: 'GBP', id: basket.id })
16816
+ .subscribe((basket1) => {
14471
16817
  basket.subject.next(Object.assign(Object.assign({}, basket.subject.value), basket1));
14472
16818
  }, (_) => { }, () => {
14473
16819
  basket.next(basket.subject.value);
@@ -14487,7 +16833,9 @@ class BaseEnterpriseBasketService {
14487
16833
  });
14488
16834
  }
14489
16835
  else {
14490
- this.basketFetcher.fetchOne({ convertCurrencyTo: 'GBP', id: basket.id }).subscribe((basket1) => {
16836
+ this.basketFetcher
16837
+ .fetchOne({ convertCurrencyTo: 'GBP', id: basket.id })
16838
+ .subscribe((basket1) => {
14491
16839
  basket.subject.next(Object.assign(Object.assign({}, basket.subject.value), basket1));
14492
16840
  }, (_) => { }, () => {
14493
16841
  basket.next(basket.subject.value);
@@ -14509,7 +16857,10 @@ class BaseEnterpriseBasketService {
14509
16857
  });
14510
16858
  }
14511
16859
  revalidate(basketid) {
14512
- this.updateBasket(basketid, this.revalidateBasketUpdater.updateOne({ convertCurrencyTo: 'GBP', id: basketid }));
16860
+ this.updateBasket(basketid, this.revalidateBasketUpdater.updateOne({
16861
+ convertCurrencyTo: 'GBP',
16862
+ id: basketid
16863
+ }));
14513
16864
  }
14514
16865
  setBasketItemMiGroup(basketid, basketItemid, group) {
14515
16866
  this.updateBasket(basketid, this.setBasketItemMiGroupUpdater.updateOne({
@@ -14519,7 +16870,10 @@ class BaseEnterpriseBasketService {
14519
16870
  }));
14520
16871
  }
14521
16872
  acceptNewPrice(basketid, item) {
14522
- this.updateBasket(basketid, this.acceptNewPriceUpdater.updateOne({ convertCurrencyTo: 'GBP', id: item.id }));
16873
+ this.updateBasket(basketid, this.acceptNewPriceUpdater.updateOne({
16874
+ convertCurrencyTo: 'GBP',
16875
+ id: item.id
16876
+ }));
14523
16877
  }
14524
16878
  validateFreeValeMi(miItem, freeValue) {
14525
16879
  return new Promise((resolve, reject) => {
@@ -14591,7 +16945,11 @@ class BaseEnterpriseBasketService {
14591
16945
  }));
14592
16946
  }
14593
16947
  bookBasket(basketid, supplementaryInfo) {
14594
- return this.updateBasket(basketid, this.bookBasketUpdater.updateOne({ convertCurrencyTo: 'GBP', id: basketid, supplementaryInfo }));
16948
+ return this.updateBasket(basketid, this.bookBasketUpdater.updateOne({
16949
+ convertCurrencyTo: 'GBP',
16950
+ id: basketid,
16951
+ supplementaryInfo
16952
+ }));
14595
16953
  }
14596
16954
  moveBasketItem(originalBasketId, basketItem, basketIdToMoveTo) {
14597
16955
  this.moveItemToADifferentBasket
@@ -14606,10 +16964,18 @@ class BaseEnterpriseBasketService {
14606
16964
  });
14607
16965
  }
14608
16966
  updateBasketNotes(basketId, notes) {
14609
- this.updateBasket(basketId, this.updateBasketNotesUpdater.updateOne({ convertCurrencyTo: 'GBP', id: basketId, notes }));
16967
+ this.updateBasket(basketId, this.updateBasketNotesUpdater.updateOne({
16968
+ convertCurrencyTo: 'GBP',
16969
+ id: basketId,
16970
+ notes
16971
+ }));
14610
16972
  }
14611
16973
  updateBasketTitle(basketId, title) {
14612
- this.updateBasket(basketId, this.updateBasketTitleUpdater.updateOne({ convertCurrencyTo: 'GBP', id: basketId, newTitle: title }));
16974
+ this.updateBasket(basketId, this.updateBasketTitleUpdater.updateOne({
16975
+ convertCurrencyTo: 'GBP',
16976
+ id: basketId,
16977
+ newTitle: title
16978
+ }));
14613
16979
  }
14614
16980
  getBasket(query) {
14615
16981
  return this.basketFetcher.fetchOne(query);
@@ -14636,6 +17002,11 @@ class BaseEnterpriseBasketService {
14636
17002
  });
14637
17003
  return this.basketPrices;
14638
17004
  }
17005
+ canCancel(basketItem) {
17006
+ return this.getCancellationInfoFetcher.fetchOne({
17007
+ basketItem: basketItem.id
17008
+ });
17009
+ }
14639
17010
  }
14640
17011
 
14641
17012
  const SESSION_NAME = 'results_hotel_avallibility';
@@ -14676,16 +17047,21 @@ class BaseHotelAvalibilityService {
14676
17047
  if ((_a = fullHotel === null || fullHotel === void 0 ? void 0 : fullHotel.availableRates) === null || _a === void 0 ? void 0 : _a.rooms) {
14677
17048
  // add this data to the behaviours array and return it (if it dosen't already exist)
14678
17049
  if (this.behaviours[hotel.hotel]) {
14679
- return (this.behaviours[hotel.hotel]);
17050
+ return this.behaviours[hotel.hotel];
14680
17051
  }
14681
17052
  else {
14682
17053
  // add the data to the array
14683
- this.behaviours[hotel.hotel] = new BehaviorSubject(null);
17054
+ this.behaviours[hotel.hotel] =
17055
+ new BehaviorSubject(null);
14684
17056
  const newBehaviourObject = fullHotel.availableRates;
14685
- newBehaviourObject.minprice = fullHotel.availableRates.rooms[0] ? fullHotel.availableRates.rooms[0].total : 0;
14686
- newBehaviourObject.maxprice = newBehaviourObject.minprice ? fullHotel.availableRates.rooms[fullHotel.availableRates.rooms.length - 1].total : 0;
17057
+ newBehaviourObject.minprice = fullHotel.availableRates.rooms[0]
17058
+ ? fullHotel.availableRates.rooms[0].total
17059
+ : 0;
17060
+ newBehaviourObject.maxprice = newBehaviourObject.minprice
17061
+ ? fullHotel.availableRates.rooms[fullHotel.availableRates.rooms.length - 1].total
17062
+ : 0;
14687
17063
  this.behaviours[hotel.hotel].next(newBehaviourObject);
14688
- return (this.behaviours[hotel.hotel]);
17064
+ return this.behaviours[hotel.hotel];
14689
17065
  }
14690
17066
  }
14691
17067
  this.data = this.data || this.readFromSession();
@@ -14705,11 +17081,9 @@ class BaseHotelAvalibilityService {
14705
17081
  return hotel;
14706
17082
  }
14707
17083
  setHotelAvalability(hotel) {
14708
- if (!hotel.availableRates) {
14709
- if (hotel === null || hotel === void 0 ? void 0 : hotel.availableRates.hotelId) {
14710
- this.data[hotel.availableRates.hotelId] = hotel.availableRates;
14711
- this.behaviours[hotel.availableRates.hotelId].next(hotel.availableRates);
14712
- }
17084
+ if (hotel.availableRates && (hotel === null || hotel === void 0 ? void 0 : hotel.availableRates.hotelId)) {
17085
+ this.data[hotel.availableRates.hotelId] = hotel.availableRates;
17086
+ this.behaviours[hotel.availableRates.hotelId].next(hotel.availableRates);
14713
17087
  }
14714
17088
  return hotel;
14715
17089
  }
@@ -14811,7 +17185,8 @@ class BaseHotelAvalibilityService {
14811
17185
  else {
14812
17186
  this.fetching.next(false);
14813
17187
  }
14814
- }, error => {
17188
+ }, (error) => {
17189
+ // might need to refine this
14815
17190
  console.error(`+++ Error recovering hotel availabilty: ${error} - reseting availabilty +++`);
14816
17191
  this.fetching.next(false);
14817
17192
  return null;
@@ -14859,12 +17234,14 @@ class AbstractHttpCallService {
14859
17234
  const USER_SIGNEDOUT = 'USER_SIGNEDOUT';
14860
17235
  const USER_SIGNEDIN = 'USER_SIGNEDIN';
14861
17236
  class BaseUserService {
14862
- constructor(getUserFetcher, userUiConfigsFetcher, userProductsFetcher, userMessagesFetcher, baseConfirmMessagesUpdater, storageService, helpers) {
17237
+ constructor(getUserFetcher, userUiConfigsFetcher, userProductsFetcher, userMessagesFetcher, baseConfirmMessagesUpdater, setUserLanguageUpdater, editUserUpdater, storageService, helpers) {
14863
17238
  this.getUserFetcher = getUserFetcher;
14864
17239
  this.userUiConfigsFetcher = userUiConfigsFetcher;
14865
17240
  this.userProductsFetcher = userProductsFetcher;
14866
17241
  this.userMessagesFetcher = userMessagesFetcher;
14867
17242
  this.baseConfirmMessagesUpdater = baseConfirmMessagesUpdater;
17243
+ this.setUserLanguageUpdater = setUserLanguageUpdater;
17244
+ this.editUserUpdater = editUserUpdater;
14868
17245
  this.storageService = storageService;
14869
17246
  this.helpers = helpers;
14870
17247
  this.fullUserDetails = {
@@ -14873,13 +17250,24 @@ class BaseUserService {
14873
17250
  travllerObject: new BehaviorSubject(null),
14874
17251
  userConfigs: new BehaviorSubject(null),
14875
17252
  userData: new BehaviorSubject(null),
14876
- userServices: new BehaviorSubject(null)
17253
+ userServices: new BehaviorSubject(null),
17254
+ allDetails: new BehaviorSubject(null)
14877
17255
  };
14878
17256
  this.changeUser = new BehaviorSubject(null);
14879
17257
  }
14880
17258
  setUser(user_data) {
14881
17259
  const userdata = this.fullUserDetails.userData.value;
14882
17260
  if (!userdata || userdata.username !== user_data.username) {
17261
+ if (userdata === null || userdata === void 0 ? void 0 : userdata.user_id) {
17262
+ this.getUserFetcher.fetchOne({
17263
+ id: userdata.user_id.toString()
17264
+ })
17265
+ .pipe(take(1))
17266
+ .subscribe((user) => {
17267
+ this.fullUserDetails.allDetails.next(user);
17268
+ this.checkEmitUser();
17269
+ });
17270
+ }
14883
17271
  this.userUiConfigsFetcher.fetchKeyedObject('key').subscribe((result1) => {
14884
17272
  this.fullUserDetails.userConfigs.next(result1);
14885
17273
  this.checkEmitUser();
@@ -14900,6 +17288,16 @@ class BaseUserService {
14900
17288
  });
14901
17289
  this.fullUserDetails.travllerObject.next(TravellerObject.makeTravellerObjectFromUser(user_data));
14902
17290
  }
17291
+ if (user_data === null || user_data === void 0 ? void 0 : user_data.user_id) {
17292
+ this.getUserFetcher.fetchOne({
17293
+ id: user_data === null || user_data === void 0 ? void 0 : user_data.user_id.toString()
17294
+ })
17295
+ .pipe(take(1))
17296
+ .subscribe((user) => {
17297
+ this.fullUserDetails.allDetails.next(user);
17298
+ this.checkEmitUser();
17299
+ });
17300
+ }
14903
17301
  this.fullUserDetails.userData.next(user_data);
14904
17302
  this.storageService.setSessionItem('lightning_user_data', user_data);
14905
17303
  }
@@ -14960,7 +17358,6 @@ class BaseUserService {
14960
17358
  return user && user.userData ? user.userData.value.surname : '';
14961
17359
  }
14962
17360
  getFullPhoneNumber() {
14963
- const user = this.getfullUserDetails();
14964
17361
  return '';
14965
17362
  }
14966
17363
  getUserEmail() {
@@ -14995,7 +17392,7 @@ class BaseUserService {
14995
17392
  const ufValue = this.fullUserDetails.userConfigs.value;
14996
17393
  return this.helpers.fromObject(ufValue, uf.value, 'config');
14997
17394
  }
14998
- getUserFavoriteNumber(uf, supplier = Suppliers.non) {
17395
+ getUserFavoriteNumber(uf) {
14999
17396
  const ufValue = this.fullUserDetails.userConfigs.value;
15000
17397
  return this.helpers.fromObject(ufValue, uf.value, 'config', 'value');
15001
17398
  }
@@ -15099,7 +17496,22 @@ class BaseUserService {
15099
17496
  }
15100
17497
  getUser() {
15101
17498
  const user = this.getfullUserDetails();
15102
- return this.getUserFetcher.fetchOne({ id: user.userData.value.user_id.toString() });
17499
+ return this.getUserFetcher.fetchOne({
17500
+ id: user.userData.value.user_id.toString()
17501
+ });
17502
+ }
17503
+ setUserLanguage(id) {
17504
+ return this.setUserLanguageUpdater.updateOne({ language: id });
17505
+ }
17506
+ getDocuments(type) {
17507
+ return this.getUser().pipe(map((user) => user.documents || []), map((docs) => {
17508
+ return type
17509
+ ? docs.filter((doc) => doc.docType === type)
17510
+ : docs;
17511
+ }));
17512
+ }
17513
+ editUser(user) {
17514
+ return this.editUserUpdater.updateOne(user).pipe(tap((user) => this.fullUserDetails.allDetails.next(user)));
15103
17515
  }
15104
17516
  }
15105
17517
 
@@ -16670,6 +19082,298 @@ var EuroStations = [
16670
19082
  }
16671
19083
  ];
16672
19084
 
19085
+ class FastTrackEnterpriseSearch extends BaseEnterpriseSearch {
19086
+ constructor(fasttrackFetcher, helpers, basketService, storageService, searchService) {
19087
+ super(storageService, helpers);
19088
+ this.fasttrackFetcher = fasttrackFetcher;
19089
+ this.basketService = basketService;
19090
+ this.searchService = searchService;
19091
+ this.type = ServiceType.FastTrack;
19092
+ this._date = null;
19093
+ this._time = null;
19094
+ this.resultsSessionName = FastTrackEnterpriseSearch.STORAGE_SESSION_RESULTS;
19095
+ this.multiResultsSessionName = FastTrackEnterpriseSearch.STORAGE_SESSION_RESULTS;
19096
+ const data = storageService.getSessionItem(FastTrackEnterpriseSearch.STORAGE_SESSION_PARAMS) || {
19097
+ tempParams: {},
19098
+ originalUserSearch: {}
19099
+ };
19100
+ this._originalUserSearch = data.originalUserSearch;
19101
+ this.updateTempParams(searchService.makeFastTrackQuery(data.tempParams));
19102
+ if (searchService.shouldAddTravellerSubscription()) {
19103
+ searchService.travellerInformation.subscribe((travellers) => {
19104
+ const splitTravellers = this.helpers.selectedTravellers(travellers, ServiceType.FastTrack);
19105
+ this.tempParams.adults = splitTravellers.adults.length;
19106
+ this.tempParams.children = splitTravellers.children.length;
19107
+ this.travellers = travellers;
19108
+ this._isValid();
19109
+ });
19110
+ }
19111
+ const results = storageService.getSessionItemAsList(this.resultsSessionName) || [];
19112
+ this._cheapestResultPrice = this.updateLowestPrice(results);
19113
+ this.results.next(results || []);
19114
+ }
19115
+ get adults() {
19116
+ return this.tempParams.adults;
19117
+ }
19118
+ set adults(value) {
19119
+ this.tempParams.adults = value;
19120
+ this._isValid();
19121
+ }
19122
+ get children() {
19123
+ return this.tempParams.adults;
19124
+ }
19125
+ set children(value) {
19126
+ this.tempParams.adults = value;
19127
+ this._isValid();
19128
+ }
19129
+ get date() {
19130
+ return this._date;
19131
+ }
19132
+ set date(value) {
19133
+ this._date = value;
19134
+ this._updateDateTime();
19135
+ }
19136
+ get time() {
19137
+ return this._time;
19138
+ }
19139
+ set time(value) {
19140
+ this._time = value;
19141
+ this._updateDateTime();
19142
+ }
19143
+ get arrivalDatetime() {
19144
+ return this.tempParams.arrivalDatetime;
19145
+ }
19146
+ set arrivalDatetime(value) {
19147
+ if (value.isValid()) {
19148
+ this.tempParams.arrivalDatetime = value;
19149
+ this._date = this.helpers.momentToNgDate(value);
19150
+ this._time = this.helpers.formatTimeColon(value);
19151
+ }
19152
+ else {
19153
+ this.tempParams.arrivalDatetime = null;
19154
+ }
19155
+ this._isValid();
19156
+ }
19157
+ _updateDateTime() {
19158
+ if (this._date && this._time) {
19159
+ const time = this.helpers.ngDateToMoment(this._date, this._time);
19160
+ this.tempParams.arrivalDatetime = time.isValid() ? time : null;
19161
+ this._isValid();
19162
+ }
19163
+ }
19164
+ get locationCode() {
19165
+ return this.tempParams.locationCode;
19166
+ }
19167
+ set locationCode(value) {
19168
+ this.tempParams.locationCode = value;
19169
+ if (typeof value === 'string') {
19170
+ this._locationCode = '';
19171
+ this._isValid();
19172
+ }
19173
+ else if (value && value.gateway) {
19174
+ this._locationCode = value.gateway;
19175
+ this._isValid();
19176
+ }
19177
+ else {
19178
+ this._locationCode = null;
19179
+ this._isValid();
19180
+ }
19181
+ }
19182
+ _isValid() {
19183
+ if (!this.doChecks) {
19184
+ return;
19185
+ }
19186
+ this.storageService.setSessionItem(FastTrackEnterpriseSearch.STORAGE_SESSION_PARAMS, {
19187
+ tempParams: this.tempParams,
19188
+ originalUserSearch: this.originalUserSearch
19189
+ });
19190
+ this.validationMessages = [];
19191
+ if (!this.locationCode) {
19192
+ this.validationMessages.push('Please add in a airport location');
19193
+ }
19194
+ if (!this.tempParams.arrivalDatetime.isAfter(moment())) {
19195
+ this.validationMessages.push('Departure date can not be in the past');
19196
+ }
19197
+ this.isValid.next(this.validationMessages.length === 0);
19198
+ this.messages.next(this.validationMessages);
19199
+ }
19200
+ resetQuery() {
19201
+ this.updateTempParams(this.searchService.makeFastTrackQuery());
19202
+ this._isValid();
19203
+ }
19204
+ startSearch() {
19205
+ this.results.next([]);
19206
+ this._isValid();
19207
+ if (this.isValid.value) {
19208
+ this._originalUserSearch = Object.freeze(this.helpers.clone(this.tempParams));
19209
+ this.storageService.setSessionItem(FastTrackEnterpriseSearch.STORAGE_SESSION_PARAMS, {
19210
+ tempParams: this.tempParams,
19211
+ originalUserSearch: this.originalUserSearch
19212
+ });
19213
+ const query = this.getSearchQuery();
19214
+ this.searchService.saveRecentSearch(this.getRecentSearchQuery(query));
19215
+ return this._startSearch(this.fasttrackFetcher.fetchList(query));
19216
+ }
19217
+ else {
19218
+ return Promise.resolve(false);
19219
+ }
19220
+ }
19221
+ getSearchQuery() {
19222
+ const query = {
19223
+ adults: this.tempParams.adults,
19224
+ children: this.tempParams.children,
19225
+ locationCode: this._locationCode,
19226
+ arrivalDatetime: this.tempParams.arrivalDatetime
19227
+ };
19228
+ return this.helpers.removeNulls(query);
19229
+ }
19230
+ getRecentSearchQuery(query) {
19231
+ return {
19232
+ serviceType: ServiceType.FastTrack,
19233
+ searchArgs: query,
19234
+ travelDate: this.arrivalDatetime.format(),
19235
+ travellers: this.helpers.getTravellersId(this.travellers)
19236
+ };
19237
+ }
19238
+ startRecentSearch(recentSearch) {
19239
+ this.arrivalDatetime = moment(recentSearch.searchArgs.arrivalDatetime);
19240
+ this.searchService
19241
+ .getAirportByCode(recentSearch.searchArgs.locationCode)
19242
+ .subscribe((airport) => {
19243
+ var _a, _b, _c, _d, _e, _f;
19244
+ if (airport) {
19245
+ this.locationCode = {
19246
+ country: (_b = (_a = airport.iataMatch) === null || _a === void 0 ? void 0 : _a.locationDetails) === null || _b === void 0 ? void 0 : _b.country,
19247
+ countryCode: (_d = (_c = airport.iataMatch) === null || _c === void 0 ? void 0 : _c.locationDetails) === null || _d === void 0 ? void 0 : _d.countryCode,
19248
+ destination: airport.iataMatch.name,
19249
+ gateway: airport.iataMatch.iata,
19250
+ postcode: (_f = (_e = airport.iataMatch) === null || _e === void 0 ? void 0 : _e.locationDetails) === null || _f === void 0 ? void 0 : _f.postcode,
19251
+ terminals: this.searchService.processTerminals(airport.iataMatch.terminals)
19252
+ };
19253
+ this.searchService.startSearches();
19254
+ }
19255
+ });
19256
+ this.searchService.startSearches();
19257
+ }
19258
+ updateFromPreviousSearches(previousItems) {
19259
+ var _a;
19260
+ console.log('PREPOPULATING LOUNGE FORM');
19261
+ const flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
19262
+ if (flightItem) {
19263
+ try {
19264
+ const date = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
19265
+ this.date = {
19266
+ day: date.getUTCDate(),
19267
+ month: date.getUTCMonth() + 1,
19268
+ year: date.getUTCFullYear()
19269
+ };
19270
+ this.locationCode = this.searchService.searches[ServiceType.Flight]
19271
+ .arriveLocation;
19272
+ }
19273
+ catch (_b) {
19274
+ console.error('Error trying to prepopulate parking from lounge item');
19275
+ }
19276
+ }
19277
+ }
19278
+ updateLowestPrice(results) {
19279
+ if (!results.length)
19280
+ return null;
19281
+ const currency = results[0].currency;
19282
+ return results.reduce((cheapestPrice, result) => {
19283
+ const price = result.price;
19284
+ if (cheapestPrice.amount > price)
19285
+ cheapestPrice.amount = price;
19286
+ return cheapestPrice;
19287
+ }, { amount: Number.MAX_SAFE_INTEGER, currencyCode: currency });
19288
+ }
19289
+ addFastTrackToBasket(fasttrackQuote, fasttrackQuery) {
19290
+ var _a;
19291
+ return __awaiter(this, void 0, void 0, function* () {
19292
+ if (fasttrackQuote.unavailable) {
19293
+ return Promise.resolve(false);
19294
+ }
19295
+ const intBasket = yield this.basketService.getDefaultBasket();
19296
+ const basket = intBasket === null || intBasket === void 0 ? void 0 : intBasket.subject.value;
19297
+ const termsAndConditions = this.getTermsAndCond(fasttrackQuote);
19298
+ if (basket) {
19299
+ return this.basketService.addToBasket({
19300
+ adults: fasttrackQuery.adults,
19301
+ children: fasttrackQuery.children,
19302
+ basket: basket.id,
19303
+ service: fasttrackQuote.sourceId.toString(),
19304
+ detail: {
19305
+ arrivalDatetime: fasttrackQuery.arrivalDatetime.format(),
19306
+ locationCode: fasttrackQuote.code,
19307
+ name: fasttrackQuote.name,
19308
+ airportIata: fasttrackQuery === null || fasttrackQuery === void 0 ? void 0 : fasttrackQuery.locationCode,
19309
+ logo: fasttrackQuote.logo,
19310
+ terminal: (_a = fasttrackQuote.terminal) === null || _a === void 0 ? void 0 : _a.toString(),
19311
+ termsAndCond: termsAndConditions
19312
+ },
19313
+ price: fasttrackQuote.price,
19314
+ currency: fasttrackQuote.currency,
19315
+ searchQuery: fasttrackQuery,
19316
+ outboundDate: fasttrackQuery.arrivalDatetime.format()
19317
+ }, intBasket, this.searchService, this.travellers, fasttrackQuote.requiresReason);
19318
+ }
19319
+ return Promise.resolve(false); // TODO should this throw an error?
19320
+ });
19321
+ }
19322
+ getTermsAndCond(fasttrackQuote) {
19323
+ return [
19324
+ {
19325
+ name: 'Name',
19326
+ value: fasttrackQuote.name
19327
+ },
19328
+ {
19329
+ name: 'Important Information',
19330
+ value: fasttrackQuote.importantInfo
19331
+ }
19332
+ ];
19333
+ }
19334
+ applyFilters(appliedFilters, selectedSort) {
19335
+ let fullResults = this.helpers.clone(this.fullResults);
19336
+ fullResults = fullResults.filter((result) => {
19337
+ return (result.price >= appliedFilters.minPrice &&
19338
+ result.price <= appliedFilters.maxPrice);
19339
+ });
19340
+ fullResults = this.sortResults(selectedSort, fullResults);
19341
+ this.results.next(fullResults);
19342
+ }
19343
+ sortResults(selectedSort, results) {
19344
+ let fullResults = this.helpers.clone(results ? results : this.results.value);
19345
+ switch (selectedSort) {
19346
+ case 0: // cheapest
19347
+ fullResults = fullResults.sort((a, b) => a.price - b.price);
19348
+ break;
19349
+ case 1: // expensive
19350
+ fullResults = fullResults.sort((a, b) => b.price - a.price);
19351
+ break;
19352
+ }
19353
+ // fallback to whatever was before
19354
+ this.results.next(fullResults);
19355
+ return fullResults;
19356
+ }
19357
+ getMinPrice(fts) {
19358
+ return fts.reduce((min, ft) => {
19359
+ if (ft.price < min) {
19360
+ min = ft.price;
19361
+ }
19362
+ return min;
19363
+ }, Number.MAX_SAFE_INTEGER);
19364
+ }
19365
+ getMaxPrice(fts) {
19366
+ return fts.reduce((max, ft) => {
19367
+ if (ft.price > max) {
19368
+ max = ft.price;
19369
+ }
19370
+ return max;
19371
+ }, Number.MIN_SAFE_INTEGER);
19372
+ }
19373
+ }
19374
+ FastTrackEnterpriseSearch.STORAGE_SESSION_PARAMS = 'search_fasttrack';
19375
+ FastTrackEnterpriseSearch.STORAGE_SESSION_RESULTS = 'results_fasttrack';
19376
+
16673
19377
  const MAX_TRAVELLERS = 8;
16674
19378
  var TravellerSearchTypes;
16675
19379
  (function (TravellerSearchTypes) {
@@ -16678,7 +19382,7 @@ var TravellerSearchTypes;
16678
19382
  TravellerSearchTypes["employeeNumber"] = "employeeNumber";
16679
19383
  })(TravellerSearchTypes || (TravellerSearchTypes = {}));
16680
19384
  class BaseEnterpriseSearchService {
16681
- constructor(searchAirportsFetcher, searchAirlinesFetcher, storageService, userService, modalService, router, helpers, hotelAvalibilityService, citiesFetcher, confermaCitiesFetcher, postcodeFetcher, railStationFetcher, saveUserAddressUpdater, userAddressesFetcher, basketService, getUserCompanyOfficesFetcher, searchHotelChainsFetcher, getConfermaRoomImagesFetcher, baseValidateIsPostcodeValidTester, depotFetcher, confermaOfficeNamesFetcher, confermaOfficeFetcher, baseDeleteUserAddressUpdater, baseDeleteRecentSearchUpdater, baseSaveRecentSearchUpdater, getUserCurrentCarbonAllowanceFetcher, baseSaveFavouriteSearchUpdater, environment, loungeFetcher, parkingFetcher, httpCallService, flightFetcher, hotelFetcher, carhireFetcher, carHireAvailabilityDetailFetcher, cabhireFetcher, railFetcher, irlFetcher, getRailStationFetcher, baseWebTokenService, riskAlertsFetcher, quicklistFetcher, getUserRecentSearchesFetcher, getRailCardsFetcher, getCovidMicrositeTokenFetcher, eurostarFetcher, searchUsersCanBookForFetcher, searchIrlStationsFetcher, irlDiscountCardsFetcher, getFlightFareRulesFetcher, getFlightSeatMapFetcher, getRailLiveDeparturesFetcher, applyHotelRulesFetcher, applyFlightRules, getUserFavouriteSearchesFetcher, deleteFavouriteSearchUpdater, emailBasketFetcher) {
19385
+ constructor(searchAirportsFetcher, searchAirlinesFetcher, storageService, userService, modalService, router, helpers, hotelAvalibilityService, citiesFetcher, confermaCitiesFetcher, postcodeFetcher, railStationFetcher, saveUserAddressUpdater, userAddressesFetcher, basketService, getUserCompanyOfficesFetcher, searchHotelChainsFetcher, getConfermaRoomImagesFetcher, baseValidateIsPostcodeValidTester, depotFetcher, confermaOfficeNamesFetcher, confermaOfficeFetcher, baseDeleteUserAddressUpdater, baseDeleteRecentSearchUpdater, baseSaveRecentSearchUpdater, getUserCurrentCarbonAllowanceFetcher, baseSaveFavouriteSearchUpdater, environment, loungeFetcher, parkingFetcher, httpCallService, flightFetcher, hotelFetcher, carhireFetcher, carHireAvailabilityDetailFetcher, cabhireFetcher, railFetcher, irlFetcher, getRailStationFetcher, getIrlSupplierStationFetcher, baseWebTokenService, riskAlertsFetcher, quicklistFetcher, getUserRecentSearchesFetcher, getRailCardsFetcher, getCovidMicrositeTokenFetcher, eurostarFetcher, searchUsersCanBookForFetcher, searchIrlStationsFetcher, irlDiscountCardsFetcher, getFlightFareRulesFetcher, getFlightSeatMapFetcher, getRailLiveDeparturesFetcher, applyHotelRulesFetcher, applyFlightRules, getUserFavouriteSearchesFetcher, deleteFavouriteSearchUpdater, emailBasketFetcher, fasttrackFetcher, sendOfflineNotificationFetcher, getHotelChainsFetcher, getRailProvidersFetcher, getAllAirlinesFetcher, getCarHireProvidersFetcher) {
16682
19386
  this.searchAirportsFetcher = searchAirportsFetcher;
16683
19387
  this.searchAirlinesFetcher = searchAirlinesFetcher;
16684
19388
  this.storageService = storageService;
@@ -16707,6 +19411,7 @@ class BaseEnterpriseSearchService {
16707
19411
  this.getUserCurrentCarbonAllowanceFetcher = getUserCurrentCarbonAllowanceFetcher;
16708
19412
  this.baseSaveFavouriteSearchUpdater = baseSaveFavouriteSearchUpdater;
16709
19413
  this.getRailStationFetcher = getRailStationFetcher;
19414
+ this.getIrlSupplierStationFetcher = getIrlSupplierStationFetcher;
16710
19415
  this.riskAlertsFetcher = riskAlertsFetcher;
16711
19416
  this.getUserRecentSearchesFetcher = getUserRecentSearchesFetcher;
16712
19417
  this.getRailCardsFetcher = getRailCardsFetcher;
@@ -16720,6 +19425,11 @@ class BaseEnterpriseSearchService {
16720
19425
  this.getUserFavouriteSearchesFetcher = getUserFavouriteSearchesFetcher;
16721
19426
  this.deleteFavouriteSearchUpdater = deleteFavouriteSearchUpdater;
16722
19427
  this.emailBasketFetcher = emailBasketFetcher;
19428
+ this.sendOfflineNotificationFetcher = sendOfflineNotificationFetcher;
19429
+ this.getHotelChainsFetcher = getHotelChainsFetcher;
19430
+ this.getRailProvidersFetcher = getRailProvidersFetcher;
19431
+ this.getAllAirlinesFetcher = getAllAirlinesFetcher;
19432
+ this.getCarHireProvidersFetcher = getCarHireProvidersFetcher;
16723
19433
  this.traveller_error = false;
16724
19434
  this.travellerInformation = new BehaviorSubject([]);
16725
19435
  this.errors = new BehaviorSubject([]);
@@ -16732,6 +19442,8 @@ class BaseEnterpriseSearchService {
16732
19442
  this.travellerValidationMessages = [];
16733
19443
  this.search_loading = false;
16734
19444
  this.search_airport_loading = false;
19445
+ this.allSubscription = new Subscription();
19446
+ this.searchesSubscription = new Subscription();
16735
19447
  this.selectedTravellers = [];
16736
19448
  this.selectedPlaces = [];
16737
19449
  this.countries = Countries;
@@ -16744,11 +19456,11 @@ class BaseEnterpriseSearchService {
16744
19456
  [ServiceType.Hotel]: new HotelEnterpriseSearch(hotelFetcher, helpers, userService, environment, hotelAvalibilityService, basketService, storageService, this, httpCallService, quicklistFetcher, getRailStationFetcher, applyHotelRulesFetcher),
16745
19457
  [ServiceType.Car]: new CarhireEnterpriseSearch(carhireFetcher, carHireAvailabilityDetailFetcher, helpers, basketService, storageService, this),
16746
19458
  [ServiceType.Cab]: new CabHireEnterpriseSearch(cabhireFetcher, helpers, storageService, this, basketService),
16747
- [ServiceType.InternationalRail]: new IRLEnterpriseSearch(irlFetcher, irlDiscountCardsFetcher, helpers, basketService, storageService, this),
16748
- [ServiceType.FastTrack]: null,
19459
+ [ServiceType.InternationalRail]: new IRLEnterpriseSearch(irlFetcher, irlDiscountCardsFetcher, helpers, basketService, storageService, this, getIrlSupplierStationFetcher),
19460
+ [ServiceType.FastTrack]: new FastTrackEnterpriseSearch(fasttrackFetcher, helpers, basketService, storageService, this),
16749
19461
  [ServiceType.Coach]: null,
16750
19462
  [ServiceType.Rail]: new RailEnterpriseSearch(railFetcher, getRailStationFetcher, helpers, basketService, storageService, this, userService, modalService),
16751
- [ServiceType.Eurostar]: new EurostarEnterpriseSearch(eurostarFetcher, helpers, userService, basketService, storageService, this)
19463
+ [ServiceType.Eurostar]: new EurostarEnterpriseSearch(eurostarFetcher, helpers, userService, basketService, storageService, this, modalService)
16752
19464
  };
16753
19465
  console.log('Newly created search objects: ', this.searches);
16754
19466
  this.search_objects = this.helpers.clone(this.init_search_objects());
@@ -16776,6 +19488,11 @@ class BaseEnterpriseSearchService {
16776
19488
  }
16777
19489
  baseWebTokenService.autoLogoutConfig = this.getAutoLogoutConfig();
16778
19490
  }
19491
+ ngOnDestroy() {
19492
+ if (this.allSubscription) {
19493
+ this.allSubscription.unsubscribe();
19494
+ }
19495
+ }
16779
19496
  reset() {
16780
19497
  this.resetAllSearchItems();
16781
19498
  this.basketService.reset();
@@ -16943,6 +19660,10 @@ class BaseEnterpriseSearchService {
16943
19660
  }
16944
19661
  const obs = this.confermaCitiesFetcher.fetchOne(query);
16945
19662
  const func = (results) => {
19663
+ isLoading === null || isLoading === void 0 ? void 0 : isLoading.next(false);
19664
+ if (!(results === null || results === void 0 ? void 0 : results.suggestions)) {
19665
+ return [];
19666
+ }
16946
19667
  const data = results.suggestions.map((result) => {
16947
19668
  return {
16948
19669
  name: result.name,
@@ -16952,7 +19673,6 @@ class BaseEnterpriseSearchService {
16952
19673
  countryCode: result.countryCode
16953
19674
  };
16954
19675
  });
16955
- isLoading === null || isLoading === void 0 ? void 0 : isLoading.next(false);
16956
19676
  return data;
16957
19677
  };
16958
19678
  return obs.pipe(take(1), map(func));
@@ -17043,24 +19763,27 @@ class BaseEnterpriseSearchService {
17043
19763
  }
17044
19764
  return of([]);
17045
19765
  }
17046
- getStationLocations(term, isLoading) {
19766
+ getStationLocations(term, isLoading, hasTod = false) {
17047
19767
  if (term.length > 2) {
17048
19768
  isLoading === null || isLoading === void 0 ? void 0 : isLoading.next(true);
17049
19769
  return this.railStationFetcher
17050
19770
  .fetchList({
17051
- query: term
19771
+ query: term,
19772
+ hasTod
17052
19773
  })
17053
19774
  .pipe(take(1), map((results) => {
17054
19775
  if (isLoading) {
17055
19776
  isLoading.next(false);
17056
19777
  }
17057
- return results ? results.map((result) => {
17058
- return {
17059
- type: LocationTypes.TrainStation,
17060
- name: result.name,
17061
- railstation: result
17062
- };
17063
- }) : [];
19778
+ return results
19779
+ ? results.map((result) => {
19780
+ return {
19781
+ type: LocationTypes.TrainStation,
19782
+ name: result.name,
19783
+ railstation: result
19784
+ };
19785
+ })
19786
+ : [];
17064
19787
  }));
17065
19788
  }
17066
19789
  else {
@@ -17112,7 +19835,7 @@ class BaseEnterpriseSearchService {
17112
19835
  }
17113
19836
  const subs = forkJoin([
17114
19837
  this.getAirportLocations(term, countryCode, isLoading),
17115
- this.getCityLocations(term, countryCode, isLoading),
19838
+ this.getCityLocations(term, countryCode, isLoading, this.userService.userHasServiceProvider(ServiceType.Hotel, ServiceProvider.Confirma)),
17116
19839
  this.getStationLocations(term, isLoading),
17117
19840
  this.getConfirmaOffices(term)
17118
19841
  ]).pipe(map((results) => {
@@ -17331,6 +20054,10 @@ class BaseEnterpriseSearchService {
17331
20054
  this.canSearch(ServiceType.Hotel)) {
17332
20055
  concattedErrors.push(...this.searches[ServiceType.Hotel].validationMessages);
17333
20056
  }
20057
+ if (this.search_objects[ServiceType.FastTrack].chosen &&
20058
+ this.canSearch(ServiceType.FastTrack)) {
20059
+ concattedErrors.push(...this.searches[ServiceType.FastTrack].validationMessages);
20060
+ }
17334
20061
  /*
17335
20062
  if (this.search_objects.hotel.chosen && this.canSearch(TravelTypeEnum.HOTEL)) {
17336
20063
  concattedErrors = concattedErrors.concat(this.hotel.validationMessages);
@@ -17418,7 +20145,7 @@ class BaseEnterpriseSearchService {
17418
20145
  }
17419
20146
  _findSearchObtect() {
17420
20147
  return Object.values(this.search_objects).find((obj) => {
17421
- return !!obj && obj.priority === this.highest_search_priority && obj.chosen;
20148
+ return (!!obj && obj.priority === this.highest_search_priority && obj.chosen);
17422
20149
  });
17423
20150
  }
17424
20151
  startSearches(url) {
@@ -17431,8 +20158,12 @@ class BaseEnterpriseSearchService {
17431
20158
  }
17432
20159
  if (url) {
17433
20160
  this.router.navigate([url]);
20161
+ if (this.searches.INTERNATIONAL_RAIL) {
20162
+ this.submitIrlForm();
20163
+ }
17434
20164
  }
17435
- else if (searchObject && !this.router.url.includes(searchObject.resultUrl)) {
20165
+ else if (searchObject &&
20166
+ !this.router.url.includes(searchObject.resultUrl)) {
17436
20167
  this.router.navigate([searchObject.resultUrl]);
17437
20168
  }
17438
20169
  /*If the search exceeds the timeout time, cancel search and tell OBT that it's timed out*/
@@ -17560,6 +20291,52 @@ class BaseEnterpriseSearchService {
17560
20291
  return of();
17561
20292
  }
17562
20293
  }
20294
+ getAllHotelChains() {
20295
+ const obs = this.getHotelChainsFetcher.fetchList();
20296
+ const func = (results) => {
20297
+ const data = results.map((result) => {
20298
+ return {
20299
+ name: result
20300
+ };
20301
+ });
20302
+ return data;
20303
+ };
20304
+ return obs.pipe(take(1), map(func));
20305
+ }
20306
+ getAllRailProviders() {
20307
+ const obs = this.getRailProvidersFetcher.fetchList();
20308
+ const func = (results) => {
20309
+ const data = results.map((result) => {
20310
+ return {
20311
+ name: result
20312
+ };
20313
+ });
20314
+ return data;
20315
+ };
20316
+ return obs.pipe(take(1), map(func));
20317
+ }
20318
+ getCarHireProivders() {
20319
+ const obs = this.getCarHireProvidersFetcher.fetchList();
20320
+ const func = (results) => {
20321
+ const data = results.map((result) => {
20322
+ return {
20323
+ name: result
20324
+ };
20325
+ });
20326
+ return data;
20327
+ };
20328
+ return obs.pipe(take(1), map(func));
20329
+ }
20330
+ getAllAirlines() {
20331
+ const obs = this.getAllAirlinesFetcher.fetchList();
20332
+ const func = (results) => {
20333
+ const data = results.map((result) => {
20334
+ return result;
20335
+ });
20336
+ return data;
20337
+ };
20338
+ return obs.pipe(take(1), map(func));
20339
+ }
17563
20340
  getRailCards() {
17564
20341
  return this.getRailCardsFetcher.fetchList().pipe(take(1), map((results) => {
17565
20342
  if (results) {
@@ -17899,6 +20676,20 @@ class BaseEnterpriseSearchService {
17899
20676
  };
17900
20677
  return this.helpers.sanatizeReturns(defaultVal, Object.assign({}, ...args), ['outBoundDate', 'inboundDate']);
17901
20678
  }
20679
+ /*
20680
+ * Creates a FastTrack search query with supplied params, auto fills with defaults if fields are empty.
20681
+ * @param {any} ...args Example - searchService.makeFastTrackQuery(data.query, { override: "property" })
20682
+ * @return {QuerySearchLoungesArgs} Returns QuerySearchLoungesArgs type
20683
+ */
20684
+ makeFastTrackQuery(...args) {
20685
+ const defaultVal = {
20686
+ adults: 0,
20687
+ arrivalDatetime: moment(),
20688
+ children: 0,
20689
+ locationCode: null
20690
+ };
20691
+ return this.helpers.sanatizeReturns(defaultVal, Object.assign({}, ...args), ['arrivalDatetime']);
20692
+ }
17902
20693
  /* Create Query Defaults End */
17903
20694
  shouldAddTravellerSubscription() {
17904
20695
  return false;
@@ -18050,6 +20841,63 @@ class BaseEnterpriseSearchService {
18050
20841
  emailBasket(id) {
18051
20842
  return this.emailBasketFetcher.fetchList({ id });
18052
20843
  }
20844
+ submitIrlForm() {
20845
+ const currentUserEmail = this.userService.getUserEmail();
20846
+ let searchParams = this.searches[ServiceType.InternationalRail];
20847
+ let onBehalfOf;
20848
+ let passengers;
20849
+ // get passengers
20850
+ this.allSubscription.add(this.travellerInformation.subscribe((travellers) => {
20851
+ passengers = travellers.map((traveller, index) => {
20852
+ let age;
20853
+ if (traveller.dob) {
20854
+ let timeDiff = Math.abs(new Date().getTime() - new Date(traveller.dob).getTime());
20855
+ age = Math.floor((timeDiff / (1000 * 3600 * 24)) / 365);
20856
+ }
20857
+ return {
20858
+ name: traveller.name,
20859
+ age: (age === null || age === void 0 ? void 0 : age.toString()) || 'Not specified',
20860
+ discountCard: `Discount Card ${index + 1}`,
20861
+ loyaltyCard: `Loyalty Card ${index + 1}`
20862
+ };
20863
+ });
20864
+ onBehalfOf = travellers[0].email ? travellers[0].email : currentUserEmail;
20865
+ }));
20866
+ // get jrfreference
20867
+ this.allSubscription.add(searchParams.results.subscribe((irlJourney) => {
20868
+ var _a, _b;
20869
+ if ((_a = irlJourney[0]) === null || _a === void 0 ? void 0 : _a.jrfreference) {
20870
+ this.jrfReference = (_b = irlJourney[0]) === null || _b === void 0 ? void 0 : _b.jrfreference;
20871
+ }
20872
+ }));
20873
+ if (this.jrfReference && passengers) {
20874
+ const payload = {
20875
+ trainNumber: searchParams.trainNumber || 'Any',
20876
+ departureStation: searchParams.travellingFrom.name,
20877
+ destinationStation: searchParams.travellingTo.name,
20878
+ outboundDate: searchParams.outboundDepartureDateTime,
20879
+ inboundDate: searchParams.returnDepartureDateTime,
20880
+ additionalInfo: searchParams.additionalInstructions || 'No additional instructions',
20881
+ serviceClass: searchParams.irlClass || 'Any',
20882
+ offlineReference: this.jrfReference,
20883
+ notifyEmail: currentUserEmail,
20884
+ onBehalfOf: onBehalfOf,
20885
+ passengers: passengers
20886
+ };
20887
+ console.log(payload);
20888
+ this.sendOfflineNotification(payload).subscribe((result) => {
20889
+ if (result.success) {
20890
+ this.modalService.open(ModalTypes.OfflineRequestDialogComponent, { centered: true, size: 'md' }, { jrfReference: this.jrfReference });
20891
+ }
20892
+ else {
20893
+ this.modalService.open(ModalTypes.ModalErrorComponent, { centered: true }, { error: 'Unable to send offline notification' });
20894
+ }
20895
+ });
20896
+ }
20897
+ }
20898
+ sendOfflineNotification(jrfReference) {
20899
+ return this.sendOfflineNotificationFetcher.fetchOne(jrfReference);
20900
+ }
18053
20901
  }
18054
20902
  BaseEnterpriseSearchService.SESSION_TRAVELLER = 'search_travellers';
18055
20903
 
@@ -18077,6 +20925,9 @@ class BaseWebTokenService {
18077
20925
  this._jwtToken = value;
18078
20926
  }
18079
20927
  }
20928
+ get jwtToken() {
20929
+ return this._jwtToken || null;
20930
+ }
18080
20931
  _updateTimer() {
18081
20932
  window.clearTimeout(this.timer);
18082
20933
  this.timer = null;
@@ -18086,10 +20937,11 @@ class BaseWebTokenService {
18086
20937
  }, 60000);
18087
20938
  }
18088
20939
  checkToLogout() {
18089
- const a = moment().unix();
18090
- const b = this.lastUpdated.unix();
18091
- const c = this.timeoutDuration;
18092
- if (moment().unix() - this.lastUpdated.unix() > this.timeoutDuration) {
20940
+ var _a;
20941
+ const current = moment().unix();
20942
+ const last = ((_a = this.lastUpdated) === null || _a === void 0 ? void 0 : _a.unix()) || 0;
20943
+ const maxTime = this.timeoutDuration;
20944
+ if (current - last > maxTime) {
18093
20945
  this.timer = null;
18094
20946
  this.lastUpdated = moment();
18095
20947
  this.modalOpenerService
@@ -18566,9 +21418,29 @@ class BaseDeleteFavouriteSearchUpdater extends UpdateableObject {
18566
21418
  }
18567
21419
  }
18568
21420
 
21421
+ class BaseSetUserLanguageUpdater extends UpdateableObject {
21422
+ constructor(SetUserLanguageGQL, modalService) {
21423
+ super(SetUserLanguageGQL, modalService);
21424
+ }
21425
+ getDataFromResult(results) {
21426
+ var _a;
21427
+ return (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.setUserLanguage;
21428
+ }
21429
+ }
21430
+
21431
+ class BaseEditUserUpdater extends UpdateableObject {
21432
+ constructor(editUserGQL, modalService) {
21433
+ super(editUserGQL, modalService);
21434
+ }
21435
+ getDataFromResult(results) {
21436
+ var _a;
21437
+ return (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.editUser;
21438
+ }
21439
+ }
21440
+
18569
21441
  /**
18570
21442
  * Generated bundle index. Do not edit.
18571
21443
  */
18572
21444
 
18573
- export { AbstractHttpCallService, ActionType, AddressImpl, AirportSearchMode, AuthInfo, BaseAcceptNewPriceUpdater, BaseAddItemToBasketUpdater, BaseAddUserToBasketItemUpdater, BaseApplyJitFlightRulesFetcher, BaseBookBasketUpdater, BaseCabhireQuoteFetcher, BaseCancelBookingUpdater, BaseCarHireAvailabilityDetailFetcher, BaseCarhireQuoteFetcher, BaseConfermaOfficeFetcher, BaseConfermaOfficeNamesFetcher, BaseConfirmMessagesUpdater, BaseCreateBasketUpdater, BaseDeleteBasketUpdater, BaseDeleteFavouriteSearchUpdater, BaseDeleteRecentSearchUpdater, BaseDeleteUserAddressUpdater, BaseEmailBasketFetcher, BaseEnterpriseBasketService, BaseEnterpriseMyBookingsService, BaseEnterpriseSearch, BaseEnterpriseSearchService, BaseEnvironment, BaseEurostarQuoteFetcher, BaseEventMessenager, BaseFlightQuoteFetcher, BaseGetBasketFetcher, BaseGetConfermaRoomImagesFetcher, BaseGetCovidMicrositeTokenFetcher, BaseGetFlightFareRulesFetcher, BaseGetFlightSeatMapFetcher, BaseGetMiAutoSugestionFetcher, BaseGetRailLiveDeparturesFetcher, BaseGetRailStationFetcher, BaseGetRailcardsFetcher, BaseGetRiskAlertsFetcher, BaseGetUserBasketsFetcher, BaseGetUserCompanyOfficesFetcher, BaseGetUserCurrentCarbonAllowanceFetcher, BaseGetUserFavouriteSearchesFetcher, BaseGetUserFetcher, BaseGetUserRecentSearchesFetcher, BaseHelperRoutines, BaseHotelAvalibilityQuoteFetcher, BaseHotelAvalibilityService, BaseHotelQuoteFetcher, BaseHotelRulesFetcher, BaseIrlDiscountCardFetcher, BaseIrlQuoteFetcher, BaseLogonService, BaseLoungeQuoteFetcher, BaseModalOpenerService, BaseNetworkCall, BaseParkingQuoteFetcher, BaseRailQuoteFetcher, BaseRemoveItemFromBasketUpdater, BaseRevalidateBasketUpdater, BaseRouteHappyService, BaseSaveFavouriteSearchUpdater, BaseSaveRecentSearchUpdater, BaseSaveUserAddressUpdater, BaseSearchAirlinesFetcher, BaseSearchAirportsFetcher, BaseSearchCityFetcher, BaseSearchConfermaCityFetcher, BaseSearchConfermaQuicklistFetcher, BaseSearchDepotFetcher, BaseSearchHotelChainsFetcher, BaseSearchIrlStationsFetcher, BaseSearchPostcodeFetcher, BaseSearchRailStationsFetcher, BaseSearchUsersCanBookForFetcher, BaseSendBasketForApprovalUpdater, BaseSetBasketItemLeadPassengerUpdater, BaseSetBasketItemMiGroupUpdater, BaseSetBasketItemMiValueUpdater, BaseSetPaymentOptionUpdater, BaseStorageService, BaseUpdateBasketNoteUpdater, BaseUpdateBasketTitleUpdater, BaseUserAddressesFetcher, BaseUserMessagesFetcher, BaseUserProductsFetcher, BaseUserService, BaseUserUiConfigsFetcher, BaseValidateIsPostcodeValidTester, BaseValidateMiFreeValueTester, BaseWebTokenService, BasemoveBasketItemToBasket, BasketInfoMiDetailsImpl, BookableBasket, BookingStatus, BreatfastTypes, CabHireEnterpriseSearch, CarhireEnterpriseSearch, ClassType, DEFAULT_FLIGHT_FILTERS, EurostarClassEnum, EurostarEnterpriseSearch, EurostarSearchType, FlightDirectionEnum, FlightDisplayTypes, FlightEnterpriseSearch, FlightSearchType, FlightSortTypes, HotelEnterpriseSearch, HotelFilters, HotelPolicyEnum, HotelView, IRLEnterpriseSearch, IncludedType, InternalBasket, IrlDirection, LimitedCache, LocationTypes, LoginError, LoginErrorReason, LogoutEnum, LoungesEnterpriseSearch, MAX_TRAVELLERS, ManagementInfoAndIsValid, Memorise, MenuSlideEnum, ModalTypes, OBTFlightCabinClass, ParkingEnterpriseSearch, PhoneNumberImpl, PreferredFlags, RailDirection, RailEnterpriseSearch, RailJourneyFareType, RailSearchCriteria, RegExps, RiskLevelRanking, SchemaFormat, SearchHandler, ServiceProvider, SortMethod, SortTypesCar, SortTypesEurostar, SortTypesHotel, SortTypesIrl, SupplementaryBookingInfoImpl, Suppliers, TaxiFormMode, TimeWindow, TravellerObject, TravellerSearchTypes, URLS, USER_SIGNEDIN, USER_SIGNEDOUT, UserFavorurite, UserInfoImpl, ValidatorChecker, WellbeingEnum, Widgets, ages, defaultValidations, excludedExpression, filtersKeys, includedExpression, makeManagamentInfo, maxTravellerWellbeing, ɵ0, FetchableList as ɵd, FetchableObject as ɵe, UpdateableObject as ɵf, BaseTester as ɵg };
21445
+ export { AbstractHttpCallService, ActionType, AddressImpl, Airlines, AirportSearchMode, AuthInfo, BaseAcceptNewPriceUpdater, BaseAddItemToBasketUpdater, BaseAddUserToBasketItemUpdater, BaseApplyJitFlightRulesFetcher, BaseBookBasketUpdater, BaseCabhireQuoteFetcher, BaseCancelBookingUpdater, BaseCarHireAvailabilityDetailFetcher, BaseCarhireQuoteFetcher, BaseConfermaOfficeFetcher, BaseConfermaOfficeNamesFetcher, BaseConfirmMessagesUpdater, BaseCreateBasketUpdater, BaseDeleteBasketUpdater, BaseDeleteFavouriteSearchUpdater, BaseDeleteRecentSearchUpdater, BaseDeleteUserAddressUpdater, BaseEditUserUpdater, BaseEmailBasketFetcher, BaseEnterpriseBasketService, BaseEnterpriseMyBookingsService, BaseEnterpriseSearch, BaseEnterpriseSearchService, BaseEnvironment, BaseEurostarQuoteFetcher, BaseEventMessenager, BaseFastTrackQuoteFetcher, BaseFlightQuoteFetcher, BaseGetAllAirlinesFetcher, BaseGetBasketFetcher, BaseGetCancellationInfoFetcher, BaseGetCarHireProvidersFetcher, BaseGetConfermaRoomImagesFetcher, BaseGetCovidMicrositeTokenFetcher, BaseGetFlightFareRulesFetcher, BaseGetFlightSeatMapFetcher, BaseGetHotelChainsFetcher, BaseGetIrlSupplierStationFetcher, BaseGetMiAutoSugestionFetcher, BaseGetRailLiveDeparturesFetcher, BaseGetRailProvidersFetcher, BaseGetRailStationFetcher, BaseGetRailcardsFetcher, BaseGetRiskAlertsFetcher, BaseGetUserBasketsFetcher, BaseGetUserCompanyOfficesFetcher, BaseGetUserCurrentCarbonAllowanceFetcher, BaseGetUserFavouriteSearchesFetcher, BaseGetUserFetcher, BaseGetUserRecentSearchesFetcher, BaseHelperRoutines, BaseHotelAvalibilityQuoteFetcher, BaseHotelAvalibilityService, BaseHotelQuoteFetcher, BaseHotelRulesFetcher, BaseIrlDiscountCardFetcher, BaseIrlQuoteFetcher, BaseLogonService, BaseLoungeQuoteFetcher, BaseModalOpenerService, BaseNetworkCall, BaseParkingQuoteFetcher, BaseRailQuoteFetcher, BaseRemoveItemFromBasketUpdater, BaseRequiresReasonService, BaseRevalidateBasketUpdater, BaseRouteHappyService, BaseSaveFavouriteSearchUpdater, BaseSaveRecentSearchUpdater, BaseSaveUserAddressUpdater, BaseSearchAirlinesFetcher, BaseSearchAirportsFetcher, BaseSearchCityFetcher, BaseSearchConfermaCityFetcher, BaseSearchConfermaQuicklistFetcher, BaseSearchDepotFetcher, BaseSearchHotelChainsFetcher, BaseSearchIrlStationsFetcher, BaseSearchPostcodeFetcher, BaseSearchRailStationsFetcher, BaseSearchUsersCanBookForFetcher, BaseSendBasketForApprovalUpdater, BaseSendOfflineNotificationFetcher, BaseSetBasketItemLeadPassengerUpdater, BaseSetBasketItemMiGroupUpdater, BaseSetBasketItemMiValueUpdater, BaseSetPaymentOptionUpdater, BaseSetUserLanguageUpdater, BaseStorageService, BaseUpdateBasketNoteUpdater, BaseUpdateBasketTitleUpdater, BaseUserAddressesFetcher, BaseUserMessagesFetcher, BaseUserProductsFetcher, BaseUserService, BaseUserUiConfigsFetcher, BaseValidateIsPostcodeValidTester, BaseValidateMiFreeValueTester, BaseWebTokenService, BasemoveBasketItemToBasket, BasketInfoMiDetailsImpl, BookableBasket, BookingStatus, BreatfastTypes, CabHireEnterpriseSearch, CarCompanies, CarhireEnterpriseSearch, ClassType, DEFAULT_FLIGHT_FILTERS, DistanceType, DocTypes, EurostarClassEnum, EurostarEnterpriseSearch, EurostarSearchType, FlightDirectionEnum, FlightDisplayTypes, FlightEnterpriseSearch, FlightSearchType, FlightSortTypes, Genders, HotelChains, HotelEnterpriseSearch, HotelFilters, HotelPolicyEnum, HotelView, IRLEnterpriseSearch, IncludedType, InternalBasket, IrlDirection, LimitedCache, LocationTypes, LoginError, LoginErrorReason, LogoutEnum, LoungesEnterpriseSearch, MAX_TRAVELLERS, ManagementInfoAndIsValid, Memorise, MenuSlideEnum, ModalTypes, OBTFlightCabinClass, PREFERENCE_VALUES, ParkingEnterpriseSearch, PersonTitles, PhoneNumberImpl, PreferredFlags, RailCompanies, RailDirection, RailEnterpriseSearch, RailJourneyFareType, RailSearchCriteria, RegExps, RiskLevelRanking, SchemaFormat, SearchHandler, ServiceProvider, SortMethod, SortTypesCar, SortTypesEurostar, SortTypesHotel, SortTypesIrl, SupplementaryBookingInfoImpl, Suppliers, TaxiFormMode, TimeWindow, TravellerObject, TravellerSearchTypes, URLS, USER_SIGNEDIN, USER_SIGNEDOUT, UserFavorurite, UserInfoImpl, ValidatorChecker, WellbeingEnum, Widgets, ages, defaultValidations, excludedExpression, filtersKeys, includedExpression, makeManagamentInfo, maxTravellerWellbeing, ɵ0, DistanceTypes as ɵb, DocGender as ɵc, DocType as ɵd, PreferenceKey as ɵf, FetchableList as ɵh, FetchableObject as ɵi, UpdateableObject as ɵj, BaseTester as ɵk };
18574
21446
  //# sourceMappingURL=sabstravtech-obtservices-base.js.map