Changeset 2885559
- Timestamp:
- 03/23/2023 10:40:17 AM (3 years ago)
- Location:
- powered-cache
- Files:
-
- 2 deleted
- 20 edited
- 1 copied
-
tags/2.5.3 (copied) (copied from powered-cache/trunk)
-
tags/2.5.3/assets/js/admin/modules/modal.js (modified) (1 diff)
-
tags/2.5.3/dist/js/admin.js (modified) (1 diff)
-
tags/2.5.3/dist/js/admin.js.LICENSE.txt (deleted)
-
tags/2.5.3/includes/admin/dashboard.php (modified) (1 diff)
-
tags/2.5.3/includes/classes/AdvancedCache.php (modified) (2 diffs)
-
tags/2.5.3/includes/classes/FileOptimizer.php (modified) (1 diff)
-
tags/2.5.3/includes/compat/domain-mapping.php (modified) (2 diffs)
-
tags/2.5.3/includes/file-optimizer.php (modified) (4 diffs)
-
tags/2.5.3/languages/powered-cache.pot (modified) (5 diffs)
-
tags/2.5.3/powered-cache.php (modified) (2 diffs)
-
tags/2.5.3/readme.txt (modified) (2 diffs)
-
trunk/assets/js/admin/modules/modal.js (modified) (1 diff)
-
trunk/dist/js/admin.js (modified) (1 diff)
-
trunk/dist/js/admin.js.LICENSE.txt (deleted)
-
trunk/includes/admin/dashboard.php (modified) (1 diff)
-
trunk/includes/classes/AdvancedCache.php (modified) (2 diffs)
-
trunk/includes/classes/FileOptimizer.php (modified) (1 diff)
-
trunk/includes/compat/domain-mapping.php (modified) (2 diffs)
-
trunk/includes/file-optimizer.php (modified) (4 diffs)
-
trunk/languages/powered-cache.pot (modified) (5 diffs)
-
trunk/powered-cache.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
powered-cache/tags/2.5.3/assets/js/admin/modules/modal.js
r2589110 r2885559 57 57 '<span class="sui-icon-check" aria-hidden="true"></span>'; 58 58 } else { 59 icon = ( 60 <span className="sui-icon-close" aria-hidden="true" /> 61 ); 59 icon = 60 '<span class="sui-icon-close" aria-hidden="true"></span>'; 62 61 } 63 62 -
powered-cache/tags/2.5.3/dist/js/admin.js
r2725852 r2885559 1 /*! For license information please see admin.js.LICENSE.txt */ 2 !function(){var e={150:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusFirstDescendant(a))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var o=e.childNodes.length-1;0<=o;o--){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusLastDescendant(a))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(o,a,i,s){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(o),null===this.dialogNode)throw new Error('No element found with id="'+o+'".');var d=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return d.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=r;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof a)this.focusAfterClosed=document.getElementById(a);else{if("object"!==e(a))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=a}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var f=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var h=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var p=new Event("afterOpen");this.dialogNode.dispatchEvent(p)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=this,a=new Event("close");this.dialogNode.dispatchEvent(a),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){o.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=o.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(o.dialogNode.parentNode.classList.remove("sui-modal-sm"),o.dialogNode.parentNode.classList.remove("sui-modal-md"),o.dialogNode.parentNode.classList.remove("sui-modal-lg"),o.dialogNode.parentNode.classList.remove("sui-modal-xl"),o.dialogNode.parentNode.classList.add("sui-modal-"+a))}var i,s,r,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),o.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))r="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(r=n),o.dialogNode.setAttribute("aria-describedby",r)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),r?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+o))}var a,i,s,r;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))a="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(a=i),n.dialogNode.setAttribute("aria-labelledby",a);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(r=e[0].getAttribute("data-modal-describedby"))&&void 0===r||(s=r),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var d=o||this.focusAfterClosed;new t.Dialog(e,d,a,i,s,r)},t.Dialog.prototype.slide=function(o,a,i){var s,r,n,d,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(o);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var f=0;f<c.length;f++)c[f].setAttribute("disabled",!0),c[f].classList.remove("sui-loaded"),c[f].classList.remove("sui-active"),c[f].setAttribute("tabindex","-1"),c[f].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var h=u.getAttribute("data-modal-size");switch(h){case"sm":case"small":h="sm";break;case"md":case"med":case"medium":h="md";break;case"lg":case"large":h="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":h="xl";break;default:h=void 0}void 0!==h&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+h))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(r=u.getAttribute("data-modal-labelledby"))&&void 0===r||(s=r),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(d=u.getAttribute("data-modal-describedby"))&&void 0===d||(n=d),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof a?this.newSlideFocus=document.getElementById(a):"object"===e(a)?this.newSlideFocus=a:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var o=t.getCurrentDialog();o.dialogNode.contains(e.target)?o.lastFocus=e.target:(t.Utils.focusFirstDescendant(o.dialogNode),o.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(o.dialogNode),o.lastFocus=document.activeElement)}},SUI.openModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,o,a,i,s,r)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,o,a,i,s,r)},SUI.slideModal=function(e,o,a){t.getCurrentDialog().slide(e,o,a)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var o,a,i,s,r,n,d,l,c,u,f,h;a=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),r=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),a.on("click",(function(a){o=t(this),d=o.attr("data-modal-open"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-mask"),h=o.attr("data-modal-animated");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,h="undefined"===e(h)||!1===h||"false"!==h,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.openModal(d,c,u,n,i,h),a.preventDefault()})),s.on("click",(function(a){o=t(this),d=o.attr("data-modal-replace"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-replace-mask");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.replaceModal(d,c,u,n,i,h),a.preventDefault()})),r.on("click",(function(a){o=t(this),l=o.attr("data-modal-slide"),u=o.attr("data-modal-slide-focus"),f=o.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(f)&&!1!==f&&""!==f||(f=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,f),a.preventDefault()})),i.on("click",(function(e){SUI.closeModal(h),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var r,n,d=i(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))o.call(r,c)&&(d[c]=r[c]);if(t){n=t(r);for(var u=0;u<n.length;u++)a.call(r,n[u])&&(d[n[u]]=r[n[u]])}}return d}},408:function(e,t,o){"use strict";var a=o(418),i=60103,s=60106;var r=60109,n=60110,d=60112;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;i=u("react.element"),s=u("react.portal"),u("react.fragment"),u("react.strict_mode"),u("react.profiler"),r=u("react.provider"),n=u("react.context"),d=u("react.forward_ref"),u("react.suspense"),l=u("react.memo"),c=u("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}function v(){}function b(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var y=b.prototype=new v;y.constructor=b,a(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},N=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,o){var a,s={},r=null,n=null;if(null!=t)for(a in void 0!==t.ref&&(n=t.ref),void 0!==t.key&&(r=""+t.key),t)N.call(t,a)&&!L.hasOwnProperty(a)&&(s[a]=t[a]);var d=arguments.length-2;if(1===d)s.children=o;else if(1<d){for(var l=Array(d),c=0;c<d;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(a in d=e.defaultProps)void 0===s[a]&&(s[a]=d[a]);return{$$typeof:i,type:e,key:r,ref:n,props:s,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var k=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(e,t,o,a,r){var n=typeof e;"undefined"!==n&&"boolean"!==n||(e=null);var d=!1;if(null===e)d=!0;else switch(n){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case i:case s:d=!0}}if(d)return r=r(d=e),e=""===a?"."+C(d,0):a,Array.isArray(r)?(o="",null!=e&&(o=e.replace(k,"$&/")+"/"),E(r,t,o,"",(function(e){return e}))):null!=r&&(_(r)&&(r=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,o+(!r.key||d&&d.key===r.key?"":(""+r.key).replace(k,"$&/")+"/")+e)),t.push(r)),1;if(d=0,a=""===a?".":a+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=a+C(n=e[l],l);d+=E(n,t,o,c,r)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(n=e.next()).done;)d+=E(n=n.value,t,o,c=a+C(n,l++),r);else if("object"===n)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return d}function D(e,t,o){if(null==e)return e;var a=[],i=0;return E(e,a,"","",(function(e){return t.call(o,e,i++)})),a}function U(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var x={current:null};function S(){var e=x.current;if(null===e)throw Error(h(321));return e}t.createElement=A},294:function(e,t,o){"use strict";e.exports=o(408)},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const o=e(t);return function(){o.on("click",(function(t){!function(t){const o=e(t),a=o.closest(".sui-vertical-tabs"),i=o.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),r=o.data("tab"),n=i.find(`div[data-tab="${r}"]`);a.find("li").removeClass("current"),o.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const o=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?o.show():o.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function o(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,o),s.exports}!function(){"use strict";o(150),o(332),o(880);var e=o(294);const{__:t}=wp.i18n;var a;a=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){a("body").hasClass("toplevel_page_powered-cache")&&a("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const o=a(this).closest(".sui-box"),i=o.find(".sui-box-title"),s=o.find(".sui-box-header button"),r=o.find("#powered-cache-diagnostic-items"),n=a("#powered_cache_run_diagnostic").val(),d=t("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){i.text(t("Running Diagnostic Tests…","powered-cache")),s.attr("disabled",!0),r.empty()},data:{nonce:n,action:"powered_cache_run_diagnostic"},success(t){t.success&&t.data.length&&t.data.forEach((t=>{let o=null;o=t.status?'<span class="sui-icon-check" aria-hidden="true"></span>':(0,e.createElement)("span",{className:"sui-icon-close","aria-hidden":"true"}),r.append(`<li>${o} ${t.description}</li>`)}))}}).done((function(){i.text(d),s.removeAttr("disabled")}))}))},a("body").ready((function(){PoweredCache.pageModals("modals")})),function(e){let t=0;e(".add_cdn_hostname").click((function(o){o.preventDefault();let a=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,a=e(a).attr("id",`cdn-zone-${t}`),e(a).find(".cdn_hostname").val(""),e(a).find(".cdn_zone").prop("selectedIndex",0),e(a).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(a)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const o=t.files[0];e("#powered-cache-import-file-name").text(o.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}(); 1 !function(){var e={150:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var a=0;a<e.childNodes.length;a++){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusFirstDescendant(o))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var a=e.childNodes.length-1;0<=a;a--){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusLastDescendant(o))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(a,o,i,s){var d=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(a),null===this.dialogNode)throw new Error('No element found with id="'+a+'".');var r=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return r.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=d;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof o)this.focusAfterClosed=document.getElementById(o);else{if("object"!==e(o))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=o}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var h=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var f=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var g=new Event("afterOpen");this.dialogNode.dispatchEvent(g)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=this,o=new Event("close");this.dialogNode.dispatchEvent(o),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){a.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=a.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(a.dialogNode.parentNode.classList.remove("sui-modal-sm"),a.dialogNode.parentNode.classList.remove("sui-modal-md"),a.dialogNode.parentNode.classList.remove("sui-modal-lg"),a.dialogNode.parentNode.classList.remove("sui-modal-xl"),a.dialogNode.parentNode.classList.add("sui-modal-"+o))}var i,s,d,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),a.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))d="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(d=n),a.dialogNode.setAttribute("aria-describedby",d)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),d?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+a))}var o,i,s,d;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))o="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(o=i),n.dialogNode.setAttribute("aria-labelledby",o);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(d=e[0].getAttribute("data-modal-describedby"))&&void 0===d||(s=d),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var r=a||this.focusAfterClosed;new t.Dialog(e,r,o,i,s,d)},t.Dialog.prototype.slide=function(a,o,i){var s,d,n,r,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(a);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var h=0;h<c.length;h++)c[h].setAttribute("disabled",!0),c[h].classList.remove("sui-loaded"),c[h].classList.remove("sui-active"),c[h].setAttribute("tabindex","-1"),c[h].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var f=u.getAttribute("data-modal-size");switch(f){case"sm":case"small":f="sm";break;case"md":case"med":case"medium":f="md";break;case"lg":case"large":f="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":f="xl";break;default:f=void 0}void 0!==f&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+f))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(d=u.getAttribute("data-modal-labelledby"))&&void 0===d||(s=d),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(r=u.getAttribute("data-modal-describedby"))&&void 0===r||(n=r),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof o?this.newSlideFocus=document.getElementById(o):"object"===e(o)?this.newSlideFocus=o:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var a=t.getCurrentDialog();a.dialogNode.contains(e.target)?a.lastFocus=e.target:(t.Utils.focusFirstDescendant(a.dialogNode),a.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(a.dialogNode),a.lastFocus=document.activeElement)}},SUI.openModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,a,o,i,s,d)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,a,o,i,s,d)},SUI.slideModal=function(e,a,o){t.getCurrentDialog().slide(e,a,o)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var a,o,i,s,d,n,r,l,c,u,h,f;o=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),d=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),o.on("click",(function(o){a=t(this),r=a.attr("data-modal-open"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-mask"),f=a.attr("data-modal-animated");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,f="undefined"===e(f)||!1===f||"false"!==f,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.openModal(r,c,u,n,i,f),o.preventDefault()})),s.on("click",(function(o){a=t(this),r=a.attr("data-modal-replace"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-replace-mask");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.replaceModal(r,c,u,n,i,f),o.preventDefault()})),d.on("click",(function(o){a=t(this),l=a.attr("data-modal-slide"),u=a.attr("data-modal-slide-focus"),h=a.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(h)&&!1!==h&&""!==h||(h=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,h),o.preventDefault()})),i.on("click",(function(e){SUI.closeModal(f),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},943:function(){const{__:e}=wp.i18n;var t;t=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){t("body").hasClass("toplevel_page_powered-cache")&&t("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const a=t(this).closest(".sui-box"),o=a.find(".sui-box-title"),i=a.find(".sui-box-header button"),s=a.find("#powered-cache-diagnostic-items"),d=t("#powered_cache_run_diagnostic").val(),n=e("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){o.text(e("Running Diagnostic Tests…","powered-cache")),i.attr("disabled",!0),s.empty()},data:{nonce:d,action:"powered_cache_run_diagnostic"},success(e){e.success&&e.data.length&&e.data.forEach((e=>{let t=null;t=e.status?'<span class="sui-icon-check" aria-hidden="true"></span>':'<span class="sui-icon-close" aria-hidden="true"></span>',s.append(`<li>${t} ${e.description}</li>`)}))}}).done((function(){o.text(n),i.removeAttr("disabled")}))}))},t("body").ready((function(){PoweredCache.pageModals("modals")}))},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const a=e(t);return function(){a.on("click",(function(t){!function(t){const a=e(t),o=a.closest(".sui-vertical-tabs"),i=a.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),d=a.data("tab"),n=i.find(`div[data-tab="${d}"]`);o.find("li").removeClass("current"),a.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const a=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?a.show():a.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function a(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,a),s.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";a(150),a(332),a(880),a(943);!function(e){let t=0;e(".add_cdn_hostname").click((function(a){a.preventDefault();let o=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,o=e(o).attr("id",`cdn-zone-${t}`),e(o).find(".cdn_hostname").val(""),e(o).find(".cdn_zone").prop("selectedIndex",0),e(o).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(o)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const a=t.files[0];e("#powered-cache-import-file-name").text(a.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}(); -
powered-cache/tags/2.5.3/includes/admin/dashboard.php
r2851003 r2885559 323 323 if ( isset( $options['cdn_hostname'] ) ) { 324 324 foreach ( (array) $options['cdn_hostname'] as $hostname ) { 325 $hostname = trim( $hostname ); 325 326 if ( filter_var( $hostname, FILTER_VALIDATE_URL ) ) { 326 327 $cdn_hostname[] = wp_parse_url( $hostname, PHP_URL_HOST ); -
powered-cache/tags/2.5.3/includes/classes/AdvancedCache.php
r2851752 r2885559 85 85 add_filter( 'powered_cache_page_cache_enable', array( $this, 'maybe_caching_disabled' ) ); 86 86 add_filter( 'powered_cache_mod_rewrite', array( $this, 'maybe_disable_mod_rewrite' ), 99 ); 87 add_action( 'wp_update_site', array( $this, 'purge_on_site_update' ), 10, 2 ); 87 88 } 88 89 … … 281 282 clean_site_cache_dir(); 282 283 } 284 } 285 286 /** 287 * Purge site cache when site updated (eg: archived, deleted etc...) 288 * 289 * @param \WP_Site $new_site New site object. 290 * @param \WP_Site $old_site Old site object. 291 * 292 * @return void 293 * @since 2.5.3 294 */ 295 public function purge_on_site_update( $new_site, $old_site ) { 296 switch_to_blog( $old_site->id ); 297 if ( $this->settings['async_cache_cleaning'] ) { 298 $this->cache_purger->push_to_queue( [ 'call' => 'clean_site_cache_dir' ] ); 299 $this->cache_purger->save()->dispatch(); 300 } else { 301 clean_site_cache_dir(); 302 } 303 restore_current_blog(); 283 304 } 284 305 -
powered-cache/tags/2.5.3/includes/classes/FileOptimizer.php
r2725852 r2885559 201 201 * 202 202 * @return string|string[]|null 203 * @see https://stackoverflow.com/a/29363569 203 204 */ 204 205 public function run_html_minify( $buffer ) { 205 $search = array( 206 '/\>[^\S ]+/s', // strip whitespaces after tags, except space 207 '/[^\S ]+\</s', // strip whitespaces before tags, except space 208 '/(\s)+/s', // shorten multiple whitespace sequences 209 '/^\\s+|\\s+$/', // shorten multiple whitespace sequences 206 $replace = array( 207 // remove tabs before and after HTML tags 208 '/\>[^\S ]+/s' => '>', 209 '/[^\S ]+\</s' => '<', 210 // shorten multiple whitespace sequences; keep new-line characters because they matter in JS!!! 211 '/([\t ])+/s' => ' ', 212 // remove leading and trailing spaces 213 '/^([\t ])+/m' => '', 214 '/([\t ])+$/m' => '', 215 // remove JS line comments (simple only); do NOT remove lines containing URL (e.g. 'src="http://server.com/"')!!! 216 '~//[a-zA-Z0-9 ]+$~m' => '', 217 // remove empty lines (sequence of line-end and white-space characters) 218 '/[\r\n]+([\t ]?[\r\n]+)+/s' => "\n", 219 // remove empty lines (between HTML tags); cannot remove just any line-end characters because in inline JS they can matter! 220 '/\>[\r\n\t ]+\</s' => '><', 221 // remove "empty" lines containing only JS's block end character; join with next line (e.g. "}\n}\n</script>" --> "}}</script>" 222 '/}[\r\n\t ]+/s' => '}', 223 '/}[\r\n\t ]+,[\r\n\t ]+/s' => '},', 224 // remove new-line after JS's function or condition start; join with next line 225 '/\)[\r\n\t ]?{[\r\n\t ]+/s' => '){', 226 '/,[\r\n\t ]?{[\r\n\t ]+/s' => ',{', 227 // remove new-line after JS's line end (only most obvious and safe cases) 228 '/\),[\r\n\t ]+/s' => '),', 229 // remove quotes from HTML attributes that does not contain spaces; keep quotes around URLs! 230 '~([\r\n\t ])?([a-zA-Z0-9]+)="([a-zA-Z0-9_/\\-]+)"([\r\n\t ])?~s' => '$1$2=$3$4', // $1 and $4 insert first white-space character found before/after attribute 210 231 ); 211 212 $replace = array( '>', '<', '\\1', ' ' ); 213 $buffer = preg_replace( $search, $replace, $buffer ); 232 $buffer = preg_replace( array_keys( $replace ), array_values( $replace ), $buffer ); 214 233 215 234 return $buffer; -
powered-cache/tags/2.5.3/includes/compat/domain-mapping.php
r2589110 r2885559 125 125 $mapped_domains = []; 126 126 127 if ( class_exists( '\Mercator\Mapping' ) ) {127 if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) { 128 128 $mappings = \Mercator\Mapping::get_by_site( get_current_blog_id() ); 129 129 if ( ! is_wp_error( $mappings ) && $mappings ) { … … 181 181 */ 182 182 function purge_on_site_delete( $site_object ) { 183 if ( class_exists( '\Mercator\Mapping' ) ) {183 if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) { 184 184 $mappings = \Mercator\Mapping::get_by_site( $site_object->id ); 185 185 if ( ! is_wp_error( $mappings ) && $mappings ) { -
powered-cache/tags/2.5.3/includes/file-optimizer.php
r2749491 r2885559 70 70 define( 'POWERED_CACHE_FO_CACHE_DIR', CONCAT_FILES_ROOT . '/wp-content/cache/min/' ); 71 71 define( 'POWERED_CACHE_FO_DEBUG', false ); 72 73 if ( ! defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) ) { 74 define( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS', false ); 75 } 72 76 73 77 if ( ! file_exists( POWERED_CACHE_FO_CACHE_DIR ) ) { … … 231 235 $stat = stat( $cache_file_name ); 232 236 237 set_cache_headers(); 233 238 header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $stat['mtime'] ) . ' GMT' ); 234 239 header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $buf ) ) ); … … 353 358 } 354 359 360 set_cache_headers(); 355 361 header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $last_modified ) . ' GMT' ); 356 362 header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $output ) ) ); … … 412 418 } 413 419 } 420 421 422 /** 423 * Add cache headers 424 * 425 * @return void 426 * @since 2.5.3 427 */ 428 function set_cache_headers() { 429 if ( defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) && POWERED_CACHE_FO_DISABLE_CACHE_HEADERS ) { 430 return; 431 } 432 433 $ttl_in_seconds = 31536000; // 365 days 434 $ttl = gmdate( "D, d M Y H:i:s", time() + $ttl_in_seconds ) . " GMT"; 435 436 header( "Expires: $ttl" ); 437 header( "Cache-Control: max-age=$ttl_in_seconds" ); 438 } -
powered-cache/tags/2.5.3/languages/powered-cache.pot
r2851752 r2885559 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Powered Cache 2.5. 2\n"5 "Project-Id-Version: Powered Cache 2.5.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2023-0 1-20T09:12:05+00:00\n"12 "POT-Creation-Date: 2023-03-23T10:36:33+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 6.0\n"14 "X-Generator: WP-CLI 2.7.1\n" 15 15 "X-Domain: powered-cache\n" 16 16 17 17 #. Plugin Name of the plugin 18 18 #: includes/admin/dashboard.php:93 19 #: includes/admin/dashboard.php:43 419 #: includes/admin/dashboard.php:435 20 20 #: includes/admin/partials/settings-page.php:40 21 21 #: includes/classes/MetaBox.php:98 … … 42 42 43 43 #: includes/admin/dashboard.php:106 44 #: includes/admin/dashboard.php:81 744 #: includes/admin/dashboard.php:818 45 45 msgid "Settings" 46 46 msgstr "" 47 47 48 #: includes/admin/dashboard.php:46 248 #: includes/admin/dashboard.php:463 49 49 msgid "Page cache deleted for all websites!" 50 50 msgstr "" 51 51 52 #: includes/admin/dashboard.php:46 352 #: includes/admin/dashboard.php:464 53 53 msgid "Page cache deleted successfully!" 54 54 msgstr "" 55 55 56 #: includes/admin/dashboard.php:46 456 #: includes/admin/dashboard.php:465 57 57 msgid "Object cache deleted successfully!" 58 58 msgstr "" 59 59 60 #: includes/admin/dashboard.php:46 560 #: includes/admin/dashboard.php:466 61 61 msgid "All cached items flushed successfully!" 62 62 msgstr "" 63 63 64 #: includes/admin/dashboard.php:46 664 #: includes/admin/dashboard.php:467 65 65 msgid "The cache preloading has been initialized!" 66 66 msgstr "" 67 67 68 #: includes/admin/dashboard.php:46 768 #: includes/admin/dashboard.php:468 69 69 msgid "The Critical CSS generation process has been initialized!" 70 70 msgstr "" 71 71 72 #: includes/admin/dashboard.php:46 872 #: includes/admin/dashboard.php:469 73 73 msgid "The Critical CSS generation process has been initialized for all sites! This might take a while, depending on the network size." 74 74 msgstr "" 75 75 76 #: includes/admin/dashboard.php:4 6976 #: includes/admin/dashboard.php:470 77 77 msgid "Cloudflare cache flushed, it can take up to 30 seconds to delete all cache from Cloudflare!" 78 78 msgstr "" 79 79 80 #: includes/admin/dashboard.php:47 080 #: includes/admin/dashboard.php:471 81 81 msgid "Settings have been reset!" 82 82 msgstr "" 83 83 84 #: includes/admin/dashboard.php:47 184 #: includes/admin/dashboard.php:472 85 85 msgid "Settings have been imported!" 86 86 msgstr "" 87 87 88 #: includes/admin/dashboard.php:47 288 #: includes/admin/dashboard.php:473 89 89 msgid "Settings saved and database being optimized..." 90 90 msgstr "" 91 91 92 #: includes/admin/dashboard.php:47 392 #: includes/admin/dashboard.php:474 93 93 msgid "Settings saved." 94 94 msgstr "" 95 95 96 #: includes/admin/dashboard.php:47 796 #: includes/admin/dashboard.php:478 97 97 msgid "Page cache for %s language has been deleted!" 98 98 msgstr "" 99 99 100 #: includes/admin/dashboard.php:481101 100 #: includes/admin/dashboard.php:482 102 101 #: includes/admin/dashboard.php:483 … … 105 104 #: includes/admin/dashboard.php:486 106 105 #: includes/admin/dashboard.php:487 106 #: includes/admin/dashboard.php:488 107 107 msgid "You don't have permission to perform this action!" 108 108 msgstr "" 109 109 110 #: includes/admin/dashboard.php:48 8110 #: includes/admin/dashboard.php:489 111 111 msgid "Your license key does not seem valid. A valid license is required for the Critical CSS!" 112 112 msgstr "" 113 113 114 #: includes/admin/dashboard.php:4 89114 #: includes/admin/dashboard.php:490 115 115 msgid "Could not flush Cloudflare cache. Please make sure you entered the correct credentials and zone id!" 116 116 msgstr "" 117 117 118 #: includes/admin/dashboard.php:53 1118 #: includes/admin/dashboard.php:532 119 119 msgid "Purge All Cache" 120 120 msgstr "" 121 121 122 #: includes/admin/dashboard.php:68 6122 #: includes/admin/dashboard.php:687 123 123 msgid "wp-config.php is writable." 124 124 msgstr "" 125 125 126 #: includes/admin/dashboard.php:68 8126 #: includes/admin/dashboard.php:689 127 127 msgid "wp-config.php is not writable. Please make sure the file writable or you can manually define %s constant." 128 128 msgstr "" 129 129 130 #: includes/admin/dashboard.php:70 1130 #: includes/admin/dashboard.php:702 131 131 msgid "Cache directory %s is not exist!" 132 132 msgstr "" 133 133 134 #: includes/admin/dashboard.php:70 3134 #: includes/admin/dashboard.php:704 135 135 msgid "Cache directory %s is not writeable!" 136 136 msgstr "" 137 137 138 #: includes/admin/dashboard.php:70 6138 #: includes/admin/dashboard.php:707 139 139 msgid "Cache directory %s exist and writable!" 140 140 msgstr "" 141 141 142 #: includes/admin/dashboard.php:72 0142 #: includes/admin/dashboard.php:721 143 143 msgid ".htaccess file %s is not exist!" 144 144 msgstr "" 145 145 146 #: includes/admin/dashboard.php:72 2146 #: includes/admin/dashboard.php:723 147 147 msgid ".htaccess file %s is not writeable!" 148 148 msgstr "" 149 149 150 #: includes/admin/dashboard.php:72 5150 #: includes/admin/dashboard.php:726 151 151 msgid ".htaccess file %s exist and writable!" 152 152 msgstr "" 153 153 154 #: includes/admin/dashboard.php:74 0154 #: includes/admin/dashboard.php:741 155 155 msgid "Required file for the page caching %s is not exist!" 156 156 msgstr "" 157 157 158 #: includes/admin/dashboard.php:74 2158 #: includes/admin/dashboard.php:743 159 159 msgid "Required file for the page caching %s is not writeable!" 160 160 msgstr "" 161 161 162 #: includes/admin/dashboard.php:74 5162 #: includes/admin/dashboard.php:746 163 163 msgid "Required file for the page caching %s exist and writable!" 164 164 msgstr "" 165 165 166 #: includes/admin/dashboard.php:76 0166 #: includes/admin/dashboard.php:761 167 167 msgid "Required file for the object caching %s is not exist!" 168 168 msgstr "" 169 169 170 #: includes/admin/dashboard.php:76 2170 #: includes/admin/dashboard.php:763 171 171 msgid "Required file for the object caching %s is not writeable!" 172 172 msgstr "" 173 173 174 #: includes/admin/dashboard.php:76 5174 #: includes/admin/dashboard.php:766 175 175 msgid "Required file for the object caching %s exist and writable!" 176 176 msgstr "" 177 177 178 #: includes/admin/dashboard.php:77 8178 #: includes/admin/dashboard.php:779 179 179 msgid "Invalid request" 180 180 msgstr "" 181 181 182 #: includes/admin/dashboard.php:82 0182 #: includes/admin/dashboard.php:821 183 183 msgid "Get Premium" 184 184 msgstr "" … … 1264 1264 msgstr "" 1265 1265 1266 #: includes/classes/AdvancedCache.php:10 11266 #: includes/classes/AdvancedCache.php:102 1267 1267 msgid "Purge Page Cache [Network Wide - All Sites]" 1268 1268 msgstr "" 1269 1269 1270 #: includes/classes/AdvancedCache.php:11 21270 #: includes/classes/AdvancedCache.php:113 1271 1271 msgid "Purge Page Cache" 1272 1272 msgstr "" 1273 1273 1274 #: includes/classes/AdvancedCache.php:12 21274 #: includes/classes/AdvancedCache.php:123 1275 1275 msgid "Purge Current Page" 1276 1276 msgstr "" -
powered-cache/tags/2.5.3/powered-cache.php
r2851752 r2885559 4 4 * Plugin URI: https://poweredcache.com 5 5 * Description: The most powerful caching and performance suite for WordPress. Easily Improve PageSpeed & Web Vitals Score. 6 * Version: 2.5. 26 * Version: 2.5.3 7 7 * Requires at least: 5.7 8 8 * Requires PHP: 5.6 … … 26 26 27 27 // Useful global constants. 28 define( 'POWERED_CACHE_VERSION', '2.5. 2' );28 define( 'POWERED_CACHE_VERSION', '2.5.3' ); 29 29 define( 'POWERED_CACHE_DB_VERSION', '2.0' ); 30 30 define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ ); -
powered-cache/tags/2.5.3/readme.txt
r2851752 r2885559 3 3 Tags: cache, caching, web vitals, performance, fastest, page speed, optimization, cdn, object cache, minify, powered cache 4 4 Requires at least: 5.7 5 Tested up to: 6. 16 Stable tag: 2.5. 25 Tested up to: 6.2 6 Stable tag: 2.5.3 7 7 License: GPLv2 (or later) 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 169 169 170 170 == Changelog == 171 172 = 2.5.3 (March 23, 2023) = 173 - Added: Purge site cache on multisite when the site updated. (eg: archived etc...) 174 - Improvements: HTML minification. 175 - Improvements: Set file optimizer default cache header. 176 - Fix: Close icon on diagnostic modal 177 - Fix: Blank space on CDN hostname(s) 178 - Fix: WP Ultimo compatibility. (checking Mercator more strictly) 179 - Tested with WP 6.2 171 180 172 181 = 2.5.2 (January 20, 2023) = -
powered-cache/trunk/assets/js/admin/modules/modal.js
r2589110 r2885559 57 57 '<span class="sui-icon-check" aria-hidden="true"></span>'; 58 58 } else { 59 icon = ( 60 <span className="sui-icon-close" aria-hidden="true" /> 61 ); 59 icon = 60 '<span class="sui-icon-close" aria-hidden="true"></span>'; 62 61 } 63 62 -
powered-cache/trunk/dist/js/admin.js
r2725852 r2885559 1 /*! For license information please see admin.js.LICENSE.txt */ 2 !function(){var e={150:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusFirstDescendant(a))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var o=e.childNodes.length-1;0<=o;o--){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusLastDescendant(a))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(o,a,i,s){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(o),null===this.dialogNode)throw new Error('No element found with id="'+o+'".');var d=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return d.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=r;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof a)this.focusAfterClosed=document.getElementById(a);else{if("object"!==e(a))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=a}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var f=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var h=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var p=new Event("afterOpen");this.dialogNode.dispatchEvent(p)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=this,a=new Event("close");this.dialogNode.dispatchEvent(a),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){o.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=o.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(o.dialogNode.parentNode.classList.remove("sui-modal-sm"),o.dialogNode.parentNode.classList.remove("sui-modal-md"),o.dialogNode.parentNode.classList.remove("sui-modal-lg"),o.dialogNode.parentNode.classList.remove("sui-modal-xl"),o.dialogNode.parentNode.classList.add("sui-modal-"+a))}var i,s,r,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),o.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))r="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(r=n),o.dialogNode.setAttribute("aria-describedby",r)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),r?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+o))}var a,i,s,r;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))a="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(a=i),n.dialogNode.setAttribute("aria-labelledby",a);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(r=e[0].getAttribute("data-modal-describedby"))&&void 0===r||(s=r),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var d=o||this.focusAfterClosed;new t.Dialog(e,d,a,i,s,r)},t.Dialog.prototype.slide=function(o,a,i){var s,r,n,d,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(o);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var f=0;f<c.length;f++)c[f].setAttribute("disabled",!0),c[f].classList.remove("sui-loaded"),c[f].classList.remove("sui-active"),c[f].setAttribute("tabindex","-1"),c[f].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var h=u.getAttribute("data-modal-size");switch(h){case"sm":case"small":h="sm";break;case"md":case"med":case"medium":h="md";break;case"lg":case"large":h="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":h="xl";break;default:h=void 0}void 0!==h&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+h))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(r=u.getAttribute("data-modal-labelledby"))&&void 0===r||(s=r),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(d=u.getAttribute("data-modal-describedby"))&&void 0===d||(n=d),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof a?this.newSlideFocus=document.getElementById(a):"object"===e(a)?this.newSlideFocus=a:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var o=t.getCurrentDialog();o.dialogNode.contains(e.target)?o.lastFocus=e.target:(t.Utils.focusFirstDescendant(o.dialogNode),o.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(o.dialogNode),o.lastFocus=document.activeElement)}},SUI.openModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,o,a,i,s,r)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,o,a,i,s,r)},SUI.slideModal=function(e,o,a){t.getCurrentDialog().slide(e,o,a)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var o,a,i,s,r,n,d,l,c,u,f,h;a=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),r=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),a.on("click",(function(a){o=t(this),d=o.attr("data-modal-open"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-mask"),h=o.attr("data-modal-animated");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,h="undefined"===e(h)||!1===h||"false"!==h,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.openModal(d,c,u,n,i,h),a.preventDefault()})),s.on("click",(function(a){o=t(this),d=o.attr("data-modal-replace"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-replace-mask");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.replaceModal(d,c,u,n,i,h),a.preventDefault()})),r.on("click",(function(a){o=t(this),l=o.attr("data-modal-slide"),u=o.attr("data-modal-slide-focus"),f=o.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(f)&&!1!==f&&""!==f||(f=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,f),a.preventDefault()})),i.on("click",(function(e){SUI.closeModal(h),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var r,n,d=i(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))o.call(r,c)&&(d[c]=r[c]);if(t){n=t(r);for(var u=0;u<n.length;u++)a.call(r,n[u])&&(d[n[u]]=r[n[u]])}}return d}},408:function(e,t,o){"use strict";var a=o(418),i=60103,s=60106;var r=60109,n=60110,d=60112;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;i=u("react.element"),s=u("react.portal"),u("react.fragment"),u("react.strict_mode"),u("react.profiler"),r=u("react.provider"),n=u("react.context"),d=u("react.forward_ref"),u("react.suspense"),l=u("react.memo"),c=u("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}function v(){}function b(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var y=b.prototype=new v;y.constructor=b,a(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},N=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,o){var a,s={},r=null,n=null;if(null!=t)for(a in void 0!==t.ref&&(n=t.ref),void 0!==t.key&&(r=""+t.key),t)N.call(t,a)&&!L.hasOwnProperty(a)&&(s[a]=t[a]);var d=arguments.length-2;if(1===d)s.children=o;else if(1<d){for(var l=Array(d),c=0;c<d;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(a in d=e.defaultProps)void 0===s[a]&&(s[a]=d[a]);return{$$typeof:i,type:e,key:r,ref:n,props:s,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var k=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(e,t,o,a,r){var n=typeof e;"undefined"!==n&&"boolean"!==n||(e=null);var d=!1;if(null===e)d=!0;else switch(n){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case i:case s:d=!0}}if(d)return r=r(d=e),e=""===a?"."+C(d,0):a,Array.isArray(r)?(o="",null!=e&&(o=e.replace(k,"$&/")+"/"),E(r,t,o,"",(function(e){return e}))):null!=r&&(_(r)&&(r=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,o+(!r.key||d&&d.key===r.key?"":(""+r.key).replace(k,"$&/")+"/")+e)),t.push(r)),1;if(d=0,a=""===a?".":a+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=a+C(n=e[l],l);d+=E(n,t,o,c,r)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(n=e.next()).done;)d+=E(n=n.value,t,o,c=a+C(n,l++),r);else if("object"===n)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return d}function D(e,t,o){if(null==e)return e;var a=[],i=0;return E(e,a,"","",(function(e){return t.call(o,e,i++)})),a}function U(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var x={current:null};function S(){var e=x.current;if(null===e)throw Error(h(321));return e}t.createElement=A},294:function(e,t,o){"use strict";e.exports=o(408)},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const o=e(t);return function(){o.on("click",(function(t){!function(t){const o=e(t),a=o.closest(".sui-vertical-tabs"),i=o.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),r=o.data("tab"),n=i.find(`div[data-tab="${r}"]`);a.find("li").removeClass("current"),o.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const o=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?o.show():o.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function o(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,o),s.exports}!function(){"use strict";o(150),o(332),o(880);var e=o(294);const{__:t}=wp.i18n;var a;a=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){a("body").hasClass("toplevel_page_powered-cache")&&a("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const o=a(this).closest(".sui-box"),i=o.find(".sui-box-title"),s=o.find(".sui-box-header button"),r=o.find("#powered-cache-diagnostic-items"),n=a("#powered_cache_run_diagnostic").val(),d=t("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){i.text(t("Running Diagnostic Tests…","powered-cache")),s.attr("disabled",!0),r.empty()},data:{nonce:n,action:"powered_cache_run_diagnostic"},success(t){t.success&&t.data.length&&t.data.forEach((t=>{let o=null;o=t.status?'<span class="sui-icon-check" aria-hidden="true"></span>':(0,e.createElement)("span",{className:"sui-icon-close","aria-hidden":"true"}),r.append(`<li>${o} ${t.description}</li>`)}))}}).done((function(){i.text(d),s.removeAttr("disabled")}))}))},a("body").ready((function(){PoweredCache.pageModals("modals")})),function(e){let t=0;e(".add_cdn_hostname").click((function(o){o.preventDefault();let a=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,a=e(a).attr("id",`cdn-zone-${t}`),e(a).find(".cdn_hostname").val(""),e(a).find(".cdn_zone").prop("selectedIndex",0),e(a).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(a)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const o=t.files[0];e("#powered-cache-import-file-name").text(o.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}(); 1 !function(){var e={150:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var a=0;a<e.childNodes.length;a++){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusFirstDescendant(o))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var a=e.childNodes.length-1;0<=a;a--){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusLastDescendant(o))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(a,o,i,s){var d=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(a),null===this.dialogNode)throw new Error('No element found with id="'+a+'".');var r=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return r.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=d;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof o)this.focusAfterClosed=document.getElementById(o);else{if("object"!==e(o))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=o}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var h=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var f=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var g=new Event("afterOpen");this.dialogNode.dispatchEvent(g)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=this,o=new Event("close");this.dialogNode.dispatchEvent(o),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){a.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=a.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(a.dialogNode.parentNode.classList.remove("sui-modal-sm"),a.dialogNode.parentNode.classList.remove("sui-modal-md"),a.dialogNode.parentNode.classList.remove("sui-modal-lg"),a.dialogNode.parentNode.classList.remove("sui-modal-xl"),a.dialogNode.parentNode.classList.add("sui-modal-"+o))}var i,s,d,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),a.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))d="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(d=n),a.dialogNode.setAttribute("aria-describedby",d)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),d?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+a))}var o,i,s,d;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))o="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(o=i),n.dialogNode.setAttribute("aria-labelledby",o);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(d=e[0].getAttribute("data-modal-describedby"))&&void 0===d||(s=d),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var r=a||this.focusAfterClosed;new t.Dialog(e,r,o,i,s,d)},t.Dialog.prototype.slide=function(a,o,i){var s,d,n,r,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(a);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var h=0;h<c.length;h++)c[h].setAttribute("disabled",!0),c[h].classList.remove("sui-loaded"),c[h].classList.remove("sui-active"),c[h].setAttribute("tabindex","-1"),c[h].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var f=u.getAttribute("data-modal-size");switch(f){case"sm":case"small":f="sm";break;case"md":case"med":case"medium":f="md";break;case"lg":case"large":f="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":f="xl";break;default:f=void 0}void 0!==f&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+f))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(d=u.getAttribute("data-modal-labelledby"))&&void 0===d||(s=d),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(r=u.getAttribute("data-modal-describedby"))&&void 0===r||(n=r),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof o?this.newSlideFocus=document.getElementById(o):"object"===e(o)?this.newSlideFocus=o:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var a=t.getCurrentDialog();a.dialogNode.contains(e.target)?a.lastFocus=e.target:(t.Utils.focusFirstDescendant(a.dialogNode),a.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(a.dialogNode),a.lastFocus=document.activeElement)}},SUI.openModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,a,o,i,s,d)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,a,o,i,s,d)},SUI.slideModal=function(e,a,o){t.getCurrentDialog().slide(e,a,o)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var a,o,i,s,d,n,r,l,c,u,h,f;o=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),d=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),o.on("click",(function(o){a=t(this),r=a.attr("data-modal-open"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-mask"),f=a.attr("data-modal-animated");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,f="undefined"===e(f)||!1===f||"false"!==f,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.openModal(r,c,u,n,i,f),o.preventDefault()})),s.on("click",(function(o){a=t(this),r=a.attr("data-modal-replace"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-replace-mask");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.replaceModal(r,c,u,n,i,f),o.preventDefault()})),d.on("click",(function(o){a=t(this),l=a.attr("data-modal-slide"),u=a.attr("data-modal-slide-focus"),h=a.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(h)&&!1!==h&&""!==h||(h=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,h),o.preventDefault()})),i.on("click",(function(e){SUI.closeModal(f),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},943:function(){const{__:e}=wp.i18n;var t;t=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){t("body").hasClass("toplevel_page_powered-cache")&&t("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const a=t(this).closest(".sui-box"),o=a.find(".sui-box-title"),i=a.find(".sui-box-header button"),s=a.find("#powered-cache-diagnostic-items"),d=t("#powered_cache_run_diagnostic").val(),n=e("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){o.text(e("Running Diagnostic Tests…","powered-cache")),i.attr("disabled",!0),s.empty()},data:{nonce:d,action:"powered_cache_run_diagnostic"},success(e){e.success&&e.data.length&&e.data.forEach((e=>{let t=null;t=e.status?'<span class="sui-icon-check" aria-hidden="true"></span>':'<span class="sui-icon-close" aria-hidden="true"></span>',s.append(`<li>${t} ${e.description}</li>`)}))}}).done((function(){o.text(n),i.removeAttr("disabled")}))}))},t("body").ready((function(){PoweredCache.pageModals("modals")}))},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const a=e(t);return function(){a.on("click",(function(t){!function(t){const a=e(t),o=a.closest(".sui-vertical-tabs"),i=a.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),d=a.data("tab"),n=i.find(`div[data-tab="${d}"]`);o.find("li").removeClass("current"),a.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const a=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?a.show():a.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function a(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,a),s.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";a(150),a(332),a(880),a(943);!function(e){let t=0;e(".add_cdn_hostname").click((function(a){a.preventDefault();let o=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,o=e(o).attr("id",`cdn-zone-${t}`),e(o).find(".cdn_hostname").val(""),e(o).find(".cdn_zone").prop("selectedIndex",0),e(o).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(o)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const a=t.files[0];e("#powered-cache-import-file-name").text(a.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}(); -
powered-cache/trunk/includes/admin/dashboard.php
r2851003 r2885559 323 323 if ( isset( $options['cdn_hostname'] ) ) { 324 324 foreach ( (array) $options['cdn_hostname'] as $hostname ) { 325 $hostname = trim( $hostname ); 325 326 if ( filter_var( $hostname, FILTER_VALIDATE_URL ) ) { 326 327 $cdn_hostname[] = wp_parse_url( $hostname, PHP_URL_HOST ); -
powered-cache/trunk/includes/classes/AdvancedCache.php
r2851752 r2885559 85 85 add_filter( 'powered_cache_page_cache_enable', array( $this, 'maybe_caching_disabled' ) ); 86 86 add_filter( 'powered_cache_mod_rewrite', array( $this, 'maybe_disable_mod_rewrite' ), 99 ); 87 add_action( 'wp_update_site', array( $this, 'purge_on_site_update' ), 10, 2 ); 87 88 } 88 89 … … 281 282 clean_site_cache_dir(); 282 283 } 284 } 285 286 /** 287 * Purge site cache when site updated (eg: archived, deleted etc...) 288 * 289 * @param \WP_Site $new_site New site object. 290 * @param \WP_Site $old_site Old site object. 291 * 292 * @return void 293 * @since 2.5.3 294 */ 295 public function purge_on_site_update( $new_site, $old_site ) { 296 switch_to_blog( $old_site->id ); 297 if ( $this->settings['async_cache_cleaning'] ) { 298 $this->cache_purger->push_to_queue( [ 'call' => 'clean_site_cache_dir' ] ); 299 $this->cache_purger->save()->dispatch(); 300 } else { 301 clean_site_cache_dir(); 302 } 303 restore_current_blog(); 283 304 } 284 305 -
powered-cache/trunk/includes/classes/FileOptimizer.php
r2725852 r2885559 201 201 * 202 202 * @return string|string[]|null 203 * @see https://stackoverflow.com/a/29363569 203 204 */ 204 205 public function run_html_minify( $buffer ) { 205 $search = array( 206 '/\>[^\S ]+/s', // strip whitespaces after tags, except space 207 '/[^\S ]+\</s', // strip whitespaces before tags, except space 208 '/(\s)+/s', // shorten multiple whitespace sequences 209 '/^\\s+|\\s+$/', // shorten multiple whitespace sequences 206 $replace = array( 207 // remove tabs before and after HTML tags 208 '/\>[^\S ]+/s' => '>', 209 '/[^\S ]+\</s' => '<', 210 // shorten multiple whitespace sequences; keep new-line characters because they matter in JS!!! 211 '/([\t ])+/s' => ' ', 212 // remove leading and trailing spaces 213 '/^([\t ])+/m' => '', 214 '/([\t ])+$/m' => '', 215 // remove JS line comments (simple only); do NOT remove lines containing URL (e.g. 'src="http://server.com/"')!!! 216 '~//[a-zA-Z0-9 ]+$~m' => '', 217 // remove empty lines (sequence of line-end and white-space characters) 218 '/[\r\n]+([\t ]?[\r\n]+)+/s' => "\n", 219 // remove empty lines (between HTML tags); cannot remove just any line-end characters because in inline JS they can matter! 220 '/\>[\r\n\t ]+\</s' => '><', 221 // remove "empty" lines containing only JS's block end character; join with next line (e.g. "}\n}\n</script>" --> "}}</script>" 222 '/}[\r\n\t ]+/s' => '}', 223 '/}[\r\n\t ]+,[\r\n\t ]+/s' => '},', 224 // remove new-line after JS's function or condition start; join with next line 225 '/\)[\r\n\t ]?{[\r\n\t ]+/s' => '){', 226 '/,[\r\n\t ]?{[\r\n\t ]+/s' => ',{', 227 // remove new-line after JS's line end (only most obvious and safe cases) 228 '/\),[\r\n\t ]+/s' => '),', 229 // remove quotes from HTML attributes that does not contain spaces; keep quotes around URLs! 230 '~([\r\n\t ])?([a-zA-Z0-9]+)="([a-zA-Z0-9_/\\-]+)"([\r\n\t ])?~s' => '$1$2=$3$4', // $1 and $4 insert first white-space character found before/after attribute 210 231 ); 211 212 $replace = array( '>', '<', '\\1', ' ' ); 213 $buffer = preg_replace( $search, $replace, $buffer ); 232 $buffer = preg_replace( array_keys( $replace ), array_values( $replace ), $buffer ); 214 233 215 234 return $buffer; -
powered-cache/trunk/includes/compat/domain-mapping.php
r2589110 r2885559 125 125 $mapped_domains = []; 126 126 127 if ( class_exists( '\Mercator\Mapping' ) ) {127 if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) { 128 128 $mappings = \Mercator\Mapping::get_by_site( get_current_blog_id() ); 129 129 if ( ! is_wp_error( $mappings ) && $mappings ) { … … 181 181 */ 182 182 function purge_on_site_delete( $site_object ) { 183 if ( class_exists( '\Mercator\Mapping' ) ) {183 if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) { 184 184 $mappings = \Mercator\Mapping::get_by_site( $site_object->id ); 185 185 if ( ! is_wp_error( $mappings ) && $mappings ) { -
powered-cache/trunk/includes/file-optimizer.php
r2749491 r2885559 70 70 define( 'POWERED_CACHE_FO_CACHE_DIR', CONCAT_FILES_ROOT . '/wp-content/cache/min/' ); 71 71 define( 'POWERED_CACHE_FO_DEBUG', false ); 72 73 if ( ! defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) ) { 74 define( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS', false ); 75 } 72 76 73 77 if ( ! file_exists( POWERED_CACHE_FO_CACHE_DIR ) ) { … … 231 235 $stat = stat( $cache_file_name ); 232 236 237 set_cache_headers(); 233 238 header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $stat['mtime'] ) . ' GMT' ); 234 239 header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $buf ) ) ); … … 353 358 } 354 359 360 set_cache_headers(); 355 361 header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $last_modified ) . ' GMT' ); 356 362 header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $output ) ) ); … … 412 418 } 413 419 } 420 421 422 /** 423 * Add cache headers 424 * 425 * @return void 426 * @since 2.5.3 427 */ 428 function set_cache_headers() { 429 if ( defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) && POWERED_CACHE_FO_DISABLE_CACHE_HEADERS ) { 430 return; 431 } 432 433 $ttl_in_seconds = 31536000; // 365 days 434 $ttl = gmdate( "D, d M Y H:i:s", time() + $ttl_in_seconds ) . " GMT"; 435 436 header( "Expires: $ttl" ); 437 header( "Cache-Control: max-age=$ttl_in_seconds" ); 438 } -
powered-cache/trunk/languages/powered-cache.pot
r2851752 r2885559 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Powered Cache 2.5. 2\n"5 "Project-Id-Version: Powered Cache 2.5.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2023-0 1-20T09:12:05+00:00\n"12 "POT-Creation-Date: 2023-03-23T10:36:33+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 6.0\n"14 "X-Generator: WP-CLI 2.7.1\n" 15 15 "X-Domain: powered-cache\n" 16 16 17 17 #. Plugin Name of the plugin 18 18 #: includes/admin/dashboard.php:93 19 #: includes/admin/dashboard.php:43 419 #: includes/admin/dashboard.php:435 20 20 #: includes/admin/partials/settings-page.php:40 21 21 #: includes/classes/MetaBox.php:98 … … 42 42 43 43 #: includes/admin/dashboard.php:106 44 #: includes/admin/dashboard.php:81 744 #: includes/admin/dashboard.php:818 45 45 msgid "Settings" 46 46 msgstr "" 47 47 48 #: includes/admin/dashboard.php:46 248 #: includes/admin/dashboard.php:463 49 49 msgid "Page cache deleted for all websites!" 50 50 msgstr "" 51 51 52 #: includes/admin/dashboard.php:46 352 #: includes/admin/dashboard.php:464 53 53 msgid "Page cache deleted successfully!" 54 54 msgstr "" 55 55 56 #: includes/admin/dashboard.php:46 456 #: includes/admin/dashboard.php:465 57 57 msgid "Object cache deleted successfully!" 58 58 msgstr "" 59 59 60 #: includes/admin/dashboard.php:46 560 #: includes/admin/dashboard.php:466 61 61 msgid "All cached items flushed successfully!" 62 62 msgstr "" 63 63 64 #: includes/admin/dashboard.php:46 664 #: includes/admin/dashboard.php:467 65 65 msgid "The cache preloading has been initialized!" 66 66 msgstr "" 67 67 68 #: includes/admin/dashboard.php:46 768 #: includes/admin/dashboard.php:468 69 69 msgid "The Critical CSS generation process has been initialized!" 70 70 msgstr "" 71 71 72 #: includes/admin/dashboard.php:46 872 #: includes/admin/dashboard.php:469 73 73 msgid "The Critical CSS generation process has been initialized for all sites! This might take a while, depending on the network size." 74 74 msgstr "" 75 75 76 #: includes/admin/dashboard.php:4 6976 #: includes/admin/dashboard.php:470 77 77 msgid "Cloudflare cache flushed, it can take up to 30 seconds to delete all cache from Cloudflare!" 78 78 msgstr "" 79 79 80 #: includes/admin/dashboard.php:47 080 #: includes/admin/dashboard.php:471 81 81 msgid "Settings have been reset!" 82 82 msgstr "" 83 83 84 #: includes/admin/dashboard.php:47 184 #: includes/admin/dashboard.php:472 85 85 msgid "Settings have been imported!" 86 86 msgstr "" 87 87 88 #: includes/admin/dashboard.php:47 288 #: includes/admin/dashboard.php:473 89 89 msgid "Settings saved and database being optimized..." 90 90 msgstr "" 91 91 92 #: includes/admin/dashboard.php:47 392 #: includes/admin/dashboard.php:474 93 93 msgid "Settings saved." 94 94 msgstr "" 95 95 96 #: includes/admin/dashboard.php:47 796 #: includes/admin/dashboard.php:478 97 97 msgid "Page cache for %s language has been deleted!" 98 98 msgstr "" 99 99 100 #: includes/admin/dashboard.php:481101 100 #: includes/admin/dashboard.php:482 102 101 #: includes/admin/dashboard.php:483 … … 105 104 #: includes/admin/dashboard.php:486 106 105 #: includes/admin/dashboard.php:487 106 #: includes/admin/dashboard.php:488 107 107 msgid "You don't have permission to perform this action!" 108 108 msgstr "" 109 109 110 #: includes/admin/dashboard.php:48 8110 #: includes/admin/dashboard.php:489 111 111 msgid "Your license key does not seem valid. A valid license is required for the Critical CSS!" 112 112 msgstr "" 113 113 114 #: includes/admin/dashboard.php:4 89114 #: includes/admin/dashboard.php:490 115 115 msgid "Could not flush Cloudflare cache. Please make sure you entered the correct credentials and zone id!" 116 116 msgstr "" 117 117 118 #: includes/admin/dashboard.php:53 1118 #: includes/admin/dashboard.php:532 119 119 msgid "Purge All Cache" 120 120 msgstr "" 121 121 122 #: includes/admin/dashboard.php:68 6122 #: includes/admin/dashboard.php:687 123 123 msgid "wp-config.php is writable." 124 124 msgstr "" 125 125 126 #: includes/admin/dashboard.php:68 8126 #: includes/admin/dashboard.php:689 127 127 msgid "wp-config.php is not writable. Please make sure the file writable or you can manually define %s constant." 128 128 msgstr "" 129 129 130 #: includes/admin/dashboard.php:70 1130 #: includes/admin/dashboard.php:702 131 131 msgid "Cache directory %s is not exist!" 132 132 msgstr "" 133 133 134 #: includes/admin/dashboard.php:70 3134 #: includes/admin/dashboard.php:704 135 135 msgid "Cache directory %s is not writeable!" 136 136 msgstr "" 137 137 138 #: includes/admin/dashboard.php:70 6138 #: includes/admin/dashboard.php:707 139 139 msgid "Cache directory %s exist and writable!" 140 140 msgstr "" 141 141 142 #: includes/admin/dashboard.php:72 0142 #: includes/admin/dashboard.php:721 143 143 msgid ".htaccess file %s is not exist!" 144 144 msgstr "" 145 145 146 #: includes/admin/dashboard.php:72 2146 #: includes/admin/dashboard.php:723 147 147 msgid ".htaccess file %s is not writeable!" 148 148 msgstr "" 149 149 150 #: includes/admin/dashboard.php:72 5150 #: includes/admin/dashboard.php:726 151 151 msgid ".htaccess file %s exist and writable!" 152 152 msgstr "" 153 153 154 #: includes/admin/dashboard.php:74 0154 #: includes/admin/dashboard.php:741 155 155 msgid "Required file for the page caching %s is not exist!" 156 156 msgstr "" 157 157 158 #: includes/admin/dashboard.php:74 2158 #: includes/admin/dashboard.php:743 159 159 msgid "Required file for the page caching %s is not writeable!" 160 160 msgstr "" 161 161 162 #: includes/admin/dashboard.php:74 5162 #: includes/admin/dashboard.php:746 163 163 msgid "Required file for the page caching %s exist and writable!" 164 164 msgstr "" 165 165 166 #: includes/admin/dashboard.php:76 0166 #: includes/admin/dashboard.php:761 167 167 msgid "Required file for the object caching %s is not exist!" 168 168 msgstr "" 169 169 170 #: includes/admin/dashboard.php:76 2170 #: includes/admin/dashboard.php:763 171 171 msgid "Required file for the object caching %s is not writeable!" 172 172 msgstr "" 173 173 174 #: includes/admin/dashboard.php:76 5174 #: includes/admin/dashboard.php:766 175 175 msgid "Required file for the object caching %s exist and writable!" 176 176 msgstr "" 177 177 178 #: includes/admin/dashboard.php:77 8178 #: includes/admin/dashboard.php:779 179 179 msgid "Invalid request" 180 180 msgstr "" 181 181 182 #: includes/admin/dashboard.php:82 0182 #: includes/admin/dashboard.php:821 183 183 msgid "Get Premium" 184 184 msgstr "" … … 1264 1264 msgstr "" 1265 1265 1266 #: includes/classes/AdvancedCache.php:10 11266 #: includes/classes/AdvancedCache.php:102 1267 1267 msgid "Purge Page Cache [Network Wide - All Sites]" 1268 1268 msgstr "" 1269 1269 1270 #: includes/classes/AdvancedCache.php:11 21270 #: includes/classes/AdvancedCache.php:113 1271 1271 msgid "Purge Page Cache" 1272 1272 msgstr "" 1273 1273 1274 #: includes/classes/AdvancedCache.php:12 21274 #: includes/classes/AdvancedCache.php:123 1275 1275 msgid "Purge Current Page" 1276 1276 msgstr "" -
powered-cache/trunk/powered-cache.php
r2851752 r2885559 4 4 * Plugin URI: https://poweredcache.com 5 5 * Description: The most powerful caching and performance suite for WordPress. Easily Improve PageSpeed & Web Vitals Score. 6 * Version: 2.5. 26 * Version: 2.5.3 7 7 * Requires at least: 5.7 8 8 * Requires PHP: 5.6 … … 26 26 27 27 // Useful global constants. 28 define( 'POWERED_CACHE_VERSION', '2.5. 2' );28 define( 'POWERED_CACHE_VERSION', '2.5.3' ); 29 29 define( 'POWERED_CACHE_DB_VERSION', '2.0' ); 30 30 define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ ); -
powered-cache/trunk/readme.txt
r2851752 r2885559 3 3 Tags: cache, caching, web vitals, performance, fastest, page speed, optimization, cdn, object cache, minify, powered cache 4 4 Requires at least: 5.7 5 Tested up to: 6. 16 Stable tag: 2.5. 25 Tested up to: 6.2 6 Stable tag: 2.5.3 7 7 License: GPLv2 (or later) 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 169 169 170 170 == Changelog == 171 172 = 2.5.3 (March 23, 2023) = 173 - Added: Purge site cache on multisite when the site updated. (eg: archived etc...) 174 - Improvements: HTML minification. 175 - Improvements: Set file optimizer default cache header. 176 - Fix: Close icon on diagnostic modal 177 - Fix: Blank space on CDN hostname(s) 178 - Fix: WP Ultimo compatibility. (checking Mercator more strictly) 179 - Tested with WP 6.2 171 180 172 181 = 2.5.2 (January 20, 2023) =
Note: See TracChangeset
for help on using the changeset viewer.