File: /home/frenchy/www/_trash/wp-content/plugins/secupress/assets/admin/js/secupress-modules.min.js
var SecuPress={doingAjax:{},deletedRowColor:"#FF9966",addedRowColor:"#CCEEBB",swal2Defaults:{title:SecuPressi18nModules.confirmTitle,confirmButtonText:SecuPressi18nModules.confirmText,cancelButtonText:SecuPressi18nModules.cancelText,type:"warning",allowOutsideClick:!0,customClass:"wpmedia-swal2 secupress-swal2"},swal2ConfirmDefaults:{showCancelButton:!0,closeOnConfirm:!1},expandButton:'<p class="secupress-expand-trigger-container"><button class="secupress-expand-trigger" type="button"><span class="secupress-expand-txt">'+SecuPressi18nModules.expandTextOpen+'</span><i class="secupress-icon-angle-down" aria-hidden="true"></i></button></p>'};if(0===SecuPressi18nModules.alreadyScanned){var modal_content,modal_title='<span class="secupress-swal-header-imaged"><img src="'+SecuPressi18nModules.firstScanImage+'" alt="" width="113" height="113"></span>';modal_content='<p class="secupress-text-baseup secupress-mt1 secupress-mb1 secupress-primary secupress-bold">',modal_content+=SecuPressi18nModules.firstScanTitle,modal_content+="</p>",modal_content+='<p class="secupress-text-base secupress-mt2 secupress-mb2">',modal_content+=SecuPressi18nModules.firstScanText,modal_content+="</p>",modal_content+='<p class="secupress-mt1 secupress-mb1">',modal_content+='<a class="secupress-button secupress-button-primary secupress-button-scan shadow" href="'+SecuPressi18nModules.firstScanURL+'">',modal_content+='<span class="icon">',modal_content+='<i class="secupress-icon-radar" aria-hidden="true"></i>',modal_content+="</span>",modal_content+='<span class="text">',modal_content+=SecuPressi18nModules.firstScanButton,modal_content+="</span>",modal_content+="</a>",modal_content+="</p>",swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:modal_title,html:modal_content,type:null,width:400,showConfirmButton:!1,showCloseButton:!0,showCancelButton:!1,customClass:"wpmedia-swal2 secupress-swal2 secupress-swal-dark-header secupress-text-center"}))}function secupressDisableAjaxButton(e,s,t){var n,i=e.attr("data-loading-i18n"),a=e.get(0).nodeName.toLowerCase();t=void 0!==t?t:"global",SecuPress.doingAjax[t]=!0,a="button"===a||"input"===a,void 0!==i&&i&&(a&&void 0!==(n=e.val())&&n?e.val(i):e.find(".text").length?e.find(".text").text(i):e.text(i),void 0!==s&&s||(s=i)),a?e.addClass("working").attr({disabled:"disabled","aria-disabled":"true"}):e.addClass("disabled working").attr("aria-disabled","true"),wp.a11y&&wp.a11y.speak&&void 0!==s&&s&&wp.a11y.speak(s)}function secupressEnableAjaxButton(e,s,t){var n,i,a;void 0!==e&&e&&e.length&&(n=e.attr("data-original-i18n"),i="button"===(i=e.get(0).nodeName.toLowerCase())||"input"===i,void 0!==n&&n&&(i&&void 0!==(a=e.val())&&a?e.val(n):e.find(".text").length?e.find(".text").text(n):e.text(n)),i?e.removeClass("working").removeAttr("disabled aria-disabled"):e.removeClass("disabled working").removeAttr("aria-disabled")),wp.a11y&&wp.a11y.speak&&void 0!==s&&s&&wp.a11y.speak(s),t=void 0!==t?t:"global",SecuPress.doingAjax[t]=!1}function secupressPreAjaxCall(e,s,t){return s.preventDefault(),!(void 0===e||!e)&&(!("keyup"===s.type&&!secupressIsSpaceOrEnterKey(s))&&(t=void 0!==t?t:"global",void 0===SecuPress.doingAjax[t]&&(SecuPress.doingAjax[t]=!1),!SecuPress.doingAjax[t]&&e.replace("admin-post.php","admin-ajax.php")))}function secupressDisplayAjaxError(e,s,t){void 0===s&&(s=SecuPressi18nModules.unknownError),swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:SecuPressi18nModules.error,html:s,type:"error"})),secupressEnableAjaxButton(e,s,t=void 0!==t?t:"global")}function secupressDisplayAjaxSuccess(e,s,t){void 0===s&&(s=null),swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:SecuPressi18nModules.done,html:s,type:"success",timer:4e3})),secupressEnableAjaxButton(e,s,t=void 0!==t?t:"global")}!function(e,s,t,n){"function"==typeof document.createElement("input").checkValidity?e(".affected-role-row :checkbox").on("click.secupress",function(){this.setCustomValidity(""),0===e('[name="'+this.name+'"]:checked').length&&(this.setCustomValidity(SecuPressi18nModules.selectOneRoleMinimum),e("#secupress-module-form-settings [type='submit']").first().trigger("click.secupress"))}):e(".affected-role-row p.warning").removeClass("hide-if-js")}(jQuery,document,window),function(e,s,t,n){e(".radiobox").on("click.secupress",function(){e('[name="'+this.name+'"]:checked').not(this).removeAttr("checked").trigger("change")})}(jQuery,document,window),function(e,s,t,n){var i=e("#wpbody-content").find('[class*="depends-"]'),a={},r={};e(".secupress-setting-row_move-login_slug-login").on("secupressbeforeshow secupressinitshow",function(){e("#move-login_slug-login").attr({required:"required","aria-required":"true"})}).on("secupressafterhide secupressinithide",function(){e("#move-login_slug-login").removeAttr("required aria-required")}),i.each(function(){var s=e(this).attr("class").replace(/^\s+|\s+$/g,"").replace(/\s+/," ").split(" ");e.each(s,function(s,t){var n,i,o,c,u=!1;if(0!==t.indexOf("depends-"))return!0;if(t=t.substr(8),void 0!==a[t])return!0;if(a[t]=1,!(n=e("#"+t)).length)return!0;if("input"===(i=n.get(0).nodeName.toLowerCase())?"checkbox"!==(o=n.attr("type").toLowerCase())&&"radio"!==o||(u=!0):"button"===i&&(u=!0),!u)return!0;if("button"===i)n.on("click.secupress",function(){var s=e(this).attr("id");e(this).toggleClass("open"),e(".depends-"+s).toggle(250)});else if("radio"===o){if(c=n.attr("name"),void 0!==r[c])return!0;r[c]=1,e('[name="'+c+'"]').on("change init.secupress",function(s){var t=e(this),n=e(".depends-"+t.attr("id")),i=[],a="init"===s.type&&"secupress"===s.namespace?0:250;n.not(":visible").trigger("secupressbeforeshow").show(a,function(){e(this).trigger("secupressaftershow")}),e('[name="'+t.attr("name")+'"]').not(t).each(function(){i.push(".depends-"+e(this).attr("id").replace(/^\s+|\s+$/g,""))}),e(i.join(",")).not(n).filter(":visible").trigger("secupressbeforehide").hide(a,function(){e(this).trigger("secupressafterhide")})}).filter(":checked").trigger("init.secupress")}else"checkbox"===o&&(n.on("change init.secupress",function(s){var t=e(this),n=t.attr("id"),i=e(".depends-"+n),a="init"===s.type&&"secupress"===s.namespace?0:250;if(!i.length)return!0;t.is(":checked")?i.not(":visible").trigger("secupressbeforeshow").show(a,function(){e(this).trigger("secupressaftershow")}):i.filter(":visible").each(function(){var s=e(this),t=s.attr("class").replace(/^\s+|\s+$/g,"").replace(/\s+/," ").split(" "),i=[];e.each(t,function(e,s){"depends-"+n!==s&&0===s.indexOf("depends-")&&i.push("#"+s.substr(8)+":checked")}),i=i.join(","),e(i).length||s.trigger("secupressbeforehide").hide(a,function(){e(this).trigger("secupressafterhide")})})}).filter(":checked").trigger("init.secupress"),n.is(":checked")?e(".depends-"+t).filter(":visible").trigger("secupressinitshow"):e(".depends-"+t).not(":visible").trigger("secupressinithide"))})})}(jQuery,document,window),function(e,s,t,n){var i={},a={};function r(s,t){e(t).closest(".secupress-text-label").find(".dynamic-login-url-slug").text(s)}SecuPressi18nModules.moveLoginNonce&&e(".dynamic-login-url-slug").closest(".secupress-text-label").find('[type="text"]').on("keyup",function(s){var n,o,c;return-1===e.inArray(s.which,[16,17,18,224,27])&&(o=(n=this).value.replace(/^\s+|\s+$/g,""),c=n.id.replace("move-login_slug-",""),void 0!==typeof a[n.id]&&t.clearTimeout(a[n.id]),"login"!==c&&(o=""===o?c:o),"string"==typeof i[o]?(r(i[o],n),!0):void(a[n.id]=t.setTimeout(function(){var s=e(n).addClass("ui-autocomplete-loading"),t={action:"sanitize_move_login_slug",slug:o,default:c,_wpnonce:SecuPressi18nModules.moveLoginNonce};e.getJSON(ajaxurl,t).done(function(t){e.isPlainObject(t)&&t.success?(i[o]=t.data,r(t.data,s)):r("--"+SecuPressi18nModules.error+"--",s)}).fail(function(){r("--"+SecuPressi18nModules.error+"--",s)}).always(function(){s.removeClass("ui-autocomplete-loading")})},300)))})}(jQuery,document,window),function(e,s,t,n){function i(s){e("#secupress-available-backups").text(s.data.countText)}function a(){0===e("#form-delete-backups").find(".secupress-large-row").length?(e("#form-delete-backups").hide(),e("#secupress-no-backups").show()):(e("#secupress-no-backups").hide(),e("#form-delete-backups").show())}function r(s,t){secupressDisableAjaxButton(s,SecuPressi18nModules.deletingAllText,"backup"),e.getJSON(t).done(function(t){var n,i;e.isPlainObject(t)&&t.success?(swal2.close(),i=(n=s.closest("form").find("fieldset")).children("legend"),n.text("").prepend(i),a(),secupressEnableAjaxButton(s,SecuPressi18nModules.deletedAllText,"backup")):secupressDisplayAjaxError(s,SecuPressi18nModules.deleteAllImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")})}function o(s,t){secupressDisableAjaxButton(s,SecuPressi18nModules.deletingOneText,"backup"),e.getJSON(t).done(function(t){e.isPlainObject(t)&&t.success?(swal2.close(),s.closest(".secupress-large-row").css("backgroundColor",SecuPress.deletedRowColor).hide("normal",function(){e(this).remove(),i(t),a(),SecuPress.doingAjax.backup=!1}),wp.a11y&&wp.a11y.speak&&wp.a11y.speak(SecuPressi18nModules.deletedOneText)):secupressDisplayAjaxError(s,SecuPressi18nModules.deleteOneImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")})}e("#submit-delete-backups").on("click.secupress",function(s){var n=e(this),i=secupressPreAjaxCall(n.closest("form").attr("action"),s);i&&("function"==typeof t.swal2?swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.confirmDeleteBackups,confirmButtonText:SecuPressi18nModules.yesDeleteAll,type:"question",reverseButtons:!0})).then(function(e){e&&(swal2.enableLoading(),r(n,i))}):t.confirm(SecuPressi18nModules.confirmTitle+"\n"+SecuPressi18nModules.confirmDeleteBackups)&&r(n,i))}).removeAttr("disabled aria-disabled"),e("body").on("click.secupress keyup",".a-delete-backup",function(s){var n=e(this),i=secupressPreAjaxCall(n.attr("href"),s);i&&("function"==typeof t.swal2?swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.confirmDeleteBackup,confirmButtonText:SecuPressi18nModules.yesDeleteOne,type:"question",reverseButtons:!0})).then(function(e){e&&(swal2.enableLoading(),o(n,i))}):t.confirm(SecuPressi18nModules.confirmTitle+"\n"+SecuPressi18nModules.confirmDeleteBackup)&&o(n,i))}),e("#submit-backup-db").on("click.secupress",function(s){var t=e(this),n=secupressPreAjaxCall(t.closest("form").attr("action"),s);n&&function(s,t){secupressDisableAjaxButton(s,SecuPressi18nModules.backupingText,"backup"),e.post(t,s.closest("form").serializeArray()).done(function(t){e.isPlainObject(t)?t.success?(e(t.data.elemRow).addClass("hidden").css("backgroundColor",SecuPress.addedRowColor).insertAfter("#form-delete-backups legend").show("normal",function(){e(this).css("backgroundColor","")}),i(t),a(),secupressEnableAjaxButton(s,SecuPressi18nModules.backupedText,"backup")):(t.data=t.data?t.data:SecuPressi18nModules.backupImpossible,secupressDisplayAjaxError(s,t.data,"backup")):secupressDisplayAjaxError(s,SecuPressi18nModules.backupImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")})}(t,n)}).removeAttr("disabled aria-disabled"),e("#submit-backup-files").on("click.secupress",function(s){var t=e(this),n=secupressPreAjaxCall(t.closest("form").attr("action"),s);n&&function(s,t){secupressDisableAjaxButton(s,SecuPressi18nModules.backupingText,"backup"),e.post(t,s.closest("form").serializeArray()).done(function(t){e.isPlainObject(t)?t.success?(e(t.data.elemRow).addClass("hidden").css("backgroundColor",SecuPress.addedRowColor).insertAfter("#form-delete-backups legend").show("normal",function(){e(this).css("backgroundColor","")}),i(t),a(),e("#ignored_directories").val(t.data.ignoredFiles),secupressEnableAjaxButton(s,SecuPressi18nModules.backupedText,"backup")):(t.data=t.data?t.data:SecuPressi18nModules.backupImpossible,secupressDisplayAjaxError(s,t.data,"backup")):secupressDisplayAjaxError(s,SecuPressi18nModules.backupImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")})}(t,n)}).removeAttr("disabled aria-disabled")}(jQuery,document,window),function(e,s,t,n){function i(s){var t=e("[data-code-country='"+s+"']").length,n=e("[data-code-country='"+s+"']:checked").length;n===t?e("[value='continent-"+s+"']").prop({checked:!0,indeterminate:!1}).css("-webkit-appearance","none"):0===n?e("[value='continent-"+s+"']").prop({checked:!1,indeterminate:!1}).css("-webkit-appearance","none"):e("[value='continent-"+s+"']").prop({checked:!1,indeterminate:!0}).css("-webkit-appearance","checkbox")}e(".continent input").on("click.secupress",function(s){var t=e(this),n=t.css("-webkit-appearance","none").val().replace("continent-","");e(".depends-geoip-system_type_blacklist.depends-geoip-system_type_whitelist [data-code-country='"+n+"']").prop("checked",t.is(":checked"))}),e("[data-code-country]").on("click.secupress",function(s){i(e(this).data("code-country"))}),e(".continent input").each(function(s){i(e(this).val().replace("continent-",""))}),e(".expand_country").on("click.secupress",function(s){e(this).next("fieldset").toggleClass("hide-if-js")})}(jQuery,document,window),function(e,s,t,n){var i,a,r=e("#banned-ips-row");function o(e,s){var t;n!==e&&e||(e=SecuPressi18nModules.noBannedIPs),r.find("#secupress-banned-ips-list").html('<li id="no-ips">'+e+"</li>"),(n===s||s)&&(r.find("#secupress-clear-ips-button").next().addBack().addClass("hidden"),(t=r.find("#form-search-ip").addClass("hidden")).find("#reset-banned-ips-list").next().addBack().addClass("hidden"),t.find("#secupress-search-banned-ip").val(""))}function c(s,t){var i={ip:e("#secupress-ban-ip").val()};i.ip?(secupressDisableAjaxButton(s,null,"ban-ip"),e.getJSON(t,i).done(function(t){var i;if(e.isPlainObject(t)&&t.data&&e.isPlainObject(t.data)){if(!t.success)return i=t.data.message?t.data.message:null,void secupressDisplayAjaxError(s,i,"ban-ip");var a,c,u,l,d,p;r.find("#secupress-banned-ips-list").children("#no-ips").remove(),a=t.data.tmplValues,c=!1,u=r.find("#secupress-banned-ips-list"),l='<li class="secupress-large-row" data-ip="%ip%"><strong>%ip%</strong> <em>(%time%)</em><span><a class="a-unban-ip" href="%unban_url%">'+SecuPressi18nModules.delete+'</a> <span class="spinner secupress-inline-spinner"></span></span></li>',d=!e("#reset-banned-ips-list").hasClass("hidden"),p="",(n===c||c)&&(c=!0,u.html("")),n!==a&&a.length?(e.each(a,function(e,s){p+=l.replace(/%ip%/g,s.ip).replace(/%time%/g,s.time).replace(/%unban_url%/g,s.unban_url)}),u.append(p)):c&&("string"==typeof c?o(c):d?o(SecuPressi18nModules.IPnotFound,!1):o()),r.find("#form-search-ip").removeClass("hidden"),r.find("#secupress-clear-ips-button").next().addBack().removeClass("hidden"),secupressDisplayAjaxSuccess(s,t.data.message,"ban-ip")}else secupressDisplayAjaxError(s,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(s,null,"ban-ip")})):u(s,t)}function u(s,t){swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{title:i.find('[for="secupress-ban-ip"]').text(),confirmButtonText:s.data("original-i18n"),html:i,type:"info"})).then(function(e){e&&(swal2.enableLoading(),c(s,t))})}r.length&&(r.find("button").removeAttr("disabled aria-disabled"),i=r.find("#form-ban-ip").remove(),a=i.attr("action"),(i=i.children().wrapAll("<div id='secupress-ban-ip-fields' />").parent()).find("[type='submit']").remove(),r.on("click.secupress keyup","#reset-banned-ips-list",function(t){var n=e(this),i=secupressPreAjaxCall(s.location.href,t,"ban-ip");i&&(secupressDisableAjaxButton(n,null,"ban-ip"),r.load(i+" #banned-ips-row > th, #banned-ips-row > td",function(){r.find("#form-ban-ip").remove(),r.find("#secupress-search-banned-ip").focus(),secupressEnableAjaxButton(n,SecuPressi18nModules.searchReset,"ban-ip")}))}),r.on("click.secupress keyup","#secupress-ban-ip-button",function(s){var t=e(this),n=secupressPreAjaxCall(a,s,"ban-ip");n&&(u(t,n),e("#secupress-ban-ip").focus().val(""))}),r.on("click.secupress keyup",".a-unban-ip",function(s){var t=e(this),n=secupressPreAjaxCall(t.attr("href"),s,"ban-ip");n&&(secupressDisableAjaxButton(t,null,"ban-ip"),e.getJSON(n).done(function(s){var n,i,a;if(e.isPlainObject(s)&&s.data&&e.isPlainObject(s.data)){if(!s.success)return a=s.data.message?s.data.message:null,void secupressDisplayAjaxError(t,a,"ban-ip");n=(i=t.closest(".secupress-large-row")).parent(),i.remove(),n.children().length||(e("#reset-banned-ips-list").hasClass("hidden")?o():o(SecuPressi18nModules.IPremoved,!1)),secupressDisplayAjaxSuccess(t,s.data.message,"ban-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"ban-ip")}))}),r.on("click.secupress keyup","#secupress-clear-ips-button",function(s){var t=e(this),n=secupressPreAjaxCall(t.attr("href"),s,"ban-ip");n&&(secupressDisableAjaxButton(t,null,"ban-ip"),e.getJSON(n).done(function(s){var n;t.siblings("#secupress-banned-ips-list");if(e.isPlainObject(s)&&s.data&&e.isPlainObject(s.data)){if(!s.success)return n=s.data.message?s.data.message:null,void secupressDisplayAjaxError(t,n,"ban-ip");o(),secupressDisplayAjaxSuccess(t,s.data.message,"ban-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"ban-ip")}))}))}(jQuery,document,window),function(e,s,t,n){var i,a,r=e("#whitelist-ips-row");function o(e,s){var t;n!==e&&e||(e=SecuPressi18nModules.noWhitelistIPs),r.find("#secupress-whitelist-ips-list").html('<li id="no-whitelist-ips">'+e+"</li>"),(n===s||s)&&(r.find("#secupress-clear-whitelist-ips-button").next().addBack().addClass("hidden"),(t=r.find("#form-search-whitelist-ip").addClass("hidden")).find("#reset-whitelist-ips-list").next().addBack().addClass("hidden"),t.find("#secupress-search-whitelist-ip").val(""))}function c(s,t){var i={ip:e("#secupress-whitelist-ip").val()};i.ip?(secupressDisableAjaxButton(s,null,"whitelist-ip"),e.getJSON(t,i).done(function(t){var i;if(e.isPlainObject(t)&&t.data&&e.isPlainObject(t.data)){if(!t.success)return i=t.data.message?t.data.message:null,void secupressDisplayAjaxError(s,i,"whitelist-ip");var a,c,u,l,d,p;r.find("#secupress-whitelist-ips-list").children("#no-whitelist-ips").remove(),a=t.data.tmplValues,c=!1,u=r.find("#secupress-whitelist-ips-list"),l='<li class="secupress-large-row" data-ip="%ip%"><strong>%ip%</strong> <span><a class="a-unwhitelist-ip" href="%unwhitelist_url%">'+SecuPressi18nModules.delete+'</a> <span class="spinner secupress-inline-spinner"></span></span></li>',d=!e("#reset-whitelist-ips-list").hasClass("hidden"),p="",(n===c||c)&&(c=!0,u.html("")),n!==a&&a.length?(e.each(a,function(e,s){p+=l.replace(/%ip%/g,s.ip).replace(/%unwhitelist_url%/g,s.unwhitelist_url)}),u.append(p)):c&&("string"==typeof c?o(c):d?o(SecuPressi18nModules.IPnotFound,!1):o()),r.find("#form-search-whitelist-ip").removeClass("hidden"),r.find("#secupress-clear-whitelist-ips-button").next().addBack().removeClass("hidden"),secupressDisplayAjaxSuccess(s,t.data.message,"whitelist-ip")}else secupressDisplayAjaxError(s,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(s,null,"whitelist-ip")})):u(s,t)}function u(s,t){swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{title:i.find('[for="secupress-whitelist-ip"]').text(),confirmButtonText:s.data("original-i18n"),html:i,type:"info"})).then(function(e){e&&(swal2.enableLoading(),c(s,t))})}r.length&&(r.find("button").removeAttr("disabled aria-disabled"),i=r.find("#form-whitelist-ip").remove(),a=i.attr("action"),(i=i.children().wrapAll("<div id='secupress-whitelist-ip-fields' />").parent()).find("[type='submit']").remove(),r.on("click.secupress keyup","#reset-whitelist-ips-list",function(t){var n=e(this),i=secupressPreAjaxCall(s.location.href,t,"whitelist-ip");i&&(secupressDisableAjaxButton(n,null,"whitelist-ip"),r.load(i+" #whitelist-ips-row > th, #whitelist-ips-row > td",function(){r.find("#form-whitelist-ip").remove(),r.find("#secupress-search-whitelist-ip").focus(),secupressEnableAjaxButton(n,SecuPressi18nModules.searchReset,"whitelist-ip")}))}),r.on("click.secupress keyup","#secupress-whitelist-ip-button",function(s){var t=e(this),n=secupressPreAjaxCall(a,s,"whitelist-ip");n&&(u(t,n),e("#secupress-whitelist-ip").focus().val(""))}),r.on("click.secupress keyup",".a-unwhitelist-ip",function(s){var t=e(this),n=secupressPreAjaxCall(t.attr("href"),s,"whitelist-ip");n&&(secupressDisableAjaxButton(t,null,"whitelist-ip"),e.getJSON(n).done(function(s){var n,i,a;if(e.isPlainObject(s)&&s.data&&e.isPlainObject(s.data)){if(!s.success)return a=s.data.message?s.data.message:null,void secupressDisplayAjaxError(t,a,"whitelist-ip");n=(i=t.closest(".secupress-large-row")).parent(),i.remove(),n.children().length||(e("#reset-whitelist-ips-list").hasClass("hidden")?o():o(SecuPressi18nModules.IPremoved,!1)),secupressDisplayAjaxSuccess(t,s.data.message,"whitelist-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"whitelist-ip")}))}),r.on("click.secupress keyup","#secupress-clear-whitelist-ips-button",function(s){var t=e(this),n=secupressPreAjaxCall(t.attr("href"),s,"whitelist-ip");n&&(secupressDisableAjaxButton(t,null,"whitelist-ip"),e.getJSON(n).done(function(s){var n;t.siblings("#secupress-whitelist-ips-list");if(e.isPlainObject(s)&&s.data&&e.isPlainObject(s.data)){if(!s.success)return n=s.data.message?s.data.message:null,void secupressDisplayAjaxError(t,n,"whitelist-ip");o(),secupressDisplayAjaxSuccess(t,s.data.message,"whitelist-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"whitelist-ip")}))}))}(jQuery,document,window),function(e){var s,t={},n={},i=e(".secupress-textarea-container");n.msie=/msie/.test(navigator.userAgent.toLowerCase()),n.opera=/opera/.test(navigator.userAgent.toLowerCase()),s=!(n.msie||n.opera),t.resize=function(n,i){var a,r,o,c,u;return a=(n=n.target||n).value.length,r=n.offsetWidth,a===n.valLength&&r===n.boxWidth||(s&&(a<n.valLength||r!==n.boxWidth)&&(n.style.height="0px"),o=Math.max(n.expandMin,Math.min(n.scrollHeight,n.expandMax)),u=(c=e(n)).closest(".secupress-textarea-container"),n.style.overflow="hidden",n.style.height=o+"px",n.valLength=a,n.boxWidth=r,t.textareaParentHeight(u,c),n.scrollHeight>u.height()&&u.next()?t.handleExpandButton(u,!0):n.scrollHeight<=u.height()&&0===u.next(".secupress-expand-trigger-container").find(".open").length&&t.handleExpandButton(u,!1)),!0},t.textareaParentHeight=function(e,s){return e.css("height",s.outerHeight()+e.outerHeight()-e.height()),!0},t.handleExpandButton=function(e,s){!e.next(".secupress-expand-trigger-container").length&&s?e.after(SecuPress.expandButton).attr("spellcheck",!1):e.next(".secupress-expand-trigger-container").length&&!1===s&&e.next(".secupress-expand-trigger-container").remove()},e.fn.AutoSized=function(s,n){return this.each(function(){"textarea"===this.nodeName.toLowerCase()&&(this.expandMin=s||0,this.expandMax=n||99999,t.resize(this,this.Initialized),this.Initialized||(this.Initialized=!0,e(this).css({"padding-top":"0","padding-bottom":"0"}).on("keyup.secupress focus.secupress",t.resize)))}),this},e.fn.focusToEnd=function(){return this.each(function(){var s=e(this).val();e(this).focus().val("").val(s)})},i.filter(":visible").find("textarea").AutoSized().on("focus.secupress",function(){e(this).parent().addClass("textarea-focused")}).on("blur.secupress",function(){e(this).parent().removeClass("textarea-focused")}),e("#wpbody-content").find(".secupress-setting-row").on("secupressaftershow",function(){e(this).find(".secupress-textarea-container").find("textarea").AutoSized().on("focus.secupress",function(){e(this).parent().addClass("textarea-focused")}).on("blur.secupress",function(){e(this).parent().removeClass("textarea-focused")})}),i.closest("label, .secupress-setting-content-col").on("click.secupress",".secupress-expand-trigger",function(){var s=e(this),n=s.closest(".secupress-expand-trigger-container").prev(".secupress-textarea-container"),i=n.find("textarea");return s.hasClass("open")?(n.css("height","200px"),s.removeClass("open"),s.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextOpen),s.find("i").removeClass("secupress-icon-angle-up").addClass("secupress-icon-angle-down"),e("html, body").animate({scrollTop:n.offset().top-80},275)):(t.textareaParentHeight(n,i),i.focusToEnd(),s.addClass("open"),s.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextClose),s.find("i").removeClass("secupress-icon-angle-down").addClass("secupress-icon-angle-up")),!1})}(jQuery),function(e){e("fieldset.secupress-boxed-group").each(function(){var s=e(this);s.data("height",s.outerHeight()).css("height",200).after(SecuPress.expandButton),s.next(".secupress-expand-trigger-container").on("click.secupress",function(){var t=e(this);return t.hasClass("open")?(s.css("height",200),t.removeClass("open"),t.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextOpen),t.find("i").removeClass("secupress-icon-angle-up").addClass("secupress-icon-angle-down"),e("html, body").animate({scrollTop:s.offset().top-80},275)):(s.css("height",s.data("height")),t.addClass("open"),t.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextClose),t.find("i").removeClass("secupress-icon-angle-down").addClass("secupress-icon-angle-up")),!1})})}(jQuery),function(e,s,t,n){if(void 0!==SecuPressi18nModules&&"on"===SecuPressi18nModules.malwareScanStatus){window.stop(),function s(){var n={action:"secupress_malwareScanStatus",_wpnonce:e("#secupress-scanner-info").data("nonce")};e.getJSON(ajaxurl,n).done(function(n){n.success?n.data.malwareScanStatus?t.location.href=SecuPressi18nModules.MalwareScanURI:(setTimeout(s,15e3),timer=16/n.data.currentItems.length*1e3,n.data.currentItems.forEach((s,t)=>{setTimeout(function(){e("#secupress-scanner-info code").text(s)},timer*(t+1))})):e("#secupress-scanner-info code").parent().parent().text(SecuPressi18nModules.malwareScanError)})}()}}(jQuery,document,window),function(e,s,t,n){var i=t.propHooks.checked;t.propHooks.checked={set:function(e,s,n){var a;return a=void 0===i?e[n]=s:i(e,s,n),t(e).trigger("change.secupress"),a}},t(".secupress-toggle-sort").css("cursor","pointer").on("click",function(e){var s=t(this).data("file");t(this).toggleClass("dashicons-arrow-right dashicons-arrow-down"),t(".secupress-toggle-me."+s).toggle("fast")});var a=0;t(".secupress-toggle-sort-all").css("cursor","pointer").on("click",function(e){0===a?(t(this).next("ul").find(".secupress-toggle-me").show("fast"),t(this).next("ul").find("li span.dashicons-arrow-right").toggleClass("dashicons-arrow-right dashicons-arrow-down"),a=1):(t(this).next("ul").find(".secupress-toggle-me").hide("fast"),t(this).next("ul").find("li span.dashicons-arrow-down").toggleClass("dashicons-arrow-right dashicons-arrow-down"),a=0)})}(window,document,jQuery),function(e,s,t,n){e(".secupress-fieldset-item-checkboxes").each(function(){var s=e(this).find("input"),t=s.closest("label");s.filter(":checked").length&&t.addClass("is-checked"),s.on("change",function(){s.filter(":checked").length?t.addClass("is-checked"):t.removeClass("is-checked")})})}(jQuery,document,window),function(e,s,t,n){e(".secupressicon-reset").on("click",function(s){var t=this;s.preventDefault(),swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.resetDefault,type:"question",reverseButtons:!0})).then(function(s){if(!s)return!1;window.location=e(t).attr("href")})})}(jQuery,document,window),function(e,s,t,n){e("#secupress-regen-keys").on("click",function(s){var t=this;s.preventDefault(),swal2(e.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.regenKeys,type:"question",reverseButtons:!0})).then(function(s){if(!s)return!1;window.location=e(t).attr("href")})})}(jQuery,document,window),function(e,s,t,n){e("#captcha_activate").length&&(params={action:"secupress_test_captcha_random_string_action--"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)},e.getJSON(ajaxurl,params).always(function(s){"0"===s.responseText&&400===s.status&&(e("#captcha_activate").prop("disabled",!1).parent().removeClass("disabled").parent().next().hide(),e("#captcha_activate").prop("checked",1==e("#captcha_activate").data("value")),e("#login_auth_submit").prop("disabled",!1))}))}(jQuery,document,window),function(e,s,t,n){e('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("keypress",function(e){/[a-z0-9_]|i/.test(e.key)||e.preventDefault()}),e('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("blur",function(s){"wp_"!==e(this).val()&&"wordpress_"!==e(this).val()||e(this).val("")}),e('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("paste",function(s){var t=s.originalEvent.clipboardData.getData("Text");/^([a-z0-9_]{1,})$/.test(t)||setTimeout(function(){e("[type='submit']:first").trigger("click"),e('[name="secupress_wordpress-core_settings[database_db_prefix]"]').focus().select()},10)}),e("#secupress-database-prefix-generate").on("click",function(s){var t=Math.random().toString(36)+Math.random().toString(36);t=t.replace(/[^a-zA-Z]+/g,"").substr(0,5),e('[name="secupress_wordpress-core_settings[database_db_prefix]"]').val("wp_"+t+"_").focus()})}(jQuery,document,window);