1!function(e){"use strict";e.behaviors.customTopicsDropdown={attach:function(e,t){e===document&&document.querySelectorAll(".learn-page__learn-topics .views-element-container .item-list:not([data-custom-dropdown-processed])").forEach((function(e){function t(){s.classList.add("open"),s.setAttribute("aria-expanded","true"),a(u.querySelector(".selected")||u.firstElementChild),(function(){let e=document.getElementById("aria-live-region");return!e&&(e=document.createElement("div"),e.id="aria-live-region",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.className="sr-only",document.body.appendChild(e)),e}()).textContent="Dropdown menu expanded. Use arrow keys to navigate options."}function n(){s.classList.remove("open"),s.setAttribute("aria-expanded","false")}function o(e){const t=e.getAttribute("data-value"),o=e.textContent;l.textContent=o,u.querySelectorAll(".dropdown-option").forEach((function(e){e.classList.remove("selected"),e.setAttribute("aria-selected","false")})),e.classList.add("selected"),e.setAttribute("aria-selected","true"),m=e,n(),window.location.href=t}function a(e){!e||(u.querySelectorAll(".dropdown-option").forEach((function(e){e.classList.remove("highlighted")})),e.classList.add("highlighted"),m=e,!function(e,t){const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return o.top>=n.top&&o.bottom<=n.bottom}(e,u)&&e.scrollIntoView({block:"nearest"}),e.focus())}e.setAttribute("data-custom-dropdown-processed","true");const i=e.querySelectorAll("li"),r=window.location.pathname,s=document.createElement("div");s.className="custom-dropdown",s.setAttribute("tabindex","0"),s.setAttribute("role","combobox"),s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-expanded","false");const c=document.createElement("div");c.className="dropdown-selected";const l=document.createElement("span");l.className="selected-text",l.textContent="Select a topic";const d=document.createElement("span");d.className="dropdown-arrow",d.innerHTML='<i class="fa-solid fa-chevron-down"></i>';const u=document.createElement("ul");u.className="dropdown-options",u.setAttribute("role","listbox"),u.setAttribute("aria-label","Topics"),c.appendChild(l),c.appendChild(d);let p=!1,m=null;i.forEach((function(e){const t=e.querySelector("a");if(t){const e=t.textContent.trim(),n=t.getAttribute("href"),o=document.createElement("li");o.className="dropdown-option",o.setAttribute("role","option"),o.setAttribute("data-value",n),o.setAttribute("tabindex","-1"),o.textContent=e,n===r&&(o.classList.add("selected"),o.setAttribute("aria-selected","true"),l.textContent=e,p=!0,m=o),u.appendChild(o)}})),!m&&u.firstElementChild&&(m=u.firstElementChild),s.appendChild(c),s.appendChild(u);const f=document.createElement("div");f.className="topics-mobile-wrapper",f.appendChild(s),e.parentNode.insertBefore(f,e),c.addEventListener("click",(function(e){e.preventDefault(),s.classList.contains("open")?n():t()})),s.addEventListener("keydown",(function(e){if(!s.classList.contains("open"))return void(("Enter"===e.key||" "===e.key||"ArrowDown"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),t(),"ArrowDown"===e.key?a(u.firstElementChild):"ArrowUp"===e.key&&a(u.lastElementChild)));let i;switch(e.key){case"ArrowDown":e.preventDefault(),i=m.nextElementSibling,i&&a(i);break;case"ArrowUp":e.preventDefault(),i=m.previousElementSibling,i&&a(i);break;case"Enter":case" ":e.preventDefault(),o(m);break;case"Escape":e.preventDefault(),n(),s.focus();break;case"Tab":setTimeout((function(){!s.contains(document.activeElement)&&n()}),0);break;case"Home":e.preventDefault(),a(u.firstElementChild);break;case"End":e.preventDefault(),a(u.lastElementChild)}})),u.querySelectorAll(".dropdown-option").forEach((function(e){e.addEventListener("keydown",(function(t){("Enter"===t.key||" "===t.key)&&(t.preventDefault(),o(e))}))})),document.addEventListener("click",(function(e){!s.contains(e.target)&&n()})),u.addEventListener("click",(function(e){const t=e.target.closest(".dropdown-option");t&&o(t)}))}))}}}(Drupal||{});
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.