PageSourceSearch

https://cultivarbrasil.com/_nuxt/DwrnIlW5.js

js cultivarbrasil.com collected 2026-10-02 00:29:15 UTC 2,802 bytes, 1 lines download raw bytes

1import{f as h,q as E,s as q,v as l,x as _,y as m,c as g,a,z as A,j as C,A as c,B as f,m as s,C as p,t as y,o as b}from"./D0jDK8wP.js";import{_ as M}from"./NxDQUKsJ.js";const V={class:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-950 p-4"},B={class:"w-full max-w-sm"},S={key:0,class:"text-sm text-red-600 dark:text-red-400"},N=["disabled"],R=h({__name:"login",setup(T){const u=E(),{login:v,isAuthenticated:x}=q(),r=l(""),o=l(""),n=l(!1),i=l("");_(()=>{x.value&&m("/admin")});const w=async()=>{var d;i.value="",n.value=!0;try{await v(r.value.trim(),o.value);const e=typeof u.query.redirect=="string"?u.query.redirect:"/admin";await m(e)}catch(e){const t=e,k={"auth/invalid-credential":"E-mail ou senha incorretos.","auth/wrong-password":"E-mail ou senha incorretos.","auth/user-not-found":"E-mail ou senha incorretos.","auth/too-many-requests":"Muitas tentativas. Tente novamente mais tarde.","auth/invalid-email":"E-mail inválido."};i.value=(t==null?void 0:t.code)&&k[t.code]||((d=t==null?void 0:t.data)==null?void 0:d.message)||(t==null?void 0:t.message)||"Não foi possível entrar. Verifique os dados."}finally{n.value=!1}};return(d,e)=>(b(),g("div",V,[a("div",B,[e[4]||(e[4]=a("div",{class:"flex flex-col items-center mb-6"},[a("img",{src:M,alt:"Cultivar",class:"h-12 w-auto mb-2"}),a("h1",{class:"text-lg font-semibold text-gray-900 dark:text-gray-100"},"Painel administrativo")],-1)),a("form",{class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 space-y-4",onSubmit:A(w,["prevent"])},[a("div",null,[e[2]||(e[2]=a("label",{class:"block text-sm font-medium mb-1 text-gray-700 dark:text-gray-200"},"E-mail",-1)),c(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>p(r)?r.value=t:null),type:"email",required:"",autocomplete:"username",class:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-green-500"},null,512),[[f,s(r)]])]),a("div",null,[e[3]||(e[3]=a("label",{class:"block text-sm font-medium mb-1 text-gray-700 dark:text-gray-200"},"Senha",-1)),c(a("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>p(o)?o.value=t:null),type:"password",required:"",autocomplete:"current-password",class:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-green-500"},null,512),[[f,s(o)]])]),s(i)?(b(),g("p",S,y(s(i)),1)):C("",!0),a("button",{type:"submit",disabled:s(n),class:"w-full py-2.5 rounded-lg bg-green-700 hover:bg-green-800 text-white font-medium disabled:opacity-60"},y(s(n)?"Entrando…":"Entrar"),9,N)],32),e[5]||(e[5]=a("p",{class:"text-center text-xs text-gray-400 mt-4"},"Acesso restrito a administradores do Cultivar.",-1))])]))}});export{R 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.