Sindbad~EG File Manager
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_src/js/frontend/resize-detection.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","SmushIRS","bar","document","getElementById","toggle","images","bigger","smaller","strings","window","wp_smush_resize_vars","init","this","process","addEventListener","handleToggleClick","icon","querySelector","classList","add","remove","detectImages","length","style","display","generateMarkup","toggleDivs","shouldSkipImage","image","contains","getAttribute","clientWidth","clientHeight","naturalWidth","naturalHeight","getTooltipText","props","tooltipText","bigger_width","bigger_height","large_image","smaller_width","smaller_height","small_image","replace","real_width","real_height","type","forEach","index","item","createElement","tooltip","setAttribute","class","e","highlightImage","innerHTML","computed_width","computed_height","appendChild","div","removeSelection","el","getElementsByClassName","currentTarget","dataset","scrollIntoView","behavior","block","inline","opacity","setTimeout","items","Array","from","getElementsByTagName","imgType","imageClass","push","src","refresh","elements"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAE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Ke,gBAAgBC,GAAzB,CAKA,IAAMQ,EAAQ,CACZS,WAAYjB,EAAMG,YAClBe,YAAalB,EAAMI,aACnB0B,eAAgB9B,EAAMK,aACtB0B,gBAAiB/B,EAAMM,cACvBI,aAAkC,IAApBV,EAAMG,YAAoBH,EAAMK,aAC9CM,cAAoC,IAArBX,EAAMI,aAAqBJ,EAAMM,cAChDO,cAAeb,EAAMG,YAAcH,EAAMK,aACzCS,eAAgBd,EAAMI,aAAeJ,EAAMM,eAI7C,GACGE,EAAME,cACNF,EAAMG,eACNH,EAAMK,eACNL,EAAMM,eAJT,CASA,IAAMmC,EACFzC,EAAME,cAAgBF,EAAMG,cAAgB,SAAW,UACzDuC,EAAa,gBAAkBlE,KAAKP,OAAOwE,GAASvD,OAAS,GAG/DV,KAAKP,OAAOwE,GAASE,KAAK,CACxBC,IAAKpD,EACLQ,QACAkB,MAAOwB,IAQTlD,EAAMV,UAAUC,IAAI,sBACpBS,EAAMV,UAAUC,IAAI2D,MA9CT,oFAuDfG,QAvRe,WAwRbrE,KAAKP,OAAS,CACZC,OAAQ,GACRC,QAAS,IAMX,IADA,IAAM2E,EAAWhF,SAAS8D,uBAAuB,oBAC1CkB,EAAS5D,OAAS,GACvB4D,EAAS,GAAG9D,SAGdR,KAAKC,YAOTJ,OAAOK,iBAAiB,oBAAoB,kBAAMd,EAASW,UAC3DF,OAAOK,iBAAiB,cAAc,kBAAMd,EAASiF,aA/SvD","file":"smush-rd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 23);\n","/**\n * Image resize detection (IRD).\n *\n * Show all wrongly scaled images with a highlighted border and resize box.\n *\n * Made in pure JS.\n * DO NOT ADD JQUERY SUPPORT!!!\n *\n * @since 2.9\n */\n(function() {\n \"use strict\";\n\n const SmushIRS = {\n bar: document.getElementById(\"smush-image-bar\"),\n toggle: document.getElementById(\"smush-image-bar-toggle\"),\n images: {\n bigger: [],\n smaller: []\n },\n strings: window.wp_smush_resize_vars,\n\n /**\n * Init scripts.\n */\n init() {\n /**\n * Make sure these are set, before we proceed.\n */\n if (!this.bar) {\n this.bar = document.getElementById(\"smush-image-bar\");\n }\n if (!this.toggle) {\n this.toggle = document.getElementById(\"smush-image-bar-toggle\");\n }\n\n this.process();\n\n // Register the event handler after everything is done.\n this.toggle.addEventListener(\"click\", this.handleToggleClick.bind(this));\n },\n\n /**\n * Do image processing.\n */\n process() {\n const icon = this.toggle.querySelector(\"i\");\n\n icon.classList.add(\"sui-icon-loader\");\n icon.classList.remove(\"sui-icon-info\");\n\n this.detectImages();\n\n if (!this.images.bigger.length && !this.images.smaller.length) {\n this.toggle.classList.add(\"smush-toggle-success\");\n document.getElementById(\"smush-image-bar-notice\").style.display =\n \"block\";\n document.getElementById(\"smush-image-bar-notice-desc\").style.display =\n \"none\";\n } else {\n this.toggle.classList.remove(\"smush-toggle-success\");\n document.getElementById(\"smush-image-bar-notice\").style.display =\n \"none\";\n document.getElementById(\"smush-image-bar-notice-desc\").style.display =\n \"block\";\n this.generateMarkup(\"bigger\");\n this.generateMarkup(\"smaller\");\n }\n\n this.toggleDivs();\n\n icon.classList.remove(\"sui-icon-loader\");\n icon.classList.add(\"sui-icon-info\");\n },\n\n /**\n * Various checks to see if the image should be processed.\n *\n * @param {Object} image\n * @return {boolean} Should skip image or not.\n */\n shouldSkipImage(image) {\n // Skip avatars.\n if (image.classList.contains(\"avatar\")) {\n return true;\n }\n\n // Skip images from Smush CDN with auto-resize feature.\n if (\"string\" === typeof image.getAttribute(\"no-resize-detection\")) {\n return true;\n }\n\n // Skip 1x1px images.\n if (image.clientWidth === image.clientHeight && 1 === image.clientWidth) {\n return true;\n }\n\n // Skip 1x1px placeholders.\n if (\n image.naturalWidth === image.naturalHeight &&\n 1 === image.naturalWidth\n ) {\n return true;\n }\n\n // If width attribute is not set, do not continue.\n return null === image.clientWidth || null === image.clientHeight;\n },\n\n /**\n * Get tooltip text.\n *\n * @param {Object} props\n * @return {string} Tooltip.\n */\n getTooltipText(props) {\n let tooltipText = \"\";\n\n if (props.bigger_width || props.bigger_height) {\n /** @param {string} strings.large_image */\n tooltipText = this.strings.large_image;\n } else if (props.smaller_width || props.smaller_height) {\n /** @param {string} strings.small_image */\n tooltipText = this.strings.small_image;\n }\n\n return tooltipText\n .replace(\"width\", props.real_width)\n .replace(\"height\", props.real_height);\n },\n\n /**\n * Generate markup.\n *\n * @param {string} type Accepts: 'bigger' or 'smaller'.\n */\n generateMarkup(type) {\n this.images[type].forEach((image, index) => {\n const item = document.createElement(\"div\"),\n tooltip = this.getTooltipText(image.props);\n\n item.setAttribute(\n \"class\",\n \"smush-resize-box smush-tooltip smush-tooltip-constrained\"\n );\n item.setAttribute(\"data-tooltip\", tooltip);\n item.setAttribute(\"data-image\", image.class);\n item.addEventListener(\"click\", e => this.highlightImage(e));\n\n item.innerHTML = `\n\t\t\t\t\t<div class=\"smush-image-info\">\n\t\t\t\t\t\t<span>${index + 1}</span>\n\t\t\t\t\t\t<span class=\"smush-tag\">${image.props.computed_width} x ${\n image.props.computed_height\n }px</span>\n\t\t\t\t\t\t<i class=\"smush-front-icons smush-front-icon-arrows-in\" aria-hidden=\"true\"> </i>\n\t\t\t\t\t\t<span class=\"smush-tag smush-tag-success\">${image.props.real_width} × ${\n image.props.real_height\n }px</span>\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"smush-image-description\">${tooltip}</div>\n\t\t\t\t`;\n\n document\n .getElementById(\"smush-image-bar-items-\" + type)\n .appendChild(item);\n });\n },\n\n /**\n * Show/hide sections based on images.\n */\n toggleDivs() {\n const types = [\"bigger\", \"smaller\"];\n types.forEach(type => {\n const div = document.getElementById(\"smush-image-bar-items-\" + type);\n if (0 === this.images[type].length) {\n div.style.display = \"none\";\n } else {\n div.style.display = \"block\";\n }\n });\n },\n\n /**\n * Scroll the selected image into view and highlight it.\n *\n * @param {Object} e\n */\n highlightImage(e) {\n this.removeSelection();\n\n const el = document.getElementsByClassName(e.currentTarget.dataset.image);\n if (\"undefined\" !== typeof el[0]) {\n // Display description box.\n e.currentTarget.classList.toggle(\"show-description\");\n\n // Scroll and flash image.\n el[0].scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n inline: \"nearest\"\n });\n el[0].style.opacity = \"0.5\";\n setTimeout(() => {\n el[0].style.opacity = \"1\";\n }, 1000);\n }\n },\n\n /**\n * Handle click on the toggle item.\n */\n handleToggleClick() {\n this.bar.classList.toggle(\"closed\");\n this.toggle.classList.toggle(\"closed\");\n this.removeSelection();\n },\n\n /**\n * Remove selected items.\n */\n removeSelection() {\n const items = document.getElementsByClassName(\"show-description\");\n if (items.length > 0) {\n Array.from(items).forEach(div =>\n div.classList.remove(\"show-description\")\n );\n }\n },\n\n /**\n * Function to highlight all scaled images.\n *\n * Add yellow border and then show one small box to\n * resize the images as per the required size, on fly.\n */\n detectImages() {\n const images = document.getElementsByTagName(\"img\");\n for (const image of images) {\n if (this.shouldSkipImage(image)) {\n continue;\n }\n\n // Get defined width and height.\n const props = {\n real_width: image.clientWidth,\n real_height: image.clientHeight,\n computed_width: image.naturalWidth,\n computed_height: image.naturalHeight,\n bigger_width: image.clientWidth * 1.5 < image.naturalWidth,\n bigger_height: image.clientHeight * 1.5 < image.naturalHeight,\n smaller_width: image.clientWidth > image.naturalWidth,\n smaller_height: image.clientHeight > image.naturalHeight\n };\n\n // In case image is in correct size, do not continue.\n if (\n !props.bigger_width &&\n !props.bigger_height &&\n !props.smaller_width &&\n !props.smaller_height\n ) {\n continue;\n }\n\n const imgType =\n props.bigger_width || props.bigger_height ? \"bigger\" : \"smaller\",\n imageClass = \"smush-image-\" + (this.images[imgType].length + 1);\n\n // Fill the images arrays.\n this.images[imgType].push({\n src: image,\n props,\n class: imageClass\n });\n\n /**\n * Add class to original image.\n * Can't add two classes in single add(), because no support in IE11.\n * image.classList.add('smush-detected-img', imageClass);\n */\n image.classList.add(\"smush-detected-img\");\n image.classList.add(imageClass);\n }\n }, // End detectImages()\n\n /**\n * Allows refreshing the list. A good way is to refresh on lazyload actions.\n *\n * @since 3.6.0\n */\n refresh() {\n this.images = {\n bigger: [],\n smaller: []\n };\n\n // This might be overkill - there will probably never be a situation when there are less images than on\n // initial page load.\n const elements = document.getElementsByClassName(\"smush-resize-box\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n\n this.process();\n }\n }; // End WP_Smush_IRS\n\n /**\n * After page load, initialize toggle event.\n */\n window.addEventListener(\"DOMContentLoaded\", () => SmushIRS.init());\n window.addEventListener(\"lazyloaded\", () => SmushIRS.refresh());\n})();\n"],"sourceRoot":""}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists