"use strict";(self.webpackChunkserver_side_rendering=self.webpackChunkserver_side_rendering||[]).push([[9983],{96222:(e,t,r)=>{r.d(t,{y:()=>n});const n=[{rules:["minLength","maxLength","required"],translate:"profileFields.password.rule_checker_length"},{rules:["password","required"],translate:"profileFields.password.rule_checker_capitalNumber"},{rules:["containsNickname","containsFirstName","containsUsername","containsLastName","required"],translate:"profileFields.password.rule_checker_personalData"}]},79983:(e,t,r)=>{r.d(t,{Z:()=>gt});var n=r(6856),o=r(73753),s=r(87533),i=r(68423),a=r(60763),l=r(12353),d=r(4633),c=r(12473),u=r(91886),p=r(92920);function f(e,t,r){let n=e.controls[l.fc],o=e.controls[l.ti],s=e.controls[l.sN],i=e.controls[l.yN],a=t.value;if(r.containsFirstName&&n&&n.value&&m(a,n.value))t.setErrors(c(t.errors,{containsFirstName:null}));else if(r.containsLastName&&o&&o.value&&m(a,o.value))t.setErrors(c(t.errors,{containsLastName:null}));else if(r.containsNickname&&s&&s.value&&m(a,s.value))t.setErrors(c(t.errors,{containsNickname:null}));else if(r.containsUsername&&i&&i.value&&m(a,i.value))t.setErrors(c(t.errors,{containsUsername:null}));else{let e=u(["containsFirstName","containsLastName","containsNickname","containsUsername"],t.errors);t.setErrors(p(e)?null:e)}return null}function m(e,t){return!!e&&!!t&&-1!==e.toUpperCase().indexOf(t.toUpperCase())}var g=r(96222),h=r(57826);let v=(()=>{class e extends d.W{render(e,t,r){let n={id:`${e}-password`,label:"profileFields.password.label",type:"password",validators:{minLength:8,maxLength:64,password:null},errorMessages:{minLength:"profileFields.password.error_minLength",maxLength:"profileFields.password.error_maxLength",password:"profileFields.password.error_password",containsNickname:"profileFields.password.error_containsNickname",containsFirstName:"profileFields.password.error_containsFirstName",containsLastName:"profileFields.password.error_containsLastName",containsUsername:"profileFields.password.error_containsUsername"}};r.rulesCheckerEnabled&&(n.rulesChecker=g.y);let o=new a.b(n);return t||(o.validators.required=null,o.errorMessages.required="profileFields.password.error_required"),o.groupValidator={personalDataInPassword:function(e){return f(e,e.controls[l.c_],n.errorMessages)}},o}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),b=(()=>{class e{render(e,t){let r=new a.b({id:`${e}-nickname`,type:"text",label:"profileFields.nickname.label",validators:{minLength:2,maxLength:30,pattern:"^[\\w\\s.,\\/#!%\\^*;:{}@=\\-`~()¡ªº'¿´\\u00C0-\\u00ff]*$"},errorMessages:{minLength:"profileFields.nickname.error_minLength",maxLength:"profileFields.nickname.error_maxLength",pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.errorMessages.required="profileFields.nickname.error_required"),r}shouldBeRendered(){return!0}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var y=r(50437);let C=(()=>{class e{render(e,t){let r=new y.kx({id:`${e}-languages`,options:[],displayProperty:"name",valueProperty:"code"});return t||(r.validators.required=null,r.errorMessages.required="profileFields.language.error_required"),r}shouldBeRendered(){return!0}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),x=(()=>{class e extends d.W{render(e,t){let r=new y.kx({id:`${e}-timeZones`,options:[],displayProperty:"name",valueProperty:"code"});return t||(r.validators.required=null,r.errorMessages.required="profileFields.timeZone.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),F=(()=>{class e extends d.W{render(e,t){let r=new y.kx({id:`${e}-odds-formats`,options:[],displayProperty:"name",valueProperty:"code"});return t||(r.validators.required=null,r.errorMessages.required="profileFields.oddsFormat.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var _=r(44382),S=r(23472);let w=(()=>{class e extends d.W{constructor(e){super(),this.siteConfigService=e}render(e,t,r,n){let o=new a.b({id:`${e}-email`,type:"email",label:"profileFields.email.label",typeAhead:this.getTypeAheadConfig(e),validators:{maxLength:100,bxEmail:null},errorMessages:{bxEmail:"profileFields.email.error_bxEmail"}});return t||(o.validators.required=null,o.errorMessages.required="profileFields.email.error_required"),o}getTypeAheadConfig(e){if(this.isTypeAheadEnabled(e))return{regex:/.*(@.{2,})/,searchList:this.emailProviderSuggestionsConfig().emailProviders.map((e=>`@${e}`))}}isTypeAheadEnabled(t){return this.emailProviderSuggestionsConfig().enabled&&(t===S.CY.formId||t===e.FORGOT_PASSWORD_FORM_ID)}emailProviderSuggestionsConfig(){return this.siteConfigService.getSiteConfigProp("emailProviderSuggestions")||{enabled:!1,searchList:[]}}}return e.FORGOT_PASSWORD_FORM_ID="forgotPassword",e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](_.r))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var L=r(69524);let I=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-subdivision`,type:"text",label:"profileFields.subdivision.label",validators:{maxLength:50},errorMessages:{maxLength:"profileFields.subdivision.error_maxLength"}});return t||(r.validators.required=null,r.errorMessages.required="profileFields.subdivision.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var M=r(85709),E=r(9180),k=r(8394);class R extends k.j{constructor(e){super(e),this.modelType="component",this.component=e.component,this.arguments=e.arguments||{}}}var T=r(85538),q=r(4309),P=r(42998);let N=(()=>{class e{constructor(e){this.route=e;let t=this.route.snapshot.data.referral;if(t){let e=t.referralData;e&&(this.emailValue=e.email)}}ngOnInit(){let e=this.formGroup.controls.referralEmail;this.onValueChanges&&e.valueChanges.subscribe((()=>{this.onValueChanges.next(this.formGroup)}))}set context(e){this.formGroup=e.formGroup,this.onValueChanges=e.arguments.onValueChanges}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](o.ActivatedRoute))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-referral-email"]],decls:1,vars:0,consts:[[1,"bx-registration-referral-email"]],template:function(e,t){1&e&&h["ɵɵelement"](0,"div",0)},encapsulation:2}),e})(),O=(()=>{class e extends d.W{constructor(e){super(),this.browserStorageService=e}render(e,t,r){if(this.browserStorageService.get(M.HM)===M.as)return new T.f({id:`${e}-referralEmailGroup`,elements:{}});let n=new T.f({id:`${e}-referralEmailGroup`,elements:{referralEmail:new a.b({id:`${e}-referralMail`,type:"email",label:"profileFields.referralMail.label",value:r.referrerEmail,validators:{maxLength:100,bxEmail:null},errorMessages:{bxEmail:"profileFields.email.error_bxEmail"}}),referralEmailHidden:new R({id:`${e}-referralMailHidden`,component:N,arguments:{onValueChanges:this.generateOnValueChanges()}})}});if(!t){const e=n.elements.referralEmail;e.validators.required=null,e.errorMessages.required="profileFields.email.error_required"}return n}generateOnValueChanges(){let e=new q.Subject;return e.pipe((0,P.first)()).subscribe((()=>{this.browserStorageService.remove(M.jj),this.browserStorageService.remove(M.HM),this.browserStorageService.remove(M.EI),this.browserStorageService.remove(M.zc)})),e}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](E.z))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),A=(()=>{class e{render(e,t){let r=new a.b({id:`${e}-lastName`,type:"text",label:"profileFields.lastName.label",validators:{minLength:1,maxLength:30,bxValidName:null},errorMessages:{minLength:"profileFields.lastName.error_minLength",maxLength:"profileFields.lastName.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.validators.bxNoWhitespacesName=null,r.errorMessages.required="profileFields.lastName.error_required"),r}shouldBeRendered(){return!0}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),$=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-city`,type:"text",label:"profileFields.city.label",validators:{minLength:2,maxLength:50,bxValidName:null},errorMessages:{minLength:"profileFields.city.error_minLength",maxLength:"profileFields.city.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.validators.bxNoWhitespacesName=null,r.errorMessages.required="profileFields.city.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),D=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-firstName`,type:"text",label:"profileFields.firstName.label",validators:{minLength:1,maxLength:30,bxValidName:null},errorMessages:{minLength:"profileFields.firstName.error_minLength",maxLength:"profileFields.firstName.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.validators.bxNoWhitespacesName=null,r.errorMessages.required="profileFields.firstName.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),j=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-websiteUrl`,type:"text",label:"profileRegistration.websiteUrl.label",validators:{minLength:3,maxLength:255,bxValidName:null},errorMessages:{minLength:"profileRegistration.websiteUrl.error_minLength",maxLength:"profileRegistration.websiteUrl.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.errorMessages.required="profileRegistration.websiteUrl.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),G=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-companyName`,type:"text",label:"profileRegistration.companyName.label",validators:{minLength:3,maxLength:255,bxValidName:null},errorMessages:{minLength:"profileRegistration.companyName.error_minLength",maxLength:"profileRegistration.companyName.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.errorMessages.required="profileRegistration.companyName.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var V=r(86154);let U=(()=>{class e{constructor(){this.state=e.STATE_NOT_SET,this.dirty=!1}set context(e){this.formGroup=e.formGroup,this.config=arguments[0].arguments.config,this.options=arguments[0].arguments.options}updateMessageTargetMarkets(t){const r=t.filter((e=>e.selected));this.setTargetMarketValue(r.map((e=>e.value))),this.dirty?this.state=r.length>0?e.STATE_VALID:e.STATE_ERROR:this.dirty=!0}setTargetMarketValue(e){this.formGroup.controls.targetMarket.patchValue(e)}}return e.STATE_VALID="valid",e.STATE_ERROR="error",e.STATE_NOT_SET="",e.ɵfac=function(t){return new(t||e)},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-target-market-selector"]],decls:3,vars:3,consts:[[3,"config","options","state","optionsUpdated"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"bx-multi-select",0),h["ɵɵlistener"]("optionsUpdated",(function(e){return t.updateMessageTargetMarkets(e)})),h["ɵɵelementEnd"](),h["ɵɵtext"](2,"\n ")),2&e&&(h["ɵɵadvance"](1),h["ɵɵproperty"]("config",t.config)("options",t.options)("state",t.state))},directives:[V.O],encapsulation:2}),e})(),W=(()=>{class e extends d.W{constructor(e){super(),this.siteConfigService=e}render(t,r,n){const o=this.siteConfigService.getSiteConfigProp(e.AFFILIATES_SITE_CONFIG_PROP).markets.map((e=>({label:`profileRegistration.multiSelect.market.${e}`,value:e,selected:!1})));let s=new T.f({id:`${t}-target-market-group`,layoutClass:"grey-fieldset target-market",elements:{component:new R({id:`${t}-target-market-component`,component:U,arguments:{config:e.ACTIVITY_MULTI_SELECT_CONFIG,options:o}}),targetMarket:new y.bx({id:`${t}-target-market-selector`,type:"hidden",validators:{}})}});return r||(s.elements.targetMarket.validators.required=null,s.elements.targetMarket.errorMessages.required=e.FIELD_MARKET_ERROR_REQUIRED),s}}return e.FIELD_MARKET_ERROR_REQUIRED="profileRegistration.targetMarket.error_required",e.AFFILIATES_SITE_CONFIG_PROP="affiliates",e.ACTIVITY_MULTI_SELECT_CONFIG={deselectAll:!0,deSelectedByDefault:!1,label:"profileRegistration.multiSelect.targetMarket.label",severalSelectedLabel:"profileRegistration.multiSelect.targetMarket.severalSelected",allSelectedLabel:"profileRegistration.multiSelect.targetMarket.allSelected",noneSelectedLabel:"profileRegistration.multiSelect.targetMarket.noneSelected",severalSelectedLabelPlaceholderName:"profileRegistration.multiSelect.targetMarket.numOfSelectedOptions"},e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](_.r))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var B=r(95111),K=r(28019),Y=r(21377);let H=(()=>{class e extends d.W{constructor(e,t){super(),this.deviceService=e,this.profileDateService=t,this.profileDateService.dateFormat.subscribe((e=>this.profileDateFormat=e)),this.siteConfigProfileDateFormat=this.profileDateService.getSiteConfigDateFormat()}render(e,t){let r={id:`${e}-dateOfBirth`};if(this.deviceService.isDesktop()){let e=this.siteConfigProfileDateFormat?this.siteConfigProfileDateFormat.pattern:this.profileDateFormat.pattern,t=this.siteConfigProfileDateFormat?this.siteConfigProfileDateFormat.mask:this.profileDateFormat.mask,n=this.generateLabelKeyForPattern(e),o=this.generateErrorKeyForPattern(e),s={mask:t,guide:!0,placeholderChar:"_",keepCharPositions:!0};r=Object.assign(r,{label:n,type:"tel",mask:s,dateFormat:e,validators:{validDate:y.D0.validFormattedDate(!1,e),age:y.D0.formattedAge(18,!1,e)},errorMessages:{validDate:o,age:"profileFields.dateOfBirth.error_age"}})}else r=Object.assign(r,{label:"profileFields.dateOfBirth.labelNative",type:"date",max:this.generateMaxDateForLegalAge(),validators:{validDate:y.D0.validFormattedDate(!0),age:y.D0.formattedAge(18,!0)},errorMessages:{validDate:"profileFields.dateOfBirth.error_validDateNative",age:"profileFields.dateOfBirth.error_age"}});let n=new y.bx(r);return t||(n.validators.required=null,n.errorMessages.required="profileFields.dateOfBirth.error_required"),n}generateMaxDateForLegalAge(){return(0,Y.Z)().subtract(18,"years").format("YYYY-MM-DD")}generateLabelKeyForPattern(e){return"profileFields.dateOfBirth."+e+".label"}generateErrorKeyForPattern(e){return"profileFields.dateOfBirth."+e+".error_validDate"}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](B.U),h["ɵɵinject"](K.f))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var Q=r(50243),z=r(75870),Z=r(9601);function J(e,t){1&e&&(h["ɵɵelementStart"](0,"div",1),h["ɵɵtext"](1,"\n "),h["ɵɵelement"](2,"i",2),h["ɵɵtext"](3,"\n "),h["ɵɵelementStart"](4,"span",3),h["ɵɵtext"](5,"profileRegistration.currency.mbtc.message"),h["ɵɵelementEnd"](),h["ɵɵtext"](6,"\n "),h["ɵɵelementStart"](7,"div"),h["ɵɵtext"](8,"\n "),h["ɵɵelementEnd"](),h["ɵɵelementEnd"]())}let X=(()=>{class e{constructor(){}ngOnInit(){if(this.onValueChanges){const e=this.formGroup.controls.currency;this.valueChangesSubscription=e.valueChanges.subscribe((()=>{this.onValueChanges.next(this.formGroup)}))}}ngOnDestroy(){this.valueChangesSubscription&&this.valueChangesSubscription.unsubscribe()}set context(e){this.formGroup=e.formGroup,this.onValueChanges=e.arguments.onValueChanges}isMbtcCurrencySelected(){return"XBT"===this.formGroup.value.currency}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-currency-mbtc-info"]],decls:2,vars:1,consts:[["class","currency-mbtc-info",4,"ngIf"],[1,"currency-mbtc-info"],[1,"icon-info"],[1,"hint-msg",3,"bxTranslate"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵtemplate"](1,J,9,0,"div",0)),2&e&&(h["ɵɵadvance"](1),h["ɵɵproperty"]("ngIf",t.isMbtcCurrencySelected()))},directives:[n.NgIf,Z.P],encapsulation:2}),e})(),ee=(()=>{class e extends d.W{render(e,t,r){const n=[],o=r.currencyDefault||r.currencies[0];for(let e of r.currencies)e===o?n.unshift({name:z.o.getCurrencyCodeToShow(e),code:e}):n.push({name:z.o.getCurrencyCodeToShow(e),code:e});const s=new T.f({id:`${e}-CurrencyGroup`,elements:{currency:new Q.k({id:`${e}-currency`,label:"profileRegistration.currency.label",options:n,displayProperty:"name",valueProperty:"code",value:o,validators:{required:null}})}});return r.fields.includes(l.eT)&&(s.elements.currencyMbtcInfo=new R({id:`${e}-currencyMbtcInfo`,component:X})),s}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),te=(()=>{class e{set context(e){this.country=e.formGroup.value.country}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-country"]],decls:9,vars:1,consts:[[1,"country"],["id","countryName",3,"bxTranslate"],[1,"icon","icon-location"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",0),h["ɵɵtext"](2,"\n "),h["ɵɵelementStart"](3,"span",1),h["ɵɵtext"](4),h["ɵɵelementEnd"](),h["ɵɵtext"](5,"\n "),h["ɵɵelement"](6,"i",2),h["ɵɵtext"](7,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](8,"\n ")),2&e&&(h["ɵɵadvance"](4),h["ɵɵtextInterpolate"]("countries."+t.country))},directives:[Z.P],encapsulation:2}),e})(),re=(()=>{class e extends d.W{render(e,t,r){return new T.f({id:`${e}-CountryGroup`,layoutClass:"country-group",elements:{country:new a.b({id:`${e}-country`,type:"hidden",value:r.countryCode}),component:new R({id:`${e}-country-component`,component:te})}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var ne=r(48661),oe=r(35108);let se=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var ie=r(85499);function ae(e,t){if(1&e){const e=h["ɵɵgetCurrentView"]();h["ɵɵelementStart"](0,"div",3),h["ɵɵtext"](1,"\n "),h["ɵɵelementStart"](2,"span",4),h["ɵɵtext"](3),h["ɵɵelementEnd"](),h["ɵɵtext"](4,"\n "),h["ɵɵelement"](5,"i",5),h["ɵɵtext"](6,"\n "),h["ɵɵelementStart"](7,"span",6),h["ɵɵlistener"]("click",(function(){return h["ɵɵrestoreView"](e),h["ɵɵnextContext"]().modifyCountry()})),h["ɵɵtext"](8,"\n profileRegistration.country.modify\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](9,"\n "),h["ɵɵelementEnd"]()}if(2&e){const e=h["ɵɵnextContext"]();h["ɵɵadvance"](3),h["ɵɵtextInterpolate"]("countries."+e.code)}}function le(e,t){if(1&e){const e=h["ɵɵgetCurrentView"]();h["ɵɵelementStart"](0,"bx-dropdown",7),h["ɵɵlistener"]("change",(function(t){return h["ɵɵrestoreView"](e),h["ɵɵnextContext"]().checkCountry(t)})),h["ɵɵtext"](1,"\n "),h["ɵɵelementEnd"]()}if(2&e){const e=h["ɵɵnextContext"]();h["ɵɵproperty"]("id",e.countryDropdownId)("options",e.countries)("selectedValue",e.code)("forceFilterList",!0)("state",e.selectorState)("errorMessage",e.selectorErrorMsg)}}let de=(()=>{class e{constructor(e,t,r){this.translateService=e,this.profileFormService=t,this.profileFormConfig=r,this.showSelector=!1,this.countryDropdownId="country-dropdown"}ngOnInit(){this.translateCountries(this.profileFormService.getCountriesList()).subscribe((e=>{this.countries=e}))}set context(e){this.formGroup=e.formGroup,this.setCountry(this.formGroup.value.country)}checkCountry(e){if(!e.countryCode&&e.target&&e.target.value){e=this.lookForCountry(e.target.value)||{}}e.allowed||this.skipCountryValidations()&&e.countryCode?(this.profileFormService.loadRegistrationForm(e.countryCode).subscribe((e=>{this.profileFormService.publishRefreshFormEvent(e)})),this.setCountry(e.countryCode),this.toggleShowSelector(!1),this.setError("")):!1===e.allowed?this.setError("profileRegistration.country.error_blocked"):this.setError("profileRegistration.country.error_required")}modifyCountry(){this.toggleShowSelector(!0)}toggleShowSelector(e){this.showSelector=e}setCountry(e){this.code=e,this.formGroup.controls.country.patchValue(e)}translateCountries(e){return(0,q.forkJoin)(e,this.getTranslations(),((e,t)=>(e.map((e=>e.label=t["countries."+e.countryCode]||e.countryCode)),e.sort(((e,t)=>e.label.localeCompare(t.label))))))}setError(e){e?(this.formGroup.setErrors({invalidCountry:null}),this.selectorState="error",this.selectorErrorMsg=e):(this.selectorErrorMsg="",this.selectorState="valid")}getTranslations(){return this.translateService.loadTranslations("countries").pipe((0,P.first)((e=>e&&Object.keys(e).length>0)))}lookForCountry(e){return this.countries.find((t=>t.label===e))}skipCountryValidations(){return oe(!1,["fields","countrySelector","validations","skip"],this.profileFormConfig)}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](ne.s),h["ɵɵdirectiveInject"](i.m),h["ɵɵdirectiveInject"](se,8))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-country-selector"]],decls:8,vars:2,consts:[[1,"country-selector"],["class","country",4,"ngIf"],["label","profileRegistration.country.label","valueProperty","countryCode","displayProperty","label","typeahead","true",3,"id","options","selectedValue","forceFilterList","state","errorMessage","change",4,"ngIf"],[1,"country"],["id","countryName-selector",3,"bxTranslate"],[1,"icon","icon-location"],[1,"custom-link",3,"bxTranslate","click"],["label","profileRegistration.country.label","valueProperty","countryCode","displayProperty","label","typeahead","true",3,"id","options","selectedValue","forceFilterList","state","errorMessage","change"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",0),h["ɵɵtext"](2,"\n "),h["ɵɵtemplate"](3,ae,10,1,"div",1),h["ɵɵtext"](4,"\n "),h["ɵɵtemplate"](5,le,2,6,"bx-dropdown",2),h["ɵɵtext"](6,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](7,"\n ")),2&e&&(h["ɵɵadvance"](3),h["ɵɵproperty"]("ngIf",!t.showSelector),h["ɵɵadvance"](2),h["ɵɵproperty"]("ngIf",t.showSelector))},directives:[n.NgIf,Z.P,ie.J],encapsulation:2}),e})(),ce=(()=>{class e extends d.W{render(e,t,r){return new T.f({id:`${e}-CountrySelectorGroup`,layoutClass:"country-selector-group",elements:{country:new a.b({id:`${e}-country-selector`,type:"hidden",value:r.countryCode}),component:new R({id:`${e}-country-selector-component`,component:de,errorMessages:{required:"profileFields.country.error_required",countryBlocked:"profileFields.country.error_countryBlocked"}})}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();class ue extends d.W{render(e,t,r){let n=new y.bx({id:`${e}-phone`,type:"tel",label:"profileFields.phone.label",layoutClass:"phone-number",onlyNumber:!0,validators:{maxLength:14,pattern:"^("+r.phoneRegex+")$"},errorMessages:{pattern:"profileFields.phone.error_pattern",maxLength:"profileFields.phone.error_pattern",phoneDuplicated:"profileFields.phone.error_duplicated",phoneDuplicatedUpdate:"profileFields.phone.update.error_duplicated"}});return t||(n.validators.required=null,n.errorMessages.required="profileFields.phone.error_required"),n}}class pe extends d.W{render(e,t,r){return new a.b({id:`${e}-phonePrefix`,value:"+"+r.phonePrefix,label:"",type:"tel",layoutClass:"phone-prefix",disabled:!0})}}let fe=(()=>{class e extends d.W{render(e,t,r){let n=(new ue).render(e,t,r),o=(new pe).render(e,t,r);return new T.f({id:`${e}-phoneGroup`,layoutClass:"phone-group",elements:{phonePrefix:o,phoneNumber:n}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),me=(()=>{class e{render(e,t){let r=new a.b({id:`${e}-fourDigitPinCode`,label:"profileFields.fourDigitPinCode.label",type:"tel",onlyNumber:!0,validators:{maxLength:4,pattern:"^[0-9]{4}$"},errorMessages:{maxLength:"profileFields.fourDigitPinCode.error_length",pattern:"profileFields.fourDigitPinCode.error_length"}});return t||(r.validators.required=null,r.errorMessages.required="profileFields.fourDigitPinCode.error_required"),r}shouldBeRendered(){return!0}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),ge=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-addressLine`,type:"text",label:"profileFields.addressLine.label",validators:{minLength:2,maxLength:65,bxValidName:null},errorMessages:{minLength:"profileFields.addressLine.error_minLength",maxLength:"profileFields.addressLine.error_maxLength",error_pattern:"profileFields.validCharacters.error_pattern"}});return t||(r.validators.required=null,r.validators.bxNoWhitespacesName=null,r.errorMessages.required="profileFields.addressLine.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var he=r(77976),ve=r(92934);let be=(()=>{class e extends d.W{render(e,t){return new ve.H({id:`${e}-termsandconditions`,label:"profileFields.termsAndConditions.label",layoutClass:"terms-and-conditions",validators:{required:null,bxChecked:null},errorMessages:{required:"profileFields.termsAndConditions.error_required",bxChecked:"profileFields.termsAndConditions.error_checked"}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var ye=r(23550);let Ce=(()=>{class e{constructor(e){this.http=e}lookup(t,r){return this.http.get(e.LOOKUP_URL.replace("{country}",t),{params:{postalCode:r}}).pipe((0,P.map)((e=>e.addresses.map((e=>({city:e.city,subdivision:e.subdivision,subdivisionStatus:e.subdivisionStatus}))))),(0,P.catchError)((e=>404==e.status?(0,q.of)([]):(0,q.throwError)(e))))}}return e.LOOKUP_URL="/services/site-config/v1/countries/{country}/address/lookup",e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](ye.HttpClient))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),xe=(()=>{class e{ngOnInit(){let e=this.formGroup.controls.postalCode;this.onValueChanges&&e.valueChanges.subscribe((()=>{this.onValueChanges.next(this.formGroup)}))}getLabel(e,t){let r=[];return e&&r.push(e),t&&r.push(t),r.join(", ")}set context(e){this.formGroup=e.formGroup,this.onValueChanges=e.arguments.onValueChanges}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-postalCode"]],decls:1,vars:1,template:function(e,t){1&e&&h["ɵɵtext"](0),2&e&&h["ɵɵtextInterpolate"](t.getLabel(t.formGroup.value.city,t.formGroup.value.subdivision))},encapsulation:2}),e})(),Fe=(()=>{class e extends d.W{constructor(e){super(),this.addressLookupService=e}render(e,t,r){let n=new T.f({id:`${e}-postalCodeGroup`,elements:{postalCode:new a.b({id:`${e}-postalCode`,type:"text",label:r.postalCodeLabel?`profileFields.postalCode.${r.postalCodeLabel}.label`:"profileFields.postalCode.label",layoutClass:r.postalCodeLookupAvailable?"postalCode":"",validators:{patternOrEmpty:e=>!e.value||""===e.value.trim()||e.value.match(r.postalCodeRegex)?null:{patternOrEmpty:null},maxLength:12},errorMessages:{patternOrEmpty:r.postalCodeLabel?`profileFields.postalCode.${r.postalCodeLabel}.error_pattern`:"profileFields.postalCode.error_pattern",maxLength:r.postalCodeLabel?`profileFields.postalCode.${r.postalCodeLabel}.error_pattern`:"profileFields.postalCode.error_pattern"}})}});if(!t||r.mandatoryPostalCode){const e=n.elements.postalCode;e.validators.required=null,e.validators.bxNoWhitespacesName=null,e.errorMessages.required=r.postalCodeLabel?`profileFields.postalCode.${r.postalCodeLabel}.error_required`:"profileFields.postalCode.error_required"}if(r.postalCodeLookupAvailable){n.elements=c(n.elements,{postalCodeLabels:new R({id:`${e}-postalCodeLabels`,component:xe,arguments:{countryCode:r.countryCode}}),subdivision:new a.b({id:`${e}-subdivision`,type:"hidden"}),subdivisionStatus:new a.b({id:`${e}-subdivisionStatus`,type:"hidden"})}),r.fields.filter((e=>-1!==e.indexOf(l.zc))).length>0||(n.elements.city=new a.b({id:`${e}-city`,type:"hidden",layoutClass:"city"}));let t=new q.Subject;n.elements.postalCodeLabels.arguments.onValueChanges=t,t.pipe((0,P.filter)((e=>{let t=e.controls.postalCode.valid;return this.clearSubdivisionCityAndStatus(e),e.controls.subdivision.markAsUntouched(),t})),(0,P.debounceTime)(1e3)).subscribe((e=>{let t=e.controls.postalCode;this.addressLookupService.lookup(r.countryCode,t.value).subscribe((t=>{t.length>0?e.patchValue({subdivision:t[0].subdivision,city:t[0].city,subdivisionStatus:t[0].subdivisionStatus}):this.clearSubdivisionCityAndStatus(e),e.valid||Object.values(e.controls).forEach((e=>e.markAsTouched()))}))})),r.mandatorySubdivision&&(n.elements.subdivision.errorMessages.subdivisionRequired=r.postalCodeLabel?`profileFields.subdivision.${r.postalCodeLabel}.error_required`:"profileFields.subdivision.not_matching"),"state"==r.stateLabel||"province"==r.stateLabel?n.elements.subdivision.errorMessages.subdivisionBlocked=`profileFields.subdivision.${r.stateLabel}.error_jurisdiction`:n.elements.subdivision.errorMessages.subdivisionBlocked="profileFields.subdivision.error_jurisdiction",n.validator=(o=r.mandatorySubdivision,s=r.allowUpdateToBlockedSubdivision,e=>{let t=e.controls.postalCode;if(null==t.errors||p(t.errors)){let r=function(e,t){let r=e.controls.subdivisionStatus,n=e.controls.subdivision;return"BLOCKED"==r.value?(t.setErrors({}),n.setErrors({subdivisionBlocked:null}),!1):(t.setErrors(null),n.setErrors(null),!0)}(e,t);if(!r&&!s)return null;o&&function(e,t){let r=e.controls.subdivision;r.value?(t.setErrors(null),r.setErrors(null)):(t.setErrors({}),r.setErrors({subdivisionRequired:null}))}(e,t)}return null})}var o,s;return n}clearSubdivisionCityAndStatus(e){e.patchValue({subdivision:void 0,city:void 0,subdivisionStatus:void 0})}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](Ce))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),_e=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=h["ɵɵdefineNgModule"]({type:e}),e.ɵinj=h["ɵɵdefineInjector"]({providers:[Ce]}),e})();var Se=r(12336),we=r(99132),Le=r(24258),Ie=r(20280);let Me=(()=>{class e extends d.W{render(e,t,r){let n=new a.b({id:`${e}-passwordAffiliate`,label:"profileRegistration.passwordAffiliate.label",type:"password",validators:{minLength:8,maxLength:30,password:null,pattern:/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\W)?.*/},errorMessages:{minLength:"profileRegistration.passwordAffiliate.error_minLength",maxLength:"profileRegistration.passwordAffiliate.error_maxLength",password:"profileRegistration.passwordAffiliate.error_password",containsUsername:"profileRegistration.passwordAffiliate.error_containsUsername",containsNickname:"profileRegistration.passwordAffiliate.error_containsNickname",containsFirstName:"profileRegistration.passwordAffiliate.error_containsFirstName",containsLastName:"profileRegistration.passwordAffiliate.error_containsLastName"}});return r.rulesCheckerEnabled&&(n.rulesChecker=[{rules:["minLength","maxLength","required"],translate:"profileFields.passwordAffiliate.rule_checker_length"},{rules:["pattern","required"],translate:"profileFields.password.rule_checker_capitalLowerNumber"},{rules:["containsNickname","containsFirstName","containsUsername","containsLastName","required"],translate:"profileFields.password.rule_checker_personalData"}]),t||(n.validators.required=null,n.errorMessages.required="profileRegistration.passwordAffiliate.error_required"),n.groupValidator={personalDataInAffiliatePassword:function(e){return f(e,e.controls[l.WC],n.errorMessages)}},n}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var Ee=r(24426);let ke=(()=>{class e{constructor(t){this.cd=t,this.state=e.STATE_NOT_SET,this.dirty=!1,this.selectedProducts=[]}set context(e){this.formGroup=e.formGroup,this.config=arguments[0].arguments.config,this.options=arguments[0].arguments.options}ngOnInit(){this.formGroup.controls.targetProduct.valueChanges.subscribe((e=>{0===this.selectedProducts.length&&e&&e.length>0&&this.setSelectedOptions(e)}))}ngAfterViewInit(){this.cd.detectChanges()}updateMessageTargetProduct(t){const r=t.filter((e=>e.selected));this.setTargetProductValue(r.map((e=>e.value))),!this.dirty&&r&&r.length>0&&(this.dirty=!0),this.dirty&&(this.state=r.length>0?e.STATE_VALID:e.STATE_ERROR)}setTargetProductValue(e){this.selectedProducts=e,this.formGroup.controls.targetProduct.patchValue(e)}setSelectedOptions(e){let t=Ee(this.options);t.forEach((t=>{e.indexOf(t.value)>=0&&(t.selected=!0)})),this.options=t}}return e.STATE_VALID="valid",e.STATE_ERROR="error",e.STATE_NOT_SET="",e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](h.ChangeDetectorRef))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-target-product-selector"]],decls:3,vars:3,consts:[[3,"config","options","state","optionsUpdated"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"bx-multi-select",0),h["ɵɵlistener"]("optionsUpdated",(function(e){return t.updateMessageTargetProduct(e)})),h["ɵɵelementEnd"](),h["ɵɵtext"](2,"\n ")),2&e&&(h["ɵɵadvance"](1),h["ɵɵproperty"]("config",t.config)("options",t.options)("state",t.state))},directives:[V.O],encapsulation:2}),e})();var Re=r(91934);function Te(e,t,r){const n={};for(let o of t.subscriptionChannels){const t=r.subscriptionChannels.indexOf(o)>-1;n[o]=new ve.H({id:`${e}-${o}-subscriptionChannels`,label:`profileFields.subscriptionChannels.${o}.label`,layoutClass:"subscription-channels",checked:t,value:t})}return n}let qe=(()=>{class e extends d.W{render(e,t,r,n){const o=new T.f({id:`${e}-subscriptionChannelsGroup`,elements:Te(e,r,n)});return new Re.R({id:`${e}-subscriptionChannelsSet`,elements:{subscriptionChannels:o}})}shouldBeRendered(e){return 0!=e.subscriptionChannels.length}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),Pe=(()=>{class e extends d.W{constructor(e){super(),this.siteConfigService=e}render(t,r,n){const o=this.siteConfigService.getSiteConfigProp(e.AFFILIATES_SITE_CONFIG_PROP).products.map((e=>({label:`profileRegistration.multiSelect.product.${e}`,value:e,selected:!1})));let s=new T.f({id:`${t}-target-product-group`,layoutClass:"grey-fieldset target-product",elements:{component:new R({id:`${t}-target-product-component`,component:ke,arguments:{config:e.ACTIVITY_MULTI_SELECT_CONFIG,options:o}}),targetProduct:new y.bx({id:`${t}-target-product-selector`,type:"hidden",validators:{}})}});return r||(s.elements.targetProduct.validators.required=null,s.elements.targetProduct.errorMessages.required=e.FIELD_PRODUCT_ERROR_REQUIRED),s}}return e.FIELD_PRODUCT_ERROR_REQUIRED="profileRegistration.targetProduct.error_required",e.AFFILIATES_SITE_CONFIG_PROP="affiliates",e.ACTIVITY_MULTI_SELECT_CONFIG={deselectAll:!0,deSelectedByDefault:!1,label:"profileRegistration.multiSelect.targetProduct.label",severalSelectedLabel:"profileRegistration.multiSelect.targetProduct.severalSelected",allSelectedLabel:"profileRegistration.multiSelect.targetProduct.allSelected",noneSelectedLabel:"profileRegistration.multiSelect.targetProduct.noneSelected",severalSelectedLabelPlaceholderName:"profileRegistration.multiSelect.targetProduct.numOfSelectedOptions"},e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](_.r))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var Ne=(()=>(function(e){e[e.username=0]="username",e[e.phone=1]="phone",e[e.usernameOrPhone=2]="usernameOrPhone"}(Ne||(Ne={})),Ne))();let Oe=(()=>{class e{constructor(e){this.route=e}ngOnInit(){this.instantMessages=this.route.snapshot.data.registration.formConfiguration.instantMessages,this.formGroup.controls.method.valueChanges.subscribe((e=>{"string"==typeof e&&(this.code=e)}))}set context(e){this.formGroup=e.formGroup,this.required=arguments[0].arguments.required}instantMessageMethodChanged(t){this.cleanupGroupErrors(),t.type in Ne?(this.disableAllControlTypes(),this.code=t.code,this.setMethodValue(t.code),t.type.toString()!==Ne[Ne.phone]&&this.formGroup.controls[t.type].enable(),this.setError()):this.required&&this.setError(e.ERROR_REQUIRED_MESSAGE)}disableAllControlTypes(){for(let e in Ne)this.formGroup.controls[e]&&this.formGroup.controls[e].disable()}setError(t=""){this.errorMessage=t,this.state=t?e.ERROR_STATE:e.VALID_STATE}cleanupGroupErrors(){this.setMethodValue({status:e.VALID_STATE})}setMethodValue(e){this.formGroup.controls.method.patchValue(e)}}return e.VALID_STATE="valid",e.ERROR_STATE="error",e.ERROR_REQUIRED_MESSAGE="profileRegistration.instantMessage.method.error_required",e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](o.ActivatedRoute))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-registration-instantMessage-selector"]],decls:7,vars:5,consts:[[1,"instant-message-method"],["id","instant-message-method-dropdown","label","profileRegistration.instantMessage.method.label","valueProperty","code","displayProperty","code","forceFilterList","true","typeahead","true",3,"options","selectedValue","errorMessage","state","required","change"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",0),h["ɵɵtext"](2,"\n "),h["ɵɵelementStart"](3,"bx-dropdown",1),h["ɵɵlistener"]("change",(function(e){return t.instantMessageMethodChanged(e)})),h["ɵɵtext"](4,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](5,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](6,"\n ")),2&e&&(h["ɵɵadvance"](3),h["ɵɵproperty"]("options",t.instantMessages)("selectedValue",t.code)("errorMessage",t.errorMessage)("state",t.state||(t.formGroup.get("method").touched?t.formGroup.get("method").errors?"error":"valid":""))("required",t.required))},directives:[ie.J],encapsulation:2}),e})(),Ae=(()=>{class e{constructor(){}render(e,t,r){let n=new T.f({id:`${e}-instant-message-group`,layoutClass:"instant-message",elements:{component:new R({id:`${e}-instant-message-component`,component:Oe,arguments:{required:!t}}),method:new y.bx({id:`${e}-instant-message-method-selector`,type:"hidden",validators:{}}),username:new y.bx({id:`${e}-instant-message-username`,disabled:!0,layoutClass:"type-username",type:"text",label:"profileRegistration.instantMessage.username.label",validators:{minLength:6,maxLength:20,pattern:"^[^\\\\%&*()+=/\\<>!?,[\\]'`|${}£]*$"},errorMessages:{minLength:"profileRegistration.instantMessage.username.error_minLength",maxLength:"profileRegistration.instantMessage.username.error_maxLength",pattern:"profileRegistration.instantMessage.username.error_valid_characters_pattern"}}),usernameOrPhone:new y.bx({id:`${e}-instant-message-username-or-phone`,disabled:!0,layoutClass:"type-username-or-phone",type:"text",label:"profileRegistration.instantMessage.username.label",validators:{minLength:6,maxLength:20},errorMessages:{minLength:"profileRegistration.instantMessage.username.error_minLength",maxLength:"profileRegistration.instantMessage.username.error_maxLength"}})}});return t||(n.elements.method.validators.required=null,n.elements.method.errorMessages.required="profileRegistration.instantMessage.method.error_required",n.elements.username.validators.required=null,n.elements.username.errorMessages.required="profileRegistration.instantMessage.username.error_required"),n}shouldBeRendered(e){return!!e.instantMessages}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();class $e extends d.W{render(e,t,r){let n=new y.bx({id:`${e}-phone`,type:"telMasked",label:"profileFields.phone.label",layoutClass:"phone-number",onlyNumber:!0,validators:{maxLength:14,pattern:"^("+r.phoneRegex+")$"},errorMessages:{pattern:"profileFields.phone.error_pattern",maxLength:"profileFields.phone.error_pattern",phoneDuplicated:"profileFields.phone.error_duplicated",phoneDuplicatedUpdate:"profileFields.phone.update.error_duplicated"}});return t||(n.validators.required=null,n.errorMessages.required="profileFields.phone.error_required"),n}}let De=(()=>{class e extends d.W{render(e,t,r){let n=(new $e).render(e,t,r),o=(new pe).render(e,t,r);return new T.f({id:`${e}-phoneGroup`,layoutClass:"phone-group",elements:{phonePrefix:o,phoneNumber:n}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),je=(()=>{class e extends d.W{render(e,t){let r=new a.b({id:`${e}-relatedAccount`,type:"text",label:"profileFields.relatedAccount.label",validators:{pattern:"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},errorMessages:{pattern:"profileFields.relatedAccount.error_pattern",notFoundRelatedAccount:"profileFields.relatedAccount.error_not_found_related_account_id",duplicatedAssociation:"profileFields.relatedAccount.error_duplicated_association"}});return t||(r.validators.required=null,r.validators.bxNoWhitespacesName=null,r.errorMessages.required="profileFields.relatedAccount.error_required"),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();function Ge(e,t){1&e&&h["ɵɵelementContainer"](0)}function Ve(e,t){1&e&&h["ɵɵelementContainer"](0)}const Ue=function(e){return{brandName:e}},We=function(e){return{label:"profileUpdateAccount.hostPreferences.hostRequested.tooltip",tag:"textContent",values:e}},Be=function(e){return[e]};function Ke(e,t){if(1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",2),h["ɵɵtext"](2,"\n "),h["ɵɵelement"](3,"i",3),h["ɵɵtext"](4,"\n "),h["ɵɵelementStart"](5,"div"),h["ɵɵtext"](6,"\n "),h["ɵɵelement"](7,"p",4),h["ɵɵtext"](8,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](9,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](10,"\n ")),2&e){const e=t.position,r=h["ɵɵnextContext"]();h["ɵɵadvance"](1),h["ɵɵclassProp"]("visible-on-breakpoint","bottom-right"===e),h["ɵɵadvance"](4),h["ɵɵclassMapInterpolate1"]("tooltip-popover-msg ",e,""),h["ɵɵadvance"](2),h["ɵɵproperty"]("bxTranslate",h["ɵɵpureFunction1"](10,Be,h["ɵɵpureFunction1"](8,We,h["ɵɵpureFunction1"](6,Ue,r.brandName))))}}const Ye=function(){return{position:"right"}},He=function(){return{position:"bottom-right"}};let Qe=(()=>{class e{constructor(e){this.siteConfigService=e}ngOnInit(){this.brandName=this.siteConfigService.getSiteConfigProp("brandLabel")}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](_.r))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["ng-component"]],decls:8,vars:6,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],["tooltip",""],[1,"tooltip-popover-container"],[1,"icon","icon-info","host-requested-info-icon","tooltip-toggle"],[3,"bxTranslate"]],template:function(e,t){if(1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵtemplate"](1,Ge,1,0,"ng-container",0),h["ɵɵtext"](2,"\n "),h["ɵɵtemplate"](3,Ve,1,0,"ng-container",0),h["ɵɵtext"](4,"\n "),h["ɵɵtemplate"](5,Ke,11,12,"ng-template",null,1,h["ɵɵtemplateRefExtractor"]),h["ɵɵtext"](7,"\n ")),2&e){const e=h["ɵɵreference"](6);h["ɵɵadvance"](1),h["ɵɵproperty"]("ngTemplateOutlet",e)("ngTemplateOutletContext",h["ɵɵpureFunction0"](4,Ye)),h["ɵɵadvance"](2),h["ɵɵproperty"]("ngTemplateOutlet",e)("ngTemplateOutletContext",h["ɵɵpureFunction0"](5,He))}},directives:[n.NgTemplateOutlet,Z.P],encapsulation:2}),e})(),ze=(()=>{class e extends d.W{constructor(e){super(),this.siteConfigService=e}render(e,t,r,n){return new T.f({id:`${e}-hostRequestedGroup`,elements:{hostRequested:this.createCheckboxModel(e),infoIcon:this.createInfoIconModel(e)},layoutClass:"host-requested"})}createCheckboxModel(e){return new ve.H({id:`${e}-hostRequested`,label:"profileUpdateAccount.hostPreferences.hostRequested.label",labelValues:{brandName:this.siteConfigService.getSiteConfigProp("brandLabel")}})}createInfoIconModel(e){return new R({id:`${e}-infoIcon`,component:Qe})}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵinject"](_.r))},e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),Ze=(()=>{class e{set context(e){this.title=`profileFields.${e.arguments.title}.label`}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["bx-title-section-form"]],decls:7,vars:1,consts:[[1,"title-section-form"],["id","title-section-form",3,"bxTranslate"]],template:function(e,t){1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",0),h["ɵɵtext"](2,"\n "),h["ɵɵelementStart"](3,"span",1),h["ɵɵtext"](4),h["ɵɵelementEnd"](),h["ɵɵtext"](5,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](6,"\n ")),2&e&&(h["ɵɵadvance"](4),h["ɵɵtextInterpolate"](t.title))},directives:[Z.P],encapsulation:2}),e})(),Je=(()=>{class e extends d.W{render(e,t,r,n,o){return o=o.split(":")[1],new T.f({id:`${e}-title-${o}`,layoutClass:"title-section-group",elements:{component:new R({id:`${e}-title-section-${o}`,component:Ze,arguments:{title:o}})}})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),Xe=(()=>{class e extends d.W{render(e,t,r,n,o){let s=new y.kx({id:`${e}-hourPicker-${o}`,label:`${e}.hostPreferences.${o}.label`,options:[],valueProperty:"value",layoutClass:"dropdown-height-limited"});return t||(s.validators.required=null,s.errorMessages.required="profileFields.hourPicker.error_required"),s}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var et=r(50788);let tt=(()=>{class e extends d.W{render(e,t){let r=new y.kx({id:`${e}-frequency`,label:`${e}.hostPreferences.frequency.label`,options:[],displayProperty:"text",valueProperty:"code"});return t||(r.validators.required=null,r.errorMessages.required=`${e}.hostPreferences.frequency.error_required`),r}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();function rt(e,t){1&e&&h["ɵɵelementContainer"](0)}function nt(e,t){1&e&&h["ɵɵelementContainer"](0)}const ot=function(e){return{linkTooltip:e}},st=function(e){return{label:"profileUpdateAccount.general.acceptsGifts.tooltip",tag:"textContent",values:e}},it=function(e){return[e]};function at(e,t){if(1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",4),h["ɵɵtext"](2,"\n "),h["ɵɵelement"](3,"i",5),h["ɵɵtext"](4,"\n "),h["ɵɵelementStart"](5,"div"),h["ɵɵtext"](6,"\n "),h["ɵɵelement"](7,"p",1),h["ɵɵtext"](8,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](9,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](10,"\n ")),2&e){const e=t.position,r=h["ɵɵnextContext"]();h["ɵɵadvance"](1),h["ɵɵclassProp"]("visible-on-breakpoint","bottom-right"===e),h["ɵɵadvance"](4),h["ɵɵclassMapInterpolate1"]("tooltip-popover-msg ",e,""),h["ɵɵadvance"](2),h["ɵɵproperty"]("bxTranslate",h["ɵɵpureFunction1"](10,it,h["ɵɵpureFunction1"](8,st,h["ɵɵpureFunction1"](6,ot,r.linkTooltip))))}}const lt=function(e){return{brandName:e}},dt=function(e){return{label:"profileFields.acceptsGifts.label",tag:"textContent",values:e}},ct=function(){return{position:"right"}},ut=function(){return{position:"bottom-right"}};let pt=(()=>{class e{constructor(e){this.siteConfigService=e}ngOnInit(){this.brandName=this.siteConfigService.getSiteConfigProp("brandLabel"),this.linkTooltip=this.siteConfigService.getSiteConfigProp("acceptsGiftsLinkTooltip")}}return e.ɵfac=function(t){return new(t||e)(h["ɵɵdirectiveInject"](_.r))},e.ɵcmp=h["ɵɵdefineComponent"]({type:e,selectors:[["ng-component"]],decls:13,vars:13,consts:[[1,"accepts-gifts-label"],[3,"bxTranslate"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["tooltip",""],[1,"tooltip-popover-container"],[1,"icon","icon-info","tooltip-toggle"]],template:function(e,t){if(1&e&&(h["ɵɵtext"](0,"\n "),h["ɵɵelementStart"](1,"div",0),h["ɵɵtext"](2,"\n "),h["ɵɵelement"](3,"div",1),h["ɵɵtext"](4,"\n "),h["ɵɵtemplate"](5,rt,1,0,"ng-container",2),h["ɵɵtext"](6,"\n "),h["ɵɵtemplate"](7,nt,1,0,"ng-container",2),h["ɵɵtext"](8,"\n "),h["ɵɵelementEnd"](),h["ɵɵtext"](9,"\n "),h["ɵɵtemplate"](10,at,11,12,"ng-template",null,3,h["ɵɵtemplateRefExtractor"]),h["ɵɵtext"](12,"\n ")),2&e){const e=h["ɵɵreference"](11);h["ɵɵadvance"](3),h["ɵɵproperty"]("bxTranslate",h["ɵɵpureFunction1"](9,it,h["ɵɵpureFunction1"](7,dt,h["ɵɵpureFunction1"](5,lt,t.brandName)))),h["ɵɵadvance"](2),h["ɵɵproperty"]("ngTemplateOutlet",e)("ngTemplateOutletContext",h["ɵɵpureFunction0"](11,ct)),h["ɵɵadvance"](2),h["ɵɵproperty"]("ngTemplateOutlet",e)("ngTemplateOutletContext",h["ɵɵpureFunction0"](12,ut))}},directives:[Z.P,n.NgTemplateOutlet],encapsulation:2}),e})(),ft=(()=>{class e extends d.W{render(e,t){const r=`${e}-acceptsGifts`;return new T.f({id:`${r}-group`,elements:{label:this.createLabelComponentModel(r),acceptsGiftsModel:this.createDropdownModel(r,t)},layoutClass:"profile-update-accepts-gifts"})}createDropdownModel(e,t){const r=new Q.k({id:e,label:"profileUpdateAccount.general.acceptsGifts.label",options:[],displayProperty:"name",valueProperty:"code"});return t||(r.validators.required=null,r.errorMessages.required="profileUpdateAccount.general.acceptsGifts.error_required"),r}createLabelComponentModel(e){return new R({id:`${e}-label`,component:pt})}}return e.ɵfac=function(){let t;return function(r){return(t||(t=h["ɵɵgetInheritedFactory"](e)))(r||e)}}(),e.ɵprov=h["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();class mt extends d.W{render(e,t){const r=new Q.k({id:`${e}-preferredContact`,label:`${e}.hostPreferences.preferredContactMethod.label`,options:[],displayProperty:"label",valueProperty:"brandAdminKey"});return t||(r.validators.required=null,r.errorMessages.required="profileUpdateAccount.hostPreferences.preferredContactMethod.error_required"),r}shouldBeRendered(e){return e&&e.hostedContactMethods&&!!e.hostedContactMethods.length}}r(89038);let gt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=h["ɵɵdefineNgModule"]({type:e,bootstrap:[Ie.O,U,ke]}),e.ɵinj=h["ɵɵdefineInjector"]({providers:[i.m,et.z,{provide:l.jg,useClass:w},{provide:l.ZY,useClass:L.u},{provide:l.V,useClass:b},{provide:l.Md,useClass:v},{provide:l.mi,useClass:Me},{provide:l.iY,useClass:D},{provide:l.be,useClass:A},{provide:l.sz,useClass:$},{provide:l.TH,useClass:ee},{provide:l.gP,useClass:H},{provide:l.Z$,useClass:me},{provide:l.Hz,useClass:re},{provide:l.GT,useClass:ce},{provide:l.JR,useClass:fe},{provide:l.Vo,useClass:De},{provide:l.Gk,useClass:be},{provide:l.nr,useClass:Fe},{provide:l.jQ,useClass:O},{provide:l.yE,useClass:ge},{provide:l.XW,useClass:I},{provide:l.IM,useClass:j},{provide:l.XU,useClass:G},{provide:l.qC,useClass:W},{provide:l.J$,useClass:Pe},{provide:l.Et,useClass:Ae},{provide:l.mi,useClass:Me},{provide:l.Sk,useClass:C},{provide:l.O0,useClass:x},{provide:l.Ty,useClass:F},{provide:l.TC,useClass:qe},{provide:l.b7,useClass:je},{provide:l.A3,useClass:ze},{provide:l.vd,useClass:Je},{provide:l.uK,useClass:Xe},{provide:l.lg,useClass:Xe},{provide:l.kQ,useClass:tt},{provide:l.TE,useClass:ft},{provide:l.L6,useClass:mt}],imports:[[n.CommonModule,o.RouterModule,s.E.withComponents([te,de,xe,X,N,Oe,Ze]),he.a,_e,Se.k,we.q,Le.gM.forRoot()]]}),e})()}}]);