1import{r as l,j as e}from"./vendor-react-BzXAup97.js";import{G as g}from"./GuestLayout-DPRlL3gN.js";import{u as _,c as b,H as j,r as w}from"./vendor-inertia-C6ujBw2R.js";import{u as C,B as u,L as N}from"./app-BcVXXONv.js";import{C as v,b as y,c as k,d as F,a as T,e as D}from"./Card-Czp7NDRY.js";import{I as B}from"./Input-Cg7VKGAS.js";import{I as d}from"./InputError-B5qbqjLg.js";import{A as I}from"./AuthTurnstile-CSRMfPnN.js";import{d as L}from"./deviceClassClient-Iy-8prqQ.js";import"./FrontLogo-ByqZzXm1.js";import"./useRoutePulse-Cu98qn9H.js";import"./vendor-lucide-1jXEw7Bh.js";import"./vendor-radix-Bha8dDJB.js";import"./vendor-tiptap-CF47o3zI.js";import"./vendor-recharts-MX9_f30n.js";import"./vendor-assistant-ui-rpsJ9Qdc.js";import"./vendor-voip-BKCre8sD.js";import"./useAppResolvedTheme-BGopQqHf.js";function $({status:E,sessionConflict:m}){const{t:s}=C(),a=!!_().props.turnstile_site_key,n=l.useRef(null),{data:t,setData:o,post:p,processing:f,errors:c}=b({code:"",device_class:L(),"cf-turnstile-response":""}),i=l.useCallback(()=>{n.current?.reset(),o("cf-turnstile-response","")},[o]),x=r=>{r&&r.preventDefault(),p(route("two-factor.login"),{onFinish:()=>i()})},h=()=>{w.post(route("two-factor.login"),{code:t.code,confirm_session:!0,device_class:t.device_class,"cf-turnstile-response":t["cf-turnstile-response"]},{preserveScroll:!0,onFinish:()=>i()})};return e.jsxs(g,{children:[e.jsx(j,{title:s("auth.two_factor_title")}),e.jsxs(v,{className:"mx-auto w-full max-w-md",children:[e.jsxs(y,{children:[e.jsx(k,{children:s("auth.two_factor_title")}),e.jsx(F,{children:s("auth.two_factor_code_label")})]}),e.jsxs(T,{className:"space-y-4",children:[e.jsx(I,{ref:n,className:"w-full",onToken:r=>o("cf-turnstile-response",r??"")}),e.jsx(d,{message:c["cf-turnstile-response"],className:"text-center"}),m&&e.jsxs("div",{className:"space-y-4 rounded-lg border border-warning/50 bg-warning/10 p-4 text-xs text-warning-foreground dark:bg-amber-950/30",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("p",{className:"font-semibold",children:s("auth.session_terminated")}),e.jsx("p",{className:"text-muted-foreground",children:s("auth.session_conflict_text")})]}),e.jsx(u,{type:"button",variant:"default",className:"w-full bg-amber-600 hover:bg-amber-700 text-white border-0",disabled:a&&!t["cf-turnstile-response"],onClick:()=>h(),children:"Bu cihazda kullan"})]}),e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(N,{htmlFor:"code",children:s("auth.two_factor_code_label")}),e.jsx(B,{type:"text",id:"code",name:"code",value:t.code,onChange:r=>o("code",r.target.value.replace(/\D/g,"").slice(0,6)),autoComplete:"one-time-code",inputMode:"numeric",maxLength:6,placeholder:s("auth.two_factor_code_placeholder"),className:"text-center tracking-[0.3em]",autoFocus:!0}),e.jsx(d,{message:c.code,className:"mt-1"})]}),e.jsx(u,{type:"submit",disabled:f||t.code.length!==6||a&&!t["cf-turnstile-response"],className:"w-full",children:s("auth.two_factor_submit")})]})]}),e.jsx(D,{})]})]})}export{$ as default};
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.