HEX
Server: LiteSpeed
System: Linux server490.bertina.biz 5.14.0-687.31.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 1 05:38:01 EDT 2026 x86_64
User: parskavirpaya (1252)
PHP: 8.1.34
Disabled: mail, show_source, system, shell_exec, passthru, exec, popen
Upload Files
File: /home/parskavirpaya/public_html/wp-content/plugins/wp-parsidate/assets/js-admin/script.js
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./assets/js-admin-src/script.js"
/*!***************************************!*\
  !*** ./assets/js-admin-src/script.js ***!
  \***************************************/
() {

eval("{jQuery(document).ready(function ($) {\r\n  let wpColorPickerPalettes = ['#333', '#5de0f0', '#608bf7', '#7fff3f', '#00b700', '#fff200', '#ffae63', '#e64f6f', '#ef32e3', '#d1c1ff', '#873eff'],\r\n    wpColorPickerOptions = {\r\n      defaultColor: false, change: function (event, ui) {\r\n        wppdActiveSettingsForm();\r\n      }, clear: function () {\r\n        wppdActiveSettingsForm();\r\n      }, hide: true, palettes: wpColorPickerPalettes\r\n    },\r\n    settingsSubmitActive = false,\r\n    wpMediaFrames = {};\r\n\r\n  const wppdBody = $('body'),\r\n    wppdContentWrap = $('#wppd-content-wrap'),\r\n    wppdSettingsHeader = $('#wppd-settings-header'),\r\n    wppdSettingsSidebar = $('#wppd-sidebar'),\r\n    wppdSettingsDisplaySidebar = $('#wppd-display-sidebar'),\r\n    wppdSettingsHideSidebar = $('#wppd-hide-sidebar'),\r\n    wppdSettingsSectionLinks = $('.wppd-section-links ul'),\r\n    settingsForm = document.getElementById('wppd-settings-form'),\r\n    settingsFooter = document.getElementById('wppd-settings-footer'),\r\n    settingsResetButton = document.getElementById(\"wppd-settings-reset-button\");\r\n\r\n  let wppdContentWrapPrevScrollPos = wppdContentWrap.scrollTop(),\r\n    wppdContentWrapCurrentScrollPos = wppdContentWrapPrevScrollPos,\r\n    wppdPageRefreshedAfter = parseInt(WpParsiDate.pageRefreshedAfter);\r\n\r\n  /**\r\n   * Page refresh\r\n   * */\r\n  if (wppdPageRefreshedAfter > 0) {\r\n    setTimeout(function () {\r\n      if (WpParsiDate.pageRefreshUrl !== null)\r\n        window.location.href = WpParsiDate.pageRefreshUrl;\r\n      else\r\n        window.location.reload(true);\r\n    }, wppdPageRefreshedAfter);\r\n  }\r\n\r\n  /**\r\n   * Hide header on scroll down and sticky on scroll to top\r\n   * */\r\n  wppdContentWrap.scroll(function () {\r\n    wppdContentWrapCurrentScrollPos = $(this).scrollTop();\r\n    if (wppdContentWrapPrevScrollPos < wppdContentWrapCurrentScrollPos && wppdContentWrapCurrentScrollPos > wppdSettingsHeader.outerHeight())\r\n      wppdSettingsHeader.addClass('hide-header');\r\n    else\r\n      wppdSettingsHeader.removeClass('hide-header');\r\n\r\n    wppdContentWrapPrevScrollPos = wppdContentWrapCurrentScrollPos;\r\n  });\r\n\r\n  /**\r\n   * Sidebar menu\r\n   * */\r\n  wppdSettingsDisplaySidebar.on('click', function (e) {\r\n    e.preventDefault();\r\n    wppdSettingsSidebar.addClass('wppd-mobile-sidebar');\r\n    wppdBody.addClass('wppd-mobile-sidebar-active');\r\n  });\r\n  wppdSettingsHideSidebar.on('click', function (e) {\r\n    e.preventDefault();\r\n    wppdSettingsSidebar.removeClass('wppd-mobile-sidebar');\r\n    wppdBody.removeClass('wppd-mobile-sidebar-active');\r\n  });\r\n\r\n  /**\r\n   * Auto scroll to active section link\r\n   * */\r\n  if (wppdSettingsSectionLinks.length) {\r\n    let wppdSectionActiveLink = wppdSettingsSectionLinks.find('.wppd-section-link-current'),\r\n      wppdSectionOutsideActiveLink = wppdSettingsSectionLinks.outerWidth() - 100 < wppdSectionActiveLink.position().left,\r\n      wppdSectionScrollActiveLink = wppdSectionActiveLink.position().left - wppdSectionActiveLink.outerWidth(true) - (wppdSettingsSectionLinks.outerWidth() / 3);\r\n\r\n    if (isRtl) {\r\n      wppdSectionOutsideActiveLink = wppdSectionActiveLink.position().left - 100 < 0;\r\n    }\r\n\r\n    if (wppdSectionOutsideActiveLink) {\r\n      wppdSettingsSectionLinks.animate({\r\n        scrollLeft: wppdSectionScrollActiveLink\r\n      }, 500);\r\n    }\r\n  }\r\n\r\n  function wppdActiveSettingsForm() {\r\n    if (settingsSubmitActive) return;\r\n    settingsSubmitActive = true;\r\n\r\n    if (settingsFooter) settingsFooter.classList.remove('wppd-submit-inactive');\r\n\r\n    window.addEventListener(\"beforeunload\", wppdSettingsFormChangeAlert);\r\n  }\r\n\r\n  const wppdSettingsFormChangeAlert = (event) => {\r\n    event.preventDefault();\r\n    event.returnValue = true;\r\n  }\r\n\r\n  if (settingsForm) {\r\n    if (settingsFooter) settingsFooter.classList.add('wppd-submit-inactive');\r\n\r\n    settingsForm.addEventListener('change', function () {\r\n      wppdActiveSettingsForm();\r\n    });\r\n\r\n    settingsForm.addEventListener('submit', function () {\r\n      window.removeEventListener(\"beforeunload\", wppdSettingsFormChangeAlert);\r\n    });\r\n\r\n    if (settingsResetButton) {\r\n      settingsResetButton.addEventListener(\"click\", () => {\r\n        settingsSubmitActive = false;\r\n\r\n        if (settingsFooter) settingsFooter.classList.add('wppd-submit-inactive');\r\n\r\n        window.removeEventListener(\"beforeunload\", wppdSettingsFormChangeAlert);\r\n      });\r\n    }\r\n  }\r\n\r\n  function wpColorPickerInit() {\r\n    let wpColorPicker = $('.wppd-wp-color-picker,.wppd-color-palette').not('.wppd-gradient-select-color').find('input[type=\"text\"]');\r\n\r\n    if (wpColorPicker.length) {\r\n      wpColorPicker.wpColorPicker(wpColorPickerOptions);\r\n\r\n      setTimeout(function () {\r\n        $('.wppd-color-palette[data-removable=\"1\"]').each(function () {\r\n          let wppdPickerContainer = $(this).find('.wp-picker-container');\r\n\r\n          if (wppdPickerContainer.length > 0) {\r\n            wppdPickerContainer.append('<button type=\"button\" class=\"wppd-remove-color\"><i class=\"wppd-icon-cross\"></i></button>');\r\n          }\r\n        });\r\n      }, 500);\r\n    }\r\n  }\r\n\r\n  wpColorPickerInit();\r\n\r\n  /** Media methods */\r\n  function wppdMediaInit() {\r\n    $('.wppd-media-image').off('click', '**').on('click', function () {\r\n      let $this = $(this),\r\n        mediaSelectID = $this.attr('data-id'),\r\n        mediaWrap = $this.closest('.wppd-media-wrap'),\r\n        mediaInput = mediaWrap.find('input'),\r\n        mediaImageIDs = mediaInput.val().split(',');\r\n\r\n      const index = mediaImageIDs.indexOf(mediaSelectID);\r\n      if (index > -1) {\r\n        mediaImageIDs.splice(index, 1);\r\n      }\r\n\r\n      if (mediaImageIDs.length === 0) {\r\n        mediaWrap.removeClass('wppd-media-selected');\r\n      }\r\n\r\n      mediaInput.val(mediaImageIDs.join(','));\r\n      $this.remove();\r\n      wppdActiveSettingsForm();\r\n    });\r\n  }\r\n\r\n  $('.wppd-media-select').on('click', function () {\r\n    let $this = $(this),\r\n      mediaWrap = $this.closest('.wppd-media-wrap'),\r\n      mediaWrapperID = mediaWrap.attr('id'),\r\n      mediaTitle = mediaWrap.data('title'),\r\n      mediaButton = mediaWrap.data('button'),\r\n      mediaType = mediaWrap.data('type'),\r\n      acceptExtensions = mediaWrap.data('accept-extensions'),\r\n      multiSelection = parseInt(mediaWrap.data('multi-selection')) === 1,\r\n      mediaMaxNumber = parseInt(mediaWrap.data('max-number')),\r\n      mediaMultiple = mediaMaxNumber > 1,\r\n      mediaImageContainer = mediaWrap.find('.wppd-media-images'),\r\n      mediaInput = mediaWrap.find('input'),\r\n      mediaSelected = 1;\r\n\r\n    /*if (wpMediaFrames.hasOwnProperty(mediaWrapperID)) {\r\n        wpMediaFrames[mediaWrapperID].open();\r\n        return;\r\n    }*/\r\n\r\n    // Create a new media frame\r\n    wpMediaFrames[mediaWrapperID] = wp.media({\r\n      title: mediaTitle,\r\n      button: {\r\n        text: mediaButton\r\n      },\r\n      library: {\r\n        type: mediaType\r\n      },\r\n      multiple: mediaMultiple\r\n    });\r\n\r\n    wpMediaFrames[mediaWrapperID].once('uploader:ready', function () {\r\n      var uploader = wpMediaFrames[mediaWrapperID].uploader.uploader.uploader; // Upload manager\r\n\r\n      //Updating allowed extensions\r\n      uploader.setOption('filters',\r\n        {\r\n          mime_types: [\r\n            {extensions: acceptExtensions}\r\n          ]\r\n        }\r\n      );\r\n\r\n      //Trick to reinit field\r\n      uploader.setOption('multi_selection', multiSelection);\r\n    });\r\n\r\n    wpMediaFrames[mediaWrapperID].on('open', function () {\r\n      let selection = wpMediaFrames[mediaWrapperID].state().get('selection'),\r\n        mediaIDs = mediaInput.val().split(',');\r\n\r\n      if (mediaIDs.length > 0) {\r\n        mediaIDs.forEach(function (id) {\r\n          let attachment = wp.media.attachment(id);\r\n          attachment.fetch();\r\n          selection.add(attachment ? [attachment] : []);\r\n        });\r\n      }\r\n    });\r\n\r\n    // When an image is selected in the media frame...\r\n    wpMediaFrames[mediaWrapperID].on('select', function () {\r\n      mediaImageContainer.html('');\r\n\r\n      // Get media attachment details from the frame state\r\n      let attachments = wpMediaFrames[mediaWrapperID].state().get('selection'),\r\n        attachmentIDs = attachments.map(function (attachment) {\r\n          if (mediaSelected <= mediaMaxNumber) {\r\n            attachment = attachment.toJSON();\r\n            let attachmentUrl = attachment.url;\r\n            if (attachment.type !== 'image') {\r\n              if (attachment.hasOwnProperty('image') && attachment.image.hasOwnProperty('src') && attachment.image.src) {\r\n                attachmentUrl = attachment.image.src;\r\n              } else {\r\n                attachmentUrl = attachment.icon;\r\n              }\r\n            }\r\n            let imageTitle = attachment.id + ': ' + (attachment.caption.length > 0 ? attachment.caption : attachment.title) + ' (' + attachment.type + ')';\r\n            mediaImageContainer.append('<div class=\"wppd-media-image\" data-id=\"' + attachment.id + '\"><img src=\"' + attachmentUrl + '\" title=\"' + imageTitle + '\"/><span class=\"wppd-media-image-title\">' + imageTitle + '</span></div>');\r\n          }\r\n          mediaSelected++;\r\n          return attachment.id;\r\n        });\r\n\r\n      attachmentIDs = attachmentIDs.slice(0, mediaMaxNumber);\r\n\r\n      mediaWrap.addClass('wppd-media-selected');\r\n\r\n      // Send the attachment id to our hidden input\r\n      mediaInput.val(attachmentIDs.join(','));\r\n\r\n      wppdMediaInit();\r\n      wppdActiveSettingsForm();\r\n    });\r\n\r\n    // Finally, open the modal on click\r\n    wpMediaFrames[mediaWrapperID].open();\r\n  });\r\n\r\n  $('.wppd-media-remove-all').on('click', function () {\r\n    let $this = $(this),\r\n      mediaWrap = $this.closest('.wppd-media-wrap'),\r\n      mediaInput = mediaWrap.find('input');\r\n\r\n    mediaWrap.removeClass('wppd-media-selected');\r\n    mediaInput.val('');\r\n    wppdActiveSettingsForm();\r\n  });\r\n\r\n  wppdMediaInit();\r\n\r\n  /**\r\n   * Copy text\r\n   * */\r\n  function wppdCopyTextInit() {\r\n    let wppdCopyText = $('.wppd-copy-text');\r\n    if (navigator.clipboard) {\r\n      wppdCopyText.each(function () {\r\n        if ($(this).attr('title') === undefined)\r\n          $(this).attr('title', WpParsiDate.copyText);\r\n      })\r\n      wppdCopyText.off('click', '**').on('click', function () {\r\n        let wppdCopyTextElm = $(this),\r\n          wppdTextForCopy = wppdCopyTextElm.attr('data-text') !== undefined ? wppdCopyTextElm.attr('data-text') : wppdCopyTextElm.text();\r\n        navigator.clipboard.writeText(wppdTextForCopy);\r\n        wppdCopyTextElm.addClass('wppd-text-copied');\r\n\r\n        setTimeout(function () {\r\n          wppdCopyTextElm.removeClass('wppd-text-copied');\r\n        }, 500);\r\n      });\r\n    } else {\r\n      wppdCopyText.removeClass('wppd-copy-text');\r\n    }\r\n  }\r\n\r\n  wppdCopyTextInit();\r\n});\r\n\n\n//# sourceURL=webpack://wp-parsidate/./assets/js-admin-src/script.js?\n}");

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = {};
/******/ 	__webpack_modules__["./assets/js-admin-src/script.js"]();
/******/ 	
/******/ })()
;