PageSourceSearch

https://www.celebritycruises.com/myaccount/4388.80ea9da093bd232b.js

js celebritycruises.com collected 2026-09-24 09:02:17 UTC 9,574 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcelebrity=self.webpackChunkcelebrity||[]).push([[4388],{74388:(N,_,d)=>{d.r(_),d.d(_,{failure_modal:()=>E,link_account:()=>B});var g=d(10467),n=d(46970),a=d(77376);const E=(()=>{let s=class{constructor(e){(0,n.r)(this,e),this.labels=void 0,this.brand=void 0,this.showFailureModal=void 0,this.mode=void 0}handleCloseModal(){this.showFailureModal=!1}handleClickButton(e){e.detail===this.labels.button&&this.handleCloseModal()}getErrorMessage(){let e=this.labels.description[this.brand];return e?.replace(/(\+?\d{1,2}\s?)?(\()?(\d{3})(\))?[-\s]?(\d{3})[-\s]?(\d{4})/g,t=>`<a href="tel:${t.replace(/[-\s()]/g,"")}" class="mobile_text">${t}</a>`)}render(){return(0,n.h)("rcg-modal",{key:"c6689e80351b12f2424a369795436a9ac5e527ef",mode:this.mode,isOpen:this.showFailureModal,brand:this.mode,widthInPx:"silversea"===this.mode?375:440,closeOnbackdrop:!0},(0,n.h)("section",{key:"06f4ba9ba25fbd5418df5a02c8fc1243c7f94f00",class:`failure-modal ${this.mode}-display`},(0,n.h)("h4",{key:"b80a8c7e96586f3e0dcc699a73aa1ff9bcea5109",class:"failure-modal__title"},this.labels.title),(0,n.h)("p",{key:"0dffffd590a6343e0c262f3d336573330b15fa47",class:"failure-modal__description",innerHTML:this.getErrorMessage()}),(0,n.h)("rcg-primary-button",{key:"4f8a038d8179bbaef2a4294ed204c70298534520",mode:this.mode,theme:"silversea"===this.mode?"light":"",text:this.labels.button})))}};return s.style=':host{display:block}.failure-modal{padding:32px 48px;font-size:18px;color:#555F61;font-family:"proxima-nova", "Proxima Nova", sans-serif}.failure-modal__title{margin:0;font-weight:700;text-align:center}.failure-modal__description{font-weight:400;margin:0;text-align:center;padding:18px 0}.mobile_text{color:#555F61;font-size:16px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:0.15px;text-decoration:underline}.royal_text-color{color:#006AF4}.celebrity_text-color{color:#004275}.failure-modal.silversea-display{font-family:"SangBleuKingdom", sans-serif;padding:40px 24px}.failure-modal.silversea-display .failure-modal__title{color:#1D1D1D;font-size:28px;letter-spacing:1px;font-weight:400;margin-bottom:10px;font-family:"SangBleuOGSans", sans-serif}.failure-modal.silversea-display .failure-modal__description{color:#1D1D1D;letter-spacing:0.7px;font-size:16px;padding:10px 0 24px;line-height:190%}.failure-modal.silversea-display .mobile_text{color:#1D1D1D;text-underline-offset:4px;text-decoration-thickness:1.2px}',s})();function b(){return(b=(0,g.A)(function*(s,e,i,t,o,l,c,f){var u;const p=a.E[s],r=function L(s,e,i){return new Headers({"Account-Id":s,"Access-Token":e,AppKey:i,"Content-Type":"application/json"})}(e,i,p.APP_KEY),h=t?.[0].toUpperCase(),m=function A(s,e){return s!==a.B.SILVERSEA||e!==a.B.ROYAL&&e!==a.B.CELEBRITY?e===a.B.SILVERSEA?a.B.SILVERSEA:s:e}(t,f),M={header:{brand:h,channel:null===(u=null==a.S?void 0:a.S.WEB)||void 0===u?void 0:u.toLowerCase()},vdsId:e,lastName:c.lastName,loyaltyId:l,birthdate:c.birthdate},v=`${p.API_PATH}/${o}/${m}/web/v1/guestAccounts/loyalty`,D=new Request(v,{method:"PUT",body:JSON.stringify(M),headers:r}),y=yield fetch(D);if(!y.ok){const x=yield y.json();return x.url=v,x}return yield y.json()})).apply(this,arguments)}const B=(()=>{let s=class{constructor(e){(0,n.r)(this,e),this.onSuccessUpdateLoyalty=(0,n.c)(this,"onSuccessUpdateLoyalty",7),this.onErrorEvent=(0,n.c)(this,"onErrorEvent",7),this.onCancelLinkAccount=(0,n.c)(this,"onCancelLinkAccount",7),this.brand=void 0,this.labels=void 0,this.accountId=void 0,this.language=void 0,this.env=void 0,this.accessToken=void 0,this.guestInfo=void 0,this.secondaryBrand=void 0,this.modalStatus=void 0,this.analyticsData=void 0,this.loyaltyId=void 0,this.enableSubmit=void 0,this.loyaltyInfo=void 0,this.showErrorMessage=void 0,this.isLoading=void 0}valueChangedForm(e){var i,t;this.showErrorMessage=!1;const o=null!==(t="string"==typeof e.detail?e.detail:null===(i=e.detail)||void 0===i?void 0:i.value)&&void 0!==t?t:"";if(o.length>=4)return this.loyaltyId=o,void(this.enableSubmit=!0);this.enableSubmit=!1}handleClickButton(e){e.detail===this.labels.buttons.cancel?this.onCancelLinkAccount.emit(!0):this.updateLoyalty()}handleKeyDown(e){"Enter"===e.key&&this.loyaltyId.length>=4&&this.updateLoyalty()}currentModalStatus(){this.showErrorMessage=!1,this.enableSubmit=!1,this.loyaltyId=""}componentWillLoad(){this.analyticsService=a.A.getInstance(this.analyticsData)}handleAnalyticsData(e){e&&(this.analyticsService=a.A.getInstance(e))}getRelativeBrand(){return this.secondaryBrand?this.secondaryBrand:this.brand}updateLoyalty(){var e=this;return(0,g.A)(function*(){var i;e.isLoading=!0,e.showErrorMessage=!1;const t=yield function C(s,e,i,t,o,l,c,f){return b.apply(this,arguments)}(e.env,e.accountId,e.accessToken,e.secondaryBrand,e.language,e.loyaltyId,e.guestInfo,e.brand),o={variableName:"currentPage",content:a.c[`ADD_YOUR_NUMBER_INTERACTION_${e.getRelativeBrand().toUpperCase()}`]};if(200===t.status)e.onSuccessUpdateLoyalty.emit(t?.payload),e.analyticsService.trackLink(a.c.LOYALTY_MATCH_ACCOUNT_LINK_SUCCESS,[Object.assign({}
1,o)]),e.isLoading=!1;else{e.isLoading=!1,e.enableSubmit=!1,e.showErrorMessage=!0,e.onErrorEvent.emit();const l=[{variableName:"errorMsg",content:`Failure: ${a.d[`ACCOUNT_NUMBER_LINK_ERROR_${e.getRelativeBrand().toUpperCase()}_MESSAGE`]}`},{variableName:"backendError",content:`statusCode:${t?.status}|endPoint:${t?.url}`},{variableName:"errorIdentifier",content:a.c.NO_VALUE},{variableName:"loyaltybrand",content:e.getBrandValue()},{variableName:"ErrorCode",content:(null===(i=t?.errors[0])||void 0===i?void 0:i.errorCode)||`${a.c.NO_VALUE}`},Object.assign({},o)];e.analyticsService.trackLink(a.c.LOYALTY_MATCH_ACCOUNT_LINK_ERROR,l)}})()}getBrandValue(){return"silversea"===this.getRelativeBrand()?a.e.BRAND_SSC:"celebrity"===this.getRelativeBrand()?a.e.BRAND_CEL:a.e.BRAND_RCI}getErrorMessage(){var e,i,t,o;const l=null!==(o=null===(t=null===(i=null===(e=this.labels)||void 0===e?void 0:e.accountInput)||void 0===i?void 0:i.errors)||void 0===t?void 0:t.invalidAccount)&&void 0!==o?o:{},c=Object.keys(l).reduce((r,h)=>(r[h.toLowerCase()]=l[h],r),Object.create(null));return(c[(this.getRelativeBrand()||a.B.ROYAL).toLowerCase()]||c.royal||"").replace(/(\+?\d{1,2}\s?)?(\()?(\d{3})(\))?[-\s]?(\d{3})[-\s]?(\d{4})/g,r=>`&nbsp;<a href="tel:${r.replace(/[-\s()]/g,"")}" class="mobile_text">${r}</a>&nbsp;`)}render(){const e=(0,n.h)("section",{key:"eac8a951d0be6a793aaf28dca904e90fb4274b9a",class:`link-account ${this.brand}-display`},(0,n.h)("div",{key:"1450878a675c13879e2b4b02c22e44d0ec240f63",class:"link-account__header"},this.labels.title),(0,n.h)("h4",{key:"b4501bf99f4dd98cbf0f6b69219ee11c4ff8f612",class:"link-account__title"},this.labels.subtitle[this.secondaryBrand]),this.isLoading?(0,n.h)("spinner-loader",{brand:this.brand}):this.modalStatus&&(0,n.h)("silversea"===this.brand?"rcg-input-text-v3":"rcg-input-text-v2",{mode:this.brand,name:"loyaltyNumber",type:"tel",label:this.labels.accountInput.accountNumber,minLength:4,maxLength:9,allowOnlyNumbers:"true"}),this.showErrorMessage&&(0,n.h)("span",{key:"fbaf397764ae23b76a22a99388a127c00a106f97",class:"error",innerHTML:this.getErrorMessage()}),(0,n.h)("div",{key:"4aadafb655a990c5d024447e550328407b7cc58e",class:"link-account__buttons"},(0,n.h)("div",{key:"7465c63689a90861fef737275c6146d44a614f06",class:"link-account__btn"},(0,n.h)("rcg-primary-button-v2",{key:"ce3f623399da33bc1423e7db0e7780ab8bb2b023",mode:this.brand,text:this.labels.buttons.cancel,theme:"light"})),(0,n.h)("div",{key:"991763bc48c55e01ea0b9ff18c6aed94258c3160",class:"link-account__btn"},(0,n.h)("rcg-primary-button",{key:"fac9f2c2d364fdee06b6591b09f9e7ca39d5b516",mode:this.brand,theme:"silversea"===this.brand?"light":"",text:this.labels.buttons.link,disabled:!this.enableSubmit}))));return"silversea"===this.brand?e:(0,n.h)("main-container",{header:this.labels.title},e)}static get watchers(){return{modalStatus:["currentModalStatus"],analyticsData:["handleAnalyticsData"]}}};return s.style=':host{display:block}.link-account{font-family:"proxima-nova", "Proxima Nova", sans-serif;padding:24px}.link-account__header{display:none}.link-account__title{font-weight:400;padding-bottom:16px;font-size:16px;line-height:20px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;margin:0px;color:#000000}.link-account__buttons{display:flex;justify-content:end}.link-account__btn{width:168px;padding-top:20px}.link-account__btn:first-child{margin-right:16px}.link-account .error{display:block;height:auto;padding-left:2px;color:#D81913;font-size:12px;font-weight:500;margin-top:10px;line-height:18px}.link-account .mobile_text{color:#D81913;text-decoration:none}.link-account.silversea-display{font-family:"SangBleuKingdom", sans-serif;padding:40px 24px}.link-account.silversea-display .link-account__header{color:#1D1D1D;text-align:center;display:block;font-size:28px;letter-spacing:1px;font-weight:400;margin-bottom:24px;font-family:"SangBleuOGSans", sans-serif}.link-account.silversea-display .link-account__title{color:#1D1D1D;letter-spacing:0.7px;text-align:center}.link-account.silversea-display .link-account__buttons{flex-direction:column-reverse}.link-account.silversea-display .link-account__btn{width:100%}.link-account.silversea-display .mobile_text{color:#D81913;text-decoration:underline;text-underline-offset:4px;display:inline-block}.link-account.silversea-display .mobile_text:before{content:"";display:block}.link-account.silversea-display .error{font-size:13px;font-weight:400;letter-spacing:0.5px;color:#D81913;line-height:20px}',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.