https://www.vervecoffee.com/cdn/shop/t/596/compiled_assets/scripts.js?v=4188087303803516181789999730
1(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");i<s.length;i++)__sections__[s[i]]=!0})(),(function(){if(!(!__sections__["featured-product"]&&!Shopify.designMode))try{customElements.get("product-modal")||customElements.define("product-modal",class extends ModalDialog{constructor(){super()}hide(){super.hide()}show(opener){super.show(opener),this.showActiveMedia()}showActiveMedia(){this.querySelectorAll(`[data-media-id]:not([data-media-id="${this.openedBy.getAttribute("data-media-id")}"])`).forEach(element=>{element.classList.remove("active")});const activeMedia=this.querySelector(`[data-media-id="${this.openedBy.getAttribute("data-media-id")}"]`),activeMediaTemplate=activeMedia.querySelector("template"),activeMediaContent=activeMediaTemplate?activeMediaTemplate.content:null;activeMedia.classList.add("active"),activeMedia.scrollIntoView();const container=this.querySelector('[role="document"]');container.scrollLeft=(activeMedia.width-container.clientWidth)/2,activeMedia.nodeName=="DEFERRED-MEDIA"&&activeMediaContent&&activeMediaContent.querySelector(".js-youtube")&&activeMedia.loadContent()}})}catch(e){console.error(e)}})(),(function(){if(__sections__["main-cart-footer"])try{class CartNote extends HTMLElement{constructor(){super(),this.addEventListener("change",debounce(event=>{const body=JSON.stringify({note:event.target.value});fetch(`${routes.cart_update_url}`,{...fetchConfig(),body})},300))}}customElements.define("cart-note",CartNote)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["product-recommendation-rebuy"]&&!Shopify.designMode))try{class ProductRecommendationsRB extends HTMLElement{constructor(){super(),this.container=this.querySelector("#holder"),this.data=JSON.parse(this.querySelector('[type="application/json"]').innerHTML);const handleIntersection=(entries,observer)=>{if(!entries[0].isIntersecting)return;observer.unobserve(this);const requestParameters=new URLSearchParams({shopify_product_ids:this.dataset.product,limit:this.dataset.limit,key:"f6a16942d8da6398fc33001d8a63f4b7da04a15d"}),endpoint=window.location.href.includes("/products/")?"recommended":"top_sellers";fetch(`https://rebuyengine.com/api/v1/products/${endpoint}?${requestParameters}`).then(response=>response.json()).then(data=>this.getRecommandationsTpl(data)).catch(e=>{console.error(e)})};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}getRecommandationsTpl(d){if(d.data.length==0)return;this.data.config.limit=d.data.length;let url=this.dataset.url,products="";d.data.forEach(val=>{products+=`id:${val.id} OR `}),url=url+encodeURIComponent(products),fetch(url).then(response=>response.text()).then(text=>{for(const[key,value]of Object.entries(this.data.config))text=this.replaceAll(text,`{${key}}`,value);const html=new DOMParser().parseFromString(text,"text/html").querySelector("#container");html.querySelectorAll("product-card").length>0?this.container.innerHTML=html.innerHTML:this.classList.add("hidden")}).catch(e=>{console.error(e)})}replaceAll(string,search,replace){return string.split(search).join(replace)}}customElements.define("product-recommendations-rb",ProductRecommendationsRB)}catch(e){console.error(e)}})(),(function(){if(__sections__["product-recommendations"])try{class ProductRecommendations extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML)}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}})()})(); 2//# sourceMappingURL=/cdn/shop/t/596/compiled_assets/scripts.js.map?v=4188087303803516181789999730
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.