!function(t){var n={};function a(e){if(n[e])return n[e].exports;var l=n[e]={i:e,l:!1,exports:{}};return t[e].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=t,a.c=n,a.d=function(t,n,e){a.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,n){if(1&n&&(t=a(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(a.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var l in t)a.d(e,l,function(n){return t[n]}.bind(null,l));return e},a.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(n,"a",n),n},a.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},a.p="",a(a.s=69)}({69:function(t,n){var a=window.AFTHRAMPES_JS||{};jQuery(document).ready((function(t){"use strict";var n=!1;a.install_plugin=function(a,e){n=!0,a.addClass("installing"),t.ajax({type:"POST",url:aft_installer_localize.ajax_url,data:{action:"shopical_plugin_installer",plugin:e,nonce:aft_installer_localize.admin_nonce,dataType:"json"},success:function(t){t&&"success"===t.status?(a.attr("class","activate button button-primary"),a.html(aft_installer_localize.activate_btn)):a.removeClass("installing"),n=!1},error:function(t,e,l){console.log(e),a.removeClass("installing"),n=!1}})},a.activate_plugin=function(a,e){a.addClass("installing"),t.ajax({type:"POST",url:aft_installer_localize.ajax_url,data:{action:"shopical_plugin_activation",plugin:e,nonce:aft_installer_localize.admin_nonce,dataType:"json"},success:function(t){if(console.log(t),t&&"success"===t.status&&(a.attr("class","installed button disabled"),a.html(aft_installer_localize.installed_btn),a.removeClass("installing"),"af-companion"==t.plugin)){a.html();var e=a.attr("href"),l=e.replace(e,t.redirectUrl);a.attr("href",l),a.removeClass("disabled installed"),a.attr("class","button-primary aft-companion-link primary"),a.html("Get Starter Sites")}n=!1},error:function(t,e,l){a.removeClass("installing"),n=!1}})},t(document).on("click",".aft-plugin-installer a.button",(function(e){var l=t(this),i=l.data("slug");if(e.preventDefault(),!l.hasClass("disabled")){if(n)return!1;l.hasClass("install")&&a.install_plugin(l,i),l.hasClass("activate")&&a.activate_plugin(l,i)}})),t(".aft-dismiss-notice").on("click",(function(){t.ajax({type:"POST",url:aft_installer_localize.ajax_url,data:{action:"aft_notice_dismiss",nonce:aft_installer_localize.admin_nonce},success:function(n){"success"==n.status&&t(".aft-notice-content-wrapper").remove()}})}))}))}});