1import{b as Xe}from"./chunk-6UMFXTLI.js";import{a as et,b as tt}from"./chunk-UC6VGVJQ.js";import{a as je}from"./chunk-FPHPRB3P.js";import{b as A}from"./chunk-6VKQ4C4B.js";import{G as qe,H as Ge,J as $e,K as Ke,Sb as Ze,ha as Je,j as He,la as Qe,m as Be,n as We,z as Ye}from"./chunk-2EGU7YKH.js";import"./chunk-XXJ5KP6J.js";import{a as ke}from"./chunk-CAQC7JX5.js";import"./chunk-OQSEJWXG.js";import"./chunk-LB2SIPUX.js";import"./chunk-YU5IEYKE.js";import"./chunk-TNG3WTDY.js";import"./chunk-DBPN64ZI.js";import"./chunk-PXIE55XG.js";import"./chunk-76J53O4D.js";import"./chunk-7IEHGNLB.js";import{h as Le,j as Ve,l as ee,r as ze}from"./chunk-P5CCJ2SN.js";import"./chunk-NEQO7ITA.js";import"./chunk-ILIGNJRC.js";import{a as Ie}from"./chunk-FM5MQBX4.js";import"./chunk-KJ2DTZTE.js";import{a as Fe}from"./chunk-3RKFVFMW.js";import"./chunk-6LRNCJRQ.js";import"./chunk-BYUXZABT.js";import{k as De}from"./chunk-CSKO464Y.js";import"./chunk-RFZ65DFT.js";import{q as Me}from"./chunk-ZAELU3GP.js";import"./chunk-KCBWTIVH.js";import{b as be}from"./chunk-Q7LOV5U2.js";import"./chunk-GSJIPMUW.js";import"./chunk-2D6KGTZB.js";import"./chunk-ZS7OWNSY.js";import{b as Ue}from"./chunk-DIZWDXBB.js";import{Q as Re,U as we,_ as Ae}from"./chunk-Q4MTVQC2.js";import"./chunk-RRAYDVNW.js";import{Fc as fe,Id as Se,Md as ye,Zd as Oe,dd as ue,fd as ge,hd as _e,id as Ce,lc as me,nd as he,od as Pe,pe as Te,qe as B,rd as Ee,sd as ve,xd as Ne,xe}from"./chunk-WGWIBZ2L.js";import{$b as C,$c as w,D as j,E as q,Ec as E,Fa as f,Fc as D,Ga as u,Gb as G,Gc as de,Ib as s,K as ne,Kb as $,Lb as K,Ob as x,Oc as k,Oe as ce,Pc as H,T as oe,Tb as d,Ub as r,Vb as y,Z as b,Zb as I,ac as p,ad as se,gf as Z,hb as i,lb as h,ma as M,pc as l,qa as re,qc as P,qd as le,rc as m,tb as ae,td as pe,ub as z,va as L,w as U,wc as X,xc as J,ya as V,yc as Q,zb as S}from"./chunk-6LP6WHZQ.js";import{a as T,b as Y}from"./chunk-5KTCK5IS.js";var v=(function(n){return n.Email="Email",n.Push="Push",n.SMS="SMS",n})(v||{});var g=(function(n){return n.OrderUpdatePlaced="OrderUpdate_Placed",n.OrderUpdateConfirmed="OrderUpdate_Confirmed",n.OrderUpdateReadyforPickup="OrderUpdate_ReadyforPickup",n.OrderUpdateReadyforDelivery="OrderUpdate_ReadyforDelivery",n.OrderUpdateCanceled="OrderUpdate_Canceled",n.OrderUpdateCompleted="OrderUpdate_Completed",n})(g||{});var te=[{name:v.Email,id:1},{name:v.Push,id:2},{name:v.SMS,id:3}],ie=[{name:g.OrderUpdatePlaced,id:1},{name:g.OrderUpdateConfirmed,id:2},{name:g.OrderUpdateReadyforPickup,id:3},{name:g.OrderUpdateReadyforDelivery,id:4},{name:g.OrderUpdateCanceled,id:5},{name:g.OrderUpdateCompleted,id:6}];function F(n=""){return{channelId:te.find(({name:_})=>_===n)?.id??0,channelName:n,isEnabled:!1}}function O(n=""){return{notificationTypeId:ie.find(({name:_})=>_===n)?.id??0,notificationTypeName:n,isEnabled:!1}}var it=n=>({width:n}),pt=n=>({label:n,routerLink:"/",automationId:"userProfile.breadcrumbHome"}),ct=n=>({label:n,automationId:"userProfile.breadcrumbUserProfile"}),mt=(n,_)=>[n,_],N=()=>({standalone:!0});function ft(n,_){n&1&&(y(0,"ppg-cdp-breadcrumbs",12),k(1,"transloco"),k(2,"transloco")),n&2&&s("model",de(9,mt,D(5,pt,H(1,1,"NAV.HOME")),D(7,ct,H(2,3,"NAV.USER_PROFILE"))))}function ut(n,_){if(n&1&&(d(0,"ppg-input-group",30),y(1,"input",31),r(),d(2,"ppg-input-group",32),y(3,"input",33),r()),n&2){let t=p(2).$implicit,e=p();s("label",t("ALTERNATIVE_EMAIL"))("displaySuffix",!0),i(),s("fieldType",e.ERROR_FIELD_TYPE.ConfirmEmail),i(),s("label",t("RE_ALTERNATIVE_EMAIL")),i(),s("fieldType",e.ERROR_FIELD_TYPE.ConfirmEmail)}}function gt(n,_){if(n&1){let t=I();d(0,"div",37)(1,"p-checkbox",59),C("ngModelChange",function(o){f(t);let a=p(4);return a.pushNotification.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r(),d(2,"label",60),l(3),r()()}if(n&2){let t=p(3).$implicit,e=p();i(),s("ngModel",e.pushNotification.isEnabled)("ngModelOptions",E(3,N)),i(2),P(t("PUSH_NOTIFICATION_TEXT"))}}function _t(n,_){if(n&1){let t=I();d(0,"div",46)(1,"div",47)(2,"span",61),l(3),r()(),d(4,"div",49)(5,"p-toggleswitch",62),C("ngModelChange",function(o){f(t);let a=p(4);return a.orderUpdateReadyforDelivery.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()()}if(n&2){let t=p(3).$implicit,e=p();i(2),s("id",e.userNotificationTypeLabels.orderReadyforDelivery),i(),m(" ",t("ORDER_STATUS.READY_FOR_DELIVERY.TIT
1LE")," "),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderReadyforDelivery)("ngModel",e.orderUpdateReadyforDelivery.isEnabled)("ngModelOptions",E(5,N))}}function Ct(n,_){if(n&1){let t=I();d(0,"div",26)(1,"h2",34),l(2),r(),d(3,"div",35)(4,"h3",36),l(5),r(),d(6,"div",37)(7,"p-checkbox",38),C("ngModelChange",function(o){f(t);let a=p(3);return a.emailNotification.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r(),d(8,"label",39),l(9),r()(),d(10,"div",37)(11,"p-checkbox",40),C("ngModelChange",function(o){f(t);let a=p(3);return a.smsNotification.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r(),d(12,"label",41),l(13),r()(),S(14,gt,4,4,"div",37),r(),d(15,"div",42)(16,"h3",43),l(17),r(),d(18,"p-button",44),C("onClick",function(){f(t);let o=p(3);return u(o.showDescriptionsModal=!0)}),r()(),d(19,"div",45)(20,"div",46)(21,"div",47)(22,"span",48),l(23),r()(),d(24,"div",49)(25,"p-toggleswitch",50),C("ngModelChange",function(o){f(t);let a=p(3);return a.orderUpdatePlaced.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()(),d(26,"div",46)(27,"div",47)(28,"span",51),l(29),r()(),d(30,"div",49)(31,"p-toggleswitch",52),C("ngModelChange",function(o){f(t);let a=p(3);return a.orderUpdateReadyforPickup.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()(),d(32,"div",46)(33,"div",47)(34,"span",53),l(35),r()(),d(36,"div",49)(37,"p-toggleswitch",54),C("ngModelChange",function(o){f(t);let a=p(3);return a.orderUpdateCanceled.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()(),d(38,"div",46)(39,"div",47)(40,"span",55),l(41),r()(),d(42,"div",49)(43,"p-toggleswitch",56),C("ngModelChange",function(o){f(t);let a=p(3);return a.orderUpdateConfirmed.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()(),S(44,_t,6,6,"div",46),d(45,"div",46)(46,"div",47)(47,"span",57),l(48),r()(),d(49,"div",49)(50,"p-toggleswitch",58),C("ngModelChange",function(o){f(t);let a=p(3);return a.orderUpdateCompleted.isEnabled=o,u(a.onNotificationsPreferencesChanged())}),r()()()()()}if(n&2){let t=p(2).$implicit,e=p();i(2),m(" ",t("NOTIFICATION_HEADER")," "),i(3),P(t("NOTIFICATION_TITLE")),i(2),s("ngModel",e.emailNotification.isEnabled)("ngModelOptions",E(37,N)),i(2),P(t("EMAIL_TEXT")),i(2),s("ngModel",e.smsNotification.isEnabled)("ngModelOptions",E(38,N)),i(2),P(t("SMS_TEXT")),i(),x(e.hidePushNotifications()?-1:14),i(3),P(t("NOTIFICATION_SUB_TITLE")),i(),s("label",t("SHOW_DESCRIPTION")),i(4),s("id",e.userNotificationTypeLabels.orderPlaced),i(),P(t("ORDER_STATUS.PLACED.TITLE")),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderPlaced)("ngModel",e.orderUpdatePlaced.isEnabled)("ngModelOptions",E(39,N)),i(3),s("id",e.userNotificationTypeLabels.orderReadyforPickup),i(),m(" ",t("ORDER_STATUS.READY_FOR_PICKUP.TITLE")," "),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderReadyforPickup)("ngModel",e.orderUpdateReadyforPickup.isEnabled)("ngModelOptions",E(40,N)),i(3),s("id",e.userNotificationTypeLabels.orderCanceled),i(),P(t("ORDER_STATUS.CANCELED.TITLE")),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderCanceled)("ngModel",e.orderUpdateCanceled.isEnabled)("ngModelOptions",E(41,N)),i(3),s("id",e.userNotificationTypeLabels.orderConfirmed),i(),P(t("ORDER_STATUS.CONFIRMED.TITLE")),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderConfirmed)("ngModel",e.orderUpdateConfirmed.isEnabled)("ngModelOptions",E(42,N)),i(),x(e.hideOrderStatusReadyForDelivery()?-1:44),i(3),s("id",e.userNotificationTypeLabels.orderCompleted),i(),P(t("ORDER_STATUS.COMPLETED.TITLE")),i(2),s("ariaLabelledBy",e.userNotificationTypeLabels.orderCompleted)("ngModel",e.orderUpdateCompleted.isEnabled)("ngModelOptions",E(43,N))}}function ht(n,_){if(n&1){let t=I();d(0,"h1",13),l(1),k(2,"transloco"),r(),d(3,"form",14)(4,"div",15)(5,"h2",16),l(6),r(),d(7,"p",17),l(8),r(),d(9,"div",18)(10,"ppg-input-group",19),y(11,"input",20),r(),d(12,"ppg-input-group",21),y(13,"input",22),r(),y(14,"app-phone-number-input",23),d(15,"ppg-input-group",24),y(16,"input",25),r(),S(17,ut,4,5),r()(),S(18,Ct,51,44,"div",26),d(19,"div",27)(20,"p-button",28),C("onClick",function(){f(t);let o=p(2);return u(o.cancelEditing())}),r(),d(21,"p-button",29),C("onClick",function(){f(t);let o=p(2);return u(o.onSubmit())}),r()()()}if(n&2){let t=p().$implicit,e=p();i(),P(H(2,27,"NAV.USER_PROFILE")),i(2),s("formGroup",e.myUserForm),i(3),m(" ",t("PROFILE_HEADER")," "),i(2),m(" ",t("PROFILE_SUBTITLE")," "),i(),$("row-2-items",e.hideSecondaryEmail()),i(),s("label",t("FIRST_NAME"))("required",!0)("displaySuffix",!0),i(),s("fieldType",e.ERROR_FIELD_TYPE.FirstName),i(),s("label",t("LAST_NAME"))("required",!0)("displaySuffix",!0),i(),s("fieldType",e.ERROR_FIELD_TYPE.LastName),i(),$("order-last",e.hideSecondaryEmail()),s("label",t("PHONE_NUMBER"))("formGroup",e.myUserForm)("required",!0),i(),s("label",t("EMAIL")),i(),s("fieldType",e.ERROR_FIELD_TYPE.Email),i(),x(e.hideSecondaryEmail()?-1:17),i(),x(e.hasViewNotificationPreferencesPermission&&!e.hideNotificationPreferences()?18:-1),i(2),s("fluid",!0)("label",t("CANCEL")),i(),s("fluid",!0)("label",t("SAVE"))}}function Pt(n,_){if(n&1&&(d(0,"p",7)(1,"strong"),l(2),r(),l(3),r()),n&2){let t=p().$implicit;
1i(2),m(" ",t("ORDER_STATUS.READY_FOR_DELIVERY.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.READY_FOR_DELIVERY.DESCRIPTION")," ")}}function Et(n,_){if(n&1){let t=I();d(0,"div"),S(1,ft,3,12,"ppg-cdp-breadcrumbs",2)(2,ht,22,29),d(3,"p-dialog",3),Q("visibleChange",function(o){f(t);let a=p();return J(a.showDescriptionsModal,o)||(a.showDescriptionsModal=o),u(o)}),d(4,"p",4)(5,"strong"),l(6),r(),l(7),r(),d(8,"p",5)(9,"strong"),l(10),r(),l(11),r(),d(12,"p",6)(13,"strong"),l(14),r(),l(15),r(),S(16,Pt,4,2,"p",7),d(17,"p",8)(18,"strong"),l(19),r(),l(20),r(),d(21,"p",9)(22,"strong"),l(23),r(),l(24),r()(),d(25,"p-dialog",10),Q("visibleChange",function(o){f(t);let a=p();return J(a.showWayToReceiveNotificationsModal,o)||(a.showWayToReceiveNotificationsModal=o),u(o)}),C("onHide",function(){f(t);let o=p();return u(o.notificationsStatus(!1))}),d(26,"p",11),l(27),r()()()}if(n&2){let t=_.$implicit,e=p();i(2),x(e.userProfileEnabled?2:-1),i(),K(D(31,it,e.ORDER_STATUS_POPUP_WIDTH)),s("header",t("SHOW_DESCRIPTIONS.HEADER")),X("visible",e.showDescriptionsModal),s("modal",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0),G("aria-label",t("SHOW_DESCRIPTIONS.HEADER")),i(3),m(" ",t("ORDER_STATUS.PLACED.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.PLACED.DESCRIPTION")," "),i(3),m(" ",t("ORDER_STATUS.CONFIRMED.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.CONFIRMED.DESCRIPTION")," "),i(3),m(" ",t("ORDER_STATUS.READY_FOR_PICKUP.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.READY_FOR_PICKUP.DESCRIPTION")," "),i(),x(e.hideOrderStatusReadyForDelivery()?-1:16),i(3),m(" ",t("ORDER_STATUS.CANCELED.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.CANCELED.DESCRIPTION")," "),i(3),m(" ",t("ORDER_STATUS.COMPLETED.TITLE"),": "),i(),m(" ",t("ORDER_STATUS.COMPLETED.DESCRIPTION")," "),i(),K(D(33,it,e.ORDER_STATUS_POPUP_WIDTH)),s("header",t("WAY_TO_RECEIVE_NOTIFICATIONS.HEADER")),X("visible",e.showWayToReceiveNotificationsModal),s("modal",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0),G("aria-label",t("WAY_TO_RECEIVE_NOTIFICATIONS.HEADER")),i(2),m(" ",t("WAY_TO_RECEIVE_NOTIFICATIONS.BODY")," ")}}var ot=(()=>{class n{#e;#t;#i;constructor(t,e,o,a,c,R,W,at,dt,st){this.userService=t,this.authUserService=e,this.cartService=o,this.languagesService=a,this.notificationService=c,this.formBuilder=R,this.dialogService=W,this.configurationService=at,this.router=dt,this.permissionsService=st,this.MASKS=Xe,this.ERROR_FIELD_TYPE=He,this.ORDER_STATUS_POPUP_WIDTH="34rem",this.permissions=Fe,this.showDescriptionsModal=!1,this.showWayToReceiveNotificationsModal=!1,this.#e=V(me),this.#t=V(Me),this.#i=V(fe),this.hideSecondaryEmail=w(()=>this.#e.eCommerceUserProfileHideSecondaryEmail()),this.hidePushNotifications=w(()=>this.#e.eCommerceUserProfileHidePushNotifications()),this.hideNotificationPreferences=w(()=>this.#e.eCommerceUserProfileHideNotificationPreferences()),this.hideOrderStatusReadyForDelivery=w(()=>this.#e.eCommerceUserProfileHideOrderStatusReadyForDelivery()),this.emailNotification=F(v.Email),this.pushNotification=F(v.Push),this.smsNotification=F(v.SMS),this.orderUpdatePlaced=O(g.OrderUpdatePlaced),this.orderUpdateConfirmed=O(g.OrderUpdateConfirmed),this.orderUpdateReadyforPickup=O(g.OrderUpdateReadyforPickup),this.orderUpdateReadyforDelivery=O(g.OrderUpdateReadyforDelivery),this.orderUpdateCanceled=O(g.OrderUpdateCanceled),this.orderUpdateCompleted=O(g.OrderUpdateCompleted),this.userNotificationTypeLabels={orderPlaced:"order-placed-label",orderConfirmed:"order-confirmed-label",orderReadyforPickup:"order-ready-for-pickup-label",orderReadyforDelivery:"order-ready-for-delivery-label",orderCanceled:"order-canceled-label",orderCompleted:"order-completed-label"},this.myUserForm=this.formBuilder.group({firstName:["",et],lastName:["",tt],phoneNumber:[""],email:[{value:"",disabled:!0}],alternativeEmail:["",[A.email("alternativeEmail"),A.isAlternativeEmailSameAsPrimaryEmail(),A.emailMatchValidator("alternativeEmail","reAlternativeEmail")]],reAlternativeEmail:["",[A.emailMatchValidator("alternativeEmail","reAlternativeEmail","alternative-fields-doesnt-match_reAlternativeEmail")]]});let lt=this.#t.minDigitLengthValidator;se(()=>this.myUserForm.controls.phoneNumber.setValidators([ge.required,je.customPhone(),lt()]))}ngOnInit(){q([this.permissionsService.hasPermission(this.permissions.VIEW_PROFILE_NOTIFICATION_PREFERENCES),this.configurationService.userProfileFeatureFlag$]).subscribe(([t,e])=>{this.hasViewNotificationPreferencesPermission=t,this.userProfileEnabled=e,this.userProfileEnabled&&this.userService.getUserWithFavorites().pipe(b(1)).subscribe(o=>{this.initEditUserData(o)})})}compareChannelList(t,e){return t.length===e.length&&t.every((o,a)=>{let c=e[a];return o.channelId===c.channelId&&o.channelName===c.channelName&&o.isEnabled===c.isEnabled})}compareNotificationList(t,e){return t.length===e.length&&t.every((o,a)=>{let c=e[a];return o.notificationTypeId===c.notificationTypeId&&o.notificationTypeName===c.notificationTypeName&&o.isEnabled===c.isEnabled})}cancelEditing(){let t=this.#i.getHomeRoute(),e=this.createUserNotificationPreferenceRequest
1(),o=!1,a=!1;if(this.hasViewNotificationPreferencesPermission&&(o=!this.compareChannelList(this.userNotificationPreferenceObject.userNotificationPreference.userNotificationChannels,e.userNotificationChannels),a=!this.compareNotificationList(this.userNotificationPreferenceObject.userNotificationPreference.userNotificationTypes,e.userNotificationTypes)),!this.myUserForm.dirty&&!o&&!a){this.router.navigate([t]);return}this.dialogService.open(Je,{data:{translationPrefix:"PROFILE.PROFILE_CANCEL_MODAL"},width:Ye.Medium,closable:!0}).onClose.pipe(b(1)).subscribe(c=>{c&&this.router.navigate([t])})}onSubmit(){if(We(this.myUserForm,!0,!0),!this.myUserForm.valid)return;let t={firstName:this.myUserForm.value.firstName,lastName:this.myUserForm.value.lastName,phoneNumber:this.myUserForm.value.phoneNumber,alternativeEmail:this.myUserForm.value.alternativeEmail===""?null:this.myUserForm.value.alternativeEmail},e=this.createUserNotificationPreferenceRequest();ne({updateMyUser:this.userService.updateMyUser(t),UpdateUserNotificationPrefrence:this.hasViewNotificationPreferencesPermission?this.userService.updateUserNotificationPrefrence(e):U(null)}).pipe(M(()=>this.userService.getUserWithFavorites()),re(o=>{this.initEditUserData(o);let a=this.authUserService.user();a&&this.authUserService.setUserInfo(Y(T({},a),{firstName:t.firstName,lastName:t.lastName})),this.notificationService.success("NOTIFICATION.SUCCESS.USER_PROFILE_SUCCESS")}),M(()=>this.updateNonEditableUserContactInCart()),M(()=>this.authUserService.refreshToken()),oe(o=>{throw o?.status===Be.InternalServerError&&this.notificationService.error("NOTIFICATION.FAILURE.USER_PROFILE_ERROR"),new Error}),b(1)).subscribe()}onNotificationsPreferencesChanged(){!this.emailNotification.isEnabled&&!this.smsNotification.isEnabled&&!this.pushNotification.isEnabled&&(this.showWayToReceiveNotificationsModal=!0)}initEditUserData(t){this.myUserForm.patchValue(Y(T({},t.myUser),{reAlternativeEmail:t.myUser.alternativeEmail,phoneNumber:this.#t.unmask(t.myUser.phoneNumber)})),this.hasViewNotificationPreferencesPermission&&this.userService.getUserNotificationPreferences().pipe(b(1)).subscribe(e=>{this.initEditUserNotifications(e)})}initEditUserNotifications(t){let e=t?.userNotificationPreference,o=e?.userNotificationChannels??[];[this.emailNotification,this.pushNotification,this.smsNotification]=te.map(({name:c})=>this.findNotificationChannel(o,c)),this.notificationsStatus(!1);let a=e?.userNotificationTypes??[];[this.orderUpdatePlaced,this.orderUpdateConfirmed,this.orderUpdateReadyforPickup,this.orderUpdateReadyforDelivery,this.orderUpdateCanceled,this.orderUpdateCompleted]=ie.map(({name:c})=>this.findNotificationType(a,c)),this.userNotificationPreferenceObject={userNotificationPreference:{userNotificationChannels:this.notificationChannels.map(c=>T({},c)),userNotificationTypes:this.notificationTypes.map(c=>T({},c))}}}findNotificationChannel(t,e){return T({},t.find(o=>o?.channelName===e)??F(e))}findNotificationType(t,e){return T({},t.find(o=>o?.notificationTypeName===e)??O(e))}notificationsStatus(t){this.notificationTypes.forEach(e=>e.isEnabled=t)}createUserNotificationPreferenceRequest(){return{userNotificationChannels:this.notificationChannels,userNotificationTypes:this.notificationTypes}}get notificationChannels(){return[this.emailNotification,this.pushNotification,this.smsNotification]}get notificationTypes(){return[this.orderUpdatePlaced,this.orderUpdateConfirmed,this.orderUpdateReadyforPickup,this.orderUpdateReadyforDelivery,this.orderUpdateCanceled,this.orderUpdateCompleted]}updateNonEditableUserContactInCart(){if(!this.authUserService.isAuthenticated()||!this.authUserService.isB2CUser())return U(null);let t=this.userService.getMyFulfillmentContacts().pipe(j(e=>e?.length===1?e[0]:null));return q([this.cartService.getCart(!1),this.languagesService.language$,t]).pipe(M(([e,o,a])=>{let c=e?.fulfillmentContactKey??a?.key;return!c||e&&![ee.ReserveAndCollect,ee.NShift].includes(e.shippingMethodName)?U(null):this.userService.editMyFulfillmentContact({phoneNumber:this.myUserForm.value.phoneNumber,email:this.myUserForm.controls.email.value,key:c,name:`${this.myUserForm.value.firstName} ${this.myUserForm.value.lastName}`}).pipe(j(R=>({key:R.data.updateMyFulfillmentContact.key,locale:o})),M(({key:R,locale:W})=>e?this.cartService.setJobContacts(R,W):U(null)))}),b(1))}static{this.\u0275fac=function(e){return new(e||n)(h(qe),h(Oe),h(ze),h(xe),h(Le),h(Ne),h(De),h(be),h(ce),h(Ve))}}static{this.\u0275cmp=ae({type:n,selectors:[["app-user-profile"]],standalone:!1,decls:2,vars:1,consts:[[1,"layout-container"],[4,"transloco","translocoRead"],["data-test-id","userProfile.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["data-test-id","userProfile.showDescriptionsModal",3,"visibleChange","header","visible","modal","draggable","resizable","dismissableMask"],["data-test-id","userProfile.showDescriptionsModal.orderPlaced"],["data-test-id","userProfile.showDescriptionsModal.orderConfirmed"],["data-test-id","userProfile.showDescriptionsModal.orderReadyForPickup"],["data-test-id","userProfile.showDescriptionsModal.orderReadyForDelivery"],["data-test-id","userProfile.showDescriptionsModal.orderCanceled"],["data-test-id","userProfile.showDescriptionsModal.orderCompleted"],["data-test-id","userProfile.wayToReceiveNotificationsModal",3,"visibleChange","onHide","header","visible","modal","draggable","resizable","dismissableMask"],["data-test-id","userProfile.wayToReceiveNotificationsModal.body"],["data-test-id","userProfile.breadcrumbs",3,"model"],["data-test-id","userProfile.pageHeader"],[3,"formGroup"],[1,"user-props"],["data-test-id","userProfile.profileHeader",1,"user-props-header"],["data-test-id","userProfile.profileSubtitle",1,"user-props-description"],[1,"grid-container","user-props-inputs"],["labelFor","firstName","data-test-id","userProfile.firstName",3,"label","required","displaySuffix"],["formControlName","firstName","
1id","firstName","data-test-id","userProfile.firstNameInput","name","firstName","type","text","pInputText","","ppgValidator","",3,"fieldType"],["labelFor","lastName","data-test-id","userProfile.lastName",3,"label","required","displaySuffix"],["formControlName","lastName","id","lastName","data-test-id","userProfile.lastNameInput","name","lastName","type","text","pInputText","","ppgValidator","",3,"fieldType"],["data-test-id","userProfile.phoneNumberInput","ngDefaultControl","","styleModifier","phone-input","phoneControl","phoneNumber",3,"label","formGroup","required"],["labelFor","email","data-test-id","userProfile.email",3,"label"],["formControlName","email","id","email","data-test-id","userProfile.emailInput","name","email","type","text","autocomplete","disabled","pInputText","","ppgValidator","",3,"fieldType"],[1,"notification"],[1,"controls"],["outlined","true","data-test-id","userProfile.cancelButton",3,"onClick","fluid","label"],["data-test-id","userProfile.saveButton",3,"onClick","fluid","label"],["labelFor","alternativeEmail","data-test-id","userProfile.altEmail",3,"label","displaySuffix"],["formControlName","alternativeEmail","id","alternativeEmail","data-test-id","userProfile.altEmailInput","name","alternativeEmail","type","text","pInputText","","ppgValidator","",3,"fieldType"],["labelFor","reAlternativeEmail","data-test-id","userProfile.reAltEmail",3,"label"],["formControlName","reAlternativeEmail","id","reAlternativeEmail","data-test-id","userProfile.reAltEmailInput","name","reAlternativeEmail","type","text","onPaste","return false","pInputText","","ppgValidator","",3,"fieldType"],["data-test-id","userProfile.notificationHeader",1,"notification-header"],[1,"notification-channel"],["data-test-id","userProfile.notificationTitle"],[1,"notification-channel-input","flex","align-items-center","gap-2"],["name","emailNotification","inputId","emailNotification","data-test-id","userProfile.emailNotificationCheckbox","binary","true",3,"ngModelChange","ngModel","ngModelOptions"],["for","emailNotification"],["name","smsNotification","inputId","smsNotification","data-test-id","userProfile.smsNotificationCheckbox","binary","true",3,"ngModelChange","ngModel","ngModelOptions"],["for","smsNotification"],[1,"notification-description"],["data-test-id","userProfile.notificationSubtitle"],["text","true","data-test-id","userProfile.showDescriptionButton",3,"onClick","label"],[1,"grid-container","notification-toggles"],[1,"notification-toggle"],[1,"notification-toggle-title"],["data-test-id","userProfile.orderPlacedLabel",3,"id"],[1,"notification-toggle-input"],["data-test-id","userProfile.orderPlacedSwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"],["data-test-id","userProfile.readyForPickupLabel",3,"id"],["data-test-id","userProfile.readyForPickupSwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"],["data-test-id","userProfile.orderCanceledLabel",3,"id"],["data-test-id","userProfile.orderCanceledSwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"],["data-test-id","userProfile.orderConfirmedLabel",3,"id"],["data-test-id","userProfile.orderConfirmedSwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"],["data-test-id","userProfile.orderCompletedLabel",3,"id"],["data-test-id","userProfile.orderCompletedSwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"],["name","pushNotification","inputId","pushNotification","data-test-id","userProfile.pushNotificationCheckbox","binary","true",3,"ngModelChange","ngModel","ngModelOptions"],["for","pushNotification"],["data-test-id","userProfile.readyForDeliveryLabel",3,"id"],["data-test-id","userProfile.readyForDeliverySwitch",3,"ngModelChange","ariaLabelledBy","ngModel","ngModelOptions"]],template:function(e,o){e&1&&(d(0,"div",0),S(1,Et,28,35,"div",1),r()),e&2&&(i(),s("translocoRead","PROFILE"))},dependencies:[Pe,ue,_e,Ce,he,Ee,ve,Ge,Te,Qe,Ke,Re,we,Ue,Ae,ke,$e,Ie,B],styles:[".padding-none[_ngcontent-%COMP%]{padding:0!important}.padding-small[_ngcontent-%COMP%]{padding:size(1)!important}.padding-medium[_ngcontent-%COMP%]{padding:size(2)!important}
1.padding-large[_ngcontent-%COMP%]{padding:size(3)!important}.padding-xl[_ngcontent-%COMP%]{padding:size(4)!important}.padding-xxl[_ngcontent-%COMP%]{padding:size(5)!important}.padding-top-none[_ngcontent-%COMP%]{padding-top:0!important}.padding-top-small[_ngcontent-%COMP%]{padding-top:size(1)!important}.padding-top-medium[_ngcontent-%COMP%]{padding-top:size(2)!important}.padding-top-large[_ngcontent-%COMP%]{padding-top:size(3)!important}.padding-top-xl[_ngcontent-%COMP%]{padding-top:size(4)!important}.padding-top-xxl[_ngcontent-%COMP%]{padding-top:size(5)!important}.padding-right-none[_ngcontent-%COMP%]{padding-right:0!important}.padding-right-small[_ngcontent-%COMP%]{padding-right:size(1)!important}.padding-right-medium[_ngcontent-%COMP%]{padding-right:size(2)!important}.padding-right-large[_ngcontent-%COMP%]{padding-right:size(3)!important}.padding-right-xl[_ngcontent-%COMP%]{padding-right:size(4)!important}.padding-right-xxl[_ngcontent-%COMP%]{padding-right:size(5)!important}.padding-bottom-none[_ngcontent-%COMP%]{padding-bottom:0!important}.padding-bottom-small[_ngcontent-%COMP%]{padding-bottom:size(1)!important}.padding-bottom-medium[_ngcontent-%COMP%]{padding-bottom:size(2)!important}.padding-bottom-large[_ngcontent-%COMP%]{padding-bottom:size(3)!important}.padding-bottom-xl[_ngcontent-%COMP%]{padding-bottom:size(4)!important}.padding-bottom-xxl[_ngcontent-%COMP%]{padding-bottom:size(5)!important}.padding-left-none[_ngcontent-%COMP%]{padding-left:0!important}.padding-left-small[_ngcontent-%COMP%]{padding-left:size(1)!important}.padding-left-medium[_ngcontent-%COMP%]{padding-left:size(2)!important}.padding-left-large[_ngcontent-%COMP%]{padding-left:size(3)!important}.padding-left-xl[_ngcontent-%COMP%]{padding-left:size(4)!important}.padding-left-xxl[_ngcontent-%COMP%]{padding-left:size(5)!important}.font-size-xs-1[_ngcontent-%COMP%]{font-size:.5625rem!important}.font-size-xs-2[_ngcontent-%COMP%]{font-size:.625rem!important}.font-size-xs-3[_ngcontent-%COMP%]{font-size:.65625rem!important}.font-size-s-1[_ngcontent-%COMP%]{font-size:.6875rem!important}.font-size-s-2[_ngcontent-%COMP%]{font-size:.75rem!important}.font-size-s-3[_ngcontent-%COMP%]{font-size:.875rem!important}.font-size-s-4[_ngcontent-%COMP%]{font-size:.8125rem!important}.font-size-m[_ngcontent-%COMP%]{font-size:1rem!important}.font-size-m-1[_ngcontent-%COMP%]{font-size:1.125rem!important}.font-size-m-2[_ngcontent-%COMP%]{font-size:1.25rem!important}.font-size-m-3[_ngcontent-%COMP%]{font-size:1.375rem!important}.font-size-l[_ngcontent-%COMP%]{font-size:1.5rem!important}.font-size-l-1[_ngcontent-%COMP%]{font-size:1.625rem!important}.font-size-l-2[_ngcontent-%COMP%]{font-size:2.125rem!important}.font-size-l-3[_ngcontent-%COMP%]{font-size:2.375rem!important}.font-size-xl[_ngcontent-%COMP%]{font-size:2.5rem!important}h1[_ngcontent-%COMP%]{margin:40px 0;padding:0}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{margin:0;padding:0}.grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr)}.grid-container.row-2-items[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}@media all and (max-width:47.9375rem){.grid-container[_ngcontent-%COMP%], .grid-container.row-2-items[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}}.order-last[_ngcontent-%COMP%]{order:4}.user-props[_ngcontent-%COMP%]{margin-bottom:24px;display:flex;flex-direction:column;gap:16px}.user-props-inputs[_ngcontent-%COMP%]{gap:24px}.user-props-inputs[_ngcontent-%COMP%] ppg-input-group[_ngcontent-%COMP%], .user-props-inputs[_ngcontent-%COMP%] app-phone-number-input[_ngcontent-%COMP%]{--p-pds-p-label-font-weight: var(--p-pds-typography-weight-bold)}.user-props-inputs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.user-props-inputs[_ngcontent-%COMP%] p-inputmask.ng-dirty.ng-invalid input{border-color:var(--input-error-border-color);background-color:unset}.user-props-inputs[_ngcontent-%COMP%] .phone-input{width:100%}.notification[_ngcontent-%COMP%]{margin-bottom:24px;display:flex;flex-direction:column;gap:24px}.notification-channel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.notification-description[_ngcontent-%COMP%] .p-button-text{padding:0}.notification-toggles[_ngcontent-%COMP%]{gap:16px}.notification-toggles[_ngcontent-%COMP%] .notification-toggle[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center}.notification-toggles[_ngcontent-%COMP%] .notification-toggle-title[_ngcontent-%COMP%]{width:50%}.notification-toggles[_ngcontent-%COMP%] .notification-toggle-input[_ngcontent-%COMP%]{width:20%}.controls[_ngcontent-%COMP%]{width:40%;display:flex;flex-direction:row;gap:16px}.controls[_ngcontent-%COMP%] p-button[_ngcontent-%COMP%]{width:100%}@media all and (max-width:47.9375rem){.controls[_ngcontent-%COMP%]{width:100%;flex-direction:column-reverse}}"]}
1)}}return n})();var vt=[{path:"",component:ot,canActivate:[ye],data:{permissions:{redirectTo:"/"}}}],rt=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=z({type:n})}static{this.\u0275inj=L({imports:[Z.forChild(Se(vt)),Z]})}}return n})();var Bi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=z({type:n})}static{this.\u0275inj=L({providers:[B,le],imports:[pe,rt,Ze]})}}return n})();export{Bi as UserProfileModule};
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.