HEX
Server: nginx/1.16.1
System: Linux VM-0-14-centos 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1000)
PHP: 8.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.sceybwg.com/wp-content/plugins/elementor/assets/js/design-system-sync.js
/******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/*!*****************************************************************************!*\
  !*** ../modules/design-system-sync/assets/js/design-system-sync-handler.js ***!
  \*****************************************************************************/


(function () {
  'use strict';

  var SYNC_ENDPOINT = wpApiSettings.root + 'elementor/v1/design-system-sync/stylesheet';
  var SYNC_STYLESHEET_ID = 'elementor-design-system-sync-css';
  var DEBOUNCE_MS = 500;
  var syncTimeout;
  function syncDesignSystem() {
    fetch(SYNC_ENDPOINT, {
      method: 'POST',
      headers: {
        'X-WP-Nonce': wpApiSettings.nonce
      }
    }).then(function (response) {
      if (!response.ok) {
        return;
      }
      if (204 === response.status) {
        return;
      }
      return response.json();
    }).then(function (data) {
      if (!data) {
        return;
      }
      refreshGlobals();
      reloadCanvasDesignSyncStyles(data);
    });
  }
  function refreshGlobals() {
    var globals = $e.components.get('globals');
    globals === null || globals === void 0 || globals.refreshGlobalData();
    globals === null || globals === void 0 || globals.populateGlobalData();
  }
  function reloadCanvasDesignSyncStyles(_ref) {
    var url = _ref.url;
    var previewFrame = document.getElementById('elementor-preview-iframe');
    if (!(previewFrame !== null && previewFrame !== void 0 && previewFrame.contentDocument)) {
      return;
    }
    var link = previewFrame.contentDocument.getElementById(SYNC_STYLESHEET_ID);
    if (!link) {
      link = previewFrame.contentDocument.createElement('link');
      link.id = SYNC_STYLESHEET_ID;
      link.rel = 'stylesheet';
      previewFrame.contentDocument.head.appendChild(link);
    }
    link.href = url;
  }
  function onClassesUpdated(event) {
    var context = event.detail.context;
    if (context !== 'frontend') {
      return;
    }
    clearTimeout(syncTimeout);
    syncTimeout = setTimeout(syncDesignSystem, DEBOUNCE_MS);
  }
  window.addEventListener('classes:updated', onClassesUpdated);
  window.addEventListener('variables:updated', function () {
    clearTimeout(syncTimeout);
    syncTimeout = setTimeout(syncDesignSystem, DEBOUNCE_MS);
  });
})();
/******/ })()
;
//# sourceMappingURL=design-system-sync.js.map