PageSourceSearch

https://resea.ai/_next/static/chunks/5337-20d23de6e6f2c940.js

js resea.ai collected 2026-10-05 12:32:51 UTC 14,838 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5337],{25337:(e,t,s)=>{s.r(t),s.d(t,{LoginPopup:()=>x});var r=s(95155),l=s(12115),n=s(86711),a=s(15239),i=s(65229),c=s(5917),o=s(19798),d=s(95604);function x(e){let{isOpen:t,onClose:s,onSuccess:x}=e,{sendVerification:u,verifyAndLogin:m,loginWithGoogle:h,loading:p,error:f}=(0,o.J)(),[g,j]=(0,l.useState)(""),[b,v]=(0,l.useState)(""),[w,y]=(0,l.useState)("email"),[N,k]=(0,l.useState)(["","","","","",""]),[E,F]=(0,l.useState)(60),[B,C]=(0,l.useState)(!1),[D,z]=(0,l.useState)(""),[A,T]=(0,l.useState)(!1),[S,L]=(0,l.useState)(""),M=(0,l.useRef)([]),_=(0,l.useRef)(null),W=(0,d.useTranslations)("login"),R=(0,d.useLocale)(),V=e=>"en"===R?"/"===e?"/":e:"/".concat(R).concat(e);(0,l.useEffect)(()=>{C(p),f&&("email"===w?(v("server-error"),z(f)):(T(!0),L(f)))},[p,f,w]),(0,l.useEffect)(()=>{if(!t){null!==_.current&&(window.clearTimeout(_.current),_.current=null);let e=setTimeout(()=>{y("email"),j(""),k(["","","","","",""]),v(""),T(!1),z("")},300);return()=>clearTimeout(e)}},[t]),(0,l.useEffect)(()=>{if(E>0&&"verification"===w){let e=setTimeout(()=>{F(E-1)},1e3);return()=>clearTimeout(e)}},[E,w]),(0,l.useEffect)(()=>{"verification"!==w||B||setTimeout(()=>{var e;null==(e=M.current[0])||e.focus()},100)},[w,B]),(0,l.useEffect)(()=>()=>{null!==_.current&&window.clearTimeout(_.current)},[]);let $=()=>g?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(g)?(v(""),!0):(v("email-invalid"),!1):(v("email-empty"),!1),q=async e=>{e.preventDefault(),"email"===w?$()&&await u(g)&&(y("verification"),J()):"verification"===w&&I(N.join(""))},H=(e,t)=>{if(B||t&&!/^\d*$/.test(t))return;null!==_.current&&(window.clearTimeout(_.current),_.current=null);let s=""===N[e],r=[...N];if(r[e]=t.slice(-1),k(r),A&&(T(!1),L("")),t&&e<5){var l;null==(l=M.current[e+1])||l.focus()}else t&&5===e&&s&&!A&&r.every(e=>""!==e)&&(_.current=window.setTimeout(()=>{_.current=null,I(r.join(""))},300))},P=e=>{B||(e.focus(),e.select())},I=async e=>{!B&&6===e.length&&await m(g,e)&&(x&&x(),s())},J=()=>{F(60)},K=async()=>{0===E&&!B&&await u(g)&&J()};return(0,r.jsx)(n.M,{isOpen:t,onClose:s,children:(0,r.jsxs)(n.l,{role:"dialog","aria-modal":"true","aria-label":W("title"),className:"relative z-10 w-full max-w-[1048px] font-app",children:[(0,r.jsx)("button",{type:"button",onClick:s,"aria-label":W("close"),className:"absolute right-3 top-3 z-20 flex size-9 items-center justify-center rounded-full bg-[#EBEAE6]/80 text-[#656971] backdrop-blur-sm transition hover:bg-[#DEDDD8] hover:text-[#101010] md:hidden",children:(0,r.jsx)(i.A,{className:"size-5",strokeWidth:2})}),(0,r.jsx)("button",{type:"button",onClick:s,"aria-label":W("close"),className:"absolute right-6 top-6 z-20 hidden rounded-full p-1 text-gray-500 transition-colors hover:text-gray-700 md:block",children:(0,r.jsx)(a.default,{src:"/svg/login_close.svg",alt:"",width:40,height:40})}),(0,r.jsxs)("div",{className:"flex max-h-[90dvh] overflow-y-auto rounded-[40px] md:bg-[#101010]",children:[(0,r.jsxs)("div",{className:"relative w-full md:w-1/2 p-4 py-6 md:p-10 bg-[#EBEAE6] rounded-[40px]",children:[(0,r.jsx)("div",{className:"flex justify-center items-center mt-[7px]",children:(0,r.jsx)(a.default,{src:"/svg/login_logo1.svg",alt:"logo",width:120,height:33})}),"email"===w?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"text-[16px] font-semibold text-center text-[#101010] leading-[150%] mt-4 mb-3 md:mb-6",children:W("title")}),(0,r.jsxs)("form",{onSubmit:q,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-normal font-semibold text-gray-900 mb-2"}),(0,r.jsx)("input",{placeholder:W("enter-your-email"),id:"email",name:"email",type:"email",disabled:B,value:g,onChange:e=>{j(e.target.value),b&&$()},className:"appearance-none block w-full p-[15px] border ".concat(b?"border-red-500":"border-[#E5E7EB]"," rounded-[16px] placeholder-[#989999] leading-[24px] focus:outline-none ").concat(b?"focus:ring-red-500 focus:border-red-500":"focus:ring-blue-500 focus:border-blue-500"," ").concat(B?"text-gray-500":""," bg-[#FFFFFF]")}),(0,r.jsxs)("div",{className:"font-app flex justify-center items-center mt-2 leading-[20px] text-[12px] ".concat(b?"text-red-500":"text-[#656971]"),children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",className:"mr-[6px]",fill:"none",stroke:b?"#ef4444":"#6c7c70",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,r.jsx)("span",{children:b?(()=>{if("server-error"===b&&D)return D;switch(b){case"email-empty":return W("email-empty");case"email-invalid":return W("email-invalid");case"server-error":return W("server-error");default:return""}})():W("we-ll-email-you-a-magic-link-for-a-password-free-sign-in")})]})]}),(0,r.jsx)("button",{type:"submit",disabled:B,className:"font-app mb-6 w-full flex justify-center items-center h-[56px] px-4 py-2 rounded-[12px] shadow-sm text-[18px] font-semibold text-white bg-[#101010] from-[#092EFF] to-[#5B0599] hover:bg-[#392e53] relative",children:B?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"opacity-0",children:W("continue")}),(0,r.jsx)("span",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{children:W("continue")})})}),(0,r.jsxs)("div",{className:"relative mb-6",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-[14px]",children:(0,r.jsx)("span",{className:"font-app px-4 bg-[#EBEAE6] text-[#101010] font-semibold",children:"or"})})]}),(0,r.jsxs)("button",{type:"button",disabled:B,onClick:()=>{B||h()},className:"font-app w-full flex justify-center items-center h-[56px] px-4 border border-[#101010] rounded-[12px] shadow-sm text-lg font-semibold text-gray-900 bg-[#EBEAE6] hover:bg-[#f6f6f6] ".concat(B?"opacity-50 cursor-not-allowed":""),children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",className:"mr-2",children:[(0,r.jsx)("path",{fill:"#4285F4",d:"M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"}),(0,r.jsx)("path",{fill:"#34A853",d:"M12.255 24c3.24 0 5.95-1.08 7.93-2.91l
1-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96h-3.98v3.09c1.97 3.92 6.02 6.62 10.71 6.62z"}),(0,r.jsx)("path",{fill:"#FBBC05",d:"M5.525 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29v-3.09h-3.98c-.82 1.62-1.29 3.44-1.29 5.38s.47 3.76 1.29 5.38l3.98-3.09z"}),(0,r.jsx)("path",{fill:"#EA4335",d:"M12.255 5.04c1.77 0 3.35.61 4.6 1.8l3.42-3.42c-2.07-1.94-4.78-3.13-8.02-3.13-4.69 0-8.74 2.7-10.71 6.62l3.98 3.09c.95-2.85 3.6-4.96 6.73-4.96z"})]}),W("sign-up-with-google")]}),(0,r.jsx)("div",{className:"font-app mt-5 text-center text-xs text-[#989999] md:px-16",children:(0,r.jsxs)("p",{children:[W("by-clicking-continue"),(0,r.jsx)("a",{href:V("/terms"),className:"underline underline-offset-2 hover:text-gray-700",children:W("terms-of-service")}),W("and"),(0,r.jsx)("a",{href:V("/privacy"),className:"underline underline-offset-2 hover:text-gray-700",children:W("privacy-policy")}),"."]})})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"text-[16px] font-semibold text-center text-[#101010] mt-6 mb-6 leading-[150%]",children:W("check-your-email")}),(0,r.jsxs)("p",{className:"text-[#656971] mb-6 text-sm font-app",children:[W("click-the-link-on-your-email")," ",(0,r.jsx)("span",{className:"font-bold text-[#101010]",children:g}),"\xa0",(0,r.jsx)("span",{className:"text-[#656971] mb-4 text-sm",children:W("to-sign-in-automatically")}),(0,r.jsxs)("span",{children:[W("not-your-email-address")," ",(0,r.jsx)("span",{onClick:()=>{B||(null!==_.current&&(window.clearTimeout(_.current),_.current=null),y("email"),k(["","","","","",""]))},className:"cursor-pointer ".concat(B?"text-[gray-400]":"text-[#101010] underline underline-offset-2"),children:W("change-email-address")})]})]}),(0,r.jsxs)("form",{onSubmit:q,className:"mt-4",children:[(0,r.jsx)("div",{className:"flex justify-between mb-6",children:[0,1,2,3,4,5].map(e=>(0,r.jsx)(l.Fragment,{children:(0,r.jsx)("input",{placeholder:"-",ref:t=>{M.current[e]=t},type:"tel",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,autoComplete:0===e?"one-time-code":"off","aria-label":"Verification code digit ".concat(e+1),disabled:B,value:N[e],onChange:t=>H(e,t.target.value),onKeyDown:t=>((e,t)=>{if(!B){if(("Backspace"===t.key||"Delete"===t.key)&&null!==_.current&&(window.clearTimeout(_.current),_.current=null),"Backspace"===t.key){t.preventDefault();let s=N[e]||0===e?e:e-1,r=[...N];r[s]="",k(r),T(!1),L(""),requestAnimationFrame(()=>{var e;null==(e=M.current[s])||e.focus()});return}if("Delete"===t.key){t.preventDefault();let s=[...N];s[e]="",k(s),T(!1),L("");return}if("ArrowLeft"===t.key&&e>0){t.preventDefault();let s=M.current[e-1];s&&P(s);return}if("ArrowRight"===t.key&&e<5){t.preventDefault();let s=M.current[e+1];s&&P(s);return}/^\d$/.test(t.key)&&N[e]&&(t.preventDefault(),H(e,t.key))}})(e,t),onPaste:t=>((e,t)=>{if(B)return;let s=t.clipboardData.getData("text").replace(/\D/g,"");if(!s)return;t.preventDefault(),null!==_.current&&(window.clearTimeout(_.current),_.current=null);let r=s.length>=N.length?0:e,l=[...N];s.slice(0,N.length-r).split("").forEach((e,t)=>{l[r+t]=e}),k(l),T(!1),L("");let n=l.findIndex((e,t)=>t>=r&&""===e),a=n>=0?n:5;requestAnimationFrame(()=>{let e=M.current[a];e&&P(e)})})(e,t),onFocus:e=>e.currentTarget.select(),onClick:e=>P(e.currentTarget),onMouseUp:e=>{e.preventDefault(),e.currentTarget.select()},className:"bg-[#fff] placeholder:text-[#B4BDB9] w-[50px] h-[50px] md:w-[64px] md:h-[64px] border ".concat(A?"border-red-500":"border-[#0000001A]"," rounded-xl text-center text-2xl font-semibold focus:outline-none ").concat(A?"focus:ring-red-500 focus:border-red-500 focus:border-[2px] focus:caret-transparent":"focus:ring-blue-500 focus:border-[#101010] focus:border-[2px] focus:placeholder:text-[#121212] focus:caret-transparent"," ").concat(B?"text-gray-400":"")})},e))}),A&&(0,r.jsxs)("div",{className:"font-app flex justify-center items-center text-red-500 text-[12px] leading-[20px] mb-6",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",className:"mr-1",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),(0,r.jsx)("span",{children:S||W("invalid-verification-code")})]}),(0,r.jsx)("button",{type:"submit",disabled:B,className:"font-app mb-6 w-full flex justify-center items-center h-[56px] px-4 py-2 rounded-[12px] shadow-sm text-[18px] font-semibold text-white bg-[#101010] from-[#092EFF] to-[#5B0599] hover:bg-[#392e53] relative",children:B?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"opacity-0",children:W("continue")}),(0,r.jsx)("span",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{children:W("continue")})})}),(0,r.jsx)("div",{className:"text-center mt-4",children:(0,r.jsxs)("p",{className:"font-app text-[#656971] text-sm font-medium",children:[W("did-not-receive-the-code"),(0,r.jsx)("button",{type:"button",onClick:K,disabled:E>0||B,className:"ml-1 ".concat(E>0||B?"text-gray-400":"text-[#101010] underline underline-offset-2"),children:E>0?"".concat(W("resend-in")," ").concat(E,"s"):W("resend")})]})})]})]})]}),(0,r.jsxs)("div",{className:"hidden md:block w-[50%] from-[#111111] via-[#151515] to-[#1c1c1c] text-white relative overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative h-full flex flex-col z-10 relative",children:[(0,r.jsx)("h2",{className:"font-[Libre_Baskerville] text-2xl font-bold leading-tight mt-11 ml-10 max-w-[345px]",children:W("workspace-title")}),(0,r.jsxs)("div",{className:"mt-8 ml-10 max-w-[385px] pr-5",children:[(0,r.jsxs)("ul",{className:"space-y-3 text-[15px] leading-6 text-[#E8E5ED]",children:[(0,r.jsxs)("li",{className:"flex items-start justify-between gap-4",children:[(0,r.jsx)("span",{children:W("free-benefit-humanizer")}),(0,r.jsx)(c.A,{className:"mt-0.5 size-4 shrink-0 text-[#43C98B]",strokeWidth:2.5})]}),(0,r.jsxs)("li",{className:"flex items-start justify-between gap-4",children:[(0,r.jsx)("span",{children:W("free-benefit-writing")}),(0,r.jsx)(c.A,{className:"mt-0.5 size-4 shrink-0 text-[#43C98B]",strokeWidth:2.5})]}),(0,r.jsxs)("li",{className:"flex items-start justify-between gap-4",children:[(0,r.jsx)("span",{children:W("free-benefit-research")}),(0,r.jsx)(c.A,{className:"mt-0.5 size-4 shrink-0 text-[#43C98B]",strokeWidth:2.5})]})]}),(0,r.jsxs)("div",{className:"absolute bottom-10 right-10 bg-[#3E3E3E] px-6 py-4 rounded-[16px] backdrop-blur-sm max-w-[333px]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 mb-[10px]",children:[(0,r.jsx)(a.default,{src:"/images/login_head.png",height:20,width:20,alt:"head"}),(0,r.jsx)("p",{className:"text-[12px] text-[#FFFFFF99] leading-[150%]",children:W("sarah-j-writer")})]}),(0,r.jsx)("p",{className:"text-white text-[14px]",children:W("reaes-completed-my-market-research-in-just-3-minutes-saved-me-2-days-of-work")})]})]})]}
1),(0,r.jsx)("div",{className:"absolute bottom-[118px] right-[34px]",children:(0,r.jsx)(a.default,{src:"/images/foot_icon.png",alt:"logo-text",width:140,height:140})})]})]})]})})}}}]);

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.