!function(){"use strict";if(!Joomla)throw new Error("Joomla API is not initialized");var e=function(){return document.cookie.length&&document.cookie.split("; ").find((function(e){return e.startsWith("atumSidebarState=")})).split("=")[1]},t=window.matchMedia("(max-width: 992px)"),o=window.matchMedia("(max-width: 575.98px)"),s=window.matchMedia("(min-width: 576px) and (max-width:991.98px)"),n=document.querySelector(".sidebar-menu"),c=[].slice.call(document.querySelectorAll(".sidebar-nav")),a=document.querySelector("#subhead-container"),i=document.querySelector(".wrapper"),l=document.querySelector(".sidebar-wrapper"),d=document.querySelector(".logo"),r=document.querySelector("body.com_login"),m=document.getElementById("menu-collapse-icon"),u=document.querySelectorAll('.nav-item.dropdown span[class*="icon-angle-"]'),L=document.querySelector("#header .header-title"),h=document.querySelector("#header .header-items"),p=[].slice.call(h.children).filter((function(e){return e.classList.contains("header-item")})),g=document.getElementById("header-more-items"),w=[].slice.call(g.querySelectorAll(".header-dd-item")),v=L.getBoundingClientRect().width,f=p.map((function(e){return e.getBoundingClientRect().width}));g.classList.remove("d-none"),g.paddingTop;var y=g.getBoundingClientRect().width;function S(t){d&&!r&&(o.matches?d.classList.add("small"):("closed"===(t||e())?d.classList.add("small"):d.classList.remove("small"),m&&(i.classList.contains("closed")?(m.classList.add("icon-toggle-on"),m.classList.remove("icon-toggle-off")):(m.classList.remove("icon-toggle-on"),m.classList.add("icon-toggle-off")))))}function b(e){var t=e?"icon-angle-up":"icon-angle-down",o=e?"icon-angle-down":"icon-angle-up";u&&u.forEach((function(e){e.classList.remove(t),e.classList.add(o)}))}g.classList.add("d-none");var q=function(e){return e.reduce((function(e,t){return Number(e)+Number(t)}),0)};function E(){var e=(v=L.getBoundingClientRect().width)+y,t=50+q(f);v+t<document.body.getBoundingClientRect().width?(p.map((function(e){return e.classList.remove("d-none")})),g.classList.add("d-none")):(g.classList.remove("d-none"),w.map((function(e){return e.classList.add("d-none")})),g.classList.remove("d-none"),f.forEach((function(t,o){var s=f.slice(o,f.length);e+q(s)<document.body.getBoundingClientRect().width||p[o].children&&!p[o].children[0].classList.contains("dropdown")&&(p[o].classList.add("d-none"),w[o].classList.remove("d-none"))})))}E(),window.addEventListener("resize",(function(){t.matches?(o.matches?(b(),n&&i.classList.remove("closed")):b("top"),s.matches&&n&&i.classList.add("closed"),o.matches?(c.map((function(e){return e.classList.add("collapse")})),a&&a.classList.add("collapse"),l&&l.classList.add("collapse")):(c.map((function(e){return e.classList.remove("collapse")})),a&&a.classList.remove("collapse"),l&&l.classList.remove("collapse")),S("closed")):(l?(S(e()||"open"),l.classList.remove("collapse")):S("closed"),c.map((function(e){return e.classList.remove("collapse")})),a&&a.classList.remove("collapse"),b("top")),E()})),a&&document.addEventListener("scroll",(function(){window.scrollY>0?a.classList.add("shadow-sm"):a.classList.remove("shadow-sm")})),o.matches&&(S("closed"),a&&(a.classList.remove("show"),a.classList.add("collapse"))),navigator.cookieEnabled||Joomla.renderMessages({error:[Joomla.Text._("JGLOBAL_WARNCOOKIES")]},void 0,!1,6e3),window.addEventListener("joomla:menu-toggle",(function(e){E(),document.cookie="atumSidebarState="+e.detail+";",t.matches?S("closed"):S(e.detail)}))}();