window.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".wp-block-vistrom-slider");e&&e.forEach((function(e){var i;if(!e.id)return;const t={...e.dataset};let a="";var n,s;if(t.transitionTimingFunction&&(a+=`#${e.id} { --vistrom-slider-transition-timing-function: ${t.transitionTimingFunction}; } `),t.aspectRatio&&"true"===t.aspectRatio&&(a+=`#${e.id} .swiper-slide { aspect-ratio: ${null!==(n=t.aspectRatioX)&&void 0!==n?n:1} / ${null!==(s=t.aspectRatioY)&&void 0!==s?s:1}; } `),t.navigation&&"true"===t.navigation&&(a+=`#${e.id} ~ .swiper-button-next, #${e.id} ~ .swiper-button-prev { display: flex; } `),t.breakpoints&&"true"===t.breakpoints&&(t.breakpointsIncludeMedium&&"true"===t.breakpointsIncludeMedium&&(a+=`@media (min-width: ${t.breakpointMedium||768}px) and (max-width: ${t.breakpointLarge?t.breakpointLarge-1:1024}px) { #${e.id} ~ .swiper-button-next, #${e.id} ~ .swiper-button-prev { display: ${t.navigationMedium&&"true"===t.navigationMedium?"flex":"none"}; } } `),a+=`@media (min-width: ${t.breakpointLarge||1024}px) { #${e.id} ~ .swiper-button-next, #${e.id} ~ .swiper-button-prev { display: ${t.navigationLarge&&"true"===t.navigationLarge?"flex":"none"}; } } `),a.length>0){const e=document.createElement("style");e.textContent=a;const i=document.head||document.getElementsByTagName("head")[0];i?.appendChild(e)}let r={slidesPerView:t.slidesPerViewDefault?+t.slidesPerViewDefault:2,spaceBetween:t.spaceBetweenDefault?+t.spaceBetweenDefault:10,centeredSlides:t.centered&&"true"===t.centered||!1,slidesOffsetBefore:t.slidesOffsetBeforeDefault?+t.slidesOffsetBeforeDefault:0,slidesOffsetAfter:t.slidesOffsetAfterDefault?+t.slidesOffsetAfterDefault:0,speed:t.speed?+t.speed:300,loop:t.loop&&"true"===t.loop||!1,autoplay:!(!t.autoplay||"true"!==t.autoplay)&&{delay:t.autoplayDelay?+t.autoplayDelay:2e3,disableOnInteraction:t.autoplayDisableOnInteraction&&"true"===t.autoplayDisableOnInteraction||!1,pauseOnMouseEnter:t.autoplayPauseOnMouseEnter&&"true"===t.autoplayPauseOnMouseEnter||!1},allowTouchMove:!(t.disableSwiping&&"true"===t.disableSwiping),grabCursor:t.grabCursor&&"true"===t.grabCursor||!1,pagination:{el:`.${e.id}-pagination.swiper-pagination`,type:null!==(i=t.paginationType)&&void 0!==i?i:"bullets",enabled:t.pagination&&"true"===t.pagination||!1},navigation:{nextEl:`.${e.id}-navigation.swiper-button-next`,prevEl:`.${e.id}-navigation.swiper-button-prev`,enabled:t.navigation&&"true"===t.navigation||!1}};if(t.breakpoints&&"true"===t.breakpoints){let e={};t.breakpointsIncludeMedium&&"true"===t.breakpointsIncludeMedium&&(e[t.breakpointMedium?+t.breakpointMedium:768]={slidesPerView:t.slidesPerViewMedium?+t.slidesPerViewMedium:2,spaceBetween:t.spaceBetweenMedium?+t.spaceBetweenMedium:0,slidesOffsetBefore:t.slidesOffsetBeforeMedium?+t.slidesOffsetBeforeMedium:0,slidesOffsetAfter:t.slidesOffsetAfterMedium?+t.slidesOffsetAfterMedium:0,pagination:{enabled:t.paginationMedium&&"true"===t.paginationMedium},navigation:{enabled:t.navigationMedium&&"true"===t.navigationMedium}}),e[t.breakpointLarge?+t.breakpointLarge:1024]={slidesPerView:t.slidesPerViewLarge?+t.slidesPerViewLarge:3,spaceBetween:t.spaceBetweenLarge?+t.spaceBetweenLarge:0,slidesOffsetBefore:t.slidesOffsetBeforeLarge?+t.slidesOffsetBeforeLarge:0,slidesOffsetAfter:t.slidesOffsetAfterLarge?+t.slidesOffsetAfterLarge:0,pagination:{enabled:t.paginationLarge&&"true"===t.paginationLarge},navigation:{enabled:t.navigationLarge&&"true"===t.navigationLarge}},r.breakpoints=e}new Swiper(`.swiper#${e.id}`,r)}))}));