import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{r as t,w as n}from"./vendor-primevue-DGevbYGF.js";import{A as r,Bt as i,D as a,F as o,I as s,O as c,R as l,Rt as u,S as d,Ut as f,_t as p,et as m,j as h,kt as g}from"./vendor-vue-core-BdhYaYlO.js";import{n as _}from"./vendor-i18n-JubCsGQ_.js";var v={class:`mb-2 flex items-center justify-between`},y={class:`text-base font-medium opacity-80`,for:`comfy-org-sign-up-password`},b={class:`flex flex-col gap-1`},x={key:0,class:`text-sm`},S={class:`mt-1 space-y-1`},C={class:`mb-2 text-base font-medium opacity-80`,for:`comfy-org-sign-up-confirm-password`},w={key:0,class:`text-red-500`},T=l({__name:`PasswordFields`,setup(e){let{t:l}=_(),T=g(``),E=a(()=>({length:T.value.length>=8&&T.value.length<=32,uppercase:/[A-Z]/.test(T.value),lowercase:/[a-z]/.test(T.value),number:/\d/.test(T.value),special:/[^A-Za-z0-9]/.test(T.value)}));return(e,a)=>(m(),h(d,null,[s(u(t),{name:`password`,class:`flex flex-col gap-2`},{default:p(e=>[c(`div`,v,[c(`label`,y,f(u(l)(`auth.signup.passwordLabel`)),1)]),s(u(n),{modelValue:T.value,"onUpdate:modelValue":a[0]||=e=>T.value=e,"input-id":`comfy-org-sign-up-password`,"pt:pc-input-text:root:autocomplete":`new-password`,name:`password`,feedback:!1,"toggle-mask":``,placeholder:u(l)(`auth.signup.passwordPlaceholder`),class:i([{"p-invalid":e.invalid},`h-10`]),fluid:``},null,8,[`modelValue`,`placeholder`,`class`]),c(`div`,b,[e.dirty||e.invalid?(m(),h(`small`,x,[o(f(u(l)(`validation.password.requirements`))+`: `,1),c(`ul`,S,[c(`li`,{class:i({"text-red-500":!E.value.length})},f(u(l)(`validation.password.minLength`)),3),c(`li`,{class:i({"text-red-500":!E.value.uppercase})},f(u(l)(`validation.password.uppercase`)),3),c(`li`,{class:i({"text-red-500":!E.value.lowercase})},f(u(l)(`validation.password.lowercase`)),3),c(`li`,{class:i({"text-red-500":!E.value.number})},f(u(l)(`validation.password.number`)),3),c(`li`,{class:i({"text-red-500":!E.value.special})},f(u(l)(`validation.password.special`)),3)])])):r(``,!0)])]),_:1}),s(u(t),{name:`confirmPassword`,class:`flex flex-col gap-2`},{default:p(e=>[c(`label`,C,f(u(l)(`auth.login.confirmPasswordLabel`)),1),s(u(n),{name:`confirmPassword`,"input-id":`comfy-org-sign-up-confirm-password`,"pt:pc-input-text:root:autocomplete":`new-password`,feedback:!1,"toggle-mask":``,placeholder:u(l)(`auth.login.confirmPasswordPlaceholder`),class:i([{"p-invalid":e.invalid},`h-10`]),fluid:``},null,8,[`placeholder`,`class`]),e.error?(m(),h(`small`,w,f(e.error.message),1)):r(``,!0)]),_:1})],64))}});export{T as t};
//# sourceMappingURL=PasswordFields-BxbA3nrO.js.map