1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["question","answer","collapsedIcon","expandedIcon","questionText"];connect(){requestAnimationFrame(()=>this.checkUrlParameter()),this.handleFaqLinkClick=this.handleFaqLinkClick.bind(this),document.addEventListener("click",this.handleFaqLinkClick)}disconnect(){document.removeEventListener("click",this.handleFaqLinkClick)}handleFaqLinkClick(e){const s=e.target.closest("[data-faq-open]");s&&(e.preventDefault(),this.openFaqByName(s.dataset.faqOpen))}toggle(e){e.preventDefault();const s=e.currentTarget.dataset.questionId,t=this.findAnswerByQuestionId(s);t?t.classList.contains("hidden")?(this.closeAllAnswers(),this.openAnswer(s)):this.closeAnswer(s):console.warn("Answer element not found for question:",s)}openAnswer(e){const s=this.findAnswerByQuestionId(e),t=this.findCollapsedIconByQuestionId(e),n=this.findExpandedIconByQuestionId(e),i=this.findQuestionTextByQuestionId(e);s&&s.classList.remove("hidden"),t&&t.classList.add("hidden"),n&&n.classList.remove("hidden"),i&&i.classList.add("faq-question-active")}closeAnswer(e){const s=this.findAnswerByQuestionId(e),t=this.findCollapsedIconByQuestionId(e),n=this.findExpandedIconByQuestionId(e),i=this.findQuestionTextByQuestionId(e);s&&s.classList.add("hidden"),t&&t.classList.remove("hidden"),n&&n.classList.add("hidden"),i&&i.classList.remove("faq-question-active")}closeAllAnswers(){this.answerTargets.forEach(e=>{e.classList.add("hidden")}),this.collapsedIconTargets.forEach(e=>{e.classList.remove("hidden")}),this.expandedIconTargets.forEach(e=>{e.classList.add("hidden")}),this.questionTextTargets.forEach(e=>{e.classList.remove("faq-question-active")})}findAnswerByQuestionId(e){return this.answerTargets.find(s=>s.dataset.questionId===e)}findCollapsedIconByQuestionId(e){return this.collapsedIconTargets.find(s=>s.dataset.questionId===e)}findExpandedIconByQuestionId(e){return this.expandedIconTargets.find(s=>s.dataset.questionId===e)}findQuestionTextByQuestionId(e){return this.questionTextTargets.find(s=>s.dataset.questionId===e)}checkUrlParameter(){const e=new URLSearchParams(window.location.search).get("faq");e&&this.openFaqByName(e)}openFaqByName(e){const s=document.getElementById(e);if(!s)return void console.warn("FAQ not found:",e);const t=s.dataset.questionId;this.openAnswer(t),setTimeout(()=>{s.scrollIntoView({behavior:"smooth",block:"center"})},300)}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.