<!--VORON--><!--VR38--><!--settings{"cls":"","res":"6000","line":"false","color":"#fff","width":"150px","height":"4px","radius":"2px","top":"15px","hideclose":"false"}settingsend-->
<script>
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
if (window.innerWidth < 6000) {
const popups = document.querySelectorAll('. .t-popup');
popups.forEach((myElement) => {
let touchStartY = 0;
let touchCurrentY = 0;
let isSwiping = false;
myElement.addEventListener('touchstart', (e) => {
touchStartY = e.changedTouches[0].screenY;
isSwiping = true;
});
myElement.addEventListener('touchmove', (e) => {
if (isSwiping) {
touchCurrentY = e.changedTouches[0].screenY;
const translateY = Math.max(0, touchCurrentY - touchStartY);
myElement.style.transform = `translateY(${translateY}px)`;
}
});
myElement.addEventListener('touchend', (e) => {
isSwiping = false;
const touchEndY = e.changedTouches[0].screenY;
if (touchEndY > touchStartY + 50) {
myElement.style.transition = 'transform 0.5s ease';
myElement.style.transform = `translateY(${window.innerHeight}px)`;
myElement.querySelector('.t-popup__close').click();
setTimeout(() => {
myElement.style.transition = 'none';
myElement.style.transform = 'translateY(0)';
}, 500);
} else {
myElement.style.transform = 'translateY(0)';
}
});
})
}
})
})
</script>
123