1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{3501:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account",function(){return r(9343)}])},9343:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>A,default:()=>S});var a=r(37876),l=r(14232),s=r(96145),n=r(56856),i=r(91408),c=r(81220),o=r(10841),d=r.n(o),u=r(60614),m=r(15234),x=r(56e3),p=r(10553),h=r(89099);let f=e=>{let{isOpen:t,onClose:r}=e,l=async()=>{try{(await (0,c.aR)()).error||(0,p.signOut)({callbackUrl:"/login"})}catch(e){console.log(e,"error")}};return(0,a.jsx)(m.A,{isOpen:t,onClose:r,header:"Take a Break?",children:(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("p",{className:"text-14 text-grey",children:"Your account will be hidden from others. You wonât receive notifications or appear in searches. You can come back anytime by logging in again."}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-6 p-4",children:[(0,a.jsx)(s.$n,{onClick:l,className:"w-full text-12 bg-primary px-6 py-2 text-white rounded-[5px]",children:"Yes, Deactivate"}),(0,a.jsx)(s.$n,{onClick:r,className:"w-full text-12 bg-white px-6 py-2 text-black border border-grey rounded-[5px]",children:"Cancel"})]})]})})};var b=r(85480);let g=e=>{let{isOpen:t,onClose:r}=e,[n,i]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[u,x]=(0,l.useState)(!1),[h,f]=(0,l.useState)(!1),[g,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)({}),w=()=>{f(!1),i(""),d(""),r()},N=async()=>{try{x(!0),(await (0,c.mN)()).error||f(!0)}catch(e){console.log(e,"error")}x(!1)},k=async e=>{e.preventDefault(),x(!0);let t=new FormData;t.append("code",n),t.append("password",o);try{let e=await (0,c.ak)(t);e.error?(x(!1),v({apiError:e.message})):((0,p.signOut)({callbackUrl:"/login"}),x(!1))}catch(e){v({apiError:e.response.data.message})}x(!1)};return(0,a.jsx)(m.A,{isOpen:t,onClose:w,header:"Delete Your Account?",children:(0,a.jsx)("div",{className:"mt-6",children:h?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center mt-6 gap-4",children:[(0,a.jsx)("p",{className:"text-14 text-left flex justify-start w-full text-black",children:"Enter OTP sent to your email"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(s.JU,{children:"Enter OTP"}),(0,a.jsx)(b.A,{setOtpInput:i}),(0,a.jsx)(s.pd,{type:g?"text":"password",placeholder:"Password",autoComplete:"new-password",name:"password",value:o,onChange:e=>{let{value:t}=e.target;d(t)},className:"w-full pl-10 h-40 px-4 py-3 text-black text-12 border border-grey rounded outline-none focus:ring-2 focus:primary",prefix:(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,a.jsx)(s.In,{id:g?"eye-cut-icn":"password-icn",width:16,height:16,className:"inline-block text-grey"})}),suffix:(0,a.jsx)("span",{className:"absolute text-center right-4 top-1/2 -translate-y-1/2 cursor-pointer",children:(0,a.jsx)(s.In,{id:g?"eye-cut-icn":"eye-icn",onClick:()=>{y(!g)},width:20,height:16,className:"inline-block text-grey"})})}),(null==j?void 0:j.apiError)&&(0,a.jsx)("p",{className:"text-12 text-red",children:j.apiError}),(0,a.jsx)(s.$n,{onClick:k,className:"w-full text-12 bg-red px-6 py-2 text-white rounded-[5px]",children:u?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(s.aH,{})}):"Delete Account"}),(0,a.jsx)(s.$n,{onClick:w,className:"w-full text-12 bg-white px-6 py-2 text-black border border-grey rounded-[5px]",children:"Cancel"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-14 text-grey",children:"This action will permanently remove your account, all posts, followers, and messages. You wonât be able to recover this data once deleted. by logging in again."}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-6 p-4",children:[(0,a.jsx)(s.$n,{onClick:N,className:"w-full text-12 bg-red px-6 py-2 text-white rounded-[5px]",children:u?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(s.aH,{})}):"Yes, Delete Forever"}),(0,a.jsx)(s.$n,{onClick:w,className:"w-full text-12 bg-white px-6 py-2 text-black border border-grey rounded-[5px]",children:"Cancel"})]})]})})})};var y=r(25035);let j=(0,l.forwardRef)((e,t)=>{var r,n,i,c;let{form:o,setForm:d,session:u}=e,[m,x]=(0,l.useState)((null==u||null==(n=u.user)||null==(r=n.userData)?void 0:r.profile_pic)||"/images/profile-image.jpg"),[p,h]=(0,l.useState)((null==u||null==(c=u.user)||null==(i=c.userData)?void 0:i.cover_image)||"/images/leftCardBg.png"),f=(0,l.useRef)(null),b=(0,l.useRef)(null);(0,l.useImperativeHandle)(t,()=>({getProfileInputRef:()=>f,getCoverInputRef:()=>b}));let g=e=>{let{type:t,checked:r,name:a,value:l}=e.target;d({...o,[a]:"checkbox"===t?r:l})};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"relative w-full h-44 rounded-t-[5px] mt-5 curs
1or-pointer bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(".concat(p,")")},onClick:()=>{var e;return null==b||null==(e=b.current)?void 0:e.click()},children:[(0,a.jsx)(s.In,{className:"absolute bottom-1 right-2",id:"profile-edit-icn",width:33,height:33,stroke:"",onClick:e=>{var t;e.stopPropagation(),null==b||null==(t=b.current)||t.click()}}),(0,a.jsx)(s.pd,{type:"file",accept:"image/*",ref:b,className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&h(URL.createObjectURL(r))}}),(0,a.jsxs)(s.$n,{className:"absolute bottom-0 left-6 transform translate-y-1/2",type:"button",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(s.Zc,{src:m||"/images/profile-image.jpg",alt:"profile",width:128,height:128,className:"w-20 h-20 rounded-full object-cover border-2 border-[#D9D9D9]"}),(0,a.jsx)(s.In,{className:"absolute bottom-0 right-0",id:"profile-edit-icn",width:33,height:33,stroke:"",onClick:e=>{var t;e.stopPropagation(),null==f||null==(t=f.current)||t.click()}}),(0,a.jsx)(s.pd,{type:"file",accept:"image/*",ref:f,className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&x(URL.createObjectURL(r))}})]})]}),(0,a.jsxs)("div",{className:"mt-14 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(s.JU,{className:"block text-14 mb-1",children:"Display name"}),(0,a.jsx)(s.pd,{placeholder:"Display name",value:(null==o?void 0:o.displayName)||"",name:"displayName",onChange:g,className:"w-full sm:w-2/3 text-14 border border-grey rounded-[5px] px-5 py-2"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.JU,{className:"block text-14 mb-1",children:"About"}),(0,a.jsx)("textarea",{placeholder:"Tell us a bit about yourself",value:(null==o?void 0:o.about)||"",name:"about",onChange:g,className:"w-full sm:w-2/3 border border-grey rounded-[5px] px-5 py-2 text-14 resize-none focus:outline-none focus:border-primary",rows:3})]})]})]})});j.displayName="UpdateProfile";var v=r(97685),w=r(42264),N=r.n(w);r(11827);let k=i.Ik().shape({first_name:i.Yj().required("First name is required"),last_name:i.Yj().required("Last name is required"),email:i.Yj().required("Email is required").matches(/^[^\s@]+@[^\s@]+\.[^\s@]+$/,"Enter a valid email address"),username:i.Yj().required("Username is required").min(3,"Must be at least 3 characters").matches(/^[a-zA-Z0-9-]+$/,"Only letters, numbers and hyphens allowed"),dob:i.p6().nullable().typeError("Invalid date").required("Date of birth is required"),country_code:i.Yj().required("Country code is required"),contact_number:i.Yj().required("Phone number is required").min(7,"Phone number is too short").max(15,"Phone number is too long")}),C={PRIMARY:"Save changes",SECONDARY:"Resend OTP"},D=e=>{var t,r,i,o,b,w,D,_;let{userDetails:O}=e,A=(0,h.useRouter)(),S=(0,l.useRef)(null),{update:E}=(0,p.useSession)(),{data:P}=(0,p.useSession)(),Y=null==O?void 0:O.user,[I,R]=(0,l.useState)({first_name:(null==Y?void 0:Y.first_name)||"",last_name:(null==Y?void 0:Y.last_name)||"",email:(null==Y?void 0:Y.email)||"",username:(null==Y?void 0:Y.username)||"",dob:d()(null==Y?void 0:Y.dob).format("YYYY-MM-DD")||"",country_code:(null==Y?void 0:Y.country_code)||"",contact_number:(null==Y?void 0:Y.contact_number)||"",displayName:(null==P||null==(r=P.user)||null==(t=r.userData)?void 0:t.display_name)||"".concat((null==P||null==(o=P.user)||null==(i=o.userData)?void 0:i.first_name)||""," ").concat((null==P||null==(w=P.user)||null==(b=w.userData)?void 0:b.last_name)||"").trim(),about:null==P||null==(_=P.user)||null==(D=_.userData)?void 0:D.about}),[$,F]=(0,l.useState)({}),[U,T]=(0,l.useState)(!1),[q,L]=(0,l.useState)(!1),[J,B]=(0,l.useState)(""),[M,H]=(0,l.useState)(null),[z,Z]=(0,l.useState)(!1),[V,G]=(0,l.useState)(!1),X=new Date,K=new Date;K.setFullYear(X.getFullYear()-18);let Q=e=>{let{target:t}=e,{type:r,checked:a,name:l}=t,s="checkbox"===r?a:t.value;R({...I,[l]:s})},W=async()=>{let e=new FormData;e.append("email",I.email);try{await (0,c.AJ)(e),T(!1),L(!0)}catch(e){console.error("Error sending OTP:",e)}},ee=async e=>{e.preventDefault();try{await k.validate(I,{abortEarly:!1}),F({})}catch(t){let e={};t.inner?t.inner.forEach(t=>{e[t.path]=t.message}):e[t.path]=t.message,F(e);return}if(I.email===Y.email&&I.username===Y.username){try{await el()}catch(e){console.error("Error updating account:",e)}return}if(I.email===Y.email&&I.username!==Y.username){try{let e=new FormData;e.append("username",I.username);let t=await (0,c.$O)("username",e),r={};(null==t?void 0:t.error)&&(r.username=t.message),Object.keys(r).length>0?F(r):(F({}),await el())}catch(e){console.error("Error checking signup details:",e)}return}if(I.username===Y.username&&I.email!==Y.email)try{let e=new FormData;e.append("email",I.email);let t=await (0,c.$O)("email",e),r={};(null==t?void 0:t.error)&&(r.email=t.message),Object.keys(r).length>0?F(r):(F({}),W())}catch(e){console.error("Error checking signup details:",e)}else{T(!0);try{let e=new FormData;e.append("email",I.email);let t=new FormData;t.append("username",I.username);let[r,a]=await Promise.all([(0,c.$O)("email",e),(0,c.$O)("username",t)]),l={};(null==r?void 0:r.error)&&(l.email=r.message),(null==a?void 0:a.error)&&(l.username=a.message),Object.keys(l).length>0?F(l):(F({}),W())}catch(e){console.error("Error checking signup details:",e)}}},et=async()=>{let e=new FormData;e.append("email",ed),e.append("otp",parseInt(J,10));try{return await (0,c.vJ)(e)}catch(e){return console.log(e,"error"),e.response.data}},er=async e=>{e.preventDefault(),T(!0);let t=await et();t.error?H(t.message):ea(),T(!1)},ea=async()=>{await el()},el=async()=>{var e,t,r,a,l,s,n,i;let o=null==(e=S.current)?void 0:e.getProfileInputRef(),d=null==(t=S.current)?void 0:t.getCoverInputRef(),{first_name:u,last_name:m,email:x,username:p,dob:h,country_code:f}=I,b=null==f?void 0:f.replace("+",""),g=new FormData;g.append("first_name",u),g.append("last_name",m),g.append("email",x),g.append("username",p),g.append("dob",h),g.append("about",null==I?void 0:I.about),g.append("display_name",null==I?void 0:I.displayName),g.append("country_code",b),g.append("contact_number",I.contact_number),(null==o||null==(a=o.current)||null==(r=a.files)?void 0:r[0])&&g.append("profile_pic",o.current.files[0]),(null==d||null==(s=d.current)||null==(l=s.files)?void 0:l[0])&&g.append("cover_image",d.current.files[0]),T(!0);try{let e=await (0,c.eg)(g),t=null==e||null==(n=e.content)?void 0:n.user;!e||(null==e?void 0:e.error)||(await E({userProfile:!0,userData:{...null==P||null==(i=P.user)?void 0:i.userData,...t}}),v.Ay.success("User details updated successfully"),A.push("/settings"))}catch(e){console.log(e,"err"),T(!1)}},es=()=>{A.push("/settings")},en=()=>{Z(!z)},ei=()=>{G(!V)},{first_name:ec,last_name:eo,email:ed,username:eu,dob:em}=I;return(0,a.jsxs)("div",{className:"w-full py-6 mb-10 sm:mb-0",children:[(0,a.jsx)(y.A,{onBack:es,text:"Account Settings"}),(0,a.jsx)("form",{className:"space-y-6 p-4 sm:ml-4",onSubmit:ee,autoComplete:"off",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{session:P,form:I,setForm:R,ref:S}),(0,a.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4 w-full sm:w-2/3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"First name"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.pd,{type:"text",placeholder:"First name",autoComplete:"off",value:ec,name:"first_name",onChange:Q,className:"w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary",prefix:(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,a.jsx)(s.In,{id:"name-icn",width:16,height:16,className:"inline-block text-black"})})}),$.first_name&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.first_name})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"Last name"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.pd,{type:"text",placeholder:"Last name",autoComplete:"off",value:eo,name:"last_name",onChange:Q,className:"w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary",prefix:(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,a.jsx)(s.In,{id:"name-icn",width:16,height:16,className:"inline-block text-black"})})}),$.last_name&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.last_name})]})]})]}),(0,a.jsxs)("div",{className:"w-full sm:w-2/3",children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"Email"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.pd,{type:"email",placeholder:"Email",autoComplete:"off",value:ed,name:"email",readOnly:!0,onChange:Q,className:"w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary",prefix:(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,a.jsx)(s.In,{id:"username-icn",width:16,height:16,className:"inline-block text-black"})})}),$.email&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.email})]})]}),(0,a.jsxs)("div",{className:"w-full sm:w-2/3 ",children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"Contact Number"}),(0,a.jsx)(N(),{country:"in",value:"".concat(I.country_code).concat(I.contact_number),enableSearch:!0,countryCodeEditable:!1,inputStyle:{width:"100%",height:"40px",fontSize:"12px"},onChange:(e,t)=>
1{let r="+".concat(t.dialCode),a=e.replace(t.dialCode,"");R(e=>({...e,country_code:r,contact_number:a}))},containerClass:"w-full",inputClass:" w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary ",buttonClass:"border-grey"}),$.contact_number&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.contact_number})]}),(0,a.jsxs)("div",{className:"w-full sm:w-2/3",children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"Username"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.pd,{type:"text",placeholder:"Username",autoComplete:"off",value:eu,readOnly:!0,name:"username",onChange:Q,className:"w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary",prefix:(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,a.jsx)(s.In,{id:"name-icn",width:16,height:16,className:"inline-block text-black"})})}),$.username&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.username})]})]}),(0,a.jsxs)("div",{className:"w-full sm:w-1/3",children:[(0,a.jsx)(s.JU,{className:"text-12 text-black mb-1 block",children:"DOB"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{selected:em,onChange:e=>{let t=d()(e).format("MM/DD/YYYY");R({...I,dob:t})},maxDate:K,openToDate:K,showYearDropdown:!0,scrollableYearDropdown:!0,yearDropdownItemNumber:200,customInput:(0,a.jsx)(u.A,{}),className:"w-full pl-10 h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:border-none focus:primary",onFocus:e=>e.target.blur(),onChangeRaw:e=>e.preventDefault()}),$.dob&&(0,a.jsx)("p",{className:"pl-2 text-red text-12",children:$.dob})]})]}),(0,a.jsxs)("div",{className:"flex w-full sm:w-1/2 space-x-4",children:[(0,a.jsx)(s.$n,{type:"submit",disabled:U,className:"bg-primary text-12 w-full text-white px-2 py-2 rounded hover:bg-blue-700",children:U?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(s.aH,{})}):"Save changes"}),(0,a.jsx)(s.$n,{type:"button",onClick:es,className:"border text-12 border-grey w-full text-black px-2 py-2 rounded hover:bg-gray-100",children:"Cancel"})]})]})}),(0,a.jsx)("hr",{className:"my-3 pl-0 border-dividerGrey"}),(0,a.jsxs)("div",{className:"mt-4 sm:mt-8 sm:ml-7 w-4/4 p-4 sm:p-0 sm:w-1/4 space-y-3",children:[(0,a.jsx)(s.$n,{onClick:en,className:"w-full border text-12 border-gray-400 text-gray-700 px-1 py-2 rounded hover:bg-gray-100",children:"Deactivate account"}),(0,a.jsx)(s.$n,{onClick:ei,className:"w-full text-12 bg-red text-white px-1 py-2 rounded hover:bg-red-600",children:"Delete account"})]}),(0,a.jsx)(m.A,{isOpen:q,header:"Verify your Email",onClose:()=>L(!1),className:"max-w-md",children:(0,a.jsx)("div",{className:"flex flex-col items-center justify-center mt-6",children:(0,a.jsx)(x.A,{email:ed,error:M,setOtpInput:B,submitOTP:er,changepassword:!1,changeEmail:()=>{},isLoading:U,otpActions:C})})}),(0,a.jsx)(f,{isOpen:z,onClose:en}),(0,a.jsx)(g,{isOpen:V,onClose:ei})]})};var _=r(23555),O=r(80612),A=!0;function S(e){let{userDetails:t,suggestionList:r,tagsList:l}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O.A,{title:"Account"}),(0,a.jsx)(_.A,{userDetails:t,tagsList:l,suggestionList:r,children:(0,a.jsx)(D,{userDetails:t})})]})}},25035:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(37876);r(14232);var l=r(96145);let s=e=>{let{onBack:t,text:r}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center ml-7 space-x-2 mb-6",children:[(0,a.jsx)(l.In,{onClick:t,id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,a.jsx)(l.DZ,{type:"h2",text:r,className:"text-14 text-black"})]}),(0,a.jsx)("hr",{className:"my-2 pl-0 border-dividerGrey"})]})}},56e3:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var a=r(37876),l=r(14232),s=r(96145),n=r(85480);let i=e=>{let{handleResendOTP:t,isLoading:r=!1,otpActions:l,resendLoading:n=!1,resendSuccessText:i=""}=e,{PRIMARY:c,SECONDARY:o}=l;return(0,a.jsxs)("div",{className:"mt-6 space-y-3 w-full",children:[(0,a.jsx)(s.$n,{type:"submit",disabled:r,className:"w-full h-40 bg-primary text-white rounded-[5px] text-12",children:r?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(s.aH,{})}):c}),(0,a.jsx)(s.$n,{type:"button",variant:"outline",className:"w-full h-40 text-12 border border-grey text-black rounded-[5px]",onClick:t,children:n?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(s.aH,{className:"text-grey"})}):o}),i&&(0,a.jsx)("span",{className:"flex justify-center text-12 text-green",children:i})]})};var c=r(81220);let o=e=>{let{setOtpInput:t,error:r,email:o,isLoading:d=!1,otpActions:u}=e,[m,x]=(0,l.useState)(!1),[p,h]=(0,l.useState)("");(0,l.useEffect)(()=>{""!==p&&setTimeout(()=>{h("")},5e3)},[p]);let f=async()=>{x(!0);let e=new FormData;e.append("email",o),await (0,c.AJ)(e),h("New OTP sent successfully"),x(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.JU,{className:"mt-6 block text-12 text-black font-medium",children:"Enter OTP"}),(0,a.jsx)(n.A,{setOtpInput:t}),r&&(0,a.jsx)("p",{className:"text-12 text-red",children:r}),(0,a.jsx)(i,{handleResendOTP:f,resendLoading:m,resendSuccessText:p,isLoading:d,otpActions:u})]})},d={PRIMARY:"Proceed",SECONDARY:"Resend OTP"},u=e=>{let{email:t,error:r,setOtpInput:l,submitOTP:n,changepassword:i=!1,changeEmail:c,isLoading:u=!1,otpActions:m=d}=e;return(0,a.jsxs)("form",{className:"mt-6 md:mt-12 w-full max-w-md",onSubmit:n,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-gray-400 text-14",children:[(0,a.jsxs)("span",{children:["OTP sent to ",t]}),!i&&(0,a.jsx)(s.$n,{disabled:u,onClick:c,className:"text-primary hover:underline text-sm",children:"Change"})]}),(0,a.jsx)(o,{isLoading:u,email:t,setOtpInput:l,error:r,otpActions:m})]})}},60614:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(37876),l=r(14232),s=r(96145);let n=(0,l.forwardRef)((e,t)=>{let{value:r,onClick:l}=e;return(0,a.jsxs)(s.$n,{onClick:e=>{e.preventDefault(),l(e)},ref:t,type:"button",className:"w-full flex bg-white items-center gap-2 px-4 py-2 h-4
10 text-12 text-black border border-grey rounded focus:outline-none",children:[(0,a.jsx)(s.In,{id:"calender-icn",width:18,height:20,className:"inline-block text-black"}),(0,a.jsx)("span",{className:"text-12 ".concat(r?"text-black":"text-grey"),children:r||"DOB"})]})});n.displayName="CustomDateButton";let i=n},80612:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(37876),l=r(77328),s=r.n(l);function n(e){let{title:t}=e;return(0,a.jsx)(s(),{children:(0,a.jsx)("title",{children:t?"".concat(t," | Velaflow"):"Velaflow"})})}},85480:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(37876),l=r(14232);let s=e=>{let{setOtpInput:t}=e,[r,s]=(0,l.useState)(Array(6).fill("")),n=(0,l.useRef)([]);(0,l.useEffect)(()=>{n.current[0]&&n.current[0].focus()},[]);let i=e=>{var a;e.preventDefault();let l=e.clipboardData.getData("Text").trim().replace(/\s/g,"").slice(0,6);if(!/^[0-9a-zA-Z]+$/.test(l))return;let i=[...r];for(let e=0;e<6;e++)i[e]=l[e]||"",n.current[e]&&(n.current[e].value=l[e]||"");s(i),t(i.join(""));let c=l.length<6?l.length:5;null==(a=n.current[c])||a.focus()};return(0,a.jsx)("div",{className:"flex gap-2 mt-4",children:r.map((e,l)=>(0,a.jsx)("input",{type:"text",maxLength:1,value:e,onChange:e=>((e,a)=>{let l=e.target.value;if(!/^[0-9a-zA-Z]?$/.test(l))return;let i=[...r];i[a]=l,s(i),t(i.join("")),l&&a<5&&n.current[a+1].focus()})(e,l),onKeyDown:e=>((e,t)=>{"Backspace"===e.key&&""===r[t]&&t>0&&n.current[t-1].focus()})(e,l),onPaste:i,ref:e=>n.current[l]=e,className:"w-10 h-10 text-black font-normal md:w-12 md:h-12 text-center text-2xl border border-grey rounded focus:outline-none focus:ring-2 focus:ring-primary"},l))})}}},e=>{e.O(0,[3716,1121,6701,9634,1408,3088,3555,636,6593,8792],()=>e(e.s=3501)),_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.