function t_slider__init(e,t){var r=document.getElementById("rec"+e);if(r){var i=r.querySelector("."+t+"__slider");if(i){var n=i.getElementsByClassName(t+"__item");if(n.length){t_slider__calcMaxSlideHeight(t,i);var l=r.querySelector("."+t+"__control_left"),d=r.querySelector("."+t+"__control_right"),a=!1,o=function e(t){a||(a=!0,t_slider__nextSlide(i,n,t).then((function(){a=!1})))};l&&l.addEventListener("click",o.bind(null,"backwards")),d&&d.addEventListener("click",o.bind(null,"forwards"));var s=parseInt(i.getAttribute("data-slide-timeout"),10)||0,u={timeoutId:null},c=t_slider__stopAutoSlides.bind(null,u),_=t_slider__startAutoSlides.bind(null,i,n,s,u),f;if(s){i.addEventListener("mouseenter",c),i.addEventListener("mouseleave",_),i.addEventListener("mousemove",c,{once:!0}),i.addEventListener("touchstart",c);var v=function e(t,r,i){t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",i),t.addEventListener("focus",r),t.addEventListener("blur",i)},m;l&&v(l,c,_),d&&v(d,c,_),new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?(i.setAttribute("data-visible","true"),_()):(i.removeAttribute("data-visible"),c())}))}),{threshold:.1}).observe(i)}r.querySelectorAll("."+t+"__play-btn").forEach((function(e){e.addEventListener("click",t_slider__handlePlayClick.bind(null,i,e,c,t))}));var g=r.querySelector("."+t);g&&["tildaclamp:update","displayChanged"].forEach((function(e){g.addEventListener(e,(function(){t_slider__calcMaxSlideHeight(t,i)}))})),i.addEventListener("wheel",t_throttle((function(){t_slider__handleWheel(i,n)}),300)),window.addEventListener("resize",t_throttle((function(){t_slider__calcMaxSlideHeight(t,i)}),300)),t_slider__dragSlide(t,i),t_slider__initChangeListenerInEditMode(i,n)}}}}function t_slider__dragSlide(e,t){var r=document.getElementById("allrecords"),i;if(!(r&&"edit"===r.getAttribute("data-tilda-mode"))){var n={startScrollLeft:0,startClientX:0,isDragging:!1,minDelta:10},l=function r(i){i.preventDefault();var l=i.clientX-n.startClientX;n.isDragging?(t.scrollLeft=n.startScrollLeft-1.5*l,t.dispatchEvent(new Event("wheel"))):Math.abs(l)>n.minDelta&&(t.classList.add(e+"__slider_dragging"),n.isDragging=!0)},d=function r(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",d),n.startScrollLeft=0,n.startClientX=0,n.isDragging=!1,document.documentElement.style.removeProperty("user-select"),document.documentElement.style.removeProperty("-webkit-user-select"),t.classList.remove(e+"__slider_dragging")};t.addEventListener("mousedown",(function(e){n.startScrollLeft=t.scrollLeft,n.startClientX=e.clientX,document.addEventListener("mousemove",l),document.addEventListener("mouseup",d),document.documentElement.style.setProperty("user-select","none"),document.documentElement.style.setProperty("-webkit-user-select","none")}))}}function t_slider__initChangeListenerInEditMode(e,t){var r=document.getElementById("allrecords"),i,n;r&&"edit"===r.getAttribute("data-tilda-mode")&&"MutationObserver"in window&&new MutationObserver((function(r){r.forEach((function(r){if("childList"===r.type&&(r.addedNodes.length||r.removedNodes.length)){var i=parseInt(e.getAttribute("data-active-slide-index"),10)||0,n=t[i];if(n){var l=window.getComputedStyle(e),d=parseInt(l.getPropertyValue("padding-left"),10)||0;e.scrollLeft=n.offsetLeft-d}}}))})).observe(e,{childList:!0})}function t_slider__startAutoSlides(e,t,r,i){i.timeoutId||"true"!==e.getAttribute("data-visible")||"true"===e.getAttribute("data-video-playing")||(i.timeoutId=window.setTimeout((function(){t_slider__nextSlide(e,t,"forwards").then((function(){i.timeoutId&&(i.timeoutId=null,t_slider__startAutoSlides(e,t,r,i))}))}),r))}function t_slider__stopAutoSlides(e){window.clearTimeout(e.timeoutId),e.timeoutId=null}function t_slider__nextSlide(e,t,r){void 0===r&&(r="forwards");var i=t_slider__getCurrentSlideIndex(t=Array.from(t)),n=t[i],l=t_slider__getNextSlideIndex(e,t,r,i),d=t[l];n.setAttribute("aria-current","false"),d.setAttribute("aria-current","true");var a=window.getComputedStyle(e),o=parseInt(a.getPropertyValue("padding-left"),10)||0;!o&&e.classList.contains("t1148__slider_overflow")&&(o=parseInt(a.getPropertyValue("margin-left"),10)||0);var s=d.offsetLeft-o;return e.setAttribute("data-active-slide-index",l),t_slider__smoothMoveToNextSlide(e,s),new Promise((function(e){var t=600;window.setTimeout(e,t)}))}function t_slider__smoothMoveToNextSlide(e,t,r){if(void 0===r&&(r=600),e){var i=e.scrollLeft,n=t-i;if(n){e.style.scrollSnapType="none";var l=e.scrollLeft,d=performance.now();requestAnimationFrame(a)}}function a(i){var o=i-d,s=Math.min(o/r,1);e.scrollLeft=l+n*t_slider__adjustedEasing(s),s<1?requestAnimationFrame(a):(e.scrollLeft=t,e.style.scrollSnapType="")}}function t_slider__adjustedEasing(e){var t=.05,r=Math.min(e+t*(1-e),1);return r<.5?4*Math.pow(r,3):1-Math.pow(-2*r+2,3)/2}function t_slider__getNextSlideIndex(e,t,r,i){var n="forwards"===r,l,d=i+(n?1:-1),a;if(d>=t.length&&(d=0),d<0&&(d=t.length-1),e.scrollWidth-e.scrollLeft-e.clientWidth<1)if(n)d=0;else for(;d>0;){var o;if(t[d].offsetLeft=a-1&&(s[t]=e,!0)})),c=Math.min.apply(null,u),_=-1,f=0,v=Object.entries(s);fi&&(i=e.clientHeight)})),r.forEach((function(e){var t=e.querySelector(".t-text-clamp__inner");t&&"true"===t.getAttribute("data-expanded")||(e.style.height=i+"px")}))}}