inkClicked(link, e);
	} else if (!link && !document.querySelector('#popup1 .popup').contains(el)) {
		hideModal();
	}
}

function escapeRegex(string) {
	return string.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&');
}

function showModal (popup, isForcedDark) {
	window.lastScrollOffset = window.pageYOffset;
	document.body.classList.add('modal-open');
	document.body.style.top = `-${window.lastScrollOffsetllY}px`;
	popup = popup || document.querySelector('#popup1');
	if (isForcedDark) {
		popup.classList.add('darkF