{"version":3,"file":"password_form-f79da94c.js","sources":["../../../app/frontend/javascripts/components/PasswordShowHide.js","../../../app/frontend/entrypoints/pages/users/password_form.js"],"sourcesContent":["class PasswordShowHide {\n  constructor($elem) {\n    this.$elem = $elem;\n    const showHideButton = $elem;\n    this.$targetInput = document.querySelector(showHideButton.dataset.target_input);\n    this.passWordShowHideToggle = this.handleInputShowHideClick.bind(this);\n  }\n\n  async handleInputShowHideClick() {\n    const icon = this.$elem.querySelector(\"i\");\n    const tooltip = this.$elem.querySelector(\".tooltip\");\n    const tooltipInner = tooltip.querySelector(\".tooltip-inner\")\n    let showWords = \"パスワードを表示する\"\n    if(this.$targetInput.type == \"text\"){\n      this.$targetInput.type = \"password\"\n      this.$elem.classList.remove(\"show\");\n      showWords = \"パスワードを表示する\"\n    }else{\n      this.$targetInput.type = \"text\"\n      this.$elem.classList.add(\"show\");\n      showWords = \"パスワードを非表示にする\";\n    }\n    tooltipInner.innerText = showWords;\n    icon.dataset.originalTitle = showWords;\n    $('.tooltip').tooltip('show');\n  }\n\n  async setEvents() {\n    if (this.$elem) {\n      this.$elem.addEventListener('click', this.passWordShowHideToggle);\n    }\n  }\n\n};\nexport default PasswordShowHide;\n","import PasswordShowHide from '../../../javascripts/components/PasswordShowHide';\n\nif (!window?.Coorum) {\n  window.Coorum = {};\n}\nwindow.Coorum.PasswordShowHide = PasswordShowHide;\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  const showHideButtons = document.querySelectorAll('.password_show_hide_icon');\n  showHideButtons.forEach((element) => {\n    const passShowHide = new window.Coorum.PasswordShowHide(element);\n    passShowHide.setEvents();\n  });\n\n});\n"],"names":["PasswordShowHide","$elem","showHideButton","icon","tooltipInner","showWords","element"],"mappings":"AAAA,MAAMA,CAAiB,CACrB,YAAYC,EAAO,CACjB,KAAK,MAAQA,EACb,MAAMC,EAAiBD,EACvB,KAAK,aAAe,SAAS,cAAcC,EAAe,QAAQ,YAAY,EAC9E,KAAK,uBAAyB,KAAK,yBAAyB,KAAK,IAAI,CACtE,CAED,MAAM,0BAA2B,CAC/B,MAAMC,EAAO,KAAK,MAAM,cAAc,GAAG,EAEnCC,EADU,KAAK,MAAM,cAAc,UAAU,EACtB,cAAc,gBAAgB,EAC3D,IAAIC,EAAY,aACb,KAAK,aAAa,MAAQ,QAC3B,KAAK,aAAa,KAAO,WACzB,KAAK,MAAM,UAAU,OAAO,MAAM,EAClCA,EAAY,eAEZ,KAAK,aAAa,KAAO,OACzB,KAAK,MAAM,UAAU,IAAI,MAAM,EAC/BA,EAAY,gBAEdD,EAAa,UAAYC,EACzBF,EAAK,QAAQ,cAAgBE,EAC7B,EAAE,UAAU,EAAE,QAAQ,MAAM,CAC7B,CAED,MAAM,WAAY,CACZ,KAAK,OACP,KAAK,MAAM,iBAAiB,QAAS,KAAK,sBAAsB,CAEnE,CAEH,CC/BK,qBAAQ,SACX,OAAO,OAAS,IAElB,OAAO,OAAO,iBAAmBL,EAEjC,SAAS,iBAAiB,mBAAoB,IAAM,CAC1B,SAAS,iBAAiB,0BAA0B,EAC5D,QAASM,GAAY,CACd,IAAI,OAAO,OAAO,iBAAiBA,CAAO,EAClD,UAAS,CAC1B,CAAG,CAEH,CAAC"}