PageSourceSearch

https://biblioscan.ai/_next/static/chunks/pages/login-de-9439af751bd24fec.js

js biblioscan.ai collected 2026-10-02 00:45:29 UTC 6,756 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[88337],{18036:(e,s,t)=>{"use strict";t.d(s,{A:()=>v});var r=t(37876),a=t(14232),n=t(89099),o=t(48230),i=t.n(o),l=t(5993),c=t(25052),d=t(65897),m=t(78114),u=t(83450),x=t(94376),p=t(15578),h=t(68092),f=t(57992),g=t(26714),b=t(53057),j=t(64699);function v(){let e=(0,n.useRouter)(),{login:s,isAuthenticated:t,loading:o}=(0,m.A)(),{t:v,language:k}=(0,u.ok)(),{trackLoginPageView:w,trackLoginAttempt:y,trackLoginSuccess:N,trackLoginFailure:S,identifyUser:C}=(0,p.s)();(0,a.useEffect)(()=>{!o&&t&&e.replace("/dashboard")},[o,t,e]),(0,a.useEffect)(()=>{w()},[]);let[_,E]=(0,a.useState)(""),[A,T]=(0,a.useState)(""),[F,I]=(0,a.useState)(""),[P,D]=(0,a.useState)(""),[O,q]=(0,a.useState)(!1),[M,B]=(0,a.useState)(!1),[L,R]=(0,a.useState)(null),$="true"===e.query.reset;async function J(t){if(t.preventDefault(),!M){B(!0),y("email");try{let t=await fetch((0,g.e)("/api/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:_,password:A})}),r=await t.json();if(t.ok){if(r.requires_2fa&&r.ticket){I(""),D(""),R(r.ticket);return}let t={token:r.token,email:_};s(t),C(_,_),N("email",_),e.push("/dashboard")}else localStorage.removeItem("session"),S("email",r.error||v.signInFailed),I(r.error||v.signInFailed),D("")}catch(e){localStorage.removeItem("session"),S("email",v.signInErrorMessage),I(v.signInErrorMessage),D(""),console.error(e)}finally{B(!1)}}}async function X(e){if(e.preventDefault(),!M){B(!0);try{let e=await fetch((0,g.e)("/api/auth/resetpassword"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:_})}),s=await e.json();e.ok?(D(v.checkEmailResetPassword),I("")):(I(s.error||v.resetPasswordFailed),D(""))}catch(e){I(v.resetPasswordError),D(""),console.error(e)}finally{B(!1)}}}(0,a.useEffect)(()=>{let s=()=>{I(""),D("")};return e.events.on("routeChangeStart",s),()=>e.events.off("routeChangeStart",s)},[e.events]);let U="en"===k?"/register":`/register-${k}`,W="block w-full rounded-[14px] border bg-paper px-4 py-3 text-[14px] text-ink placeholder:text-ink-muted focus:outline-none focus:border-sage focus:shadow-[0_0_0_3px_rgba(31,61,54,0.08)] transition-shadow";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{"aria-hidden":!0,className:"bs-grain"}),(0,r.jsx)("main",{className:"relative min-h-[100dvh] overflow-x-clip pb-20 pt-[104px] md:pb-24 md:pt-28",style:{background:"var(--cream)"},children:(0,r.jsxs)("section",{className:"mx-auto max-w-[480px] px-5",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,r.jsx)(i(),{href:"/","aria-label":"BiblioScan",children:(0,r.jsx)(b.A,{width:48,height:48,className:"h-12 w-12"})}),(0,r.jsx)("h1",{className:"mt-6 text-[32px] font-normal leading-[1.1] tracking-[-0.03em] text-ink md:text-[40px]",children:$?v.resetPassword:v.signInToBiblioScan})]}),(0,r.jsxs)("div",{className:"mt-10 rounded-[22px] border p-6 md:p-7",style:{borderColor:"var(--line)",background:"var(--paper-warm)"},children:[!$&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.A,{}),(0,r.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,r.jsx)("div",{className:"h-px flex-1",style:{background:"var(--line)"}}),(0,r.jsx)("span",{className:"font-mono text-[10px] uppercase tracking-[0.14em] text-ink-muted",children:v.or}),(0,r.jsx)("div",{className:"h-px flex-1",style:{background:"var(--line)"}})]})]}),(0,r.jsxs)("form",{className:"space-y-5",onSubmit:$?X:J,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.14em] text-ink-muted",children:v.emailLoginForm}),(0,r.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,value:_,onChange:e=>E(e.target.value),className:W,style:{borderColor:"var(--line)"}})]}),!$&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,r.jsx)("label",{htmlFor:"password",className:"font-mono text-[10px] uppercase tracking-[0.14em] text-ink-muted",children:v.password}),(0,r.jsx)("button",{type:"button",onClick:function(){$?e.push((0,x.T2)(),void 0,{shallow:!0}):e.push(`${(0,x.T2)()}?reset=true`,void 0,{shallow:!0})},className:"font-mono text-[10px] uppercase tracking-[0.1em] text-sage hover:text-magenta-ink",children:v.forgotPassword})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{id:"password",name:"password",type:O?"text":"password",autoComplete:"current-password",required:!0,value:A,onChange:e=>T(e.target.value),className:`${W} pr-12`,style:{borderColor:"var(--line)"}}),(0,r.jsx)("div",{className:"absolute inset-y-0 right-1 flex items-center",children:(0,r.jsx)(l.A,{onClick:()=>q(e=>!e),onMouseDown:e=>e.preventDefault(),edge:"end",className:"!text-ink-muted hover:!text-ink","aria-label":"Afficher ou masquer le mot de passe",children:O?(0,r.jsx)(d.A,{}):(0,r.jsx)(c.A,{})})})]})]}),(0,r.jsxs)("button",{type:"submit",disabled:M,className:"bs-btn-primary mt-2 w-full justify-center",children:[(0,r.jsx)("span",{children:$?v.sendResetLink:v.signIn}),(0,r.jsx)("span",{className:"bs-inner",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5 stroke-cream",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})})})]})]}),F&&(0,r.jsx)("div",{className:"mt-5 rounded-[14px] border px-4 py-3 text-[13px]",style:{borderColor:"rgba(196,84,84,0.25)",background:"rgba(196,84,84,0.08)",color:"#8C2D2D"},children:F}),P&&(0,r.jsx)("div",{className:"mt-5 rounded-[14px] border px-4 py-3 text-[13px]",style:{borderColor:"rgba(78,154,44,0.25)",background:"rgba(78,154,44,0.08)",color:"var(--sage-deep)"},children:P})]}),!$&&(0,r.jsxs)("p",{className:"mt-6 text-center text-[13px] text-ink-soft",children:[v.noAccount," ",(0,r.jsx)(i(),{href:U,className:"font-medium text-sage underline underline-offset-2",style:{textDecorationColor:"var(--magenta)"},children:v.signUp})]})]})}),L&&(0,r.jsx)(f.A,{ticket:L,onSuccess:function(t){s({token:t,email:_}),C(_,_),N("email",_),e.push("/dashboard")},onAbort:function(e){R(null),e&&I(e)}}),(0,r.jsx)(j.w,{})]})}},33854:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login-de",function(){return t(58218)}])},58218:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var r=t(37876),a=t(18036),n=t(77328),o=t.n(n),i=t(83450),l=t(14232);function c(){let{t:e,changeLanguage:s,language:t}=(0,i.ok)();return(0,l.useEffect)(()=>{"de"!==t&&s("de")},[s,t]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{children:(0,r.jsx)("title",{children:e.signInToBiblioScan})}),(0,r.jsx)(a.A,{})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[45901,1138,90636,46593,38792],()=>s(33854)),_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.