6 lines
7.5 KiB
JavaScript
6 lines
7.5 KiB
JavaScript
!function(){var e={942:function(e,t){var n;
|
|
/*!
|
|
Copyright (c) 2018 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,c(n)))}return e}function c(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,n),c.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.i18n;function o(e){return o="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},o(e)}function r(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}function c(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}const i=function(e,t){var n={};return t.success&&(n.success=t.success,delete t.success),t.error&&(n.error=t.error,delete t.error),n.data=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t),n.data=_.extend(t,{action:e,_ajax_nonce:ctDashboardLocalizations.updatesNonce}),wp.ajax.send(n)};var s=function(){const[n,o]=(0,e.useState)(!1),r=function(){ctDashboardLocalizations.activate&&(ctDashboardLocalizations.activate_multi_site?fetch(ctDashboardLocalizations.activate_multi_site).then(function(e){location=ctDashboardLocalizations.activate}):location=ctDashboardLocalizations.activate)};return(0,e.createElement)("div",{className:"ct-theme-required"},(0,e.createElement)("h2",null,(0,e.createElement)("span",null,(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12,23.6c-1.4,0-2.6-1-2.8-2.3L8.9,20h6.2l-0.3,1.3C14.6,22.6,13.4,23.6,12,23.6z M24,17.8H0l3.1-2c0.5-0.3,0.9-0.7,1.1-1.3c0.5-1,0.5-2.2,0.5-3.2V7.6c0-4.1,3.2-7.3,7.3-7.3s7.3,3.2,7.3,7.3v3.6c0,1.1,0.1,2.3,0.5,3.2c0.3,0.5,0.6,1,1.1,1.3L24,17.8zM6.1,15.6h11.8c0,0-0.1-0.1-0.1-0.2c-0.7-1.3-0.7-2.9-0.7-4.2V7.6c0-2.8-2.2-5.1-5.1-5.1c-2.8,0-5.1,2.2-5.1,5.1v3.6c0,1.3-0.1,2.9-0.7,4.2C6.1,15.5,6.1,15.6,6.1,15.6z"}))),(0,t.__)("Action Required - Install Blocksy Theme","blocksy-companion")),(0,e.createElement)("p",null,(0,t.__)("Blocksy Companion is the complementary plugin to Blocksy theme. It adds a bunch of great features to the theme and acts as an unlocker for the Blocksy Pro package.","blocksy-companion")),(0,e.createElement)("p",null,(0,t.__)("In order to take full advantage of all features it has to offer - please install and activate the Blocksy theme also.","blocksy-companion")),ctDashboardLocalizations.activate&&(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),o(!0),ctDashboardLocalizations.themeIsInstalled?r():i("install-theme",{success:function(...e){setTimeout(function(){r()})},error:function(...e){setTimeout(function(){r()})},slug:"blocksy"})}},n?(0,t.__)("Loading...","blocksy-companion"):(0,t.__)("Install and activate the Blocksy theme","blocksy-companion")))},l=(window.jQuery,n(942)),u=n.n(l);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}var p=function({className:n,mismatched_version_descriptor:o={}}){o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({productName:"Blocksy theme",slug:"blocksy"},o);const[r,a]=(0,e.useState)(!1);return(0,e.createElement)("div",{className:u()("ct-theme-required",n)},(0,e.createElement)("h2",null,(0,e.createElement)("span",null,(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12,23.6c-1.4,0-2.6-1-2.8-2.3L8.9,20h6.2l-0.3,1.3C14.6,22.6,13.4,23.6,12,23.6z M24,17.8H0l3.1-2c0.5-0.3,0.9-0.7,1.1-1.3c0.5-1,0.5-2.2,0.5-3.2V7.6c0-4.1,3.2-7.3,7.3-7.3s7.3,3.2,7.3,7.3v3.6c0,1.1,0.1,2.3,0.5,3.2c0.3,0.5,0.6,1,1.1,1.3L24,17.8zM6.1,15.6h11.8c0,0-0.1-0.1-0.1-0.2c-0.7-1.3-0.7-2.9-0.7-4.2V7.6c0-2.8-2.2-5.1-5.1-5.1c-2.8,0-5.1,2.2-5.1,5.1v3.6c0,1.3-0.1,2.9-0.7,4.2C6.1,15.5,6.1,15.6,6.1,15.6z"}))),(0,t.sprintf)((0,t.__)("Action required - please update %s to the latest version!","blocksy-companion"),o.productName)),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,t.sprintf)((0,t.__)("We detected that you are using an outdated version of %s.","blocksy-companion"),o.productName)}}),(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,t.__)("In order to take full advantage of all features the core has to offer - please install and activate the latest version of Blocksy theme.","blocksy-companion"),__html:(0,t.sprintf)((0,t.__)("In order to take full advantage of all features the core has to offer - please install and activate the latest version of %s.","blocksy-companion"),o.productName)}}),(0,e.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),a(!0);const t={success:function(...e){setTimeout(function(){location.reload()},1e3)},error:function(...e){setTimeout(function(){location.reload()},1e3)}};"blocksy"===o.slug?t.slug="blocksy":(t.plugin=o.slug,t.slug=o.slug.split("/")[0]),i("blocksy"===o.slug?"update-theme":"update-plugin",t)}},r?(0,t.__)("Loading...","blocksy-companion"):(0,t.sprintf)((0,t.__)("Update %s Now","blocksy-companion"),o.productName.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "))))};const m=function(){return ctDashboardLocalizations.theme_version_mismatch?(0,e.createElement)(p,{mismatched_version_descriptor:ctDashboardLocalizations.theme_version_mismatch}):(0,e.createElement)(s,null)};document.addEventListener("DOMContentLoaded",function(){if(document.getElementById("ct-dashboard")){(0,e.createRoot)(document.getElementById("ct-dashboard")).render((0,e.createElement)(m,null))}})}()}(); |