https://t.me/RX1948
Server : nginx/1.24.0
System : Linux ip-172-31-33-48 6.14.0-1011-aws #11~24.04.1-Ubuntu SMP Fri Aug 1 02:07:25 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
Directory :  /var/www/html/wp-content/google-analytics-for-wordpress.off/assets/js/frontend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/wp-content/google-analytics-for-wordpress.off/assets/js/frontend/block-scripts.js
/******/ (() => { // webpackBootstrap
/*!**********************************************!*\
  !*** ./src/blocks/site-insights/frontend.js ***!
  \**********************************************/
(function (window, $) {
  // Look for all the graph blocks in the page.
  const blocks = document.querySelectorAll(".monsterinsights-graph-item");
  if (blocks.length < 0) {
    // Something is really wrong here. We loaded the script, but we didn't find any selectors.
    return;
  }

  /**
   * This function goes through all the ApexChart options and converts all the `formatter` properties to that function
   * https://apexcharts.com/docs/options/legend/#formatter
   *
   * @param obj
   * @returns {*}
   */
  const applyFormatterFunctions = obj => {
    if (typeof obj !== 'object') {
      return obj;
    }
    Object.keys(obj).map(k => {
      if (typeof obj !== 'object') {
        return obj[k];
      }
      if (k === 'formatter' && obj[k].hasOwnProperty('args') && obj[k].hasOwnProperty('body')) {
        const f = new Function(obj[k]['args'], obj[k]['body']);
        obj[k] = f;
        return f;
      }
      return applyFormatterFunctions(obj[k]);
    });
    return obj;
  };

  // For each block we will take individual options and render a separate chart for each of them.
  blocks.forEach(function (block) {
    const json = block.querySelector('script').textContent;
    let options = null;
    try {
      options = JSON.parse(json);
    } catch (e) {
      return false;
    }
    if (null !== options) {
      const parsedOptions = applyFormatterFunctions(options);
      const chart = new ApexCharts(block, parsedOptions);
      chart.render();
    }
  });
})(window, jQuery);
/******/ })()
;
//# sourceMappingURL=frontend-scripts.js.map

https://t.me/RX1948 - 2025