1(()=>{"use strict";(()=>{class t{constructor(t){var e,i,s;this.root=t,this.mobileMenuToggle=this.root.querySelector(".mobile-menu-toggle"),this.searchToggle=this.root.querySelector(".thermo-header-nav-search-toggle"),this.mobileMenuOverlay=this.root.parentElement.querySelector(".mobile-menu-overlay"),this.mobileMenuPanel=this.root.parentElement.querySelector(".mobile-menu-panel"),this.expandableMenuItems=this.mobileMenuPanel.querySelectorAll(".menu-item.has-submenu"),this.searchOverlay=this.root.parentElement.querySelector(".search-overlay"),this.searchForm=null==(e=this.searchOverlay)?void 0:e.querySelector(".search-form"),this.searchInput=null==(i=this.searchOverlay)?void 0:i.querySelector(".search-input"),this.searchCloseButton=null==(s=this.searchOverlay)?void 0:s.querySelector(".search-close"),this.expandableDesktopButtons=this.root.querySelectorAll(".thermo-header-nav-links .menu-item.has-sub-menu > button"),this.body=document.body,this.trapFocusHandler=null,this.isMobileMenuOpen=!1,this.isSearchOverlayOpen=!1,this.init()}init(){this.bindEvents(),this.setupAccessibility(),this.setupDesktopDropdowns()}setupDesktopDropdowns(){this.expandableDesktopButtons.forEach(t=>{const e=t.parentElement,i=e.querySelector(".thermo-header-nav-sub-menu");if(!i)return;e.addEventListener("mouseenter",()=>{i.classList.add("active"),i.removeAttribute("inert"),i.removeAttribute("hidden"),t.setAttribute("aria-expanded","true")}),e.addEventListener("mouseleave",()=>{i.classList.remove("active"),i.setAttribute("inert",""),i.setAttribute("hidden",""),t.setAttribute("aria-expanded","false")}),t.addEventListener("focus",()=>{i.classList.add("active"),i.removeAttribute("inert"),i.removeAttribute("hidden"),t.setAttribute("aria-expanded","true")}),e.addEventListener("focusout",s=>{setTimeout(()=>{const{relatedTarget:r}=s;r&&!e.contains(r)?(i.classList.remove("active"),i.setAttribute("inert",""),i.setAttribute("hidden",""),t.setAttribute("aria-expanded","false")):r||e.contains(document.activeElement)||(i.classList.remove("active"),i.setAttribute("inert",""),i.setAttribute("hidden",""),t.setAttribute("aria-expanded","false"))},100)});const s=`submenu-${Math.random().toString(36).substr(2,9)}`;i.setAttribute("id",s),i.setAttribute("inert",""),i.setAttribute("hidden",""),t.setAttribute("aria-controls",s)})}bindEvents(){this.mobileMenuToggle&&this.mobileMenuToggle.addEventListener("click",t=>{t.preventDefault(),this.toggleMobileMenu()}),this.mobileMenuOverlay&&this.mobileMenuOverlay.addEventListener("click",t=>{t.target===this.mobileMenuOverlay&&(t.preventDefault(),this.closeMobileMenu())});this.root.querySelectorAll(".mobile-menu-item.has-submenu .mobile-menu-link").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault();const e=t.currentTarget.closest(".has-submenu");e&&this.toggleSubmenu(e)})}),this.searchToggle&&this.searchToggle.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.toggleSearchOverlay()}),this.searchCloseButton&&this.searchCloseButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.closeSearchOverlay()}),this.searchOverlay&&this.searchOverlay.addEventListener("click",t=>{(t.target===this.searchOverlay||this.searchForm&&!this.searchForm.contains(t.target))&&(t.preventDefault(),this.closeSearchOverlay())}),document.addEventListener("click",t=>{if(this.isSearchOverlayOpen&&this.searchOverlay){const e=t.target===this.searchToggle||this.searchToggle.contains(t.target);this.searchOverlay.contains(t.target)||e||this.closeSearchOverlay()}}),this.searchForm&&this.searchForm.addEventListener("submit",t=>this.handleSearchSubmit(t)),window.addEventListener("keydown",t=>{"Escape"===t.key&&(this.isSearchOverlayOpen?this.closeSearchOverlay():this.isMobileMenuOpen&&this.closeMobileMenu())}),window.addEventListener("resize",()=>{this.handleResize()}),this.expandableMenuItems.forEach(t=>{const e=t.querySelector(".mobile-menu-link");e&&e.addEventListener("click",e=>{e.preventDefault(),this.toggleSubmenu(t)})})}toggleMobileMenu(){this.mobileMenuToggle&&this.mobileMenuOverlay&&this.mobileMenuPanel&&(this.mobileMenuToggle.classList.contains("active")?this.closeMobileMenu():(this.mobileMenuToggle.classList.add("active"),this.mobileMenuOverlay.classList.add("active"),this.mobileMenuPanel.classList.add("active"),this.body.classList.add("no-scroll"),this.isMobileMenuOpen=!0,this.setupAccessibility(),setTimeout(()=>{const t=this.mobileMenuPanel.querySelector(".mobile-menu-link");t&&t.focus()},300),this.trapFocus(this.mobileMenuPanel)))}
1closeMobileMenu(){if(!this.mobileMenuToggle||!this.mobileMenuOverlay||!this.mobileMenuPanel)return;this.mobileMenuToggle.classList.remove("active"),this.mobileMenuOverlay.classList.remove("active"),this.mobileMenuPanel.classList.remove("active"),this.body.classList.remove("no-scroll"),this.isMobileMenuOpen=!1,this.setupAccessibility();this.root.querySelectorAll(".mobile-menu-item.has-submenu").forEach(t=>{t.classList.remove("active")}),this.mobileMenuToggle.focus(),this.trapFocusHandler&&(this.mobileMenuPanel.removeEventListener("keydown",this.trapFocusHandler),this.trapFocusHandler=null)}toggleSubmenu(t){const e=t.classList.contains("active");this.root.querySelectorAll(".mobile-menu-item.has-submenu").forEach(e=>{e!==t&&e.classList.remove("active")}),e?t.classList.remove("active"):t.classList.add("active");const i=t.querySelector(".mobile-menu-link"),s=t.querySelector(".mobile-submenu");i&&i.setAttribute("aria-expanded",!e),!e&&s&&setTimeout(()=>{const t=s.querySelector("a");t&&t.focus()},100)}toggleSearchOverlay(){this.searchOverlay&&(this.searchOverlay.classList.contains("active")?this.closeSearchOverlay():(this.searchOverlay.classList.add("active"),this.body.classList.add("no-scroll"),this.isSearchOverlayOpen=!0,this.setupAccessibility(),setTimeout(()=>{this.searchInput&&this.searchInput.focus()},300)))}closeSearchOverlay(){this.searchOverlay&&(this.searchOverlay.classList.remove("active"),this.body.classList.remove("no-scroll"),this.isSearchOverlayOpen=!1,this.setupAccessibility(),this.searchToggle&&this.searchToggle.focus())}handleSearchSubmit(t){if(!this.searchInput)return!0;return""!==this.searchInput.value.trim()||(t.preventDefault(),this.searchInput.focus(),!1)}setupAccessibility(){this.mobileMenuToggle&&(this.mobileMenuToggle.setAttribute("aria-expanded",this.isMobileMenuOpen.toString()),this.mobileMenuToggle.setAttribute("aria-controls","mobile-menu-panel")),this.searchToggle&&(this.searchToggle.setAttribute("aria-expanded",this.isSearchOverlayOpen.toString()),this.searchToggle.setAttribute("aria-controls","search-overlay")),this.mobileMenuPanel&&(this.mobileMenuPanel.setAttribute("id","mobile-menu-panel"),this.mobileMenuPanel.setAttribute("role","dialog"),this.mobileMenuPanel.setAttribute("aria-modal","true"),this.mobileMenuPanel.setAttribute("aria-hidden",(!this.isMobileMenuOpen).toString()),this.mobileMenuPanel.setAttribute("tabindex",this.isMobileMenuOpen?"0":"-1"),this.isMobileMenuOpen?this.mobileMenuPanel.removeAttribute("inert"):this.mobileMenuPanel.setAttribute("inert","true")),this.searchOverlay&&(this.searchOverlay.setAttribute("id","search-overlay"),this.searchOverlay.setAttribute("role","dialog"),this.searchOverlay.setAttribute("aria-modal","true"),this.searchOverlay.setAttribute("aria-labelledby","search-title"),this.searchOverlay.setAttribute("aria-hidden",(!this.isSearchOverlayOpen).toString()),this.searchOverlay.setAttribute("tabindex",this.isSearchOverlayOpen?"0":"-1"),this.isSearchOverlayOpen?this.searchOverlay.removeAttribute("inert"):this.searchOverlay.setAttribute("inert","true"));this.root.querySelectorAll(".mobile-menu-item.has-submenu .mobile-menu-link").forEach(t=>{t.setAttribute("aria-expanded","false"),t.setAttribute("aria-haspopup","true")});this.root.querySelectorAll(".mobile-submenu").forEach(t=>{t.setAttribute("role","menu")});this.root.querySelectorAll(".mobile-submenu-link").forEach(t=>{t.setAttribute("role","menuitem")})}trapFocus(t){const e=Array.from(t.querySelectorAll('a, button, input, textarea, select, [tabindex]:not([tabindex="-1"])')),i=e[0],s=e[e.length-1];i&&s&&(this.trapFocusHandler=t=>{"Tab"===t.key&&(t.shiftKey?document.activeElement===i&&(t.preventDefault(),s.focus()):document.activeElement===s&&(t.preventDefault(),i.focus()))},t.addEventListener("keydown",this.trapFocusHandler))}handleResize(){window.innerWidth>768&&this.isMobileMenuOpen&&this.closeMobileMenu()}}class e{constructor(t){this.element=t,this.video=t.querySelector(".video-player"),this.posterOverlay=t.querySelector(".video-poster-overlay"),this.playButton=t.querySelector(".video-play-button"),this.sources=this.video?Array.from(this.video.querySelectorAll("source")):[],this.desktopMatchMedia=window.matchMedia("(min-width: 768px)"),this.intersectionObserver=null,this.userIntendsPlay=!1,this.hasLoadedSource=!1,this.isEmbedded=!!t.querySelector("iframe"),this.isAmbient="true"===this.element.getAttribute("data-is-ambient"),this.init()}init(){(this.video||this.isEmbedded)&&(this.isEmbedded||this.video.setAttribute("inert",""),this.bindEvents(),this.handleDesktopViewportChange(this.desktopMatchMedia.matches))}bindEvents(){this.playButton&&this.playButton.addEventListener("click",t=>{t.preventDefault(),this.isEmbedded?this.playVideo():this.isPlaying()?this.pauseVideo():this.playVideo()}),this.posterOverlay&&this.posterOverlay.addEventListener("click",t=>{t.preventDefault(),this.playVideo()}),this.video&&(this.video.addEventListener("play",()=>{this.userIntendsPlay=!0,this.hidePoster(),this.setAccessibleState(!0)}),this.video.addEventListener("pause",()=>{this.isAmbient&&this.showPoster(),this.setAccessibleState(!1)}),this.video.addEventListener("ended",()=>{this.showPoster()}),this.video.addEventListener("keydown",t=>{this.handleKeyboard(t)}),this.video.addEventListener("focus",()=>{this.element.classList.add("focused")}),this.video.addEventListener("blur",()=>{this.element.classList.remove("focused")})),this.desktopMatchMedia.addEventListener?this.desktopMatchMedia.addEventListener("change",t=>{this.handleDesktopViewportChange(t.matches)}):this.desktopMatchMedia.addListener&&this.desktopMatchMedia.addListener(t=>{this.handleDesktopViewportChange(t.matches)}),this.intersectionObserver=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&this.video&&(this.video.hasAttribute("autoplay")&&(this.video.muted=!0,this.video.setAttribute("playsinline","")),this.loadVideoSources(this.desktopMatchMedia.matches),this.intersectionObserver.unobserve(this.element))})},{threshold:.01}),this.intersectionObserver.observe(this.element)}loadVideoSources(t){if(this.isEmbedded)return;const e=this.sources.find(t=>t.hasAttribute("data-desktop")),i=this.sources.find(t=>t.hasAttribute("data-mobile"));let s="";if(t){if(!e)return;s=e.dataset.src||""}else{const t=this.video.currentSrc||this.video.getAttribute("src")||"";if(i)s=i.dataset.src||"";else{if(t)return;if(!e)return;s=e.dataset.src||""}}if(!s)return;const r=this.video.currentSrc||this.video.getAttribute("src")||"";if(r&&-1!==r.indexOf(s))return;const n=!this.video.paused&&!this.video.ended,a=this.video.currentTime||0,o=n||this.userIntendsPlay||this.video.hasAttribute("autoplay");this.video.src=s,this.video.load();const l=()=>{this.video.removeEventListener("loadedmetadata",l);try{this.video.currentTime=a}catch(t){console.error(t)}};this.video.addEventListener("loadedmetadata",l,{once:!0});const h=()=>{this.video.removeEventListener("loadeddata",h),o&&(this.video.hasAttribute("autoplay")&&(this.video.muted=!0,this.video.setAttribute("playsinline","")),this.video.play().catch(t=>{console.error(t)}))};this.video.addEventListener("loadeddata",h,{once:!0}),this.hasLoadedSource=!0}handleDesktopViewportChange(t){this.loadVideoSources(t)}setAccessibleState(t){this.playButton.setAttribute("aria-label",t?"Pause video":"Play video"),this.playButton.setAttribute("aria-pressed",t?"true":"false")}playVideo(){this.isEmbedded?this.hidePoster():(this.userIntendsPlay=!0,this.video.paused&&this.video.play().catch(t=>{console.error("Error playing video:",t),this.showError("Unable to play video")}))}pauseVideo(){this.video.paused||this.video.pause()}hidePoster(){var t,e,i;if(!this.posterOverlay)return;this.posterOverlay.classList.add("playing"),this.element.classList.add("video-playing");const s=this.element.closest(".secondary-hero");if(s){const t=s.querySelector(".secondary-hero__content");
1if(!t)return;t.setAttribute("aria-hidden","true")}this.isAmbient||(null==(t=this.video)||t.removeAttribute("inert"),null==(e=this.video)||e.setAttribute("tabindex","0"),null==(i=this.video)||i.focus())}showPoster(){var t,e,i;if(!this.posterOverlay)return;this.posterOverlay.classList.remove("playing"),this.element.classList.remove("video-playing");const s=this.element.closest(".secondary-hero");if(s){const t=s.querySelector(".secondary-hero__content");if(!t)return;t.setAttribute("aria-hidden","false")}this.isAmbient||(null==(t=this.video)||t.setAttribute("inert",""),null==(e=this.video)||e.setAttribute("tabindex","-1"),null==(i=this.playButton)||i.focus())}handleKeyboard(t){switch(t.key){case" ":case"Enter":t.preventDefault(),this.playVideo();break;case"Escape":this.pauseVideo()}}showError(t){const e=document.createElement("div");e.className="video-error",e.textContent=t,e.style.cssText="\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 1rem;\n border-radius: 4px;\n z-index: 10;\n ",this.element.appendChild(e),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},5e3)}play(){this.playVideo()}pause(){this.pauseVideo()}getCurrentTime(){return this.video.currentTime}getDuration(){return this.video.duration}setCurrentTime(t){this.video.currentTime=t}isPlaying(){return!this.video.paused&&!this.video.ended}isPaused(){return this.video.paused}}document.addEventListener("DOMContentLoaded",()=>{});class i{static get MIN_Z(){return-40}static get Z_STEP(){return 5}constructor(t){var e;this.root=t,this.container=t.querySelector(".video-carousel-container")||t,this.wrapper=t.querySelector(".video-carousel-wrapper"),this.slides=Array.from(t.querySelectorAll(".video-carousel-card")),this.trackContainer=t.querySelector(".track-container[data-swipeable]"),this.track=t.querySelector(".video-carousel-track"),this.prevButton=t.querySelector(".carousel-prev"),this.nextButton=t.querySelector(".carousel-next"),this.modal=t.parentNode.querySelector("#modal"),this.visibleCount=1,this.isAnimatedLayout=(null==(e=this.wrapper)?void 0:e.classList.contains("layout-animated"))||!1,this.isAnimating=!1,this.animationTimeout=null,this.resizeRaf=null,this.scrollRaf=null,this.trackShift=0,this.handleResize=this.handleResize.bind(this),this.calculateShiftToCenter=this.calculateShiftToCenter.bind(this),this.duplicateCards=new Set,this.slideStep=0,this.init()}get currentIndex(){return this.track&&Number(this.track.dataset.current)||0}set currentIndex(t){this.track&&(this.track.dataset.current=t)}get isDesktopView(){return window.innerWidth>=1280}init(){if(this.track&&0!==this.slides.length)if(this.prevButton&&this.prevButton.addEventListener("click",()=>this.navigate(-1)),this.nextButton&&this.nextButton.addEventListener("click",()=>this.navigate(1)),window.addEventListener("thermo-modal-loaded",t=>{this.handleModalLoaded(t.detail.block)}),this.trackContainer&&this.trackContainer.addEventListener("swipe",({detail:t})=>{if(!this.isAnimatedLayout||!this.isDesktopView)return;const{direction:e}=t;"left"===e?this.nextButton&&!this.nextButton.disabled&&this.navigate(1):"right"===e&&this.prevButton&&!this.prevButton.disabled&&this.navigate(-1)}),this.root.addEventListener("keydown",t=>{const{activeElement:e}=document,i=e&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable);this.root.contains(e)&&!i&&("ArrowLeft"===t.key?(t.preventDefault(),this.prevButton&&!this.prevButton.disabled&&this.navigate(-1)):"ArrowRight"===t.key&&(t.preventDefault(),this.nextButton&&!this.nextButton.disabled&&this.navigate(1)))}),this.calculateLayout(),window.addEventListener("resize",this.handleResize),this.isAnimatedLayout){this.initializeDuplicates();const t=Math.floor(this.slides.length/2);this.currentIndex=t,this.updateSlideScales(t),this.updateScroll(t,{immediate:!0}),this.updateButtonStates()}else this.updateScroll(0,{immediate:!0}),this.updateTabindex(),this.updateButtonStates(),this.track.addEventListener("scroll",this.handleTrackScroll.bind(this))}handleModalNavigation(t){var e,i;if(!this.modal)return;
1const s=null==(e=this.modal.querySelector("[data-video-id]"))?void 0:e.dataset.videoId;if(!s)return;const r=Array.from(this.track.querySelectorAll(".video-carousel-card:not(.carousel-duplicate)"));if(0===r.length)return;const n=r.findIndex(t=>{var e;return(null==(e=t.querySelector(".modal-open"))?void 0:e.dataset.id)===s});if(-1===n)return;const a=n+t;let o;o=a<0?r.length-1:a>=r.length?0:a;const l=r[o];l&&(null==(i=l.querySelector(".modal-open"))||i.click())}calculateLayout(){if(!this.track||!this.slides.length)return;const t=this.track.getBoundingClientRect(),e=this.slides[0].getBoundingClientRect();let i=e.width;if(this.slides.length>1){i+=this.slides[1].getBoundingClientRect().left-e.right}this.slideStep=i>0?i:e.width,this.visibleCount=Math.max(1,Math.floor(t.width/this.slideStep))}normalizeIndex(t,e=null){const i=null!==e?e:this.slides.length||0;return 0===i?0:(t%i+i)%i}createDuplicateCard(t){const e=t.cloneNode(!0);e.classList.add("carousel-duplicate"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");return e.querySelectorAll("button, a, [tabindex]").forEach(t=>{t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")}),e}hideDuplicateCard(t){const e=t;e.style.opacity="0",e.style.visibility="hidden",e.style.pointerEvents="none",e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");e.querySelectorAll("button, a, [tabindex]").forEach(t=>{const e=t.getAttribute("tabindex");e&&"-1"!==e&&t.setAttribute("data-original-tabindex",e),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")})}showDuplicateCard(t){const e=t;e.style.opacity="",e.style.visibility="",e.style.pointerEvents="",e.classList.remove("carousel-duplicate")}removeAllDuplicates(){this.track.querySelectorAll(".carousel-duplicate").forEach(t=>{t.remove()}),this.duplicateCards.forEach(t=>{t.parentNode===this.track&&t.remove()}),this.duplicateCards.clear()}createEndDuplicates(){if(0===this.slides.length)return;if(1===this.slides.length)return;const t=this.slides.filter(t=>!this.duplicateCards.has(t));if(!t.length)return;const e=[],i=[];t.slice(-2).forEach(t=>{const i=this.createDuplicateCard(t);e.push(i)});t.slice(0,2).forEach(t=>{const e=this.createDuplicateCard(t);i.push(e)}),e.forEach(t=>{this.track.insertBefore(t,this.track.firstChild),this.duplicateCards.add(t),this.hideDuplicateCard(t)}),i.forEach(t=>{this.track.appendChild(t),this.duplicateCards.add(t),this.hideDuplicateCard(t)})}initializeDuplicates(){this.isAnimatedLayout&&this.track&&0!==this.slides.length&&(this.removeAllDuplicates(),this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")),this.createEndDuplicates(),this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")))}calculateShiftToCenter(t){if(!this.track||!this.slides.length)return 0;const e=this.slides[t];if(!e)return 0;const i=this.container&&this.container.getBoundingClientRect()||this.wrapper&&this.wrapper.getBoundingClientRect()||this.track.getBoundingClientRect(),s=e.getBoundingClientRect();return i.left+i.width/2-(s.left+s.width/2)}handleResize(){this.resizeRaf&&window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.calculateLayout(),this.isAnimatedLayout&&this.initializeDuplicates(),this.updateScroll(this.currentIndex,{immediate:!0}),this.updateSlideScales(this.currentIndex),this.updateTabindex(),this.updateButtonStates()})}handleTrackScroll(){this.scrollRaf&&window.cancelAnimationFrame(this.scrollRaf),this.scrollRaf=window.requestAnimationFrame(()=>{this.scrollRaf=null,this.updateButtonStates()})}navigate(t){if(this.track&&this.slides.length&&t)if(this.isAnimatedLayout){this.animateRolodexTransition(t);const e=this.track.querySelector(".current button");e&&e.focus({focusVisible:!0})}else{const e=t*this.slideStep;this.track.scrollBy({left:e,behavior:"smooth"})}}animateRolodexTransition(t){if(this.isAnimating)return;if(!this.slideStep)return void this.reorderSlides(t);const e=(this.trackShift||0)+(this.isAnimatedLayout?this.calculateShiftToCenter(this.currentIndex):0),i=new Map;
1this.slides.forEach(t=>{i.set(t,t.getBoundingClientRect())}),this.reorderSlides(t,{skipScrollUpdate:!0});const s=new Map;this.slides.forEach(t=>{s.set(t,t.getBoundingClientRect())});const r=e,n=t*this.slideStep,a=r+n;this.isAnimating=!0,this.slides.forEach(t=>{const e=i.get(t),r=s.get(t);let n=0;e&&r&&(n=e.top-r.top),t.style.setProperty("--flip-x","0px"),t.style.setProperty("--flip-y",`${n}px`)}),this.setTrackShift(a),this.track.offsetHeight;const o=()=>{this.slides.forEach(t=>{t.style.removeProperty("--flip-x"),t.style.removeProperty("--flip-y")}),this.isAnimating=!1,this.track.classList.remove("is-transitioning"),this.updateSlideScales(this.currentIndex),this.isAnimatedLayout&&0!==this.track.scrollLeft&&(this.track.scrollLeft=0)};this.track.addEventListener("transitionend",t=>{this.isAnimating&&t.target===this.track&&o()},{once:!0}),requestAnimationFrame(()=>{this.slides.forEach(t=>{t.style.setProperty("--flip-x","0px"),t.style.setProperty("--flip-y","0px")}),this.track.classList.add("is-transitioning"),this.setTrackShift(r)}),window.setTimeout(()=>{this.isAnimating&&o()},800)}reorderSlides(t,e={}){const{preserveSlide:i=null,skipScrollUpdate:s=!1}=e;let r=null;if(i&&"function"==typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),this.isAnimatedLayout&&this.slides.length>0){if(this.slides.filter(t=>!this.duplicateCards.has(t)).length<=1)return this.removeAllDuplicates(),1===t?this.track.appendChild(this.slides[0]):-1===t&&this.track.insertBefore(this.slides[this.slides.length-1],this.track.firstChild),this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")),this.currentIndex=Math.floor(this.slides.length/2),this.updateSlideScales(this.currentIndex),this.updateScroll(this.currentIndex,{immediate:!0}),void this.updateButtonStates();if(this.removeAllDuplicates(),this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")),1===t){const t=this.slides[0];this.track.appendChild(t)}else if(-1===t){const t=this.slides[this.slides.length-1];this.track.insertBefore(t,this.track.firstChild)}this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")),this.createEndDuplicates(),this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card"))}else 1===t?this.track.appendChild(this.slides[0]):-1===t&&this.track.insertBefore(this.slides[this.slides.length-1],this.track.firstChild);if(this.slides=Array.from(this.track.querySelectorAll(".video-carousel-card")),this.isAnimatedLayout){const t=this.slides.filter(t=>!this.duplicateCards.has(t));if(t.length>0){const e=t[Math.floor(t.length/2)],i=this.slides.indexOf(e);this.currentIndex=i>=0?i:Math.floor(this.slides.length/2)}else this.currentIndex=Math.floor(this.slides.length/2)}else this.currentIndex=Math.floor(this.slides.length/2);if(r&&i&&"function"==typeof i.getBoundingClientRect){const t=i.getBoundingClientRect(),e=r.left-t.left;e&&this.setTrackShift(this.trackShift+e)}this.updateSlideScales(this.currentIndex),s||this.updateScroll(this.currentIndex,{immediate:!0}),this.updateButtonStates()}setTrackShift(t){this.track&&!Number.isNaN(t)&&(this.trackShift=t,this.track.style.setProperty("--carousel-shift",`${t}px`))}updateTabindex(){if(!this.slides.length)return;const t=this.isDesktopView,e=this.isAnimatedLayout&&t;this.slides.filter(t=>!this.duplicateCards.has(t)).forEach(t=>{const i=t.classList.contains("current");e?t.querySelectorAll("button").forEach(t=>{t.setAttribute("tabindex",i?"0":"-1")}):t.querySelectorAll("button").forEach(t=>{t.setAttribute("tabindex","0")})})}updateSlideScales(t){const e=this.isAnimatedLayout?this.slides.filter(t=>!this.duplicateCards.has(t)):this.slides;if(0===e.length)return;const s=this.slides[t];if(!s)return;let r=s;if(this.isAnimatedLayout&&this.duplicateCards.has(s)){const t=Math.floor(e.length/2);r=e[t]||e[0]}const n=e.indexOf(r);-1!==n&&(this.slides.forEach((s,r)=>{if(this.isAnimatedLayout&&this.duplicateCards.has(s))return;const a=e.indexOf(s);if(-1===a)return;const o=Math.abs(a-n),l=Math.min(o,e.length-o),h=Math.max(i.MIN_Z,-l*i.Z_STEP);s.style.setProperty("--depth",`${h}px`),s.style.setProperty("--saturation",""+(1-.3*l)),s.classList.toggle("current",r===t),s.style.setProperty("--z",`${h}`)}),this.updateTabindex())}updateScroll(t,{immediate:e=!1}={}){if(!this.track||!this.slides.length)return;const i=this.slides[t];
1if(!i)return;if(this.isAnimatedLayout){if(0!==this.track.scrollLeft&&(this.track.scrollLeft=0),!this.isAnimating){const e=this.calculateShiftToCenter(t);e&&this.setTrackShift(this.trackShift+e)}return}const{clientWidth:s,scrollWidth:r}=this.track,n=s,a=i.clientWidth,o=i.offsetLeft,l=r-n;let h;0===t?h=0:t===this.slides.length-1?h=l:(h=o-(n-a)/2,h=Math.max(0,Math.min(h,l))),this.track.scrollTo({left:h,behavior:e?"auto":"smooth"})}updateButtonStates(){if(!this.prevButton||!this.nextButton||!this.slides.length)return;const t=1===this.slides.length;if(this.isAnimatedLayout)this.prevButton.disabled=t,this.nextButton.disabled=t;else{const{scrollLeft:e,scrollWidth:i,clientWidth:s}=this.track,r=2,n=e<=r,a=e>=i-s-r;this.prevButton.disabled=t||n,this.nextButton.disabled=t||a}}handleModalLoaded(t){if(!this.modal)return;if(!t||"video"!==t)return;const i=this.modal.querySelector(".component-video");i&&(i.videoPlayer=new e(i),this.modalPrevButton=this.modal?this.modal.querySelector(".prev-button"):null,this.modalNextButton=this.modal?this.modal.querySelector(".next-button"):null,this.modalPrevButton&&this.modalPrevButton.addEventListener("click",()=>this.handleModalNavigation(-1)),this.modalNextButton&&this.modalNextButton.addEventListener("click",()=>this.handleModalNavigation(1)))}}class s{constructor(t){this.root=t,this.items=Array.from(this.root.querySelectorAll("[data-expandable-grid-item]")),this.showMoreButton=this.root.parentElement.querySelector(".show-more-button"),this.visibleCount=this.interval||3,this.totalCount=this.items.length,this.resizeObserver=null,this.init()}get interval(){return parseInt(this.root.dataset.initialVisible,10)}get breakpoint(){return this.root.dataset.breakpoint?parseInt(this.root.dataset.breakpoint,10):1280}get gridGapHeight(){const t=window.getComputedStyle(this.root).getPropertyValue("grid-row-gap");return parseFloat(t)||0}cardHeight(t=0){const e=this.items[t];if(!e)return 0;const{height:i}=e.getBoundingClientRect();return parseFloat(i)||0}init(){this.showMoreButton.addEventListener("click",()=>this.showMore()),this.root.addEventListener("cards-updated",()=>{this.onViewportChange()}),this.resizeObserver=new ResizeObserver(()=>this.onViewportChange()),this.resizeObserver.observe(this.root),this.resizeGrid(this.visibleCount),this.updateVisibility()}onViewportChange(){this.raf&&cancelAnimationFrame(this.raf),this.raf=requestAnimationFrame(()=>{window.innerWidth>=this.breakpoint?(this.items.forEach(t=>{t.removeAttribute("inert")}),this.root.style.maxHeight=""):(this.resizeGrid(this.visibleCount),this.updateVisibility())})}showMore(){this.visibleCount+=this.interval,this.visibleCount>this.totalCount&&(this.visibleCount=this.totalCount),this.resizeGrid(this.visibleCount),this.updateVisibility()}computeMaxHeight(t){if(t<=0)return 0;let e=0;for(let i=0;i<t;i+=1)e+=this.cardHeight(i),e+=i<t-1?this.gridGapHeight:0;return e}resizeGrid(t){const e=this.computeMaxHeight(t);this.root.style.maxHeight=`${e}px`}updateVisibility(){this.items.forEach((t,e)=>{e>=this.visibleCount?t.setAttribute("inert",!0):t.removeAttribute("inert")}),this.showMoreButton.setAttribute("aria-hidden",this.visibleCount>=this.totalCount),this.showMoreButton.setAttribute("tabindex",this.visibleCount>=this.totalCount?-1:0)}}document.addEventListener("DOMContentLoaded",()=>{window.logoGrids=window.logoGrids||[];document.querySelectorAll("[data-expandable-grid]").forEach(t=>{window.logoGrids.push(new s(t))})});class r{constructor(t){this.root=t,this.modal=t,this.openButtons=t.parentElement.querySelectorAll(".modal-open"),this.modalContent=this.modal.querySelector(".content"),this.closeButton=this.modal.querySelector(".modal-close"),this.handleOpenClick=this.handleOpenClick.bind(this),this.handleCloseClick=this.handleCloseClick.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleModalClose=this.handleModalClose.bind(this),this.handleEscapeKey=this.handleEscapeKey.bind(this),this.init()}init(){this.modal&&this.modalContent&&this.bindEvents()}bindEvents(){this.openButtons.forEach(t=>{t.addEventListener("click",this.handleOpenClick)}),this.closeButton.addEventListener("click",this.handleCloseClick),this.modal.addEventListener("close",this.handleModalClose),this.modal.addEventListener("click",this.handleBackdropClick),document.addEventListener("keydown",this.handleEscapeKey)}handleOpenClick(t){t.preventDefault(),this.openModal(t)}handleCloseClick(){this.modal.close()}handleBackdropClick(t){t.target===this.modal&&this.closeModal()}handleModalClose(){this.modalContent&&this.modalContent.replaceChildren()}handleEscapeKey(t){"Escape"===t.key&&this.modal&&this.modal.open&&this.handleCloseClick()}
1notifyModelContentLoaded(t){const e=new CustomEvent("thermo-modal-loaded",{detail:{block:t}});window.dispatchEvent(e)}openModal(t){return e=this,i=null,s=function*(){const e=t.target.closest(".modal-open");if(!e||!this.root.parentElement.contains(e))return;const{id:i,block:s}=e.dataset;if(!i||!s)return;let r="undefined"!=typeof ajaxData&&ajaxData.modal_error_message?ajaxData.modal_error_message:"Error loading content.";if(this.modalContent){const t=document.createElement("div");t.className="modal-loading";const e=document.createElement("span");e.className="loader",t.appendChild(e),this.modalContent.replaceChildren(t)}this.modal&&this.modal.showModal();const n="undefined"!=typeof ajaxData&&ajaxData.ajax_url?ajaxData.ajax_url:"/wp/wp-admin/admin-ajax.php",a="undefined"!=typeof ajaxData&&ajaxData.nonce?ajaxData.nonce:"";try{const t=new FormData;t.append("action","thermo_render_block"),t.append("post_id",i),t.append("block",s),t.append("nonce",a);const e=yield fetch(n,{method:"POST",body:t});let o;const l=e.headers.get("content-type");if(o=l&&l.includes("application/json")?yield e.json():yield e.text(),"object"==typeof o&&!1===o.success)return o.data&&o.data.message&&(r=o.data.message),this.modalContent&&(this.modalContent.textContent=r),void(this.modal&&this.modal.classList.add("modal-error"));if(!o||"string"==typeof o&&""===o.trim())return this.modalContent&&(this.modalContent.textContent=r),void(this.modal&&this.modal.classList.add("modal-error"));if(this.modal&&this.modal.classList.remove("modal-error"),(!l||!l.includes("text/html")&&!l.includes("text/plain")&&l.includes("application/json"))&&"object"==typeof o)return this.modalContent&&(this.modalContent.textContent=r),void(this.modal&&this.modal.classList.add("modal-error"));const h="string"==typeof o?o:JSON.stringify(o);if(!this.modalContent||!this.modalContent.classList.contains("content"))return this.modalContent&&(this.modalContent.textContent=r),void(this.modal&&this.modal.classList.add("modal-error"));{const t=this.sanitizeHtmlToNodes(h);if(!t)return this.modalContent.textContent=r,void(this.modal&&this.modal.classList.add("modal-error"));this.modalContent.replaceChildren(...t)}this.closeButton&&this.closeButton.focus(),this.notifyModelContentLoaded(s)}catch(t){let e=r;t.message&&(e=t.message.length<200?t.message:r),this.modalContent&&(this.modalContent.textContent=e),this.modal&&this.modal.classList.add("modal-error")}},new Promise((t,r)=>{var n=t=>{try{o(s.next(t))}catch(t){r(t)}},a=t=>{try{o(s.throw(t))}catch(t){r(t)}},o=e=>e.done?t(e.value):Promise.resolve(e.value).then(n,a);o((s=s.apply(e,i)).next())});var e,i,s}closeModal(){this.modal&&this.modal.close()}sanitizeHtmlToNodes(t){if("string"!=typeof t||""===t.trim())return null;try{const e=(new DOMParser).parseFromString(t,"text/html"),{body:i}=e;if(!i)return null;i.querySelectorAll("script").forEach(t=>t.remove());i.querySelectorAll("*").forEach(t=>{Array.from(t.attributes).forEach(e=>{e.name.startsWith("on")&&e.name.length>2&&t.removeAttribute(e.name)})});const s=/^[\s]*[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT][:]/;return i.querySelectorAll("[href], [src]").forEach(t=>{const e=t.getAttribute("href"),i=t.getAttribute("src");e&&s.test(e)&&t.removeAttribute("href"),i&&s.test(i)&&t.removeAttribute("src")}),Array.from(i.childNodes)}catch(t){return null}}}class n{constructor(t){this.root=t,this.cards=Array.from(this.root.querySelectorAll(".leadership-card")),this.titles=Array.from(this.root.querySelectorAll(".leadership-title")),this.init()}init(){if(!this.cards.length||!this.titles.length)return;window.addEventListener("resize",()=>this.equalizeHeights());const t=this.root.parentElement.querySelector(".show-more-button");t&&t.addEventListener("click",()=>{requestAnimationFrame(()=>this.equalizeHeights())}),this.mutationObserver=new MutationObserver((t,e)=>{let i=null;t.forEach(t=>{"attributes"!==t.type&&"style"!==t.attributeName||(i&&clearTimeout(i),i=setTimeout(()=>{this.root.dispatchEvent(new CustomEvent("cards-updated"))},200),e.disconnect())})}),this.mutationObserver.observe(this.root,{attributes:!0,subtree:!0,childList:!0}),this.equalizeHeights()}equalizeHeights(){this.cards=Array.from(this.root.querySelectorAll(".leadership-card"));const t=new Map;
1this.cards.forEach(e=>{const i=e.querySelector(".leadership-title");if(!i)return;i.style.height="";const s=e.offsetTop;t.has(s)||t.set(s,[]),t.get(s).push(i)}),t.forEach(t=>{let e=0;t.forEach(t=>{const i=t.offsetHeight;i>e&&(e=i)}),t.forEach(t=>{t.style.height=`${e}px`})})}}class a{constructor(t){var e,i;this.props=t,this.root=t.closest(".trending-bar-container"),this.container=t.closest(".trending-content"),this.track=t.querySelector(".trending-track"),this.items=[...t.querySelectorAll(".trending-item")],this.prevArr=null==(e=this.container)?void 0:e.querySelector(".trending-nav-prev"),this.nextArr=null==(i=this.container)?void 0:i.querySelector(".trending-nav-next"),this.currentIndex=0,this.navigating=!1,this.scrollEndHandler=null,this.scrollEndFallback=null,this.keyboardActive=!1,this.props.hasAttribute("tabindex")||(this.props.tabIndex=0),this.bindEvents(),this.updateArrowVisibility(),this.updateButtons()}isKeyboardTarget(){var t,e;if(this.keyboardActive)return!0;const{activeElement:i}=document;return(null==(t=this.root)?void 0:t.contains(i))||(null==(e=this.container)?void 0:e.contains(i))}activateKeyboard(t){this.keyboardActive=!0,t.target.closest(".trending-link")||this.props.focus({preventScroll:!0})}handleKeydown(t){if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;if(!this.isKeyboardTarget())return;const{activeElement:e}=document;"INPUT"===(null==e?void 0:e.tagName)||"TEXTAREA"===(null==e?void 0:e.tagName)||(null==e?void 0:e.isContentEditable)||(t.preventDefault(),t.stopImmediatePropagation(),"ArrowLeft"===t.key?this.navigatePrev():this.navigateNext())}getMaxScrollLeft(){return Math.max(0,this.props.scrollWidth-this.props.clientWidth)}getScrollPaddingLeft(){return parseFloat(getComputedStyle(this.props).scrollPaddingLeft)||0}getItemContentLeft(t){const e=this.props.getBoundingClientRect();return this.items[t].getBoundingClientRect().left-e.left+this.props.scrollLeft}getItemPaddingLeft(t){return parseFloat(getComputedStyle(this.items[t]).paddingLeft)||0}getItemLinkContentLeft(t){return this.getItemContentLeft(t)+this.getItemPaddingLeft(t)}getDesiredItemLeftInViewport(t){const e=this.getScrollPaddingLeft();return t<=0?e:e-this.getItemPaddingLeft(t)}getScrollLeftForIndex(t){if(0===t)return 0;const e=this.getScrollPaddingLeft(),i=this.getMaxScrollLeft(),s=this.getItemLinkContentLeft(t)-e;return Math.min(Math.max(0,Math.ceil(s)),i)}isLastItemAtScrollEnd(t){if(t!==this.items.length-1)return!1;const e=this.getScrollPaddingLeft();return this.getItemLinkContentLeft(t)-e>this.getMaxScrollLeft()+.5}measureNavigationOffset(t){const e=this.props.getBoundingClientRect();return this.items[t].getBoundingClientRect().left-e.left-this.getDesiredItemLeftInViewport(t)}measureItemOffsetFromSnapPoint(t){const e=this.props.getBoundingClientRect();return this.items[t].getBoundingClientRect().left-e.left-this.getScrollPaddingLeft()}findLandedIndex(){const t=this.items.length-1;if(t<0)return 0;const{scrollLeft:e}=this.props,i=this.getScrollLeftForIndex(t);if(e<=1)return 0;if(e>=i-1)return t;let s=0,r=1/0;return this.items.forEach((t,e)=>{const i=Math.abs(this.measureItemOffsetFromSnapPoint(e));i<r&&(r=i,s=e)}),s}syncIndexFromScroll(){if(this.navigating)return;const t=this.findLandedIndex();t!==this.currentIndex&&(this.currentIndex=t),this.updateButtons()}onManualScroll(){this.navigating||(this.cancelScroll(),this.scrollEndHandler=()=>{this.scrollEndHandler=null,this.syncIndexFromScroll()},this.props.addEventListener("scrollend",this.scrollEndHandler,{once:!0}),this.scrollEndFallback=setTimeout(()=>{this.scrollEndFallback=null,this.scrollEndHandler&&(this.props.removeEventListener("scrollend",this.scrollEndHandler),this.scrollEndHandler=null),this.syncIndexFromScroll()},150))}cancelScroll(){this.scrollEndHandler&&(this.props.removeEventListener("scrollend",this.scrollEndHandler),this.scrollEndHandler=null),clearTimeout(this.scrollEndFallback),this.scrollEndFallback=null}applyIntegerScrollCorrection(t){const e=this.measureNavigationOffset(t);e>.5?this.props.scrollLeft+=Math.ceil(e):e<-.5&&(this.props.scrollLeft+=Math.floor(e))}settleNavigationScroll(t){const e=this.props.style.scrollBehavior;this.props.style.scrollBehavior="auto",this.props.scrollLeft=this.getScrollLeftForIndex(t),this.isLastItemAtScrollEnd(t)||(this.applyIntegerScrollC
1orrection(t),this.applyIntegerScrollCorrection(t)),this.props.style.scrollBehavior=e}snapToIndex(t,{behavior:e="smooth"}={}){const i=this.getScrollLeftForIndex(t);this.props.style.scrollSnapType="none",this.props.scrollTo({left:i,behavior:e});const s=()=>{this.settleNavigationScroll(t)};return"auto"===e?(s(),Promise.resolve()):new Promise(t=>{let e;const i=()=>{this.props.removeEventListener("scrollend",i),clearTimeout(e),requestAnimationFrame(()=>{s(),t()})};e=setTimeout(i,500),this.props.addEventListener("scrollend",i,{once:!0})})}alignToIndex(t){this.cancelScroll(),this.navigating=!0,this.snapToIndex(t).then(()=>{this.navigating=!1,this.updateButtons()})}findPrevNavigableIndex(t){const e=this.props.scrollLeft;for(let i=t-1;i>=0;i-=1)if(this.getScrollLeftForIndex(i)<e-.5)return i;return 0}goTo(t){if(this.navigating)return;const e=Math.max(0,Math.min(t,this.items.length-1));this.currentIndex=e,this.alignToIndex(e),this.updateButtons()}navigatePrev(){if(this.navigating)return;if(this.props.scrollLeft>=this.getMaxScrollLeft()-1&&(this.currentIndex=this.findLandedIndex()),this.currentIndex<=0)return;const t=this.findPrevNavigableIndex(this.currentIndex);this.goTo(t)}navigateNext(){this.navigating||this.currentIndex>=this.items.length-1||this.goTo(this.currentIndex+1)}updateButtons(){this.prevArr&&this.nextArr&&(this.prevArr.disabled=this.navigating||0===this.currentIndex,this.nextArr.disabled=this.navigating||this.currentIndex>=this.items.length-1)}hasOverflow(){if(this.items.length<=1)return!1;const t=this.props.clientWidth;return this.items.reduce((t,e)=>t+e.getBoundingClientRect().width,0)>t}updateArrowVisibility(){var t;const e=this.hasOverflow();null==(t=this.container)||t.classList.toggle("--has-arrows",e),[this.prevArr,this.nextArr].forEach(t=>{t&&(t.hidden=!e,t.style.display=e?"":"none")}),this.updateButtons()}bindEvents(){var t,e,i;null==(t=this.prevArr)||t.addEventListener("click",()=>this.navigatePrev()),null==(e=this.nextArr)||e.addEventListener("click",()=>this.navigateNext()),this.resizeObserver=new ResizeObserver(()=>{this.updateArrowVisibility(),this.currentIndex>0&&this.snapToIndex(this.currentIndex,{behavior:"auto"})}),this.resizeObserver.observe(this.props),window.addEventListener("resize",()=>{this.updateArrowVisibility(),this.currentIndex>0&&this.snapToIndex(this.currentIndex,{behavior:"auto"})}),document.addEventListener("keydown",t=>this.handleKeydown(t),!0),null==(i=this.root)||i.addEventListener("pointerdown",t=>this.activateKeyboard(t)),document.addEventListener("pointerdown",t=>{var e;(null==(e=this.root)?void 0:e.contains(t.target))||(this.keyboardActive=!1)}),this.props.addEventListener("swipe",()=>{this.onManualScroll()}),this.props.addEventListener("scroll",()=>{this.onManualScroll()},{passive:!0})}}class o{constructor(t){this.carousel=t,this.carouselId=t.id,this.mobileMediaQuery=window.matchMedia("(max-width: 767px)"),this.track=t.querySelector(".carousel-track"),this.slides=t.querySelectorAll(".carousel-slide"),this.indicators=t.querySelectorAll(".carousel-indicator"),this.prevBtn=t.querySelector(".carousel-prev"),this.nextBtn=t.querySelector(".carousel-next"),this.counter=t.querySelector(".current-slide"),this.gradientLeft=t.querySelector(".carousel-gradient-left"),this.gradientRight=t.querySelector(".carousel-gradient-right"),this.currentSlide=0,this.totalSlides=this.slides.length,this.totalSlides<3||this.init()}get slidesToShow(){return this.mobileMediaQuery.matches?1:3}init(){this.updateSlideVisibility(),this.updateIndicators(),this.bindEvents(),this.updateNavigationState()}bindEvents(){this.prevBtn&&this.prevBtn.addEventListener("click",t=>{t.preventDefault(),this.goToPrevious()}),this.nextBtn&&this.nextBtn.addEventListener("click",t=>{t.preventDefault(),this.goToNext()}),this.indicators.forEach((t,e)=>{t.addEventListener("click",t=>{t.preventDefault(),this.goToSlide(e)})}),this.carousel.addEventListener("keydown",t=>this.handleKeyboard(t));let t=0,e=0;this.carousel.addEventListener("touchstart",e=>{t=e.touches[0].clientX}),this.carousel.addEventListener("touchend",i=>{e=i.changedTouches[0].clientX,this.handleSwipe(t,e)}),window.addEventListener("resize",()=>{this.updateSlideVisibility(),setTimeout(()=>{this.constrainSlidesToGrid()},100)})}updateSlideVisibility(){if(this.carousel&&this.track){const t=8,e=(this.carousel.offsetWidth-2*t)/this.slidesToShow+t,i=-this.currentSlide*e;this.track.style.transform=`translateX(${i}px)`}else{const t=100/this.slidesToShow+.5,e=-this.currentSlide*t;this.track&&(this.track.style.transform=`translateX(${e}%)`)}this.updateIndicators(),this.updateNavigationState(),this.constrainSlidesToGrid()}
1constrainSlidesToGrid(){if(!this.slides||!this.carousel)return;const t=(this.carousel.offsetWidth-16)/this.slidesToShow;this.slides.forEach(e=>{e.style.width=`${t}px`,e.style.maxWidth=`${t}px`,e.style.flexBasis=`${t}px`})}updateIndicators(){if(0===this.indicators.length)return;this.indicators.forEach((t,e)=>{t.classList.remove("active","visible"),e===this.currentSlide?t.classList.add("active"):e>=this.currentSlide&&e<this.currentSlide+this.slidesToShow&&t.classList.add("visible")});const t=this.indicators[0].parentElement;t&&t.setAttribute("aria-hidden",this.totalSlides<=this.slidesToShow)}updateNavigationState(){const t=0===this.currentSlide,e=this.currentSlide+this.slidesToShow>=this.totalSlides;this.prevBtn&&(this.prevBtn.disabled=t,this.prevBtn.setAttribute("aria-hidden",t),t?this.gradientLeft.classList.remove("visible"):this.gradientLeft.classList.add("visible")),this.nextBtn&&(this.nextBtn.disabled=e,this.nextBtn.setAttribute("aria-hidden",e),e?this.gradientRight.classList.remove("visible"):this.gradientRight.classList.add("visible"))}goToSlide(t){t<0||t>this.totalSlides-this.slidesToShow||(this.gradientLeft.classList.add("visible"),this.gradientRight.classList.add("visible"),this.currentSlide=t,this.updateSlideVisibility())}goToPrevious(){this.currentSlide>0&&this.goToSlide(this.currentSlide-1)}goToNext(){this.currentSlide+this.slidesToShow<this.totalSlides&&this.goToSlide(this.currentSlide+1)}handleKeyboard(t){switch(t.key){case"ArrowLeft":t.preventDefault(),this.goToPrevious();break;case"ArrowRight":t.preventDefault(),this.goToNext();break;case"Home":t.preventDefault(),this.goToSlide(0);break;case"End":t.preventDefault(),this.goToSlide(this.totalSlides-this.slidesToShow)}}handleSwipe(t,e){const i=t-e;Math.abs(i)>50&&(i>0?this.goToNext():this.goToPrevious())}}class l{constructor(t,e={}){this.element=t,this.threshold=e.threshold||50,this.startX=0,this.startY=0,this.isTracking=!1,this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.attach()}attach(){this.element.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.element.addEventListener("touchend",this.handleTouchEnd,{passive:!0}),this.element.addEventListener("mousedown",this.handleMouseDown),this.element.addEventListener("mouseup",this.handleMouseUp),this.element.addEventListener("mouseleave",this.handleMouseLeave)}destroy(){this.element.removeEventListener("touchstart",this.handleTouchStart),this.element.removeEventListener("touchend",this.handleTouchEnd),this.element.removeEventListener("mousedown",this.handleMouseDown),this.element.removeEventListener("mouseup",this.handleMouseUp),this.element.removeEventListener("mouseleave",this.handleMouseLeave)}getSwipeDirection(t,e){const i=t-this.startX,s=e-this.startY,r=Math.abs(i),n=Math.abs(s);return r<this.threshold&&n<this.threshold?null:r>n?i>0?"right":"left":s>0?"down":"up"}emitSwipeEvent(t){const e=new CustomEvent("swipe",{bubbles:!0,cancelable:!0,detail:{direction:t}});this.element.dispatchEvent(e)}handleTouchStart(t){const e=t.touches[0];this.startX=e.clientX,this.startY=e.clientY,this.isTracking=!0}handleTouchEnd(t){if(!this.isTracking)return;this.isTracking=!1;const e=t.changedTouches[0],i=this.getSwipeDirection(e.clientX,e.clientY);i&&this.emitSwipeEvent(i)}handleMouseDown(t){this.startX=t.clientX,this.startY=t.clientY,this.isTracking=!0}handleMouseUp(t){if(!this.isTracking)return;this.isTracking=!1;const e=this.getSwipeDirection(t.clientX,t.clientY);e&&this.emitSwipeEvent(e)}handleMouseLeave(){this.isTracking=!1}}function h(){!function(){const t=document.querySelectorAll('.wp-site-blocks form:has(input[type="search"])'),e=t=>{t.preventDefault();const e=t.target;e.checkValidity()&&e.submit()};t.forEach(t=>{t.addEventListener("submit",e)})}();const h=document.querySelector("nav.thermo-header-nav");h&&(window.headerNavigation=new t(h)),window.videoCarousels=[],document.querySelectorAll(".video-carousel-container").forEach(t=>{window.videoCarousels.push(new i(t))}),window.expandableGrids=[],document.querySelectorAll("[data-expandable-grid]").forEach(t=>{window.expandableGrids.push(new s(t))}),window.modals=[],document.querySelectorAll("#modal").forEach(t=>{window.modals.push(new r(t))}),window.leadershipGrids=[],document.querySelectorAll(".leadership-grid").forEach(t=>{window.leadershipGrids.push(new n(t))}),window.videoPlayers=[],document.querySelectorAll(".component-video").forEach(t=>{window.videoPlayers.push(new e(t))}),document.querySelectorAll("[data-trending-bar]").forEach(t=>{window.trendingBars=window.trendingBars||[],window.trendingBars.push(new a(t))}),window.carousels=[],document.querySelectorAll(".component-image-carousel").forEach(t=>{t.id?window.carousels.push(new o(t)):console.warn("Carousel without ID:",t)}),window.swipeables=[],document.querySelectorAll("[data-swipeable]").forEach(t=>{window.swipeables.push(new l(t))})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h):h()})()})();
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.