1customElements.get("details-accordion")||customElements.define("details-accordion",class extends HTMLElement{constructor(){super()}connectedCallback(){this.init()}init(){this.el=this.querySelector("details"),this.summary=this.querySelector("summary"),this.content=this.summary.nextElementSibling,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.dataset.ignoreSetupEvent||this.setupEventListener()}setupEventListener(){this.onClickSummaryHandler=this.onClick.bind(this),this.summary.addEventListener("click",this.onClickSummaryHandler)}onClick(e){e.preventDefault(),this.toggleContent()}toggleContent(){if(this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink(),this.dataset.ignoreSetupEvent)return!1}disconnectedCallback(){this.summary.removeEventListener("click",this.onClickSummaryHandler)}shrink(){this.dataset.ignoreSetupEvent?this.querySelector("summary").setAttribute("aria-expanded",!1):this.summary.setAttribute("aria-expanded",!1),this.isClosing=!0;const startHeight=`${this.el.offsetHeight}px`;let endHeight;this.dataset.ignoreSetupEvent?endHeight=`${this.querySelector("summary").offsetHeight}px`:endHeight=`${this.summary.offsetHeight}px`,this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[startHeight,endHeight]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const startHeight=`${this.el.offsetHeight}px`;let endHeight;this.dataset.ignoreSetupEvent?(this.querySelector("summary").setAttribute("aria-expanded",!0),endHeight=`${this.querySelector("summary").offsetHeight+this.querySelector("summary").nextElementSibling.offsetHeight}px`):(this.summary.setAttribute("aria-expanded",!0),endHeight=`${this.summary.offsetHeight+this.summary.nextElementSibling.offsetHeight}px`),this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[startHeight,endHeight]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(open){this.el.open=open,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}); 2//# sourceMappingURL=/cdn/shop/t/124/assets/details-accordion.js.map?v=170558748681591396671769409856
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.