PageSourceSearch

https://app.bellacia.com.br/_nuxt/B_99-nma.js

js bellacia.com.br collected 2026-10-04 08:03:06 UTC 4,798 bytes, 1 lines download raw bytes

1import{d as R,bN as U,q as A,v as L,o as n,c as l,Z as O,l as e,t as b,k as g,a as r,C as V,bP as E,n as j,x as I,b as _,j as $,e as T,r as i,A as m}from"./SyGe6PDx.js";import{_ as q}from"./lcBajiXE.js";import{u as F}from"./DwiDTsCi.js";import{o as H,s as P}from"./DJmpmUdj.js";import"./uKi_Pijr.js";const Z={class:"min-h-screen flex flex-col justify-center px-5 py-10 max-w-md mx-auto w-full"},G={key:0,class:"mb-4 px-4 py-3 rounded-2xl bg-red-50 border border-red-200 text-sm text-red-600 text-center"},J={class:"space-y-4"},K={class:"relative"},Q=["type"],W={key:0,class:"text-xs text-red-500 mt-1 ml-1"},X={class:"relative"},Y=["type"],ee={key:0,class:"text-xs text-red-500 mt-1 ml-1"},se={key:1,class:"text-xs text-green-600 mt-1 ml-1 flex items-center gap-1"},te=["disabled"],re={key:0,class:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white"},ce=R({__name:"recover-reset",setup(oe){const k=U(),z=A(),B=F(),o=i(""),a=i(""),f=i(!1),p=i(!1),d=i(!1),c=i("");let x="",C="";L(()=>{x=sessionStorage.getItem("recover_uid")||"",C=sessionStorage.getItem("recover_custom_token")||"",(!x||!C)&&k.replace("/auth/login")});const D=H({password:P().min(6,"Mínimo 6 caracteres"),passwordConfirm:P()}).refine(t=>t.password===t.passwordConfirm,{message:"As senhas não coincidem",path:["passwordConfirm"]}),v=m(()=>D.safeParse({password:o.value,passwordConfirm:a.value})),h=m(()=>o.value&&v.value.error?.flatten().fieldErrors.password?.[0]||""),y=m(()=>a.value&&v.value.error?.flatten().fieldErrors.passwordConfirm?.[0]||""),S=m(()=>!!a.value&&v.value.success),N=m(()=>v.value.success);async function M(){if(N.value){d.value=!0,c.value="";try{const t=await z("/recover/reset-password",{method:"POST",body:{uid:x,newPassword:o.value}});if(!t.success||!t.customToken){c.value=t.message||"Erro ao salvar a senha";return}sessionStorage.removeItem("recover_custom_token"),sessionStorage.removeItem("recover_uid"),await B(t.customToken),await k.replace("/profile")}catch(t){c.value=t?.data?.message||"Erro ao salvar a senha. Tente novamente."}finally{d.value=!1}}}return(t,s)=>{const w=$;return n(),l("div",Z,[s[7]||(s[7]=O('<div class="flex justify-center mb-8"><div class="p-2 w-24 h-24 rounded-full bg-amaranth-100"><div class="w-20 h-20 rounded-full border-4 border-amaranth-500 overflow-hidden"><img class="w-full h-full object-cover" src="'+q+'" alt="Bellacia"></div></div></div><div class="mb-8 text-center"><h1 class="text-2xl font-bold text-gray-900">Nova senha</h1><p class="text-gray-500 text-sm mt-1">Identidade confirmada. Defina sua nova senha.</p></div>',2)),e(c)?(n(),l("div",G,b(e(c)),1)):g("",!0),r("div",J,[r("div",null,[s[4]||(s[4]=r("label",{class:"text-sm font-medium text-gray-700 mb-1 block"},"Nova senha",-1)),r("div",K,[V(r("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>I(o)?o.value=u:null),type:e(f)?"text":"password",placeholder:"Mínimo 6 caracteres",class:j(["w-full h-14 px-4 pr-12 rounded-2xl border bg-gray-50 transition text-gray-900 focus:outline-none focus:ring-2 focus:bg-white",e(h)?"border-red-400 focus:ring-red-400":"border-gray-200 focus:ring-amaranth-500 focus:border-amaranth-500"])},null,10,Q),[[E,e(o)]]),r("button",{type:"button",class:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:s[1]||(s[1]=u=>f.value=!e(f))},[_(w,{name:e(f)?"solar:eye-closed-linear":"solar:eye-linear",size:"20"},null,8,["name"])])]),e(h)?(n(),l("p",W,b(e(h)),1)):g("",!0)]),r("div",null,[s[6]||(s[6]=r("label",{class:"text-sm font-medium text-gray-700 mb-1 block"},"Confirmar senha",-1)),r("div",X,[V(r("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>I(a)?a.value=u:null),type:e(p)?"text":"password",placeholder:"Repita a senha",class:j(["w-full h-14 px-4 pr-12 rounded-2xl border bg-gray-50 transition text-gray-900 focus:outline-none focus:ring-2 focus:bg-white",e(y)?"border-red-400 focus:ring-red-400":e(S)?"border-green-400 focus:ring-green-400":"border-gray-200 focus:ring-amaranth-500 focus:border-amaranth-500"])},null,10,Y),[[E,e(a)]]),r("button",{type:"button",class:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:s[3]||(s[3]=u=>p.value=!e(p))},[_(w,{name:e(p)?"solar:eye-closed-linear":"solar:eye-linear",size:"20"},null,8,["name"])])]),e(y)?(n(),l("p",ee,b(e(y)),1)):e(S)?(n(),l("p",se,[_(w,{name:"solar:check-circle-bold",size:"13"}),s[5]||(s[5]=T(" Senhas coincidem ",-1))])):g("",!0)]),r("button",{class:"w-full h-14 roun
1ded-2xl bg-amaranth-500 text-white font-semibold text-base hover:bg-amaranth-600 active:scale-[0.98] transition-all duration-200 disabled:opacity-50 flex items-center justify-center gap-2",disabled:!e(N)||e(d),onClick:M},[e(d)?(n(),l("span",re)):g("",!0),T(" "+b(e(d)?"Salvando...":"Salvar nova senha"),1)],8,te)])])}}});export{ce 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.