1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="1f96dccf-380e-2280-cb64-c7d7e5ef4cd3")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37313,e=>{"use strict";var n=e.i(843476),s=e.i(271645),t=e.i(920755),i=e.i(795401),a=e.i(504067),o=e.i(331297),r=e.i(95827),l=e.i(360415),d=e.i(724709),c=e.i(826887),u=e.i(845527),g=e.i(413293),m=e.i(944064);e.i(443707);var x=e.i(149721),p=e.i(36935),h=e.i(27773),f=e.i(447),k=e.i(765289);let y=new Set(["creator","agency","agency_admin","agency_owner"]);function j({kind:e,firstName:s,email:t,avatarUrl:i,agencyName:a,agencyLogoUrl:o,onNotYou:r,busy:c}){let{colors:u}=(0,f.useTheme)(),g=y.has(e)&&!!a;return(0,n.jsxs)("div",{"aria-live":"polite",style:{display:"flex",alignItems:"flex-start",gap:d.tokens.space[3],padding:`${d.tokens.space[3]}px ${d.tokens.space[3.5]}px`,border:`1px solid ${u.borderSubtle}`,background:u.surface2,borderRadius:d.tokens.radius["2xl"]},children:[(0,n.jsx)(k.Avatar,{src:i??void 0,alt:"",fallbackInitials:s.slice(0,1),size:"md"}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0,flex:1},children:[(0,n.jsx)("b",{style:{fontFamily:d.tokens.font.family.display,fontWeight:d.tokens.font.weight.semibold,fontSize:d.tokens.font.size.lede,color:u.text},children:s}),(0,n.jsx)("span",{style:{color:u.textMuted,fontSize:d.tokens.font.size.label,overflowWrap:"anywhere"},children:t}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:d.tokens.space[2.5],marginTop:d.tokens.space[1.5],flexWrap:"wrap"},children:[g&&(0,n.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:d.tokens.space[1.5],fontFamily:d.tokens.font.family.label,fontSize:d.tokens.font.size.caption,fontWeight:d.tokens.font.weight.semibold,letterSpacing:d.tokens.font.letterSpacing.wider,textTransform:"uppercase",padding:`3px ${d.tokens.space[2]}px`,borderRadius:d.tokens.radius.pill,background:`${u.primary}1F`,color:u.primary,flex:"0 0 auto"},children:[o?(0,n.jsx)("img",{src:o,alt:"",width:14,height:14,style:{borderRadius:d.tokens.radius.xs}}):(0,n.jsx)("i",{"aria-hidden":!0,style:{width:14,height:14,borderRadius:d.tokens.radius.xs,background:`linear-gradient(135deg, ${u.primary}, ${u.accent})`,display:"inline-block"}}),a]}),(0,n.jsx)("button",{type:"button",onClick:r,disabled:c,style:{marginLeft:"auto",background:"none",border:0,padding:0,cursor:c?"default":"pointer",color:u.primary,fontFamily:d.tokens.font.family.body,fontSize:d.tokens.font.size.label,fontWeight:d.tokens.font.weight.medium,whiteSpace:"nowrap"},children:(0,n.jsx)(l.Trans,{message:"Not you?",id:"+KHzW0"})})]})]})]})}function b({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),{state:a,patch:f,props:k}=e,[y,S]=(0,s.useState)(k.returning??null),[T,w]=(0,s.useState)(""),[v,C]=(0,s.useState)(!0),[_,z]=(0,s.useState)(!k.returning),[B,F]=(0,s.use
2State)(()=>k.loginError?(e=>{switch(e){case"region":return t._({id:"FhjlCX",message:"Google sign-in isn't available in your region. Use email or TikTok."});case"tiktok_failed":return t._({id:"5XSGZc",message:"TikTok sign-in didn't finish. Nothing was changed. Try again."});case"tiktok_taken":return t._({id:"T9RU3k",message:"That TikTok account is already registered to another goTether account. If it's yours, contact support."});case"tiktok_no_handle":return t._({id:"XJrHgm",message:"TikTok didn't share your @handle with us. Try again and allow profile access."});case"session_failed":return t._({id:"rUTLjD",message:"We couldn't sign you in. Try again."});case"account_failed":return t._({id:"7QGgq6",message:"We couldn't start your account. Try again."});case"auth_failed":return t._({id:"ONVNlr",message:"That sign-in link didn't work. It may have expired or already been used."});default:return t._({id:"KGP8Zb",message:"Sign-in didn't finish. Try again."})}})(k.loginError):null),[I,W]=(0,s.useState)(!1),[L,E]=(0,s.useState)(!1),M=y?y.email:a.email,N=async n=>{if(n.preventDefault(),!L){E(!0),F(null),W(!1);try{(0,h.rememberKeepSignedIn)(v);let{userId:n}=await (0,o.signInWithPassword)(M,T);f({email:M,userId:n}),await e.finish()}catch(n){let e=n instanceof o.ShellError?n.code:"unknown";W("unconfirmed"===e),F("invalid-credentials"===e?"wrong":"unconfirmed"===e?t._({id:"YR2zgn",message:"Confirm your email first. We can send you a new code."}):"rate-limited"===e?t._({id:"QMElCD",message:"Too many attempts. Wait a minute and try again."}):t._({id:"D2AZQg",message:"Something went wrong. Try again."})),E(!1)}}},A=async()=>{E(!0);try{await (0,o.resendSignUpCode)(M,"signup"),f({email:M,flow:"signup"}),e.go("verify")}catch{F(t._({id:"fwgXmD",message:"Could not send a new code. Wait a minute and try again."})),E(!1)}},R=async()=>{S(null),z(!0),f({email:""}),await (0,o.clearLastAccount)()},U=k.signedOut?t._({id:"WT0q5e",message:"You're signed out"}):y?t._({id:"o+GxCY",message:"Welcome back, {0}",values:{0:y.firstName}}):k.agencyContext?t._({id:"DzrYWy",message:"Sign in to {0}",values:{0:k.agencyContext.name}}):k.embedded?t._({id:"zAvS8w",message:"Sign in to continue"}):t._({id:"5lWFkC",message:"Sign in"});return(0,n.jsxs)("form",{onSubmit:N,noValidate:!0,style:{display:"contents"},children:[!k.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.ScreenTitle,{children:U}),!y&&(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Sign in to your goTether account.",id:"F9vuwK"})}),B&&(0,n.jsxs)(r.FormError,{children:["wrong"===B?(0,n.jsx)(l.Trans,{message:"Wrong email or password. Try again or <0>reset it</0>.",id:"q/sNyp",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("forgot")})}}):B,I&&(0,n.jsxs)(n.Fragment,{children:[" ",(0,n.jsx)(r.TextLinkButton,{onClick:A,disabled:L,children:(0,n.jsx)(l.Trans,{message:"Send a new code",id:"YQG+gM"})})]})]}),y&&(0,n.jsx)(j,{...y,onNotYou:R,busy:L}),!y&&(0,n.jsx)(g.Input,{label:t._({id:"O3oNi5",message:"Email"}),type:"email",name:"email",placeholder:"[email protected]",size:"lg",value:a.email,onChange:e=>f({email:e}),autoFocus:!0}),(0,n.jsx)(m.PasswordField,{autoComplete:"current-password",value:T,onChange:w,error:"wrong"===B?" ":void 0}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:d.tokens.space[3],marginTop:-d.tokens.space[1]},children:[(0,n.jsx)(u.Checkbox,{checked:v,onChange:C,label:t._({id:"hvsP1d",message:"Keep me signed in"}),size:"sm"}),(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("forgot"),children:(0,n.jsx)(l.Trans,{message:"Forgot password?",id:"UNMVei"})})]}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:L,disabled:!M||!T,children:y?t._({id:"yg2Y1O",message:"Continue as {0}",values:{0:y.firstName}}):t._({id:"5lWFkC",message:"Sign in"})}),y&&!_&&(0,n.jsx)("div",{style:{textAlign:"center"},children:(0,n.jsx)(r.TextLinkButton,{onClick:()=>z(!0),children:(0,n.jsx)(l.Trans,{message:"Use a different way to sign in",id:"0QEB4k"})})}),_&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Divider,{children:(0,n.jsx)(l.Trans,{message:"or sign in with",id:"gbUcih"})}),(0,n.jsxs)("div",{style:{display:"grid",gap:d.tokens.space[2.5]},children:[k.providers.includes("tiktok")&&(0,n.jsx)(r.SocialButton,{provider:"tiktok",size:k.embedded?"sm":"lg",onClick:()=>{(0,h.rememberKeepSignedIn)(!0),window.location.assign((0,o.tiktokBeginUrl)(k.returnTo))}}),k.providers.includes("google")&&(0,n.jsx)(r.SocialButton,{provider:"google",size:k.embedded?"sm":"lg",onClick:()=>{(0,h.rememberKeepSignedIn)(!0),(0,o.signInWithGoogle)(k.returnTo).catch(()=>F(t._({id:"LBMxYE",message:"Could not start Google sign-in. Try again."})))}})]}),(0,n.jsx)("div",{style:{textAlign:"center"},children:(0,n.jsxs)(r.TextLinkButton,{disabled:!0,children:[(0,n.jsx)(x.FontAwesomeIcon,{icon:p.faKey,style:{marginRight:d.tokens.space[1.5],fontSize:12}}),(0,n.jsx)(l.Trans,{message:"Sign in with a passkey",id:"WaqaCM"})]})})]}),!y&&(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"New to goTether? <0>Create an account</0>",id:"iD21Pl",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("signup")})}})}),!k.embedded&&(0,n.jsx)(r.LegalLine,{})]})}var S=e.i(803501);function T({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),{state:a,patch:x,props:p}
2=e,[h,f]=(0,s.useState)(""),[k,y]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[w,v]=(0,s.useState)(!1),[C,_]=(0,s.useState)(null),[z,B]=(0,s.useState)({}),[F,I]=(0,s.useState)(!1),W=a.firstName.trim()&&a.lastName.trim()&&a.email.trim()&&j&&k,L=async n=>{if(n.preventDefault(),F)return;let s={};if(w||(s.terms=t._({id:"W8eOFD",message:"Please accept the Terms to continue."})),j||(s.phone=t._({id:"7ZTg04",message:"Enter a valid mobile number."})),B(s),!Object.keys(s).length){I(!0),_(null);try{let{flow:n,email:s}=await (0,o.startSignUp)({email:a.email,password:a.password,firstName:a.firstName,lastName:a.lastName,phone:a.phone});x({flow:n,email:s}),e.go("verify")}catch(n){let e=n instanceof o.ShellError?n.code:"unknown";_("exists"===e?"exists":"rate-limited"===e?t._({id:"QMElCD",message:"Too many attempts. Wait a minute and try again."}):n instanceof Error?n.message:t._({id:"D2AZQg",message:"Something went wrong. Try again."})),I(!1)}}};return(0,n.jsxs)("form",{onSubmit:L,noValidate:!0,style:{display:"contents"},children:[!p.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.Steps,{on:1}),(0,n.jsx)(r.ScreenTitle,{children:p.agencyContext?t._({id:"Q2ccgn",message:"Apply to {0}",values:{0:p.agencyContext.name}}):t._({id:"cpE88+",message:"Create your account"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Step 1 of 3 · account details",id:"xPt00O"})}),C&&(0,n.jsx)(r.FormError,{children:"exists"===C?(0,n.jsx)(l.Trans,{message:"An account with this email already exists. <0>Sign in</0> instead.",id:"5T+nnJ",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("signin")})}}):C}),(0,n.jsxs)(r.TwoUp,{children:[(0,n.jsx)(g.Input,{label:t._({id:"V1EGGU",message:"First name"}),name:"given-name",size:"lg",value:a.firstName,onChange:e=>x({firstName:e}),autoFocus:!0}),(0,n.jsx)(g.Input,{label:t._({id:"1ZaQUH",message:"Last name"}),name:"family-name",size:"lg",value:a.lastName,onChange:e=>x({lastName:e})})]}),(0,n.jsx)(g.Input,{label:t._({id:"O3oNi5",message:"Email"}),type:"email",name:"email",placeholder:"[email protected]",size:"lg",value:a.email,onChange:e=>x({email:e})}),(0,n.jsx)(S.InternationalPhoneInput,{label:t._({id:"DlMej0",message:"Mobile phone"}),helper:t._({id:"obZeb1",message:"For account alerts and, when enabled, sign-in codes."}),error:z.phone,size:"lg",defaultCountry:"US",value:a.phone,onChange:(e,n)=>{x({phone:e}),b(n.isValid)}}),(0,n.jsx)(m.PasswordField,{value:a.password,onChange:e=>x({password:e}),confirmValue:h,onConfirmChange:f,onValidityChange:y}),(0,n.jsx)(u.Checkbox,{checked:w,onChange:v,label:(0,n.jsx)(r.TermsLabel,{}),error:z.terms,size:"sm"}),(0,n.jsx)(u.Checkbox,{checked:a.smsOptIn,onChange:e=>x({smsOptIn:e}),label:(0,n.jsx)(r.SmsConsentLabel,{}),size:"sm"}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:F,disabled:!W,children:(0,n.jsx)(l.Trans,{message:"Continue",id:"xGVfLh"})}),(0,n.jsx)(r.Divider,{}),(0,n.jsxs)("div",{style:{display:"grid",gap:d.tokens.space[2.5]},children:[p.providers.includes("tiktok")&&(0,n.jsx)(r.SocialButton,{provider:"tiktok",verb:"signup",onClick:()=>window.location.assign((0,o.tiktokBeginUrl)(p.returnTo))}),p.providers.includes("google")&&(0,n.jsx)(r.SocialButton,{provider:"google",verb:"signup",onClick:()=>{(0,o.signInWithGoogle)(p.returnTo).catch(()=>_(t._({id:"XbWqT9",message:"Could not start Google sign-up. Try again."})))}})]}),(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"Already have an account? <0>Sign in</0>",id:"0tPXOa",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("signin")})}})})]})}var w=e.i(420824);function v({value:e,onChange:t,onComplete:i,length:a=6,status:o="idle",attemptsLeft:r,resendIn:u=0,onResend:g,label:m,destination:x,disabled:p,className:h}){let{i18n:k,_:y}=(0,l.useLingui)(),{colors:j}=(0,f.useTheme)(),b=(0,s.useRef)([]),[S,T]=(0,s.useState)(null),w=(0,s.useRef)(null),_=Array.from({length:a},(n,s)=>e[s]??""),z="locked"===o||p,B="error"===o||"locked"===o,F=m??k._({id:"XsU6EU",message:"Email code"});(0,s.useEffect)(()=>{e.length===a&&w.current!==e&&(w.current=e,i?.(e)),e.length<a&&(w.current=null)},[e,a,i]);let I=(e,n)=>{let s=_.slice();s[e]=n,t(s.join(""))},W=e=>
2b.current[Math.max(0,Math.min(a-1,e))]?.focus(),L=e=>{let n=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,a);n&&(e.preventDefault(),t(n),W(n.length))};return(0,n.jsxs)("div",{className:h,style:{display:"flex",flexDirection:"column",gap:d.tokens.space[2]},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:d.tokens.space[2]},children:[(0,n.jsx)("span",{style:{fontFamily:d.tokens.font.family.label,fontSize:d.tokens.font.size.caption,fontWeight:d.tokens.font.weight.semibold,letterSpacing:d.tokens.font.letterSpacing.wider,textTransform:"uppercase",color:j.textMuted},children:F}),x&&(0,n.jsx)("small",{style:{fontFamily:d.tokens.font.family.body,fontSize:d.tokens.font.size.caption,color:j.textSubtle,overflowWrap:"anywhere",textAlign:"right"},children:x})]}),(0,n.jsx)("div",{role:"group","aria-label":F,style:{display:"grid",gridTemplateColumns:`repeat(${a}, 1fr)`,gap:d.tokens.space[2]},children:_.map((e,s)=>(0,n.jsx)("input",{ref:e=>{b.current[s]=e},type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:0===s?"one-time-code":"off",maxLength:1,value:e,"aria-label":k._({id:"WOiMOd",message:"Digit {0} of {length}",values:{length:a,0:s+1}}),"aria-invalid":B,disabled:z,onChange:e=>{let n=e.target.value.replace(/\D/g,"").slice(-1);n&&(I(s,n),W(s+1))},onKeyDown:e=>{if("Backspace"===e.key)e.preventDefault(),_[s]?I(s,""):(I(s-1,""),W(s-1));else if("ArrowLeft"===e.key)W(s-1);else if("ArrowRight"===e.key)W(s+1);else if(/^\d$/.test(e.key)){if(e.preventDefault(),B&&_.every(Boolean)){t(e.key),W(1);return}I(s,e.key),W(s+1)}},onPaste:L,onFocus:e=>{T(s),e.currentTarget.select()},onBlur:()=>T(null),style:{height:46,width:"100%",minWidth:0,textAlign:"center",fontFamily:d.tokens.font.family.mono,fontSize:d.tokens.font.size.h3,fontWeight:d.tokens.font.weight.semibold,fontVariantNumeric:"tabular-nums",padding:0,borderRadius:d.tokens.radius.md,border:`1px solid ${B?j.error:"verified"===o?j.success:S===s?d.tokens.color.accent.cosmic:j.border}`,outline:S===s?`2px solid ${d.tokens.color.accent.cosmic}`:"none",outlineOffset:0,background:j.surface2,color:j.text,opacity:z?.55:1,cursor:z?"not-allowed":"text",transition:`border-color ${d.tokens.motion.duration.instant}ms`}},s))}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:d.tokens.space[2.5],minHeight:28,flexWrap:"wrap"},children:[(0,n.jsx)(C,{status:o,attemptsLeft:r}),u>0?(0,n.jsxs)("span",{style:{fontFamily:d.tokens.font.family.body,fontSize:d.tokens.font.size.body,color:j.textMuted,fontVariantNumeric:"tabular-nums"},children:[k._({id:"d1KQWp",message:"Resend in"})," 0:",String(u).padStart(2,"0")]}):(0,n.jsx)(c.Button,{variant:"primary-ghost",size:"sm",onClick:g,disabled:!g,children:"locked"===o?k._({id:"YQG+gM",message:"Send a new code"}):k._({id:"MyjAbr",message:"Resend"})})]})]})}function C({status:e,attemptsLeft:s}){let{i18n:t,_:i}=(0,l.useLingui)(),{colors:a}=(0,f.useTheme)();return"verifying"===e?(0,n.jsx)(w.StatusBadge,{label:t._({id:"iKvAeG",message:"Checking"}),variant:"info",pulse:!0}):"verified"===e?(0,n.jsx)(w.StatusBadge,{label:t._({id:"QDEWii",message:"Verified"}),variant:"success"}):"locked"===e?(0,n.jsx)(w.StatusBadge,{label:t._({id:"G2fuEb",message:"Locked"}),variant:"error"}):"error"===e?(0,n.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:d.tokens.space[2]},children:[(0,n.jsx)(w.StatusBadge,{label:t._({id:"EK6YGK",message:"Wrong code"}),variant:"error"}),"number"==typeof s&&(0,n.jsx)("small",{style:{fontFamily:d.tokens.font.family.body,fontSize:d.tokens.font.size.label,color:a.textMuted},children:(0,n.jsx)(l.Trans,{message:"{attemptsLeft, plural, one {# attempt left} other {# attempts left}}",id:"cKhe/R",values:{attemptsLeft:s}})})]}):(0,n.jsx)("span",{})}e.i(972694);var _=e.i(125722);function z({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),{colors:a}=(0,f.useTheme)(),{state:u,patch:g,props:m}
2=e,[x,p]=(0,s.useState)(""),[h,k]=(0,s.useState)("idle"),[y,j]=(0,s.useState)(5),[b,S]=(0,s.useState)(60),[T,w]=(0,s.useState)(null),C=u.flow??"signup";(0,s.useEffect)(()=>{if(b<=0)return;let e=setTimeout(()=>S(e=>e-1),1e3);return()=>clearTimeout(e)},[b]);let B=(0,s.useRef)(!1),F=(0,s.useCallback)(async n=>{if(!B.current&&("idle"===h||"error"===h)){B.current=!0,k("verifying"),w(null);try{let{userId:s}=await (0,o.verifyEmailCode)(u.email,n,C,u.password||void 0);if(k("verified"),(0,_.trackSignUp)({method:u.tiktokConnected?"tiktok":"email"}),g({userId:s}),u.tiktokConnected){await (0,o.completeProfile)({source:"signup"}).catch(()=>{}),await e.finish();return}await (0,o.completeProfile)({smsOptIn:u.smsOptIn,displayName:`${u.firstName} ${u.lastName}`.trim()||void 0,source:"signup",termsAccepted:!0}).catch(()=>{}),e.go("tiktok")}catch(s){B.current=!1;let e=s instanceof o.ShellError?s:null;if(e?.code==="expired"){w(t._({id:"1LU5Hm",message:"That code has expired. Send a new one."})),k("locked");return}if(e?.code==="rate-limited"){w(t._({id:"QMElCD",message:"Too many attempts. Wait a minute and try again."})),k("error");return}let n=e?.code==="locked"?0:e?.attemptsLeft??y-1;j(n),k(n<=0?"locked":"error")}}},[h,u.email,u.password,u.smsOptIn,u.firstName,u.lastName,u.tiktokConnected,C,y,g,e,i]),I=async()=>{try{await (0,o.resendSignUpCode)(u.email,C),p(""),k("idle"),j(5),S(60),w(t._({id:"4FvwBc",message:"New code sent."}))}catch(e){w(e instanceof Error?e.message:t._({id:"IpcC9y",message:"Could not send a new code."}))}};return"locked"===h&&y<=0?(0,n.jsxs)(n.Fragment,{children:[!m.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"err",label:t._({id:"G2fuEb",message:"Locked"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Too many attempts",id:"Uk+zbS"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"That code is no longer valid. Request a new one and we'll email it to <0>{0}</0>.",id:"YhyDtf",values:{0:u.email},components:{0:(0,n.jsx)("b",{})}})}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:I,disabled:b>0,children:b>0?t._({id:"cqfZu1",message:"Send a new code ({resendIn}s)",values:{resendIn:b}}):t._({id:"YQG+gM",message:"Send a new code"})}),(0,n.jsx)(c.Button,{variant:"ghost",fullWidth:!0,onClick:()=>e.go("signin"),children:(0,n.jsx)(l.Trans,{message:"Back to sign in",id:"QeXxn3"})})]}):(0,n.jsxs)(n.Fragment,{children:[!m.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.Steps,{on:2,total:u.tiktokConnected?2:3}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Check your email",id:"v4fiSg"})}),(0,n.jsx)(r.ScreenSub,{children:u.tiktokConnected?(0,n.jsx)(l.Trans,{message:"Step 2 of 2 · we sent a 6-digit code to <0>{0}</0>.",id:"UatgH/",values:{0:u.email},components:{0:(0,n.jsx)("b",{})}}):(0,n.jsx)(l.Trans,{message:"Step 2 of 3 · we sent a 6-digit code to <0>{0}</0>.",id:"blk23T",values:{0:u.email},components:{0:(0,n.jsx)("b",{})}})}),(0,n.jsx)(v,{label:t._({id:"XsU6EU",message:"Email code"}),destination:u.email,value:x,onChange:p,onComplete:F,status:h,attemptsLeft:y,resendIn:b,onResend:I}),"email"!==m.verify&&(0,n.jsx)("p",{style:{margin:0,fontSize:d.tokens.font.size.label,color:a.textSubtle},children:(0,n.jsx)(l.Trans,{message:"Text-message codes are not enabled yet; your email code is enough.",id:"16/Fcp"})}),T&&(0,n.jsx)("p",{style:{margin:0,fontSize:d.tokens.font.size.body,color:a.textMuted},children:T}),"error"===h&&(0,n.jsx)("div",{style:{display:"flex",gap:d.tokens.space[3],padding:`${d.tokens.space[3.5]}px ${d.tokens.space[4]}px`,border:`1px solid ${a.warning}`,background:`${a.warning}29`,borderRadius:d.tokens.radius["2xl"],fontSize:d.tokens.font.size.body,color:a.text},children:(0,n.jsx)(l.Trans,{message:"Codes expire after 1 hour. After 5 wrong tries we lock this code and you'll need a new one.",id:"nsLiVt"})}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:()=>F(x),loading:"verifying"===h,disabled:x.length<6||"locked"===h,children:(0,n.jsx)(l.Trans,{message:"Verify and continue",id:"MRH4iw"})}),(0,n.jsx)("div",{style:{textAlign:"center"},children:(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go(u.tiktokConnected?"complete":"signup"),children:(0,n.jsx)(l.Trans,{message:"Fix my details",id:"SM/dDd"})})})]})}var B=e.i(377219);function F({api:e}){let s=e.props.agencyContext?.tiktokRequired===!0;return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.Steps,{on:3}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Connect your TikTok",id:"HQFmoK"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Step 3 of 3 · this is how goTether knows which LIVE is yours.",id:"Derw2u"})}),(0,n.jsx)(B.TikTokAuth,{mode:"connect",intent:"block",agencyId:e.props.agencyContext?.agencyId,confirmOnConnect:!0,onVerified:()=>{e.finish()},allowDecline:!s,onDecline:()=>{e.finish()}}),(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"Opens TikTok in a new window. We never see your password.",id:"fm3arE"})})]})}var I=e.i(618566);function W({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),{state:a,patch:d}
2=e,[u,m]=(0,s.useState)(!1),[x,p]=(0,s.useState)(null),h=async n=>{if(n.preventDefault(),!u&&a.email.trim()){m(!0),p(null);try{await (0,o.sendResetLink)(a.email,e.props.returnTo),e.go("sent")}catch(e){p(e instanceof o.ShellError&&"rate-limited"===e.code?t._({id:"GFNg7B",message:"Too many requests. Wait a few minutes and try again."}):t._({id:"cpCi5+",message:"Could not send the link. Try again."})),m(!1)}}};return(0,n.jsxs)("form",{onSubmit:h,noValidate:!0,style:{display:"contents"},children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Reset your password",id:"slOprG"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Enter your email and we'll send a reset link.",id:"aeIhyC"})}),x&&(0,n.jsx)(r.FormError,{children:x}),(0,n.jsx)(g.Input,{label:t._({id:"O3oNi5",message:"Email"}),type:"email",name:"email",placeholder:"[email protected]",size:"lg",value:a.email,onChange:e=>d({email:e}),autoFocus:!0}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:u,disabled:!a.email.trim(),children:(0,n.jsx)(l.Trans,{message:"Send reset link",id:"eaUTwS"})}),(0,n.jsx)(c.Button,{variant:"ghost",fullWidth:!0,onClick:()=>e.go("signin"),children:(0,n.jsx)(l.Trans,{message:"Back to sign in",id:"QeXxn3"})})]})}function L({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),[a,c]=(0,s.useState)(!1),u=async()=>{await (0,o.sendResetLink)(e.state.email,e.props.returnTo).catch(()=>{}),c(!0)};return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"ok",label:t._({id:"h69WC6",message:"Sent"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Reset link on its way",id:"TDDfIH"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"If <0>{0}</0> has a goTether account, the email is on its way. The link works for 1 hour.",id:"5eeJ7H",values:{0:e.state.email},components:{0:(0,n.jsx)("b",{})}})}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:d.tokens.space[2.5],flexWrap:"wrap"},children:[(0,n.jsx)(r.Foot,{children:a?(0,n.jsx)(l.Trans,{message:"Sent again.",id:"ytbwWZ"}):(0,n.jsx)(l.Trans,{message:"Nothing yet? <0>Resend</0>",id:"ULMjhQ",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:u})}})}),(0,n.jsx)(r.TextLinkButton,{onClick:()=>e.go("signin"),children:(0,n.jsx)(l.Trans,{message:"Back to sign in",id:"QeXxn3"})})]})]})}function E({api:e}){let{i18n:s,_:t}=(0,l.useLingui)();return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"err",label:s._({id:"M1RnFv",message:"Expired"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"This reset link has expired",id:"5Sxla2"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Reset links work for 1 hour and can only be used once. Request a fresh one.",id:"nsneQ8"})}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:()=>e.go("forgot"),children:(0,n.jsx)(l.Trans,{message:"Request a new link",id:"JEPMXN"})}),(0,n.jsx)(c.Button,{variant:"ghost",fullWidth:!0,onClick:()=>e.go("signin"),children:(0,n.jsx)(l.Trans,{message:"Back to sign in",id:"QeXxn3"})})]})}function M({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),a=(0,I.useSearchParams)(),[d,u]=(0,s.useState)("checking"),[g,x]=(0,s.use
2State)(""),[p,h]=(0,s.useState)(""),[f,k]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1),[b,S]=(0,s.useState)(null);(0,s.useEffect)(()=>{let n=!1;return(0,o.bootstrapRecoverySession)({code:a.get("code"),tokenHash:a.get("token_hash"),type:a.get("type"),error:a.get("error")??a.get("error_code")}).then(s=>{n||("ready"===s?u("ready"):e.go("link-expired"))}),()=>{n=!0}},[]);let T=async n=>{if(n.preventDefault(),!y&&f){j(!0),S(null);try{await (0,o.updatePassword)(g),await e.finish()}catch(e){S(e instanceof Error?e.message:t._({id:"elYplp",message:"Could not update your password."})),j(!1)}}};return(0,n.jsxs)("form",{onSubmit:T,noValidate:!0,style:{display:"contents"},children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Choose a new password",id:"jogQNT"})}),"checking"===d?(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Checking your reset linkâ¦",id:"ebJXao"})}):(0,n.jsxs)(n.Fragment,{children:[b&&(0,n.jsx)(r.FormError,{children:b}),(0,n.jsx)(m.PasswordField,{label:t._({id:"/nT6AE",message:"New password"}),value:g,onChange:x,confirmValue:p,onConfirmChange:h,onValidityChange:k}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:y,disabled:!f,children:(0,n.jsx)(l.Trans,{message:"Update password and sign in",id:"V3NVay"})})]})]})}let N="/auth/login";function A({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),{patch:a}
2=e,d=e.props.setup,m=d?.pending===!0,[x,p]=(0,s.useState)(d?.email??""),[h,f]=(0,s.useState)(d?.firstName??""),[k,y]=(0,s.useState)(d?.lastName??""),[j,b]=(0,s.useState)(d?.phone??""),[T,w]=(0,s.useState)(!!d?.phone),[v,C]=(0,s.useState)(!0),[_,z]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[I,W]=(0,s.useState)(null),L=!d||d.missing.includes("phone"),E=!d||d.missing.includes("names"),M=async n=>{if(n.preventDefault(),!B){if(!_)return void W(t._({id:"W8eOFD",message:"Please accept the Terms to continue."}));if((L||m)&&!T)return void W(t._({id:"7ZTg04",message:"Enter a valid mobile number."}));if(m&&(!x.trim()||!h.trim()||!k.trim()))return void W(t._({id:"OjIeqP",message:"Enter your email and name to continue."}));if(F(!0),W(null),m){try{let n=await (0,o.completeSignup)({email:x,firstName:h,lastName:k,phone:j,smsOptIn:v});a({email:n.email,firstName:h,lastName:k,phone:j,smsOptIn:v,flow:"otp",password:"",tiktokConnected:!0}),e.go("verify")}catch(n){let e=n instanceof o.ShellError?n.code:"unknown";W("exists"===e?"exists":"expired"===e?"expired":n instanceof Error?n.message:t._({id:"WdUpWB",message:"Could not save your details."})),F(!1)}return}try{let n=await (0,o.completeProfile)({firstName:h.trim()||void 0,lastName:k.trim()||void 0,phone:L||j?j:void 0,smsOptIn:v,source:"complete",termsAccepted:!0});if(!n.complete){W(t._({id:"GB3fPH",message:"Still missing: {0}.",values:{0:n.missing.join(", ")}})),F(!1);return}if(await (0,o.hasConnectedTikTok)())return void await e.finish();e.go("tiktok")}catch(e){W(e instanceof Error?e.message:t._({id:"WdUpWB",message:"Could not save your details."})),F(!1)}}};return(0,n.jsxs)("form",{onSubmit:M,noValidate:!0,style:{display:"contents"},children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),m&&(0,n.jsx)(r.Steps,{on:1,total:2}),m&&d?.tiktok&&(0,n.jsx)(r.IdentityRow,{title:d.tiktok.username?`@${d.tiktok.username}`:d.tiktok.displayName??t._({id:"zyUxcw",message:"TikTok"}),sub:t._({id:"BjrEBT",message:"TikTok connected"}),avatarUrl:d.tiktok.avatarUrl}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Finish setting up your account",id:"RMbSS1"})}),(0,n.jsx)(r.ScreenSub,{children:m?(0,n.jsx)(l.Trans,{message:"Your TikTok is in. We still need a goTether account behind it. You can't skip this step.",id:"UIkjzw"}):(0,n.jsx)(l.Trans,{message:"A few details before you continue. You can't skip this step.",id:"lKi08s"})}),"exists"===I?(0,n.jsx)(r.FormError,{children:(0,n.jsx)(l.Trans,{message:"An account with this email already exists. <0>Sign in</0> with it, then connect TikTok in Settings.",id:"ncrzUz",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>window.location.assign(N)})}})}):"expired"===I?(0,n.jsx)(r.FormError,{children:(0,n.jsx)(l.Trans,{message:"Your TikTok sign-in expired. <0>Start again</0>.",id:"BAs4Px",components:{0:(0,n.jsx)(r.TextLinkButton,{onClick:()=>window.location.assign(N)})}})}):I?(0,n.jsx)(r.FormError,{children:I}):null,m?(0,n.jsx)(g.Input,{label:t._({id:"O3oNi5",message:"Email"}),type:"email",name:"email",placeholder:"[email protected]",helper:t._({id:"uCJnMu",message:"We'll send a code here."}),size:"lg",value:x,onChange:p,autoFocus:!0}):d?.email?(0,n.jsx)(g.Input,{label:t._({id:"O3oNi5",message:"Email"}),type:"email",size:"lg",value:d.email,onChange:()=>{},disabled:!0}):null,(0,n.jsxs)(r.TwoUp,{children:[(0,n.jsx)(g.Input,{label:t._({id:"V1EGGU",message:"First name"}),name:"given-name",size:"lg",value:h,onChange:f,autoFocus:E&&!m}),(0,n.jsx)(g.Input,{label:t._({id:"1ZaQUH",message:"Last name"}),name:"family-name",size:"lg",value:k,onChange:y})]}),(0,n.jsx)(S.InternationalPhoneInput,{label:t._({id:"DlMej0",message:"Mobile phone"}),helper:t._({id:"obZeb1",message:"For account alerts and, when enabled, sign-in codes."}),size:"lg",defaultCountry:"US",value:j,onChange:(e,n)=>{b(e),w(n.isValid)}}),(0,n.jsx)(u.Checkbox,{checked:v,onChange:C,label:(0,n.jsx)(r.SmsConsentLabel,{}),size:"sm"}),(0,n.jsx)(u.Checkbox,{checked:_,onChange:z,label:(0,n.jsx)(r.TermsLabel,{}),size:"sm"}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:B,children:m?t._({id:"EpJULX",message:"Send my code"}
2):t._({id:"xGVfLh",message:"Continue"})}),(0,n.jsx)(r.Foot,{children:m?(0,n.jsx)(l.Trans,{message:"No password needed: TikTok is your sign-in. Add one later in Settings. Real name and phone stay private.",id:"6mEiBd"}):(0,n.jsx)(l.Trans,{message:"Real name and phone stay private. Only your display name and @handle are public.",id:"22FJt3"})})]})}let R="gt_sms_consent_dismissed";function U({api:e}){let{i18n:t,_:i}=(0,l.useLingui)(),[a,d]=(0,s.useState)(!0),[g,m]=(0,s.useState)(!1),x=e.state.phoneMasked??t._({id:"izGVnQ",message:"your number"}),p=()=>{"u">typeof document&&(document.cookie=`${R}=1; path=/; samesite=lax`),e.done()},h=async()=>{a?(m(!0),await (0,o.completeProfile)({smsOptIn:!0,source:"signin_consent"}).catch(()=>{}),e.done()):p()};return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"warn",label:t._({id:"YO4da4",message:"One-time"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Text messages from goTether",id:"WWSCHg"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"You're signed in. We don't have your permission to text <0>{phone}</0> yet. Sign-in codes and account alerts go by text.",id:"6uqJO/",values:{phone:x},components:{0:(0,n.jsx)("b",{})}})}),(0,n.jsx)(u.Checkbox,{checked:a,onChange:d,label:(0,n.jsx)(r.SmsConsentLabel,{}),size:"sm"}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:h,loading:g,children:(0,n.jsx)(l.Trans,{message:"Continue",id:"xGVfLh"})}),(0,n.jsx)(c.Button,{variant:"ghost",fullWidth:!0,onClick:p,disabled:g,children:(0,n.jsx)(l.Trans,{message:"Not now",id:"PBxg/E"})})]})}function D({api:e}){let{i18n:s,_:t}=(0,l.useLingui)(),{colors:i}=(0,f.useTheme)(),a=e.state.email,o=e.props.linkedMethods??[{kind:"google",justAdded:!0}];return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"ok",label:s._({id:"jyIicI",message:"Linked"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"We connected this to your existing account",id:"4DCXgM"})}),(0,n.jsx)(r.ScreenSub,{children:a?(0,n.jsx)(l.Trans,{message:"You already had a goTether account for <0>{email}</0>. Google is now a sign-in method on that account. Nothing was duplicated.",id:"EYxB8v",values:{email:a},components:{0:(0,n.jsx)("b",{})}}):(0,n.jsx)(l.Trans,{message:"You already had a goTether account for this email. Google is now a sign-in method on that account. Nothing was duplicated.",id:"Y57Udt"})}),(0,n.jsx)("div",{style:{padding:`0 ${d.tokens.space[3.5]}px`,border:`1px solid ${i.borderSubtle}`,borderRadius:d.tokens.radius["2xl"],background:i.surface2},children:o.map(e=>{let t,a;return(0,n.jsx)("div",{children:(t="password"===e.kind?s._({id:"dso/Gn",message:"Email and password"}):"tiktok"===e.kind?s._({id:"zyUxcw",message:"TikTok"}):"google"===e.kind?s._({id:"eoe8BR",message:"Google"}):s._({id:"XsU6EU",message:"Email code"}),a=e.justAdded?s._({id:"tA/yh8",message:"Added just now"}):s._({id:"uIOBmM",message:"Already on your account"}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:d.tokens.space[3],padding:`${d.tokens.space[3]}px 0`,borderTop:`1px solid ${i.borderSubtle}`},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("b",{style:{display:"block",fontWeight:d.tokens.font.weight.semibold,fontSize:d.tokens.font.size.body,color:i.text},children:t}),(0,n.jsx)("span",{style:{color:i.textMuted,fontSize:d.tokens.font.size.label},children:a})]}),(0,n.jsx)(r.StatePill,{tone:"ok",label:s._({id:"F6pfE9",message:"Active"})})]}))},e.kind)})}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:()=>{e.finish()},children:(0,n.jsx)(l.Trans,{message:"Continue",id:"xGVfLh"})}),(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"Manage sign-in methods any time in Settings ⺠Sign-in & security.",id:"8PXBlR"})})]})}function P({api:e}){let{i18n:s,_:t}=(0,l.useLingui)();return(0,n.jsxs)(n.Fragment,{children:[!e.props.embedded&&(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"warn",label:s._({id:"GxoiaQ",message:"Signed out"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Your session ended",id:"J7yxDv"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"You were signed out because your session timed out. Sign back in to pick up where you left off.",id:"ydl19i"})}),(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,onClick:()=>e.go("signin"),children:(0,n.jsx)(l.Trans,{message:"Sign in",id:"5lWFkC"})}),(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"We'll take you back to the page you were on.",id:"CiXt6Z"})})]})}function O({api:e}){let{i18n:i,_:a}=(0,l.useLingui)(),u=(0,I.useSearchParams)(),{state:x,patch:p,props:f}
2=e,[k,y]=(0,s.useState)(""),[j,b]=(0,s.useState)(!1),[S,T]=(0,s.useState)(null),[w,v]=(0,s.useState)(null),C=f.extensionId??null,_=(0,s.useRef)(!1),z=(0,s.useCallback)(async n=>{if(C){if("agencyName"in n){(0,o.notifyExtensionAccessDenied)(C,n.agencyName),p({extensionAgencyName:n.agencyName}),e.go("extension-noaccess");return}await (0,o.sendTokensToExtension)(C,n.tokens);try{window.sessionStorage.removeItem("gotether_extension_id")}catch{}e.go("extension-done")}},[C,p,e]),B=(0,s.useCallback)(e=>{let n=e instanceof o.ShellError?e.code:"unknown";T("invalid-credentials"===n?i._({id:"y1oEoC",message:"Wrong email or password."}):"unconfirmed"===n?i._({id:"xLoXKC",message:"Confirm your email before signing in."}):"rate-limited"===n?i._({id:"QMElCD",message:"Too many attempts. Wait a minute and try again."}):e instanceof Error?e.message:i._({id:"kf83Ld",message:"Something went wrong."})),b(!1)},[a]),F=(0,s.useCallback)(async()=>{if(!C)return void T(i._({id:"fFpfi8",message:"Missing extension ID. Open this page from the goTether extension."}));b(!0),T(null);try{let e=await (0,o.extensionSessionFromCookie)();await z(e.allowed?{tokens:e.tokens}:{agencyName:e.agencyName})}catch(e){B(e)}},[C,z,B,a]);(0,s.useEffect)(()=>{let e=!1;return(0,t.createClient)().auth.getUser().then(({data:n})=>{!e&&n.user&&(v(n.user.email??""),"1"!==u.get("handoff")||_.current||(_.current=!0,F()))}),()=>{e=!0}},[u,F]);let W=async e=>{if(e.preventDefault(),!j){if(!C)return void T(i._({id:"fFpfi8",message:"Missing extension ID. Open this page from the goTether extension."}));b(!0),T(null);try{let e=await (0,o.extensionSignIn)(x.email,k),n=await (0,o.checkExtensionAccess)(e.accessToken);await z(n.allowed?{tokens:e}:{agencyName:n.agencyName})}catch(e){B(e)}}},L=async()=>{await (0,t.createClient)().auth.signOut({scope:"local"}).catch(()=>{}),v(null),b(!1)},E=C?`/auth/extension-login?extension_id=${encodeURIComponent(C)}&handoff=1`:"/auth/extension-login?handoff=1";return(0,n.jsxs)("form",{onSubmit:W,noValidate:!0,style:{display:"contents"},children:[(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"wait",label:i._({id:"HcnjLO",message:"Chrome extension"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Connect the goTether extension",id:"gLAU1h"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"Sign in once here. The extension receives a session and this tab closes itself.",id:"3kmAfl"})}),S&&(0,n.jsx)(r.FormError,{children:S}),null!==w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"primary",size:"lg",fullWidth:!0,loading:j,onClick:()=>{F()},children:w?i._({id:"joEvi1",message:"Connect as {signedInEmail}",values:{signedInEmail:w}}):i._({id:"jR1HbT",message:"Connect this account"})}),(0,n.jsx)("div",{style:{textAlign:"center"},children:(0,n.jsx)(r.TextLinkButton,{onClick:()=>{L()},disabled:j,children:(0,n.jsx)(l.Trans,{message:"Use a different account",id:"k0q8WV"})})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.Input,{label:i._({id:"O3oNi5",message:"Email"}),type:"email",name:"email",placeholder:"[email protected]",size:"lg",value:x.email,onChange:e=>p({email:e}),autoFocus:!0}),(0,n.jsx)(m.PasswordField,{autoComplete:"current-password",value:k,onChange:y}),(0,n.jsx)(c.Button,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,loading:j,disabled:!x.email||!k,children:(0,n.jsx)(l.Trans,{message:"Sign in and connect",id:"Rjluk5"})}),(0,n.jsx)(r.Divider,{children:(0,n.jsx)(l.Trans,{message:"or sign in with",id:"gbUcih"})}),(0,n.jsxs)("div",{style:{display:"grid",gap:d.tokens.space[2.5]},children:[f.providers.includes("tiktok")&&(0,n.jsx)(r.SocialButton,{provider:"tiktok",size:"lg",onClick:()=>{(0,h.rememberKeepSignedIn)(!0),window.location.assign((0,o.tiktokBeginUrl)(E))}}),f.providers.includes("google")&&(0,n.jsx)(r.SocialButton,{provider:"google",size:"lg",onClick:()=>{(0,h.rememberKeepSignedIn)(!0),(0,o.signInWithGoogle)(E).catch(()=>T(i._({id:"LBMxYE",message:"Could not start Google sign-in. Try again."})))}})]})]}),(0,n.jsx)(r.Foot,{children:(0,n.jsx)(l.Trans,{message:"Only works in Chrome with the goTether extension installed.",id:"RU6bv1"})})]})}function $({api:e}){let{i18n:s,_:t}=(0,l.useLingui)(),i=e.state.extensionAgencyName;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.BrandMark,{}),(0,n.jsx)(r.StatePill,{tone:"warn",label:s._({id:"oPoLg+",message:"No access"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"You don't have access to the agency extension",id:"0U2nkT"})}),(0,n.jsx)(r.ScreenSub,{children:i?(0,n.jsx)(l.Trans,{message:"Your account is fine. The extension is an agency feature and <0>{agency}</0> has not enabled it. Reach out to your agency.",id:"lyhaIg",values:{agency:i},components:{0:(0,n.jsx)("b",{})}}):(0,n.jsx)(l.Trans,{message:"Your account is fine. The extension is an agency feature. Reach out to your agency to get it enabled.",id:"3oCTOU"})}),(0,n.jsx)(c.Button,{variant:"ghost",fullWidth:!0,onClick:()=>e.go("extension"),children:(0,n.jsx)(l.Trans,{message:"Try another account",id:"3qQjh4"})})]})}function G(){let{i18n:e,_:s}=(0,l.useLingui)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.BrandMark,{}
2),(0,n.jsx)(r.StatePill,{tone:"ok",label:e._({id:"QHcLEN",message:"Connected"})}),(0,n.jsx)(r.ScreenTitle,{children:(0,n.jsx)(l.Trans,{message:"Extension connected",id:"qNuZlr"})}),(0,n.jsx)(r.ScreenSub,{children:(0,n.jsx)(l.Trans,{message:"You can close this tab. The goTether extension is signed in.",id:"qD+pkH"})})]})}let H={signin:"signin",signup:"signup",verify:"verify",forgot:"forgot",update:"update",setup:"complete",expired:"expired",extension:"extension",linked:"linked",consent:"sms-consent"};function V(e){let{mode:l="signin",embedded:d=!1,returnTo:c,agencyContext:u=null,verify:g="email",providers:m=["tiktok","google"],returning:x=null,setup:p=null,email:h="",extensionId:f=null,onComplete:k,chrome:y="card",loginError:j=null,signedOut:S=!1,linkedMethods:w,phoneMasked:v=null}=e,[C,B]=(0,s.useState)(H[l]),[I,N]=(0,s.useState)({email:x?.email??h,password:"",firstName:"",lastName:"",phone:"",smsOptIn:!0,flow:"verify"===l?"signup":null,phoneMasked:v,userId:null,tiktokConnected:p?.pending===!0&&!!p.tiktok,extensionAgencyName:null,linkedProvider:"linked"===l?"google":null}),V=(0,s.useCallback)(e=>N(n=>({...n,...e})),[]),Y=(0,s.useMemo)(()=>(0,i.validateRedirectUrl)(c,"/home"),[c]),Q=(0,s.useCallback)(()=>{k?k({userId:I.userId??""}):window.location.assign(Y)},[k,Y,I.userId]),X=(0,s.useCallback)(async()=>{let e=I.userId;if(!e){let{data:n}=await (0,t.createClient)().auth.getUser();(e=n.user?.id??null)&&V({userId:e})}await (0,o.stampLastAccount)();let n=await (0,o.getSessionState)();if(await (0,_.signUpDelivered)(),n&&!n.complete){let e=new URL(a.SETUP_PATH,window.location.origin);"/home"!==Y&&e.searchParams.set("redirect",Y),window.location.assign(e.toString());return}if(n&&!n.smsOptIn&&!(!("u"<typeof document)&&document.cookie.split("; ").includes(`${R}=1`))){V({phoneMasked:n.phoneMasked}),B("sms-consent");return}Q()},[I.userId,V,Y,Q]),K=(0,s.useMemo)(()=>({screen:C,go:B,state:I,patch:V,finish:X,done:Q,props:{embedded:d,verify:g,providers:m,returnTo:c,agencyContext:u,returning:x,setup:p,extensionId:f,loginError:j,signedOut:S,linkedMethods:w}}),[C,I,V,X,Q,d,g,m,c,u,x,p,f,j,S,w]),q=(()=>{switch(C){case"signin":return(0,n.jsx)(b,{api:K});case"signup":return(0,n.jsx)(T,{api:K});case"verify":return(0,n.jsx)(z,{api:K});case"tiktok":return(0,n.jsx)(F,{api:K});case"forgot":return(0,n.jsx)(W,{api:K});case"sent":return(0,n.jsx)(L,{api:K});case"update":return(0,n.jsx)(M,{api:K});case"link-expired":return(0,n.jsx)(E,{api:K});case"complete":return(0,n.jsx)(A,{api:K});case"sms-consent":return(0,n.jsx)(U,{api:K});case"expired":return(0,n.jsx)(P,{api:K});case"extension":return(0,n.jsx)(O,{api:K});case"extension-done":return(0,n.jsx)(G,{});case"extension-noaccess":return(0,n.jsx)($,{api:K});case"linked":return(0,n.jsx)(D,{api:K})}})();return"bare"===y?(0,n.jsx)(n.Fragment,{children:q}):(0,n.jsx)(r.AuthCardFrame,{embedded:d,width:d?340:void 0,children:q})}e.s(["AuthShell",0,V,"default",0,V],37313)},95827,e=>{"use strict";var n=e.i(843476),s=e.i(99538),t=e.i(522016),i=e.i(360415),a=e.i(447),o=e.i(724709),r=e.i(826887),l=e.i(420824);e.i(443707);var d=e.i(149721),c=e.i(775845),u=e.i(921730);e.s(["AUTH_CARD_MAX_WIDTH",0,440,"AUTH_FORM_MAX_WIDTH",0,420,"AuthCardFrame",0,function({children:e,embedded:s=!1,width:t=440}){let{colors:i}=(0,a.useTheme)();return(0,n.jsx)("div",{style:{width:"100%",maxWidth:t,background:i.surface1,border:`1px solid ${i.borderSubtle}`,borderRadius:o.tokens.radius["2xl"],boxShadow:s?"none":`0 18px 48px ${i.bg}55`,padding:s?o.tokens.space[4.5]:`${o.tokens.space[7]}px ${o.tokens.space[7]}px ${o.tokens.space[6]}px`,display:"flex",flexDirection:"column",gap:o.tokens.space[3.5]},children:e})},"AuthCardPage",0,function({children:e}){let{colors:s}=(0,a.useTheme)();return(0,n.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",padding:`${o.tokens.space[12]}px ${o.tokens.space[4]}px`,background:s.bg,backgroundImage:`radial-gradient(${s.text}14 1px, transparent 1.6px)`,backgroundSize:"26px 26px"},children:e})},"BrandMark",0,function(){let{theme:e}=(0,a.useTheme)();return(0,n.jsx)("div",{className:"gt-auth-brandmark",style:{display:"flex",alignItems:"center"},children:(0,n.jsx)("img",{src:"dark"===e?s.PLATFORM_LOGOS.horizontal.dark:s.PLATFORM_LOGOS.horizontal.light,alt:"goTether",style:{height:32,width:"auto",objectFit:"contain",display:"block"}})})},"Divider",0,function({children:e}){let{colors:s}=(0,a.useTheme)(),t={flex:1,height:1,background:s.borderSubtle};return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:o.tokens.space[2.5],color:s.textSubtle,fontSize:o.tokens.font.size.label},children:[(0,n.jsx)("span",{style:t}),e??(0,n.jsx)(i.Trans,{message:"or",id:"BzEFor"}),(0,n.jsx)("span",{style:t})]})},"Foot",0,function({children:e}){let{colors:s}=(0,a.useTheme)();return(0,n.jsx)("p",{style:{margin:0,textAlign:"center",color:s.textMuted,fontSize:o.tokens.font.size.body,lineHeight:o.tokens.font.lineHeight.relaxed},children:e})},"FormError",0,function({children:e}){let{colors:s}=(0,a.useTheme)();return(0,n.jsx)("div",{role:"alert",style:{fontSize:o.tokens.font.size.body,lineHeight:o.tokens.font.lineHeight.relaxed,color:s.errorText,background:`${s.error}1A`,border:`1px solid ${s.error}59`,borderRadius:o.tokens.radius.md,padding:`${o.tokens.space[2.5]}px ${o.tokens.space[3]}px`},children:e})}
2,"IdentityRow",0,function({title:e,sub:s,avatarUrl:t,gradient:i}){let{colors:r}=(0,a.useTheme)();return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:o.tokens.space[3]},children:[t?(0,n.jsx)("img",{src:t,alt:"",width:44,height:44,style:{borderRadius:o.tokens.radius.pill,flex:"0 0 auto"}}):(0,n.jsx)("span",{"aria-hidden":!0,style:{width:44,height:44,borderRadius:o.tokens.radius.pill,background:i??`linear-gradient(135deg, ${r.tiktokBlue}, ${r.tiktokRed})`,flex:"0 0 auto"}}),(0,n.jsxs)("div",{style:{minWidth:0},children:[(0,n.jsx)("b",{style:{display:"block",fontFamily:o.tokens.font.family.display,fontWeight:o.tokens.font.weight.semibold,color:r.text},children:e}),(0,n.jsx)("span",{style:{color:r.textMuted,fontSize:o.tokens.font.size.body},children:s})]})]})},"LegalLine",0,function({withCopyright:e=!1}){let{colors:s}=(0,a.useTheme)(),r={color:s.textSubtle,textDecoration:"underline",textUnderlineOffset:2};return(0,n.jsxs)("p",{style:{margin:`${o.tokens.space[6]}px 0 0`,textAlign:"center",fontSize:o.tokens.font.size.label,color:s.textSubtle},children:[(0,n.jsx)(i.Trans,{message:"By continuing you agree to the <0>Terms</0> and <1>Privacy Policy</1>.",id:"5JSnoF",components:{0:(0,n.jsx)(t.default,{href:"/terms",style:r}),1:(0,n.jsx)(t.default,{href:"/privacy",style:r})}}),e&&(0,n.jsx)("span",{style:{display:"block",marginTop:o.tokens.space[1.5]},children:"© 2026 goTether"})]})},"ScreenSub",0,function({children:e}){let{colors:s}=(0,a.useTheme)();return(0,n.jsx)("p",{style:{margin:`-${o.tokens.space[2]}px 0 0`,fontSize:o.tokens.font.size.lede,lineHeight:o.tokens.font.lineHeight.relaxed,color:s.textMuted},children:e})},"ScreenTitle",0,function({children:e}){let{colors:s}=(0,a.useTheme)();return(0,n.jsx)("h1",{style:{margin:0,fontFamily:o.tokens.font.family.display,fontSize:23,fontWeight:o.tokens.font.weight.semibold,lineHeight:o.tokens.font.lineHeight.tight,letterSpacing:o.tokens.font.letterSpacing.tight,color:s.text,textWrap:"balance"},children:e})},"SmsConsentLabel",0,function(){return(0,n.jsx)(i.Trans,{message:"I agree to receive text messages from goTether at this number, including sign-in codes and account alerts. Message and data rates may apply. Reply STOP to opt out.",id:"GmKU8w"})},"SocialButton",0,function({provider:e,verb:s="signin",size:t="lg",onClick:l,disabled:g}){let{colors:m}=(0,a.useTheme)(),{i18n:x,_:p}=(0,i.useLingui)(),h="tiktok"===e?"TikTok":"Google",f="signup"===s?x._({id:"jbgBgN",message:"Sign up with {name}",values:{name:h}}):"continue"===s?x._({id:"/zxqXE",message:"Continue with {name}",values:{name:h}}):x._({id:"mkNBD/",message:"Sign in with {name}",values:{name:h}});return"google"===e?(0,n.jsxs)(r.Button,{variant:"surface",size:t,fullWidth:!0,onClick:l,disabled:g,children:[(0,n.jsx)("span",{"aria-hidden":!0,style:{width:22,height:22,borderRadius:o.tokens.radius.sm,background:o.tokens.color.ink.onAccent,border:`1px solid ${m.border}`,display:"grid",placeItems:"center",color:o.tokens.color.accent.nebula,marginRight:o.tokens.space[2]},children:(0,n.jsx)(d.FontAwesomeIcon,{icon:u.faGoogle,style:{fontSize:12}})}),f]}):(0,n.jsxs)("button",{type:"button",onClick:l,disabled:g,style:{height:"sm"===t?36:46,width:"100%",borderRadius:o.tokens.radius.md,border:`1px solid ${o.tokens.color.surface.void.dark}`,background:o.tokens.color.surface.void.dark,color:o.tokens.color.ink.onAccent,fontFamily:o.tokens.font.family.body,fontSize:"sm"===t?o.tokens.font.size.body:15,fontWeight:o.tokens.font.weight.semibold,cursor:g?"not-allowed":"pointer",opacity:g?.6:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:o.tokens.space[2.5],boxShadow:`-2px 0 0 0 ${m.tiktokBlue} inset, 2px 0 0 0 ${m.tiktokRed} inset`},children:[(0,n.jsx)(d.FontAwesomeIcon,{icon:c.faTiktok,style:{fontSize:14}}),f]})},"StatePill",0,function({tone:e,label:s,pulse:t}){return(0,n.jsx)("div",{style:{alignSelf:"flex-start"},children:(0,n.jsx)(l.StatusBadge,{label:s,variant:"ok"===e?"success":"warn"===e?"warning":"err"===e?"error":"info",pulse:t})})},"Steps",0,function({on:e,total:s=3}){let{colors:t}=(0,a.useTheme)(),{i18n:r,_:l}=(0,i.useLingui)();return(0,n.jsx)("div",{style:{display:"flex",gap:o.tokens.space[1.5]},role:"img","aria-label":r._({id:"FOLtnD",message:"Step {on} of {total}",values:{on:e,total:s}}),children:Array.from({length:s},(s,i)=>(0,n.jsx)("span",{style:{flex:1,height:3,borderRadius:2,background:i<e?t.primary:t.borderSubtle}},i))})},"TermsLabel",0,function(){let{colors:e}=(0,a.useTheme)(),s={color:e.primary,textDecoration:"underline",textUnderlineOffset:2};return(0,n.jsx)(i.Trans,{message:"I agree to the <0>Terms</0> and <1>Privacy Policy</1>.",id:"eqwmVH",components:{0:(0,n.jsx)(t.default,{href:"/terms",style:s}),1:(0,n.jsx)(t.default,{href:"/privacy",style:s})}})},"TextLinkButton",0,function({children:e,onClick:s,disabled:t}){let{colors:i}=(0,a.useTheme)();return(0,n.jsx)("button",{type:"button",onClick:s,disabled:t,style:{background:"none",border:0,padding:0,cursor:t?"default":"pointer",color:i.primary,opacity:t?.6:1,fontFamily:o.tokens.font.family.body,fontSize:o.tokens.font.size.body,fontWeight:o.tokens.font.weight.medium},children:e})},"TwoUp",0,function({children:e}){return(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:o.tokens.space[3]},children:e})}])}]); 3 4//# debugId=1f96dccf-380e-2280-cb64-c7d7e5ef4cd3
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.