PageSourceSearch

https://novanicolandia.com.br/_nuxt/gVTLJxRU.js

js novanicolandia.com.br collected 2026-10-02 00:00:01 UTC 3,743 bytes, 1 lines download raw bytes

1import A from"./CFfeWV9Q.js";import{e as C,r as v,E as P,c as n,a as s,t as b,h as a,b as g,F as R,g as U,z as m,v as c,x as f,i as $,o as i,j as k,K as O,G as B}from"#entry";import{c as x,a as w,f as D}from"./WUcDpGuR.js";const N={class:"flex flex-col gap-3"},j={class:"mb-5 text-center text-3xl font-bold"},F={key:0,class:"border border-yellow-500 bg-yellow-100 p-3 py-2 rounded flex items-center"},I={key:1,class:"border border-emerald-500 bg-emerald-100 p-3 py-2 rounded"},L={class:"flex items-center"},M={key:2,class:""},z={key:3},G={key:4},Q=C({__name:"ResetPassword",props:{resetToken:{type:String,required:!1}},emits:["processing","success"],setup(h,{emit:_}){const o=v([]),p=v(!1),u=_,l=h,r=P({email:"",password:"",password_confirmation:""}),T=()=>{try{o.value=[],x({email:w().required("Preencha o e-mail para prosseguir").email("E-mail inválido")}).validateSync(r,{abortEarly:!0})}catch(t){return o.value=t.errors,!1}return!0},S=async()=>{try{o.value=[],x({password_confirmation:w().required("A confirmação de senha é obrigatória").oneOf([D("password")],"As senhas não coincidem"),password:w().required("A senha é obrigatória")}).validateSync(r,{abortEarly:!0}),u("processing",!0),await k("/reset-password",{method:"POST",body:{password:r.password,token:l.resetToken}}),u("success",!0);const t=O(),e=t.query?.redir?`&redir=${encodeURIComponent(String(t.query.redir))}`:"";await B(`/login?resetOk=1${e}`,{replace:!0})}catch(t){const e=t;e?.data?.message?o.value=[e.data.message]:e?.errors?.length?o.value=e.errors:(e?.status??e?.statusCode)===404&&(o.value=["Link inválido ou expirado. Solicite um novo e-mail."])}u("processing",!1)},E=async()=>{if(p.value=!1,T()){try{u("processing",!0);const t=await k("/send-reset-token",{method:"POST",body:r});p.value=!0}catch(t){t.status==404&&(o.value=["Usuário não encontrado, verifique o e-mail."])}u("processing",!1)}},q=async()=>{if(l.resetToken){await S();return}await E()};return(t,e)=>{const y=A;return i(),n("form",{onSubmit:$(q,["prevent"])},[s("div",N,[s("h1",j,b(l.resetToken?"Definir nova senha":"Recuperar senha"),1),a(o)?.length>0?(i(),n("div",F,[g(y,{name:"fa:warning",class:"text-sm text-yellow-600 mr-2"}),(i(!0),n(R,null,U(a(o),(d,V)=>(i(),n("p",{key:V},b(d),1))),128))])):m("",!0),a(p)?(i(),n("div",I,[s("div",L,[g(y,{name:"fa:check",class:"text-sm text-emerald-600 mr-2"}),e[3]||(e[3]=s("p",null,"Enviado!",-1))]),e[4]||(e[4]=s("p",{class:"text-sm md:ml-7"},"Acesse seu e-mail para redefinir sua senha.",-1))])):m("",!0),l.resetToken?m("",!0):(i(),n("div",M,[e[5]||(e[5]=s("label",{for:"username"},"Email:",-1)),c(s("input",{type:"email",id:"username",name:"username","onUpdate:modelValue":e[0]||(e[0]=d=>a(r).email=d),autocomplete:"current-password",placeholder:"[email protected]",class:"w-full mt-1 px-3 py-2 border-2 border-dark-10 rounded"},null,512),[[f,a(r).email]])])),l.resetToken?(i(),n("div",z,[e[6]||(e[6]=s("label",{for:"reset-password"},"Senha:",-1)),c(s("input",{id:"reset-password","onUpdate:modelValue":e[1]||(e[1]=d=>a(r).password=d),type:"password",name:"password",class:"w-full mt-1 px-3 py-2 border-2 border-dark-10 rounded"},null,512),[[f,a(r).password]])])):m("",!0),l.resetToken?(i(),n("div",G,[e[7]||(e[7]=s("label",{for:"reset-confirm-password"},"Confirme a senha:",-1)),c(s("input",{id:"reset-confirm-password","onUpdate:modelValue":e[2]||(e[2]=d=>a(r).password_confirmation=d),type:"password",name:"password",class:"w-full mt-1 px-3 py-2 border-2 border-dark-10 rounded"},null,512),[[f,a(r).password_confirmation]])])):m("",!0),e[8]||(e[8]=s("button",{class:"w-auto bg-[#d00] text-white hover:saturate-150 py-3 px-7 rounded-md transition-all inline-flex items-center justify-center gap-2"}," Enviar ",-1))])],32)}}});export{Q as _};

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.