jQuery(document).ready(function(){var a=jQuery(".um-account-main").attr("data-current_tab");a&&(jQuery('.um-account-tab[data-tab="'+a+'"]').show(),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0)),jQuery(document.body).on("click",".um-account-side li a",function(a){a.preventDefault();var e=jQuery(this);e.parents("ul").find("li a").removeClass("current"),e.addClass("current");var t=jQuery(this).attr("href"),u=jQuery(this).attr("data-tab");return jQuery('input[id="_um_account_tab"]:hidden').val(u),window.history.pushState("","",t),jQuery(".um-account-tab").hide(),jQuery('.um-account-tab[data-tab="'+u+'"]').fadeIn(),jQuery(".um-account-tab:visible").find("input, select, textarea").filter(".um_account_inactive:disabled").removeClass("um_account_inactive").prop("disabled",!1).attr("disabled",!1),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0),jQuery(".um-account-nav a").removeClass("current"),jQuery('.um-account-nav a[data-tab="'+u+'"]').addClass("current"),wp.hooks.doAction("um_after_account_tab_changed",u),!1}),jQuery(document.body).on("click",".um-account-nav a",function(a){a.preventDefault();var e=jQuery(this).attr("data-tab"),t=jQuery(this).parents("div"),u=jQuery(this);return jQuery('input[id="_um_account_tab"]:hidden').val(e),jQuery(".um-account-tab").hide(),u.hasClass("current")?(t.next(".um-account-tab").slideUp(),u.removeClass("current")):(t.next(".um-account-tab").slideDown(),u.parents("div").find("a").removeClass("current"),u.addClass("current")),jQuery(".um-account-tab:visible").find("input, select, textarea").filter(".um_account_inactive:disabled").removeClass("um_account_inactive").prop("disabled",!1).attr("disabled",!1),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0),jQuery(".um-account-side li a").removeClass("current"),jQuery('.um-account-side li a[data-tab="'+e+'"]').addClass("current"),wp.hooks.doAction("um_after_account_tab_changed",e),!1}),jQuery(document.body).on("click",".um-request-button",function(a){a.preventDefault();var e=jQuery(this).data("action"),t=jQuery("#"+e).val();if(jQuery(".um-field-area-response."+e).hide(),jQuery("#"+e).length&&""===t)jQuery(".um-field-error."+e).show();else{jQuery(".um-field-error."+e).hide();var u={request_action:e,nonce:um_scripts.nonce};jQuery("#"+e).length&&(u.password=t),wp.ajax.send("um_request_user_data",{data:u,success:function(a){jQuery(".um-field-area-response."+e).text(a.answer).show()},error:function(a){console.log(a)}})}})});