PageSourceSearch

https://guesswatches.com/cdn/shop/t/421/assets/component-custom-dropdown.js?v=24311370111251462751789653561

js guesswatches.com collected 2026-09-25 23:50:17 UTC 2,269 bytes, 2 lines download raw bytes

1class CustomDropdown extends HTMLElement{loading=!1;constructor(){super(),this._handleToggle=this._handleToggle.bind(this),this.close=this.close.bind(this),this._handleDocumentClick=this._handleDocumentClick.bind(this)}connectedCallback(){this.$toggle=this.querySelector("[data-toggle]"),this._attachListeners()}disconnectedCallback(){this._removeListeners()}static get observedAttributes(){return["open"]}attributeChangedCallback(name){name==="open"&&this._appleState()}get isAccordionMode(){return this.hasAttribute("accordion")}get isOpen(){return this.hasAttribute("open")}_attachListeners(){this.$toggle.addEventListener("click",this._handleToggle),this.addEventListener("change",this._handleUpdateLabel),this.isAccordionMode||(this.addEventListener("change",this.close),document.addEventListener("click",this._handleDocumentClick))}_removeListeners(){this.removeEventListener("change",this.close),this.removeEventListener("change",this._handleUpdateLabel),this.$toggle.removeEventListener("click",this._handleToggle),document.removeEventListener("click",this._handleDocumentClick)}_handleUpdateLabel(e){const dataLabelEl=this.querySelector("[data-toggle]")?.querySelector("[data-label]"),label=dataLabelEl?.dataset?.label||"";if(!dataLabelEl)return;const optionLabel=e.target?.dataset?.inputLabel;dataLabelEl.innerHTML=`${label}: ${optionLabel}`,dataLabelEl.setAttribute("aria-live","polite")}close(){this.removeAttribute("open"),this.$toggle.setAttribute("aria-expanded","false")}open(){this.setAttribute("open","true"),this.$toggle.setAttribute("aria-expanded","true")}_handleToggle(){this.isOpen?this.close():this.open()}_handleDocumentClick(event){this.isOpen&&!this.contains(event.target)&&this.close()}_appleState(){this.classList.toggle("open",this.isOpen)}}document.querySelectorAll(".collection-filters__sort-dropdown-item").forEach(item=>{item.addEventListener("keydown",function(e){if(e.key==="Enter"||e.key===" "){e.preventDefault();let input=this.querySelector('input[type="radio"]');input.checked||(input.checked=!0,input.dispatchEvent(new Event("change",{bubbles:!0})))}})}),window.customElements.define("custom-dropdown",CustomDropdown);
2//# sourceMappingURL=/cdn/shop/t/421/assets/component-custom-dropdown.js.map?v=24311370111251462751789653561

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.