import{c as a}from"./chunk-4DM2YKGF.js";function l(i=!1){return t=>{let r=t.value,e=t.errors||{};if(i||r!=null&&r!==""){let s=a.validate(r||"");s.inputTooShort?e.inputTooShort=!0:delete e.inputTooShort,s.numbersMissing?e.numbersMissing=!0:delete e.numbersMissing,s.specialCharactersMissing?e.specialCharactersMissing=!0:delete e.specialCharactersMissing,s.lowercaseCharactersMissing?e.lowercaseCharactersMissing=!0:delete e.lowercaseCharactersMissing,s.uppercaseCharactersMissing?e.uppercaseCharactersMissing=!0:delete e.uppercaseCharactersMissing,s.isValid?delete e.passwordStrength:e.passwordStrength=!0}else delete e.inputTooShort,delete e.numbersMissing,delete e.specialCharactersMissing,delete e.lowercaseCharactersMissing,delete e.uppercaseCharactersMissing,delete e.passwordStrength;return e}}export{l as a};
