wp-productzilla/wp-content/plugins/blocksy-companion/static/bundle/dashboard-no-theme.js
rizal.productzilla e38e8b231d templating
2024-04-01 16:08:46 +07:00

1 line
5.2 KiB
JavaScript

!function(){"use strict";var t=window.wp.element,e=window.wp.i18n;function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,l=t[Symbol.iterator]();!(r=(c=l.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=function(){var r=n((0,t.useState)(!1),2),a=r[0],o=r[1];return(0,t.createElement)("div",{className:"ct-theme-required"},(0,t.createElement)("h2",null,(0,t.createElement)("span",null,(0,t.createElement)("svg",{viewBox:"0 0 24 24"},(0,t.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,e.__)("Action Required - Install Blocksy Theme","blocksy-companion")),(0,t.createElement)("p",null,(0,e.__)("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,t.createElement)("p",null,(0,e.__)("In order to take full advantage of all features it has to offer - please install and activate the Blocksy theme also.","blocksy-companion")),(0,t.createElement)("button",{className:"button button-primary",onClick:function(t){t.preventDefault(),o(!0),ctDashboardLocalizations.themeIsInstalled?location=ctDashboardLocalizations.activate:wp.updates.ajax("install-theme",{success:function(){setTimeout((function(){location=ctDashboardLocalizations.activate}))},error:function(){setTimeout((function(){location=ctDashboardLocalizations.activate}))},slug:"blocksy"})}},a?(0,e.__)("Loading...","blocksy-companion"):(0,e.__)("Install and activate the Blocksy theme","blocksy-companion")))};function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,l=t[Symbol.iterator]();!(r=(c=l.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l=function(){var n=o((0,t.useState)(!1),2);n[0],n[1];return(0,t.createElement)("div",{className:"ct-theme-required"},(0,t.createElement)("h2",null,(0,t.createElement)("span",null,(0,t.createElement)("svg",{viewBox:"0 0 24 24"},(0,t.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,e.__)("Action Required - Blocksy Theme and Companion version mismatch","blocksy-companion")),(0,t.createElement)("p",null,(0,e.__)("We detected that you are using an outdated version of Blocksy Theme. Please update it to the latest version.","blocksy-companion")),(0,t.createElement)("p",null,(0,e.__)("In order to take full advantage of all features it has to offer - please install and activate the latest versions of both Blocksy theme and Blocksy Companion plugin.","blocksy-companion")),(0,t.createElement)("button",{className:"button button-primary",onClick:function(t){t.preventDefault(),location=ctDashboardLocalizations.run_updates}},(0,e.__)("Update Now","blocksy-companion")))},i=function(){return ctDashboardLocalizations.theme_version_mismatch?(0,t.createElement)(l,null):(0,t.createElement)(a,null)};document.addEventListener("DOMContentLoaded",(function(){document.getElementById("ct-dashboard")&&(0,t.render)((0,t.createElement)(i,null),document.getElementById("ct-dashboard"))}))}();