import{j as e,r as t}from"./react-B_SyE9nW.js";import{s as l,o as n,N as r,n as i,S as s}from"./index-Flm6m8Wj.js";import{F as o}from"./FldText-DdvygvC5.js";import{I as a}from"./InputAdornment-BRv1yX3u.js";import{I as c}from"./index-C6Ujt1Uk.js";function d(e){let t="low",l=0;return e.length>=8&&(e.length<=10?l+=5:e.length<=15?l+=10:e.length<=25?l+=15:e.length>25&&(l+=20),/\d+/g.exec(e)&&(l+=5),/[a-z]+/g.exec(e)&&(l+=5),/[A-Z]+/g.exec(e)&&(l+=5),/[!@#$%^&*)(+=._-]+/g.exec(e)&&(l+=5),t=l<20?"low":l<=30?"medium":"high"),t}const x=l("span")`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
`;const h=n((function({fieldState:t}){return e.jsxs(x,{children:[(null==t?void 0:t.value)?e.jsxs("span",{children:[e.jsx(r,{color:"lightGray",size:"mini",fontStyle:"italic",margin:"0",children:"Fortaleza:"}),e.jsx(r,{color:"red",size:"mini",fontStyle:"italic",margin:"0 0 0 5px",children:i(d(t.value))})]}):null,e.jsx(r,{color:"redError",size:"mini",fontStyle:"italic",alignSelf:"flex-start",margin:"0",align:"start",children:(null==t?void 0:t.hasError)?null==t?void 0:t.error:""})]})}));function m(t){return e.jsx(s,{...t,children:e.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})})}function p(t){return e.jsx(s,{...t,children:e.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 001 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})})}const u=n((function({showStrength:l,placeholder:n,...r}){const[i,s]=t.useState(!1);return e.jsx(o,{autoComplete:"current-password",...r,type:i?"text":"password",InputProps:{endAdornment:e.jsx(a,{position:"end",children:e.jsx(c,{"aria-label":"toggle password visibility",onClick:()=>s(!i),edge:"end",children:i?e.jsx(p,{}):e.jsx(m,{})})}),placeholder:n},...l?{helperText:e.jsx(h,{fieldState:r.fieldState})}:{}})}));export{u as F};