1window.Eurus.loadedScript.includes("recently-viewed.js")||(window.Eurus.loadedScript.push("recently-viewed.js"),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xProductRecently",{show:!1,productsToShow:0,productsToShowMax:10,init(){document.getElementById("shopify-section-recently-viewed")&&(this.productsToShow=document.getElementById("shopify-section-recently-viewed").getAttribute("x-products-to-show"))},showProductRecently(){localStorage.getItem("recently-viewed")?.length?this.show=!0:this.show=!1},setProduct(productViewed){let productList=[];if(localStorage.getItem("recently-viewed")?.length){productList=JSON.parse(localStorage.getItem("recently-viewed")),productList=[...productList.filter(p=>p!==productViewed)].filter((p,i)=>i<this.productsToShowMax),this.show=!0;let newData=[productViewed,...productList];localStorage.setItem("recently-viewed",JSON.stringify(newData))}else this.show=!1,localStorage.setItem("recently-viewed",JSON.stringify([productViewed]))},getProductRecently(sectionId,productId){let products=[];if(localStorage.getItem("recently-viewed")?.length)products=JSON.parse(localStorage.getItem("recently-viewed")),products=productId?[...products.filter(p=>p!==productId)]:products,products=products.slice(0,this.productsToShow);else return;const el=document.getElementById("shopify-section-recently-viewed");let query=products.map(value=>"id:"+value).join(" OR ");var search_url=`${Shopify.routes.root}search?section_id=${sectionId}&type=product&q=${query}`;fetch(search_url).then(response=>{if(!response.ok){var error=new Error(response.status);throw console.log(error),error}return response.text()}).then(text=>{const resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-recently-viewed").innerHTML;el.innerHTML=resultsMarkup}).catch(error=>{throw error})},clearStory(){var result=confirm("Are you sure you want to clear your recently viewed products?");result===!0&&(localStorage.removeItem("recently-viewed"),this.show=!1)}})})})); 2//# sourceMappingURL=/cdn/shop/t/61/assets/recently-viewed.js.map?v=41221641966589273261748761078
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.