@qite/tide-booking-component 1.4.59 → 1.4.60
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.
- package/build/build-cjs/index.js +4048 -386
- package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-util.d.ts +1 -0
- package/build/build-cjs/src/booking-wizard/types.d.ts +1 -0
- package/build/build-cjs/src/content/login/confirm-component.d.ts +4 -0
- package/build/build-cjs/src/content/login/index.d.ts +4 -0
- package/build/build-cjs/src/content/login/login-component.d.ts +4 -0
- package/build/build-cjs/src/content/login/login-services.d.ts +11 -0
- package/build/build-cjs/src/content/login/reset-password-component.d.ts +4 -0
- package/build/build-cjs/src/content/login/types.d.ts +24 -0
- package/build/build-cjs/src/index.d.ts +3 -1
- package/build/build-cjs/src/shared/utils/localization-util.d.ts +34 -0
- package/build/build-esm/index.js +4034 -389
- package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-util.d.ts +1 -0
- package/build/build-esm/src/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/src/content/login/confirm-component.d.ts +4 -0
- package/build/build-esm/src/content/login/index.d.ts +4 -0
- package/build/build-esm/src/content/login/login-component.d.ts +4 -0
- package/build/build-esm/src/content/login/login-services.d.ts +11 -0
- package/build/build-esm/src/content/login/reset-password-component.d.ts +4 -0
- package/build/build-esm/src/content/login/types.d.ts +24 -0
- package/build/build-esm/src/index.d.ts +3 -1
- package/build/build-esm/src/shared/utils/localization-util.d.ts +34 -0
- package/package.json +1 -1
- package/src/booking-wizard/features/sidebar/sidebar.tsx +0 -3
- package/src/qsm/components/QSMContainer/qsm-container.tsx +1 -1
- package/src/shared/components/flyin.tsx +8 -2
package/build/build-cjs/index.js
CHANGED
|
@@ -347,6 +347,8 @@ var SIDEBAR$f = {
|
|
|
347
347
|
TRAVELERS_ADULT: 'بالغ',
|
|
348
348
|
TRAVELERS_CHILDREN: 'أطفال',
|
|
349
349
|
TRAVELERS_CHILD: 'طفل',
|
|
350
|
+
TRAVELERS_INFANTS: 'رضع',
|
|
351
|
+
TRAVELERS_INFANT: 'رضيع',
|
|
350
352
|
DEPARTURE: 'رحلة الذهاب',
|
|
351
353
|
DEPARTURE_SINGLE: 'التاريخ',
|
|
352
354
|
ARRIVAL: 'رحلة العودة',
|
|
@@ -500,6 +502,38 @@ var PRINT_OFFER_BUTTON$f = {
|
|
|
500
502
|
var NAVBAR$f = {
|
|
501
503
|
SEARCH: 'بحث'
|
|
502
504
|
};
|
|
505
|
+
var LOGIN$f = {
|
|
506
|
+
LOGIN_INTO: 'تسجيل الدخول إلى حسابك',
|
|
507
|
+
EMAIL: 'البريد الإلكتروني',
|
|
508
|
+
ENTER_YOUR_EMAIL: 'أدخل بريدك الإلكتروني',
|
|
509
|
+
EMAIL_REQUIRED: 'البريد الإلكتروني مطلوب.',
|
|
510
|
+
EMAIL_INVALID: 'البريد الإلكتروني غير صالح.',
|
|
511
|
+
ENTER_VALID_EMAIL: 'أدخل بريدًا إلكترونيًا صالحًا.',
|
|
512
|
+
PASSWORD: 'كلمة المرور',
|
|
513
|
+
ENTER_YOUR_PASSWORD: 'أدخل كلمة المرور',
|
|
514
|
+
RESET_PASSWORD_LABEL: 'كلمة المرور الجديدة',
|
|
515
|
+
RESET_REPEAT_PASSWORD_LABEL: 'تكرار كلمة المرور',
|
|
516
|
+
PASSWORD_REQUIRED: 'كلمة المرور مطلوبة.',
|
|
517
|
+
INVALID_CREDENTIALS: 'البريد الإلكتروني أو كلمة المرور غير صحيحة.',
|
|
518
|
+
LOGIN: 'تسجيل الدخول',
|
|
519
|
+
FORGOT_PASSWORD: 'هل نسيت كلمة المرور؟',
|
|
520
|
+
LOGGING_IN: 'جاري تسجيل الدخول...',
|
|
521
|
+
WELCOME_X: 'مرحبًا، ',
|
|
522
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'إعادة تعيين كلمة المرور',
|
|
523
|
+
RESET_REQUESTED: 'تم طلب إعادة تعيين كلمة المرور',
|
|
524
|
+
BACK_TO_HOMEPAGE: 'العودة إلى الصفحة الرئيسية',
|
|
525
|
+
BACK_TO_LOGIN: 'العودة إلى تسجيل الدخول',
|
|
526
|
+
RESET_PASSWORD_TITLE: 'إعادة تعيين كلمة المرور',
|
|
527
|
+
PASSWORD_COMPLEXITY: 'يجب أن تحتوي كلمة المرور على رقم واحد على الأقل وحرف كبير واحد',
|
|
528
|
+
REPEAT_PASSWORD_REQUIRED: 'يرجى تكرار كلمة المرور.',
|
|
529
|
+
PASSWORDS_DO_NOT_MATCH: 'كلمتا المرور غير متطابقتين.',
|
|
530
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'تعديل كلمة المرور',
|
|
531
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'تم تغيير كلمة المرور الخاصة بك. يمكنك الآن تسجيل الدخول باستخدام كلمة المرور الجديدة.',
|
|
532
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'هذا الرابط منتهي الصلاحية أو غير صالح.',
|
|
533
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'يمكنك طلب كلمة مرور جديدة بالنقر على الزر أدناه.',
|
|
534
|
+
RECEIVED_REQUEST: 'تم استلام طلبك بنجاح',
|
|
535
|
+
ACCOUNT_ACTIVATED_LOGIN: 'تم تفعيل حسابك الآن. انقر أدناه لتسجيل الدخول ببياناتك.'
|
|
536
|
+
};
|
|
503
537
|
var QSM$g = {
|
|
504
538
|
DEPARTURE: 'المغادرة',
|
|
505
539
|
CHOOSE_DEPARTURE: 'اختر المغادرة',
|
|
@@ -602,6 +636,7 @@ var arJson = {
|
|
|
602
636
|
ERROR: ERROR$f,
|
|
603
637
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$f,
|
|
604
638
|
NAVBAR: NAVBAR$f,
|
|
639
|
+
LOGIN: LOGIN$f,
|
|
605
640
|
QSM: QSM$g,
|
|
606
641
|
SRP: SRP$f
|
|
607
642
|
};
|
|
@@ -709,6 +744,8 @@ var SIDEBAR$e = {
|
|
|
709
744
|
TRAVELERS_ADULT: 'voksen',
|
|
710
745
|
TRAVELERS_CHILDREN: 'børn',
|
|
711
746
|
TRAVELERS_CHILD: 'barn',
|
|
747
|
+
TRAVELERS_INFANTS: 'babyer',
|
|
748
|
+
TRAVELERS_INFANT: 'baby',
|
|
712
749
|
DEPARTURE: 'Udgående',
|
|
713
750
|
DEPARTURE_SINGLE: 'Dato',
|
|
714
751
|
ARRIVAL: 'Retur',
|
|
@@ -862,6 +899,38 @@ var PRINT_OFFER_BUTTON$e = {
|
|
|
862
899
|
var NAVBAR$e = {
|
|
863
900
|
SEARCH: 'Søg'
|
|
864
901
|
};
|
|
902
|
+
var LOGIN$e = {
|
|
903
|
+
LOGIN_INTO: 'Log ind på din konto',
|
|
904
|
+
EMAIL: 'E-mail',
|
|
905
|
+
ENTER_YOUR_EMAIL: 'Indtast din e-mail',
|
|
906
|
+
EMAIL_REQUIRED: 'E-mail er påkrævet.',
|
|
907
|
+
EMAIL_INVALID: 'E-mailen er ugyldig.',
|
|
908
|
+
ENTER_VALID_EMAIL: 'Indtast en gyldig e-mail.',
|
|
909
|
+
PASSWORD: 'Adgangskode',
|
|
910
|
+
ENTER_YOUR_PASSWORD: 'Indtast din adgangskode',
|
|
911
|
+
RESET_PASSWORD_LABEL: 'Ny adgangskode',
|
|
912
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Gentag adgangskode',
|
|
913
|
+
PASSWORD_REQUIRED: 'Adgangskode er påkrævet.',
|
|
914
|
+
INVALID_CREDENTIALS: 'Ugyldig e-mail eller adgangskode.',
|
|
915
|
+
LOGIN: 'Log ind',
|
|
916
|
+
FORGOT_PASSWORD: 'Glemt adgangskode?',
|
|
917
|
+
LOGGING_IN: 'Logger ind...',
|
|
918
|
+
WELCOME_X: 'Velkommen, ',
|
|
919
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Nulstil adgangskode',
|
|
920
|
+
RESET_REQUESTED: 'Anmodning om nulstilling af adgangskode sendt',
|
|
921
|
+
BACK_TO_HOMEPAGE: 'Tilbage til forsiden',
|
|
922
|
+
BACK_TO_LOGIN: 'Tilbage til login',
|
|
923
|
+
RESET_PASSWORD_TITLE: 'Nulstil adgangskode',
|
|
924
|
+
PASSWORD_COMPLEXITY: 'Adgangskoden skal indeholde mindst 1 tal og 1 stort bogstav',
|
|
925
|
+
REPEAT_PASSWORD_REQUIRED: 'Gentag venligst din adgangskode.',
|
|
926
|
+
PASSWORDS_DO_NOT_MATCH: 'Adgangskoderne stemmer ikke overens.',
|
|
927
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Ændr adgangskode',
|
|
928
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Din adgangskode er blevet ændret. Du kan nu logge ind med din nye adgangskode.',
|
|
929
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Dette link er udløbet eller ugyldigt.',
|
|
930
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan anmode om en ny adgangskode ved at klikke på knappen nedenfor.',
|
|
931
|
+
RECEIVED_REQUEST: 'Din anmodning er modtaget',
|
|
932
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Din konto er nu aktiv. Klik nedenfor for at logge ind med dine oplysninger.'
|
|
933
|
+
};
|
|
865
934
|
var QSM$f = {
|
|
866
935
|
DEPARTURE: 'Afgang',
|
|
867
936
|
CHOOSE_DEPARTURE: 'Vælg afgang',
|
|
@@ -964,6 +1033,7 @@ var daJson = {
|
|
|
964
1033
|
ERROR: ERROR$e,
|
|
965
1034
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$e,
|
|
966
1035
|
NAVBAR: NAVBAR$e,
|
|
1036
|
+
LOGIN: LOGIN$e,
|
|
967
1037
|
QSM: QSM$f,
|
|
968
1038
|
SRP: SRP$e
|
|
969
1039
|
};
|
|
@@ -1071,6 +1141,8 @@ var SIDEBAR$d = {
|
|
|
1071
1141
|
TRAVELERS_ADULT: 'Erwachsener',
|
|
1072
1142
|
TRAVELERS_CHILDREN: 'Kinder',
|
|
1073
1143
|
TRAVELERS_CHILD: 'Kind',
|
|
1144
|
+
TRAVELERS_INFANTS: 'Babys',
|
|
1145
|
+
TRAVELERS_INFANT: 'Baby',
|
|
1074
1146
|
DEPARTURE: 'Hinflug',
|
|
1075
1147
|
DEPARTURE_SINGLE: 'Datum',
|
|
1076
1148
|
ARRIVAL: 'Rückflug',
|
|
@@ -1225,6 +1297,38 @@ var PRINT_OFFER_BUTTON$d = {
|
|
|
1225
1297
|
var NAVBAR$d = {
|
|
1226
1298
|
SEARCH: 'Suche'
|
|
1227
1299
|
};
|
|
1300
|
+
var LOGIN$d = {
|
|
1301
|
+
LOGIN_INTO: 'Melden Sie sich in Ihrem Konto an',
|
|
1302
|
+
EMAIL: 'E-Mail',
|
|
1303
|
+
ENTER_YOUR_EMAIL: 'Geben Sie Ihre E-Mail ein',
|
|
1304
|
+
EMAIL_REQUIRED: 'E-Mail ist erforderlich.',
|
|
1305
|
+
EMAIL_INVALID: 'Die E-Mail ist ungültig.',
|
|
1306
|
+
ENTER_VALID_EMAIL: 'Geben Sie eine gültige E-Mail ein.',
|
|
1307
|
+
PASSWORD: 'Passwort',
|
|
1308
|
+
ENTER_YOUR_PASSWORD: 'Geben Sie Ihr Passwort ein',
|
|
1309
|
+
RESET_PASSWORD_LABEL: 'Neues Passwort',
|
|
1310
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Passwort wiederholen',
|
|
1311
|
+
PASSWORD_REQUIRED: 'Passwort ist erforderlich.',
|
|
1312
|
+
INVALID_CREDENTIALS: 'Ungültige E-Mail oder Passwort.',
|
|
1313
|
+
LOGIN: 'Anmelden',
|
|
1314
|
+
FORGOT_PASSWORD: 'Passwort vergessen?',
|
|
1315
|
+
LOGGING_IN: 'Anmeldung läuft...',
|
|
1316
|
+
WELCOME_X: 'Willkommen, ',
|
|
1317
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Passwort zurücksetzen',
|
|
1318
|
+
RESET_REQUESTED: 'Passwort-Zurücksetzung angefordert',
|
|
1319
|
+
BACK_TO_HOMEPAGE: 'Zurück zur Startseite',
|
|
1320
|
+
BACK_TO_LOGIN: 'Zurück zum Login',
|
|
1321
|
+
RESET_PASSWORD_TITLE: 'Passwort zurücksetzen',
|
|
1322
|
+
PASSWORD_COMPLEXITY: 'Das Passwort muss mindestens 1 Zahl und 1 Großbuchstaben enthalten',
|
|
1323
|
+
REPEAT_PASSWORD_REQUIRED: 'Bitte wiederholen Sie Ihr Passwort.',
|
|
1324
|
+
PASSWORDS_DO_NOT_MATCH: 'Passwörter stimmen nicht überein.',
|
|
1325
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Passwort ändern',
|
|
1326
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Ihr Passwort wurde geändert. Sie können sich nun mit Ihrem neuen Passwort anmelden.',
|
|
1327
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Dieser Link ist abgelaufen oder ungültig.',
|
|
1328
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Sie können ein neues Passwort anfordern, indem Sie auf die Schaltfläche unten klicken.',
|
|
1329
|
+
RECEIVED_REQUEST: 'Ihre Anfrage wurde erfolgreich erhalten',
|
|
1330
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Ihr Konto ist jetzt aktiv. Klicken Sie unten, um sich mit Ihren Daten anzumelden.'
|
|
1331
|
+
};
|
|
1228
1332
|
var QSM$e = {
|
|
1229
1333
|
DEPARTURE: 'Abflug',
|
|
1230
1334
|
CHOOSE_DEPARTURE: 'Abflug wählen',
|
|
@@ -1327,6 +1431,7 @@ var deJson = {
|
|
|
1327
1431
|
ERROR: ERROR$d,
|
|
1328
1432
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$d,
|
|
1329
1433
|
NAVBAR: NAVBAR$d,
|
|
1434
|
+
LOGIN: LOGIN$d,
|
|
1330
1435
|
QSM: QSM$e,
|
|
1331
1436
|
SRP: SRP$d
|
|
1332
1437
|
};
|
|
@@ -1434,6 +1539,8 @@ var SIDEBAR$c = {
|
|
|
1434
1539
|
TRAVELERS_ADULT: 'adult',
|
|
1435
1540
|
TRAVELERS_CHILDREN: 'children',
|
|
1436
1541
|
TRAVELERS_CHILD: 'child',
|
|
1542
|
+
TRAVELERS_INFANTS: 'babies',
|
|
1543
|
+
TRAVELERS_INFANT: 'baby',
|
|
1437
1544
|
DEPARTURE: 'Outbound',
|
|
1438
1545
|
DEPARTURE_SINGLE: 'Date',
|
|
1439
1546
|
ARRIVAL: 'Return',
|
|
@@ -1591,6 +1698,38 @@ var PRINT_OFFER_BUTTON$c = {
|
|
|
1591
1698
|
var NAVBAR$c = {
|
|
1592
1699
|
SEARCH: 'Search'
|
|
1593
1700
|
};
|
|
1701
|
+
var LOGIN$c = {
|
|
1702
|
+
LOGIN_INTO: 'Login to you account',
|
|
1703
|
+
EMAIL: 'Email',
|
|
1704
|
+
ENTER_YOUR_EMAIL: 'Enter your email',
|
|
1705
|
+
EMAIL_REQUIRED: 'Email is required.',
|
|
1706
|
+
EMAIL_INVALID: 'Email is invalid.',
|
|
1707
|
+
ENTER_VALID_EMAIL: 'Enter a valid email.',
|
|
1708
|
+
PASSWORD: 'Password',
|
|
1709
|
+
ENTER_YOUR_PASSWORD: 'Enter your password',
|
|
1710
|
+
RESET_PASSWORD_LABEL: 'New password',
|
|
1711
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Repeat password',
|
|
1712
|
+
PASSWORD_REQUIRED: 'Password is required.',
|
|
1713
|
+
INVALID_CREDENTIALS: 'Invalid email or password.',
|
|
1714
|
+
LOGIN: 'Login',
|
|
1715
|
+
FORGOT_PASSWORD: 'Forgot password?',
|
|
1716
|
+
LOGGING_IN: 'Logging in...',
|
|
1717
|
+
WELCOME_X: 'Welcome, ',
|
|
1718
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Reset password',
|
|
1719
|
+
RESET_REQUESTED: 'Password reset requested',
|
|
1720
|
+
BACK_TO_HOMEPAGE: 'Back to homepage',
|
|
1721
|
+
BACK_TO_LOGIN: 'Back to login',
|
|
1722
|
+
RESET_PASSWORD_TITLE: 'Reset password',
|
|
1723
|
+
PASSWORD_COMPLEXITY: 'Password must contain at least 1 number and 1 capital letter',
|
|
1724
|
+
REPEAT_PASSWORD_REQUIRED: 'Please repeat your password.',
|
|
1725
|
+
PASSWORDS_DO_NOT_MATCH: 'Passwords do not match.',
|
|
1726
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Modify password',
|
|
1727
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Your password has been changed. You can now log in with your new password.',
|
|
1728
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'This link has expired or is invalid.',
|
|
1729
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'You can request a new password by clicking the button below.',
|
|
1730
|
+
RECEIVED_REQUEST: 'Your request has been well received',
|
|
1731
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Your account is now active. Click below to log in with your details.'
|
|
1732
|
+
};
|
|
1594
1733
|
var QSM$d = {
|
|
1595
1734
|
DEPARTURE: 'Departure',
|
|
1596
1735
|
CHOOSE_DEPARTURE: 'Choose Departure',
|
|
@@ -1693,6 +1832,7 @@ var enJson = {
|
|
|
1693
1832
|
ERROR: ERROR$c,
|
|
1694
1833
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$c,
|
|
1695
1834
|
NAVBAR: NAVBAR$c,
|
|
1835
|
+
LOGIN: LOGIN$c,
|
|
1696
1836
|
QSM: QSM$d,
|
|
1697
1837
|
SRP: SRP$c
|
|
1698
1838
|
};
|
|
@@ -1800,6 +1940,8 @@ var SIDEBAR$b = {
|
|
|
1800
1940
|
TRAVELERS_ADULT: 'adulto',
|
|
1801
1941
|
TRAVELERS_CHILDREN: 'niños',
|
|
1802
1942
|
TRAVELERS_CHILD: 'niño',
|
|
1943
|
+
TRAVELERS_INFANTS: 'bebés',
|
|
1944
|
+
TRAVELERS_INFANT: 'bebé',
|
|
1803
1945
|
DEPARTURE: 'Ida',
|
|
1804
1946
|
DEPARTURE_SINGLE: 'Fecha',
|
|
1805
1947
|
ARRIVAL: 'Vuelta',
|
|
@@ -1954,6 +2096,38 @@ var PRINT_OFFER_BUTTON$b = {
|
|
|
1954
2096
|
var NAVBAR$b = {
|
|
1955
2097
|
SEARCH: 'Buscar'
|
|
1956
2098
|
};
|
|
2099
|
+
var LOGIN$b = {
|
|
2100
|
+
LOGIN_INTO: 'Inicia sesión en tu cuenta',
|
|
2101
|
+
EMAIL: 'Correo electrónico',
|
|
2102
|
+
ENTER_YOUR_EMAIL: 'Introduce tu correo electrónico',
|
|
2103
|
+
EMAIL_REQUIRED: 'El correo electrónico es obligatorio.',
|
|
2104
|
+
EMAIL_INVALID: 'El correo electrónico no es válido.',
|
|
2105
|
+
ENTER_VALID_EMAIL: 'Introduce un correo electrónico válido.',
|
|
2106
|
+
PASSWORD: 'Contraseña',
|
|
2107
|
+
ENTER_YOUR_PASSWORD: 'Introduce tu contraseña',
|
|
2108
|
+
RESET_PASSWORD_LABEL: 'Nueva contraseña',
|
|
2109
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Repetir contraseña',
|
|
2110
|
+
PASSWORD_REQUIRED: 'La contraseña es obligatoria.',
|
|
2111
|
+
INVALID_CREDENTIALS: 'Correo electrónico o contraseña no válidos.',
|
|
2112
|
+
LOGIN: 'Iniciar sesión',
|
|
2113
|
+
FORGOT_PASSWORD: '¿Olvidaste tu contraseña?',
|
|
2114
|
+
LOGGING_IN: 'Iniciando sesión...',
|
|
2115
|
+
WELCOME_X: 'Bienvenido, ',
|
|
2116
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Restablecer contraseña',
|
|
2117
|
+
RESET_REQUESTED: 'Solicitud de restablecimiento de contraseña enviada',
|
|
2118
|
+
BACK_TO_HOMEPAGE: 'Volver a la página principal',
|
|
2119
|
+
BACK_TO_LOGIN: 'Volver al inicio de sesión',
|
|
2120
|
+
RESET_PASSWORD_TITLE: 'Restablecer contraseña',
|
|
2121
|
+
PASSWORD_COMPLEXITY: 'La contraseña debe contener al menos 1 número y 1 letra mayúscula',
|
|
2122
|
+
REPEAT_PASSWORD_REQUIRED: 'Por favor repite tu contraseña.',
|
|
2123
|
+
PASSWORDS_DO_NOT_MATCH: 'Las contraseñas no coinciden.',
|
|
2124
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Modificar contraseña',
|
|
2125
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Tu contraseña ha sido cambiada. Ahora puedes iniciar sesión con tu nueva contraseña.',
|
|
2126
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Este enlace ha expirado o no es válido.',
|
|
2127
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Puedes solicitar una nueva contraseña haciendo clic en el botón de abajo.',
|
|
2128
|
+
RECEIVED_REQUEST: 'Tu solicitud ha sido recibida correctamente',
|
|
2129
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Tu cuenta ahora está activa. Haz clic abajo para iniciar sesión con tus datos.'
|
|
2130
|
+
};
|
|
1957
2131
|
var QSM$c = {
|
|
1958
2132
|
DEPARTURE: 'Salida',
|
|
1959
2133
|
CHOOSE_DEPARTURE: 'Elegir salida',
|
|
@@ -2056,6 +2230,7 @@ var esJson = {
|
|
|
2056
2230
|
ERROR: ERROR$b,
|
|
2057
2231
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$b,
|
|
2058
2232
|
NAVBAR: NAVBAR$b,
|
|
2233
|
+
LOGIN: LOGIN$b,
|
|
2059
2234
|
QSM: QSM$c,
|
|
2060
2235
|
SRP: SRP$b
|
|
2061
2236
|
};
|
|
@@ -2163,6 +2338,8 @@ var SIDEBAR$a = {
|
|
|
2163
2338
|
TRAVELERS_ADULT: 'adulte',
|
|
2164
2339
|
TRAVELERS_CHILDREN: 'enfants',
|
|
2165
2340
|
TRAVELERS_CHILD: 'enfant',
|
|
2341
|
+
TRAVELERS_INFANTS: 'bébés',
|
|
2342
|
+
TRAVELERS_INFANT: 'bébé',
|
|
2166
2343
|
DEPARTURE: 'Aller',
|
|
2167
2344
|
DEPARTURE_SINGLE: 'Date',
|
|
2168
2345
|
ARRIVAL: 'Retour',
|
|
@@ -2321,369 +2498,436 @@ var PRINT_OFFER_BUTTON$a = {
|
|
|
2321
2498
|
var NAVBAR$a = {
|
|
2322
2499
|
SEARCH: 'Rechercher'
|
|
2323
2500
|
};
|
|
2324
|
-
var
|
|
2325
|
-
|
|
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',
|
|
2501
|
+
var LOGIN$a = {
|
|
2502
|
+
LOGIN_INTO: 'Connectez-vous à votre compte',
|
|
2585
2503
|
EMAIL: 'Email',
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2504
|
+
ENTER_YOUR_EMAIL: 'Entrez votre email',
|
|
2505
|
+
EMAIL_REQUIRED: 'L’email est requis.',
|
|
2506
|
+
EMAIL_INVALID: 'L’email est invalide.',
|
|
2507
|
+
ENTER_VALID_EMAIL: 'Entrez un email valide.',
|
|
2508
|
+
PASSWORD: 'Mot de passe',
|
|
2509
|
+
ENTER_YOUR_PASSWORD: 'Entrez votre mot de passe',
|
|
2510
|
+
RESET_PASSWORD_LABEL: 'Nouveau mot de passe',
|
|
2511
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Répéter le mot de passe',
|
|
2512
|
+
PASSWORD_REQUIRED: 'Le mot de passe est requis.',
|
|
2513
|
+
INVALID_CREDENTIALS: 'Email ou mot de passe invalide.',
|
|
2514
|
+
LOGIN: 'Se connecter',
|
|
2515
|
+
FORGOT_PASSWORD: 'Mot de passe oublié ?',
|
|
2516
|
+
LOGGING_IN: 'Connexion...',
|
|
2517
|
+
WELCOME_X: 'Bienvenue, ',
|
|
2518
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Réinitialiser le mot de passe',
|
|
2519
|
+
RESET_REQUESTED: 'Demande de réinitialisation du mot de passe envoyée',
|
|
2520
|
+
BACK_TO_HOMEPAGE: 'Retour à la page d’accueil',
|
|
2521
|
+
BACK_TO_LOGIN: 'Retour à la connexion',
|
|
2522
|
+
RESET_PASSWORD_TITLE: 'Réinitialiser le mot de passe',
|
|
2523
|
+
PASSWORD_COMPLEXITY: 'Le mot de passe doit contenir au moins 1 chiffre et 1 lettre majuscule',
|
|
2524
|
+
REPEAT_PASSWORD_REQUIRED: 'Veuillez répéter votre mot de passe.',
|
|
2525
|
+
PASSWORDS_DO_NOT_MATCH: 'Les mots de passe ne correspondent pas.',
|
|
2526
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Modifier le mot de passe',
|
|
2527
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Votre mot de passe a été modifié. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.',
|
|
2528
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ce lien a expiré ou est invalide.',
|
|
2529
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Vous pouvez demander un nouveau mot de passe en cliquant sur le bouton ci-dessous.',
|
|
2530
|
+
RECEIVED_REQUEST: 'Votre demande a bien été reçue',
|
|
2531
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Votre compte est maintenant actif. Cliquez ci-dessous pour vous connecter avec vos informations.'
|
|
2610
2532
|
};
|
|
2611
|
-
var
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2533
|
+
var QSM$b = {
|
|
2534
|
+
DEPARTURE: 'Départ',
|
|
2535
|
+
CHOOSE_DEPARTURE: 'Choisir le départ',
|
|
2536
|
+
DESTINATION: 'Destination',
|
|
2537
|
+
CHOOSE_DESTINATION: 'Choisir une destination',
|
|
2538
|
+
ONEWAY: 'Aller simple',
|
|
2539
|
+
ROUNDTRIP: 'Aller-retour',
|
|
2540
|
+
OPENJAW: 'Open-jaw',
|
|
2541
|
+
MULTIDESTINATION: 'Multi-destinations',
|
|
2542
|
+
PACKAGES: 'Forfaits',
|
|
2543
|
+
TRANSPORT_HOTEL: 'Transport + hôtel',
|
|
2544
|
+
ACCOMMODATION: 'Hébergement',
|
|
2545
|
+
TRANSPORTS: 'Transports',
|
|
2546
|
+
TICKET_ONLY: 'Billet uniquement',
|
|
2547
|
+
RENT_A_CAR: 'Location de voiture',
|
|
2548
|
+
TRANSFERS: 'Transferts',
|
|
2549
|
+
CRUISES: 'Croisières',
|
|
2550
|
+
ONE_ACCOMMODATION: 'Un hébergement',
|
|
2551
|
+
MULTIPLE_ACCOMMODATIONS: 'Plusieurs hébergements',
|
|
2552
|
+
TRAVEL_CLASS_LABEL: 'Classe de voyage',
|
|
2553
|
+
TRAVEL_CLASS_PLACEHOLDER: 'Sélectionnez la classe',
|
|
2554
|
+
TRAVEL_TYPE_LABEL: 'Type de voyage',
|
|
2555
|
+
TRAVEL_TYPE_PLACEHOLDER: 'Sélectionnez le type de voyage',
|
|
2556
|
+
NATIONALITY_LABEL: 'Nationalité',
|
|
2557
|
+
NATIONALITY_PLACEHOLDER: 'Sélectionnez la nationalité',
|
|
2558
|
+
TRAVELERS_LABEL: 'Qui voyage ?',
|
|
2559
|
+
ADD_ROOM: 'Ajouter une chambre',
|
|
2560
|
+
REMOVE_ROOM: 'Supprimer la chambre',
|
|
2561
|
+
MAX_TRAVELERS_REACHED: 'Vous avez atteint le nombre maximum de voyageurs',
|
|
2562
|
+
ADULTS: 'Adultes',
|
|
2563
|
+
CHILDREN: 'Enfants',
|
|
2564
|
+
BABIES: 'Bébés',
|
|
2565
|
+
CHOOSE_DATES: 'Choisir les dates',
|
|
2566
|
+
DEPARTURE_DATE: 'Date de départ',
|
|
2567
|
+
RETURN_DATE: 'Date de retour',
|
|
2568
|
+
CONFIRM: 'Confirmer',
|
|
2569
|
+
TRAVELERS: 'Voyageurs'
|
|
2570
|
+
};
|
|
2571
|
+
var SRP$a = {
|
|
2572
|
+
NO_RESULTS: 'Aucun résultat trouvé.',
|
|
2573
|
+
TOTAL_RESULTS_LABEL: 'Forfaits trouvés',
|
|
2574
|
+
RESET: 'Réinitialiser',
|
|
2575
|
+
LUGGAGEINCLUDED: 'Bagages inclus',
|
|
2576
|
+
CANCEL: 'Annuler',
|
|
2577
|
+
APPLY: 'Appliquer',
|
|
2578
|
+
LOADING: 'Chargement...',
|
|
2579
|
+
SEARCHRESULTCTA: 'Voir les détails',
|
|
2580
|
+
SORTBY: 'Trier par',
|
|
2581
|
+
PRICE_ASC: 'Prix (croissant)',
|
|
2582
|
+
PRICE_DESC: 'Prix (décroissant)',
|
|
2583
|
+
DEPARTURE_TIME_ASC: 'Heure de départ croissante',
|
|
2584
|
+
DEPARTURE_TIME_DESC: 'Heure de départ décroissante',
|
|
2585
|
+
DURATION_ASC: 'Durée croissante',
|
|
2586
|
+
DURATION_DESC: 'Durée décroissante',
|
|
2587
|
+
DEPARTURE_ASC: 'Date de départ (la plus proche d’abord)',
|
|
2588
|
+
FILTERS: 'Filtres',
|
|
2589
|
+
SHOW_ITINERARY: 'Afficher l’itinéraire',
|
|
2590
|
+
ITINERARY_TITLE: 'Résumé de votre voyage',
|
|
2591
|
+
DOSSIER_NUMBER: 'Numéro de dossier',
|
|
2592
|
+
PACKAGE_PRICE_PER_PERSON: 'prix du forfait par personne',
|
|
2593
|
+
TOTAL: 'total',
|
|
2594
|
+
DAY_BY_DAY: 'Votre voyage jour par jour',
|
|
2595
|
+
START: 'début',
|
|
2596
|
+
END: 'fin',
|
|
2597
|
+
EXTENDED: 'Étendu',
|
|
2598
|
+
COMPACT: 'Compact',
|
|
2599
|
+
LIST: 'Liste',
|
|
2600
|
+
SELECT: 'Sélectionner',
|
|
2601
|
+
DEPARTURE: 'Départ',
|
|
2602
|
+
RETURN: 'Retour',
|
|
2603
|
+
DIRECT: 'Direct',
|
|
2604
|
+
STOPS: 'escales',
|
|
2605
|
+
STOP: 'escale',
|
|
2606
|
+
STOP_TIME: 'Temps d’escale',
|
|
2607
|
+
ACCOMMODATION: 'Hébergement',
|
|
2608
|
+
VIEW_DETAILS: 'Voir les détails',
|
|
2609
|
+
NIGHTS: 'nuits',
|
|
2610
|
+
MORNING_RANGE: 'Matin',
|
|
2611
|
+
AFTERNOON_RANGE: 'Après-midi',
|
|
2612
|
+
EVENING_RANGE: 'Soir',
|
|
2613
|
+
NIGHT_RANGE: 'Nuit',
|
|
2614
|
+
DEPARTURE_RANGE: 'Plage de départ',
|
|
2615
|
+
DEPARTURE_AIRPORTS: 'Aéroports de départ',
|
|
2616
|
+
ARRIVAL_AIRPORTS: 'Aéroports d’arrivée',
|
|
2617
|
+
PRICE: 'Prix'
|
|
2618
|
+
};
|
|
2619
|
+
var frBeJson = {
|
|
2620
|
+
STEPS: STEPS$a,
|
|
2621
|
+
INPUT: INPUT$a,
|
|
2622
|
+
FLIGHTS_FORM: FLIGHTS_FORM$a,
|
|
2623
|
+
PRODUCT: PRODUCT$a,
|
|
2624
|
+
MAIN: MAIN$a,
|
|
2625
|
+
SHARED: SHARED$a,
|
|
2626
|
+
SIDEBAR: SIDEBAR$a,
|
|
2627
|
+
TRAVELERS_FORM: TRAVELERS_FORM$a,
|
|
2628
|
+
OPTIONS_FORM: OPTIONS_FORM$a,
|
|
2629
|
+
ROOM_OPTIONS_FORM: ROOM_OPTIONS_FORM$a,
|
|
2630
|
+
SUMMARY: SUMMARY$a,
|
|
2631
|
+
CONFIRMATION: CONFIRMATION$a,
|
|
2632
|
+
ERROR: ERROR$a,
|
|
2633
|
+
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$a,
|
|
2634
|
+
NAVBAR: NAVBAR$a,
|
|
2635
|
+
LOGIN: LOGIN$a,
|
|
2636
|
+
QSM: QSM$b,
|
|
2637
|
+
SRP: SRP$a
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2640
|
+
var STEPS$9 = {
|
|
2641
|
+
PERSONAL_DETAILS: 'Informations personnelles',
|
|
2642
|
+
EXTRA_OPTIONS: 'Options supplémentaires',
|
|
2643
|
+
SUMMARY: 'Résumé',
|
|
2644
|
+
CONFIRMATION: 'Confirmation',
|
|
2645
|
+
ERROR: 'Réservation échouée',
|
|
2646
|
+
PREVIOUS: 'Étape précédente',
|
|
2647
|
+
NEXT: 'Étape suivante',
|
|
2648
|
+
SUBMIT_BOOKING: 'Confirmer la réservation',
|
|
2649
|
+
SUBMIT_OFFER: 'Demander un devis',
|
|
2650
|
+
SUBMIT_OPTION: 'Prendre une option',
|
|
2651
|
+
COMPOSE: 'Rédiger',
|
|
2652
|
+
ROOM_OPTIONS: 'Options de chambre',
|
|
2653
|
+
FLIGHT_OPTIONS: 'Options de vol'
|
|
2654
|
+
};
|
|
2655
|
+
var INPUT$9 = {
|
|
2656
|
+
INCREASE: 'Augmenter',
|
|
2657
|
+
DECREASE: 'Diminuer'
|
|
2658
|
+
};
|
|
2659
|
+
var FLIGHTS_FORM$9 = {
|
|
2660
|
+
OUTWARD_FLIGHTS: 'Vols aller',
|
|
2661
|
+
OUTWARD_FLIGHT: 'Vol aller',
|
|
2662
|
+
RETURN_FLIGHTS: 'Vols retour',
|
|
2663
|
+
RETURN_FLIGHT: 'Vol retour',
|
|
2664
|
+
DIRECT_FLIGHT: 'Vol direct',
|
|
2665
|
+
STOP: 'escale',
|
|
2666
|
+
STOPS: 'escales',
|
|
2667
|
+
FLIGHT_STOPS: 'escale(s)',
|
|
2668
|
+
DIFFERENT_OPTION_WARNING: 'Attention : Ce vol modifie la durée du séjour.',
|
|
2669
|
+
FILTER_OPTIONS: 'Filtrer les options',
|
|
2670
|
+
AIRLINES: 'Compagnies aériennes',
|
|
2671
|
+
AIRPORTS: 'Aéroports',
|
|
2672
|
+
NUMBER_OF_STOPS: "Nombre d'escales",
|
|
2673
|
+
FLIGHT_OUTWARD: 'Vol aller',
|
|
2674
|
+
DEPARTURE_TIME: 'Heure de départ',
|
|
2675
|
+
TRAVEL_DURATION: 'Durée du voyage',
|
|
2676
|
+
CHANGE_TIME: 'Temps de correspondance',
|
|
2677
|
+
FLIGHT_RETURN: 'Vol retour',
|
|
2678
|
+
NO_FLIGHTS_FOUND: 'Aucun vol trouvé.',
|
|
2679
|
+
STARTING: 'À partir de',
|
|
2680
|
+
LOWEST_PRICE: 'Prix le plus bas',
|
|
2681
|
+
CHOOSE_YOUR_CLASS: 'Choisissez votre classe :',
|
|
2682
|
+
PLUS_ONE_DAY: '+1 jour',
|
|
2683
|
+
STOP_TIME: 'Temps de correspondance',
|
|
2684
|
+
NIGHT_DEPARTURE: 'Nuit (00:00 - 05:00)',
|
|
2685
|
+
MORNING_DEPARTURE: 'Matin (05:00 - 12:00)',
|
|
2686
|
+
AFTERNOON_DEPARTURE: 'Après-midi (12:00 - 18:00)',
|
|
2687
|
+
EVENING_DEPARTURE: 'Soir (18:00 - 00:00)',
|
|
2688
|
+
FLIGHTS_FOUND_1: '',
|
|
2689
|
+
FLIGHTS_FOUND_2: 'vols',
|
|
2690
|
+
FLIGHTS_FOUND_3: 'trouvés'
|
|
2691
|
+
};
|
|
2692
|
+
var PRODUCT$9 = {
|
|
2693
|
+
STAY_INCLUDED: 'Séjour inclus',
|
|
2694
|
+
FLIGHT_INCLUDED: 'Vol inclus',
|
|
2695
|
+
TRANSFER_INCLUDED: 'Transfert inclus',
|
|
2696
|
+
LOADING_PRICE: 'Votre prix est en cours de calcul.',
|
|
2697
|
+
PER_PERSON: 'Par personne',
|
|
2698
|
+
PER_NIGHT: 'Par nuit',
|
|
2699
|
+
PER_PERSON_PER_NIGHT: 'Par personne / par nuit',
|
|
2700
|
+
BOOK_NOW: 'Réservez maintenant',
|
|
2701
|
+
TO_YOUR_OFFER: 'Vers votre devis',
|
|
2702
|
+
NOT_AVAILABLE: 'Indisponible',
|
|
2703
|
+
NUMBER_OF_ROOMS: 'Nombre de chambres',
|
|
2704
|
+
AGE_BY_DEPARTURE_DATE: 'Âge des enfants à la date de départ',
|
|
2705
|
+
YEAR: 'An(s)',
|
|
2706
|
+
APPLY: 'Appliquer',
|
|
2707
|
+
EDIT: 'Modifier',
|
|
2708
|
+
DEPARTURE: 'Départ',
|
|
2709
|
+
DEPARTURE_DATE: 'Date de départ',
|
|
2710
|
+
RETURN: 'Retour',
|
|
2711
|
+
RETURN_DATE: 'Date de retour',
|
|
2712
|
+
WHO_YOU_TRAVELING_WITH: 'Avec qui voyagez-vous ?',
|
|
2713
|
+
TRAVEL_PERIOD: 'Période de voyage',
|
|
2714
|
+
CLOSE: 'Fermer',
|
|
2715
|
+
NIGHTS: 'nuits',
|
|
2716
|
+
DAYS: 'jours'
|
|
2717
|
+
};
|
|
2718
|
+
var MAIN$9 = {
|
|
2719
|
+
PREPARING_BOOKING: 'Veuillez patienter, nous préparons votre réservation',
|
|
2720
|
+
PREPARING_OFFER: 'Veuillez patienter, nous préparons votre devis',
|
|
2721
|
+
PREPARING_DOSSIER: 'Veuillez patienter, nous préparons votre dossier',
|
|
2722
|
+
PRODUCT_UNAVAILABLE: 'Produit non disponible'
|
|
2723
|
+
};
|
|
2724
|
+
var SHARED$9 = {
|
|
2725
|
+
ROOM: 'Chambre',
|
|
2726
|
+
ROOMS: 'Chambres',
|
|
2727
|
+
TOTAL_PRICE: 'Prix total',
|
|
2728
|
+
ADULTS: 'Adultes',
|
|
2729
|
+
CHILDREN: 'Enfants',
|
|
2730
|
+
SELECT: 'Sélectionner',
|
|
2731
|
+
SELECTED: 'Sélectionné'
|
|
2732
|
+
};
|
|
2733
|
+
var SIDEBAR$9 = {
|
|
2734
|
+
OVERVIEW: 'Résumé',
|
|
2735
|
+
SLIDE_TOTAL_PRICE: 'Montant total : ',
|
|
2736
|
+
SLIDE_DEPOSIT: 'Acompte à payer : ',
|
|
2737
|
+
TRAVEL_INFO: 'Informations voyage',
|
|
2738
|
+
TRAVELERS: 'Voyageurs',
|
|
2739
|
+
TRAVELERS_ADULTS: 'adultes',
|
|
2740
|
+
TRAVELERS_ADULT: 'adulte',
|
|
2741
|
+
TRAVELERS_CHILDREN: 'enfants',
|
|
2742
|
+
TRAVELERS_CHILD: 'enfant',
|
|
2743
|
+
TRAVELERS_INFANTS: 'bébés',
|
|
2744
|
+
TRAVELERS_INFANT: 'bébé',
|
|
2745
|
+
DEPARTURE: 'Aller',
|
|
2746
|
+
DEPARTURE_SINGLE: 'Date',
|
|
2747
|
+
ARRIVAL: 'Retour',
|
|
2748
|
+
FLIGHT: 'Vol',
|
|
2749
|
+
ACCOMMODATION: 'Hébergement réservé',
|
|
2750
|
+
BASE_PRICE: 'Prix de base',
|
|
2751
|
+
OPTIONS: 'Options',
|
|
2752
|
+
INCLUDED_COSTS: 'Coûts inclus',
|
|
2753
|
+
EXTRA_COSTS: 'Coûts supplémentaires',
|
|
2754
|
+
DEPOSIT: 'Acompte à payer',
|
|
2755
|
+
DEPOSIT_TEXT1: 'Les étapes pour le ',
|
|
2756
|
+
DEPOSIT_TEXT2: 'solde restant',
|
|
2757
|
+
DEPOSIT_TEXT3: ' de ',
|
|
2758
|
+
DEPOSIT_TEXT4: ' sont décrites dans ',
|
|
2759
|
+
DEPOSIT_TEXT5: "l'étape « Résumé »",
|
|
2760
|
+
DEPOSIT_TEXT6: ' du processus de réservation.',
|
|
2761
|
+
LUGGAGE_INCLUDED: 'Bagages inclus',
|
|
2762
|
+
DEPARTURE_FLIGHT: 'Vol aller',
|
|
2763
|
+
ARRIVAL_FLIGHT: 'Vol retour',
|
|
2764
|
+
FLIGHT_DEPARTURE: 'Départ',
|
|
2765
|
+
FLIGHT_ARRIVAL: 'Arrivée',
|
|
2766
|
+
ON_REQUEST: 'Sur demande',
|
|
2767
|
+
CHANGES: 'transferts'
|
|
2768
|
+
};
|
|
2769
|
+
var TRAVELERS_FORM$9 = {
|
|
2770
|
+
AGE: 'Âge',
|
|
2771
|
+
TRAVELER: 'Voyageur',
|
|
2772
|
+
ADULT: 'adulte',
|
|
2773
|
+
ADULTS: 'adultes',
|
|
2774
|
+
CHILD: 'enfant',
|
|
2775
|
+
CHILDREN: 'enfants',
|
|
2776
|
+
GENDER: 'Civilité',
|
|
2777
|
+
GENDER_ID: "Sexe selon passeport/carte d'identité",
|
|
2778
|
+
MALE: 'M.',
|
|
2779
|
+
MALE_GENDER: 'Homme',
|
|
2780
|
+
FEMALE: 'Mme',
|
|
2781
|
+
FEMALE_GENDER: 'Femme',
|
|
2782
|
+
OTHER: 'Autre',
|
|
2783
|
+
MAIN_BOOKER: 'Titulaire de la réservation',
|
|
2784
|
+
FIRST_NAME: 'Prénom',
|
|
2785
|
+
LAST_NAME: 'Nom',
|
|
2786
|
+
BIRTHDATE: 'Date de naissance',
|
|
2787
|
+
STREET: 'Rue',
|
|
2788
|
+
STREET_PLACEHOLDER: 'Votre rue',
|
|
2789
|
+
HOUSE_NUMBER: 'Numéro',
|
|
2790
|
+
POST_BOX: 'Boîte postale',
|
|
2791
|
+
ZIPCODE: 'Code postal',
|
|
2792
|
+
CITY: 'Ville',
|
|
2793
|
+
CITY_PLACEHOLDER: 'Ville',
|
|
2794
|
+
COUNTRY: 'Pays',
|
|
2795
|
+
SELECT_COUNTRY: 'Sélectionner le pays',
|
|
2796
|
+
PHONE: 'Téléphone',
|
|
2797
|
+
EMAIL: 'Email',
|
|
2798
|
+
REPEAT_EMAIL: "Répéter l'email",
|
|
2799
|
+
VALIDATION_MESSAGE: 'Veuillez vérifier les champs ci-dessous et les remplir correctement.',
|
|
2800
|
+
BOOK_WITH_AGENT: 'Je souhaite réserver via mon agence de voyage locale',
|
|
2801
|
+
CHOOSE_OFFICE: 'Je choisis un bureau',
|
|
2802
|
+
PERSON: 'Personne',
|
|
2803
|
+
COUNTRIES: {
|
|
2804
|
+
BELGIUM: 'Belgique',
|
|
2805
|
+
NETHERLANDS: 'Pays-Bas',
|
|
2806
|
+
FRANCE: 'France'
|
|
2807
|
+
},
|
|
2808
|
+
CHOOSE_AGENT_PLACEHOLDER: 'Choisissez votre agent de voyage',
|
|
2809
|
+
VALIDATION: {
|
|
2810
|
+
TRAVELER_X_FIELD: 'Chambre {0} - Voyageur {1} : {2}',
|
|
2811
|
+
SINGLE_ROOM_TRAVELER_X_FIELD: 'Voyageur {0} : {1}',
|
|
2812
|
+
TRAVELER_X_IS_NO_ADULT: "Chambre {0} - Voyageur {1} : n'est pas un adulte",
|
|
2813
|
+
SINGLE_ROOM_TRAVELER_X_IS_NO_ADULT: "Voyageur {0} : n'est pas un adulte",
|
|
2814
|
+
TRAVELER_X_IS_NO_CHILD: "Chambre {0} - Voyageur {1} : n'est pas un enfant",
|
|
2815
|
+
SINGLE_ROOM_TRAVELER_X_IS_NO_CHILD: "Voyageur {0} : n'est pas un enfant",
|
|
2816
|
+
NO_MAIN_BOOKER_SELECTED: 'Aucun titulaire de réservation sélectionné',
|
|
2817
|
+
MAIN_BOOKER_FIELD: 'Titulaire de la réservation : {0}',
|
|
2818
|
+
MAIN_BOOKER_EMAIL_IS_INVALID: 'Titulaire de la réservation : email invalide',
|
|
2819
|
+
MAIN_BOOKER_EMAIL_DOES_NOT_MATCH: 'Titulaire de la réservation : email non concordant',
|
|
2820
|
+
AGENT_IS_REQUIRED: 'Un agent de voyage est requis'
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
var OPTIONS_FORM$9 = {
|
|
2824
|
+
NO_OPTIONS_TITLE: 'Aucune option',
|
|
2825
|
+
NO_OPTIONS_MESSAGE: "Ce voyage n'a pas d'options supplémentaires.",
|
|
2826
|
+
UNIT_TITLE: 'Groupe',
|
|
2827
|
+
PACKAGE: 'Forfait',
|
|
2828
|
+
DAY: 'jour',
|
|
2829
|
+
DAYS: 'jours',
|
|
2830
|
+
NIGHT: 'nuit',
|
|
2831
|
+
NIGHTS: 'nuits',
|
|
2832
|
+
PER_PAX_TITLE: 'Sélectionnez les options par voyageur',
|
|
2833
|
+
PER_BOOKING_TITLE: 'Sélectionnez les options par réservation',
|
|
2834
|
+
PER_UNIT_TITLE: 'Sélectionnez les options par groupe',
|
|
2835
|
+
NONE: 'Aucune'
|
|
2836
|
+
};
|
|
2837
|
+
var ROOM_OPTIONS_FORM$9 = {
|
|
2838
|
+
TRAVELER_GROUP: 'Groupe de voyage',
|
|
2839
|
+
ALTERNATIVES_TRAVELER_GROUP: 'Options alternatives de chambre pour le groupe',
|
|
2840
|
+
SHOW_ALTERNATIVES: 'Afficher les options alternatives de chambre'
|
|
2841
|
+
};
|
|
2842
|
+
var SUMMARY$9 = {
|
|
2843
|
+
PERSONAL_DETAILS: 'Informations personnelles',
|
|
2844
|
+
TRAVELERS: 'voyageurs',
|
|
2845
|
+
TRAVELER: 'voyageur',
|
|
2846
|
+
ADULTS: 'adultes',
|
|
2847
|
+
ADULT: 'adulte',
|
|
2848
|
+
CHILDREN: 'enfants',
|
|
2849
|
+
CHILD: 'enfant',
|
|
2850
|
+
MAIN_BOOKER: 'Titulaire de la réservation',
|
|
2851
|
+
NOTIFICATIONS_TITLE: 'Attention',
|
|
2852
|
+
VALIDATE_TITLE: 'Vérifiez vos informations',
|
|
2853
|
+
VALIDATE_TEXT_BOOKING:
|
|
2854
|
+
"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.",
|
|
2855
|
+
VALIDATE_TEXT_OFFER:
|
|
2856
|
+
"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.",
|
|
2857
|
+
VALIDATE_TEXT_OPTION:
|
|
2858
|
+
"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.",
|
|
2859
|
+
OPTIONS: 'Options',
|
|
2860
|
+
REMARKS: 'Remarques',
|
|
2861
|
+
VOUCHERS: 'Bons',
|
|
2862
|
+
VOUCHER_VALIDATE: 'Valider le bon',
|
|
2863
|
+
ADD_VOUCHER: 'Ajouter un bon',
|
|
2864
|
+
VOUCHER_VALID: 'Bon valide',
|
|
2865
|
+
VOUCHER_INVALID: 'Bon invalide'
|
|
2866
|
+
};
|
|
2867
|
+
var CONFIRMATION$9 = {
|
|
2868
|
+
TITLE_TEXT_OFFER: 'Votre devis numéro {0} a été demandé',
|
|
2869
|
+
TITLE_TEXT_BOOKING: 'Votre réservation numéro {0} a été confirmée',
|
|
2870
|
+
TITLE_TEXT_OPTION: 'Vous avez pris une option sur le numéro {0}.',
|
|
2871
|
+
MESSAGE_TEXT1: 'Votre voyage de rêve est maintenant très proche.',
|
|
2872
|
+
MESSAGE_TEXT2_OFFER: 'Nos spécialistes du voyage traitent votre demande et vous contacteront sous 48 heures.',
|
|
2873
|
+
MESSAGE_TEXT2_BOOKING: 'Nos spécialistes du voyage traitent votre réservation et vous contacteront sous 48 heures.',
|
|
2874
|
+
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.',
|
|
2875
|
+
QUESTIONS_TEXT1: 'Vous avez des questions ? ',
|
|
2876
|
+
QUESTIONS_TEXT2: 'Faites-le nous savoir',
|
|
2877
|
+
QUESTIONS_TEXT3: '.',
|
|
2878
|
+
QUESTIONS_ALT: 'Contactez-nous',
|
|
2879
|
+
MAIL_SUBJECT: 'Informations sur la réservation'
|
|
2880
|
+
};
|
|
2881
|
+
var ERROR$9 = {
|
|
2882
|
+
TRY_AGAIN: 'Réessayer la réservation',
|
|
2883
|
+
MESSAGE_TEXT1: "Une erreur s'est produite lors de la confirmation de votre voyage.",
|
|
2884
|
+
MESSAGE_TEXT2: 'Cliquez ci-dessous pour réessayer.',
|
|
2885
|
+
ERROR_TEXT1: 'Ça ne fonctionne toujours pas ? ',
|
|
2886
|
+
ERROR_TEXT2: 'Assurez-vous de nous le faire savoir',
|
|
2887
|
+
ERROR_TEXT3: '.',
|
|
2888
|
+
ERROR_ALT: 'Contactez-nous'
|
|
2889
|
+
};
|
|
2890
|
+
var PRINT_OFFER_BUTTON$9 = {
|
|
2891
|
+
LABEL_IDLE: 'Imprimer le devis',
|
|
2892
|
+
LABEL_CREATING: 'Génération du devis…',
|
|
2893
|
+
LABEL_PRINTING: 'Génération du PDF…'
|
|
2894
|
+
};
|
|
2895
|
+
var NAVBAR$9 = {
|
|
2896
|
+
SEARCH: 'Rechercher'
|
|
2897
|
+
};
|
|
2898
|
+
var LOGIN$9 = {
|
|
2899
|
+
LOGIN_INTO: 'Connectez-vous à votre compte',
|
|
2900
|
+
EMAIL: 'Email',
|
|
2901
|
+
ENTER_YOUR_EMAIL: 'Entrez votre email',
|
|
2902
|
+
EMAIL_REQUIRED: 'L’email est requis.',
|
|
2903
|
+
EMAIL_INVALID: 'L’email est invalide.',
|
|
2904
|
+
ENTER_VALID_EMAIL: 'Entrez un email valide.',
|
|
2905
|
+
PASSWORD: 'Mot de passe',
|
|
2906
|
+
ENTER_YOUR_PASSWORD: 'Entrez votre mot de passe',
|
|
2907
|
+
RESET_PASSWORD_LABEL: 'Nouveau mot de passe',
|
|
2908
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Répéter le mot de passe',
|
|
2909
|
+
PASSWORD_REQUIRED: 'Le mot de passe est requis.',
|
|
2910
|
+
INVALID_CREDENTIALS: 'Email ou mot de passe invalide.',
|
|
2911
|
+
LOGIN: 'Se connecter',
|
|
2912
|
+
FORGOT_PASSWORD: 'Mot de passe oublié ?',
|
|
2913
|
+
LOGGING_IN: 'Connexion...',
|
|
2914
|
+
WELCOME_X: 'Bienvenue, ',
|
|
2915
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Réinitialiser le mot de passe',
|
|
2916
|
+
RESET_REQUESTED: 'Demande de réinitialisation du mot de passe envoyée',
|
|
2917
|
+
BACK_TO_HOMEPAGE: 'Retour à la page d’accueil',
|
|
2918
|
+
BACK_TO_LOGIN: 'Retour à la connexion',
|
|
2919
|
+
RESET_PASSWORD_TITLE: 'Réinitialiser le mot de passe',
|
|
2920
|
+
PASSWORD_COMPLEXITY: 'Le mot de passe doit contenir au moins 1 chiffre et 1 lettre majuscule',
|
|
2921
|
+
REPEAT_PASSWORD_REQUIRED: 'Veuillez répéter votre mot de passe.',
|
|
2922
|
+
PASSWORDS_DO_NOT_MATCH: 'Les mots de passe ne correspondent pas.',
|
|
2923
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Modifier le mot de passe',
|
|
2924
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Votre mot de passe a été modifié. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.',
|
|
2925
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ce lien a expiré ou est invalide.',
|
|
2926
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Vous pouvez demander un nouveau mot de passe en cliquant sur le bouton ci-dessous.',
|
|
2927
|
+
RECEIVED_REQUEST: 'Votre demande a bien été reçue',
|
|
2928
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Votre compte est maintenant actif. Cliquez ci-dessous pour vous connecter avec vos informations.'
|
|
2929
|
+
};
|
|
2930
|
+
var QSM$a = {
|
|
2687
2931
|
DEPARTURE: 'Départ',
|
|
2688
2932
|
CHOOSE_DEPARTURE: 'Choisir le départ',
|
|
2689
2933
|
DESTINATION: 'Destination',
|
|
@@ -2785,6 +3029,7 @@ var frFrJson = {
|
|
|
2785
3029
|
ERROR: ERROR$9,
|
|
2786
3030
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$9,
|
|
2787
3031
|
NAVBAR: NAVBAR$9,
|
|
3032
|
+
LOGIN: LOGIN$9,
|
|
2788
3033
|
QSM: QSM$a,
|
|
2789
3034
|
SRP: SRP$9
|
|
2790
3035
|
};
|
|
@@ -2892,6 +3137,8 @@ var SIDEBAR$8 = {
|
|
|
2892
3137
|
TRAVELERS_ADULT: 'fullorðinn',
|
|
2893
3138
|
TRAVELERS_CHILDREN: 'börn',
|
|
2894
3139
|
TRAVELERS_CHILD: 'barn',
|
|
3140
|
+
TRAVELERS_INFANTS: 'ungabörn',
|
|
3141
|
+
TRAVELERS_INFANT: 'ungabarn',
|
|
2895
3142
|
DEPARTURE: 'Brottför',
|
|
2896
3143
|
DEPARTURE_SINGLE: 'Dagsetning',
|
|
2897
3144
|
ARRIVAL: 'Komið',
|
|
@@ -3045,6 +3292,38 @@ var PRINT_OFFER_BUTTON$8 = {
|
|
|
3045
3292
|
var NAVBAR$8 = {
|
|
3046
3293
|
SEARCH: 'Leita'
|
|
3047
3294
|
};
|
|
3295
|
+
var LOGIN$8 = {
|
|
3296
|
+
LOGIN_INTO: 'Skráðu þig inn á reikninginn þinn',
|
|
3297
|
+
EMAIL: 'Netfang',
|
|
3298
|
+
ENTER_YOUR_EMAIL: 'Sláðu inn netfangið þitt',
|
|
3299
|
+
EMAIL_REQUIRED: 'Netfang er nauðsynlegt.',
|
|
3300
|
+
EMAIL_INVALID: 'Netfangið er ógilt.',
|
|
3301
|
+
ENTER_VALID_EMAIL: 'Sláðu inn gilt netfang.',
|
|
3302
|
+
PASSWORD: 'Lykilorð',
|
|
3303
|
+
ENTER_YOUR_PASSWORD: 'Sláðu inn lykilorðið þitt',
|
|
3304
|
+
RESET_PASSWORD_LABEL: 'Nýtt lykilorð',
|
|
3305
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Endurtaka lykilorð',
|
|
3306
|
+
PASSWORD_REQUIRED: 'Lykilorð er nauðsynlegt.',
|
|
3307
|
+
INVALID_CREDENTIALS: 'Ógilt netfang eða lykilorð.',
|
|
3308
|
+
LOGIN: 'Skrá inn',
|
|
3309
|
+
FORGOT_PASSWORD: 'Gleymt lykilorð?',
|
|
3310
|
+
LOGGING_IN: 'Skrái inn...',
|
|
3311
|
+
WELCOME_X: 'Velkomin, ',
|
|
3312
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Endurstilla lykilorð',
|
|
3313
|
+
RESET_REQUESTED: 'Beiðni um endurstillingu lykilorðs send',
|
|
3314
|
+
BACK_TO_HOMEPAGE: 'Til baka á forsíðu',
|
|
3315
|
+
BACK_TO_LOGIN: 'Til baka í innskráningu',
|
|
3316
|
+
RESET_PASSWORD_TITLE: 'Endurstilla lykilorð',
|
|
3317
|
+
PASSWORD_COMPLEXITY: 'Lykilorð verður að innihalda að minnsta kosti 1 tölu og 1 stóran staf',
|
|
3318
|
+
REPEAT_PASSWORD_REQUIRED: 'Vinsamlegast endurtaktu lykilorðið.',
|
|
3319
|
+
PASSWORDS_DO_NOT_MATCH: 'Lykilorðin passa ekki.',
|
|
3320
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Breyta lykilorði',
|
|
3321
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Lykilorðinu þínu hefur verið breytt. Þú getur nú skráð þig inn með nýja lykilorðinu.',
|
|
3322
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Þessi hlekkur er útrunninn eða ógildur.',
|
|
3323
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Þú getur beðið um nýtt lykilorð með því að smella á hnappinn hér fyrir neðan.',
|
|
3324
|
+
RECEIVED_REQUEST: 'Beiðnin þín hefur verið móttekin',
|
|
3325
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Reikningurinn þinn er nú virkur. Smelltu hér fyrir neðan til að skrá þig inn.'
|
|
3326
|
+
};
|
|
3048
3327
|
var QSM$9 = {
|
|
3049
3328
|
DEPARTURE: 'Brottför',
|
|
3050
3329
|
CHOOSE_DEPARTURE: 'Veldu brottför',
|
|
@@ -3147,6 +3426,7 @@ var isJson = {
|
|
|
3147
3426
|
ERROR: ERROR$8,
|
|
3148
3427
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$8,
|
|
3149
3428
|
NAVBAR: NAVBAR$8,
|
|
3429
|
+
LOGIN: LOGIN$8,
|
|
3150
3430
|
QSM: QSM$9,
|
|
3151
3431
|
SRP: SRP$8
|
|
3152
3432
|
};
|
|
@@ -3254,6 +3534,8 @@ var SIDEBAR$7 = {
|
|
|
3254
3534
|
TRAVELERS_ADULT: 'adulto',
|
|
3255
3535
|
TRAVELERS_CHILDREN: 'bambini',
|
|
3256
3536
|
TRAVELERS_CHILD: 'bambino',
|
|
3537
|
+
TRAVELERS_INFANTS: 'neonati',
|
|
3538
|
+
TRAVELERS_INFANT: 'neonato',
|
|
3257
3539
|
DEPARTURE: 'Andata',
|
|
3258
3540
|
DEPARTURE_SINGLE: 'Data',
|
|
3259
3541
|
ARRIVAL: 'Ritorno',
|
|
@@ -3408,6 +3690,38 @@ var PRINT_OFFER_BUTTON$7 = {
|
|
|
3408
3690
|
var NAVBAR$7 = {
|
|
3409
3691
|
SEARCH: 'Cerca'
|
|
3410
3692
|
};
|
|
3693
|
+
var LOGIN$7 = {
|
|
3694
|
+
LOGIN_INTO: 'Accedi al tuo account',
|
|
3695
|
+
EMAIL: 'Email',
|
|
3696
|
+
ENTER_YOUR_EMAIL: 'Inserisci la tua email',
|
|
3697
|
+
EMAIL_REQUIRED: "L'email è obbligatoria.",
|
|
3698
|
+
EMAIL_INVALID: "L'email non è valida.",
|
|
3699
|
+
ENTER_VALID_EMAIL: "Inserisci un'email valida.",
|
|
3700
|
+
PASSWORD: 'Password',
|
|
3701
|
+
ENTER_YOUR_PASSWORD: 'Inserisci la tua password',
|
|
3702
|
+
RESET_PASSWORD_LABEL: 'Nuova password',
|
|
3703
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Ripeti password',
|
|
3704
|
+
PASSWORD_REQUIRED: 'La password è obbligatoria.',
|
|
3705
|
+
INVALID_CREDENTIALS: 'Email o password non validi.',
|
|
3706
|
+
LOGIN: 'Accedi',
|
|
3707
|
+
FORGOT_PASSWORD: 'Password dimenticata?',
|
|
3708
|
+
LOGGING_IN: 'Accesso in corso...',
|
|
3709
|
+
WELCOME_X: 'Benvenuto, ',
|
|
3710
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Reimposta password',
|
|
3711
|
+
RESET_REQUESTED: 'Richiesta di reimpostazione password inviata',
|
|
3712
|
+
BACK_TO_HOMEPAGE: 'Torna alla homepage',
|
|
3713
|
+
BACK_TO_LOGIN: 'Torna al login',
|
|
3714
|
+
RESET_PASSWORD_TITLE: 'Reimposta password',
|
|
3715
|
+
PASSWORD_COMPLEXITY: 'La password deve contenere almeno 1 numero e 1 lettera maiuscola',
|
|
3716
|
+
REPEAT_PASSWORD_REQUIRED: 'Per favore ripeti la password.',
|
|
3717
|
+
PASSWORDS_DO_NOT_MATCH: 'Le password non corrispondono.',
|
|
3718
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Modifica password',
|
|
3719
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'La tua password è stata modificata. Ora puoi accedere con la nuova password.',
|
|
3720
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Questo link è scaduto o non è valido.',
|
|
3721
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Puoi richiedere una nuova password cliccando il pulsante qui sotto.',
|
|
3722
|
+
RECEIVED_REQUEST: 'La tua richiesta è stata ricevuta',
|
|
3723
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Il tuo account è ora attivo. Clicca qui sotto per accedere con i tuoi dati.'
|
|
3724
|
+
};
|
|
3411
3725
|
var QSM$8 = {
|
|
3412
3726
|
DEPARTURE: 'Partenza',
|
|
3413
3727
|
CHOOSE_DEPARTURE: 'Scegli partenza',
|
|
@@ -3510,6 +3824,7 @@ var itJson = {
|
|
|
3510
3824
|
ERROR: ERROR$7,
|
|
3511
3825
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$7,
|
|
3512
3826
|
NAVBAR: NAVBAR$7,
|
|
3827
|
+
LOGIN: LOGIN$7,
|
|
3513
3828
|
QSM: QSM$8,
|
|
3514
3829
|
SRP: SRP$7
|
|
3515
3830
|
};
|
|
@@ -3617,6 +3932,8 @@ var SIDEBAR$6 = {
|
|
|
3617
3932
|
TRAVELERS_ADULT: 'volwassene',
|
|
3618
3933
|
TRAVELERS_CHILDREN: 'kinderen',
|
|
3619
3934
|
TRAVELERS_CHILD: 'kind',
|
|
3935
|
+
TRAVELERS_INFANTS: "baby's",
|
|
3936
|
+
TRAVELERS_INFANT: 'baby',
|
|
3620
3937
|
DEPARTURE: 'Heenreis',
|
|
3621
3938
|
DEPARTURE_SINGLE: 'Datum',
|
|
3622
3939
|
ARRIVAL: 'Terugreis',
|
|
@@ -3775,6 +4092,38 @@ var PRINT_OFFER_BUTTON$6 = {
|
|
|
3775
4092
|
var NAVBAR$6 = {
|
|
3776
4093
|
SEARCH: 'Zoeken'
|
|
3777
4094
|
};
|
|
4095
|
+
var LOGIN$6 = {
|
|
4096
|
+
LOGIN_INTO: 'Log in op je account',
|
|
4097
|
+
EMAIL: 'E-mail',
|
|
4098
|
+
ENTER_YOUR_EMAIL: 'Voer je e-mail in',
|
|
4099
|
+
EMAIL_REQUIRED: 'E-mail is verplicht.',
|
|
4100
|
+
EMAIL_INVALID: 'E-mailadres is ongeldig.',
|
|
4101
|
+
ENTER_VALID_EMAIL: 'Voer een geldig e-mailadres in.',
|
|
4102
|
+
PASSWORD: 'Wachtwoord',
|
|
4103
|
+
ENTER_YOUR_PASSWORD: 'Voer je wachtwoord in',
|
|
4104
|
+
RESET_PASSWORD_LABEL: 'Nieuw wachtwoord',
|
|
4105
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Herhaal wachtwoord',
|
|
4106
|
+
PASSWORD_REQUIRED: 'Wachtwoord is verplicht.',
|
|
4107
|
+
INVALID_CREDENTIALS: 'Ongeldig e-mailadres of wachtwoord.',
|
|
4108
|
+
LOGIN: 'Inloggen',
|
|
4109
|
+
FORGOT_PASSWORD: 'Wachtwoord vergeten?',
|
|
4110
|
+
LOGGING_IN: 'Bezig met inloggen...',
|
|
4111
|
+
WELCOME_X: 'Welkom, ',
|
|
4112
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Wachtwoord resetten',
|
|
4113
|
+
RESET_REQUESTED: 'Aanvraag voor wachtwoordreset verzonden',
|
|
4114
|
+
BACK_TO_HOMEPAGE: 'Terug naar homepage',
|
|
4115
|
+
BACK_TO_LOGIN: 'Terug naar login',
|
|
4116
|
+
RESET_PASSWORD_TITLE: 'Wachtwoord resetten',
|
|
4117
|
+
PASSWORD_COMPLEXITY: 'Wachtwoord moet minstens 1 cijfer en 1 hoofdletter bevatten',
|
|
4118
|
+
REPEAT_PASSWORD_REQUIRED: 'Herhaal je wachtwoord.',
|
|
4119
|
+
PASSWORDS_DO_NOT_MATCH: 'Wachtwoorden komen niet overeen.',
|
|
4120
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Wachtwoord wijzigen',
|
|
4121
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Je wachtwoord is gewijzigd. Je kan nu inloggen met je nieuwe wachtwoord.',
|
|
4122
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Deze link is verlopen of ongeldig.',
|
|
4123
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Je kan een nieuw wachtwoord aanvragen door op onderstaande knop te klikken.',
|
|
4124
|
+
RECEIVED_REQUEST: 'Je aanvraag is goed ontvangen',
|
|
4125
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Je account is nu actief. Klik hieronder om in te loggen met je gegevens.'
|
|
4126
|
+
};
|
|
3778
4127
|
var QSM$7 = {
|
|
3779
4128
|
DEPARTURE: 'Vertrek',
|
|
3780
4129
|
CHOOSE_DEPARTURE: 'Vertrek kiezen',
|
|
@@ -3877,6 +4226,7 @@ var nlBeJson = {
|
|
|
3877
4226
|
ERROR: ERROR$6,
|
|
3878
4227
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$6,
|
|
3879
4228
|
NAVBAR: NAVBAR$6,
|
|
4229
|
+
LOGIN: LOGIN$6,
|
|
3880
4230
|
QSM: QSM$7,
|
|
3881
4231
|
SRP: SRP$6
|
|
3882
4232
|
};
|
|
@@ -3984,6 +4334,8 @@ var SIDEBAR$5 = {
|
|
|
3984
4334
|
TRAVELERS_ADULT: 'volwassene',
|
|
3985
4335
|
TRAVELERS_CHILDREN: 'kinderen',
|
|
3986
4336
|
TRAVELERS_CHILD: 'kind',
|
|
4337
|
+
TRAVELERS_INFANTS: "baby's",
|
|
4338
|
+
TRAVELERS_INFANT: 'baby',
|
|
3987
4339
|
DEPARTURE: 'Heenreis',
|
|
3988
4340
|
DEPARTURE_SINGLE: 'Datum',
|
|
3989
4341
|
ARRIVAL: 'Terugreis',
|
|
@@ -4138,6 +4490,38 @@ var PRINT_OFFER_BUTTON$5 = {
|
|
|
4138
4490
|
var NAVBAR$5 = {
|
|
4139
4491
|
SEARCH: 'Zoeken'
|
|
4140
4492
|
};
|
|
4493
|
+
var LOGIN$5 = {
|
|
4494
|
+
LOGIN_INTO: 'Log in op je account',
|
|
4495
|
+
EMAIL: 'E-mail',
|
|
4496
|
+
ENTER_YOUR_EMAIL: 'Voer je e-mail in',
|
|
4497
|
+
EMAIL_REQUIRED: 'E-mail is verplicht.',
|
|
4498
|
+
EMAIL_INVALID: 'E-mailadres is ongeldig.',
|
|
4499
|
+
ENTER_VALID_EMAIL: 'Voer een geldig e-mailadres in.',
|
|
4500
|
+
PASSWORD: 'Wachtwoord',
|
|
4501
|
+
ENTER_YOUR_PASSWORD: 'Voer je wachtwoord in',
|
|
4502
|
+
RESET_PASSWORD_LABEL: 'Nieuw wachtwoord',
|
|
4503
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Herhaal wachtwoord',
|
|
4504
|
+
PASSWORD_REQUIRED: 'Wachtwoord is verplicht.',
|
|
4505
|
+
INVALID_CREDENTIALS: 'Ongeldig e-mailadres of wachtwoord.',
|
|
4506
|
+
LOGIN: 'Inloggen',
|
|
4507
|
+
FORGOT_PASSWORD: 'Wachtwoord vergeten?',
|
|
4508
|
+
LOGGING_IN: 'Bezig met inloggen...',
|
|
4509
|
+
WELCOME_X: 'Welkom, ',
|
|
4510
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Wachtwoord resetten',
|
|
4511
|
+
RESET_REQUESTED: 'Aanvraag voor wachtwoordreset verzonden',
|
|
4512
|
+
BACK_TO_HOMEPAGE: 'Terug naar homepage',
|
|
4513
|
+
BACK_TO_LOGIN: 'Terug naar login',
|
|
4514
|
+
RESET_PASSWORD_TITLE: 'Wachtwoord resetten',
|
|
4515
|
+
PASSWORD_COMPLEXITY: 'Wachtwoord moet minstens 1 cijfer en 1 hoofdletter bevatten',
|
|
4516
|
+
REPEAT_PASSWORD_REQUIRED: 'Herhaal je wachtwoord.',
|
|
4517
|
+
PASSWORDS_DO_NOT_MATCH: 'Wachtwoorden komen niet overeen.',
|
|
4518
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Wachtwoord wijzigen',
|
|
4519
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Je wachtwoord is gewijzigd. Je kan nu inloggen met je nieuwe wachtwoord.',
|
|
4520
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Deze link is verlopen of ongeldig.',
|
|
4521
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Je kan een nieuw wachtwoord aanvragen door op onderstaande knop te klikken.',
|
|
4522
|
+
RECEIVED_REQUEST: 'Je aanvraag is goed ontvangen',
|
|
4523
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Je account is nu actief. Klik hieronder om in te loggen met je gegevens.'
|
|
4524
|
+
};
|
|
4141
4525
|
var QSM$6 = {
|
|
4142
4526
|
DEPARTURE: 'Vertrek',
|
|
4143
4527
|
CHOOSE_DEPARTURE: 'Vertrek kiezen',
|
|
@@ -4240,6 +4624,7 @@ var nlNlJson = {
|
|
|
4240
4624
|
ERROR: ERROR$5,
|
|
4241
4625
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$5,
|
|
4242
4626
|
NAVBAR: NAVBAR$5,
|
|
4627
|
+
LOGIN: LOGIN$5,
|
|
4243
4628
|
QSM: QSM$6,
|
|
4244
4629
|
SRP: SRP$5
|
|
4245
4630
|
};
|
|
@@ -4347,6 +4732,8 @@ var SIDEBAR$4 = {
|
|
|
4347
4732
|
TRAVELERS_ADULT: 'voksen',
|
|
4348
4733
|
TRAVELERS_CHILDREN: 'barn',
|
|
4349
4734
|
TRAVELERS_CHILD: 'barn',
|
|
4735
|
+
TRAVELERS_INFANTS: 'babyer',
|
|
4736
|
+
TRAVELERS_INFANT: 'baby',
|
|
4350
4737
|
DEPARTURE: 'Utreise',
|
|
4351
4738
|
DEPARTURE_SINGLE: 'Dato',
|
|
4352
4739
|
ARRIVAL: 'Retur',
|
|
@@ -4501,6 +4888,38 @@ var PRINT_OFFER_BUTTON$4 = {
|
|
|
4501
4888
|
var NAVBAR$4 = {
|
|
4502
4889
|
SEARCH: 'Søk'
|
|
4503
4890
|
};
|
|
4891
|
+
var LOGIN$4 = {
|
|
4892
|
+
LOGIN_INTO: 'Logg inn på kontoen din',
|
|
4893
|
+
EMAIL: 'E-post',
|
|
4894
|
+
ENTER_YOUR_EMAIL: 'Skriv inn e-posten din',
|
|
4895
|
+
EMAIL_REQUIRED: 'E-post er påkrevd.',
|
|
4896
|
+
EMAIL_INVALID: 'E-posten er ugyldig.',
|
|
4897
|
+
ENTER_VALID_EMAIL: 'Skriv inn en gyldig e-post.',
|
|
4898
|
+
PASSWORD: 'Passord',
|
|
4899
|
+
ENTER_YOUR_PASSWORD: 'Skriv inn passordet ditt',
|
|
4900
|
+
RESET_PASSWORD_LABEL: 'Nytt passord',
|
|
4901
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Gjenta passord',
|
|
4902
|
+
PASSWORD_REQUIRED: 'Passord er påkrevd.',
|
|
4903
|
+
INVALID_CREDENTIALS: 'Ugyldig e-post eller passord.',
|
|
4904
|
+
LOGIN: 'Logg inn',
|
|
4905
|
+
FORGOT_PASSWORD: 'Glemt passord?',
|
|
4906
|
+
LOGGING_IN: 'Logger inn...',
|
|
4907
|
+
WELCOME_X: 'Velkommen, ',
|
|
4908
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Tilbakestill passord',
|
|
4909
|
+
RESET_REQUESTED: 'Forespørsel om tilbakestilling av passord sendt',
|
|
4910
|
+
BACK_TO_HOMEPAGE: 'Tilbake til startsiden',
|
|
4911
|
+
BACK_TO_LOGIN: 'Tilbake til innlogging',
|
|
4912
|
+
RESET_PASSWORD_TITLE: 'Tilbakestill passord',
|
|
4913
|
+
PASSWORD_COMPLEXITY: 'Passordet må inneholde minst 1 tall og 1 stor bokstav',
|
|
4914
|
+
REPEAT_PASSWORD_REQUIRED: 'Vennligst gjenta passordet.',
|
|
4915
|
+
PASSWORDS_DO_NOT_MATCH: 'Passordene samsvarer ikke.',
|
|
4916
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Endre passord',
|
|
4917
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Passordet ditt er endret. Du kan nå logge inn med ditt nye passord.',
|
|
4918
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Denne lenken er utløpt eller ugyldig.',
|
|
4919
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan be om et nytt passord ved å klikke på knappen nedenfor.',
|
|
4920
|
+
RECEIVED_REQUEST: 'Forespørselen din er mottatt',
|
|
4921
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Kontoen din er nå aktiv. Klikk nedenfor for å logge inn med dine opplysninger.'
|
|
4922
|
+
};
|
|
4504
4923
|
var QSM$5 = {
|
|
4505
4924
|
DEPARTURE: 'Avgang',
|
|
4506
4925
|
CHOOSE_DEPARTURE: 'Velg avgang',
|
|
@@ -4603,6 +5022,7 @@ var noJson = {
|
|
|
4603
5022
|
ERROR: ERROR$4,
|
|
4604
5023
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$4,
|
|
4605
5024
|
NAVBAR: NAVBAR$4,
|
|
5025
|
+
LOGIN: LOGIN$4,
|
|
4606
5026
|
QSM: QSM$5,
|
|
4607
5027
|
SRP: SRP$4
|
|
4608
5028
|
};
|
|
@@ -4710,6 +5130,8 @@ var SIDEBAR$3 = {
|
|
|
4710
5130
|
TRAVELERS_ADULT: 'dorosły',
|
|
4711
5131
|
TRAVELERS_CHILDREN: 'dzieci',
|
|
4712
5132
|
TRAVELERS_CHILD: 'dziecko',
|
|
5133
|
+
TRAVELERS_INFANTS: 'niemowlęta',
|
|
5134
|
+
TRAVELERS_INFANT: 'niemowlę',
|
|
4713
5135
|
DEPARTURE: 'Wylot',
|
|
4714
5136
|
DEPARTURE_SINGLE: 'Data',
|
|
4715
5137
|
ARRIVAL: 'Powrót',
|
|
@@ -4864,6 +5286,38 @@ var PRINT_OFFER_BUTTON$3 = {
|
|
|
4864
5286
|
var NAVBAR$3 = {
|
|
4865
5287
|
SEARCH: 'Szukaj'
|
|
4866
5288
|
};
|
|
5289
|
+
var LOGIN$3 = {
|
|
5290
|
+
LOGIN_INTO: 'Zaloguj się na swoje konto',
|
|
5291
|
+
EMAIL: 'Email',
|
|
5292
|
+
ENTER_YOUR_EMAIL: 'Wprowadź swój email',
|
|
5293
|
+
EMAIL_REQUIRED: 'Email jest wymagany.',
|
|
5294
|
+
EMAIL_INVALID: 'Adres e-mail jest nieprawidłowy.',
|
|
5295
|
+
ENTER_VALID_EMAIL: 'Wprowadź poprawny adres email.',
|
|
5296
|
+
PASSWORD: 'Hasło',
|
|
5297
|
+
ENTER_YOUR_PASSWORD: 'Wprowadź swoje hasło',
|
|
5298
|
+
RESET_PASSWORD_LABEL: 'Nowe hasło',
|
|
5299
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Powtórz hasło',
|
|
5300
|
+
PASSWORD_REQUIRED: 'Hasło jest wymagane.',
|
|
5301
|
+
INVALID_CREDENTIALS: 'Nieprawidłowy adres e-mail lub hasło.',
|
|
5302
|
+
LOGIN: 'Zaloguj się',
|
|
5303
|
+
FORGOT_PASSWORD: 'Zapomniałeś hasła?',
|
|
5304
|
+
LOGGING_IN: 'Logowanie...',
|
|
5305
|
+
WELCOME_X: 'Witaj, ',
|
|
5306
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Zresetuj hasło',
|
|
5307
|
+
RESET_REQUESTED: 'Żądanie resetowania hasła wysłane',
|
|
5308
|
+
BACK_TO_HOMEPAGE: 'Powrót do strony głównej',
|
|
5309
|
+
BACK_TO_LOGIN: 'Powrót do logowania',
|
|
5310
|
+
RESET_PASSWORD_TITLE: 'Resetuj hasło',
|
|
5311
|
+
PASSWORD_COMPLEXITY: 'Hasło musi zawierać co najmniej 1 cyfrę i 1 wielką literę',
|
|
5312
|
+
REPEAT_PASSWORD_REQUIRED: 'Proszę powtórzyć hasło.',
|
|
5313
|
+
PASSWORDS_DO_NOT_MATCH: 'Hasła nie są zgodne.',
|
|
5314
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Zmień hasło',
|
|
5315
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Twoje hasło zostało zmienione. Możesz teraz zalogować się używając nowego hasła.',
|
|
5316
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Ten link wygasł lub jest nieprawidłowy.',
|
|
5317
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Możesz poprosić o nowe hasło klikając przycisk poniżej.',
|
|
5318
|
+
RECEIVED_REQUEST: 'Twoja prośba została odebrana',
|
|
5319
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Twoje konto jest teraz aktywne. Kliknij poniżej aby się zalogować.'
|
|
5320
|
+
};
|
|
4867
5321
|
var QSM$4 = {
|
|
4868
5322
|
DEPARTURE: 'Wylot',
|
|
4869
5323
|
CHOOSE_DEPARTURE: 'Wybierz wylot',
|
|
@@ -4966,6 +5420,7 @@ var plJson = {
|
|
|
4966
5420
|
ERROR: ERROR$3,
|
|
4967
5421
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$3,
|
|
4968
5422
|
NAVBAR: NAVBAR$3,
|
|
5423
|
+
LOGIN: LOGIN$3,
|
|
4969
5424
|
QSM: QSM$4,
|
|
4970
5425
|
SRP: SRP$3
|
|
4971
5426
|
};
|
|
@@ -5073,6 +5528,8 @@ var SIDEBAR$2 = {
|
|
|
5073
5528
|
TRAVELERS_ADULT: 'adulto',
|
|
5074
5529
|
TRAVELERS_CHILDREN: 'crianças',
|
|
5075
5530
|
TRAVELERS_CHILD: 'criança',
|
|
5531
|
+
TRAVELERS_INFANTS: 'bebés',
|
|
5532
|
+
TRAVELERS_INFANT: 'bebé',
|
|
5076
5533
|
DEPARTURE: 'Ida',
|
|
5077
5534
|
DEPARTURE_SINGLE: 'Data',
|
|
5078
5535
|
ARRIVAL: 'Regresso',
|
|
@@ -5227,6 +5684,38 @@ var PRINT_OFFER_BUTTON$2 = {
|
|
|
5227
5684
|
var NAVBAR$2 = {
|
|
5228
5685
|
SEARCH: 'Pesquisar'
|
|
5229
5686
|
};
|
|
5687
|
+
var LOGIN$2 = {
|
|
5688
|
+
LOGIN_INTO: 'Inicie sessão na sua conta',
|
|
5689
|
+
EMAIL: 'Email',
|
|
5690
|
+
ENTER_YOUR_EMAIL: 'Introduza o seu email',
|
|
5691
|
+
EMAIL_REQUIRED: 'O email é obrigatório.',
|
|
5692
|
+
EMAIL_INVALID: 'O email é inválido.',
|
|
5693
|
+
ENTER_VALID_EMAIL: 'Introduza um email válido.',
|
|
5694
|
+
PASSWORD: 'Palavra-passe',
|
|
5695
|
+
ENTER_YOUR_PASSWORD: 'Introduza a sua palavra-passe',
|
|
5696
|
+
RESET_PASSWORD_LABEL: 'Nova palavra-passe',
|
|
5697
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Repetir palavra-passe',
|
|
5698
|
+
PASSWORD_REQUIRED: 'A palavra-passe é obrigatória.',
|
|
5699
|
+
INVALID_CREDENTIALS: 'Email ou palavra-passe inválidos.',
|
|
5700
|
+
LOGIN: 'Iniciar sessão',
|
|
5701
|
+
FORGOT_PASSWORD: 'Esqueceu a palavra-passe?',
|
|
5702
|
+
LOGGING_IN: 'A iniciar sessão...',
|
|
5703
|
+
WELCOME_X: 'Bem-vindo, ',
|
|
5704
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Redefinir palavra-passe',
|
|
5705
|
+
RESET_REQUESTED: 'Pedido de redefinição de palavra-passe enviado',
|
|
5706
|
+
BACK_TO_HOMEPAGE: 'Voltar à página inicial',
|
|
5707
|
+
BACK_TO_LOGIN: 'Voltar ao login',
|
|
5708
|
+
RESET_PASSWORD_TITLE: 'Redefinir palavra-passe',
|
|
5709
|
+
PASSWORD_COMPLEXITY: 'A palavra-passe deve conter pelo menos 1 número e 1 letra maiúscula',
|
|
5710
|
+
REPEAT_PASSWORD_REQUIRED: 'Por favor repita a palavra-passe.',
|
|
5711
|
+
PASSWORDS_DO_NOT_MATCH: 'As palavras-passe não coincidem.',
|
|
5712
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Alterar palavra-passe',
|
|
5713
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'A sua palavra-passe foi alterada. Pode agora iniciar sessão com a nova palavra-passe.',
|
|
5714
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Este link expirou ou é inválido.',
|
|
5715
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Pode pedir uma nova palavra-passe clicando no botão abaixo.',
|
|
5716
|
+
RECEIVED_REQUEST: 'O seu pedido foi recebido',
|
|
5717
|
+
ACCOUNT_ACTIVATED_LOGIN: 'A sua conta está agora ativa. Clique abaixo para iniciar sessão com os seus dados.'
|
|
5718
|
+
};
|
|
5230
5719
|
var QSM$3 = {
|
|
5231
5720
|
DEPARTURE: 'Partida',
|
|
5232
5721
|
CHOOSE_DEPARTURE: 'Escolher partida',
|
|
@@ -5329,6 +5818,7 @@ var ptJson = {
|
|
|
5329
5818
|
ERROR: ERROR$2,
|
|
5330
5819
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$2,
|
|
5331
5820
|
NAVBAR: NAVBAR$2,
|
|
5821
|
+
LOGIN: LOGIN$2,
|
|
5332
5822
|
QSM: QSM$3,
|
|
5333
5823
|
SRP: SRP$2
|
|
5334
5824
|
};
|
|
@@ -5436,6 +5926,8 @@ var SIDEBAR$1 = {
|
|
|
5436
5926
|
TRAVELERS_ADULT: 'vuxen',
|
|
5437
5927
|
TRAVELERS_CHILDREN: 'barn',
|
|
5438
5928
|
TRAVELERS_CHILD: 'barn',
|
|
5929
|
+
TRAVELERS_INFANTS: 'spädbarn',
|
|
5930
|
+
TRAVELERS_INFANT: 'spädbarn',
|
|
5439
5931
|
DEPARTURE: 'Utresa',
|
|
5440
5932
|
DEPARTURE_SINGLE: 'Datum',
|
|
5441
5933
|
ARRIVAL: 'Retur',
|
|
@@ -5590,6 +6082,38 @@ var PRINT_OFFER_BUTTON$1 = {
|
|
|
5590
6082
|
var NAVBAR$1 = {
|
|
5591
6083
|
SEARCH: 'Sök'
|
|
5592
6084
|
};
|
|
6085
|
+
var LOGIN$1 = {
|
|
6086
|
+
LOGIN_INTO: 'Logga in på ditt konto',
|
|
6087
|
+
EMAIL: 'E-post',
|
|
6088
|
+
ENTER_YOUR_EMAIL: 'Ange din e-post',
|
|
6089
|
+
EMAIL_REQUIRED: 'E-post krävs.',
|
|
6090
|
+
EMAIL_INVALID: 'E-postadressen är ogiltig.',
|
|
6091
|
+
ENTER_VALID_EMAIL: 'Ange en giltig e-postadress.',
|
|
6092
|
+
PASSWORD: 'Lösenord',
|
|
6093
|
+
ENTER_YOUR_PASSWORD: 'Ange ditt lösenord',
|
|
6094
|
+
RESET_PASSWORD_LABEL: 'Nytt lösenord',
|
|
6095
|
+
RESET_REPEAT_PASSWORD_LABEL: 'Upprepa lösenord',
|
|
6096
|
+
PASSWORD_REQUIRED: 'Lösenord krävs.',
|
|
6097
|
+
INVALID_CREDENTIALS: 'Ogiltig e-post eller lösenord.',
|
|
6098
|
+
LOGIN: 'Logga in',
|
|
6099
|
+
FORGOT_PASSWORD: 'Glömt lösenord?',
|
|
6100
|
+
LOGGING_IN: 'Loggar in...',
|
|
6101
|
+
WELCOME_X: 'Välkommen, ',
|
|
6102
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'Återställ lösenord',
|
|
6103
|
+
RESET_REQUESTED: 'Begäran om återställning av lösenord skickad',
|
|
6104
|
+
BACK_TO_HOMEPAGE: 'Tillbaka till startsidan',
|
|
6105
|
+
BACK_TO_LOGIN: 'Tillbaka till inloggning',
|
|
6106
|
+
RESET_PASSWORD_TITLE: 'Återställ lösenord',
|
|
6107
|
+
PASSWORD_COMPLEXITY: 'Lösenordet måste innehålla minst 1 siffra och 1 versal',
|
|
6108
|
+
REPEAT_PASSWORD_REQUIRED: 'Vänligen upprepa ditt lösenord.',
|
|
6109
|
+
PASSWORDS_DO_NOT_MATCH: 'Lösenorden matchar inte.',
|
|
6110
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'Ändra lösenord',
|
|
6111
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'Ditt lösenord har ändrats. Du kan nu logga in med ditt nya lösenord.',
|
|
6112
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'Denna länk har gått ut eller är ogiltig.',
|
|
6113
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: 'Du kan begära ett nytt lösenord genom att klicka på knappen nedan.',
|
|
6114
|
+
RECEIVED_REQUEST: 'Din begäran har mottagits',
|
|
6115
|
+
ACCOUNT_ACTIVATED_LOGIN: 'Ditt konto är nu aktivt. Klicka nedan för att logga in med dina uppgifter.'
|
|
6116
|
+
};
|
|
5593
6117
|
var QSM$2 = {
|
|
5594
6118
|
DEPARTURE: 'Avgång',
|
|
5595
6119
|
CHOOSE_DEPARTURE: 'Välj avgång',
|
|
@@ -5692,6 +6216,7 @@ var svJson = {
|
|
|
5692
6216
|
ERROR: ERROR$1,
|
|
5693
6217
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON$1,
|
|
5694
6218
|
NAVBAR: NAVBAR$1,
|
|
6219
|
+
LOGIN: LOGIN$1,
|
|
5695
6220
|
QSM: QSM$2,
|
|
5696
6221
|
SRP: SRP$1
|
|
5697
6222
|
};
|
|
@@ -5799,6 +6324,8 @@ var SIDEBAR = {
|
|
|
5799
6324
|
TRAVELERS_ADULT: '大人',
|
|
5800
6325
|
TRAVELERS_CHILDREN: '子供',
|
|
5801
6326
|
TRAVELERS_CHILD: '子供',
|
|
6327
|
+
TRAVELERS_INFANTS: '乳児',
|
|
6328
|
+
TRAVELERS_INFANT: '乳児',
|
|
5802
6329
|
DEPARTURE: '往路',
|
|
5803
6330
|
DEPARTURE_SINGLE: '日付',
|
|
5804
6331
|
ARRIVAL: '復路',
|
|
@@ -5951,6 +6478,38 @@ var PRINT_OFFER_BUTTON = {
|
|
|
5951
6478
|
var NAVBAR = {
|
|
5952
6479
|
SEARCH: '検索'
|
|
5953
6480
|
};
|
|
6481
|
+
var LOGIN = {
|
|
6482
|
+
LOGIN_INTO: 'アカウントにログイン',
|
|
6483
|
+
EMAIL: 'メールアドレス',
|
|
6484
|
+
ENTER_YOUR_EMAIL: 'メールアドレスを入力してください',
|
|
6485
|
+
EMAIL_REQUIRED: 'メールアドレスは必須です。',
|
|
6486
|
+
EMAIL_INVALID: 'メールアドレスが無効です。',
|
|
6487
|
+
ENTER_VALID_EMAIL: '有効なメールアドレスを入力してください。',
|
|
6488
|
+
PASSWORD: 'パスワード',
|
|
6489
|
+
ENTER_YOUR_PASSWORD: 'パスワードを入力してください',
|
|
6490
|
+
RESET_PASSWORD_LABEL: '新しいパスワード',
|
|
6491
|
+
RESET_REPEAT_PASSWORD_LABEL: 'パスワードを再入力',
|
|
6492
|
+
PASSWORD_REQUIRED: 'パスワードは必須です。',
|
|
6493
|
+
INVALID_CREDENTIALS: 'メールアドレスまたはパスワードが無効です。',
|
|
6494
|
+
LOGIN: 'ログイン',
|
|
6495
|
+
FORGOT_PASSWORD: 'パスワードをお忘れですか?',
|
|
6496
|
+
LOGGING_IN: 'ログイン中...',
|
|
6497
|
+
WELCOME_X: 'ようこそ、',
|
|
6498
|
+
FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL: 'パスワードをリセット',
|
|
6499
|
+
RESET_REQUESTED: 'パスワードリセットのリクエストが送信されました',
|
|
6500
|
+
BACK_TO_HOMEPAGE: 'ホームページに戻る',
|
|
6501
|
+
BACK_TO_LOGIN: 'ログインに戻る',
|
|
6502
|
+
RESET_PASSWORD_TITLE: 'パスワードをリセット',
|
|
6503
|
+
PASSWORD_COMPLEXITY: 'パスワードは少なくとも1つの数字と1つの大文字を含める必要があります',
|
|
6504
|
+
REPEAT_PASSWORD_REQUIRED: 'パスワードをもう一度入力してください。',
|
|
6505
|
+
PASSWORDS_DO_NOT_MATCH: 'パスワードが一致しません。',
|
|
6506
|
+
RESET_PASSWORD_SUBMIT_LABEL: 'パスワードを変更',
|
|
6507
|
+
RESET_PASSWORD_SUCCESSFUL_MESSAGE: 'パスワードが変更されました。新しいパスワードでログインできます。',
|
|
6508
|
+
RESET_PASSWORD_INVALID_TOKEN_TITLE: 'このリンクは期限切れまたは無効です。',
|
|
6509
|
+
RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION: '以下のボタンをクリックして新しいパスワードをリクエストできます。',
|
|
6510
|
+
RECEIVED_REQUEST: 'リクエストを受け取りました',
|
|
6511
|
+
ACCOUNT_ACTIVATED_LOGIN: 'アカウントが有効になりました。以下をクリックしてログインしてください。'
|
|
6512
|
+
};
|
|
5954
6513
|
var QSM$1 = {
|
|
5955
6514
|
DEPARTURE: '出発',
|
|
5956
6515
|
CHOOSE_DEPARTURE: '出発地を選択',
|
|
@@ -6053,6 +6612,7 @@ var jaJson = {
|
|
|
6053
6612
|
ERROR: ERROR,
|
|
6054
6613
|
PRINT_OFFER_BUTTON: PRINT_OFFER_BUTTON,
|
|
6055
6614
|
NAVBAR: NAVBAR,
|
|
6615
|
+
LOGIN: LOGIN,
|
|
6056
6616
|
QSM: QSM$1,
|
|
6057
6617
|
SRP: SRP
|
|
6058
6618
|
};
|
|
@@ -20284,6 +20844,18 @@ var parseFlightLineDateTime = function (date, time) {
|
|
|
20284
20844
|
return undefined;
|
|
20285
20845
|
}
|
|
20286
20846
|
};
|
|
20847
|
+
var getPaxTypeTranslation = function (translations, paxType, numberOfPax) {
|
|
20848
|
+
switch (paxType) {
|
|
20849
|
+
case 'ADULT':
|
|
20850
|
+
return numberOfPax === 1 ? translations.SIDEBAR.TRAVELERS_ADULT : translations.SIDEBAR.TRAVELERS_ADULTS;
|
|
20851
|
+
case 'CHILD':
|
|
20852
|
+
return numberOfPax === 1 ? translations.SIDEBAR.TRAVELERS_CHILD : translations.SIDEBAR.TRAVELERS_CHILDREN;
|
|
20853
|
+
case 'INFANT':
|
|
20854
|
+
return numberOfPax === 1 ? translations.SIDEBAR.TRAVELERS_INFANT : translations.SIDEBAR.TRAVELERS_INFANTS;
|
|
20855
|
+
default:
|
|
20856
|
+
return '';
|
|
20857
|
+
}
|
|
20858
|
+
};
|
|
20287
20859
|
|
|
20288
20860
|
var FlightOptionFlight = function (_a) {
|
|
20289
20861
|
var details = _a.details,
|
|
@@ -23703,9 +24275,9 @@ var aggregatePricePerPaxType = function (priceDetails, requestRooms) {
|
|
|
23703
24275
|
room.pax.forEach(function (pax) {
|
|
23704
24276
|
var paxType = 'ADULT';
|
|
23705
24277
|
if (typeof pax.age === 'number') {
|
|
23706
|
-
if (pax.age
|
|
24278
|
+
if (pax.age <= 11) {
|
|
23707
24279
|
paxType = 'CHILD';
|
|
23708
|
-
} else if (pax.age
|
|
24280
|
+
} else if (pax.age <= 2) {
|
|
23709
24281
|
paxType = 'INFANT';
|
|
23710
24282
|
}
|
|
23711
24283
|
}
|
|
@@ -23728,11 +24300,15 @@ var aggregatePricePerPaxType = function (priceDetails, requestRooms) {
|
|
|
23728
24300
|
detailsMap[descKey] = {
|
|
23729
24301
|
numberOfPax: 1,
|
|
23730
24302
|
description: detail.priceDescription || '',
|
|
23731
|
-
price: ppp.price
|
|
24303
|
+
price: ppp.price,
|
|
24304
|
+
paxIds: [ppp.paxId]
|
|
23732
24305
|
};
|
|
23733
24306
|
} else {
|
|
23734
|
-
detailsMap[descKey].numberOfPax += 1;
|
|
23735
24307
|
detailsMap[descKey].price += ppp.price;
|
|
24308
|
+
if (!detailsMap[descKey].paxIds.includes(ppp.paxId)) {
|
|
24309
|
+
detailsMap[descKey].paxIds.push(ppp.paxId);
|
|
24310
|
+
detailsMap[descKey].numberOfPax += 1;
|
|
24311
|
+
}
|
|
23736
24312
|
}
|
|
23737
24313
|
}
|
|
23738
24314
|
});
|
|
@@ -23896,8 +24472,6 @@ var Sidebar = function (_a) {
|
|
|
23896
24472
|
var handleToggleClick = function () {
|
|
23897
24473
|
setActive(!active);
|
|
23898
24474
|
};
|
|
23899
|
-
console.log('basePricePerPaxType', basePricePerPaxType);
|
|
23900
|
-
console.log('seperateExtraPricePerPaxType', seperateExtraPricePerPaxType);
|
|
23901
24475
|
return React__default['default'].createElement(
|
|
23902
24476
|
'div',
|
|
23903
24477
|
{ className: buildClassName(['booking__sidebar', active && 'booking__sidebar--active']) },
|
|
@@ -24031,7 +24605,51 @@ var Sidebar = function (_a) {
|
|
|
24031
24605
|
React__default['default'].createElement('h6', { className: 'pricing-summary__title' }, translations.SIDEBAR.BASE_PRICE)
|
|
24032
24606
|
),
|
|
24033
24607
|
React__default['default'].createElement('div', { className: 'pricing-summary__value' }, formatPrice(basePrice, currencyCode))
|
|
24034
|
-
)
|
|
24608
|
+
),
|
|
24609
|
+
basePricePerPaxType &&
|
|
24610
|
+
basePricePerPaxType.map(function (ppt, index) {
|
|
24611
|
+
return React__default['default'].createElement(
|
|
24612
|
+
React__default['default'].Fragment,
|
|
24613
|
+
{ key: ''.concat(ppt.paxType, '-').concat(index) },
|
|
24614
|
+
React__default['default'].createElement(
|
|
24615
|
+
'div',
|
|
24616
|
+
{ className: 'pricing-summary__row' },
|
|
24617
|
+
React__default['default'].createElement(
|
|
24618
|
+
'div',
|
|
24619
|
+
{ className: 'pricing-summary__property' },
|
|
24620
|
+
ppt.numberOfPax,
|
|
24621
|
+
' ',
|
|
24622
|
+
getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)
|
|
24623
|
+
),
|
|
24624
|
+
React__default['default'].createElement(
|
|
24625
|
+
'div',
|
|
24626
|
+
{ className: 'pricing-summary__value' },
|
|
24627
|
+
formatPrice(ppt.pricePerPaxType, currencyCode)
|
|
24628
|
+
)
|
|
24629
|
+
),
|
|
24630
|
+
ppt.details.map(function (detail, dIndex) {
|
|
24631
|
+
return React__default['default'].createElement(
|
|
24632
|
+
'div',
|
|
24633
|
+
{
|
|
24634
|
+
className: 'pricing-summary__row pricing-summary__row--sub',
|
|
24635
|
+
key: ''.concat(ppt.paxType, '-').concat(index, '-').concat(dIndex)
|
|
24636
|
+
},
|
|
24637
|
+
React__default['default'].createElement(
|
|
24638
|
+
'div',
|
|
24639
|
+
{ className: 'pricing-summary__property' },
|
|
24640
|
+
detail.numberOfPax,
|
|
24641
|
+
'x ',
|
|
24642
|
+
detail.description
|
|
24643
|
+
),
|
|
24644
|
+
React__default['default'].createElement(
|
|
24645
|
+
'div',
|
|
24646
|
+
{ className: 'pricing-summary__value' },
|
|
24647
|
+
formatPrice(detail.price / detail.numberOfPax, currencyCode)
|
|
24648
|
+
)
|
|
24649
|
+
);
|
|
24650
|
+
})
|
|
24651
|
+
);
|
|
24652
|
+
})
|
|
24035
24653
|
),
|
|
24036
24654
|
!lodash.isEmpty(includedCosts) &&
|
|
24037
24655
|
React__default['default'].createElement(
|
|
@@ -24096,10 +24714,54 @@ var Sidebar = function (_a) {
|
|
|
24096
24714
|
{ className: 'pricing-summary__row' },
|
|
24097
24715
|
React__default['default'].createElement(
|
|
24098
24716
|
'div',
|
|
24099
|
-
{ className: '
|
|
24717
|
+
{ className: 'pricing-summary__property' },
|
|
24100
24718
|
(_a = priceDetail.accommodationName) !== null && _a !== void 0 ? _a : priceDetail.accommodationCode
|
|
24101
24719
|
)
|
|
24102
|
-
)
|
|
24720
|
+
),
|
|
24721
|
+
seperateExtraPricePerPaxType &&
|
|
24722
|
+
seperateExtraPricePerPaxType.map(function (ppt, index) {
|
|
24723
|
+
return React__default['default'].createElement(
|
|
24724
|
+
React__default['default'].Fragment,
|
|
24725
|
+
{ key: ''.concat(ppt.paxType, '-').concat(index) },
|
|
24726
|
+
React__default['default'].createElement(
|
|
24727
|
+
'div',
|
|
24728
|
+
{ className: 'pricing-summary__row' },
|
|
24729
|
+
React__default['default'].createElement(
|
|
24730
|
+
'div',
|
|
24731
|
+
{ className: 'pricing-summary__property' },
|
|
24732
|
+
ppt.numberOfPax,
|
|
24733
|
+
' ',
|
|
24734
|
+
getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)
|
|
24735
|
+
),
|
|
24736
|
+
React__default['default'].createElement(
|
|
24737
|
+
'div',
|
|
24738
|
+
{ className: 'pricing-summary__value' },
|
|
24739
|
+
formatPrice(ppt.pricePerPaxType, currencyCode)
|
|
24740
|
+
)
|
|
24741
|
+
),
|
|
24742
|
+
ppt.details.map(function (detail, dIndex) {
|
|
24743
|
+
return React__default['default'].createElement(
|
|
24744
|
+
'div',
|
|
24745
|
+
{
|
|
24746
|
+
className: 'pricing-summary__row pricing-summary__row--sub',
|
|
24747
|
+
key: ''.concat(ppt.paxType, '-').concat(index, '-').concat(dIndex)
|
|
24748
|
+
},
|
|
24749
|
+
React__default['default'].createElement(
|
|
24750
|
+
'div',
|
|
24751
|
+
{ className: 'pricing-summary__property' },
|
|
24752
|
+
detail.numberOfPax,
|
|
24753
|
+
'x ',
|
|
24754
|
+
detail.description
|
|
24755
|
+
),
|
|
24756
|
+
React__default['default'].createElement(
|
|
24757
|
+
'div',
|
|
24758
|
+
{ className: 'pricing-summary__value' },
|
|
24759
|
+
formatPrice(detail.price / detail.numberOfPax, currencyCode)
|
|
24760
|
+
)
|
|
24761
|
+
);
|
|
24762
|
+
})
|
|
24763
|
+
);
|
|
24764
|
+
})
|
|
24103
24765
|
);
|
|
24104
24766
|
})
|
|
24105
24767
|
)
|
|
@@ -24216,7 +24878,8 @@ var SidebarContainer = function (_a) {
|
|
|
24216
24878
|
var _f = React.useContext(SettingsContext),
|
|
24217
24879
|
sidebarHeaderComponent = _f.sidebarHeaderComponent,
|
|
24218
24880
|
sidebarFooterComponent = _f.sidebarFooterComponent,
|
|
24219
|
-
loaderComponent = _f.loaderComponent
|
|
24881
|
+
loaderComponent = _f.loaderComponent,
|
|
24882
|
+
showPricesPerPaxType = _f.showPricesPerPaxType;
|
|
24220
24883
|
var bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
|
|
24221
24884
|
var rooms = reactRedux.useSelector(selectFormRooms);
|
|
24222
24885
|
var travelerRooms = getTravelersText(rooms);
|
|
@@ -24240,12 +24903,6 @@ var SidebarContainer = function (_a) {
|
|
|
24240
24903
|
var includedServiceTypes = reactRedux.useSelector(selectIncludedServiceTypes);
|
|
24241
24904
|
var isUnavailable = reactRedux.useSelector(selectIsUnavailable) || false;
|
|
24242
24905
|
var isLoading = isFetchingProductOptions || isFetchingPriceDetails;
|
|
24243
|
-
var requestRooms = reactRedux.useSelector(selectRequestRooms);
|
|
24244
|
-
requestRooms === null || requestRooms === void 0
|
|
24245
|
-
? void 0
|
|
24246
|
-
: requestRooms.flatMap(function (x) {
|
|
24247
|
-
return x.pax;
|
|
24248
|
-
});
|
|
24249
24906
|
return React__default['default'].createElement(Sidebar, {
|
|
24250
24907
|
productName: productName,
|
|
24251
24908
|
thumbnailUrl: thumbnailUrl,
|
|
@@ -24271,8 +24928,8 @@ var SidebarContainer = function (_a) {
|
|
|
24271
24928
|
footerComponent: sidebarFooterComponent !== null && sidebarFooterComponent !== void 0 ? sidebarFooterComponent : undefined,
|
|
24272
24929
|
loaderComponent: loaderComponent !== null && loaderComponent !== void 0 ? loaderComponent : undefined,
|
|
24273
24930
|
isUnavailable: isUnavailable,
|
|
24274
|
-
basePricePerPaxType: reactRedux.useSelector(selectBasePricePerPaxType),
|
|
24275
|
-
seperateExtraPricePerPaxType: reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType)
|
|
24931
|
+
basePricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectBasePricePerPaxType) : undefined,
|
|
24932
|
+
seperateExtraPricePerPaxType: showPricesPerPaxType ? reactRedux.useSelector(selectSeparateExtraPriceDetailsPerPaxType) : undefined
|
|
24276
24933
|
});
|
|
24277
24934
|
};
|
|
24278
24935
|
|
|
@@ -32610,7 +33267,9 @@ var QSMContainer = function () {
|
|
|
32610
33267
|
fieldConfig: openJawReturnDestinationField,
|
|
32611
33268
|
showReverse: openJawReturnDestinationField.showReverse
|
|
32612
33269
|
}),
|
|
32613
|
-
qsmType == 'hotel'
|
|
33270
|
+
(qsmType == 'hotel' || qsmType == 'hotel-flight') &&
|
|
33271
|
+
destination &&
|
|
33272
|
+
React__default['default'].createElement(SearchInputGroup, { fieldConfig: destination }),
|
|
32614
33273
|
React__default['default'].createElement(Dates, { value: dateRange, onChange: handleDateChange }),
|
|
32615
33274
|
askTravelers && React__default['default'].createElement(TravelInputGroup, null),
|
|
32616
33275
|
React__default['default'].createElement(
|
|
@@ -36590,7 +37249,6 @@ var FlyIn = function (_a) {
|
|
|
36590
37249
|
'div',
|
|
36591
37250
|
{ className: 'flyin__content-cards' },
|
|
36592
37251
|
uniqueOutwardFlights.map(function (flightOption, index) {
|
|
36593
|
-
var _a;
|
|
36594
37252
|
var firstSegment = lodash.first(flightOption.outward.segments);
|
|
36595
37253
|
if (!firstSegment) return null;
|
|
36596
37254
|
var diff = getOutwardPriceDiff(firstSegment.metaData.fareCode);
|
|
@@ -36776,9 +37434,9 @@ var FlyIn = function (_a) {
|
|
|
36776
37434
|
},
|
|
36777
37435
|
React__default['default'].createElement(
|
|
36778
37436
|
'div',
|
|
36779
|
-
{ className: 'cta cta--selected' },
|
|
37437
|
+
{ className: 'cta '.concat(selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
36780
37438
|
' ',
|
|
36781
|
-
selectedOutwardFareCode ===
|
|
37439
|
+
selectedOutwardFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
36782
37440
|
)
|
|
36783
37441
|
)
|
|
36784
37442
|
);
|
|
@@ -36882,7 +37540,6 @@ var FlyIn = function (_a) {
|
|
|
36882
37540
|
'div',
|
|
36883
37541
|
{ className: 'flyin__content-cards' },
|
|
36884
37542
|
uniqueReturnFlights.map(function (flightOption, index) {
|
|
36885
|
-
var _a;
|
|
36886
37543
|
var firstSegment = lodash.first(flightOption.return.segments);
|
|
36887
37544
|
if (!firstSegment) return null;
|
|
36888
37545
|
var diff = getReturnPriceDiff(firstSegment.metaData.fareCode);
|
|
@@ -37068,9 +37725,9 @@ var FlyIn = function (_a) {
|
|
|
37068
37725
|
},
|
|
37069
37726
|
React__default['default'].createElement(
|
|
37070
37727
|
'div',
|
|
37071
|
-
{ className: 'cta cta--selected' },
|
|
37728
|
+
{ className: 'cta '.concat(selectedReturnFareCode === firstSegment.metaData.fareCode ? 'cta--selected' : '') },
|
|
37072
37729
|
' ',
|
|
37073
|
-
|
|
37730
|
+
selectedReturnFareCode === firstSegment.metaData.fareCode ? 'Selected' : 'Select'
|
|
37074
37731
|
)
|
|
37075
37732
|
)
|
|
37076
37733
|
);
|
|
@@ -41203,6 +41860,3010 @@ var ImageCardGrid = function (_a) {
|
|
|
41203
41860
|
);
|
|
41204
41861
|
};
|
|
41205
41862
|
|
|
41863
|
+
/**
|
|
41864
|
+
* Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>
|
|
41865
|
+
*/
|
|
41866
|
+
|
|
41867
|
+
function Cache(maxSize) {
|
|
41868
|
+
this._maxSize = maxSize;
|
|
41869
|
+
this.clear();
|
|
41870
|
+
}
|
|
41871
|
+
Cache.prototype.clear = function () {
|
|
41872
|
+
this._size = 0;
|
|
41873
|
+
this._values = Object.create(null);
|
|
41874
|
+
};
|
|
41875
|
+
Cache.prototype.get = function (key) {
|
|
41876
|
+
return this._values[key];
|
|
41877
|
+
};
|
|
41878
|
+
Cache.prototype.set = function (key, value) {
|
|
41879
|
+
this._size >= this._maxSize && this.clear();
|
|
41880
|
+
if (!(key in this._values)) this._size++;
|
|
41881
|
+
|
|
41882
|
+
return (this._values[key] = value);
|
|
41883
|
+
};
|
|
41884
|
+
|
|
41885
|
+
var SPLIT_REGEX = /[^.^\]^[]+|(?=\[\]|\.\.)/g,
|
|
41886
|
+
DIGIT_REGEX = /^\d+$/,
|
|
41887
|
+
LEAD_DIGIT_REGEX = /^\d/,
|
|
41888
|
+
SPEC_CHAR_REGEX = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,
|
|
41889
|
+
CLEAN_QUOTES_REGEX = /^\s*(['"]?)(.*?)(\1)\s*$/,
|
|
41890
|
+
MAX_CACHE_SIZE = 512;
|
|
41891
|
+
|
|
41892
|
+
var pathCache = new Cache(MAX_CACHE_SIZE),
|
|
41893
|
+
setCache = new Cache(MAX_CACHE_SIZE),
|
|
41894
|
+
getCache = new Cache(MAX_CACHE_SIZE);
|
|
41895
|
+
|
|
41896
|
+
var propertyExpr = {
|
|
41897
|
+
Cache: Cache,
|
|
41898
|
+
|
|
41899
|
+
split: split,
|
|
41900
|
+
|
|
41901
|
+
normalizePath: normalizePath,
|
|
41902
|
+
|
|
41903
|
+
setter: function (path) {
|
|
41904
|
+
var parts = normalizePath(path);
|
|
41905
|
+
|
|
41906
|
+
return (
|
|
41907
|
+
setCache.get(path) ||
|
|
41908
|
+
setCache.set(path, function setter(obj, value) {
|
|
41909
|
+
var index = 0;
|
|
41910
|
+
var len = parts.length;
|
|
41911
|
+
var data = obj;
|
|
41912
|
+
|
|
41913
|
+
while (index < len - 1) {
|
|
41914
|
+
var part = parts[index];
|
|
41915
|
+
if (part === '__proto__' || part === 'constructor' || part === 'prototype') {
|
|
41916
|
+
return obj;
|
|
41917
|
+
}
|
|
41918
|
+
|
|
41919
|
+
data = data[parts[index++]];
|
|
41920
|
+
}
|
|
41921
|
+
data[parts[index]] = value;
|
|
41922
|
+
})
|
|
41923
|
+
);
|
|
41924
|
+
},
|
|
41925
|
+
|
|
41926
|
+
getter: function (path, safe) {
|
|
41927
|
+
var parts = normalizePath(path);
|
|
41928
|
+
return (
|
|
41929
|
+
getCache.get(path) ||
|
|
41930
|
+
getCache.set(path, function getter(data) {
|
|
41931
|
+
var index = 0,
|
|
41932
|
+
len = parts.length;
|
|
41933
|
+
while (index < len) {
|
|
41934
|
+
if (data != null || !safe) data = data[parts[index++]];
|
|
41935
|
+
else return;
|
|
41936
|
+
}
|
|
41937
|
+
return data;
|
|
41938
|
+
})
|
|
41939
|
+
);
|
|
41940
|
+
},
|
|
41941
|
+
|
|
41942
|
+
join: function (segments) {
|
|
41943
|
+
return segments.reduce(function (path, part) {
|
|
41944
|
+
return path + (isQuoted(part) || DIGIT_REGEX.test(part) ? '[' + part + ']' : (path ? '.' : '') + part);
|
|
41945
|
+
}, '');
|
|
41946
|
+
},
|
|
41947
|
+
|
|
41948
|
+
forEach: function (path, cb, thisArg) {
|
|
41949
|
+
forEach(Array.isArray(path) ? path : split(path), cb, thisArg);
|
|
41950
|
+
}
|
|
41951
|
+
};
|
|
41952
|
+
|
|
41953
|
+
function normalizePath(path) {
|
|
41954
|
+
return (
|
|
41955
|
+
pathCache.get(path) ||
|
|
41956
|
+
pathCache.set(
|
|
41957
|
+
path,
|
|
41958
|
+
split(path).map(function (part) {
|
|
41959
|
+
return part.replace(CLEAN_QUOTES_REGEX, '$2');
|
|
41960
|
+
})
|
|
41961
|
+
)
|
|
41962
|
+
);
|
|
41963
|
+
}
|
|
41964
|
+
|
|
41965
|
+
function split(path) {
|
|
41966
|
+
return path.match(SPLIT_REGEX) || [''];
|
|
41967
|
+
}
|
|
41968
|
+
|
|
41969
|
+
function forEach(parts, iter, thisArg) {
|
|
41970
|
+
var len = parts.length,
|
|
41971
|
+
part,
|
|
41972
|
+
idx,
|
|
41973
|
+
isArray,
|
|
41974
|
+
isBracket;
|
|
41975
|
+
|
|
41976
|
+
for (idx = 0; idx < len; idx++) {
|
|
41977
|
+
part = parts[idx];
|
|
41978
|
+
|
|
41979
|
+
if (part) {
|
|
41980
|
+
if (shouldBeQuoted(part)) {
|
|
41981
|
+
part = '"' + part + '"';
|
|
41982
|
+
}
|
|
41983
|
+
|
|
41984
|
+
isBracket = isQuoted(part);
|
|
41985
|
+
isArray = !isBracket && /^\d+$/.test(part);
|
|
41986
|
+
|
|
41987
|
+
iter.call(thisArg, part, isBracket, isArray, idx, parts);
|
|
41988
|
+
}
|
|
41989
|
+
}
|
|
41990
|
+
}
|
|
41991
|
+
|
|
41992
|
+
function isQuoted(str) {
|
|
41993
|
+
return typeof str === 'string' && str && ["'", '"'].indexOf(str.charAt(0)) !== -1;
|
|
41994
|
+
}
|
|
41995
|
+
|
|
41996
|
+
function hasLeadingNumber(part) {
|
|
41997
|
+
return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX);
|
|
41998
|
+
}
|
|
41999
|
+
|
|
42000
|
+
function hasSpecialChars(part) {
|
|
42001
|
+
return SPEC_CHAR_REGEX.test(part);
|
|
42002
|
+
}
|
|
42003
|
+
|
|
42004
|
+
function shouldBeQuoted(part) {
|
|
42005
|
+
return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part));
|
|
42006
|
+
}
|
|
42007
|
+
|
|
42008
|
+
const reWords =
|
|
42009
|
+
/[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;
|
|
42010
|
+
|
|
42011
|
+
const words = (str) => str.match(reWords) || [];
|
|
42012
|
+
|
|
42013
|
+
const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
|
|
42014
|
+
|
|
42015
|
+
const join = (str, d) => words(str).join(d).toLowerCase();
|
|
42016
|
+
|
|
42017
|
+
const camelCase = (str) => words(str).reduce((acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`, '');
|
|
42018
|
+
|
|
42019
|
+
const pascalCase = (str) => upperFirst(camelCase(str));
|
|
42020
|
+
|
|
42021
|
+
const snakeCase = (str) => join(str, '_');
|
|
42022
|
+
|
|
42023
|
+
const kebabCase = (str) => join(str, '-');
|
|
42024
|
+
|
|
42025
|
+
const sentenceCase = (str) => upperFirst(join(str, ' '));
|
|
42026
|
+
|
|
42027
|
+
const titleCase = (str) => words(str).map(upperFirst).join(' ');
|
|
42028
|
+
|
|
42029
|
+
var tinyCase = {
|
|
42030
|
+
words,
|
|
42031
|
+
upperFirst,
|
|
42032
|
+
camelCase,
|
|
42033
|
+
pascalCase,
|
|
42034
|
+
snakeCase,
|
|
42035
|
+
kebabCase,
|
|
42036
|
+
sentenceCase,
|
|
42037
|
+
titleCase
|
|
42038
|
+
};
|
|
42039
|
+
|
|
42040
|
+
var toposort$2 = { exports: {} };
|
|
42041
|
+
|
|
42042
|
+
/**
|
|
42043
|
+
* Topological sorting function
|
|
42044
|
+
*
|
|
42045
|
+
* @param {Array} edges
|
|
42046
|
+
* @returns {Array}
|
|
42047
|
+
*/
|
|
42048
|
+
|
|
42049
|
+
toposort$2.exports = function (edges) {
|
|
42050
|
+
return toposort(uniqueNodes(edges), edges);
|
|
42051
|
+
};
|
|
42052
|
+
|
|
42053
|
+
toposort$2.exports.array = toposort;
|
|
42054
|
+
|
|
42055
|
+
function toposort(nodes, edges) {
|
|
42056
|
+
var cursor = nodes.length,
|
|
42057
|
+
sorted = new Array(cursor),
|
|
42058
|
+
visited = {},
|
|
42059
|
+
i = cursor,
|
|
42060
|
+
// Better data structures make algorithm much faster.
|
|
42061
|
+
outgoingEdges = makeOutgoingEdges(edges),
|
|
42062
|
+
nodesHash = makeNodesHash(nodes);
|
|
42063
|
+
|
|
42064
|
+
// check for unknown nodes
|
|
42065
|
+
edges.forEach(function (edge) {
|
|
42066
|
+
if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
|
|
42067
|
+
throw new Error('Unknown node. There is an unknown node in the supplied edges.');
|
|
42068
|
+
}
|
|
42069
|
+
});
|
|
42070
|
+
|
|
42071
|
+
while (i--) {
|
|
42072
|
+
if (!visited[i]) visit(nodes[i], i, new Set());
|
|
42073
|
+
}
|
|
42074
|
+
|
|
42075
|
+
return sorted;
|
|
42076
|
+
|
|
42077
|
+
function visit(node, i, predecessors) {
|
|
42078
|
+
if (predecessors.has(node)) {
|
|
42079
|
+
var nodeRep;
|
|
42080
|
+
try {
|
|
42081
|
+
nodeRep = ', node was:' + JSON.stringify(node);
|
|
42082
|
+
} catch (e) {
|
|
42083
|
+
nodeRep = '';
|
|
42084
|
+
}
|
|
42085
|
+
throw new Error('Cyclic dependency' + nodeRep);
|
|
42086
|
+
}
|
|
42087
|
+
|
|
42088
|
+
if (!nodesHash.has(node)) {
|
|
42089
|
+
throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: ' + JSON.stringify(node));
|
|
42090
|
+
}
|
|
42091
|
+
|
|
42092
|
+
if (visited[i]) return;
|
|
42093
|
+
visited[i] = true;
|
|
42094
|
+
|
|
42095
|
+
var outgoing = outgoingEdges.get(node) || new Set();
|
|
42096
|
+
outgoing = Array.from(outgoing);
|
|
42097
|
+
|
|
42098
|
+
if ((i = outgoing.length)) {
|
|
42099
|
+
predecessors.add(node);
|
|
42100
|
+
do {
|
|
42101
|
+
var child = outgoing[--i];
|
|
42102
|
+
visit(child, nodesHash.get(child), predecessors);
|
|
42103
|
+
} while (i);
|
|
42104
|
+
predecessors.delete(node);
|
|
42105
|
+
}
|
|
42106
|
+
|
|
42107
|
+
sorted[--cursor] = node;
|
|
42108
|
+
}
|
|
42109
|
+
}
|
|
42110
|
+
|
|
42111
|
+
function uniqueNodes(arr) {
|
|
42112
|
+
var res = new Set();
|
|
42113
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
42114
|
+
var edge = arr[i];
|
|
42115
|
+
res.add(edge[0]);
|
|
42116
|
+
res.add(edge[1]);
|
|
42117
|
+
}
|
|
42118
|
+
return Array.from(res);
|
|
42119
|
+
}
|
|
42120
|
+
|
|
42121
|
+
function makeOutgoingEdges(arr) {
|
|
42122
|
+
var edges = new Map();
|
|
42123
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
42124
|
+
var edge = arr[i];
|
|
42125
|
+
if (!edges.has(edge[0])) edges.set(edge[0], new Set());
|
|
42126
|
+
if (!edges.has(edge[1])) edges.set(edge[1], new Set());
|
|
42127
|
+
edges.get(edge[0]).add(edge[1]);
|
|
42128
|
+
}
|
|
42129
|
+
return edges;
|
|
42130
|
+
}
|
|
42131
|
+
|
|
42132
|
+
function makeNodesHash(arr) {
|
|
42133
|
+
var res = new Map();
|
|
42134
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
42135
|
+
res.set(arr[i], i);
|
|
42136
|
+
}
|
|
42137
|
+
return res;
|
|
42138
|
+
}
|
|
42139
|
+
|
|
42140
|
+
var toposort$1 = toposort$2.exports;
|
|
42141
|
+
|
|
42142
|
+
const toString$1 = Object.prototype.toString;
|
|
42143
|
+
const errorToString = Error.prototype.toString;
|
|
42144
|
+
const regExpToString = RegExp.prototype.toString;
|
|
42145
|
+
const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';
|
|
42146
|
+
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
|
42147
|
+
function printNumber(val) {
|
|
42148
|
+
if (val != +val) return 'NaN';
|
|
42149
|
+
const isNegativeZero = val === 0 && 1 / val < 0;
|
|
42150
|
+
return isNegativeZero ? '-0' : '' + val;
|
|
42151
|
+
}
|
|
42152
|
+
function printSimpleValue(val, quoteStrings = false) {
|
|
42153
|
+
if (val == null || val === true || val === false) return '' + val;
|
|
42154
|
+
const typeOf = typeof val;
|
|
42155
|
+
if (typeOf === 'number') return printNumber(val);
|
|
42156
|
+
if (typeOf === 'string') return quoteStrings ? `"${val}"` : val;
|
|
42157
|
+
if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';
|
|
42158
|
+
if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');
|
|
42159
|
+
const tag = toString$1.call(val).slice(8, -1);
|
|
42160
|
+
if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);
|
|
42161
|
+
if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';
|
|
42162
|
+
if (tag === 'RegExp') return regExpToString.call(val);
|
|
42163
|
+
return null;
|
|
42164
|
+
}
|
|
42165
|
+
function printValue(value, quoteStrings) {
|
|
42166
|
+
let result = printSimpleValue(value, quoteStrings);
|
|
42167
|
+
if (result !== null) return result;
|
|
42168
|
+
return JSON.stringify(
|
|
42169
|
+
value,
|
|
42170
|
+
function (key, value) {
|
|
42171
|
+
let result = printSimpleValue(this[key], quoteStrings);
|
|
42172
|
+
if (result !== null) return result;
|
|
42173
|
+
return value;
|
|
42174
|
+
},
|
|
42175
|
+
2
|
|
42176
|
+
);
|
|
42177
|
+
}
|
|
42178
|
+
|
|
42179
|
+
function toArray(value) {
|
|
42180
|
+
return value == null ? [] : [].concat(value);
|
|
42181
|
+
}
|
|
42182
|
+
|
|
42183
|
+
let _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;
|
|
42184
|
+
let strReg = /\$\{\s*(\w+)\s*\}/g;
|
|
42185
|
+
_Symbol$toStringTag = Symbol.toStringTag;
|
|
42186
|
+
class ValidationErrorNoStack {
|
|
42187
|
+
constructor(errorOrErrors, value, field, type) {
|
|
42188
|
+
this.name = void 0;
|
|
42189
|
+
this.message = void 0;
|
|
42190
|
+
this.value = void 0;
|
|
42191
|
+
this.path = void 0;
|
|
42192
|
+
this.type = void 0;
|
|
42193
|
+
this.params = void 0;
|
|
42194
|
+
this.errors = void 0;
|
|
42195
|
+
this.inner = void 0;
|
|
42196
|
+
this[_Symbol$toStringTag] = 'Error';
|
|
42197
|
+
this.name = 'ValidationError';
|
|
42198
|
+
this.value = value;
|
|
42199
|
+
this.path = field;
|
|
42200
|
+
this.type = type;
|
|
42201
|
+
this.errors = [];
|
|
42202
|
+
this.inner = [];
|
|
42203
|
+
toArray(errorOrErrors).forEach((err) => {
|
|
42204
|
+
if (ValidationError.isError(err)) {
|
|
42205
|
+
this.errors.push(...err.errors);
|
|
42206
|
+
const innerErrors = err.inner.length ? err.inner : [err];
|
|
42207
|
+
this.inner.push(...innerErrors);
|
|
42208
|
+
} else {
|
|
42209
|
+
this.errors.push(err);
|
|
42210
|
+
}
|
|
42211
|
+
});
|
|
42212
|
+
this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];
|
|
42213
|
+
}
|
|
42214
|
+
}
|
|
42215
|
+
_Symbol$hasInstance = Symbol.hasInstance;
|
|
42216
|
+
_Symbol$toStringTag2 = Symbol.toStringTag;
|
|
42217
|
+
class ValidationError extends Error {
|
|
42218
|
+
static formatError(message, params) {
|
|
42219
|
+
// Attempt to make the path more friendly for error message interpolation.
|
|
42220
|
+
const path = params.label || params.path || 'this';
|
|
42221
|
+
// Store the original path under `originalPath` so it isn't lost to custom
|
|
42222
|
+
// message functions; e.g., ones provided in `setLocale()` calls.
|
|
42223
|
+
params = Object.assign({}, params, {
|
|
42224
|
+
path,
|
|
42225
|
+
originalPath: params.path
|
|
42226
|
+
});
|
|
42227
|
+
if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));
|
|
42228
|
+
if (typeof message === 'function') return message(params);
|
|
42229
|
+
return message;
|
|
42230
|
+
}
|
|
42231
|
+
static isError(err) {
|
|
42232
|
+
return err && err.name === 'ValidationError';
|
|
42233
|
+
}
|
|
42234
|
+
constructor(errorOrErrors, value, field, type, disableStack) {
|
|
42235
|
+
const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);
|
|
42236
|
+
if (disableStack) {
|
|
42237
|
+
return errorNoStack;
|
|
42238
|
+
}
|
|
42239
|
+
super();
|
|
42240
|
+
this.value = void 0;
|
|
42241
|
+
this.path = void 0;
|
|
42242
|
+
this.type = void 0;
|
|
42243
|
+
this.params = void 0;
|
|
42244
|
+
this.errors = [];
|
|
42245
|
+
this.inner = [];
|
|
42246
|
+
this[_Symbol$toStringTag2] = 'Error';
|
|
42247
|
+
this.name = errorNoStack.name;
|
|
42248
|
+
this.message = errorNoStack.message;
|
|
42249
|
+
this.type = errorNoStack.type;
|
|
42250
|
+
this.value = errorNoStack.value;
|
|
42251
|
+
this.path = errorNoStack.path;
|
|
42252
|
+
this.errors = errorNoStack.errors;
|
|
42253
|
+
this.inner = errorNoStack.inner;
|
|
42254
|
+
if (Error.captureStackTrace) {
|
|
42255
|
+
Error.captureStackTrace(this, ValidationError);
|
|
42256
|
+
}
|
|
42257
|
+
}
|
|
42258
|
+
static [_Symbol$hasInstance](inst) {
|
|
42259
|
+
return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);
|
|
42260
|
+
}
|
|
42261
|
+
}
|
|
42262
|
+
|
|
42263
|
+
let mixed = {
|
|
42264
|
+
default: '${path} is invalid',
|
|
42265
|
+
required: '${path} is a required field',
|
|
42266
|
+
defined: '${path} must be defined',
|
|
42267
|
+
notNull: '${path} cannot be null',
|
|
42268
|
+
oneOf: '${path} must be one of the following values: ${values}',
|
|
42269
|
+
notOneOf: '${path} must not be one of the following values: ${values}',
|
|
42270
|
+
notType: ({ path, type, value, originalValue }) => {
|
|
42271
|
+
const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \`${printValue(originalValue, true)}\`).` : '.';
|
|
42272
|
+
return type !== 'mixed'
|
|
42273
|
+
? `${path} must be a \`${type}\` type, ` + `but the final value was: \`${printValue(value, true)}\`` + castMsg
|
|
42274
|
+
: `${path} must match the configured type. ` + `The validated value was: \`${printValue(value, true)}\`` + castMsg;
|
|
42275
|
+
}
|
|
42276
|
+
};
|
|
42277
|
+
let string = {
|
|
42278
|
+
length: '${path} must be exactly ${length} characters',
|
|
42279
|
+
min: '${path} must be at least ${min} characters',
|
|
42280
|
+
max: '${path} must be at most ${max} characters',
|
|
42281
|
+
matches: '${path} must match the following: "${regex}"',
|
|
42282
|
+
email: '${path} must be a valid email',
|
|
42283
|
+
url: '${path} must be a valid URL',
|
|
42284
|
+
uuid: '${path} must be a valid UUID',
|
|
42285
|
+
datetime: '${path} must be a valid ISO date-time',
|
|
42286
|
+
datetime_precision: '${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits',
|
|
42287
|
+
datetime_offset: '${path} must be a valid ISO date-time with UTC "Z" timezone',
|
|
42288
|
+
trim: '${path} must be a trimmed string',
|
|
42289
|
+
lowercase: '${path} must be a lowercase string',
|
|
42290
|
+
uppercase: '${path} must be a upper case string'
|
|
42291
|
+
};
|
|
42292
|
+
let number = {
|
|
42293
|
+
min: '${path} must be greater than or equal to ${min}',
|
|
42294
|
+
max: '${path} must be less than or equal to ${max}',
|
|
42295
|
+
lessThan: '${path} must be less than ${less}',
|
|
42296
|
+
moreThan: '${path} must be greater than ${more}',
|
|
42297
|
+
positive: '${path} must be a positive number',
|
|
42298
|
+
negative: '${path} must be a negative number',
|
|
42299
|
+
integer: '${path} must be an integer'
|
|
42300
|
+
};
|
|
42301
|
+
let date = {
|
|
42302
|
+
min: '${path} field must be later than ${min}',
|
|
42303
|
+
max: '${path} field must be at earlier than ${max}'
|
|
42304
|
+
};
|
|
42305
|
+
let boolean = {
|
|
42306
|
+
isValue: '${path} field must be ${value}'
|
|
42307
|
+
};
|
|
42308
|
+
let object = {
|
|
42309
|
+
noUnknown: '${path} field has unspecified keys: ${unknown}',
|
|
42310
|
+
exact: '${path} object contains unknown properties: ${properties}'
|
|
42311
|
+
};
|
|
42312
|
+
let array = {
|
|
42313
|
+
min: '${path} field must have at least ${min} items',
|
|
42314
|
+
max: '${path} field must have less than or equal to ${max} items',
|
|
42315
|
+
length: '${path} must have ${length} items'
|
|
42316
|
+
};
|
|
42317
|
+
let tuple = {
|
|
42318
|
+
notType: (params) => {
|
|
42319
|
+
const { path, value, spec } = params;
|
|
42320
|
+
const typeLen = spec.types.length;
|
|
42321
|
+
if (Array.isArray(value)) {
|
|
42322
|
+
if (value.length < typeLen)
|
|
42323
|
+
return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
|
|
42324
|
+
if (value.length > typeLen)
|
|
42325
|
+
return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
|
|
42326
|
+
}
|
|
42327
|
+
return ValidationError.formatError(mixed.notType, params);
|
|
42328
|
+
}
|
|
42329
|
+
};
|
|
42330
|
+
Object.assign(Object.create(null), {
|
|
42331
|
+
mixed,
|
|
42332
|
+
string,
|
|
42333
|
+
number,
|
|
42334
|
+
date,
|
|
42335
|
+
object,
|
|
42336
|
+
array,
|
|
42337
|
+
boolean,
|
|
42338
|
+
tuple
|
|
42339
|
+
});
|
|
42340
|
+
|
|
42341
|
+
const isSchema = (obj) => obj && obj.__isYupSchema__;
|
|
42342
|
+
|
|
42343
|
+
class Condition {
|
|
42344
|
+
static fromOptions(refs, config) {
|
|
42345
|
+
if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');
|
|
42346
|
+
let { is, then, otherwise } = config;
|
|
42347
|
+
let check = typeof is === 'function' ? is : (...values) => values.every((value) => value === is);
|
|
42348
|
+
return new Condition(refs, (values, schema) => {
|
|
42349
|
+
var _branch;
|
|
42350
|
+
let branch = check(...values) ? then : otherwise;
|
|
42351
|
+
return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;
|
|
42352
|
+
});
|
|
42353
|
+
}
|
|
42354
|
+
constructor(refs, builder) {
|
|
42355
|
+
this.fn = void 0;
|
|
42356
|
+
this.refs = refs;
|
|
42357
|
+
this.refs = refs;
|
|
42358
|
+
this.fn = builder;
|
|
42359
|
+
}
|
|
42360
|
+
resolve(base, options) {
|
|
42361
|
+
let values = this.refs.map((ref) =>
|
|
42362
|
+
// TODO: ? operator here?
|
|
42363
|
+
ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
|
|
42364
|
+
);
|
|
42365
|
+
let schema = this.fn(values, base, options);
|
|
42366
|
+
if (
|
|
42367
|
+
schema === undefined ||
|
|
42368
|
+
// @ts-ignore this can be base
|
|
42369
|
+
schema === base
|
|
42370
|
+
) {
|
|
42371
|
+
return base;
|
|
42372
|
+
}
|
|
42373
|
+
if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');
|
|
42374
|
+
return schema.resolve(options);
|
|
42375
|
+
}
|
|
42376
|
+
}
|
|
42377
|
+
|
|
42378
|
+
const prefixes = {
|
|
42379
|
+
context: '$',
|
|
42380
|
+
value: '.'
|
|
42381
|
+
};
|
|
42382
|
+
class Reference {
|
|
42383
|
+
constructor(key, options = {}) {
|
|
42384
|
+
this.key = void 0;
|
|
42385
|
+
this.isContext = void 0;
|
|
42386
|
+
this.isValue = void 0;
|
|
42387
|
+
this.isSibling = void 0;
|
|
42388
|
+
this.path = void 0;
|
|
42389
|
+
this.getter = void 0;
|
|
42390
|
+
this.map = void 0;
|
|
42391
|
+
if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);
|
|
42392
|
+
this.key = key.trim();
|
|
42393
|
+
if (key === '') throw new TypeError('ref must be a non-empty string');
|
|
42394
|
+
this.isContext = this.key[0] === prefixes.context;
|
|
42395
|
+
this.isValue = this.key[0] === prefixes.value;
|
|
42396
|
+
this.isSibling = !this.isContext && !this.isValue;
|
|
42397
|
+
let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';
|
|
42398
|
+
this.path = this.key.slice(prefix.length);
|
|
42399
|
+
this.getter = this.path && propertyExpr.getter(this.path, true);
|
|
42400
|
+
this.map = options.map;
|
|
42401
|
+
}
|
|
42402
|
+
getValue(value, parent, context) {
|
|
42403
|
+
let result = this.isContext ? context : this.isValue ? value : parent;
|
|
42404
|
+
if (this.getter) result = this.getter(result || {});
|
|
42405
|
+
if (this.map) result = this.map(result);
|
|
42406
|
+
return result;
|
|
42407
|
+
}
|
|
42408
|
+
|
|
42409
|
+
/**
|
|
42410
|
+
*
|
|
42411
|
+
* @param {*} value
|
|
42412
|
+
* @param {Object} options
|
|
42413
|
+
* @param {Object=} options.context
|
|
42414
|
+
* @param {Object=} options.parent
|
|
42415
|
+
*/
|
|
42416
|
+
cast(value, options) {
|
|
42417
|
+
return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);
|
|
42418
|
+
}
|
|
42419
|
+
resolve() {
|
|
42420
|
+
return this;
|
|
42421
|
+
}
|
|
42422
|
+
describe() {
|
|
42423
|
+
return {
|
|
42424
|
+
type: 'ref',
|
|
42425
|
+
key: this.key
|
|
42426
|
+
};
|
|
42427
|
+
}
|
|
42428
|
+
toString() {
|
|
42429
|
+
return `Ref(${this.key})`;
|
|
42430
|
+
}
|
|
42431
|
+
static isRef(value) {
|
|
42432
|
+
return value && value.__isYupRef;
|
|
42433
|
+
}
|
|
42434
|
+
}
|
|
42435
|
+
|
|
42436
|
+
// @ts-ignore
|
|
42437
|
+
Reference.prototype.__isYupRef = true;
|
|
42438
|
+
|
|
42439
|
+
const isAbsent = (value) => value == null;
|
|
42440
|
+
|
|
42441
|
+
function createValidation(config) {
|
|
42442
|
+
function validate({ value, path = '', options, originalValue, schema }, panic, next) {
|
|
42443
|
+
const { name, test, params, message, skipAbsent } = config;
|
|
42444
|
+
let { parent, context, abortEarly = schema.spec.abortEarly, disableStackTrace = schema.spec.disableStackTrace } = options;
|
|
42445
|
+
function resolve(item) {
|
|
42446
|
+
return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
|
|
42447
|
+
}
|
|
42448
|
+
function createError(overrides = {}) {
|
|
42449
|
+
const nextParams = Object.assign(
|
|
42450
|
+
{
|
|
42451
|
+
value,
|
|
42452
|
+
originalValue,
|
|
42453
|
+
label: schema.spec.label,
|
|
42454
|
+
path: overrides.path || path,
|
|
42455
|
+
spec: schema.spec,
|
|
42456
|
+
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
42457
|
+
},
|
|
42458
|
+
params,
|
|
42459
|
+
overrides.params
|
|
42460
|
+
);
|
|
42461
|
+
for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
|
|
42462
|
+
const error = new ValidationError(
|
|
42463
|
+
ValidationError.formatError(overrides.message || message, nextParams),
|
|
42464
|
+
value,
|
|
42465
|
+
nextParams.path,
|
|
42466
|
+
overrides.type || name,
|
|
42467
|
+
nextParams.disableStackTrace
|
|
42468
|
+
);
|
|
42469
|
+
error.params = nextParams;
|
|
42470
|
+
return error;
|
|
42471
|
+
}
|
|
42472
|
+
const invalid = abortEarly ? panic : next;
|
|
42473
|
+
let ctx = {
|
|
42474
|
+
path,
|
|
42475
|
+
parent,
|
|
42476
|
+
type: name,
|
|
42477
|
+
from: options.from,
|
|
42478
|
+
createError,
|
|
42479
|
+
resolve,
|
|
42480
|
+
options,
|
|
42481
|
+
originalValue,
|
|
42482
|
+
schema
|
|
42483
|
+
};
|
|
42484
|
+
const handleResult = (validOrError) => {
|
|
42485
|
+
if (ValidationError.isError(validOrError)) invalid(validOrError);
|
|
42486
|
+
else if (!validOrError) invalid(createError());
|
|
42487
|
+
else next(null);
|
|
42488
|
+
};
|
|
42489
|
+
const handleError = (err) => {
|
|
42490
|
+
if (ValidationError.isError(err)) invalid(err);
|
|
42491
|
+
else panic(err);
|
|
42492
|
+
};
|
|
42493
|
+
const shouldSkip = skipAbsent && isAbsent(value);
|
|
42494
|
+
if (shouldSkip) {
|
|
42495
|
+
return handleResult(true);
|
|
42496
|
+
}
|
|
42497
|
+
let result;
|
|
42498
|
+
try {
|
|
42499
|
+
var _result;
|
|
42500
|
+
result = test.call(ctx, value, ctx);
|
|
42501
|
+
if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {
|
|
42502
|
+
if (options.sync) {
|
|
42503
|
+
throw new Error(
|
|
42504
|
+
`Validation test of type: "${ctx.type}" returned a Promise during a synchronous validate. ` +
|
|
42505
|
+
`This test will finish after the validate call has returned`
|
|
42506
|
+
);
|
|
42507
|
+
}
|
|
42508
|
+
return Promise.resolve(result).then(handleResult, handleError);
|
|
42509
|
+
}
|
|
42510
|
+
} catch (err) {
|
|
42511
|
+
handleError(err);
|
|
42512
|
+
return;
|
|
42513
|
+
}
|
|
42514
|
+
handleResult(result);
|
|
42515
|
+
}
|
|
42516
|
+
validate.OPTIONS = config;
|
|
42517
|
+
return validate;
|
|
42518
|
+
}
|
|
42519
|
+
|
|
42520
|
+
function getIn(schema, path, value, context = value) {
|
|
42521
|
+
let parent, lastPart, lastPartDebug;
|
|
42522
|
+
|
|
42523
|
+
// root path: ''
|
|
42524
|
+
if (!path)
|
|
42525
|
+
return {
|
|
42526
|
+
parent,
|
|
42527
|
+
parentPath: path,
|
|
42528
|
+
schema
|
|
42529
|
+
};
|
|
42530
|
+
propertyExpr.forEach(path, (_part, isBracket, isArray) => {
|
|
42531
|
+
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
42532
|
+
schema = schema.resolve({
|
|
42533
|
+
context,
|
|
42534
|
+
parent,
|
|
42535
|
+
value
|
|
42536
|
+
});
|
|
42537
|
+
let isTuple = schema.type === 'tuple';
|
|
42538
|
+
let idx = isArray ? parseInt(part, 10) : 0;
|
|
42539
|
+
if (schema.innerType || isTuple) {
|
|
42540
|
+
if (isTuple && !isArray)
|
|
42541
|
+
throw new Error(
|
|
42542
|
+
`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]"`
|
|
42543
|
+
);
|
|
42544
|
+
if (value && idx >= value.length) {
|
|
42545
|
+
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. `);
|
|
42546
|
+
}
|
|
42547
|
+
parent = value;
|
|
42548
|
+
value = value && value[idx];
|
|
42549
|
+
schema = isTuple ? schema.spec.types[idx] : schema.innerType;
|
|
42550
|
+
}
|
|
42551
|
+
|
|
42552
|
+
// sometimes the array index part of a path doesn't exist: "nested.arr.child"
|
|
42553
|
+
// in these cases the current part is the next schema and should be processed
|
|
42554
|
+
// in this iteration. For cases where the index signature is included this
|
|
42555
|
+
// check will fail and we'll handle the `child` part on the next iteration like normal
|
|
42556
|
+
if (!isArray) {
|
|
42557
|
+
if (!schema.fields || !schema.fields[part])
|
|
42558
|
+
throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: "${schema.type}")`);
|
|
42559
|
+
parent = value;
|
|
42560
|
+
value = value && value[part];
|
|
42561
|
+
schema = schema.fields[part];
|
|
42562
|
+
}
|
|
42563
|
+
lastPart = part;
|
|
42564
|
+
lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;
|
|
42565
|
+
});
|
|
42566
|
+
return {
|
|
42567
|
+
schema,
|
|
42568
|
+
parent,
|
|
42569
|
+
parentPath: lastPart
|
|
42570
|
+
};
|
|
42571
|
+
}
|
|
42572
|
+
|
|
42573
|
+
class ReferenceSet extends Set {
|
|
42574
|
+
describe() {
|
|
42575
|
+
const description = [];
|
|
42576
|
+
for (const item of this.values()) {
|
|
42577
|
+
description.push(Reference.isRef(item) ? item.describe() : item);
|
|
42578
|
+
}
|
|
42579
|
+
return description;
|
|
42580
|
+
}
|
|
42581
|
+
resolveAll(resolve) {
|
|
42582
|
+
let result = [];
|
|
42583
|
+
for (const item of this.values()) {
|
|
42584
|
+
result.push(resolve(item));
|
|
42585
|
+
}
|
|
42586
|
+
return result;
|
|
42587
|
+
}
|
|
42588
|
+
clone() {
|
|
42589
|
+
return new ReferenceSet(this.values());
|
|
42590
|
+
}
|
|
42591
|
+
merge(newItems, removeItems) {
|
|
42592
|
+
const next = this.clone();
|
|
42593
|
+
newItems.forEach((value) => next.add(value));
|
|
42594
|
+
removeItems.forEach((value) => next.delete(value));
|
|
42595
|
+
return next;
|
|
42596
|
+
}
|
|
42597
|
+
}
|
|
42598
|
+
|
|
42599
|
+
// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js
|
|
42600
|
+
function clone(src, seen = new Map()) {
|
|
42601
|
+
if (isSchema(src) || !src || typeof src !== 'object') return src;
|
|
42602
|
+
if (seen.has(src)) return seen.get(src);
|
|
42603
|
+
let copy;
|
|
42604
|
+
if (src instanceof Date) {
|
|
42605
|
+
// Date
|
|
42606
|
+
copy = new Date(src.getTime());
|
|
42607
|
+
seen.set(src, copy);
|
|
42608
|
+
} else if (src instanceof RegExp) {
|
|
42609
|
+
// RegExp
|
|
42610
|
+
copy = new RegExp(src);
|
|
42611
|
+
seen.set(src, copy);
|
|
42612
|
+
} else if (Array.isArray(src)) {
|
|
42613
|
+
// Array
|
|
42614
|
+
copy = new Array(src.length);
|
|
42615
|
+
seen.set(src, copy);
|
|
42616
|
+
for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);
|
|
42617
|
+
} else if (src instanceof Map) {
|
|
42618
|
+
// Map
|
|
42619
|
+
copy = new Map();
|
|
42620
|
+
seen.set(src, copy);
|
|
42621
|
+
for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));
|
|
42622
|
+
} else if (src instanceof Set) {
|
|
42623
|
+
// Set
|
|
42624
|
+
copy = new Set();
|
|
42625
|
+
seen.set(src, copy);
|
|
42626
|
+
for (const v of src) copy.add(clone(v, seen));
|
|
42627
|
+
} else if (src instanceof Object) {
|
|
42628
|
+
// Object
|
|
42629
|
+
copy = {};
|
|
42630
|
+
seen.set(src, copy);
|
|
42631
|
+
for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);
|
|
42632
|
+
} else {
|
|
42633
|
+
throw Error(`Unable to clone ${src}`);
|
|
42634
|
+
}
|
|
42635
|
+
return copy;
|
|
42636
|
+
}
|
|
42637
|
+
|
|
42638
|
+
// If `CustomSchemaMeta` isn't extended with any keys, we'll fall back to a
|
|
42639
|
+
// loose Record definition allowing free form usage.
|
|
42640
|
+
class Schema {
|
|
42641
|
+
constructor(options) {
|
|
42642
|
+
this.type = void 0;
|
|
42643
|
+
this.deps = [];
|
|
42644
|
+
this.tests = void 0;
|
|
42645
|
+
this.transforms = void 0;
|
|
42646
|
+
this.conditions = [];
|
|
42647
|
+
this._mutate = void 0;
|
|
42648
|
+
this.internalTests = {};
|
|
42649
|
+
this._whitelist = new ReferenceSet();
|
|
42650
|
+
this._blacklist = new ReferenceSet();
|
|
42651
|
+
this.exclusiveTests = Object.create(null);
|
|
42652
|
+
this._typeCheck = void 0;
|
|
42653
|
+
this.spec = void 0;
|
|
42654
|
+
this.tests = [];
|
|
42655
|
+
this.transforms = [];
|
|
42656
|
+
this.withMutation(() => {
|
|
42657
|
+
this.typeError(mixed.notType);
|
|
42658
|
+
});
|
|
42659
|
+
this.type = options.type;
|
|
42660
|
+
this._typeCheck = options.check;
|
|
42661
|
+
this.spec = Object.assign(
|
|
42662
|
+
{
|
|
42663
|
+
strip: false,
|
|
42664
|
+
strict: false,
|
|
42665
|
+
abortEarly: true,
|
|
42666
|
+
recursive: true,
|
|
42667
|
+
disableStackTrace: false,
|
|
42668
|
+
nullable: false,
|
|
42669
|
+
optional: true,
|
|
42670
|
+
coerce: true
|
|
42671
|
+
},
|
|
42672
|
+
options == null ? void 0 : options.spec
|
|
42673
|
+
);
|
|
42674
|
+
this.withMutation((s) => {
|
|
42675
|
+
s.nonNullable();
|
|
42676
|
+
});
|
|
42677
|
+
}
|
|
42678
|
+
|
|
42679
|
+
// TODO: remove
|
|
42680
|
+
get _type() {
|
|
42681
|
+
return this.type;
|
|
42682
|
+
}
|
|
42683
|
+
clone(spec) {
|
|
42684
|
+
if (this._mutate) {
|
|
42685
|
+
if (spec) Object.assign(this.spec, spec);
|
|
42686
|
+
return this;
|
|
42687
|
+
}
|
|
42688
|
+
|
|
42689
|
+
// if the nested value is a schema we can skip cloning, since
|
|
42690
|
+
// they are already immutable
|
|
42691
|
+
const next = Object.create(Object.getPrototypeOf(this));
|
|
42692
|
+
|
|
42693
|
+
// @ts-expect-error this is readonly
|
|
42694
|
+
next.type = this.type;
|
|
42695
|
+
next._typeCheck = this._typeCheck;
|
|
42696
|
+
next._whitelist = this._whitelist.clone();
|
|
42697
|
+
next._blacklist = this._blacklist.clone();
|
|
42698
|
+
next.internalTests = Object.assign({}, this.internalTests);
|
|
42699
|
+
next.exclusiveTests = Object.assign({}, this.exclusiveTests);
|
|
42700
|
+
|
|
42701
|
+
// @ts-expect-error this is readonly
|
|
42702
|
+
next.deps = [...this.deps];
|
|
42703
|
+
next.conditions = [...this.conditions];
|
|
42704
|
+
next.tests = [...this.tests];
|
|
42705
|
+
next.transforms = [...this.transforms];
|
|
42706
|
+
next.spec = clone(Object.assign({}, this.spec, spec));
|
|
42707
|
+
return next;
|
|
42708
|
+
}
|
|
42709
|
+
label(label) {
|
|
42710
|
+
let next = this.clone();
|
|
42711
|
+
next.spec.label = label;
|
|
42712
|
+
return next;
|
|
42713
|
+
}
|
|
42714
|
+
meta(...args) {
|
|
42715
|
+
if (args.length === 0) return this.spec.meta;
|
|
42716
|
+
let next = this.clone();
|
|
42717
|
+
next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);
|
|
42718
|
+
return next;
|
|
42719
|
+
}
|
|
42720
|
+
withMutation(fn) {
|
|
42721
|
+
let before = this._mutate;
|
|
42722
|
+
this._mutate = true;
|
|
42723
|
+
let result = fn(this);
|
|
42724
|
+
this._mutate = before;
|
|
42725
|
+
return result;
|
|
42726
|
+
}
|
|
42727
|
+
concat(schema) {
|
|
42728
|
+
if (!schema || schema === this) return this;
|
|
42729
|
+
if (schema.type !== this.type && this.type !== 'mixed')
|
|
42730
|
+
throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema.type}`);
|
|
42731
|
+
let base = this;
|
|
42732
|
+
let combined = schema.clone();
|
|
42733
|
+
const mergedSpec = Object.assign({}, base.spec, combined.spec);
|
|
42734
|
+
combined.spec = mergedSpec;
|
|
42735
|
+
combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
|
|
42736
|
+
|
|
42737
|
+
// manually merge the blacklist/whitelist (the other `schema` takes
|
|
42738
|
+
// precedence in case of conflicts)
|
|
42739
|
+
combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);
|
|
42740
|
+
combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);
|
|
42741
|
+
|
|
42742
|
+
// start with the current tests
|
|
42743
|
+
combined.tests = base.tests;
|
|
42744
|
+
combined.exclusiveTests = base.exclusiveTests;
|
|
42745
|
+
|
|
42746
|
+
// manually add the new tests to ensure
|
|
42747
|
+
// the deduping logic is consistent
|
|
42748
|
+
combined.withMutation((next) => {
|
|
42749
|
+
schema.tests.forEach((fn) => {
|
|
42750
|
+
next.test(fn.OPTIONS);
|
|
42751
|
+
});
|
|
42752
|
+
});
|
|
42753
|
+
combined.transforms = [...base.transforms, ...combined.transforms];
|
|
42754
|
+
return combined;
|
|
42755
|
+
}
|
|
42756
|
+
isType(v) {
|
|
42757
|
+
if (v == null) {
|
|
42758
|
+
if (this.spec.nullable && v === null) return true;
|
|
42759
|
+
if (this.spec.optional && v === undefined) return true;
|
|
42760
|
+
return false;
|
|
42761
|
+
}
|
|
42762
|
+
return this._typeCheck(v);
|
|
42763
|
+
}
|
|
42764
|
+
resolve(options) {
|
|
42765
|
+
let schema = this;
|
|
42766
|
+
if (schema.conditions.length) {
|
|
42767
|
+
let conditions = schema.conditions;
|
|
42768
|
+
schema = schema.clone();
|
|
42769
|
+
schema.conditions = [];
|
|
42770
|
+
schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);
|
|
42771
|
+
schema = schema.resolve(options);
|
|
42772
|
+
}
|
|
42773
|
+
return schema;
|
|
42774
|
+
}
|
|
42775
|
+
resolveOptions(options) {
|
|
42776
|
+
var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
|
|
42777
|
+
return Object.assign({}, options, {
|
|
42778
|
+
from: options.from || [],
|
|
42779
|
+
strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,
|
|
42780
|
+
abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,
|
|
42781
|
+
recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive,
|
|
42782
|
+
disableStackTrace: (_options$disableStack = options.disableStackTrace) != null ? _options$disableStack : this.spec.disableStackTrace
|
|
42783
|
+
});
|
|
42784
|
+
}
|
|
42785
|
+
|
|
42786
|
+
/**
|
|
42787
|
+
* Run the configured transform pipeline over an input value.
|
|
42788
|
+
*/
|
|
42789
|
+
|
|
42790
|
+
cast(value, options = {}) {
|
|
42791
|
+
let resolvedSchema = this.resolve(
|
|
42792
|
+
Object.assign(
|
|
42793
|
+
{
|
|
42794
|
+
value
|
|
42795
|
+
},
|
|
42796
|
+
options
|
|
42797
|
+
)
|
|
42798
|
+
);
|
|
42799
|
+
let allowOptionality = options.assert === 'ignore-optionality';
|
|
42800
|
+
let result = resolvedSchema._cast(value, options);
|
|
42801
|
+
if (options.assert !== false && !resolvedSchema.isType(result)) {
|
|
42802
|
+
if (allowOptionality && isAbsent(result)) {
|
|
42803
|
+
return result;
|
|
42804
|
+
}
|
|
42805
|
+
let formattedValue = printValue(value);
|
|
42806
|
+
let formattedResult = printValue(result);
|
|
42807
|
+
throw new TypeError(
|
|
42808
|
+
`The value of ${options.path || 'field'} could not be cast to a value ` +
|
|
42809
|
+
`that satisfies the schema type: "${resolvedSchema.type}". \n\n` +
|
|
42810
|
+
`attempted value: ${formattedValue} \n` +
|
|
42811
|
+
(formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : '')
|
|
42812
|
+
);
|
|
42813
|
+
}
|
|
42814
|
+
return result;
|
|
42815
|
+
}
|
|
42816
|
+
_cast(rawValue, options) {
|
|
42817
|
+
let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
|
|
42818
|
+
if (value === undefined) {
|
|
42819
|
+
value = this.getDefault(options);
|
|
42820
|
+
}
|
|
42821
|
+
return value;
|
|
42822
|
+
}
|
|
42823
|
+
_validate(_value, options = {}, panic, next) {
|
|
42824
|
+
let { path, originalValue = _value, strict = this.spec.strict } = options;
|
|
42825
|
+
let value = _value;
|
|
42826
|
+
if (!strict) {
|
|
42827
|
+
value = this._cast(
|
|
42828
|
+
value,
|
|
42829
|
+
Object.assign(
|
|
42830
|
+
{
|
|
42831
|
+
assert: false
|
|
42832
|
+
},
|
|
42833
|
+
options
|
|
42834
|
+
)
|
|
42835
|
+
);
|
|
42836
|
+
}
|
|
42837
|
+
let initialTests = [];
|
|
42838
|
+
for (let test of Object.values(this.internalTests)) {
|
|
42839
|
+
if (test) initialTests.push(test);
|
|
42840
|
+
}
|
|
42841
|
+
this.runTests(
|
|
42842
|
+
{
|
|
42843
|
+
path,
|
|
42844
|
+
value,
|
|
42845
|
+
originalValue,
|
|
42846
|
+
options,
|
|
42847
|
+
tests: initialTests
|
|
42848
|
+
},
|
|
42849
|
+
panic,
|
|
42850
|
+
(initialErrors) => {
|
|
42851
|
+
// even if we aren't ending early we can't proceed further if the types aren't correct
|
|
42852
|
+
if (initialErrors.length) {
|
|
42853
|
+
return next(initialErrors, value);
|
|
42854
|
+
}
|
|
42855
|
+
this.runTests(
|
|
42856
|
+
{
|
|
42857
|
+
path,
|
|
42858
|
+
value,
|
|
42859
|
+
originalValue,
|
|
42860
|
+
options,
|
|
42861
|
+
tests: this.tests
|
|
42862
|
+
},
|
|
42863
|
+
panic,
|
|
42864
|
+
next
|
|
42865
|
+
);
|
|
42866
|
+
}
|
|
42867
|
+
);
|
|
42868
|
+
}
|
|
42869
|
+
|
|
42870
|
+
/**
|
|
42871
|
+
* Executes a set of validations, either schema, produced Tests or a nested
|
|
42872
|
+
* schema validate result.
|
|
42873
|
+
*/
|
|
42874
|
+
runTests(runOptions, panic, next) {
|
|
42875
|
+
let fired = false;
|
|
42876
|
+
let { tests, value, originalValue, path, options } = runOptions;
|
|
42877
|
+
let panicOnce = (arg) => {
|
|
42878
|
+
if (fired) return;
|
|
42879
|
+
fired = true;
|
|
42880
|
+
panic(arg, value);
|
|
42881
|
+
};
|
|
42882
|
+
let nextOnce = (arg) => {
|
|
42883
|
+
if (fired) return;
|
|
42884
|
+
fired = true;
|
|
42885
|
+
next(arg, value);
|
|
42886
|
+
};
|
|
42887
|
+
let count = tests.length;
|
|
42888
|
+
let nestedErrors = [];
|
|
42889
|
+
if (!count) return nextOnce([]);
|
|
42890
|
+
let args = {
|
|
42891
|
+
value,
|
|
42892
|
+
originalValue,
|
|
42893
|
+
path,
|
|
42894
|
+
options,
|
|
42895
|
+
schema: this
|
|
42896
|
+
};
|
|
42897
|
+
for (let i = 0; i < tests.length; i++) {
|
|
42898
|
+
const test = tests[i];
|
|
42899
|
+
test(args, panicOnce, function finishTestRun(err) {
|
|
42900
|
+
if (err) {
|
|
42901
|
+
Array.isArray(err) ? nestedErrors.push(...err) : nestedErrors.push(err);
|
|
42902
|
+
}
|
|
42903
|
+
if (--count <= 0) {
|
|
42904
|
+
nextOnce(nestedErrors);
|
|
42905
|
+
}
|
|
42906
|
+
});
|
|
42907
|
+
}
|
|
42908
|
+
}
|
|
42909
|
+
asNestedTest({ key, index, parent, parentPath, originalParent, options }) {
|
|
42910
|
+
const k = key != null ? key : index;
|
|
42911
|
+
if (k == null) {
|
|
42912
|
+
throw TypeError('Must include `key` or `index` for nested validations');
|
|
42913
|
+
}
|
|
42914
|
+
const isIndex = typeof k === 'number';
|
|
42915
|
+
let value = parent[k];
|
|
42916
|
+
const testOptions = Object.assign({}, options, {
|
|
42917
|
+
// Nested validations fields are always strict:
|
|
42918
|
+
// 1. parent isn't strict so the casting will also have cast inner values
|
|
42919
|
+
// 2. parent is strict in which case the nested values weren't cast either
|
|
42920
|
+
strict: true,
|
|
42921
|
+
parent,
|
|
42922
|
+
value,
|
|
42923
|
+
originalValue: originalParent[k],
|
|
42924
|
+
// FIXME: tests depend on `index` being passed around deeply,
|
|
42925
|
+
// we should not let the options.key/index bleed through
|
|
42926
|
+
key: undefined,
|
|
42927
|
+
// index: undefined,
|
|
42928
|
+
[isIndex ? 'index' : 'key']: k,
|
|
42929
|
+
path: isIndex || k.includes('.') ? `${parentPath || ''}[${isIndex ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : '') + key
|
|
42930
|
+
});
|
|
42931
|
+
return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
|
|
42932
|
+
}
|
|
42933
|
+
validate(value, options) {
|
|
42934
|
+
var _options$disableStack2;
|
|
42935
|
+
let schema = this.resolve(
|
|
42936
|
+
Object.assign({}, options, {
|
|
42937
|
+
value
|
|
42938
|
+
})
|
|
42939
|
+
);
|
|
42940
|
+
let disableStackTrace =
|
|
42941
|
+
(_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;
|
|
42942
|
+
return new Promise((resolve, reject) =>
|
|
42943
|
+
schema._validate(
|
|
42944
|
+
value,
|
|
42945
|
+
options,
|
|
42946
|
+
(error, parsed) => {
|
|
42947
|
+
if (ValidationError.isError(error)) error.value = parsed;
|
|
42948
|
+
reject(error);
|
|
42949
|
+
},
|
|
42950
|
+
(errors, validated) => {
|
|
42951
|
+
if (errors.length) reject(new ValidationError(errors, validated, undefined, undefined, disableStackTrace));
|
|
42952
|
+
else resolve(validated);
|
|
42953
|
+
}
|
|
42954
|
+
)
|
|
42955
|
+
);
|
|
42956
|
+
}
|
|
42957
|
+
validateSync(value, options) {
|
|
42958
|
+
var _options$disableStack3;
|
|
42959
|
+
let schema = this.resolve(
|
|
42960
|
+
Object.assign({}, options, {
|
|
42961
|
+
value
|
|
42962
|
+
})
|
|
42963
|
+
);
|
|
42964
|
+
let result;
|
|
42965
|
+
let disableStackTrace =
|
|
42966
|
+
(_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema.spec.disableStackTrace;
|
|
42967
|
+
schema._validate(
|
|
42968
|
+
value,
|
|
42969
|
+
Object.assign({}, options, {
|
|
42970
|
+
sync: true
|
|
42971
|
+
}),
|
|
42972
|
+
(error, parsed) => {
|
|
42973
|
+
if (ValidationError.isError(error)) error.value = parsed;
|
|
42974
|
+
throw error;
|
|
42975
|
+
},
|
|
42976
|
+
(errors, validated) => {
|
|
42977
|
+
if (errors.length) throw new ValidationError(errors, value, undefined, undefined, disableStackTrace);
|
|
42978
|
+
result = validated;
|
|
42979
|
+
}
|
|
42980
|
+
);
|
|
42981
|
+
return result;
|
|
42982
|
+
}
|
|
42983
|
+
isValid(value, options) {
|
|
42984
|
+
return this.validate(value, options).then(
|
|
42985
|
+
() => true,
|
|
42986
|
+
(err) => {
|
|
42987
|
+
if (ValidationError.isError(err)) return false;
|
|
42988
|
+
throw err;
|
|
42989
|
+
}
|
|
42990
|
+
);
|
|
42991
|
+
}
|
|
42992
|
+
isValidSync(value, options) {
|
|
42993
|
+
try {
|
|
42994
|
+
this.validateSync(value, options);
|
|
42995
|
+
return true;
|
|
42996
|
+
} catch (err) {
|
|
42997
|
+
if (ValidationError.isError(err)) return false;
|
|
42998
|
+
throw err;
|
|
42999
|
+
}
|
|
43000
|
+
}
|
|
43001
|
+
_getDefault(options) {
|
|
43002
|
+
let defaultValue = this.spec.default;
|
|
43003
|
+
if (defaultValue == null) {
|
|
43004
|
+
return defaultValue;
|
|
43005
|
+
}
|
|
43006
|
+
return typeof defaultValue === 'function' ? defaultValue.call(this, options) : clone(defaultValue);
|
|
43007
|
+
}
|
|
43008
|
+
getDefault(
|
|
43009
|
+
options
|
|
43010
|
+
// If schema is defaulted we know it's at least not undefined
|
|
43011
|
+
) {
|
|
43012
|
+
let schema = this.resolve(options || {});
|
|
43013
|
+
return schema._getDefault(options);
|
|
43014
|
+
}
|
|
43015
|
+
default(def) {
|
|
43016
|
+
if (arguments.length === 0) {
|
|
43017
|
+
return this._getDefault();
|
|
43018
|
+
}
|
|
43019
|
+
let next = this.clone({
|
|
43020
|
+
default: def
|
|
43021
|
+
});
|
|
43022
|
+
return next;
|
|
43023
|
+
}
|
|
43024
|
+
strict(isStrict = true) {
|
|
43025
|
+
return this.clone({
|
|
43026
|
+
strict: isStrict
|
|
43027
|
+
});
|
|
43028
|
+
}
|
|
43029
|
+
nullability(nullable, message) {
|
|
43030
|
+
const next = this.clone({
|
|
43031
|
+
nullable
|
|
43032
|
+
});
|
|
43033
|
+
next.internalTests.nullable = createValidation({
|
|
43034
|
+
message,
|
|
43035
|
+
name: 'nullable',
|
|
43036
|
+
test(value) {
|
|
43037
|
+
return value === null ? this.schema.spec.nullable : true;
|
|
43038
|
+
}
|
|
43039
|
+
});
|
|
43040
|
+
return next;
|
|
43041
|
+
}
|
|
43042
|
+
optionality(optional, message) {
|
|
43043
|
+
const next = this.clone({
|
|
43044
|
+
optional
|
|
43045
|
+
});
|
|
43046
|
+
next.internalTests.optionality = createValidation({
|
|
43047
|
+
message,
|
|
43048
|
+
name: 'optionality',
|
|
43049
|
+
test(value) {
|
|
43050
|
+
return value === undefined ? this.schema.spec.optional : true;
|
|
43051
|
+
}
|
|
43052
|
+
});
|
|
43053
|
+
return next;
|
|
43054
|
+
}
|
|
43055
|
+
optional() {
|
|
43056
|
+
return this.optionality(true);
|
|
43057
|
+
}
|
|
43058
|
+
defined(message = mixed.defined) {
|
|
43059
|
+
return this.optionality(false, message);
|
|
43060
|
+
}
|
|
43061
|
+
nullable() {
|
|
43062
|
+
return this.nullability(true);
|
|
43063
|
+
}
|
|
43064
|
+
nonNullable(message = mixed.notNull) {
|
|
43065
|
+
return this.nullability(false, message);
|
|
43066
|
+
}
|
|
43067
|
+
required(message = mixed.required) {
|
|
43068
|
+
return this.clone().withMutation((next) => next.nonNullable(message).defined(message));
|
|
43069
|
+
}
|
|
43070
|
+
notRequired() {
|
|
43071
|
+
return this.clone().withMutation((next) => next.nullable().optional());
|
|
43072
|
+
}
|
|
43073
|
+
transform(fn) {
|
|
43074
|
+
let next = this.clone();
|
|
43075
|
+
next.transforms.push(fn);
|
|
43076
|
+
return next;
|
|
43077
|
+
}
|
|
43078
|
+
|
|
43079
|
+
/**
|
|
43080
|
+
* Adds a test function to the schema's queue of tests.
|
|
43081
|
+
* tests can be exclusive or non-exclusive.
|
|
43082
|
+
*
|
|
43083
|
+
* - exclusive tests, will replace any existing tests of the same name.
|
|
43084
|
+
* - non-exclusive: can be stacked
|
|
43085
|
+
*
|
|
43086
|
+
* If a non-exclusive test is added to a schema with an exclusive test of the same name
|
|
43087
|
+
* the exclusive test is removed and further tests of the same name will be stacked.
|
|
43088
|
+
*
|
|
43089
|
+
* If an exclusive test is added to a schema with non-exclusive tests of the same name
|
|
43090
|
+
* the previous tests are removed and further tests of the same name will replace each other.
|
|
43091
|
+
*/
|
|
43092
|
+
|
|
43093
|
+
test(...args) {
|
|
43094
|
+
let opts;
|
|
43095
|
+
if (args.length === 1) {
|
|
43096
|
+
if (typeof args[0] === 'function') {
|
|
43097
|
+
opts = {
|
|
43098
|
+
test: args[0]
|
|
43099
|
+
};
|
|
43100
|
+
} else {
|
|
43101
|
+
opts = args[0];
|
|
43102
|
+
}
|
|
43103
|
+
} else if (args.length === 2) {
|
|
43104
|
+
opts = {
|
|
43105
|
+
name: args[0],
|
|
43106
|
+
test: args[1]
|
|
43107
|
+
};
|
|
43108
|
+
} else {
|
|
43109
|
+
opts = {
|
|
43110
|
+
name: args[0],
|
|
43111
|
+
message: args[1],
|
|
43112
|
+
test: args[2]
|
|
43113
|
+
};
|
|
43114
|
+
}
|
|
43115
|
+
if (opts.message === undefined) opts.message = mixed.default;
|
|
43116
|
+
if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');
|
|
43117
|
+
let next = this.clone();
|
|
43118
|
+
let validate = createValidation(opts);
|
|
43119
|
+
let isExclusive = opts.exclusive || (opts.name && next.exclusiveTests[opts.name] === true);
|
|
43120
|
+
if (opts.exclusive) {
|
|
43121
|
+
if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');
|
|
43122
|
+
}
|
|
43123
|
+
if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;
|
|
43124
|
+
next.tests = next.tests.filter((fn) => {
|
|
43125
|
+
if (fn.OPTIONS.name === opts.name) {
|
|
43126
|
+
if (isExclusive) return false;
|
|
43127
|
+
if (fn.OPTIONS.test === validate.OPTIONS.test) return false;
|
|
43128
|
+
}
|
|
43129
|
+
return true;
|
|
43130
|
+
});
|
|
43131
|
+
next.tests.push(validate);
|
|
43132
|
+
return next;
|
|
43133
|
+
}
|
|
43134
|
+
when(keys, options) {
|
|
43135
|
+
if (!Array.isArray(keys) && typeof keys !== 'string') {
|
|
43136
|
+
options = keys;
|
|
43137
|
+
keys = '.';
|
|
43138
|
+
}
|
|
43139
|
+
let next = this.clone();
|
|
43140
|
+
let deps = toArray(keys).map((key) => new Reference(key));
|
|
43141
|
+
deps.forEach((dep) => {
|
|
43142
|
+
// @ts-ignore readonly array
|
|
43143
|
+
if (dep.isSibling) next.deps.push(dep.key);
|
|
43144
|
+
});
|
|
43145
|
+
next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));
|
|
43146
|
+
return next;
|
|
43147
|
+
}
|
|
43148
|
+
typeError(message) {
|
|
43149
|
+
let next = this.clone();
|
|
43150
|
+
next.internalTests.typeError = createValidation({
|
|
43151
|
+
message,
|
|
43152
|
+
name: 'typeError',
|
|
43153
|
+
skipAbsent: true,
|
|
43154
|
+
test(value) {
|
|
43155
|
+
if (!this.schema._typeCheck(value))
|
|
43156
|
+
return this.createError({
|
|
43157
|
+
params: {
|
|
43158
|
+
type: this.schema.type
|
|
43159
|
+
}
|
|
43160
|
+
});
|
|
43161
|
+
return true;
|
|
43162
|
+
}
|
|
43163
|
+
});
|
|
43164
|
+
return next;
|
|
43165
|
+
}
|
|
43166
|
+
oneOf(enums, message = mixed.oneOf) {
|
|
43167
|
+
let next = this.clone();
|
|
43168
|
+
enums.forEach((val) => {
|
|
43169
|
+
next._whitelist.add(val);
|
|
43170
|
+
next._blacklist.delete(val);
|
|
43171
|
+
});
|
|
43172
|
+
next.internalTests.whiteList = createValidation({
|
|
43173
|
+
message,
|
|
43174
|
+
name: 'oneOf',
|
|
43175
|
+
skipAbsent: true,
|
|
43176
|
+
test(value) {
|
|
43177
|
+
let valids = this.schema._whitelist;
|
|
43178
|
+
let resolved = valids.resolveAll(this.resolve);
|
|
43179
|
+
return resolved.includes(value)
|
|
43180
|
+
? true
|
|
43181
|
+
: this.createError({
|
|
43182
|
+
params: {
|
|
43183
|
+
values: Array.from(valids).join(', '),
|
|
43184
|
+
resolved
|
|
43185
|
+
}
|
|
43186
|
+
});
|
|
43187
|
+
}
|
|
43188
|
+
});
|
|
43189
|
+
return next;
|
|
43190
|
+
}
|
|
43191
|
+
notOneOf(enums, message = mixed.notOneOf) {
|
|
43192
|
+
let next = this.clone();
|
|
43193
|
+
enums.forEach((val) => {
|
|
43194
|
+
next._blacklist.add(val);
|
|
43195
|
+
next._whitelist.delete(val);
|
|
43196
|
+
});
|
|
43197
|
+
next.internalTests.blacklist = createValidation({
|
|
43198
|
+
message,
|
|
43199
|
+
name: 'notOneOf',
|
|
43200
|
+
test(value) {
|
|
43201
|
+
let invalids = this.schema._blacklist;
|
|
43202
|
+
let resolved = invalids.resolveAll(this.resolve);
|
|
43203
|
+
if (resolved.includes(value))
|
|
43204
|
+
return this.createError({
|
|
43205
|
+
params: {
|
|
43206
|
+
values: Array.from(invalids).join(', '),
|
|
43207
|
+
resolved
|
|
43208
|
+
}
|
|
43209
|
+
});
|
|
43210
|
+
return true;
|
|
43211
|
+
}
|
|
43212
|
+
});
|
|
43213
|
+
return next;
|
|
43214
|
+
}
|
|
43215
|
+
strip(strip = true) {
|
|
43216
|
+
let next = this.clone();
|
|
43217
|
+
next.spec.strip = strip;
|
|
43218
|
+
return next;
|
|
43219
|
+
}
|
|
43220
|
+
|
|
43221
|
+
/**
|
|
43222
|
+
* Return a serialized description of the schema including validations, flags, types etc.
|
|
43223
|
+
*
|
|
43224
|
+
* @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).
|
|
43225
|
+
*/
|
|
43226
|
+
describe(options) {
|
|
43227
|
+
const next = (options ? this.resolve(options) : this).clone();
|
|
43228
|
+
const { label, meta, optional, nullable } = next.spec;
|
|
43229
|
+
const description = {
|
|
43230
|
+
meta,
|
|
43231
|
+
label,
|
|
43232
|
+
optional,
|
|
43233
|
+
nullable,
|
|
43234
|
+
default: next.getDefault(options),
|
|
43235
|
+
type: next.type,
|
|
43236
|
+
oneOf: next._whitelist.describe(),
|
|
43237
|
+
notOneOf: next._blacklist.describe(),
|
|
43238
|
+
tests: next.tests
|
|
43239
|
+
.map((fn) => ({
|
|
43240
|
+
name: fn.OPTIONS.name,
|
|
43241
|
+
params: fn.OPTIONS.params
|
|
43242
|
+
}))
|
|
43243
|
+
.filter((n, idx, list) => list.findIndex((c) => c.name === n.name) === idx)
|
|
43244
|
+
};
|
|
43245
|
+
return description;
|
|
43246
|
+
}
|
|
43247
|
+
}
|
|
43248
|
+
// @ts-expect-error
|
|
43249
|
+
Schema.prototype.__isYupSchema__ = true;
|
|
43250
|
+
for (const method of ['validate', 'validateSync'])
|
|
43251
|
+
Schema.prototype[`${method}At`] = function (path, value, options = {}) {
|
|
43252
|
+
const { parent, parentPath, schema } = getIn(this, path, value, options.context);
|
|
43253
|
+
return schema[method](
|
|
43254
|
+
parent && parent[parentPath],
|
|
43255
|
+
Object.assign({}, options, {
|
|
43256
|
+
parent,
|
|
43257
|
+
path
|
|
43258
|
+
})
|
|
43259
|
+
);
|
|
43260
|
+
};
|
|
43261
|
+
for (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;
|
|
43262
|
+
for (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;
|
|
43263
|
+
|
|
43264
|
+
/**
|
|
43265
|
+
* This file is a modified version of the file from the following repository:
|
|
43266
|
+
* Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>
|
|
43267
|
+
* NON-CONFORMANT EDITION.
|
|
43268
|
+
* © 2011 Colin Snover <http://zetafleet.com>
|
|
43269
|
+
* Released under MIT license.
|
|
43270
|
+
*/
|
|
43271
|
+
|
|
43272
|
+
// prettier-ignore
|
|
43273
|
+
// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm
|
|
43274
|
+
const isoReg = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
|
|
43275
|
+
function parseIsoDate(date) {
|
|
43276
|
+
const struct = parseDateStruct(date);
|
|
43277
|
+
if (!struct) return Date.parse ? Date.parse(date) : Number.NaN;
|
|
43278
|
+
|
|
43279
|
+
// timestamps without timezone identifiers should be considered local time
|
|
43280
|
+
if (struct.z === undefined && struct.plusMinus === undefined) {
|
|
43281
|
+
return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();
|
|
43282
|
+
}
|
|
43283
|
+
let totalMinutesOffset = 0;
|
|
43284
|
+
if (struct.z !== 'Z' && struct.plusMinus !== undefined) {
|
|
43285
|
+
totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;
|
|
43286
|
+
if (struct.plusMinus === '+') totalMinutesOffset = 0 - totalMinutesOffset;
|
|
43287
|
+
}
|
|
43288
|
+
return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);
|
|
43289
|
+
}
|
|
43290
|
+
function parseDateStruct(date) {
|
|
43291
|
+
var _regexResult$7$length, _regexResult$;
|
|
43292
|
+
const regexResult = isoReg.exec(date);
|
|
43293
|
+
if (!regexResult) return null;
|
|
43294
|
+
|
|
43295
|
+
// use of toNumber() avoids NaN timestamps caused by “undefined”
|
|
43296
|
+
// values being passed to Date constructor
|
|
43297
|
+
return {
|
|
43298
|
+
year: toNumber(regexResult[1]),
|
|
43299
|
+
month: toNumber(regexResult[2], 1) - 1,
|
|
43300
|
+
day: toNumber(regexResult[3], 1),
|
|
43301
|
+
hour: toNumber(regexResult[4]),
|
|
43302
|
+
minute: toNumber(regexResult[5]),
|
|
43303
|
+
second: toNumber(regexResult[6]),
|
|
43304
|
+
millisecond: regexResult[7]
|
|
43305
|
+
? // allow arbitrary sub-second precision beyond milliseconds
|
|
43306
|
+
toNumber(regexResult[7].substring(0, 3))
|
|
43307
|
+
: 0,
|
|
43308
|
+
precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : undefined,
|
|
43309
|
+
z: regexResult[8] || undefined,
|
|
43310
|
+
plusMinus: regexResult[9] || undefined,
|
|
43311
|
+
hourOffset: toNumber(regexResult[10]),
|
|
43312
|
+
minuteOffset: toNumber(regexResult[11])
|
|
43313
|
+
};
|
|
43314
|
+
}
|
|
43315
|
+
function toNumber(str, defaultValue = 0) {
|
|
43316
|
+
return Number(str) || defaultValue;
|
|
43317
|
+
}
|
|
43318
|
+
|
|
43319
|
+
// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
|
|
43320
|
+
let rEmail =
|
|
43321
|
+
// eslint-disable-next-line
|
|
43322
|
+
/^[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])?)*$/;
|
|
43323
|
+
let rUrl =
|
|
43324
|
+
// eslint-disable-next-line
|
|
43325
|
+
/^((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;
|
|
43326
|
+
|
|
43327
|
+
// eslint-disable-next-line
|
|
43328
|
+
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;
|
|
43329
|
+
let yearMonthDay = '^\\d{4}-\\d{2}-\\d{2}';
|
|
43330
|
+
let hourMinuteSecond = '\\d{2}:\\d{2}:\\d{2}';
|
|
43331
|
+
let zOrOffset = '(([+-]\\d{2}(:?\\d{2})?)|Z)';
|
|
43332
|
+
let rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`);
|
|
43333
|
+
let isTrimmed = (value) => isAbsent(value) || value === value.trim();
|
|
43334
|
+
let objStringTag = {}.toString();
|
|
43335
|
+
function create$6() {
|
|
43336
|
+
return new StringSchema();
|
|
43337
|
+
}
|
|
43338
|
+
class StringSchema extends Schema {
|
|
43339
|
+
constructor() {
|
|
43340
|
+
super({
|
|
43341
|
+
type: 'string',
|
|
43342
|
+
check(value) {
|
|
43343
|
+
if (value instanceof String) value = value.valueOf();
|
|
43344
|
+
return typeof value === 'string';
|
|
43345
|
+
}
|
|
43346
|
+
});
|
|
43347
|
+
this.withMutation(() => {
|
|
43348
|
+
this.transform((value, _raw, ctx) => {
|
|
43349
|
+
if (!ctx.spec.coerce || ctx.isType(value)) return value;
|
|
43350
|
+
|
|
43351
|
+
// don't ever convert arrays
|
|
43352
|
+
if (Array.isArray(value)) return value;
|
|
43353
|
+
const strValue = value != null && value.toString ? value.toString() : value;
|
|
43354
|
+
|
|
43355
|
+
// no one wants plain objects converted to [Object object]
|
|
43356
|
+
if (strValue === objStringTag) return value;
|
|
43357
|
+
return strValue;
|
|
43358
|
+
});
|
|
43359
|
+
});
|
|
43360
|
+
}
|
|
43361
|
+
required(message) {
|
|
43362
|
+
return super.required(message).withMutation((schema) =>
|
|
43363
|
+
schema.test({
|
|
43364
|
+
message: message || mixed.required,
|
|
43365
|
+
name: 'required',
|
|
43366
|
+
skipAbsent: true,
|
|
43367
|
+
test: (value) => !!value.length
|
|
43368
|
+
})
|
|
43369
|
+
);
|
|
43370
|
+
}
|
|
43371
|
+
notRequired() {
|
|
43372
|
+
return super.notRequired().withMutation((schema) => {
|
|
43373
|
+
schema.tests = schema.tests.filter((t) => t.OPTIONS.name !== 'required');
|
|
43374
|
+
return schema;
|
|
43375
|
+
});
|
|
43376
|
+
}
|
|
43377
|
+
length(length, message = string.length) {
|
|
43378
|
+
return this.test({
|
|
43379
|
+
message,
|
|
43380
|
+
name: 'length',
|
|
43381
|
+
exclusive: true,
|
|
43382
|
+
params: {
|
|
43383
|
+
length
|
|
43384
|
+
},
|
|
43385
|
+
skipAbsent: true,
|
|
43386
|
+
test(value) {
|
|
43387
|
+
return value.length === this.resolve(length);
|
|
43388
|
+
}
|
|
43389
|
+
});
|
|
43390
|
+
}
|
|
43391
|
+
min(min, message = string.min) {
|
|
43392
|
+
return this.test({
|
|
43393
|
+
message,
|
|
43394
|
+
name: 'min',
|
|
43395
|
+
exclusive: true,
|
|
43396
|
+
params: {
|
|
43397
|
+
min
|
|
43398
|
+
},
|
|
43399
|
+
skipAbsent: true,
|
|
43400
|
+
test(value) {
|
|
43401
|
+
return value.length >= this.resolve(min);
|
|
43402
|
+
}
|
|
43403
|
+
});
|
|
43404
|
+
}
|
|
43405
|
+
max(max, message = string.max) {
|
|
43406
|
+
return this.test({
|
|
43407
|
+
name: 'max',
|
|
43408
|
+
exclusive: true,
|
|
43409
|
+
message,
|
|
43410
|
+
params: {
|
|
43411
|
+
max
|
|
43412
|
+
},
|
|
43413
|
+
skipAbsent: true,
|
|
43414
|
+
test(value) {
|
|
43415
|
+
return value.length <= this.resolve(max);
|
|
43416
|
+
}
|
|
43417
|
+
});
|
|
43418
|
+
}
|
|
43419
|
+
matches(regex, options) {
|
|
43420
|
+
let excludeEmptyString = false;
|
|
43421
|
+
let message;
|
|
43422
|
+
let name;
|
|
43423
|
+
if (options) {
|
|
43424
|
+
if (typeof options === 'object') {
|
|
43425
|
+
({ excludeEmptyString = false, message, name } = options);
|
|
43426
|
+
} else {
|
|
43427
|
+
message = options;
|
|
43428
|
+
}
|
|
43429
|
+
}
|
|
43430
|
+
return this.test({
|
|
43431
|
+
name: name || 'matches',
|
|
43432
|
+
message: message || string.matches,
|
|
43433
|
+
params: {
|
|
43434
|
+
regex
|
|
43435
|
+
},
|
|
43436
|
+
skipAbsent: true,
|
|
43437
|
+
test: (value) => (value === '' && excludeEmptyString) || value.search(regex) !== -1
|
|
43438
|
+
});
|
|
43439
|
+
}
|
|
43440
|
+
email(message = string.email) {
|
|
43441
|
+
return this.matches(rEmail, {
|
|
43442
|
+
name: 'email',
|
|
43443
|
+
message,
|
|
43444
|
+
excludeEmptyString: true
|
|
43445
|
+
});
|
|
43446
|
+
}
|
|
43447
|
+
url(message = string.url) {
|
|
43448
|
+
return this.matches(rUrl, {
|
|
43449
|
+
name: 'url',
|
|
43450
|
+
message,
|
|
43451
|
+
excludeEmptyString: true
|
|
43452
|
+
});
|
|
43453
|
+
}
|
|
43454
|
+
uuid(message = string.uuid) {
|
|
43455
|
+
return this.matches(rUUID, {
|
|
43456
|
+
name: 'uuid',
|
|
43457
|
+
message,
|
|
43458
|
+
excludeEmptyString: false
|
|
43459
|
+
});
|
|
43460
|
+
}
|
|
43461
|
+
datetime(options) {
|
|
43462
|
+
let message = '';
|
|
43463
|
+
let allowOffset;
|
|
43464
|
+
let precision;
|
|
43465
|
+
if (options) {
|
|
43466
|
+
if (typeof options === 'object') {
|
|
43467
|
+
({ message = '', allowOffset = false, precision = undefined } = options);
|
|
43468
|
+
} else {
|
|
43469
|
+
message = options;
|
|
43470
|
+
}
|
|
43471
|
+
}
|
|
43472
|
+
return this.matches(rIsoDateTime, {
|
|
43473
|
+
name: 'datetime',
|
|
43474
|
+
message: message || string.datetime,
|
|
43475
|
+
excludeEmptyString: true
|
|
43476
|
+
})
|
|
43477
|
+
.test({
|
|
43478
|
+
name: 'datetime_offset',
|
|
43479
|
+
message: message || string.datetime_offset,
|
|
43480
|
+
params: {
|
|
43481
|
+
allowOffset
|
|
43482
|
+
},
|
|
43483
|
+
skipAbsent: true,
|
|
43484
|
+
test: (value) => {
|
|
43485
|
+
if (!value || allowOffset) return true;
|
|
43486
|
+
const struct = parseDateStruct(value);
|
|
43487
|
+
if (!struct) return false;
|
|
43488
|
+
return !!struct.z;
|
|
43489
|
+
}
|
|
43490
|
+
})
|
|
43491
|
+
.test({
|
|
43492
|
+
name: 'datetime_precision',
|
|
43493
|
+
message: message || string.datetime_precision,
|
|
43494
|
+
params: {
|
|
43495
|
+
precision
|
|
43496
|
+
},
|
|
43497
|
+
skipAbsent: true,
|
|
43498
|
+
test: (value) => {
|
|
43499
|
+
if (!value || precision == undefined) return true;
|
|
43500
|
+
const struct = parseDateStruct(value);
|
|
43501
|
+
if (!struct) return false;
|
|
43502
|
+
return struct.precision === precision;
|
|
43503
|
+
}
|
|
43504
|
+
});
|
|
43505
|
+
}
|
|
43506
|
+
|
|
43507
|
+
//-- transforms --
|
|
43508
|
+
ensure() {
|
|
43509
|
+
return this.default('').transform((val) => (val === null ? '' : val));
|
|
43510
|
+
}
|
|
43511
|
+
trim(message = string.trim) {
|
|
43512
|
+
return this.transform((val) => (val != null ? val.trim() : val)).test({
|
|
43513
|
+
message,
|
|
43514
|
+
name: 'trim',
|
|
43515
|
+
test: isTrimmed
|
|
43516
|
+
});
|
|
43517
|
+
}
|
|
43518
|
+
lowercase(message = string.lowercase) {
|
|
43519
|
+
return this.transform((value) => (!isAbsent(value) ? value.toLowerCase() : value)).test({
|
|
43520
|
+
message,
|
|
43521
|
+
name: 'string_case',
|
|
43522
|
+
exclusive: true,
|
|
43523
|
+
skipAbsent: true,
|
|
43524
|
+
test: (value) => isAbsent(value) || value === value.toLowerCase()
|
|
43525
|
+
});
|
|
43526
|
+
}
|
|
43527
|
+
uppercase(message = string.uppercase) {
|
|
43528
|
+
return this.transform((value) => (!isAbsent(value) ? value.toUpperCase() : value)).test({
|
|
43529
|
+
message,
|
|
43530
|
+
name: 'string_case',
|
|
43531
|
+
exclusive: true,
|
|
43532
|
+
skipAbsent: true,
|
|
43533
|
+
test: (value) => isAbsent(value) || value === value.toUpperCase()
|
|
43534
|
+
});
|
|
43535
|
+
}
|
|
43536
|
+
}
|
|
43537
|
+
create$6.prototype = StringSchema.prototype;
|
|
43538
|
+
|
|
43539
|
+
//
|
|
43540
|
+
// Number Interfaces
|
|
43541
|
+
//
|
|
43542
|
+
|
|
43543
|
+
let invalidDate = new Date('');
|
|
43544
|
+
let isDate = (obj) => Object.prototype.toString.call(obj) === '[object Date]';
|
|
43545
|
+
class DateSchema extends Schema {
|
|
43546
|
+
constructor() {
|
|
43547
|
+
super({
|
|
43548
|
+
type: 'date',
|
|
43549
|
+
check(v) {
|
|
43550
|
+
return isDate(v) && !isNaN(v.getTime());
|
|
43551
|
+
}
|
|
43552
|
+
});
|
|
43553
|
+
this.withMutation(() => {
|
|
43554
|
+
this.transform((value, _raw, ctx) => {
|
|
43555
|
+
// null -> InvalidDate isn't useful; treat all nulls as null and let it fail on
|
|
43556
|
+
// nullability check vs TypeErrors
|
|
43557
|
+
if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;
|
|
43558
|
+
value = parseIsoDate(value);
|
|
43559
|
+
|
|
43560
|
+
// 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.
|
|
43561
|
+
return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;
|
|
43562
|
+
});
|
|
43563
|
+
});
|
|
43564
|
+
}
|
|
43565
|
+
prepareParam(ref, name) {
|
|
43566
|
+
let param;
|
|
43567
|
+
if (!Reference.isRef(ref)) {
|
|
43568
|
+
let cast = this.cast(ref);
|
|
43569
|
+
if (!this._typeCheck(cast)) throw new TypeError(`\`${name}\` must be a Date or a value that can be \`cast()\` to a Date`);
|
|
43570
|
+
param = cast;
|
|
43571
|
+
} else {
|
|
43572
|
+
param = ref;
|
|
43573
|
+
}
|
|
43574
|
+
return param;
|
|
43575
|
+
}
|
|
43576
|
+
min(min, message = date.min) {
|
|
43577
|
+
let limit = this.prepareParam(min, 'min');
|
|
43578
|
+
return this.test({
|
|
43579
|
+
message,
|
|
43580
|
+
name: 'min',
|
|
43581
|
+
exclusive: true,
|
|
43582
|
+
params: {
|
|
43583
|
+
min
|
|
43584
|
+
},
|
|
43585
|
+
skipAbsent: true,
|
|
43586
|
+
test(value) {
|
|
43587
|
+
return value >= this.resolve(limit);
|
|
43588
|
+
}
|
|
43589
|
+
});
|
|
43590
|
+
}
|
|
43591
|
+
max(max, message = date.max) {
|
|
43592
|
+
let limit = this.prepareParam(max, 'max');
|
|
43593
|
+
return this.test({
|
|
43594
|
+
message,
|
|
43595
|
+
name: 'max',
|
|
43596
|
+
exclusive: true,
|
|
43597
|
+
params: {
|
|
43598
|
+
max
|
|
43599
|
+
},
|
|
43600
|
+
skipAbsent: true,
|
|
43601
|
+
test(value) {
|
|
43602
|
+
return value <= this.resolve(limit);
|
|
43603
|
+
}
|
|
43604
|
+
});
|
|
43605
|
+
}
|
|
43606
|
+
}
|
|
43607
|
+
DateSchema.INVALID_DATE = invalidDate;
|
|
43608
|
+
DateSchema.prototype;
|
|
43609
|
+
|
|
43610
|
+
// @ts-expect-error
|
|
43611
|
+
function sortFields(fields, excludedEdges = []) {
|
|
43612
|
+
let edges = [];
|
|
43613
|
+
let nodes = new Set();
|
|
43614
|
+
let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
|
|
43615
|
+
function addNode(depPath, key) {
|
|
43616
|
+
let node = propertyExpr.split(depPath)[0];
|
|
43617
|
+
nodes.add(node);
|
|
43618
|
+
if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
|
|
43619
|
+
}
|
|
43620
|
+
for (const key of Object.keys(fields)) {
|
|
43621
|
+
let value = fields[key];
|
|
43622
|
+
nodes.add(key);
|
|
43623
|
+
if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
|
|
43624
|
+
else if (isSchema(value) && 'deps' in value) value.deps.forEach((path) => addNode(path, key));
|
|
43625
|
+
}
|
|
43626
|
+
return toposort$1.array(Array.from(nodes), edges).reverse();
|
|
43627
|
+
}
|
|
43628
|
+
|
|
43629
|
+
function findIndex(arr, err) {
|
|
43630
|
+
let idx = Infinity;
|
|
43631
|
+
arr.some((key, ii) => {
|
|
43632
|
+
var _err$path;
|
|
43633
|
+
if ((_err$path = err.path) != null && _err$path.includes(key)) {
|
|
43634
|
+
idx = ii;
|
|
43635
|
+
return true;
|
|
43636
|
+
}
|
|
43637
|
+
});
|
|
43638
|
+
return idx;
|
|
43639
|
+
}
|
|
43640
|
+
function sortByKeyOrder(keys) {
|
|
43641
|
+
return (a, b) => {
|
|
43642
|
+
return findIndex(keys, a) - findIndex(keys, b);
|
|
43643
|
+
};
|
|
43644
|
+
}
|
|
43645
|
+
|
|
43646
|
+
const parseJson = (value, _, ctx) => {
|
|
43647
|
+
if (typeof value !== 'string') {
|
|
43648
|
+
return value;
|
|
43649
|
+
}
|
|
43650
|
+
let parsed = value;
|
|
43651
|
+
try {
|
|
43652
|
+
parsed = JSON.parse(value);
|
|
43653
|
+
} catch (err) {
|
|
43654
|
+
/* */
|
|
43655
|
+
}
|
|
43656
|
+
return ctx.isType(parsed) ? parsed : value;
|
|
43657
|
+
};
|
|
43658
|
+
|
|
43659
|
+
// @ts-ignore
|
|
43660
|
+
function deepPartial(schema) {
|
|
43661
|
+
if ('fields' in schema) {
|
|
43662
|
+
const partial = {};
|
|
43663
|
+
for (const [key, fieldSchema] of Object.entries(schema.fields)) {
|
|
43664
|
+
partial[key] = deepPartial(fieldSchema);
|
|
43665
|
+
}
|
|
43666
|
+
return schema.setFields(partial);
|
|
43667
|
+
}
|
|
43668
|
+
if (schema.type === 'array') {
|
|
43669
|
+
const nextArray = schema.optional();
|
|
43670
|
+
if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
|
|
43671
|
+
return nextArray;
|
|
43672
|
+
}
|
|
43673
|
+
if (schema.type === 'tuple') {
|
|
43674
|
+
return schema.optional().clone({
|
|
43675
|
+
types: schema.spec.types.map(deepPartial)
|
|
43676
|
+
});
|
|
43677
|
+
}
|
|
43678
|
+
if ('optional' in schema) {
|
|
43679
|
+
return schema.optional();
|
|
43680
|
+
}
|
|
43681
|
+
return schema;
|
|
43682
|
+
}
|
|
43683
|
+
const deepHas = (obj, p) => {
|
|
43684
|
+
const path = [...propertyExpr.normalizePath(p)];
|
|
43685
|
+
if (path.length === 1) return path[0] in obj;
|
|
43686
|
+
let last = path.pop();
|
|
43687
|
+
let parent = propertyExpr.getter(propertyExpr.join(path), true)(obj);
|
|
43688
|
+
return !!(parent && last in parent);
|
|
43689
|
+
};
|
|
43690
|
+
let isObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]';
|
|
43691
|
+
function unknown(ctx, value) {
|
|
43692
|
+
let known = Object.keys(ctx.fields);
|
|
43693
|
+
return Object.keys(value).filter((key) => known.indexOf(key) === -1);
|
|
43694
|
+
}
|
|
43695
|
+
const defaultSort = sortByKeyOrder([]);
|
|
43696
|
+
function create$3(spec) {
|
|
43697
|
+
return new ObjectSchema(spec);
|
|
43698
|
+
}
|
|
43699
|
+
class ObjectSchema extends Schema {
|
|
43700
|
+
constructor(spec) {
|
|
43701
|
+
super({
|
|
43702
|
+
type: 'object',
|
|
43703
|
+
check(value) {
|
|
43704
|
+
return isObject(value) || typeof value === 'function';
|
|
43705
|
+
}
|
|
43706
|
+
});
|
|
43707
|
+
this.fields = Object.create(null);
|
|
43708
|
+
this._sortErrors = defaultSort;
|
|
43709
|
+
this._nodes = [];
|
|
43710
|
+
this._excludedEdges = [];
|
|
43711
|
+
this.withMutation(() => {
|
|
43712
|
+
if (spec) {
|
|
43713
|
+
this.shape(spec);
|
|
43714
|
+
}
|
|
43715
|
+
});
|
|
43716
|
+
}
|
|
43717
|
+
_cast(_value, options = {}) {
|
|
43718
|
+
var _options$stripUnknown;
|
|
43719
|
+
let value = super._cast(_value, options);
|
|
43720
|
+
|
|
43721
|
+
//should ignore nulls here
|
|
43722
|
+
if (value === undefined) return this.getDefault(options);
|
|
43723
|
+
if (!this._typeCheck(value)) return value;
|
|
43724
|
+
let fields = this.fields;
|
|
43725
|
+
let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;
|
|
43726
|
+
let props = [].concat(
|
|
43727
|
+
this._nodes,
|
|
43728
|
+
Object.keys(value).filter((v) => !this._nodes.includes(v))
|
|
43729
|
+
);
|
|
43730
|
+
let intermediateValue = {}; // is filled during the transform below
|
|
43731
|
+
let innerOptions = Object.assign({}, options, {
|
|
43732
|
+
parent: intermediateValue,
|
|
43733
|
+
__validating: options.__validating || false
|
|
43734
|
+
});
|
|
43735
|
+
let isChanged = false;
|
|
43736
|
+
for (const prop of props) {
|
|
43737
|
+
let field = fields[prop];
|
|
43738
|
+
let exists = prop in value;
|
|
43739
|
+
if (field) {
|
|
43740
|
+
let fieldValue;
|
|
43741
|
+
let inputValue = value[prop];
|
|
43742
|
+
|
|
43743
|
+
// safe to mutate since this is fired in sequence
|
|
43744
|
+
innerOptions.path = (options.path ? `${options.path}.` : '') + prop;
|
|
43745
|
+
field = field.resolve({
|
|
43746
|
+
value: inputValue,
|
|
43747
|
+
context: options.context,
|
|
43748
|
+
parent: intermediateValue
|
|
43749
|
+
});
|
|
43750
|
+
let fieldSpec = field instanceof Schema ? field.spec : undefined;
|
|
43751
|
+
let strict = fieldSpec == null ? void 0 : fieldSpec.strict;
|
|
43752
|
+
if (fieldSpec != null && fieldSpec.strip) {
|
|
43753
|
+
isChanged = isChanged || prop in value;
|
|
43754
|
+
continue;
|
|
43755
|
+
}
|
|
43756
|
+
fieldValue =
|
|
43757
|
+
!options.__validating || !strict
|
|
43758
|
+
? // TODO: use _cast, this is double resolving
|
|
43759
|
+
field.cast(value[prop], innerOptions)
|
|
43760
|
+
: value[prop];
|
|
43761
|
+
if (fieldValue !== undefined) {
|
|
43762
|
+
intermediateValue[prop] = fieldValue;
|
|
43763
|
+
}
|
|
43764
|
+
} else if (exists && !strip) {
|
|
43765
|
+
intermediateValue[prop] = value[prop];
|
|
43766
|
+
}
|
|
43767
|
+
if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {
|
|
43768
|
+
isChanged = true;
|
|
43769
|
+
}
|
|
43770
|
+
}
|
|
43771
|
+
return isChanged ? intermediateValue : value;
|
|
43772
|
+
}
|
|
43773
|
+
_validate(_value, options = {}, panic, next) {
|
|
43774
|
+
let { from = [], originalValue = _value, recursive = this.spec.recursive } = options;
|
|
43775
|
+
options.from = [
|
|
43776
|
+
{
|
|
43777
|
+
schema: this,
|
|
43778
|
+
value: originalValue
|
|
43779
|
+
},
|
|
43780
|
+
...from
|
|
43781
|
+
];
|
|
43782
|
+
// this flag is needed for handling `strict` correctly in the context of
|
|
43783
|
+
// validation vs just casting. e.g strict() on a field is only used when validating
|
|
43784
|
+
options.__validating = true;
|
|
43785
|
+
options.originalValue = originalValue;
|
|
43786
|
+
super._validate(_value, options, panic, (objectErrors, value) => {
|
|
43787
|
+
if (!recursive || !isObject(value)) {
|
|
43788
|
+
next(objectErrors, value);
|
|
43789
|
+
return;
|
|
43790
|
+
}
|
|
43791
|
+
originalValue = originalValue || value;
|
|
43792
|
+
let tests = [];
|
|
43793
|
+
for (let key of this._nodes) {
|
|
43794
|
+
let field = this.fields[key];
|
|
43795
|
+
if (!field || Reference.isRef(field)) {
|
|
43796
|
+
continue;
|
|
43797
|
+
}
|
|
43798
|
+
tests.push(
|
|
43799
|
+
field.asNestedTest({
|
|
43800
|
+
options,
|
|
43801
|
+
key,
|
|
43802
|
+
parent: value,
|
|
43803
|
+
parentPath: options.path,
|
|
43804
|
+
originalParent: originalValue
|
|
43805
|
+
})
|
|
43806
|
+
);
|
|
43807
|
+
}
|
|
43808
|
+
this.runTests(
|
|
43809
|
+
{
|
|
43810
|
+
tests,
|
|
43811
|
+
value,
|
|
43812
|
+
originalValue,
|
|
43813
|
+
options
|
|
43814
|
+
},
|
|
43815
|
+
panic,
|
|
43816
|
+
(fieldErrors) => {
|
|
43817
|
+
next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);
|
|
43818
|
+
}
|
|
43819
|
+
);
|
|
43820
|
+
});
|
|
43821
|
+
}
|
|
43822
|
+
clone(spec) {
|
|
43823
|
+
const next = super.clone(spec);
|
|
43824
|
+
next.fields = Object.assign({}, this.fields);
|
|
43825
|
+
next._nodes = this._nodes;
|
|
43826
|
+
next._excludedEdges = this._excludedEdges;
|
|
43827
|
+
next._sortErrors = this._sortErrors;
|
|
43828
|
+
return next;
|
|
43829
|
+
}
|
|
43830
|
+
concat(schema) {
|
|
43831
|
+
let next = super.concat(schema);
|
|
43832
|
+
let nextFields = next.fields;
|
|
43833
|
+
for (let [field, schemaOrRef] of Object.entries(this.fields)) {
|
|
43834
|
+
const target = nextFields[field];
|
|
43835
|
+
nextFields[field] = target === undefined ? schemaOrRef : target;
|
|
43836
|
+
}
|
|
43837
|
+
return next.withMutation((s) =>
|
|
43838
|
+
// XXX: excludes here is wrong
|
|
43839
|
+
s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges])
|
|
43840
|
+
);
|
|
43841
|
+
}
|
|
43842
|
+
_getDefault(options) {
|
|
43843
|
+
if ('default' in this.spec) {
|
|
43844
|
+
return super._getDefault(options);
|
|
43845
|
+
}
|
|
43846
|
+
|
|
43847
|
+
// if there is no default set invent one
|
|
43848
|
+
if (!this._nodes.length) {
|
|
43849
|
+
return undefined;
|
|
43850
|
+
}
|
|
43851
|
+
let dft = {};
|
|
43852
|
+
this._nodes.forEach((key) => {
|
|
43853
|
+
var _innerOptions;
|
|
43854
|
+
const field = this.fields[key];
|
|
43855
|
+
let innerOptions = options;
|
|
43856
|
+
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
43857
|
+
innerOptions = Object.assign({}, innerOptions, {
|
|
43858
|
+
parent: innerOptions.value,
|
|
43859
|
+
value: innerOptions.value[key]
|
|
43860
|
+
});
|
|
43861
|
+
}
|
|
43862
|
+
dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;
|
|
43863
|
+
});
|
|
43864
|
+
return dft;
|
|
43865
|
+
}
|
|
43866
|
+
setFields(shape, excludedEdges) {
|
|
43867
|
+
let next = this.clone();
|
|
43868
|
+
next.fields = shape;
|
|
43869
|
+
next._nodes = sortFields(shape, excludedEdges);
|
|
43870
|
+
next._sortErrors = sortByKeyOrder(Object.keys(shape));
|
|
43871
|
+
// XXX: this carries over edges which may not be what you want
|
|
43872
|
+
if (excludedEdges) next._excludedEdges = excludedEdges;
|
|
43873
|
+
return next;
|
|
43874
|
+
}
|
|
43875
|
+
shape(additions, excludes = []) {
|
|
43876
|
+
return this.clone().withMutation((next) => {
|
|
43877
|
+
let edges = next._excludedEdges;
|
|
43878
|
+
if (excludes.length) {
|
|
43879
|
+
if (!Array.isArray(excludes[0])) excludes = [excludes];
|
|
43880
|
+
edges = [...next._excludedEdges, ...excludes];
|
|
43881
|
+
}
|
|
43882
|
+
|
|
43883
|
+
// XXX: excludes here is wrong
|
|
43884
|
+
return next.setFields(Object.assign(next.fields, additions), edges);
|
|
43885
|
+
});
|
|
43886
|
+
}
|
|
43887
|
+
partial() {
|
|
43888
|
+
const partial = {};
|
|
43889
|
+
for (const [key, schema] of Object.entries(this.fields)) {
|
|
43890
|
+
partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;
|
|
43891
|
+
}
|
|
43892
|
+
return this.setFields(partial);
|
|
43893
|
+
}
|
|
43894
|
+
deepPartial() {
|
|
43895
|
+
const next = deepPartial(this);
|
|
43896
|
+
return next;
|
|
43897
|
+
}
|
|
43898
|
+
pick(keys) {
|
|
43899
|
+
const picked = {};
|
|
43900
|
+
for (const key of keys) {
|
|
43901
|
+
if (this.fields[key]) picked[key] = this.fields[key];
|
|
43902
|
+
}
|
|
43903
|
+
return this.setFields(
|
|
43904
|
+
picked,
|
|
43905
|
+
this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b))
|
|
43906
|
+
);
|
|
43907
|
+
}
|
|
43908
|
+
omit(keys) {
|
|
43909
|
+
const remaining = [];
|
|
43910
|
+
for (const key of Object.keys(this.fields)) {
|
|
43911
|
+
if (keys.includes(key)) continue;
|
|
43912
|
+
remaining.push(key);
|
|
43913
|
+
}
|
|
43914
|
+
return this.pick(remaining);
|
|
43915
|
+
}
|
|
43916
|
+
from(from, to, alias) {
|
|
43917
|
+
let fromGetter = propertyExpr.getter(from, true);
|
|
43918
|
+
return this.transform((obj) => {
|
|
43919
|
+
if (!obj) return obj;
|
|
43920
|
+
let newObj = obj;
|
|
43921
|
+
if (deepHas(obj, from)) {
|
|
43922
|
+
newObj = Object.assign({}, obj);
|
|
43923
|
+
if (!alias) delete newObj[from];
|
|
43924
|
+
newObj[to] = fromGetter(obj);
|
|
43925
|
+
}
|
|
43926
|
+
return newObj;
|
|
43927
|
+
});
|
|
43928
|
+
}
|
|
43929
|
+
|
|
43930
|
+
/** Parse an input JSON string to an object */
|
|
43931
|
+
json() {
|
|
43932
|
+
return this.transform(parseJson);
|
|
43933
|
+
}
|
|
43934
|
+
|
|
43935
|
+
/**
|
|
43936
|
+
* Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys
|
|
43937
|
+
*/
|
|
43938
|
+
exact(message) {
|
|
43939
|
+
return this.test({
|
|
43940
|
+
name: 'exact',
|
|
43941
|
+
exclusive: true,
|
|
43942
|
+
message: message || object.exact,
|
|
43943
|
+
test(value) {
|
|
43944
|
+
if (value == null) return true;
|
|
43945
|
+
const unknownKeys = unknown(this.schema, value);
|
|
43946
|
+
return (
|
|
43947
|
+
unknownKeys.length === 0 ||
|
|
43948
|
+
this.createError({
|
|
43949
|
+
params: {
|
|
43950
|
+
properties: unknownKeys.join(', ')
|
|
43951
|
+
}
|
|
43952
|
+
})
|
|
43953
|
+
);
|
|
43954
|
+
}
|
|
43955
|
+
});
|
|
43956
|
+
}
|
|
43957
|
+
stripUnknown() {
|
|
43958
|
+
return this.clone({
|
|
43959
|
+
noUnknown: true
|
|
43960
|
+
});
|
|
43961
|
+
}
|
|
43962
|
+
noUnknown(noAllow = true, message = object.noUnknown) {
|
|
43963
|
+
if (typeof noAllow !== 'boolean') {
|
|
43964
|
+
message = noAllow;
|
|
43965
|
+
noAllow = true;
|
|
43966
|
+
}
|
|
43967
|
+
let next = this.test({
|
|
43968
|
+
name: 'noUnknown',
|
|
43969
|
+
exclusive: true,
|
|
43970
|
+
message: message,
|
|
43971
|
+
test(value) {
|
|
43972
|
+
if (value == null) return true;
|
|
43973
|
+
const unknownKeys = unknown(this.schema, value);
|
|
43974
|
+
return (
|
|
43975
|
+
!noAllow ||
|
|
43976
|
+
unknownKeys.length === 0 ||
|
|
43977
|
+
this.createError({
|
|
43978
|
+
params: {
|
|
43979
|
+
unknown: unknownKeys.join(', ')
|
|
43980
|
+
}
|
|
43981
|
+
})
|
|
43982
|
+
);
|
|
43983
|
+
}
|
|
43984
|
+
});
|
|
43985
|
+
next.spec.noUnknown = noAllow;
|
|
43986
|
+
return next;
|
|
43987
|
+
}
|
|
43988
|
+
unknown(allow = true, message = object.noUnknown) {
|
|
43989
|
+
return this.noUnknown(!allow, message);
|
|
43990
|
+
}
|
|
43991
|
+
transformKeys(fn) {
|
|
43992
|
+
return this.transform((obj) => {
|
|
43993
|
+
if (!obj) return obj;
|
|
43994
|
+
const result = {};
|
|
43995
|
+
for (const key of Object.keys(obj)) result[fn(key)] = obj[key];
|
|
43996
|
+
return result;
|
|
43997
|
+
});
|
|
43998
|
+
}
|
|
43999
|
+
camelCase() {
|
|
44000
|
+
return this.transformKeys(tinyCase.camelCase);
|
|
44001
|
+
}
|
|
44002
|
+
snakeCase() {
|
|
44003
|
+
return this.transformKeys(tinyCase.snakeCase);
|
|
44004
|
+
}
|
|
44005
|
+
constantCase() {
|
|
44006
|
+
return this.transformKeys((key) => tinyCase.snakeCase(key).toUpperCase());
|
|
44007
|
+
}
|
|
44008
|
+
describe(options) {
|
|
44009
|
+
const next = (options ? this.resolve(options) : this).clone();
|
|
44010
|
+
const base = super.describe(options);
|
|
44011
|
+
base.fields = {};
|
|
44012
|
+
for (const [key, value] of Object.entries(next.fields)) {
|
|
44013
|
+
var _innerOptions2;
|
|
44014
|
+
let innerOptions = options;
|
|
44015
|
+
if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {
|
|
44016
|
+
innerOptions = Object.assign({}, innerOptions, {
|
|
44017
|
+
parent: innerOptions.value,
|
|
44018
|
+
value: innerOptions.value[key]
|
|
44019
|
+
});
|
|
44020
|
+
}
|
|
44021
|
+
base.fields[key] = value.describe(innerOptions);
|
|
44022
|
+
}
|
|
44023
|
+
return base;
|
|
44024
|
+
}
|
|
44025
|
+
}
|
|
44026
|
+
create$3.prototype = ObjectSchema.prototype;
|
|
44027
|
+
|
|
44028
|
+
class InvalidTokenError extends Error {}
|
|
44029
|
+
InvalidTokenError.prototype.name = 'InvalidTokenError';
|
|
44030
|
+
function b64DecodeUnicode(str) {
|
|
44031
|
+
return decodeURIComponent(
|
|
44032
|
+
atob(str).replace(/(.)/g, (m, p) => {
|
|
44033
|
+
let code = p.charCodeAt(0).toString(16).toUpperCase();
|
|
44034
|
+
if (code.length < 2) {
|
|
44035
|
+
code = '0' + code;
|
|
44036
|
+
}
|
|
44037
|
+
return '%' + code;
|
|
44038
|
+
})
|
|
44039
|
+
);
|
|
44040
|
+
}
|
|
44041
|
+
function base64UrlDecode(str) {
|
|
44042
|
+
let output = str.replace(/-/g, '+').replace(/_/g, '/');
|
|
44043
|
+
switch (output.length % 4) {
|
|
44044
|
+
case 0:
|
|
44045
|
+
break;
|
|
44046
|
+
case 2:
|
|
44047
|
+
output += '==';
|
|
44048
|
+
break;
|
|
44049
|
+
case 3:
|
|
44050
|
+
output += '=';
|
|
44051
|
+
break;
|
|
44052
|
+
default:
|
|
44053
|
+
throw new Error('base64 string is not of the correct length');
|
|
44054
|
+
}
|
|
44055
|
+
try {
|
|
44056
|
+
return b64DecodeUnicode(output);
|
|
44057
|
+
} catch (err) {
|
|
44058
|
+
return atob(output);
|
|
44059
|
+
}
|
|
44060
|
+
}
|
|
44061
|
+
function jwtDecode(token, options) {
|
|
44062
|
+
if (typeof token !== 'string') {
|
|
44063
|
+
throw new InvalidTokenError('Invalid token specified: must be a string');
|
|
44064
|
+
}
|
|
44065
|
+
options || (options = {});
|
|
44066
|
+
const pos = options.header === true ? 0 : 1;
|
|
44067
|
+
const part = token.split('.')[pos];
|
|
44068
|
+
if (typeof part !== 'string') {
|
|
44069
|
+
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
|
|
44070
|
+
}
|
|
44071
|
+
let decoded;
|
|
44072
|
+
try {
|
|
44073
|
+
decoded = base64UrlDecode(part);
|
|
44074
|
+
} catch (e) {
|
|
44075
|
+
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
|
|
44076
|
+
}
|
|
44077
|
+
try {
|
|
44078
|
+
return JSON.parse(decoded);
|
|
44079
|
+
} catch (e) {
|
|
44080
|
+
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
|
|
44081
|
+
}
|
|
44082
|
+
}
|
|
44083
|
+
|
|
44084
|
+
var loginMember = function (username, password, tideClientConfig, portalId) {
|
|
44085
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44086
|
+
var memberLogingRequest, memberInfo;
|
|
44087
|
+
return __generator(this, function (_a) {
|
|
44088
|
+
switch (_a.label) {
|
|
44089
|
+
case 0:
|
|
44090
|
+
if (!tideClientConfig.host || !tideClientConfig.apiKey) {
|
|
44091
|
+
return [2 /*return*/, Promise.reject()];
|
|
44092
|
+
}
|
|
44093
|
+
memberLogingRequest = {
|
|
44094
|
+
username: username,
|
|
44095
|
+
password: password,
|
|
44096
|
+
portalId: portalId
|
|
44097
|
+
};
|
|
44098
|
+
return [4 /*yield*/, build.login(tideClientConfig, memberLogingRequest, undefined)];
|
|
44099
|
+
case 1:
|
|
44100
|
+
memberInfo = _a.sent();
|
|
44101
|
+
return [2 /*return*/, memberInfo];
|
|
44102
|
+
}
|
|
44103
|
+
});
|
|
44104
|
+
});
|
|
44105
|
+
};
|
|
44106
|
+
var confirmMember = function (token, password, hasAgreed, tideClientConfig) {
|
|
44107
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44108
|
+
var memberConfirmationRequest, response;
|
|
44109
|
+
return __generator(this, function (_a) {
|
|
44110
|
+
switch (_a.label) {
|
|
44111
|
+
case 0:
|
|
44112
|
+
if (!tideClientConfig.host || !tideClientConfig.apiKey) {
|
|
44113
|
+
return [2 /*return*/, Promise.reject()];
|
|
44114
|
+
}
|
|
44115
|
+
memberConfirmationRequest = {
|
|
44116
|
+
token: token,
|
|
44117
|
+
password: password,
|
|
44118
|
+
hasAgreed: hasAgreed
|
|
44119
|
+
};
|
|
44120
|
+
return [4 /*yield*/, build.confirm(tideClientConfig, memberConfirmationRequest, undefined)];
|
|
44121
|
+
case 1:
|
|
44122
|
+
response = _a.sent();
|
|
44123
|
+
return [2 /*return*/, response];
|
|
44124
|
+
}
|
|
44125
|
+
});
|
|
44126
|
+
});
|
|
44127
|
+
};
|
|
44128
|
+
var passwordForgotten = function (username, tideClientConfig, portalId) {
|
|
44129
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44130
|
+
var memberForgotPasswordRequest, response;
|
|
44131
|
+
return __generator(this, function (_a) {
|
|
44132
|
+
switch (_a.label) {
|
|
44133
|
+
case 0:
|
|
44134
|
+
if (!tideClientConfig.host || !tideClientConfig.apiKey) {
|
|
44135
|
+
return [2 /*return*/, Promise.reject()];
|
|
44136
|
+
}
|
|
44137
|
+
memberForgotPasswordRequest = {
|
|
44138
|
+
username: username,
|
|
44139
|
+
portalId: portalId
|
|
44140
|
+
};
|
|
44141
|
+
return [4 /*yield*/, build.forgotPassword(tideClientConfig, memberForgotPasswordRequest, undefined)];
|
|
44142
|
+
case 1:
|
|
44143
|
+
response = _a.sent();
|
|
44144
|
+
return [2 /*return*/, response.ok];
|
|
44145
|
+
}
|
|
44146
|
+
});
|
|
44147
|
+
});
|
|
44148
|
+
};
|
|
44149
|
+
var newPassword = function (token, password, tideClientConfig) {
|
|
44150
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44151
|
+
var memberResetPasswordRequest, response;
|
|
44152
|
+
return __generator(this, function (_a) {
|
|
44153
|
+
switch (_a.label) {
|
|
44154
|
+
case 0:
|
|
44155
|
+
if (!tideClientConfig.host || !tideClientConfig.apiKey) {
|
|
44156
|
+
return [2 /*return*/, Promise.reject()];
|
|
44157
|
+
}
|
|
44158
|
+
memberResetPasswordRequest = {
|
|
44159
|
+
token: token,
|
|
44160
|
+
password: password
|
|
44161
|
+
};
|
|
44162
|
+
return [4 /*yield*/, build.resetPassword(tideClientConfig, memberResetPasswordRequest, undefined)];
|
|
44163
|
+
case 1:
|
|
44164
|
+
response = _a.sent();
|
|
44165
|
+
return [2 /*return*/, response.ok];
|
|
44166
|
+
}
|
|
44167
|
+
});
|
|
44168
|
+
});
|
|
44169
|
+
};
|
|
44170
|
+
var decodeTokenToMemberInfo = function (token) {
|
|
44171
|
+
if (!token) {
|
|
44172
|
+
return undefined;
|
|
44173
|
+
}
|
|
44174
|
+
var decodedToken = jwtDecode(token);
|
|
44175
|
+
var member = undefined;
|
|
44176
|
+
// check if token is not expired
|
|
44177
|
+
if ((decodedToken === null || decodedToken === void 0 ? void 0 : decodedToken.exp) && decodedToken.exp * 1000 < new Date().getTime()) {
|
|
44178
|
+
return undefined;
|
|
44179
|
+
}
|
|
44180
|
+
if (decodedToken) {
|
|
44181
|
+
member = {
|
|
44182
|
+
id: decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid']
|
|
44183
|
+
? parseInt(decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid'])
|
|
44184
|
+
: 0,
|
|
44185
|
+
companyId: decodedToken.company ? parseInt(decodedToken.company) : 0,
|
|
44186
|
+
companyName: decodedToken.companyName,
|
|
44187
|
+
name: decodedToken.unique_name,
|
|
44188
|
+
email: decodedToken.email || decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'],
|
|
44189
|
+
language: decodedToken.language,
|
|
44190
|
+
agentId: decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid']
|
|
44191
|
+
? parseInt(decodedToken['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid'])
|
|
44192
|
+
: 0,
|
|
44193
|
+
addressId: decodedToken.addressId ? parseInt(decodedToken.addressId) : undefined,
|
|
44194
|
+
addressName: decodedToken.addressName,
|
|
44195
|
+
addressLogo: decodedToken.addressLogo
|
|
44196
|
+
};
|
|
44197
|
+
}
|
|
44198
|
+
return member;
|
|
44199
|
+
};
|
|
44200
|
+
|
|
44201
|
+
var LoginComponent = function (_a) {
|
|
44202
|
+
var tideClientConfig = _a.tideClientConfig,
|
|
44203
|
+
portalId = _a.portalId,
|
|
44204
|
+
languageCode = _a.languageCode,
|
|
44205
|
+
member = _a.member,
|
|
44206
|
+
setMember = _a.setMember,
|
|
44207
|
+
handleBackToHome = _a.handleBackToHome;
|
|
44208
|
+
var _b = React.useState(false),
|
|
44209
|
+
isLoggedIn = _b[0],
|
|
44210
|
+
setIsLoggedIn = _b[1];
|
|
44211
|
+
var _c = React.useState(false),
|
|
44212
|
+
showPassword = _c[0];
|
|
44213
|
+
_c[1];
|
|
44214
|
+
var _d = React.useState(false),
|
|
44215
|
+
isForgotPassword = _d[0],
|
|
44216
|
+
setIsForgotPassword = _d[1];
|
|
44217
|
+
var _e = React.useState(false),
|
|
44218
|
+
newPasswordRequested = _e[0],
|
|
44219
|
+
setNewPasswordRequested = _e[1];
|
|
44220
|
+
var _f = React.useState(false),
|
|
44221
|
+
apiError = _f[0],
|
|
44222
|
+
setApiError = _f[1];
|
|
44223
|
+
var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
|
|
44224
|
+
var formik$1 = formik.useFormik({
|
|
44225
|
+
initialValues: {
|
|
44226
|
+
username: '',
|
|
44227
|
+
password: ''
|
|
44228
|
+
},
|
|
44229
|
+
validationSchema: create$3({
|
|
44230
|
+
username: create$6().email(translations.LOGIN.EMAIL_INVALID).required(translations.LOGIN.EMAIL_REQUIRED),
|
|
44231
|
+
password: create$6().required(translations.LOGIN.PASSWORD_REQUIRED)
|
|
44232
|
+
}),
|
|
44233
|
+
onSubmit: function (values) {
|
|
44234
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44235
|
+
var response, member_1;
|
|
44236
|
+
return __generator(this, function (_a) {
|
|
44237
|
+
switch (_a.label) {
|
|
44238
|
+
case 0:
|
|
44239
|
+
_a.trys.push([0, 2, , 3]);
|
|
44240
|
+
return [4 /*yield*/, loginMember(values.username, values.password, tideClientConfig, portalId)];
|
|
44241
|
+
case 1:
|
|
44242
|
+
response = _a.sent();
|
|
44243
|
+
member_1 = decodeTokenToMemberInfo(response.token);
|
|
44244
|
+
if (member_1 && member_1.id !== 0) {
|
|
44245
|
+
setMember(member_1);
|
|
44246
|
+
localStorage.setItem('token', response.token);
|
|
44247
|
+
setIsLoggedIn(true);
|
|
44248
|
+
}
|
|
44249
|
+
return [3 /*break*/, 3];
|
|
44250
|
+
case 2:
|
|
44251
|
+
_a.sent();
|
|
44252
|
+
setApiError(true);
|
|
44253
|
+
return [3 /*break*/, 3];
|
|
44254
|
+
case 3:
|
|
44255
|
+
return [2 /*return*/];
|
|
44256
|
+
}
|
|
44257
|
+
});
|
|
44258
|
+
});
|
|
44259
|
+
}
|
|
44260
|
+
});
|
|
44261
|
+
var handleForgotPasswordClick = function (e) {
|
|
44262
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44263
|
+
var errors;
|
|
44264
|
+
return __generator(this, function (_a) {
|
|
44265
|
+
switch (_a.label) {
|
|
44266
|
+
case 0:
|
|
44267
|
+
e.preventDefault();
|
|
44268
|
+
formik$1.setTouched({ username: true }, true);
|
|
44269
|
+
return [4 /*yield*/, formik$1.validateForm()];
|
|
44270
|
+
case 1:
|
|
44271
|
+
errors = _a.sent();
|
|
44272
|
+
if (!errors.username) {
|
|
44273
|
+
handleForgotPassword();
|
|
44274
|
+
}
|
|
44275
|
+
return [2 /*return*/];
|
|
44276
|
+
}
|
|
44277
|
+
});
|
|
44278
|
+
});
|
|
44279
|
+
};
|
|
44280
|
+
var handleForgotPassword = function () {
|
|
44281
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44282
|
+
var response;
|
|
44283
|
+
return __generator(this, function (_a) {
|
|
44284
|
+
switch (_a.label) {
|
|
44285
|
+
case 0:
|
|
44286
|
+
_a.trys.push([0, 2, , 3]);
|
|
44287
|
+
return [4 /*yield*/, passwordForgotten(formik$1.values.username, tideClientConfig, portalId)];
|
|
44288
|
+
case 1:
|
|
44289
|
+
response = _a.sent();
|
|
44290
|
+
if (response) {
|
|
44291
|
+
setNewPasswordRequested(true);
|
|
44292
|
+
}
|
|
44293
|
+
return [3 /*break*/, 3];
|
|
44294
|
+
case 2:
|
|
44295
|
+
_a.sent();
|
|
44296
|
+
setApiError(true);
|
|
44297
|
+
return [3 /*break*/, 3];
|
|
44298
|
+
case 3:
|
|
44299
|
+
return [2 /*return*/];
|
|
44300
|
+
}
|
|
44301
|
+
});
|
|
44302
|
+
});
|
|
44303
|
+
};
|
|
44304
|
+
return React__default['default'].createElement(
|
|
44305
|
+
React__default['default'].Fragment,
|
|
44306
|
+
null,
|
|
44307
|
+
!isLoggedIn &&
|
|
44308
|
+
!isForgotPassword &&
|
|
44309
|
+
React__default['default'].createElement(
|
|
44310
|
+
React__default['default'].Fragment,
|
|
44311
|
+
null,
|
|
44312
|
+
React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.LOGIN_INTO),
|
|
44313
|
+
React__default['default'].createElement(
|
|
44314
|
+
'form',
|
|
44315
|
+
{ className: 'login__form', onSubmit: formik$1.handleSubmit, noValidate: true },
|
|
44316
|
+
React__default['default'].createElement(
|
|
44317
|
+
'div',
|
|
44318
|
+
{ className: 'login__form__group' },
|
|
44319
|
+
React__default['default'].createElement('label', { htmlFor: 'email' }, translations.LOGIN.EMAIL),
|
|
44320
|
+
React__default['default'].createElement(
|
|
44321
|
+
'input',
|
|
44322
|
+
__assign({ type: 'text', id: 'username', placeholder: translations.LOGIN.ENTER_YOUR_EMAIL }, formik$1.getFieldProps('username'))
|
|
44323
|
+
),
|
|
44324
|
+
formik$1.touched.username &&
|
|
44325
|
+
formik$1.errors.username &&
|
|
44326
|
+
React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, formik$1.errors.username)
|
|
44327
|
+
),
|
|
44328
|
+
React__default['default'].createElement(
|
|
44329
|
+
'div',
|
|
44330
|
+
{ className: 'login__form__group' },
|
|
44331
|
+
React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.PASSWORD),
|
|
44332
|
+
React__default['default'].createElement(
|
|
44333
|
+
'input',
|
|
44334
|
+
__assign(
|
|
44335
|
+
{ type: showPassword ? 'text' : 'password', id: 'password', placeholder: translations.LOGIN.ENTER_YOUR_PASSWORD },
|
|
44336
|
+
formik$1.getFieldProps('password'),
|
|
44337
|
+
{ required: true }
|
|
44338
|
+
)
|
|
44339
|
+
),
|
|
44340
|
+
(formik$1.touched.password || formik$1.submitCount > 0) &&
|
|
44341
|
+
formik$1.errors.password &&
|
|
44342
|
+
React__default['default'].createElement(
|
|
44343
|
+
'div',
|
|
44344
|
+
{ id: 'password-error', className: 'login__error' },
|
|
44345
|
+
formik$1.values.password === '' ? translations.LOGIN.PASSWORD_REQUIRED : formik$1.errors.password
|
|
44346
|
+
)
|
|
44347
|
+
),
|
|
44348
|
+
!formik$1.errors.password &&
|
|
44349
|
+
apiError &&
|
|
44350
|
+
React__default['default'].createElement('div', { className: 'login__error' }, translations.LOGIN.INVALID_CREDENTIALS),
|
|
44351
|
+
React__default['default'].createElement('button', { type: 'submit', className: 'cta cta--primary' }, translations.LOGIN.LOGIN),
|
|
44352
|
+
React__default['default'].createElement(
|
|
44353
|
+
'button',
|
|
44354
|
+
{
|
|
44355
|
+
type: 'button',
|
|
44356
|
+
className: 'login__forgot',
|
|
44357
|
+
onClick: function () {
|
|
44358
|
+
formik$1.setFieldValue('password', '');
|
|
44359
|
+
formik$1.setFieldTouched('password', false, false);
|
|
44360
|
+
formik$1.setFieldError('password', undefined);
|
|
44361
|
+
setApiError(false);
|
|
44362
|
+
setIsForgotPassword(true);
|
|
44363
|
+
}
|
|
44364
|
+
},
|
|
44365
|
+
translations.LOGIN.FORGOT_PASSWORD
|
|
44366
|
+
)
|
|
44367
|
+
)
|
|
44368
|
+
),
|
|
44369
|
+
isLoggedIn &&
|
|
44370
|
+
member &&
|
|
44371
|
+
!isForgotPassword &&
|
|
44372
|
+
React__default['default'].createElement(
|
|
44373
|
+
'div',
|
|
44374
|
+
{ className: 'login__welcome' },
|
|
44375
|
+
React__default['default'].createElement(
|
|
44376
|
+
'h3',
|
|
44377
|
+
{ className: 'login__card__title' },
|
|
44378
|
+
translations.LOGIN.WELCOME_X,
|
|
44379
|
+
member === null || member === void 0 ? void 0 : member.name
|
|
44380
|
+
),
|
|
44381
|
+
React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToHome }, translations.LOGIN.BACK_TO_HOMEPAGE)
|
|
44382
|
+
),
|
|
44383
|
+
isForgotPassword &&
|
|
44384
|
+
!newPasswordRequested &&
|
|
44385
|
+
React__default['default'].createElement(
|
|
44386
|
+
React__default['default'].Fragment,
|
|
44387
|
+
null,
|
|
44388
|
+
React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.FORGOT_PASSWORD),
|
|
44389
|
+
React__default['default'].createElement(
|
|
44390
|
+
'form',
|
|
44391
|
+
{ className: 'login__form', noValidate: true },
|
|
44392
|
+
React__default['default'].createElement(
|
|
44393
|
+
'div',
|
|
44394
|
+
{ className: 'login__form__group' },
|
|
44395
|
+
React__default['default'].createElement('label', { htmlFor: 'email' }, translations.LOGIN.EMAIL),
|
|
44396
|
+
React__default['default'].createElement(
|
|
44397
|
+
'input',
|
|
44398
|
+
__assign({ type: 'text', id: 'username', placeholder: translations.LOGIN.ENTER_YOUR_EMAIL }, formik$1.getFieldProps('username'), {
|
|
44399
|
+
required: true
|
|
44400
|
+
})
|
|
44401
|
+
),
|
|
44402
|
+
(((formik$1.submitCount > 0 || formik$1.touched.username) && formik$1.errors.username) || apiError) &&
|
|
44403
|
+
React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, translations.LOGIN.EMAIL_REQUIRED)
|
|
44404
|
+
),
|
|
44405
|
+
React__default['default'].createElement(
|
|
44406
|
+
'button',
|
|
44407
|
+
{ className: 'cta cta--primary', onClick: handleForgotPasswordClick },
|
|
44408
|
+
translations.LOGIN.FORGOT_PASSWORD_EMAIL_SUBMIT_LABEL
|
|
44409
|
+
)
|
|
44410
|
+
)
|
|
44411
|
+
),
|
|
44412
|
+
newPasswordRequested && React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_REQUESTED)
|
|
44413
|
+
);
|
|
44414
|
+
};
|
|
44415
|
+
|
|
44416
|
+
var ResetPasswordComponent = function (_a) {
|
|
44417
|
+
var tideClientConfig = _a.tideClientConfig,
|
|
44418
|
+
languageCode = _a.languageCode,
|
|
44419
|
+
handleBackToLogin = _a.handleBackToLogin;
|
|
44420
|
+
var _b = React.useState(false),
|
|
44421
|
+
passwordSet = _b[0],
|
|
44422
|
+
setPasswordSet = _b[1];
|
|
44423
|
+
var _c = React.useState({
|
|
44424
|
+
password: false,
|
|
44425
|
+
repeatPassword: false
|
|
44426
|
+
}),
|
|
44427
|
+
touched = _c[0],
|
|
44428
|
+
setTouched = _c[1];
|
|
44429
|
+
var _d = React.useState({
|
|
44430
|
+
password: '',
|
|
44431
|
+
repeatPassword: ''
|
|
44432
|
+
}),
|
|
44433
|
+
formValues = _d[0],
|
|
44434
|
+
setFormValues = _d[1];
|
|
44435
|
+
var _e = React.useState(false),
|
|
44436
|
+
submitted = _e[0],
|
|
44437
|
+
setSubmitted = _e[1];
|
|
44438
|
+
var _f = React.useState({}),
|
|
44439
|
+
errors = _f[0],
|
|
44440
|
+
setErrors = _f[1];
|
|
44441
|
+
var _g = React.useState(null),
|
|
44442
|
+
token = _g[0],
|
|
44443
|
+
setToken = _g[1];
|
|
44444
|
+
var _h = React.useState(false),
|
|
44445
|
+
invalidToken = _h[0],
|
|
44446
|
+
setInvalidToken = _h[1];
|
|
44447
|
+
var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
|
|
44448
|
+
React.useEffect(function () {
|
|
44449
|
+
if (typeof window !== 'undefined') {
|
|
44450
|
+
var rawToken = new URLSearchParams(window.location.search).get('token');
|
|
44451
|
+
setToken(rawToken);
|
|
44452
|
+
if (rawToken) {
|
|
44453
|
+
try {
|
|
44454
|
+
var decoded = jwtDecode(rawToken);
|
|
44455
|
+
if (!decoded.exp || decoded.exp * 1000 < Date.now()) {
|
|
44456
|
+
setInvalidToken(true);
|
|
44457
|
+
}
|
|
44458
|
+
} catch (e) {
|
|
44459
|
+
setInvalidToken(true);
|
|
44460
|
+
}
|
|
44461
|
+
} else {
|
|
44462
|
+
setInvalidToken(true);
|
|
44463
|
+
}
|
|
44464
|
+
}
|
|
44465
|
+
}, []);
|
|
44466
|
+
var handleBlur = function (event) {
|
|
44467
|
+
setTouched(function (prev) {
|
|
44468
|
+
var _a;
|
|
44469
|
+
return __assign(__assign({}, prev), ((_a = {}), (_a[event.target.name] = true), _a));
|
|
44470
|
+
});
|
|
44471
|
+
validate();
|
|
44472
|
+
};
|
|
44473
|
+
var onChange = function (event) {
|
|
44474
|
+
var _a;
|
|
44475
|
+
setFormValues(__assign(__assign({}, formValues), ((_a = {}), (_a[event.target.name] = event.target.value), _a)));
|
|
44476
|
+
validate();
|
|
44477
|
+
};
|
|
44478
|
+
var validate = function () {
|
|
44479
|
+
var validationErrors = {};
|
|
44480
|
+
var password = formValues.password,
|
|
44481
|
+
repeatPassword = formValues.repeatPassword;
|
|
44482
|
+
// Validate password
|
|
44483
|
+
if (!password) {
|
|
44484
|
+
validationErrors.password = 'required';
|
|
44485
|
+
} else if (touched.password || submitted) {
|
|
44486
|
+
var hasNumber = /\d/.test(password);
|
|
44487
|
+
var hasCapital = /[A-Z]/.test(password);
|
|
44488
|
+
if (!hasNumber || !hasCapital) {
|
|
44489
|
+
validationErrors.passwordComplexity = 'invalid';
|
|
44490
|
+
}
|
|
44491
|
+
}
|
|
44492
|
+
// Validate repeat password
|
|
44493
|
+
if (!repeatPassword) {
|
|
44494
|
+
validationErrors.repeatPassword = 'required';
|
|
44495
|
+
} else if ((touched.repeatPassword || submitted) && password && repeatPassword !== password) {
|
|
44496
|
+
validationErrors.matchPassword = 'mismatch';
|
|
44497
|
+
}
|
|
44498
|
+
setErrors(validationErrors);
|
|
44499
|
+
return Object.keys(validationErrors).length === 0;
|
|
44500
|
+
};
|
|
44501
|
+
var handleResetPassword = function (e) {
|
|
44502
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44503
|
+
var isValid, response;
|
|
44504
|
+
return __generator(this, function (_b) {
|
|
44505
|
+
switch (_b.label) {
|
|
44506
|
+
case 0:
|
|
44507
|
+
e.preventDefault();
|
|
44508
|
+
setSubmitted(true);
|
|
44509
|
+
setTouched({ password: true, repeatPassword: true });
|
|
44510
|
+
isValid = validate();
|
|
44511
|
+
if (!isValid) return [2 /*return*/];
|
|
44512
|
+
if (!token) return [3 /*break*/, 4];
|
|
44513
|
+
_b.label = 1;
|
|
44514
|
+
case 1:
|
|
44515
|
+
_b.trys.push([1, 3, , 4]);
|
|
44516
|
+
return [4 /*yield*/, newPassword(token, formValues.password, tideClientConfig)];
|
|
44517
|
+
case 2:
|
|
44518
|
+
response = _b.sent();
|
|
44519
|
+
if (response) {
|
|
44520
|
+
setPasswordSet(true);
|
|
44521
|
+
}
|
|
44522
|
+
return [3 /*break*/, 4];
|
|
44523
|
+
case 3:
|
|
44524
|
+
_b.sent();
|
|
44525
|
+
setErrors(function (prevErrors) {
|
|
44526
|
+
return __assign(__assign({}, prevErrors), { api: true });
|
|
44527
|
+
});
|
|
44528
|
+
setInvalidToken(true);
|
|
44529
|
+
return [3 /*break*/, 4];
|
|
44530
|
+
case 4:
|
|
44531
|
+
return [2 /*return*/];
|
|
44532
|
+
}
|
|
44533
|
+
});
|
|
44534
|
+
});
|
|
44535
|
+
};
|
|
44536
|
+
React.useEffect(
|
|
44537
|
+
function () {
|
|
44538
|
+
validate();
|
|
44539
|
+
},
|
|
44540
|
+
[formValues, token]
|
|
44541
|
+
);
|
|
44542
|
+
return React__default['default'].createElement(
|
|
44543
|
+
React__default['default'].Fragment,
|
|
44544
|
+
null,
|
|
44545
|
+
!passwordSet &&
|
|
44546
|
+
!invalidToken &&
|
|
44547
|
+
React__default['default'].createElement(
|
|
44548
|
+
React__default['default'].Fragment,
|
|
44549
|
+
null,
|
|
44550
|
+
React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
|
|
44551
|
+
React__default['default'].createElement(
|
|
44552
|
+
'form',
|
|
44553
|
+
{
|
|
44554
|
+
className: 'login__form',
|
|
44555
|
+
onSubmit: function (e) {
|
|
44556
|
+
return e.preventDefault();
|
|
44557
|
+
},
|
|
44558
|
+
noValidate: true
|
|
44559
|
+
},
|
|
44560
|
+
React__default['default'].createElement(
|
|
44561
|
+
'div',
|
|
44562
|
+
{ className: 'login__form__group' },
|
|
44563
|
+
React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.RESET_PASSWORD_LABEL),
|
|
44564
|
+
React__default['default'].createElement('input', {
|
|
44565
|
+
type: 'password',
|
|
44566
|
+
id: 'password',
|
|
44567
|
+
name: 'password',
|
|
44568
|
+
value: formValues.password,
|
|
44569
|
+
onChange: onChange,
|
|
44570
|
+
onBlur: handleBlur,
|
|
44571
|
+
required: true
|
|
44572
|
+
}),
|
|
44573
|
+
(touched.password || submitted) &&
|
|
44574
|
+
(errors.password || errors.passwordComplexity) &&
|
|
44575
|
+
React__default['default'].createElement(
|
|
44576
|
+
'div',
|
|
44577
|
+
{ id: 'username-error', className: 'login__error' },
|
|
44578
|
+
errors.password === 'required' && translations.LOGIN.PASSWORD_REQUIRED,
|
|
44579
|
+
errors.passwordComplexity === 'invalid' && translations.LOGIN.PASSWORD_COMPLEXITY
|
|
44580
|
+
)
|
|
44581
|
+
),
|
|
44582
|
+
React__default['default'].createElement(
|
|
44583
|
+
'div',
|
|
44584
|
+
{ className: 'login__form__group' },
|
|
44585
|
+
React__default['default'].createElement('label', { htmlFor: 'repeatPassword' }, translations.LOGIN.RESET_REPEAT_PASSWORD_LABEL),
|
|
44586
|
+
React__default['default'].createElement('input', {
|
|
44587
|
+
type: 'password',
|
|
44588
|
+
id: 'repeatPassword',
|
|
44589
|
+
name: 'repeatPassword',
|
|
44590
|
+
value: formValues.repeatPassword,
|
|
44591
|
+
onChange: onChange,
|
|
44592
|
+
onBlur: handleBlur,
|
|
44593
|
+
required: true
|
|
44594
|
+
}),
|
|
44595
|
+
(touched.repeatPassword || submitted) &&
|
|
44596
|
+
(errors.repeatPassword || errors.matchPassword) &&
|
|
44597
|
+
React__default['default'].createElement(
|
|
44598
|
+
'div',
|
|
44599
|
+
{ id: 'username-error', className: 'login__error' },
|
|
44600
|
+
errors.repeatPassword === 'required' && translations.LOGIN.REPEAT_PASSWORD_REQUIRED,
|
|
44601
|
+
errors.matchPassword === 'mismatch' && translations.LOGIN.PASSWORDS_DO_NOT_MATCH
|
|
44602
|
+
)
|
|
44603
|
+
),
|
|
44604
|
+
React__default['default'].createElement(
|
|
44605
|
+
'button',
|
|
44606
|
+
{ type: 'button', className: 'cta cta--primary', onClick: handleResetPassword },
|
|
44607
|
+
translations.LOGIN.RESET_PASSWORD_SUBMIT_LABEL
|
|
44608
|
+
)
|
|
44609
|
+
)
|
|
44610
|
+
),
|
|
44611
|
+
passwordSet &&
|
|
44612
|
+
React__default['default'].createElement(
|
|
44613
|
+
'div',
|
|
44614
|
+
{ className: 'login__welcome' },
|
|
44615
|
+
React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
|
|
44616
|
+
React__default['default'].createElement('p', null, translations.LOGIN.RESET_PASSWORD_SUCCESSFUL_MESSAGE),
|
|
44617
|
+
React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
|
|
44618
|
+
),
|
|
44619
|
+
invalidToken &&
|
|
44620
|
+
React__default['default'].createElement(
|
|
44621
|
+
'div',
|
|
44622
|
+
{ className: 'login__welcome' },
|
|
44623
|
+
React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_INVALID_TOKEN_TITLE),
|
|
44624
|
+
React__default['default'].createElement('p', null, translations.LOGIN.RESET_PASSWORD_INVALID_TOKEN_DESCRIPTION),
|
|
44625
|
+
React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
|
|
44626
|
+
)
|
|
44627
|
+
);
|
|
44628
|
+
};
|
|
44629
|
+
|
|
44630
|
+
var ConfirmComponent = function (_a) {
|
|
44631
|
+
var tideClientConfig = _a.tideClientConfig,
|
|
44632
|
+
languageCode = _a.languageCode,
|
|
44633
|
+
handleBackToLogin = _a.handleBackToLogin;
|
|
44634
|
+
var _b = React.useState(false),
|
|
44635
|
+
isConfirmed = _b[0],
|
|
44636
|
+
setIsConfirmed = _b[1];
|
|
44637
|
+
var _c = React.useState(),
|
|
44638
|
+
touched = _c[0],
|
|
44639
|
+
setTouched = _c[1];
|
|
44640
|
+
var _d = React.useState({
|
|
44641
|
+
password: '',
|
|
44642
|
+
repeatPassword: ''
|
|
44643
|
+
}),
|
|
44644
|
+
formValues = _d[0],
|
|
44645
|
+
setFormValues = _d[1];
|
|
44646
|
+
var _e = React.useState({}),
|
|
44647
|
+
errors = _e[0],
|
|
44648
|
+
setErrors = _e[1];
|
|
44649
|
+
var _f = React.useState(null),
|
|
44650
|
+
token = _f[0],
|
|
44651
|
+
setToken = _f[1];
|
|
44652
|
+
var translations = getTranslations(languageCode !== null && languageCode !== void 0 ? languageCode : 'en-GB');
|
|
44653
|
+
React.useEffect(function () {
|
|
44654
|
+
if (typeof window !== 'undefined') {
|
|
44655
|
+
setToken(new URLSearchParams(window.location.search).get('token'));
|
|
44656
|
+
}
|
|
44657
|
+
}, []);
|
|
44658
|
+
var handleBlur = function (event) {
|
|
44659
|
+
var _a;
|
|
44660
|
+
if (!touched) {
|
|
44661
|
+
setTouched({ password: false, repeatPassword: false });
|
|
44662
|
+
}
|
|
44663
|
+
setTouched(__assign(__assign({}, touched), ((_a = {}), (_a[event.target.name] = true), _a)));
|
|
44664
|
+
validate();
|
|
44665
|
+
};
|
|
44666
|
+
var onChange = function (event) {
|
|
44667
|
+
var _a;
|
|
44668
|
+
setFormValues(__assign(__assign({}, formValues), ((_a = {}), (_a[event.target.name] = event.target.value), _a)));
|
|
44669
|
+
validate();
|
|
44670
|
+
};
|
|
44671
|
+
var validate = function () {
|
|
44672
|
+
var validationErrors = {};
|
|
44673
|
+
if (formValues) {
|
|
44674
|
+
if (!formValues.password || formValues.password.length === 0) {
|
|
44675
|
+
validationErrors.password = true;
|
|
44676
|
+
}
|
|
44677
|
+
if (!formValues.repeatPassword || formValues.repeatPassword.length === 0) {
|
|
44678
|
+
validationErrors.repeatPassword = true;
|
|
44679
|
+
} else if (formValues.password !== formValues.repeatPassword) {
|
|
44680
|
+
validationErrors.passwordMatch = true;
|
|
44681
|
+
}
|
|
44682
|
+
if (!token || token.length === 0) {
|
|
44683
|
+
validationErrors.token = true;
|
|
44684
|
+
}
|
|
44685
|
+
}
|
|
44686
|
+
setErrors(validationErrors);
|
|
44687
|
+
return Object.keys(validationErrors).length === 0;
|
|
44688
|
+
};
|
|
44689
|
+
var handleConfirmation = function () {
|
|
44690
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
44691
|
+
var isValid, response;
|
|
44692
|
+
return __generator(this, function (_b) {
|
|
44693
|
+
switch (_b.label) {
|
|
44694
|
+
case 0:
|
|
44695
|
+
setTouched({ password: true, repeatPassword: true });
|
|
44696
|
+
isValid = validate();
|
|
44697
|
+
if (!isValid) return [2 /*return*/];
|
|
44698
|
+
if (!token) return [3 /*break*/, 4];
|
|
44699
|
+
_b.label = 1;
|
|
44700
|
+
case 1:
|
|
44701
|
+
_b.trys.push([1, 3, , 4]);
|
|
44702
|
+
return [4 /*yield*/, confirmMember(token, formValues.password, true, tideClientConfig)];
|
|
44703
|
+
case 2:
|
|
44704
|
+
response = _b.sent();
|
|
44705
|
+
if (response.ok) {
|
|
44706
|
+
setIsConfirmed(true);
|
|
44707
|
+
}
|
|
44708
|
+
return [3 /*break*/, 4];
|
|
44709
|
+
case 3:
|
|
44710
|
+
_b.sent();
|
|
44711
|
+
return [3 /*break*/, 4];
|
|
44712
|
+
case 4:
|
|
44713
|
+
return [2 /*return*/];
|
|
44714
|
+
}
|
|
44715
|
+
});
|
|
44716
|
+
});
|
|
44717
|
+
};
|
|
44718
|
+
React.useEffect(
|
|
44719
|
+
function () {
|
|
44720
|
+
validate();
|
|
44721
|
+
},
|
|
44722
|
+
[formValues, token]
|
|
44723
|
+
);
|
|
44724
|
+
return React__default['default'].createElement(
|
|
44725
|
+
React__default['default'].Fragment,
|
|
44726
|
+
null,
|
|
44727
|
+
!isConfirmed &&
|
|
44728
|
+
React__default['default'].createElement(
|
|
44729
|
+
React__default['default'].Fragment,
|
|
44730
|
+
null,
|
|
44731
|
+
React__default['default'].createElement('h4', { className: 'login__card__title' }, translations.LOGIN.RESET_PASSWORD_TITLE),
|
|
44732
|
+
React__default['default'].createElement(
|
|
44733
|
+
'form',
|
|
44734
|
+
{
|
|
44735
|
+
className: 'login__form',
|
|
44736
|
+
onSubmit: function (e) {
|
|
44737
|
+
return e.preventDefault();
|
|
44738
|
+
},
|
|
44739
|
+
noValidate: true
|
|
44740
|
+
},
|
|
44741
|
+
React__default['default'].createElement(
|
|
44742
|
+
'div',
|
|
44743
|
+
{ className: 'login__form__group' },
|
|
44744
|
+
React__default['default'].createElement('label', { htmlFor: 'password' }, translations.LOGIN.RESET_PASSWORD_LABEL),
|
|
44745
|
+
React__default['default'].createElement('input', {
|
|
44746
|
+
type: 'password',
|
|
44747
|
+
id: 'password',
|
|
44748
|
+
name: 'password',
|
|
44749
|
+
value: formValues.password,
|
|
44750
|
+
onChange: onChange,
|
|
44751
|
+
onBlur: handleBlur,
|
|
44752
|
+
required: true
|
|
44753
|
+
}),
|
|
44754
|
+
((touched === null || touched === void 0 ? void 0 : touched.password) ||
|
|
44755
|
+
(touched === null || touched === void 0 ? void 0 : touched.repeatPassword)) &&
|
|
44756
|
+
errors.password &&
|
|
44757
|
+
React__default['default'].createElement('div', { id: 'username-error', className: 'login__error' }, translations.LOGIN.PASSWORD_REQUIRED)
|
|
44758
|
+
),
|
|
44759
|
+
React__default['default'].createElement(
|
|
44760
|
+
'div',
|
|
44761
|
+
{ className: 'login__form__group' },
|
|
44762
|
+
React__default['default'].createElement('label', { htmlFor: 'repeatPassword' }, translations.LOGIN.RESET_REPEAT_PASSWORD_LABEL),
|
|
44763
|
+
React__default['default'].createElement('input', {
|
|
44764
|
+
type: 'password',
|
|
44765
|
+
id: 'repeatPassword',
|
|
44766
|
+
name: 'repeatPassword',
|
|
44767
|
+
value: formValues.repeatPassword,
|
|
44768
|
+
onChange: onChange,
|
|
44769
|
+
onBlur: handleBlur,
|
|
44770
|
+
required: true
|
|
44771
|
+
}),
|
|
44772
|
+
((touched === null || touched === void 0 ? void 0 : touched.repeatPassword) ||
|
|
44773
|
+
(touched === null || touched === void 0 ? void 0 : touched.password)) &&
|
|
44774
|
+
(errors.repeatPassword || errors.passwordMatch) &&
|
|
44775
|
+
React__default['default'].createElement(
|
|
44776
|
+
'div',
|
|
44777
|
+
{ id: 'username-error', className: 'login__error' },
|
|
44778
|
+
errors.repeatPassword === 'required' && translations.LOGIN.REPEAT_PASSWORD_REQUIRED,
|
|
44779
|
+
errors.passwordMatch === 'mismatch' && translations.LOGIN.PASSWORDS_DO_NOT_MATCH
|
|
44780
|
+
)
|
|
44781
|
+
),
|
|
44782
|
+
React__default['default'].createElement(
|
|
44783
|
+
'button',
|
|
44784
|
+
{ type: 'button', className: 'cta cta--primary', onClick: handleConfirmation },
|
|
44785
|
+
translations.LOGIN.RESET_PASSWORD_SUBMIT_LABEL
|
|
44786
|
+
)
|
|
44787
|
+
)
|
|
44788
|
+
),
|
|
44789
|
+
isConfirmed &&
|
|
44790
|
+
React__default['default'].createElement(
|
|
44791
|
+
'div',
|
|
44792
|
+
{ className: 'login__welcome' },
|
|
44793
|
+
React__default['default'].createElement('h3', { className: 'login__card__title' }, translations.LOGIN.RECEIVED_REQUEST),
|
|
44794
|
+
React__default['default'].createElement('p', null, translations.LOGIN.ACCOUNT_ACTIVATED_LOGIN),
|
|
44795
|
+
React__default['default'].createElement('button', { className: 'cta cta--primary', onClick: handleBackToLogin }, translations.LOGIN.BACK_TO_LOGIN)
|
|
44796
|
+
)
|
|
44797
|
+
);
|
|
44798
|
+
};
|
|
44799
|
+
|
|
44800
|
+
var Login = function (_a) {
|
|
44801
|
+
var tideClientConfig = _a.tideClientConfig,
|
|
44802
|
+
portalId = _a.portalId,
|
|
44803
|
+
languageCode = _a.languageCode,
|
|
44804
|
+
imageSrc = _a.imageSrc,
|
|
44805
|
+
logo = _a.logo,
|
|
44806
|
+
isMemberConfirmation = _a.isMemberConfirmation,
|
|
44807
|
+
isLoginPage = _a.isLoginPage,
|
|
44808
|
+
isResetPassword = _a.isResetPassword,
|
|
44809
|
+
member = _a.member,
|
|
44810
|
+
setMember = _a.setMember,
|
|
44811
|
+
handleBackToHome = _a.handleBackToHome,
|
|
44812
|
+
handleBackToLogin = _a.handleBackToLogin;
|
|
44813
|
+
return React__default['default'].createElement(
|
|
44814
|
+
'div',
|
|
44815
|
+
{ className: 'login' },
|
|
44816
|
+
React__default['default'].createElement(
|
|
44817
|
+
'div',
|
|
44818
|
+
{ className: 'login__img__wrapper' },
|
|
44819
|
+
React__default['default'].createElement('img', {
|
|
44820
|
+
className: 'login__img',
|
|
44821
|
+
src: imageSrc ? imageSrc : 'https://cdn.pixabay.com/photo/2022/04/08/06/36/rock-7118843_1280.jpg',
|
|
44822
|
+
alt: 'Login'
|
|
44823
|
+
})
|
|
44824
|
+
),
|
|
44825
|
+
React__default['default'].createElement(
|
|
44826
|
+
'div',
|
|
44827
|
+
{ className: 'login__container' },
|
|
44828
|
+
React__default['default'].createElement(
|
|
44829
|
+
'div',
|
|
44830
|
+
{ className: 'login__card' },
|
|
44831
|
+
logo && React__default['default'].createElement('div', { className: 'login__logo' }, logo),
|
|
44832
|
+
isLoginPage &&
|
|
44833
|
+
React__default['default'].createElement(LoginComponent, {
|
|
44834
|
+
tideClientConfig: tideClientConfig,
|
|
44835
|
+
portalId: portalId,
|
|
44836
|
+
languageCode: languageCode,
|
|
44837
|
+
member: member,
|
|
44838
|
+
setMember: setMember,
|
|
44839
|
+
handleBackToHome: handleBackToHome,
|
|
44840
|
+
handleBackToLogin: handleBackToLogin
|
|
44841
|
+
}),
|
|
44842
|
+
isResetPassword &&
|
|
44843
|
+
React__default['default'].createElement(ResetPasswordComponent, {
|
|
44844
|
+
tideClientConfig: tideClientConfig,
|
|
44845
|
+
portalId: portalId,
|
|
44846
|
+
languageCode: languageCode,
|
|
44847
|
+
member: member,
|
|
44848
|
+
setMember: setMember,
|
|
44849
|
+
handleBackToHome: handleBackToHome,
|
|
44850
|
+
handleBackToLogin: handleBackToLogin
|
|
44851
|
+
}),
|
|
44852
|
+
isMemberConfirmation &&
|
|
44853
|
+
React__default['default'].createElement(ConfirmComponent, {
|
|
44854
|
+
tideClientConfig: tideClientConfig,
|
|
44855
|
+
portalId: portalId,
|
|
44856
|
+
languageCode: languageCode,
|
|
44857
|
+
member: member,
|
|
44858
|
+
setMember: setMember,
|
|
44859
|
+
handleBackToHome: handleBackToHome,
|
|
44860
|
+
handleBackToLogin: handleBackToLogin
|
|
44861
|
+
})
|
|
44862
|
+
)
|
|
44863
|
+
)
|
|
44864
|
+
);
|
|
44865
|
+
};
|
|
44866
|
+
|
|
41206
44867
|
var signalR$1 = {};
|
|
41207
44868
|
|
|
41208
44869
|
var jqueryDeferred$1 = { exports: {} };
|
|
@@ -45102,6 +48763,7 @@ exports.BookingWizard = BookingWizard;
|
|
|
45102
48763
|
exports.Footer = Footer;
|
|
45103
48764
|
exports.Header = Header;
|
|
45104
48765
|
exports.ImageCardGrid = ImageCardGrid;
|
|
48766
|
+
exports.Login = Login;
|
|
45105
48767
|
exports.Navbar = Navbar;
|
|
45106
48768
|
exports.QSM = QSM;
|
|
45107
48769
|
exports.SearchResults = SearchResults;
|