PageSourceSearch

https://makemystore.ai/assets/LoginPage-Di2Oh4tQ.js

js makemystore.ai collected 2026-10-05 12:21:47 UTC 4,912 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DUAuK54d.js","assets/index-CsmMWbwQ.css"])))=>i.map(i=>d[i]);
2import{d as M,u as P,m as z,c as a,a as t,e as o,t as f,q as x,x as w,h as B,f as _,s as D,n as k,D as L,k as C,b as A,w as N,R,y as F,g as m,z as I,o as l,E as O,i as j}from"./index-DUAuK54d.js";import{i as S}from"./validators-B4TKpOkp.js";const G={class:"w-full max-w-xl px-4"},H={class:"bg-white rounded-2xl shadow-long p-6"},T={key:0,class:"mb-4 p-3 bg-critical-light rounded-lg text-critical text-sm"},U={key:0},Q={key:1},W={key:1,class:"mb-4 p-3 bg-critical-light rounded-lg text-critical text-sm"},$={key:0,class:"mt-1 text-sm text-critical"},J={class:"relative"},K=["type"],X=["disabled"],Y={key:0,class:"ri-loader-4-line animate-spin mr-2"},Z={key:1},ee={class:"mt-6 text-center text-sm text-gray-muted"},oe=M({__name:"LoginPage",setup(te){const y=j(),r=F(),i=P(),s=m("");z(()=>{r.query.email&&(s.value=r.query.email)});const d=m(""),c=m(!1),n=m(""),b=I(()=>S(s.value)&&d.value.length>0);function h(){s.value?S(s.value)?n.value="":n.value="Please enter a valid email":n.value="Email is required"}async function E(){var e;if(h(),!b.value)return;if((await i.login(s.value,d.value)).success){const{useOnboardingStore:u}=await O(async()=>{const{useOnboardingStore:v}=await import("./index-DUAuK54d.js").then(g=>g.Q);return{useOnboardingStore:v}},__vite__mapDeps([0,1])),p=u();if(await p.ensureInitialized(),p.isOnboardingComplete)y.push("/onboarding/store-live");else{const v=r.query.redirect,g=(e=p.currentStepInfo)==null?void 0:e.path;y.push(v||g||"/onboarding/how-did-you-hear")}}}async function V(){i.googleAuth()}return(q,e)=>(l(),a("div",G,[t("div",H,[e[8]||(e[8]=t("div",{class:"text-center mb-5"},[t("h1",{class:"text-2xl font-extrabold text-dark mb-2"},"Welcome back"),t("p",{class:"text-gray-muted"},"Log in to continue building your store")],-1)),o(r).query.error?(l(),a("div",T,[o(r).query.error==="google_auth_failed"?(l(),a("span",U," Google authentication failed. Please try again. ")):(l(),a("span",Q,f(o(r).query.error),1))])):x("",!0),t("button",{onClick:V,class:"w-full flex items-center justify-center gap-3 px-4 py-3 border border-gray-border rounded-lg hover:bg-gray-light transition-colors mb-5"},[...e[3]||(e[3]=[w('<svg class="w-5 h-5" viewBox="0 0 24 24"><path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"></path><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"></path><path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"></path><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"></path></svg><span class="font-medium text-dark">Continue with Google</span>',2)])]),e[9]||(e[9]=w('<div class="relative mb-5"><div class="absolute inset-0 flex items-center"><div class="w-full border-t border-gray-border"></div></div><div class="relative flex justify-center text-sm"><span class="px-4 bg-white text-gray-muted">or continue with email</span></div></div>',1)),o(i).error?(l(),a("div",W,f(o(i).error),1)):x("",!0),t("form",{onSubmit:B(E,["prevent"]),class:"space-y-4"},[t("div",null,[e[4]||(e[4]=t("label",{for:"email",class:"block text-sm font-medium text-dark mb-2"},"Email",-1)),_(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=u=>s.value=u),type:"email",class:k(["input",{"input-error":n.value}]),placeholder:"[email protected]",onBlur:h},null,34),[[D,s.value]]),n.value?(l(),a("p",$,f(n.value),1)):x("",!0)]),t("div",null,[e[5]||(e[5]=t("div",{class:"flex items-center justify-between mb-2"},[t("label",{for:"password",class:"block text-sm font-medium text-dark"},"Password"),t("a",{href:"#",class:"text-sm text-primary hover:underline"},"Forgot password?")],-1)),t("div",J,[_(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=u=>d.value=u),type:c.value?"text":"password",class:"input pr-12",placeholder:"Enter your password"}
2,null,8,K),[[L,d.value]]),t("button",{type:"button",onClick:e[2]||(e[2]=u=>c.value=!c.value),class:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-muted hover:text-dark"},[t("i",{class:k([c.value?"ri-eye-off-line":"ri-eye-line","text-xl"])},null,2)])])]),t("button",{type:"submit",class:"btn-primary w-full",disabled:!b.value||o(i).loading},[o(i).loading?(l(),a("i",Y)):(l(),a("span",Z,"Log In"))],8,X)],32),t("p",ee,[e[7]||(e[7]=C(" Don't have an account? ",-1)),A(o(R),{to:{path:"/auth/register",query:s.value?{email:s.value}:{}},class:"text-primary font-medium hover:underline"},{default:N(()=>[...e[6]||(e[6]=[C(" Sign up for free ",-1)])]),_:1},8,["to"])])])]))}});export{oe as default};

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.