1import{e as c}from"./chunk-UWFWQZHK.js";var l,u=c(()=>{l=class extends HTMLElement{constructor(){super(),this.savedCarouselHTML=null,this.savedCarouselControllerHTML=null,this.boundLayout=this.onLayout.bind(this)}connectedCallback(){window.addEventListener("resize",this.boundLayout),this.changingState()}disconnectedCallback(){window.removeEventListener("resize",this.boundLayout)}onLayout(){this.changingState()}isMobile(){return window.innerWidth<=768}changingState(){if((this.dataset.mobileDisplayType||"carousel")!=="stack")return;let e=this.querySelector(".callout-banner__mobile-products");if(this.isMobile()){let s=e==null?void 0:e.querySelector("theme-carousel"),r=e==null?void 0:e.querySelector("[data-callout-carousel-controller]");if(!s||!r||!e||e.querySelector(".callout-banner__stack"))return;e.removeChild(s),e.removeChild(r),this.savedCarouselHTML=s.outerHTML,this.savedCarouselControllerHTML=r.outerHTML;let t=document.createElement("div");t.classList.add("callout-banner__stack"),t.innerHTML=s.innerHTML;let n=this.dataset.productsHeadingId;n&&(t.setAttribute("role","region"),t.setAttribute("aria-labelledby",n));let o=t.querySelector("[js-carousel]");o&&(o.classList.remove("swiper"),o.classList.remove("!pr-3"));let a=t.querySelector(".swiper-wrapper");a&&(a.classList.remove("swiper-wrapper"),a.classList.add("grid","grid-cols-2","gap-5")),t.querySelectorAll(".swiper-slide").forEach(i=>{i.classList.remove("swiper-slide")}),e.appendChild(t),document.dispatchEvent(new CustomEvent("callout-banner:layout-changed"))}else{let s=e==null?void 0:e.querySelector(".callout-banner__stack");if(!s||!e)return;e.removeChild(s),this.savedCarouselHTML&&this.savedCarouselControllerHTML&&(e.insertAdjacentHTML("beforeend",this.savedCarouselHTML),e.insertAdjacentHTML("beforeend",this.savedCarouselControllerHTML),document.dispatchEvent(new CustomEvent("callout-banner:layout-changed")))}}}});u();export{l as CalloutBanner};
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.