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(".alpus-patch-layout .button").attr("disabled",!0),a.ajax({url:alpus_admin_vars.ajax_url,type:"POST",data:{action:"alpus_apply_patches",nonce:alpus_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(".alpus-patch-table-main").prepend('
'+wp.i18n.__("The below patches could not be applied. Because your files have write permission or aren't existed.","alpus")+"
'+wp.i18n.__("All files patched successfully.","alpus")+"
'+wp.i18n.__("The API server could not be reached.","alpus")+"