ruạṛ
!function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=19)}({19:function(t,e){!function(){"use strict";var t={bar:document.getElementById("smush-image-bar"),toggle:document.getElementById("smush-image-bar-toggle"),images:{bigger:[],smaller:[]},init:function(){wp_smush_resize_vars&&(this.strings=wp_smush_resize_vars),this.detectImages(),this.generateMarkup("bigger"),this.generateMarkup("smaller"),this.removeEmptyDivs(),this.toggle.querySelector("i").classList.add("sui-icon-info"),this.toggle.querySelector("i").classList.remove("sui-icon-loader"),this.toggle.addEventListener("click",this.handleToggleClick.bind(this))},shouldSkipImage:function(t){return!!t.classList.contains("avatar")||(null===t.clientWidth||null===t.clientHeight)},getTooltipText:function(t){var e="";return t.bigger_width||t.bigger_height?e=this.strings.large_image:(t.smaller_width||t.smaller_height)&&(e=this.strings.small_image),e.replace("width",t.real_width).replace("height",t.real_height)},generateMarkup:function(t){var e=this;this.images[t].forEach(function(i,s){var n=document.createElement("div"),r=e.getTooltipText(i.props);n.setAttribute("class","smush-resize-box smush-tooltip smush-tooltip-constrained"),n.setAttribute("data-tooltip",r),n.setAttribute("data-image",i.class),n.addEventListener("click",function(t){return e.highlightImage(t)}),n.innerHTML='\n\t\t\t\t\t<div class="smush-image-info">\n\t\t\t\t\t\t<span>'.concat(s+1,'</span>\n\t\t\t\t\t\t<span class="smush-tag">').concat(i.props.computed_width," x ").concat(i.props.computed_height,'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">').concat(i.props.real_width," × ").concat(i.props.real_height,'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">').concat(r,"</div>\n\t\t\t\t"),document.getElementById("smush-image-bar-items-"+t).appendChild(n)})},removeEmptyDivs:function(){var t=this;["bigger","smaller"].forEach(function(e){0===t.images[e].length&&(document.getElementById("smush-image-bar-items-"+e).style.display="none")})},highlightImage:function(t){this.removeSelection();var e=document.getElementsByClassName(t.currentTarget.dataset.image);void 0!==e[0]&&(t.currentTarget.classList.toggle("show-description"),e[0].scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),e[0].style.opacity="0.5",setTimeout(function(){e[0].style.opacity="1"},1e3))},handleToggleClick:function(t){this.bar.classList.toggle("closed"),this.toggle.classList.toggle("closed"),this.removeSelection()},removeSelection:function(){var t=document.getElementsByClassName("show-description");t.length>0&&Array.from(t).forEach(function(t){return t.classList.remove("show-description")})},detectImages:function(){var t=this,e=document.getElementsByTagName("img");Object.values(e).forEach(function(e){if(!t.shouldSkipImage(e)){var i={real_width:e.clientWidth,real_height:e.clientHeight,computed_width:e.naturalWidth,computed_height:e.naturalHeight,bigger_width:1.5*e.clientWidth<e.naturalWidth,bigger_height:1.5*e.clientHeight<e.naturalHeight,smaller_width:e.clientWidth>e.naturalWidth,smaller_height:e.clientHeight>e.naturalHeight};if(i.bigger_width||i.bigger_height||i.smaller_width||i.smaller_height){var s=i.bigger_width||i.bigger_height?"bigger":"smaller",n="smush-image-"+(t.images[s].length+1);t.images[s].push({src:e,props:i,class:n}),e.classList.add("smush-detected-img"),e.classList.add(n)}}})}};window.onload=t.init()}()}}); ;
cải xoăn