(()=>{var n={311:a=>{"use strict";a.exports=jQuery}},i={};function t(a){var e=i[a];return void 0!==e||(e=i[a]={exports:{}},n[a](e,e.exports,t)),e.exports}var r,a;a=t(311),(r=a)(function(){r(".envira-am-plugins-wrap").on("click",".envira-am-plugins-install",function(a){a.preventDefault();var t=r(this),a=t.data("url"),e=t.data("basename"),e=(spinner=t.parent().find(".spinner"),message=r(this).parent().parent().find(".envira-am-plugins-status"),{url:envira_gallery_welcome.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_install_partner",nonce:envira_gallery_welcome.install_nonce,basename:e,download_url:a},success:function(a){t.text(envira_gallery_welcome.deactivate).removeClass("envira-am-plugins-install").addClass("envira-am-plugins-deactivate"),r(message).text(envira_gallery_welcome.active);var e=r(message),n=e.html().split(/\s+/),i=n.pop(),n=n.join(" ");spinner.css("visibility","hidden"),e.html([n," <span>",i,"</span>"].join(""))},error:function(a,e,n){console.log(n)}});console.log(spinner),spinner.css("visibility","visible"),r.ajax(e)}),r(".envira-am-plugins-wrap").on("click",".envira-am-plugins-activate",function(a){a.preventDefault();var t=r(this),a=t.data("url"),e=t.data("basename"),s=t.parent().find(".spinner"),l=r(this).parent().parent().find(".envira-am-plugins-status"),e={url:envira_gallery_welcome.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_activate_partner",nonce:envira_gallery_welcome.activate_nonce,basename:e,download_url:a},success:function(a){t.text(envira_gallery_welcome.deactivate).removeClass("envira-am-plugins-activate").addClass("envira-am-plugins-deactivate"),r(l).text(envira_gallery_welcome.active);var e=r(l),n=e.html().split(/\s+/),i=n.pop(),n=n.join(" ");s.css("visibility","hidden"),e.html([n," <span>",i,"</span>"].join("")),location.reload(!0)},error:function(a,e,n){console.log(n)}};console.log(s),s.css("visibility","visible"),r.ajax(e)}),r(".envira-am-plugins-wrap").on("click",".envira-am-plugins-deactivate",function(a){a.preventDefault();var t=r(this),a=t.data("url"),e=t.data("basename"),s=t.parent().find(".spinner"),l=r(this).parent().parent().find(".envira-am-plugins-status"),e={url:envira_gallery_welcome.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_deactivate_partner",nonce:envira_gallery_welcome.deactivate_nonce,basename:e,download_url:a},success:function(a){t.text(envira_gallery_welcome.activate).removeClass("envira-am-plugins-deactivate").addClass("envira-am-plugins-activate"),r(l).text(envira_gallery_welcome.inactive);var e=r(l),n=e.html().split(/\s+/),i=n.pop(),n=n.join(" ");s.css("visibility","hidden"),e.html([n," <span>",i,"</span>"].join("")),location.reload(!0)},error:function(a,e,n){console.log(n)}};console.log(s),s.css("visibility","visible"),r.ajax(e)})})})();