$(document).ready((function(){$(document).on("click","#is_change_password",(function(e){$(e.currentTarget).is(":checked")?$("input[type=password]").closest(".form-group").removeClass("hidden").fadeIn():$("input[type=password]").closest(".form-group").addClass("hidden").fadeOut()})),$(document).on("click",".btn-trigger-add-credit",(function(e){e.preventDefault(),$("#add-credit-modal").modal("show")})),$(document).on("click","#confirm-add-credit-button",(function(e){e.preventDefault();var o=$(e.currentTarget);o.addClass("button-loading"),$.ajax({type:"POST",cache:!1,url:o.closest(".modal-content").find("form").prop("action"),data:o.closest(".modal-content").find("form").serialize(),success:function(e){e.error?Botble.showNotice("error",e.message):(Botble.showNotice("success",e.message),$("#add-credit-modal").modal("hide"),$("#credit-histories").load("".concat($(".page-body form").prop("action")," #credit-histories > *"))),o.removeClass("button-loading")},error:function(e){Botble.handleError(e),o.removeClass("button-loading")}})})),$(document).on("click",".show-timeline-dropdown",(function(e){e.preventDefault(),$($(e.currentTarget).data("target")).slideToggle(),$(e.currentTarget).closest(".comment-log-item").toggleClass("bg-white")})),$(document).on("click",".verify-account-email-button",(function(e){e.preventDefault(),$("#confirm-verify-account-email-button").data("action",$(e.currentTarget).prop("href")),$("#verify-account-email-modal").modal("show")})),$(document).on("click","#confirm-verify-account-email-button",(function(e){e.preventDefault();var o=$(e.currentTarget);o.addClass("button-loading"),$.ajax({type:"POST",cache:!1,url:o.data("action"),success:function(e){e.error?Botble.showError(e.message):(Botble.showSuccess(e.message),setTimeout((function(){window.location.reload()}),2e3)),o.removeClass("button-loading"),o.closest(".modal").modal("hide")},error:function(e){Botble.handleError(e),o.removeClass("button-loading")}})}))}));