@everymatrix/player-account-controller 1.74.7 → 1.74.8
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/components/{PlayerAccountController-Cm-pb2sx.js → PlayerAccountController-4zAuIhXb.js} +7 -7
- package/components/{PlayerAccountController-BY35CZFy.cjs → PlayerAccountController-B53eiCm2.cjs} +1 -1
- package/components/{PlayerAccountController-b7ocDQ8i.js → PlayerAccountController-BNFenXlV.js} +7 -7
- package/components/{PlayerAccountProductRestriction-BrbHcAfU.js → PlayerAccountProductRestriction-BA3Ht4v0.js} +2235 -1627
- package/components/{PlayerAccountProductRestriction-CLG0mXNs.js → PlayerAccountProductRestriction-BVD0VXs9.js} +2267 -1659
- package/components/{PlayerAccountProductRestriction-nQ_8_MV1.cjs → PlayerAccountProductRestriction-DJUublp5.cjs} +689 -267
- package/components/{PlayerAccountSelfExclusion-SOUjqfHu.js → PlayerAccountSelfExclusion-B9rXp_dv.js} +1 -1
- package/components/{PlayerAccountSelfExclusion-j0N6OBN9.js → PlayerAccountSelfExclusion-BwFD6ZJu.js} +1 -1
- package/components/{PlayerAccountSelfExclusion-BknkeC0Z.cjs → PlayerAccountSelfExclusion-CwlTQfYm.cjs} +1 -1
- package/components/{PlayerAccountTimeout-CESsEjza.cjs → PlayerAccountTimeout-CPLGI8jX.cjs} +1 -1
- package/components/{PlayerAccountTimeout-KHzNTbup.js → PlayerAccountTimeout-DfxFUM4s.js} +2 -2
- package/components/{PlayerAccountTimeout-B3SJfPA3.js → PlayerAccountTimeout-mAcIWL2w.js} +2 -2
- package/components/{PlayerAccountTransactionsHistory-D6tHrBC_.js → PlayerAccountTransactionsHistory-B61bTygv.js} +2 -2
- package/components/{PlayerAccountTransactionsHistory-Dy5htSFg.js → PlayerAccountTransactionsHistory-D_Rh7xzG.js} +2 -2
- package/components/{PlayerAccountTransactionsHistory-30x4yifP.cjs → PlayerAccountTransactionsHistory-J6QX4Mo6.cjs} +1 -1
- package/components/{PlayerBonusHistory-BtsC9ZN8.js → PlayerBonusHistory-BZz5QP4A.js} +1 -1
- package/components/{PlayerBonusHistory-DdcyUG-1.js → PlayerBonusHistory-BxcxPRN7.js} +1 -1
- package/components/{PlayerBonusHistory-l9JKc1SI.cjs → PlayerBonusHistory-WEjZxD6T.cjs} +1 -1
- package/components/{PlayerGamingHistory-DrygiT7t.cjs → PlayerGamingHistory-BxN4Cjj3.cjs} +1 -1
- package/components/{PlayerGamingHistory-CgSvSixH.js → PlayerGamingHistory-CN6XDOWB.js} +1 -1
- package/components/{PlayerGamingHistory-GxtuAObW.js → PlayerGamingHistory-VnHkfl2z.js} +1 -1
- package/es2015/player-account-controller.cjs +1 -1
- package/es2015/player-account-controller.js +1 -1
- package/esnext/player-account-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{checkbox-group-input_15-Dz8Enjzg.js → checkbox-group-input_15-B47EbzkJ.js} +3546 -2938
- package/stencil/{checkbox-group-input_15-Cps4LOfl.js → checkbox-group-input_15-BBaHCJ8m.js} +3547 -2939
- package/stencil/{checkbox-group-input_15-DWi9V8tw.cjs → checkbox-group-input_15-BPXIBJ9O.cjs} +687 -265
- package/stencil/{index-13661b98-ufIIKmVK.js → index-13661b98-BzYpZXJ-.js} +1 -1
- package/stencil/{index-13661b98-CpXzOrnx.js → index-13661b98-D93Apl47.js} +1 -1
- package/stencil/{index-13661b98-o8vCngwM.cjs → index-13661b98-DBuU9Lk0.cjs} +1 -1
- package/stencil/{pam-change-password-CWwKWuSv.js → pam-change-password-9bMd9dOQ.js} +1 -1
- package/stencil/{pam-change-password-BbSKndri.cjs → pam-change-password-D9deCtek.cjs} +1 -1
- package/stencil/{pam-change-password-0b043d09-BhckrWb7.js → pam-change-password-af5033a0-BdPXYjRb.js} +170 -97
- package/stencil/pam-change-password-af5033a0-CPFagM2l.cjs +125 -0
- package/stencil/{pam-change-password-0b043d09-D9qr1QZW.js → pam-change-password-af5033a0-CXI6y6VZ.js} +170 -97
- package/stencil/{pam-change-password-pNFi_nib.js → pam-change-password-h1ivBSP6.js} +1 -1
- package/stencil/pam-change-password-0b043d09-CIyrSOWr.cjs +0 -125
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";const s=require("./index-13661b98-DBuU9Lk0.cjs"),g="en",w={en:{title:"Change Password",btnSubmit:"Change Password",passwordPlaceholderText:"Please enter your password",newPasswordPlaceholderText:"Please enter your new password",confirmPasswordPlaceholderText:"Please confirm your new password",passwordDisplayText:"Current Password",newPasswordDisplayText:"New Password",confirmPasswordDisplayText:"Confirm Password",successMsg:"Password changed successfully",errorMsgGeneric:"There was an error when attempting to change your password","gm.pms.password_not_verified_unauthorized":"The current password you have entered is incorrect","gm.pms.password_policy_failed":"Password cannot be the same as any of the {forbiddenLastPasswordsCount} previous passwords. Password cannot be changed sooner than {minimumPasswordAgeLimitHours} {hours} after the last change.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},fr:{title:"Changer le mot de passe",btnSubmit:"Changer le mot de passe",passwordPlaceholderText:"Veuillez entrer votre mot de passe",newPasswordPlaceholderText:"Veuillez entrer votre nouveau mot de passe",confirmPasswordPlaceholderText:"Veuillez confirmer votre nouveau mot de passe",passwordDisplayText:"Mot de passe actuel",newPasswordDisplayText:"Nouveau mot de passe",confirmPasswordDisplayText:"Confirmer le mot de passe",successMsg:"Mot de passe changé avec succès",errorMsgGeneric:"Une erreur est survenue lors de la tentative de changement de mot de passe","gm.pms.password_not_verified_unauthorized":"Le mot de passe actuel que vous avez entré est incorrect","gm.pms.password_policy_failed":"Le mot de passe ne peut pas être identique à l'un des {forbiddenLastPasswordsCount} derniers mots de passe. Le mot de passe ne peut pas être changé avant {minimumPasswordAgeLimitHours} {hours} après le dernier changement.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},ro:{title:"Schimbă Parola",btnSubmit:"Schimbă Parola",passwordPlaceholderText:"Vă rugăm să introduceți parola",newPasswordPlaceholderText:"Vă rugăm să introduceți noua parolă",confirmPasswordPlaceholderText:"Vă rugăm să confirmați noua parolă",passwordDisplayText:"Parolă Curentă",newPasswordDisplayText:"Parolă Nouă",confirmPasswordDisplayText:"Confirmă Parola",successMsg:"Parola a fost schimbată cu succes",errorMsgGeneric:"A apărut o eroare la încercarea de schimbare a parolei","gm.pms.password_not_verified_unauthorized":"Parola curentă introdusă este incorectă","gm.pms.password_policy_failed":"Parola nu poate fi aceeași cu oricare dintre ultimele {forbiddenLastPasswordsCount} parole. Parola nu poate fi schimbată mai devreme de {minimumPasswordAgeLimitHours} {hours} după ultima schimbare.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},es:{title:"Cambiar Contraseña",btnSubmit:"Cambiar Contraseña",passwordPlaceholderText:"Por favor, introduce tu contraseña",newPasswordPlaceholderText:"Por favor, introduce tu nueva contraseña",confirmPasswordPlaceholderText:"Por favor, confirma tu nueva contraseña",passwordDisplayText:"Contraseña Actual",newPasswordDisplayText:"Nueva Contraseña",confirmPasswordDisplayText:"Confirmar Contraseña",successMsg:"Contraseña cambiada con éxito",errorMsgGeneric:"Hubo un error al intentar cambiar tu contraseña","gm.pms.password_not_verified_unauthorized":"La contraseña actual que has introducido es incorrecta","gm.pms.password_policy_failed":"La contraseña no puede ser la misma que cualquiera de las {forbiddenLastPasswordsCount} contraseñas anteriores. La contraseña no se puede cambiar antes de {minimumPasswordAgeLimitHours} {hours} después del último cambio.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},pt:{title:"Alterar Senha",btnSubmit:"Alterar Senha",passwordPlaceholderText:"Por favor, insira sua senha",newPasswordPlaceholderText:"Por favor, insira sua nova senha",confirmPasswordPlaceholderText:"Por favor, confirme sua nova senha",passwordDisplayText:"Senha Atual",newPasswordDisplayText:"Nova Senha",confirmPasswordDisplayText:"Confirmar Senha",successMsg:"Senha alterada com sucesso",errorMsgGeneric:"Ocorreu um erro ao tentar alterar sua senha","gm.pms.password_not_verified_unauthorized":"A senha atual que você inseriu está incorreta","gm.pms.password_policy_failed":"A senha não pode ser a mesma que qualquer uma das últimas {forbiddenLastPasswordsCount} senhas. A senha não pode ser alterada antes de {minimumPasswordAgeLimitHours} {hours} após a última alteração.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},hr:{title:"Promijeni lozinku",btnSubmit:"Promijeni lozinku",passwordPlaceholderText:"Unesite svoju lozinku",newPasswordPlaceholderText:"Unesite novu lozinku",confirmPasswordPlaceholderText:"Potvrdite novu lozinku",passwordDisplayText:"Trenutna lozinka",newPasswordDisplayText:"Nova lozinka",confirmPasswordDisplayText:"Potvrdite lozinku",successMsg:"Lozinka je uspješno promijenjena",errorMsgGeneric:"Došlo je do pogreške prilikom pokušaja promjene lozinke","gm.pms.password_not_verified_unauthorized":"Unesena trenutna lozinka nije ispravna","gm.pms.password_policy_failed":"Lozinka ne može biti ista kao bilo koja od posljednjih {forbiddenLastPasswordsCount} lozinki. Lozinka se ne može promijeniti prije nego što prođe {minimumPasswordAgeLimitHours} {hours} od posljednje promjene.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},tr:{title:"Şifreyi Değiştir",btnSubmit:"Şifreyi Değiştir",passwordPlaceholderText:"Lütfen şifrenizi girin",newPasswordPlaceholderText:"Lütfen yeni şifrenizi girin",confirmPasswordPlaceholderText:"Lütfen yeni şifrenizi onaylayın",passwordDisplayText:"Mevcut Şifre",newPasswordDisplayText:"Yeni Şifre",confirmPasswordDisplayText:"Şifreyi Onaylayın",successMsg:"Şifre başarıyla değiştirildi",errorMsgGeneric:"Şifrenizi değiştirirken bir hata oluştu","gm.pms.password_not_verified_unauthorized":"Girdiğiniz mevcut şifre yanlış","gm.pms.password_policy_failed":"Şifre, son {forbiddenLastPasswordsCount} şifreden herhangi biriyle aynı olamaz. Şifre, son değişiklikten sonra {minimumPasswordAgeLimitHours} {hours} içinde değiştirilemez.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."},hu:{title:"Jelszó megváltoztatása",btnSubmit:"Jelszó megváltoztatása",passwordPlaceholderText:"Kérjük, adja meg a jelszavát",newPasswordPlaceholderText:"Kérjük, adja meg az új jelszavát",confirmPasswordPlaceholderText:"Kérjük, erősítse meg az új jelszavát",passwordDisplayText:"Jelenlegi jelszó",newPasswordDisplayText:"Új jelszó",confirmPasswordDisplayText:"Jelszó megerősítése",successMsg:"A jelszó sikeresen megváltozott",errorMsgGeneric:"Hiba történt a jelszó megváltoztatásakor","gm.pms.password_not_verified_unauthorized":"A megadott jelenlegi jelszó helytelen","gm.pms.password_policy_failed":"A jelszó nem egyezhet meg az utolsó {forbiddenLastPasswordsCount} jelszóval. A jelszó nem változtatható meg {minimumPasswordAgeLimitHours} {hours}-on belül az utolsó módosítás óta.",passwordContainsFirstName:"Password should not contain your first name.",passwordContainsLastName:"Password should not contain your last name.",passwordContainsUsername:"Password should not contain your username.",passwordContainsEmail:"Password should not contain your email.",passwordContainsFirstNamePlusLastName:"Password should not contain first name + last name.",passwordContainsFirstNameAndLastName:"Password should not contain first name and last name.",passwordContainsDateOfBirth:"Password should not contain date of birth."}},P=a=>new Promise(n=>{fetch(a).then(e=>e.json()).then(e=>{Object.keys(e).forEach(t=>{for(let o in e[t])w[t][o]=e[t][o]}),n(!0)})}),i=(a,n,e)=>{const t=n;let o=w[t!==void 0?t:g][a];if(e!==void 0)for(const[l,r]of Object.entries(e.values)){const d=new RegExp(`{${l}}`,"g");o=o.replace(d,r)}return o};function c(){const a=navigator.userAgent.toLowerCase(),n=screen.availWidth,e=screen.availHeight;if(a.includes("iphone"))return"mobile";if(a.includes("android")){if(e>n&&n<800)return"mobile";if(n>e&&e<800)return"tablet"}return"desktop"}function m(a,n){if(a){const e=document.createElement("style");e.innerHTML=n,a.appendChild(e)}}function h(a,n){const e=new URL(n);fetch(e.href).then(t=>t.text()).then(t=>{const o=document.createElement("style");o.innerHTML=t,a&&a.appendChild(o)}).catch(t=>{console.error("There was an error while trying to load client styling from URL",t)})}function f(a,n,e){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(n,o=>{t.innerHTML=o,a&&a.appendChild(t)})}}const y=`:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.PlayerChangePassword {
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
container-type: inline-size;
|
|
10
|
+
opacity: 1;
|
|
11
|
+
animation-name: fadeIn;
|
|
12
|
+
animation-iteration-count: 1;
|
|
13
|
+
animation-timing-function: ease-in;
|
|
14
|
+
animation-duration: 0.3s;
|
|
15
|
+
container-type: inline-size;
|
|
16
|
+
}
|
|
17
|
+
.PlayerChangePassword .Wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
.PlayerChangePassword .Title {
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
font-size: var(--emw--font-size-x-large, 26px);
|
|
25
|
+
color: var(--emw--color-primary, #22B04E);
|
|
26
|
+
font-weight: var(--emw--font-weight-semibold, 500);
|
|
27
|
+
}
|
|
28
|
+
.PlayerChangePassword .TitleMobile {
|
|
29
|
+
font-size: var(--emw--font-size-x-large, 20px);
|
|
30
|
+
color: var(--emw--color-primary, #22B04E);
|
|
31
|
+
}
|
|
32
|
+
.PlayerChangePassword svg {
|
|
33
|
+
fill: var(--emw--color-primary, #22B04E);
|
|
34
|
+
}
|
|
35
|
+
.PlayerChangePassword .ButtonReturn {
|
|
36
|
+
display: none;
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 10px;
|
|
40
|
+
}
|
|
41
|
+
.PlayerChangePassword .Form {
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: repeat(1, 1fr);
|
|
44
|
+
gap: 40px;
|
|
45
|
+
justify-items: stretch;
|
|
46
|
+
align-content: flex-start;
|
|
47
|
+
overflow: auto;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
}
|
|
51
|
+
.PlayerChangePassword .Form .FieldsSection {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 30px;
|
|
55
|
+
}
|
|
56
|
+
.PlayerChangePassword .Form .ButtonsSection {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
justify-content: space-around;
|
|
60
|
+
align-items: center;
|
|
61
|
+
position: relative;
|
|
62
|
+
}
|
|
63
|
+
.PlayerChangePassword .Button {
|
|
64
|
+
font-family: inherit;
|
|
65
|
+
border-radius: var(--emw--button-border-radius, var(--emw--border-radius-large, 50px));
|
|
66
|
+
background: var(--emw--button-background-color, var(--emw--color-primary, #22B04E));
|
|
67
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #22B04E));
|
|
68
|
+
color: var(--emw--button-text-color, var(--emw--color-white, #FFFFFF));
|
|
69
|
+
font-size: var(--emw--font-size-large, 20px);
|
|
70
|
+
font-weight: var(--emw--font-weight-normal, 400);
|
|
71
|
+
height: 50px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
text-transform: uppercase;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
.PlayerChangePassword .Button:disabled {
|
|
77
|
+
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
78
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #828282));
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
.PlayerChangePassword.skeleton .Form .ButtonReturn {
|
|
83
|
+
width: 150px;
|
|
84
|
+
height: 30px;
|
|
85
|
+
margin-top: 15px;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection {
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection .FieldContainer .FieldTitle {
|
|
92
|
+
width: 100px;
|
|
93
|
+
margin-top: 30px;
|
|
94
|
+
margin-bottom: 15px;
|
|
95
|
+
}
|
|
96
|
+
.PlayerChangePassword.skeleton .Form .ButtonsSection .Button {
|
|
97
|
+
font-family: inherit;
|
|
98
|
+
border-radius: 50px;
|
|
99
|
+
background: transparent;
|
|
100
|
+
border: none;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
}
|
|
103
|
+
@container (max-width: 425px) {
|
|
104
|
+
.PlayerChangePassword .Form .ButtonReturn {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
}
|
|
107
|
+
.PlayerChangePassword .Form .Title {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes fadeIn {
|
|
113
|
+
0% {
|
|
114
|
+
opacity: 0.01;
|
|
115
|
+
}
|
|
116
|
+
1% {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
50% {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
}
|
|
122
|
+
100% {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
}`,C=y,p=class{constructor(a){s.registerInstance(this,a),this.currentPasswordValue="",this.newPasswordValue="",this.confirmPasswordValue="",this.isCurrentPasswordValid=!1,this.isNewPasswordValid=!1,this.isConfirmPasswordValid=!1,this.errorMsg="",this.currentPasswordValidationSchema={mandatory:!0,custom:[]},this.newPasswordValidationSchema={mandatory:!0,custom:[]},this.confirmPasswordValidationSchema={mandatory:!0,custom:[]},this.initValidationSchemas=()=>{this.confirmPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:[this.policy.customValidationRules.find(n=>n.rule==="duplicate-input")]},this.newPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:this.policy.customValidationRules},this.currentPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:this.policy.customValidationRules}},this.setErrorMsg=(n,e)=>{var t,o,l;switch(n){case"gm.pms.password_policy_failed":if(((o=(t=e==null?void 0:e.errors)===null||t===void 0?void 0:t.policy)===null||o===void 0?void 0:o.length)>0){const r={forbiddenLastPasswordsCount:this.policy.forbiddenLastPasswordsCount,minimumPasswordAgeLimitHours:this.policy.minimumPasswordAgeLimitHours,hours:this.policy.minimumPasswordAgeLimitHours>1?"hours":"hour"};this.errorMsg=i(n,this.language,{values:r})}else if(!((l=e==null?void 0:e.errors)===null||l===void 0)&&l.strength&&Array.isArray(e.errors.strength)){const r=e.errors.strength.map(d=>{const u={"Password should not contain first name.":"passwordContainsFirstName","Password should not contain last name.":"passwordContainsLastName","Password should not contain username.":"passwordContainsUsername","Password should not contain email.":"passwordContainsEmail","Password should not contain first name + last name.":"passwordContainsFirstNamePlusLastName","Password should not contain first name and last name.":"passwordContainsFirstNameAndLastName","Password should not contain date of birth.":"passwordContainsDateOfBirth"}[d]||null;return u?i(u,this.language):d});this.errorMsg=r.join(" ")}break;case"gm.pms.password_not_verified_unauthorized":this.errorMsg=i(n,this.language);break;default:this.errorMsg=i("errorMsgGeneric",this.language)}},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.getPolicy=()=>{const n=new URL("/api/v1/players/password-management/password",this.endpoint),e=new Headers;e.append("Accept","text/plain"),e.append("Content-Type","application/json-patch+json");const t={method:"GET",headers:e};fetch(n.href,t).then(o=>o.status===200&&o.json()).then(o=>{this.policy=o,this.policy.customValidationRules.forEach(l=>{l.rule=l.rule.toLowerCase(),l.rule==="duplicateinput"&&(l.rule="duplicate-input")}),this.initValidationSchemas()}).catch(o=>{console.error(`${i("errorMsgGeneric",this.language)}:`,o),window.postMessage({type:"WidgetNotification",data:{type:"error",message:i("errorMsgGeneric",this.language)}},window.location.href)}).finally(()=>{this.isSkeletonLoading=!1})},this.submitNewPassword=n=>{if(n.preventDefault(),this.isBtnSubmitEnabled){const e=new URL("/api/v1/players/password-management/password",this.endpoint),t=new Headers;t.append("accept","text/plain"),t.append("Content-Type","application/json-patch+json");const o=JSON.stringify({token:this.forgotMode==="true"?this.token:this.session,oldPassword:this.currentPasswordValue,newPassword:this.confirmPasswordValue}),l={method:"PUT",headers:t,body:o};fetch(e.href,l).then(r=>r.json()).then(r=>{r.errorCode===null&&r.message==="pms.password.update.success"?(window.postMessage({type:"PasswordChangedSuccessfully"}),window.postMessage({type:"WidgetNotification",data:{type:"success",message:i("successMsg",this.language)}},window.location.href)):(this.setErrorMsg(r.message,r),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMsg}},window.location.href))}).catch(r=>console.error(r))}},this.language="en",this.endpoint="",this.session="",this.token="",this.forgotMode="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.isBtnSubmitEnabled=!1,this.isSkeletonLoading=!0,this.isMobile=c()==="mobile"||c()==="tablet"}handleClientStylingChange(a,n){a!=n&&m(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(a,n){a!=n&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}sendValidityStateHandler(a){switch(this.isBtnSubmitEnabled=!1,a.detail.name){case"password":this.isCurrentPasswordValid=a.detail.valid;break;case"newPassword":this.isNewPasswordValid=a.detail.valid;break;case"newPasswordDuplicate":this.isConfirmPasswordValid=a.detail.valid;break}(this.forgotMode==="true"||this.isCurrentPasswordValid)&&this.isNewPasswordValid&&this.isConfirmPasswordValid&&(this.isBtnSubmitEnabled=!0)}sendInputValueHandler(a){switch(a.detail.name){case"password":this.currentPasswordValue=a.detail.value;break;case"newPassword":this.newPasswordValue=a.detail.value;break;case"newPasswordDuplicate":this.confirmPasswordValue=a.detail.value;break}}componentWillLoad(){if(this.getPolicy(),this.translationUrl)return P(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?f(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&m(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return this.isSkeletonLoading?s.h("div",{class:"PlayerChangePassword skeleton"},s.h("form",{class:"Form"},s.h("div",{class:"ButtonReturn"},s.h("ui-skeleton",{structure:"text",width:"auto",height:"30px"})),s.h("section",{class:"FieldsSection"},s.h("div",{class:"FieldContainer"},s.h("div",{class:"FieldTitle"},s.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),s.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"})),s.h("div",{class:"FieldContainer"},s.h("div",{class:"FieldTitle"},s.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),s.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"})),s.h("div",{class:"FieldContainer"},s.h("div",{class:"FieldTitle"},s.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),s.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"}))),s.h("section",{class:"ButtonsSection"},s.h("div",{class:"Button"},s.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"}))))):s.h("div",{class:"PlayerChangePassword",ref:a=>this.stylingContainer=a},s.h("form",{class:"Form"},s.h("div",{class:"ButtonReturn",onClick:this.toggleScreen},s.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},s.h("g",{transform:"translate(-20 -158)"},s.h("g",{transform:"translate(20 158)"},s.h("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),s.h("h2",{class:"TitleMobile"},i("title",this.language))),s.h("h2",{class:"Title"},i("title",this.language)),s.h("section",{class:"FieldsSection"},this.forgotMode==="false"&&s.h("general-input",{type:"password",action:"input",name:"password",language:this.language,"display-name":i("passwordDisplayText",this.language),placeholder:i("passwordPlaceholderText",this.language),validation:this.currentPasswordValidationSchema,clientStyling:this.clientStyling,"mb-source":this.mbSource,"hide-password-complexity":"true"}),s.h("general-input",{type:"password",action:"input",name:"newPassword",language:this.language,"display-name":i("newPasswordDisplayText",this.language),placeholder:i("newPasswordPlaceholderText",this.language),validation:this.newPasswordValidationSchema,clientStyling:this.clientStyling,"mb-source":this.mbSource}),s.h("general-input",{type:"password",action:"input",name:"newPasswordDuplicate",language:this.language,"display-name":i("confirmPasswordDisplayText",this.language),placeholder:i("confirmPasswordPlaceholderText",this.language),validation:this.confirmPasswordValidationSchema,"is-duplicate-input":!0,clientStyling:this.clientStyling,"mb-source":this.mbSource})),s.h("section",{class:"ButtonsSection"},s.h("button",{class:"Button",disabled:!this.isBtnSubmitEnabled,onClick:this.submitNewPassword},i("btnSubmit",this.language)))))}static get watchers(){return{clientStyling:["handleClientStylingChange","handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};p.style=C;exports.PamChangePassword=p;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as p, h as
|
|
2
|
-
const
|
|
1
|
+
import { r as p, h as s } from "./index-13661b98-D93Apl47.js";
|
|
2
|
+
const g = "en", w = {
|
|
3
3
|
en: {
|
|
4
4
|
title: "Change Password",
|
|
5
5
|
btnSubmit: "Change Password",
|
|
@@ -12,7 +12,14 @@ const w = "en", h = {
|
|
|
12
12
|
successMsg: "Password changed successfully",
|
|
13
13
|
errorMsgGeneric: "There was an error when attempting to change your password",
|
|
14
14
|
"gm.pms.password_not_verified_unauthorized": "The current password you have entered is incorrect",
|
|
15
|
-
"gm.pms.password_policy_failed": "Password cannot be the same as any of the {forbiddenLastPasswordsCount} previous passwords. Password cannot be changed sooner than {minimumPasswordAgeLimitHours} {hours} after the last change."
|
|
15
|
+
"gm.pms.password_policy_failed": "Password cannot be the same as any of the {forbiddenLastPasswordsCount} previous passwords. Password cannot be changed sooner than {minimumPasswordAgeLimitHours} {hours} after the last change.",
|
|
16
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
17
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
18
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
19
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
20
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
21
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
22
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
16
23
|
},
|
|
17
24
|
fr: {
|
|
18
25
|
title: "Changer le mot de passe",
|
|
@@ -26,7 +33,14 @@ const w = "en", h = {
|
|
|
26
33
|
successMsg: "Mot de passe changé avec succès",
|
|
27
34
|
errorMsgGeneric: "Une erreur est survenue lors de la tentative de changement de mot de passe",
|
|
28
35
|
"gm.pms.password_not_verified_unauthorized": "Le mot de passe actuel que vous avez entré est incorrect",
|
|
29
|
-
"gm.pms.password_policy_failed": "Le mot de passe ne peut pas être identique à l'un des {forbiddenLastPasswordsCount} derniers mots de passe. Le mot de passe ne peut pas être changé avant {minimumPasswordAgeLimitHours} {hours} après le dernier changement."
|
|
36
|
+
"gm.pms.password_policy_failed": "Le mot de passe ne peut pas être identique à l'un des {forbiddenLastPasswordsCount} derniers mots de passe. Le mot de passe ne peut pas être changé avant {minimumPasswordAgeLimitHours} {hours} après le dernier changement.",
|
|
37
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
38
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
39
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
40
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
41
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
42
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
43
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
30
44
|
},
|
|
31
45
|
ro: {
|
|
32
46
|
title: "Schimbă Parola",
|
|
@@ -40,7 +54,14 @@ const w = "en", h = {
|
|
|
40
54
|
successMsg: "Parola a fost schimbată cu succes",
|
|
41
55
|
errorMsgGeneric: "A apărut o eroare la încercarea de schimbare a parolei",
|
|
42
56
|
"gm.pms.password_not_verified_unauthorized": "Parola curentă introdusă este incorectă",
|
|
43
|
-
"gm.pms.password_policy_failed": "Parola nu poate fi aceeași cu oricare dintre ultimele {forbiddenLastPasswordsCount} parole. Parola nu poate fi schimbată mai devreme de {minimumPasswordAgeLimitHours} {hours} după ultima schimbare."
|
|
57
|
+
"gm.pms.password_policy_failed": "Parola nu poate fi aceeași cu oricare dintre ultimele {forbiddenLastPasswordsCount} parole. Parola nu poate fi schimbată mai devreme de {minimumPasswordAgeLimitHours} {hours} după ultima schimbare.",
|
|
58
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
59
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
60
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
61
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
62
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
63
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
64
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
44
65
|
},
|
|
45
66
|
es: {
|
|
46
67
|
title: "Cambiar Contraseña",
|
|
@@ -54,7 +75,14 @@ const w = "en", h = {
|
|
|
54
75
|
successMsg: "Contraseña cambiada con éxito",
|
|
55
76
|
errorMsgGeneric: "Hubo un error al intentar cambiar tu contraseña",
|
|
56
77
|
"gm.pms.password_not_verified_unauthorized": "La contraseña actual que has introducido es incorrecta",
|
|
57
|
-
"gm.pms.password_policy_failed": "La contraseña no puede ser la misma que cualquiera de las {forbiddenLastPasswordsCount} contraseñas anteriores. La contraseña no se puede cambiar antes de {minimumPasswordAgeLimitHours} {hours} después del último cambio."
|
|
78
|
+
"gm.pms.password_policy_failed": "La contraseña no puede ser la misma que cualquiera de las {forbiddenLastPasswordsCount} contraseñas anteriores. La contraseña no se puede cambiar antes de {minimumPasswordAgeLimitHours} {hours} después del último cambio.",
|
|
79
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
80
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
81
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
82
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
83
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
84
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
85
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
58
86
|
},
|
|
59
87
|
pt: {
|
|
60
88
|
title: "Alterar Senha",
|
|
@@ -68,7 +96,14 @@ const w = "en", h = {
|
|
|
68
96
|
successMsg: "Senha alterada com sucesso",
|
|
69
97
|
errorMsgGeneric: "Ocorreu um erro ao tentar alterar sua senha",
|
|
70
98
|
"gm.pms.password_not_verified_unauthorized": "A senha atual que você inseriu está incorreta",
|
|
71
|
-
"gm.pms.password_policy_failed": "A senha não pode ser a mesma que qualquer uma das últimas {forbiddenLastPasswordsCount} senhas. A senha não pode ser alterada antes de {minimumPasswordAgeLimitHours} {hours} após a última alteração."
|
|
99
|
+
"gm.pms.password_policy_failed": "A senha não pode ser a mesma que qualquer uma das últimas {forbiddenLastPasswordsCount} senhas. A senha não pode ser alterada antes de {minimumPasswordAgeLimitHours} {hours} após a última alteração.",
|
|
100
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
101
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
102
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
103
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
104
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
105
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
106
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
72
107
|
},
|
|
73
108
|
hr: {
|
|
74
109
|
title: "Promijeni lozinku",
|
|
@@ -82,7 +117,14 @@ const w = "en", h = {
|
|
|
82
117
|
successMsg: "Lozinka je uspješno promijenjena",
|
|
83
118
|
errorMsgGeneric: "Došlo je do pogreške prilikom pokušaja promjene lozinke",
|
|
84
119
|
"gm.pms.password_not_verified_unauthorized": "Unesena trenutna lozinka nije ispravna",
|
|
85
|
-
"gm.pms.password_policy_failed": "Lozinka ne može biti ista kao bilo koja od posljednjih {forbiddenLastPasswordsCount} lozinki. Lozinka se ne može promijeniti prije nego što prođe {minimumPasswordAgeLimitHours} {hours} od posljednje promjene."
|
|
120
|
+
"gm.pms.password_policy_failed": "Lozinka ne može biti ista kao bilo koja od posljednjih {forbiddenLastPasswordsCount} lozinki. Lozinka se ne može promijeniti prije nego što prođe {minimumPasswordAgeLimitHours} {hours} od posljednje promjene.",
|
|
121
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
122
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
123
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
124
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
125
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
126
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
127
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
86
128
|
},
|
|
87
129
|
tr: {
|
|
88
130
|
title: "Şifreyi Değiştir",
|
|
@@ -96,7 +138,14 @@ const w = "en", h = {
|
|
|
96
138
|
successMsg: "Şifre başarıyla değiştirildi",
|
|
97
139
|
errorMsgGeneric: "Şifrenizi değiştirirken bir hata oluştu",
|
|
98
140
|
"gm.pms.password_not_verified_unauthorized": "Girdiğiniz mevcut şifre yanlış",
|
|
99
|
-
"gm.pms.password_policy_failed": "Şifre, son {forbiddenLastPasswordsCount} şifreden herhangi biriyle aynı olamaz. Şifre, son değişiklikten sonra {minimumPasswordAgeLimitHours} {hours} içinde değiştirilemez."
|
|
141
|
+
"gm.pms.password_policy_failed": "Şifre, son {forbiddenLastPasswordsCount} şifreden herhangi biriyle aynı olamaz. Şifre, son değişiklikten sonra {minimumPasswordAgeLimitHours} {hours} içinde değiştirilemez.",
|
|
142
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
143
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
144
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
145
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
146
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
147
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
148
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
100
149
|
},
|
|
101
150
|
hu: {
|
|
102
151
|
title: "Jelszó megváltoztatása",
|
|
@@ -110,61 +159,68 @@ const w = "en", h = {
|
|
|
110
159
|
successMsg: "A jelszó sikeresen megváltozott",
|
|
111
160
|
errorMsgGeneric: "Hiba történt a jelszó megváltoztatásakor",
|
|
112
161
|
"gm.pms.password_not_verified_unauthorized": "A megadott jelenlegi jelszó helytelen",
|
|
113
|
-
"gm.pms.password_policy_failed": "A jelszó nem egyezhet meg az utolsó {forbiddenLastPasswordsCount} jelszóval. A jelszó nem változtatható meg {minimumPasswordAgeLimitHours} {hours}-on belül az utolsó módosítás óta."
|
|
162
|
+
"gm.pms.password_policy_failed": "A jelszó nem egyezhet meg az utolsó {forbiddenLastPasswordsCount} jelszóval. A jelszó nem változtatható meg {minimumPasswordAgeLimitHours} {hours}-on belül az utolsó módosítás óta.",
|
|
163
|
+
passwordContainsFirstName: "Password should not contain your first name.",
|
|
164
|
+
passwordContainsLastName: "Password should not contain your last name.",
|
|
165
|
+
passwordContainsUsername: "Password should not contain your username.",
|
|
166
|
+
passwordContainsEmail: "Password should not contain your email.",
|
|
167
|
+
passwordContainsFirstNamePlusLastName: "Password should not contain first name + last name.",
|
|
168
|
+
passwordContainsFirstNameAndLastName: "Password should not contain first name and last name.",
|
|
169
|
+
passwordContainsDateOfBirth: "Password should not contain date of birth."
|
|
114
170
|
}
|
|
115
|
-
},
|
|
116
|
-
fetch(
|
|
117
|
-
Object.keys(
|
|
118
|
-
for (let
|
|
119
|
-
|
|
120
|
-
}),
|
|
171
|
+
}, P = (a) => new Promise((n) => {
|
|
172
|
+
fetch(a).then((e) => e.json()).then((e) => {
|
|
173
|
+
Object.keys(e).forEach((t) => {
|
|
174
|
+
for (let o in e[t])
|
|
175
|
+
w[t][o] = e[t][o];
|
|
176
|
+
}), n(!0);
|
|
121
177
|
});
|
|
122
|
-
}),
|
|
123
|
-
const
|
|
124
|
-
let
|
|
125
|
-
if (
|
|
126
|
-
for (const [l,
|
|
127
|
-
const
|
|
128
|
-
|
|
178
|
+
}), i = (a, n, e) => {
|
|
179
|
+
const t = n;
|
|
180
|
+
let o = w[t !== void 0 ? t : g][a];
|
|
181
|
+
if (e !== void 0)
|
|
182
|
+
for (const [l, r] of Object.entries(e.values)) {
|
|
183
|
+
const d = new RegExp(`{${l}}`, "g");
|
|
184
|
+
o = o.replace(d, r);
|
|
129
185
|
}
|
|
130
|
-
return
|
|
186
|
+
return o;
|
|
131
187
|
};
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
188
|
+
function c() {
|
|
189
|
+
const a = navigator.userAgent.toLowerCase(), n = screen.availWidth, e = screen.availHeight;
|
|
190
|
+
if (a.includes("iphone"))
|
|
135
191
|
return "mobile";
|
|
136
|
-
if (
|
|
137
|
-
if (
|
|
192
|
+
if (a.includes("android")) {
|
|
193
|
+
if (e > n && n < 800)
|
|
138
194
|
return "mobile";
|
|
139
|
-
if (
|
|
195
|
+
if (n > e && e < 800)
|
|
140
196
|
return "tablet";
|
|
141
197
|
}
|
|
142
198
|
return "desktop";
|
|
143
199
|
}
|
|
144
|
-
function
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
|
|
200
|
+
function m(a, n) {
|
|
201
|
+
if (a) {
|
|
202
|
+
const e = document.createElement("style");
|
|
203
|
+
e.innerHTML = n, a.appendChild(e);
|
|
148
204
|
}
|
|
149
205
|
}
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
fetch(
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
}).catch((
|
|
156
|
-
console.error("There was an error while trying to load client styling from URL",
|
|
206
|
+
function h(a, n) {
|
|
207
|
+
const e = new URL(n);
|
|
208
|
+
fetch(e.href).then((t) => t.text()).then((t) => {
|
|
209
|
+
const o = document.createElement("style");
|
|
210
|
+
o.innerHTML = t, a && a.appendChild(o);
|
|
211
|
+
}).catch((t) => {
|
|
212
|
+
console.error("There was an error while trying to load client styling from URL", t);
|
|
157
213
|
});
|
|
158
214
|
}
|
|
159
|
-
function
|
|
215
|
+
function f(a, n, e) {
|
|
160
216
|
if (window.emMessageBus) {
|
|
161
|
-
const
|
|
162
|
-
window.emMessageBus.subscribe(
|
|
163
|
-
|
|
217
|
+
const t = document.createElement("style");
|
|
218
|
+
window.emMessageBus.subscribe(n, (o) => {
|
|
219
|
+
t.innerHTML = o, a && a.appendChild(t);
|
|
164
220
|
});
|
|
165
221
|
}
|
|
166
222
|
}
|
|
167
|
-
const
|
|
223
|
+
const y = `:host {
|
|
168
224
|
display: block;
|
|
169
225
|
}
|
|
170
226
|
|
|
@@ -288,15 +344,15 @@ const f = `:host {
|
|
|
288
344
|
100% {
|
|
289
345
|
opacity: 1;
|
|
290
346
|
}
|
|
291
|
-
}`,
|
|
292
|
-
constructor(
|
|
293
|
-
p(this,
|
|
347
|
+
}`, C = y, b = class {
|
|
348
|
+
constructor(a) {
|
|
349
|
+
p(this, a), this.currentPasswordValue = "", this.newPasswordValue = "", this.confirmPasswordValue = "", this.isCurrentPasswordValid = !1, this.isNewPasswordValid = !1, this.isConfirmPasswordValid = !1, this.errorMsg = "", this.currentPasswordValidationSchema = { mandatory: !0, custom: [] }, this.newPasswordValidationSchema = { mandatory: !0, custom: [] }, this.confirmPasswordValidationSchema = { mandatory: !0, custom: [] }, this.initValidationSchemas = () => {
|
|
294
350
|
this.confirmPasswordValidationSchema = {
|
|
295
351
|
mandatory: !0,
|
|
296
352
|
maxLength: this.policy.maximumPasswordLength,
|
|
297
353
|
minLength: this.policy.minimumPasswordLength,
|
|
298
354
|
custom: [
|
|
299
|
-
this.policy.customValidationRules.find((
|
|
355
|
+
this.policy.customValidationRules.find((n) => n.rule === "duplicate-input")
|
|
300
356
|
]
|
|
301
357
|
}, this.newPasswordValidationSchema = {
|
|
302
358
|
mandatory: !0,
|
|
@@ -309,104 +365,121 @@ const f = `:host {
|
|
|
309
365
|
minLength: this.policy.minimumPasswordLength,
|
|
310
366
|
custom: this.policy.customValidationRules
|
|
311
367
|
};
|
|
312
|
-
}, this.setErrorMsg = (
|
|
313
|
-
|
|
368
|
+
}, this.setErrorMsg = (n, e) => {
|
|
369
|
+
var t, o, l;
|
|
370
|
+
switch (n) {
|
|
314
371
|
case "gm.pms.password_policy_failed":
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
372
|
+
if (((o = (t = e == null ? void 0 : e.errors) === null || t === void 0 ? void 0 : t.policy) === null || o === void 0 ? void 0 : o.length) > 0) {
|
|
373
|
+
const r = {
|
|
374
|
+
forbiddenLastPasswordsCount: this.policy.forbiddenLastPasswordsCount,
|
|
375
|
+
minimumPasswordAgeLimitHours: this.policy.minimumPasswordAgeLimitHours,
|
|
376
|
+
hours: this.policy.minimumPasswordAgeLimitHours > 1 ? "hours" : "hour"
|
|
377
|
+
};
|
|
378
|
+
this.errorMsg = i(n, this.language, { values: r });
|
|
379
|
+
} else if (!((l = e == null ? void 0 : e.errors) === null || l === void 0) && l.strength && Array.isArray(e.errors.strength)) {
|
|
380
|
+
const r = e.errors.strength.map((d) => {
|
|
381
|
+
const u = {
|
|
382
|
+
"Password should not contain first name.": "passwordContainsFirstName",
|
|
383
|
+
"Password should not contain last name.": "passwordContainsLastName",
|
|
384
|
+
"Password should not contain username.": "passwordContainsUsername",
|
|
385
|
+
"Password should not contain email.": "passwordContainsEmail",
|
|
386
|
+
"Password should not contain first name + last name.": "passwordContainsFirstNamePlusLastName",
|
|
387
|
+
"Password should not contain first name and last name.": "passwordContainsFirstNameAndLastName",
|
|
388
|
+
"Password should not contain date of birth.": "passwordContainsDateOfBirth"
|
|
389
|
+
}[d] || null;
|
|
390
|
+
return u ? i(u, this.language) : d;
|
|
391
|
+
});
|
|
392
|
+
this.errorMsg = r.join(" ");
|
|
393
|
+
}
|
|
321
394
|
break;
|
|
322
395
|
case "gm.pms.password_not_verified_unauthorized":
|
|
323
|
-
this.errorMsg =
|
|
396
|
+
this.errorMsg = i(n, this.language);
|
|
324
397
|
break;
|
|
325
398
|
default:
|
|
326
|
-
this.errorMsg =
|
|
399
|
+
this.errorMsg = i("errorMsgGeneric", this.language);
|
|
327
400
|
}
|
|
328
401
|
}, this.toggleScreen = () => {
|
|
329
402
|
window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.isMobile }, window.location.href);
|
|
330
403
|
}, this.getPolicy = () => {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
404
|
+
const n = new URL("/api/v1/players/password-management/password", this.endpoint), e = new Headers();
|
|
405
|
+
e.append("Accept", "text/plain"), e.append("Content-Type", "application/json-patch+json");
|
|
406
|
+
const t = {
|
|
334
407
|
method: "GET",
|
|
335
|
-
headers:
|
|
408
|
+
headers: e
|
|
336
409
|
};
|
|
337
|
-
fetch(
|
|
338
|
-
this.policy =
|
|
410
|
+
fetch(n.href, t).then((o) => o.status === 200 && o.json()).then((o) => {
|
|
411
|
+
this.policy = o, this.policy.customValidationRules.forEach((l) => {
|
|
339
412
|
l.rule = l.rule.toLowerCase(), l.rule === "duplicateinput" && (l.rule = "duplicate-input");
|
|
340
413
|
}), this.initValidationSchemas();
|
|
341
|
-
}).catch((
|
|
342
|
-
console.error(`${
|
|
414
|
+
}).catch((o) => {
|
|
415
|
+
console.error(`${i("errorMsgGeneric", this.language)}:`, o), window.postMessage({ type: "WidgetNotification", data: { type: "error", message: i("errorMsgGeneric", this.language) } }, window.location.href);
|
|
343
416
|
}).finally(() => {
|
|
344
417
|
this.isSkeletonLoading = !1;
|
|
345
418
|
});
|
|
346
|
-
}, this.submitNewPassword = (
|
|
347
|
-
if (
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
const
|
|
419
|
+
}, this.submitNewPassword = (n) => {
|
|
420
|
+
if (n.preventDefault(), this.isBtnSubmitEnabled) {
|
|
421
|
+
const e = new URL("/api/v1/players/password-management/password", this.endpoint), t = new Headers();
|
|
422
|
+
t.append("accept", "text/plain"), t.append("Content-Type", "application/json-patch+json");
|
|
423
|
+
const o = JSON.stringify({
|
|
351
424
|
token: this.forgotMode === "true" ? this.token : this.session,
|
|
352
425
|
oldPassword: this.currentPasswordValue,
|
|
353
426
|
newPassword: this.confirmPasswordValue
|
|
354
427
|
}), l = {
|
|
355
428
|
method: "PUT",
|
|
356
|
-
headers:
|
|
357
|
-
body:
|
|
429
|
+
headers: t,
|
|
430
|
+
body: o
|
|
358
431
|
};
|
|
359
|
-
fetch(
|
|
360
|
-
|
|
361
|
-
}).catch((
|
|
432
|
+
fetch(e.href, l).then((r) => r.json()).then((r) => {
|
|
433
|
+
r.errorCode === null && r.message === "pms.password.update.success" ? (window.postMessage({ type: "PasswordChangedSuccessfully" }), window.postMessage({ type: "WidgetNotification", data: { type: "success", message: i("successMsg", this.language) } }, window.location.href)) : (this.setErrorMsg(r.message, r), window.postMessage({ type: "WidgetNotification", data: { type: "error", message: this.errorMsg } }, window.location.href));
|
|
434
|
+
}).catch((r) => console.error(r));
|
|
362
435
|
}
|
|
363
|
-
}, this.language = "en", this.endpoint = "", this.session = "", this.token = "", this.forgotMode = "", this.clientStyling = "", this.clientStylingUrl = "", this.mbSource = void 0, this.translationUrl = "", this.isBtnSubmitEnabled = !1, this.isSkeletonLoading = !0, this.isMobile =
|
|
436
|
+
}, this.language = "en", this.endpoint = "", this.session = "", this.token = "", this.forgotMode = "", this.clientStyling = "", this.clientStylingUrl = "", this.mbSource = void 0, this.translationUrl = "", this.isBtnSubmitEnabled = !1, this.isSkeletonLoading = !0, this.isMobile = c() === "mobile" || c() === "tablet";
|
|
364
437
|
}
|
|
365
|
-
handleClientStylingChange(
|
|
366
|
-
|
|
438
|
+
handleClientStylingChange(a, n) {
|
|
439
|
+
a != n && m(this.stylingContainer, this.clientStyling);
|
|
367
440
|
}
|
|
368
|
-
handleClientStylingUrlChange(
|
|
369
|
-
|
|
441
|
+
handleClientStylingUrlChange(a, n) {
|
|
442
|
+
a != n && this.clientStylingUrl && h(this.stylingContainer, this.clientStylingUrl);
|
|
370
443
|
}
|
|
371
|
-
sendValidityStateHandler(
|
|
372
|
-
switch (this.isBtnSubmitEnabled = !1,
|
|
444
|
+
sendValidityStateHandler(a) {
|
|
445
|
+
switch (this.isBtnSubmitEnabled = !1, a.detail.name) {
|
|
373
446
|
case "password":
|
|
374
|
-
this.isCurrentPasswordValid =
|
|
447
|
+
this.isCurrentPasswordValid = a.detail.valid;
|
|
375
448
|
break;
|
|
376
449
|
case "newPassword":
|
|
377
|
-
this.isNewPasswordValid =
|
|
450
|
+
this.isNewPasswordValid = a.detail.valid;
|
|
378
451
|
break;
|
|
379
452
|
case "newPasswordDuplicate":
|
|
380
|
-
this.isConfirmPasswordValid =
|
|
453
|
+
this.isConfirmPasswordValid = a.detail.valid;
|
|
381
454
|
break;
|
|
382
455
|
}
|
|
383
456
|
(this.forgotMode === "true" || this.isCurrentPasswordValid) && this.isNewPasswordValid && this.isConfirmPasswordValid && (this.isBtnSubmitEnabled = !0);
|
|
384
457
|
}
|
|
385
|
-
sendInputValueHandler(
|
|
386
|
-
switch (
|
|
458
|
+
sendInputValueHandler(a) {
|
|
459
|
+
switch (a.detail.name) {
|
|
387
460
|
case "password":
|
|
388
|
-
this.currentPasswordValue =
|
|
461
|
+
this.currentPasswordValue = a.detail.value;
|
|
389
462
|
break;
|
|
390
463
|
case "newPassword":
|
|
391
|
-
this.newPasswordValue =
|
|
464
|
+
this.newPasswordValue = a.detail.value;
|
|
392
465
|
break;
|
|
393
466
|
case "newPasswordDuplicate":
|
|
394
|
-
this.confirmPasswordValue =
|
|
467
|
+
this.confirmPasswordValue = a.detail.value;
|
|
395
468
|
break;
|
|
396
469
|
}
|
|
397
470
|
}
|
|
398
471
|
componentWillLoad() {
|
|
399
472
|
if (this.getPolicy(), this.translationUrl)
|
|
400
|
-
return
|
|
473
|
+
return P(this.translationUrl);
|
|
401
474
|
}
|
|
402
475
|
componentDidLoad() {
|
|
403
|
-
this.stylingContainer && (window.emMessageBus != null ?
|
|
476
|
+
this.stylingContainer && (window.emMessageBus != null ? f(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && m(this.stylingContainer, this.clientStyling), this.clientStylingUrl && h(this.stylingContainer, this.clientStylingUrl)));
|
|
404
477
|
}
|
|
405
478
|
disconnectedCallback() {
|
|
406
479
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
407
480
|
}
|
|
408
481
|
render() {
|
|
409
|
-
return this.isSkeletonLoading ?
|
|
482
|
+
return this.isSkeletonLoading ? s("div", { class: "PlayerChangePassword skeleton" }, s("form", { class: "Form" }, s("div", { class: "ButtonReturn" }, s("ui-skeleton", { structure: "text", width: "auto", height: "30px" })), s("section", { class: "FieldsSection" }, s("div", { class: "FieldContainer" }, s("div", { class: "FieldTitle" }, s("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), s("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" })), s("div", { class: "FieldContainer" }, s("div", { class: "FieldTitle" }, s("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), s("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" })), s("div", { class: "FieldContainer" }, s("div", { class: "FieldTitle" }, s("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), s("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" }))), s("section", { class: "ButtonsSection" }, s("div", { class: "Button" }, s("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" }))))) : s("div", { class: "PlayerChangePassword", ref: (a) => this.stylingContainer = a }, s("form", { class: "Form" }, s("div", { class: "ButtonReturn", onClick: this.toggleScreen }, s("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, s("g", { transform: "translate(-20 -158)" }, s("g", { transform: "translate(20 158)" }, s("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), s("h2", { class: "TitleMobile" }, i("title", this.language))), s("h2", { class: "Title" }, i("title", this.language)), s("section", { class: "FieldsSection" }, this.forgotMode === "false" && s("general-input", { type: "password", action: "input", name: "password", language: this.language, "display-name": i("passwordDisplayText", this.language), placeholder: i("passwordPlaceholderText", this.language), validation: this.currentPasswordValidationSchema, clientStyling: this.clientStyling, "mb-source": this.mbSource, "hide-password-complexity": "true" }), s("general-input", { type: "password", action: "input", name: "newPassword", language: this.language, "display-name": i("newPasswordDisplayText", this.language), placeholder: i("newPasswordPlaceholderText", this.language), validation: this.newPasswordValidationSchema, clientStyling: this.clientStyling, "mb-source": this.mbSource }), s("general-input", { type: "password", action: "input", name: "newPasswordDuplicate", language: this.language, "display-name": i("confirmPasswordDisplayText", this.language), placeholder: i("confirmPasswordPlaceholderText", this.language), validation: this.confirmPasswordValidationSchema, "is-duplicate-input": !0, clientStyling: this.clientStyling, "mb-source": this.mbSource })), s("section", { class: "ButtonsSection" }, s("button", { class: "Button", disabled: !this.isBtnSubmitEnabled, onClick: this.submitNewPassword }, i("btnSubmit", this.language)))));
|
|
410
483
|
}
|
|
411
484
|
static get watchers() {
|
|
412
485
|
return {
|
|
@@ -415,7 +488,7 @@ const f = `:host {
|
|
|
415
488
|
};
|
|
416
489
|
}
|
|
417
490
|
};
|
|
418
|
-
b.style =
|
|
491
|
+
b.style = C;
|
|
419
492
|
export {
|
|
420
493
|
b as P
|
|
421
494
|
};
|
|
@@ -14,7 +14,7 @@ var s = (l, i, a) => new Promise((o, d) => {
|
|
|
14
14
|
}, t = (e) => e.done ? o(e.value) : Promise.resolve(e.value).then(u, g);
|
|
15
15
|
t((a = a.apply(l, i)).next());
|
|
16
16
|
});
|
|
17
|
-
import { b as p, p as r } from "./index-13661b98-
|
|
17
|
+
import { b as p, p as r } from "./index-13661b98-D93Apl47.js";
|
|
18
18
|
import { g as c } from "./app-globals-0f993ce5-DzSE6TtH.js";
|
|
19
19
|
var m = () => {
|
|
20
20
|
const l = import.meta.url, i = {};
|