1class e{constructor(e){this.root=e,this.currentSlide=0,this.expandedSlide=0,this.inlineSwipeState=null,this.expandedSwipeState=null,this.lastDragEndedAt=0,this.handleDocumentKeydown=e=>{"Escape"===e.key&&this.isExpandedOpen()&&this.closeExpanded()},this.totalSlides=Number.parseInt(e.dataset.inlineGalleryTotalSlides??"0",10)||0,this.progressTemplate=e.dataset.inlineGalleryProgressTemplate??"",this.inlineTrack=e.querySelector("[data-inline-gallery-track]"),this.inlineSurface=e.querySelector(".inline-gallery__items"),this.expandedRoot=e.querySelector("[data-inline-gallery-expanded]"),this.expandedTrack=e.querySelector("[data-inline-gallery-expanded-track]"),this.expandedSurface=e.querySelector(".expanded-images__items"),this.inlineArrowContainer=e.querySelector("[data-inline-gallery-arrow-container]"),this.inlineCount=e.querySelector("[data-inline-gallery-count]"),this.prevArrow=e.querySelector("[data-inline-gallery-prev]"),this.nextArrow=e.querySelector("[data-inline-gallery-next]"),this.expandedPrevArrow=e.querySelector("[data-inline-gallery-expanded-prev]"),this.expandedNextArrow=e.querySelector("[data-inline-gallery-expanded-next]"),this.inlineFrames=Array.from(e.querySelectorAll("[data-inline-gallery-slide-frame]")),this.expandedFrames=Array.from(e.querySelectorAll("[data-inline-gallery-expanded-frame]")),this.resizeHandler=this.debounce((()=>{this.syncHeights()}),100)}init(){!(this.totalSlides<1)&&this.inlineTrack instanceof HTMLElement&&(this.bindInlineNavigation(),this.bindExpandedNavigation(),this.bindExpandButtons(),this.bindExpandedClose(),this.bindSwipe(this.inlineSurface,"inline"),this.bindSwipe(this.expandedSurface,"expanded"),this.bindDragClickSuppression(),this.syncHeights(),this.renderInline(!1),this.renderExpanded(!1),this.root.classList.remove("first-slide-only"),window.addEventListener("resize",this.resizeHandler),document.addEventListener("keydown",this.handleDocumentKeydown))}bindInlineNavigation(){var e,t;null==(e=this.prevArrow)||e.addEventListener("click",(e=>{e.preventDefault(),this.goToSlide(this.currentSlide-1)})),null==(t=this.nextArrow)||t.addEventListener("click",(e=>{e.preventDefault(),this.goToSlide(this.currentSlide+1)}))}bindExpandedNavigation(){var e,t;null==(e=this.expandedPrevArrow)||e.addEventListener("click",(e=>{e.preventDefault(),this.goToExpandedSlide(this.expandedSlide-1)})),null==(t=this.expandedNextArrow)||t.addEventListener("click",(e=>{e.preventDefault(),this.goToExpandedSlide(this.expandedSlide+1)}))}bindExpandButtons(){this.root.querySelectorAll("[data-inline-gallery-expand]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const i=Number.parseInt(e.dataset.index??"0",10)||0;this.openExpanded(i)}))}))}bindExpandedClose(){var e,t;null==(e=this.expandedRoot)||e.querySelectorAll("[data-inline-gallery-close]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.closeExpanded()}))})),null==(t=this.expandedRoot)||t.addEventListener("click",(e=>{const t=e.target;t instanceof HTMLElement&&(t.closest(".expanded-slide__inner-wrap, .arrows__arrows-inner")||this.closeExpanded())}))}bindSwipe(e,t){e instanceof HTMLElement&&(e.addEventListener("touchstart",(e=>{const i=e.touches[0];i&&this.startSwipe(t,"touch",i.pageX,i.pageY)}),{passive:!0}),e.addEventListener("touchmove",(e=>{const i=e.touches[0];i&&this.moveSwipe(t,e,i.pageX,i.pageY)}),{passive:!1}),e.addEventListener("touchend",(()=>{this.endSwipe(t)})),e.addEventListener("touchcancel",(()=>{this.cancelSwipe(t)})),e.addEventListener("mousedown",(e=>{0===e.button&&this.startSwipe(t,"mouse",e.pageX,e.pageY)})),e.addEventListener("mousemove",(e=>{const i=this.getSwipeState(t);"mouse"===(null==i?void 0:i.pointerType)&&this.moveSwipe(t,e,e.pageX,e.pageY)})),e.addEventListener("mouseup",(()=>{this.endSwipe(t)})),e.addEventListener("mouseleave",(()=>{const e=this.getSwipeState(t);"mouse"===(null==e?void 0:e.pointerType)&&this.endSwipe(t)})))}goToSlide(e){this.currentSlide=this.clamp(e,0,this.totalSlides-1),this.renderInline()}goToExpandedSlide(e){this.expandedSlide=this.clamp(e,0,this.totalSlides-1),this.renderExpanded()}openExpanded(e){this.expandedRoot instanceof HTMLElement&&(this.expandedSlide=this.clamp(e,0,this.totalSlides-1),this.renderExpanded(!1),this.expandedRoot.hidden=!1)}closeExpanded(){this.expandedRoot instanceof HTMLElement&&(this.expandedRoot.hidden=!0)}renderInline(e=!0){this.inlineTrack instanceof HTMLElement&&(this.setTrackPosition(this.inl
1ineTrack,this.currentSlide,e),this.inlineCount instanceof HTMLElement&&(this.inlineCount.textContent=this.formatProgress(this.currentSlide+1)),this.inlineFrames.forEach(((e,t)=>{e.setAttribute("aria-hidden",t===this.currentSlide?"false":"true")})),this.updateArrowState(this.prevArrow,0===this.currentSlide),this.updateArrowState(this.nextArrow,this.currentSlide===this.totalSlides-1))}renderExpanded(e=!0){this.expandedTrack instanceof HTMLElement&&(this.setTrackPosition(this.expandedTrack,this.expandedSlide,e),this.expandedFrames.forEach(((e,t)=>{e.setAttribute("aria-hidden",t===this.expandedSlide?"false":"true")})),this.updateArrowState(this.expandedPrevArrow,0===this.expandedSlide),this.updateArrowState(this.expandedNextArrow,this.expandedSlide===this.totalSlides-1))}bindDragClickSuppression(){this.root.addEventListener("click",(e=>{Date.now()-this.lastDragEndedAt<=250&&(e.preventDefault(),e.stopPropagation())}),!0)}startSwipe(e,t,i,n){const a="inline"===e?this.currentSlide:this.expandedSlide;this.setSwipeState(e,{currentIndex:a,isSwiping:void 0,lastX:i,pointerType:t,startIndex:a,startX:i,startY:n,velocityX:0})}moveSwipe(e,t,i,n){const a=this.getSwipeState(e),r=this.getSwipeSurface(e);if(!(a&&r instanceof HTMLElement))return;if(void 0===a.isSwiping){const e=Math.abs(i-a.startX),r=Math.abs(n-a.startY);return e>r&&t.preventDefault(),e>r&&e>3?(a.isSwiping=!0,a.startX=i,void(a.lastX=i)):void(r>3&&(a.isSwiping=!1))}if(!0!==a.isSwiping)return;t.preventDefault(),a.velocityX=.5*a.velocityX+.5*(i-a.lastX),a.lastX=i;const s=r.getBoundingClientRect().width;s<=0||(a.currentIndex=this.computeDragIndex(a.startIndex,a.startX,i,s),this.renderDraggedTrack(e,a.currentIndex))}endSwipe(e){const t=this.getSwipeState(e);if(!t)return;if(this.setSwipeState(e,null),!0!==t.isSwiping)return;const i=t.startIndex,n=i-t.currentIndex;let a;a=Math.abs(t.velocityX)>5?t.velocityX>0?Math.floor(t.currentIndex):Math.ceil(t.currentIndex):Math.abs(n)>.6?n>0?Math.floor(t.currentIndex):Math.ceil(t.currentIndex):i,this.lastDragEndedAt=Date.now(),this.commitSwipe(e,a)}cancelSwipe(e){const t=this.getSwipeState(e);t&&(this.setSwipeState(e,null),!0===t.isSwiping&&(this.lastDragEndedAt=Date.now(),this.commitSwipe(e,t.startIndex)))}commitSwipe(e,t){const i=this.clamp(t,0,this.totalSlides-1);"inline"!==e?this.goToExpandedSlide(i):this.goToSlide(i)}renderDraggedTrack(e,t){const i="inline"===e?this.inlineTrack:this.expandedTrack;this.setTrackPosition(i,t,!1)}setTrackPosition(e,t,i){if(!(e instanceof HTMLElement))return;const n=`translate(-${100*t}%, 0)`,a=i?"transform 0.35s cubic-bezier(0.15, 0.3, 0.25, 1) 0s":"all 0s ease 0s";e.style.setProperty("transition",a),e.style.setProperty("-webkit-transition",a),e.style.setProperty("transform",n),e.style.setProperty("-webkit-transform",n)}computeDragIndex(e,t,i,n){const a=Math.max(this.totalSlides-1,0);let r=e+(t-i)/n;return r<0?r=Math.exp(.6*r)-1:r>a&&(r=a+1-Math.exp(.6*(a-r))),r}getSwipeSurface(e){return"inline"===e?this.inlineSurface:this.expandedSurface}getSwipeState(e){return"inline"===e?this.inlineSwipeState:this.expandedSwipeState}setSwipeState(e,t){"inline"!==e?this.expandedSwipeState=t:this.inlineSwipeState=t}updateArrowState(e,t){e instanceof HTMLElement&&(e.classList.toggle("disable",t),e.setAttribute("aria-disabled",t?"true":"false"))}syncHeights(){const e=Array.from(this.root.querySelectorAll(".item__image-cont .image-wrapped__aspect-padding")),t=Array.from(this.root.querySelectorAll(".item__image-cont .image-wrapped__widthsetter")),i=Array.from(this.root.querySelectorAll(".item__image-cont .image-cont__expand"));t.forEach((e=>{e.style.height=""}));let n=0;e.forEach((e=>{n=Math.max(n,e.offsetHeight)})),0!==n&&(t.forEach((e=>{e.style.height=`${n}px`})),this.inlineArrowContainer instanceof HTMLElement&&(this.inlineArrowContainer.style.height=`${n}px`),i.forEach((e=>{const t=Math.max(n-e.offsetHeight,0);e.style.top=`${t}px`})))}formatProgress(e){return this.progressTemplate.split("{currentSlide}").join(String(e)).split("{totalSlides}").join(String(this.totalSlides))}isExpandedOpen(){return this.expandedRoot instanceof HTMLElement&&!1===this.expandedRoot.hidden}clamp(e,t,i){return Math.min(Math.max(e,t),i)}debounce(e,t){let i=0;return()=>{window.clearTimeout(i),i=window.setTimeout(e,t)}}}const t=()=>{document.querySelectorAll("[data-inline-gallery]").forEach((t=>{new e(t).init()}))},i=window;i.reliableDOMContentLoaded instanceof Promise?i.reliableDOMContentLoaded.then(t).cat
1ch((()=>t())):"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t,{once:!0}):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.