"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(f){window.wp_admin_ajax=function(t,n,o){var e,c,r=this,i=null,u={},a="bwfabt_";function s(t,n,o,e,c,a){0<n.length&&n.prop("disabled",!1),o.remove(),!0===Object.prototype.hasOwnProperty.call(r,t)&&"function"==typeof r[t]&&r[t](e,n,o,c,a)}return this.action=null,this.data=function(t){return t},this.before_send=function(){},this.async=function(t){return t},this.method=function(t){return t},this.success=function(){},this.complete=function(){},this.error=function(){},this.action=function(t){return t},this.ajax=function(e,t){"object"===_typeof(t)?t.action=e:t={action:e},t.action=a+e,r.before_send(document.body,e);t={url:ajaxurl,async:r.async(!0),method:r.method("POST"),data:t,success:function(t,n,o){r.success(t,n,o,e)},complete:function(t,n,o){r.complete(t,n,o,e)},error:function(t,n,o){r.error(t,n,o,e)}};Object.prototype.hasOwnProperty.call(u,e)?clearTimeout(u[e]):u[e]=null,u[e]=setTimeout(function(t){f.ajax(t)},200,t)},!0===n?0<f(e=t).length&&(f(e).off("submit"),f(e).on("submit",function(t){t.preventDefault();t=f(this).data("bwfabtaction");console.log(t),"undefined"!==t&&(t=(t=a+t).trim(),i=this,function(e){var t=i,c=null,n=new FormData(t);n.append("action",e);var a=f(t).find("fieldset");0<a.length&&a.prop("disabled",!0),r.before_send(t,e),t=r.data(n,t),t={url:ajaxurl,async:r.async(!0),method:r.method("POST"),data:t,processData:!1,contentType:!1,success:function(t,n,o){s(e+"_ajax_success",a,c,t,n,o),r.success(t,n,o,a,c)},complete:function(t,n,o){s(e+"_ajax_complete",a,c,t,n,o),r.complete(t,n,o,a,c)},error:function(t,n,o){s(e+"_ajax_error",a,c,t,n,o),r.error(t,n,o,a,c)}},Object.prototype.hasOwnProperty.call(u,e)?clearTimeout(u[e]):u[e]=null,u[e]=setTimeout(function(t){f.ajax(t)},200,t)}(r.action=t))}),"function"==typeof o&&o(r)):!1===n&&0<f(c=t).length&&(f(c).on("click",function(t){t.preventDefault();var n,o=f(this).data("bwfabtaction");"undefined"!==o&&(o=(o=a+o).trim(),i=this,r.action=o,n=o,t=i,"object"===_typeof(o=r.data({},t))?o.action=n:o={action:n},r.before_send(t,n),o={url:ajaxurl,async:r.async(!0),method:r.method("POST"),data:o,success:function(t,n,o){r.success(t,n,o,i)},complete:function(t,n,o){r.complete(t,n,o,i)},error:function(t,n,o){r.error(t,n,o,i)}},Object.prototype.hasOwnProperty.call(u,n)?clearTimeout(u[n]):u[n]=null,u[n]=setTimeout(function(t){f.ajax(t)},200,o))}),"function"==typeof o&&o(r)),this}}(jQuery);