@everymatrix/pam-player-profile-controller 1.87.26 → 1.87.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{r as e,h as r,H as t}from"./index-bb55519d.js";import{s as n,a as i,b as o}from"./pam-player-profile-controller-0d279063.js";export{P as pam_player_profile_controller}from"./pam-player-profile-controller-0d279063.js";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;const a={en:{title:"Addresses",titlePermanentAddress:"Permanent Address",titleTemporaryAddress:"Temporary Address",line1:"Address Line 1",line2:"Address Line 2",line3:"Address Line 3",country:"Country",city:"City",stateProvince:"State Province",postalCode:"Postal Code",floor:"Floor",doorCode:"Door Code",buildingName:"Building Name",additionalInstructions:"Additional Instructions",line1Error:"This field must be at least 1 character long and at most 100 characters.",line2Error:"This field must be at least 1 character long and at most 100 characters.",line3Error:"This field must be at least 1 character long and at most 100 characters.",cityError:"City must be at least 1 character long and at most 100 characters.",stateProvinceError:"State Province must be at most 100 characters",postalCodeError:"Postal Code length must be at least 1 character long and at most 20 characters.",floorError:"Floor must be less than 10 characters",doorCodeError:"Door Code must be less than 10 characters",buildingNameError:"Building Name must be less than 50 characters",additionalInstructionsError:"Additional Instructions must be less than 120 characters",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the address information",errorMessageFetch:"An error has occured when attempting to fetch the address information"},"zh-hk":{title:"地址",titlePermanentAddress:"永久地址",titleTemporaryAddress:"臨時地址",line1:"地址行1",line2:"地址行2",line3:"地址行3",country:"國家",city:"城市",stateProvince:"省/州",postalCode:"郵政編碼",floor:"樓層",doorCode:"門碼",buildingName:"建築名稱",additionalInstructions:"附加說明",line1Error:"此字段必須至少1個字符,最多100個字符。",line2Error:"此字段必須至少1個字符,最多100個字符。",line3Error:"此字段必須至少1個字符,最多100個字符。",cityError:"城市必須至少1個字符,最多100個字符。",stateProvinceError:"省/州必須最多100個字符",postalCodeError:"郵政編碼長度必須至少1個字符,最多20個字符。",floorError:"樓層必須少於10個字符",doorCodeError:"門碼必須少於10個字符",buildingNameError:"建築名稱必須少於50個字符",additionalInstructionsError:"附加說明必須少於120個字符",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新地址信息時發生錯誤",errorMessageFetch:"在嘗試獲取地址信息時發生錯誤"},fr:{title:"Adresses",titlePermanentAddress:"Adresse permanente",titleTemporaryAddress:"Adresse temporaire",line1:"Adresse ligne 1",line2:"Adresse ligne 2",line3:"Adresse ligne 3",country:"Pays",city:"Ville",stateProvince:"État/Province",postalCode:"Code postal",floor:"Étage",doorCode:"Code de porte",buildingName:"Nom du bâtiment",additionalInstructions:"Instructions supplémentaires",line1Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",line2Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",line3Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",cityError:"La ville doit comporter au moins 1 caractère et au maximum 100 caractères.",stateProvinceError:"L'État/Province doit comporter au maximum 100 caractères",postalCodeError:"La longueur du code postal doit être d'au moins 1 caractère et au maximum 20 caractères.",floorError:"L'étage doit comporter moins de 10 caractères",doorCodeError:"Le code de porte doit comporter moins de 10 caractères",buildingNameError:"Le nom du bâtiment doit comporter moins de 50 caractères",additionalInstructionsError:"Les instructions supplémentaires doivent comporter moins de 120 caractères",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations d'adresse",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations d'adresse"},ro:{title:"Adrese",titlePermanentAddress:"Adresă permanentă",titleTemporaryAddress:"Adresă temporară",line1:"Linia adresei 1",line2:"Linia adresei 2",line3:"Linia adresei 3",country:"Țară",city:"Oraș",stateProvince:"Stat/Provincie",postalCode:"Cod poștal",floor:"Etaj",doorCode:"Cod ușă",buildingName:"Numele clădirii",additionalInstructions:"Instrucțiuni suplimentare",line1Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",line2Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",line3Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",cityError:"Orașul trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",stateProvinceError:"Statul/Provincia trebuie să aibă maximum 100 de caractere",postalCodeError:"Lungimea codului poștal trebuie să fie de cel puțin 1 caracter și maximum 20 de caractere.",floorError:"Etajul trebuie să aibă mai puțin de 10 caractere",doorCodeError:"Codul ușii trebuie să aibă mai puțin de 10 caractere",buildingNameError:"Numele clădirii trebuie să aibă mai puțin de 50 de caractere",additionalInstructionsError:"Instrucțiunile suplimentare trebuie să aibă mai puțin de 120 de caractere",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile adresei",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile adresei"},tr:{title:"Adresler",titlePermanentAddress:"Kalıcı Adres",titleTemporaryAddress:"Geçici Adres",line1:"Adres Satırı 1",line2:"Adres Satırı 2",line3:"Adres Satırı 3",country:"Ülke",city:"Şehir",stateProvince:"Eyalet/İl",postalCode:"Posta Kodu",floor:"Kat",doorCode:"Kapı Kodu",buildingName:"Bina Adı",additionalInstructions:"Ek Talimatlar",line1Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",line2Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",line3Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",cityError:"Şehir en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",stateProvinceError:"Eyalet/İl en fazla 100 karakter uzunluğunda olmalıdır",postalCodeError:"Posta Kodu uzunluğu en az 1 karakter ve en fazla 20 karakter olmalıdır.",floorError:"Kat en fazla 10 karakter uzunluğunda olmalıdır",doorCodeError:"Kapı Kodu en fazla 10 karakter uzunluğunda olmalıdır",buildingNameError:"Bina Adı en fazla 50 karakter uzunluğunda olmalıdır",additionalInstructionsError:"Ek Talimatlar en fazla 120 karakter uzunluğunda olmalıdır",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Adres bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Adres bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Direcciones",titlePermanentAddress:"Dirección Permanente",titleTemporaryAddress:"Dirección Temporal",line1:"Línea de Dirección 1",line2:"Línea de Dirección 2",line3:"Línea de Dirección 3",country:"País",city:"Ciudad",stateProvince:"Estado/Provincia",postalCode:"Código Postal",floor:"Piso",doorCode:"Código de Puerta",buildingName:"Nombre del Edificio",additionalInstructions:"Instrucciones Adicionales",line1Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line2Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line3Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",cityError:"La ciudad debe tener al menos 1 carácter y un máximo de 100 caracteres.",stateProvinceError:"El Estado/Provincia debe tener un máximo de 100 caracteres",postalCodeError:"La longitud del código postal debe ser de al menos 1 carácter y un máximo de 20 caracteres.",floorError:"El piso debe tener menos de 10 caracteres",doorCodeError:"El código de puerta debe tener menos de 10 caracteres",buildingNameError:"El nombre del edificio debe tener menos de 50 caracteres",additionalInstructionsError:"Las instrucciones adicionales deben tener menos de 120 caracteres",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de la dirección",errorMessageFetch:"Se ha producido un error al intentar obtener la información de la dirección"},pt:{title:"Endereços",titlePermanentAddress:"Endereço Permanente",titleTemporaryAddress:"Endereço Temporário",line1:"Linha de Endereço 1",line2:"Linha de Endereço 2",line3:"Linha de Endereço 3",country:"País",city:"Cidade",stateProvince:"Estado/Província",postalCode:"Código Postal",floor:"Andar",doorCode:"Código da Porta",buildingName:"Nome do Edifício",additionalInstructions:"Instruções Adicionais",line1Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line2Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line3Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",cityError:"A cidade deve ter pelo menos 1 caractere e no máximo 100 caracteres.",stateProvinceError:"O Estado/Província deve ter no máximo 100 caracteres",postalCodeError:"O comprimento do código postal deve ser de pelo menos 1 caractere e no máximo 20 caracteres.",floorError:"O andar deve ter menos de 10 caracteres",doorCodeError:"O código da porta deve ter menos de 10 caracteres",buildingNameError:"O nome do edifício deve ter menos de 50 caracteres",additionalInstructionsError:"As instruções adicionais devem ter menos de 120 caracteres",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do endereço",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do endereço"},hr:{title:"Adrese",titlePermanentAddress:"Stalna Adresa",titleTemporaryAddress:"Privremena Adresa",line1:"Adresa Linija 1",line2:"Adresa Linija 2",line3:"Adresa Linija 3",country:"Država",city:"Grad",stateProvince:"Država/Provincija",postalCode:"Poštanski Broj",floor:"Kat",doorCode:"Šifra Vrata",buildingName:"Ime Zgrade",additionalInstructions:"Dodatne Upute",line1Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",line2Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",line3Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",cityError:"Grad mora imati najmanje 1 znak i najviše 100 znakova.",stateProvinceError:"Država/Provincija mora imati najviše 100 znakova",postalCodeError:"Duljina poštanskog broja mora biti najmanje 1 znak i najviše 20 znakova.",floorError:"Kat mora imati manje od 10 znakova",doorCodeError:"Šifra vrata mora imati manje od 10 znakova",buildingNameError:"Ime zgrade mora imati manje od 50 znakova",additionalInstructionsError:"Dodatne upute moraju imati manje od 120 znakova",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o adresi",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o adresi"},"pt-br":{title:"Endereços",titlePermanentAddress:"Endereço Permanente",titleTemporaryAddress:"Endereço Temporário",line1:"Linha de Endereço 1",line2:"Linha de Endereço 2",line3:"Linha de Endereço 3",country:"País",city:"Cidade",stateProvince:"Estado/Província",postalCode:"Código Postal",floor:"Andar",doorCode:"Código da Porta",buildingName:"Nome do Edifício",additionalInstructions:"Instruções Adicionais",line1Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line2Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line3Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",cityError:"A cidade deve ter pelo menos 1 caractere e no máximo 100 caracteres.",stateProvinceError:"O Estado/Província deve ter no máximo 100 caracteres",postalCodeError:"O comprimento do código postal deve ser de pelo menos 1 caractere e no máximo 20 caracteres.",floorError:"O andar deve ter menos de 10 caracteres",doorCodeError:"O código da porta deve ter menos de 10 caracteres",buildingNameError:"O nome do edifício deve ter menos de 50 caracteres",additionalInstructionsError:"As instruções adicionais devem ter menos de 120 caracteres",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do endereço",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do endereço"},"es-mx":{title:"Direcciones",titlePermanentAddress:"Dirección Permanente",titleTemporaryAddress:"Dirección Temporal",line1:"Línea de Dirección 1",line2:"Línea de Dirección 2",line3:"Línea de Dirección 3",country:"País",city:"Ciudad",stateProvince:"Estado/Provincia",postalCode:"Código Postal",floor:"Piso",doorCode:"Código de Puerta",buildingName:"Nombre del Edificio",additionalInstructions:"Instrucciones Adicionales",line1Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line2Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line3Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",cityError:"La ciudad debe tener al menos 1 carácter y un máximo de 100 caracteres.",stateProvinceError:"El Estado/Provincia debe tener un máximo de 100 caracteres",postalCodeError:"La longitud del código postal debe ser de al menos 1 carácter y un máximo de 20 caracteres.",floorError:"El piso debe tener menos de 10 caracteres",doorCodeError:"El código de puerta debe tener menos de 10 caracteres",buildingNameError:"El nombre del edificio debe tener menos de 50 caracteres",additionalInstructionsError:"Las instrucciones adicionales deben tener menos de 120 caracteres",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de la dirección",errorMessageFetch:"Se ha producido un error al intentar obtener la información de la dirección"}},s=(e,r,t)=>{let n=a[a[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},l=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"ADDRESSES_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"ADDRESSES_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:s("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:s(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"ADDRESSES_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"ADDRESSES_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"ADDRESSES_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=s(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/addresses/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=(e,r,t)=>n=>{r?this.dataRef[e][r][t]=n.target.value:this.dataRef[e][t]=n.target.value;const i=this.fieldsState[e].data[t],o=n.target.value,a=i.rule(o);a&&!i.isValid?(i.isValid=!0,this.invalidFields-=1):!a&&i.isValid&&(i.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=o!==i.initialValue;const s=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==s&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/addresses/${t.addressId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t=null,n,i,o)=>{const a=this.fieldsState[e].data[n];let l;return l=t?this.dataRef[e][t][n]:this.dataRef[e][n],a?r("div",{class:"Field "+(a.isValid?"":"Invalid")},r("label",null,s(i,this.lang)),r("input",{type:"text",value:l,onKeyUp:this.updateState(e,t,n)}),!a.isValid&&r("p",{class:"Error"},s(o,this.lang))):null},this.staticField=(e,t)=>e?r("div",{class:"Field Disabled"},r("label",null,s(t,this.lang)),r("input",{type:"text",value:e,readonly:!0})):null,this.section=(e,t)=>{let n="Permanent"===e?this.isPermanentAddressSectionActive:this.isTemporaryAddressSectionActive;return t?r("div",{class:"Section"},r("button",{class:"SectionTitle",onClick:this.toggleSection(e)},s(`title${e}Address`)),r("section",{class:n?"SectionContent Active":"SectionContent"},this.editableField(e,null,"line1","line1","line1Error"),this.staticField(this.dataRef[e].country,"country"),this.editableField(e,null,"line2","line2","line2Error"),this.editableField(e,null,"stateProvince","stateProvince","stateProvinceError"),this.editableField(e,null,"line3","line3","line3Error"),this.editableField(e,null,"city","city","cityError"),this.editableField(e,null,"postalCode","postalCode","postalCodeError"),"true"==this.isFullAddressDisplayed&&r("div",{class:"CompoundField"},this.editableField(e,"addressInfo","floor","floor","floorError"),this.editableField(e,"addressInfo","doorCode","doorCode","doorCodeError")),"true"==this.isFullAddressDisplayed&&this.editableField(e,"addressInfo","buildingName","buildingName","buildingNameError"),"true"==this.isFullAddressDisplayed&&this.editableField(e,"addressInfo","additionalInstructions","additionalInstructions","additionalInstructionsError"))):r("div",{class:"Section"},r("button",{class:"SectionTitle",onClick:this.toggleSection(e)},s(`title${e}Address`,this.lang)),r("section",{class:n?"SectionContent Active":"SectionContent"},this.staticField(this.dataRef[e].line1,"line1"),this.staticField(this.dataRef[e].country,"country"),this.staticField(this.dataRef[e].line2,"line2"),this.staticField(this.dataRef[e].stateProvince,"stateProvince"),this.staticField(this.dataRef[e].line3,"line3"),this.staticField(this.dataRef[e].city,"city"),this.staticField(this.dataRef[e].postalCode,"postalCode"),"true"==this.isFullAddressDisplayed&&r("div",{class:"CompoundField"},this.staticField(this.dataRef[e].addressInfo.floor,"floor"),this.staticField(this.dataRef[e].addressInfo.doorCode,"doorCode")),"true"==this.isFullAddressDisplayed&&this.staticField(this.dataRef[e].addressInfo.buildingName,"buildingName"),"true"==this.isFullAddressDisplayed&&this.staticField(this.dataRef[e].addressInfo.additionalInstructions,"additionalInstructions")))},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.toggleSection=e=>r=>{switch(r.preventDefault(),e){case"Permanent":this.isPermanentAddressSectionActive=!this.isPermanentAddressSectionActive;break;case"Temporary":this.isTemporaryAddressSectionActive=!this.isTemporaryAddressSectionActive}},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isFullAddressDisplayed="false",this.isPermanentAdressEditable="false",this.isTemporaryAdressEditable="true",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isPermanentAddressSectionActive=!0,this.isTemporaryAddressSectionActive=!1,this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.addresses)this.dataRef[e.type]=e;this.dataRef.Temporary&&this.isSkeletonLoading&&(this.isPermanentAddressSectionActive=!1,this.isTemporaryAddressSectionActive=!0)}initEditableFieldsState(){for(const[e,r]of Object.entries(this.dataRef)){if("Permanent"===e&&"true"!==this.isPermanentAdressEditable||"Temporary"===e&&"true"!==this.isTemporaryAdressEditable)continue;const t={};["line1","line2","line3"].forEach((e=>{r[e]&&(t[e]=this.buildFieldState(!0,r[e],(e=>e&&e.length<=100)))})),r.city&&(t.city=this.buildFieldState(!0,r.city,(e=>e&&e.length<=50))),r.postalCode&&(t.postalCode=this.buildFieldState(!0,r.postalCode,(e=>e&&e.length<=20))),r.stateProvince&&(t.stateProvince=this.buildFieldState(!0,r.stateProvince,(e=>e&&e.length<=50))),Object.keys(r.addressInfo).length>0&&(r.addressInfo.floor&&(t.floor=this.buildFieldState(!0,r.addressInfo.floor,(e=>e&&e.length<=10))),r.addressInfo.doorCode&&(t.doorCode=this.buildFieldState(!0,r.addressInfo.doorCode,(e=>e&&e.length<=10))),r.addressInfo.buildingName&&(t.buildingName=this.buildFieldState(!0,r.addressInfo.buildingName,(e=>e&&e.length<=50))),r.addressInfo.additionalInstructions&&(t.additionalInstructions=this.buildFieldState(!0,r.addressInfo.additionalInstructions,(e=>e&&e.length<=120)))),this.fieldsState[e]={},this.fieldsState[e].data=t,this.fieldsState[e].hasChanged=!1}}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PamPlayerAddressesWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},[...Array(6).keys()].map((()=>r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})))),r("div",{class:"CompoundField"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"}))),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"auto",height:"20px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("form",{class:"PamPlayerAddressesWrapper"},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,s("title",this.lang))),r("h2",{class:"HeaderText"},s("title",this.lang)),this.dataRef.Temporary&&this.section("Temporary","true"===this.isTemporaryAdressEditable),this.dataRef.Permanent&&this.section("Permanent","true"===this.isPermanentAdressEditable),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},s("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};l.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerAddressesWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerAddressesWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerAddressesWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerAddressesWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerAddressesWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent {\n display: grid;\n max-height: 0;\n padding-bottom: 0;\n margin-top: 0;\n overflow: hidden;\n transition: ease-in-out var(--emw--transition-medium, 250ms);\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input:focus, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent.Active {\n max-height: 800px;\n padding-bottom: 30px;\n margin-top: 20px;\n}\n.PamPlayerAddressesWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerAddressesWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionTitle {\n width: 200px;\n margin-bottom: 30px;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionContent {\n max-height: 100%;\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PamPlayerAddressesWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerAddressesWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerAddressesWrapper .HeaderText {\n display: none;\n }\n .PamPlayerAddressesWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerAddressesWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerAddressesWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerAddressesWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerAddressesWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerAddressesWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerAddressesWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerAddressesWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerAddressesWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerAddressesWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerAddressesWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerAddressesWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerAddressesWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerAddressesWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const c={en:{title:"Contacts",email:"Email",phoneNumber:"Phone Number",phoneNumberError:"The phone number must be at least 5 digits and at most 15 digits",verifyContactButton:"Verify",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the contacts information",errorMessageFetch:"An error has occured when attempting to fetch the contacts information"},"zh-hk":{title:"聯絡人",email:"電子郵件",phoneNumber:"電話號碼",phoneNumberError:"電話號碼必須至少5位數字,最多15位數字",verifyContactButton:"驗證",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新聯絡人信息時發生錯誤",errorMessageFetch:"在嘗試獲取聯絡人信息時發生錯誤"},fr:{title:"Contacts",email:"Email",phoneNumber:"Numéro de téléphone",phoneNumberError:"Le numéro de téléphone doit comporter au moins 5 chiffres et au maximum 15 chiffres",verifyContactButton:"Vérifier",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations de contact",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations de contact"},ro:{title:"Contacte",email:"Email",phoneNumber:"Număr de telefon",phoneNumberError:"Numărul de telefon trebuie să aibă cel puțin 5 cifre și maximum 15 cifre",verifyContactButton:"Verifică",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile de contact",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile de contact"},tr:{title:"Kişiler",email:"E-posta",phoneNumber:"Telefon Numarası",phoneNumberError:"Telefon numarası en az 5 haneli ve en fazla 15 haneli olmalıdır",verifyContactButton:"Doğrula",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Kişi bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"İletişim bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Contactos",email:"Correo electrónico",phoneNumber:"Número de teléfono",phoneNumberError:"El número de teléfono debe tener al menos 5 dígitos y un máximo de 15 dígitos",verifyContactButton:"Verificar",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de contactos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los contactos"},pt:{title:"Contatos",email:"Email",phoneNumber:"Número de telefone",phoneNumberError:"O número de telefone deve ter pelo menos 5 dígitos e no máximo 15 dígitos",verifyContactButton:"Verificar",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações de contato",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações de contato"},hr:{title:"Kontakti",email:"Email",phoneNumber:"Broj telefona",phoneNumberError:"Broj telefona mora imati najmanje 5 znamenki i najviše 15 znamenki",verifyContactButton:"Provjeri",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o kontaktima",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o kontaktima"},"pt-br":{title:"Contatos",email:"Email",phoneNumber:"Número de telefone",phoneNumberError:"O número de telefone deve ter pelo menos 5 dígitos e no máximo 15 dígitos",verifyContactButton:"Verificar",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações de contato",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações de contato"},"es-mx":{title:"Contactos",email:"Correo electrónico",phoneNumber:"Número de teléfono",phoneNumberError:"El número de teléfono debe tener al menos 5 dígitos y un máximo de 15 dígitos",verifyContactButton:"Verificar",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de contactos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los contactos"}},d=(e,r,t)=>{let n=c[c[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},m=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"CONTACTS_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"CONTACTS_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendContactVerificationRequest=e=>r=>{r.preventDefault(),window.postMessage({type:"ContactVerification",contactType:e})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:d("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:d(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"CONTACTS_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"CONTACTS_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"CONTACTS_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=d(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/contacts/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.log(e),n()}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=e=>r=>{this.dataRef[e].contactValue=r.target.value;const t=this.fieldsState[e].data.contactValue,n=r.target.value,i=t.rule(n);i&&!t.isValid?(t.isValid=!0,this.invalidFields-=1):!i&&t.isValid&&(t.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=n!==t.initialValue;const o=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==o&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/contacts/${t.contactId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t,n)=>{const i=this.fieldsState[e].data.contactValue,o=this.dataRef[e];return i?r("div",{class:"Field "+(i.isValid?"":"Invalid")},r("label",null,d(t,this.lang)),"true"===this.isVerificationStatusDisplayed?r("div",null,r("input",{type:"text",value:o.contactValue,onKeyUp:this.updateState(e)}),o.isVerified?r("svg",{class:"VerifiedCheckmark",xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Capa_1",width:"40px",height:"40px",viewBox:"-53.65 -53.65 643.84 643.84",transform:"matrix(1, 0, 0, 1, 0, 0)rotate(0)"},r("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"}),r("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round",stroke:"#CCCCCC","stroke-width":"1.073082"}),r("g",{id:"SVGRepo_iconCarrier"}," ",r("g",null," ",r("g",null," ",r("path",{d:"M496.785,152.779c-3.305-25.085-16.549-51.934-38.826-74.205c-22.264-22.265-49.107-35.508-74.186-38.813 c-11.348-1.499-26.5-7.766-35.582-14.737C328.111,9.626,299.764,0,268.27,0s-59.841,9.626-79.921,25.024 c-9.082,6.965-24.235,13.238-35.582,14.737c-25.08,3.305-51.922,16.549-74.187,38.813c-22.277,22.271-35.521,49.119-38.825,74.205 c-1.493,11.347-7.766,26.494-14.731,35.57C9.621,208.422,0,236.776,0,268.27s9.621,59.847,25.024,79.921 c6.971,9.082,13.238,24.223,14.731,35.568c3.305,25.086,16.548,51.936,38.825,74.205c22.265,22.266,49.107,35.51,74.187,38.814 c11.347,1.498,26.5,7.771,35.582,14.736c20.073,15.398,48.421,25.025,79.921,25.025s59.841-9.627,79.921-25.025 c9.082-6.965,24.234-13.238,35.582-14.736c25.078-3.305,51.922-16.549,74.186-38.814c22.277-22.27,35.521-49.119,38.826-74.205 c1.492-11.346,7.766-26.492,14.73-35.568c15.404-20.074,25.025-48.422,25.025-79.921c0-31.494-9.621-59.848-25.025-79.921 C504.545,179.273,498.277,164.126,496.785,152.779z M439.256,180.43L246.477,373.209l-30.845,30.846 c-8.519,8.52-22.326,8.52-30.845,0l-30.845-30.846l-56.665-56.658c-8.519-8.52-8.519-22.326,0-30.846l30.845-30.844 c8.519-8.519,22.326-8.519,30.845,0l41.237,41.236L377.561,118.74c8.52-8.519,22.326-8.519,30.846,0l30.844,30.845 C447.775,158.104,447.775,171.917,439.256,180.43z"})," ")," ")," ")):r("button",{onClick:this.sendContactVerificationRequest(e)},d("verifyContactButton"))):r("input",{type:"text",value:o.contactValue,onKeyUp:this.updateState(e)}),!i.isValid&&r("p",{class:"Error"},d(n,this.lang))):null},this.staticField=(e,t)=>{const n=this.dataRef[e];return n&&n.contactValue?r("div",{class:"Field Disabled"},r("label",null,d(t,this.lang)),"true"===this.isVerificationStatusDisplayed?r("div",null,r("input",{type:"text",value:n.contactValue,readonly:!0}),n.isVerified?r("svg",{class:"VerifiedCheckmark",xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Capa_1",width:"40px",height:"40px",viewBox:"-53.65 -53.65 643.84 643.84",transform:"matrix(1, 0, 0, 1, 0, 0)rotate(0)"},r("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"}),r("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round",stroke:"#CCCCCC","stroke-width":"1.073082"}),r("g",{id:"SVGRepo_iconCarrier"}," ",r("g",null," ",r("g",null," ",r("path",{d:"M496.785,152.779c-3.305-25.085-16.549-51.934-38.826-74.205c-22.264-22.265-49.107-35.508-74.186-38.813 c-11.348-1.499-26.5-7.766-35.582-14.737C328.111,9.626,299.764,0,268.27,0s-59.841,9.626-79.921,25.024 c-9.082,6.965-24.235,13.238-35.582,14.737c-25.08,3.305-51.922,16.549-74.187,38.813c-22.277,22.271-35.521,49.119-38.825,74.205 c-1.493,11.347-7.766,26.494-14.731,35.57C9.621,208.422,0,236.776,0,268.27s9.621,59.847,25.024,79.921 c6.971,9.082,13.238,24.223,14.731,35.568c3.305,25.086,16.548,51.936,38.825,74.205c22.265,22.266,49.107,35.51,74.187,38.814 c11.347,1.498,26.5,7.771,35.582,14.736c20.073,15.398,48.421,25.025,79.921,25.025s59.841-9.627,79.921-25.025 c9.082-6.965,24.234-13.238,35.582-14.736c25.078-3.305,51.922-16.549,74.186-38.814c22.277-22.27,35.521-49.119,38.826-74.205 c1.492-11.346,7.766-26.492,14.73-35.568c15.404-20.074,25.025-48.422,25.025-79.921c0-31.494-9.621-59.848-25.025-79.921 C504.545,179.273,498.277,164.126,496.785,152.779z M439.256,180.43L246.477,373.209l-30.845,30.846 c-8.519,8.52-22.326,8.52-30.845,0l-30.845-30.846l-56.665-56.658c-8.519-8.52-8.519-22.326,0-30.846l30.845-30.844 c8.519-8.519,22.326-8.519,30.845,0l41.237,41.236L377.561,118.74c8.52-8.519,22.326-8.519,30.846,0l30.844,30.845 C447.775,158.104,447.775,171.917,439.256,180.43z"})," ")," ")," ")):r("button",{onClick:this.sendContactVerificationRequest(e)},d("verifyContactButton"))):r("input",{type:"text",value:n.contactValue,readonly:!0})):null},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isVerificationStatusDisplayed="false",this.isPhoneNumberEditable="true",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.contacts)this.dataRef[e.contactType]=e}initEditableFieldsState(){this.dataRef.PhoneNumber&&"true"===this.isPhoneNumberEditable&&(this.fieldsState.PhoneNumber={},this.fieldsState.PhoneNumber.hasChanged=!1,this.fieldsState.PhoneNumber.data={},this.fieldsState.PhoneNumber.data.contactValue=this.buildFieldState(!0,this.dataRef.PhoneNumber.contactValue,(e=>e&&e.length>=5&&e.length<=15&&!Number.isNaN(Number(e)))))}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PlayerContactsWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"40px"})))):r("form",{class:"PlayerContactsWrapper"},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,d("title",this.lang))),r("h2",{class:"HeaderText"},d("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},this.editableField("PhoneNumber","phoneNumber","phoneNumberError"),this.staticField("Email","email"))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},d("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};m.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PlayerContactsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PlayerContactsWrapper .ReturnButton {\n display: none;\n}\n.PlayerContactsWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerContactsWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PlayerContactsWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PlayerContactsWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PlayerContactsWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input:focus, .PlayerContactsWrapper .Section .SectionContent .Field input :focus-within, .PlayerContactsWrapper .Section .SectionContent .Field input :focus-visible, .PlayerContactsWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PlayerContactsWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div input {\n min-width: fit-content;\n width: 100%;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div button {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-semibold, 500);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 100px;\n min-width: 30px;\n width: 100%;\n height: 100%;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div button:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PlayerContactsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PlayerContactsWrapper .Section .VerifiedCheckmark {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n stroke: #27a305;\n stroke-width: 5;\n}\n.PlayerContactsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PlayerContactsWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PlayerContactsWrapper.skeleton .Section .SectionContent {\n max-height: 100%;\n overflow: hidden;\n}\n.PlayerContactsWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PlayerContactsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PlayerContactsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PlayerContactsWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PlayerContactsWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PlayerContactsWrapper .HeaderText {\n display: none;\n }\n .PlayerContactsWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PlayerContactsWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PlayerContactsWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PlayerContactsWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PlayerContactsWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PlayerContactsWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PlayerContactsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PlayerContactsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PlayerContactsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PlayerContactsWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PlayerContactsWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PlayerContactsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const u={en:{title:"Documents",documentType:"Document Type",documentNumber:"Document Number",documentNumberError:"Document number is invalid",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the documents information",errorMessageFetch:"An error has occured when attempting to fetch the documents information"},"zh-hk":{title:"文件",documentType:"文件類型",documentNumber:"文件號碼",documentNumberError:"文件號碼無效",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新文件信息時發生錯誤",errorMessageFetch:"在嘗試獲取文件信息時發生錯誤"},fr:{title:"Documents",documentType:"Type de document",documentNumber:"Numéro de document",documentNumberError:"Le numéro de document est invalide",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations des documents",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations sur les documents"},ro:{title:"Documente",documentType:"Tip document",documentNumber:"Număr document",documentNumberError:"Numărul documentului este invalid",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile documentelor",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile documentelor"},tr:{title:"Belgeler",documentType:"Belge Türü",documentNumber:"Belge Numarası",documentNumberError:"Belge numarası geçersiz",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Belgelerin bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Belgelerin bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"},pt:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},hr:{title:"Dokumenti",documentType:"Vrsta dokumenta",documentNumber:"Broj dokumenta",documentNumberError:"Broj dokumenta je nevažeći",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o dokumentima",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o dokumentima"},"pt-br":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},"es-mx":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"}},p=(e,r,t)=>{let n=u[u[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},h=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"DOCUMENTS_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"DOCUMENTS_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:p("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:p(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"DOCUMENTS_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"DOCUMENTS_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"DOCUMENTS_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=p(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=e=>r=>{this.dataRef[e].documentNumber=r.target.value;const t=this.fieldsState[e].data.documentNumber,n=r.target.value,i=t.rule(n);i&&!t.isValid?(t.isValid=!0,this.invalidFields-=1):!i&&t.isValid&&(t.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=n!==t.initialValue;const o=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==o&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/${t.documentId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t,n,i)=>{const o=this.fieldsState[e].data[t],a=this.dataRef[e];return o?r("div",{class:"Field "+(o.isValid?"":"Invalid")},r("label",null,p(n,this.lang)),r("input",{type:"text",value:a[t],onKeyUp:this.updateState(e)}),!o.isValid&&r("p",{class:"Error"},p(i,this.lang))):null},this.staticField=(e,t,n)=>{const i=this.dataRef[e];return i&&i[t]?r("div",{class:"Field Disabled"},r("label",null,p(n,this.lang)),r("input",{type:"text",value:i[t],readonly:!0})):null},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isEditable="false",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.documents)this.dataRef[e.documentType]=e}initEditableFieldsState(){for(const[e,r]of Object.entries(this.dataRef))this.fieldsState[e]={},this.fieldsState[e].data={},this.fieldsState[e].data.documentNumber=this.buildFieldState(!0,r.documentNumber,(e=>e&&/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9\s]+$/.test(e)&&e.length<=50)),this.fieldsState[e].hasChanged=!1}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PlayerDocumentsWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"40px"})))):r("form",{class:"PlayerDocumentsWrapper "+(this.isMobile?"Mobile":"")},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,p("title",this.lang))),r("h2",{class:"HeaderText"},p("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},Object.keys(this.dataRef).map((e=>r("div",{class:"CompoundField"},this.staticField(e,"documentType","documentType"),"true"===this.isEditable?this.editableField(e,"documentNumber","documentNumber","documentNumberError"):this.staticField(e,"documentNumber","documentNumber")))))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},p("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};h.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PlayerDocumentsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PlayerDocumentsWrapper .ReturnButton {\n display: none;\n}\n.PlayerDocumentsWrapper h2 {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerDocumentsWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PlayerDocumentsWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input:focus, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-within, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-visible, .PlayerDocumentsWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PlayerDocumentsWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 1fr 1fr;\n max-height: 100%;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PlayerDocumentsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PlayerDocumentsWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PlayerDocumentsWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PlayerDocumentsWrapper .HeaderText {\n display: none;\n }\n .PlayerDocumentsWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PlayerDocumentsWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: column;\n }\n .PlayerDocumentsWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PlayerDocumentsWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PlayerDocumentsWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}';const g={en:{title:"Profile Info",username:"Username",firstName:"First Name",lastName:"Last Name",securityQuestion:"Security Question",securityAnswer:"Security Answer",playerTitle:"Title",gender:"Gender",dateOfBirth:"Date Of Birth",currency:"Currency",securityQuestionError:"Security question must be at least 1 character long and maximum 120 characters.",securityAnswerError:"Security answer must be at least 1 character long and maximum 120 characters.",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the profile information",errorMessageFetch:"An error has occured when attempting to fetch the profile information"},"zh-hk":{title:"個人資料",username:"用戶名",firstName:"名字",lastName:"姓氏",securityQuestion:"安全問題",securityAnswer:"安全答案",playerTitle:"稱號",gender:"性別",dateOfBirth:"出生日期",currency:"貨幣",securityQuestionError:"安全問題必須至少1個字符,最多120個字符。",securityAnswerError:"安全答案必須至少1個字符,最多120個字符。",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新個人資料信息時發生錯誤",errorMessageFetch:"在嘗試獲取個人資料時發生錯誤"},fr:{title:"Informations de profil",username:"Nom d'utilisateur",firstName:"Prénom",lastName:"Nom de famille",securityQuestion:"Question de sécurité",securityAnswer:"Réponse de sécurité",playerTitle:"Titre",gender:"Genre",dateOfBirth:"Date de naissance",currency:"Devise",securityQuestionError:"La question de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",securityAnswerError:"La réponse de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations de profil",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations de profil"},ro:{title:"Informații profil",username:"Nume de utilizator",firstName:"Prenume",lastName:"Nume de familie",securityQuestion:"Întrebare de securitate",securityAnswer:"Răspuns de securitate",playerTitle:"Titlu",gender:"Gen",dateOfBirth:"Data nașterii",currency:"Monedă",securityQuestionError:"Întrebarea de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",securityAnswerError:"Răspunsul de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile profilului",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile profilului"},tr:{title:"Profil Bilgileri",username:"Kullanıcı Adı",firstName:"Ad",lastName:"Soyad",securityQuestion:"Güvenlik Sorusu",securityAnswer:"Güvenlik Cevabı",playerTitle:"Başlık",gender:"Cinsiyet",dateOfBirth:"Doğum Tarihi",currency:"Para Birimi",securityQuestionError:"Güvenlik sorusu en az 1 karakter ve en fazla 120 karakter olmalıdır.",securityAnswerError:"Güvenlik cevabı en az 1 karakter ve en fazla 120 karakter olmalıdır.",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Profil bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Profil bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"},pt:{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},hr:{title:"Informacije o profilu",username:"Korisničko ime",firstName:"Ime",lastName:"Prezime",securityQuestion:"Sigurnosno pitanje",securityAnswer:"Sigurnosni odgovor",playerTitle:"Naslov",gender:"Spol",dateOfBirth:"Datum rođenja",currency:"Valuta",securityQuestionError:"Sigurnosno pitanje mora imati najmanje 1 znak i najviše 120 znakova.",securityAnswerError:"Sigurnosni odgovor mora imati najmanje 1 znak i najviše 120 znakova.",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o profilu",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o profilu"},"pt-br":{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},"es-mx":{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"}},w=(e,r,t)=>{let n=g[g[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n};var f={exports:{}};f.exports=function(){var e=6e4,r=36e5,t="millisecond",n="second",i="minute",o="hour",a="day",s="week",l="month",c="quarter",d="year",m="date",u="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var r=["th","st","nd","rd"],t=e%100;return"["+e+(r[(t-20)%10]||r[t]||r[0])+"]"}},w=function(e,r,t){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(t)+e},f={s:w,z:function(e){var r=-e.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),i=t%60;return(r<=0?"+":"-")+w(n,2,"0")+":"+w(i,2,"0")},m:function e(r,t){if(r.date()<t.date())return-e(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),i=r.clone().add(n,l),o=t-i<0,a=r.clone().add(n+(o?-1:1),l);return+(-(n+(t-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:s,d:a,D:m,h:o,m:i,s:n,ms:t,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",y={};y[v]=g;var b="$isDayjsObject",x=function(e){return e instanceof C||!(!e||!e[b])},P=function e(r,t,n){var i;if(!r)return v;if("string"==typeof r){var o=r.toLowerCase();y[o]&&(i=o),t&&(y[o]=t,i=o);var a=r.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=r.name;y[s]=r,i=s}return!n&&i&&(v=i),i||!n&&v},S=function(e,r){if(x(e))return e.clone();var t="object"==typeof r?r:{};return t.date=e,t.args=arguments,new C(t)},k=f;k.l=P,k.i=x,k.w=function(e,r){return S(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var C=function(){function g(e){this.$L=P(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var w=g.prototype;return w.parse=function(e){this.$d=function(e){var r=e.date,t=e.utc;if(null===r)return new Date(NaN);if(k.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return t?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(r)}(e),this.init()},w.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},w.$utils=function(){return k},w.isValid=function(){return!(this.$d.toString()===u)},w.isSame=function(e,r){var t=S(e);return this.startOf(r)<=t&&t<=this.endOf(r)},w.isAfter=function(e,r){return S(e)<this.startOf(r)},w.isBefore=function(e,r){return this.endOf(r)<S(e)},w.$g=function(e,r,t){return k.u(e)?this[r]:this.set(t,e)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(e,r){var t=this,c=!!k.u(r)||r,u=k.p(e),p=function(e,r){var n=k.w(t.$u?Date.UTC(t.$y,r,e):new Date(t.$y,r,e),t);return c?n:n.endOf(a)},h=function(e,r){return k.w(t.toDate()[e].apply(t.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(r)),t)},g=this.$W,w=this.$M,f=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case d:return c?p(1,0):p(31,11);case l:return c?p(1,w):p(0,w+1);case s:var y=this.$locale().weekStart||0,b=(g<y?g+7:g)-y;return p(c?f-b:f+(6-b),w);case a:case m:return h(v+"Hours",0);case o:return h(v+"Minutes",1);case i:return h(v+"Seconds",2);case n:return h(v+"Milliseconds",3);default:return this.clone()}},w.endOf=function(e){return this.startOf(e,!1)},w.$set=function(e,r){var s,c=k.p(e),u="set"+(this.$u?"UTC":""),p=(s={},s[a]=u+"Date",s[m]=u+"Date",s[l]=u+"Month",s[d]=u+"FullYear",s[o]=u+"Hours",s[i]=u+"Minutes",s[n]=u+"Seconds",s[t]=u+"Milliseconds",s)[c],h=c===a?this.$D+(r-this.$W):r;if(c===l||c===d){var g=this.clone().set(m,1);g.$d[p](h),g.init(),this.$d=g.set(m,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},w.set=function(e,r){return this.clone().$set(e,r)},w.get=function(e){return this[k.p(e)]()},w.add=function(t,c){var m,u=this;t=Number(t);var p=k.p(c),h=function(e){var r=S(u);return k.w(r.date(r.date()+Math.round(e*t)),u)};if(p===l)return this.set(l,this.$M+t);if(p===d)return this.set(d,this.$y+t);if(p===a)return h(1);if(p===s)return h(7);var g=(m={},m[i]=e,m[o]=r,m[n]=1e3,m)[p]||1,w=this.$d.getTime()+t*g;return k.w(w,this)},w.subtract=function(e,r){return this.add(-1*e,r)},w.format=function(e){var r=this,t=this.$locale();if(!this.isValid())return t.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=k.z(this),o=this.$H,a=this.$m,s=this.$M,l=t.weekdays,c=t.months,d=function(e,t,i,o){return e&&(e[t]||e(r,n))||i[t].slice(0,o)},m=function(e){return k.s(o%12||12,e,"0")},p=t.meridiem||function(e,r,t){var n=e<12?"AM":"PM";return t?n.toLowerCase():n};return n.replace(h,(function(e,n){return n||function(e){switch(e){case"YY":return String(r.$y).slice(-2);case"YYYY":return k.s(r.$y,4,"0");case"M":return s+1;case"MM":return k.s(s+1,2,"0");case"MMM":return d(t.monthsShort,s,c,3);case"MMMM":return d(c,s);case"D":return r.$D;case"DD":return k.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return d(t.weekdaysMin,r.$W,l,2);case"ddd":return d(t.weekdaysShort,r.$W,l,3);case"dddd":return l[r.$W];case"H":return String(o);case"HH":return k.s(o,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return p(o,a,!0);case"A":return p(o,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(r.$s);case"ss":return k.s(r.$s,2,"0");case"SSS":return k.s(r.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(t,m,u){var p,h=this,g=k.p(m),w=S(t),f=(w.utcOffset()-this.utcOffset())*e,v=this-w,y=function(){return k.m(h,w)};switch(g){case d:p=y()/12;break;case l:p=y();break;case c:p=y()/3;break;case s:p=(v-f)/6048e5;break;case a:p=(v-f)/864e5;break;case o:p=v/r;break;case i:p=v/e;break;case n:p=v/1e3;break;default:p=v}return u?p:k.a(p)},w.daysInMonth=function(){return this.endOf(l).$D},w.$locale=function(){return y[this.$L]},w.locale=function(e,r){if(!e)return this.$L;var t=this.clone(),n=P(e,r,!0);return n&&(t.$L=n),t},w.clone=function(){return k.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},g}(),E=C.prototype;return S.prototype=E,[["$ms",t],["$s",n],["$m",i],["$H",o],["$W",a],["$M",l],["$y",d],["$D",m]].forEach((function(e){E[e[1]]=function(r){return this.$g(r,e[0],e[1])}})),S.extend=function(e,r){return e.$i||(e(r,C,S),e.$i=!0),S},S.locale=P,S.isDayjs=x,S.unix=function(e){return S(1e3*e)},S.en=y[v],S.Ls=y,S.p={},S}();const v=f.exports,y=class{constructor(t){var n;e(this,t),this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"PROFILE_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"PROFILE_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:w("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:w(e,this.lang)}},window.location.href)},this.sendData=()=>{delete this.data.contacts,window.postMessage({type:"PROFILE_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"PROFILE_DATA":this.data=e.data.data,this.resetState(),this.skeletonLoading=!1;break;case"PROFILE_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=w(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e.player,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.initData=()=>{const e={};["externalPlayerId","affiliateMarker","personalInfo","communicationInfo","signupInfo","statusInfo","securityInfo","geographicInfo","playerInfo","contacts"].forEach((r=>e[r]=this.data[r])),this.data=e},this.updateState=(e,r)=>t=>{this.data[e][r]=t.target.value;const n=this.fieldsState.data[r],i=t.target.value,o=n.rule(i);o&&!n.isValid?(n.isValid=!0,this.invalidFields-=1):!o&&n.isValid&&(n.isValid=!1,this.invalidFields+=1),this.fieldsState.hasChanged=i!==n.initialValue;const a=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==a&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),t=new Headers;t.append("X-SessionId",this.session),t.append("Content-Type","application/problem+json; charset=utf-8"),this.data.contacts&&delete this.data.contacts;const n={method:"PUT",headers:t,body:JSON.stringify(this.data)};fetch(r,n).then((e=>this.handleFetchResponse(e))).then((()=>{this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))})).catch((e=>{console.error(e)}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&this.fieldsState.hasChanged},this.editableField=(e,t,n,i)=>{const o=this.fieldsState.data[t],a=this.data[e][t];return o?r("div",{class:"Field "+(o.isValid?"":"Invalid")},r("label",null,w(n,this.lang)),r("input",{type:"text",value:a,onKeyUp:this.updateState(e,t)}),!o.isValid&&r("p",{class:"Error"},w(i,this.lang))):null},this.staticField=(e,t)=>e?r("div",{class:"Field Disabled"},r("label",null,w(t,this.lang)),r("input",{type:"text",value:e,readonly:!0})):null,this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.dobFormat="DD/MM/YYYY",this.isStandAlone="true",this.limitStylingAppends=!1,this.skeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.skeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initEditableFieldsState(){var e,r;this.fieldsState.data={},this.fieldsState.hasChanged=!1,(null===(e=this.data.playerInfo)||void 0===e?void 0:e.SecurityQuestion)&&(this.fieldsState.data.SecurityQuestion=this.buildFieldState(!0,this.data.playerInfo.SecurityQuestion,(e=>e&&e.length<=120))),(null===(r=this.data.playerInfo)||void 0===r?void 0:r.SecurityAnswer)&&(this.fieldsState.data.SecurityAnswer=this.buildFieldState(!0,this.data.playerInfo.SecurityAnswer,(e=>e&&e.length<=120)))}resetState(){this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1}render(){return!this.skeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.skeletonLoading?r("form",{class:"PamPlayerProfileWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},[...Array(6).keys()].map((()=>r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})))),r("div",{class:"CompoundField"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"}))),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"auto",height:"20px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("form",{class:"PamPlayerProfileWrapper "+(this.isMobile?"Mobile":"")},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,w("title",this.lang))),r("h2",{class:"HeaderText"},w("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},this.staticField(this.data.contacts.find((e=>e.contatcType="Username")).contactValue,"username"),this.staticField(v(this.data.personalInfo.birthDate).format(this.dobFormat),"dateOfBirth"),this.staticField(this.data.personalInfo.firstName,"firstName"),this.staticField(this.data.personalInfo.lastName,"lastName"),this.editableField("playerInfo","SecurityQuestion","securityQuestion","securityQuestionError"),this.editableField("playerInfo","SecurityAnswer","securityAnswer","securityAnswerError"),r("div",{class:"CompoundField"},this.staticField(this.data.personalInfo.title,"playerTitle"),this.staticField(this.data.personalInfo.gender,"gender")),this.staticField(this.data.communicationInfo.currency,"currency"))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},w("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};y.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerProfileWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerProfileWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerProfileWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerProfileWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerProfileWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input:focus, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerProfileWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerProfileWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n height: 55px;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerProfileWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerProfileWrapper .HeaderText {\n display: none;\n }\n .PamPlayerProfileWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerProfileWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerProfileWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerProfileWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerProfileWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerProfileWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerProfileWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerProfileWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const b=class{constructor(r){e(this,r),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,r){r!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return r("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return r("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,t)=>r("div",{key:t,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return r(t,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},r("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};b.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{l as pam_player_addresses,m as pam_player_contacts,h as pam_player_documents,y as pam_player_profile,b as ui_skeleton}
1
+ import{r as e,h as r,H as t}from"./index-bb55519d.js";import{s as n,a as i,b as o}from"./pam-player-profile-controller-26029d9e.js";export{P as pam_player_profile_controller}from"./pam-player-profile-controller-26029d9e.js";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;const a={en:{title:"Addresses",titlePermanentAddress:"Permanent Address",titleTemporaryAddress:"Temporary Address",line1:"Address Line 1",line2:"Address Line 2",line3:"Address Line 3",country:"Country",city:"City",stateProvince:"State Province",postalCode:"Postal Code",floor:"Floor",doorCode:"Door Code",buildingName:"Building Name",additionalInstructions:"Additional Instructions",line1Error:"This field must be at least 1 character long and at most 100 characters.",line2Error:"This field must be at least 1 character long and at most 100 characters.",line3Error:"This field must be at least 1 character long and at most 100 characters.",cityError:"City must be at least 1 character long and at most 100 characters.",stateProvinceError:"State Province must be at most 100 characters",postalCodeError:"Postal Code length must be at least 1 character long and at most 20 characters.",floorError:"Floor must be less than 10 characters",doorCodeError:"Door Code must be less than 10 characters",buildingNameError:"Building Name must be less than 50 characters",additionalInstructionsError:"Additional Instructions must be less than 120 characters",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the address information",errorMessageFetch:"An error has occured when attempting to fetch the address information"},"zh-hk":{title:"地址",titlePermanentAddress:"永久地址",titleTemporaryAddress:"臨時地址",line1:"地址行1",line2:"地址行2",line3:"地址行3",country:"國家",city:"城市",stateProvince:"省/州",postalCode:"郵政編碼",floor:"樓層",doorCode:"門碼",buildingName:"建築名稱",additionalInstructions:"附加說明",line1Error:"此字段必須至少1個字符,最多100個字符。",line2Error:"此字段必須至少1個字符,最多100個字符。",line3Error:"此字段必須至少1個字符,最多100個字符。",cityError:"城市必須至少1個字符,最多100個字符。",stateProvinceError:"省/州必須最多100個字符",postalCodeError:"郵政編碼長度必須至少1個字符,最多20個字符。",floorError:"樓層必須少於10個字符",doorCodeError:"門碼必須少於10個字符",buildingNameError:"建築名稱必須少於50個字符",additionalInstructionsError:"附加說明必須少於120個字符",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新地址信息時發生錯誤",errorMessageFetch:"在嘗試獲取地址信息時發生錯誤"},fr:{title:"Adresses",titlePermanentAddress:"Adresse permanente",titleTemporaryAddress:"Adresse temporaire",line1:"Adresse ligne 1",line2:"Adresse ligne 2",line3:"Adresse ligne 3",country:"Pays",city:"Ville",stateProvince:"État/Province",postalCode:"Code postal",floor:"Étage",doorCode:"Code de porte",buildingName:"Nom du bâtiment",additionalInstructions:"Instructions supplémentaires",line1Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",line2Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",line3Error:"Ce champ doit comporter au moins 1 caractère et au maximum 100 caractères.",cityError:"La ville doit comporter au moins 1 caractère et au maximum 100 caractères.",stateProvinceError:"L'État/Province doit comporter au maximum 100 caractères",postalCodeError:"La longueur du code postal doit être d'au moins 1 caractère et au maximum 20 caractères.",floorError:"L'étage doit comporter moins de 10 caractères",doorCodeError:"Le code de porte doit comporter moins de 10 caractères",buildingNameError:"Le nom du bâtiment doit comporter moins de 50 caractères",additionalInstructionsError:"Les instructions supplémentaires doivent comporter moins de 120 caractères",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations d'adresse",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations d'adresse"},ro:{title:"Adrese",titlePermanentAddress:"Adresă permanentă",titleTemporaryAddress:"Adresă temporară",line1:"Linia adresei 1",line2:"Linia adresei 2",line3:"Linia adresei 3",country:"Țară",city:"Oraș",stateProvince:"Stat/Provincie",postalCode:"Cod poștal",floor:"Etaj",doorCode:"Cod ușă",buildingName:"Numele clădirii",additionalInstructions:"Instrucțiuni suplimentare",line1Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",line2Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",line3Error:"Acest câmp trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",cityError:"Orașul trebuie să aibă cel puțin 1 caracter și maximum 100 de caractere.",stateProvinceError:"Statul/Provincia trebuie să aibă maximum 100 de caractere",postalCodeError:"Lungimea codului poștal trebuie să fie de cel puțin 1 caracter și maximum 20 de caractere.",floorError:"Etajul trebuie să aibă mai puțin de 10 caractere",doorCodeError:"Codul ușii trebuie să aibă mai puțin de 10 caractere",buildingNameError:"Numele clădirii trebuie să aibă mai puțin de 50 de caractere",additionalInstructionsError:"Instrucțiunile suplimentare trebuie să aibă mai puțin de 120 de caractere",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile adresei",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile adresei"},tr:{title:"Adresler",titlePermanentAddress:"Kalıcı Adres",titleTemporaryAddress:"Geçici Adres",line1:"Adres Satırı 1",line2:"Adres Satırı 2",line3:"Adres Satırı 3",country:"Ülke",city:"Şehir",stateProvince:"Eyalet/İl",postalCode:"Posta Kodu",floor:"Kat",doorCode:"Kapı Kodu",buildingName:"Bina Adı",additionalInstructions:"Ek Talimatlar",line1Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",line2Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",line3Error:"Bu alan en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",cityError:"Şehir en az 1 karakter uzunluğunda ve en fazla 100 karakter uzunluğunda olmalıdır.",stateProvinceError:"Eyalet/İl en fazla 100 karakter uzunluğunda olmalıdır",postalCodeError:"Posta Kodu uzunluğu en az 1 karakter ve en fazla 20 karakter olmalıdır.",floorError:"Kat en fazla 10 karakter uzunluğunda olmalıdır",doorCodeError:"Kapı Kodu en fazla 10 karakter uzunluğunda olmalıdır",buildingNameError:"Bina Adı en fazla 50 karakter uzunluğunda olmalıdır",additionalInstructionsError:"Ek Talimatlar en fazla 120 karakter uzunluğunda olmalıdır",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Adres bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Adres bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Direcciones",titlePermanentAddress:"Dirección Permanente",titleTemporaryAddress:"Dirección Temporal",line1:"Línea de Dirección 1",line2:"Línea de Dirección 2",line3:"Línea de Dirección 3",country:"País",city:"Ciudad",stateProvince:"Estado/Provincia",postalCode:"Código Postal",floor:"Piso",doorCode:"Código de Puerta",buildingName:"Nombre del Edificio",additionalInstructions:"Instrucciones Adicionales",line1Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line2Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line3Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",cityError:"La ciudad debe tener al menos 1 carácter y un máximo de 100 caracteres.",stateProvinceError:"El Estado/Provincia debe tener un máximo de 100 caracteres",postalCodeError:"La longitud del código postal debe ser de al menos 1 carácter y un máximo de 20 caracteres.",floorError:"El piso debe tener menos de 10 caracteres",doorCodeError:"El código de puerta debe tener menos de 10 caracteres",buildingNameError:"El nombre del edificio debe tener menos de 50 caracteres",additionalInstructionsError:"Las instrucciones adicionales deben tener menos de 120 caracteres",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de la dirección",errorMessageFetch:"Se ha producido un error al intentar obtener la información de la dirección"},pt:{title:"Endereços",titlePermanentAddress:"Endereço Permanente",titleTemporaryAddress:"Endereço Temporário",line1:"Linha de Endereço 1",line2:"Linha de Endereço 2",line3:"Linha de Endereço 3",country:"País",city:"Cidade",stateProvince:"Estado/Província",postalCode:"Código Postal",floor:"Andar",doorCode:"Código da Porta",buildingName:"Nome do Edifício",additionalInstructions:"Instruções Adicionais",line1Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line2Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line3Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",cityError:"A cidade deve ter pelo menos 1 caractere e no máximo 100 caracteres.",stateProvinceError:"O Estado/Província deve ter no máximo 100 caracteres",postalCodeError:"O comprimento do código postal deve ser de pelo menos 1 caractere e no máximo 20 caracteres.",floorError:"O andar deve ter menos de 10 caracteres",doorCodeError:"O código da porta deve ter menos de 10 caracteres",buildingNameError:"O nome do edifício deve ter menos de 50 caracteres",additionalInstructionsError:"As instruções adicionais devem ter menos de 120 caracteres",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do endereço",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do endereço"},hr:{title:"Adrese",titlePermanentAddress:"Stalna Adresa",titleTemporaryAddress:"Privremena Adresa",line1:"Adresa Linija 1",line2:"Adresa Linija 2",line3:"Adresa Linija 3",country:"Država",city:"Grad",stateProvince:"Država/Provincija",postalCode:"Poštanski Broj",floor:"Kat",doorCode:"Šifra Vrata",buildingName:"Ime Zgrade",additionalInstructions:"Dodatne Upute",line1Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",line2Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",line3Error:"Ovo polje mora imati najmanje 1 znak i najviše 100 znakova.",cityError:"Grad mora imati najmanje 1 znak i najviše 100 znakova.",stateProvinceError:"Država/Provincija mora imati najviše 100 znakova",postalCodeError:"Duljina poštanskog broja mora biti najmanje 1 znak i najviše 20 znakova.",floorError:"Kat mora imati manje od 10 znakova",doorCodeError:"Šifra vrata mora imati manje od 10 znakova",buildingNameError:"Ime zgrade mora imati manje od 50 znakova",additionalInstructionsError:"Dodatne upute moraju imati manje od 120 znakova",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o adresi",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o adresi"},"pt-br":{title:"Endereços",titlePermanentAddress:"Endereço Permanente",titleTemporaryAddress:"Endereço Temporário",line1:"Linha de Endereço 1",line2:"Linha de Endereço 2",line3:"Linha de Endereço 3",country:"País",city:"Cidade",stateProvince:"Estado/Província",postalCode:"Código Postal",floor:"Andar",doorCode:"Código da Porta",buildingName:"Nome do Edifício",additionalInstructions:"Instruções Adicionais",line1Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line2Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",line3Error:"Este campo deve ter pelo menos 1 caractere e no máximo 100 caracteres.",cityError:"A cidade deve ter pelo menos 1 caractere e no máximo 100 caracteres.",stateProvinceError:"O Estado/Província deve ter no máximo 100 caracteres",postalCodeError:"O comprimento do código postal deve ser de pelo menos 1 caractere e no máximo 20 caracteres.",floorError:"O andar deve ter menos de 10 caracteres",doorCodeError:"O código da porta deve ter menos de 10 caracteres",buildingNameError:"O nome do edifício deve ter menos de 50 caracteres",additionalInstructionsError:"As instruções adicionais devem ter menos de 120 caracteres",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do endereço",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do endereço"},"es-mx":{title:"Direcciones",titlePermanentAddress:"Dirección Permanente",titleTemporaryAddress:"Dirección Temporal",line1:"Línea de Dirección 1",line2:"Línea de Dirección 2",line3:"Línea de Dirección 3",country:"País",city:"Ciudad",stateProvince:"Estado/Provincia",postalCode:"Código Postal",floor:"Piso",doorCode:"Código de Puerta",buildingName:"Nombre del Edificio",additionalInstructions:"Instrucciones Adicionales",line1Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line2Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",line3Error:"Este campo debe tener al menos 1 carácter y un máximo de 100 caracteres.",cityError:"La ciudad debe tener al menos 1 carácter y un máximo de 100 caracteres.",stateProvinceError:"El Estado/Provincia debe tener un máximo de 100 caracteres",postalCodeError:"La longitud del código postal debe ser de al menos 1 carácter y un máximo de 20 caracteres.",floorError:"El piso debe tener menos de 10 caracteres",doorCodeError:"El código de puerta debe tener menos de 10 caracteres",buildingNameError:"El nombre del edificio debe tener menos de 50 caracteres",additionalInstructionsError:"Las instrucciones adicionales deben tener menos de 120 caracteres",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de la dirección",errorMessageFetch:"Se ha producido un error al intentar obtener la información de la dirección"}},s=(e,r,t)=>{let n=a[a[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},l=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"ADDRESSES_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"ADDRESSES_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:s("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:s(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"ADDRESSES_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"ADDRESSES_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"ADDRESSES_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=s(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/addresses/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=(e,r,t)=>n=>{r?this.dataRef[e][r][t]=n.target.value:this.dataRef[e][t]=n.target.value;const i=this.fieldsState[e].data[t],o=n.target.value,a=i.rule(o);a&&!i.isValid?(i.isValid=!0,this.invalidFields-=1):!a&&i.isValid&&(i.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=o!==i.initialValue;const s=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==s&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/addresses/${t.addressId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t=null,n,i,o)=>{const a=this.fieldsState[e].data[n];let l;return l=t?this.dataRef[e][t][n]:this.dataRef[e][n],a?r("div",{class:"Field "+(a.isValid?"":"Invalid")},r("label",null,s(i,this.lang)),r("input",{type:"text",value:l,onKeyUp:this.updateState(e,t,n)}),!a.isValid&&r("p",{class:"Error"},s(o,this.lang))):null},this.staticField=(e,t)=>e?r("div",{class:"Field Disabled"},r("label",null,s(t,this.lang)),r("input",{type:"text",value:e,readonly:!0})):null,this.section=(e,t)=>{let n="Permanent"===e?this.isPermanentAddressSectionActive:this.isTemporaryAddressSectionActive;return t?r("div",{class:"Section"},r("button",{class:"SectionTitle",onClick:this.toggleSection(e)},s(`title${e}Address`)),r("section",{class:n?"SectionContent Active":"SectionContent"},this.editableField(e,null,"line1","line1","line1Error"),this.staticField(this.dataRef[e].country,"country"),this.editableField(e,null,"line2","line2","line2Error"),this.editableField(e,null,"stateProvince","stateProvince","stateProvinceError"),this.editableField(e,null,"line3","line3","line3Error"),this.editableField(e,null,"city","city","cityError"),this.editableField(e,null,"postalCode","postalCode","postalCodeError"),"true"==this.isFullAddressDisplayed&&r("div",{class:"CompoundField"},this.editableField(e,"addressInfo","floor","floor","floorError"),this.editableField(e,"addressInfo","doorCode","doorCode","doorCodeError")),"true"==this.isFullAddressDisplayed&&this.editableField(e,"addressInfo","buildingName","buildingName","buildingNameError"),"true"==this.isFullAddressDisplayed&&this.editableField(e,"addressInfo","additionalInstructions","additionalInstructions","additionalInstructionsError"))):r("div",{class:"Section"},r("button",{class:"SectionTitle",onClick:this.toggleSection(e)},s(`title${e}Address`,this.lang)),r("section",{class:n?"SectionContent Active":"SectionContent"},this.staticField(this.dataRef[e].line1,"line1"),this.staticField(this.dataRef[e].country,"country"),this.staticField(this.dataRef[e].line2,"line2"),this.staticField(this.dataRef[e].stateProvince,"stateProvince"),this.staticField(this.dataRef[e].line3,"line3"),this.staticField(this.dataRef[e].city,"city"),this.staticField(this.dataRef[e].postalCode,"postalCode"),"true"==this.isFullAddressDisplayed&&r("div",{class:"CompoundField"},this.staticField(this.dataRef[e].addressInfo.floor,"floor"),this.staticField(this.dataRef[e].addressInfo.doorCode,"doorCode")),"true"==this.isFullAddressDisplayed&&this.staticField(this.dataRef[e].addressInfo.buildingName,"buildingName"),"true"==this.isFullAddressDisplayed&&this.staticField(this.dataRef[e].addressInfo.additionalInstructions,"additionalInstructions")))},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.toggleSection=e=>r=>{switch(r.preventDefault(),e){case"Permanent":this.isPermanentAddressSectionActive=!this.isPermanentAddressSectionActive;break;case"Temporary":this.isTemporaryAddressSectionActive=!this.isTemporaryAddressSectionActive}},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isFullAddressDisplayed="false",this.isPermanentAdressEditable="false",this.isTemporaryAdressEditable="true",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isPermanentAddressSectionActive=!0,this.isTemporaryAddressSectionActive=!1,this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.addresses)this.dataRef[e.type]=e;this.dataRef.Temporary&&this.isSkeletonLoading&&(this.isPermanentAddressSectionActive=!1,this.isTemporaryAddressSectionActive=!0)}initEditableFieldsState(){for(const[e,r]of Object.entries(this.dataRef)){if("Permanent"===e&&"true"!==this.isPermanentAdressEditable||"Temporary"===e&&"true"!==this.isTemporaryAdressEditable)continue;const t={};["line1","line2","line3"].forEach((e=>{r[e]&&(t[e]=this.buildFieldState(!0,r[e],(e=>e&&e.length<=100)))})),r.city&&(t.city=this.buildFieldState(!0,r.city,(e=>e&&e.length<=50))),r.postalCode&&(t.postalCode=this.buildFieldState(!0,r.postalCode,(e=>e&&e.length<=20))),r.stateProvince&&(t.stateProvince=this.buildFieldState(!0,r.stateProvince,(e=>e&&e.length<=50))),Object.keys(r.addressInfo).length>0&&(r.addressInfo.floor&&(t.floor=this.buildFieldState(!0,r.addressInfo.floor,(e=>e&&e.length<=10))),r.addressInfo.doorCode&&(t.doorCode=this.buildFieldState(!0,r.addressInfo.doorCode,(e=>e&&e.length<=10))),r.addressInfo.buildingName&&(t.buildingName=this.buildFieldState(!0,r.addressInfo.buildingName,(e=>e&&e.length<=50))),r.addressInfo.additionalInstructions&&(t.additionalInstructions=this.buildFieldState(!0,r.addressInfo.additionalInstructions,(e=>e&&e.length<=120)))),this.fieldsState[e]={},this.fieldsState[e].data=t,this.fieldsState[e].hasChanged=!1}}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PamPlayerAddressesWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},[...Array(6).keys()].map((()=>r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})))),r("div",{class:"CompoundField"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"}))),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"auto",height:"20px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("form",{class:"PamPlayerAddressesWrapper"},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,s("title",this.lang))),r("h2",{class:"HeaderText"},s("title",this.lang)),this.dataRef.Temporary&&this.section("Temporary","true"===this.isTemporaryAdressEditable),this.dataRef.Permanent&&this.section("Permanent","true"===this.isPermanentAdressEditable),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},s("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};l.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerAddressesWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerAddressesWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerAddressesWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerAddressesWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerAddressesWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent {\n display: grid;\n max-height: 0;\n padding-bottom: 0;\n margin-top: 0;\n overflow: hidden;\n transition: ease-in-out var(--emw--transition-medium, 250ms);\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input:focus, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerAddressesWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerAddressesWrapper .Section .SectionContent.Active {\n max-height: 800px;\n padding-bottom: 30px;\n margin-top: 20px;\n}\n.PamPlayerAddressesWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerAddressesWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerAddressesWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionTitle {\n width: 200px;\n margin-bottom: 30px;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionContent {\n max-height: 100%;\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerAddressesWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PamPlayerAddressesWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerAddressesWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerAddressesWrapper .HeaderText {\n display: none;\n }\n .PamPlayerAddressesWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerAddressesWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerAddressesWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerAddressesWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerAddressesWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerAddressesWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerAddressesWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerAddressesWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerAddressesWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerAddressesWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerAddressesWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerAddressesWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerAddressesWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerAddressesWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const c={en:{title:"Contacts",email:"Email",phoneNumber:"Phone Number",phoneNumberError:"The phone number must be at least 5 digits and at most 15 digits",verifyContactButton:"Verify",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the contacts information",errorMessageFetch:"An error has occured when attempting to fetch the contacts information"},"zh-hk":{title:"聯絡人",email:"電子郵件",phoneNumber:"電話號碼",phoneNumberError:"電話號碼必須至少5位數字,最多15位數字",verifyContactButton:"驗證",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新聯絡人信息時發生錯誤",errorMessageFetch:"在嘗試獲取聯絡人信息時發生錯誤"},fr:{title:"Contacts",email:"Email",phoneNumber:"Numéro de téléphone",phoneNumberError:"Le numéro de téléphone doit comporter au moins 5 chiffres et au maximum 15 chiffres",verifyContactButton:"Vérifier",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations de contact",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations de contact"},ro:{title:"Contacte",email:"Email",phoneNumber:"Număr de telefon",phoneNumberError:"Numărul de telefon trebuie să aibă cel puțin 5 cifre și maximum 15 cifre",verifyContactButton:"Verifică",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile de contact",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile de contact"},tr:{title:"Kişiler",email:"E-posta",phoneNumber:"Telefon Numarası",phoneNumberError:"Telefon numarası en az 5 haneli ve en fazla 15 haneli olmalıdır",verifyContactButton:"Doğrula",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Kişi bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"İletişim bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Contactos",email:"Correo electrónico",phoneNumber:"Número de teléfono",phoneNumberError:"El número de teléfono debe tener al menos 5 dígitos y un máximo de 15 dígitos",verifyContactButton:"Verificar",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de contactos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los contactos"},pt:{title:"Contatos",email:"Email",phoneNumber:"Número de telefone",phoneNumberError:"O número de telefone deve ter pelo menos 5 dígitos e no máximo 15 dígitos",verifyContactButton:"Verificar",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações de contato",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações de contato"},hr:{title:"Kontakti",email:"Email",phoneNumber:"Broj telefona",phoneNumberError:"Broj telefona mora imati najmanje 5 znamenki i najviše 15 znamenki",verifyContactButton:"Provjeri",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o kontaktima",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o kontaktima"},"pt-br":{title:"Contatos",email:"Email",phoneNumber:"Número de telefone",phoneNumberError:"O número de telefone deve ter pelo menos 5 dígitos e no máximo 15 dígitos",verifyContactButton:"Verificar",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações de contato",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações de contato"},"es-mx":{title:"Contactos",email:"Correo electrónico",phoneNumber:"Número de teléfono",phoneNumberError:"El número de teléfono debe tener al menos 5 dígitos y un máximo de 15 dígitos",verifyContactButton:"Verificar",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de contactos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los contactos"}},d=(e,r,t)=>{let n=c[c[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},m=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"CONTACTS_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"CONTACTS_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendContactVerificationRequest=e=>r=>{r.preventDefault(),window.postMessage({type:"ContactVerification",contactType:e})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:d("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:d(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"CONTACTS_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"CONTACTS_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"CONTACTS_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=d(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/contacts/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.log(e),n()}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=e=>r=>{this.dataRef[e].contactValue=r.target.value;const t=this.fieldsState[e].data.contactValue,n=r.target.value,i=t.rule(n);i&&!t.isValid?(t.isValid=!0,this.invalidFields-=1):!i&&t.isValid&&(t.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=n!==t.initialValue;const o=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==o&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/contacts/${t.contactId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t,n)=>{const i=this.fieldsState[e].data.contactValue,o=this.dataRef[e];return i?r("div",{class:"Field "+(i.isValid?"":"Invalid")},r("label",null,d(t,this.lang)),"true"===this.isVerificationStatusDisplayed?r("div",null,r("input",{type:"text",value:o.contactValue,onKeyUp:this.updateState(e)}),o.isVerified?r("svg",{class:"VerifiedCheckmark",xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Capa_1",width:"40px",height:"40px",viewBox:"-53.65 -53.65 643.84 643.84",transform:"matrix(1, 0, 0, 1, 0, 0)rotate(0)"},r("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"}),r("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round",stroke:"#CCCCCC","stroke-width":"1.073082"}),r("g",{id:"SVGRepo_iconCarrier"}," ",r("g",null," ",r("g",null," ",r("path",{d:"M496.785,152.779c-3.305-25.085-16.549-51.934-38.826-74.205c-22.264-22.265-49.107-35.508-74.186-38.813 c-11.348-1.499-26.5-7.766-35.582-14.737C328.111,9.626,299.764,0,268.27,0s-59.841,9.626-79.921,25.024 c-9.082,6.965-24.235,13.238-35.582,14.737c-25.08,3.305-51.922,16.549-74.187,38.813c-22.277,22.271-35.521,49.119-38.825,74.205 c-1.493,11.347-7.766,26.494-14.731,35.57C9.621,208.422,0,236.776,0,268.27s9.621,59.847,25.024,79.921 c6.971,9.082,13.238,24.223,14.731,35.568c3.305,25.086,16.548,51.936,38.825,74.205c22.265,22.266,49.107,35.51,74.187,38.814 c11.347,1.498,26.5,7.771,35.582,14.736c20.073,15.398,48.421,25.025,79.921,25.025s59.841-9.627,79.921-25.025 c9.082-6.965,24.234-13.238,35.582-14.736c25.078-3.305,51.922-16.549,74.186-38.814c22.277-22.27,35.521-49.119,38.826-74.205 c1.492-11.346,7.766-26.492,14.73-35.568c15.404-20.074,25.025-48.422,25.025-79.921c0-31.494-9.621-59.848-25.025-79.921 C504.545,179.273,498.277,164.126,496.785,152.779z M439.256,180.43L246.477,373.209l-30.845,30.846 c-8.519,8.52-22.326,8.52-30.845,0l-30.845-30.846l-56.665-56.658c-8.519-8.52-8.519-22.326,0-30.846l30.845-30.844 c8.519-8.519,22.326-8.519,30.845,0l41.237,41.236L377.561,118.74c8.52-8.519,22.326-8.519,30.846,0l30.844,30.845 C447.775,158.104,447.775,171.917,439.256,180.43z"})," ")," ")," ")):r("button",{onClick:this.sendContactVerificationRequest(e)},d("verifyContactButton"))):r("input",{type:"text",value:o.contactValue,onKeyUp:this.updateState(e)}),!i.isValid&&r("p",{class:"Error"},d(n,this.lang))):null},this.staticField=(e,t)=>{const n=this.dataRef[e];return n&&n.contactValue?r("div",{class:"Field Disabled"},r("label",null,d(t,this.lang)),"true"===this.isVerificationStatusDisplayed?r("div",null,r("input",{type:"text",value:n.contactValue,readonly:!0}),n.isVerified?r("svg",{class:"VerifiedCheckmark",xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Capa_1",width:"40px",height:"40px",viewBox:"-53.65 -53.65 643.84 643.84",transform:"matrix(1, 0, 0, 1, 0, 0)rotate(0)"},r("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"}),r("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round",stroke:"#CCCCCC","stroke-width":"1.073082"}),r("g",{id:"SVGRepo_iconCarrier"}," ",r("g",null," ",r("g",null," ",r("path",{d:"M496.785,152.779c-3.305-25.085-16.549-51.934-38.826-74.205c-22.264-22.265-49.107-35.508-74.186-38.813 c-11.348-1.499-26.5-7.766-35.582-14.737C328.111,9.626,299.764,0,268.27,0s-59.841,9.626-79.921,25.024 c-9.082,6.965-24.235,13.238-35.582,14.737c-25.08,3.305-51.922,16.549-74.187,38.813c-22.277,22.271-35.521,49.119-38.825,74.205 c-1.493,11.347-7.766,26.494-14.731,35.57C9.621,208.422,0,236.776,0,268.27s9.621,59.847,25.024,79.921 c6.971,9.082,13.238,24.223,14.731,35.568c3.305,25.086,16.548,51.936,38.825,74.205c22.265,22.266,49.107,35.51,74.187,38.814 c11.347,1.498,26.5,7.771,35.582,14.736c20.073,15.398,48.421,25.025,79.921,25.025s59.841-9.627,79.921-25.025 c9.082-6.965,24.234-13.238,35.582-14.736c25.078-3.305,51.922-16.549,74.186-38.814c22.277-22.27,35.521-49.119,38.826-74.205 c1.492-11.346,7.766-26.492,14.73-35.568c15.404-20.074,25.025-48.422,25.025-79.921c0-31.494-9.621-59.848-25.025-79.921 C504.545,179.273,498.277,164.126,496.785,152.779z M439.256,180.43L246.477,373.209l-30.845,30.846 c-8.519,8.52-22.326,8.52-30.845,0l-30.845-30.846l-56.665-56.658c-8.519-8.52-8.519-22.326,0-30.846l30.845-30.844 c8.519-8.519,22.326-8.519,30.845,0l41.237,41.236L377.561,118.74c8.52-8.519,22.326-8.519,30.846,0l30.844,30.845 C447.775,158.104,447.775,171.917,439.256,180.43z"})," ")," ")," ")):r("button",{onClick:this.sendContactVerificationRequest(e)},d("verifyContactButton"))):r("input",{type:"text",value:n.contactValue,readonly:!0})):null},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isVerificationStatusDisplayed="false",this.isPhoneNumberEditable="true",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.contacts)this.dataRef[e.contactType]=e}initEditableFieldsState(){this.dataRef.PhoneNumber&&"true"===this.isPhoneNumberEditable&&(this.fieldsState.PhoneNumber={},this.fieldsState.PhoneNumber.hasChanged=!1,this.fieldsState.PhoneNumber.data={},this.fieldsState.PhoneNumber.data.contactValue=this.buildFieldState(!0,this.dataRef.PhoneNumber.contactValue,(e=>e&&e.length>=5&&e.length<=15&&!Number.isNaN(Number(e)))))}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PlayerContactsWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"40px"})))):r("form",{class:"PlayerContactsWrapper"},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,d("title",this.lang))),r("h2",{class:"HeaderText"},d("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},this.editableField("PhoneNumber","phoneNumber","phoneNumberError"),this.staticField("Email","email"))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},d("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};m.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PlayerContactsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PlayerContactsWrapper .ReturnButton {\n display: none;\n}\n.PlayerContactsWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerContactsWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PlayerContactsWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PlayerContactsWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PlayerContactsWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input:focus, .PlayerContactsWrapper .Section .SectionContent .Field input :focus-within, .PlayerContactsWrapper .Section .SectionContent .Field input :focus-visible, .PlayerContactsWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PlayerContactsWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div input {\n min-width: fit-content;\n width: 100%;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div button {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-semibold, 500);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 100px;\n min-width: 30px;\n width: 100%;\n height: 100%;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field div button:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PlayerContactsWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PlayerContactsWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PlayerContactsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PlayerContactsWrapper .Section .VerifiedCheckmark {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n stroke: #27a305;\n stroke-width: 5;\n}\n.PlayerContactsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerContactsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PlayerContactsWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PlayerContactsWrapper.skeleton .Section .SectionContent {\n max-height: 100%;\n overflow: hidden;\n}\n.PlayerContactsWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PlayerContactsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PlayerContactsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PlayerContactsWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PlayerContactsWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PlayerContactsWrapper .HeaderText {\n display: none;\n }\n .PlayerContactsWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PlayerContactsWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PlayerContactsWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PlayerContactsWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PlayerContactsWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PlayerContactsWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PlayerContactsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PlayerContactsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PlayerContactsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PlayerContactsWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PlayerContactsWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PlayerContactsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const u={en:{title:"Documents",documentType:"Document Type",documentNumber:"Document Number",documentNumberError:"Document number is invalid",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the documents information",errorMessageFetch:"An error has occured when attempting to fetch the documents information"},"zh-hk":{title:"文件",documentType:"文件類型",documentNumber:"文件號碼",documentNumberError:"文件號碼無效",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新文件信息時發生錯誤",errorMessageFetch:"在嘗試獲取文件信息時發生錯誤"},fr:{title:"Documents",documentType:"Type de document",documentNumber:"Numéro de document",documentNumberError:"Le numéro de document est invalide",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations des documents",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations sur les documents"},ro:{title:"Documente",documentType:"Tip document",documentNumber:"Număr document",documentNumberError:"Numărul documentului este invalid",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile documentelor",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile documentelor"},tr:{title:"Belgeler",documentType:"Belge Türü",documentNumber:"Belge Numarası",documentNumberError:"Belge numarası geçersiz",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Belgelerin bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Belgelerin bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"},pt:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},hr:{title:"Dokumenti",documentType:"Vrsta dokumenta",documentNumber:"Broj dokumenta",documentNumberError:"Broj dokumenta je nevažeći",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o dokumentima",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o dokumentima"},"pt-br":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},"es-mx":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"}},p=(e,r,t)=>{let n=u[u[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n},h=class{constructor(t){var n;e(this,t),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"DOCUMENTS_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"DOCUMENTS_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:p("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:p(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"DOCUMENTS_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"DOCUMENTS_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"DOCUMENTS_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=p(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=e=>r=>{this.dataRef[e].documentNumber=r.target.value;const t=this.fieldsState[e].data.documentNumber,n=r.target.value,i=t.rule(n);i&&!t.isValid?(t.isValid=!0,this.invalidFields-=1):!i&&t.isValid&&(t.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=n!==t.initialValue;const o=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==o&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const t=this.dataRef[e],n=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/${t.documentId}/`,this.endpoint),i=new Headers;i.append("X-SessionId",this.session),i.append("Content-Type","application/json-patch+json");const o={method:"PUT",headers:i,body:JSON.stringify(t)};r.push(fetch(n,o))}Promise.all(r).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,t,n,i)=>{const o=this.fieldsState[e].data[t],a=this.dataRef[e];return o?r("div",{class:"Field "+(o.isValid?"":"Invalid")},r("label",null,p(n,this.lang)),r("input",{type:"text",value:a[t],onKeyUp:this.updateState(e)}),!o.isValid&&r("p",{class:"Error"},p(i,this.lang))):null},this.staticField=(e,t,n)=>{const i=this.dataRef[e];return i&&i[t]?r("div",{class:"Field Disabled"},r("label",null,p(n,this.lang)),r("input",{type:"text",value:i[t],readonly:!0})):null},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isEditable="false",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.documents)this.dataRef[e.documentType]=e}initEditableFieldsState(){for(const[e,r]of Object.entries(this.dataRef))this.fieldsState[e]={},this.fieldsState[e].data={},this.fieldsState[e].data.documentNumber=this.buildFieldState(!0,r.documentNumber,(e=>e&&/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9\s]+$/.test(e)&&e.length<=50)),this.fieldsState[e].hasChanged=!1}render(){return!this.isSkeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.isSkeletonLoading?r("form",{class:"PlayerDocumentsWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"title",width:"100%",height:"40px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"40px"})))):r("form",{class:"PlayerDocumentsWrapper "+(this.isMobile?"Mobile":"")},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,p("title",this.lang))),r("h2",{class:"HeaderText"},p("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},Object.keys(this.dataRef).map((e=>r("div",{class:"CompoundField"},this.staticField(e,"documentType","documentType"),"true"===this.isEditable?this.editableField(e,"documentNumber","documentNumber","documentNumberError"):this.staticField(e,"documentNumber","documentNumber")))))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},p("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};h.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PlayerDocumentsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PlayerDocumentsWrapper .ReturnButton {\n display: none;\n}\n.PlayerDocumentsWrapper h2 {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerDocumentsWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PlayerDocumentsWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input:focus, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-within, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-visible, .PlayerDocumentsWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PlayerDocumentsWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 1fr 1fr;\n max-height: 100%;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PlayerDocumentsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PlayerDocumentsWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PlayerDocumentsWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PlayerDocumentsWrapper .HeaderText {\n display: none;\n }\n .PlayerDocumentsWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PlayerDocumentsWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: column;\n }\n .PlayerDocumentsWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PlayerDocumentsWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PlayerDocumentsWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}';const g={en:{title:"Profile Info",username:"Username",firstName:"First Name",lastName:"Last Name",securityQuestion:"Security Question",securityAnswer:"Security Answer",playerTitle:"Title",gender:"Gender",dateOfBirth:"Date Of Birth",currency:"Currency",securityQuestionError:"Security question must be at least 1 character long and maximum 120 characters.",securityAnswerError:"Security answer must be at least 1 character long and maximum 120 characters.",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the profile information",errorMessageFetch:"An error has occured when attempting to fetch the profile information"},"zh-hk":{title:"個人資料",username:"用戶名",firstName:"名字",lastName:"姓氏",securityQuestion:"安全問題",securityAnswer:"安全答案",playerTitle:"稱號",gender:"性別",dateOfBirth:"出生日期",currency:"貨幣",securityQuestionError:"安全問題必須至少1個字符,最多120個字符。",securityAnswerError:"安全答案必須至少1個字符,最多120個字符。",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新個人資料信息時發生錯誤",errorMessageFetch:"在嘗試獲取個人資料時發生錯誤"},fr:{title:"Informations de profil",username:"Nom d'utilisateur",firstName:"Prénom",lastName:"Nom de famille",securityQuestion:"Question de sécurité",securityAnswer:"Réponse de sécurité",playerTitle:"Titre",gender:"Genre",dateOfBirth:"Date de naissance",currency:"Devise",securityQuestionError:"La question de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",securityAnswerError:"La réponse de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations de profil",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations de profil"},ro:{title:"Informații profil",username:"Nume de utilizator",firstName:"Prenume",lastName:"Nume de familie",securityQuestion:"Întrebare de securitate",securityAnswer:"Răspuns de securitate",playerTitle:"Titlu",gender:"Gen",dateOfBirth:"Data nașterii",currency:"Monedă",securityQuestionError:"Întrebarea de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",securityAnswerError:"Răspunsul de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile profilului",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile profilului"},tr:{title:"Profil Bilgileri",username:"Kullanıcı Adı",firstName:"Ad",lastName:"Soyad",securityQuestion:"Güvenlik Sorusu",securityAnswer:"Güvenlik Cevabı",playerTitle:"Başlık",gender:"Cinsiyet",dateOfBirth:"Doğum Tarihi",currency:"Para Birimi",securityQuestionError:"Güvenlik sorusu en az 1 karakter ve en fazla 120 karakter olmalıdır.",securityAnswerError:"Güvenlik cevabı en az 1 karakter ve en fazla 120 karakter olmalıdır.",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Profil bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Profil bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"},pt:{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},hr:{title:"Informacije o profilu",username:"Korisničko ime",firstName:"Ime",lastName:"Prezime",securityQuestion:"Sigurnosno pitanje",securityAnswer:"Sigurnosni odgovor",playerTitle:"Naslov",gender:"Spol",dateOfBirth:"Datum rođenja",currency:"Valuta",securityQuestionError:"Sigurnosno pitanje mora imati najmanje 1 znak i najviše 120 znakova.",securityAnswerError:"Sigurnosni odgovor mora imati najmanje 1 znak i najviše 120 znakova.",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o profilu",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o profilu"},"pt-br":{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},"es-mx":{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"}},w=(e,r,t)=>{let n=g[g[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const t=new RegExp(`{${e}}`,"g");n=n.replace(t,r)}return n};var f={exports:{}};f.exports=function(){var e=6e4,r=36e5,t="millisecond",n="second",i="minute",o="hour",a="day",s="week",l="month",c="quarter",d="year",m="date",u="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var r=["th","st","nd","rd"],t=e%100;return"["+e+(r[(t-20)%10]||r[t]||r[0])+"]"}},w=function(e,r,t){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(t)+e},f={s:w,z:function(e){var r=-e.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),i=t%60;return(r<=0?"+":"-")+w(n,2,"0")+":"+w(i,2,"0")},m:function e(r,t){if(r.date()<t.date())return-e(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),i=r.clone().add(n,l),o=t-i<0,a=r.clone().add(n+(o?-1:1),l);return+(-(n+(t-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:s,d:a,D:m,h:o,m:i,s:n,ms:t,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",y={};y[v]=g;var b="$isDayjsObject",x=function(e){return e instanceof C||!(!e||!e[b])},P=function e(r,t,n){var i;if(!r)return v;if("string"==typeof r){var o=r.toLowerCase();y[o]&&(i=o),t&&(y[o]=t,i=o);var a=r.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=r.name;y[s]=r,i=s}return!n&&i&&(v=i),i||!n&&v},S=function(e,r){if(x(e))return e.clone();var t="object"==typeof r?r:{};return t.date=e,t.args=arguments,new C(t)},k=f;k.l=P,k.i=x,k.w=function(e,r){return S(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var C=function(){function g(e){this.$L=P(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var w=g.prototype;return w.parse=function(e){this.$d=function(e){var r=e.date,t=e.utc;if(null===r)return new Date(NaN);if(k.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return t?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(r)}(e),this.init()},w.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},w.$utils=function(){return k},w.isValid=function(){return!(this.$d.toString()===u)},w.isSame=function(e,r){var t=S(e);return this.startOf(r)<=t&&t<=this.endOf(r)},w.isAfter=function(e,r){return S(e)<this.startOf(r)},w.isBefore=function(e,r){return this.endOf(r)<S(e)},w.$g=function(e,r,t){return k.u(e)?this[r]:this.set(t,e)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(e,r){var t=this,c=!!k.u(r)||r,u=k.p(e),p=function(e,r){var n=k.w(t.$u?Date.UTC(t.$y,r,e):new Date(t.$y,r,e),t);return c?n:n.endOf(a)},h=function(e,r){return k.w(t.toDate()[e].apply(t.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(r)),t)},g=this.$W,w=this.$M,f=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case d:return c?p(1,0):p(31,11);case l:return c?p(1,w):p(0,w+1);case s:var y=this.$locale().weekStart||0,b=(g<y?g+7:g)-y;return p(c?f-b:f+(6-b),w);case a:case m:return h(v+"Hours",0);case o:return h(v+"Minutes",1);case i:return h(v+"Seconds",2);case n:return h(v+"Milliseconds",3);default:return this.clone()}},w.endOf=function(e){return this.startOf(e,!1)},w.$set=function(e,r){var s,c=k.p(e),u="set"+(this.$u?"UTC":""),p=(s={},s[a]=u+"Date",s[m]=u+"Date",s[l]=u+"Month",s[d]=u+"FullYear",s[o]=u+"Hours",s[i]=u+"Minutes",s[n]=u+"Seconds",s[t]=u+"Milliseconds",s)[c],h=c===a?this.$D+(r-this.$W):r;if(c===l||c===d){var g=this.clone().set(m,1);g.$d[p](h),g.init(),this.$d=g.set(m,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},w.set=function(e,r){return this.clone().$set(e,r)},w.get=function(e){return this[k.p(e)]()},w.add=function(t,c){var m,u=this;t=Number(t);var p=k.p(c),h=function(e){var r=S(u);return k.w(r.date(r.date()+Math.round(e*t)),u)};if(p===l)return this.set(l,this.$M+t);if(p===d)return this.set(d,this.$y+t);if(p===a)return h(1);if(p===s)return h(7);var g=(m={},m[i]=e,m[o]=r,m[n]=1e3,m)[p]||1,w=this.$d.getTime()+t*g;return k.w(w,this)},w.subtract=function(e,r){return this.add(-1*e,r)},w.format=function(e){var r=this,t=this.$locale();if(!this.isValid())return t.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=k.z(this),o=this.$H,a=this.$m,s=this.$M,l=t.weekdays,c=t.months,d=function(e,t,i,o){return e&&(e[t]||e(r,n))||i[t].slice(0,o)},m=function(e){return k.s(o%12||12,e,"0")},p=t.meridiem||function(e,r,t){var n=e<12?"AM":"PM";return t?n.toLowerCase():n};return n.replace(h,(function(e,n){return n||function(e){switch(e){case"YY":return String(r.$y).slice(-2);case"YYYY":return k.s(r.$y,4,"0");case"M":return s+1;case"MM":return k.s(s+1,2,"0");case"MMM":return d(t.monthsShort,s,c,3);case"MMMM":return d(c,s);case"D":return r.$D;case"DD":return k.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return d(t.weekdaysMin,r.$W,l,2);case"ddd":return d(t.weekdaysShort,r.$W,l,3);case"dddd":return l[r.$W];case"H":return String(o);case"HH":return k.s(o,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return p(o,a,!0);case"A":return p(o,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(r.$s);case"ss":return k.s(r.$s,2,"0");case"SSS":return k.s(r.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(t,m,u){var p,h=this,g=k.p(m),w=S(t),f=(w.utcOffset()-this.utcOffset())*e,v=this-w,y=function(){return k.m(h,w)};switch(g){case d:p=y()/12;break;case l:p=y();break;case c:p=y()/3;break;case s:p=(v-f)/6048e5;break;case a:p=(v-f)/864e5;break;case o:p=v/r;break;case i:p=v/e;break;case n:p=v/1e3;break;default:p=v}return u?p:k.a(p)},w.daysInMonth=function(){return this.endOf(l).$D},w.$locale=function(){return y[this.$L]},w.locale=function(e,r){if(!e)return this.$L;var t=this.clone(),n=P(e,r,!0);return n&&(t.$L=n),t},w.clone=function(){return k.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},g}(),E=C.prototype;return S.prototype=E,[["$ms",t],["$s",n],["$m",i],["$H",o],["$W",a],["$M",l],["$y",d],["$D",m]].forEach((function(e){E[e[1]]=function(r){return this.$g(r,e[0],e[1])}})),S.extend=function(e,r){return e.$i||(e(r,C,S),e.$i=!0),S},S.locale=P,S.isDayjs=x,S.unix=function(e){return S(1e3*e)},S.en=y[v],S.Ls=y,S.p={},S}();const v=f.exports,y=class{constructor(t){var n;e(this,t),this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"PROFILE_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"PROFILE_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:w("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:w(e,this.lang)}},window.location.href)},this.sendData=()=>{delete this.data.contacts,window.postMessage({type:"PROFILE_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"PROFILE_DATA":this.data=e.data.data,this.resetState(),this.skeletonLoading=!1;break;case"PROFILE_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=w(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e.player,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.initData=()=>{const e={};["externalPlayerId","affiliateMarker","personalInfo","communicationInfo","signupInfo","statusInfo","securityInfo","geographicInfo","playerInfo","contacts"].forEach((r=>e[r]=this.data[r])),this.data=e},this.updateState=(e,r)=>t=>{this.data[e][r]=t.target.value;const n=this.fieldsState.data[r],i=t.target.value,o=n.rule(i);o&&!n.isValid?(n.isValid=!0,this.invalidFields-=1):!o&&n.isValid&&(n.isValid=!1,this.invalidFields+=1),this.fieldsState.hasChanged=i!==n.initialValue;const a=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==a&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),t=new Headers;t.append("X-SessionId",this.session),t.append("Content-Type","application/problem+json; charset=utf-8"),this.data.contacts&&delete this.data.contacts;const n={method:"PUT",headers:t,body:JSON.stringify(this.data)};fetch(r,n).then((e=>this.handleFetchResponse(e))).then((()=>{this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))})).catch((e=>{console.error(e)}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&this.fieldsState.hasChanged},this.editableField=(e,t,n,i)=>{const o=this.fieldsState.data[t],a=this.data[e][t];return o?r("div",{class:"Field "+(o.isValid?"":"Invalid")},r("label",null,w(n,this.lang)),r("input",{type:"text",value:a,onKeyUp:this.updateState(e,t)}),!o.isValid&&r("p",{class:"Error"},w(i,this.lang))):null},this.staticField=(e,t)=>e?r("div",{class:"Field Disabled"},r("label",null,w(t,this.lang)),r("input",{type:"text",value:e,readonly:!0})):null,this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.dobFormat="DD/MM/YYYY",this.isStandAlone="true",this.limitStylingAppends=!1,this.skeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((n=window.navigator.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&i(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.skeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initEditableFieldsState(){var e,r;this.fieldsState.data={},this.fieldsState.hasChanged=!1,(null===(e=this.data.playerInfo)||void 0===e?void 0:e.SecurityQuestion)&&(this.fieldsState.data.SecurityQuestion=this.buildFieldState(!0,this.data.playerInfo.SecurityQuestion,(e=>e&&e.length<=120))),(null===(r=this.data.playerInfo)||void 0===r?void 0:r.SecurityAnswer)&&(this.fieldsState.data.SecurityAnswer=this.buildFieldState(!0,this.data.playerInfo.SecurityAnswer,(e=>e&&e.length<=120)))}resetState(){this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1}render(){return!this.skeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.skeletonLoading?r("form",{class:"PamPlayerProfileWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},[...Array(6).keys()].map((()=>r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})))),r("div",{class:"CompoundField"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"}))),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"auto",height:"20px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("form",{class:"PamPlayerProfileWrapper "+(this.isMobile?"Mobile":"")},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,w("title",this.lang))),r("h2",{class:"HeaderText"},w("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},this.staticField(this.data.contacts.find((e=>e.contatcType="Username")).contactValue,"username"),this.staticField(v(this.data.personalInfo.birthDate).format(this.dobFormat),"dateOfBirth"),this.staticField(this.data.personalInfo.firstName,"firstName"),this.staticField(this.data.personalInfo.lastName,"lastName"),this.editableField("playerInfo","SecurityQuestion","securityQuestion","securityQuestionError"),this.editableField("playerInfo","SecurityAnswer","securityAnswer","securityAnswerError"),r("div",{class:"CompoundField"},this.staticField(this.data.personalInfo.title,"playerTitle"),this.staticField(this.data.personalInfo.gender,"gender")),this.staticField(this.data.communicationInfo.currency,"currency"))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},w("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};y.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerProfileWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerProfileWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerProfileWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerProfileWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerProfileWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input:focus, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerProfileWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerProfileWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n height: 55px;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerProfileWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerProfileWrapper .HeaderText {\n display: none;\n }\n .PamPlayerProfileWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerProfileWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerProfileWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerProfileWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerProfileWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerProfileWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerProfileWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerProfileWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';const b=class{constructor(r){e(this,r),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,r){r!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return r("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return r("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,t)=>r("div",{key:t,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return r("div",{class:"SkeletonContainer"},r("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return r(t,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},r("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};b.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{l as pam_player_addresses,m as pam_player_contacts,h as pam_player_documents,y as pam_player_profile,b as ui_skeleton}