document.addEventListener("click",function(n){const l=n.target.closest("[data-fct-modal-input-toggle-btn]"),e=n.target.closest("[data-fct-modal-input-control-wrap]");if(!n.target.closest("[data-fct-modal-input-controls]")){if(l&&e){n.preventDefault(),document.querySelectorAll("[data-fct-modal-input-control-wrap]").forEach(c=>{if(c!==e){const d=c.querySelector("[data-fct-modal-input-controls]"),s=c.querySelector("[data-fct-modal-input-toggle-btn]");d&&d.classList.add("fct-hidden"),s&&s.classList.remove("fct-hidden")}});const t=e.querySelector("[data-fct-modal-input-controls]");if(!t)return;l.classList.add("fct-hidden"),t.classList.remove("fct-hidden");const o=t.querySelector("input");o&&o.focus();return}document.querySelectorAll("[data-fct-modal-input-control-wrap]").forEach(t=>{const o=t.querySelector("[data-fct-modal-input-controls]"),c=t.querySelector("[data-fct-modal-input-toggle-btn]");o&&!o.classList.contains("fct-hidden")&&(o.classList.add("fct-hidden"),c&&c.classList.remove("fct-hidden"))})}});
