jQuery(document).ready((function(a){"use strict";a("#patch-apply:not(.inactive)").on("click",(function(e){e.preventDefault(),a("#patcher-tbody").addClass("loading").append(''),a(".alpha-patch-layout .button").attr("disabled",!0),a.ajax({url:alpha_admin_vars.ajax_url,type:"POST",data:{action:"alpha_apply_patches",nonce:alpha_admin_vars.nonce},success:function(e){if(a(".apply-alert").remove(),e.success){if(e.data){var p=e.data.update,t=e.data.delete;"object"==typeof p&&(p=Object.keys(p)).forEach((e=>{a('[data-path="update-'+e).remove()})),"object"==typeof t&&(t=Object.keys(t)).forEach((e=>{a('[data-path="delete-'+e).remove()}))}e.data.error?(console.log(e.data),a(".alpha-patch-table-main").prepend('

'+wp.i18n.__("The below patches could not be applied. Because your files have write permission or aren't existed.","alpha")+"

")):(a(".alpha-patch-table-main").prepend('

'+wp.i18n.__("All files patched successfully.","alpha")+"

"),a(".action-footer .button-primary").remove(),a(".alpha-patch-log:not(.alpha-patch-applied) svg:first-child").css("display","none"),a(".alpha-patch-log:not(.alpha-patch-applied) svg:nth-child(2)").css("display","block"),a(".alpha-patch-log:not(alpha-patch-applied)").addClass("alpha-patch-applied"))}else a(".alpha-patch-table-main").prepend('

'+wp.i18n.__("The API server could not be reached.","alpha")+"

");a("#patcher-tbody").removeClass("loading").find(".alpha-ajax-loader").remove(),a(".alpha-patch-layout .button").removeAttr("disabled")}})}))}));