1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63209,e=>{"use strict";let r=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>r],63209)},25652,e=>{"use strict";let r=(0,e.i(475254).default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>r],25652)},21218,e=>{"use strict";let r=(0,e.i(475254).default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",()=>r],21218)},531278,e=>{"use strict";let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},286536,e=>{"use strict";let r=(0,e.i(475254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>r],286536)},77705,e=>{"use strict";let r=(0,e.i(475254).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>r],77705)},972520,e=>{"use strict";let r=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>r],972520)},263488,e=>{"use strict";let r=(0,e.i(475254).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["Mail",()=>r],263488)},270756,e=>{"use strict";let r=(0,e.i(475254).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>r],270756)},842728,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(217255),s=e.i(618566),i=e.i(522016),l=e.i(531278),n=e.i(286536),o=e.i(77705),d=e.i(263488),c=e.i(270756),m=e.i(972520),x=e.i(25652),u=e.i(212
118),p=e.i(63209),h=e.i(705766);function f(){let e=(0,s.useRouter)(),f=(0,s.useSearchParams)(),b=f.get("email")||"",[g,v]=(0,a.useState)({email:b,password:""}),[y,w]=(0,a.useState)(!1),[j,N]=(0,a.useState)({email:"",password:"",general:""}),[k,C]=(0,a.useState)(!1),[A,L]=(0,a.useState)(!1),[P,S]=(0,a.useState)(!1),[R,E]=(0,a.useState)(""),[M,O]=(0,a.useState)(null);(0,a.useEffect)(()=>{S(!0);let e=f.get("error"),r=f.get("registeredRole");if(e){if("OAuthRoleMismatch"===e&&r)O(r);else{let r="";switch(e){case"OAuthNoEmail":r="Google did not provide an email address. Please ensure your Google account has an email.";break;case"OAuthConfigurationError":r="There is a configuration issue with this account. Please contact support.";break;case"OAuthCallbackError":r="An error occurred while linking your Google account. Please try again.";break;case"OAuthRoleUndefined":r="User role could not be determined. Please try again.";break;case"OAuthAccountNotLinked":r="To confirm your identity, sign in with the same account you used originally.";break;case"AccessDenied":r="Access was denied to your account.";break;case"PersonalEmailNotAllowed":r="Please use a company email. Personal emails are not accepted.";break;default:"CredentialsSignin"!==e&&(r="An unexpected authentication error occurred. Please try again.")}r&&N(e=>({...e,general:r}))}let a=new URL(window.location.href);a.searchParams.delete("error"),a.searchParams.delete("registeredRole"),window.history.replaceState({},document.title,a.pathname+a.search)}},[f]);let z=e=>{let{name:r,value:a}=e.target;v({...g,[r]:a}),(j[r]||j.general)&&N({...j,[r]:"",general:""}),"email"===r&&E("")},U=async a=>{let s,l;if(a.preventDefault(),s=!0,l={email:"",password:"",general:""},g.email.trim()||(l.email="Email address is required",s=!1),g.password||(l.password="Password is required",s=!1),N(l),s){C(!0);try{let a=await (0,t.signIn)("credentials",{redirect:!1,email:g.email,password:g.password,role:"BRAND"});if(a?.error){E(g.email);let e=a.error.replace(/^Error:\s*/,"");e.includes("Google Login")?(N(e=>({...e,general:(0,r.jsxs)(r.Fragment,{children:["Account created with Google. Please"," ",(0,r.jsx)("strong",{children:"Continue with Google"})," below, or use"," ",(0,r.jsx)("strong",{children:"Forgot password"})," to set up an email login."]})})),h.default.error("Google login required",{icon:"ðµ"})):e.toLowerCase().includes("unverified")||e.toLowerCase().includes("verify your email")?N(e=>({...e,email:(0,r.jsxs)(r.Fragment,{children:["Email is not verified."," ",(0,r.jsx)(i.default,{href:`/brand/signup${g.email?`?email=${encodeURIComponent(g.email)}`:""}`,className:"font-bold underline hover:text-red-700 transition-all",children:"Sign up again to get a new code"})]})})):e.toLowerCase().includes("password")||e.toLowerCase().includes("credentials")?N(r=>({...r,password:e})):e.toLowerCase().includes("user")||e.toLowerCase().includes("email")||e.toLowerCase().includes("account")?N(r=>({...r,email:e})):(N(r=>({...r,general:e})),h.default.error(e))}else a?.ok&&(h.default.success("Welcome back to CollabOP!"),e.push("/brand/dashboard"),e.refresh())}catch(e){h.default.error("Something went wrong. Please try again.")}finally{C(!1)}}},$=async()=>{L(!0);let e="/brand/dashboard",r=new URL(e,window.location.origin);["utm_source","utm_medium","utm_campaign","utm_content","utm_term","ref"].forEach(e=>{let a=f.get(e);a&&r.searchParams.set(e,a)}),e=r.pathname+r.search,await (0,t.signIn)("google-brand",{callbackUrl:e})},B="block w-full rounded-2xl border bg-[var(--surface-card)] pl-11 pr-4 py-3.5 text-[15px] text-[var(--text-primary)] shadow-sm transition-all duration-300 outline-none placeholder:text-[var(--text-muted)]/60";return P?(0,r.jsxs)("div",{className:"flex min-h-screen w-full bg-[var(--background)] font-sans selection:bg-[var(--brand-primary)] selection:text-white",children:[(0,r.jsx)("div",{className:"flex w-full flex-col justify-center px-6 py-6 lg:w-3/5 lg:px-20 xl:px-32 relative z-10 min-h-screen",children:(0,r.jsxs)("div",{className:"mx-auto w-full max-w-[420px]",children:[(0,r.jsxs)("div",{className:"mb-8 flex items-center gap-3",children:[(0,r.jsx)("img",{src:"/logo.png",alt:"CollabOP Logo",className:"h-9 w-auto object-contain"}),(0,r.jsx)("span",{className:"text-2xl font-extrabold tracking-tight text-[var(--text-primary)]",children:"CollabOP"})]}),(0,r.jsxs)("div",{className:"animate-in slide-in-from-right-4 fade-in duration-500 ease-out fill-mode-forwards",children:[(0,r.jsxs)("div",{className:"mb-6 text-left",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-[var(--text-primary)] mb-2",children:"Welcome back"}),(0,r.jsx)("p",{className:"text-[16px] text-[var(--text-muted)] leading-relaxed",children:"Sign in to your brand portal to manage campaigns."})]}),(0,r.jsxs)("form",{onSubmit:U,className:"space-y-3",children:[M&&(0,r.jsxs)("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/20 flex flex-col gap-2 animate-in slide-in-from-top-2 fade-in duration-300",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,r.jsx)(p.AlertCircle,{className:"h-5 w-5 text-red-500 shrink-0 mt-0.5"}),(0,r.jsxs)("p",{className:"text-[14px] text-red-500/90 leading-tight font-medium",children:["This Google account is registered as a"," ","BRAND"===M?"Brand":"Creator","."]})]}),(0,r.jsxs)(i.default,{href:`/${M.toLowerCase()}/signin`,className:"ml-7 text-[13px] font-bold text-red-500 hover:text-red-400 hover:underline underline-offset-4 transition-all w-fit",children:["Go to ","BRAND"===M?"Brand":"Creator"," ","Portal â"]})]}),j.general&&(0,r.jsxs)("div",{className:"p-3 rounded-xl bg-red-500/10 border border-red-500/20 flex items-start gap-2.5 animate-in slide-in-from-top-2 fade-in duration-300",children:[(0,r.jsx)(p.AlertCircle,{className:"h-4 w-4 text-red-500 shrink-0 mt-0.5"}),(0,r.jsx)("p",{className:"text-[13px] text-red-500/90 leading-tight font-medium",children:j.general})]}),(0,r.jsxs)("div",{className:"space-y-2 relative",children:[(0,r.jsx)("div",{className:"flex items-center pl-1 pr-1",children:(0,r.jsx)("label",{className:"text-[14px] font-semibold text-[var(--text-primary)]",children:"Work Email"})}),(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none transition-colors duration-200 group-focus-within:text-[var(--brand-primary)] text-[var(--text-muted)]",children:(0,r.jsx)(d.Mail,{className:"h-[20px] w-[20px]"})}),(0,r.jsx)("input",{name:"email",type:"email",autoFocus:!b,value:g.email,onChange:z,placeholder:"[email protected]",className:`${B} ${j.email?"border-red-500/50 focus:border-red-500 focus:ring-4 focus:ring-red-500/10":"border-[var(--border)] focus:border-[var(--brand-primary)] focus:ring-4 focus:ring-[var(--brand-primary)]/10"}`})]}),j.email&&(0,r.jsxs)("p",{className:"text-[13px] text-red-500 mt-2 pl-1 pr-1 animate-in slide-in-from-top-1 fade-in duration-200",children:[j.email,"string"==typeof j.email&&j.email.toLowerCase().includes("no user found")&&(0,r.jsx)(i.default,{href:`/brand/signup${R?`?email=${encodeURIComponent(R)}`:""}`,className:"ml-1 font-bold hover:text-red-400 hover:underline underline-offset-4 transition-all",children:"Create an account"})]})]}),(0,r.jsxs)("div",{className:"space-y-2 relative",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between pl-1 pr-1",children:[(0,r.jsx)("label",{className:"text-[14px] font-semibold text-[var(--text-primary)]",children:"Password"}),(0,r.jsx)(i.default,{href:`/brand/forgot-password${R?`?email=${encodeURIComponent(R)}`:""}`,className:"text-[13px] font-bold text-[var(--brand-primary)] hover:underline underline-offset-4 transition-all",children:"Forgot password?"})]}),(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none transition-colors duration-200 group-focus-within:text-[var(--brand-primary)] text-[var(--text-muted)]",children:(0,r.jsx)(c.Lock,{className:"h-[20px] w-[20px]"})}),(0,r.jsx)("input",{name:"password",type:y?"text":"password",autoFocus:!!b,value:g.password,onChange:z,placeholder:"Enter your password",className:`${B} pr-12 ${j.password?"border-red-500/50 focus:border-red-500 focus:ring-4 focus:ring-red-500/10":"border-[var(--border)] focus:border-[var(--brand-primary)] focus:ring-4 focus:ring-[var(--brand-primary)]/10"}`}),(0,r.jsx)("button",{type:"button",onClick:()=>w(!y),className:"absolute inset-y-0 right-0 flex items-center pr-4 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors focus:outline-none",children:y?(0,r.jsx)(o.EyeOff,{className:"h-5 w-5"}):(0,r.jsx)(n.Eye,{className:"h-5 w-5"})})]}),j.password&&(0,r.jsx)("p",{className:"text-[13px] text-red-500 mt-2 pl-1 animate-in slide-in-from-top-1 fade-in duration-200",children:j.password})]}),(0,r.jsx)("div",{className:"pt-2",children:(0,r.jsxs)("button",{type:"submit",disabled:k,className:"group relative overflow-hidden flex w-full items-center justify-center gap-2 rounded-2xl bg-[var(--brand-primary)] px-4 py-3 text-[16px] font-bold text-white shadow-lg shadow-[var(--brand-primary)]/20 hover:shadow-xl hover:shadow-[var(--brand-primary)]/30 hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98] focus:outline-none focus:ring-4 focus:ring-[var(--brand-primary)]/20 disabled:opacity-70 disabled:cursor-not-allowed disabled:hover:translate-y-0 transition-all duration-300",children:[(0,r.jsx)("div",{className:"absolute inset-0 w-full h-full bg-white/20 scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-500 ease-out"}),(0,r.jsx)("span",{className:"relative flex items-center gap-2",children:k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.L
1oader2,{className:"animate-spin h-5 w-5"}),"Signing in..."]}):(0,r.jsxs)(r.Fragment,{children:["Sign In",(0,r.jsx)(m.ArrowRight,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})})]})})]}),(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsxs)("div",{className:"relative flex items-center mb-4",children:[(0,r.jsx)("div",{className:"flex-grow border-t border-[var(--border)]"}),(0,r.jsx)("span",{className:"flex-shrink-0 bg-[var(--background)] px-4 text-[11px] font-bold uppercase tracking-widest text-[var(--text-muted)]/70",children:"Or"}),(0,r.jsx)("div",{className:"flex-grow border-t border-[var(--border)]"})]}),(0,r.jsxs)("button",{onClick:$,disabled:A||k,className:"flex w-full items-center justify-center gap-3 rounded-2xl border-2 border-[var(--border)] bg-transparent px-4 py-3 text-[15px] font-bold text-[var(--text-primary)] hover:bg-[var(--surface-card)] hover:border-[var(--text-muted)]/30 focus:outline-none focus:ring-4 focus:ring-[var(--brand-primary)]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-300",children:[A?(0,r.jsx)(l.Loader2,{className:"animate-spin h-5 w-5"}):(0,r.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{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",fill:"#4285F4"}),(0,r.jsx)("path",{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",fill:"#34A853"}),(0,r.jsx)("path",{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.84z",fill:"#FBBC05"}),(0,r.jsx)("path",{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",fill:"#EA4335"})]}),"Continue with Google"]}),(0,r.jsxs)("p",{className:"mt-6 text-center text-[14px] text-[var(--text-muted)]",children:["Don't have an account?"," ",(0,r.jsx)(i.default,{href:"/brand/signup",className:"font-bold text-[var(--text-primary)] hover:text-[var(--brand-primary)] hover:underline underline-offset-4 transition-all",children:"Create an account"})]})]})]})]})}),(0,r.jsx)("div",{className:"hidden lg:block lg:w-2/5 relative",children:(0,r.jsxs)("div",{className:"sticky top-0 h-screen flex items-center justify-center bg-[var(--surface)] overflow-hidden p-12 border-l border-[var(--border)]",children:[(0,r.jsx)("div",{className:"absolute top-[-10%] left-[-20%] w-[80%] h-[80%] rounded-full bg-[var(--brand-primary)]/10 blur-[120px] mix-blend-multiply dark:mix-blend-screen animate-pulse duration-[10000ms]"}),(0,r.jsx)("div",{className:"absolute bottom-[-10%] right-[-20%] w-[80%] h-[80%] rounded-full bg-blue-600/10 blur-[120px] mix-blend-multiply dark:mix-blend-screen"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-[url('/grid.svg')] bg-center [mask-image:linear-gradient(180deg,black,rgba(0,0,0,0))] dark:[mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))] opacity-[0.03] dark:opacity-5"}),(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-sm group",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-[var(--surface-card)] rounded-[2.5rem] transform rotate-3 transition-transform duration-500 group-hover:rotate-1 border border-[var(--border)] shadow-sm"}),(0,r.jsxs)("div",{className:"relative bg-[var(--surface-card)]/90 backdrop-blur-xl p-8 rounded-[2.5rem] border border-[var(--border)] shadow-xl transition-transform duration-500 group-hover:translate-y-[-4px]",children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-8",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"h-10 w-10 rounded-xl bg-gradient-to-br from-[var(--brand-primary)] to-blue-600 flex items-center justify-center shadow-inner",children:(0,r.jsx)(u.Activity,{className:"h-5 w-5 text-white"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[13px] text-[var(--text-muted)] font-medium uppercase tracking-wider",children:"Command Center"}),(0,r.jsx)("p",{className:"font-bold text-[var(--text-primary)] text-[15px]",children:"Campaign Status"})]})]})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"bg-[var(--surface)] rounded-2xl p-5 border border-[var(--border)]",children:[(0,r.jsxs)("div",{className:"flex justify-between items-end mb-2",children:[(0,r.jsx)("p",{className:"text-[14px] text-[var(--text-muted)] font-medium",children:"Active Creators"}),(0,r.jsx)(x.TrendingUp,{className:"h-4 w-4 text-emerald-500"})]}),(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:"text-3xl font-bold text-[var(--text-primary)]",children:"142"}),(0,r.jsx)("span",{className:"text-[13px] text-emerald-500 font-medium",children:"+12 this week"})]})]}),(0,r.jsxs)("div",{className:"bg-[var(--surface)] rounded-2xl p-5 border border-[var(--border)]",children:[(0,r.jsx)("div",{className:"flex justify-between items-end mb-2",children:(0,r.jsx)("p",{className:"text-[14px] text-[var(--text-muted)] font-medium",children:"Pending Approvals"})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:"8"}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-md bg-amber-500/10 text-amber-600 dar
1k:text-amber-400 text-[12px] font-bold",children:"Action Needed"})]})]})]})]})]})]})})]}):null}function b(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-[var(--background)]",children:(0,r.jsx)(l.Loader2,{className:"animate-spin h-8 w-8 text-[var(--brand-primary)]"})}),children:(0,r.jsx)(f,{})})}e.s(["default",()=>b])}]);
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.