1import{S as n}from"./SixComponent.DNN3GcJ4.js";import{B as r}from"./BodyScrollLock.CCFCr-sX.js";import"./index.D8TntI4h.js";class c extends n{constructor(){super(),this.toggleBtn=null,this.hiddenGridField=null,this.toggleTextOpen=null,this.toggleTextClose=null,this.form=null,this.boundToggleForm=this.toggleForm.bind(this),this.boundHandleClearBtnClick=s=>this.handleClearBtnClick(s)}init(){if(this.toggleBtn=this.element.querySelector(".six-projects-filter__toggle-btn"),this.toggleTextOpen=this.element.querySelector(".six-projects-filter__toggle-btn-open"),this.toggleTextClose=this.element.querySelector(".six-projects-filter__toggle-btn-close"),this.form=this.element.querySelector("form"),!this.toggleBtn||!this.form)return;this.toggleBtn.addEventListener("click",this.boundToggleForm,!1),this.updateToggleText(),document.querySelectorAll(".six-projects-filter__clear-btn")?.forEach(e=>{this.form&&e.addEventListener("click",t=>this.boundHandleClearBtnClick(t),!1)}),setTimeout(()=>{this.toggleBtn.classList.remove("is-hidden")},500)}handleClearBtnClick(s){if(s.preventDefault(),!this.form)return;this.form?.reset?.();const e=this.form.getAttribute("data-schema-name"),t=window.location.origin+"/"+e,l=new URLSearchParams(window.location.search).get("grid");l?window.location.href=`${t}?grid=${l}`:window.location.href=t}toggleForm(){this.isFormActive?(this.isFormActive=!1,this.element.classList.remove("is-active"),r.addScrollbars()):(this.isFormActive=!0,this.element.classList.add("is-active"),r.removeScrollbars())}updateToggleText(){const s=this.form.querySelectorAll('input[type="checkbox"]:checked'),e=[];s.forEach(t=>{const i=t.closest("label");if(i){const l=i.querySelector("span");if(l){const o=l.textContent.trim();o!==""&&e.push(o)}}}),e.length===0?(this.toggleTextOpen.textContent="Filter",this.toggleBtn.classList.remove("has-selection")):(e.length===1?this.toggleTextOpen.textContent=e[0]:this.toggleTextOpen.innerHTML=`${e[0]}… +${e.length-1}`,this.toggleBtn.classList.add("has-selection"))}unmount(){this.toggleBtn.removeEventListener("click",this.boundToggleForm,!1),document.querySelectorAll(".six-projects-filter__clear-btn")?.forEach(e=>{this.form&&e.removeEventListener("click",t=>this.boundHandleClearBtnClick(t),!1)})}}customElements.get("six-projects-filter")||customElements.define("six-projects-filter",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.