6301Element.prototype.matchesSelector ||6302// @ts-expect-error ST-2949_16303Element.prototype.msMatchesSelector ||6304// @ts-expect-error ST-2949_16305Element.prototype.mozMatchesSelector ||6306Element.prototype.webkitMatchesSelector ||6307// @ts-expect-error ST-2949_16308Element.prototype.oMatchesSelector;6309}63106311/**6312* Polyfill: Element.closest
**/if (!Element.prototype.closest) { // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) // @ts-expect-error ST-2949_2 Element.prototype.closest = function (s) { var el = this; while (el && el.nodeType === 1) { if (Element.prototype.matches.call(el, s)) { return el; } // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 el = el.parentElement || el.parentNode; } return null; };}/** * It opens the cart window */function tcart__openCartFullscreen() { if (document.body.classList.contains('t706__body_cartsidebarshowed')) { tcart__closeCartSidebar(); } if (location.href.indexOf('#tcart') !== -1) { window.history.replaceState({}, '', location.href.replace(/#tcart/g, '')); window.history.pushState({}, '', location.origin + location.pathname + '#tcart'); } else { window.history.replaceState({}, '', location.origin + location.pathname + '#tcart'); } t_triggerEvent(document.body, 'popupShowed'); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 document.querySelector('body').classList.add('t706__body_cartpageshowed'); tcart__syncProductsObject__LStoObj(); // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 tcart__updateProductsPrice(); var cartWindow = document.querySelector('.t706__cartpage'); // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 cartWindow.style.display = ''; // create button that shows form on mobile if (window.tcart_isMobile) { var form = document.querySelector('.t706__cartpage-form'); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var wrap = cartWindow.querySelector('.t706__cartpage-open-form-wrap'); // @ts-expect-error ST-2949_3 var btn = cartWindow.querySelector('.t706__cartpage-open-form'); // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 wrap.style.display = 'block'; // @ts-expect-error ST-2949_1 form.style.display = 'none'; // @ts-expect-error ST-2949_1 if (btn.style.display === 'none') btn.style.display = 'block'; // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 btn.addEventListener('click', function () { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 form.style.display = 'block'; // @ts-expect-error ST-2949_1 form.style.opacity = 0; // @ts-expect-error ST-2949_1 form.style.transform = 'translateY(75%)'; // @ts-expect-error ST-2949_1 form.style.transition = 'opacity .1s, transform .1s'; setTimeout(function () { // @ts-expect-error ST-2949_1 form.style.opacity = 1; // @ts-expect-error ST-2949_1 form.style.transform = 'translateY(0)'; }, 0); // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)