{"version":3,"file":"js/showPassword-32d62639422939372fbe.js","mappings":"CACqB,WACnBA,QAAQC,IAAI,wBAEZ,IAAMC,EAAgBC,SAASC,iBAAiB,uBAE1CC,EAAeF,SAASC,iBAAiB,qBAC/CJ,QAAQC,IAAII,GACZA,EAAaC,SAAQ,SAACC,EAAKC,GAAYD,EAAIE,iBAAiB,SAAS,WACnB,YAA7CP,EAAcM,GAAOE,aAAa,SACnCR,EAAcM,GAAOG,aAAa,OAAQ,QAC1CN,EAAaG,GAAOI,UAAUC,OAAO,UAErCX,EAAcM,GAAOG,aAAa,OAAQ,YAC3CN,EAAaG,GAAOI,UAAUC,OAAO,QAExC,GACA,GAEF,CACAC","sources":["webpack://mapresselocale/./app/javascript/packs/showPassword.js"],"sourcesContent":["// Toggle password input type to text and back\nconst showPassword = () => {\n console.log(\"Loaded toggle script\")\n\n const passwordField = document.querySelectorAll(\"input.user-password\");\n\n const toggleButton = document.querySelectorAll(\"span.toggleButton\");\n console.log(toggleButton)\n toggleButton.forEach((btn, index) => { btn.addEventListener('click', () => {\n if(passwordField[index].getAttribute(\"type\") == \"password\"){\n passwordField[index].setAttribute(\"type\", \"text\")\n toggleButton[index].classList.toggle('open')\n }else{\n passwordField[index].setAttribute(\"type\", \"password\")\n toggleButton[index].classList.toggle('open')\n }\n })\n })\n\n}\nshowPassword()\n"],"names":["console","log","passwordField","document","querySelectorAll","toggleButton","forEach","btn","index","addEventListener","getAttribute","setAttribute","classList","toggle","showPassword"],"sourceRoot":""}