1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8711],{10873:(e,l,a)=>{"use strict";a.d(l,{A:()=>h});var r=a(37876),s=a(14232),t=a(2171),i=a(34321),n=a(86425),o=a(71297),d=a(68827),c=a(89311),u=a(6827),m=a(63414),x=a(83872);let h=function(e){let{forRightPanel:l=!1}=e,a=(0,t.useDispatch)(),{primaryUserData:h}=(0,t.useSelector)(e=>e.PrimaryUserData),[p,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),v=async e=>{try{(await i.Eo.updateUserPrivacy({incognitoMode:e})).data.success&&(a(u.Yt.updatePrimaryUserData({incognitoMode:e})),o.A.InfoToast("Incognito mode ".concat(e?"enabled":"disabled",".")))}catch(e){var l,r,s;f((null==e||null==(s=e.response)||null==(r=s.data)||null==(l=r.error)?void 0:l.message)||d.A.GLOBAL.wrong)}};(0,s.useEffect)(()=>{y!==(null==h?void 0:h.incognitoMode)&&g(h.incognitoMode)},[JSON.stringify(h)]);let j=()=>{g(!y),v(!y)};return l?(0,r.jsxs)("div",{role:"none",className:"flex flex-col gap-1 cursor-pointer",onClick:j,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-grow",children:[(0,r.jsx)(x.IncognitoModeIcon,{size:20}),(0,r.jsx)(c.default.SemiBoldText,{sm:!0,children:"Incognito Mode"})]}),(0,r.jsx)("div",{children:(0,r.jsx)(m.A,{enabled:y,setEnabled:j})})]}),(0,r.jsxs)(c.default.NormalText,{xs:!0,className:"ml-7",children:["When enabled, you will be able to privately view others' profiles. However, you won't be able to see who has viewed your profile either."," "]})]}):(0,r.jsx)(n.A.Section,{title:"INCOGNITO MODE",icon:(0,r.jsx)(x.IncognitoModeIcon,{size:16}),children:(0,r.jsxs)("div",{children:[(0,r.jsx)(m.A,{label:"Enable incognito mode",subText:"When enabled, you will be able to privately view others' profiles. However, you won't be able to see who has viewed your profile either.",className:"mt-6 gap-1",enabled:y,setEnabled:j}),p&&(0,r.jsx)(c.default.ErrorText,{className:"mt-2",children:p})]})})}},19625:(e,l,a)=>{"use strict";a.r(l),a.d(l,{default:()=>X});var r=a(37876),s=a(14232),t=a(2171),i=a(21639),n=a(34321),o=a(89311),d=a(63819),c=a(68827),u=a(86425),m=a(71297),x=a(95726),h=a(83872),p=a(16495),f=a(6827);let y="currentPassword",g="password",v="confirmPassword",j=function(){let[e,l]=(0,s.useState)(),[a,j]=(0,s.useState)(!1),[A,b]=(0,s.useState)({}),{primaryUserData:w}=(0,t.useSelector)(e=>e.PrimaryUserData),S=(null==w?void 0:w.newPsw)||!1,N=(0,t.useDispatch)(),T=async a=>{var r,s,t;let i,o;a.preventDefault();let u=null==e?void 0:e.currentPassword,x=null==e?void 0:e.password,h=null==e?void 0:e.confirmPassword,{errorText:p,errorField:y}=(i=null,o=null,!S&&u&&""===u.trim()?{errorText:i=c.A.AUTH.emptyCurrentPassword,errorField:o="currentPassword"}:x&&""===x.trim()?{errorText:i=c.A.AUTH.emptyPassword,errorField:o="password"}:h&&""===h.trim()?{errorText:i=c.A.AUTH.emptyPassword,errorField:o="confirmPassword"}:u===x?{errorText:i=c.A.AUTH.sameOldPassword,errorField:o="password"}:h!==x?{errorText:i=c.A.AUTH.notMatchedPassword,errorField:o="confirmPassword"}:((0,d.passwordValidator)(x)||(i=c.A.AUTH.passwordCriteria,o="password"),{errorText:i,errorField:o}));if(p||y)return void b({[y]:p});j(!0);try{(await n.$$.changePassword({password:x,currentPassword:u})).data&&(m.A.SuccessToast("Password changed successfully!"),N(f.Yt.updatePrimaryUserData({isPasswordLogin:!0}))),l({})}catch(e){b({apiError:(null==e||null==(t=e.response)||null==(s=t.data)||null==(r=s.error)?void 0:r.message)||c.A.GLOBAL.wrong})}finally{j(!1)}},E=e=>{((null==A?void 0:A[e.target.id])||(null==A?void 0:A.apiError))&&b({}),l(l=>({...l,[e.target.id]:e.target.value}))};return(0,r.jsxs)(u.A.Section,{title:"CHANGE PASSWORD",icon:(0,r.jsx)(h.LockIcon,{size:16}),children:[(0,r.jsxs)("form",{onSubmit:T,children:[w.isPasswordLogin?(0,r.jsx)("div",{className:"grid lg:grid-cols-2 grid-cols-1 gap-4 mb-4 mt-6",children:(0,r.jsx)(x.Ay,{id:y,label:"Current password",type:"password",error:null==A?void 0:A[y],onChange:E,value:(null==e?void 0:e.currentPassword)||"",required:!0,disabled:S,borderStyle:"border-gray-300"})}):null,(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 grid-cols-1 gap-4 mb-6",children:[(0,r.jsx)(x.Ay,{id:g,label:"New password",type:"password",error:null==A?void 0:A[g],onChange:E,placeholder:"Min ".concat(p.PASSWORD_MIN_LENGTH," characters"),value:(null==e?void 0:e.password)||"",required:!0,borderStyle:"border-gray-300"}),(0,r.jsx)(x.Ay,{id:v,type:"password",label:"Confirm new password",error:null==A?void 0:A[v],onChange:E,value:(null==e?void 0:e.confirmPassword)||"",required:!0,borderStyle:"border-gray-300"})]}),(null==A?void 0:A.apiError)&&(0,r.jsx)(o.default.ErrorText,{className:"mt-1",children:null==A?void 0:A.apiError})]}),(0,r.jsx)("div",{children:(0,r.jsx)(i.Ay.Carbon,{onClick:T,loading:a,disabled:a,type:"submit","aria-label":"Save",small:!0,className:"ml-auto mr-0",children:"Save"})})]})};var A=a(89099),b=a(39312),w=a(38243),S=a(95993);let N=function(e){let{showModal:l,setShowModal:a}=e,d=(0,A.useRouter)(),u=new b.A,m=(0,t.useDispatch)(),{primaryUserData:x}=(0,t.useSelector)(e=>
1e.PrimaryUserData),[h,p]=(0,s.useState)(!1),[y,g]=(0,s.useState)(""),[v,j]=(0,s.useState)(!1),[N,T]=(0,s.useState)(""),E=async()=>{p(!0);try{if(x.published){let{data:e}=await n.Eo.unpublishProfile({params:{permanent:!0}});m(f.Yt.updatePrimaryUserData({published:!1,unpublishedAt:e.unpublishedAt})),m(S.K5.updatePublished({published:!1}))}p(!1),a(!1)}catch(a){var e,l,r;p(!1),T((null==a||null==(r=a.response)||null==(l=r.data)||null==(e=l.error)?void 0:e.message)||c.A.GLOBAL.wrong)}},C=async()=>{j(!0);try{await n.Eo.deleteUser(),m(f.Yt.clearPrimaryData()),u.remove("token"),u.remove("idtoken"),u.remove("pltoken"),j(!1),d.push("/")}catch(r){var e,l,a;j(!1),g((null==r||null==(a=r.response)||null==(l=a.data)||null==(e=l.error)?void 0:e.message)||c.A.GLOBAL.wrong)}};return(0,s.useEffect)(()=>()=>{p(!1),j(!1),g(""),T("")},[]),(0,r.jsxs)(w.Ay,{showModal:l,setShowModal:a,title:"Delete Account?",overlayRed:!0,children:[(0,r.jsxs)(w.Ep.Body,{className:"text-center",children:[(0,r.jsx)("p",{className:"text-4xl mb-4",children:"\uD83D\uDEA8"}),(0,r.jsx)(o.default.SemiBoldText,{className:"text-lg mb-2",children:"Do you really want to delete your account?"}),(0,r.jsx)(o.default.NormalText,{xs:!0,children:"Alternatively you can hide your profile."}),y&&(0,r.jsx)(o.default.ErrorText,{className:"mt-1",children:y}),N&&(0,r.jsx)(o.default.ErrorText,{className:"mt-1",children:N})]}),(0,r.jsxs)(w.Ep.Footer,{className:(null==x?void 0:x.published)?"justify-between":"justify-end",children:[(null==x?void 0:x.published)&&(0,r.jsx)("div",{className:"mr-4",children:(0,r.jsx)(i.Ay.Carbon,{small:!0,loading:h,disabled:h,onClick:E,id:"unpublish-profile",children:"Hide profile"})}),(0,r.jsx)(i.Ay.Red,{small:!0,loading:v,disabled:v,onClick:C,id:"delect-account",children:"Yes, delete my account."})]})]})};var T=a(10873),E=a(47553),C=a(48230),P=a.n(C),D=a(4755),k=a(16416);let U=function(e){let{showModal:l,setShowModal:a,allowDelete:t,showAddAdminMessage:d}=e,[u,m]=(0,s.useState)(!1),[p,f]=(0,s.useState)(),[y,g]=(0,s.useState)(),v=async()=>{try{g(!0),await n.$$.reverifyEmail(),m(!0)}catch(r){var e,l,a;f((null==r||null==(a=r.response)||null==(l=a.data)||null==(e=l.error)?void 0:e.message)||c.A.GLOBAL.wrong)}finally{g(!1)}},j=async e=>{var l,r,s,i,o;let d=null==(r=e.target.elements)||null==(l=r.code)?void 0:l.value;if(d&&5===d.length)try{g(!0),await n.$$.reverifyEmail({data:{code:d}}),t(!0),a(!1)}catch(e){f((null==e||null==(o=e.response)||null==(i=o.data)||null==(s=i.error)?void 0:s.message)||c.A.GLOBAL.wrong),g(!1)}};return(0,r.jsxs)(w.Ay,{showModal:l,setShowModal:a,title:d?"":"\uD83D\uDEA8 Verify to continue",children:[(0,r.jsx)(w.Ep.Body,{children:(0,r.jsxs)("form",{id:"verify",onSubmit:e=>(e.preventDefault(),u?j(e):v()),children:[u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default.NormalText,{sm:!0,className:"mb-4",children:"Please enter the verification code you received."}
1),(0,r.jsx)(x.Ay,{label:"Verification Code",id:"code",onChange:()=>p&&f("")})]}):(0,r.jsx)(I,{showAddAdminMessage:d}),p&&(0,r.jsx)(o.default.ErrorText,{className:"mt-1",children:p})]})}),(0,r.jsx)(w.Ep.Footer,{children:d&&!u?(0,r.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,r.jsx)(i.Ay.RedOutline,{small:!0,loading:y,disabled:y||p,type:"submit",form:"verify",className:"bg-red-00 text-red hover:bg-red hover:text-gray-00",children:"Continue"}),(0,r.jsx)(i.Ay.Carbon,{small:!0,as:P(),className:"group gap-1",href:k.A.APP_PATHS.manageUserSettings,iconRight:(0,r.jsx)(h.ArrowRightIcon,{size:16}),children:"Add Admin"})]}):(0,r.jsx)(i.Ay.Carbon,{small:!0,loading:y,disabled:y||p,type:"submit",form:"verify",className:"ml-auto",children:"Continue"})})]})},I=e=>{let{showAddAdminMessage:l}=e,{company:a}=(0,t.useSelector)(e=>e.Company);return l?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)("div",{className:"relative max-w-fit",children:[(0,r.jsx)(D.Ay.Small,{image:null==a?void 0:a.logo,fallbackImage:p.CDNImage.emptyCompanyDP}),(0,r.jsx)("span",{className:"text-red absolute bottom-0 right-0",children:(0,r.jsx)(h.WarningTriangleIcon,{size:14})})]})}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)(o.default.SemiBoldText,{sm:!0,className:"mt-4",children:["This might delete ",a.name,"'s company profile too!"]}),(0,r.jsxs)(o.default.MutedText,{className:"mt-2",children:["It is recommended to add another admin before deleting your profile if you are the sole admin for ",a.name,"'s company profile."]})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)(o.default.NormalText,{sm:!0,className:"mb-4",children:["You are about to make changes in your profile visibility. We will send a"," ",(0,r.jsx)("b",{children:"verification code"})," to the email associated with this account to re-verify before this step."]}),(0,r.jsx)(o.default.NormalText,{sm:!0,children:"Please continue if you wish to go ahead."})]})};var O=a(61382),H=a(48003),M=a(69198),_=a(78539);let F=function(){let e=(0,t.useDispatch)(),{primaryUserData:l}=(0,t.useSelector)(e=>e.PrimaryUserData),[a,x]=(0,s.useState)({value:(null==l?void 0:l.profileHandle)||"",error:""}),[p,y]=(0,s.useState)(!1),[g,v]=(0,s.useState)(),j=async()=>{let r=a.value;if(!(null==a?void 0:a.error)&&r){y(!0);try{l.profileHandle!==r&&(await n.Eo.updateUsername({username:r}),await d.default.setAuthCookies({id:l.id,username:r}),e(f.Yt.updatePrimaryUserData({profileHandle:r,profileHandleUpdatedAt:new Date})),e(S.K5.updateAppData(l)),m.A.SuccessToast(M.A.SETTINGS.profileHandleUpdated))}catch(e){var s,t,i;v((null==e||null==(i=e.response)||null==(t=i.data)||null==(s=t.error)?void 0:s.message)||c.A.GLOBAL.wrong)}finally{y(!1)}}};return(0,r.jsxs)(u.A.Section,{title:"CHANGE USERNAME",icon:(0,r.jsx)(h.AtIcon,{size:16}),children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(o.default.NormalText,{xs:!0,className:"my-6",textColor:"text-gray-1k",children:["You can change your username to another username that is not currently in use. Peerlist cannot set up redirects for links to your"," ",(0,r.jsx)(H.Rx,{children:(0,r.jsx)("a",{href:"/".concat(l.profileHandle?l.profileHandle:""),children:"Peerlist profile"})})," ","that include your old username."]}),(0,r.jsx)(_.A,{asInput:!0,label:"Username",id:"username-input",username:a,setUsername:e=>{x({...e})},inputClassName:"p-px pt-0.5"})]}),g?(0,r.jsx)(o.default.ErrorText,{className:"my-1",children:g}):null,(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(i.Ay.Carbon,{onClick:j,loading:p,"aria-label":"Save",small:!0,className:"ml-auto mr-0",children:"Change"})})]})};var R=a(69964),B=a.n(R),L=a(60383),G=a(41205),z=a(58385),Y=a(97e3);let V=e=>{let{showChangeAccountEmailModal:l,setShowChangeAccountEmailModal:a,onEmailChange:t=()=>{}}
1=e,[d,u]=(0,s.useState)(!1),[h,p]=(0,s.useState)({}),[f,y]=(0,s.useState)(!1),[g,v]=(0,s.useState)(!1),[j,A]=(0,s.useState)(!0),[b,S]=(0,s.useState)(),[N,T]=(0,s.useState)(),[E,C]=(0,s.useState)(""),P=()=>{A(!0),setTimeout(()=>A(!1),3e4)};(0,s.useEffect)(()=>{d&&P()},[d]);let D=async()=>{try{let{errorText:e,errorField:l}=G._7.loginSignup({email:b,password:N});if(e||l)return void p({[l]:e});if(!(0,Y.ji)(b))return void p({email:c.A.REQUEST_VERFICATION.email});y(!0),await n.bz.createPrimaryEmailChangeRequest({email:b,password:N}),m.A.SuccessToast("".concat(M.A.AUTH.codeSent," ").concat(M.A.AUTH.checkMail)),u(!0)}catch(n){var e,l,a,r,s,t,i;p({apiError:(null!=(i=null!=(t=null==n||null==(l=n.response)||null==(e=l.error)?void 0:e.message)?t:null==n||null==(s=n.response)||null==(r=s.data)||null==(a=r.error)?void 0:a.message)?i:"Failed to process account email change.")||""})}finally{y(!1)}},k=async()=>{try{v(!0),await n.bz.createPrimaryEmailChangeRequest({email:b,resendOtp:!0}),m.A.SuccessToast("".concat(M.A.AUTH.codeSent," ").concat(M.A.AUTH.checkMail)),P()}catch(n){var e,l,a,r,s,t,i;p({apiError:(null!=(i=null!=(t=null==n||null==(l=n.response)||null==(e=l.error)?void 0:e.message)?t:null==n||null==(s=n.response)||null==(r=s.data)||null==(a=r.error)?void 0:a.message)?i:"Failed to process account email change.")||""})}finally{v(!1)}},U=async()=>{try{let{errorText:e,errorField:l}=E&&(null==E?void 0:E.trim())!==""?{}:{errorText:c.A.AUTH.verificationCodeLengthError,errorField:"confirmationCode"};if(e||l)return void p({[l]:e});if(!b||(null==b?void 0:b.trim())===""||!(0,Y.ji)(b))return void p({email:c.A.REQUEST_VERFICATION.email});y(!0),await n.bz.verifyPrimaryEmailChangeOtp({email:b,otp:E}),m.A.SuccessToast("Primary account email changed!"),t(b),a(!1)}catch(a){var e,l,r,s,i,o,d;p({apiError:(null!=(d=null!=(o=null==a||null==(l=a.response)||null==(e=l.error)?void 0:e.message)?o:null==a||null==(i=a.response)||null==(s=i.data)||null==(r=s.error)?void 0:r.message)?d:"Failed to process account email change.")||""})}finally{y(!1)}},I=()=>{p({})};return(0,r.jsxs)(w.Ay,{showModal:l,setShowModal:a,title:"Change account email",children:[(0,r.jsxs)(w.Ep.Body,{className:" w-full ",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-6 items-center",children:[(0,r.jsx)(z.A.At,{}),(0,r.jsx)("div",{className:"text-center",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default.NormalText,{textColor:"text-gray",xs:!0,children:"We have sent a verification code to your new email"}),(0,r.jsx)(o.default.SemiBoldText,{className:"ml-1 ",textColor:"text-gray",xs:!0,children:b})]}):(0,r.jsx)(o.default.NormalText,{textColor:"text-gray",xs:!0,children:"You are about to update your main account email. All future communications will be directed to your newly specified email address."})}),d?(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(x.Ay,{id:"pl-verificationCode",required:!0,label:"Verification code",type:"text",autoComplete:"off",onChange:e=>{C(e.target.value),I()}}),(null==h?void 0:h.confirmationCode)?(0,r.jsx)(o.default.ErrorText,{xs:!0,className:"mt-0.5",children:h.confirmationCode}):null]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(x.Ay,{id:"pl-password",required:!0,label:"Account Password",type:"password",autoComplete:"current-password",onChange:e=>{T(e.target.value),I()},autoFocus:!0}),(null==h?void 0:h.password)?(0,r.jsx)(o.default.ErrorText,{xs:!0,className:"mt-0.5",children:h.password}):null]}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(x.Ay,{id:"pl-email",required:!0,label:"New Email",type:"email",autoComplete:"off",onChange:e=>{S(e.target.value),I()}}),(null==h?void 0:h.email)?(0,r.jsx)(o.default.ErrorText,{xs:!0,className:"mt-0.5",children:h.email}):null]})]})]}),(null==h?void 0:h.apiError)?(0,r.jsx)(o.default.ErrorText,{xs:!0,className:"mt-2",children:h.apiError}):null]}),(0,r.jsx)(w.Ep.Footer,{children:(0,r.jsx)("div",{className:"w-full flex justify-between",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ay.CarbonOutline,{small:!0,disabled:j,loading:g,onClick:()=>k(),children:"Resend Code"}),(0,r.jsx)(i.Ay.Primary,{small:!0,loading:f,disabled:!E,onClick:()=>{U()},children:"Save"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ay.CarbonOutline,{small:!0,onClick:()=>a(!1),children:"Cancel"}),(0,r.jsx)(i.Ay.Carbon,{small:!0,loading:f,disabled:!N||!b||Object.keys(h||{}).length>0,onClick:()=>{D()},children:"Verify New Email"})]})})})]})}
1,q="mobile",W="secondaryEmail",$=function(){let[e,l]=(0,s.useState)(),[a,y]=(0,s.useState)({}),[g,v]=(0,s.useState)(!1),{primaryUserData:j}=(0,t.useSelector)(e=>e.PrimaryUserData),b=(0,A.useRouter)(),w=(0,t.useDispatch)(),[S,N]=(0,s.useState)(!1),[T,E]=(0,s.useState)(!1);(0,s.useEffect)(()=>{l(j)},[j.mobile,j.secondaryEmail]);let C=e=>{((null==a?void 0:a[e.target.id])||(null==a?void 0:a.apiError))&&y({}),l(l=>({...l,[e.target.id]:e.target.value}))},P=async function(){let{autoSave:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mobile:a,secondaryEmail:r}=e,{errText:s,errorField:t}=(e=>{let{secondaryEmail:l}=e;return l&&!(0,Y.ji)(l)?{errText:c.A.REQUEST_VERFICATION.email,errorField:W}:{errText:null,errorField:null}})({mobile:a,secondaryEmail:r});if(s||t)return void y({[t]:s});let i={mobile:a,secondaryEmail:r};if(!B()({mobile:j.mobile,secondaryEmail:j.secondaryEmail},i)||!l)try{if(l||v(!0),await n.Eo.updateUser(i,p.UPDATE_USER_CONTEXTS.CONTACT_INFO),w(f.Yt.updatePrimaryUserData({...i})),l)return;m.A.SuccessToast("Contact details updated successfully!")}catch(e){var o,d,u;y({apiError:(null==e||null==(u=e.response)||null==(d=u.data)||null==(o=d.error)?void 0:o.message)||c.A.GLOBAL.wrong})}finally{v(!1)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.A.Section,{title:"CONTACT INFO",id:"contact-info",icon:(0,r.jsx)(h.IdBadgeIcon,{size:16}),children:[(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 grid-cols-1 gap-4 mb-4 mt-6",children:[(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(x.Ay,{id:"email",label:"Account email",type:"email",required:!0,disabled:!0,value:(null==j?void 0:j.email)||"",onBlur:()=>P({autoSave:!0})}),(0,r.jsxs)("div",{role:"none",className:"pt-4 flex items-center gap-1 cursor-pointer",onClick:()=>(()=>{if(!j.isPasswordLogin)return void N(!0);E(!0)})(),children:[(0,r.jsx)(h.ReloadIcon,{size:12}),(0,r.jsx)(o.default.SemiBoldText,{xs:!0,as:"span",children:"Change account email"})]})]}),(0,r.jsx)("div",{className:"flex flex-col ",children:(0,r.jsx)(x.Ay,{id:q,label:"Mobile",type:"tel",value:(null==e?void 0:e.mobile)||"",onChange:e=>{d.default.isValidPhoneInput(e.target.value)&&C(e)},error:null==a?void 0:a[q],onBlur:()=>P({autoSave:!0})})}),(0,r.jsx)("div",{className:"flex flex-col ",children:(0,r.jsx)("div",{children:(0,r.jsx)(x.Ay,{id:W,label:"Secondary email",type:"email",value:(null==e?void 0:e.secondaryEmail)||"",onChange:e=>C(e),error:null==a?void 0:a[W],onBlur:()=>P({autoSave:!0})})})})]}),(0,r.jsx)("div",{children:(0,r.jsx)(i.Ay.Carbon,{onClick:P,loading:g,disabled:v,type:"submit","aria-label":"Save",small:!0,className:"ml-auto mr-0",children:"Save"})})]}),S?(0,r.jsx)(L.A,{deleteText:"Add a password",modalIcon:(0,r.jsx)(h.WarningTriangleIcon,{size:40}),subText:"Youâve signed up with a Google account. In order to change your primary email, you need to add a password.",deleteBtnText:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:"Add a Password"}),(0,r.jsx)(h.ArrowRightIcon,{size:14})]}),showModal:S,setShowModal:N,confirm:()=>{b.push(p.APP_PATHS.accountSettings)}}):null,T?(0,r.jsx)(V,{showChangeAccountEmailModal:T,setShowChangeAccountEmailModal:E,onEmailChange:e=>{w(f.Yt.updatePrimaryUserData({email:e}))}}):null]})},X=(0,E.A)(function(){let{primaryUserData:e}=(0,t.useSelector)(e=>
1e.PrimaryUserData),[l,a]=(0,s.useState)(!1),[n,d]=(0,s.useState)(!1);return(0,r.jsxs)(O.default,{pageHeading:"Settings â Account",children:[(0,r.jsxs)("div",{className:"p-6 flex flex-col gap-20",children:[(0,r.jsx)($,{}),(0,r.jsx)(j,{}),(0,r.jsx)(F,{}),e.published&&(0,r.jsx)(T.A,{incognito:e.incognitoMode}),(0,r.jsx)("div",{className:"".concat((null==e?void 0:e.published)?"mb-10":"mb-30"),children:(0,r.jsxs)(u.A.Section,{title:"DANGER ZONE",icon:(0,r.jsx)(h.WarningTriangleIcon,{size:16}),children:[(0,r.jsx)(o.default.NormalText,{xs:!0,className:"mb-2 mt-6",textColor:"text-gray-1k",children:"Delete your account and account data. This canât be undone!"}),(0,r.jsx)(i.Ay.Red,{"aria-label":"Delete account",small:!0,onClick:()=>a(!0),children:"Delete Account"})]})})]}),l&&(0,r.jsx)(U,{showModal:l,setShowModal:a,allowDelete:d}),n&&(0,r.jsx)(N,{showModal:n,setShowModal:d})]})})},61382:(e,l,a)=>{"use strict";a.r(l),a.d(l,{default:()=>y});var r=a(37876),s=a(77328),t=a.n(s),i=a(14232),n=a(2171),o=a(57994),d=a(38614),c=a(47553),u=a(5357),m=a(21639),x=a(82669),h=a(16495),p=a(83872);let f=(0,i.memo)(()=>{var e,l;let{primaryUserData:a}=(0,n.useSelector)(e=>e.PrimaryUserData),s=[{label:"profile",key:"profile",url:h.APP_PATHS.profileSettings,event:"settings-profile-tab",description:"Edit your profile information like name, profile picture, skills"},{label:"inbox",key:"inbox",url:h.APP_PATHS.inboxSettings,event:"settings-inbox-tab",description:"Edit shorthands and control who can send you messages on Peerlist"},{label:"account",key:"account",url:h.APP_PATHS.accountSettings,event:"settings-account-tab",description:"Change your password anytime."},{label:"notifications",key:"notifications",url:h.APP_PATHS.notificationSettings,event:"notifications-account-tab",description:"Select the kinds of notifications you get about your activities, interests, and recommendations."},{label:"job preferences",key:"jobPreferences",url:h.APP_PATHS.jobPreferenceSettings,event:"settings-jobPreferences-tab",description:"You can see & set your job preferences",badge:(null==a||null==(e=a.jobPreferences)?void 0:e.status)!==h.JOB_PREFERENCES_CONST.STATUS_INACTIVE?(0,r.jsx)(u.A.Green,{className:"ml-2",children:"Open"}):null},{label:"custom domain",key:"customDomain",url:h.APP_PATHS.customDomainSettings,event:"settings-customDomain-tab",description:"Use your profile as a portfolio on your domain",badge:(null==a||null==(l=a.customDomain)?void 0:l.domainName)?(0,r.jsx)(u.A.Green,{className:"ml-2",children:"Connected"}):(0,r.jsx)(u.A.Red,{className:"ml-2",children:"Not Connected"})}];return(0,r.jsx)("ul",{children:s.map(e=>"notifications"!==e.key||(null==a?void 0:a.published)?(0,r.jsx)("li",{className:"w-full",children:(0,r.jsx)(d.A,{page:e,children:(0,r.jsx)("p",{className:"text-xs block lg:hidden",children:e.description})})},e.url):null)})}),y=(0,c.A)(e=>{let{children:l,pageHeading:a="Settings",title:s=null,loading:n=!1,centerTopChildren:d=null}=e,[c,u]=(0,i.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t(),{children:(0,r.jsx)("title",{children:"Peerlist Settings | ".concat(s||a)})}),(0,r.jsxs)(o.A.Center,{children:[(0,r.jsxs)(o.A.CenterTop,{internalPage:!0,children:[(0,r.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.A.BackButton,{}),(0,r.jsx)(o.A.PageHeading,{children:a})]}),d]}),(0,r.jsx)(m.Ay.CarbonOutline,{circular:!0,onClick:()=>u(e=>!e),className:"lg:hidden flex",children:c?(0,r.jsx)(p.CloseXIcon,{size:18}):(0,r.jsx)(p.MenuIcon,{size:16})})]}),(0,r.jsx)("main",{children:n?(0,r.jsx)("div",{className:"flex items-center justify-center vertical-center-loader w-full",children:(0,r.jsx)(x.A,{})}):(0,r.jsx)("div",{children:l})})]}),(0,r.jsx)(o.A.Right,{showSidePanel:c,paddingX:"px-0",children:(0,r.jsx)(f,{})})]})})},87318:(e,l,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/settings/account",function(){return a(19625)}])}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=87318)),_N_E=e.O()}]);
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.