1class ProductGridAdverts{constructor(){this.adverts=null,this.grid=null,this.init()}init(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.positionAdverts()):this.positionAdverts(),this.observeGridChanges()}positionAdverts(){this.adverts=document.querySelectorAll(".product-grid-adverts-container .product-grid-advert"),this.grid=document.querySelector(".product-grid"),!(!this.grid||this.adverts.length===0)&&(this.adverts.forEach(advert=>{advert instanceof HTMLElement&&this.grid&&(advert.style.display="none",this.grid.appendChild(advert))}),this.adverts.forEach(advert=>{this.positionSingleAdvert(advert)}))}positionSingleAdvert(advert){const position=parseInt(advert.getAttribute("data-position")||"0"),persId=advert.classList.contains("product-grid-advert__pers")?advert.className.match(/product-grid-advert__pers-(\w+)/)?.[1]:null;if(!(advert.classList.contains("product-grid-advert--date-hide")&&!this.isWithinDateRange(advert))&&this.grid){const targetProduct=this.grid.querySelector(`[data-
1position="${position}"]`);targetProduct?(targetProduct.insertAdjacentElement("afterend",advert),advert instanceof HTMLElement&&(advert.style.display="block")):(this.grid.appendChild(advert),advert instanceof HTMLElement&&(advert.style.display="block"))}}isWithinDateRange(advert){return!0}observeGridChanges(){this.grid&&new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.type==="childList"&&setTimeout(()=>this.positionAdverts(),100)})}).observe(this.grid,{childList:!0,subtree:!0}),document.addEventListener("page:loaded",()=>{setTimeout(()=>this.positionAdverts(),100)}),document.addEventListener("facets:updated",()=>{setTimeout(()=>this.positionAdverts(),100)})}}document.addEventListener("DOMContentLoaded",()=>{new ProductGridAdverts}),document.readyState!=="loading"&&new ProductGridAdverts; 2//# sourceMappingURL=/cdn/shop/t/333/assets/custom-product-grid-adverts.js.map?v=80438385664092074281754235140
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.