1"use strict";(self.webpackChunkuow1=self.webpackChunkuow1||[]).push([[43],{427(t,i,e){function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function n(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a(s.key),s)}}function a(t){var i=function(t,i){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==s(i)?i:i+""}e.d(i,{default:()=>o});var r=function(){return t=function t(i){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.section=i,this.showPagination="true"===i.dataset.showPagination,this.cardList=i.querySelector("[data-news-cards]"),this.cards=this.cardList?Array.from(this.cardList.querySelectorAll(".news-card, .event-card")):[],this.totalCards=this.cards.length,this.prevBtn=i.querySelector(".news-events-block__arrow--prev"),this.nextBtn=i.querySelector(".news-events-block__arrow--next"),this.dots=Array.from(i.querySelectorAll(".news-events-block__dot")),this.currentPage=0,this.currentCard=0,this.touchStartX=0,this.touchStartY=0,this.resizeTimer=null,this.isTransitioning=!1,this.init()},i=[{key:"totalPages",get:function(){return Math.ceil(this.totalCards/3)}},{key:"isMobile",get:function(){return window.innerWidth<768}},{key:"init",value:function(){0!==this.totalCards&&(this.section.classList.add("is-js-initialized"),this.setupVisibility(),this.bindEvents())}},{key:"setupVisibility",value:function(){this.isMobile?this.activateMobile():this.activateDesktop()}},{key:"activateDesktop",value:function(){this.section.classList.remove("is-mobile-active"),this.cards.forEach(function(t){return t.classList.remove("news-card--hidden")}),this.showPagination?(this.section.classList.add("is-paginated"),this.updateDesktopCards(),this.updateDots(),this.calibrateMinHeight()):this.section.classList.remove("is-paginated")}},{key:"calibrateMinHeight",value:function(){var t=this;if(this.cardList&&!(this.totalPages<=1)){for(var i=0,e=function(){var e=3*s,n=e+3;t.cards.forEach(function(t,i){t.classList.toggle("news-card--hidden",i<e||i>=n)}),i=Math.max(i,t.cardList.offsetHeight)},s=0;s<this.totalPages;s++)e();this.updateDesktopCards(),this.cardList.style.minHeight="".concat(i,"px")}}},{key:"activateMobile",value:function(){this.section.classList.remove("is-paginated"),this.totalCards<=1?this.cards.forEach(function(t){return t.classList.remove("news-card--hidden")}):(this.section.classList.add("is-mobile-active"),this.updateMobileCards(),this.calibrateMobileMinHeight())}},{key:"calibrateMobileMinHeight",value:function(){var t=this;if(this.cardList&&!(this.totalCards<=1)){var i=0;this.cards.forEach(function(t,i){t.classList.toggle("news-card--hidden",0!==i)});for(var e=function(e){t.cards.forEach(function(t,i){t.classList.toggle("news-card--hidden",i!==e)}),i=Math.max(i,t.cardList.offsetHeight)},s=0;s<this.totalCards;s++)e(s);this.updateMobileCards(),this.cardList.style.minHeight="".concat(i,"px")}}},{key:"updateDesktopCards",value:function(){var t=3*this.currentPage,i=t+3;this.cards.forEach(function(e,s){e.classList.toggle("news-card--hidden",s<t||s>=i)})}},{key:"updateMobileCards",value:function(){var t=this;this.cards.forEach(function(i,e){i.classList.toggle("news-card--hidden",e!==t.currentCard)})}},{key:"updateDots",value:function(){var t=this;this.dots.forEach(function(i,e){i.classList.toggle("news-events-block__dot--active",e===t.currentPage)})}},{key:"transition",value:function(t){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"next";!this.isTransitioning&&this.cardList&&(this.isTransitioning=!0,this.section.style.overflowX="clip",this.cardList.classList.add("is-sliding-out-".concat(e)),setTimeout(function(){i.cardList.classList.remove("is-sliding-out-".concat(e));var s="next"===e?"50px":"-50px";i.cardList.style.transition="none",i.cardList.style.transform="translateX(".concat(s,")"),i.cardList.style.opacity="0",t(),i.cardList.offsetWidth,i.cardList.style.transition="",i.cardList.style.transform="",i.cardList.style.opacity="",setTimeout(function(){i.section.style.overflowX="",i.isTransitioning=!1},250)},250))}},{key:"prev",value:function(){var t=this;this.isMobile?this.transition(function(){t.currentCard=(t.currentCard-1+t.totalCards)%t.totalCards,t.updateMobileCards()},"prev"):this.showPagination&&this.transition(function(){t.currentPage=(t.currentPage-1+t.totalPages)%t.totalPages,t.updateDesktopCards(),t.updateDots()},"prev")}},{key:"next",value:function(){var t=this;this.isMobile?this.transition(function(){t.currentCard=(t.currentCard+1)%t.totalCards,t.updateMobileCards()},"next"):this.showPagination&&this.transition(function(){t.currentPage=(t.currentPage+1)%t.totalPages,t.updateDesktopCards(),t.updateDots()},"next")}},{key:"bindEvents",value:function(){var t=this;this.prevBtn&&this.prevBtn.addEventListener("click",function(){return t.prev()}),this.nextBtn&&this.nextBtn.addEventListener("click",function(){return t.next()}),this.cardList&&(this.cardList.addEventListener("touchstart",function(i){return t.onTouchStart(i)},{passive:!0}),this.cardList.addEventListener("touchend",function(i){return t.onTouchEnd(i)},{passive:!0})),window.addEventListener("resize",function(){clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout(function(){return t.handleResize()},150)})}},{key:"onTouchStart",value:function(t){this.touchStartX=t.touches[0].clientX,this.touchStartY=t.touches[0].clientY}},{key:"onTouchEnd",value:function(t){var i=t.changedTouches[0].clientX-this.touchStartX,e=t.changedTouches[0].clientY-this.touchStartY;Math.abs(i)>Math.abs(e)&&Math.abs(i)>=40&&(i<0?this.next():this.prev())}},{key:"handleResize",value:function(){this.currentPage=0,this.currentCard=0,this.cards.forEach(function(t){return t.classList.remove("news-card--hidden")}),this.section.classList.remove("is-paginated","is-mobile-active"),this.cardList&&(this.cardList.style.minHeight=""),this.setupVisibility()}}
1],i&&n(t.prototype,i),e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,e}();function o(){document.querySelectorAll("[data-news-events-pagination]").forEach(function(t){return new r(t)})}}}]);
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.