Konsultasi Marketing Marketing Marketing
WA
'; dialog.appendChild(frame); } }function showNext() { if (index >= queue.length) { return; }var item = queue[index++]; var overlay = document.createElement('div'); overlay.className = 'res-dcxp-overlay'; overlay.setAttribute('role', 'presentation');var dialog = document.createElement('div'); dialog.className = 'res-dcxp-dialog'; dialog.setAttribute('role', 'dialog'); dialog.setAttribute('aria-modal', 'true');function closePopup() { if (autoTimer) { window.clearTimeout(autoTimer); autoTimer = null; } overlay.classList.remove('is-open'); window.setTimeout(function () { if (overlay.parentNode) { overlay.parentNode.removeChild(overlay); } activeOverlay = null; window.setTimeout(showNext, Math.max(0, parseInt(config.queueGap || 0, 10)) * 1000); }, 190); }dialog.appendChild(createCloseButton(closePopup)); buildContent(item, dialog); overlay.appendChild(dialog); document.body.appendChild(overlay); activeOverlay = overlay;overlay.addEventListener('click', function (event) { if (event.target === overlay) { closePopup(); } });window.requestAnimationFrame(function () { overlay.classList.add('is-open'); });var autoClose = Math.max(0, parseInt(item.autoClose || 0, 10)); if (autoClose > 0) { autoTimer = window.setTimeout(closePopup, autoClose * 1000); } }document.addEventListener('keydown', function (event) { if (event.key === 'Escape' && activeOverlay) { var close = activeOverlay.querySelector('.res-dcxp-close'); if (close) { close.click(); } } });function start() { if (!queue.length || hasSeen()) { return; } markSeen(); window.setTimeout(showNext, Math.max(0, parseInt(config.initialDelay || 0, 10)) * 1000); }if (document.readyState === 'complete') { start(); } else { window.addEventListener('load', start, { once: true }); } }());