1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0eccc-6d36-7712-b98e-b8147eefbae5")}catch(e){}}();;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="97dc7202-c0d3-0946-6beb-aaa040af417d")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,195437,e=>{"use strict";var a=e.i(95187);let i=(0,a.createServerReference)("605878100a39b54b4f22f399c530f3d9480e08fc1f",a.callServer,void 0,a.findSourceMapURL,"loginAction");e.s(["loginAction",0,i])},887737,e=>{"use strict";var a=e.i(271645),i=e.i(772968);e.s(["HardRedirect",0,function({href:e}){return(0,a.useEffect)(()=>{(0,i.redirectTo)(e)},[e]),null}])},627808,e=>{"use strict";var a=e.i(843476),i=e.i(271645),t=e.i(930204),r=e.i(785780),s=e.i(239555),n=e.i(522016),o=e.i(618566),l=e.i(984552),c=e.i(693936),d=e.i(915209),u=e.i(678078),p=e.i(737152),m=e.i(179212),g=e.i(743155);e.i(114314);var h=e.i(545028),f=e.i(879449),x=e.i(701780),v=e.i(939658),b=e.i(71260),y=e.i(195437),w=e.i(674652),j=e.i(737937),S=e.i(89704),A=e.i(374119),I=e.i(608777),N=e.i(212203),k=e.i(940161),C=e.i(796922);function R(e){return(0,a.jsx)(s.GoogleAuthProvider,{children:(0,a.jsx)(P,{...e})})}function P({onSubmit:e,onSuccess:t,isLoading:R=!1,error:_}){let U=(0,o.useRouter)(),T=(0,x.useAuthOAuthConfig)(),{ready:E,failed:F}=(0,s.useGoogleAuthStatus)(),[B,D]=(0,i.useState)(""),[G,L]=(0,i.useState)(""),[O,z]=(0,i.useState)(!1),[M,H]=(0,i.useState)(""),[K,W]=(0,i.useState)({}),[q,V]=(0,i.useState)(!1),[$,J]=(0,i.useState)("");(0,i.useEffect)(()=>{J(crypto.randomUUID())},[]);let{rawNonceRef:Q,hashedNonce:X}=(0,S.useAppleNonce)(),Y=(0,i.useMemo)(()=>({clientId:T.appleClientId,scope:"email name",redirectURI:T.appleRedirectUri,state:$,nonce:X,usePopup:!0}),[T.appleClientId,T.appleRedirectUri,$,X]),Z=R||q,ee=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,ea=(e,a)=>"email"===e?a.trim()?ee.test(a.trim())?void 0:"Please enter a valid email address":"Email is required":a?a.length<6?"Password must be at least 6 characters":void 0:"Password is required",ei=(e,a)=>{W(i=>({...i,[e]:ea(e,a)}))},et=!B||!G||!!K.email||!!K.password,er=(e,a)=>{if(e.error)return void H(e.error);e.userId&&(0,I.captureEvent)(N.default.SIGN_IN,{signInMethod:(0,k.authMethodLabel)(a)},{userId:e.userId});let i=(0,C.preparePostSignIn)(e);t?t(e):"/"!==i?(0,l.navigateToTop)(U,i):U.refresh()},es=async(e,a)=>{V(!0),H("");try{let i=await (0,w.socialAction)(e);er(i,a)}catch{H("An unexpected error occurred. Please try again.")}finally{V(!1)}},en=(0,c.useGoogleLogin)({onSuccess:async e=>{try{let a=await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${e.access_token}`}}).then(e=>e.json());await es({provider:"google",authUid:a.sub,extra:{auth_token:e.access_token,email:a.email.toLowerCase(),platform:"website",...a.given_name&&{first_name:a.given_name},...a.family_name&&{last_name:a.family_name},...a.picture&&{image:a.picture}}},"google")}catch{H("Google sign-in failed. Please try again."),V(!1)}},onError:()=>{H("Google sign-in failed. Please try again.")}}),eo=async()=>{let e=await (0,b.getFacebookSdk)((0,v.getResolvedRuntimeConfig)()?.oauthConfig.facebookAppId??T.facebookAppId);e?e.login(a=>{if("connected"===a.status&&a.authResponse){let{accessToken:i,userID:t}=a.authResponse;e.api("/me",{fields:"id,name,email,picture"},async e=>{let a=e.name||"",r=a.lastIndexOf(" "),s=r>-1?a.slice(0,r):a,n=r>-1?a.slice(r+1):"";await es({provider:"facebook",authUid:t,extra:{auth_token:i,email:(e.email||"").toLowerCase(),platform:"website",...s&&{first_name:s},...n&&{last_name:n},...e.picture?.data?.url&&{image:e.picture.data.url}}},"facebook")})}},{scope:"public_profile,email"}):H("Facebook SDK not loaded. Please refresh and try again.")},el=async e=>{if(e.error){(0,j.isAppleUserCancelled)(e.error)||((0,j.logAppleAuthFailure)("SignIn",e.error),H("Apple sign-in failed. Please try again."));return}let a=e.authorization?.id_token;if(!a)return void H("Apple sign-in failed. Please try again.");let i=(0,A.decodeJWT)(a);i.sub&&i.email?await es({provider:"apple",authUid:i.sub,extra:{auth_token:a,email:i.email.includes("privaterelay")?i.email:i.email.toLowerCase(),platform:"website",nonce:Q.current,...e.user?.name?.firstName&&{first_name:e.user.name.firstName},...e.user?.name?.lastName&&{last_name:e.user.name.lastName}}},"apple"):H("Apple sign-in failed. Could not retrieve account info.")},ec=async a=>{a.preventDefault(),H("");let i=ea("email",B),t=ea("password",G);if(i||t)return void W({email:i,password:t});if(e){try{await e(B,G)}catch(e){H(e instanceof Error?e.message:"Sign in failed")}return}V(!0);try{let e=await (0,y.loginAction)(B.toLowerCase().trim(),G);er(e,"email")}catch{H("An unexpected error occurred. Please try again.")}finally{V(!1)}},ed=_||M;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)(h.LoginRFFIcon,{}),(0,a.jsx)("h5",{className:"text-h5 text-secondary-900 mt-0 mb-6",children:"Welcome Back"})]}),(0,a.jsxs)("form",{onSubmit:ec,className:"space-y-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)(m.In
2put,{type:"email",placeholder:"Email Address",value:B,onChange:e=>{D(e.target.value.trim()),K.email&&W(e=>({...e,email:void 0})),M&&H("")},onBlur:e=>ei("email",e.target.value),disabled:Z,destructive:!!K.email,hintText:K.email,maxLength:70,autoFocus:!0,autoComplete:"email",inputMode:"email"})}),(0,a.jsx)("div",{children:(0,a.jsx)(m.Input,{type:O?"text":"password",placeholder:"Password",value:G,onChange:e=>{L(e.target.value),K.password&&W(e=>({...e,password:void 0})),M&&H("")},onBlur:e=>ei("password",e.target.value),disabled:Z,destructive:!!K.password,hintText:K.password,autoComplete:"current-password",trailingNode:(0,a.jsx)("button",{type:"button",onClick:()=>z(e=>!e),className:"text-gray-500 hover:text-gray-700 transition-colors","aria-label":O?"Hide password":"Show password",children:O?(0,a.jsx)(p.EyeOffIcon,{className:"size-4"}):(0,a.jsx)(u.EyeIcon,{className:"size-4"})})})}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(n.default,{href:"/forgot-password",className:"text-sm font-semibold text-primary-900 hover:underline transition-all",children:"Reset Password?"})}),ed&&(0,a.jsx)("p",{role:"alert",className:"text-sm font-normal text-error-600 my-2",children:ed}),(0,a.jsx)(g.Button,{type:"submit",variant:"primary-gray",size:"lg",width:"full",disabled:Z||et,"data-testid":"sign-in-submit-button",children:Z?"Signing in...":"Sign In"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 my-6",children:[(0,a.jsx)("div",{className:"flex-1 border-b border-secondary-100"}),(0,a.jsx)("span",{className:"text-sm text-secondary-900 px-2",children:"Sign in with"}),(0,a.jsx)("div",{className:"flex-1 border-b border-secondary-100"})]}),(0,a.jsxs)("div",{className:"flex gap-3.5 justify-center",children:[(0,a.jsx)(r.GoogleAuthOption,{unavailable:F,children:(0,a.jsx)(g.Button,{type:"button",variant:"social-google",size:"icon-md",radius:"sm",disabled:Z||!E,onClick:()=>en(),title:"Sign in with Google","aria-label":"Sign in with Google",children:(0,a.jsx)(f.GoogleNewIcon,{})})}),(0,a.jsx)(g.Button,{type:"button",variant:"social-facebook",size:"icon-md",radius:"sm",disabled:Z||!T.facebookAppId,onPointerDown:()=>(0,b.warmUpFacebookSdk)((0,v.getResolvedRuntimeConfig)()?.oauthConfig.facebookAppId??T.facebookAppId),onClick:()=>void eo(),title:"Sign in with Facebook","aria-label":"Sign in with Facebook",children:(0,a.jsx)(f.FacebookNewIcon,{})}),(0,a.jsx)(d.default,{authOptions:Y,uiType:"dark",onSuccess:el,onError:e=>{(0,j.isAppleUserCancelled)(e?.error)||((0,j.logAppleAuthFailure)("SignIn",e),H("Apple sign-in failed. Please try again."))},render:e=>{let{color:i,...t}=e;return(0,a.jsx)(g.Button,{...t,type:"button",variant:"social-apple",size:"icon-md",radius:"sm",disabled:Z||!T.appleClientId||!T.appleRedirectUri,title:"Sign in with Apple","aria-label":"Sign in with Apple",children:(0,a.jsx)(f.AppleNewIcon,{})})}})]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-secondary-800 text-center mt-6",children:["Don't have an account?"," ",(0,a.jsx)(n.default,{href:"/pricing",className:"text-primary-900 underline hover:text-primary-800 transition-colors",children:"Sign Up"})]})]})]})}var _=e.i(772968),U=e.i(333131),T=e.i(655862);e.i(355049);var E=e.i(147895);e.s(["SignInModal",0,function({open:e,onClose:r,returnTo:s,contentClassName:n,overlayClassName:l}){let c=(0,o.useRouter)();return((0,i.useEffect)(()=>{e&&U.V1Auth&&(0,_.redirectTo)((0,T.withReturnTo)(U.AUTH_ROUTES.signIn,s))},[e,s]),U.V1Auth)?null:(0,a.jsx)(t.Dialog,{open:e,onOpenChange:e=>{e||(r?r():c.back())},children:(0,a.jsxs)(t.DialogContent,{className:(0,E.cn)("md:px-20 px-5 p-5",n),overlayClassName:l,onInteractOutside:e=>e.preventDefault(),children:[(0,a.jsx)(t.DialogTitle,{className:"sr-only",children:"Sign In"}),(0,a.jsx)(R,{isDialogWrapper:!0,onSuccess:e=>{(0,_.redirectTo)((0,C.resolvePostSignInRoute)(e,s))}})]})})}],627808)}]); 3 4//# debugId=97dc7202-c0d3-0946-6beb-aaa040af417d 5//# chunkId=01a0eccc-6d36-7712-b98e-b8147eefbae5
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.