PageSourceSearch

https://www.gptaha.com/_next/static/chunks/app/(auth)/sign-in/page-f2ca479408062c86.js

js gptaha.com collected 2026-10-02 01:31:29 UTC 12,112 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[389],{8939:function(e,t,r){Promise.resolve().then(r.bind(r,8883))},6060:function(e,t,r){"use strict";r.d(t,{default:function(){return s.a}});var n=r(9915),s=r.n(n)},6788:function(e,t,r){"use strict";r.d(t,{default:function(){return s.a}});var n=r(9498),s=r.n(n)},8779:function(e,t,r){"use strict";var n=r(1020);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},9915:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return o}});let n=r(6651),s=r(9171),a=r(4663),i=n._(r(3235));function o(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=a.Image},8883:function(e,t,r){"use strict";r.d(t,{default:function(){return g}});var n=r(3890),s=r(255),a=r(9324),i=r(2092),o=r(7082),l=r(9863),c=r(6788),d=r(6060),u=r(8496),f=r(5659),m=r(8779);function p(){var e,t;return null===(t=window.google)||void 0===t?void 0:null===(e=t.accounts)||void 0===e?void 0:e.id}function g(){let e=(0,m.useRouter)(),t=(0,u.useRef)(null),r=(0,u.useRef)(async()=>{}),[g,x]=(0,u.useState)(""),[h,v]=(0,u.useState)(""),[y,b]=(0,u.useState)(!1),[w,j]=(0,u.useState)(!1),[N,k]=(0,u.useState)(0),[S,_]=(0,u.useState)(!1),P=async()=>{if(!g||!g.includes("@")){f.Am.error("Please enter a valid email address");return}b(!0);try{await l.Lp.emailOtp.sendVerificationOtp({email:g,type:"sign-in"}),f.Am.success("Verification code sent to your email"),_(!0),k(60);let e=setInterval(()=>{k(t=>t<=1?(clearInterval(e),0):t-1)},1e3)}catch(e){f.Am.error("Failed to send verification code, please try again"),console.error("Send OTP error:",e)}finally{b(!1)}},A=async()=>{if(!h||6!==h.length){f.Am.error("Please enter a 6-digit verification code");return}j(!0);try{let{data:t,error:r}=await l.zB.emailOtp({email:g,otp:h});if(r)throw r;f.Am.success("Sign in successful!"),e.push("/dashboard")}catch(e){f.Am.error("Invalid verification code, please try again"),console.error("Verify OTP error:",e)}finally{j(!1)}};return(0,u.useEffect)(()=>{r.current=async t=>{try{var r;let{error:n}=await l.zB.social({provider:"google",idToken:{token:t.credential},fetchOptions:{onSuccess:()=>{f.Am.success("Sign in successful!"),e.push("/dashboard")}}});n&&f.Am.error(null!==(r=n.message)&&void 0!==r?r:"Google sign-in failed")}catch(e){f.Am.error("Google sign-in failed"),console.error(e)}}},[e]),(0,u.useEffect)(()=>{let e=t.current,n="504096699971-paoeqb6talog0spgipa1stt9vln0h347.apps.googleusercontent.com";if(!e||!n)return;let s=!1;return(p()?Promise.resolve():new Promise((e,t)=>{let r=document.querySelector('script[src="https://accounts.google.com/gsi/client"]');if(r){if(p()){e();return}r.addEventListener("load",()=>e(),{once:!0}),r.addEventListener("error",()=>t(Error("Google script failed")),{once:!0});return}let n=document.createElement("script");n.src="https://accounts.google.com/gsi/client",n.async=!0,n.onload=()=>e(),n.onerror=()=>t(Error("Google script failed")),document.head.appendChild(n)})).then(()=>{if(s)return;let t=p();if(!t)return;let a=window;a.__gptahaGisInit||(t.initialize({client_id:n,callback:async e=>{await r.current(e)}}),a.__gptahaGisInit=!0),e.innerHTML="",t.renderButton(e,{type:"standard",theme:"outline",size:"large",width:Math.max(e.offsetWidth,280),text:"signin_with",locale:"en"}),t.prompt()}).catch(e=>{console.error(e),f.Am.error("Failed to load Google Sign-In")}),()=>{s=!0}},[]),(0,n.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-hero-background via-background to-primary/10 px-4 pb-20 pt-20 md:pt-32",children:(0,n.jsxs)(a.Zb,{className:"w-full max-w-md relative z-10 shadow-2xl border-0 bg-card/95 backdrop-blur-sm",children:[(0,n.jsxs)(a.Ol,{className:"text-center space-y-6 pb-8",children:[(0,n.jsx)(d.default,{className:"mx-auto transition-transform duration-700 ease-in-out hover:rotate-[360deg] cursor-pointer",src:"/images/logo.png",alt:"GPTAha",width:64,height:64}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(a.ll,{className:"text-2xl md:text-3xl font-bold",children:"Welcome Back"}),(0,n.jsx)(a.SZ,{className:"text-base text-muted-foreground"})]})]}),(0,n.jsxs)(a.aY,{className:"space-y-6",children:[(0,n.jsx)("div",{ref:t,className:"w-full min-h-[48px] flex flex-col items-stretch [&>div]:w-full justify-center"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,n.jsx)("span",{className:"w-full border-t border-border/50"})}),(0,n.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,n.jsx)("span",{className:"bg-card px-2 text-muted-foreground",children:"or"})})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(o._,{htmlFor:"email",children:"Email Address"}),(0,n.jsx)(i.I,{id:"email",type:"email",placeholder:"[email protected]",value:g,onChange:e=>x(e.target.value),className:"h-12 w-full",onKeyDown:e=>{"Enter"===e.key&&P()}})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(o._,{htmlFor:"otp",children:"Verification Code"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(i.I,{id:"otp",type:"text",placeholder:"click 'get code' first",value:h,onChange:e=>{v(e.target.value.replace(/\D/g,"").slice(0,6))},className:"h-12 flex-1",maxLength:6,disabled:!S,onKeyDown:e=>{"Enter"===e.key&&A()}}),(0,n.jsx)(s.z,{onClick:P,disabled:y||!g||N>0,className:"h-12 px-6",children:y?"Sending...":N>0?"".concat(N,"s"):"Get Code"})]})]}),(0,n.jsx)(s.z,{onClick:A,disabled:w||6!==h.length||!S,className:"w-full h-12",size:"lg",children:w?"Signing in...":"Sign in with Email"}),(0,n.jsxs)("div",{className:"flex items-center justify-center space-x-2 text-sm text-muted-foreground",children:[(0,n.jsx)("svg",{className:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.031 9-11.
1622 0-1.042-.133-2.052-.382-3.016z"})}),(0,n.jsx)("span",{children:"Secure encrypted sign in"})]})]}),(0,n.jsx)(a.eW,{className:"pt-6",children:(0,n.jsxs)("div",{className:"flex flex-col items-center w-full space-y-4",children:[(0,n.jsx)("div",{className:"w-full border-t border-border/50"}),(0,n.jsxs)("p",{className:"text-center text-sm text-muted-foreground",children:["By signing in, you agree to our",(0,n.jsx)(c.default,{href:"/privacy-policy",className:"text-primary hover:text-primary/80 underline underline-offset-4 transition-colors duration-200 mx-1",target:"_blank",children:"Privacy Policy"}),"and",(0,n.jsx)(c.default,{href:"/terms-of-service",className:"text-primary hover:text-primary/80 underline underline-offset-4 transition-colors duration-200 mx-1",target:"_blank",children:"Terms of Service"})]})]})})]})})}},255:function(e,t,r){"use strict";r.d(t,{z:function(){return c}});var n=r(3890),s=r(8496),a=r(9501),i=r(8898),o=r(5774);let l=(0,i.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>{let{className:r,variant:s,size:i,asChild:c=!1,...d}=e,u=c?a.g7:"button";return(0,n.jsx)(u,{className:(0,o.cn)(l({variant:s,size:i,className:r})),ref:t,...d})});c.displayName="Button"},9324:function(e,t,r){"use strict";r.d(t,{Ol:function(){return o},SZ:function(){return c},Zb:function(){return i},aY:function(){return d},eW:function(){return u},ll:function(){return l}});var n=r(3890),s=r(8496),a=r(5774);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...s})});i.displayName="Card";let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",r),...s})});o.displayName="CardHeader";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("font-semibold leading-none tracking-tight",r),...s})});l.displayName="CardTitle";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("text-sm text-muted-foreground",r),...s})});c.displayName="CardDescription";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",r),...s})});d.displayName="CardContent";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",r),...s})});u.displayName="CardFooter"},2092:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var n=r(3890),s=r(8496),a=r(5774);let i=s.forwardRef((e,t)=>{let{className:r,type:s,...i}=e;return(0,n.jsx)("input",{type:s,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t,...i})});i.displayName="Input"},7082:function(e,t,r){"use strict";r.d(t,{_:function(){return d}});var n=r(3890),s=r(8496),a=r(1627),i=s.forwardRef((e,t)=>(0,n.jsx)(a.WV.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null===(r=e.onMouseDown)||void 0===r||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var o=r(8898),l=r(5774);let c=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=s.forwardRef((e,t)=>
1{let{className:r,...s}=e;return(0,n.jsx)(i,{ref:t,className:(0,l.cn)(c(),r),...s})});d.displayName=i.displayName},9863:function(e,t,r){"use strict";r.d(t,{Lp:function(){return o},kP:function(){return u},w7:function(){return d},zB:function(){return c}});var n=r(1654),s=r(9984),a=r(5659),i=r(7710);let o=(0,n.XL)({plugins:[(0,s.sF)({clientId:"504096699971-paoeqb6talog0spgipa1stt9vln0h347.apps.googleusercontent.com",promptOptions:{maxAttempts:1}}),(0,s.kx)(),(0,i.G)({subscription:!0})],fetchOptions:{onSuccess:e=>{let t=e.response.headers.get("set-auth-token");t&&localStorage.setItem("gptaha_token",t)},onError(e){429===e.error.status&&a.Am.error("Too many requests. Please try again later.")}}}),{signUp:l,signIn:c,signOut:d,useSession:u}=o;o.$store.listen("$sessionSignal",async()=>{})},5774:function(e,t,r){"use strict";r.d(t,{cn:function(){return a}});var n=r(2675),s=r(1426);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,n.W)(t))}}},function(e){e.O(0,[663,498,659,300,215,649,945,744],function(){return e(e.s=8939)}),_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.