PageSourceSearch

https://ai.trintaporcento.com.br/assets/reset-password-DvFYnT_u.js

js trintaporcento.com.br collected 2026-10-06 04:44:56 UTC 2,006 bytes, 1 lines download raw bytes

1import{u as j,r as t,s as n,j as e,t as o}from"./index-CIcepXs3.js";import{B as b}from"./button-77ztRyNI.js";import{L as d,I as l}from"./label-BDr9gwRB.js";import{C as v}from"./card-BSY7RLuU.js";import"./index-DSPCjlFI.js";import"./index-CobTJpls.js";import"./utils-DCADjnpI.js";function L(){const h=j(),[r,p]=t.useState(""),[i,f]=t.useState(""),[c,u]=t.useState(!1),[x,m]=t.useState(!1);t.useEffect(()=>{const{data:s}=n.auth.onAuthStateChange(a=>{(a==="PASSWORD_RECOVERY"||a==="SIGNED_IN")&&m(!0)});return n.auth.getSession().then(({data:a})=>{a.session&&m(!0)}),()=>s.subscription.unsubscribe()},[]);async function g(s){if(s.preventDefault(),r!==i){o.error("As senhas não coincidem");return}u(!0);try{const{error:a}=await n.auth.updateUser({password:r});if(a)throw a;o.success("Senha atualizada"),h({to:"/chat/$area",params:{area:"reforma-tributaria"}})}catch(a){o.error(a instanceof Error?a.message:"Erro ao atualizar senha")}finally{u(!1)}}return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-10",children:e.jsxs(v,{className:"w-full max-w-md p-6",children:[e.jsx("h1",{className:"font-display text-2xl mb-1",children:"Redefinir senha"}),e.jsx("p",{className:"mb-5 text-sm text-muted-foreground",children:"Defina uma nova senha para sua conta."}),x?e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"password",children:"Nova senha"}),e.jsx(l,{id:"password",type:"password",minLength:6,value:r,onChange:s=>p(s.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(d,{htmlFor:"confirm",children:"Confirmar senha"}),e.jsx(l,{id:"confirm",type:"password",minLength:6,value:i,onChange:s=>f(s.target.value),required:!0})]}),e.jsx(b,{type:"submit",disabled:c,className:"w-full",children:c?"Salvando…":"Salvar nova senha"})]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Validando link de recuperação…"})]})})}export{L as component};

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.