(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[879],{7077:(e,a,s)=>{Promise.resolve().then(s.bind(s,8111)),Promise.resolve().then(s.bind(s,8431))},8111:(e,a,s)=>{"use strict";s.d(a,{AL:()=>l,As:()=>d,AuthShell:()=>u});var t=s(5155),n=s(8173),r=s.n(n);let i="AI Trading Coach";function l(){return(0,t.jsxs)(r(),{href:"/workspace",className:"auth-brand","aria-label":i,children:[(0,t.jsx)("div",{className:"brand-mark","aria-hidden":"true",children:"AI"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"brand-name",children:i}),(0,t.jsx)("div",{className:"brand-sub",children:"Discretionary trading, refined."})]})]})}function c(e){let{rightLink:a}=e;return(0,t.jsxs)("header",{className:"auth-topbar",children:[(0,t.jsx)(l,{}),(0,t.jsx)("span",{className:"topbar-spacer"}),a&&(0,t.jsxs)(r(),{className:"topbar-link",href:a.href,children:[a.label," →"]})]})}function o(){return(0,t.jsxs)("footer",{className:"auth-footer",children:[(0,t.jsx)("span",{children:"\xa9 2026 aitrading.coach"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)(r(),{href:"/legal/privacy",children:"Privacy"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)(r(),{href:"/legal/terms",children:"Terms"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsxs)("a",{href:"https://status.aitrading.coach",target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"status-dot"}),"Status \xb7 all systems normal"]}),(0,t.jsx)("span",{className:"spacer"}),(0,t.jsx)("span",{children:"v1.4.2"})]})}function d(){return(0,t.jsxs)("span",{className:"trust-pill",children:[(0,t.jsx)("span",{className:"dot"}),"MT5 EA \xb7 ",(0,t.jsx)("strong",{children:"authenticated"})," \xb7 14ms"]})}function h(){return(0,t.jsxs)("div",{className:"auth-illust",style:{flexDirection:"column",gap:24},children:[(0,t.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:9.5,textTransform:"uppercase",letterSpacing:"0.2em",color:"var(--accent)"},children:["\xa7 ",i]}),(0,t.jsxs)("div",{style:{fontFamily:"var(--font-display)",fontSize:38,lineHeight:1.1,letterSpacing:"-0.025em",color:"var(--ink)",maxWidth:380,fontWeight:400},children:["An AI coach that ",(0,t.jsx)("em",{style:{color:"var(--accent-2)"},children:"draws"})," on your chart."]}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontSize:16,color:"var(--ink-3)",maxWidth:380,lineHeight:1.55,fontWeight:350},children:"Discretionary trading, refined. Mark supply zones, FVG, and Wyckoff phases — without leaving the chart."}),(0,t.jsx)("div",{style:{marginTop:20},children:(0,t.jsx)(d,{})})]})}function u(e){let{children:a,rightLink:s}=e;return(0,t.jsxs)("div",{className:"auth-page",children:[(0,t.jsx)(c,{rightLink:s}),(0,t.jsxs)("main",{className:"auth-main",children:[(0,t.jsx)(h,{}),a]}),(0,t.jsx)(o,{})]})}},452:(e,a,s)=>{"use strict";s.d(a,{a:()=>r});var t=s(5155),n=s(3745);function r(e){let{label:a="Continue with Google",disabled:s}=e;return(0,t.jsxs)("button",{type:"button",onClick:()=>{s||window.location.assign(n.FH.googleSigninUrl())},disabled:s,className:"group flex w-full items-center justify-center gap-3 rounded-xl border border-slate-200 bg-white px-5 py-3 text-sm font-medium text-slate-700 shadow-sm transition hover:border-slate-300 hover:shadow disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100 dark:hover:border-slate-600",children:[(0,t.jsx)(i,{}),(0,t.jsx)("span",{children:a})]})}function i(){return(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M17.64 9.2045c0-.6381-.0573-1.2518-.1636-1.8409H9v3.4814h4.8436c-.2086 1.125-.8427 2.0782-1.7959 2.7164v2.2581h2.9087c1.7018-1.5668 2.6836-3.874 2.6836-6.615z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M9 18c2.43 0 4.4673-.806 5.9564-2.1804l-2.9087-2.2581c-.806.54-1.8368.8595-3.0477.8595-2.344 0-4.3282-1.5831-5.036-3.7104H.9574v2.3318C2.4382 15.9831 5.4818 18 9 18z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M3.964 10.71c-.18-.54-.2823-1.1168-.2823-1.71s.1023-1.17.2823-1.71V4.9582H.9573A8.9965 8.9965 0 0 0 0 9c0 1.4523.3477 2.8268.9573 4.0418L3.964 10.71z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"M9 3.5795c1.3214 0 2.5077.4541 3.4405 1.346l2.5813-2.5814C13.4632.8918 11.426 0 9 0 5.4818 0 2.4382 2.0168.9573 4.9582L3.964 7.29C4.6718 5.1627 6.656 3.5795 9 3.5795z"})]})}},4529:(e,a,s)=>{"use strict";s.d(a,{X:()=>r});var t=s(5155),n=s(302);function r(e){let{password:a}=e,s=(0,n.n)(a);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"strength s".concat(s),"aria-hidden":"true",children:[(0,t.jsx)("span",{className:"strength-bar"}),(0,t.jsx)("span",{className:"strength-bar"}),(0,t.jsx)("span",{className:"strength-bar"}),(0,t.jsx)("span",{className:"strength-bar"})]}),(0,t.jsxs)("div",{className:"strength-label",children:[(0,t.jsx)("span",{children:"Password strength"}),(0,t.jsx)("span",{className:"level",children:n.a[s]})]})]})}},8431:(e,a,s)=>{"use strict";s.d(a,{SignupForm:()=>u});var t=s(5155),n=s(2115),r=s(8173),i=s.n(r),l=s(3745),c=s(1069),o=s(302),d=s(4529),h=s(452);function u(){let{signup:e}=(0,c.A)(),[a,s]=(0,n.useState)(""),[r,u]=(0,n.useState)(""),[m,p]=(0,n.useState)(!1),[x,f]=(0,n.useState)(!1),[g,j]=(0,n.useState)(null),[v,y]=(0,n.useState)(!1),b=(0,o.n)(r),N=!x&&/\S+@\S+\.\S+/.test(a.trim())&&r.length>=10&&b>=2&&m,w=async s=>{if(s.preventDefault(),N){j(null),f(!0);try{await e({email:a.trim(),password:r}),y(!0)}catch(e){j(e instanceof l.UJ?Array.isArray(e.body.message)?e.body.message.join("; "):e.body.message:"Something went wrong. Try again.")}finally{f(!1)}}};return(0,t.jsxs)("form",{className:"auth-card",onSubmit:w,noValidate:!0,children:[(0,t.jsxs)("div",{className:"auth-eyebrow",children:[(0,t.jsx)("span",{className:"sigil","aria-hidden":"true",children:"\xa7"})," Create account"]}),(0,t.jsxs)("h1",{className:"auth-title",children:["Begin ",(0,t.jsx)("em",{children:"trading"})," with a coach."]}),(0,t.jsx)("p",{className:"auth-sub",children:"Two minutes to a chart marked by an AI."}),(0,t.jsxs)("div",{className:"pricing-chip",children:[(0,t.jsx)("span",{className:"free",children:"14 days free"}),(0,t.jsx)("span",{className:"sep","aria-hidden":"true",children:"\xb7"}),(0,t.jsx)("span",{className:"price",children:"then $19/mo \xb7 cancel anytime"})]}),v?(0,t.jsxs)("div",{className:"alert alert-success",role:"status",children:[(0,t.jsx)("span",{className:"alert-icon","aria-hidden":"true",children:"✓"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Check your email."}),(0,t.jsx)("br",{}),"We sent a verification link to"," ",(0,t.jsx)("span",{style:{color:"var(--ink)"},children:a.trim()}),". Click it to continue."]})]}):(0,t.jsxs)(t.Fragment,{children:[g&&(0,t.jsxs)("div",{className:"alert alert-error",role:"alert",children:[(0,t.jsx)("span",{className:"alert-icon","aria-hidden":"true",children:"!"}),(0,t.jsx)("div",{children:g})]}),(0,t.jsxs)("div",{className:"field",children:[(0,t.jsx)("label",{className:"field-label",htmlFor:"signup-email",children:"Email"}),(0,t.jsx)("input",{id:"signup-email",className:"input",type:"email",autoComplete:"email",placeholder:"you@studio.fx",required:!0,value:a,onChange:e=>s(e.target.value),disabled:x})]}),(0,t.jsxs)("div",{className:"field",children:[(0,t.jsxs)("label",{className:"field-label",htmlFor:"signup-password",children:["Password",(0,t.jsx)("span",{className:"helper",children:"10+ chars \xb7 mix of upper, lower, number"})]}),(0,t.jsx)("input",{id:"signup-password",className:"input",type:"password",autoComplete:"new-password",placeholder:"A strong password",required:!0,minLength:10,value:r,onChange:e=>u(e.target.value),disabled:x}),(0,t.jsx)(d.X,{password:r})]}),(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)("input",{type:"checkbox",checked:m,onChange:e=>p(e.target.checked),disabled:x}),(0,t.jsx)("span",{className:"check-box","aria-hidden":"true"}),(0,t.jsxs)("span",{children:["I agree to the ",(0,t.jsx)(i(),{href:"/legal/terms",children:"Terms of Service"})," and"," ",(0,t.jsx)(i(),{href:"/legal/privacy",children:"Privacy Policy"}),"."]})]}),(0,t.jsxs)("button",{type:"submit",className:"btn btn-primary",disabled:!N,children:[x?"Creating account…":"Create account",(0,t.jsx)("span",{className:"kbd","aria-hidden":"true",children:"↵"})]}),(0,t.jsx)("div",{className:"or-divider","aria-hidden":"true",children:"or"}),(0,t.jsx)(h.a,{label:"Sign up with Google",disabled:x})]}),(0,t.jsxs)("div",{className:"auth-meta",children:["Already trading with us? ",(0,t.jsx)(i(),{href:"/login",children:"Log in"})]})]})}},3745:(e,a,s)=>{"use strict";s.d(a,{FH:()=>u,UJ:()=>n,iD:()=>c,ki:()=>l});let t="https://api.aitrading.coach";class n extends Error{constructor(e,a){super((Array.isArray(a.message)?a.message.join("; "):a.message)||"HTTP ".concat(e)),this.status=e,this.body=a,this.name="ApiException"}}let r=null,i=null;function l(e){r=e}function c(){return r}async function o(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{method:s="GET",body:n,signal:i,noRefresh:l,authenticated:c=!0}=a,o={};void 0!==n&&(o["Content-Type"]="application/json"),c&&r&&(o.Authorization="Bearer ".concat(r));let u=await fetch("".concat(t).concat(e),{method:s,headers:o,body:void 0===n?void 0:JSON.stringify(n),credentials:"include",signal:i});if(401===u.status&&c&&!l){let a=await h();if(a)return o.Authorization="Bearer ".concat(a),d(await fetch("".concat(t).concat(e),{method:s,headers:o,body:void 0===n?void 0:JSON.stringify(n),credentials:"include",signal:i}))}return d(u)}async function d(e){let a=await e.text(),s=a?JSON.parse(a):null;if(!e.ok){var t;let r=null!==(t=null==s?void 0:s.error)&&void 0!==t?t:{code:"unknown",message:a||e.statusText,statusCode:e.status};throw new n(e.status,r)}return s}async function h(){return i||(i=(async()=>{try{let e=await o("/v1/auth/refresh",{method:"POST",noRefresh:!0,authenticated:!1});return r=e.accessToken,e.accessToken}catch(e){return r=null,null}finally{i=null}})())}let u={signup:e=>o("/v1/auth/signup",{method:"POST",body:e,authenticated:!1}),verifyEmail:e=>o("/v1/auth/verify-email",{method:"POST",body:e,authenticated:!1}),login:e=>o("/v1/auth/login",{method:"POST",body:e,authenticated:!1}),refresh:()=>o("/v1/auth/refresh",{method:"POST",noRefresh:!0,authenticated:!1}),logout:()=>o("/v1/auth/logout",{method:"POST",noRefresh:!0,authenticated:!1}),forgot:e=>o("/v1/auth/forgot",{method:"POST",body:e,authenticated:!1}),reset:e=>o("/v1/auth/reset",{method:"POST",body:e,authenticated:!1}),enroll2fa:()=>o("/v1/auth/2fa/enroll",{method:"POST"}),verify2fa:e=>o("/v1/auth/2fa/verify",{method:"POST",body:e}),me:()=>o("/v1/auth/me"),redeemHandover:e=>o("/v1/auth/handover/".concat(encodeURIComponent(e)),{method:"POST",authenticated:!1,noRefresh:!0}),googleSigninUrl:()=>"".concat(t,"/v1/auth/google"),health:()=>o("/v1/health",{authenticated:!1,noRefresh:!0})}},1069:(e,a,s)=>{"use strict";s.d(a,{A:()=>c,AuthProvider:()=>l});var t=s(5155),n=s(2115),r=s(3745);let i=(0,n.createContext)(null);function l(e){let{children:a}=e,[s,l]=(0,n.useState)({status:"loading",user:null}),c=(0,n.useCallback)(async()=>{try{let{accessToken:e}=await r.FH.refresh();(0,r.ki)(e);let a=await r.FH.me();l({status:"authenticated",user:a})}catch(e){(0,r.ki)(null),l({status:"anonymous",user:null})}},[]);(0,n.useEffect)(()=>{c()},[c]);let o=(0,n.useCallback)(async e=>{let a=await r.FH.login(e);if("requiresTwoFactor"in a&&a.requiresTwoFactor)return{requiresTwoFactor:!0};if(!("accessToken"in a))throw new r.UJ(500,{code:"unexpected",message:"Login response missing access token",statusCode:500});return(0,r.ki)(a.accessToken),l({status:"authenticated",user:await r.FH.me()}),{}},[]),d=(0,n.useCallback)(async e=>{await r.FH.signup(e),l({status:"anonymous",user:null})},[]),h=(0,n.useCallback)(async()=>{try{await r.FH.logout()}finally{(0,r.ki)(null),l({status:"anonymous",user:null})}},[]),u=(0,n.useMemo)(()=>({...s,login:o,signup:d,logout:h,refresh:c}),[s,o,d,h,c]);return(0,t.jsx)(i.Provider,{value:u,children:a})}function c(){let e=(0,n.useContext)(i);if(!e)throw Error("useAuth must be used inside ");return e}},302:(e,a,s)=>{"use strict";s.d(a,{a:()=>t,n:()=>n});let t={0:"Empty",1:"Weak",2:"Fair",3:"Strong",4:"Excellent"};function n(e){let a=0;return e.length>=8&&(a=1),e.length>=8&&/[A-Z]/.test(e)&&/[a-z]/.test(e)&&(a=2),e.length>=8&&/[A-Z]/.test(e)&&/[a-z]/.test(e)&&/\d/.test(e)&&(a=3),e.length>=12&&/[A-Z]/.test(e)&&/[a-z]/.test(e)&&/\d/.test(e)&&/[^A-Za-z0-9]/.test(e)&&(a=4),a}}},e=>{var a=a=>e(e.s=a);e.O(0,[173,441,517,358],()=>a(7077)),_N_E=e.O()}]);