PageSourceSearch

https://auth.debrif.app/_next/static/chunks/pages/en/login_passwordless-56fdacb695ffadd6.js

js debrif.app collected 2026-10-02 01:14:10 UTC 7,535 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4769],{9803:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/login_passwordless",function(){return n(68910)}])},17270:function(e,i,n){"use strict";n.d(i,{q:function(){return apiLoginPasswordless}});var t=n(1448);async function apiLoginPasswordless(e){let i,{email:n,create_if_doesnt_exist:r,turnstile_token:s}=e;return((!n||n.length<1)&&(i=["Email required"]),i)?Promise.resolve((0,t.Nr)({email:i})):(0,t.j0)("/api/fe/v1/login_passwordless",{email:n,create_if_doesnt_exist:r,turnstile_token:s}).then(e=>e.ok?e.json().then(e=>{let i={success:!0,data:{message:e.message,links:e.links}};return i}):400===e.status?e.json().then(e=>(0,t.Nr)({email:e.email})):(0,t.xo)())}},9677:function(e,i,n){"use strict";var t=n(85893),r=n(67841),s=n(41664),l=n.n(s),o=n(11163),a=n(67294),u=n(54070);let c=(0,a.forwardRef)((e,i)=>{let{isFrameless:n=!1,isSplit:s=!1,useSignupOverLogin:a=!1}=e,c=(0,o.useRouter)();return(0,t.jsxs)(r.z,{ref:i,tabIndex:2,fullWidth:n,variant:s?u.Bq.LoginSubtlePrimary:u.Bq.LoginFramelessSubtlePrimary,component:l(),href:{pathname:"/en/login",query:{...c.query}},children:["Back to ",a?"sign in":"login"]})});c.displayName="BackToLogin",i.Z=c},24885:function(e,i,n){"use strict";n.d(i,{Y:function(){return r}});var t,r,s=n(85893),l=n(97564),o=n(54070),a=n(25695);(t=r||(r={})).GMAIL="gmail",t.OUTLOOK="outlook",t.YAHOO="yahoo";let u={gmail:"/img/g-logo.svg",outlook:"/img/microsoft-logo.svg",yahoo:"/img/yahoo-logo.svg"},c={gmail:"Gmail",outlook:"Outlook",yahoo:"Yahoo!"};i.Z=e=>{let{isFrameless:i=!1,sniperLinks:n}=e;return(0,s.jsx)(l.K,{spacing:"md",mt:16,style:{textAlign:"center"},w:"100%",children:Object.entries(n).map(e=>{let[n,t]=e;return(0,s.jsxs)(a.Z,{farLeftIcon:u[n],w:"100%",variant:i?o.Bq.LoginFramelessOutline:o.Bq.LoginOutline,onClick:()=>{window.open(t,"_blank")},children:["Open ",c[n]]},n)})})}},68281:function(e,i,n){"use strict";n.d(i,{D:function(){return useTurnstile}});var t=n(85893),r=n(67294);function useTurnstile(e){let{siteKey:i}=e,n=(0,r.useRef)(null),s=(0,r.useRef)(null),[l,o]=(0,r.useState)(null),[a,u]=(0,r.useState)(null),c=!!i,d=(0,r.useCallback)(()=>{if(!c||!n.current||!window.turnstile)return;if(s.current&&window.turnstile.remove){try{window.turnstile.remove(s.current)}catch(e){}s.current=null}o(null),u(null);let e=window.turnstile.render(n.current,{sitekey:i,callback:e=>o(e),"error-callback":e=>{console.error("Turnstile error:",e),u("Challenge failed, please try again.")},"expired-callback":()=>o(null),"refresh-expired":"auto",retry:"auto"});s.current=e},[c,i]);(0,r.useEffect)(()=>{if(!c)return;if(window.turnstile){d();return}let e=Date.now(),i=setInterval(()=>{if(window.turnstile){clearInterval(i),d();return}Date.now()-e>1e4&&(clearInterval(i),u("Challenge failed to load. Please refresh and try again."))},50);return()=>clearInterval(i)},[c,d]),(0,r.useEffect)(()=>()=>{var e;let i=s.current;if(i&&(null===(e=window.turnstile)||void 0===e?void 0:e.remove))try{window.turnstile.remove(i)}catch(e){}s.current=null},[]);let g=(0,r.useCallback)(()=>{let e=s.current;if(e&&window.turnstile){try{window.turnstile.reset(e)}catch(e){}o(null),u(null)}},[]),m=(0,r.useMemo)(()=>i?(0,t.jsx)("div",{ref:n},i):null,[i]);return{hasTurnstile:!!i,turnstileComponent:m,turnstileToken:l,turnstileError:a,resetTurnstile:g}}},68910:function(e,i,n){"use strict";n.r(i),n.d(i,{PASSWORDLESS_LOGIN_MESSAGE:function(){return j},PASSWORDLESS_LOGIN_SUCCESS:function(){return P},PUBLIC_PASSWORDLESS_LOGIN_SUCCESS:function(){return C},__N_SSP:function(){return L},default:function(){return login_passwordless}});var t=n(85893),r=n(95117),s=n(97564),l=n(80061),o=n(67841),a=n(20966),u=n(77248),c=n(33575),d=n(67294),g=n(1448),m=n(17270),h=n(40423),f=n(31908),_=n(9677),p=n(64761),w=n(33507),x=n(11163),S=n(24885),k=n(54070),Deprecated_DeprecatedLoginPasswordlessPage=e=>{let{pageConfig:i,successMessage:n,sniperLinks:s,form:u,areButtonsDisabled:c,isLoading:d,displayBackButton:g,handleSubmit:m}=e,h=(0,p.rZ)(),_=(0,x.useRouter)();return(0,t.jsxs)(f.ZP,{pageConfig:i,pageTitle:"Login",title:n?"":"Sign in with Magic Link",bottomChild:g?(0,t.jsx)(o.z,{variant:k.Bq.TextOld,leftIcon:(0,t.jsx)(w.Z,{size:h.other.iconSizes.lg}),onClick:()=>
1_.push("/en/login"),children:"Back to login"}):void 0,children:[n&&s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.x,{children:n}),(0,t.jsx)(S.Z,{sniperLinks:s})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.x,{mb:"xl",fw:500,size:"lg",children:j}),(0,t.jsxs)("form",{onSubmit:u.onSubmit(m),children:[(0,t.jsx)(l.o,{variant:k.kI.LoginDeprecated,label:"Email",type:"email",autoComplete:"email",placeholder:"[email protected]",...u.getInputProps("email")}),(0,t.jsx)(o.z,{variant:k.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:c,mt:"lg",children:d?(0,t.jsx)(a.a,{color:k.xR.LoginSuccessButtonColor,size:"sm"}):"Continue"})]})]})]})},v=n(68281),b=n(95427),y=n(73758),L=!0;let j="Enter your email address below. You'll receive a link that will log you in.",C="We sent you an email with a link that will sign you in. The link will expire in one hour, so be sure to use it soon. You can close this tab.",P="If an account already exists with that email address, we will send you a link to sign you in. The link will expire in one hour, so be sure to use it soon. You can close this tab.";var login_passwordless=e=>{var i;let{pageConfig:n,base64Email:p}=e,w=p?(0,y.TI)(p):void 0,{classes:x}=(0,b.fc)(),L=(0,u.c)({initialValues:{email:null!=w?w:""}}),[E,O]=(0,d.useState)(!1),[I,B]=(0,d.useState)(""),[q,T]=(0,d.useState)(),{hasTurnstile:D,turnstileComponent:N,turnstileToken:z,turnstileError:F,resetTurnstile:R}=(0,v.D)({siteKey:n.turnstile_site_key}),handleSubmit=async e=>{O(!0),B(""),T(void 0);let i={...e,create_if_doesnt_exist:n.allow_public_signups,turnstile_token:z||void 0},t=await (0,m.q)(i);if(t.success){let{links:e}=t.data;T(e),B(n.allow_public_signups?C:P)}else"bad_request"===t.error_type&&t.field_to_errors?L.setErrors(t.field_to_errors):c.N9.show({title:"Error",message:g.aK,color:k.xR.ErrorButtonColor,classNames:x});L.resetDirty(),R(),O(!1)},Z=E||D&&!z||D&&!!F,A=!n.has_password_login&&n.only_extra_login_is_passwordless,M=!A&&!I,W=n.use_deprecated_login_ui,G=n.theme.login_ui_theme===h.gq.Frameless,Y=n.theme.login_ui_theme===h.gq.SplitScreen,K=null===(i=n.customer_overrides)||void 0===i?void 0:i.use_signup_over_login;return W?(0,t.jsx)(Deprecated_DeprecatedLoginPasswordlessPage,{pageConfig:n,successMessage:I,sniperLinks:q,form:L,isLoading:E,areButtonsDisabled:Z,displayBackButton:M,handleSubmit:handleSubmit}):(0,t.jsxs)(f.ZP,{pageConfig:n,pageTitle:"Login",title:"Sign in with Magic Link",bottomChild:M?(0,t.jsx)(_.Z,{isFrameless:G,isSplit:Y,useSignupOverLogin:K}):void 0,children:[I&&q&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.x,{size:"lg",children:I}),(0,t.jsx)(S.Z,{isFrameless:G,sniperLinks:q})]}),!I&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.x,{mb:"lg",size:"lg",children:j}),(0,t.jsxs)("form",{onSubmit:L.onSubmit(handleSubmit),children:[(0,t.jsxs)(s.K,{spacing:"lg",children:[(0,t.jsx)(l.o,{variant:G?k.kI.LoginFrameless:k.kI.Login,label:"Email",type:"email",name:"email",autoComplete:"email",...L.getInputProps("email")}),N]}),(0,t.jsx)(o.z,{variant:G?k.Bq.LoginFramelessPrimary:k.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:Z,mt:"lg",children:E?(0,t.jsx)(a.a,{color:k.xR.LoginSuccessButtonColor,size:"sm"}):"Send Magic Link"})]})]})]})}}},function(e){e.O(0,[3972,7248,3540,9748,9774,2888,179],function(){return e(e.s=9803)}),_N_E=e.O()}]);

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.