PageSourceSearch

https://helpmyvisa.com/assets/AffiliateLogin-ywz9BBuG.js

js helpmyvisa.com collected 2026-10-02 01:32:11 UTC 4,241 bytes, 1 lines download raw bytes

1import{r,j as e}from"./index-LqF_JRUD.js";import{j as S,h as f,i as l}from"./DeferredCookieConsent-GwdtbJai.js";import{I as n}from"./input-CnOql9bY.js";import{L as h}from"./label-DNZmUDK4.js";import{u as L}from"./useAuth-CkZNo3-B.js";import{u as k}from"./use-toast-ClZGPPQM.js";import{supabase as C}from"./client-tp27EgSx.js";import{S as E}from"./SEOHead-g9vh2FTn.js";import{B as F}from"./BrandLogo-epMdlG6C.js";import{m as g}from"./proxy--z2qpjbr.js";import{L as j}from"./loader-circle-DWFn7h2S.js";import{A}from"./arrow-right-DrQMoVjT.js";import"./index-iODRMH4i.js";import"./tslib.es6-eMSY344_.js";const J=()=>{const[a,m]=r.useState(""),[d,y]=r.useState(""),[b,i]=r.useState(!1),[c,u]=r.useState(!1),[p,x]=r.useState(!1),{signIn:v}=L(),{toast:o}=k(),N=S(),w=async s=>{s.preventDefault(),x(!0);const{error:t}=await v(a,d);x(!1),t?o({title:"Login failed",description:t.message,variant:"destructive"}):N("/affiliate")};return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Affiliate Sign In — HelpMyVisa",description:"Sign in to your HelpMyVisa affiliate partner dashboard.",noindex:!0}),e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-8",children:e.jsxs(g.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:[e.jsx("div",{className:"text-center mb-8",children:e.jsx(f,{to:"/",children:e.jsx(F,{size:32,className:"mx-auto"})})}),e.jsxs("div",{className:"bg-card rounded-xl p-8 shadow-card",children:[e.jsx("h1",{className:"font-display text-2xl font-bold text-foreground mb-1",children:"Affiliate Sign In"}),e.jsxs("p",{className:"text-muted-foreground font-body text-sm mb-8",children:["Not a partner yet?"," ",e.jsx(f,{to:"/affiliate/register",className:"text-gold font-medium hover:underline",children:"Apply now"})]}),e.jsxs("form",{onSubmit:w,className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"email",className:"font-body text-sm",children:"Email"}),e.jsx(n,{id:"email",type:"email",placeholder:"[email protected]",value:a,onChange:s=>m(s.target.value),required:!0,className:"h-12"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{htmlFor:"password",className:"font-body text-sm",children:"Password"}),e.jsx("button",{type:"button",onClick:()=>i(!0),className:"text-xs text-gold hover:underline font-medium",children:"Forgot password?"})]}),e.jsx(n,{id:"password",type:"password",placeholder:"Enter your password",value:d,onChange:s=>y(s.target.value),required:!0,className:"h-12"})]}),e.jsxs(l,{variant:"hero",size:"lg",type:"submit",className:"w-full text-base py-6",disabled:p,children:[p?e.jsx(j,{className:"mr-2 h-5 w-5 animate-spin"}):null,"Sign In ",e.jsx(A,{className:"ml-2 h-5 w-5"})]})]})]}),b&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:()=>i(!1),children:e.jsxs(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-card rounded-xl p-6 shadow-elevated w-full max-w-sm",onClick:s=>s.stopPropagation(),children:[e.jsx("h2",{className:"font-display text-lg font-bold text-foreground mb-2",children:"Reset Password"}),e.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Enter your email and we'll send you a reset link."}),e.jsxs("form",{onSubmit:async s=>{if(s.preventDefault(),!a.trim()){o({title:"Enter your email",variant:"destructive"});return}u(!0);const{error:t}=await C.auth.resetPasswordForEmail(a,{redirectTo:`${window.location.origin}/reset-password`});u(!1),t?o({title:"Error",description:t.message,variant:"destructive"}):(o({title:"Reset link sent",description:"Check your inbox."}),i(!1))},className:"space-y-4",children:[e.jsx(n,{type:"email",placeholder:"[email protected]",value:a,onChange:s=>m(s.target.value),required:!0,className:"h-12"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{type:"button",variant:"outline",className:"flex-1",onClick:()=>i(!1),children:"Cancel"}),e.jsxs(l,{type:"submit",variant:"hero",className:"flex-1",disabled:c,
1children:[c?e.jsx(j,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Send Link"]})]})]})]})})]})})]})};export{J 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.