PageSourceSearch

https://www.celebritycruises.com/myaccount/1547.74b0eabb0ae592e8.js

js celebritycruises.com collected 2026-09-24 09:01:09 UTC 17,146 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcelebrity=self.webpackChunkcelebrity||[]).push([[1547],{91547:(U,g,i)=>{i.r(g),i.d(g,{ContactInformationComponent:()=>P});var t=i(54438),c=i(89417),h=i(68018),_=i(66693),u=i(49287),T=i(84887),I=i(45312),d=i(89469),y=i(31369),C=i(33002),m=i(23228),M=i(16769),A=i(75901),v=i(35274),f=i(7673);const S=["contactFormElement"];function N(s,b){if(1&s&&t.nrm(0,"app-input-date",11),2&s){const n=t.XpG();t.Y8G("brand",n.brand)("labels",n.dateLabels())}}function R(s,b){if(1&s&&(t.nrm(0,"app-input-phone",12),t.nI1(1,"translate")),2&s){const n=t.XpG();t.Y8G("brand",n.brand)("label",t.bMT(1,3,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_COUNTRY_CODE"))("phoneCallingCodes",n.phoneCallingCodes())}}function D(s,b){if(1&s&&(t.nrm(0,"app-input",13),t.nI1(1,"translate")),2&s){const n=t.XpG();t.Y8G("brand",n.brand)("label",t.bMT(1,2,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_EMAIL_ADDRESS"))}}function F(s,b){if(1&s&&(t.nrm(0,"app-dropdown",15),t.nI1(1,"translate")),2&s){const n=t.XpG();t.Y8G("brand",n.brand)("label",t.bMT(1,3,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_STATE"))("options",n.states)}}let P=(()=>{class s{constructor(){this.translateService=(0,t.WQX)(h.c$),this.formBuilder=(0,t.WQX)(c.ok),this.formService=(0,t.WQX)(u.ux),this.accountFacade=(0,t.WQX)(u.PP),this.countriesFacade=(0,t.WQX)(T.y),this.utilityService=(0,t.WQX)(u.QY),this.analyticInteraction=(0,t.WQX)(u.Ue),this.injector=(0,t.WQX)(t.zZn),this.unSavedChangesFacade=(0,t.WQX)(A.nH),this.asyncValidators=(0,t.WQX)(v.k),this.subscriptions=[],this.accountLoading=this.accountFacade.getAccountLoading,this.accountData=this.accountFacade.getAccountData,this.countryData=this.countriesFacade.countries,this.brand=I.qt,this.stateVisible=(0,t.vPA)(!1),this.states=[],this.formTouched=(0,t.vPA)(!1),this.contactForm=this.formBuilder.group({firstName:["",(0,m.Dc)("VALIDATORS.ENTER_YOUR_FIRST_NAME","VALIDATORS.FIRSTNAME_MINIMUM_CHARACTERS","VALIDATORS.FIRSTNAME_MAXIMUM_CHARACTERS")],middleName:[""],lastName:["",(0,m.Dc)("VALIDATORS.ENTER_YOUR_LAST_NAME","VALIDATORS.LASTNAME_MINIMUM_CHARACTERS","VALIDATORS.LASTNAME_MAXIMUM_CHARACTERS")],suffix:[""],gender:[""],birthdate:[{month:"",day:"",year:""},(0,M.sD)()],uid:[null],phone:[""],country:["",(0,m.yt)(C.y.MAKE_SELECTION)],state:["",(0,m.yt)(C.y.MAKE_SELECTION)],citizenship:[""],isFirstResponder:!1,isMilitary:!1}),this.phoneCallingCodes=this.countriesFacade.phoneCallingCodes,this.isUidTypeEmail=(0,t.EWP)(()=>this.accountData().uidType===_.nd.EMAIL),this.countrys=(0,t.EWP)(()=>this.countryData().map(({countryName:n,countryCode:a})=>({name:n,value:a}))),this.citizenship=(0,t.EWP)(()=>this.countryData().map(({countryName:n,countryCode:a})=>({name:n,value:a}))),this.suffixDropdownOptions=[{name:"",value:""},{name:"Sr.",value:"Sr."},{name:"Jr.",value:"Jr."},{name:"I",value:"I"},{name:"II",value:"II"},{name:"III",value:"III"},{name:"IV",value:"IV"},{name:"V",value:"V"},{name:"MBE",value:"MBE"}],this.genderDropdownOptions=[],this.dateLabels=(0,t.vPA)(null)}loadStatesCountry(n){const a=this.countryData().find(e=>e.countryCode===n);this.states=a?[{name:"Select state",value:""},...a.statesProvinces.map(({name:e,code:o})=>({name:e,value:o}))]:[{name:"Select state",value:""}]}ngOnInit(){this.countriesFacade.areCountriesLoaded()||this.subscriptions.push(this.countriesFacade.loadCountries().subscribe()),this.initializeTranslatedOptions(),this.setFormDefaultValues(),this.trackPageView(),this.unSavedChangesFacade.setHasUnSavedChangesSubscription(this.contactForm),this.setupFormTouchedListener()}ngOnDestroy(){this.unSavedChangesFacade.destroyUnSavedChangesSubscription(),this.unSavedChangesFacade.clearSate(),this.subscriptions.forEach(n=>n.unsubscribe())}initializeTranslatedOptions(){this.genderDropdownOptions=[{name:"",value:""},{name:this.translateService.instant("COMMON.MALE"),value:"M"},{name:this.translateService.instant("COMMON.FEMALE"),value:"F"}],this.dateLabels.set({month:"MM",day:"DD",year:"YYYY",value:this.translateService.instant("COMMON.DATE_OF_BIRTH")})}setFormDefaultValues(){(0,t.QZP)(()=>{const n=this.accountData(),a=this.countryData();if(n.accountId&&a.length){const e=this.resolveCountryCode(n.contactInformation?.address?.residencyCountryCode),o=n.contactInformation?.address?.state;this.setStateDropdownOptions(e),this.contactForm.reset({uid:this.setUidDefaultValue(),firstName:n.personalInformation.firstName,middleName:n.personalInformation.middleName,lastName:n.personalInformation.lastName,suffix:n.personalInformation.suffix,gender:n.personalInformation.gender,birthdate:this.parseBirthdate(n.personalInformation.birthdate),country:e,state:o,citizenship:n.travelDocumentInformation.citizenshipCountryCode,isFirstResponder:n.personalInformation.isFirstResponder??!1,isMilitary:n.personalInformation.isMilitary??!1}),this.storeInitialUidValue(),this.setValidationsForUid(),this.formTouched.set(!1)}},{injector:this.injector,allowSignalWrites:!0})}resolveCountryCode(n){const a=this.normalizeCountryValue(n);if(!a)return"";const e=this.countryData(),o=[r=>this.normalizeCountryValue(r.countryCode)===a,r=>this.normalizeCountryValue(r.countryCodeAlpha2)===a,r=>this.normalizeCountryValue(r.countryName)===a];for(const r of o){const l=e.find(r);if(l?.countryCode)return l.countryCode}return""}normalizeCountryValue(n){return n?.trim().toUpperCase()||""}setValidationsForUid(){const n=this.isUidTypeEmail()?[(0,M._G)({isOptional:!0})]:[c.k0.pattern(y.Xw)];this.contactForm.controls.uid.setValidators(n),this.setAdditionalValidators()}setAdditionalValidators(){this.isUidTypeEmail()?(this.contactForm.controls.uid.setAsyncValidators([n=>{const a=n.value,e=a?.phoneNumber||"",o=a?.countryCode||"";if(!e)return(0,f.of)(null);const l=this.phoneCallingCodes().find(x=>x.countryCode===o);if(!l)return(0,f.of)(null);const p=`${l.callingCode.startsWith("+")?l.callingCode:`+${l.callingCode}`}${e.replace(/\D/g,"")}`;return p===this.initialFullPhoneNumber?(0,f.of)(null):this.asyncValidators.guestExistingAccount(()=>this.initialFullPhoneNumber,this.translateService.instant("VALIDATORS.MOBILE_NUMBER_ALREADY_USE"),"mobileNumber",!0)({value:{mobileNumberCallingCode:p}})}
1]),this.contactForm.controls.uid.updateValueAndValidity({emitEvent:!1})):(this.contactForm.controls.uid.setAsyncValidators([this.asyncValidators.guestExistingAccount(()=>this.initialEmail||null,this.translateService.instant("VALIDATORS.EMAIL_ALREADY_USED"),"email",!0)]),this.contactForm.controls.uid.updateValueAndValidity({emitEvent:!1}))}storeInitialUidValue(){const n=this.contactForm.controls.uid.value;if(this.isUidTypeEmail()){if(this.initialPhoneValue=n,n&&"string"!=typeof n){const e=this.phoneCallingCodes().find(o=>o.countryCode===n.countryCode);if(e&&n.phoneNumber){const o=e.callingCode.startsWith("+")?e.callingCode:`+${e.callingCode}`;this.initialFullPhoneNumber=`${o}${n.phoneNumber.replace(/\D/g,"")}`}}}else this.initialEmail=n}handleSubmit(){if(this.contactForm.valid){const n=this.formService.getChangedProperties(this.contactForm);this.accountFacade.updateContactData(n,{channel:_.sg.SETTINGS,currentPage:"accountdetails",interaction:"accountdetailsupdated",content:""}),this.unSavedChangesFacade.setHasUnSavedChanges(!1)}else{this.markAllFieldsAsTouched();const n=Object.keys(this.contactForm.controls).find(a=>this.contactForm.get(a)?.invalid);n&&this.scrollToFirstInvalidControl(n)}}handleCancel(){this.setFormDefaultValues(),this.unSavedChangesFacade.setHasUnSavedChanges(!1)}handlerCountryChanges(n){this.setStateDropdownOptions(n)}setStateDropdownOptions(n){const a=this.contactForm.get("state");"USA"===n||"CAN"===n?(this.loadStatesCountry(n),this.stateVisible.set(!0),a.setValidators([(0,m.yt)(C.y.MAKE_SELECTION)]),new Set(this.states.map(({value:o})=>o)).has(a.value)||a.setValue("",{emitEvent:!1})):(this.stateVisible.set(!1),a.setValue("",{emitEvent:!1}),a.clearValidators()),a.updateValueAndValidity()}setUidDefaultValue(){const n=this.isUidTypeEmail(),a=this.accountData();if(!n)return a.contactInformation.email;if(!a.contactInformation.mobileNumber)return"";const{contactInformation:{mobileNumberCallingCode:e,mobileNumber:o,mobileNumberCountryCode:r}}=a,l=this.phoneCallingCodes(),E=this.utilityService.removeCountryCodeFromNumber(e,o);return{countryCode:r||l.find(p=>p.callingCode===e).countryCode,phoneNumber:E}}setupFormTouchedListener(){Object.keys(this.contactForm.controls).forEach(n=>{const a=this.contactForm.get(n);a&&(this.subscriptions.push(a.valueChanges.subscribe(()=>{this.checkTouchedState()})),this.subscriptions.push(a.statusChanges.subscribe(()=>{this.checkTouchedState()})))})}checkTouchedState(){this.contactForm.dirty&&!this.formTouched()&&this.formTouched.set(!0)}markAllFieldsAsTouched(){this.contactForm.markAsUntouched(),this.contactForm.markAllAsTouched()}parseBirthdate(n){return n&&8===n.length?{month:n.substring(4,6),day:n.substring(6,8),year:n.substring(0,4)}:null}trackPageView(){this.analyticInteraction.trackPageView({channel:_.sg.SETTINGS,pageName:"accountdetails"})}scrollToFirstInvalidControl(n){if(!this.contactFormElement)return;const a=this.getInvalidControlSelector(n),e=this.contactFormElement.nativeElement.querySelector(a);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}getInvalidControlSelector(n){return"uid"===n?this.isUidTypeEmail()?"#phone":"#email":`#${n}`}static{this.\u0275fac=function(a){return new(a||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-contact-information"]],viewQuery:function(a,e){if(1&a&&t.GBs(S,5,t.aKT),2&a){let o;t.mGM(o=t.lsd())&&(e.contactFormElement=o.first)}},standalone:!0,features:[t.aNF],decls:40,vars:61,consts:[["contactFormElement",""],[1,"contact-information"],["tabindex","0",1,"contact-information__title"],[1,"contact-information__content"],[1,"form",3,"ngSubmit","formGroup"],[1,"form__fields"],["id","firstName","name","firstName","formControlName","firstName",1,"form__field",3,"brand","label"],["id","middleName","name","middleName","formControlName","middleName",1,"form__field",3,"brand","label"],["id","lastName","name","lastName","formControlName","lastName",1,"form__field",3,"brand","label"],["id","suffix","name","suffix","formControlName","suffix",1,"form__field",3,"brand","label","options"],["id","gender","name","gender","formControlName","gender",1,"form__field",3,"brand","label","options"],["id","birthdate","name","birthdate","formControlName","birthdate",1,"form__field",3,"brand","labels"],["id","phone","name","phone","formControlName","uid",1,"form__field",3,"brand","label","phoneCallingCodes"],["id","email","name","email","type","email","formControlName","uid",1,"form__field",3,"brand","label"],["id","country","name","country","formControlName","country",1,"form__field",3,"onChanges","brand","label","options"],["id","state","name","state","formControlName","state",1,"form__field",3,"brand","label","options"],["id","citizenship","name","citizenship","formControlName","citizenship",1,"form__field",3,"brand","label","options"],[1,"checkbox-container"],[1,"checkbox-layout__title"],[1,"checkbox-layout"],["id","isFirstResponder","name","isFirstResponder","formControlName","isFirstResponder",3,"brand","label"],["id","isMilitary","name","isMilitary","formControlName","isMilitary",3,"brand","label"],[1,"form__actions"],["type","button",1,"form__cancel-btn",3,"onClick","brand","text","theme","disabled"],["type","submit",1,"form__save-btn",3,"brand","disabled","text"]],template:function(a,e){if(1&a){const o=t.RV6();t.j41(0,"div",1)(1,"h2",2),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",3)(5,"form",4,0),t.bIt("ngSubmit",function(){return t.eBV(o),t.Njj(e.handleSubmit())}),t.j41(7,"div",5),t.nrm(8,"app-input",6),t.nI1(9,"translate"),t.nrm(10,"app-input",7),t.nI1(11,"translate"),t.nrm(12,"app-input",8),t.nI1(13,"translate"),t.nrm(14,"app-dropdown",9),t.nI1(15,"translate"),t.nrm(16,"app-dropdown",10),t.nI1(17,"translate"),t.DNE(18,N,1,2,"app-input-date",11)(19,R,2,5,"app-input-phone",12)(20,D,2,4,"app-input",13),t.j41(21,"app-dropdown",14),t.nI1(22,"translate"),t.bIt("onChanges",function(l){return t.eBV(o),t.Njj(e.handlerCountryChanges(l))}),t.k0s(),t.DNE(23,F,2,5,"app-dropdown",15),t.nrm(24,"app-dropdown",16),t.nI1(25,"translate"),t.k0s(),t.j41(26,"div",17)(27,"h3",18),t.EFF(28),t.nI1(29,"translate"),t.k0s(),t.j41(30,"div",19),t.nrm(31,"app-checkbox",20),t.nI1(32,"translate"),t.nrm(33,"app-checkbox",21),t.nI1(34,"translate"),t.k0s()(),t.j41(35,"div",22)(36,"app-primary-button",23),t.nI1(37,"translate"),t.bIt("onClick",function(){return t.eBV(o),t.Njj(e.handleCancel())}),t.k0s(),t.nrm(38,"app-primary-button",24),t.nI1(39,"translate"),t.k0s()()()()}
12&a&&(t.R7$(2),t.SpI(" ",t.bMT(3,35,"CUSTOMER_JOURNEY.SETTINGS.ACCOUNT_TITLE")," "),t.R7$(3),t.Y8G("formGroup",e.contactForm),t.R7$(3),t.Y8G("brand",e.brand)("label",t.bMT(9,37,"COMMON.FIRST_NAME")),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(11,39,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_MIDDLE_NAME")),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(13,41,"COMMON.LAST_NAME")),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(15,43,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_SUFFIX"))("options",e.suffixDropdownOptions),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(17,45,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_GENDER"))("options",e.genderDropdownOptions),t.R7$(2),t.vxM(e.dateLabels()?18:-1),t.R7$(),t.vxM(e.isUidTypeEmail()?19:20),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(22,47,"SETTINGS.ADDRESS.COUNTRY"))("options",e.countrys()),t.R7$(2),t.vxM(e.stateVisible()?23:-1),t.R7$(),t.Y8G("brand",e.brand)("label",t.bMT(25,49,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_COUNTRY_CITIZENSHIP"))("options",e.citizenship()),t.R7$(4),t.JRh(t.bMT(29,51,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_CHECKBOX_TITLE")),t.R7$(3),t.Y8G("brand",e.brand)("label",t.bMT(32,53,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_CHECKBOX_POLICE")),t.R7$(2),t.Y8G("brand",e.brand)("label",t.bMT(34,55,"CUSTOMER_JOURNEY.ACCOUNT_DETAILS.FORM_CHECKBOX_MILITARY")),t.R7$(3),t.Y8G("brand",e.brand)("text",t.bMT(37,57,"COMMON.CANCEL"))("theme","light")("disabled",e.accountLoading()||!e.contactForm.dirty),t.R7$(2),t.Y8G("brand",e.brand)("disabled",e.accountLoading()||!e.contactForm.dirty)("text",t.bMT(39,59,"COMMON.SAVE")))},dependencies:[h.h,h.D9,d.Sj,d.Ps,d.A1,c.X1,c.qT,c.BC,c.cb,c.j4,c.JD,d.Mr,d.MC,d.PY],styles:["[_ngcontent-%COMP%]:root{--celebrity-primary-blue: #2588CD;--celebrity-error-color: #a8151a;--celebrity-input-disabled-background-color: #EFF0F1;--celebrity-input-disabled-border-color: #8E8F90}.margin-top-38-33[_ngcontent-%COMP%]{margin-top:38px}@media screen and (max-width: 768px){.margin-top-38-33[_ngcontent-%COMP%]{margin-top:33px}}.flex-direction-responsive[_ngcontent-%COMP%]{display:flex;flex-direction:row}@media screen and (max-width: 768px){.flex-direction-responsive[_ngcontent-%COMP%]{flex-direction:column}}.cover[_ngcontent-%COMP%]{object-fit:cover}.center-elements[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.contact-information[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px;gap:24px;border-radius:4px;background:#fff;box-shadow:0 2px 4px #35363726}@media screen and (max-width: 480px){.contact-information[_ngcontent-%COMP%]{padding:0}}@media screen and (max-width: 480px){.contact-information[_ngcontent-%COMP%]{box-shadow:none;background:none}}.contact-information__title[_ngcontent-%COMP%]{color:#002859;font-size:24px;font-style:normal;font-weight:600;line-height:32px;padding-bottom:32px;margin:0;border-bottom:1px solid #d3d4d5}@media screen and (max-width: 480px){.contact-information__title[_ngcontent-%COMP%]{font-size:30px}}.contact-information__title.empty-state[_ngcontent-%COMP%]{display:none}@media screen and (max-width: 480px){.contact-information__title.empty-state[_ngcontent-%COMP%]{width:89.3333333333%;margin:0 auto;display:flex;padding-bottom:22px;border-bottom:none}}@media screen and (max-width: 480px) and (min-width: 768px){.contact-information__title.empty-state[_ngcontent-%COMP%]{width:77.734375%;max-width:1300px}}.contact-information__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.form__fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.form__field[_ngcontent-%COMP%]{min-height:80px}.form__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:24px}@media screen and (max-width: 480px){.form__actions[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:stretch;padding-top:12px;gap:16px}}.form__cancel-btn[_ngcontent-%COMP%]{width:120px}.form__save-btn[_ngcontent-%COMP%]{width:224px}@media screen and (max-width: 480px){.form__fields[_ngcontent-%COMP%]{grid-template-columns:repeat(1,minmax(0,1fr))}
1.form__cancel-btn[_ngcontent-%COMP%], .form__save-btn[_ngcontent-%COMP%]{width:100%}}.checkbox-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;margin-top:24px;margin-bottom:24px}.checkbox-layout[_ngcontent-%COMP%]{display:flex;gap:32px;flex-wrap:wrap}.checkbox-layout__title[_ngcontent-%COMP%]{color:#151617;font-size:18px;font-weight:700;line-height:32px;margin:0;font-style:normal}"]})}}return s})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.