"use strict";jQuery(document).ready((function($){$("#secnin-manual-vuln-scan").on("click",(function(){var n=$(this),s=$("#secnin-scan-status");n.prop("disabled",!0),n.html(secnin_ajax.strings.scanning),s.html(secnin_ajax.strings.scanning_for_vulns).show(),$.ajax({url:secnin_ajax.ajaxurl,type:"POST",data:{action:"secnin_manual_vuln_scan",nonce:secnin_ajax.nonce},success:function(n){n.success?(s.html(secnin_ajax.strings.scan_completed).removeClass("error").addClass("success"),setTimeout((function(){location.reload()}),1500)):s.html(secnin_ajax.strings.scan_failed+" "+n.data.message).removeClass("success").addClass("error")},error:function(n){s.html(secnin_ajax.strings.scan_failed+" "+n.data.message).removeClass("success").addClass("error")},complete:function(){n.prop("disabled",!1),n.html(secnin_ajax.strings.run_scan)}})})),$(".download-all-vuln-files").on("click",(function(n){n.preventDefault();var s=$(this),a=s.text();s.prop("disabled",!0),s.html(secnin_ajax.strings.downloading||"Downloading..."),$.ajax({url:secnin_ajax.ajaxurl,type:"POST",data:{action:"secnin_download_all_vuln_files",nonce:secnin_ajax.nonce},success:function(n){n.success?(s.html(secnin_ajax.strings.download_completed||"Downloaded!"),s.removeClass("button-primary").addClass("button button-success"),setTimeout((function(){location.reload()}),1500)):(s.html(secnin_ajax.strings.download_failed||"Download Failed"),s.removeClass("button-primary").addClass("button-secondary"))},error:function(){s.html(secnin_ajax.strings.download_failed||"Download Failed"),s.removeClass("button-primary").addClass("button-secondary")},complete:function(){setTimeout((function(){s.prop("disabled",!1),s.html(a),s.removeClass("button-secondary button-success").addClass("button-primary")}),2e3)}})}))}));