(()=>{const e=e=>{const t=e.closest(".gb-accordion__item"),o=t.querySelectorAll(".gb-accordion__content")[0],i=t.querySelectorAll(".gb-accordion__toggle")[0],c=t.closest(".gb-accordion"),n=t.getAttribute("data-transition");if(c&&null===c.getAttribute("data-accordion-multiple-open")){const e=(a=t,Array.prototype.filter.call(a.parentNode.children,(e=>e!==a)));e&&e.forEach((e=>{if(e.classList.contains("gb-accordion__item-open")){if("slide"===n){const t=e.querySelectorAll(".gb-accordion__content")[0];t&&(t.style.maxHeight=t.scrollHeight+"px",setTimeout((()=>{e.classList.remove("gb-accordion__item-open"),t.style.maxHeight=null}),10))}else e.classList.remove("gb-accordion__item-open");const t=e.querySelectorAll(".gb-accordion__toggle")[0];t&&(t.setAttribute("aria-expanded",!1),t.classList.remove("gb-block-is-current"))}}))}var a;t.classList.contains("gb-accordion__item-open")?"slide"===n?(o.style.maxHeight=o.scrollHeight+"px",setTimeout((()=>{i.setAttribute("aria-expanded",!1),i.classList.remove("gb-block-is-current"),t.classList.remove("gb-accordion__item-open"),o.style.maxHeight=null}),10)):(i.setAttribute("aria-expanded",!1),i.classList.remove("gb-block-is-current"),t.classList.remove("gb-accordion__item-open")):"slide"===n?(o.style.maxHeight=o.scrollHeight+"px",setTimeout((()=>{i.setAttribute("aria-expanded",!0),i.classList.add("gb-block-is-current"),t.classList.add("gb-accordion__item-open"),o.addEventListener("transitionend",(e=>{"max-height"===e.propertyName&&(o.style.maxHeight=null)}),{once:!0})}),10)):(i.setAttribute("aria-expanded",!0),i.classList.add("gb-block-is-current"),t.classList.add("gb-accordion__item-open"),t.classList.add("gb-accordion__item-transition"),setTimeout((()=>t.classList.remove("gb-accordion__item-transition")),100))};function t(){const e=window.location.hash;if(e){const t=document.getElementById(String(e).replace("#",""));if(t&&t.classList.contains("gb-accordion__item")){const e=t.querySelector(".gb-accordion__toggle"),o=t.querySelector(".gb-accordion__content");o.style.transition="none",e&&(t.classList.contains("gb-accordion__item-open")||e.click(),t.scrollIntoView(),o.style.transition="")}}}document.querySelectorAll(".gb-accordion__item .gb-accordion__toggle").forEach((t=>{t.addEventListener("click",(()=>e(t))),"BUTTON"!==(null==t?void 0:t.tagName.toUpperCase())&&t.addEventListener("keydown",(o=>{" "!==o.key&&"Enter"!==o.key&&"Spacebar"!==o.key||(o.preventDefault(),e(t))}))})),window.addEventListener("hashchange",t),document.addEventListener("DOMContentLoaded",t);const o=document.querySelectorAll(".gb-accordion__item");o&&o.forEach((e=>{const t=e.querySelectorAll(".gb-accordion__toggle")[0],o=e.querySelectorAll(".gb-accordion__content")[0],i=t.getAttribute("id"),c=o.getAttribute("id");i&&o.setAttribute("aria-labelledby",i),c&&t.setAttribute("aria-controls",c),e.classList.contains("gb-accordion__item-open")&&t?t.setAttribute("aria-expanded",!0):t&&t.setAttribute("aria-expanded",!1)}))})();