1if(!customElements.get('carousel-slider')){customElements.define('carousel-slider',class CarouselSlider extends HTMLElement{constructor(){super()} 2connectedCallback(){this.carousel=this.querySelector('.grid-carousel');this.initialize()} 3initialize(){this.carousel.style.display='block';this.flickity=new Flickity(this.carousel,{cellAlign:'left',groupCells:!0,contain:!0,resize:!0,draggable:!0,prevNextButtons:!1,fade:!1,cellSelector:'.grid-item',initialIndex:0,pageDots:!1,wrapAround:!1,accessibility:!1,watchCSS:!0,});this.flickity.on('change',(index)=>{const event=new CustomEvent('slider:slide-change',{detail:{id:this.getAttribute('id'),index,},});document.dispatchEvent(event)})}})} 4if(!customElements.get('carousel-navigation')){customElements.define('carousel-navigation',class CarouselNavigation extends HTMLElement{constructor(){super()} 5connectedCallback(){this.init()} 6init(retry=1,maxRetry=3){if(retry===maxRetry){return} 7const id=this.getAttribute('for');this.carouselComponent=document.querySelector(`#${id}`);this.wrap=this.dataset.wrap==='true';if((!this.carouselComponent||!this.carouselComponent.flickity)){setTimeout(()=>{this.init(retry+1)},350);return} 8this.flickity=this.carouselComponent.flickity;this.buttonPrev=this.querySelector('.js-prev');this.buttonNext=this.querySelector('.js-next');this.buttonPrev.addEventListener('click',(event)=>{event.preventDefault();this.flickity.previous()});this.buttonNext.addEventListener('click',(event)=>{event.preventDefault();this.flickity.next()});this.flickity.on('select',()=>{if(this.wrap){return} 9this.enableButton(this.buttonPrev);this.enableButton(this.buttonNext);if(!this.flickity.slides[this.flickity.selectedIndex-1]){this.disableButton(this.buttonPrev)}else if(!this.flickity.slides[this.flickity.selectedIndex+1]){this.disableButton(this.buttonNext)}})} 10enableButton(button){button.classList.remove('pill-nav-item-disabled');button.classList.remove('focus-none');button.setAttribute('aria-disabled','false')} 11disableButton(button){button.classList.add('pill-nav-item-disabled');button.classList.add('focus-none');button.setAttribute('aria-disabled','true')}})}
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.