@qite/tide-booking-component 1.4.56 → 1.4.58

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 (51) hide show
  1. package/build/build-cjs/index.js +3892 -361
  2. package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +22 -22
  3. package/build/build-cjs/src/booking-wizard/features/price-details/price-details-slice.d.ts +10 -10
  4. package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +3 -3
  5. package/build/build-cjs/src/booking-wizard/store.d.ts +3 -3
  6. package/build/build-cjs/src/content/login/confirm-component.d.ts +4 -0
  7. package/build/build-cjs/src/content/login/index.d.ts +4 -0
  8. package/build/build-cjs/src/content/login/login-component.d.ts +4 -0
  9. package/build/build-cjs/src/content/login/login-services.d.ts +11 -0
  10. package/build/build-cjs/src/content/login/reset-password-component.d.ts +4 -0
  11. package/build/build-cjs/src/content/login/types.d.ts +24 -0
  12. package/build/build-cjs/src/index.d.ts +3 -1
  13. package/build/build-cjs/src/shared/utils/localization-util.d.ts +42 -0
  14. package/build/build-esm/index.js +3890 -364
  15. package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +22 -22
  16. package/build/build-esm/src/booking-wizard/features/price-details/price-details-slice.d.ts +10 -10
  17. package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +3 -3
  18. package/build/build-esm/src/booking-wizard/store.d.ts +3 -3
  19. package/build/build-esm/src/content/login/confirm-component.d.ts +4 -0
  20. package/build/build-esm/src/content/login/index.d.ts +4 -0
  21. package/build/build-esm/src/content/login/login-component.d.ts +4 -0
  22. package/build/build-esm/src/content/login/login-services.d.ts +11 -0
  23. package/build/build-esm/src/content/login/reset-password-component.d.ts +4 -0
  24. package/build/build-esm/src/content/login/types.d.ts +24 -0
  25. package/build/build-esm/src/index.d.ts +3 -1
  26. package/build/build-esm/src/shared/utils/localization-util.d.ts +42 -0
  27. package/package.json +4 -2
  28. package/src/content/login/confirm-component.tsx +149 -0
  29. package/src/content/login/index.tsx +70 -0
  30. package/src/content/login/login-component.tsx +158 -0
  31. package/src/content/login/login-services.ts +109 -0
  32. package/src/content/login/reset-password-component.tsx +190 -0
  33. package/src/content/login/types.ts +29 -0
  34. package/src/index.ts +3 -1
  35. package/src/shared/translations/ar-SA.json +32 -0
  36. package/src/shared/translations/da-DK.json +32 -0
  37. package/src/shared/translations/de-DE.json +32 -0
  38. package/src/shared/translations/en-GB.json +32 -0
  39. package/src/shared/translations/es-ES.json +32 -0
  40. package/src/shared/translations/fr-BE.json +32 -0
  41. package/src/shared/translations/fr-FR.json +32 -0
  42. package/src/shared/translations/is-IS.json +32 -0
  43. package/src/shared/translations/it-IT.json +32 -0
  44. package/src/shared/translations/ja-JP.json +32 -0
  45. package/src/shared/translations/nl-BE.json +32 -0
  46. package/src/shared/translations/nl-NL.json +32 -0
  47. package/src/shared/translations/no-NO.json +32 -0
  48. package/src/shared/translations/pl-PL.json +32 -0
  49. package/src/shared/translations/pt-PT.json +32 -0
  50. package/src/shared/translations/sv-SE.json +32 -0
  51. package/styles/components/_login.scss +7 -0
@@ -500,6 +500,38 @@ var PRINT_OFFER_BUTTON$f = {
500
500
  var NAVBAR$f = {
501
501
  SEARCH: 'بحث'
502
502
  };
503
+ var LOGIN$f = {
504
+ LOGIN_INTO: 'تسجيل الدخول إلى حسابك',
505
+ EMAIL: 'البريد الإلكتروني',
506
+ ENTER_YOUR_EMAIL: 'أدخل بريدك الإلكتروني',
507
+ EMAIL_REQUIRED: 'البريد الإلكتروني مطلوب.',
508
+ EMAIL_INVALID: 'البريد الإلكتروني غير صالح.',
509
+ ENTER_VALID_EMAIL: 'أدخل بريدًا إلكترونيًا صالحًا.',
510
+ PASSWORD: 'كلمة المرور',
511
+ ENTER_YOUR_PASSWORD: 'أدخل كلمة المرور',
512
+ RESET_PASSWORD_LABEL: 'كلمة المرور الجديدة',
513
+ RESET_REPEAT_PASSWORD_LABEL: 'تكرار كلمة المرور',
514
+ PASSWORD_REQUIRED: 'كلمة المرور مطلوبة.',
515
+ INVALID_CREDENTIALS: 'البريد الإلكتروني أو كلمة المرور غير صحيحة.',
516
+ LOGIN: 'تسجيل الدخول',
517
+ FORGOT_PASSWORD: 'هل نسيت كلمة المرور؟',
518
+ LOGGING_IN: 'جاري تسجيل الدخول...',
519
+ WELCOME_X: 'مرحبًا، ',
520
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'إعادة تعيين كلمة المرور',
521
+ RESET_REQUESTED: 'تم طلب إعادة تعيين كلمة المرور',
522
+ BACK_TO_HOMEPAGE: 'العودة إلى الصفحة الرئيسية',
523
+ BACK_TO_LOGIN: 'العودة إلى تسجيل الدخول',
524
+ RESET_PASSWORD_TITLE: 'إعادة تعيين كلمة المرور',
525
+ PASSWORD_COMPLEXITY: 'يجب أن تحتوي كلمة المرور على رقم واحد على الأقل وحرف كبير واحد',
526
+ REPEAT_PASSWORD_REQUIRED: 'يرجى تكرار كلمة المرور.',
527
+ PASSWORDS_DO_NOT_MATCH: 'كلمتا المرور غير متطابقتين.',
528
+ RESET_PASSWORD_SUBMIT_LABEL: 'تعديل كلمة المرور',
529
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'تم تغيير كلمة المرور الخاصة بك. يمكنك الآن تسجيل الدخول باستخدام كلمة المرور الجديدة.',
530
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'هذا الرابط منتهي الصلاحية أو غير صالح.',
531
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'يمكنك طلب كلمة مرور جديدة بالنقر على الزر أدناه.',
532
+ RECEIVED_REQUEST: 'تم استلام طلبك بنجاح',
533
+ ACCOUNT_ACTIVATED_LOGIN: 'تم تفعيل حسابك الآن. انقر أدناه لتسجيل الدخول ببياناتك.'
534
+ };
503
535
  var QSM$g = {
504
536
  DEPARTURE: 'المغادرة',
505
537
  CHOOSE_DEPARTURE: 'اختر المغادرة',
@@ -602,6 +634,7 @@ var arJson = {
602
634
  ERROR: ERROR$f,
603
635
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$f,
604
636
  NAVBAR: NAVBAR$f,
637
+ LOGIN: LOGIN$f,
605
638
  QSM: QSM$g,
606
639
  SRP: SRP$f
607
640
  };
@@ -862,6 +895,38 @@ var PRINT_OFFER_BUTTON$e = {
862
895
  var NAVBAR$e = {
863
896
  SEARCH: 'Søg'
864
897
  };
898
+ var LOGIN$e = {
899
+ LOGIN_INTO: 'Log ind på din konto',
900
+ EMAIL: 'E-mail',
901
+ ENTER_YOUR_EMAIL: 'Indtast din e-mail',
902
+ EMAIL_REQUIRED: 'E-mail er påkrævet.',
903
+ EMAIL_INVALID: 'E-mailen er ugyldig.',
904
+ ENTER_VALID_EMAIL: 'Indtast en gyldig e-mail.',
905
+ PASSWORD: 'Adgangskode',
906
+ ENTER_YOUR_PASSWORD: 'Indtast din adgangskode',
907
+ RESET_PASSWORD_LABEL: 'Ny adgangskode',
908
+ RESET_REPEAT_PASSWORD_LABEL: 'Gentag adgangskode',
909
+ PASSWORD_REQUIRED: 'Adgangskode er påkrævet.',
910
+ INVALID_CREDENTIALS: 'Ugyldig e-mail eller adgangskode.',
911
+ LOGIN: 'Log ind',
912
+ FORGOT_PASSWORD: 'Glemt adgangskode?',
913
+ LOGGING_IN: 'Logger ind...',
914
+ WELCOME_X: 'Velkommen, ',
915
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Nulstil adgangskode',
916
+ RESET_REQUESTED: 'Anmodning om nulstilling af adgangskode sendt',
917
+ BACK_TO_HOMEPAGE: 'Tilbage til forsiden',
918
+ BACK_TO_LOGIN: 'Tilbage til login',
919
+ RESET_PASSWORD_TITLE: 'Nulstil adgangskode',
920
+ PASSWORD_COMPLEXITY: 'Adgangskoden skal indeholde mindst 1 tal og 1 stort bogstav',
921
+ REPEAT_PASSWORD_REQUIRED: 'Gentag venligst din adgangskode.',
922
+ PASSWORDS_DO_NOT_MATCH: 'Adgangskoderne stemmer ikke overens.',
923
+ RESET_PASSWORD_SUBMIT_LABEL: 'Ændr adgangskode',
924
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Din adgangskode er blevet ændret. Du kan nu logge ind med din nye adgangskode.',
925
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Dette link er udløbet eller ugyldigt.',
926
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan anmode om en ny adgangskode ved at klikke på knappen nedenfor.',
927
+ RECEIVED_REQUEST: 'Din anmodning er modtaget',
928
+ ACCOUNT_ACTIVATED_LOGIN: 'Din konto er nu aktiv. Klik nedenfor for at logge ind med dine oplysninger.'
929
+ };
865
930
  var QSM$f = {
866
931
  DEPARTURE: 'Afgang',
867
932
  CHOOSE_DEPARTURE: 'Vælg afgang',
@@ -964,6 +1029,7 @@ var daJson = {
964
1029
  ERROR: ERROR$e,
965
1030
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$e,
966
1031
  NAVBAR: NAVBAR$e,
1032
+ LOGIN: LOGIN$e,
967
1033
  QSM: QSM$f,
968
1034
  SRP: SRP$e
969
1035
  };
@@ -1225,6 +1291,38 @@ var PRINT_OFFER_BUTTON$d = {
1225
1291
  var NAVBAR$d = {
1226
1292
  SEARCH: 'Suche'
1227
1293
  };
1294
+ var LOGIN$d = {
1295
+ LOGIN_INTO: 'Melden Sie sich in Ihrem Konto an',
1296
+ EMAIL: 'E-Mail',
1297
+ ENTER_YOUR_EMAIL: 'Geben Sie Ihre E-Mail ein',
1298
+ EMAIL_REQUIRED: 'E-Mail ist erforderlich.',
1299
+ EMAIL_INVALID: 'Die E-Mail ist ungültig.',
1300
+ ENTER_VALID_EMAIL: 'Geben Sie eine gültige E-Mail ein.',
1301
+ PASSWORD: 'Passwort',
1302
+ ENTER_YOUR_PASSWORD: 'Geben Sie Ihr Passwort ein',
1303
+ RESET_PASSWORD_LABEL: 'Neues Passwort',
1304
+ RESET_REPEAT_PASSWORD_LABEL: 'Passwort wiederholen',
1305
+ PASSWORD_REQUIRED: 'Passwort ist erforderlich.',
1306
+ INVALID_CREDENTIALS: 'Ungültige E-Mail oder Passwort.',
1307
+ LOGIN: 'Anmelden',
1308
+ FORGOT_PASSWORD: 'Passwort vergessen?',
1309
+ LOGGING_IN: 'Anmeldung läuft...',
1310
+ WELCOME_X: 'Willkommen, ',
1311
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Passwort zurücksetzen',
1312
+ RESET_REQUESTED: 'Passwort-Zurücksetzung angefordert',
1313
+ BACK_TO_HOMEPAGE: 'Zurück zur Startseite',
1314
+ BACK_TO_LOGIN: 'Zurück zum Login',
1315
+ RESET_PASSWORD_TITLE: 'Passwort zurücksetzen',
1316
+ PASSWORD_COMPLEXITY: 'Das Passwort muss mindestens 1 Zahl und 1 Großbuchstaben enthalten',
1317
+ REPEAT_PASSWORD_REQUIRED: 'Bitte wiederholen Sie Ihr Passwort.',
1318
+ PASSWORDS_DO_NOT_MATCH: 'Passwörter stimmen nicht überein.',
1319
+ RESET_PASSWORD_SUBMIT_LABEL: 'Passwort ändern',
1320
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Ihr Passwort wurde geändert. Sie können sich nun mit Ihrem neuen Passwort anmelden.',
1321
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Dieser Link ist abgelaufen oder ungültig.',
1322
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Sie können ein neues Passwort anfordern, indem Sie auf die Schaltfläche unten klicken.',
1323
+ RECEIVED_REQUEST: 'Ihre Anfrage wurde erfolgreich erhalten',
1324
+ ACCOUNT_ACTIVATED_LOGIN: 'Ihr Konto ist jetzt aktiv. Klicken Sie unten, um sich mit Ihren Daten anzumelden.'
1325
+ };
1228
1326
  var QSM$e = {
1229
1327
  DEPARTURE: 'Abflug',
1230
1328
  CHOOSE_DEPARTURE: 'Abflug wählen',
@@ -1327,6 +1425,7 @@ var deJson = {
1327
1425
  ERROR: ERROR$d,
1328
1426
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$d,
1329
1427
  NAVBAR: NAVBAR$d,
1428
+ LOGIN: LOGIN$d,
1330
1429
  QSM: QSM$e,
1331
1430
  SRP: SRP$d
1332
1431
  };
@@ -1591,6 +1690,38 @@ var PRINT_OFFER_BUTTON$c = {
1591
1690
  var NAVBAR$c = {
1592
1691
  SEARCH: 'Search'
1593
1692
  };
1693
+ var LOGIN$c = {
1694
+ LOGIN_INTO: 'Login to you account',
1695
+ EMAIL: 'Email',
1696
+ ENTER_YOUR_EMAIL: 'Enter your email',
1697
+ EMAIL_REQUIRED: 'Email is required.',
1698
+ EMAIL_INVALID: 'Email is invalid.',
1699
+ ENTER_VALID_EMAIL: 'Enter a valid email.',
1700
+ PASSWORD: 'Password',
1701
+ ENTER_YOUR_PASSWORD: 'Enter your password',
1702
+ RESET_PASSWORD_LABEL: 'New password',
1703
+ RESET_REPEAT_PASSWORD_LABEL: 'Repeat password',
1704
+ PASSWORD_REQUIRED: 'Password is required.',
1705
+ INVALID_CREDENTIALS: 'Invalid email or password.',
1706
+ LOGIN: 'Login',
1707
+ FORGOT_PASSWORD: 'Forgot password?',
1708
+ LOGGING_IN: 'Logging in...',
1709
+ WELCOME_X: 'Welcome, ',
1710
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Reset password',
1711
+ RESET_REQUESTED: 'Password reset requested',
1712
+ BACK_TO_HOMEPAGE: 'Back to homepage',
1713
+ BACK_TO_LOGIN: 'Back to login',
1714
+ RESET_PASSWORD_TITLE: 'Reset password',
1715
+ PASSWORD_COMPLEXITY: 'Password must contain at least 1 number and 1 capital letter',
1716
+ REPEAT_PASSWORD_REQUIRED: 'Please repeat your password.',
1717
+ PASSWORDS_DO_NOT_MATCH: 'Passwords do not match.',
1718
+ RESET_PASSWORD_SUBMIT_LABEL: 'Modify password',
1719
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Your password has been changed. You can now log in with your new password.',
1720
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'This link has expired or is invalid.',
1721
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'You can request a new password by clicking the button below.',
1722
+ RECEIVED_REQUEST: 'Your request has been well received',
1723
+ ACCOUNT_ACTIVATED_LOGIN: 'Your account is now active. Click below to log in with your details.'
1724
+ };
1594
1725
  var QSM$d = {
1595
1726
  DEPARTURE: 'Departure',
1596
1727
  CHOOSE_DEPARTURE: 'Choose Departure',
@@ -1693,6 +1824,7 @@ var enJson = {
1693
1824
  ERROR: ERROR$c,
1694
1825
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$c,
1695
1826
  NAVBAR: NAVBAR$c,
1827
+ LOGIN: LOGIN$c,
1696
1828
  QSM: QSM$d,
1697
1829
  SRP: SRP$c
1698
1830
  };
@@ -1954,6 +2086,38 @@ var PRINT_OFFER_BUTTON$b = {
1954
2086
  var NAVBAR$b = {
1955
2087
  SEARCH: 'Buscar'
1956
2088
  };
2089
+ var LOGIN$b = {
2090
+ LOGIN_INTO: 'Inicia sesión en tu cuenta',
2091
+ EMAIL: 'Correo electrónico',
2092
+ ENTER_YOUR_EMAIL: 'Introduce tu correo electrónico',
2093
+ EMAIL_REQUIRED: 'El correo electrónico es obligatorio.',
2094
+ EMAIL_INVALID: 'El correo electrónico no es válido.',
2095
+ ENTER_VALID_EMAIL: 'Introduce un correo electrónico válido.',
2096
+ PASSWORD: 'Contraseña',
2097
+ ENTER_YOUR_PASSWORD: 'Introduce tu contraseña',
2098
+ RESET_PASSWORD_LABEL: 'Nueva contraseña',
2099
+ RESET_REPEAT_PASSWORD_LABEL: 'Repetir contraseña',
2100
+ PASSWORD_REQUIRED: 'La contraseña es obligatoria.',
2101
+ INVALID_CREDENTIALS: 'Correo electrónico o contraseña no válidos.',
2102
+ LOGIN: 'Iniciar sesión',
2103
+ FORGOT_PASSWORD: '¿Olvidaste tu contraseña?',
2104
+ LOGGING_IN: 'Iniciando sesión...',
2105
+ WELCOME_X: 'Bienvenido, ',
2106
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Restablecer contraseña',
2107
+ RESET_REQUESTED: 'Solicitud de restablecimiento de contraseña enviada',
2108
+ BACK_TO_HOMEPAGE: 'Volver a la página principal',
2109
+ BACK_TO_LOGIN: 'Volver al inicio de sesión',
2110
+ RESET_PASSWORD_TITLE: 'Restablecer contraseña',
2111
+ PASSWORD_COMPLEXITY: 'La contraseña debe contener al menos 1 número y 1 letra mayúscula',
2112
+ REPEAT_PASSWORD_REQUIRED: 'Por favor repite tu contraseña.',
2113
+ PASSWORDS_DO_NOT_MATCH: 'Las contraseñas no coinciden.',
2114
+ RESET_PASSWORD_SUBMIT_LABEL: 'Modificar contraseña',
2115
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Tu contraseña ha sido cambiada. Ahora puedes iniciar sesión con tu nueva contraseña.',
2116
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Este enlace ha expirado o no es válido.',
2117
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Puedes solicitar una nueva contraseña haciendo clic en el botón de abajo.',
2118
+ RECEIVED_REQUEST: 'Tu solicitud ha sido recibida correctamente',
2119
+ ACCOUNT_ACTIVATED_LOGIN: 'Tu cuenta ahora está activa. Haz clic abajo para iniciar sesión con tus datos.'
2120
+ };
1957
2121
  var QSM$c = {
1958
2122
  DEPARTURE: 'Salida',
1959
2123
  CHOOSE_DEPARTURE: 'Elegir salida',
@@ -2056,6 +2220,7 @@ var esJson = {
2056
2220
  ERROR: ERROR$b,
2057
2221
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$b,
2058
2222
  NAVBAR: NAVBAR$b,
2223
+ LOGIN: LOGIN$b,
2059
2224
  QSM: QSM$c,
2060
2225
  SRP: SRP$b
2061
2226
  };
@@ -2321,369 +2486,434 @@ var PRINT_OFFER_BUTTON$a = {
2321
2486
  var NAVBAR$a = {
2322
2487
  SEARCH: 'Rechercher'
2323
2488
  };
2324
- var QSM$b = {
2325
- DEPARTURE: 'Départ',
2326
- CHOOSE_DEPARTURE: 'Choisir le départ',
2327
- DESTINATION: 'Destination',
2328
- CHOOSE_DESTINATION: 'Choisir une destination',
2329
- ONEWAY: 'Aller simple',
2330
- ROUNDTRIP: 'Aller-retour',
2331
- OPENJAW: 'Open-jaw',
2332
- MULTIDESTINATION: 'Multi-destinations',
2333
- PACKAGES: 'Forfaits',
2334
- TRANSPORT_HOTEL: 'Transport + hôtel',
2335
- ACCOMMODATION: 'Hébergement',
2336
- TRANSPORTS: 'Transports',
2337
- TICKET_ONLY: 'Billet uniquement',
2338
- RENT_A_CAR: 'Location de voiture',
2339
- TRANSFERS: 'Transferts',
2340
- CRUISES: 'Croisières',
2341
- ONE_ACCOMMODATION: 'Un hébergement',
2342
- MULTIPLE_ACCOMMODATIONS: 'Plusieurs hébergements',
2343
- TRAVEL_CLASS_LABEL: 'Classe de voyage',
2344
- TRAVEL_CLASS_PLACEHOLDER: 'Sélectionnez la classe',
2345
- TRAVEL_TYPE_LABEL: 'Type de voyage',
2346
- TRAVEL_TYPE_PLACEHOLDER: 'Sélectionnez le type de voyage',
2347
- NATIONALITY_LABEL: 'Nationalité',
2348
- NATIONALITY_PLACEHOLDER: 'Sélectionnez la nationalité',
2349
- TRAVELERS_LABEL: 'Qui voyage ?',
2350
- ADD_ROOM: 'Ajouter une chambre',
2351
- REMOVE_ROOM: 'Supprimer la chambre',
2352
- MAX_TRAVELERS_REACHED: 'Vous avez atteint le nombre maximum de voyageurs',
2353
- ADULTS: 'Adultes',
2354
- CHILDREN: 'Enfants',
2355
- BABIES: 'Bébés',
2356
- CHOOSE_DATES: 'Choisir les dates',
2357
- DEPARTURE_DATE: 'Date de départ',
2358
- RETURN_DATE: 'Date de retour',
2359
- CONFIRM: 'Confirmer',
2360
- TRAVELERS: 'Voyageurs'
2361
- };
2362
- var SRP$a = {
2363
- NO_RESULTS: 'Aucun résultat trouvé.',
2364
- TOTAL_RESULTS_LABEL: 'Forfaits trouvés',
2365
- RESET: 'Réinitialiser',
2366
- LUGGAGEINCLUDED: 'Bagages inclus',
2367
- CANCEL: 'Annuler',
2368
- APPLY: 'Appliquer',
2369
- LOADING: 'Chargement...',
2370
- SEARCHRESULTCTA: 'Voir les détails',
2371
- SORTBY: 'Trier par',
2372
- PRICE_ASC: 'Prix (croissant)',
2373
- PRICE_DESC: 'Prix (décroissant)',
2374
- DEPARTURE_TIME_ASC: 'Heure de départ croissante',
2375
- DEPARTURE_TIME_DESC: 'Heure de départ décroissante',
2376
- DURATION_ASC: 'Durée croissante',
2377
- DURATION_DESC: 'Durée décroissante',
2378
- DEPARTURE_ASC: 'Date de départ (la plus proche d’abord)',
2379
- FILTERS: 'Filtres',
2380
- SHOW_ITINERARY: 'Afficher l’itinéraire',
2381
- ITINERARY_TITLE: 'Résumé de votre voyage',
2382
- DOSSIER_NUMBER: 'Numéro de dossier',
2383
- PACKAGE_PRICE_PER_PERSON: 'prix du forfait par personne',
2384
- TOTAL: 'total',
2385
- DAY_BY_DAY: 'Votre voyage jour par jour',
2386
- START: 'début',
2387
- END: 'fin',
2388
- EXTENDED: 'Étendu',
2389
- COMPACT: 'Compact',
2390
- LIST: 'Liste',
2391
- SELECT: 'Sélectionner',
2392
- DEPARTURE: 'Départ',
2393
- RETURN: 'Retour',
2394
- DIRECT: 'Direct',
2395
- STOPS: 'escales',
2396
- STOP: 'escale',
2397
- STOP_TIME: 'Temps d’escale',
2398
- ACCOMMODATION: 'Hébergement',
2399
- VIEW_DETAILS: 'Voir les détails',
2400
- NIGHTS: 'nuits',
2401
- MORNING_RANGE: 'Matin',
2402
- AFTERNOON_RANGE: 'Après-midi',
2403
- EVENING_RANGE: 'Soir',
2404
- NIGHT_RANGE: 'Nuit',
2405
- DEPARTURE_RANGE: 'Plage de départ',
2406
- DEPARTURE_AIRPORTS: 'Aéroports de départ',
2407
- ARRIVAL_AIRPORTS: 'Aéroports d’arrivée',
2408
- PRICE: 'Prix'
2409
- };
2410
- var frBeJson = {
2411
- STEPS: STEPS$a,
2412
- INPUT: INPUT$a,
2413
- FLIGHTS_FORM: FLIGHTS_FORM$a,
2414
- PRODUCT: PRODUCT$a,
2415
- MAIN: MAIN$a,
2416
- SHARED: SHARED$a,
2417
- SIDEBAR: SIDEBAR$a,
2418
- TRAVELERS_FORM: TRAVELERS_FORM$a,
2419
- OPTIONS_FORM: OPTIONS_FORM$a,
2420
- ROOM_OPTIONS_FORM: ROOM_OPTIONS_FORM$a,
2421
- SUMMARY: SUMMARY$a,
2422
- CONFIRMATION: CONFIRMATION$a,
2423
- ERROR: ERROR$a,
2424
- PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$a,
2425
- NAVBAR: NAVBAR$a,
2426
- QSM: QSM$b,
2427
- SRP: SRP$a
2428
- };
2429
-
2430
- var STEPS$9 = {
2431
- PERSONAL_DETAILS: 'Informations personnelles',
2432
- EXTRA_OPTIONS: 'Options supplémentaires',
2433
- SUMMARY: 'Résumé',
2434
- CONFIRMATION: 'Confirmation',
2435
- ERROR: 'Réservation échouée',
2436
- PREVIOUS: 'Étape précédente',
2437
- NEXT: 'Étape suivante',
2438
- SUBMIT_BOOKING: 'Confirmer la réservation',
2439
- SUBMIT_OFFER: 'Demander un devis',
2440
- SUBMIT_OPTION: 'Prendre une option',
2441
- COMPOSE: 'Rédiger',
2442
- ROOM_OPTIONS: 'Options de chambre',
2443
- FLIGHT_OPTIONS: 'Options de vol'
2444
- };
2445
- var INPUT$9 = {
2446
- INCREASE: 'Augmenter',
2447
- DECREASE: 'Diminuer'
2448
- };
2449
- var FLIGHTS_FORM$9 = {
2450
- OUTWARD_FLIGHTS: 'Vols aller',
2451
- OUTWARD_FLIGHT: 'Vol aller',
2452
- RETURN_FLIGHTS: 'Vols retour',
2453
- RETURN_FLIGHT: 'Vol retour',
2454
- DIRECT_FLIGHT: 'Vol direct',
2455
- STOP: 'escale',
2456
- STOPS: 'escales',
2457
- FLIGHT_STOPS: 'escale(s)',
2458
- DIFFERENT_OPTION_WARNING: 'Attention : Ce vol modifie la durée du séjour.',
2459
- FILTER_OPTIONS: 'Filtrer les options',
2460
- AIRLINES: 'Compagnies aériennes',
2461
- AIRPORTS: 'Aéroports',
2462
- NUMBER_OF_STOPS: "Nombre d'escales",
2463
- FLIGHT_OUTWARD: 'Vol aller',
2464
- DEPARTURE_TIME: 'Heure de départ',
2465
- TRAVEL_DURATION: 'Durée du voyage',
2466
- CHANGE_TIME: 'Temps de correspondance',
2467
- FLIGHT_RETURN: 'Vol retour',
2468
- NO_FLIGHTS_FOUND: 'Aucun vol trouvé.',
2469
- STARTING: 'À partir de',
2470
- LOWEST_PRICE: 'Prix le plus bas',
2471
- CHOOSE_YOUR_CLASS: 'Choisissez votre classe :',
2472
- PLUS_ONE_DAY: '+1 jour',
2473
- STOP_TIME: 'Temps de correspondance',
2474
- NIGHT_DEPARTURE: 'Nuit (00:00 - 05:00)',
2475
- MORNING_DEPARTURE: 'Matin (05:00 - 12:00)',
2476
- AFTERNOON_DEPARTURE: 'Après-midi (12:00 - 18:00)',
2477
- EVENING_DEPARTURE: 'Soir (18:00 - 00:00)',
2478
- FLIGHTS_FOUND_1: '',
2479
- FLIGHTS_FOUND_2: 'vols',
2480
- FLIGHTS_FOUND_3: 'trouvés'
2481
- };
2482
- var PRODUCT$9 = {
2483
- STAY_INCLUDED: 'Séjour inclus',
2484
- FLIGHT_INCLUDED: 'Vol inclus',
2485
- TRANSFER_INCLUDED: 'Transfert inclus',
2486
- LOADING_PRICE: 'Votre prix est en cours de calcul.',
2487
- PER_PERSON: 'Par personne',
2488
- PER_NIGHT: 'Par nuit',
2489
- PER_PERSON_PER_NIGHT: 'Par personne / par nuit',
2490
- BOOK_NOW: 'Réservez maintenant',
2491
- TO_YOUR_OFFER: 'Vers votre devis',
2492
- NOT_AVAILABLE: 'Indisponible',
2493
- NUMBER_OF_ROOMS: 'Nombre de chambres',
2494
- AGE_BY_DEPARTURE_DATE: 'Âge des enfants à la date de départ',
2495
- YEAR: 'An(s)',
2496
- APPLY: 'Appliquer',
2497
- EDIT: 'Modifier',
2498
- DEPARTURE: 'Départ',
2499
- DEPARTURE_DATE: 'Date de départ',
2500
- RETURN: 'Retour',
2501
- RETURN_DATE: 'Date de retour',
2502
- WHO_YOU_TRAVELING_WITH: 'Avec qui voyagez-vous ?',
2503
- TRAVEL_PERIOD: 'Période de voyage',
2504
- CLOSE: 'Fermer',
2505
- NIGHTS: 'nuits',
2506
- DAYS: 'jours'
2507
- };
2508
- var MAIN$9 = {
2509
- PREPARING_BOOKING: 'Veuillez patienter, nous préparons votre réservation',
2510
- PREPARING_OFFER: 'Veuillez patienter, nous préparons votre devis',
2511
- PREPARING_DOSSIER: 'Veuillez patienter, nous préparons votre dossier',
2512
- PRODUCT_UNAVAILABLE: 'Produit non disponible'
2513
- };
2514
- var SHARED$9 = {
2515
- ROOM: 'Chambre',
2516
- ROOMS: 'Chambres',
2517
- TOTAL_PRICE: 'Prix total',
2518
- ADULTS: 'Adultes',
2519
- CHILDREN: 'Enfants',
2520
- SELECT: 'Sélectionner',
2521
- SELECTED: 'Sélectionné'
2522
- };
2523
- var SIDEBAR$9 = {
2524
- OVERVIEW: 'Résumé',
2525
- SLIDE_TOTAL_PRICE: 'Montant total : ',
2526
- SLIDE_DEPOSIT: 'Acompte à payer : ',
2527
- TRAVEL_INFO: 'Informations voyage',
2528
- TRAVELERS: 'Voyageurs',
2529
- TRAVELERS_ADULTS: 'adultes',
2530
- TRAVELERS_ADULT: 'adulte',
2531
- TRAVELERS_CHILDREN: 'enfants',
2532
- TRAVELERS_CHILD: 'enfant',
2533
- DEPARTURE: 'Aller',
2534
- DEPARTURE_SINGLE: 'Date',
2535
- ARRIVAL: 'Retour',
2536
- FLIGHT: 'Vol',
2537
- ACCOMMODATION: 'Hébergement réservé',
2538
- BASE_PRICE: 'Prix de base',
2539
- OPTIONS: 'Options',
2540
- INCLUDED_COSTS: 'Coûts inclus',
2541
- EXTRA_COSTS: 'Coûts supplémentaires',
2542
- DEPOSIT: 'Acompte à payer',
2543
- DEPOSIT_TEXT1: 'Les étapes pour le ',
2544
- DEPOSIT_TEXT2: 'solde restant',
2545
- DEPOSIT_TEXT3: ' de ',
2546
- DEPOSIT_TEXT4: ' sont décrites dans ',
2547
- DEPOSIT_TEXT5: "l'étape « Résumé »",
2548
- DEPOSIT_TEXT6: ' du processus de réservation.',
2549
- LUGGAGE_INCLUDED: 'Bagages inclus',
2550
- DEPARTURE_FLIGHT: 'Vol aller',
2551
- ARRIVAL_FLIGHT: 'Vol retour',
2552
- FLIGHT_DEPARTURE: 'Départ',
2553
- FLIGHT_ARRIVAL: 'Arrivée',
2554
- ON_REQUEST: 'Sur demande',
2555
- CHANGES: 'transferts'
2556
- };
2557
- var TRAVELERS_FORM$9 = {
2558
- AGE: 'Âge',
2559
- TRAVELER: 'Voyageur',
2560
- ADULT: 'adulte',
2561
- ADULTS: 'adultes',
2562
- CHILD: 'enfant',
2563
- CHILDREN: 'enfants',
2564
- GENDER: 'Civilité',
2565
- GENDER_ID: "Sexe selon passeport/carte d'identité",
2566
- MALE: 'M.',
2567
- MALE_GENDER: 'Homme',
2568
- FEMALE: 'Mme',
2569
- FEMALE_GENDER: 'Femme',
2570
- OTHER: 'Autre',
2571
- MAIN_BOOKER: 'Titulaire de la réservation',
2572
- FIRST_NAME: 'Prénom',
2573
- LAST_NAME: 'Nom',
2574
- BIRTHDATE: 'Date de naissance',
2575
- STREET: 'Rue',
2576
- STREET_PLACEHOLDER: 'Votre rue',
2577
- HOUSE_NUMBER: 'Numéro',
2578
- POST_BOX: 'Boîte postale',
2579
- ZIPCODE: 'Code postal',
2580
- CITY: 'Ville',
2581
- CITY_PLACEHOLDER: 'Ville',
2582
- COUNTRY: 'Pays',
2583
- SELECT_COUNTRY: 'Sélectionner le pays',
2584
- PHONE: 'Téléphone',
2489
+ var LOGIN$a = {
2490
+ LOGIN_INTO: 'Connectez-vous à votre compte',
2585
2491
  EMAIL: 'Email',
2586
- REPEAT_EMAIL: "Répéter l'email",
2587
- VALIDATION_MESSAGE: 'Veuillez vérifier les champs ci-dessous et les remplir correctement.',
2588
- BOOK_WITH_AGENT: 'Je souhaite réserver via mon agence de voyage locale',
2589
- CHOOSE_OFFICE: 'Je choisis un bureau',
2590
- PERSON: 'Personne',
2591
- COUNTRIES: {
2592
- BELGIUM: 'Belgique',
2593
- NETHERLANDS: 'Pays-Bas',
2594
- FRANCE: 'France'
2595
- },
2596
- CHOOSE_AGENT_PLACEHOLDER: 'Choisissez votre agent de voyage',
2597
- VALIDATION: {
2598
- TRAVELER_X_FIELD: 'Chambre {0} - Voyageur {1} : {2}',
2599
- SINGLE_ROOM_TRAVELER_X_FIELD: 'Voyageur {0} : {1}',
2600
- TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
2601
- SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
2602
- TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
2603
- SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD: "Voyageur {0} : n'est pas un enfant",
2604
- NO_MAIN_BOOKER_SELECTED: 'Aucun titulaire de réservation sélectionné',
2605
- MAIN_BOOKER_FIELD: 'Titulaire de la réservation : {0}',
2606
- MAIN_BOOKER_EMAIL_IS_INVALID: 'Titulaire de la réservation : email invalide',
2607
- MAIN_BOOKER_EMAIL_DOES_NOT_MATCH: 'Titulaire de la réservation : email non concordant',
2608
- AGENT_IS_REQUIRED: 'Un agent de voyage est requis'
2609
- }
2492
+ ENTER_YOUR_EMAIL: 'Entrez votre email',
2493
+ EMAIL_REQUIRED: 'L’email est requis.',
2494
+ EMAIL_INVALID: 'L’email est invalide.',
2495
+ ENTER_VALID_EMAIL: 'Entrez un email valide.',
2496
+ PASSWORD: 'Mot de passe',
2497
+ ENTER_YOUR_PASSWORD: 'Entrez votre mot de passe',
2498
+ RESET_PASSWORD_LABEL: 'Nouveau mot de passe',
2499
+ RESET_REPEAT_PASSWORD_LABEL: 'Répéter le mot de passe',
2500
+ PASSWORD_REQUIRED: 'Le mot de passe est requis.',
2501
+ INVALID_CREDENTIALS: 'Email ou mot de passe invalide.',
2502
+ LOGIN: 'Se connecter',
2503
+ FORGOT_PASSWORD: 'Mot de passe oublié ?',
2504
+ LOGGING_IN: 'Connexion...',
2505
+ WELCOME_X: 'Bienvenue, ',
2506
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Réinitialiser le mot de passe',
2507
+ RESET_REQUESTED: 'Demande de réinitialisation du mot de passe envoyée',
2508
+ BACK_TO_HOMEPAGE: 'Retour à la page d’accueil',
2509
+ BACK_TO_LOGIN: 'Retour à la connexion',
2510
+ RESET_PASSWORD_TITLE: 'Réinitialiser le mot de passe',
2511
+ PASSWORD_COMPLEXITY: 'Le mot de passe doit contenir au moins 1 chiffre et 1 lettre majuscule',
2512
+ REPEAT_PASSWORD_REQUIRED: 'Veuillez répéter votre mot de passe.',
2513
+ PASSWORDS_DO_NOT_MATCH: 'Les mots de passe ne correspondent pas.',
2514
+ RESET_PASSWORD_SUBMIT_LABEL: 'Modifier le mot de passe',
2515
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Votre mot de passe a été modifié. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.',
2516
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ce lien a expiré ou est invalide.',
2517
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Vous pouvez demander un nouveau mot de passe en cliquant sur le bouton ci-dessous.',
2518
+ RECEIVED_REQUEST: 'Votre demande a bien été reçue',
2519
+ ACCOUNT_ACTIVATED_LOGIN: 'Votre compte est maintenant actif. Cliquez ci-dessous pour vous connecter avec vos informations.'
2610
2520
  };
2611
- var OPTIONS_FORM$9 = {
2612
- NO_OPTIONS_TITLE: 'Aucune option',
2613
- NO_OPTIONS_MESSAGE: "Ce voyage n'a pas d'options supplémentaires.",
2614
- UNIT_TITLE: 'Groupe',
2615
- PACKAGE: 'Forfait',
2616
- DAY: 'jour',
2617
- DAYS: 'jours',
2618
- NIGHT: 'nuit',
2619
- NIGHTS: 'nuits',
2620
- PER_PAX_TITLE: 'Sélectionnez les options par voyageur',
2621
- PER_BOOKING_TITLE: 'Sélectionnez les options par réservation',
2622
- PER_UNIT_TITLE: 'Sélectionnez les options par groupe',
2623
- NONE: 'Aucune'
2624
- };
2625
- var ROOM_OPTIONS_FORM$9 = {
2626
- TRAVELER_GROUP: 'Groupe de voyage',
2627
- ALTERNATIVES_TRAVELER_GROUP: 'Options alternatives de chambre pour le groupe',
2628
- SHOW_ALTERNATIVES: 'Afficher les options alternatives de chambre'
2629
- };
2630
- var SUMMARY$9 = {
2631
- PERSONAL_DETAILS: 'Informations personnelles',
2632
- TRAVELERS: 'voyageurs',
2633
- TRAVELER: 'voyageur',
2634
- ADULTS: 'adultes',
2635
- ADULT: 'adulte',
2636
- CHILDREN: 'enfants',
2637
- CHILD: 'enfant',
2638
- MAIN_BOOKER: 'Titulaire de la réservation',
2639
- NOTIFICATIONS_TITLE: 'Attention',
2640
- VALIDATE_TITLE: 'Vérifiez vos informations',
2641
- VALIDATE_TEXT_BOOKING:
2642
- "Vous êtes sur le point de confirmer votre réservation. Veuillez vérifier que toutes les informations sont correctes et que les noms correspondent exactement à votre pièce d'identité ou passeport. Ces informations sont définitives et ne peuvent pas être modifiées.",
2643
- VALIDATE_TEXT_OFFER:
2644
- "Vous êtes sur le point de demander un devis. Veuillez vérifier que toutes les informations sont correctes et que les noms correspondent exactement à votre pièce d'identité ou passeport. Cela nous aide à éviter des problèmes si vous réservez plus tard.",
2645
- VALIDATE_TEXT_OPTION:
2646
- "Si vous choisissez de prendre une option, il existe un délai pour l'exercer qui dépend de la compagnie aérienne. Une option garantit une place mais pas le prix. Le prix indiqué dans cette proposition est par personne et dépend de la disponibilité. Le prix n'est garanti qu'une fois le billet émis.",
2647
- OPTIONS: 'Options',
2648
- REMARKS: 'Remarques',
2649
- VOUCHERS: 'Bons',
2650
- VOUCHER_VALIDATE: 'Valider le bon',
2651
- ADD_VOUCHER: 'Ajouter un bon',
2652
- VOUCHER_VALID: 'Bon valide',
2653
- VOUCHER_INVALID: 'Bon invalide'
2654
- };
2655
- var CONFIRMATION$9 = {
2656
- TITLE_TEXT_OFFER: 'Votre devis numéro {0} a été demandé',
2657
- TITLE_TEXT_BOOKING: 'Votre réservation numéro {0} a été confirmée',
2658
- TITLE_TEXT_OPTION: 'Vous avez pris une option sur le numéro {0}.',
2659
- MESSAGE_TEXT1: 'Votre voyage de rêve est maintenant très proche.',
2660
- MESSAGE_TEXT2_OFFER: 'Nos spécialistes du voyage traitent votre demande et vous contacteront sous 48 heures.',
2661
- MESSAGE_TEXT2_BOOKING: 'Nos spécialistes du voyage traitent votre réservation et vous contacteront sous 48 heures.',
2662
- MESSAGE_TEXT2_OPTION: 'Nos spécialistes du voyage ont noté votre réservation et vous contacteront sous 48 heures pour confirmer ou discuter de votre option.',
2663
- QUESTIONS_TEXT1: 'Vous avez des questions ? ',
2664
- QUESTIONS_TEXT2: 'Faites-le nous savoir',
2665
- QUESTIONS_TEXT3: '.',
2666
- QUESTIONS_ALT: 'Contactez-nous',
2667
- MAIL_SUBJECT: 'Informations sur la réservation'
2668
- };
2669
- var ERROR$9 = {
2670
- TRY_AGAIN: 'Réessayer la réservation',
2671
- MESSAGE_TEXT1: "Une erreur s'est produite lors de la confirmation de votre voyage.",
2672
- MESSAGE_TEXT2: 'Cliquez ci-dessous pour réessayer.',
2673
- ERROR_TEXT1: 'Ça ne fonctionne toujours pas ? ',
2674
- ERROR_TEXT2: 'Assurez-vous de nous le faire savoir',
2675
- ERROR_TEXT3: '.',
2676
- ERROR_ALT: 'Contactez-nous'
2677
- };
2678
- var PRINT_OFFER_BUTTON$9 = {
2679
- LABEL_IDLE: 'Imprimer le devis',
2680
- LABEL_CREATING: 'Génération du devis…',
2681
- LABEL_PRINTING: 'Génération du PDF…'
2682
- };
2683
- var NAVBAR$9 = {
2684
- SEARCH: 'Rechercher'
2685
- };
2686
- var QSM$a = {
2521
+ var QSM$b = {
2522
+ DEPARTURE: 'Départ',
2523
+ CHOOSE_DEPARTURE: 'Choisir le départ',
2524
+ DESTINATION: 'Destination',
2525
+ CHOOSE_DESTINATION: 'Choisir une destination',
2526
+ ONEWAY: 'Aller simple',
2527
+ ROUNDTRIP: 'Aller-retour',
2528
+ OPENJAW: 'Open-jaw',
2529
+ MULTIDESTINATION: 'Multi-destinations',
2530
+ PACKAGES: 'Forfaits',
2531
+ TRANSPORT_HOTEL: 'Transport + hôtel',
2532
+ ACCOMMODATION: 'Hébergement',
2533
+ TRANSPORTS: 'Transports',
2534
+ TICKET_ONLY: 'Billet uniquement',
2535
+ RENT_A_CAR: 'Location de voiture',
2536
+ TRANSFERS: 'Transferts',
2537
+ CRUISES: 'Croisières',
2538
+ ONE_ACCOMMODATION: 'Un hébergement',
2539
+ MULTIPLE_ACCOMMODATIONS: 'Plusieurs hébergements',
2540
+ TRAVEL_CLASS_LABEL: 'Classe de voyage',
2541
+ TRAVEL_CLASS_PLACEHOLDER: 'Sélectionnez la classe',
2542
+ TRAVEL_TYPE_LABEL: 'Type de voyage',
2543
+ TRAVEL_TYPE_PLACEHOLDER: 'Sélectionnez le type de voyage',
2544
+ NATIONALITY_LABEL: 'Nationalité',
2545
+ NATIONALITY_PLACEHOLDER: 'Sélectionnez la nationalité',
2546
+ TRAVELERS_LABEL: 'Qui voyage ?',
2547
+ ADD_ROOM: 'Ajouter une chambre',
2548
+ REMOVE_ROOM: 'Supprimer la chambre',
2549
+ MAX_TRAVELERS_REACHED: 'Vous avez atteint le nombre maximum de voyageurs',
2550
+ ADULTS: 'Adultes',
2551
+ CHILDREN: 'Enfants',
2552
+ BABIES: 'Bébés',
2553
+ CHOOSE_DATES: 'Choisir les dates',
2554
+ DEPARTURE_DATE: 'Date de départ',
2555
+ RETURN_DATE: 'Date de retour',
2556
+ CONFIRM: 'Confirmer',
2557
+ TRAVELERS: 'Voyageurs'
2558
+ };
2559
+ var SRP$a = {
2560
+ NO_RESULTS: 'Aucun résultat trouvé.',
2561
+ TOTAL_RESULTS_LABEL: 'Forfaits trouvés',
2562
+ RESET: 'Réinitialiser',
2563
+ LUGGAGEINCLUDED: 'Bagages inclus',
2564
+ CANCEL: 'Annuler',
2565
+ APPLY: 'Appliquer',
2566
+ LOADING: 'Chargement...',
2567
+ SEARCHRESULTCTA: 'Voir les détails',
2568
+ SORTBY: 'Trier par',
2569
+ PRICE_ASC: 'Prix (croissant)',
2570
+ PRICE_DESC: 'Prix (décroissant)',
2571
+ DEPARTURE_TIME_ASC: 'Heure de départ croissante',
2572
+ DEPARTURE_TIME_DESC: 'Heure de départ décroissante',
2573
+ DURATION_ASC: 'Durée croissante',
2574
+ DURATION_DESC: 'Durée décroissante',
2575
+ DEPARTURE_ASC: 'Date de départ (la plus proche d’abord)',
2576
+ FILTERS: 'Filtres',
2577
+ SHOW_ITINERARY: 'Afficher l’itinéraire',
2578
+ ITINERARY_TITLE: 'Résumé de votre voyage',
2579
+ DOSSIER_NUMBER: 'Numéro de dossier',
2580
+ PACKAGE_PRICE_PER_PERSON: 'prix du forfait par personne',
2581
+ TOTAL: 'total',
2582
+ DAY_BY_DAY: 'Votre voyage jour par jour',
2583
+ START: 'début',
2584
+ END: 'fin',
2585
+ EXTENDED: 'Étendu',
2586
+ COMPACT: 'Compact',
2587
+ LIST: 'Liste',
2588
+ SELECT: 'Sélectionner',
2589
+ DEPARTURE: 'Départ',
2590
+ RETURN: 'Retour',
2591
+ DIRECT: 'Direct',
2592
+ STOPS: 'escales',
2593
+ STOP: 'escale',
2594
+ STOP_TIME: 'Temps d’escale',
2595
+ ACCOMMODATION: 'Hébergement',
2596
+ VIEW_DETAILS: 'Voir les détails',
2597
+ NIGHTS: 'nuits',
2598
+ MORNING_RANGE: 'Matin',
2599
+ AFTERNOON_RANGE: 'Après-midi',
2600
+ EVENING_RANGE: 'Soir',
2601
+ NIGHT_RANGE: 'Nuit',
2602
+ DEPARTURE_RANGE: 'Plage de départ',
2603
+ DEPARTURE_AIRPORTS: 'Aéroports de départ',
2604
+ ARRIVAL_AIRPORTS: 'Aéroports d’arrivée',
2605
+ PRICE: 'Prix'
2606
+ };
2607
+ var frBeJson = {
2608
+ STEPS: STEPS$a,
2609
+ INPUT: INPUT$a,
2610
+ FLIGHTS_FORM: FLIGHTS_FORM$a,
2611
+ PRODUCT: PRODUCT$a,
2612
+ MAIN: MAIN$a,
2613
+ SHARED: SHARED$a,
2614
+ SIDEBAR: SIDEBAR$a,
2615
+ TRAVELERS_FORM: TRAVELERS_FORM$a,
2616
+ OPTIONS_FORM: OPTIONS_FORM$a,
2617
+ ROOM_OPTIONS_FORM: ROOM_OPTIONS_FORM$a,
2618
+ SUMMARY: SUMMARY$a,
2619
+ CONFIRMATION: CONFIRMATION$a,
2620
+ ERROR: ERROR$a,
2621
+ PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$a,
2622
+ NAVBAR: NAVBAR$a,
2623
+ LOGIN: LOGIN$a,
2624
+ QSM: QSM$b,
2625
+ SRP: SRP$a
2626
+ };
2627
+
2628
+ var STEPS$9 = {
2629
+ PERSONAL_DETAILS: 'Informations personnelles',
2630
+ EXTRA_OPTIONS: 'Options supplémentaires',
2631
+ SUMMARY: 'Résumé',
2632
+ CONFIRMATION: 'Confirmation',
2633
+ ERROR: 'Réservation échouée',
2634
+ PREVIOUS: 'Étape précédente',
2635
+ NEXT: 'Étape suivante',
2636
+ SUBMIT_BOOKING: 'Confirmer la réservation',
2637
+ SUBMIT_OFFER: 'Demander un devis',
2638
+ SUBMIT_OPTION: 'Prendre une option',
2639
+ COMPOSE: 'Rédiger',
2640
+ ROOM_OPTIONS: 'Options de chambre',
2641
+ FLIGHT_OPTIONS: 'Options de vol'
2642
+ };
2643
+ var INPUT$9 = {
2644
+ INCREASE: 'Augmenter',
2645
+ DECREASE: 'Diminuer'
2646
+ };
2647
+ var FLIGHTS_FORM$9 = {
2648
+ OUTWARD_FLIGHTS: 'Vols aller',
2649
+ OUTWARD_FLIGHT: 'Vol aller',
2650
+ RETURN_FLIGHTS: 'Vols retour',
2651
+ RETURN_FLIGHT: 'Vol retour',
2652
+ DIRECT_FLIGHT: 'Vol direct',
2653
+ STOP: 'escale',
2654
+ STOPS: 'escales',
2655
+ FLIGHT_STOPS: 'escale(s)',
2656
+ DIFFERENT_OPTION_WARNING: 'Attention : Ce vol modifie la durée du séjour.',
2657
+ FILTER_OPTIONS: 'Filtrer les options',
2658
+ AIRLINES: 'Compagnies aériennes',
2659
+ AIRPORTS: 'Aéroports',
2660
+ NUMBER_OF_STOPS: "Nombre d'escales",
2661
+ FLIGHT_OUTWARD: 'Vol aller',
2662
+ DEPARTURE_TIME: 'Heure de départ',
2663
+ TRAVEL_DURATION: 'Durée du voyage',
2664
+ CHANGE_TIME: 'Temps de correspondance',
2665
+ FLIGHT_RETURN: 'Vol retour',
2666
+ NO_FLIGHTS_FOUND: 'Aucun vol trouvé.',
2667
+ STARTING: 'À partir de',
2668
+ LOWEST_PRICE: 'Prix le plus bas',
2669
+ CHOOSE_YOUR_CLASS: 'Choisissez votre classe :',
2670
+ PLUS_ONE_DAY: '+1 jour',
2671
+ STOP_TIME: 'Temps de correspondance',
2672
+ NIGHT_DEPARTURE: 'Nuit (00:00 - 05:00)',
2673
+ MORNING_DEPARTURE: 'Matin (05:00 - 12:00)',
2674
+ AFTERNOON_DEPARTURE: 'Après-midi (12:00 - 18:00)',
2675
+ EVENING_DEPARTURE: 'Soir (18:00 - 00:00)',
2676
+ FLIGHTS_FOUND_1: '',
2677
+ FLIGHTS_FOUND_2: 'vols',
2678
+ FLIGHTS_FOUND_3: 'trouvés'
2679
+ };
2680
+ var PRODUCT$9 = {
2681
+ STAY_INCLUDED: 'Séjour inclus',
2682
+ FLIGHT_INCLUDED: 'Vol inclus',
2683
+ TRANSFER_INCLUDED: 'Transfert inclus',
2684
+ LOADING_PRICE: 'Votre prix est en cours de calcul.',
2685
+ PER_PERSON: 'Par personne',
2686
+ PER_NIGHT: 'Par nuit',
2687
+ PER_PERSON_PER_NIGHT: 'Par personne / par nuit',
2688
+ BOOK_NOW: 'Réservez maintenant',
2689
+ TO_YOUR_OFFER: 'Vers votre devis',
2690
+ NOT_AVAILABLE: 'Indisponible',
2691
+ NUMBER_OF_ROOMS: 'Nombre de chambres',
2692
+ AGE_BY_DEPARTURE_DATE: 'Âge des enfants à la date de départ',
2693
+ YEAR: 'An(s)',
2694
+ APPLY: 'Appliquer',
2695
+ EDIT: 'Modifier',
2696
+ DEPARTURE: 'Départ',
2697
+ DEPARTURE_DATE: 'Date de départ',
2698
+ RETURN: 'Retour',
2699
+ RETURN_DATE: 'Date de retour',
2700
+ WHO_YOU_TRAVELING_WITH: 'Avec qui voyagez-vous ?',
2701
+ TRAVEL_PERIOD: 'Période de voyage',
2702
+ CLOSE: 'Fermer',
2703
+ NIGHTS: 'nuits',
2704
+ DAYS: 'jours'
2705
+ };
2706
+ var MAIN$9 = {
2707
+ PREPARING_BOOKING: 'Veuillez patienter, nous préparons votre réservation',
2708
+ PREPARING_OFFER: 'Veuillez patienter, nous préparons votre devis',
2709
+ PREPARING_DOSSIER: 'Veuillez patienter, nous préparons votre dossier',
2710
+ PRODUCT_UNAVAILABLE: 'Produit non disponible'
2711
+ };
2712
+ var SHARED$9 = {
2713
+ ROOM: 'Chambre',
2714
+ ROOMS: 'Chambres',
2715
+ TOTAL_PRICE: 'Prix total',
2716
+ ADULTS: 'Adultes',
2717
+ CHILDREN: 'Enfants',
2718
+ SELECT: 'Sélectionner',
2719
+ SELECTED: 'Sélectionné'
2720
+ };
2721
+ var SIDEBAR$9 = {
2722
+ OVERVIEW: 'Résumé',
2723
+ SLIDE_TOTAL_PRICE: 'Montant total : ',
2724
+ SLIDE_DEPOSIT: 'Acompte à payer : ',
2725
+ TRAVEL_INFO: 'Informations voyage',
2726
+ TRAVELERS: 'Voyageurs',
2727
+ TRAVELERS_ADULTS: 'adultes',
2728
+ TRAVELERS_ADULT: 'adulte',
2729
+ TRAVELERS_CHILDREN: 'enfants',
2730
+ TRAVELERS_CHILD: 'enfant',
2731
+ DEPARTURE: 'Aller',
2732
+ DEPARTURE_SINGLE: 'Date',
2733
+ ARRIVAL: 'Retour',
2734
+ FLIGHT: 'Vol',
2735
+ ACCOMMODATION: 'Hébergement réservé',
2736
+ BASE_PRICE: 'Prix de base',
2737
+ OPTIONS: 'Options',
2738
+ INCLUDED_COSTS: 'Coûts inclus',
2739
+ EXTRA_COSTS: 'Coûts supplémentaires',
2740
+ DEPOSIT: 'Acompte à payer',
2741
+ DEPOSIT_TEXT1: 'Les étapes pour le ',
2742
+ DEPOSIT_TEXT2: 'solde restant',
2743
+ DEPOSIT_TEXT3: ' de ',
2744
+ DEPOSIT_TEXT4: ' sont décrites dans ',
2745
+ DEPOSIT_TEXT5: "l'étape « Résumé »",
2746
+ DEPOSIT_TEXT6: ' du processus de réservation.',
2747
+ LUGGAGE_INCLUDED: 'Bagages inclus',
2748
+ DEPARTURE_FLIGHT: 'Vol aller',
2749
+ ARRIVAL_FLIGHT: 'Vol retour',
2750
+ FLIGHT_DEPARTURE: 'Départ',
2751
+ FLIGHT_ARRIVAL: 'Arrivée',
2752
+ ON_REQUEST: 'Sur demande',
2753
+ CHANGES: 'transferts'
2754
+ };
2755
+ var TRAVELERS_FORM$9 = {
2756
+ AGE: 'Âge',
2757
+ TRAVELER: 'Voyageur',
2758
+ ADULT: 'adulte',
2759
+ ADULTS: 'adultes',
2760
+ CHILD: 'enfant',
2761
+ CHILDREN: 'enfants',
2762
+ GENDER: 'Civilité',
2763
+ GENDER_ID: "Sexe selon passeport/carte d'identité",
2764
+ MALE: 'M.',
2765
+ MALE_GENDER: 'Homme',
2766
+ FEMALE: 'Mme',
2767
+ FEMALE_GENDER: 'Femme',
2768
+ OTHER: 'Autre',
2769
+ MAIN_BOOKER: 'Titulaire de la réservation',
2770
+ FIRST_NAME: 'Prénom',
2771
+ LAST_NAME: 'Nom',
2772
+ BIRTHDATE: 'Date de naissance',
2773
+ STREET: 'Rue',
2774
+ STREET_PLACEHOLDER: 'Votre rue',
2775
+ HOUSE_NUMBER: 'Numéro',
2776
+ POST_BOX: 'Boîte postale',
2777
+ ZIPCODE: 'Code postal',
2778
+ CITY: 'Ville',
2779
+ CITY_PLACEHOLDER: 'Ville',
2780
+ COUNTRY: 'Pays',
2781
+ SELECT_COUNTRY: 'Sélectionner le pays',
2782
+ PHONE: 'Téléphone',
2783
+ EMAIL: 'Email',
2784
+ REPEAT_EMAIL: "Répéter l'email",
2785
+ VALIDATION_MESSAGE: 'Veuillez vérifier les champs ci-dessous et les remplir correctement.',
2786
+ BOOK_WITH_AGENT: 'Je souhaite réserver via mon agence de voyage locale',
2787
+ CHOOSE_OFFICE: 'Je choisis un bureau',
2788
+ PERSON: 'Personne',
2789
+ COUNTRIES: {
2790
+ BELGIUM: 'Belgique',
2791
+ NETHERLANDS: 'Pays-Bas',
2792
+ FRANCE: 'France'
2793
+ },
2794
+ CHOOSE_AGENT_PLACEHOLDER: 'Choisissez votre agent de voyage',
2795
+ VALIDATION: {
2796
+ TRAVELER_X_FIELD: 'Chambre {0} - Voyageur {1} : {2}',
2797
+ SINGLE_ROOM_TRAVELER_X_FIELD: 'Voyageur {0} : {1}',
2798
+ TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
2799
+ SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
2800
+ TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
2801
+ SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD: "Voyageur {0} : n'est pas un enfant",
2802
+ NO_MAIN_BOOKER_SELECTED: 'Aucun titulaire de réservation sélectionné',
2803
+ MAIN_BOOKER_FIELD: 'Titulaire de la réservation : {0}',
2804
+ MAIN_BOOKER_EMAIL_IS_INVALID: 'Titulaire de la réservation : email invalide',
2805
+ MAIN_BOOKER_EMAIL_DOES_NOT_MATCH: 'Titulaire de la réservation : email non concordant',
2806
+ AGENT_IS_REQUIRED: 'Un agent de voyage est requis'
2807
+ }
2808
+ };
2809
+ var OPTIONS_FORM$9 = {
2810
+ NO_OPTIONS_TITLE: 'Aucune option',
2811
+ NO_OPTIONS_MESSAGE: "Ce voyage n'a pas d'options supplémentaires.",
2812
+ UNIT_TITLE: 'Groupe',
2813
+ PACKAGE: 'Forfait',
2814
+ DAY: 'jour',
2815
+ DAYS: 'jours',
2816
+ NIGHT: 'nuit',
2817
+ NIGHTS: 'nuits',
2818
+ PER_PAX_TITLE: 'Sélectionnez les options par voyageur',
2819
+ PER_BOOKING_TITLE: 'Sélectionnez les options par réservation',
2820
+ PER_UNIT_TITLE: 'Sélectionnez les options par groupe',
2821
+ NONE: 'Aucune'
2822
+ };
2823
+ var ROOM_OPTIONS_FORM$9 = {
2824
+ TRAVELER_GROUP: 'Groupe de voyage',
2825
+ ALTERNATIVES_TRAVELER_GROUP: 'Options alternatives de chambre pour le groupe',
2826
+ SHOW_ALTERNATIVES: 'Afficher les options alternatives de chambre'
2827
+ };
2828
+ var SUMMARY$9 = {
2829
+ PERSONAL_DETAILS: 'Informations personnelles',
2830
+ TRAVELERS: 'voyageurs',
2831
+ TRAVELER: 'voyageur',
2832
+ ADULTS: 'adultes',
2833
+ ADULT: 'adulte',
2834
+ CHILDREN: 'enfants',
2835
+ CHILD: 'enfant',
2836
+ MAIN_BOOKER: 'Titulaire de la réservation',
2837
+ NOTIFICATIONS_TITLE: 'Attention',
2838
+ VALIDATE_TITLE: 'Vérifiez vos informations',
2839
+ VALIDATE_TEXT_BOOKING:
2840
+ "Vous êtes sur le point de confirmer votre réservation. Veuillez vérifier que toutes les informations sont correctes et que les noms correspondent exactement à votre pièce d'identité ou passeport. Ces informations sont définitives et ne peuvent pas être modifiées.",
2841
+ VALIDATE_TEXT_OFFER:
2842
+ "Vous êtes sur le point de demander un devis. Veuillez vérifier que toutes les informations sont correctes et que les noms correspondent exactement à votre pièce d'identité ou passeport. Cela nous aide à éviter des problèmes si vous réservez plus tard.",
2843
+ VALIDATE_TEXT_OPTION:
2844
+ "Si vous choisissez de prendre une option, il existe un délai pour l'exercer qui dépend de la compagnie aérienne. Une option garantit une place mais pas le prix. Le prix indiqué dans cette proposition est par personne et dépend de la disponibilité. Le prix n'est garanti qu'une fois le billet émis.",
2845
+ OPTIONS: 'Options',
2846
+ REMARKS: 'Remarques',
2847
+ VOUCHERS: 'Bons',
2848
+ VOUCHER_VALIDATE: 'Valider le bon',
2849
+ ADD_VOUCHER: 'Ajouter un bon',
2850
+ VOUCHER_VALID: 'Bon valide',
2851
+ VOUCHER_INVALID: 'Bon invalide'
2852
+ };
2853
+ var CONFIRMATION$9 = {
2854
+ TITLE_TEXT_OFFER: 'Votre devis numéro {0} a été demandé',
2855
+ TITLE_TEXT_BOOKING: 'Votre réservation numéro {0} a été confirmée',
2856
+ TITLE_TEXT_OPTION: 'Vous avez pris une option sur le numéro {0}.',
2857
+ MESSAGE_TEXT1: 'Votre voyage de rêve est maintenant très proche.',
2858
+ MESSAGE_TEXT2_OFFER: 'Nos spécialistes du voyage traitent votre demande et vous contacteront sous 48 heures.',
2859
+ MESSAGE_TEXT2_BOOKING: 'Nos spécialistes du voyage traitent votre réservation et vous contacteront sous 48 heures.',
2860
+ MESSAGE_TEXT2_OPTION: 'Nos spécialistes du voyage ont noté votre réservation et vous contacteront sous 48 heures pour confirmer ou discuter de votre option.',
2861
+ QUESTIONS_TEXT1: 'Vous avez des questions ? ',
2862
+ QUESTIONS_TEXT2: 'Faites-le nous savoir',
2863
+ QUESTIONS_TEXT3: '.',
2864
+ QUESTIONS_ALT: 'Contactez-nous',
2865
+ MAIL_SUBJECT: 'Informations sur la réservation'
2866
+ };
2867
+ var ERROR$9 = {
2868
+ TRY_AGAIN: 'Réessayer la réservation',
2869
+ MESSAGE_TEXT1: "Une erreur s'est produite lors de la confirmation de votre voyage.",
2870
+ MESSAGE_TEXT2: 'Cliquez ci-dessous pour réessayer.',
2871
+ ERROR_TEXT1: 'Ça ne fonctionne toujours pas ? ',
2872
+ ERROR_TEXT2: 'Assurez-vous de nous le faire savoir',
2873
+ ERROR_TEXT3: '.',
2874
+ ERROR_ALT: 'Contactez-nous'
2875
+ };
2876
+ var PRINT_OFFER_BUTTON$9 = {
2877
+ LABEL_IDLE: 'Imprimer le devis',
2878
+ LABEL_CREATING: 'Génération du devis…',
2879
+ LABEL_PRINTING: 'Génération du PDF…'
2880
+ };
2881
+ var NAVBAR$9 = {
2882
+ SEARCH: 'Rechercher'
2883
+ };
2884
+ var LOGIN$9 = {
2885
+ LOGIN_INTO: 'Connectez-vous à votre compte',
2886
+ EMAIL: 'Email',
2887
+ ENTER_YOUR_EMAIL: 'Entrez votre email',
2888
+ EMAIL_REQUIRED: 'L’email est requis.',
2889
+ EMAIL_INVALID: 'L’email est invalide.',
2890
+ ENTER_VALID_EMAIL: 'Entrez un email valide.',
2891
+ PASSWORD: 'Mot de passe',
2892
+ ENTER_YOUR_PASSWORD: 'Entrez votre mot de passe',
2893
+ RESET_PASSWORD_LABEL: 'Nouveau mot de passe',
2894
+ RESET_REPEAT_PASSWORD_LABEL: 'Répéter le mot de passe',
2895
+ PASSWORD_REQUIRED: 'Le mot de passe est requis.',
2896
+ INVALID_CREDENTIALS: 'Email ou mot de passe invalide.',
2897
+ LOGIN: 'Se connecter',
2898
+ FORGOT_PASSWORD: 'Mot de passe oublié ?',
2899
+ LOGGING_IN: 'Connexion...',
2900
+ WELCOME_X: 'Bienvenue, ',
2901
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Réinitialiser le mot de passe',
2902
+ RESET_REQUESTED: 'Demande de réinitialisation du mot de passe envoyée',
2903
+ BACK_TO_HOMEPAGE: 'Retour à la page d’accueil',
2904
+ BACK_TO_LOGIN: 'Retour à la connexion',
2905
+ RESET_PASSWORD_TITLE: 'Réinitialiser le mot de passe',
2906
+ PASSWORD_COMPLEXITY: 'Le mot de passe doit contenir au moins 1 chiffre et 1 lettre majuscule',
2907
+ REPEAT_PASSWORD_REQUIRED: 'Veuillez répéter votre mot de passe.',
2908
+ PASSWORDS_DO_NOT_MATCH: 'Les mots de passe ne correspondent pas.',
2909
+ RESET_PASSWORD_SUBMIT_LABEL: 'Modifier le mot de passe',
2910
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Votre mot de passe a été modifié. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.',
2911
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ce lien a expiré ou est invalide.',
2912
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Vous pouvez demander un nouveau mot de passe en cliquant sur le bouton ci-dessous.',
2913
+ RECEIVED_REQUEST: 'Votre demande a bien été reçue',
2914
+ ACCOUNT_ACTIVATED_LOGIN: 'Votre compte est maintenant actif. Cliquez ci-dessous pour vous connecter avec vos informations.'
2915
+ };
2916
+ var QSM$a = {
2687
2917
  DEPARTURE: 'Départ',
2688
2918
  CHOOSE_DEPARTURE: 'Choisir le départ',
2689
2919
  DESTINATION: 'Destination',
@@ -2785,6 +3015,7 @@ var frFrJson = {
2785
3015
  ERROR: ERROR$9,
2786
3016
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$9,
2787
3017
  NAVBAR: NAVBAR$9,
3018
+ LOGIN: LOGIN$9,
2788
3019
  QSM: QSM$a,
2789
3020
  SRP: SRP$9
2790
3021
  };
@@ -3045,6 +3276,38 @@ var PRINT_OFFER_BUTTON$8 = {
3045
3276
  var NAVBAR$8 = {
3046
3277
  SEARCH: 'Leita'
3047
3278
  };
3279
+ var LOGIN$8 = {
3280
+ LOGIN_INTO: 'Skráðu þig inn á reikninginn þinn',
3281
+ EMAIL: 'Netfang',
3282
+ ENTER_YOUR_EMAIL: 'Sláðu inn netfangið þitt',
3283
+ EMAIL_REQUIRED: 'Netfang er nauðsynlegt.',
3284
+ EMAIL_INVALID: 'Netfangið er ógilt.',
3285
+ ENTER_VALID_EMAIL: 'Sláðu inn gilt netfang.',
3286
+ PASSWORD: 'Lykilorð',
3287
+ ENTER_YOUR_PASSWORD: 'Sláðu inn lykilorðið þitt',
3288
+ RESET_PASSWORD_LABEL: 'Nýtt lykilorð',
3289
+ RESET_REPEAT_PASSWORD_LABEL: 'Endurtaka lykilorð',
3290
+ PASSWORD_REQUIRED: 'Lykilorð er nauðsynlegt.',
3291
+ INVALID_CREDENTIALS: 'Ógilt netfang eða lykilorð.',
3292
+ LOGIN: 'Skrá inn',
3293
+ FORGOT_PASSWORD: 'Gleymt lykilorð?',
3294
+ LOGGING_IN: 'Skrái inn...',
3295
+ WELCOME_X: 'Velkomin, ',
3296
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Endurstilla lykilorð',
3297
+ RESET_REQUESTED: 'Beiðni um endurstillingu lykilorðs send',
3298
+ BACK_TO_HOMEPAGE: 'Til baka á forsíðu',
3299
+ BACK_TO_LOGIN: 'Til baka í innskráningu',
3300
+ RESET_PASSWORD_TITLE: 'Endurstilla lykilorð',
3301
+ PASSWORD_COMPLEXITY: 'Lykilorð verður að innihalda að minnsta kosti 1 tölu og 1 stóran staf',
3302
+ REPEAT_PASSWORD_REQUIRED: 'Vinsamlegast endurtaktu lykilorðið.',
3303
+ PASSWORDS_DO_NOT_MATCH: 'Lykilorðin passa ekki.',
3304
+ RESET_PASSWORD_SUBMIT_LABEL: 'Breyta lykilorði',
3305
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Lykilorðinu þínu hefur verið breytt. Þú getur nú skráð þig inn með nýja lykilorðinu.',
3306
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Þessi hlekkur er útrunninn eða ógildur.',
3307
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Þú getur beðið um nýtt lykilorð með því að smella á hnappinn hér fyrir neðan.',
3308
+ RECEIVED_REQUEST: 'Beiðnin þín hefur verið móttekin',
3309
+ ACCOUNT_ACTIVATED_LOGIN: 'Reikningurinn þinn er nú virkur. Smelltu hér fyrir neðan til að skrá þig inn.'
3310
+ };
3048
3311
  var QSM$9 = {
3049
3312
  DEPARTURE: 'Brottför',
3050
3313
  CHOOSE_DEPARTURE: 'Veldu brottför',
@@ -3147,6 +3410,7 @@ var isJson = {
3147
3410
  ERROR: ERROR$8,
3148
3411
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$8,
3149
3412
  NAVBAR: NAVBAR$8,
3413
+ LOGIN: LOGIN$8,
3150
3414
  QSM: QSM$9,
3151
3415
  SRP: SRP$8
3152
3416
  };
@@ -3408,6 +3672,38 @@ var PRINT_OFFER_BUTTON$7 = {
3408
3672
  var NAVBAR$7 = {
3409
3673
  SEARCH: 'Cerca'
3410
3674
  };
3675
+ var LOGIN$7 = {
3676
+ LOGIN_INTO: 'Accedi al tuo account',
3677
+ EMAIL: 'Email',
3678
+ ENTER_YOUR_EMAIL: 'Inserisci la tua email',
3679
+ EMAIL_REQUIRED: "L'email è obbligatoria.",
3680
+ EMAIL_INVALID: "L'email non è valida.",
3681
+ ENTER_VALID_EMAIL: "Inserisci un'email valida.",
3682
+ PASSWORD: 'Password',
3683
+ ENTER_YOUR_PASSWORD: 'Inserisci la tua password',
3684
+ RESET_PASSWORD_LABEL: 'Nuova password',
3685
+ RESET_REPEAT_PASSWORD_LABEL: 'Ripeti password',
3686
+ PASSWORD_REQUIRED: 'La password è obbligatoria.',
3687
+ INVALID_CREDENTIALS: 'Email o password non validi.',
3688
+ LOGIN: 'Accedi',
3689
+ FORGOT_PASSWORD: 'Password dimenticata?',
3690
+ LOGGING_IN: 'Accesso in corso...',
3691
+ WELCOME_X: 'Benvenuto, ',
3692
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Reimposta password',
3693
+ RESET_REQUESTED: 'Richiesta di reimpostazione password inviata',
3694
+ BACK_TO_HOMEPAGE: 'Torna alla homepage',
3695
+ BACK_TO_LOGIN: 'Torna al login',
3696
+ RESET_PASSWORD_TITLE: 'Reimposta password',
3697
+ PASSWORD_COMPLEXITY: 'La password deve contenere almeno 1 numero e 1 lettera maiuscola',
3698
+ REPEAT_PASSWORD_REQUIRED: 'Per favore ripeti la password.',
3699
+ PASSWORDS_DO_NOT_MATCH: 'Le password non corrispondono.',
3700
+ RESET_PASSWORD_SUBMIT_LABEL: 'Modifica password',
3701
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'La tua password è stata modificata. Ora puoi accedere con la nuova password.',
3702
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Questo link è scaduto o non è valido.',
3703
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Puoi richiedere una nuova password cliccando il pulsante qui sotto.',
3704
+ RECEIVED_REQUEST: 'La tua richiesta è stata ricevuta',
3705
+ ACCOUNT_ACTIVATED_LOGIN: 'Il tuo account è ora attivo. Clicca qui sotto per accedere con i tuoi dati.'
3706
+ };
3411
3707
  var QSM$8 = {
3412
3708
  DEPARTURE: 'Partenza',
3413
3709
  CHOOSE_DEPARTURE: 'Scegli partenza',
@@ -3510,6 +3806,7 @@ var itJson = {
3510
3806
  ERROR: ERROR$7,
3511
3807
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$7,
3512
3808
  NAVBAR: NAVBAR$7,
3809
+ LOGIN: LOGIN$7,
3513
3810
  QSM: QSM$8,
3514
3811
  SRP: SRP$7
3515
3812
  };
@@ -3775,6 +4072,38 @@ var PRINT_OFFER_BUTTON$6 = {
3775
4072
  var NAVBAR$6 = {
3776
4073
  SEARCH: 'Zoeken'
3777
4074
  };
4075
+ var LOGIN$6 = {
4076
+ LOGIN_INTO: 'Log in op je account',
4077
+ EMAIL: 'E-mail',
4078
+ ENTER_YOUR_EMAIL: 'Voer je e-mail in',
4079
+ EMAIL_REQUIRED: 'E-mail is verplicht.',
4080
+ EMAIL_INVALID: 'E-mailadres is ongeldig.',
4081
+ ENTER_VALID_EMAIL: 'Voer een geldig e-mailadres in.',
4082
+ PASSWORD: 'Wachtwoord',
4083
+ ENTER_YOUR_PASSWORD: 'Voer je wachtwoord in',
4084
+ RESET_PASSWORD_LABEL: 'Nieuw wachtwoord',
4085
+ RESET_REPEAT_PASSWORD_LABEL: 'Herhaal wachtwoord',
4086
+ PASSWORD_REQUIRED: 'Wachtwoord is verplicht.',
4087
+ INVALID_CREDENTIALS: 'Ongeldig e-mailadres of wachtwoord.',
4088
+ LOGIN: 'Inloggen',
4089
+ FORGOT_PASSWORD: 'Wachtwoord vergeten?',
4090
+ LOGGING_IN: 'Bezig met inloggen...',
4091
+ WELCOME_X: 'Welkom, ',
4092
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Wachtwoord resetten',
4093
+ RESET_REQUESTED: 'Aanvraag voor wachtwoordreset verzonden',
4094
+ BACK_TO_HOMEPAGE: 'Terug naar homepage',
4095
+ BACK_TO_LOGIN: 'Terug naar login',
4096
+ RESET_PASSWORD_TITLE: 'Wachtwoord resetten',
4097
+ PASSWORD_COMPLEXITY: 'Wachtwoord moet minstens 1 cijfer en 1 hoofdletter bevatten',
4098
+ REPEAT_PASSWORD_REQUIRED: 'Herhaal je wachtwoord.',
4099
+ PASSWORDS_DO_NOT_MATCH: 'Wachtwoorden komen niet overeen.',
4100
+ RESET_PASSWORD_SUBMIT_LABEL: 'Wachtwoord wijzigen',
4101
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Je wachtwoord is gewijzigd. Je kan nu inloggen met je nieuwe wachtwoord.',
4102
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Deze link is verlopen of ongeldig.',
4103
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Je kan een nieuw wachtwoord aanvragen door op onderstaande knop te klikken.',
4104
+ RECEIVED_REQUEST: 'Je aanvraag is goed ontvangen',
4105
+ ACCOUNT_ACTIVATED_LOGIN: 'Je account is nu actief. Klik hieronder om in te loggen met je gegevens.'
4106
+ };
3778
4107
  var QSM$7 = {
3779
4108
  DEPARTURE: 'Vertrek',
3780
4109
  CHOOSE_DEPARTURE: 'Vertrek kiezen',
@@ -3877,6 +4206,7 @@ var nlBeJson = {
3877
4206
  ERROR: ERROR$6,
3878
4207
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$6,
3879
4208
  NAVBAR: NAVBAR$6,
4209
+ LOGIN: LOGIN$6,
3880
4210
  QSM: QSM$7,
3881
4211
  SRP: SRP$6
3882
4212
  };
@@ -4138,6 +4468,38 @@ var PRINT_OFFER_BUTTON$5 = {
4138
4468
  var NAVBAR$5 = {
4139
4469
  SEARCH: 'Zoeken'
4140
4470
  };
4471
+ var LOGIN$5 = {
4472
+ LOGIN_INTO: 'Log in op je account',
4473
+ EMAIL: 'E-mail',
4474
+ ENTER_YOUR_EMAIL: 'Voer je e-mail in',
4475
+ EMAIL_REQUIRED: 'E-mail is verplicht.',
4476
+ EMAIL_INVALID: 'E-mailadres is ongeldig.',
4477
+ ENTER_VALID_EMAIL: 'Voer een geldig e-mailadres in.',
4478
+ PASSWORD: 'Wachtwoord',
4479
+ ENTER_YOUR_PASSWORD: 'Voer je wachtwoord in',
4480
+ RESET_PASSWORD_LABEL: 'Nieuw wachtwoord',
4481
+ RESET_REPEAT_PASSWORD_LABEL: 'Herhaal wachtwoord',
4482
+ PASSWORD_REQUIRED: 'Wachtwoord is verplicht.',
4483
+ INVALID_CREDENTIALS: 'Ongeldig e-mailadres of wachtwoord.',
4484
+ LOGIN: 'Inloggen',
4485
+ FORGOT_PASSWORD: 'Wachtwoord vergeten?',
4486
+ LOGGING_IN: 'Bezig met inloggen...',
4487
+ WELCOME_X: 'Welkom, ',
4488
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Wachtwoord resetten',
4489
+ RESET_REQUESTED: 'Aanvraag voor wachtwoordreset verzonden',
4490
+ BACK_TO_HOMEPAGE: 'Terug naar homepage',
4491
+ BACK_TO_LOGIN: 'Terug naar login',
4492
+ RESET_PASSWORD_TITLE: 'Wachtwoord resetten',
4493
+ PASSWORD_COMPLEXITY: 'Wachtwoord moet minstens 1 cijfer en 1 hoofdletter bevatten',
4494
+ REPEAT_PASSWORD_REQUIRED: 'Herhaal je wachtwoord.',
4495
+ PASSWORDS_DO_NOT_MATCH: 'Wachtwoorden komen niet overeen.',
4496
+ RESET_PASSWORD_SUBMIT_LABEL: 'Wachtwoord wijzigen',
4497
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Je wachtwoord is gewijzigd. Je kan nu inloggen met je nieuwe wachtwoord.',
4498
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Deze link is verlopen of ongeldig.',
4499
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Je kan een nieuw wachtwoord aanvragen door op onderstaande knop te klikken.',
4500
+ RECEIVED_REQUEST: 'Je aanvraag is goed ontvangen',
4501
+ ACCOUNT_ACTIVATED_LOGIN: 'Je account is nu actief. Klik hieronder om in te loggen met je gegevens.'
4502
+ };
4141
4503
  var QSM$6 = {
4142
4504
  DEPARTURE: 'Vertrek',
4143
4505
  CHOOSE_DEPARTURE: 'Vertrek kiezen',
@@ -4240,6 +4602,7 @@ var nlNlJson = {
4240
4602
  ERROR: ERROR$5,
4241
4603
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$5,
4242
4604
  NAVBAR: NAVBAR$5,
4605
+ LOGIN: LOGIN$5,
4243
4606
  QSM: QSM$6,
4244
4607
  SRP: SRP$5
4245
4608
  };
@@ -4501,6 +4864,38 @@ var PRINT_OFFER_BUTTON$4 = {
4501
4864
  var NAVBAR$4 = {
4502
4865
  SEARCH: 'Søk'
4503
4866
  };
4867
+ var LOGIN$4 = {
4868
+ LOGIN_INTO: 'Logg inn på kontoen din',
4869
+ EMAIL: 'E-post',
4870
+ ENTER_YOUR_EMAIL: 'Skriv inn e-posten din',
4871
+ EMAIL_REQUIRED: 'E-post er påkrevd.',
4872
+ EMAIL_INVALID: 'E-posten er ugyldig.',
4873
+ ENTER_VALID_EMAIL: 'Skriv inn en gyldig e-post.',
4874
+ PASSWORD: 'Passord',
4875
+ ENTER_YOUR_PASSWORD: 'Skriv inn passordet ditt',
4876
+ RESET_PASSWORD_LABEL: 'Nytt passord',
4877
+ RESET_REPEAT_PASSWORD_LABEL: 'Gjenta passord',
4878
+ PASSWORD_REQUIRED: 'Passord er påkrevd.',
4879
+ INVALID_CREDENTIALS: 'Ugyldig e-post eller passord.',
4880
+ LOGIN: 'Logg inn',
4881
+ FORGOT_PASSWORD: 'Glemt passord?',
4882
+ LOGGING_IN: 'Logger inn...',
4883
+ WELCOME_X: 'Velkommen, ',
4884
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Tilbakestill passord',
4885
+ RESET_REQUESTED: 'Forespørsel om tilbakestilling av passord sendt',
4886
+ BACK_TO_HOMEPAGE: 'Tilbake til startsiden',
4887
+ BACK_TO_LOGIN: 'Tilbake til innlogging',
4888
+ RESET_PASSWORD_TITLE: 'Tilbakestill passord',
4889
+ PASSWORD_COMPLEXITY: 'Passordet må inneholde minst 1 tall og 1 stor bokstav',
4890
+ REPEAT_PASSWORD_REQUIRED: 'Vennligst gjenta passordet.',
4891
+ PASSWORDS_DO_NOT_MATCH: 'Passordene samsvarer ikke.',
4892
+ RESET_PASSWORD_SUBMIT_LABEL: 'Endre passord',
4893
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Passordet ditt er endret. Du kan nå logge inn med ditt nye passord.',
4894
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Denne lenken er utløpt eller ugyldig.',
4895
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan be om et nytt passord ved å klikke på knappen nedenfor.',
4896
+ RECEIVED_REQUEST: 'Forespørselen din er mottatt',
4897
+ ACCOUNT_ACTIVATED_LOGIN: 'Kontoen din er nå aktiv. Klikk nedenfor for å logge inn med dine opplysninger.'
4898
+ };
4504
4899
  var QSM$5 = {
4505
4900
  DEPARTURE: 'Avgang',
4506
4901
  CHOOSE_DEPARTURE: 'Velg avgang',
@@ -4603,6 +4998,7 @@ var noJson = {
4603
4998
  ERROR: ERROR$4,
4604
4999
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$4,
4605
5000
  NAVBAR: NAVBAR$4,
5001
+ LOGIN: LOGIN$4,
4606
5002
  QSM: QSM$5,
4607
5003
  SRP: SRP$4
4608
5004
  };
@@ -4864,6 +5260,38 @@ var PRINT_OFFER_BUTTON$3 = {
4864
5260
  var NAVBAR$3 = {
4865
5261
  SEARCH: 'Szukaj'
4866
5262
  };
5263
+ var LOGIN$3 = {
5264
+ LOGIN_INTO: 'Zaloguj się na swoje konto',
5265
+ EMAIL: 'Email',
5266
+ ENTER_YOUR_EMAIL: 'Wprowadź swój email',
5267
+ EMAIL_REQUIRED: 'Email jest wymagany.',
5268
+ EMAIL_INVALID: 'Adres e-mail jest nieprawidłowy.',
5269
+ ENTER_VALID_EMAIL: 'Wprowadź poprawny adres email.',
5270
+ PASSWORD: 'Hasło',
5271
+ ENTER_YOUR_PASSWORD: 'Wprowadź swoje hasło',
5272
+ RESET_PASSWORD_LABEL: 'Nowe hasło',
5273
+ RESET_REPEAT_PASSWORD_LABEL: 'Powtórz hasło',
5274
+ PASSWORD_REQUIRED: 'Hasło jest wymagane.',
5275
+ INVALID_CREDENTIALS: 'Nieprawidłowy adres e-mail lub hasło.',
5276
+ LOGIN: 'Zaloguj się',
5277
+ FORGOT_PASSWORD: 'Zapomniałeś hasła?',
5278
+ LOGGING_IN: 'Logowanie...',
5279
+ WELCOME_X: 'Witaj, ',
5280
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Zresetuj hasło',
5281
+ RESET_REQUESTED: 'Żądanie resetowania hasła wysłane',
5282
+ BACK_TO_HOMEPAGE: 'Powrót do strony głównej',
5283
+ BACK_TO_LOGIN: 'Powrót do logowania',
5284
+ RESET_PASSWORD_TITLE: 'Resetuj hasło',
5285
+ PASSWORD_COMPLEXITY: 'Hasło musi zawierać co najmniej 1 cyfrę i 1 wielką literę',
5286
+ REPEAT_PASSWORD_REQUIRED: 'Proszę powtórzyć hasło.',
5287
+ PASSWORDS_DO_NOT_MATCH: 'Hasła nie są zgodne.',
5288
+ RESET_PASSWORD_SUBMIT_LABEL: 'Zmień hasło',
5289
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Twoje hasło zostało zmienione. Możesz teraz zalogować się używając nowego hasła.',
5290
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ten link wygasł lub jest nieprawidłowy.',
5291
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Możesz poprosić o nowe hasło klikając przycisk poniżej.',
5292
+ RECEIVED_REQUEST: 'Twoja prośba została odebrana',
5293
+ ACCOUNT_ACTIVATED_LOGIN: 'Twoje konto jest teraz aktywne. Kliknij poniżej aby się zalogować.'
5294
+ };
4867
5295
  var QSM$4 = {
4868
5296
  DEPARTURE: 'Wylot',
4869
5297
  CHOOSE_DEPARTURE: 'Wybierz wylot',
@@ -4966,6 +5394,7 @@ var plJson = {
4966
5394
  ERROR: ERROR$3,
4967
5395
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$3,
4968
5396
  NAVBAR: NAVBAR$3,
5397
+ LOGIN: LOGIN$3,
4969
5398
  QSM: QSM$4,
4970
5399
  SRP: SRP$3
4971
5400
  };
@@ -5227,6 +5656,38 @@ var PRINT_OFFER_BUTTON$2 = {
5227
5656
  var NAVBAR$2 = {
5228
5657
  SEARCH: 'Pesquisar'
5229
5658
  };
5659
+ var LOGIN$2 = {
5660
+ LOGIN_INTO: 'Inicie sessão na sua conta',
5661
+ EMAIL: 'Email',
5662
+ ENTER_YOUR_EMAIL: 'Introduza o seu email',
5663
+ EMAIL_REQUIRED: 'O email é obrigatório.',
5664
+ EMAIL_INVALID: 'O email é inválido.',
5665
+ ENTER_VALID_EMAIL: 'Introduza um email válido.',
5666
+ PASSWORD: 'Palavra-passe',
5667
+ ENTER_YOUR_PASSWORD: 'Introduza a sua palavra-passe',
5668
+ RESET_PASSWORD_LABEL: 'Nova palavra-passe',
5669
+ RESET_REPEAT_PASSWORD_LABEL: 'Repetir palavra-passe',
5670
+ PASSWORD_REQUIRED: 'A palavra-passe é obrigatória.',
5671
+ INVALID_CREDENTIALS: 'Email ou palavra-passe inválidos.',
5672
+ LOGIN: 'Iniciar sessão',
5673
+ FORGOT_PASSWORD: 'Esqueceu a palavra-passe?',
5674
+ LOGGING_IN: 'A iniciar sessão...',
5675
+ WELCOME_X: 'Bem-vindo, ',
5676
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Redefinir palavra-passe',
5677
+ RESET_REQUESTED: 'Pedido de redefinição de palavra-passe enviado',
5678
+ BACK_TO_HOMEPAGE: 'Voltar à página inicial',
5679
+ BACK_TO_LOGIN: 'Voltar ao login',
5680
+ RESET_PASSWORD_TITLE: 'Redefinir palavra-passe',
5681
+ PASSWORD_COMPLEXITY: 'A palavra-passe deve conter pelo menos 1 número e 1 letra maiúscula',
5682
+ REPEAT_PASSWORD_REQUIRED: 'Por favor repita a palavra-passe.',
5683
+ PASSWORDS_DO_NOT_MATCH: 'As palavras-passe não coincidem.',
5684
+ RESET_PASSWORD_SUBMIT_LABEL: 'Alterar palavra-passe',
5685
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'A sua palavra-passe foi alterada. Pode agora iniciar sessão com a nova palavra-passe.',
5686
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Este link expirou ou é inválido.',
5687
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Pode pedir uma nova palavra-passe clicando no botão abaixo.',
5688
+ RECEIVED_REQUEST: 'O seu pedido foi recebido',
5689
+ ACCOUNT_ACTIVATED_LOGIN: 'A sua conta está agora ativa. Clique abaixo para iniciar sessão com os seus dados.'
5690
+ };
5230
5691
  var QSM$3 = {
5231
5692
  DEPARTURE: 'Partida',
5232
5693
  CHOOSE_DEPARTURE: 'Escolher partida',
@@ -5329,6 +5790,7 @@ var ptJson = {
5329
5790
  ERROR: ERROR$2,
5330
5791
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$2,
5331
5792
  NAVBAR: NAVBAR$2,
5793
+ LOGIN: LOGIN$2,
5332
5794
  QSM: QSM$3,
5333
5795
  SRP: SRP$2
5334
5796
  };
@@ -5590,6 +6052,38 @@ var PRINT_OFFER_BUTTON$1 = {
5590
6052
  var NAVBAR$1 = {
5591
6053
  SEARCH: 'Sök'
5592
6054
  };
6055
+ var LOGIN$1 = {
6056
+ LOGIN_INTO: 'Logga in på ditt konto',
6057
+ EMAIL: 'E-post',
6058
+ ENTER_YOUR_EMAIL: 'Ange din e-post',
6059
+ EMAIL_REQUIRED: 'E-post krävs.',
6060
+ EMAIL_INVALID: 'E-postadressen är ogiltig.',
6061
+ ENTER_VALID_EMAIL: 'Ange en giltig e-postadress.',
6062
+ PASSWORD: 'Lösenord',
6063
+ ENTER_YOUR_PASSWORD: 'Ange ditt lösenord',
6064
+ RESET_PASSWORD_LABEL: 'Nytt lösenord',
6065
+ RESET_REPEAT_PASSWORD_LABEL: 'Upprepa lösenord',
6066
+ PASSWORD_REQUIRED: 'Lösenord krävs.',
6067
+ INVALID_CREDENTIALS: 'Ogiltig e-post eller lösenord.',
6068
+ LOGIN: 'Logga in',
6069
+ FORGOT_PASSWORD: 'Glömt lösenord?',
6070
+ LOGGING_IN: 'Loggar in...',
6071
+ WELCOME_X: 'Välkommen, ',
6072
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Återställ lösenord',
6073
+ RESET_REQUESTED: 'Begäran om återställning av lösenord skickad',
6074
+ BACK_TO_HOMEPAGE: 'Tillbaka till startsidan',
6075
+ BACK_TO_LOGIN: 'Tillbaka till inloggning',
6076
+ RESET_PASSWORD_TITLE: 'Återställ lösenord',
6077
+ PASSWORD_COMPLEXITY: 'Lösenordet måste innehålla minst 1 siffra och 1 versal',
6078
+ REPEAT_PASSWORD_REQUIRED: 'Vänligen upprepa ditt lösenord.',
6079
+ PASSWORDS_DO_NOT_MATCH: 'Lösenorden matchar inte.',
6080
+ RESET_PASSWORD_SUBMIT_LABEL: 'Ändra lösenord',
6081
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Ditt lösenord har ändrats. Du kan nu logga in med ditt nya lösenord.',
6082
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Denna länk har gått ut eller är ogiltig.',
6083
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan begära ett nytt lösenord genom att klicka på knappen nedan.',
6084
+ RECEIVED_REQUEST: 'Din begäran har mottagits',
6085
+ ACCOUNT_ACTIVATED_LOGIN: 'Ditt konto är nu aktivt. Klicka nedan för att logga in med dina uppgifter.'
6086
+ };
5593
6087
  var QSM$2 = {
5594
6088
  DEPARTURE: 'Avgång',
5595
6089
  CHOOSE_DEPARTURE: 'Välj avgång',
@@ -5692,6 +6186,7 @@ var svJson = {
5692
6186
  ERROR: ERROR$1,
5693
6187
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$1,
5694
6188
  NAVBAR: NAVBAR$1,
6189
+ LOGIN: LOGIN$1,
5695
6190
  QSM: QSM$2,
5696
6191
  SRP: SRP$1
5697
6192
  };
@@ -5951,6 +6446,38 @@ var PRINT_OFFER_BUTTON = {
5951
6446
  var NAVBAR = {
5952
6447
  SEARCH: '検索'
5953
6448
  };
6449
+ var LOGIN = {
6450
+ LOGIN_INTO: 'アカウントにログイン',
6451
+ EMAIL: 'メールアドレス',
6452
+ ENTER_YOUR_EMAIL: 'メールアドレスを入力してください',
6453
+ EMAIL_REQUIRED: 'メールアドレスは必須です。',
6454
+ EMAIL_INVALID: 'メールアドレスが無効です。',
6455
+ ENTER_VALID_EMAIL: '有効なメールアドレスを入力してください。',
6456
+ PASSWORD: 'パスワード',
6457
+ ENTER_YOUR_PASSWORD: 'パスワードを入力してください',
6458
+ RESET_PASSWORD_LABEL: '新しいパスワード',
6459
+ RESET_REPEAT_PASSWORD_LABEL: 'パスワードを再入力',
6460
+ PASSWORD_REQUIRED: 'パスワードは必須です。',
6461
+ INVALID_CREDENTIALS: 'メールアドレスまたはパスワードが無効です。',
6462
+ LOGIN: 'ログイン',
6463
+ FORGOT_PASSWORD: 'パスワードをお忘れですか?',
6464
+ LOGGING_IN: 'ログイン中...',
6465
+ WELCOME_X: 'ようこそ、',
6466
+ FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'パスワードをリセット',
6467
+ RESET_REQUESTED: 'パスワードリセットのリクエストが送信されました',
6468
+ BACK_TO_HOMEPAGE: 'ホームページに戻る',
6469
+ BACK_TO_LOGIN: 'ログインに戻る',
6470
+ RESET_PASSWORD_TITLE: 'パスワードをリセット',
6471
+ PASSWORD_COMPLEXITY: 'パスワードは少なくとも1つの数字と1つの大文字を含める必要があります',
6472
+ REPEAT_PASSWORD_REQUIRED: 'パスワードをもう一度入力してください。',
6473
+ PASSWORDS_DO_NOT_MATCH: 'パスワードが一致しません。',
6474
+ RESET_PASSWORD_SUBMIT_LABEL: 'パスワードを変更',
6475
+ RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'パスワードが変更されました。新しいパスワードでログインできます。',
6476
+ RESET_PASSWORD_INVALID_TOKEN_TITLE: 'このリンクは期限切れまたは無効です。',
6477
+ RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: '以下のボタンをクリックして新しいパスワードをリクエストできます。',
6478
+ RECEIVED_REQUEST: 'リクエストを受け取りました',
6479
+ ACCOUNT_ACTIVATED_LOGIN: 'アカウントが有効になりました。以下をクリックしてログインしてください。'
6480
+ };
5954
6481
  var QSM$1 = {
5955
6482
  DEPARTURE: '出発',
5956
6483
  CHOOSE_DEPARTURE: '出発地を選択',
@@ -6053,6 +6580,7 @@ var jaJson = {
6053
6580
  ERROR: ERROR,
6054
6581
  PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON,
6055
6582
  NAVBAR: NAVBAR,
6583
+ LOGIN: LOGIN,
6056
6584
  QSM: QSM$1,
6057
6585
  SRP: SRP
6058
6586
  };
@@ -41127,6 +41655,3008 @@ var ImageCardGrid = function (_a) {
41127
41655
  );
41128
41656
  };
41129
41657
 
41658
+ /**
41659
+ * Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>
41660
+ */
41661
+
41662
+ function Cache(maxSize) {
41663
+ this._maxSize = maxSize;
41664
+ this.clear();
41665
+ }
41666
+ Cache.prototype.clear = function () {
41667
+ this._size = 0;
41668
+ this._values = Object.create(null);
41669
+ };
41670
+ Cache.prototype.get = function (key) {
41671
+ return this._values[key];
41672
+ };
41673
+ Cache.prototype.set = function (key, value) {
41674
+ this._size >= this._maxSize && this.clear();
41675
+ if (!(key in this._values)) this._size++;
41676
+
41677
+ return (this._values[key] = value);
41678
+ };
41679
+
41680
+ var SPLIT_REGEX = /[^.^\]^[]+|(?=\[\]|\.\.)/g,
41681
+ DIGIT_REGEX = /^\d+$/,
41682
+ LEAD_DIGIT_REGEX = /^\d/,
41683
+ SPEC_CHAR_REGEX = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,
41684
+ CLEAN_QUOTES_REGEX = /^\s*(['"]?)(.*?)(\1)\s*$/,
41685
+ MAX_CACHE_SIZE = 512;
41686
+
41687
+ var pathCache = new Cache(MAX_CACHE_SIZE),
41688
+ setCache = new Cache(MAX_CACHE_SIZE),
41689
+ getCache = new Cache(MAX_CACHE_SIZE);
41690
+
41691
+ var propertyExpr = {
41692
+ Cache: Cache,
41693
+
41694
+ split: split,
41695
+
41696
+ normalizePath: normalizePath,
41697
+
41698
+ setter: function (path) {
41699
+ var parts = normalizePath(path);
41700
+
41701
+ return (
41702
+ setCache.get(path) ||
41703
+ setCache.set(path, function setter(obj, value) {
41704
+ var index = 0;
41705
+ var len = parts.length;
41706
+ var data = obj;
41707
+
41708
+ while (index < len - 1) {
41709
+ var part = parts[index];
41710
+ if (part === '__proto__' || part === 'constructor' || part === 'prototype') {
41711
+ return obj;
41712
+ }
41713
+
41714
+ data = data[parts[index++]];
41715
+ }
41716
+ data[parts[index]] = value;
41717
+ })
41718
+ );
41719
+ },
41720
+
41721
+ getter: function (path, safe) {
41722
+ var parts = normalizePath(path);
41723
+ return (
41724
+ getCache.get(path) ||
41725
+ getCache.set(path, function getter(data) {
41726
+ var index = 0,
41727
+ len = parts.length;
41728
+ while (index < len) {
41729
+ if (data != null || !safe) data = data[parts[index++]];
41730
+ else return;
41731
+ }
41732
+ return data;
41733
+ })
41734
+ );
41735
+ },
41736
+
41737
+ join: function (segments) {
41738
+ return segments.reduce(function (path, part) {
41739
+ return path + (isQuoted(part) || DIGIT_REGEX.test(part) ? '[' + part + ']' : (path ? '.' : '') + part);
41740
+ }, '');
41741
+ },
41742
+
41743
+ forEach: function (path, cb, thisArg) {
41744
+ forEach(Array.isArray(path) ? path : split(path), cb, thisArg);
41745
+ }
41746
+ };
41747
+
41748
+ function normalizePath(path) {
41749
+ return (
41750
+ pathCache.get(path) ||
41751
+ pathCache.set(
41752
+ path,
41753
+ split(path).map(function (part) {
41754
+ return part.replace(CLEAN_QUOTES_REGEX, '$2');
41755
+ })
41756
+ )
41757
+ );
41758
+ }
41759
+
41760
+ function split(path) {
41761
+ return path.match(SPLIT_REGEX) || [''];
41762
+ }
41763
+
41764
+ function forEach(parts, iter, thisArg) {
41765
+ var len = parts.length,
41766
+ part,
41767
+ idx,
41768
+ isArray,
41769
+ isBracket;
41770
+
41771
+ for (idx = 0; idx < len; idx++) {
41772
+ part = parts[idx];
41773
+
41774
+ if (part) {
41775
+ if (shouldBeQuoted(part)) {
41776
+ part = '"' + part + '"';
41777
+ }
41778
+
41779
+ isBracket = isQuoted(part);
41780
+ isArray = !isBracket && /^\d+$/.test(part);
41781
+
41782
+ iter.call(thisArg, part, isBracket, isArray, idx, parts);
41783
+ }
41784
+ }
41785
+ }
41786
+
41787
+ function isQuoted(str) {
41788
+ return typeof str === 'string' && str && ["'", '"'].indexOf(str.charAt(0)) !== -1;
41789
+ }
41790
+
41791
+ function hasLeadingNumber(part) {
41792
+ return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX);
41793
+ }
41794
+
41795
+ function hasSpecialChars(part) {
41796
+ return SPEC_CHAR_REGEX.test(part);
41797
+ }
41798
+
41799
+ function shouldBeQuoted(part) {
41800
+ return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part));
41801
+ }
41802
+
41803
+ const reWords =
41804
+ /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g;
41805
+
41806
+ const words = (str) => str.match(reWords) || [];
41807
+
41808
+ const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
41809
+
41810
+ const join = (str, d) => words(str).join(d).toLowerCase();
41811
+
41812
+ const camelCase = (str) => words(str).reduce((acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`, '');
41813
+
41814
+ const pascalCase = (str) => upperFirst(camelCase(str));
41815
+
41816
+ const snakeCase = (str) => join(str, '_');
41817
+
41818
+ const kebabCase = (str) => join(str, '-');
41819
+
41820
+ const sentenceCase = (str) => upperFirst(join(str, ' '));
41821
+
41822
+ const titleCase = (str) => words(str).map(upperFirst).join(' ');
41823
+
41824
+ var tinyCase = {
41825
+ words,
41826
+ upperFirst,
41827
+ camelCase,
41828
+ pascalCase,
41829
+ snakeCase,
41830
+ kebabCase,
41831
+ sentenceCase,
41832
+ titleCase
41833
+ };
41834
+
41835
+ var toposort$2 = { exports: {} };
41836
+
41837
+ /**
41838
+ * Topological sorting function
41839
+ *
41840
+ * @param {Array} edges
41841
+ * @returns {Array}
41842
+ */
41843
+
41844
+ toposort$2.exports = function (edges) {
41845
+ return toposort(uniqueNodes(edges), edges);
41846
+ };
41847
+
41848
+ toposort$2.exports.array = toposort;
41849
+
41850
+ function toposort(nodes, edges) {
41851
+ var cursor = nodes.length,
41852
+ sorted = new Array(cursor),
41853
+ visited = {},
41854
+ i = cursor,
41855
+ // Better data structures make algorithm much faster.
41856
+ outgoingEdges = makeOutgoingEdges(edges),
41857
+ nodesHash = makeNodesHash(nodes);
41858
+
41859
+ // check for unknown nodes
41860
+ edges.forEach(function (edge) {
41861
+ if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
41862
+ throw new Error('Unknown node. There is an unknown node in the supplied edges.');
41863
+ }
41864
+ });
41865
+
41866
+ while (i--) {
41867
+ if (!visited[i]) visit(nodes[i], i, new Set());
41868
+ }
41869
+
41870
+ return sorted;
41871
+
41872
+ function visit(node, i, predecessors) {
41873
+ if (predecessors.has(node)) {
41874
+ var nodeRep;
41875
+ try {
41876
+ nodeRep = ', node was:' + JSON.stringify(node);
41877
+ } catch (e) {
41878
+ nodeRep = '';
41879
+ }
41880
+ throw new Error('Cyclic dependency' + nodeRep);
41881
+ }
41882
+
41883
+ if (!nodesHash.has(node)) {
41884
+ throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: ' + JSON.stringify(node));
41885
+ }
41886
+
41887
+ if (visited[i]) return;
41888
+ visited[i] = true;
41889
+
41890
+ var outgoing = outgoingEdges.get(node) || new Set();
41891
+ outgoing = Array.from(outgoing);
41892
+
41893
+ if ((i = outgoing.length)) {
41894
+ predecessors.add(node);
41895
+ do {
41896
+ var child = outgoing[--i];
41897
+ visit(child, nodesHash.get(child), predecessors);
41898
+ } while (i);
41899
+ predecessors.delete(node);
41900
+ }
41901
+
41902
+ sorted[--cursor] = node;
41903
+ }
41904
+ }
41905
+
41906
+ function uniqueNodes(arr) {
41907
+ var res = new Set();
41908
+ for (var i = 0, len = arr.length; i < len; i++) {
41909
+ var edge = arr[i];
41910
+ res.add(edge[0]);
41911
+ res.add(edge[1]);
41912
+ }
41913
+ return Array.from(res);
41914
+ }
41915
+
41916
+ function makeOutgoingEdges(arr) {
41917
+ var edges = new Map();
41918
+ for (var i = 0, len = arr.length; i < len; i++) {
41919
+ var edge = arr[i];
41920
+ if (!edges.has(edge[0])) edges.set(edge[0], new Set());
41921
+ if (!edges.has(edge[1])) edges.set(edge[1], new Set());
41922
+ edges.get(edge[0]).add(edge[1]);
41923
+ }
41924
+ return edges;
41925
+ }
41926
+
41927
+ function makeNodesHash(arr) {
41928
+ var res = new Map();
41929
+ for (var i = 0, len = arr.length; i < len; i++) {
41930
+ res.set(arr[i], i);
41931
+ }
41932
+ return res;
41933
+ }
41934
+
41935
+ var toposort$1 = toposort$2.exports;
41936
+
41937
+ const toString$1 = Object.prototype.toString;
41938
+ const errorToString = Error.prototype.toString;
41939
+ const regExpToString = RegExp.prototype.toString;
41940
+ const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';
41941
+ const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
41942
+ function printNumber(val) {
41943
+ if (val != +val) return 'NaN';
41944
+ const isNegativeZero = val === 0 && 1 / val < 0;
41945
+ return isNegativeZero ? '-0' : '' + val;
41946
+ }
41947
+ function printSimpleValue(val, quoteStrings = false) {
41948
+ if (val == null || val === true || val === false) return '' + val;
41949
+ const typeOf = typeof val;
41950
+ if (typeOf === 'number') return printNumber(val);
41951
+ if (typeOf === 'string') return quoteStrings ? `"${val}"` : val;
41952
+ if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';
41953
+ if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');
41954
+ const tag = toString$1.call(val).slice(8, -1);
41955
+ if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);
41956
+ if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';
41957
+ if (tag === 'RegExp') return regExpToString.call(val);
41958
+ return null;
41959
+ }
41960
+ function printValue(value, quoteStrings) {
41961
+ let result = printSimpleValue(value, quoteStrings);
41962
+ if (result !== null) return result;
41963
+ return JSON.stringify(
41964
+ value,
41965
+ function (key, value) {
41966
+ let result = printSimpleValue(this[key], quoteStrings);
41967
+ if (result !== null) return result;
41968
+ return value;
41969
+ },
41970
+ 2
41971
+ );
41972
+ }
41973
+
41974
+ function toArray(value) {
41975
+ return value == null ? [] : [].concat(value);
41976
+ }
41977
+
41978
+ let _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;
41979
+ let strReg = /\$\{\s*(\w+)\s*\}/g;
41980
+ _Symbol$toStringTag = Symbol.toStringTag;
41981
+ class ValidationErrorNoStack {
41982
+ constructor(errorOrErrors, value, field, type) {
41983
+ this.name = void 0;
41984
+ this.message = void 0;
41985
+ this.value = void 0;
41986
+ this.path = void 0;
41987
+ this.type = void 0;
41988
+ this.params = void 0;
41989
+ this.errors = void 0;
41990
+ this.inner = void 0;
41991
+ this[_Symbol$toStringTag] = 'Error';
41992
+ this.name = 'ValidationError';
41993
+ this.value = value;
41994
+ this.path = field;
41995
+ this.type = type;
41996
+ this.errors = [];
41997
+ this.inner = [];
41998
+ toArray(errorOrErrors).forEach((err) => {
41999
+ if (ValidationError.isError(err)) {
42000
+ this.errors.push(...err.errors);
42001
+ const innerErrors = err.inner.length ? err.inner : [err];
42002
+ this.inner.push(...innerErrors);
42003
+ } else {
42004
+ this.errors.push(err);
42005
+ }
42006
+ });
42007
+ this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];
42008
+ }
42009
+ }
42010
+ _Symbol$hasInstance = Symbol.hasInstance;
42011
+ _Symbol$toStringTag2 = Symbol.toStringTag;
42012
+ class ValidationError extends Error {
42013
+ static formatError(message, params) {
42014
+ // Attempt to make the path more friendly for error message interpolation.
42015
+ const path = params.label || params.path || 'this';
42016
+ // Store the original path under `originalPath` so it isn't lost to custom
42017
+ // message functions; e.g., ones provided in `setLocale()` calls.
42018
+ params = Object.assign({}, params, {
42019
+ path,
42020
+ originalPath: params.path
42021
+ });
42022
+ if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));
42023
+ if (typeof message === 'function') return message(params);
42024
+ return message;
42025
+ }
42026
+ static isError(err) {
42027
+ return err && err.name === 'ValidationError';
42028
+ }
42029
+ constructor(errorOrErrors, value, field, type, disableStack) {
42030
+ const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);
42031
+ if (disableStack) {
42032
+ return errorNoStack;
42033
+ }
42034
+ super();
42035
+ this.value = void 0;
42036
+ this.path = void 0;
42037
+ this.type = void 0;
42038
+ this.params = void 0;
42039
+ this.errors = [];
42040
+ this.inner = [];
42041
+ this[_Symbol$toStringTag2] = 'Error';
42042
+ this.name = errorNoStack.name;
42043
+ this.message = errorNoStack.message;
42044
+ this.type = errorNoStack.type;
42045
+ this.value = errorNoStack.value;
42046
+ this.path = errorNoStack.path;
42047
+ this.errors = errorNoStack.errors;
42048
+ this.inner = errorNoStack.inner;
42049
+ if (Error.captureStackTrace) {
42050
+ Error.captureStackTrace(this, ValidationError);
42051
+ }
42052
+ }
42053
+ static [_Symbol$hasInstance](inst) {
42054
+ return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);
42055
+ }
42056
+ }
42057
+
42058
+ let mixed = {
42059
+ default: '${path} is invalid',
42060
+ required: '${path} is a required field',
42061
+ defined: '${path} must be defined',
42062
+ notNull: '${path} cannot be null',
42063
+ oneOf: '${path} must be one of the following values: ${values}',
42064
+ notOneOf: '${path} must not be one of the following values: ${values}',
42065
+ notType: ({ path, type, value, originalValue }) => {
42066
+ const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \`${printValue(originalValue, true)}\`).` : '.';
42067
+ return type !== 'mixed'
42068
+ ? `${path} must be a \`${type}\` type, ` + `but the final value was: \`${printValue(value, true)}\`` + castMsg
42069
+ : `${path} must match the configured type. ` + `The validated value was: \`${printValue(value, true)}\`` + castMsg;
42070
+ }
42071
+ };
42072
+ let string = {
42073
+ length: '${path} must be exactly ${length} characters',
42074
+ min: '${path} must be at least ${min} characters',
42075
+ max: '${path} must be at most ${max} characters',
42076
+ matches: '${path} must match the following: "${regex}"',
42077
+ email: '${path} must be a valid email',
42078
+ url: '${path} must be a valid URL',
42079
+ uuid: '${path} must be a valid UUID',
42080
+ datetime: '${path} must be a valid ISO date-time',
42081
+ datetime_precision: '${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits',
42082
+ datetime_offset: '${path} must be a valid ISO date-time with UTC "Z" timezone',
42083
+ trim: '${path} must be a trimmed string',
42084
+ lowercase: '${path} must be a lowercase string',
42085
+ uppercase: '${path} must be a upper case string'
42086
+ };
42087
+ let number = {
42088
+ min: '${path} must be greater than or equal to ${min}',
42089
+ max: '${path} must be less than or equal to ${max}',
42090
+ lessThan: '${path} must be less than ${less}',
42091
+ moreThan: '${path} must be greater than ${more}',
42092
+ positive: '${path} must be a positive number',
42093
+ negative: '${path} must be a negative number',
42094
+ integer: '${path} must be an integer'
42095
+ };
42096
+ let date = {
42097
+ min: '${path} field must be later than ${min}',
42098
+ max: '${path} field must be at earlier than ${max}'
42099
+ };
42100
+ let boolean = {
42101
+ isValue: '${path} field must be ${value}'
42102
+ };
42103
+ let object = {
42104
+ noUnknown: '${path} field has unspecified keys: ${unknown}',
42105
+ exact: '${path} object contains unknown properties: ${properties}'
42106
+ };
42107
+ let array = {
42108
+ min: '${path} field must have at least ${min} items',
42109
+ max: '${path} field must have less than or equal to ${max} items',
42110
+ length: '${path} must have ${length} items'
42111
+ };
42112
+ let tuple = {
42113
+ notType: (params) => {
42114
+ const { path, value, spec } = params;
42115
+ const typeLen = spec.types.length;
42116
+ if (Array.isArray(value)) {
42117
+ if (value.length < typeLen)
42118
+ return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
42119
+ if (value.length > typeLen)
42120
+ return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
42121
+ }
42122
+ return ValidationError.formatError(mixed.notType, params);
42123
+ }
42124
+ };
42125
+ Object.assign(Object.create(null), {
42126
+ mixed,
42127
+ string,
42128
+ number,
42129
+ date,
42130
+ object,
42131
+ array,
42132
+ boolean,
42133
+ tuple
42134
+ });
42135
+
42136
+ const isSchema = (obj) => obj && obj.__isYupSchema__;
42137
+
42138
+ class Condition {
42139
+ static fromOptions(refs, config) {
42140
+ if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');
42141
+ let { is, then, otherwise } = config;
42142
+ let check = typeof is === 'function' ? is : (...values) => values.every((value) => value === is);
42143
+ return new Condition(refs, (values, schema) => {
42144
+ var _branch;
42145
+ let branch = check(...values) ? then : otherwise;
42146
+ return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;
42147
+ });
42148
+ }
42149
+ constructor(refs, builder) {
42150
+ this.fn = void 0;
42151
+ this.refs = refs;
42152
+ this.refs = refs;
42153
+ this.fn = builder;
42154
+ }
42155
+ resolve(base, options) {
42156
+ let values = this.refs.map((ref) =>
42157
+ // TODO: ? operator here?
42158
+ ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
42159
+ );
42160
+ let schema = this.fn(values, base, options);
42161
+ if (
42162
+ schema === undefined ||
42163
+ // @ts-ignore this can be base
42164
+ schema === base
42165
+ ) {
42166
+ return base;
42167
+ }
42168
+ if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');
42169
+ return schema.resolve(options);
42170
+ }
42171
+ }
42172
+
42173
+ const prefixes = {
42174
+ context: '$',
42175
+ value: '.'
42176
+ };
42177
+ class Reference {
42178
+ constructor(key, options = {}) {
42179
+ this.key = void 0;
42180
+ this.isContext = void 0;
42181
+ this.isValue = void 0;
42182
+ this.isSibling = void 0;
42183
+ this.path = void 0;
42184
+ this.getter = void 0;
42185
+ this.map = void 0;
42186
+ if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);
42187
+ this.key = key.trim();
42188
+ if (key === '') throw new TypeError('ref must be a non-empty string');
42189
+ this.isContext = this.key[0] === prefixes.context;
42190
+ this.isValue = this.key[0] === prefixes.value;
42191
+ this.isSibling = !this.isContext && !this.isValue;
42192
+ let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';
42193
+ this.path = this.key.slice(prefix.length);
42194
+ this.getter = this.path && propertyExpr.getter(this.path, true);
42195
+ this.map = options.map;
42196
+ }
42197
+ getValue(value, parent, context) {
42198
+ let result = this.isContext ? context : this.isValue ? value : parent;
42199
+ if (this.getter) result = this.getter(result || {});
42200
+ if (this.map) result = this.map(result);
42201
+ return result;
42202
+ }
42203
+
42204
+ /**
42205
+ *
42206
+ * @param {*} value
42207
+ * @param {Object} options
42208
+ * @param {Object=} options.context
42209
+ * @param {Object=} options.parent
42210
+ */
42211
+ cast(value, options) {
42212
+ return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);
42213
+ }
42214
+ resolve() {
42215
+ return this;
42216
+ }
42217
+ describe() {
42218
+ return {
42219
+ type: 'ref',
42220
+ key: this.key
42221
+ };
42222
+ }
42223
+ toString() {
42224
+ return `Ref(${this.key})`;
42225
+ }
42226
+ static isRef(value) {
42227
+ return value && value.__isYupRef;
42228
+ }
42229
+ }
42230
+
42231
+ // @ts-ignore
42232
+ Reference.prototype.__isYupRef = true;
42233
+
42234
+ const isAbsent = (value) => value == null;
42235
+
42236
+ function createValidation(config) {
42237
+ function validate({ value, path = '', options, originalValue, schema }, panic, next) {
42238
+ const { name, test, params, message, skipAbsent } = config;
42239
+ let { parent, context, abortEarly = schema.spec.abortEarly, disableStackTrace = schema.spec.disableStackTrace } = options;
42240
+ function resolve(item) {
42241
+ return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
42242
+ }
42243
+ function createError(overrides = {}) {
42244
+ const nextParams = Object.assign(
42245
+ {
42246
+ value,
42247
+ originalValue,
42248
+ label: schema.spec.label,
42249
+ path: overrides.path || path,
42250
+ spec: schema.spec,
42251
+ disableStackTrace: overrides.disableStackTrace || disableStackTrace
42252
+ },
42253
+ params,
42254
+ overrides.params
42255
+ );
42256
+ for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
42257
+ const error = new ValidationError(
42258
+ ValidationError.formatError(overrides.message || message, nextParams),
42259
+ value,
42260
+ nextParams.path,
42261
+ overrides.type || name,
42262
+ nextParams.disableStackTrace
42263
+ );
42264
+ error.params = nextParams;
42265
+ return error;
42266
+ }
42267
+ const invalid = abortEarly ? panic : next;
42268
+ let ctx = {
42269
+ path,
42270
+ parent,
42271
+ type: name,
42272
+ from: options.from,
42273
+ createError,
42274
+ resolve,
42275
+ options,
42276
+ originalValue,
42277
+ schema
42278
+ };
42279
+ const handleResult = (validOrError) => {
42280
+ if (ValidationError.isError(validOrError)) invalid(validOrError);
42281
+ else if (!validOrError) invalid(createError());
42282
+ else next(null);
42283
+ };
42284
+ const handleError = (err) => {
42285
+ if (ValidationError.isError(err)) invalid(err);
42286
+ else panic(err);
42287
+ };
42288
+ const shouldSkip = skipAbsent && isAbsent(value);
42289
+ if (shouldSkip) {
42290
+ return handleResult(true);
42291
+ }
42292
+ let result;
42293
+ try {
42294
+ var _result;
42295
+ result = test.call(ctx, value, ctx);
42296
+ if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {
42297
+ if (options.sync) {
42298
+ throw new Error(
42299
+ `Validation test of type: "${ctx.type}" returned a Promise during a synchronous validate. ` +
42300
+ `This test will finish after the validate call has returned`
42301
+ );
42302
+ }
42303
+ return Promise.resolve(result).then(handleResult, handleError);
42304
+ }
42305
+ } catch (err) {
42306
+ handleError(err);
42307
+ return;
42308
+ }
42309
+ handleResult(result);
42310
+ }
42311
+ validate.OPTIONS = config;
42312
+ return validate;
42313
+ }
42314
+
42315
+ function getIn(schema, path, value, context = value) {
42316
+ let parent, lastPart, lastPartDebug;
42317
+
42318
+ // root path: ''
42319
+ if (!path)
42320
+ return {
42321
+ parent,
42322
+ parentPath: path,
42323
+ schema
42324
+ };
42325
+ propertyExpr.forEach(path, (_part, isBracket, isArray) => {
42326
+ let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
42327
+ schema = schema.resolve({
42328
+ context,
42329
+ parent,
42330
+ value
42331
+ });
42332
+ let isTuple = schema.type === 'tuple';
42333
+ let idx = isArray ? parseInt(part, 10) : 0;
42334
+ if (schema.innerType || isTuple) {
42335
+ if (isTuple && !isArray)
42336
+ throw new Error(
42337
+ `Yup.reach cannot implicitly index into a tuple type. the path part "${lastPartDebug}" must contain an index to the tuple element, e.g. "${lastPartDebug}[0]"`
42338
+ );
42339
+ if (value && idx >= value.length) {
42340
+ throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);
42341
+ }
42342
+ parent = value;
42343
+ value = value && value[idx];
42344
+ schema = isTuple ? schema.spec.types[idx] : schema.innerType;
42345
+ }
42346
+
42347
+ // sometimes the array index part of a path doesn't exist: "nested.arr.child"
42348
+ // in these cases the current part is the next schema and should be processed
42349
+ // in this iteration. For cases where the index signature is included this
42350
+ // check will fail and we'll handle the `child` part on the next iteration like normal
42351
+ if (!isArray) {
42352
+ if (!schema.fields || !schema.fields[part])
42353
+ throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: "${schema.type}")`);
42354
+ parent = value;
42355
+ value = value && value[part];
42356
+ schema = schema.fields[part];
42357
+ }
42358
+ lastPart = part;
42359
+ lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;
42360
+ });
42361
+ return {
42362
+ schema,
42363
+ parent,
42364
+ parentPath: lastPart
42365
+ };
42366
+ }
42367
+
42368
+ class ReferenceSet extends Set {
42369
+ describe() {
42370
+ const description = [];
42371
+ for (const item of this.values()) {
42372
+ description.push(Reference.isRef(item) ? item.describe() : item);
42373
+ }
42374
+ return description;
42375
+ }
42376
+ resolveAll(resolve) {
42377
+ let result = [];
42378
+ for (const item of this.values()) {
42379
+ result.push(resolve(item));
42380
+ }
42381
+ return result;
42382
+ }
42383
+ clone() {
42384
+ return new ReferenceSet(this.values());
42385
+ }
42386
+ merge(newItems, removeItems) {
42387
+ const next = this.clone();
42388
+ newItems.forEach((value) => next.add(value));
42389
+ removeItems.forEach((value) => next.delete(value));
42390
+ return next;
42391
+ }
42392
+ }
42393
+
42394
+ // tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js
42395
+ function clone(src, seen = new Map()) {
42396
+ if (isSchema(src) || !src || typeof src !== 'object') return src;
42397
+ if (seen.has(src)) return seen.get(src);
42398
+ let copy;
42399
+ if (src instanceof Date) {
42400
+ // Date
42401
+ copy = new Date(src.getTime());
42402
+ seen.set(src, copy);
42403
+ } else if (src instanceof RegExp) {
42404
+ // RegExp
42405
+ copy = new RegExp(src);
42406
+ seen.set(src, copy);
42407
+ } else if (Array.isArray(src)) {
42408
+ // Array
42409
+ copy = new Array(src.length);
42410
+ seen.set(src, copy);
42411
+ for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);
42412
+ } else if (src instanceof Map) {
42413
+ // Map
42414
+ copy = new Map();
42415
+ seen.set(src, copy);
42416
+ for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));
42417
+ } else if (src instanceof Set) {
42418
+ // Set
42419
+ copy = new Set();
42420
+ seen.set(src, copy);
42421
+ for (const v of src) copy.add(clone(v, seen));
42422
+ } else if (src instanceof Object) {
42423
+ // Object
42424
+ copy = {};
42425
+ seen.set(src, copy);
42426
+ for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);
42427
+ } else {
42428
+ throw Error(`Unable to clone ${src}`);
42429
+ }
42430
+ return copy;
42431
+ }
42432
+
42433
+ // If `CustomSchemaMeta` isn't extended with any keys, we'll fall back to a
42434
+ // loose Record definition allowing free form usage.
42435
+ class Schema {
42436
+ constructor(options) {
42437
+ this.type = void 0;
42438
+ this.deps = [];
42439
+ this.tests = void 0;
42440
+ this.transforms = void 0;
42441
+ this.conditions = [];
42442
+ this._mutate = void 0;
42443
+ this.internalTests = {};
42444
+ this._whitelist = new ReferenceSet();
42445
+ this._blacklist = new ReferenceSet();
42446
+ this.exclusiveTests = Object.create(null);
42447
+ this._typeCheck = void 0;
42448
+ this.spec = void 0;
42449
+ this.tests = [];
42450
+ this.transforms = [];
42451
+ this.withMutation(() => {
42452
+ this.typeError(mixed.notType);
42453
+ });
42454
+ this.type = options.type;
42455
+ this._typeCheck = options.check;
42456
+ this.spec = Object.assign(
42457
+ {
42458
+ strip: false,
42459
+ strict: false,
42460
+ abortEarly: true,
42461
+ recursive: true,
42462
+ disableStackTrace: false,
42463
+ nullable: false,
42464
+ optional: true,
42465
+ coerce: true
42466
+ },
42467
+ options == null ? void 0 : options.spec
42468
+ );
42469
+ this.withMutation((s) => {
42470
+ s.nonNullable();
42471
+ });
42472
+ }
42473
+
42474
+ // TODO: remove
42475
+ get _type() {
42476
+ return this.type;
42477
+ }
42478
+ clone(spec) {
42479
+ if (this._mutate) {
42480
+ if (spec) Object.assign(this.spec, spec);
42481
+ return this;
42482
+ }
42483
+
42484
+ // if the nested value is a schema we can skip cloning, since
42485
+ // they are already immutable
42486
+ const next = Object.create(Object.getPrototypeOf(this));
42487
+
42488
+ // @ts-expect-error this is readonly
42489
+ next.type = this.type;
42490
+ next._typeCheck = this._typeCheck;
42491
+ next._whitelist = this._whitelist.clone();
42492
+ next._blacklist = this._blacklist.clone();
42493
+ next.internalTests = Object.assign({}, this.internalTests);
42494
+ next.exclusiveTests = Object.assign({}, this.exclusiveTests);
42495
+
42496
+ // @ts-expect-error this is readonly
42497
+ next.deps = [...this.deps];
42498
+ next.conditions = [...this.conditions];
42499
+ next.tests = [...this.tests];
42500
+ next.transforms = [...this.transforms];
42501
+ next.spec = clone(Object.assign({}, this.spec, spec));
42502
+ return next;
42503
+ }
42504
+ label(label) {
42505
+ let next = this.clone();
42506
+ next.spec.label = label;
42507
+ return next;
42508
+ }
42509
+ meta(...args) {
42510
+ if (args.length === 0) return this.spec.meta;
42511
+ let next = this.clone();
42512
+ next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);
42513
+ return next;
42514
+ }
42515
+ withMutation(fn) {
42516
+ let before = this._mutate;
42517
+ this._mutate = true;
42518
+ let result = fn(this);
42519
+ this._mutate = before;
42520
+ return result;
42521
+ }
42522
+ concat(schema) {
42523
+ if (!schema || schema === this) return this;
42524
+ if (schema.type !== this.type && this.type !== 'mixed')
42525
+ throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema.type}`);
42526
+ let base = this;
42527
+ let combined = schema.clone();
42528
+ const mergedSpec = Object.assign({}, base.spec, combined.spec);
42529
+ combined.spec = mergedSpec;
42530
+ combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
42531
+
42532
+ // manually merge the blacklist/whitelist (the other `schema` takes
42533
+ // precedence in case of conflicts)
42534
+ combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);
42535
+ combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);
42536
+
42537
+ // start with the current tests
42538
+ combined.tests = base.tests;
42539
+ combined.exclusiveTests = base.exclusiveTests;
42540
+
42541
+ // manually add the new tests to ensure
42542
+ // the deduping logic is consistent
42543
+ combined.withMutation((next) => {
42544
+ schema.tests.forEach((fn) => {
42545
+ next.test(fn.OPTIONS);
42546
+ });
42547
+ });
42548
+ combined.transforms = [...base.transforms, ...combined.transforms];
42549
+ return combined;
42550
+ }
42551
+ isType(v) {
42552
+ if (v == null) {
42553
+ if (this.spec.nullable && v === null) return true;
42554
+ if (this.spec.optional && v === undefined) return true;
42555
+ return false;
42556
+ }
42557
+ return this._typeCheck(v);
42558
+ }
42559
+ resolve(options) {
42560
+ let schema = this;
42561
+ if (schema.conditions.length) {
42562
+ let conditions = schema.conditions;
42563
+ schema = schema.clone();
42564
+ schema.conditions = [];
42565
+ schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);
42566
+ schema = schema.resolve(options);
42567
+ }
42568
+ return schema;
42569
+ }
42570
+ resolveOptions(options) {
42571
+ var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
42572
+ return Object.assign({}, options, {
42573
+ from: options.from || [],
42574
+ strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,
42575
+ abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,
42576
+ recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive,
42577
+ disableStackTrace: (_options$disableStack = options.disableStackTrace) != null ? _options$disableStack : this.spec.disableStackTrace
42578
+ });
42579
+ }
42580
+
42581
+ /**
42582
+ * Run the configured transform pipeline over an input value.
42583
+ */
42584
+
42585
+ cast(value, options = {}) {
42586
+ let resolvedSchema = this.resolve(
42587
+ Object.assign(
42588
+ {
42589
+ value
42590
+ },
42591
+ options
42592
+ )
42593
+ );
42594
+ let allowOptionality = options.assert === 'ignore-optionality';
42595
+ let result = resolvedSchema._cast(value, options);
42596
+ if (options.assert !== false && !resolvedSchema.isType(result)) {
42597
+ if (allowOptionality && isAbsent(result)) {
42598
+ return result;
42599
+ }
42600
+ let formattedValue = printValue(value);
42601
+ let formattedResult = printValue(result);
42602
+ throw new TypeError(
42603
+ `The value of ${options.path || 'field'} could not be cast to a value ` +
42604
+ `that satisfies the schema type: "${resolvedSchema.type}". \n\n` +
42605
+ `attempted value: ${formattedValue} \n` +
42606
+ (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : '')
42607
+ );
42608
+ }
42609
+ return result;
42610
+ }
42611
+ _cast(rawValue, options) {
42612
+ let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
42613
+ if (value === undefined) {
42614
+ value = this.getDefault(options);
42615
+ }
42616
+ return value;
42617
+ }
42618
+ _validate(_value, options = {}, panic, next) {
42619
+ let { path, originalValue = _value, strict = this.spec.strict } = options;
42620
+ let value = _value;
42621
+ if (!strict) {
42622
+ value = this._cast(
42623
+ value,
42624
+ Object.assign(
42625
+ {
42626
+ assert: false
42627
+ },
42628
+ options
42629
+ )
42630
+ );
42631
+ }
42632
+ let initialTests = [];
42633
+ for (let test of Object.values(this.internalTests)) {
42634
+ if (test) initialTests.push(test);
42635
+ }
42636
+ this.runTests(
42637
+ {
42638
+ path,
42639
+ value,
42640
+ originalValue,
42641
+ options,
42642
+ tests: initialTests
42643
+ },
42644
+ panic,
42645
+ (initialErrors) => {
42646
+ // even if we aren't ending early we can't proceed further if the types aren't correct
42647
+ if (initialErrors.length) {
42648
+ return next(initialErrors, value);
42649
+ }
42650
+ this.runTests(
42651
+ {
42652
+ path,
42653
+ value,
42654
+ originalValue,
42655
+ options,
42656
+ tests: this.tests
42657
+ },
42658
+ panic,
42659
+ next
42660
+ );
42661
+ }
42662
+ );
42663
+ }
42664
+
42665
+ /**
42666
+ * Executes a set of validations, either schema, produced Tests or a nested
42667
+ * schema validate result.
42668
+ */
42669
+ runTests(runOptions, panic, next) {
42670
+ let fired = false;
42671
+ let { tests, value, originalValue, path, options } = runOptions;
42672
+ let panicOnce = (arg) => {
42673
+ if (fired) return;
42674
+ fired = true;
42675
+ panic(arg, value);
42676
+ };
42677
+ let nextOnce = (arg) => {
42678
+ if (fired) return;
42679
+ fired = true;
42680
+ next(arg, value);
42681
+ };
42682
+ let count = tests.length;
42683
+ let nestedErrors = [];
42684
+ if (!count) return nextOnce([]);
42685
+ let args = {
42686
+ value,
42687
+ originalValue,
42688
+ path,
42689
+ options,
42690
+ schema: this
42691
+ };
42692
+ for (let i = 0; i < tests.length; i++) {
42693
+ const test = tests[i];
42694
+ test(args, panicOnce, function finishTestRun(err) {
42695
+ if (err) {
42696
+ Array.isArray(err) ? nestedErrors.push(...err) : nestedErrors.push(err);
42697
+ }
42698
+ if (--count <= 0) {
42699
+ nextOnce(nestedErrors);
42700
+ }
42701
+ });
42702
+ }
42703
+ }
42704
+ asNestedTest({ key, index, parent, parentPath, originalParent, options }) {
42705
+ const k = key != null ? key : index;
42706
+ if (k == null) {
42707
+ throw TypeError('Must include `key` or `index` for nested validations');
42708
+ }
42709
+ const isIndex = typeof k === 'number';
42710
+ let value = parent[k];
42711
+ const testOptions = Object.assign({}, options, {
42712
+ // Nested validations fields are always strict:
42713
+ // 1. parent isn't strict so the casting will also have cast inner values
42714
+ // 2. parent is strict in which case the nested values weren't cast either
42715
+ strict: true,
42716
+ parent,
42717
+ value,
42718
+ originalValue: originalParent[k],
42719
+ // FIXME: tests depend on `index` being passed around deeply,
42720
+ // we should not let the options.key/index bleed through
42721
+ key: undefined,
42722
+ // index: undefined,
42723
+ [isIndex ? 'index' : 'key']: k,
42724
+ path: isIndex || k.includes('.') ? `${parentPath || ''}[${isIndex ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : '') + key
42725
+ });
42726
+ return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
42727
+ }
42728
+ validate(value, options) {
42729
+ var _options$disableStack2;
42730
+ let schema = this.resolve(
42731
+ Object.assign({}, options, {
42732
+ value
42733
+ })
42734
+ );
42735
+ let disableStackTrace =
42736
+ (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;
42737
+ return new Promise((resolve, reject) =>
42738
+ schema._validate(
42739
+ value,
42740
+ options,
42741
+ (error, parsed) => {
42742
+ if (ValidationError.isError(error)) error.value = parsed;
42743
+ reject(error);
42744
+ },
42745
+ (errors, validated) => {
42746
+ if (errors.length) reject(new ValidationError(errors, validated, undefined, undefined, disableStackTrace));
42747
+ else resolve(validated);
42748
+ }
42749
+ )
42750
+ );
42751
+ }
42752
+ validateSync(value, options) {
42753
+ var _options$disableStack3;
42754
+ let schema = this.resolve(
42755
+ Object.assign({}, options, {
42756
+ value
42757
+ })
42758
+ );
42759
+ let result;
42760
+ let disableStackTrace =
42761
+ (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema.spec.disableStackTrace;
42762
+ schema._validate(
42763
+ value,
42764
+ Object.assign({}, options, {
42765
+ sync: true
42766
+ }),
42767
+ (error, parsed) => {
42768
+ if (ValidationError.isError(error)) error.value = parsed;
42769
+ throw error;
42770
+ },
42771
+ (errors, validated) => {
42772
+ if (errors.length) throw new ValidationError(errors, value, undefined, undefined, disableStackTrace);
42773
+ result = validated;
42774
+ }
42775
+ );
42776
+ return result;
42777
+ }
42778
+ isValid(value, options) {
42779
+ return this.validate(value, options).then(
42780
+ () => true,
42781
+ (err) => {
42782
+ if (ValidationError.isError(err)) return false;
42783
+ throw err;
42784
+ }
42785
+ );
42786
+ }
42787
+ isValidSync(value, options) {
42788
+ try {
42789
+ this.validateSync(value, options);
42790
+ return true;
42791
+ } catch (err) {
42792
+ if (ValidationError.isError(err)) return false;
42793
+ throw err;
42794
+ }
42795
+ }
42796
+ _getDefault(options) {
42797
+ let defaultValue = this.spec.default;
42798
+ if (defaultValue == null) {
42799
+ return defaultValue;
42800
+ }
42801
+ return typeof defaultValue === 'function' ? defaultValue.call(this, options) : clone(defaultValue);
42802
+ }
42803
+ getDefault(
42804
+ options
42805
+ // If schema is defaulted we know it's at least not undefined
42806
+ ) {
42807
+ let schema = this.resolve(options || {});
42808
+ return schema._getDefault(options);
42809
+ }
42810
+ default(def) {
42811
+ if (arguments.length === 0) {
42812
+ return this._getDefault();
42813
+ }
42814
+ let next = this.clone({
42815
+ default: def
42816
+ });
42817
+ return next;
42818
+ }
42819
+ strict(isStrict = true) {
42820
+ return this.clone({
42821
+ strict: isStrict
42822
+ });
42823
+ }
42824
+ nullability(nullable, message) {
42825
+ const next = this.clone({
42826
+ nullable
42827
+ });
42828
+ next.internalTests.nullable = createValidation({
42829
+ message,
42830
+ name: 'nullable',
42831
+ test(value) {
42832
+ return value === null ? this.schema.spec.nullable : true;
42833
+ }
42834
+ });
42835
+ return next;
42836
+ }
42837
+ optionality(optional, message) {
42838
+ const next = this.clone({
42839
+ optional
42840
+ });
42841
+ next.internalTests.optionality = createValidation({
42842
+ message,
42843
+ name: 'optionality',
42844
+ test(value) {
42845
+ return value === undefined ? this.schema.spec.optional : true;
42846
+ }
42847
+ });
42848
+ return next;
42849
+ }
42850
+ optional() {
42851
+ return this.optionality(true);
42852
+ }
42853
+ defined(message = mixed.defined) {
42854
+ return this.optionality(false, message);
42855
+ }
42856
+ nullable() {
42857
+ return this.nullability(true);
42858
+ }
42859
+ nonNullable(message = mixed.notNull) {
42860
+ return this.nullability(false, message);
42861
+ }
42862
+ required(message = mixed.required) {
42863
+ return this.clone().withMutation((next) => next.nonNullable(message).defined(message));
42864
+ }
42865
+ notRequired() {
42866
+ return this.clone().withMutation((next) => next.nullable().optional());
42867
+ }
42868
+ transform(fn) {
42869
+ let next = this.clone();
42870
+ next.transforms.push(fn);
42871
+ return next;
42872
+ }
42873
+
42874
+ /**
42875
+ * Adds a test function to the schema's queue of tests.
42876
+ * tests can be exclusive or non-exclusive.
42877
+ *
42878
+ * - exclusive tests, will replace any existing tests of the same name.
42879
+ * - non-exclusive: can be stacked
42880
+ *
42881
+ * If a non-exclusive test is added to a schema with an exclusive test of the same name
42882
+ * the exclusive test is removed and further tests of the same name will be stacked.
42883
+ *
42884
+ * If an exclusive test is added to a schema with non-exclusive tests of the same name
42885
+ * the previous tests are removed and further tests of the same name will replace each other.
42886
+ */
42887
+
42888
+ test(...args) {
42889
+ let opts;
42890
+ if (args.length === 1) {
42891
+ if (typeof args[0] === 'function') {
42892
+ opts = {
42893
+ test: args[0]
42894
+ };
42895
+ } else {
42896
+ opts = args[0];
42897
+ }
42898
+ } else if (args.length === 2) {
42899
+ opts = {
42900
+ name: args[0],
42901
+ test: args[1]
42902
+ };
42903
+ } else {
42904
+ opts = {
42905
+ name: args[0],
42906
+ message: args[1],
42907
+ test: args[2]
42908
+ };
42909
+ }
42910
+ if (opts.message === undefined) opts.message = mixed.default;
42911
+ if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');
42912
+ let next = this.clone();
42913
+ let validate = createValidation(opts);
42914
+ let isExclusive = opts.exclusive || (opts.name && next.exclusiveTests[opts.name] === true);
42915
+ if (opts.exclusive) {
42916
+ if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');
42917
+ }
42918
+ if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;
42919
+ next.tests = next.tests.filter((fn) => {
42920
+ if (fn.OPTIONS.name === opts.name) {
42921
+ if (isExclusive) return false;
42922
+ if (fn.OPTIONS.test === validate.OPTIONS.test) return false;
42923
+ }
42924
+ return true;
42925
+ });
42926
+ next.tests.push(validate);
42927
+ return next;
42928
+ }
42929
+ when(keys, options) {
42930
+ if (!Array.isArray(keys) && typeof keys !== 'string') {
42931
+ options = keys;
42932
+ keys = '.';
42933
+ }
42934
+ let next = this.clone();
42935
+ let deps = toArray(keys).map((key) => new Reference(key));
42936
+ deps.forEach((dep) => {
42937
+ // @ts-ignore readonly array
42938
+ if (dep.isSibling) next.deps.push(dep.key);
42939
+ });
42940
+ next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));
42941
+ return next;
42942
+ }
42943
+ typeError(message) {
42944
+ let next = this.clone();
42945
+ next.internalTests.typeError = createValidation({
42946
+ message,
42947
+ name: 'typeError',
42948
+ skipAbsent: true,
42949
+ test(value) {
42950
+ if (!this.schema._typeCheck(value))
42951
+ return this.createError({
42952
+ params: {
42953
+ type: this.schema.type
42954
+ }
42955
+ });
42956
+ return true;
42957
+ }
42958
+ });
42959
+ return next;
42960
+ }
42961
+ oneOf(enums, message = mixed.oneOf) {
42962
+ let next = this.clone();
42963
+ enums.forEach((val) => {
42964
+ next._whitelist.add(val);
42965
+ next._blacklist.delete(val);
42966
+ });
42967
+ next.internalTests.whiteList = createValidation({
42968
+ message,
42969
+ name: 'oneOf',
42970
+ skipAbsent: true,
42971
+ test(value) {
42972
+ let valids = this.schema._whitelist;
42973
+ let resolved = valids.resolveAll(this.resolve);
42974
+ return resolved.includes(value)
42975
+ ? true
42976
+ : this.createError({
42977
+ params: {
42978
+ values: Array.from(valids).join(', '),
42979
+ resolved
42980
+ }
42981
+ });
42982
+ }
42983
+ });
42984
+ return next;
42985
+ }
42986
+ notOneOf(enums, message = mixed.notOneOf) {
42987
+ let next = this.clone();
42988
+ enums.forEach((val) => {
42989
+ next._blacklist.add(val);
42990
+ next._whitelist.delete(val);
42991
+ });
42992
+ next.internalTests.blacklist = createValidation({
42993
+ message,
42994
+ name: 'notOneOf',
42995
+ test(value) {
42996
+ let invalids = this.schema._blacklist;
42997
+ let resolved = invalids.resolveAll(this.resolve);
42998
+ if (resolved.includes(value))
42999
+ return this.createError({
43000
+ params: {
43001
+ values: Array.from(invalids).join(', '),
43002
+ resolved
43003
+ }
43004
+ });
43005
+ return true;
43006
+ }
43007
+ });
43008
+ return next;
43009
+ }
43010
+ strip(strip = true) {
43011
+ let next = this.clone();
43012
+ next.spec.strip = strip;
43013
+ return next;
43014
+ }
43015
+
43016
+ /**
43017
+ * Return a serialized description of the schema including validations, flags, types etc.
43018
+ *
43019
+ * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).
43020
+ */
43021
+ describe(options) {
43022
+ const next = (options ? this.resolve(options) : this).clone();
43023
+ const { label, meta, optional, nullable } = next.spec;
43024
+ const description = {
43025
+ meta,
43026
+ label,
43027
+ optional,
43028
+ nullable,
43029
+ default: next.getDefault(options),
43030
+ type: next.type,
43031
+ oneOf: next._whitelist.describe(),
43032
+ notOneOf: next._blacklist.describe(),
43033
+ tests: next.tests
43034
+ .map((fn) => ({
43035
+ name: fn.OPTIONS.name,
43036
+ params: fn.OPTIONS.params
43037
+ }))
43038
+ .filter((n, idx, list) => list.findIndex((c) => c.name === n.name) === idx)
43039
+ };
43040
+ return description;
43041
+ }
43042
+ }
43043
+ // @ts-expect-error
43044
+ Schema.prototype.__isYupSchema__ = true;
43045
+ for (const method of ['validate', 'validateSync'])
43046
+ Schema.prototype[`${method}At`] = function (path, value, options = {}) {
43047
+ const { parent, parentPath, schema } = getIn(this, path, value, options.context);
43048
+ return schema[method](
43049
+ parent && parent[parentPath],
43050
+ Object.assign({}, options, {
43051
+ parent,
43052
+ path
43053
+ })
43054
+ );
43055
+ };
43056
+ for (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;
43057
+ for (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;
43058
+
43059
+ /**
43060
+ * This file is a modified version of the file from the following repository:
43061
+ * Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>
43062
+ * NON-CONFORMANT EDITION.
43063
+ * © 2011 Colin Snover <http://zetafleet.com>
43064
+ * Released under MIT license.
43065
+ */
43066
+
43067
+ // prettier-ignore
43068
+ // 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm
43069
+ const isoReg = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
43070
+ function parseIsoDate(date) {
43071
+ const struct = parseDateStruct(date);
43072
+ if (!struct) return Date.parse ? Date.parse(date) : Number.NaN;
43073
+
43074
+ // timestamps without timezone identifiers should be considered local time
43075
+ if (struct.z === undefined && struct.plusMinus === undefined) {
43076
+ return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();
43077
+ }
43078
+ let totalMinutesOffset = 0;
43079
+ if (struct.z !== 'Z' && struct.plusMinus !== undefined) {
43080
+ totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;
43081
+ if (struct.plusMinus === '+') totalMinutesOffset = 0 - totalMinutesOffset;
43082
+ }
43083
+ return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);
43084
+ }
43085
+ function parseDateStruct(date) {
43086
+ var _regexResult$7$length, _regexResult$;
43087
+ const regexResult = isoReg.exec(date);
43088
+ if (!regexResult) return null;
43089
+
43090
+ // use of toNumber() avoids NaN timestamps caused by “undefined”
43091
+ // values being passed to Date constructor
43092
+ return {
43093
+ year: toNumber(regexResult[1]),
43094
+ month: toNumber(regexResult[2], 1) - 1,
43095
+ day: toNumber(regexResult[3], 1),
43096
+ hour: toNumber(regexResult[4]),
43097
+ minute: toNumber(regexResult[5]),
43098
+ second: toNumber(regexResult[6]),
43099
+ millisecond: regexResult[7]
43100
+ ? // allow arbitrary sub-second precision beyond milliseconds
43101
+ toNumber(regexResult[7].substring(0, 3))
43102
+ : 0,
43103
+ precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : undefined,
43104
+ z: regexResult[8] || undefined,
43105
+ plusMinus: regexResult[9] || undefined,
43106
+ hourOffset: toNumber(regexResult[10]),
43107
+ minuteOffset: toNumber(regexResult[11])
43108
+ };
43109
+ }
43110
+ function toNumber(str, defaultValue = 0) {
43111
+ return Number(str) || defaultValue;
43112
+ }
43113
+
43114
+ // Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
43115
+ let rEmail =
43116
+ // eslint-disable-next-line
43117
+ /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
43118
+ let rUrl =
43119
+ // eslint-disable-next-line
43120
+ /^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
43121
+
43122
+ // eslint-disable-next-line
43123
+ let rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
43124
+ let yearMonthDay = '^\\d{4}-\\d{2}-\\d{2}';
43125
+ let hourMinuteSecond = '\\d{2}:\\d{2}:\\d{2}';
43126
+ let zOrOffset = '(([+-]\\d{2}(:?\\d{2})?)|Z)';
43127
+ let rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`);
43128
+ let isTrimmed = (value) => isAbsent(value) || value === value.trim();
43129
+ let objStringTag = {}.toString();
43130
+ function create$6() {
43131
+ return new StringSchema();
43132
+ }
43133
+ class StringSchema extends Schema {
43134
+ constructor() {
43135
+ super({
43136
+ type: 'string',
43137
+ check(value) {
43138
+ if (value instanceof String) value = value.valueOf();
43139
+ return typeof value === 'string';
43140
+ }
43141
+ });
43142
+ this.withMutation(() => {
43143
+ this.transform((value, _raw, ctx) => {
43144
+ if (!ctx.spec.coerce || ctx.isType(value)) return value;
43145
+
43146
+ // don't ever convert arrays
43147
+ if (Array.isArray(value)) return value;
43148
+ const strValue = value != null && value.toString ? value.toString() : value;
43149
+
43150
+ // no one wants plain objects converted to [Object object]
43151
+ if (strValue === objStringTag) return value;
43152
+ return strValue;
43153
+ });
43154
+ });
43155
+ }
43156
+ required(message) {
43157
+ return super.required(message).withMutation((schema) =>
43158
+ schema.test({
43159
+ message: message || mixed.required,
43160
+ name: 'required',
43161
+ skipAbsent: true,
43162
+ test: (value) => !!value.length
43163
+ })
43164
+ );
43165
+ }
43166
+ notRequired() {
43167
+ return super.notRequired().withMutation((schema) => {
43168
+ schema.tests = schema.tests.filter((t) => t.OPTIONS.name !== 'required');
43169
+ return schema;
43170
+ });
43171
+ }
43172
+ length(length, message = string.length) {
43173
+ return this.test({
43174
+ message,
43175
+ name: 'length',
43176
+ exclusive: true,
43177
+ params: {
43178
+ length
43179
+ },
43180
+ skipAbsent: true,
43181
+ test(value) {
43182
+ return value.length === this.resolve(length);
43183
+ }
43184
+ });
43185
+ }
43186
+ min(min, message = string.min) {
43187
+ return this.test({
43188
+ message,
43189
+ name: 'min',
43190
+ exclusive: true,
43191
+ params: {
43192
+ min
43193
+ },
43194
+ skipAbsent: true,
43195
+ test(value) {
43196
+ return value.length >= this.resolve(min);
43197
+ }
43198
+ });
43199
+ }
43200
+ max(max, message = string.max) {
43201
+ return this.test({
43202
+ name: 'max',
43203
+ exclusive: true,
43204
+ message,
43205
+ params: {
43206
+ max
43207
+ },
43208
+ skipAbsent: true,
43209
+ test(value) {
43210
+ return value.length <= this.resolve(max);
43211
+ }
43212
+ });
43213
+ }
43214
+ matches(regex, options) {
43215
+ let excludeEmptyString = false;
43216
+ let message;
43217
+ let name;
43218
+ if (options) {
43219
+ if (typeof options === 'object') {
43220
+ ({ excludeEmptyString = false, message, name } = options);
43221
+ } else {
43222
+ message = options;
43223
+ }
43224
+ }
43225
+ return this.test({
43226
+ name: name || 'matches',
43227
+ message: message || string.matches,
43228
+ params: {
43229
+ regex
43230
+ },
43231
+ skipAbsent: true,
43232
+ test: (value) => (value === '' && excludeEmptyString) || value.search(regex) !== -1
43233
+ });
43234
+ }
43235
+ email(message = string.email) {
43236
+ return this.matches(rEmail, {
43237
+ name: 'email',
43238
+ message,
43239
+ excludeEmptyString: true
43240
+ });
43241
+ }
43242
+ url(message = string.url) {
43243
+ return this.matches(rUrl, {
43244
+ name: 'url',
43245
+ message,
43246
+ excludeEmptyString: true
43247
+ });
43248
+ }
43249
+ uuid(message = string.uuid) {
43250
+ return this.matches(rUUID, {
43251
+ name: 'uuid',
43252
+ message,
43253
+ excludeEmptyString: false
43254
+ });
43255
+ }
43256
+ datetime(options) {
43257
+ let message = '';
43258
+ let allowOffset;
43259
+ let precision;
43260
+ if (options) {
43261
+ if (typeof options === 'object') {
43262
+ ({ message = '', allowOffset = false, precision = undefined } = options);
43263
+ } else {
43264
+ message = options;
43265
+ }
43266
+ }
43267
+ return this.matches(rIsoDateTime, {
43268
+ name: 'datetime',
43269
+ message: message || string.datetime,
43270
+ excludeEmptyString: true
43271
+ })
43272
+ .test({
43273
+ name: 'datetime_offset',
43274
+ message: message || string.datetime_offset,
43275
+ params: {
43276
+ allowOffset
43277
+ },
43278
+ skipAbsent: true,
43279
+ test: (value) => {
43280
+ if (!value || allowOffset) return true;
43281
+ const struct = parseDateStruct(value);
43282
+ if (!struct) return false;
43283
+ return !!struct.z;
43284
+ }
43285
+ })
43286
+ .test({
43287
+ name: 'datetime_precision',
43288
+ message: message || string.datetime_precision,
43289
+ params: {
43290
+ precision
43291
+ },
43292
+ skipAbsent: true,
43293
+ test: (value) => {
43294
+ if (!value || precision == undefined) return true;
43295
+ const struct = parseDateStruct(value);
43296
+ if (!struct) return false;
43297
+ return struct.precision === precision;
43298
+ }
43299
+ });
43300
+ }
43301
+
43302
+ //-- transforms --
43303
+ ensure() {
43304
+ return this.default('').transform((val) => (val === null ? '' : val));
43305
+ }
43306
+ trim(message = string.trim) {
43307
+ return this.transform((val) => (val != null ? val.trim() : val)).test({
43308
+ message,
43309
+ name: 'trim',
43310
+ test: isTrimmed
43311
+ });
43312
+ }
43313
+ lowercase(message = string.lowercase) {
43314
+ return this.transform((value) => (!isAbsent(value) ? value.toLowerCase() : value)).test({
43315
+ message,
43316
+ name: 'string_case',
43317
+ exclusive: true,
43318
+ skipAbsent: true,
43319
+ test: (value) => isAbsent(value) || value === value.toLowerCase()
43320
+ });
43321
+ }
43322
+ uppercase(message = string.uppercase) {
43323
+ return this.transform((value) => (!isAbsent(value) ? value.toUpperCase() : value)).test({
43324
+ message,
43325
+ name: 'string_case',
43326
+ exclusive: true,
43327
+ skipAbsent: true,
43328
+ test: (value) => isAbsent(value) || value === value.toUpperCase()
43329
+ });
43330
+ }
43331
+ }
43332
+ create$6.prototype = StringSchema.prototype;
43333
+
43334
+ //
43335
+ // Number Interfaces
43336
+ //
43337
+
43338
+ let invalidDate = new Date('');
43339
+ let isDate = (obj) => Object.prototype.toString.call(obj) === '[object Date]';
43340
+ class DateSchema extends Schema {
43341
+ constructor() {
43342
+ super({
43343
+ type: 'date',
43344
+ check(v) {
43345
+ return isDate(v) && !isNaN(v.getTime());
43346
+ }
43347
+ });
43348
+ this.withMutation(() => {
43349
+ this.transform((value, _raw, ctx) => {
43350
+ // null -> InvalidDate isn't useful; treat all nulls as null and let it fail on
43351
+ // nullability check vs TypeErrors
43352
+ if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;
43353
+ value = parseIsoDate(value);
43354
+
43355
+ // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.
43356
+ return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;
43357
+ });
43358
+ });
43359
+ }
43360
+ prepareParam(ref, name) {
43361
+ let param;
43362
+ if (!Reference.isRef(ref)) {
43363
+ let cast = this.cast(ref);
43364
+ if (!this._typeCheck(cast)) throw new TypeError(`\`${name}\` must be a Date or a value that can be \`cast()\` to a Date`);
43365
+ param = cast;
43366
+ } else {
43367
+ param = ref;
43368
+ }
43369
+ return param;
43370
+ }
43371
+ min(min, message = date.min) {
43372
+ let limit = this.prepareParam(min, 'min');
43373
+ return this.test({
43374
+ message,
43375
+ name: 'min',
43376
+ exclusive: true,
43377
+ params: {
43378
+ min
43379
+ },
43380
+ skipAbsent: true,
43381
+ test(value) {
43382
+ return value >= this.resolve(limit);
43383
+ }
43384
+ });
43385
+ }
43386
+ max(max, message = date.max) {
43387
+ let limit = this.prepareParam(max, 'max');
43388
+ return this.test({
43389
+ message,
43390
+ name: 'max',
43391
+ exclusive: true,
43392
+ params: {
43393
+ max
43394
+ },
43395
+ skipAbsent: true,
43396
+ test(value) {
43397
+ return value <= this.resolve(limit);
43398
+ }
43399
+ });
43400
+ }
43401
+ }
43402
+ DateSchema.INVALID_DATE = invalidDate;
43403
+ DateSchema.prototype;
43404
+
43405
+ // @ts-expect-error
43406
+ function sortFields(fields, excludedEdges = []) {
43407
+ let edges = [];
43408
+ let nodes = new Set();
43409
+ let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
43410
+ function addNode(depPath, key) {
43411
+ let node = propertyExpr.split(depPath)[0];
43412
+ nodes.add(node);
43413
+ if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
43414
+ }
43415
+ for (const key of Object.keys(fields)) {
43416
+ let value = fields[key];
43417
+ nodes.add(key);
43418
+ if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
43419
+ else if (isSchema(value) && 'deps' in value) value.deps.forEach((path) => addNode(path, key));
43420
+ }
43421
+ return toposort$1.array(Array.from(nodes), edges).reverse();
43422
+ }
43423
+
43424
+ function findIndex(arr, err) {
43425
+ let idx = Infinity;
43426
+ arr.some((key, ii) => {
43427
+ var _err$path;
43428
+ if ((_err$path = err.path) != null && _err$path.includes(key)) {
43429
+ idx = ii;
43430
+ return true;
43431
+ }
43432
+ });
43433
+ return idx;
43434
+ }
43435
+ function sortByKeyOrder(keys) {
43436
+ return (a, b) => {
43437
+ return findIndex(keys, a) - findIndex(keys, b);
43438
+ };
43439
+ }
43440
+
43441
+ const parseJson = (value, _, ctx) => {
43442
+ if (typeof value !== 'string') {
43443
+ return value;
43444
+ }
43445
+ let parsed = value;
43446
+ try {
43447
+ parsed = JSON.parse(value);
43448
+ } catch (err) {
43449
+ /* */
43450
+ }
43451
+ return ctx.isType(parsed) ? parsed : value;
43452
+ };
43453
+
43454
+ // @ts-ignore
43455
+ function deepPartial(schema) {
43456
+ if ('fields' in schema) {
43457
+ const partial = {};
43458
+ for (const [key, fieldSchema] of Object.entries(schema.fields)) {
43459
+ partial[key] = deepPartial(fieldSchema);
43460
+ }
43461
+ return schema.setFields(partial);
43462
+ }
43463
+ if (schema.type === 'array') {
43464
+ const nextArray = schema.optional();
43465
+ if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
43466
+ return nextArray;
43467
+ }
43468
+ if (schema.type === 'tuple') {
43469
+ return schema.optional().clone({
43470
+ types: schema.spec.types.map(deepPartial)
43471
+ });
43472
+ }
43473
+ if ('optional' in schema) {
43474
+ return schema.optional();
43475
+ }
43476
+ return schema;
43477
+ }
43478
+ const deepHas = (obj, p) => {
43479
+ const path = [...propertyExpr.normalizePath(p)];
43480
+ if (path.length === 1) return path[0] in obj;
43481
+ let last = path.pop();
43482
+ let parent = propertyExpr.getter(propertyExpr.join(path), true)(obj);
43483
+ return !!(parent && last in parent);
43484
+ };
43485
+ let isObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]';
43486
+ function unknown(ctx, value) {
43487
+ let known = Object.keys(ctx.fields);
43488
+ return Object.keys(value).filter((key) => known.indexOf(key) === -1);
43489
+ }
43490
+ const defaultSort = sortByKeyOrder([]);
43491
+ function create$3(spec) {
43492
+ return new ObjectSchema(spec);
43493
+ }
43494
+ class ObjectSchema extends Schema {
43495
+ constructor(spec) {
43496
+ super({
43497
+ type: 'object',
43498
+ check(value) {
43499
+ return isObject(value) || typeof value === 'function';
43500
+ }
43501
+ });
43502
+ this.fields = Object.create(null);
43503
+ this._sortErrors = defaultSort;
43504
+ this._nodes = [];
43505
+ this._excludedEdges = [];
43506
+ this.withMutation(() => {
43507
+ if (spec) {
43508
+ this.shape(spec);
43509
+ }
43510
+ });
43511
+ }
43512
+ _cast(_value, options = {}) {
43513
+ var _options$stripUnknown;
43514
+ let value = super._cast(_value, options);
43515
+
43516
+ //should ignore nulls here
43517
+ if (value === undefined) return this.getDefault(options);
43518
+ if (!this._typeCheck(value)) return value;
43519
+ let fields = this.fields;
43520
+ let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;
43521
+ let props = [].concat(
43522
+ this._nodes,
43523
+ Object.keys(value).filter((v) => !this._nodes.includes(v))
43524
+ );
43525
+ let intermediateValue = {}; // is filled during the transform below
43526
+ let innerOptions = Object.assign({}, options, {
43527
+ parent: intermediateValue,
43528
+ __validating: options.__validating || false
43529
+ });
43530
+ let isChanged = false;
43531
+ for (const prop of props) {
43532
+ let field = fields[prop];
43533
+ let exists = prop in value;
43534
+ if (field) {
43535
+ let fieldValue;
43536
+ let inputValue = value[prop];
43537
+
43538
+ // safe to mutate since this is fired in sequence
43539
+ innerOptions.path = (options.path ? `${options.path}.` : '') + prop;
43540
+ field = field.resolve({
43541
+ value: inputValue,
43542
+ context: options.context,
43543
+ parent: intermediateValue
43544
+ });
43545
+ let fieldSpec = field instanceof Schema ? field.spec : undefined;
43546
+ let strict = fieldSpec == null ? void 0 : fieldSpec.strict;
43547
+ if (fieldSpec != null && fieldSpec.strip) {
43548
+ isChanged = isChanged || prop in value;
43549
+ continue;
43550
+ }
43551
+ fieldValue =
43552
+ !options.__validating || !strict
43553
+ ? // TODO: use _cast, this is double resolving
43554
+ field.cast(value[prop], innerOptions)
43555
+ : value[prop];
43556
+ if (fieldValue !== undefined) {
43557
+ intermediateValue[prop] = fieldValue;
43558
+ }
43559
+ } else if (exists && !strip) {
43560
+ intermediateValue[prop] = value[prop];
43561
+ }
43562
+ if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {
43563
+ isChanged = true;
43564
+ }
43565
+ }
43566
+ return isChanged ? intermediateValue : value;
43567
+ }
43568
+ _validate(_value, options = {}, panic, next) {
43569
+ let { from = [], originalValue = _value, recursive = this.spec.recursive } = options;
43570
+ options.from = [
43571
+ {
43572
+ schema: this,
43573
+ value: originalValue
43574
+ },
43575
+ ...from
43576
+ ];
43577
+ // this flag is needed for handling `strict` correctly in the context of
43578
+ // validation vs just casting. e.g strict() on a field is only used when validating
43579
+ options.__validating = true;
43580
+ options.originalValue = originalValue;
43581
+ super._validate(_value, options, panic, (objectErrors, value) => {
43582
+ if (!recursive || !isObject(value)) {
43583
+ next(objectErrors, value);
43584
+ return;
43585
+ }
43586
+ originalValue = originalValue || value;
43587
+ let tests = [];
43588
+ for (let key of this._nodes) {
43589
+ let field = this.fields[key];
43590
+ if (!field || Reference.isRef(field)) {
43591
+ continue;
43592
+ }
43593
+ tests.push(
43594
+ field.asNestedTest({
43595
+ options,
43596
+ key,
43597
+ parent: value,
43598
+ parentPath: options.path,
43599
+ originalParent: originalValue
43600
+ })
43601
+ );
43602
+ }
43603
+ this.runTests(
43604
+ {
43605
+ tests,
43606
+ value,
43607
+ originalValue,
43608
+ options
43609
+ },
43610
+ panic,
43611
+ (fieldErrors) => {
43612
+ next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);
43613
+ }
43614
+ );
43615
+ });
43616
+ }
43617
+ clone(spec) {
43618
+ const next = super.clone(spec);
43619
+ next.fields = Object.assign({}, this.fields);
43620
+ next._nodes = this._nodes;
43621
+ next._excludedEdges = this._excludedEdges;
43622
+ next._sortErrors = this._sortErrors;
43623
+ return next;
43624
+ }
43625
+ concat(schema) {
43626
+ let next = super.concat(schema);
43627
+ let nextFields = next.fields;
43628
+ for (let [field, schemaOrRef] of Object.entries(this.fields)) {
43629
+ const target = nextFields[field];
43630
+ nextFields[field] = target === undefined ? schemaOrRef : target;
43631
+ }
43632
+ return next.withMutation((s) =>
43633
+ // XXX: excludes here is wrong
43634
+ s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges])
43635
+ );
43636
+ }
43637
+ _getDefault(options) {
43638
+ if ('default' in this.spec) {
43639
+ return super._getDefault(options);
43640
+ }
43641
+
43642
+ // if there is no default set invent one
43643
+ if (!this._nodes.length) {
43644
+ return undefined;
43645
+ }
43646
+ let dft = {};
43647
+ this._nodes.forEach((key) => {
43648
+ var _innerOptions;
43649
+ const field = this.fields[key];
43650
+ let innerOptions = options;
43651
+ if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
43652
+ innerOptions = Object.assign({}, innerOptions, {
43653
+ parent: innerOptions.value,
43654
+ value: innerOptions.value[key]
43655
+ });
43656
+ }
43657
+ dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;
43658
+ });
43659
+ return dft;
43660
+ }
43661
+ setFields(shape, excludedEdges) {
43662
+ let next = this.clone();
43663
+ next.fields = shape;
43664
+ next._nodes = sortFields(shape, excludedEdges);
43665
+ next._sortErrors = sortByKeyOrder(Object.keys(shape));
43666
+ // XXX: this carries over edges which may not be what you want
43667
+ if (excludedEdges) next._excludedEdges = excludedEdges;
43668
+ return next;
43669
+ }
43670
+ shape(additions, excludes = []) {
43671
+ return this.clone().withMutation((next) => {
43672
+ let edges = next._excludedEdges;
43673
+ if (excludes.length) {
43674
+ if (!Array.isArray(excludes[0])) excludes = [excludes];
43675
+ edges = [...next._excludedEdges, ...excludes];
43676
+ }
43677
+
43678
+ // XXX: excludes here is wrong
43679
+ return next.setFields(Object.assign(next.fields, additions), edges);
43680
+ });
43681
+ }
43682
+ partial() {
43683
+ const partial = {};
43684
+ for (const [key, schema] of Object.entries(this.fields)) {
43685
+ partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;
43686
+ }
43687
+ return this.setFields(partial);
43688
+ }
43689
+ deepPartial() {
43690
+ const next = deepPartial(this);
43691
+ return next;
43692
+ }
43693
+ pick(keys) {
43694
+ const picked = {};
43695
+ for (const key of keys) {
43696
+ if (this.fields[key]) picked[key] = this.fields[key];
43697
+ }
43698
+ return this.setFields(
43699
+ picked,
43700
+ this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b))
43701
+ );
43702
+ }
43703
+ omit(keys) {
43704
+ const remaining = [];
43705
+ for (const key of Object.keys(this.fields)) {
43706
+ if (keys.includes(key)) continue;
43707
+ remaining.push(key);
43708
+ }
43709
+ return this.pick(remaining);
43710
+ }
43711
+ from(from, to, alias) {
43712
+ let fromGetter = propertyExpr.getter(from, true);
43713
+ return this.transform((obj) => {
43714
+ if (!obj) return obj;
43715
+ let newObj = obj;
43716
+ if (deepHas(obj, from)) {
43717
+ newObj = Object.assign({}, obj);
43718
+ if (!alias) delete newObj[from];
43719
+ newObj[to] = fromGetter(obj);
43720
+ }
43721
+ return newObj;
43722
+ });
43723
+ }
43724
+
43725
+ /** Parse an input JSON string to an object */
43726
+ json() {
43727
+ return this.transform(parseJson);
43728
+ }
43729
+
43730
+ /**
43731
+ * Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys
43732
+ */
43733
+ exact(message) {
43734
+ return this.test({
43735
+ name: 'exact',
43736
+ exclusive: true,
43737
+ message: message || object.exact,
43738
+ test(value) {
43739
+ if (value == null) return true;
43740
+ const unknownKeys = unknown(this.schema, value);
43741
+ return (
43742
+ unknownKeys.length === 0 ||
43743
+ this.createError({
43744
+ params: {
43745
+ properties: unknownKeys.join(', ')
43746
+ }
43747
+ })
43748
+ );
43749
+ }
43750
+ });
43751
+ }
43752
+ stripUnknown() {
43753
+ return this.clone({
43754
+ noUnknown: true
43755
+ });
43756
+ }
43757
+ noUnknown(noAllow = true, message = object.noUnknown) {
43758
+ if (typeof noAllow !== 'boolean') {
43759
+ message = noAllow;
43760
+ noAllow = true;
43761
+ }
43762
+ let next = this.test({
43763
+ name: 'noUnknown',
43764
+ exclusive: true,
43765
+ message: message,
43766
+ test(value) {
43767
+ if (value == null) return true;
43768
+ const unknownKeys = unknown(this.schema, value);
43769
+ return (
43770
+ !noAllow ||
43771
+ unknownKeys.length === 0 ||
43772
+ this.createError({
43773
+ params: {
43774
+ unknown: unknownKeys.join(', ')
43775
+ }
43776
+ })
43777
+ );
43778
+ }
43779
+ });
43780
+ next.spec.noUnknown = noAllow;
43781
+ return next;
43782
+ }
43783
+ unknown(allow = true, message = object.noUnknown) {
43784
+ return this.noUnknown(!allow, message);
43785
+ }
43786
+ transformKeys(fn) {
43787
+ return this.transform((obj) => {
43788
+ if (!obj) return obj;
43789
+ const result = {};
43790
+ for (const key of Object.keys(obj)) result[fn(key)] = obj[key];
43791
+ return result;
43792
+ });
43793
+ }
43794
+ camelCase() {
43795
+ return this.transformKeys(tinyCase.camelCase);
43796
+ }
43797
+ snakeCase() {
43798
+ return this.transformKeys(tinyCase.snakeCase);
43799
+ }
43800
+ constantCase() {
43801
+ return this.transformKeys((key) => tinyCase.snakeCase(key).toUpperCase());
43802
+ }
43803
+ describe(options) {
43804
+ const next = (options ? this.resolve(options) : this).clone();
43805
+ const base = super.describe(options);
43806
+ base.fields = {};
43807
+ for (const [key, value] of Object.entries(next.fields)) {
43808
+ var _innerOptions2;
43809
+ let innerOptions = options;
43810
+ if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {
43811
+ innerOptions = Object.assign({}, innerOptions, {
43812
+ parent: innerOptions.value,
43813
+ value: innerOptions.value[key]
43814
+ });
43815
+ }
43816
+ base.fields[key] = value.describe(innerOptions);
43817
+ }
43818
+ return base;
43819
+ }
43820
+ }
43821
+ create$3.prototype = ObjectSchema.prototype;
43822
+
43823
+ class InvalidTokenError extends Error {}
43824
+ InvalidTokenError.prototype.name = 'InvalidTokenError';
43825
+ function b64DecodeUnicode(str) {
43826
+ return decodeURIComponent(
43827
+ atob(str).replace(/(.)/g, (m, p) => {
43828
+ let code = p.charCodeAt(0).toString(16).toUpperCase();
43829
+ if (code.length < 2) {
43830
+ code = '0' + code;
43831
+ }
43832
+ return '%' + code;
43833
+ })
43834
+ );
43835
+ }
43836
+ function base64UrlDecode(str) {
43837
+ let output = str.replace(/-/g, '+').replace(/_/g, '/');
43838
+ switch (output.length % 4) {
43839
+ case 0:
43840
+ break;
43841
+ case 2:
43842
+ output += '==';
43843
+ break;
43844
+ case 3:
43845
+ output += '=';
43846
+ break;
43847
+ default:
43848
+ throw new Error('base64 string is not of the correct length');
43849
+ }
43850
+ try {
43851
+ return b64DecodeUnicode(output);
43852
+ } catch (err) {
43853
+ return atob(output);
43854
+ }
43855
+ }
43856
+ function jwtDecode(token, options) {
43857
+ if (typeof token !== 'string') {
43858
+ throw new InvalidTokenError('Invalid token specified: must be a string');
43859
+ }
43860
+ options || (options = {});
43861
+ const pos = options.header === true ? 0 : 1;
43862
+ const part = token.split('.')[pos];
43863
+ if (typeof part !== 'string') {
43864
+ throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
43865
+ }
43866
+ let decoded;
43867
+ try {
43868
+ decoded = base64UrlDecode(part);
43869
+ } catch (e) {
43870
+ throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
43871
+ }
43872
+ try {
43873
+ return JSON.parse(decoded);
43874
+ } catch (e) {
43875
+ throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
43876
+ }
43877
+ }
43878
+
43879
+ var loginMember = function (username, password, tideClientConfig, portalId) {
43880
+ return __awaiter(void 0, void 0, void 0, function () {
43881
+ var memberLogingRequest, memberInfo;
43882
+ return __generator(this, function (_a) {
43883
+ switch (_a.label) {
43884
+ case 0:
43885
+ if (!tideClientConfig.host || !tideClientConfig.apiKey) {
43886
+ return [2 /*return*/, Promise.reject()];
43887
+ }
43888
+ memberLogingRequest = {
43889
+ username: username,
43890
+ password: password,
43891
+ portalId: portalId
43892
+ };
43893
+ return [4 /*yield*/, build.login(tideClientConfig, memberLogingRequest, undefined)];
43894
+ case 1:
43895
+ memberInfo = _a.sent();
43896
+ return [2 /*return*/, memberInfo];
43897
+ }
43898
+ });
43899
+ });
43900
+ };
43901
+ var confirmMember = function (token, password, hasAgreed, tideClientConfig) {
43902
+ return __awaiter(void 0, void 0, void 0, function () {
43903
+ var memberConfirmationRequest, response;
43904
+ return __generator(this, function (_a) {
43905
+ switch (_a.label) {
43906
+ case 0:
43907
+ if (!tideClientConfig.host || !tideClientConfig.apiKey) {
43908
+ return [2 /*return*/, Promise.reject()];
43909
+ }
43910
+ memberConfirmationRequest = {
43911
+ token: token,
43912
+ password: password,
43913
+ hasAgreed: hasAgreed
43914
+ };
43915
+ return [4 /*yield*/, build.confirm(tideClientConfig, memberConfirmationRequest, undefined)];
43916
+ case 1:
43917
+ response = _a.sent();
43918
+ return [2 /*return*/, response];
43919
+ }
43920
+ });
43921
+ });
43922
+ };
43923
+ var passwordForgotten = function (username, tideClientConfig, portalId) {
43924
+ return __awaiter(void 0, void 0, void 0, function () {
43925
+ var memberForgotPasswordRequest, response;
43926
+ return __generator(this, function (_a) {
43927
+ switch (_a.label) {
43928
+ case 0:
43929
+ if (!tideClientConfig.host || !tideClientConfig.apiKey) {
43930
+ return [2 /*return*/, Promise.reject()];
43931
+ }
43932
+ memberForgotPasswordRequest = {
43933
+ username: username,
43934
+ portalId: portalId
43935
+ };
43936
+ return [4 /*yield*/, build.forgotPassword(tideClientConfig, memberForgotPasswordRequest, undefined)];
43937
+ case 1:
43938
+ response = _a.sent();
43939
+ return [2 /*return*/, response.ok];
43940
+ }
43941
+ });
43942
+ });
43943
+ };
43944
+ var newPassword = function (token, password, tideClientConfig) {
43945
+ return __awaiter(void 0, void 0, void 0, function () {
43946
+ var memberResetPasswordRequest, response;
43947
+ return __generator(this, function (_a) {
43948
+ switch (_a.label) {
43949
+ case 0:
43950
+ if (!tideClientConfig.host || !tideClientConfig.apiKey) {
43951
+ return [2 /*return*/, Promise.reject()];
43952
+ }
43953
+ memberResetPasswordRequest = {
43954
+ token: token,
43955
+ password: password
43956
+ };
43957
+ return [4 /*yield*/, build.resetPassword(tideClientConfig, memberResetPasswordRequest, undefined)];
43958
+ case 1:
43959
+ response = _a.sent();
43960
+ return [2 /*return*/, response.ok];
43961
+ }
43962
+ });
43963
+ });
43964
+ };
43965
+ var decodeTokenToMemberInfo = function (token) {
43966
+ if (!token) {
43967
+ return undefined;
43968
+ }
43969
+ var decodedToken = jwtDecode(token);
43970
+ var member = undefined;
43971
+ // check if token is not expired
43972
+ if ((decodedToken === null || decodedToken === void 0 ? void 0 : decodedToken.exp) && decodedToken.exp * 1000 < new Date().getTime()) {
43973
+ return undefined;
43974
+ }
43975
+ if (decodedToken) {
43976
+ member = {
43977
+ id: decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid']
43978
+ ? parseInt(decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid'])
43979
+ : 0,
43980
+ companyId: decodedToken.company ? parseInt(decodedToken.company) : 0,
43981
+ companyName: decodedToken.companyName,
43982
+ name: decodedToken.unique_name,
43983
+ email: decodedToken.email || decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'],
43984
+ language: decodedToken.language,
43985
+ agentId: decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid']
43986
+ ? parseInt(decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid'])
43987
+ : 0,
43988
+ addressId: decodedToken.addressId ? parseInt(decodedToken.addressId) : undefined,
43989
+ addressName: decodedToken.addressName,
43990
+ addressLogo: decodedToken.addressLogo
43991
+ };
43992
+ }
43993
+ return member;
43994
+ };
43995
+
43996
+ var LoginComponent = function (_a) {
43997
+ var tideClientConfig = _a.tideClientConfig,
43998
+ portalId = _a.portalId,
43999
+ languageCode = _a.languageCode,
44000
+ member = _a.member,
44001
+ setMember = _a.setMember,
44002
+ handleBackToHome = _a.handleBackToHome;
44003
+ var _b = React.useState(false),
44004
+ isLoggedIn = _b[0],
44005
+ setIsLoggedIn = _b[1];
44006
+ var _c = React.useState(false),
44007
+ showPassword = _c[0];
44008
+ _c[1];
44009
+ var _d = React.useState(false),
44010
+ isForgotPassword = _d[0],
44011
+ setIsForgotPassword = _d[1];
44012
+ var _e = React.useState(false),
44013
+ newPasswordRequested = _e[0],
44014
+ setNewPasswordRequested = _e[1];
44015
+ var _f = React.useState(false),
44016
+ apiError = _f[0],
44017
+ setApiError = _f[1];
44018
+ var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
44019
+ var formik$1 = formik.useFormik({
44020
+ initialValues: {
44021
+ username: '',
44022
+ password: ''
44023
+ },
44024
+ validationSchema: create$3({
44025
+ username: create$6().email(translations.LOGIN.EMAIL_INVALID).required(translations.LOGIN.EMAIL_REQUIRED),
44026
+ password: create$6().required(translations.LOGIN.PASSWORD_REQUIRED)
44027
+ }),
44028
+ onSubmit: function (values) {
44029
+ return __awaiter(void 0, void 0, void 0, function () {
44030
+ var response, member_1;
44031
+ return __generator(this, function (_a) {
44032
+ switch (_a.label) {
44033
+ case 0:
44034
+ _a.trys.push([0, 2, , 3]);
44035
+ return [4 /*yield*/, loginMember(values.username, values.password, tideClientConfig, portalId)];
44036
+ case 1:
44037
+ response = _a.sent();
44038
+ member_1 = decodeTokenToMemberInfo(response.token);
44039
+ if (member_1 && member_1.id !== 0) {
44040
+ setMember(member_1);
44041
+ localStorage.setItem('token', response.token);
44042
+ setIsLoggedIn(true);
44043
+ }
44044
+ return [3 /*break*/, 3];
44045
+ case 2:
44046
+ _a.sent();
44047
+ setApiError(true);
44048
+ return [3 /*break*/, 3];
44049
+ case 3:
44050
+ return [2 /*return*/];
44051
+ }
44052
+ });
44053
+ });
44054
+ }
44055
+ });
44056
+ var handleForgotPasswordClick = function () {
44057
+ return __awaiter(void 0, void 0, void 0, function () {
44058
+ var errors;
44059
+ return __generator(this, function (_a) {
44060
+ switch (_a.label) {
44061
+ case 0:
44062
+ formik$1.setTouched({ username: true }, true);
44063
+ return [4 /*yield*/, formik$1.validateForm()];
44064
+ case 1:
44065
+ errors = _a.sent();
44066
+ if (!errors.username) {
44067
+ handleForgotPassword();
44068
+ }
44069
+ return [2 /*return*/];
44070
+ }
44071
+ });
44072
+ });
44073
+ };
44074
+ var handleForgotPassword = function () {
44075
+ return __awaiter(void 0, void 0, void 0, function () {
44076
+ var response;
44077
+ return __generator(this, function (_a) {
44078
+ switch (_a.label) {
44079
+ case 0:
44080
+ _a.trys.push([0, 2, , 3]);
44081
+ return [4 /*yield*/, passwordForgotten(formik$1.values.username, tideClientConfig, portalId)];
44082
+ case 1:
44083
+ response = _a.sent();
44084
+ if (response) {
44085
+ setNewPasswordRequested(true);
44086
+ }
44087
+ return [3 /*break*/, 3];
44088
+ case 2:
44089
+ _a.sent();
44090
+ setApiError(true);
44091
+ return [3 /*break*/, 3];
44092
+ case 3:
44093
+ return [2 /*return*/];
44094
+ }
44095
+ });
44096
+ });
44097
+ };
44098
+ return React__default['default'].createElement(
44099
+ React__default['default'].Fragment,
44100
+ null,
44101
+ !isLoggedIn &&
44102
+ !isForgotPassword &&
44103
+ React__default['default'].createElement(
44104
+ React__default['default'].Fragment,
44105
+ null,
44106
+ React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.LOGIN_INTO),
44107
+ React__default['default'].createElement(
44108
+ 'form',
44109
+ { className: 'login__form', onSubmit: formik$1.handleSubmit, noValidate: true },
44110
+ React__default['default'].createElement(
44111
+ 'div',
44112
+ { className: 'login__form__group' },
44113
+ React__default['default'].createElement('label', { htmlFor: 'email' }, translations.LOGIN.EMAIL),
44114
+ React__default['default'].createElement(
44115
+ 'input',
44116
+ __assign({ type: 'text', id: 'username', placeholder: translations.LOGIN.ENTER_YOUR_EMAIL }, formik$1.getFieldProps('username'))
44117
+ ),
44118
+ formik$1.touched.username &&
44119
+ formik$1.errors.username &&
44120
+ React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, formik$1.errors.username)
44121
+ ),
44122
+ React__default['default'].createElement(
44123
+ 'div',
44124
+ { className: 'login__form__group' },
44125
+ React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.PASSWORD),
44126
+ React__default['default'].createElement(
44127
+ 'input',
44128
+ __assign(
44129
+ { type: showPassword ? 'text' : 'password', id: 'password', placeholder: translations.LOGIN.ENTER_YOUR_PASSWORD },
44130
+ formik$1.getFieldProps('password'),
44131
+ { required: true }
44132
+ )
44133
+ ),
44134
+ (formik$1.touched.password || formik$1.submitCount > 0) &&
44135
+ formik$1.errors.password &&
44136
+ React__default['default'].createElement(
44137
+ 'div',
44138
+ { id: 'password-error', className: 'login__error' },
44139
+ formik$1.values.password === '' ? translations.LOGIN.PASSWORD_REQUIRED : formik$1.errors.password
44140
+ )
44141
+ ),
44142
+ !formik$1.errors.password &&
44143
+ apiError &&
44144
+ React__default['default'].createElement('div', { className: 'login__error' }, translations.LOGIN.INVALID_CREDENTIALS),
44145
+ React__default['default'].createElement('button', { type: 'submit', className: 'cta cta--primary' }, translations.LOGIN.LOGIN),
44146
+ React__default['default'].createElement(
44147
+ 'button',
44148
+ {
44149
+ type: 'button',
44150
+ className: 'login__forgot',
44151
+ onClick: function () {
44152
+ formik$1.setFieldValue('password', '');
44153
+ formik$1.setFieldTouched('password', false, false);
44154
+ formik$1.setFieldError('password', undefined);
44155
+ setApiError(false);
44156
+ setIsForgotPassword(true);
44157
+ }
44158
+ },
44159
+ translations.LOGIN.FORGOT_PASSWORD
44160
+ )
44161
+ )
44162
+ ),
44163
+ isLoggedIn &&
44164
+ member &&
44165
+ !isForgotPassword &&
44166
+ React__default['default'].createElement(
44167
+ 'div',
44168
+ { className: 'login__welcome' },
44169
+ React__default['default'].createElement(
44170
+ 'h3',
44171
+ { className: 'login__card__title' },
44172
+ translations.LOGIN.WELCOME_X,
44173
+ member === null || member === void 0 ? void 0 : member.name
44174
+ ),
44175
+ React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToHome }, translations.LOGIN.BACK_TO_HOMEPAGE)
44176
+ ),
44177
+ isForgotPassword &&
44178
+ !newPasswordRequested &&
44179
+ React__default['default'].createElement(
44180
+ React__default['default'].Fragment,
44181
+ null,
44182
+ React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.FORGOT_PASSWORD),
44183
+ React__default['default'].createElement(
44184
+ 'form',
44185
+ { className: 'login__form', noValidate: true },
44186
+ React__default['default'].createElement(
44187
+ 'div',
44188
+ { className: 'login__form__group' },
44189
+ React__default['default'].createElement('label', { htmlFor: 'email' }, translations.LOGIN.EMAIL),
44190
+ React__default['default'].createElement(
44191
+ 'input',
44192
+ __assign({ type: 'text', id: 'username', placeholder: translations.LOGIN.ENTER_YOUR_EMAIL }, formik$1.getFieldProps('username'), {
44193
+ required: true
44194
+ })
44195
+ ),
44196
+ (((formik$1.submitCount > 0 || formik$1.touched.username) && formik$1.errors.username) || apiError) &&
44197
+ React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, translations.LOGIN.EMAIL_REQUIRED)
44198
+ ),
44199
+ React__default['default'].createElement(
44200
+ 'button',
44201
+ { className: 'cta cta--primary', onClick: handleForgotPasswordClick },
44202
+ translations.LOGIN.FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL
44203
+ )
44204
+ )
44205
+ ),
44206
+ newPasswordRequested && React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_REQUESTED)
44207
+ );
44208
+ };
44209
+
44210
+ var ResetPasswordComponent = function (_a) {
44211
+ var tideClientConfig = _a.tideClientConfig,
44212
+ languageCode = _a.languageCode,
44213
+ handleBackToLogin = _a.handleBackToLogin;
44214
+ var _b = React.useState(false),
44215
+ passwordSet = _b[0],
44216
+ setPasswordSet = _b[1];
44217
+ var _c = React.useState({
44218
+ password: false,
44219
+ repeatPassword: false
44220
+ }),
44221
+ touched = _c[0],
44222
+ setTouched = _c[1];
44223
+ var _d = React.useState({
44224
+ password: '',
44225
+ repeatPassword: ''
44226
+ }),
44227
+ formValues = _d[0],
44228
+ setFormValues = _d[1];
44229
+ var _e = React.useState(false),
44230
+ submitted = _e[0],
44231
+ setSubmitted = _e[1];
44232
+ var _f = React.useState({}),
44233
+ errors = _f[0],
44234
+ setErrors = _f[1];
44235
+ var _g = React.useState(null),
44236
+ token = _g[0],
44237
+ setToken = _g[1];
44238
+ var _h = React.useState(false),
44239
+ invalidToken = _h[0],
44240
+ setInvalidToken = _h[1];
44241
+ var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
44242
+ React.useEffect(function () {
44243
+ if (typeof window !== 'undefined') {
44244
+ var rawToken = new URLSearchParams(window.location.search).get('token');
44245
+ setToken(rawToken);
44246
+ if (rawToken) {
44247
+ try {
44248
+ var decoded = jwtDecode(rawToken);
44249
+ if (!decoded.exp || decoded.exp * 1000 < Date.now()) {
44250
+ setInvalidToken(true);
44251
+ }
44252
+ } catch (e) {
44253
+ setInvalidToken(true);
44254
+ }
44255
+ } else {
44256
+ setInvalidToken(true);
44257
+ }
44258
+ }
44259
+ }, []);
44260
+ var handleBlur = function (event) {
44261
+ setTouched(function (prev) {
44262
+ var _a;
44263
+ return __assign(__assign({}, prev), ((_a = {}), (_a[event.target.name] = true), _a));
44264
+ });
44265
+ validate();
44266
+ };
44267
+ var onChange = function (event) {
44268
+ var _a;
44269
+ setFormValues(__assign(__assign({}, formValues), ((_a = {}), (_a[event.target.name] = event.target.value), _a)));
44270
+ validate();
44271
+ };
44272
+ var validate = function () {
44273
+ var validationErrors = {};
44274
+ var password = formValues.password,
44275
+ repeatPassword = formValues.repeatPassword;
44276
+ // Validate password
44277
+ if (!password) {
44278
+ validationErrors.password = 'required';
44279
+ } else if (touched.password || submitted) {
44280
+ var hasNumber = /\d/.test(password);
44281
+ var hasCapital = /[A-Z]/.test(password);
44282
+ if (!hasNumber || !hasCapital) {
44283
+ validationErrors.passwordComplexity = 'invalid';
44284
+ }
44285
+ }
44286
+ // Validate repeat password
44287
+ if (!repeatPassword) {
44288
+ validationErrors.repeatPassword = 'required';
44289
+ } else if ((touched.repeatPassword || submitted) && password && repeatPassword !== password) {
44290
+ validationErrors.matchPassword = 'mismatch';
44291
+ }
44292
+ setErrors(validationErrors);
44293
+ return Object.keys(validationErrors).length === 0;
44294
+ };
44295
+ var handleResetPassword = function () {
44296
+ return __awaiter(void 0, void 0, void 0, function () {
44297
+ var isValid, response;
44298
+ return __generator(this, function (_b) {
44299
+ switch (_b.label) {
44300
+ case 0:
44301
+ setSubmitted(true);
44302
+ setTouched({ password: true, repeatPassword: true });
44303
+ isValid = validate();
44304
+ if (!isValid) return [2 /*return*/];
44305
+ if (!token) return [3 /*break*/, 4];
44306
+ _b.label = 1;
44307
+ case 1:
44308
+ _b.trys.push([1, 3, , 4]);
44309
+ return [4 /*yield*/, newPassword(token, formValues.password, tideClientConfig)];
44310
+ case 2:
44311
+ response = _b.sent();
44312
+ if (response) {
44313
+ setPasswordSet(true);
44314
+ }
44315
+ return [3 /*break*/, 4];
44316
+ case 3:
44317
+ _b.sent();
44318
+ setErrors(function (prevErrors) {
44319
+ return __assign(__assign({}, prevErrors), { api: true });
44320
+ });
44321
+ setInvalidToken(true);
44322
+ return [3 /*break*/, 4];
44323
+ case 4:
44324
+ return [2 /*return*/];
44325
+ }
44326
+ });
44327
+ });
44328
+ };
44329
+ React.useEffect(
44330
+ function () {
44331
+ validate();
44332
+ },
44333
+ [formValues, token]
44334
+ );
44335
+ return React__default['default'].createElement(
44336
+ React__default['default'].Fragment,
44337
+ null,
44338
+ !passwordSet &&
44339
+ !invalidToken &&
44340
+ React__default['default'].createElement(
44341
+ React__default['default'].Fragment,
44342
+ null,
44343
+ React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
44344
+ React__default['default'].createElement(
44345
+ 'form',
44346
+ {
44347
+ className: 'login__form',
44348
+ onSubmit: function (e) {
44349
+ return e.preventDefault();
44350
+ },
44351
+ noValidate: true
44352
+ },
44353
+ React__default['default'].createElement(
44354
+ 'div',
44355
+ { className: 'login__form__group' },
44356
+ React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.RESET_PASSWORD_LABEL),
44357
+ React__default['default'].createElement('input', {
44358
+ type: 'password',
44359
+ id: 'password',
44360
+ name: 'password',
44361
+ value: formValues.password,
44362
+ onChange: onChange,
44363
+ onBlur: handleBlur,
44364
+ required: true
44365
+ }),
44366
+ (touched.password || submitted) &&
44367
+ (errors.password || errors.passwordComplexity) &&
44368
+ React__default['default'].createElement(
44369
+ 'div',
44370
+ { id: 'username-error', className: 'login__error' },
44371
+ errors.password === 'required' && translations.LOGIN.PASSWORD_REQUIRED,
44372
+ errors.passwordComplexity === 'invalid' && translations.LOGIN.PASSWORD_COMPLEXITY
44373
+ )
44374
+ ),
44375
+ React__default['default'].createElement(
44376
+ 'div',
44377
+ { className: 'login__form__group' },
44378
+ React__default['default'].createElement('label', { htmlFor: 'repeatPassword' }, translations.LOGIN.RESET_REPEAT_PASSWORD_LABEL),
44379
+ React__default['default'].createElement('input', {
44380
+ type: 'password',
44381
+ id: 'repeatPassword',
44382
+ name: 'repeatPassword',
44383
+ value: formValues.repeatPassword,
44384
+ onChange: onChange,
44385
+ onBlur: handleBlur,
44386
+ required: true
44387
+ }),
44388
+ (touched.repeatPassword || submitted) &&
44389
+ (errors.repeatPassword || errors.matchPassword) &&
44390
+ React__default['default'].createElement(
44391
+ 'div',
44392
+ { id: 'username-error', className: 'login__error' },
44393
+ errors.repeatPassword === 'required' && translations.LOGIN.REPEAT_PASSWORD_REQUIRED,
44394
+ errors.matchPassword === 'mismatch' && translations.LOGIN.PASSWORDS_DO_NOT_MATCH
44395
+ )
44396
+ ),
44397
+ React__default['default'].createElement(
44398
+ 'button',
44399
+ { type: 'button', className: 'cta cta--primary', onClick: handleResetPassword },
44400
+ translations.LOGIN.RESET_PASSWORD_SUBMIT_LABEL
44401
+ )
44402
+ )
44403
+ ),
44404
+ passwordSet &&
44405
+ React__default['default'].createElement(
44406
+ 'div',
44407
+ { className: 'login__welcome' },
44408
+ React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
44409
+ React__default['default'].createElement('p', null, translations.LOGIN.RESET_PASSWORD_SUCCESSFUL_MESSAGE),
44410
+ React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
44411
+ ),
44412
+ invalidToken &&
44413
+ React__default['default'].createElement(
44414
+ 'div',
44415
+ { className: 'login__welcome' },
44416
+ React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_INVALID_TOKEN_TITLE),
44417
+ React__default['default'].createElement('p', null, translations.LOGIN.RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION),
44418
+ React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
44419
+ )
44420
+ );
44421
+ };
44422
+
44423
+ var ConfirmComponent = function (_a) {
44424
+ var tideClientConfig = _a.tideClientConfig,
44425
+ languageCode = _a.languageCode,
44426
+ handleBackToLogin = _a.handleBackToLogin;
44427
+ var _b = React.useState(false),
44428
+ isConfirmed = _b[0],
44429
+ setIsConfirmed = _b[1];
44430
+ var _c = React.useState(),
44431
+ touched = _c[0],
44432
+ setTouched = _c[1];
44433
+ var _d = React.useState({
44434
+ password: '',
44435
+ repeatPassword: ''
44436
+ }),
44437
+ formValues = _d[0],
44438
+ setFormValues = _d[1];
44439
+ var _e = React.useState({}),
44440
+ errors = _e[0],
44441
+ setErrors = _e[1];
44442
+ var _f = React.useState(null),
44443
+ token = _f[0],
44444
+ setToken = _f[1];
44445
+ var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
44446
+ React.useEffect(function () {
44447
+ if (typeof window !== 'undefined') {
44448
+ setToken(new URLSearchParams(window.location.search).get('token'));
44449
+ }
44450
+ }, []);
44451
+ var handleBlur = function (event) {
44452
+ var _a;
44453
+ if (!touched) {
44454
+ setTouched({ password: false, repeatPassword: false });
44455
+ }
44456
+ setTouched(__assign(__assign({}, touched), ((_a = {}), (_a[event.target.name] = true), _a)));
44457
+ validate();
44458
+ };
44459
+ var onChange = function (event) {
44460
+ var _a;
44461
+ setFormValues(__assign(__assign({}, formValues), ((_a = {}), (_a[event.target.name] = event.target.value), _a)));
44462
+ validate();
44463
+ };
44464
+ var validate = function () {
44465
+ var validationErrors = {};
44466
+ if (formValues) {
44467
+ if (!formValues.password || formValues.password.length === 0) {
44468
+ validationErrors.password = true;
44469
+ }
44470
+ if (!formValues.repeatPassword || formValues.repeatPassword.length === 0) {
44471
+ validationErrors.repeatPassword = true;
44472
+ } else if (formValues.password !== formValues.repeatPassword) {
44473
+ validationErrors.passwordMatch = true;
44474
+ }
44475
+ if (!token || token.length === 0) {
44476
+ validationErrors.token = true;
44477
+ }
44478
+ }
44479
+ setErrors(validationErrors);
44480
+ return Object.keys(validationErrors).length === 0;
44481
+ };
44482
+ var handleConfirmation = function () {
44483
+ return __awaiter(void 0, void 0, void 0, function () {
44484
+ var isValid, response;
44485
+ return __generator(this, function (_b) {
44486
+ switch (_b.label) {
44487
+ case 0:
44488
+ setTouched({ password: true, repeatPassword: true });
44489
+ isValid = validate();
44490
+ if (!isValid) return [2 /*return*/];
44491
+ if (!token) return [3 /*break*/, 4];
44492
+ _b.label = 1;
44493
+ case 1:
44494
+ _b.trys.push([1, 3, , 4]);
44495
+ return [4 /*yield*/, confirmMember(token, formValues.password, true, tideClientConfig)];
44496
+ case 2:
44497
+ response = _b.sent();
44498
+ if (response.ok) {
44499
+ setIsConfirmed(true);
44500
+ }
44501
+ return [3 /*break*/, 4];
44502
+ case 3:
44503
+ _b.sent();
44504
+ return [3 /*break*/, 4];
44505
+ case 4:
44506
+ return [2 /*return*/];
44507
+ }
44508
+ });
44509
+ });
44510
+ };
44511
+ React.useEffect(
44512
+ function () {
44513
+ validate();
44514
+ },
44515
+ [formValues, token]
44516
+ );
44517
+ return React__default['default'].createElement(
44518
+ React__default['default'].Fragment,
44519
+ null,
44520
+ !isConfirmed &&
44521
+ React__default['default'].createElement(
44522
+ React__default['default'].Fragment,
44523
+ null,
44524
+ React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
44525
+ React__default['default'].createElement(
44526
+ 'form',
44527
+ {
44528
+ className: 'login__form',
44529
+ onSubmit: function (e) {
44530
+ return e.preventDefault();
44531
+ },
44532
+ noValidate: true
44533
+ },
44534
+ React__default['default'].createElement(
44535
+ 'div',
44536
+ { className: 'login__form__group' },
44537
+ React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.RESET_PASSWORD_LABEL),
44538
+ React__default['default'].createElement('input', {
44539
+ type: 'password',
44540
+ id: 'password',
44541
+ name: 'password',
44542
+ value: formValues.password,
44543
+ onChange: onChange,
44544
+ onBlur: handleBlur,
44545
+ required: true
44546
+ }),
44547
+ ((touched === null || touched === void 0 ? void 0 : touched.password) ||
44548
+ (touched === null || touched === void 0 ? void 0 : touched.repeatPassword)) &&
44549
+ errors.password &&
44550
+ React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, translations.LOGIN.PASSWORD_REQUIRED)
44551
+ ),
44552
+ React__default['default'].createElement(
44553
+ 'div',
44554
+ { className: 'login__form__group' },
44555
+ React__default['default'].createElement('label', { htmlFor: 'repeatPassword' }, translations.LOGIN.RESET_REPEAT_PASSWORD_LABEL),
44556
+ React__default['default'].createElement('input', {
44557
+ type: 'password',
44558
+ id: 'repeatPassword',
44559
+ name: 'repeatPassword',
44560
+ value: formValues.repeatPassword,
44561
+ onChange: onChange,
44562
+ onBlur: handleBlur,
44563
+ required: true
44564
+ }),
44565
+ ((touched === null || touched === void 0 ? void 0 : touched.repeatPassword) ||
44566
+ (touched === null || touched === void 0 ? void 0 : touched.password)) &&
44567
+ (errors.repeatPassword || errors.passwordMatch) &&
44568
+ React__default['default'].createElement(
44569
+ 'div',
44570
+ { id: 'username-error', className: 'login__error' },
44571
+ errors.repeatPassword === 'required' && translations.LOGIN.REPEAT_PASSWORD_REQUIRED,
44572
+ errors.passwordMatch === 'mismatch' && translations.LOGIN.PASSWORDS_DO_NOT_MATCH
44573
+ )
44574
+ ),
44575
+ React__default['default'].createElement(
44576
+ 'button',
44577
+ { type: 'button', className: 'cta cta--primary', onClick: handleConfirmation },
44578
+ translations.LOGIN.RESET_PASSWORD_SUBMIT_LABEL
44579
+ )
44580
+ )
44581
+ ),
44582
+ isConfirmed &&
44583
+ React__default['default'].createElement(
44584
+ 'div',
44585
+ { className: 'login__welcome' },
44586
+ React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RECEIVED_REQUEST),
44587
+ React__default['default'].createElement('p', null, translations.LOGIN.ACCOUNT_ACTIVATED_LOGIN),
44588
+ React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
44589
+ )
44590
+ );
44591
+ };
44592
+
44593
+ var Login = function (_a) {
44594
+ var tideClientConfig = _a.tideClientConfig,
44595
+ portalId = _a.portalId,
44596
+ languageCode = _a.languageCode,
44597
+ imageSrc = _a.imageSrc,
44598
+ logo = _a.logo,
44599
+ isMemberConfirmation = _a.isMemberConfirmation,
44600
+ isLoginPage = _a.isLoginPage,
44601
+ isResetPassword = _a.isResetPassword,
44602
+ member = _a.member,
44603
+ setMember = _a.setMember,
44604
+ handleBackToHome = _a.handleBackToHome,
44605
+ handleBackToLogin = _a.handleBackToLogin;
44606
+ return React__default['default'].createElement(
44607
+ 'div',
44608
+ { className: 'login' },
44609
+ React__default['default'].createElement(
44610
+ 'div',
44611
+ { className: 'login__img__wrapper' },
44612
+ React__default['default'].createElement('img', {
44613
+ className: 'login__img',
44614
+ src: imageSrc ? imageSrc : 'https://cdn.pixabay.com/photo/2022/04/08/06/36/rock-7118843_1280.jpg',
44615
+ alt: 'Login'
44616
+ })
44617
+ ),
44618
+ React__default['default'].createElement(
44619
+ 'div',
44620
+ { className: 'login__container' },
44621
+ React__default['default'].createElement(
44622
+ 'div',
44623
+ { className: 'login__card' },
44624
+ logo && React__default['default'].createElement('div', { className: 'login__logo' }, logo),
44625
+ isLoginPage &&
44626
+ React__default['default'].createElement(LoginComponent, {
44627
+ tideClientConfig: tideClientConfig,
44628
+ portalId: portalId,
44629
+ languageCode: languageCode,
44630
+ member: member,
44631
+ setMember: setMember,
44632
+ handleBackToHome: handleBackToHome,
44633
+ handleBackToLogin: handleBackToLogin
44634
+ }),
44635
+ isResetPassword &&
44636
+ React__default['default'].createElement(ResetPasswordComponent, {
44637
+ tideClientConfig: tideClientConfig,
44638
+ portalId: portalId,
44639
+ languageCode: languageCode,
44640
+ member: member,
44641
+ setMember: setMember,
44642
+ handleBackToHome: handleBackToHome,
44643
+ handleBackToLogin: handleBackToLogin
44644
+ }),
44645
+ isMemberConfirmation &&
44646
+ React__default['default'].createElement(ConfirmComponent, {
44647
+ tideClientConfig: tideClientConfig,
44648
+ portalId: portalId,
44649
+ languageCode: languageCode,
44650
+ member: member,
44651
+ setMember: setMember,
44652
+ handleBackToHome: handleBackToHome,
44653
+ handleBackToLogin: handleBackToLogin
44654
+ })
44655
+ )
44656
+ )
44657
+ );
44658
+ };
44659
+
41130
44660
  var signalR$1 = {};
41131
44661
 
41132
44662
  var jqueryDeferred$1 = { exports: {} };
@@ -45026,6 +48556,7 @@ exports.BookingWizard = BookingWizard;
45026
48556
  exports.Footer = Footer;
45027
48557
  exports.Header = Header;
45028
48558
  exports.ImageCardGrid = ImageCardGrid;
48559
+ exports.Login = Login;
45029
48560
  exports.Navbar = Navbar;
45030
48561
  exports.QSM = QSM;
45031
48562
  exports.SearchResults = SearchResults;