rchContainer = document.getElementById(searchContainerId);
    if (!searchContainer) return; // Exit if container is not found

    const searchBar = searchContainer.querySelector('#search-bar');
    const autocompleteList = searchContainer.querySelector('#autocomplete-list');
    const outputLinks = document.querySelectorAll(outputSelector);

    // Collect output names and their hrefs
    const outputs = Array.from(outputLinks).map(link => ({
        name: link.textContent.trim(),
        href: link.getAt