PageSourceSearch

https://www.lineupwiz.com/_next/static/chunks/8821-e4b0c216c7b21acc.js?dpl=dpl_8ejvNMa2gghfbzMMf1SetQ6opQ6S

js lineupwiz.com collected 2026-10-09 22:54:00 UTC 17,805 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8821],{29471:(e,r,t)=>{t.d(r,{y:()=>j});var a=t(95155),s=t(88661),o=t.n(s),n=t(12115),i=t(20063),l=t(68087),c=t(54849),d=t(65229),u=t(5917),m=t(70532),p=t(57828),x=t(12764),v=t(45089),g=t(83064),f=t(84441),y=t(28942),h=t(29231),b=t(40581);let j=e=>{var r,t;let{isOpen:s,onClose:j,position:w="below",buttonRef:C,onEmailChecked:k,customTitle:S,titleIcon:N,initialEmail:F,initialPassword:T}=e,E=(0,i.useRouter)(),{context:z}=(0,l.X)(),{signInWithOAuth:I,signIn:W,signUp:_}=(0,c.As)(),R=(0,f.d)(),[P,M]=(0,n.useState)("email"),[L,B]=(0,n.useState)(null!=(r=null==F?void 0:F.trim())?r:""),[D,A]=(0,n.useState)(""),[H,U]=(0,n.useState)(""),[V,Y]=(0,n.useState)(!1),[O,q]=(0,n.useState)(!1),Q=(0,h.L)(),$=(null!=(t=null==Q?void 0:Q.leagues.length)?t:0)>0,[G,J]=(0,n.useState)(()=>(0,y.h)($)),[X,K]=(0,n.useState)([]),[Z,ee]=(0,n.useState)(()=>(0,b.Q)($)),[er,et]=(0,n.useState)(null),[ea,es]=(0,n.useState)(""),[eo,en]=(0,n.useState)(!1),ei=(0,n.useRef)(null),el=(0,n.useRef)(null),ec=(0,n.useRef)(null),ed=(0,n.useRef)(null),eu=(0,n.useRef)(!1),[em,ep]=(0,n.useState)((0,x.u)()),[ex,ev]=(0,n.use
1State)(!1),eg=(0,n.useCallback)(()=>{if(!(null==C?void 0:C.current))return{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:99999,maxWidth:"calc(100vw - 32px)"};let e=C.current.getBoundingClientRect(),r=Math.max(12,Math.min(e.left+e.width/2-180,window.innerWidth-360-12));if("right"===w){let r=e.right+12,t=r+360<window.innerWidth-12,a=e.top+e.height/2-250;return(a=Math.max(12,Math.min(a,window.innerHeight-500-12)),t)?{position:"fixed",left:"".concat(r,"px"),top:"".concat(a,"px"),zIndex:1e4,maxWidth:"calc(100vw - 16px)"}:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:99999,maxWidth:"calc(100vw - 32px)"}}let t={position:"fixed",left:"".concat(r,"px"),zIndex:1e4,maxWidth:"calc(100vw - 16px)"};if("above"===w){let r=e.top-12;if(r>12)return{...t,top:"".concat(r,"px"),transform:"translateY(-100%)"}}return{...t,top:"".concat(e.bottom+12,"px")}},[C,w]);(0,n.useEffect)(()=>{if(!s)return void ev(!1);let e=()=>{ep(eg()),ev(!0)};if(e(),null==C?void 0:C.current)return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[s,eg,C]),(0,n.useEffect)(()=>{if(s){eu.current=!0,"email"===P&&ei.current?setTimeout(()=>{ei.current&&ei.current.focus()},100):"password"===P&&ec.current&&setTimeout(()=>{ec.current&&ec.current.focus()},100);let e=setTimeout(()=>{eu.current=!1},200);return()=>clearTimeout(e)}},[s,P]),(0,n.useEffect)(()=>{s||(M("email"),B(""),A(""),U(""),Y(!1),q(!1),J((0,y.h)($)),ee((0,b.Q)($)),et(null),es(""),en(!1))},[s]),(0,n.useEffect)(()=>{if(!s)return;let e=e=>{eu.current||ed.current&&!ed.current.contains(e.target)&&j()},r=setTimeout(()=>{document.addEventListener("mousedown",e)},100);return()=>{clearTimeout(r),document.removeEventListener("mousedown",e)}},[s,j]),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&j()};return s&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,j]);let ef=(0,n.useCallback)(async e=>{es(""),en(!0);try{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)){es("Please enter a valid email address"),en(!1);return}let r=await fetch("/api/auth/check-email?email=".concat(encodeURIComponent(e)));if(!r.ok){es("Failed to verify email. Please try again."),en(!1);return}let{exists:t}=await r.json();(0,g.dg)(t,"email_first_modal").catch(()=>{}),k&&k(e,t),et(t),M("password"),en(!1)}catch(e){console.error("Email check error:",e),es("Something went wrong. Please try again."),en(!1)}},[k]),ey=async e=>{e.preventDefault(),await ef(L)},eh=(0,n.useRef)(!1),[eb,ej]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!s){eh.current=!1,ej(!1);return}if(eh.current)return;let e=null==F?void 0:F.trim();e&&(eh.current=!0,T&&U(T),ej(!0),ef(e).finally(()=>ej(!1)))},[s,F,T,ef]);let ew=async e=>{e.preventDefault(),es(""),en(!0);try{let e=await W(L,H);if(e.error){es(e.error.message),en(!1);return}j("email_submit")}catch(e){console.error("[EmailFirstModal] Login error:",e),es("Failed to sign in. Please check your password and try again."),en(!1)}},eC=async e=>{if(e.preventDefault(),es(""),(0,g.v$)({formType:"email_first_modal",entryPoint:null==z?void 0:z.purpose}).catch(()=>{}),!O)return void es("Please accept the terms and privacy policy");en(!0);try{let e=D.trim()||L.split("@")[0],t=await _(L,H,e,{firstName:"",lastName:"",addressLine1:"",city:"",state:"",postalCode:"",country:"US"},{newsletterLists:G,newsletterLeagueIds:G.includes("league")?X:[],newsletterSource:"email_first_modal",platforms:Z});if(t.error){es(t.error.message),en(!1);return}if(t.needsEmailConfirmation){var r;j("email_submit");let a=encodeURIComponent(JSON.stringify({email:L,username:e,userId:null==(r=t.userData)?void 0:r.userId}));E.push("/verify-email?email=".concat(encodeURIComponent(L),"&userData=").concat(a))}else j("email_submit"),E.push(R)}catch(e){console.error("[EmailFirstModal] Signup error:",e),es("We encountered an issue creating your account. Please try again."),en(!1)}},ek=async e=>{es(""),en(!0),(0,g.Si)(e).catch(()=>{});try{await I(e,!0),j("oauth_redirect")}catch(r){es("We couldn't connect to ".concat(e,". You can try again or use email instead.")),en(!1)}};if(!s)return null;let eS=!1===er;return(0,a.jsxs)("div",{ref:ed,onClick:e=>e.nativeEvent.stopImmediatePropagation(),onMouseDown:e=>e.nativeEvent.stopImmediatePropagation(),style:{...em,width:"360px",maxWidth:"calc(100vw - 2rem)",background:"#FFFFFF",borderRadius:"var(--radius-xl)",border:"1px solid rgba(0, 155, 90, 0.2)",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",opacity:ex&&!eb?1:0,transition:ex&&!eb?"opacity 0.15s ease-out":"none",overflow:"hidden"},className:"jsx-8987ce50043e664d",children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--space-4) var(--space-4) var(--space-3)",borderBottom:"1px solid rgba(0, 155, 90, 0.1)",background:"linear-gradient(135deg, rgba(0, 155, 90, 0.05) 0%, rgba(0, 155, 90, 0.02) 100%)"},className:"jsx-8987ce50043e664d",children:[(0,a.jsxs)("h3",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"var(--text-lg)",fontWeight:"var(--font-semibold)",color:"var(--primary)",margin:0,fontFamily:"var(--font-poppins, Poppins), Arial, Helvetica, sans-serif"},className:"jsx-8987ce50043e664d",children:["email"===P?S||(null==z?void 0:z.customTitle)||"Welc
1ome to Lineup Wiz":eS?"Create your account":"Welcome back!",(N||(null==z?void 0:z.titleIcon))&&"email"===P&&(0,a.jsx)("img",{src:N||(null==z?void 0:z.titleIcon),alt:"",style:{width:"24px",height:"24px"},className:"jsx-8987ce50043e664d"})]}),(0,a.jsx)("button",{onClick:()=>j(),"aria-label":"Close modal",style:{background:"transparent",border:"none",color:"var(--text-secondary)",cursor:"pointer",padding:"var(--space-1)",borderRadius:"var(--radius-md)",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(0, 155, 90, 0.1)",e.currentTarget.style.color="var(--primary)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="var(--text-secondary)"},className:"jsx-8987ce50043e664d",children:(0,a.jsx)(d.A,{size:18})})]}),(0,a.jsxs)("div",{style:{padding:"var(--space-3) var(--space-4) var(--space-4)",color:"var(--text-primary)"},className:"jsx-8987ce50043e664d",children:["email"===P&&(0,a.jsx)("p",{style:{fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",color:"var(--text-primary)",marginTop:0,marginBottom:"var(--space-4)",lineHeight:"1.5"},className:"jsx-8987ce50043e664d",children:"Enter your email to continue. We'll check if you have an account, or create one if you don't."}),"password"===P&&(0,a.jsx)("p",{style:{fontSize:"var(--text-base)",fontWeight:"var(--font-medium)",color:"var(--primary)",marginTop:0,marginBottom:"var(--space-4)",lineHeight:"1.5"},className:"jsx-8987ce50043e664d",children:eS?"Add a password to finish creating your account!":"Enter your password to login."}),(0,a.jsxs)("form",{onSubmit:"email"===P?ey:!0===er?ew:eC,style:{display:"flex",flexDirection:"column",gap:"var(--space-2)"},className:"jsx-8987ce50043e664d",children:["email"===P?(0,a.jsx)(v.nE,{ref:ei,id:"email-first-input",type:"email",label:"Email",value:L,onChange:e=>B(e.target.value),onBlur:e=>{e.target.value.trim()&&(0,g.Vu)("email",{value:e.target.value.trim(),formType:"email_first_modal"}).catch(()=>{})},placeholder:"Enter your email address",required:!0,autoComplete:"email",variant:"light"}):(0,a.jsxs)("div",{className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("label",{style:{display:"block",fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",color:"var(--text-primary)",marginBottom:"var(--space-2)"},className:"jsx-8987ce50043e664d",children:"Email"}),(0,a.jsxs)("div",{style:{position:"relative"},className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("input",{type:"email",value:L,readOnly:!0,style:{width:"100%",padding:"var(--space-3)",paddingRight:"2.5rem",background:"rgba(0, 155, 90, 0.05)",border:"1px solid rgba(0, 155, 90, 0.2)",borderRadius:"var(--radius-md)",color:"var(--text-primary)",fontSize:"var(--text-sm)",cursor:"default",boxSizing:"border-box"},className:"jsx-8987ce50043e664d"}),(0,a.jsx)(u.A,{size:16,style:{position:"absolute",right:"var(--space-3)",top:"50%",transform:"translateY(-50%)",color:"var(--primary)"}})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{M("email"),U(""),q(!1),et(null),es("")},style:{marginTop:"var(--space-1)",fontSize:"var(--text-xs)",color:"var(--primary)",background:"none",border:"none",padding:0,cursor:"pointer",textDecoration:"underline"},className:"jsx-8987ce50043e664d",children:"Change email"})]}),"password"===P&&(0,a.jsxs)("div",{className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("label",{style:{display:"block",fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",color:"var(--text-primary)",marginBottom:"var(--space-2)"},className:"jsx-8987ce50043e664d",children:"Password"}),(0,a.jsxs)("div",{style:{position:"relative"},className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("input",{ref:ec,type:V?"text":"password",value:H,onChange:e=>U(e.target.value),placeholder:eS?"Create a password":"Enter your password",required:!0,autoComplete:eS?"new-password":"current-password",style:{width:"100%",padding:"var(--space-3)",paddingRight:"2.5rem",background:"#FFFFFF",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",color:"var(--text-primary)",fontSize:"var(--text-sm)",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:e=>{e.currentTarget.style.borderColor="var(--primary)",e.currentTarget.style.boxShadow="0 0 0 3px rgba(0, 155, 90, 0.1)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--border)",e.currentTarget.style.boxShadow="none",e.target.value.trim()&&(0,g.Vu)("password",{formType:"email_first_modal"}).catch(()=>{})},className:"jsx-8987ce50043e664d"}),(0,a.jsx)("button",{type:"button",onClick:()=>Y(!V),style:{position:"absolute",right:"var(--space-3)",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"var(--text-secondary)",cursor:"pointer",padding:"0.25rem",display:"flex",alignItems:"center",justifyContent:"center"},className:"jsx-8987ce50043e664d",children:V?(0,a.jsx)(m.A,{size:16}):(0,a.jsx)(p.A,{size:16})})]})]}),"password"===P&&eS&&(0,a.jsxs)("div",{className:"jsx-8987ce50043e664d",children:[(0,a.jsxs)("label",{style:{display:"block",fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",color:"var(--text-primary)",marginBottom:"var(--space-2)"},className:"jsx-8987ce50043e664d",children:["Name"," ",(0,a.jsx)("span",{style:{color:"var(--text-secondary)",fontWeight:"normal"},className:"jsx-8987ce50043e664d",children:"(optional)"})]}),(0,a.jsx)("input",{ref:el,type:"text",value:D,onChange:e=>A(e.target.value),placeholder:"Enter your name",autoComplete:"name",style:{width:"100%",padding:"var(--space-3)",background:"#FFFFFF",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",color:"var(--text-primary)",fontSize:"var(--text-sm)",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:e=>{e.currentTarget.style.borderColor="var(--primary)",e.currentTarget.style.boxShadow="0 0 0 3px rgba(0, 155, 90, 0.1)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--border)",e.currentTarget.style.boxShadow="none",e.target.value.trim()&&(0,g.Vu)("name",{value:e.target.value.trim(),formType:"email_first_modal"}).catch(()=>{})},className:"jsx-8987ce50043e664d"})]}),"password"===P&&eS&&(0,a.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",ga
1p:"var(--space-2)",cursor:"pointer",fontSize:"var(--text-sm)"},className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("input",{type:"checkbox",checked:O,onChange:e=>{let r=e.target.checked;q(r),r&&(0,g.IM)({formType:"email_first_modal",entryPoint:null==z?void 0:z.purpose}).catch(()=>{})},style:{width:"1rem",height:"1rem",marginTop:"0.125rem",accentColor:"var(--primary)",cursor:"pointer"},className:"jsx-8987ce50043e664d"}),(0,a.jsxs)("span",{style:{color:"var(--text-secondary)",lineHeight:1.4},className:"jsx-8987ce50043e664d",children:["I accept the"," ",(0,a.jsx)("a",{href:"/legal/terms",target:"_blank",style:{color:"var(--primary)",textDecoration:"underline"},className:"jsx-8987ce50043e664d",children:"Terms of Service"})," ","and"," ",(0,a.jsx)("a",{href:"/legal/privacy",target:"_blank",style:{color:"var(--primary)",textDecoration:"underline"},className:"jsx-8987ce50043e664d",children:"Privacy Policy"})]})]}),"password"===P&&eS&&(0,a.jsx)(b.e,{id:"email-first-platforms",value:Z,onChange:ee}),"password"===P&&eS&&(0,a.jsx)(y.N,{id:"email-first-newsletter",value:G,onChange:J,onLeagueIds:K}),ea&&(0,a.jsx)("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"#DC2626",padding:"var(--space-3)",borderRadius:"var(--radius-md)",fontSize:"var(--text-sm)"},className:"jsx-8987ce50043e664d",children:ea}),(0,a.jsx)("button",{type:"submit",disabled:eo,style:{width:"100%",maxWidth:"100%",padding:"var(--space-3)",background:eo?"rgba(0, 155, 90, 0.5)":"var(--primary)",color:"#FFFFFF",border:"none",borderRadius:"var(--radius-md)",fontSize:"var(--text-sm)",fontWeight:"var(--font-semibold)",cursor:eo?"not-allowed":"pointer",transition:"all 0.2s ease",marginTop:"var(--space-1)",boxSizing:"border-box"},onMouseEnter:e=>{eo||(e.currentTarget.style.background="#00C853")},onMouseLeave:e=>{eo||(e.currentTarget.style.background="var(--primary)")},className:"jsx-8987ce50043e664d",children:eo?"email"===P?"Checking...":eS?"Creating account...":"Signing in...":"email"===P?"Continue":eS?"Create Account":"Sign In"}),"email"===P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-3)",margin:"var(--space-3) 0",color:"var(--text-secondary)",fontSize:"var(--text-xs)",fontWeight:"var(--font-medium)"},className:"jsx-8987ce50043e664d",children:[(0,a.jsx)("div",{style:{flex:1,height:"1px",background:"rgba(0, 0, 0, 0.1)"},className:"jsx-8987ce50043e664d"}),(0,a.jsx)("span",{className:"jsx-8987ce50043e664d",children:"OR"}),(0,a.jsx)("div",{style:{flex:1,height:"1px",background:"rgba(0, 0, 0, 0.1)"},className:"jsx-8987ce50043e664d"})]}),(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-2)"},className:"jsx-8987ce50043e664d",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ek("google"),disabled:eo,style:{width:"100%",padding:"var(--space-3)",background:"#FFFFFF",border:"1px solid rgba(0, 0, 0, 0.15)",borderRadius:"var(--radius-md)",color:"var(--text-primary)",fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",cursor:eo?"not-allowed":"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--space-2)"},onMouseEnter:e=>{eo||(e.currentTarget.style.background="rgba(0, 155, 90, 0.05)",e.currentTarget.style.borderColor="var(--primary)")},onMouseLeave:e=>{eo||(e.currentTarget.style.background="#FFFFFF",e.currentTarget.style.borderColor="rgba(0, 0, 0, 0.15)")},className:"jsx-8987ce50043e664d",children:[(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",className:"jsx-8987ce50043e664d",children:[(0,a.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",className:"jsx-8987ce50043e664d"}),(0,a.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",className:"jsx-8987ce50043e664d"}),(0,a.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.22.81-.62z",fill:"#FBBC05",className:"jsx-8987ce50043e664d"}),(0,a.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",className:"jsx-8987ce50043e664d"})]}),"Continue with Google"]})})]})]})]}),(0,a.jsx)(o(),{id:"8987ce50043e664d",children:"@keyframes slideIn{from{opacity:0;transform:translatey(-10px)scale(.95)}to{opacity:1;transform:translatey(0)scale(1)}}"})]})}},84441:(e,r,t)=>{t.d(r,{d:()=>a});function a(){return"/home"}},87859:(e,r,t)=>{t.d(r,{Bj:()=>i,ProductProvider:()=>n});var a=t(95155),s=t(12115);let o=(0,s.createContext)(null);function n(e){let{product:r,children:t}=e;return(0,a.jsx)(o.Provider,{value:r,children:t})}function i(){let e=(0,s.useContext)(o);if(!e)throw Error("useProduct must be used within a ProductProvider");return e}}}]);

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.