"use strict";(self.webpackChunkserver_side_rendering=self.webpackChunkserver_side_rendering||[]).push([[411],{81577:(e,t,i)=>{i.d(t,{j:()=>u});var o=i(4309),r=i(42998),n=i(55640),s=i(45965),a=i(77433),l=i(23550),c=i(57826);const d="phoneAttemptExpirationTime",p="phoneCurrentAttemptCounter",h="phoneLastNumber";let u=(()=>{class e{constructor(e,t,i){this.http=e,this.browserStorageService=t,this.siteConfigService=i}getPhoneValidationStatus(e){return this.http.get(this.getPhoneProfilingUrl(e)).pipe((0,r.catchError)((()=>(0,o.of)({phoneStatus:a.k.ERROR}))))}getPhoneProfilingUrl(t){return`${e.PROFILE_PROFILING_STATUS}/${t}`}updatePhoneAttempts(e){let t=this.hasPhoneExpirationTimeReached();return!!this.hasReachedMaxPhoneAttempts()||!(!e||e===this.getLastPhoneNumberAttempt())&&(this.incrementPhoneAttempt(),this.storePhoneNumberAttemptInLocalStorage(e),t&&this.setPhoneAttemptExpirationTimeInLocalStorage(e),!0)}hasReachedMaxPhoneAttempts(){return this.getCurrentAttempt()>=this.getMaxAttempts()}hasPhoneExpirationTimeReached(){let e=this.getExpirationTimeForPhoneAttempt();return!(e&&!(e&&Date.now()>e)||(this.clearPhoneAttemptsDataFromLocalStorage(),0))}clearPhoneAttemptsDataFromLocalStorage(){this.browserStorageService.remove(d),this.browserStorageService.remove(h),this.browserStorageService.remove(p)}setPhoneAttemptExpirationTimeInLocalStorage(e){let t=Date.now()+this.getPhoneExpirationTime();this.browserStorageService.set(d,t.toString())}incrementPhoneAttempt(){this.setCurrentAttempt(this.getCurrentAttempt()+1)}storePhoneNumberAttemptInLocalStorage(e){this.browserStorageService.set(h,e.toString())}getExpirationTimeForPhoneAttempt(){return parseInt(this.browserStorageService.get(d))||0}getMaxAttempts(){return this.siteConfigService.getSiteConfigProp("phoneJoinMaxPhoneAttempts")}getPhoneExpirationTime(){return 1e3*this.siteConfigService.getSiteConfigProp("phoneJoinExpirationTimeAttempts")}getLastPhoneNumberAttempt(){return this.browserStorageService.get(h)||"0"}getCurrentAttempt(){return parseInt(this.browserStorageService.get(p))||0}setCurrentAttempt(e){this.browserStorageService.set(p,e.toString())}}return e.PROFILE_PROFILING_STATUS="/services/profile-profiling/v1/phone-validation/phone-number",e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](l.HttpClient),c["ɵɵinject"](n.z),c["ɵɵinject"](s.r))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},77433:(e,t,i)=>{i.d(t,{k:()=>o});var o=(()=>(function(e){e.VALID="VALID",e.INVALID="INVALID",e.ERROR="ERROR"}(o||(o={})),o))()},59112:(e,t,i)=>{i.d(t,{F:()=>c});var o=i(12495),r=i(10693),n=i(4309),s=i(42998),a=i(23550),l=i(57826);class c{constructor(e){this.http=e}getLanguages(){let e=this.http.get(c.LANGUAGES_URL,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}getTimeZones(){let e=this.http.get(c.TIME_ZONES_URL,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}getCountries(){return this.http.get(c.COUNTRIES_URL,{withCredentials:!0}).pipe((0,s.map)((e=>r(o("name"))(e.items))),(0,s.catchError)((e=>(0,n.of)([]))))}getTimeZonesForThePlayer(){let e=this.http.get(c.TIME_ZONES_URL_FOR_PLAYER,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}handleBackendResponse(e,t){return e.pipe((0,s.map)(t),(0,s.catchError)((e=>(0,n.throwError)(e.error||"Internal Server Error"))))}}c.BASE_URL="/services/reference-data/v1",c.LANGUAGES_URL=`${c.BASE_URL}/languages`,c.TIME_ZONES_URL=`${c.BASE_URL}/time-zones`,c.COUNTRIES_URL=`${c.BASE_URL}/countries`,c.TIME_ZONES_URL_FOR_PLAYER="/services/web/v1/time-zones",c.ɵfac=function(e){return new(e||c)(l["ɵɵinject"](a.HttpClient))},c.ɵprov=l["ɵɵdefineInjectable"]({token:c,factory:c.ɵfac})},18042:(e,t,i)=>{i.d(t,{J:()=>o});const o=new(i(57826).InjectionToken)("OddsSelectorConfig")},51930:(e,t,i)=>{i.d(t,{U:()=>l,W:()=>a}),i(73753);var o=i(4309),r=i(42998),n=i(12596),s=i(57826);let a=(()=>{class e{constructor(e){this.translateService=e}resolve(e){let t=[];return this.categories.forEach((e=>{t.push(this.translateService.loadTranslations(e).pipe((0,r.take)(1)))})),(0,o.forkJoin)(t).pipe((0,r.map)((e=>{let t={};for(let i in this.categories)t[this.categories[i]]=e[i];return t})))}}return e.ɵfac=function(t){return new(t||e)(s["ɵɵinject"](n.s))},e.ɵprov=s["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();function l(e){return t=>class extends t{constructor(){super(...arguments),this.categories=e}}}},51595:(e,t,i)=>{i.d(t,{G:()=>l});var o=i(4309),r=i(42998),n=i(72243),s=i(21111),a=i(57826);let l=(()=>{class e{constructor(e){this.phoneStatusStore=e}getPhoneType(e=1e3,t=5){let i=0,s=n.y.PENDING;const a=function(){return s===n.y.PENDING&&i<t};let l=!1;return new o.Observable((t=>{(0,o.interval)(e).pipe((0,r.takeWhile)((()=>a())),(0,r.filter)((()=>!l)),(0,r.flatMap)((()=>(i++,l=!0,this.phoneStatusStore.getPhoneStatus())))).subscribe((e=>{l=!1,s=this.phoneTypeFromResponse(e),a()||t.next(s!==n.y.PENDING?s:n.y.VALID)}))}))}phoneTypeFromResponse(e){return e.phoneProfilingStatus?e.phoneProfilingStatus:n.y.VALID}}return e.ɵfac=function(t){return new(t||e)(a["ɵɵinject"](s.G))},e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},85845:(e,t,i)=>{i.d(t,{W:()=>o});class o{shouldBeRendered(e){return!0}}},61344:(e,t,i)=>{i.d(t,{A3:()=>me,AN:()=>J,A_:()=>Ae,Bb:()=>y,CS:()=>Pe,DL:()=>ee,Et:()=>ne,Fj:()=>L,GT:()=>F,Gk:()=>R,HV:()=>E,Hz:()=>x,IM:()=>oe,J$:()=>te,JR:()=>w,Jd:()=>s,L6:()=>Ce,Md:()=>n,O0:()=>ce,P_:()=>M,Pf:()=>fe,Qi:()=>b,Rp:()=>j,SB:()=>Y,Sk:()=>ae,Sz:()=>de,TC:()=>ue,TE:()=>ve,TH:()=>C,Tk:()=>xe,Ty:()=>pe,V:()=>p,Vo:()=>A,WC:()=>z,XL:()=>ie,XU:()=>$,XW:()=>B,Yy:()=>W,Z$:()=>O,ZY:()=>c,b7:()=>Ne,be:()=>m,c2:()=>le,c_:()=>r,ci:()=>T,du:()=>X,eT:()=>S,fc:()=>h,gP:()=>P,iY:()=>u,ix:()=>we,jQ:()=>D,jg:()=>a,kQ:()=>Ee,lg:()=>Te,mi:()=>q,ml:()=>se,nJ:()=>I,nk:()=>k,nr:()=>G,oi:()=>_,pb:()=>Fe,qC:()=>Z,sN:()=>d,sz:()=>v,ti:()=>f,uK:()=>Ie,uz:()=>ge,vd:()=>ye,yE:()=>V,yN:()=>l,zA:()=>re,zc:()=>g,zh:()=>be});var o=i(57826);const r="password",n=new o.InjectionToken(r),s="email",a=new o.InjectionToken(s),l="username",c=new o.InjectionToken(l),d="nickname",p=new o.InjectionToken(d),h="firstName",u=new o.InjectionToken(h),f="lastName",m=new o.InjectionToken(f),g="city",v=new o.InjectionToken(g),b="currency",C=new o.InjectionToken(b),S="currencyMbtcInfo",y="dateOfBirth",P=new o.InjectionToken(y),E="country",x=new o.InjectionToken(E),I="countrySelector",F=new o.InjectionToken(I),T="phone",w=new o.InjectionToken(T),N="phoneMasked",A=new o.InjectionToken(N),k="termsConditions",M="fourDigitPinCode",O=new o.InjectionToken(M),_="termsConditionsCheckbox",R=new o.InjectionToken(_),j="postalCode",G=new o.InjectionToken(j),U="referralEMail",D=new o.InjectionToken(U),L="addressLine",V=new o.InjectionToken(L),H="subdivision",B=new o.InjectionToken(H),z="passwordAffiliate",q=new o.InjectionToken(z),W="companyName",$=new o.InjectionToken(W),J="targetMarket",K=new o.InjectionToken(J),Y="targetMarketSelector",Z=new o.InjectionToken(Y),X="targetProduct",Q=new o.InjectionToken(X),ee="targetProductSelector",te=new o.InjectionToken(ee),ie="websiteUrl",oe=new o.InjectionToken(ie),re="instantMessageSelector",ne=new o.InjectionToken(re),se="language",ae=new o.InjectionToken(se),le="timeZone",ce=new o.InjectionToken(le),de="oddsFormat",pe=new o.InjectionToken(de),he="subscriptionChannels",ue=new o.InjectionToken(he),fe="wantHost",me=new o.InjectionToken(fe),ge="acceptsGifts",ve=new o.InjectionToken(ge),be="preferredContact",Ce=new o.InjectionToken(be),Se="title",ye=new o.InjectionToken(Se),Pe="frequency",Ee=new o.InjectionToken(Pe),xe="from",Ie=new o.InjectionToken(xe),Fe="to",Te=new o.InjectionToken(Fe),we="relatedAccount",Ne=new o.InjectionToken(we),Ae={[r]:n,[s]:a,[l]:c,[d]:p,[h]:u,[f]:m,[g]:v,[b]:C,[y]:P,[M]:O,[E]:x,[I]:F,[T]:w,[N]:A,[_]:R,[j]:G,[U]:D,[L]:V,[H]:B,[z]:q,[W]:$,[J]:K,[Y]:Z,[X]:Q,[ee]:te,[re]:ne,[ie]:oe,[se]:ae,[le]:ce,[de]:pe,[he]:ue,[we]:Ne,[fe]:me,[Se]:ye,[xe]:Ie,[Fe]:Te,[Pe]:Ee,[ge]:ve,[be]:Ce}},7239:(e,t,i)=>{i.d(t,{U:()=>d});var o=i(93144),r=i(82319),n=i(61344),s=i(92920),a=i(12473),l=i(16736);class c extends l.j{constructor(e){super(e),this.modelType="header",this.label=e.label,this.labelPrefix=e.labelPrefix,this.beforeOf=e.beforeOf}}class d{constructor(e,t){this.injector=e,this.deviceService=t,this._availableFields=n.A_}set availableFields(e){this._availableFields=e}formHasTwoColumns(e){return e.fields.some((e=>-1!==e.indexOf(",")))}generate(e,t,i){let r={},l={},d={},p=(e,t,o,n)=>{const s=this.returnKeyIfTitle(e),c=this.injector.get(this._availableFields[s]);if(c.shouldBeRendered(o)){const s=-1!=o.optionalFields.indexOf(e),p=this.renderFormElementComponent(c,t,s,o,i,e),h=this.applyCustomization(t,e,p,o,n);h.formElement&&(l=a(l,h.formElement.groupValidator),d=a(d,h.formElement.groupAsyncValidator)),this.shouldHaveFocus(n.position,h)&&this.setFocus(h.formElement),r[h.fieldId]=h.formElement}};const h=(t.fieldGroups||[]).map((e=>{const t=e.split("#");return{label:t[0],beforeOf:t[1]}}));let u=0;return t.fields.forEach((i=>{const o=i.split(","),s=h.filter((e=>e.beforeOf===o[0]))[0];s&&(r[s.label]=new c({id:s.label,label:s.label,beforeOf:s.beforeOf})),o.forEach(((i,r)=>{const s=this.returnKeyIfTitle(i);n.A_.hasOwnProperty(s)&&(p(i,e,t,{position:u,layoutClass:this.getLayoutClass(o,r)}),u++)}))})),new o.f({id:e,elements:r,validator:s(l)?void 0:l,asyncValidator:s(d)?void 0:d})}getLayoutClass(e,t){let i;return 1===e.length?i="field-alone":(i=0===t?"field-left":"field-right","empty"===e[(t+1)%2]&&(i+=" field-alone")),i}shouldHaveFocus(e,t){let i=0==e;return this.deviceService.isDesktop()&&i&&t.formElement instanceof r.b}setFocus(e){e.focused=!0}applyCustomization(e,t,i,o,r){return r&&r.layoutClass&&(i.layoutClass=(i.layoutClass||"")+" "+r.layoutClass),{fieldId:t,formElement:i}}renderFormElementComponent(e,t,i,o,r,n){return e.render(t,i,o,r,n)}returnKeyIfTitle(e){return e.includes("title:")?e.split(":")[0]:e}}},46080:(e,t,i)=>{i.d(t,{u:()=>l});var o=i(85845),r=i(82319),n=i(58960),s=i(21050),a=i(57826);let l=(()=>{class e extends o.W{render(t,i,o,n){let s=new r.b({disabled:this.isUsernameFieldDisabled(t,n),id:`${t}-${e.USERNAME}`,type:"text",label:"profileFields.username.label",validators:{minLength:6,maxLength:20,bxUsername:null},errorMessages:{minLength:"profileFields.username.error_minLength",maxLength:"profileFields.username.error_maxLength",bxUsername:"profileFields.username.error_bxUsername",alreadyTaken:"profileFields.username.error_alreadyTaken"}});return i||(s.validators.required=null,s.errorMessages.required="profileFields.username.error_required"),s}isUsernameFieldDisabled(e,t){return e==s.fh.formId?t&&!!t.username:e!=n.CY.formId}}return e.USERNAME="username",e.ɵfac=function(){let t;return function(i){return(t||(t=a["ɵɵgetInheritedFactory"](e)))(i||e)}}(),e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},44279:(e,t,i)=>{i.d(t,{p:()=>l});var o=i(61344),r=i(63253),n=i(81899),s=i(93883),a=i(57826);let l=(()=>{class e{constructor(e){this.windowService=e,this.AFFILIATE_METADATA_TYPE="affiliate",this.targetMarket=o.SB+"."+o.AN,this.targetProduct=o.DL+"."+o.du,this.METADATA_PATH_SEPARATOR=".",this.METADATA_FIELDS=[{type:this.AFFILIATE_METADATA_TYPE,mandatoryField:o.WC,fields:[o.Yy,o.XL,"password","targetMarket","termsConditions","targetProduct","instantMessage"],fieldsForm:[o.Yy,o.XL,o.WC,this.targetMarket,o.oi,this.targetProduct,o.zA]}]}fillMetadataFields(e){const t=this.getMetadataFieldsForm(e);t&&(e.metadata={type:t.type,content:{}},this.setAndCleanMetadataContent(t,e),this.mapInstantMessage(e))}getMetadataFieldsForm(e){const t=this.METADATA_FIELDS.filter((t=>void 0!==e[t.mandatoryField]));if(1===t.length)return t[0]}getMetadataFromURLParams(){const e=this.windowService.getUrlSearchParams().get(s.Rc);return e?{referringSiteToken:e}:{}}setAndCleanMetadataContent(e,t){e.fieldsForm.forEach(((i,o)=>{let r=e.fields[o];const n=this.getFieldFormValueMetadata(i,t);n&&(t.metadata.content[r]=n),delete t[this.getParentKeyFromKey(i)]})),t.metadata.content=Object.assign(t.metadata.content,this.getMetadataFromURLParams())}getFieldFormValueMetadata(e,t){return r(e.split(this.METADATA_PATH_SEPARATOR),t)}getParentKeyFromKey(e){return e.split(this.METADATA_PATH_SEPARATOR)[0]}mapInstantMessage(e){const t=e.metadata.content.instantMessage;t&&(t.usernameOrPhone?(e.metadata.content.instantMessage.username=t.usernameOrPhone,delete t.usernameOrPhone):""===t.usernameOrPhone&&delete t.usernameOrPhone)}}return e.ɵfac=function(t){return new(t||e)(a["ɵɵinject"](n.u))},e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},16301:(e,t,i)=>{i.d(t,{J:()=>c});var o=i(44960),r=i(86958),n=i(43431),s=i(4309),a=i(42998),l=i(57826);let c=(()=>{class e{constructor(e,t,i){this.marketingPageService=e,this.impressionHelper=t,this.cmsFeatureFlagService=i}resolve(){const e=this.getPresetFilter();return this.cmsFeatureFlagService.isFeatureEnabled(n.u.REGISTRATION_FORM_CONTENT_FF)?this.marketingPageService.getMarketingPageBySlug("join",null,{filter:e}).pipe((0,a.tap)((e=>this.impressionHelper.pageView(e))),(0,a.first)(),(0,a.catchError)((()=>(0,s.of)(null)))):(0,s.of)(null)}getPresetFilter(){}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](o.F),l["ɵɵinject"](r.P),l["ɵɵinject"](n.u))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},58960:(e,t,i)=>{i.d(t,{CY:()=>ee,hx:()=>Q});var o,r=i(64762),n=i(57826),s=i(40475),a=i(73753),l=i(13192),c=i(17990),d=i(25300),p=i(75330),h=i(3336),u=i(55640),f=i(77433),m=i(81577),g=i(45965),v=i(12596),b=i(86789),C=i(99576),S=i(25938),y=i(84245),P=i(93144),E=i(32711),x=i(4309),I=i(42998),F=i(61344),T=i(67943),w=i(46080),N=i(616),A=i(17879),k=i(10740),M=i(2562),O=i(6969),_=i(76580),R=i(6856),j=i(74195),G=i(86014),U=i(97241);const D=function(){return{tag:"textContent",label:"profileRegistration.duplicateSignupAttempted"}},L=function(e){return[e]};function V(e,t){1&e&&(n["ɵɵelementStart"](0,"figure",12),n["ɵɵtext"](1,"\n                "),n["ɵɵelement"](2,"i",13),n["ɵɵtext"](3,"\n                "),n["ɵɵelement"](4,"figcaption",14),n["ɵɵtext"](5,"\n            "),n["ɵɵelementEnd"]()),2&e&&(n["ɵɵadvance"](4),n["ɵɵproperty"]("bxTranslate",n["ɵɵpureFunction1"](2,L,n["ɵɵpureFunction0"](1,D))))}const H=function(e){return{referralName:e}},B=function(e){return{tag:"textContent",label:"profileRegistration.alert.referral",values:e}};function z(e,t){if(1&e&&(n["ɵɵelementStart"](0,"figure",15),n["ɵɵtext"](1,"\n                "),n["ɵɵelement"](2,"i",13),n["ɵɵtext"](3,"\n                "),n["ɵɵelement"](4,"figcaption",14),n["ɵɵtext"](5,"\n            "),n["ɵɵelementEnd"]()),2&e){const e=n["ɵɵnextContext"](2);n["ɵɵadvance"](4),n["ɵɵproperty"]("bxTranslate",n["ɵɵpureFunction1"](5,L,n["ɵɵpureFunction1"](3,B,n["ɵɵpureFunction1"](1,H,e.referralName))))}}function q(e,t){1&e&&(n["ɵɵelementStart"](0,"figure",16),n["ɵɵtext"](1,"\n                    "),n["ɵɵelement"](2,"i",17),n["ɵɵtext"](3,"\n                    "),n["ɵɵelementStart"](4,"figcaption",18),n["ɵɵtext"](5,"\n                        profileRegistration.message.phone.invalid\n                    "),n["ɵɵelementEnd"](),n["ɵɵtext"](6,"\n                "),n["ɵɵelementEnd"]())}const W=function(){return["/terms-of-service"]};function $(e,t){1&e&&(n["ɵɵelementStart"](0,"div",19),n["ɵɵtext"](1,"\n                    "),n["ɵɵelementStart"](2,"span",14),n["ɵɵtext"](3,"profileRegistration.terms.beforeLink"),n["ɵɵelementEnd"](),n["ɵɵtext"](4,"\n                    "),n["ɵɵelementStart"](5,"span"),n["ɵɵtext"](6,"\n                        "),n["ɵɵelementStart"](7,"a",20),n["ɵɵtext"](8,"\n                            profileRegistration.terms.link\n                        "),n["ɵɵelementEnd"](),n["ɵɵtext"](9,"\n                    "),n["ɵɵelementEnd"](),n["ɵɵtext"](10,"\n                    "),n["ɵɵelementStart"](11,"span",14),n["ɵɵtext"](12,"profileRegistration.terms.afterLink"),n["ɵɵelementEnd"](),n["ɵɵtext"](13,"\n                "),n["ɵɵelementEnd"]()),2&e&&(n["ɵɵadvance"](7),n["ɵɵproperty"]("routerLink",n["ɵɵpureFunction0"](1,W)))}function J(e,t){1&e&&(n["ɵɵelementStart"](0,"figure",21),n["ɵɵtext"](1,"\n                        "),n["ɵɵelement"](2,"i",22),n["ɵɵtext"](3,"\n                    "),n["ɵɵelementEnd"]())}function K(e,t){1&e&&(n["ɵɵelementStart"](0,"span",14),n["ɵɵtext"](1,"\n                            profileRegistration.submit.phone.invalid.label\n                        "),n["ɵɵelementEnd"]())}function Y(e,t){1&e&&(n["ɵɵelementStart"](0,"span",14),n["ɵɵtext"](1,"\n                            profileRegistration.submit.label\n                        "),n["ɵɵelementEnd"]())}const Z=function(e){return{"two-columns":e}};function X(e,t){if(1&e){const e=n["ɵɵgetCurrentView"]();n["ɵɵelementStart"](0,"div",1),n["ɵɵtext"](1,"\n            "),n["ɵɵtemplate"](2,V,6,4,"figure",2),n["ɵɵtext"](3,"\n            "),n["ɵɵtemplate"](4,z,6,7,"figure",3),n["ɵɵtext"](5,"\n            "),n["ɵɵelementStart"](6,"form",4),n["ɵɵlistener"]("ngSubmit",(function(){return n["ɵɵrestoreView"](e),n["ɵɵnextContext"]().submit()})),n["ɵɵtext"](7,"\n                "),n["ɵɵtemplate"](8,q,7,0,"figure",5),n["ɵɵtext"](9,"\n                "),n["ɵɵelementStart"](10,"bx-form-group",6),n["ɵɵpipe"](11,"bxTranslationKeys"),n["ɵɵtext"](12,"\n                "),n["ɵɵelementEnd"](),n["ɵɵtext"](13,"\n                "),n["ɵɵtemplate"](14,$,14,2,"div",7),n["ɵɵtext"](15,"\n                "),n["ɵɵelementStart"](16,"div",8),n["ɵɵtext"](17,"\n                    "),n["ɵɵtemplate"](18,J,4,0,"figure",9),n["ɵɵtext"](19,"\n                    "),n["ɵɵelementStart"](20,"button",10),n["ɵɵtext"](21,"\n                        "),n["ɵɵtemplate"](22,K,2,0,"span",11),n["ɵɵtext"](23,"\n                        "),n["ɵɵtemplate"](24,Y,2,0,"span",11),n["ɵɵtext"](25,"\n                    "),n["ɵɵelementEnd"](),n["ɵɵtext"](26,"\n                "),n["ɵɵelementEnd"](),n["ɵɵtext"](27,"\n            "),n["ɵɵelementEnd"](),n["ɵɵtext"](28,"\n        "),n["ɵɵelementEnd"]()}if(2&e){const e=n["ɵɵnextContext"]();n["ɵɵadvance"](2),n["ɵɵproperty"]("ngIf",e.duplicateSignupAttempted),n["ɵɵadvance"](2),n["ɵɵproperty"]("ngIf",e.referralName),n["ɵɵadvance"](2),n["ɵɵproperty"]("formGroup",e.formGroup)("ngClass",n["ɵɵpureFunction1"](17,Z,e.formHasTwoColumns)),n["ɵɵadvance"](2),n["ɵɵproperty"]("ngIf",e.isPhoneInvalid),n["ɵɵadvance"](2),n["ɵɵproperty"]("model",n["ɵɵpipeBind2"](11,14,e.formModel,"profileRegistration"))("controlGroup",e.formGroup),n["ɵɵadvance"](4),n["ɵɵproperty"]("ngIf",e.existTermsConditions),n["ɵɵadvance"](4),n["ɵɵproperty"]("ngIf",e.processingCall&&e.phoneTypeValidationEnabled),n["ɵɵadvance"](2),n["ɵɵclassProp"]("full-opacity",e.registrationConfig.joinButtonFullOpacity),n["ɵɵproperty"]("disabled",e.processingCall),n["ɵɵadvance"](2),n["ɵɵproperty"]("ngIf",e.isPhoneInvalid),n["ɵɵadvance"](2),n["ɵɵproperty"]("ngIf",!e.isPhoneInvalid)}}const Q="phoneTypeValidationEnabled";let ee=o=class{constructor(e,t,i,o,r,n,s,a,l,c,d,p,h,u,f,m,g,v,b,C){this.formService=e,this.formBuilder=t,this.registrationService=i,this.translateService=o,this.toastNotificationService=r,this.analyticsService=n,this.deviceProtectService=s,this.profileRegistrationFormGeneratorService=a,this.profileRegistrationFormMapper=l,this.registrationConfig=d,this.siteConfigService=p,this.profileFormService=h,this.profileStore=u,this.overlay=f,this.storageService=m,this.affiliateService=g,this.phoneValidationService=b,this.changeDetectorRef=C,this.CUSTOMERID_KEY="customerId",this.formConfiguration$=new x.ReplaySubject(1),this.formModel=new P.f({id:"",elements:{}}),this.processingCall=!1,this.duplicateSignupAttempted=!1,this.formIteractionSent=!1,this.errorProcessed=!1,this.isPhoneInvalid=!1,this.phoneTypeValidationEnabled=!1,this.publishNotification=e=>this.toastNotificationService.add(e),this.closeNotification=()=>this.toastNotificationService.close(),this.toLoadingNotification=e=>this.toNotification("loading",e,0,2e3),v.resolve(c).subscribe((({registration:e,referral:t})=>{const i=e.formConfiguration;if(t){let e=t.referralData;e&&(this.referralName=e.firstName?e.firstName:e.username,i.referrerEmail=e.email)}this.formConfiguration$.next(i)})),this.postCFUrl=c.snapshot.data.postCFUrl}ngOnInit(){this.formConfiguration$.subscribe((e=>{this.formGroup=this.formBuilder.group({}),this.existTermsConditions=this.checkTermsConditions(e),this.phoneTypeValidationEnabled=this.siteConfigService.getSiteConfigProp(Q),this.phoneTypeValidationTimeout=this.siteConfigService.getSiteConfigProp("phoneTypeValidationTimeout"),this.generateForm(e),this.checkColumnsInForm(e),this.enabledBonusSelection=this.siteConfigService.getSiteConfigProp("bonusSelectionCfEnabled"),this.enabledDeferredMsg=this.siteConfigService.getSiteConfigProp("conversionFunnelDeferredMsgEnabled"),this.profileFormService.getRefreshFormEvent().subscribe((e=>{this.refreshForm(e)})),this.deviceProtectService.generateBlackBox(),this.phoneTypeValidationEnabled&&this.forcePhoneNumberIfMaxAttemptReached()}))}ngOnDestroy(){this.retrievePhoneValidationStatus&&this.retrievePhoneValidationStatus.unsubscribe()}ngAfterViewInit(){}submit(){if(this.track("user_click_submit"),this.formGroup.valid){if(this.processingCall)return;this.processingCall=!0,this.formService.formDataTrim(this.formGroup.value);let e=this.phoneTypeValidationEnabled&&this.phoneValidationService.hasReachedMaxPhoneAttempts();e&&this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1});let t=this.profileRegistrationFormMapper.toSignupRequest(this.formGroup.value,this.deviceProtectService.getBlackBox());e&&this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1}),this.enabledBonusSelection||this.publishLoadingNotification(),this.registrationService.createProfile(t).subscribe((e=>{e.sessionId?(this.disposer=(0,E.gx)((()=>!!this.profileStore.profile.accountNumber),(()=>{this.track("success_pageview"),this.dispose(),this.storageService.set(this.CUSTOMERID_KEY,this.profileStore.profile.accountNumber)})),this.affiliateService.removeAffiliateReferringCookies(),this.phoneValidationService.clearPhoneAttemptsDataFromLocalStorage(),this.publishRegistrationSuccess(e.sessionId,t.nickname||t.email)):this.enabledDeferredMsg?(this.registrationService.sendDuplicatedEmailEvent(),this.closeNotification()):(this.publishRegistrationDeferred(),this.closeDialog())}),(e=>{this.publishRegistrationFailure(e),this.errorProcessed?this.errorProcessed=!1:this.trackError(e)}))}else this.markAsTouched(this.formGroup),this.publishInvalidFormFailure(),this.trackError({message:"form validation error"})}refreshForm(e){let t=this.formGroup.value;this.existTermsConditions=this.checkTermsConditions(e),this.generateForm(e),setTimeout((()=>{Object.keys(t).forEach((e=>{this.formGroup.controls[e]&&this.formGroup.controls[e].patchValue(t[e])}))}))}publishLoadingNotification(){this.translateService.translate("profileRegistration.loading_message").pipe((0,I.map)(this.toLoadingNotification)).subscribe((e=>this.publishNotification(e)))}publishRegistrationSuccess(e,t){this.translateService.translate("profileRegistration.success_message",{name:t}).pipe((0,I.map)(this.toSuccessNotification(e))).subscribe((e=>this.publishNotification(e)))}publishRegistrationDeferred(){this.translateService.translate("profileRegistration.deferred_message").pipe((0,I.map)(this.toDeferredNotification())).subscribe((e=>this.publishNotification(e)))}checkTermsConditions(e){return this.existTermsConditions=Array.isArray(e.fields)&&e.fields.indexOf(F.nk)>=0}publishRegistrationFailure(e){let t=e.status,i=e.error;404===t&&"RELATED_PROFILE_ID_NOT_FOUND"===i.errorCode?(this.formGroup.controls.relatedAccount.setErrors({notFoundRelatedAccount:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):409===t&&"DUPLICATE_SIGNUP_ATTEMPTED"===i.errorCode?(this.duplicateSignupAttempted=!0,this.processingCall=!1,this.closeNotification()):409===t&&"PROFILE_ALREADY_EXISTS"===i.errorCode&&i.message==="duplicated_"+w.u.USERNAME?(this.formGroup.controls[w.u.USERNAME].setErrors({alreadyTaken:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):409===t&&"DUPLICATED_PHONE"===i.errorCode?(this.formGroup.controls.phone.controls.phoneNumber.setErrors({phoneDuplicated:!0}),this.markAsTouched(this.formGroup),this.trackError({message:"phone_number_is_already_associated_with_another_account"}),this.errorProcessed=!0,this.processingCall=!1,this.closeNotification()):412===t&&"RELATED_PROFILE_ID_INVALID"===i.errorCode?(this.formGroup.controls.relatedAccount.setErrors({duplicatedAssociation:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):412===t&&"PRECONDITION_FAILED"===i.errorCode?(this.formGroup.controls.instantMessageSelector.controls.username.setErrors({pattern:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):this.translateService.translate("profileRegistration.error_message").pipe((0,I.map)(this.toErrorNotification())).subscribe((e=>this.publishNotification(e)))}publishInvalidFormFailure(){this.translateService.translate("profileRegistration.error_message_invalid").pipe((0,I.map)(this.toErrorNotification())).subscribe((e=>this.publishNotification(e)))}toErrorNotification(){return e=>{let t=this.toNotification("error",e);return t.onRemove=()=>{this.processingCall=!1},t}}toSuccessNotification(e){return t=>{let i=this.toNotification("success",t);return this.publishRegistrationEvent(e),i.onRemove=()=>{this.processingCall=!1},i}}toDeferredNotification(){return e=>{let t=this.toNotification("success",e);return t.onRemove=()=>{this.processingCall=!1},t}}toNotification(e,t,i=3e3,o=0){return{msg:t,modal:!0,type:e,timeout:i,delay:o}}publishRegistrationEvent(e){this.registrationService.publishRegistrationEvent(new O.Yc(e,this.postCFUrl))}markAsTouched(e){e instanceof s.FormGroup||e instanceof s.FormArray?Object.keys(e.controls).map((t=>this.markAsTouched(e.get(t)))):e.markAsTouched()}track(e){this.analyticsService.sendEvent("pageUpdate",this.formModel.id+":"+e.toString(),!0,null)}trackError(e){let t={1:e.message||e.toString()};this.analyticsService.sendEvent("click",this.formModel.id+"_error",!0,t,{contentId:this.formModel.id+":error"})}generateForm(e){e.phoneTypeValidationEnabled=this.phoneTypeValidationEnabled;let t=this.profileRegistrationFormGeneratorService.generate(o.formId,e);this.formGroup=this.formService.createFormControl(t),this.formModel=t,this.formGroup.valueChanges.subscribe((()=>{this.formGroup.touched&&!this.formIteractionSent&&(this.formIteractionSent=!0,this.track("form_interaction"))})),this.phoneTypeValidationEnabled&&this.checkPhoneValidation()}checkColumnsInForm(e){this.formHasTwoColumns=this.profileRegistrationFormGeneratorService.formHasTwoColumns(e)}dispose(){this.disposer&&this.disposer()}closeDialog(){this.overlay.closeOverlay()}checkPhoneValidation(){this.formGroup.controls.phone&&this.formGroup.controls.phone.statusChanges.subscribe((e=>{let t=this.formGroup.controls.phone.value.phoneNumber;if(!this.processingCall&&"VALID"===e&&this.phoneValidationService.updatePhoneAttempts(t)){this.processingCall=!0,this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1});let e=setTimeout((()=>{this.processingCall=!1,this.enablePhoneNumberWhenMaxAttemptHasBeenReached()}),this.phoneTypeValidationTimeout);this.retrievePhoneValidationStatus&&this.retrievePhoneValidationStatus.unsubscribe(),this.retrievePhoneValidationStatus=this.phoneValidationService.getPhoneValidationStatus(this.formGroup.controls.phone.value.phoneNumber).pipe((0,I.take)(1)).subscribe((t=>{clearTimeout(e),this.processingCall=!1,this.enablePhoneNumberWhenMaxAttemptHasBeenReached(),this.isPhoneInvalid=t.phoneStatus===f.k.INVALID,this.storageService.set("phoneStatus",t.phoneStatus)}))}}))}forcePhoneNumberIfMaxAttemptReached(){!this.phoneValidationService.hasPhoneExpirationTimeReached()&&this.phoneValidationService.hasReachedMaxPhoneAttempts()&&(this.changeDetectorRef.detectChanges(),this.formGroup.get("phone.phoneNumber").patchValue(this.phoneValidationService.getLastPhoneNumberAttempt()),this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1}),this.enablePhoneNumberAfterExpirationTime())}enablePhoneNumberAfterExpirationTime(){setTimeout((()=>{this.phoneValidationService.clearPhoneAttemptsDataFromLocalStorage(),this.formGroup.get("phone.phoneNumber").patchValue(""),this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1}),this.changeDetectorRef.detectChanges()}),this.phoneValidationService.getPhoneExpirationTime())}enablePhoneNumberWhenMaxAttemptHasBeenReached(){this.phoneValidationService.hasReachedMaxPhoneAttempts()?this.enablePhoneNumberAfterExpirationTime():this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1})}};ee.formId="registration",ee.ɵfac=function(e){return new(e||ee)(n["ɵɵdirectiveInject"](y.o),n["ɵɵdirectiveInject"](s.FormBuilder),n["ɵɵdirectiveInject"](O.H8),n["ɵɵdirectiveInject"](v.s),n["ɵɵdirectiveInject"](C.i),n["ɵɵdirectiveInject"](h.y),n["ɵɵdirectiveInject"](S.Xp),n["ɵɵdirectiveInject"](A.N),n["ɵɵdirectiveInject"](k.c),n["ɵɵdirectiveInject"](a.ActivatedRoute),n["ɵɵdirectiveInject"](_.M),n["ɵɵdirectiveInject"](g.r),n["ɵɵdirectiveInject"](T.m),n["ɵɵdirectiveInject"](N.s),n["ɵɵdirectiveInject"](b.Bs),n["ɵɵdirectiveInject"](u.z),n["ɵɵdirectiveInject"](l.Cw),n["ɵɵdirectiveInject"](M.E),n["ɵɵdirectiveInject"](m.j),n["ɵɵdirectiveInject"](n.ChangeDetectorRef))},ee.ɵcmp=n["ɵɵdefineComponent"]({type:ee,selectors:[["bx-profile-registration-form"]],decls:3,vars:1,consts:[["class","registration",4,"ngIf"],[1,"registration"],["class","custom-notification alert info",4,"ngIf"],["role","alert","class","raf custom-notification alert info high-contrast",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],["class","custom-notification alert warning",4,"ngIf"],[3,"model","controlGroup"],["class","footnote",4,"ngIf"],[1,"full-width-ctas"],["class","loading-spinner",4,"ngIf"],["type","submit","id","registration-submit",1,"custom-cta","primary","cta-large",3,"disabled"],[3,"bxTranslate",4,"ngIf"],[1,"custom-notification","alert","info"],[1,"icon","icon-info"],[3,"bxTranslate"],["role","alert",1,"raf","custom-notification","alert","info","high-contrast"],[1,"custom-notification","alert","warning"],[1,"icon","icon-warning"],[1,"bx-truncate",3,"bxTranslate"],[1,"footnote"],[1,"custom-link",3,"routerLink","bxTranslate"],[1,"loading-spinner"],[1,"icon","icon-loading"]],template:function(e,t){1&e&&(n["ɵɵtext"](0,"\n        "),n["ɵɵtemplate"](1,X,29,19,"div",0),n["ɵɵtext"](2,"\n    ")),2&e&&(n["ɵɵadvance"](1),n["ɵɵproperty"]("ngIf",t.formGroup))},directives:[R.NgIf,s["ɵNgNoValidate"],s.NgControlStatusGroup,s.FormGroupDirective,R.NgClass,j.E,G.P,a.RouterLinkWithHref],pipes:[U.o],styles:["[_nghost-%COMP%]     .registration h2.h2-heading {\n  padding-top: .875rem;\n  padding-bottom: .5rem; }\n\n[_nghost-%COMP%]     .registration .field-alone {\n  display: block;\n  clear: both; }\n\n[_nghost-%COMP%]     .registration .field-left, [_nghost-%COMP%]     .registration .field-right {\n  display: block;\n  float: left;\n  width: calc(50% - 10px); }\n\n[_nghost-%COMP%]     .registration .field-left label, [_nghost-%COMP%]     .registration .field-right label {\n    white-space: nowrap;\n    overflow: hidden; }\n\n[_nghost-%COMP%]     .registration .field-left {\n  margin-right: 10px;\n  clear: left; }\n\n[_nghost-%COMP%]     .registration .field-right {\n  margin-left: 10px;\n  clear: right; }\n\n[_nghost-%COMP%]     .registration .field-right.field-alone {\n    margin-left: calc(50% + 10px); }\n\n[_nghost-%COMP%]     .registration .field-alone {\n  clear: both; }\n\n[_nghost-%COMP%]     .registration .phone-group.field-right .phone-number, [_nghost-%COMP%]     .registration .phone-group.field-left .phone-number {\n  margin-left: 50px; }\n\n[_nghost-%COMP%]     .registration .phone-invalid {\n  font-weight: bold;\n  color: red; }\n\n[_nghost-%COMP%]     .registration .custom-notification.alert.warning {\n  margin-bottom: 2em; }\n\n[_nghost-%COMP%]     .registration .loading-spinner {\n  margin-bottom: 1em; }"]}),(0,r.__decorate)([(0,p.uh)("registration:form_view",!0),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[]),(0,r.__metadata)("design:returntype",void 0)],ee.prototype,"ngAfterViewInit",null),ee=o=(0,r.__decorate)([(0,c.DE)({name:"Profile Registration form Functional Placeholder",matcher:e=>e.contentType===d.z.FUNCTIONAL&&e.fields.tags&&e.fields.tags.split(",").indexOf("joinform")>=0}),(0,r.__metadata)("design:paramtypes",[y.o,s.FormBuilder,O.H8,v.s,C.i,h.y,S.Xp,A.N,k.c,a.ActivatedRoute,_.M,g.r,T.m,N.s,b.Bs,u.z,l.Cw,M.E,m.j,n.ChangeDetectorRef])],ee)},17879:(e,t,i)=>{i.d(t,{N:()=>d});var o=i(57826),r=i(10323),n=i(30173),s=i(7239),a=i(61344),l=i(76580),c=i(82319);let d=(()=>{class e extends s.U{constructor(e,t,i){super(e,t),this.injector=e,this.deviceService=t,this.registrationConfig=i}applyCustomization(e,t,i,o,n){switch(t){case a.sN:let s=new r.R({id:`${e}-nameFieldSet`,layoutClass:"formFieldset",legendClass:this.registrationConfig.hideLegend?"hidden":"formLegend",elements:{}});return s.elements[t]=i,{fieldId:"nameFieldSet",formElement:s};case a.ci:let l=i;return this.registrationConfig.transparentPhonePrefix&&(l.elements.phonePrefix.layoutClass+=" transparent-background"),o.phoneValidationEnabled&&(l.elements.phoneNumber.info="profileFields.phone.duplicated_msg"),n&&(l.layoutClass+=" "+n.layoutClass),o.phoneTypeValidationEnabled&&l.elements.phoneNumber instanceof c.b&&(l.elements.phoneNumber.updateOn="blur"),{fieldId:t,formElement:l};default:return super.applyCustomization(e,t,i,o,n)}}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](o.Injector),o["ɵɵinject"](n.U),o["ɵɵinject"](l.M))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},10740:(e,t,i)=>{i.d(t,{c:()=>c});var o=i(10599),r=i(61344),n=i(24426),s=i(85898),a=i(44279),l=i(57826);let c=(()=>{class e{constructor(e,t){this.profileDateService=e,this.metadataMapperService=t,this.phoneNumber="phoneNumber",this.postalCode="postalCode",this.city="city",this.subdivision="subdivision"}toSignupRequest(e,t){let i=n(e);if(i[r.c_]&&(i.security={password:i[r.c_]},delete i[r.c_]),i[r.Bb]&&(i.birthdate=this.profileDateService.parseDateToBackend(i[r.Bb]),delete i[r.Bb]),i.attributes=new o.m(""),i[r.Qi]&&(i.attributes.currency=i[r.Qi].currency,delete i[r.Qi]),i[r.P_]&&(i.attributes.pin_code=i[r.P_],delete i[r.P_]),i[r.HV]&&delete i[r.HV],i[r.ci]){let e=i[r.ci][this.phoneNumber];i[r.ci]=e}return i[r.Rp]&&(i.address={postalCode:i[r.Rp][this.postalCode]},i[r.Rp][this.city]&&(i.address.city=i[r.Rp][this.city]),i[r.Rp][this.subdivision]&&(i.address.subdivision=i[r.Rp][this.subdivision]),delete i[r.Rp]),i[r.Fj]&&(i.address||(i.address={}),i.address.addressLine=i[r.Fj],delete i[r.Fj]),i[r.nJ]&&(i.address||(i.address={}),i.address.countryCode=i[r.nJ].country,delete i[r.nJ]),t&&(i.encodedBlackBox=t),this.metadataMapperService.fillMetadataFields(i),i[r.oi]&&delete i[r.oi],i[r.ix]&&(i.sourceProfileId=i[r.ix],delete i[r.ix]),i}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](s.f),l["ɵɵinject"](a.p))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},56521:(e,t,i)=>{i.d(t,{X:()=>d}),i(73753);var o=i(31793),r=i(3336),n=i(55640),s=i(45965),a=i(42998),l=i(67943),c=i(57826);let d=(()=>{class e{constructor(e,t,i,o){this.profileFormService=e,this.siteConfigService=t,this.browserStorageService=i,this.analyticsService=o}resolve(e){return this.profileFormService.loadRegistrationForm().pipe((0,a.map)((e=>(this.isDefined(e.bonusSelectionCfEnabled)&&(this.siteConfigService.setBonusSelectionCfEnabled(e.bonusSelectionCfEnabled),this.browserStorageService.set(o.HE,String(e.bonusSelectionCfEnabled))),e.abtStudies&&(this.browserStorageService.set(o.be,JSON.stringify(e.abtStudies)),this.analyticsService.updateAbtStudy()),{formConfiguration:e}))))}isDefined(e){return void 0!==e}}return e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](l.m),c["ɵɵinject"](s.r),c["ɵɵinject"](n.z),c["ɵɵinject"](r.y))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},93887:(e,t,i)=>{i.d(t,{S:()=>s});var o=i(64762),r=i(51930),n=i(57826);let s=class extends r.W{};s.ɵfac=function(){let e;return function(t){return(e||(e=n["ɵɵgetInheritedFactory"](s)))(t||s)}}(),s.ɵprov=n["ɵɵdefineInjectable"]({token:s,factory:s.ɵfac}),s=(0,o.__decorate)([(0,r.U)(["profileFields","profileRegistration","countries"])],s)},2562:(e,t,i)=>{i.d(t,{E:()=>d});var o=i(4309),r=i(42998),n=i(16301),s=i(56521),a=i(93887),l=i(34827),c=i(57826);let d=(()=>{class e{constructor(e,t,i,o){this.profileRegistrationFormResolver=e,this.referrerEmailFieldResolver=t,this.profileRegistrationFormTranslationsResolver=i,this.profileRegistrationContentResolver=o}resolve(e){const{registration:t,referral:i,registrationFormTranslations:n,registrationMarketingPage:s}=e.snapshot.data;return(0,o.forkJoin)({registration:this.resolveIfUndefined(t,(()=>this.profileRegistrationFormResolver.resolve(e.snapshot))),referral:this.resolveIfUndefined(i,(()=>this.referrerEmailFieldResolver.resolve(e.snapshot))),registrationFormTranslations:this.resolveIfUndefined(n,(()=>this.profileRegistrationFormTranslationsResolver.resolve(e.snapshot))),registrationMarketingPage:this.resolveIfUndefined(s,(()=>this.profileRegistrationContentResolver.resolve()))}).pipe((0,r.map)(Object.assign.bind(null,e.snapshot.data)))}resolveIfUndefined(e,t){return void 0===e?t():(0,o.of)(e)}}return e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](s.X),c["ɵɵinject"](l.w),c["ɵɵinject"](a.S),c["ɵɵinject"](n.J))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},34827:(e,t,i)=>{i.d(t,{w:()=>p});var o=i(73753),r=i(4309),n=i(42998),s=i(66362),a=i(92116),l=i(55640),c=i(45965),d=i(57826);let p=(()=>{class e{constructor(e,t,i,o){this.referralService=e,this.browserStorageService=t,this.siteConfigService=i,this.router=o}resolve(e){let t=this.browserStorageService.get(a.EI);return t?this.referralService.getEmailFromTrackingCode(t).pipe((0,n.map)((e=>this.storeReferralAffiliateTypeKey(t,e))),(0,n.catchError)((e=>(this.markAsAffiliateIfCodeIsNotRaf(t),(0,r.of)(null))))):(0,r.of)(null)}storeReferralAffiliateTypeKey(e,t){return t?this.siteConfigService.evalFeature(a.AB)?(this.browserStorageService.set(a.HM,a.g3),{referralData:t}):void this.router.navigate([a.wF]):(this.markAsAffiliateIfCodeIsNotRaf(e),null)}markAsAffiliateIfCodeIsNotRaf(e){this.isRafSharingMethod()||this.isTrackingCodeWithRafFormat(e)||this.browserStorageService.set(a.HM,a.as)}isRafSharingMethod(){const e=this.browserStorageService.get(a.jj);return e&&e.startsWith("raf")}isTrackingCodeWithRafFormat(e){return e&&e.startsWith("P")&&e.length<10}}return e.ɵfac=function(t){return new(t||e)(d["ɵɵinject"](s.C),d["ɵɵinject"](l.z),d["ɵɵinject"](c.r),d["ɵɵinject"](o.Router))},e.ɵprov=d["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},14442:(e,t,i)=>{i.d(t,{z:()=>a});var o=i(45965),r=i(18042),n=i(57826);const s="SPORTS";let a=(()=>{class e{constructor(e,t){this.siteConfigService=e,this.oddsSelectorService=t,this.initSportsEnabled()}initSportsEnabled(){const e=[].concat(this.siteConfigService.getSiteConfigProp("products")),t=[].concat(this.siteConfigService.getSiteConfigProp("disabledMultiproducts"));this.isSportsEnabled=e.includes(s)&&!t.includes(s)}getSelectedFormat(){return this.oddsSelectorService.selectedOddFormat}getOddsFormats(){return this.oddsSelectorService.getOddsFormats()}showOddsFormat(){return!!this.oddsSelectorService&&this.isSportsEnabled}saveOddsFormat(e){this.oddsSelectorService.saveOddsFormat(e)}}return e.ɵfac=function(t){return new(t||e)(n["ɵɵinject"](o.r),n["ɵɵinject"](r.J,8))},e.ɵprov=n["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},21050:(e,t,i)=>{i.d(t,{fh:()=>Se});var o=i(57826),r=i(40475),n=i(73753),s=i(91549),a=i(76771),l=i(47975),c=i(48108),d=i(59112),p=i(45965),h=i(12596),u=i(72558),f=i(23146),m=i(55240),g=i(24426),v=i(11607),b=i(65299),C=i(84956),S=i(91886),y=i(12495),P=i(10693),E=i(60703),x=i(4309),I=i(42998),F=i(79611),T=i(9914),w=i(72243),N=i(51595),A=i(21111),k=i(61344),M=i(92947),O=i(616),_=i(25799),R=i(85747),j=i(14442),G=i(28084),U=i(29195),D=i(27232),L=i(80493),V=i(33704);const H=["Not selected","Anytime","Daily","Weekly","Fortnightly","Monthly","No Contact"];var B=i(81899),z=i(58447),q=i(6856),W=i(74195),$=i(86014),J=i(65904),K=i(22646),Y=i(17505),Z=i(97637),X=i(84853),Q=i(38458),ee=i(1890),te=i(99576);function ie(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"div",8),o["ɵɵtext"](1,"\n                    "),o["ɵɵelementStart"](2,"bx-pin-code",9),o["ɵɵlistener"]("amountOfDigitsEntered",(function(t){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().onPinCodeInputChanged(t)})),o["ɵɵtext"](3,"\n                    "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n                "),o["ɵɵelementEnd"]()}if(2&e){const e=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵproperty"]("errorMessage",e.pinCodeFieldErrorMessage)("hidePinCodeEye",e.pinCodeOperationConfig.hidePinCodeEye)("alwaysShowPinCode",e.pinCodeOperationConfig.alwaysShowPinCode)("showPinCodeLegend",e.pinCodeOperationConfig.showPinCodeLegend)("showPinCodeInfoTooltip",e.pinCodeOperationConfig.showPinCodeInfoTooltip)("fieldLabel","pinCodeOperations.overlay.updateProfile.actual.pin")}}const oe=function(e){return{attempts:e}},re=function(e,t){return{tag:"textContent",label:e,values:t}};function ne(e,t){if(1&e&&(o["ɵɵelementStart"](0,"div",10),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"p",11),o["ɵɵtext"](3,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction2"](3,re,e.errorMessage,o["ɵɵpureFunction1"](1,oe,e.errorAttempt)))}}function se(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"div"),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"a",12),o["ɵɵlistener"]("click",(function(){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().forgotPincode()})),o["ɵɵtext"](3,"pinCodeOperations.forgot.pincode"),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]()}}const ae=function(e){return{tag:"textContent",label:e}};let le=(()=>{class e{constructor(t,i,o,r,n,s,a){this.formBuilder=t,this.translateService=i,this.toastNotificationService=o,this.forgotPinService=r,this.pinCodeUpdateProfileConfig=n,this.updateProfilePinCodeService=s,this.siteConfigService=a,this.pinCodeDigitsEntered=0,this.showPin=!1,this.processingCall=!1,this.isForgotPinEnabled=!1,this.publishNotification=e=>this.toastNotificationService.add(e),this.toLoadingNotification=t=>e.toNotification("loading",t,0,2e3),this.pinCodeOperationConfig=this.pinCodeUpdateProfileConfig}ngOnInit(){this.isForgotPinEnabled=this.siteConfigService.evalFeature("site.config.forgot.pincode.enabled"),this.advertisement="pinCodeOperations.updateProfile.overlay.form.advertisement",this.createForm()}createForm(){this.pinCodeForm=this.formBuilder.group({pinCode:this.formBuilder.control("",[r.Validators.required,r.Validators.minLength(4),r.Validators.maxLength(4)])}),this.showPin=!0}forgotPincode(){this.forgotPinService.requestForgotPin().subscribe((()=>{}),(()=>{this.errorMessage="pinCodeOperations.form.error.something.wrong"}))}verifyPinCode(){let t=this.pinCodeForm.value.pinCode;if(this.pinCodeForm.valid&&!this.newPinCodeFieldErrorMessage){if(this.processingCall)return;this.processingCall=!0,this.resetErrors(),this.translateService.translate("pinCodeOperations.loading").pipe((0,I.map)(this.toLoadingNotification)).subscribe((e=>this.publishNotification(e))),this.updateProfilePinCodeService.verifyPin(t).subscribe((e=>{this.toastNotificationService.close(),this.toastNotificationService.doClose.subscribe((()=>{this.processingCall=!1}))}),(e=>{if(this.processingCall=!1,this.toastNotificationService.close(),403==e.status){let t=e.error;if(t.errors&&t.errors.length){let e=t.errors.find((e=>{if("remainingAttempts"===e.field)return!0}));1==e.value?this.errorMessage="pinCodeOperations.forceUpdate.form.error.pin.code.lastAttempt":(this.errorMessage="pinCodeOperations.updateProfile.form.error.pin.code.leftAttempts",this.errorAttempt=e.value)}else this.errorMessage="pinCodeOperations.forceUpdate.form.error.login.attempt.timeout"}else 423==e.status?this.errorMessage="pinCodeOperations.updateProfile.form.error.account.blocked":this.errorMessage="pinCodeOperations.form.error.something.wrong"}))}else e.areAllDigitsEntered(t)?"pinCodeOperations.form.error.pin.code.required"===this.pinCodeFieldErrorMessage&&(this.pinCodeFieldErrorMessage=null):this.pinCodeFieldErrorMessage="pinCodeOperations.form.error.pin.code.required",this.errorMessage="pinCodeOperations.form.error.fields.in.red"}resetErrors(){this.errorMessage=null,this.pinCodeFieldErrorMessage=null}onPinCodeInputChanged(e){this.pinCodeDigitsEntered=e}shouldHideSubmitButton(){return this.pinCodeOperationConfig.autoHideSubmitButton&&!(this.pinCodeDigitsEntered==ee.b.PIN_DIGITS)}static areAllDigitsEntered(e){return e&&e.length==ee.b.PIN_DIGITS}static toNotification(e,t,i=3e3,o=0){return{msg:t,modal:!0,type:e,timeout:i,delay:o}}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](r.FormBuilder),o["ɵɵdirectiveInject"](h.s),o["ɵɵdirectiveInject"](te.i),o["ɵɵdirectiveInject"](F.k),o["ɵɵdirectiveInject"](Y.S),o["ɵɵdirectiveInject"](L.a),o["ɵɵdirectiveInject"](p.r))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["bx-pin-code-update-profile-form"]],decls:22,vars:10,consts:[["novalidate","",3,"formGroup","submit"],[1,"pin-code-form"],[1,"align-left",3,"bxTranslate"],["id","pinCodeDiv",4,"ngIf"],["class","custom-field invalid-field",4,"ngIf"],[4,"ngIf"],[1,"full-width-ctas"],["type","submit",1,"custom-cta","primary","cta-large",3,"disabled","bxTranslate"],["id","pinCodeDiv"],["formControlName","pinCode",3,"errorMessage","hidePinCodeEye","alwaysShowPinCode","showPinCodeLegend","showPinCodeInfoTooltip","fieldLabel","amountOfDigitsEntered"],[1,"custom-field","invalid-field"],[1,"error-msg",3,"bxTranslate"],["id","forgot-pincode",1,"custom-link",3,"bxTranslate","click"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"form",0),o["ɵɵlistener"]("submit",(function(){return t.verifyPinCode()})),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"div",1),o["ɵɵtext"](4,"\n                "),o["ɵɵelementStart"](5,"p",2),o["ɵɵtext"](6,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](7,"\n\n                "),o["ɵɵtemplate"](8,ie,5,6,"div",3),o["ɵɵtext"](9,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](10,"\n            "),o["ɵɵtemplate"](11,ne,5,6,"div",4),o["ɵɵtext"](12,"\n            "),o["ɵɵtemplate"](13,se,5,0,"div",5),o["ɵɵtext"](14,"\n            "),o["ɵɵelementStart"](15,"div",6),o["ɵɵtext"](16,"\n                "),o["ɵɵelementStart"](17,"button",7),o["ɵɵtext"](18,"\n                    pinCodeOperations.form.button.update\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](19,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](20,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](21,"\n    ")),2&e&&(o["ɵɵadvance"](1),o["ɵɵproperty"]("formGroup",t.pinCodeForm),o["ɵɵadvance"](4),o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](8,ae,t.advertisement)),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.showPin),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.errorMessage),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.isForgotPinEnabled&&t.showPin),o["ɵɵadvance"](2),o["ɵɵclassProp"]("invisible",t.shouldHideSubmitButton()),o["ɵɵadvance"](2),o["ɵɵproperty"]("disabled",t.processingCall))},directives:[r["ɵNgNoValidate"],r.NgControlStatusGroup,r.FormGroupDirective,$.P,q.NgIf,ee.b,r.NgControlStatus,r.FormControlName],encapsulation:2}),e})();const ce=function(e){return{tag:"textContent",label:e}};function de(e,t){if(1&e&&(o["ɵɵelementStart"](0,"h2",4),o["ɵɵtext"](1,"\n                "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](1,ce,e.overlayTitle))}}function pe(e,t){if(1&e&&(o["ɵɵelementStart"](0,"h3",5),o["ɵɵtext"](1,"\n                "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](1,ce,e.overlayTitle))}}let he=(()=>{class e{constructor(e){this.pinCodeUpdateProfileConfig=e,this.pinCodeOperationConfig=this.pinCodeUpdateProfileConfig,this.overlayTitle="pinCodeOperations.updateProfile.overlay.title"}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](Y.S))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["bx-pin-code-update-profile-overlay"]],decls:16,vars:3,consts:[["overlayType","medium"],[3,"closeButton"],["role","heading","class","h2-heading",3,"bxTranslate",4,"ngIf"],["role","heading","class","h1-heading",3,"bxTranslate",4,"ngIf"],["role","heading",1,"h2-heading",3,"bxTranslate"],["role","heading",1,"h1-heading",3,"bxTranslate"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"bx-overlay-container",0),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"bx-overlay-header",1),o["ɵɵtext"](4,"\n                "),o["ɵɵtemplate"](5,de,2,3,"h2",2),o["ɵɵtext"](6,"\n                "),o["ɵɵtemplate"](7,pe,2,3,"h3",3),o["ɵɵtext"](8,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](9,"\n            "),o["ɵɵelementStart"](10,"bx-overlay-body"),o["ɵɵtext"](11,"\n                "),o["ɵɵelement"](12,"bx-pin-code-update-profile-form"),o["ɵɵtext"](13,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](14,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](15,"\n    ")),2&e&&(o["ɵɵadvance"](3),o["ɵɵproperty"]("closeButton",t.pinCodeOperationConfig.alwaysKeepCloseButtonHidden),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.pinCodeOperationConfig.headerLevel2&&t.overlayTitle),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",!t.pinCodeOperationConfig.headerLevel2&&t.overlayTitle))},directives:[Z.l,X.z,q.NgIf,Q.l,le,$.P],encapsulation:2}),e})();var ue=i(97241);function fe(e,t){1&e&&(o["ɵɵelementStart"](0,"figure",8),o["ɵɵtext"](1,"\n                "),o["ɵɵelement"](2,"i",9),o["ɵɵtext"](3,"\n                "),o["ɵɵelementStart"](4,"figcaption",10),o["ɵɵtext"](5,"profileUpdateAccount.updateBlocked"),o["ɵɵelementEnd"](),o["ɵɵtext"](6,"\n            "),o["ɵɵelementEnd"]())}const me=function(){return["updatePassword"]};function ge(e,t){if(1&e&&(o["ɵɵelementStart"](0,"bx-single-accordion",11),o["ɵɵtext"](1,"\n\n                "),o["ɵɵelementStart"](2,"bx-form-group",4),o["ɵɵpipe"](3,"bxTranslationKeys"),o["ɵɵtext"](4,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](5,"\n            "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("title","profileUpdateAccount.accordionLabel.changePassword")("type","secondary")("inverse",!0),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](3,6,e.formModel,"profileUpdateAccount"))("controlGroup",e.formGroup)("filterElements",o["ɵɵpureFunction0"](9,me))}}function ve(e,t){1&e&&(o["ɵɵelementStart"](0,"div",12),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"button",13),o["ɵɵtext"](3,"\n                    profileUpdateAccount.submit.button\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]())}function be(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"bx-overlay",14),o["ɵɵlistener"]("close",(function(t){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().onVerifyPinCodeOverlayClose(t)})),o["ɵɵtext"](1,"\n            "),o["ɵɵelement"](2,"bx-pin-code-update-profile-overlay"),o["ɵɵtext"](3,"\n        "),o["ɵɵelementEnd"]()}}const Ce=function(){return["general"]};class Se{constructor(e,t,i,o,r,n,s,a,l,c,d,p,h,u,f,m,g,v,b,C,S,y,P,E){this.referenceDataService=e,this.brandLanguageService=t,this.translate=i,this.formService=o,this.changeDetectionRef=r,this.profileService=n,this.toastNotificationService=s,this.languageService=a,this.notificationService=l,this.route=c,this.formGeneratorService=d,this.profileStore=p,this.profileUpdateAccountFormMapper=h,this.siteConfigService=u,this.profileOddsFormatService=f,this.updateProfilePinCodeService=m,this.forgotPinService=g,this.phoneStatusPollingService=v,this.phoneStatusStore=b,this.router=C,this.mfaProperties=S,this.phoneSubjectService=y,this.hoursGeneratorService=P,this.windowService=E,this.showChangePassword=!0,this.processingCall=!1,this.isDisplayed=!1,this.formConfiguration=this.route.snapshot.data.profileUpdate.formConfiguration,this.profile=this.route.snapshot.data.profileUpdate.profile,this.hostedPlayer=this.route.snapshot.data.profileUpdate.hostedPlayer,this.playerVerificationMethod=this.siteConfigService.getSiteConfigProp("updatePlayerVerificationMethod")}checkDisplayOfHostPreferencesFields(e){"profileUpdateAccount-hostRequested"===e.id&&this.isWantHostOptionalField()&&this.showOrHideHostPreferencesFields(e.checked)}showOrHideHostPreferencesFields(e){Se.HOST_PREFERENCES_FIELD_HTML_IDS.forEach((t=>this.showOrHideHostPreferencesField(t,e)))}showOrHideHostPreferencesField(e,t){const i=this.windowService.document().getElementById(e);if(i){const e=t?"inherit":"none";i.parentElement.parentElement.style.display=e}}ngOnDestroy(){this.profileInputPasswordSubscription&&this.profileInputPasswordSubscription.unsubscribe(),this.profileUpdateSubscription&&this.profileUpdateSubscription.unsubscribe()}ngOnInit(){this.hasMfaVerificationEnabled=this.mfaProperties.hasOperationEnabled("updateProfile"),this.formModel=this.formGeneratorService.generate(Se.formId,this.formConfiguration,this.profile),this.formGroup=this.formService.createFormControl(this.formModel);const e=this.profileUpdateAccountFormMapper.buildFormValues(this.profile,this.hostedPlayer);this.fillValues(e),this.getTranslations("profileUpdateAccount").subscribe((t=>this.fillAndPatchTranslatedFields(t,e))),this.showChangePassword=!this.hasChangePasswordMenuItem(),this.ensureAllowUpdate(),this.profileStore.getProfile().subscribe((e=>{this.route.snapshot.data.profileUpdate.profile=e,this.profile=e,this.ensureAllowUpdate()})),this.phoneTypePollingRetries=this.siteConfigService.getSiteConfigProp("phoneTypeValidPollingRetries")}ngAfterViewInit(){this.shouldHideHostPreferences()&&this.showOrHideHostPreferencesFields(!1)}shouldHideHostPreferences(){return this.isWantHostOptionalField()&&this.isWantHostUnchecked()}isWantHostOptionalField(){return this.formConfiguration.optionalFields.includes(k.Pf)}isWantHostUnchecked(){return this.formGroup.value.wantHost&&!this.formGroup.value.wantHost.hostRequested}ensureAllowUpdate(){void 0===this.profile.allowUpdate&&(this.profile.allowUpdate=!0)}formModelContains(e){return this.formModel.elements.general&&!!this.formModel.elements.general.elements[e]}hasChangePasswordMenuItem(){return this.siteConfigService.evalFeature("site.config.item-change-password.enabled")}fillValues(e){this.fillTextValues(S(Se.DROPDOWN_VALUES,e)),this.fillDropdownValues(e)}fillTextValues(e){this.changeDetectionRef.detectChanges(),this.formGroup.patchValue(e),this.lastSavedFormValues=g(this.formGroup.value)}fillDropdownValues(e){this.formModelContains(k.ml)&&this.fillLanguage(e[k.ml]),this.formModelContains(k.c2)&&this.fillTimezone(e[k.c2]),this.formModelContains(k.Sz)&&this.fillOddsFormats(),this.formModelContains(k.CS)&&this.fillContactFrequency(e[k.CS]),this.formModelContains(k.Tk)&&this.fillHourPicker(k.Tk,e[k.Tk]),this.formModelContains(k.pb)&&this.fillHourPicker(k.pb,e[k.pb])}fillLanguage(e){this.translateLanguages(this.brandLanguageService.getAvailableLanguages()).subscribe((t=>{let i=this.formModel.elements.general.elements[k.ml];t.forEach((e=>i.options.push({code:e.code,name:e.label}))),this.formGroup.patchValue({[k.ml]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}translateLanguages(e){return(0,x.forkJoin)(e,this.getTranslations(l.S),((e,t)=>(e.map((e=>e.label=t[l.S+"."+e.code]||e.code)),e)))}getTranslations(e){return this.translate.loadTranslations(e).pipe((0,I.first)((e=>e&&Object.keys(e).length>0)))}fillTimezone(e){this.referenceDataService.getTimeZonesForThePlayer().subscribe((t=>{let i=this.formModel.elements.general.elements[k.c2];(t=P(v(E,y("name")))(t)).forEach((e=>i.options.push({code:e.code,name:e.name}))),this.formGroup.patchValue({[k.c2]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}fillOddsFormats(){this.profileOddsFormatService.getOddsFormats().subscribe((e=>{const t=this.formModel.elements.general.elements[k.Sz];e.forEach((e=>t.options.push({code:e.value,name:e.label}))),this.formGroup.patchValue({[k.Sz]:this.profileOddsFormatService.getSelectedFormat()}),this.lastSavedFormValues=g(this.formGroup.value)}))}patchFieldValue(e,t){this.changeDetectionRef.detectChanges(),this.formGroup.patchValue({[e]:t}),this.lastSavedFormValues=g(this.formGroup.value)}fillAndPatchTranslatedFields(e,t){this.formModelContains(k.zh)&&(this.fillPreferredContactMethodOptions(e),this.patchFieldValue(k.zh,t[k.zh])),this.formModelContains(k.uz)&&(this.fillAcceptsGifts(e),this.patchFieldValue(k.uz,t[k.uz]))}fillPreferredContactMethodOptions(e){const t=this.formModel.elements.general.elements[k.zh];this.formConfiguration.hostedContactMethods.forEach((i=>{const o=`profileUpdateAccount.hostPreferences.preferredContactMethod.${i}.label`;t.options.push({label:e[o]||o,brandAdminKey:i})}))}fillAcceptsGifts(e){const t=this.formModel.elements.general.elements[k.uz].elements.acceptsGiftsModel;this.populateOptionsAcceptsGifts(t,e)}populateOptionsAcceptsGifts(e,t){e.options=Se.OPTIONS_ACCEPTS_GIFTS.map((e=>({code:e,name:t[`profileUpdateAccount.general.acceptsGifts.options.${e.toLowerCase()}`]})))}fillHourPicker(e,t){const i=this.formModel.elements.general.elements[e];this.hoursGeneratorService.generate24HoursList().forEach((e=>i.options.push({value:e}))),this.formGroup.patchValue({[e]:t}),this.lastSavedFormValues=g(this.formGroup.value)}fillContactFrequency(e){const t=this.formModel.elements.general.elements[k.CS];this.getTranslations("contactFrequency").subscribe((i=>{H.forEach((e=>t.options.push({code:e,text:i[e]||e}))),this.formGroup.patchValue({[k.CS]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}checkConfirmationDialog(){if(this.lastSavedFormValues=this.copyNonEditableValues(this.lastSavedFormValues,this.formGroup.value),b(this.lastSavedFormValues,this.formGroup.value))this.displayNotification("profileUpdateAccount.success_message","success");else{this.formService.formDataTrim(this.formGroup.value);const e=this.profileUpdateAccountFormMapper.formUpdateToUpdateFormProfile(this.lastSavedFormValues,this.formGroup.value),t=this.profileUpdateAccountFormMapper.formUpdateToUpdateFormHostedPlayer(this.lastSavedFormValues,this.formGroup.value,this.isWantHostOptionalField());this.needProfileUpdateConfirmation(e)?"PASSWORD"===this.playerVerificationMethod?this.openConfirmationDialog(e,t):(this.isDisplayed=!0,this.profileUpdateSubscription=this.updateProfilePinCodeService.getVerifyPinRequested().subscribe((i=>{this.isDisplayed=!1,this.updateProfile(e,t,this.playerVerificationMethod,i)})),this.forgotPinService.getForgotPinRequested().subscribe((()=>{this.isDisplayed=!1,this.displayNotification("pinCodeOperations.updateProfile.form.email.sent","success")}))):this.updateProfile(e,t)}}copyNonEditableValues(e,t){return C({postalCode:{subdivisionStatus:()=>e.postalCode.subdivisionStatus||t.postalCode.subdivisionStatus}},e)}openConfirmationDialog(e,t){void 0!==e.newPassword?this.profileUpdateConfirmationMessage="profileUpdateConfirmation.password.title":this.profileUpdateConfirmationMessage="profileUpdateConfirmation.title",this.notificationService.open({content:D._,contentContext:{title:this.profileUpdateConfirmationMessage,message:"profileUpdateConfirmation.confirmationMsg",okButton:"profileUpdateConfirmation.ok"},modal:!0,type:"warning",showIcon:!1,customClass:"profileUpdateConfiguration"}).close.subscribe((i=>{i.proceedToUpdate&&this.updateProfile(e,t,this.playerVerificationMethod,i.password)}))}updateProfile(e,t,i,o){const r=new _.f(e,t);this.hasMfaVerificationEnabled||("PASSWORD"===i?r.security=new R.c(o):"PIN"===i&&(this.profileUpdateSubscription.unsubscribe(),r.security=new R.c(void 0,o)),this.translate.translate("profileUpdateAccount.loading").subscribe((e=>{this.toastNotificationService.add({msg:e,type:"loading",delay:2e3})}))),this.profileService.patchProfile(r).subscribe((()=>{this.formModelContains(k.Sz)&&this.profileOddsFormatService.saveOddsFormat(this.formGroup.value[k.Sz]),this.clearFields();let t=e.phoneNumber&&this.lastSavedFormValues.phoneMasked&&e.phoneNumber!=this.lastSavedFormValues.phoneMasked.phoneNumber;this.lastSavedFormValues=this.updateLastSavedFormValues(),this.handleProfileUpdateSuccess(t),t&&this.formGroup.value.phoneMasked&&this.phoneSubjectService.changePhone(this.formGroup.get("phoneMasked.phoneNumber").value),this.displayNotification("profileUpdateAccount.success_message","success",(()=>{e.attributes&&e.attributes.language&&this.languageService.setLanguage(e.attributes.language),this.phoneStatusStore.updateToNotValidated(r,(()=>this.router.navigate(["/","send-validation-code"])))})),this.formGroup.value.username&&this.formGroup.controls.username.disable()}),(e=>{if(403===e.status){let t=e.error;t&&t.errorCode&&"EMAIL_UPDATE_OPERATION_NOT_ALLOWED"===t.errorCode?this.displayNotification("profileUpdateAccount.email.blocked_change_message","warning"):"PASSWORD"===i?this.displayNotification("profileUpdateAccount.wrong_password","error"):"PIN"===i&&this.displayNotification("pinCodeOperations.updateProfile.error.wrong_password","error")}else if(409===e.status&&"DUPLICATED_PHONE"===e.error.errorCode){this.displayNotification("profileUpdateAccount.error_message","error");const e=this.formGroup.controls.phoneMasked;this.markFieldAsError(e,"phoneNumber","phoneDuplicatedUpdate");const t=this.formGroup.controls.phone;this.markFieldAsError(t,"phoneNumber","phoneDuplicatedUpdate")}else 409===e.status&&"PROFILE_ALREADY_EXISTS"===e.error.errorCode&&"duplicated_username"===e.error.message?(this.displayNotification("profileFields.username.error_alreadyTaken","error"),this.markFieldAsError(this.formGroup,"username","alreadyTaken")):this.displayNotification("profileUpdateAccount.error_message","error")}))}updateLastSavedFormValues(){if(this.shouldHideHostPreferences()){const e=this.lastSavedFormValues,t=g(this.formGroup.value);return this.overrideValue(this.formGroup.value,t,e,k.CS),this.overrideValue(this.formGroup.value,t,e,k.Tk),this.overrideValue(this.formGroup.value,t,e,k.zh),this.overrideValue(this.formGroup.value,t,e,k.pb),t}return g(this.formGroup.value)}overrideValue(e,t,i,o){e[o]&&(t[o]=i[o])}markFieldAsError(e,t,i){e.controls[t].setErrors({[i]:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1}handleProfileUpdateSuccess(e){this.profileStore.refresh(),e&&this.phoneStatusPollingService.getPhoneType(1e3,this.phoneTypePollingRetries).subscribe((e=>{this.phoneStatusStore.setPhoneTypeValid(!(e==w.y.INVALID))}))}displayNotification(e,t,i){this.translate.translate(e).subscribe((e=>{this.toastNotificationService.add({msg:e,type:t,onRemove:i})}))}clearFields(){this.markAsUntouched(),this.formGroup.patchValue({newPassword:""}),this.changeDetectionRef.detectChanges()}markAsUntouched(){this.shouldHideHostPreferences()?this.markNonHostPreferencesFieldsAsUntouched():this.formGroup.markAsUntouched()}markNonHostPreferencesFieldsAsUntouched(){Object.keys(this.formGroup.controls).filter(this.skipHostPreferencesFields()).forEach((e=>this.formGroup.get(e).markAsUntouched()))}skipHostPreferencesFields(){return e=>!Se.HOST_PREFERENCES_FIELD_IDS.includes(e)}markAsTouched(e){e instanceof r.FormGroup||e instanceof r.FormArray?Object.keys(e.controls).map((t=>this.markAsTouched(e.get(t)))):e.markAsTouched()}needProfileUpdateConfirmation(e){return!this.hasMfaVerificationEnabled&&(void 0!==e.email||void 0!==e.newPassword||void 0!==e.firstName||void 0!==e.lastName||void 0!==e.birthdate||void 0!==e.phoneNumber||void 0!==e.address.city||void 0!==e.address.addressLine||void 0!==e.address.postalCode||void 0!==e.address.subdivision)}onVerifyPinCodeOverlayClose(e){event&&(this.profileUpdateSubscription.unsubscribe(),this.isDisplayed=!1)}}Se.formId="profileUpdateAccount",Se.OPTIONS_ACCEPTS_GIFTS=["YES","NO"],Se.DROPDOWN_VALUES=[k.uz,k.CS,k.Tk,k.ml,k.Sz,k.zh,k.c2,k.pb],Se.HOST_PREFERENCES_FIELD_IDS=[k.Tk,k.CS,k.zh,k.pb],Se.HOST_PREFERENCES_FIELD_HTML_IDS=[`${Se.formId}-${k.CS}`,`${Se.formId}-${k.zh}`,`${Se.formId}-hourPicker-${k.Tk}`,`${Se.formId}-hourPicker-${k.pb}`],Se.ɵfac=function(e){return new(e||Se)(o["ɵɵdirectiveInject"](d.F),o["ɵɵdirectiveInject"](a.F),o["ɵɵdirectiveInject"](h.s),o["ɵɵdirectiveInject"](m.oL),o["ɵɵdirectiveInject"](o.ChangeDetectorRef),o["ɵɵdirectiveInject"](M.H),o["ɵɵdirectiveInject"](u.il),o["ɵɵdirectiveInject"](c.T),o["ɵɵdirectiveInject"](f.d),o["ɵɵdirectiveInject"](n.ActivatedRoute),o["ɵɵdirectiveInject"](G.U),o["ɵɵdirectiveInject"](O.s),o["ɵɵdirectiveInject"](U.g),o["ɵɵdirectiveInject"](p.r),o["ɵɵdirectiveInject"](j.z),o["ɵɵdirectiveInject"](L.a),o["ɵɵdirectiveInject"](F.k),o["ɵɵdirectiveInject"](N.G),o["ɵɵdirectiveInject"](A.G),o["ɵɵdirectiveInject"](n.Router),o["ɵɵdirectiveInject"](s.K),o["ɵɵdirectiveInject"](V.$),o["ɵɵdirectiveInject"](T.E),o["ɵɵdirectiveInject"](B.u))},Se.ɵcmp=o["ɵɵdefineComponent"]({type:Se,selectors:[["bx-profile-update-account-form"]],hostBindings:function(e,t){1&e&&o["ɵɵlistener"]("change",(function(e){return t.checkDisplayOfHostPreferencesFields(e.target)}))},decls:21,vars:12,consts:[[1,"profile-settings-form",3,"formGroup","ngSubmit"],["type","text",2,"position","absolute","top","-1000px"],["type","password",2,"position","absolute","top","-1000px"],["role","alert","class","custom-notification alert info","id","profileUpdateAccount-blocked-message",4,"ngIf"],[3,"model","controlGroup","filterElements"],[3,"title","type","inverse",4,"ngIf"],["class","full-width-ctas",4,"ngIf"],[3,"close",4,"ngIf"],["role","alert","id","profileUpdateAccount-blocked-message",1,"custom-notification","alert","info"],[1,"icon","icon-info"],[3,"bxTranslate"],[3,"title","type","inverse"],[1,"full-width-ctas"],["type","submit","id","profileUpdateAccount-submit",1,"custom-cta","primary","cta-large",3,"bxTranslate"],[3,"close"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"bx-form",0),o["ɵɵlistener"]("ngSubmit",(function(){return t.checkConfirmationDialog()})),o["ɵɵtext"](2,"\n\n            "),o["ɵɵtext"](3,"\n            "),o["ɵɵelement"](4,"input",1),o["ɵɵtext"](5,"\n            "),o["ɵɵelement"](6,"input",2),o["ɵɵtext"](7,"\n\n            "),o["ɵɵtemplate"](8,fe,7,0,"figure",3),o["ɵɵtext"](9,"\n\n            "),o["ɵɵelementStart"](10,"bx-form-group",4),o["ɵɵpipe"](11,"bxTranslationKeys"),o["ɵɵtext"](12,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](13,"\n\n            "),o["ɵɵtemplate"](14,ge,6,10,"bx-single-accordion",5),o["ɵɵtext"](15,"\n\n\n            "),o["ɵɵtemplate"](16,ve,5,0,"div",6),o["ɵɵtext"](17,"\n\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](18,"\n\n        "),o["ɵɵtemplate"](19,be,4,0,"bx-overlay",7),o["ɵɵtext"](20,"\n    ")),2&e&&(o["ɵɵadvance"](1),o["ɵɵproperty"]("formGroup",t.formGroup),o["ɵɵadvance"](7),o["ɵɵproperty"]("ngIf",!t.profile.allowUpdate),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](11,8,t.formModel,"profileUpdateAccount"))("controlGroup",t.formGroup)("filterElements",o["ɵɵpureFunction0"](11,Ce)),o["ɵɵadvance"](4),o["ɵɵproperty"]("ngIf",t.showChangePassword),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.profile.allowUpdate),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.isDisplayed))},directives:[z.U,r.NgControlStatusGroup,r.FormGroupDirective,q.NgIf,W.E,$.P,J.g,K.B,he],pipes:[ue.o],styles:[".buttons[_ngcontent-%COMP%] {\n  width: 100%; }\n  .buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n    width: 100%; }\n  @media only screen and (min-width: 769px) {\n    .buttons[_ngcontent-%COMP%] {\n      float: right;\n      width: 33.3%; } }\n  #profileUpdateAccount-blocked-message[_ngcontent-%COMP%] {\n  margin-bottom: 15px; }\n  [_nghost-%COMP%]     .custom-droplist {\n  max-height: 300px;\n  overflow-y: auto; }\n  @media only screen and (min-width: 769px) {\n    [_nghost-%COMP%]     .custom-droplist {\n      max-height: 200px; } }\n  [_nghost-%COMP%]     button.toggle-password-btn {\n  padding: 0; }\n  [_nghost-%COMP%]     button.toggle-password-btn .icon {\n    font-size: 22px; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion {\n  padding: 0 0 20px 0; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion .custom-field {\n    margin-bottom: 0; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion .custom-field .error-msg {\n      color: #da5056; }\n  @media only screen and (min-width: 769px) {\n  [_nghost-%COMP%]     .field-alone {\n    display: block;\n    clear: both; }\n  [_nghost-%COMP%]     .field-left, [_nghost-%COMP%]     .field-right {\n    display: block;\n    float: left;\n    width: calc(50% - 10px); }\n    [_nghost-%COMP%]     .field-left label, [_nghost-%COMP%]     .field-right label {\n      white-space: nowrap; }\n  [_nghost-%COMP%]     .field-left {\n    margin-right: 10px;\n    clear: left; }\n  [_nghost-%COMP%]     .field-right {\n    margin-left: 10px;\n    clear: right; }\n    [_nghost-%COMP%]     .field-right.field-alone {\n      margin-left: calc(50% + 10px); }\n  [_nghost-%COMP%]     .field-alone {\n    clear: both; } }\n  [_nghost-%COMP%]     .phone-group .phone-prefix {\n  width: 50px;\n  float: left;\n  margin-bottom: -2px; }\n  [_nghost-%COMP%]     .phone-group .phone-prefix input {\n    text-align: center;\n    padding: 14px 8px;\n    color: gray; }\n  [_nghost-%COMP%]     .phone-group .phone-prefix label {\n    background-color: #333;\n    border-color: gray; }\n  [_nghost-%COMP%]     .phone-group .phone-number {\n  margin-left: 70px; }\n  [_nghost-%COMP%]     .country {\n  margin: 10px 0;\n  text-align: right; }\n  [_nghost-%COMP%]     .country span {\n    font-size: 1.1em;\n    vertical-align: top; }\n  [_nghost-%COMP%]     .country .icon-location {\n    font-size: 1.4em; }\n  [_nghost-%COMP%]     .country-group {\n  margin-top: 5px; }\n  [_nghost-%COMP%]     .country-group .custom-field {\n    display: none; }\n  [_nghost-%COMP%]     .postalCode {\n  margin-bottom: 4px; }\n  [_nghost-%COMP%]     .city {\n  display: none; }"]})},28084:(e,t,i)=>{i.d(t,{U:()=>d});var o=i(57826),r=i(30173),n=i(55240),s=i(84956),a=i(7239),l=i(61344),c=i(14442);let d=(()=>{class e extends a.U{constructor(e,t,i){super(e,t),this.injector=e,this.deviceService=t,this.profileOddsFormatService=i}generate(e,t,i){const o=super.generate(e,this.removeOddsFormatFieldIfNotSupported(t),i);if(Object.keys(o.elements).length){const t=o.elements;o.elements={general:new n.R3({id:`${e}-data`,layoutClass:"formFieldset",legendClass:"formLegend",elements:t})}}return this.addFixedFields(e,o),o}addFixedFields(e,t){t.elements.updatePassword=this.createUpdatePasswordModel(e)}removeOddsFormatFieldIfNotSupported(e){return this.profileOddsFormatService.showOddsFormat()?e:s({fields:e=>e.map((e=>e.replace(`${l.Sz},`,"").replace(`,${l.Sz}`,"").replace(l.Sz,""))).filter((e=>!!e))},e)}applyCustomization(e,t,i,o,r){let n=super.applyCustomization(e,t,i,o,r);return t===l.Jd&&"profileUpdateAccount"==e&&(n.formElement.errorMessages.profileExists="profileUpdateAccount.general.email.error_profileExists"),t===l.ci&&o.phoneValidationEnabled&&(n.formElement.elements.phoneNumber.tapHint="profileUpdateAccount.general.phoneNumber.sms_warning"),n}createUpdatePasswordModel(e){return new n.R3({id:`${e}-optionalupdate`,layoutClass:"formFieldset",legendClass:"formLegend",elements:{newPassword:new n.bx({id:`${e}-newPassword`,layoutClass:"field-left field-alone",type:"password",validators:{minLength:8,maxLength:64,password:null}})}})}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](o.Injector),o["ɵɵinject"](r.U),o["ɵɵinject"](c.z))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},29195:(e,t,i)=>{i.d(t,{g:()=>c});var o=i(76302),r=i(72902),n=i(63253),s=i(85898);class a{constructor(e,t,i,o,r){this.isHostRequested=e,this.contactFrequency=t,this.preferredContactType=i,this.preferredContactTimeFrom=o,this.preferredContactTimeTo=r}}var l=i(57826);let c=(()=>{class e{constructor(e){this.profileDateService=e}isNotEmpty(e){return!!e&&e.trim().length>0}formUpdateToUpdateFormProfile(e,t){let i=new o.s;if(this.isNotEmpty(t.username)&&e.username!==t.username&&(i.username=t.username),this.isNotEmpty(t.email)&&e.email!==t.email&&(i.email=t.email),this.isNotEmpty(t.nickname)&&e.nickname!==t.nickname&&(i.nickname=t.nickname),this.isNotEmpty(t.firstName)&&e.firstName!==t.firstName&&(i.firstName=t.firstName),this.isNotEmpty(t.lastName)&&e.lastName!==t.lastName&&(i.lastName=t.lastName),e.dateOfBirth!==t.dateOfBirth&&(i.birthdate=this.profileDateService.parseDateToBackend(t.dateOfBirth)),this.isNotEmpty(n(["phone","phoneNumber"],t))&&n(["phone","phoneNumber"],e)!==n(["phone","phoneNumber"],t)&&(i.phoneNumber=t.phone.phoneNumber),this.isNotEmpty(n(["phoneMasked","phoneNumber"],t))&&n(["phoneMasked","phoneNumber"],e)!==n(["phoneMasked","phoneNumber"],t)&&(i.phoneNumber=t.phoneMasked.phoneNumber),this.isNotEmpty(t.newPassword)&&(i.newPassword=t.newPassword),i.attributes={},this.isNotEmpty(t.language)&&e.language!==t.language&&(i.attributes.language=t.language),this.isNotEmpty(t.timeZone)&&e.timeZone!==t.timeZone&&(i.attributes.time_zone=t.timeZone),i.address={},this.isNotEmpty(t.addressLine)&&e.addressLine!==t.addressLine&&(i.address.addressLine=t.addressLine),r("postalCode")(t)){const o=["postalCode","postalCode"];this.isNotEmpty(t.postalCode.postalCode)&&n(o,e)!==n(o,t)&&(i.address.postalCode=t.postalCode.postalCode);const s=["postalCode","subdivision"];!r("subdivision")(t)&&this.isNotEmpty(t.postalCode.subdivision)&&n(s,e)!==n(s,t)&&(i.address.subdivision=t.postalCode.subdivision);const a=["postalCode","city"];!r("city")(t)&&this.isNotEmpty(t.postalCode.city)&&n(a,e)!==n(a,t)&&(i.address.city=t.postalCode.city)}return this.isNotEmpty(t.city)&&e.city!=t.city&&(i.address.city=t.city),this.isNotEmpty(t.subdivision)&&e.subdivision!=t.subdivision&&(i.address.subdivision=t.subdivision),JSON.stringify(e.subscriptionChannels)!=JSON.stringify(t.subscriptionChannels)&&(i.subscriptionChannels=this.mapSubscriptionChannels(t.subscriptionChannels)),this.isAcceptsGiftsNotEqual(t,e)&&(i.acceptsGifts=t.acceptsGifts.acceptsGiftsModel),i}formUpdateToUpdateFormHostedPlayer(e,t,i){const o=new a;return this.areWantHostsDifferent(t.wantHost,e.wantHost)&&(o.isHostRequested=t.wantHost.hostRequested),this.shouldMapHostedPreferencesFields(t.wantHost,i)&&this.mapHostedPlayerFields(t,e,o),o}mapHostedPlayerFields(e,t,i){this.isNotEmpty(e.frequency)&&t.frequency!==e.frequency&&(i.contactFrequency=e.frequency),this.isNotEmpty(e.preferredContact)&&t.preferredContact!==e.preferredContact&&(i.preferredContactType=e.preferredContact),this.isNotEmpty(e.from)&&t.from!==e.from&&(i.preferredContactTimeFrom=e.from),this.isNotEmpty(e.to)&&t.to!==e.to&&(i.preferredContactTimeTo=e.to)}areWantHostsDifferent(e,t){return e&&(t&&e.hostRequested!==t.hostRequested||!t)}shouldMapHostedPreferencesFields(e,t){return!t||this.wantHostAllowToMapHostedPreferencesFields(e)}wantHostAllowToMapHostedPreferencesFields(e){return!e||this.wantHostIsChecked(e)}wantHostIsChecked(e){return e&&e.hostRequested}mapSubscriptionChannels(e){return Object.keys(e).filter((t=>e[t]))}buildFormValues(e,t){return Object.assign(this.profileToForm(e),this.hostedPlayerToForm(t))}profileToForm(e){return{email:e.email,phone:{phoneNumber:e.phones?e.phones[0]:void 0},phoneMasked:{phoneNumber:e.phones?e.phones[0]:void 0},username:e.username,nickname:e.nickname,firstName:e.firstName,lastName:e.lastName,dateOfBirth:this.profileDateService.parseDateFromBackend(e.birthdate),language:e.attributes?e.attributes.language:void 0,timeZone:e.attributes?e.attributes.time_zone:void 0,city:e.address&&e.address.city?e.address.city:void 0,subdivision:e.address&&e.address.subdivision?e.address.subdivision:void 0,addressLine:e.address&&e.address.addressLine?e.address.addressLine:void 0,postalCode:{postalCode:n(["address","postalCode"],e),subdivision:n(["address","subdivision"],e),city:n(["address","city"],e)},subscriptionChannels:e.subscriptionChannels,allowUpdate:!!e.allowUpdate,acceptsGifts:{acceptsGiftsModel:e.acceptsGifts}}}hostedPlayerToForm(e){return{wantHost:{hostRequested:!!e&&e.isHostRequested},from:e?e.preferredContactTimeFrom:void 0,to:e?e.preferredContactTimeTo:void 0,frequency:e?e.contactFrequency:void 0,preferredContact:e?e.preferredContactType:void 0}}isAcceptsGiftsNotEqual(e,t){return e.acceptsGifts&&t.acceptsGifts&&e.acceptsGifts.acceptsGiftsModel!==t.acceptsGifts.acceptsGiftsModel}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](s.f))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},27232:(e,t,i)=>{i.d(t,{_:()=>f});var o=i(57826),r=i(55240);const n="profileUpdateConfirmation";var s=i(1272),a=i(6856),l=i(86014),c=i(58447),d=i(40475),p=i(74195),h=i(97241);const u=function(e){return[e]};let f=(()=>{class e{constructor(e,t){this.formService=e,this.profileUpdateConfig=t}ok(){this.result.next({proceedToUpdate:!0,password:this.formGroup.value.password})}cancel(){this.emptyForm(),this.result.next({proceedToUpdate:!1})}ngOnInit(){this.formModel=new r.fk({id:`${n}`,elements:{password:new r.bx({id:`${n}-password`,type:"password",label:"profileUpdateConfirmation.password.label",validators:{required:null},focused:!0})}}),this.formGroup=this.formService.createFormControl(this.formModel)}emptyForm(){this.formGroup.reset()}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](r.oL),o["ɵɵdirectiveInject"](s.s,8))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["ng-component"]],inputs:{context:"context"},outputs:{result:"result"},decls:28,vars:11,consts:[[1,"wrapper","profile-update-confirmation"],[1,"icon","confirmation-icon",3,"ngClass"],[1,"confirmation-figcaption",3,"bxTranslate"],[3,"formGroup","ngSubmit"],[3,"model","controlGroup"],[1,"buttons"],["type","button",1,"custom-cta","tertiary",3,"bxTranslate","click"],["type","submit",1,"custom-cta","primary",3,"bxTranslate"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"div",0),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"figure"),o["ɵɵtext"](4,"\n                "),o["ɵɵelement"](5,"i",1),o["ɵɵtext"](6,"\n                "),o["ɵɵelementStart"](7,"figcaption",2),o["ɵɵtext"](8),o["ɵɵelementEnd"](),o["ɵɵtext"](9,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](10,"\n             "),o["ɵɵelementStart"](11,"bx-form",3),o["ɵɵlistener"]("ngSubmit",(function(){return t.ok()})),o["ɵɵtext"](12,"\n                "),o["ɵɵelementStart"](13,"bx-form-group",4),o["ɵɵpipe"](14,"bxTranslationKeys"),o["ɵɵtext"](15,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](16,"\n                "),o["ɵɵelementStart"](17,"div",5),o["ɵɵtext"](18,"\n                    "),o["ɵɵelementStart"](19,"button",6),o["ɵɵlistener"]("click",(function(){return t.cancel()})),o["ɵɵtext"](20,"\n                        profileUpdateConfirmation.cancel\n                    "),o["ɵɵelementEnd"](),o["ɵɵtext"](21,"\n                    "),o["ɵɵelementStart"](22,"button",7),o["ɵɵtext"](23),o["ɵɵelementEnd"](),o["ɵɵtext"](24,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](25,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](26,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](27,"\n    ")),2&e&&(o["ɵɵadvance"](5),o["ɵɵproperty"]("ngClass",o["ɵɵpureFunction1"](9,u,(null==t.profileUpdateConfig||null==t.profileUpdateConfig.confirmation?null:t.profileUpdateConfig.confirmation.icon)||"icon-warning")),o["ɵɵadvance"](3),o["ɵɵtextInterpolate"](t.context.title),o["ɵɵadvance"](3),o["ɵɵproperty"]("formGroup",t.formGroup),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](14,6,t.formModel,"profileUpdateConfirmation"))("controlGroup",t.formGroup),o["ɵɵadvance"](10),o["ɵɵtextInterpolate1"]("\n                        ",t.context.okButton,"\n                    "))},directives:[a.NgClass,l.P,c.U,d.NgControlStatusGroup,d.FormGroupDirective,p.E],pipes:[h.o],encapsulation:2}),e})()},25799:(e,t,i)=>{i.d(t,{f:()=>o});class o{constructor(e,t,i,o){this.profile=e,this.hostedPlayer=t,this.security=i,this.operation=o}hasPhoneChanged(){return this.profile.hasPhoneChanged()}}},85747:(e,t,i)=>{i.d(t,{c:()=>o});class o{constructor(e,t){this.password=e,this.pinCode=t}}},76302:(e,t,i)=>{i.d(t,{s:()=>o});class o{constructor(e,t,i,o,r,n,s,a,l,c,d,p,h){this.username=e,this.email=t,this.attributes=i,this.nickname=o,this.phoneNumber=r,this.newPassword=n,this.firstName=s,this.lastName=a,this.birthdate=l,this.address=c,this.allowUpdate=d,this.subscriptionChannels=p,this.acceptsGifts=h}hasPhoneChanged(){return void 0!==this.phoneNumber}}},9914:(e,t,i)=>{i.d(t,{E:()=>r});var o=i(57826);let r=(()=>{class e{generate24HoursList(){return Array.from({length:24},((e,t)=>("0"+t).slice(-2)+":00"))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()}}]);