     }
        }
        }

        function setupListeners(linkElement) {
        linkElement.addEventListener('mouseleave', function (_event) {
        hideTooltip();
        });

        tooltipWrapper.addEventListener('mouseleave', function (_event) {
        hideTooltip();
        });

        linkElement.addEventListener('mouseenter', function (event) {
        clearTimeout(opacityTimeout);
        clearTimeout(contentTimeout);
        showTooltip(event);
        });

        tooltipWrapper.addEventLi