1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f307-0313-75f3-bb0f-bc13df5c44dc")}catch(e){}}();class Dropdown { 2 constructor(dropdown) { 3 this.$dropdown = $(dropdown); 4 this.$placeholder = this.$dropdown.find(".js-dropdown-placeholder"); 5 this.$trigger = this.$dropdown.find(".js-dropdown-trigger"); 6 this.$items = this.$dropdown.find(".js-dropdown-item"); 7 this.$trigger.on("click", () => { 8 this.$dropdown.toggleClass("expanded"); 9 }); 10 this.$items.on("click activate", (e) => this.updatePlaceholder(e.target)); 11 $(document).on("click", (e) => this.handleClickOnDOM(e.target)); 12 } 13 updatePlaceholder(el) { 14 if (this.$placeholder) { 15 const value = el.innerHTML; 16 this.$placeholder.html(value); 17 } 18 this.$dropdown.removeClass("expanded"); 19 } 20 handleClickOnDOM(target) { 21 if (!this.$dropdown.is(target) && this.$dropdown.has(target).length === 0 && this.$dropdown.hasClass("expanded")) { 22 this.$dropdown.removeClass("expanded"); 23 } 24 } 25} 26export { 27 Dropdown as default 28}; 29 30//# chunkId=01a0f307-0313-75f3-bb0f-bc13df5c44dc
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.