(d=>{d(document).ready(function(){var a=d("#discountify-deactivation-modal"),o="";d('tr[data-slug="'+discountify_deactivation.slug+'"] .deactivate a, tr[data-plugin="'+discountify_deactivation.slug+'/discountify.php"] .deactivate a').on("click",function(i){i.preventDefault(),o=d(this).attr("href"),a.fadeIn(200)}),a.find(".discountify-deactivation-modal-overlay").on("click",function(){a.fadeOut(200)}),a.find('input[name="discountify_deactivation_reason"]').on("change",function(){a.find(".discountify-deactivation-detail").slideUp(150);var i=d(this).closest("li").find(".discountify-deactivation-detail");i.length&&i.slideDown(150).focus(),a.find(".discountify-deactivation-submit").prop("disabled",!1)}),a.find(".discountify-deactivation-skip").on("click",function(){window.location.href=o}),a.find(".discountify-deactivation-submit").on("click",function(){var i=d(this),t=a.find('input[name="discountify_deactivation_reason"]:checked').val(),n=a.find('input[name="discountify_deactivation_reason"]:checked').closest("li").find(".discountify-deactivation-detail").val();t?(i.text("Submitting...").prop("disabled",!0),d.ajax({url:discountify_deactivation.ajax_url,type:"POST",data:{action:"discountify_deactivation_feedback",nonce:discountify_deactivation.nonce,reason:t,detail:n||""},complete:function(){window.location.href=o}})):window.location.href=o})})})(jQuery);