1if(!customElements.get("predictive-search")){class PredictiveSearch extends HTMLElement{constructor(){super();this.input=this.querySelector('input[type="search"]');this.predictiveSearchResults=this.querySelector(".predictive-search");this.input.addEventListener("input",debounce(event=>{this.onChange(event)},100).bind(this))}onChange(){const searchTerm=this.input.value.trim();if(!searchTerm.length){this.close();return}this.getSearchResults(searchTerm)}getSearchResults(searchTerm){fetch(`${routes.predictive_search_url}?q=${searchTerm}&resources[limit]=10§ion_id=predictive-search`).then(response=>{if(!response.ok){var error=new Error(response.status);this.close();throw error}return response.text()}).then(text=>{const resultsMarkup=(new DOMParser).parseFromString(text,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;this.predictiveSearchResults.innerHTML=resultsMarkup;this.open()}).catch(error=>{this.close();throw error})}open(){this.predictiveSearchResults.style.display="block"}close(){this.predictiveSearchResults.style.display="none"}}window.PredictiveSearch=PredictiveSearch;customElements.define("predictive-search",PredictiveSearch)} 2//# sourceMappingURL=predictive-search.js.map
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.