1class c extends HTMLElement{constructor(){super(),this.initialise()}initialise(){this.querySelectorAll("[data-accordion-item]").forEach(t=>{t.querySelector("button").addEventListener("click",this.handleOnClick.bind(this))});const e=this.querySelectorAll("[data-accordion-item-open]");e&&this.toggleItem(e)}toggleItem(e){if(!e)return;const t=e.length?[...e]:[e];[...this.children].forEach(s=>{t.includes(s)?s.classList.contains("active")?this.closeItem(s):this.openItem(s):this.closeItem(s)})}handleOnClick(e){e.preventDefault();const t=e.target.closest("[data-accordion-item]");this.toggleItem(t)}openItem(e){if(!e)return;e.classList.add("active");const t=e.querySelector("[content]");t&&(t.style.maxHeight=`${t.scrollHeight}px`)}closeItem(e){e&&(e.classList.remove("active"),e.querySelector("[content]")&&(e.querySelector("[content]").style.maxHeight="0px"))}closeAll(){this.querySelectorAll("[data-accordion-item]").forEach(e=>this.closeItem(e))}}customElements.define("accordion-items",c);
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.