PageSourceSearch

https://getlatka.com/_next/static/chunks/app/auth/login/page-e12ff4f2b988507b.js

js getlatka.com collected 2026-10-02 03:09:32 UTC 4,740 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4859],{1015:(e,r,a)=>{"use strict";a.d(r,{b:()=>i});var t=a(7814);function i(e){let{pending:r,pendingLabel:a,children:i}=e;return(0,t.jsxs)("button",{"aria-busy":r,className:"flex h-14 w-full items-center justify-center gap-2 rounded-lg bg-[#d32f2f] px-5 text-base font-extrabold uppercase tracking-[0.05em] text-white hover:bg-[#b71c1c] disabled:cursor-not-allowed disabled:bg-neutral-400",disabled:r,type:"submit",children:[r?(0,t.jsxs)("svg",{"aria-hidden":"true",className:"h-5 w-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"3"}),(0,t.jsx)("path",{d:"M22 12a10 10 0 00-10-10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"3"})]}):null,(0,t.jsx)("span",{children:r?a:i})]})}},7380:(e,r,a)=>{"use strict";a.d(r,{y:()=>n});var t=a(7814),i=a(7446);function n(e){let{ariaLabel:r,autoComplete:a,autoFocus:n,errorId:l,id:o,invalid:s,minLength:d,name:c,placeholder:u}=e,[p,b]=(0,i.useState)(!1),h=(0,i.useId)();return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:o,id:h,children:r}),(0,t.jsx)("input",{"aria-describedby":s&&l?l:void 0,"aria-invalid":s||void 0,"aria-label":r,autoComplete:a,autoFocus:n,className:"h-14 w-full rounded-lg border border-neutral-300 bg-white pr-12 pl-4 text-base text-neutral-950 outline-none placeholder:text-neutral-500 focus:border-[#d32f2f] aria-invalid:border-[#b71c1c]",id:o,minLength:d,name:c,placeholder:u,required:!0,type:p?"text":"password"}),(0,t.jsx)("button",{"aria-label":p?"Hide password":"Show password","aria-pressed":p,className:"absolute top-1/2 right-2 -translate-y-1/2 rounded-md p-2 text-neutral-500 hover:text-neutral-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#d32f2f]",onClick:()=>b(e=>!e),tabIndex:-1,type:"button",children:p?(0,t.jsx)("svg",{"aria-hidden":"true",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M3 3l18 18M10.58 10.58A2 2 0 0012 14a2 2 0 001.42-.58M9.88 5.09A10.1 10.1 0 0112 5c5 0 9.27 3.11 11 7-.6 1.36-1.5 2.59-2.61 3.6M6.6 6.6C4.7 7.78 3.18 9.46 2 12c1.73 3.89 6 7 10 7 1.83 0 3.55-.43 5.05-1.18",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,t.jsxs)("svg",{"aria-hidden":"true",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]})}},7401:(e,r,a)=>{Promise.resolve().then(a.bind(a,8084)),Promise.resolve().then(a.t.bind(a,7246,23)),Promise.resolve().then(a.t.bind(a,9795,23))},8084:(e,r,a)=>{"use strict";a.d(r,{LoginForm:()=>o});var t=a(7814),i=a(7446),n=a(7380),l=a(1015);function o(e){let{defaultEmail:r,initialError:a,nextPath:o}=e,[s,d]=(0,i.useState)(a),[c,u]=(0,i.useState)(!1);async function p(e){var r,a;e.preventDefault(),d(null),u(!0);let t=new FormData(e.currentTarget),i=String(null!=(r=t.get("email"))?r:""),n=String(null!=(a=t.get("password"))?a:"");try{if(!(await fetch("/api/v2/auth/login",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},credentials:"include",body:JSON.stringify({email:i,password:n})})).ok)return void d("You entered an incorrect email or password. Please try again.");await fetch("/api/v2/private/draft-mode/enable",{method:"POST",credentials:"include"}).catch(()=>null),window.location.assign(o)}catch(e){d("Something went wrong. Please try again.")}finally{u(!1)}}let b="login-error",h=!!s;return(0,t.jsxs)("form",{className:"grid gap-4",onSubmit:p,children:[s?(0,t.jsx)("p",{"aria-live":"polite",className:"rounded-lg border border-[#f4b4b4] bg-[#fff2f2] px-4 py-3 text-sm font-semibold text-[#b71c1c]",id:b,role:"alert",children:s}):null,(0,t.jsx)("label",{className:"sr-only",htmlFor:"login-email",children:"Email"}),(0,t.jsx)("input",{"aria-describedby":h?b:void 0,"aria-invalid":h||void 0,"aria-label":"Email address",autoComplete:"email",autoFocus:!r,className:"h-14 roun
1ded-lg border border-neutral-300 bg-white px-4 text-base text-neutral-950 outline-none placeholder:text-neutral-500 focus:border-[#d32f2f] aria-invalid:border-[#b71c1c]",defaultValue:r,id:"login-email",name:"email",placeholder:"Email",required:!0,type:"email"}),(0,t.jsx)(n.y,{ariaLabel:"Password",autoComplete:"current-password",autoFocus:!!r,errorId:b,id:"login-password",invalid:h,name:"password",placeholder:"Password"}),(0,t.jsx)(l.b,{pending:c,pendingLabel:"Signing In",children:"Sign In"})]})}}},e=>{e.O(0,[7246,9795,505,5288,7358],()=>e(e.s=7401)),_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.