Liferay.Loader.define("frontend-js-collapse-support-web@2.0.13/CollapseProvider",["module","exports","require","frontend-js-web"],(function(e,t,i){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=i("frontend-js-web");function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}const e={COLLAPSE:"collapse",COLLAPSED:"collapsed",COLLAPSING:"collapsing",SHOW:"show"},a={HEIGHT:"height",WIDTH:"width"},o={TRIGGER:'[data-toggle="liferay-collapse"]'};class l{constructor(){if(n(this,"_transitioning",void 0),n(this,"_transitionEndEvent",void 0),n(this,"EVENT_HIDDEN","liferay.collapse.hidden"),n(this,"EVENT_HIDE","liferay.collapse.hide"),n(this,"EVENT_SHOW","liferay.collapse.show"),n(this,"EVENT_SHOWN","liferay.collapse.shown"),n(this,"hide",(({panel:t,trigger:i})=>{if(t&&!i&&(i=this._getTrigger(t)),t||(t=this._getPanel(i)),this._transitioning||!t.classList.contains(e.SHOW))return;Liferay.fire(this.EVENT_HIDE,{panel:t,trigger:i}),i.classList.add(e.COLLAPSED),i.setAttribute("aria-expanded",!1);const s=this._getDimension(t);t.style[s]="".concat(t.getBoundingClientRect()[s],"px"),t.getBoundingClientRect(),t.classList.remove(e.COLLAPSE),this._transitioning=!0;const n=()=>{t.classList.remove(e.COLLAPSING),t.classList.remove(e.SHOW),t.classList.add(e.COLLAPSE),this._transitioning=!1,Liferay.fire(this.EVENT_HIDDEN,{panel:t,trigger:i})};this._prefersReducedMotion()?n():(t.addEventListener(this._transitionEndEvent,n,{once:!0}),t.classList.add(e.COLLAPSING)),t.style.removeProperty(s)})),n(this,"show",(({panel:t,trigger:i})=>{if(t&&!i&&(i=this._getTrigger(t)),t||(t=this._getPanel(i)),this._transitioning||t.classList.contains(e.SHOW))return;const s=i.dataset.parent;if(s){const t=document.querySelector(s);if(t){t.querySelectorAll(o.TRIGGER+":not(."+e.COLLAPSED+")").forEach((e=>{e!==i&&e.dataset.parent===s&&this.hide({trigger:e})}))}}Liferay.fire(this.EVENT_SHOW,{panel:t,trigger:i}),i.classList.remove(e.COLLAPSED),i.setAttribute("aria-expanded",!0);const n=this._getDimension(t);t.classList.remove(e.COLLAPSE),t.classList.add(e.COLLAPSING),t.style[n]=0,this._transitioning=!0;const r=()=>{t.classList.remove(e.COLLAPSING),t.classList.add(e.COLLAPSE),t.classList.add(e.SHOW),t.style[n]="",this._transitioning=!1,Liferay.fire(this.EVENT_SHOWN,{panel:t,trigger:i})};if(this._prefersReducedMotion())r();else{t.addEventListener(this._transitionEndEvent,r,{once:!0});const e=n[0].toUpperCase()+n.slice(1),i="scroll".concat(e);t.style[n]="".concat(t[i],"px")}})),n(this,"_onTriggerClick",(t=>{const i=t.delegateTarget;"A"===i.tagName&&t.preventDefault();const s=this._getPanel(i);s&&(s.classList.contains(e.SHOW)?this.hide({panel:s,trigger:i}):this.show({panel:s,trigger:i}))})),Liferay.CollapseProvider)return Liferay.CollapseProvider;this._setTransitionEndEvent(),(0,s.delegate)(document.body,"click",o.TRIGGER,this._onTriggerClick),Liferay.CollapseProvider=this}_getDimension(e){return e.classList.contains(a.WIDTH)?a.WIDTH:a.HEIGHT}_getPanel(e){return document.querySelector(e.getAttribute("href")||e.dataset.target)}_getTrigger(e){return document.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'))}_prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}_setTransitionEndEvent(){const e=document.body,t={MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionend"};let i=!1;Object.keys(t).some((s=>{if(void 0!==e.style[s])return i=t[s],!0})),this._transitionEndEvent=i}}var r=l;t.default=r}})); Liferay.Loader.define("frontend-js-collapse-support-web@2.0.13/index",["module","exports","require","./CollapseProvider"],(function(e,o,r){var d;window;Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){new l.default};var l=(d=r("./CollapseProvider"))&&d.__esModule?d:{default:d}}));