1(()=>{class e extends HTMLElement{constructor(){super(),this.getAllProductCards=this.getAllProductCards.bind(this),this.checkIfClickedOutside=this.checkIfClickedOutside.bind(this),this.bindEvents()}bindEvents(){this.getAllProductCards(),this.checkIfClickedOutside()}checkIfClickedOutside(){document.addEventListener("click",e=>{var t=document.querySelector(".inspiration-slide-out");!t.querySelector(".two-column-image-and-text__container")?.contains(e.target)&&t.className.includes("slide-in")&&(t.classList.remove("slide-in"),t.classList.add("slide-out"))})}scrapeProductData(s,a){var r=new XMLHttpRequest;r.open("GET",a,!0),r.onload=function(){if(200<=r.status&&r.status<400){var e=r.responseText,e=(new DOMParser).parseFromString(e,"text/html").querySelectorAll(".two-column-image-and-text");let t=document.querySelector(".inspiration-slide-out"),i=document.querySelector(".inspiration-slide-out__wrapper");e?.forEach(e=>{e.getAttribute("data-variant-value")==s&&(e=e,i.innerHTML=e.innerHTML,t.classList.remove("slide-out"),t.classList.add("slide-in"),t.style.display="block",i.querySelector(".two-column-image-and-text__left").innerHTML+=`<div class='two-column-image-and-text__button'><a href='${a}' class='two-column-image-and-text__cta body--two'>View Product</a></div>`)})}},r.send()}getAllProductCards(){document.addEventListener("click",e=>{var i=e.target,t=i.getAttribute("class");if("svg"==i.tagName||"path"==i.tagName){var s=i.closest(".made-by__icon"),i=i.closest(".inspiration-slide-out__close-button");if(null!=s){var s=e.target.closest(".plp-product-card__columns"),a=s?.querySelector('input[type="radio"]:checked');if(null!=a&&a.getAttribute("name").includes("Shade")){let e=a.getAttribute("data-value"),t=s.querySelector(".plp-product-card__engraving");t=t.getAttribute("href"),this.scrapeProductData(e,t)}}null!=i&&((a=document.querySelector(".inspiration-slide-out")).classList.remove("slide-in"),a.classList.add("slide-out"))}else if(t?.includes("made-by__icon")){s=e.target.closest(".plp-product-card__columns"),i=s?.querySelector('input[type="radio"]:checked');if(null!=i&&i.getAttribute("name").includes("Shade")){let e=i.getAttribute("data-value"),t=s.querySelector(".plp-product-card__engraving");t=t.getAttribute("href"),this.scrapeProductData(e,t)}}})}}customElements.get("section-inspiration-slide-out")||customElements.define("section-inspiration-slide-out",e)})();
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.