SILENT KILLERPanel

Current Path: > home > transcarter > public_html > > > > wp-content > plugins > elementor-pro > > > assets > js


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter/public_html////wp-content/plugins/elementor-pro///assets/js

NameTypeSizeLast ModifiedActions
notes Directory - -
032b3da5bbb0e14863d8.bundle.min.js File 2745 bytes March 09 2023 22:15:56.
2916a86e9d819c3b8e53.bundle.js File 5382 bytes March 09 2023 22:15:56.
admin.js File 55283 bytes March 09 2023 22:15:56.
admin.min.js File 26856 bytes March 09 2023 22:15:56.
animated-headline.c393acfc996affc045c4.bundle.js File 12827 bytes March 09 2023 22:15:56.
animated-headline.ffb4bb4ce1b16b11446d.bundle.min.js File 7872 bytes March 09 2023 22:15:56.
app.js File 232479 bytes March 09 2023 22:15:56.
app.min.js File 72877 bytes March 09 2023 22:15:56.
archive-posts.1de00dabb89a39359d7a.bundle.min.js File 8086 bytes March 09 2023 22:15:56.
archive-posts.52df853fe39c0c25efdb.bundle.js File 15964 bytes March 09 2023 22:15:56.
carousel.7c5ebb33f792ba7c54a5.bundle.js File 10166 bytes March 09 2023 22:15:56.
carousel.9b02b45d7826c1c48f33.bundle.min.js File 5014 bytes March 09 2023 22:15:56.
code-highlight.28a979661569ddbbf60d.bundle.min.js File 472 bytes March 09 2023 22:15:56.
code-highlight.dc6d2677ff88703b48a6.bundle.js File 1022 bytes March 09 2023 22:15:56.
countdown.b0ef6392ec4ff09ca2f2.bundle.min.js File 2662 bytes March 09 2023 22:15:56.
countdown.b45b18e0642486b9e7a2.bundle.js File 4909 bytes March 09 2023 22:15:56.
custom-code.js File 97112 bytes March 09 2023 22:15:56.
custom-code.min.js File 25506 bytes March 09 2023 22:15:56.
editor.js File 362538 bytes March 09 2023 22:15:56.
editor.min.js File 140440 bytes March 09 2023 22:15:56.
elements-handlers.js File 79201 bytes March 09 2023 22:15:56.
elements-handlers.min.js File 29601 bytes March 09 2023 22:15:56.
form-submission-admin.js File 367852 bytes March 09 2023 22:15:56.
form-submission-admin.min.js File 105231 bytes March 09 2023 22:15:56.
form.2ad029cbe1f8e7bb2a51.bundle.js File 33457 bytes March 09 2023 22:15:56.
form.72b77b99d67b130634d2.bundle.min.js File 19245 bytes March 09 2023 22:15:56.
frontend.js File 51125 bytes March 09 2023 22:15:56.
frontend.min.js File 22378 bytes March 09 2023 22:15:56.
gallery.0ef278a9e7271daf471f.bundle.js File 9382 bytes March 09 2023 22:15:56.
gallery.9c61bb9957e10e6d7bda.bundle.min.js File 5777 bytes March 09 2023 22:15:56.
hotspot.6ab1751404c381bfe390.bundle.min.js File 2822 bytes March 09 2023 22:15:56.
hotspot.fd80dbd4c6b229a1248d.bundle.js File 5011 bytes March 09 2023 22:15:56.
jszip.vendor.99a5b769619f50a6cb60.bundle.min.js File 98226 bytes March 09 2023 22:15:56.
jszip.vendor.99a5b769619f50a6cb60.bundle.min.js.LICENSE.txt File 383 bytes March 09 2023 22:15:56.
jszip.vendor.a3c65615c1de5560962d.bundle.js File 97933 bytes March 09 2023 22:15:56.
load-more.74a5f2a7b4ea2574261d.bundle.js File 10661 bytes March 09 2023 22:15:56.
load-more.c9f6aac03af905f4e206.bundle.min.js File 5611 bytes March 09 2023 22:15:56.
loop-carousel.60491e3f5632f852cb46.bundle.js File 10044 bytes March 09 2023 22:15:56.
loop-carousel.e7d573cc61a4613d5eaa.bundle.min.js File 4566 bytes March 09 2023 22:15:56.
loop.6c57b6a19d39a769d232.bundle.js File 16697 bytes March 09 2023 22:15:56.
loop.90b7e48497eef3467b50.bundle.min.js File 8607 bytes March 09 2023 22:15:56.
lottie.147bf20db94f86cc4295.bundle.min.js File 14302 bytes March 09 2023 22:15:56.
lottie.6b9f165fe46d24dcc52d.bundle.js File 24883 bytes March 09 2023 22:15:56.
media-carousel.4e9ae30dcdfd1bc9b9cc.bundle.js File 13358 bytes March 09 2023 22:15:56.
media-carousel.aca2224ef13e6f999011.bundle.min.js File 7003 bytes March 09 2023 22:15:56.
mega-menu-editor.66d798484de92bb1d092.bundle.js File 1740 bytes March 09 2023 22:15:56.
mega-menu-editor.8f2c9487eaa07d65080c.bundle.min.js File 595 bytes March 09 2023 22:15:56.
mega-menu.4a7b12e16bf197774f3a.bundle.min.js File 1939 bytes March 09 2023 22:15:56.
mega-menu.d12688cd73fc8463fd45.bundle.js File 3156 bytes March 09 2023 22:15:56.
nav-menu.82a1282825fb41657fb1.bundle.js File 6942 bytes March 09 2023 22:15:56.
nav-menu.c8d112707fd7172d2a9d.bundle.min.js File 4175 bytes March 09 2023 22:15:56.
page-transitions-editor.69f365c96dc0120de70b.bundle.min.js File 5932 bytes March 09 2023 22:15:56.
page-transitions-editor.ed9e6f841eb61c1ca3b1.bundle.js File 17103 bytes March 09 2023 22:15:56.
page-transitions.js File 34940 bytes March 09 2023 22:15:56.
page-transitions.min.js File 17425 bytes March 09 2023 22:15:56.
paypal-button.3d0d5af7df85963df32c.bundle.min.js File 872 bytes March 09 2023 22:15:56.
paypal-button.404e42bdd9fd69769a7e.bundle.js File 1577 bytes March 09 2023 22:15:56.
popup.483b906ddaa1af17ff14.bundle.min.js File 759 bytes March 09 2023 22:15:56.
popup.bb4845c37d0713c117a7.bundle.js File 1553 bytes March 09 2023 22:15:56.
portfolio.042905bde20a1afccada.bundle.min.js File 7283 bytes March 09 2023 22:15:56.
portfolio.691e77a00bfc5aaca736.bundle.js File 13014 bytes March 09 2023 22:15:56.
posts.7af7c022fae48743b8f5.bundle.js File 5961 bytes March 09 2023 22:15:56.
posts.e33113a212454e383747.bundle.min.js File 3325 bytes March 09 2023 22:15:56.
preloaded-elements-handlers.js File 312724 bytes March 09 2023 22:15:56.
preloaded-elements-handlers.min.js File 155021 bytes March 09 2023 22:15:56.
preview.js File 97935 bytes March 09 2023 22:15:56.
preview.min.js File 20726 bytes March 09 2023 22:15:56.
product-add-to-cart.023d7d31fbf96c3dbdfc.bundle.min.js File 3504 bytes March 09 2023 22:15:56.
product-add-to-cart.24cc48f12a494b0a1ee8.bundle.js File 7339 bytes March 09 2023 22:15:56.
progress-tracker.a623211597e045d1e3fb.bundle.js File 9463 bytes March 09 2023 22:15:56.
progress-tracker.e19e2547639d7d9dac17.bundle.min.js File 5262 bytes March 09 2023 22:15:56.
qunit-tests.js File 2875 bytes March 09 2023 22:15:56.
qunit-tests.min.js File 295 bytes March 09 2023 22:15:56.
screenshot.js File 11967 bytes March 09 2023 22:15:56.
screenshot.min.js File 5902 bytes March 09 2023 22:15:56.
search-form.0ef02f9fd5e7db2ea91b.bundle.min.js File 2047 bytes March 09 2023 22:15:56.
search-form.745c314db888d6579f01.bundle.js File 4126 bytes March 09 2023 22:15:56.
share-buttons.0bdd88c45462dfb2b073.bundle.min.js File 1213 bytes March 09 2023 22:15:56.
share-buttons.a664d7d2325145d63a50.bundle.js File 2801 bytes March 09 2023 22:15:56.
slides.15578270c660bf7336e0.bundle.js File 7567 bytes March 09 2023 22:15:56.
slides.fb6b9afd278bb9c5e75b.bundle.min.js File 3926 bytes March 09 2023 22:15:56.
social.02ea9f7665e0d131a2b5.bundle.js File 1991 bytes March 09 2023 22:15:56.
social.2d2e44e8608690943f29.bundle.min.js File 1022 bytes March 09 2023 22:15:56.
stripe-button.d283ce83621092402874.bundle.min.js File 1957 bytes March 09 2023 22:15:56.
stripe-button.f8caf6cd9d2ccc5bf236.bundle.js File 3932 bytes March 09 2023 22:15:56.
table-of-contents.a695231ee79a390b7620.bundle.min.js File 7569 bytes March 09 2023 22:15:56.
table-of-contents.c5c8b96b399003d092ba.bundle.js File 14489 bytes March 09 2023 22:15:56.
video-playlist.0c9d14b28f7b8990e895.bundle.min.js File 22700 bytes March 09 2023 22:15:56.
video-playlist.2b76ff3bec7df15a2193.bundle.js File 50181 bytes March 09 2023 22:15:56.
webpack-pro.runtime.js File 15101 bytes March 09 2023 22:15:56.
webpack-pro.runtime.min.js File 5414 bytes March 09 2023 22:15:56.
woocommerce-cart.0b18dc924da1a5189df8.bundle.js File 10767 bytes March 09 2023 22:15:56.
woocommerce-cart.fc30c6cb753d4098eff5.bundle.min.js File 5199 bytes March 09 2023 22:15:56.
woocommerce-checkout-page.3cb5c6f93bcb9758d55a.bundle.js File 11976 bytes March 09 2023 22:15:56.
woocommerce-checkout-page.b18af78282979b6f74e4.bundle.min.js File 6515 bytes March 09 2023 22:15:56.
woocommerce-menu-cart.010fd4f77028744116a8.bundle.js File 8876 bytes March 09 2023 22:15:56.
woocommerce-menu-cart.37905d32f638831bc09d.bundle.min.js File 4690 bytes March 09 2023 22:15:56.
woocommerce-my-account.3ee10d01e625dad87f73.bundle.min.js File 6225 bytes March 09 2023 22:15:56.
woocommerce-my-account.dcb725d60330dc65b981.bundle.js File 11635 bytes March 09 2023 22:15:56.
woocommerce-notices.050d0718164487e6d7ff.bundle.js File 3046 bytes March 09 2023 22:15:56.
woocommerce-notices.da27b22c491f7cbe9158.bundle.min.js File 1870 bytes March 09 2023 22:15:56.
woocommerce-purchase-summary.01bf6c261591068cd228.bundle.js File 7506 bytes March 09 2023 22:15:56.
woocommerce-purchase-summary.46445ab1120a8c28c05c.bundle.min.js File 3497 bytes March 09 2023 22:15:56.

Reading File: /home/transcarter/public_html////wp-content/plugins/elementor-pro///assets/js/screenshot.js

/*! elementor-pro - v3.11.0 - 13-02-2023 */
/******/ (() => { // webpackBootstrap
/******/ 	"use strict";
var __webpack_exports__ = {};
/*!**************************************************************!*\
  !*** ../modules/screenshots/assets/js/preview/screenshot.js ***!
  \**************************************************************/


/* global ElementorScreenshotConfig */
class Screenshot extends elementorModules.ViewModule {
  getDefaultSettings() {
    return {
      empty_content_headline: 'Empty Content.',
      crop: {
        width: 1200,
        height: 1500
      },
      excluded_external_css_urls: ['https://kit-pro.fontawesome.com'],
      external_images_urls: ['https://i.ytimg.com' // Youtube images domain.
      ],

      timeout: 15000,
      // Wait until screenshot taken or fail in 15 secs.
      render_timeout: 5000,
      // Wait until all the element will be loaded or 5 sec and then take screenshot.
      timerLabel: null,
      timer_label: `${ElementorScreenshotConfig.post_id} - timer`,
      image_placeholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=',
      isDebug: elementorCommonConfig.isElementorDebug,
      isDebugSvg: false,
      ...ElementorScreenshotConfig
    };
  }
  getDefaultElements() {
    const $elementor = jQuery(ElementorScreenshotConfig.selector);
    const $sections = $elementor.find('.elementor-section-wrap > .elementor-section, .elementor > .elementor-section');
    return {
      $elementor,
      $sections,
      $firstSection: $sections.first(),
      $notElementorElements: elementorCommon.elements.$body.find('> *:not(style, link)').not($elementor),
      $head: jQuery('head')
    };
  }
  onInit() {
    super.onInit();
    this.log('Screenshot init', 'time');

    /**
     * Hold the timeout timer
     *
     * @type {number|null}
     */
    this.timeoutTimer = setTimeout(this.screenshotFailed.bind(this), this.getSettings('timeout'));
    return this.captureScreenshot();
  }

  /**
   * The main method for this class.
   */
  captureScreenshot() {
    if (!this.elements.$elementor.length) {
      elementorCommon.helpers.consoleWarn('Screenshots: The content of this page is empty, the module will create a fake conent just for this screenshot.');
      this.createFakeContent();
    }
    this.removeUnnecessaryElements();
    this.handleIFrames();
    this.removeFirstSectionMargin();
    this.handleLinks();
    this.loadExternalCss();
    this.loadExternalImages();
    return Promise.resolve().then(this.createImage.bind(this)).then(this.createImageElement.bind(this)).then(this.cropCanvas.bind(this)).then(this.save.bind(this)).then(this.screenshotSucceed.bind(this)).catch(this.screenshotFailed.bind(this));
  }

  /**
   * Fake content for documents that dont have any content.
   */
  createFakeContent() {
    this.elements.$elementor = jQuery('<div>').css({
      height: this.getSettings('crop.height'),
      width: this.getSettings('crop.width'),
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center'
    });
    this.elements.$elementor.append(jQuery('<h1>').css({
      fontSize: '85px'
    }).html(this.getSettings('empty_content_headline')));
    document.body.prepend(this.elements.$elementor);
  }

  /**
   * CSS from another server cannot be loaded with the current dom to image library.
   * this method take all the links from another domain and proxy them.
   */
  loadExternalCss() {
    const excludedUrls = [this.getSettings('home_url'), ...this.getSettings('excluded_external_css_urls')];
    const notSelector = excludedUrls.map(url => `[href^="${url}"]`).join(', ');
    jQuery('link').not(notSelector).each((index, el) => {
      const $link = jQuery(el),
        $newLink = $link.clone();
      $newLink.attr('href', this.getScreenshotProxyUrl($link.attr('href')));
      this.elements.$head.append($newLink);
      $link.remove();
    });
  }

  /**
   * Make a proxy to images urls that has some problems with cross origin (like youtube).
   */
  loadExternalImages() {
    const selector = this.getSettings('external_images_urls').map(url => `img[src^="${url}"]`).join(', ');
    jQuery(selector).each((index, el) => {
      const $img = jQuery(el);
      $img.attr('src', this.getScreenshotProxyUrl($img.attr('src')));
    });
  }

  /**
   * Html to images libraries can not snapshot IFrames
   * this method convert all the IFrames to some other elements.
   */
  handleIFrames() {
    this.elements.$elementor.find('iframe').each((index, el) => {
      const $iframe = jQuery(el),
        $iframeMask = jQuery('<div />', {
          css: {
            background: 'gray',
            width: $iframe.width(),
            height: $iframe.height()
          }
        });
      $iframe.before($iframeMask);
      $iframe.remove();
    });
  }

  /**
   * Remove all the sections that should not be in the screenshot.
   */
  removeUnnecessaryElements() {
    let currentHeight = 0;
    this.elements.$sections.filter((index, el) => {
      let shouldBeRemoved = false;
      if (currentHeight >= this.getSettings('crop.height')) {
        shouldBeRemoved = true;
      }
      currentHeight += jQuery(el).outerHeight();
      return shouldBeRemoved;
    }).each((index, el) => {
      el.remove();
    });

    // Some 3rd party plugins inject elements into the dom, so this method removes all
    // the elements that was injected, to make sure that it capture a screenshot only of the post itself.
    this.elements.$notElementorElements.remove();
  }

  /**
   * Some urls make some problems to the svg parser.
   * this method convert all the urls to just '/'.
   */
  handleLinks() {
    elementorCommon.elements.$body.find('a').attr('href', '/');
  }

  /**
   * Remove unnecessary margin from the first element of the post (singles and footers).
   */
  removeFirstSectionMargin() {
    this.elements.$firstSection.css({
      marginTop: 0
    });
  }

  /**
   * Creates a png image.
   *
   * @return {Promise<unknown>} -
   */
  createImage() {
    const pageLoadedPromise = new Promise(resolve => {
      window.addEventListener('load', () => {
        resolve();
      });
    });
    const timeOutPromise = new Promise(resolve => {
      setTimeout(() => {
        resolve();
      }, this.getSettings('render_timeout'));
    });
    return Promise.race([pageLoadedPromise, timeOutPromise]).then(() => {
      this.log('Start creating screenshot.');
      if (this.getSettings('isDebugSvg')) {
        domtoimage.toSvg(document.body, {
          imagePlaceholder: this.getSettings('image_placeholder')
        }).then(svg => this.download(svg));
        return Promise.reject('Debug SVG.');
      }

      // TODO: Extract to util function.
      const isSafari = /^((?!chrome|android).)*safari/i.test(window.userAgent);

      // Safari browser has some problems with the images that dom-to-images
      // library creates, so in this specific case the screenshot uses html2canvas.
      // Note that dom-to-image creates more accurate screenshot in "not safari" browsers.
      if (isSafari) {
        this.log('Creating screenshot with "html2canvas"');
        return html2canvas(document.body).then(canvas => {
          return canvas.toDataURL('image/png');
        });
      }
      this.log('Creating screenshot with "dom-to-image"');
      return domtoimage.toPng(document.body, {
        imagePlaceholder: this.getSettings('image_placeholder')
      });
    });
  }

  /**
   * Download a uri, use for debugging the svg that created from dom to image libraries.
   *
   * @param {string} uri
   */
  download(uri) {
    const $link = jQuery('<a/>', {
      href: uri,
      download: 'debugSvg.svg',
      html: 'Download SVG'
    });
    elementorCommon.elements.$body.append($link);
    $link.trigger('click');
  }

  /**
   * Creates fake image element to get the size of the image later on.
   *
   * @param {string} dataUrl
   * @return {Promise<HTMLImageElement>} -
   */
  createImageElement(dataUrl) {
    const image = new Image();
    image.src = dataUrl;
    return new Promise(resolve => {
      image.onload = () => resolve(image);
    });
  }

  /**
   * Crop the image to requested sizes.
   *
   * @param {HTMLImageElement} image
   * @return {Promise<unknown>} -
   */
  cropCanvas(image) {
    const width = this.getSettings('crop.width');
    const height = this.getSettings('crop.height');
    const cropCanvas = document.createElement('canvas'),
      cropContext = cropCanvas.getContext('2d'),
      ratio = width / image.width;
    cropCanvas.width = width;
    cropCanvas.height = height > image.height ? image.height : height;
    cropContext.drawImage(image, 0, 0, image.width, image.height, 0, 0, image.width * ratio, image.height * ratio);
    return Promise.resolve(cropCanvas);
  }

  /**
   * Send the image to the server.
   *
   * @param {HTMLCanvasElement} canvas
   * @return {Promise<unknown>} -
   */
  save(canvas) {
    return new Promise((resolve, reject) => {
      elementorCommon.ajax.addRequest('screenshot_save', {
        data: {
          post_id: this.getSettings('post_id'),
          screenshot: canvas.toDataURL('image/png')
        },
        success: url => {
          this.log(`Screenshot created: ${encodeURI(url)}`);
          resolve(url);
        },
        error: () => {
          this.log('Failed to create screenshot.');
          reject();
        }
      });
    });
  }

  /**
   * Mark this post screenshot as failed.
   */
  markAsFailed() {
    return new Promise((resolve, reject) => {
      elementorCommon.ajax.addRequest('screenshot_failed', {
        data: {
          post_id: this.getSettings('post_id')
        },
        success: () => {
          this.log(`Marked as failed.`);
          resolve();
        },
        error: () => {
          this.log('Failed to mark this screenshot as failed.');
          reject();
        }
      });
    });
  }

  /**
   * @param {string} url
   * @return {string} -
   */
  getScreenshotProxyUrl(url) {
    return `${this.getSettings('home_url')}?screenshot_proxy&nonce=${this.getSettings('nonce')}&href=${url}`;
  }

  /**
   * Notify that the screenshot has been succeed.
   *
   * @param {string} imageUrl
   */
  screenshotSucceed(imageUrl) {
    this.screenshotDone(true, imageUrl);
  }

  /**
   * Notify that the screenshot has been failed.
   *
   * @param {Error} e
   */
  screenshotFailed(e) {
    this.log(e, null);
    this.markAsFailed().then(() => this.screenshotDone(false));
  }

  /**
   * Final method of the screenshot.
   *
   * @param {boolean} success
   * @param {string}  imageUrl
   */
  screenshotDone(success) {
    let imageUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
    clearTimeout(this.timeoutTimer);
    this.timeoutTimer = null;

    // Send the message to the parent window and not to the top.
    // e.g: The `Theme builder` is loaded into an iFrame so the message of the screenshot
    // should be sent to the `Theme builder` window and not to the top window.
    window.parent.postMessage({
      name: 'capture-screenshot-done',
      success,
      id: this.getSettings('post_id'),
      imageUrl
    }, '*');
    this.log(`Screenshot ${success ? 'Succeed' : 'Failed'}.`, 'timeEnd');
  }

  /**
   * Log messages for debugging.
   *
   * @param {any}     message
   * @param {string?} timerMethod
   */
  log(message) {
    let timerMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'timeLog';
    if (!this.getSettings('isDebug')) {
      return;
    }

    // eslint-disable-next-line no-console
    console.log('string' === typeof message ? `${this.getSettings('post_id')} - ${message}` : message);
    if (timerMethod) {
      // eslint-disable-next-line no-console
      console[timerMethod](this.getSettings('timer_label'));
    }
  }
}
jQuery(() => {
  new Screenshot();
});
/******/ })()
;
//# sourceMappingURL=screenshot.js.map

SILENT KILLER Tool