!function(){"use strict";var e=function(e){var t=e.querySelector(".rey-bSlider");if(!rey.util.alreadyLoaded(t)){var r=e.querySelectorAll(".__slide"),o=JSON.parse(t.getAttribute("data-carousel-settings")||"{}"),i=e.querySelectorAll(".rey-card.--video").length,n=function(e){e.setAttribute("src",e.getAttribute("data-video")),e.removeAttribute("data-video")},a=o.transition,d=o.direction;"slide"===a&&o.infinite?a="loop":"scaler"===a?(a="fade",d="ltr"):"fade"===a&&(d="ltr");var s={type:a,direction:d,autoplay:o.autoplay,interval:parseInt(o.interval),speed:parseInt(o.speed),pauseOnHover:o.pause_on_hover,rewind:!0,perPage:1,arrows:!1,pagination:o.pagination,autoWidth:!0};if("ttb"===d&&(s.height=t.querySelector(".splide__list").offsetHeight),o.targetSync){var l=s;return l.customArrows=o.customArrows,void t.setAttribute("data-target-config",JSON.stringify(l))}var c=[];if(o.uniqueID&&(c=document.querySelectorAll('[data-target-sync="'+o.uniqueID+'"]')),i){t.querySelectorAll("[data-video]").forEach((e=>{var t=e.closest(".__slide");t&&(0<rey.dom.getNodeIndex(t)||n(e))}))}rey.hooks.addAction("rey/slider",(e=>{t.isEqualNode(e.element)&&(c.forEach((t=>{var r=JSON.parse(t.getAttribute("data-target-config")||"{}");if(Object.keys(r).length){var o=rey.components.slider({element:t,config:r,mount:!1,customArrows:r.customArrows});o.slider&&(e.slider.sync(o.slider),e.slider.mount(),o.slider.mount())}})),e.slider.on("mounted",(function(){t.classList.remove("--loading")})),e.slider.on("move",(function(e,t){if(i){var o=r[e].querySelector("[data-video]");o&&(o[action](),n(o))}})))})),rey.frontend.inView({target:t,cb:e=>{rey.components.slider({element:e.target,config:s,customArrows:o.customArrows,mount:!c.length,inViewEntry:e})},once:!0})}},t=()=>{document.querySelectorAll(".elementor-widget-reycore-basic-slider").forEach((t=>{new e(t)}))};document.addEventListener("DOMContentLoaded",(()=>{"undefined"!=typeof rey?t():console.error("`rey` is undefined so this script will not run.")})),document.addEventListener("rey/preloader/loaded",(function(){t()})),rey.hooks.addAction("elementor/init",(function(t){t.registerElement({name:"reycore-basic-slider.default",cb:function(t){new e(t[0])}})}))}();