1"use strict";(self.webpackChunkdata_finance=self.webpackChunkdata_finance||[]).push([[692,5147],{25147:(e,t,a)=>{a.r(t),a.d(t,{StyledButton:()=>p,StyledContainer:()=>h,default:()=>x});var s=a(9950),r=a(19808),n=a(10226),i=a(16491),o=a(82053),d=a(33174),l=a(8145),c=a(26910),u=a(24567),m=a(44414);const h=(0,u.A)(r.A)(e=>{let{theme:t}=e;return{minHeight:"calc(100vh - 70px)",display:"flex",alignItems:"center",background:t.palette.gradients.dark,padding:t.spacing(8,2)}}),p=(0,u.A)(n.A)(e=>{let{theme:t}=e;return{background:"#4F46E5",color:"white",padding:"12px 24px",marginTop:t.spacing(3),marginBottom:t.spacing(2),"&:hover":{background:"#4338CA",transform:"translateY(-2px)",boxShadow:"0 4px 12px ".concat(t.palette.custom.glow)}}}),x=()=>{const[e,t]=(0,s.useState)(""),[a,r]=(0,s.useState)(""),[n,u]=(0,s.useState)("");return(0,m.jsx)(h,{component:"main",maxWidth:"xs",children:(0,m.jsxs)(i.A,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,m.jsx)(o.A,{component:"h1",variant:"h5",children:"Join the Waitlist"}),a&&(0,m.jsx)(d.A,{severity:"info",sx:{mt:2,width:"100%"},children:a}),n&&(0,m.jsx)(d.A,{severity:"error",sx:{mt:2,width:"100%"},children:n}),(0,m.jsxs)(i.A,{component:"form",onSubmit:async a=>{a.preventDefault(),u(""),r("");try{const a=await c.A.post("https://cofacto.ai/api/join_waitlist",{email:e});r(a.data.message),t("")}catch(n){n.response&&n.response.data&&n.response.data.message?r(n.response.data.message):u("An error occurred. Please try again.")}},noValidate:!0,sx:{mt:1},children:[(0,m.jsx)(l.A,{margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,value:e,onChange:e=>t(e.target.value)}),(0,m.jsx)(p,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:3,mb:2},children:"Join Waitlist"})]})]})})}},50692:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var s=a(9950),r=a(54028),n=a(627),i=a(16491),o=a(82053),d=a(33174),l=a(8145),c=a(25147),u=a(44414);const m=()=>{const[e,t]=(0,s.useState)(""),[a,m]=(0,s.useState)(""),[h,p]=(0,s.use
1State)(""),[x,g]=(0,s.useState)(""),[w,f]=(0,s.useState)(!1),y=(0,r.Zp)();(0,r.zy)();(0,s.useEffect)(()=>{(async()=>{try{if(!window.location.hash)return void p("Missing reset token. Please try requesting a new password reset link.");const{data:e,error:t}=await n.N.auth.getSession();!t&&null!==e&&void 0!==e&&e.session||(console.error("Session error:",t),p("Invalid or expired reset token. Please try again."))}catch(e){console.error("Error verifying reset token:",e),p("Invalid or expired reset token. Please try again.")}})()},[]);return(0,u.jsx)(c.StyledContainer,{component:"main",maxWidth:"xs",children:(0,u.jsxs)(i.A,{sx:{marginTop:4,display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,u.jsx)(o.A,{component:"h1",variant:"h5",children:"Set New Password"}),h&&(0,u.jsx)(d.A,{severity:"error",sx:{mt:2,width:"100%"},children:h}),x&&(0,u.jsx)(d.A,{severity:"success",sx:{mt:2,width:"100%"},children:x}),(0,u.jsxs)(i.A,{component:"form",onSubmit:async t=>{if(t.preventDefault(),p(""),g(""),f(!0),e.length<6)return p("Password must be at least 6 characters long"),void f(!1);if(e!==a)return p("Passwords do not match"),void f(!1);try{const{data:t,error:a}=await n.N.auth.updateUser({password:e});if(a)throw a;g("Password updated successfully!"),setTimeout(()=>{y("/login")},2e3)}catch(h){console.error("Password update failed:",h),p(h.message||"Failed to update password")}finally{f(!1)}},noValidate:!0,sx:{mt:1,width:"100%"},children:[(0,u.jsx)(l.A,{margin:"normal",required:!0,fullWidth:!0,name:"newPassword",label:"New Password",type:"password",id:"newPassword",value:e,onChange:e=>t(e.target.value),disabled:w||!!h}),(0,u.jsx)(l.A,{margin:"normal",required:!0,fullWidth:!0,name:"confirmPassword",label:"Confirm Password",type:"password",id:"confirmPassword",value:a,onChange:e=>m(e.target.value),disabled:w||!!h}),(0,u.jsx)(c.StyledButton,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:3,mb:2},disabled:w||!!h,children:w?"Updating...":"Update Password"})]})]})})}}}]);
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.