1import{E as e}from"./shared-import-splide.esm.bundle.min.js";const t=function(e){e.forEach((e=>{const t=e.slide;t.matches(".is-visible")?t.removeAttribute("inert"):t.setAttribute("inert","")}))};function i(i){const{on:o,off:n,bind:r,unbind:d}=e(i);function a(e){const t=i.Components.Slides.filter((t=>t.slide.dataset.mediaId===e.toString()));t.length&&i.go(t[0].index)}function s(e){const t=i.Components.Slides.getAt(e);if(!t)return;const o=t.slide;let n=o.querySelector("[data-product-single-media-wrapper]").offsetHeight;if(i.root.hasAttribute("data-two-slides-visible-on-mobile")&&window.matchMedia("(max-width: 989px").matches){const e=o.nextElementSibling;if(null!==e){const t=e.querySelector("[data-product-single-media-wrapper]").offsetHeight;n=t>n?t:n}}i.root.querySelector(".splide__track").style.maxHeight=n+"px"}i.root.addEventListener("click",(e=>{e.target.classList.contains("splide__pagination__page")&&(i.paginationClicked=!0)})),r(document.body,"shapes:product:variantchange",(e=>{if(!e.target.contains(i.root))return;a(e.detail.variant.featured_media.id)}));const c=debounce((e=>{s(i.index)}),150);function l(){i.root.querySelectorAll("[inert]").forEach((e=>{e.removeAttribute("inert")})),i.root.querySelectorAll("[aria-hidden]").forEach((e=>{e.removeAttribute("aria-hidden")})),d(document.body,"shapes:product:variantchange")}function u(){!0===i.options.destroy?l():t(i.Components.Slides.get())}function m(e){!0===e.destroy&&l()}function p(){i.root.dataset.firstMedia&&a(i.root.dataset.firstMedia),s(i.index)}function f(e,o){t(i.Components.Slides.get());const n=i.Components.Slides,r=n.getAt(o).slide.querySelector("[data-product-single-media-wrapper]"),d=n.getAt(e).slide.querySelector("[data-product-single-media-wrapper]");r&&r.dispatchEvent(new CustomEvent("mediaHidden")),d&&d.dispatchEvent(new CustomEvent("mediaVisible"))}function g(e){s(e)}return r(window,"resize",c),{mount(){o("mounted",p),o("mounted moved",u),o("moved",f),o("move",g),o("destroy",l),o("updated",m)}}}export{i as SplideProduct};
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.