1document.addEventListener("DOMContentLoaded",function(){window.aflDebug&&aflDebug.log("Mobile Menu","Initializing...");const e=document.querySelector(".mobile-menu-btn"),t=document.querySelector(".main-nav"),o=document.body;if(!e||!t)return void(window.aflDebug&&aflDebug.error("Mobile Menu","Elements not found"));window.aflDebug&&aflDebug.log("Mobile Menu","Elements found");let n=t.innerHTML,r=!1;function i(){return window.innerWidth<=768}let a,l=!1,d=!1;function s(){if(d||l||!i())return;(function(){if(r||!i())return null;n||(n=t.innerHTML);const e=document.createElement("div");return e.className="mobile-menu-content",t.querySelectorAll(":scope > ul > li.nav-item").forEach(t=>{if(!t.querySelector("a[href]"))return;const o=t.querySelector(".dropdown, .dropdown-menu"),n=t.cloneNode(!0);if(n.classList.remove("mobile-menu-header","mobile-donate-btn"),n.querySelectorAll(".mobile-menu-header, .mobile-donate-btn").forEach(e=>e.remove()),o){if(!n.querySelector(".mobile-dropdown-toggle")){let e=n.querySelector(".nav-item-wrapper");if(!e){e=document.createElement("div"),e.className="nav-item-wrapper";const t=n.querySelector("a");t&&e.appendChild(t),n.insertBefore(e,n.firstChild)}const t=document.createElement("button");t.className="mobile-dropdown-toggle",t.setAttribute("aria-expanded","false"),t.setAttribute("aria-label","Toggle submenu"),t.setAttribute("type","button"),t.innerHTML='<i class="fas fa-chevron-down" aria-hidden="true"></i>',e.appendChild(t)}const e=n.querySelector(".dropdown, .dropdown-menu");e&&(e.classList.add("dropdown"),e.classList.remove("show"))}e.appendChild(n)}),t.innerHTML="",t.appendChild(e),r=!0,{contentDiv:e}})()&&m(),d=!0,l=!0,t.classList.add("mobile-menu-open"),o.classList.add("mobile-menu-active"),e.classList.add("active"),e.setAttribute("aria-expanded","true");const a=e.querySelector("i");a&&(a.classList.remove("fa-bars"),a.classList.add("fa-times")),c();t.querySelectorAll(".dropdown, .dropdown-menu").forEach(e=>{e.classList.remove("show")}),o.style.overflow="hidden",setTimeout(()=>{d=!1},300),"undefined"!=typeof gtag&>ag("event","mobile_menu_open",{event_category:"navigation",event_label:"mobile_menu"})}function u(){if(d||!l)return;d=!0,l=!1,t.classList.remove("mobile-menu-open"),o.classList.remove("mobile-menu-active"),e.classList.remove("active"),e.setAttribute("aria-expanded","false");const n=e.querySelector("i");n&&(n.classList.remove("fa-times"),n.classList.add("fa-bars")),o.style.overflow="",setTimeout(()=>{e.focus(),d=!1},100),c()}function c(){const e=document.querySelectorAll(".dropdown.show"),t=document.querySelectorAll('.mobile-dropdown-toggle[aria-expanded="true"]');e.forEach(e=>{e.classList.remove("show")}),t.forEach(e=>{e.setAttribute("aria-expanded","false")})}function m(){const e=document.querySelectorAll(".mobile-dropdown-toggle");window.aflDebug&&aflDebug.log("Mobile Menu","Initializing dropdowns, found toggles: "+e.length),e.forEach(e=>{const t=e.cloneNode(!0);e.parentNode.replaceChild(t,e)});document.querySelectorAll(".mobile-dropdown-toggle").forEach((e,t)=>{window.aflDebug&&aflDebug.log("Mobile Menu","Adding event listener to toggle "+t),e.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();const t=this.closest(".nav-item").querySelector(".dropdown, .dropdown-menu"),o="true"===this.getAttribute("aria-expanded");c(),!o&&t&&(t.classList.add("show"),this.setAttribute("aria-expanded","true"))})}),window.aflDebug&&aflDebug.log("Mobile Menu","Dropdown initialization complete")}e.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),l?u():s()}),t.addEventListener("click",function(e){const o=e.target.closest("a"),n=e.target.closest(".nav-item"),r=e.target.closest(".nav-item-wrapper");if(o&&n){const t=n.querySelector(".dropdown, .dropdown-menu"),r=n.querySelector(".mobile-dropdown-toggle");if(t&&r&&o.parentElement.classList.contains("nav-item-wrapper")){if(null!==r.offsetParent){const n=o.getBoundingClientRect();if(e.clientX>n.right-50){e.preventDefault(),e.stopPropagation();const o="true"===r.getAttribute("aria-expanded");return c(),void(o||(t.classList.add("show"),r.setAttribute("aria-expanded","true")))}return void setTimeout(()=>u(),100)}}return void setTimeout(()=>u(),100)}if(r&&n){const t=n.querySelector(".dropdown, .dropdown-menu"),o=n.querySelector(".mobile-dropdown-toggle");if(t&&o){e.preventDefault(),e.stopPropagation();const n="true"===o.getAttribute("aria-expanded");return c(),void(n?(t.classList.remove("show"),o.setAttribute("aria-expanded","fal
1se")):(t.classList.add("show"),o.setAttribute("aria-expanded","true")))}}e.target===t&&l&&u()}),document.addEventListener("keydown",function(e){if("Escape"===e.key&&l&&u(),l&&"Tab"===e.key){const o=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===o.length)return;const n=o[0],r=o[o.length-1];e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus())}}),window.addEventListener("resize",function(){clearTimeout(a),a=setTimeout(()=>{window.innerWidth>768&&l&&u(),i()&&!r||!i()&&r&&r&&!i()&&(t.innerHTML=n,r=!1,m())},250)}),m(),"undefined"!=typeof performance&&performance.mark&&performance.mark("mobile-menu-initialized"),window.aflDebug&&aflDebug.log("Mobile Menu","Ready!")});
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.