1(this["webpackJsonpb2b-fe"]=this["webpackJsonpb2b-fe"]||[]).push([[29],{1475:function(e,t,o){"use strict";o.d(t,"b",(function(){return p})),o.d(t,"c",(function(){return g})),o.d(t,"a",(function(){return b}));var n=o(8),i=o(7),a=o.n(i),s=o(9),r=o(125),l=o(83);const c="lenny-assistant-redirect",d="SHOW_LENNY_ASSISTANT",u="DONT_SHOW_LENNY_ASSISTANT";function p(e){return e&&r.a.includes(e)}async function g(e){var t;let{userData:o,posthogFunnelType:n,hasManualLock:i,defaultFunnel:a=r.e}=e;if(!o)return a;const s=null===o||void 0===o?void 0:o.isActiveSubscription,c=function(e){if(null!==e&&void 0!==e&&e.funnelType)return p(e.funnelType)?e.funnelType:void 0}(o),d=null!==(t=null===o||void 0===o?void 0:o.isTrailTaken)&&void 0!==t&&t;if(i){if(c&&c!==a)try{await l.a.updateUserApplicant(o.id,{funnelType:c})}catch(x){console.warn("Could not sync manual lock to DB:",x)}return c||a}if(c)return c;if(d)try{var u,g;const e=await l.a.updateUserApplicant(o.id,{funnelType:r.c,isProfileUpdate:"true"});return(null===e||void 0===e||null===(u=e.data)||void 0===u||null===(g=u.applicant)||void 0===g?void 0:g.funnelType)||r.c}catch(x){return console.error("Error assigning no-trial funnel for normal user:",x),r.c}if(s&&!c)try{var b,h;const e=await l.a.updateUserApplicant(o.id,{funnelType:r.c,isProfileUpdate:"true"});return(null===e||void 0===e||null===(b=e.data)||void 0===b||null===(h=b.applicant)||void 0===h?void 0:h.funnelType)||r.c}catch(x){return console.error("Error assigning default funnel for paid user:",x),r.c}if(p(n))try{var f,j;const e=await l.a.updateUserApplicant(o.id,{funnelType:n});return(null===e||void 0===e||null===(f=e.data)||void 0===f||null===(j=f.applicant)||void 0===j?void 0:j.funnelType)||n}catch(x){return console.error("Error persisting PostHog funnel variant:",x),n}if(!c)try{await l.a.updateUserApplicant(o.id,{funnelType:a,isProfileUpdate:"true"})}catch(x){console.warn("Could not persist default funnel to DB:",x)}return a}function b(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown";const i=Object(s.D)(),l=null!==(t=null===i||void 0===i?void 0:i.isActiveSubscription)&&void 0!==t&&t;if(!l){if(e===r.e)return"/auth/opportunities";if(e===r.d)return"/auth/dashboard/opportunities"}if(l){const t=n.a.getFeatureFlag(c),i=t===d,s=i?d:u,r=i?"/auth/dashboard/assistance-v2":"/auth/dashboard",p={variant:s,route:r,flagKey:c,flagValue:null!==t&&void 0!==t?t:null,isFlagResolved:!!t,funnelType:e,source:o,isActiveSubscription:l,timestamp:(new Date).toISOString()};return a.a.track("Lenny Assistant Redirect | ".concat(s),p),r}return a.a.track("Dashboard Redirect Decision to Dashboard Page",{route:"/auth/dashboard"}),"/auth/dashboard"}},1497:function(e,t,o){"use strict";o(1);var n=o(71),i=(o(498),o(12)),a=o(0);t.a=e=>{let{googleLoginLoading:t=!1,loginWithGoogle:o=(()=>{}),buttonStyle:s={},className:r=""}=e;const{isMobileAndTablet:l}=Object(i.a)();return Object(a.jsxs)(n.a,{loading:t,disabled:t,className:r,style:{border:"1.5px solid #ADADAD",width:"100%",margin:"6px 0 0 0",...s},onClick:o,children:[!t&&Object(a.jsx)("img",{loading:"lazy",src:"/images/googleLogo.webp",alt:"Google Icon",style:{width:l?"18px":"24px",marginRight:"8px"}}),t?"Please wait...":"Continue with Google"]})}},2022:function(e,t,o){"use strict";o.r(t);var n=o(7),i=o.n(n),a=o(8),s=o(1),r=o(120),l=o(322),c=o(1395),d=o(71),u=o(498),p=o(38),g=o(83),b=o(97),h=o(12),f=o(11),j=o(15),x=o(16),y=o(30),m=o(125),v=(o(641),o(1475)),O=o(9),w=o(20),T=o(1497),S=o(0);const k=()=>{const e=localStorage.getItem("token"),t=Object(p.useHistory)();return Object(S.jsx)("div",{style:{zIndex:1,margin:"16px",cursor:"pointer"},onClick:()=>{e?t.push("/auth/dashboard"):t.push("/")},children:Object(S.jsx)("img",{loading:"lazy",src:"/new/newLogoLogin.webp",alt:"Lenny.AI",style:{width:"160px"}})})};t.default=()=>{const e=Object(p.useHistory)();Object(O.D)();const{isMobileAndTablet:t,isMobile:o}=Object(h.a)(),[n,L]=Object(s.useState)(!0),A=Object(x.a)("Login Page"),{funnelTypeFromPosthog:P,setFu
1nnelType:F,hasManualLock:N}=Object(m.f)(),[I,D]=Object(s.useState)(!1),[z,W]=Object(s.useState)(!1);Object(s.useEffect)((()=>{Object(y.k)(),Object(y.b)(),Object(y.m)({pageName:"Login Page",gaTracker:A})}),[]);const C=async t=>{const o=await Object(v.c)({userData:t,posthogFunnelType:P,hasManualLock:N()});F(o);const n=Object(v.a)(o,"login");e.push(n)},E=async t=>{W(!0);try{var o,n,s,l;const c=Object(b.b)(),d=Object(y.g)(),u=await fetch("".concat(w.a,"api/v1/users/auth/user-google"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({...t,...c?{attributionToken:c}:{},...d?{sourceRef:d}:{}})});if(!u.ok){const e=await u.json().catch((()=>({})));throw new Error((null===e||void 0===e?void 0:e.message)||"HTTP error! status: ".concat(u.status))}const p=await u.json();(e=>{const{user:t,refreshToken:o,accessToken:n}=(null===e||void 0===e?void 0:e.data)||{};Object(f.d)(O.o,t),Object(f.d)(O.j,o),Object(f.d)(O.c,n)})(p),Object(b.a)(),null!==p&&void 0!==p&&null!==(o=p.data)&&void 0!==o&&null!==(n=o.user)&&void 0!==n&&n.sourceRef&&Object(y.d)(),r.b.success("User Logged In Successfully!!");const g={screenName:"Assistance Login Options"};A("Login with google successful",JSON.stringify(g)),i.a.track("Login with google successful",{pageName:"Assistance Options"}),a.a.capture("Login with google successful",{pageName:"Assistance Options"});const h=(null===p||void 0===p||null===(s=p.data)||void 0===s?void 0:s.user)||{};if((null===p||void 0===p||null===(l=p.data)||void 0===l?void 0:l.isNewUser)||!1)return Object(f.d)(O.h,!0),void e.push("/signup");await C(h)}catch(c){console.error("Google Login Error:",c),r.b.error((null===c||void 0===c?void 0:c.message)||"Google login failed. Please try again.")}finally{W(!1)}},H=Object(u.b)({onSuccess:async e=>{await E(e)},onError:()=>{r.b.error("Failed to initialize Google login. Please try again.")}});return Object(S.jsxs)("div",{style:{position:"relative",height:"100dvh"},children:[Object(S.jsxs)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0},children:[Object(S.jsx)("div",{style:{height:"50%",backgroundColor:"#8D96FF"}}),Object(S.jsx)("div",{style:{height:"50%",backgroundColor:"white"}})]}),Object(S.jsxs)("div",{style:{position:"relative",zIndex:1,display:"flex",flexDirection:"column",height:"100%",color:"white"},children:[Object(S.jsx)(k,{}),Object(S.jsxs)("div",{style:{display:"flex",flexDirection:t?"column":"row",height:"100%"},children:[Object(S.jsxs)("div",{style:{display:"block",flex:t?"1 1 0%":"1 1 50%",padding:t?"0px 35px":"35px 50px",lineHeight:"normal",position:"relative"},children:[Object(S.jsxs)("p",{style:{fontSize:t?"20px":"25px",fontWeight:"400",color:"white",margin:"0",lineHeight:"normal",marginTop:t?"0px":"16px"},children:["Login to"," "]}),Object(S.jsxs)("p",{style:{fontSize:t?"34px":"50px",fontWeight:"600",color:"white",margin:"0",lineHeight:"1.35"},children:["Lenny.ai"," "]}),Object(S.jsxs)("p",{style:{fontSize:t?"14px":"18px",fontWeight:"400",color:"white",margin:"0",lineHeight:"normal"},children:["An ",Object(S.jsx)("strong",{children:"AI-powered ChatBot"})," that creates meaningful conversations and completes time consuming tasks."," "]}),Object(S.jsx)("img",{loading:"lazy",src:"/new/aii_new.webp",alt:"",style:{display:t?"none":"block",position:"absolute",bottom:"20px",left:"140px",width:"300px"}})]}),Object(S.jsx)("div",{style:{flex:o?"1 1 80%":t?"1 1 60%":"1 1 50%",display:"flex",justifyContent:"center",alignItems:t?"flex-start":"center",height:"100%",...o&&{marginTop:"12px"},padding:t?"0 0 20px 0":"0"},children:Object(S.jsxs)("div",{style:{backgroundColor:"white",padding:t?"25px 35px":"35px 50px",borderRadius:"40px",width:o?"90%":"75%",maxWidth:"500px",boxShadow:"0px 4px 35px 0px #00000033",backgroundSize:"cover",position:"relative"},children:[Object(S.jsxs)("p",{style:{fontSize:t?"18px":"21px",fontWeight:"600",margin:"0",color:"black"},children:["Welcome to ",Object(S.jsx)("span",{style:{color:"#8D96FF"},children:"Lenny.ai"})]}),Object(S.jsx)("p",{style:{fontSize:t?"40px":"55px",fontWeight:"500",margin:"0",color:"black"},children:"Login"}),Object(S.jsxs)(l.a,{layout:"vertical",name:"login-form",onFinish:async e=>{D(!0);try{const t={...e,loginType:"register_user"},{data:o}=await g.a.login(t);localStorage.setItem("clientIp",(null===o||void 0===o?void 0:o.clientIp)||""),localStorage.removeItem("register1"),localStorage.removeItem("register2"),Object(f.d)(O.o,o.user),Object(f.d)(O.j,o.refreshToken),Object(f.d)(O.c,o.accessToken),localStorage.setItem("isActiveSubscription",String(o.user.isActiveSubscription)),Object(f.d)(j.j,!0),await C(o.user),Object(y.l)({buttonName:"Login Button",pageName:"Login Page",gaTracker:A})}catch(t){console.error("Login error:",t),r.b.error((null===t||void 0===t?void 0:t.description)||"Login failed. Please try again.")}finally{D(!1)}},requiredMark:!1,children:[Object(S.jsx)(l.a.Item,{label:Object(S.jsx)("span",{style:{fontWeight:400,fontSize:"16px"},children:"Enter your username or email address"}),name:"userName",placeholder:"Email",hasFeedback:!0,rules:[{required:!0,message:"Please input your username"}],children:Object(S.jsx)(c.a,{bordered:{radius:"0px"},placeholder:"Email"})}),Object(S.jsx)(l.a.Item,{style:{marginTop:"16px"},label:Object(S.jsx)("span",{style:{fontWeight:400,fontSize:"16px"},children:"Enter your Password"}),name:"password",hasFeedback:!0,rules:[{required:!0,message:"Please input your password"}],children:Object(S.jsx)(c.a.Password,{placeholder:"Password"})}),Object(S.jsx)("p",{style:{color:"#8D96FF",fontSize:"14px",fontWeight:"400",marginTop:"16px",textAlign:"left",marginBottom:"0",cursor:"pointer"},onClick:()=>{e.push("/forgot-password"),Object(y.l)({buttonName:"Forgot Password",pageName:"Login Page",gaTracker:A})},children:"Forgot Password"}),Object(S.jsx)(l.a.Item,{style:{marginTop:"16px"},children:Object(S.jsx)(d.a,{type:"primary",htmlType:"submit",style:{width:"100%",marginBottom:"8px",backgroundColor:n?"#8d96ff":"#babff9",border:"none",fontFamily:"'Poppins'",fontWeight:"500",cursor:n?"pointer":"not-allowed"},children:I?"Logging in...":"Login"})}),Object(S.jsx)(T.a,{googleLoginLoading:z,loginWithGoogle:H}),Object(S.jsxs)("p",{style:{color:"grey",fontSize:"15px",fontWeight:"600",marginTop:"16px",textAlign:"center",marginBottom:"0"},children:["No Account ?",Object(S.jsxs)("span",{style:{color:"#8D96FF",cursor:"pointer"},onClick:()=>e.push("/signup"),children:[" ","Sign up"]})]})]}),Object(S.jsx)("img",{loading:"lazy",src:"/new/cap.webp",alt:"",style:{display:t?"none":"block",width:"160px",position:"absolute",top:"-68px",right:"-68px"}})]})})]})]})]})}}}]);
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.