function t_feed_onFuncLoad(funcName, okFunc, time) { if (typeof window[funcName] === 'function') { okFunc(); } else { setTimeout(function checkFuncExist() { if (typeof window[funcName] === 'function') { okFunc(); return; } if (document.readyState === 'complete' && typeof window[funcName] !== 'function') { throw new Error(funcName + ' is undefined'); } setTimeout(checkFuncExist, time || 100); }); }}function t_feed__trapFocus(popup) { var focusableEls = popup.querySelectorAll('a, button, input:not([type="hidden"]), select, textarea, video, iframe'); var firstFocusableElement = focusableEls[0]; var lastFocusableElement = focusableEls[focusableEls.length - 1]; document.addEventListener('keydown', function (event) { var isTabPressed = event.key === 'Tab' || event.keyCode === 9; if (!isTabPressed) { return; } if (event.shiftKey) { // if tab+shift and we moving back if (document.activeElement === firstFocusableElement) { lastFocusableElement.focus(); event.preventDefault(); } } else if (document.activeElement === lastFocusableElement) { firstFocusableElement.focus(); event.preventDefault(); } });}function t_feed__getRootZone() { const allrecords = document.getElementById('allrecords'); const rootZone = allrecords && allrecords.getAttribute('data-tilda-root-zone'); return rootZone || 'com';}// Polyfill: Element.matchesif (!Element.prototype.matches) { Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector;}// Polyfill: Element.closestif (!Element.prototype.closest) { Element.prototype.closest = function (s) { var el = this; while (el && el.nodeType === 1) { if (Element.prototype.matches.call(el, s)) { return el; } el = el.parentElement || el.parentNode; } return null; };}