From 3475293b75dbd88f4f55ed1374600caf069595cb Mon Sep 17 00:00:00 2001
From: annrra
Date: Wed, 22 May 2024 17:37:19 +0300
Subject: [PATCH 1/2] [PROD-7474] Group settings - remove the preview display
buttons for cover image
---
src/bp-core/admin/bp-core-admin-settings.php | 20 +-------------------
src/bp-core/admin/js/settings-page.js | 13 -------------
src/bp-core/admin/js/settings-page.min.js | 2 +-
3 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/src/bp-core/admin/bp-core-admin-settings.php b/src/bp-core/admin/bp-core-admin-settings.php
index bce4440d08..f14c3fa421 100644
--- a/src/bp-core/admin/bp-core-admin-settings.php
+++ b/src/bp-core/admin/bp-core-admin-settings.php
@@ -1087,13 +1087,6 @@ function bp_admin_setting_callback_preview_group_avatar_cover() {
-
-
@@ -1103,17 +1096,6 @@ function bp_admin_setting_callback_preview_group_avatar_cover() {
-
-
-
-
-
-
-
-
-
-
-
@@ -2291,7 +2273,7 @@ function bb_admin_setting_group_header_style() {
);
?>
-
+
"+s[t]+"
";z("#bb-domain-restrictions-setting").children(".restrictions-error").append(i)}0";z("#bb-email-restrictions-setting").children(".restrictions-error").append(t)}0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.getElementById("bp-hello-container");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),"yes"===z.bbGetParameterByName("popup")&&z(".btn-open-missing-email").trigger("click"),"bpmissingemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-missing-emails").offset().top},1500),z(".label-bp-missing-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-missing-emails").css("background-color","transparent")},1500)),"bpreinstallemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-reinstall-emails").offset().top},1500),z(".label-bp-reinstall-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-reinstall-emails").css("background-color","transparent")},1500)),z("[data-run-js-condition]").each(function(){var t=z(this).data("run-js-condition"),i=z(this).prop("tagName");z(this).on("change.run-condition",function(){if("SELECT"===i&&z(this).is(":visible")){var e=t+"-"+z(this).val();return z('[class*="js-show-on-'+t+'-"]:not(.js-show-on-'+e+")").hide(),z(".js-show-on-"+e).show().find("[data-run-js-condition]").trigger("change.run-condition"),!0}z(this).prop("checked")&&z(this).is(":visible")?(z(".js-hide-on-"+t).hide(),z(".js-show-on-"+t).show().find("[data-run-js-condition]").trigger("change.run-condition")):(z(".js-hide-on-"+t).show(),z(".js-show-on-"+t).hide().find("[data-run-js-condition]").trigger("change.run-condition"))}).trigger("change.run-condition")}),z(document).find(".buddyboss_page_bp-pages .bp-admin-card").length&&z(document).on("click",".create-background-page",function(){var e=z(this).attr("data-name");z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_core_admin_create_background_page",page:e},success:function(e){e.success&&(window.location.href=e.data.url)}})}),z(".bp-search-child-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).prevAll(".bp-search-parent-field").first();t.length&&e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!0)}),z(".bp-search-parent-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).nextUntil(".bp-search-parent-field");t.length&&!e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!1)}),z(document).on("change","#bpm_blocking_member_blocking",function(){z('label[for="bpm_blocking_auto_suspend"]').toggleClass("is_disabled"),z("#bpm_blocking_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),z(document).on("change","#bb_blocking_member_reporting",function(){z('label[for="bb_reporting_auto_suspend"]').toggleClass("is_disabled"),z("#bb_reporting_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled")),z("#bb_reporting_category_description").length&&z(".wp-heading-inline").append(z("#bb_reporting_category_description")),z('body.taxonomy-bpm_category span:contains("Slug")').each(function(){z(this).parent().remove()}),z(".taxonomy-bpm_category #the-list").on("click","button.editinline",function(e){e.preventDefault();var t=z(this).closest("tr").find("td.bb_category_show_when_reporting").text();""!==t&&(z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').prop("selected",!1),z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').filter(function(){return this.text===t}).prop("selected",!0))})}),z(document).ready(function(){var e,t,i,o,n,a,s=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu #toplevel_page_buddyboss-platform ul.wp-submenu li");z("body.buddypress.post-type-bp-group-type").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-groups"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-groups"]').parent().addClass("current")),z("body.buddypress.post-type-bp-email").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-email"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-email"]').parent().addClass("current")),z("body.buddypress.post-type-topic").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-reply").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-bp-member-type").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.post-type-bp_ps_form").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-repair").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-converter").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bp-media-import").length&&(n=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(n).addClass("current"),z(n).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),(z("body.buddypress.buddyboss_page_bp-member-type-import").length||z("body.buddypress.buddyboss_page_bp-repair-community").length)&&(a=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(a).addClass("current"),z(a).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.taxonomy-bpm_category").length&&(n=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu li"),a=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform"),c=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-moderation"]'),z(n).removeClass("wp-has-current-submenu"),z(n).removeClass("wp-menu-open"),z(a).addClass("wp-has-current-submenu wp-menu-open"),z(s).removeClass("current"),z(c).addClass("current"),z(c).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-moderation"]').parent().addClass("current")),z("body .section-bp_search_settings_community").length&&(z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length&&z("#bp_search_select_all_components").prop("checked",!0),z("#bp_search_select_all_components").click(function(){var e=z("body .section-bp_search_settings_community table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_community table td input:checkbox").click(function(){z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length?z("#bp_search_select_all_components").prop("checked",!0):z("#bp_search_select_all_components").prop("checked",!1),"bp_search_topic_tax_topic-tag"===z(this).attr("id")&&!0===z(this).prop("checked")&&!1===z("#bp_search_post_type_topic").prop("checked")&&z("#bp_search_post_type_topic").prop("checked",!0),"bp_search_post_type_topic"===z(this).attr("id")&&!0!==z(this).prop("checked")&&!0===z("#bp_search_topic_tax_topic-tag").prop("checked")&&z("#bp_search_topic_tax_topic-tag").prop("checked",!1)})),z("body .section-bp_search_settings_post_types").length&&(z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length&&z("#bp_search_select_all_post_types").prop("checked",!0),z("#bp_search_select_all_post_types").click(function(){var e=z("body .section-bp_search_settings_post_types table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_post_types table td input:checkbox").click(function(){z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length?z("#bp_search_select_all_post_types").prop("checked",!0):z("#bp_search_select_all_post_types").prop("checked",!1)})),z("body .section-bp_document_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length&&z("#bp_select_extensions").prop("checked",!0),z("#bp_select_extensions").click(function(){var e=z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").click(function(){z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length?z("#bp_select_extensions").prop("checked",!0):z("#bp_select_extensions").prop("checked",!1)}),z("form").submit(function(){var e=!1;if(z('body .section-bp_document_settings_extensions table tbody tr td table tbody tr.document-extensions td [type="text"]').each(function(){""===z.trim(z(this).val())?(z(this).addClass("error"),e=!0):z(this).hasClass("error")&&z(this).removeClass("error")}),e)return!1})),z(".buddyboss_page_bp-activity").length&&z(document).on("click",".activity-attached-gif-container",function(e){e.preventDefault();var t=z(this).find("video").get(0),e=z(this).find(".gif-play-button");!0===t.paused?(t.play(),e.hide()):(t.pause(),e.show())}),z("body.buddyboss_page_bp-help").length&&(z(".bp-help-card-grid").on("click","span.open",function(){z(this).toggleClass("active"),z(this).closest(".main").find("ul:first").toggle()}),z(".bp-help-card-grid li.selected").closest("ul").show().closest("li").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid li.selected").find("ul:first").show(),z(".bp-help-card-grid li.selected").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid .sub-menu-count").each(function(){z(this).text("("+z(this).closest("li").find("ul:first li").size()+")")})),z(".buddyboss_page_bp-settings .section-bp_groups_hierarchies").length&&(document.getElementById("bp-enable-group-hierarchies").checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z(document).on("click","#bp-enable-group-hierarchies",function(){!0===this.checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():(z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z("#bp-enable-group-restrict-invites, #bp-enable-group-hide-subgroups").prop("checked",!1))}),z(document).on("click","#bp-enable-group-restrict-invites",function(){if(!0===this.checked)return!!confirm(BP_ADMIN.group.restrict_invites_confirm_message)})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-headers-elements .bb-group-headers-element-group-type").show():z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-headers-elements .bb-group-headers-element-group-type").show(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!0)):(z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-cover-image-uploads").checked?z(".bb-group-elements .bb-group-element-cover-images").show():z(".bb-group-elements .bb-group-element-cover-images").hide(),z(document).on("click","#bp-disable-group-cover-image-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-cover-images").show(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-cover-images").hide(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-avatar-uploads").checked?z(".bb-group-elements .bb-group-element-avatars").show():z(".bb-group-elements .bb-group-element-avatars").hide(),z(document).on("click","#bp-disable-group-avatar-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-avatars").show(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-avatars").hide(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups_types").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-elements .bb-group-element-group-type").show():z(".bb-group-elements .bb-group-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-group-type").show(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-group-type").hide(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").length&&(z(".bp-feed-post-type-checkbox").each(function(){var e=z(this).data("post_type");!0===this.checked&&z(".bp-feed-post-type-comment-"+e).closest("tr").show()}),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").on("click",".bp-feed-post-type-checkbox",function(){var e=z(this).data("post_type"),e=z(".bp-feed-post-type-comment-"+e);!0===this.checked?e.closest("tr").show():e.prop("checked",!1).closest("tr").hide()})),z("#bp_media_profile_media_support").change(function(){this.checked?z("#bp_media_profile_albums_support").prop("disabled",!1):(z("#bp_media_profile_albums_support").prop("disabled",!0),z("#bp_media_profile_albums_support").attr("checked",!1))}),z("#bp_media_group_media_support").change(function(){this.checked?z("#bp_media_group_albums_support").prop("disabled",!1):(z("#bp_media_group_albums_support").prop("disabled",!0),z("#bp_media_group_albums_support").attr("checked",!1))}),z("body .section-bp_video_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z(".video-extensions-listing #bp_select_extensions").click(function(){var e=z("body .section-bp_video_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)})),z(".buddyboss_page_bp-tools .section-default_data").length&&(jQuery(".bp-admin-form .checkbox").click(function(){"import-f-replies"===jQuery(this).attr("id")&&jQuery("#import-f-topics").prop("checked",!0),"import-f-topics"===jQuery(this).attr("id")&&jQuery("#import-f-replies").prop("checked",!1),"checked"!==jQuery(this).attr("checked")||jQuery(this).closest("li.main").find(".main-header").attr("disabled")||jQuery(this).closest("li.main").find(".main-header").prop("checked",!0)}),jQuery(".bp-admin-form #import-groups, .bp-admin-form #import-users, .bp-admin-form #import-forums").click(function(){"checked"!==jQuery(this).attr("checked")&&jQuery(this).closest("li").find("ul .checkbox").prop("checked",!1)}),jQuery(".bp-admin-form #bp-admin-submit").click(function(){return!!confirm(BP_ADMIN.tools.default_data.submit_button_message)}),jQuery(".bp-admin-form #bp-admin-clear").click(function(){return!!confirm(BP_ADMIN.tools.default_data.clear_button_message)}));setTimeout(function(){z('iframe[src*="youtube"], iframe[src*="vimeo"]').parent().fitVids()},300);function r(){z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_media_import_status_request"},success:function(e){var t,i,o,n,a;void 0!==e.success&&void 0!==e.data?(t=e.data.total_media,i=e.data.total_albums,o=e.data.albums_done,n=e.data.media_done,a=e.data.import_status,z("#bp-media-import-albums-total").text(i),z("#bp-media-import-media-total").text(t),z("#bp-media-import-albums-done").text(o),z("#bp-media-import-media-done").text(n),"reset_albums"==a||"reset_media"==a||"reset_forum"==a||"reset_topic"==a||"reset_reply"==a||"reset_options"==a?z("#bp-media-resetting").show():z("#bp-media-resetting").hide(),"done"==a&&i==o&&t==n?(z("#bp-media-import-msg").text(e.data.success_msg),z("#bp-media-import-submit").show()):r()):z("#bp-media-import-msg").text(e.data.error_msg)},error:function(){}})}var p,c,d;z("#bp-media-import-updating").length&&r(),z(".display-options:not(.button)").length&&(p=z(".display-options:not(.button)"),c=z("select[name=bp-display-name-format]"),d=c.val(),z(p).each(function(){z(this).hide()}),"first_name"===d?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide()),z(c).change(function(){z(p).each(function(){z(this).hide()}),"first_name"===(d=z(this).val())?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide())}));var l,u=z(".profile-layout-options");u.length&&(f=z("select[name=bp-profile-layout-format]"),l=f.val(),z(u).each(function(){z(this).hide()}),"list_grid"===l?z(".profile-default-layout").show():z(".profile-default-layout").hide(),z(f).change(function(){z(u).each(function(){z(this).hide()}),"list_grid"===(l=z(this).val())?z(".profile-default-layout").show():z(".profile-default-layout").hide()}),function(){for(var e=document.cookie.split(";"),t={},i=0;i'),z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_repair_tools_wrapper_function",type:F[t],offset:e,nonce:z('body .section-repair_community .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){if(void 0!==e.success){if(!e.success||void 0===e.data)return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1;"running"===e.data.status?(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z(".section-repair_community .settings fieldset").append('"),void 0!==e.data.records&&""!==e.data.records&&(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")),t+=1),m(e.data.offset,t),F.length===t&&z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn")}},error:function(){return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-submit",function(e){e.preventDefault(),F=[],setTimeout(function(){z("body .section-repair_community .settings fieldset .updated").remove()},500),z.each(z('.section-repair_community .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){F.push(z(this).val())}),F.length&&(z("body .section-repair_community .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_community .settings fieldset .checkbox code").remove(),m(0,0))})),z("#bb-giphy-connect").length&&z(document).on("click","#bb-giphy-connect",function(e){return e.preventDefault(),z("#bb-giphy-connect").data("connected")?(z("#bb-giphy-connect").data("connected",!1),z("#bb-giphy-connect").addClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!1),z("#bp_media_gif_api_key").val(""),z("#bp_media_profiles_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_groups_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_messages_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_forums_gif_support").attr("disabled",!0).attr("checked",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("connect-text")),!1):(z("#bb-giphy-connect").addClass("disable-btn"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice").addClass("hidden"),void z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bb_admin_check_valid_giphy_key",key:z("#bp_media_gif_api_key").val(),nonce:z("#bb-giphy-connect").data("nonce")},success:function(e){e.data.code&&200===e.data.code?(z("#bb-giphy-connect").data("connected",!0),z("#bb-giphy-connect").removeClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!0),z("#bp_media_profiles_gif_support").attr("disabled",!1),z("#bp_media_groups_gif_support").attr("disabled",!1),z("#bp_media_messages_gif_support").attr("disabled",!1),z("#bp_media_forums_gif_support").attr("disabled",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("disconnect-text"))):(z("#bp_media_settings_gifs .bp-new-notice-panel-notice").removeClass("hidden"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_code").html(e.data.code),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_message").html(e.data.message))},error:function(){z("#bb-giphy-connect").removeClass("disable-btn")}}))}),z("#bp-tools-forum-submit").length&&(h=function(e,t){z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(''),void 0!==G[t]&&z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_forum_repair_tools_wrapper_function",type:G[t],offset:e,site_id:z("body .section-repair_forums #bbp-network-site").val(),nonce:z('body .section-repair_forums .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){void 0!==e.success&&void 0!==e.data&&("running"===e.data.status?(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] code').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),0===e.data.status?z(".section-repair_forums .settings fieldset").append('"):z(".section-repair_forums .settings fieldset").append('"),t+=1),h(e.data.offset,t),G.length===t&&z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"))},error:function(){return z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-forum-submit",function(e){e.preventDefault(),G=[];e=z("body .section-repair_forums #bbp-network-site");if(e.length&&"0"===e.val())return alert(BP_ADMIN.tools.repair_forums.validate_site_id_message),!1;setTimeout(function(){z("body .section-repair_forums .settings fieldset .updated").remove()},500),z.each(z('.section-repair_forums .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){G.push(z(this).val())}),G.length&&(z("body .section-repair_forums .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_forums .settings fieldset .checkbox code").remove(),h(1,0))}));var f=z("#allow-custom-registration");f.length&&(0===parseInt(f.val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show()),z(f).change(function(){0===parseInt(z(this).val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show(),z(".registration-form-main-select p.description").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show(),z(".registration-form-main-select p.description").hide())}));var v,y=z("#bp-profile-avatar-type"),w=z("input[type=radio][name=bp-default-profile-avatar-type]"),k=(z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),z(".default-profile-avatar-type")),x=z(".default-profile-avatar-custom"),C=z(".enable-profile-gravatar-field"),D=z(".bb-wordpress-profile-gravatar-warning"),B=z(".preview-avatar-cover-image"),I=B.find(".web-preview-wrap"),P=B.find(".app-preview-wrap");y.length&&z(y).change(function(){k.addClass("bp-hide"),x.addClass("bp-hide"),D.addClass("bp-hide"),C.addClass("bp-hide");var e="",t=I.find(".preview-item-avatar img");B.find(".preview_avatar_cover").removeClass("has-avatar"),"BuddyBoss"===z(this).val()?(C.removeClass("bp-hide"),k.removeClass("bp-hide"),v=z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),e=z("."+v+"-profile-avatar").prop("src"),"custom"===v&&(x.removeClass("bp-hide"),void 0!==(e=z("#bp-default-user-custom-avatar").val()).length&&0==e.length&&(e=t.attr("data-blank-avatar")))):"WordPress"===z(this).val()&&(BP_ADMIN.avatar_settings.wordpress_show_avatar||D.removeClass("bp-hide"),e=t.attr("data-wordpress-avatar")),void 0!==e.length&&0'+t+"")}),z(this).closest("td").find("select.extension-icon").parent().append('"),e=z(this).closest("td").find(".extension-icon").val(),t=z(this).closest("td").find(".extension-icon option:selected").text(),z(this).closest("td").find(".icon-select-main .icon-select-button").html(''+t+""))})}z("#bp_member_avatar_settings .image-width-height").length&&(T=z("select#bb-cover-profile-width").find("option:selected").val(),E=z("select#bb-cover-profile-height").find("option:selected").val(),z("#bp_member_avatar_settings").on("change","select#bb-cover-profile-width, select#bb-cover-profile-height",function(e){e.preventDefault(),U=!0,("bb-cover-profile-width"===z(this).attr("id")&&T===z(this).val()||"bb-cover-profile-height"===z(this).attr("id")&&E===z(this).val())&&(U=!1),"bb-cover-profile-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("#bp_groups_avatar_settings .image-width-height").length&&(Q=z("select#bb-cover-group-width").find("option:selected").val(),S=z("select#bb-cover-group-height").find("option:selected").val(),z("#bp_groups_avatar_settings").on("change","select#bb-cover-group-width, select#bb-cover-group-height",function(e){e.preventDefault(),U=!0,("bb-cover-group-width"===z(this).attr("id")&&Q===z(this).val()||"bb-cover-group-height"===z(this).attr("id")&&S===z(this).val())&&(U=!1),"bb-cover-group-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("body.buddyboss_page_bp-settings").on("click",'input[name="submit"]',function(e){if(U&&(z("#bp_member_avatar_settings").length||z("#bp_groups_avatar_settings").length)){var t=BP_ADMIN.cover_size_alert.profile;return z("#bp_groups_avatar_settings").length&&(t=BP_ADMIN.cover_size_alert.group),!!confirm(t)||(e.preventDefault(),!1)}return!0}),z(".preview-switcher .button").on("click",function(e){e.preventDefault();e=z(this).attr("href");z(this).closest(".preview-switcher-main").find(".preview-block.active").removeClass("active"),z(e).addClass("active"),z(this).addClass("button-primary").siblings().removeClass("button-primary")}),z('.profile-header-style input[type="radio"], .group-header-style input[type="radio"]').on("change",function(){z(".web-preview-wrap .preview-item-avatar").removeClass("left-image").removeClass("centered-image").addClass(z(this).val()+"-image")}),z("#bp_profile_list_settings").on("change",'.member-directory-profile-actions input[type="checkbox"]',function(){var i=[],o=[],n=BP_ADMIN.member_directories.profile_action_btn;z('.member-directory-profile-actions input[type="checkbox"]:checked').each(function(e,t){i.push(t.value),o.push(BP_ADMIN.member_directories.profile_actions.filter(function(e){return e.element_name===t.value}))}),z(".member-directory-profile-primary-action select").find("option:not(:first)").remove(),z.each(o,function(e,t){var i;void 0!==t[0]&&void 0!==t[0].element_name&&void 0!==t[0].element_label&&(i=!1,n===t[0].element_name&&(i=!0),z(".member-directory-profile-primary-action select").append(z("").attr("value",t[0].element_name).text(t[0].element_label).attr("selected",i)))}),0===i.length?(z(".member-directory-profile-primary-action").addClass("bp-hide"),z(".member-directory-profile-primary-action select").find("option:eq(0)").prop("selected",!0)):z(".member-directory-profile-primary-action").removeClass("bp-hide")}),z(document).on("click","table.extension-listing #btn-add-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_document_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_document_extensions_support["+i+"][extension]"),z(this).find("select.extension-icon").attr("name","bp_document_extensions_support["+i+"][icon]"),z(this).find("select.extension-icon").attr("data-name","bp_document_extensions_support["+i+"][icon]"),z(this).find("input.extension-mime").attr("name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_document_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_document_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_document_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),z(document).on("click","table.extension-listing #btn-add-video-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-mime").attr("name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_video_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_video_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_video_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),q(),z(document).on("click",".custom-extension-list-select li",function(){var e=z(this).find("i").attr("class"),t=''+this.innerText+"";z(this).closest("td").find(".icon-select-main .icon-select-button").html(t),z(this).closest("td").find(".icon-select-main .custom-extension-list").toggle(),z(this).closest("td").find('select.extension-icon option[value="'+e+'"]').attr("selected","selected"),z(this).closest(".icon-select-main").siblings(".bb-icon").length&&z(this).closest(".icon-select-main").siblings(".bb-icon").attr("class","bb-icon "+e)}),z(document).on("click",".icon-select-main .icon-select-button",function(){z(this).siblings(".custom-extension-list").toggle()}),z(document).on("click","table.extension-listing #btn-remove-extensions",function(){var e=z(this).closest("table.extension-listing");z(this).closest("tr").remove();var t=parseInt(z(".extension-listing tr.extra-extension").length),t=1,i="bp_document";0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.querySelector("#bp-hello-container:not(.bb-onload-modal)");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),document.addEventListener("click",function(e){var t=document.getElementById("bp-hello-backdrop");t&&document.getElementById("bp-hello-container")&&(t=t.contains(e.target),(e.target.classList.contains("close-modal")||t)&&(z(e.target).closest("#bp-hello-container").hide(),z(document).find("#bp-document-file-input").val(""),z(document).find(".show-document-mime-type").hide(),z(document).find(".show-document-mime-type input#mime-type").val("")))},!1),z(document).on("click",".bp-show-moderation-alert",function(){var e=z(this).attr("data-action");z("#bp-hello-backdrop").show(),z("#bp-hello-container").find(".bp-spam-action-msg").hide(),z("#bp-hello-container").find(".bp-not-spam-action-msg").hide(),"spam"===e?z("#bp-hello-container").find(".bp-spam-action-msg").show():"not-spam"===e&&z("#bp-hello-container").find(".bp-not-spam-action-msg").show(),z("#bp-hello-container").show().addClass("deactivation-popup")}),z(document).on("click",".bp-show-deactivate-popup a",function(e){e.preventDefault(),z("#bp-hello-container").find(".bp-hello-content").empty(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").attr("data-redirect",z(this).attr("href")),z("#bp-hello-container").find(".bp-hello-content").append(z(this).parent().closest(".row-actions").find(".component-deactivate-msg").text())}),z(document).on("click",".close-modal",function(){z("#bp-hello-backdrop").hide(),z("#bp-hello-container").hide().removeClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").removeClass("form-submit")}),z(document).on("click",".component-deactivate",function(e){e.preventDefault(),z(this).hasClass("form-submit")?z("form#bp-admin-component-form").find('input[name="bp-admin-component-submit"]').trigger("click"):window.location=z(this).attr("data-redirect")}),z("form#bp-admin-component-form").submit(function(e){var t=(t=z('#bulk-action-selector-top[name="action"]').find(":selected").val())||z('#bulk-action-selector-top[name="action2"]').find(":selected").val(),i=!1,o="";z(".mass-check-deactivate").each(function(){1==z(this).prop("checked")&&(i=!0),o+=z(this).parent().find(".component-deactivate-msg").text()}),z("#bp-hello-container").find(".component-deactivate").hasClass("form-submit")||"inactive"!==t||!0!==i||(z("#bp-hello-container").find(".bp-hello-content").empty(),o&&(e.preventDefault(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".bp-hello-content").html(o),z("#bp-hello-container").find(".component-deactivate").addClass("form-submit")))}),z(document).on("change","#bp_moderation_settings_reporting .bpm_reporting_content_content_label > input",function(){z(this).prop("checked")?z(this).parent().next("label").removeClass("is_disabled").find('input[type="checkbox"]').prop("disabled",!1):z(this).parent().next("label").addClass("is_disabled").find('input[type="checkbox"]').removeProp("checked").removeAttr("checked").prop("disabled","disabled"),z('label[for="bpm_reporting_email_notification"]').removeClass("is_disabled"),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled"))}),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled")),z(document).on("click",".bp-suspend-user, .bp-unsuspend-user",function(){var e=z(this).attr("data-action");return"suspend"===e?confirm(BP_ADMIN.moderation.suspend_confirm_message):"unsuspend"===e?confirm(BP_ADMIN.moderation.unsuspend_confirm_message):void 0}),z(document).on("click",".notification-defaults",function(){z(this).next(".manage-defaults").hasClass("manage-defaults-hide")?z(this).next(".manage-defaults").removeClass("manage-defaults-hide"):z(this).next(".manage-defaults").addClass("manage-defaults-hide")}),z(document).on("click",".bb-notification-checkbox",function(){!1===z(this).prop("checked")?z(this).parents(".field-block").find(".manage-defaults .field-wrap").addClass("disabled"):z(this).parents(".field-block").find(".manage-defaults .field-wrap").removeClass("disabled")}),void 0===BP_ADMIN.post_type||"object"!=typeof jQuery.wp||"function"!=typeof jQuery.wp.wpColorPicker||(L=BP_ADMIN.post_type)&&(z("#"+L+"-label-background-color").length&&z("#"+L+"-label-background-color").wpColorPicker(),z("#"+L+"-label-text-color").length&&z("#"+L+"-label-text-color").wpColorPicker(),z("#"+L+"-label-color-type").length&&z(document).on("change","#"+L+"-label-color-type",function(e){e.preventDefault(),"default"===z(this).val()?z("#"+L+"-color-settings").hide():z("#"+L+"-color-settings").show()}),z(".wp-picker-input-wrap .wp-picker-clear").click(function(e){e.preventDefault();var t=z(this).closest("span").find(".wp-color-picker").attr("id");L+"-label-background-color"!==t||(e=void 0!==BP_ADMIN.background_color?BP_ADMIN.background_color:"")&&(z("#"+L+"-label-background-color").val(e),z("#"+L+"-background-color-colorpicker .wp-color-result").css("background-color",e)),L+"-label-text-color"!==t||(t=void 0!==BP_ADMIN.color?BP_ADMIN.color:"")&&(z("#"+L+"-label-text-color").val(t),z("#"+L+"-text-color-colorpicker .wp-color-result").css("background-color",t))})),z(document).on("click",".bb-hide-pw",function(e){e.preventDefault();var t=z(this),i=t.closest(".password-toggle").find("input"),e=i.data("type")?i.data("type"):"text";t.toggleClass("bb-show-pass"),t.hasClass("bb-show-pass")?i.attr("type",e):i.attr("type","password")}),void 0!==z.fn.select2&&(0 '+e.replace(o,i)+" "),t.prev(".registration-restrictions-lastindex").val(i),n()}),z(document).on("click",".registration-restrictions-listing .registration-restrictions-rule-remove",function(e){e.preventDefault();var t=z(e.currentTarget),i=t.parents(".bb-domain-restrictions-listing"),e=parseInt(t.prev(".registration-restrictions-lastindex").val())-1;t.closest(".registration-restrictions-rule").hasClass("custom")||(t.closest(".registration-restrictions-rule").remove(),t.parents(".registration-restrictions-listing").find(".registration-restrictions-lastindex").val(e)),void 0!==i&&0";z("#bb-domain-restrictions-setting").children(".restrictions-error").append(i)}0";z("#bb-email-restrictions-setting").children(".restrictions-error").append(t)}0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.getElementById("bp-hello-container");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),"yes"===z.bbGetParameterByName("popup")&&z(".btn-open-missing-email").trigger("click"),"bpmissingemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-missing-emails").offset().top},1500),z(".label-bp-missing-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-missing-emails").css("background-color","transparent")},1500)),"bpreinstallemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-reinstall-emails").offset().top},1500),z(".label-bp-reinstall-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-reinstall-emails").css("background-color","transparent")},1500)),z("[data-run-js-condition]").each(function(){var t=z(this).data("run-js-condition"),i=z(this).prop("tagName");z(this).on("change.run-condition",function(){if("SELECT"===i&&z(this).is(":visible")){var e=t+"-"+z(this).val();return z('[class*="js-show-on-'+t+'-"]:not(.js-show-on-'+e+")").hide(),z(".js-show-on-"+e).show().find("[data-run-js-condition]").trigger("change.run-condition"),!0}z(this).prop("checked")&&z(this).is(":visible")?(z(".js-hide-on-"+t).hide(),z(".js-show-on-"+t).show().find("[data-run-js-condition]").trigger("change.run-condition")):(z(".js-hide-on-"+t).show(),z(".js-show-on-"+t).hide().find("[data-run-js-condition]").trigger("change.run-condition"))}).trigger("change.run-condition")}),z(document).find(".buddyboss_page_bp-pages .bp-admin-card").length&&z(document).on("click",".create-background-page",function(){var e=z(this).attr("data-name");z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_core_admin_create_background_page",page:e},success:function(e){e.success&&(window.location.href=e.data.url)}})}),z(".bp-search-child-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).prevAll(".bp-search-parent-field").first();t.length&&e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!0)}),z(".bp-search-parent-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).nextUntil(".bp-search-parent-field");t.length&&!e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!1)}),z(document).on("change","#bpm_blocking_member_blocking",function(){z('label[for="bpm_blocking_auto_suspend"]').toggleClass("is_disabled"),z("#bpm_blocking_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),z(document).on("change","#bb_blocking_member_reporting",function(){z('label[for="bb_reporting_auto_suspend"]').toggleClass("is_disabled"),z("#bb_reporting_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled")),z("#bb_reporting_category_description").length&&z(".wp-heading-inline").append(z("#bb_reporting_category_description")),z('body.taxonomy-bpm_category span:contains("Slug")').each(function(){z(this).parent().remove()}),z(".taxonomy-bpm_category #the-list").on("click","button.editinline",function(e){e.preventDefault();var t=z(this).closest("tr").find("td.bb_category_show_when_reporting").text();""!==t&&(z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').prop("selected",!1),z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').filter(function(){return this.text===t}).prop("selected",!0))})}),z(document).ready(function(){var e,t,i,o,n,a,s=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu #toplevel_page_buddyboss-platform ul.wp-submenu li");z("body.buddypress.post-type-bp-group-type").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-groups"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-groups"]').parent().addClass("current")),z("body.buddypress.post-type-bp-email").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-email"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-email"]').parent().addClass("current")),z("body.buddypress.post-type-topic").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-reply").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-bp-member-type").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.post-type-bp_ps_form").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-repair").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-converter").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bp-media-import").length&&(n=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(n).addClass("current"),z(n).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),(z("body.buddypress.buddyboss_page_bp-member-type-import").length||z("body.buddypress.buddyboss_page_bp-repair-community").length)&&(a=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(a).addClass("current"),z(a).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.taxonomy-bpm_category").length&&(n=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu li"),a=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform"),c=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-moderation"]'),z(n).removeClass("wp-has-current-submenu"),z(n).removeClass("wp-menu-open"),z(a).addClass("wp-has-current-submenu wp-menu-open"),z(s).removeClass("current"),z(c).addClass("current"),z(c).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-moderation"]').parent().addClass("current")),z("body .section-bp_search_settings_community").length&&(z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length&&z("#bp_search_select_all_components").prop("checked",!0),z("#bp_search_select_all_components").click(function(){var e=z("body .section-bp_search_settings_community table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_community table td input:checkbox").click(function(){z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length?z("#bp_search_select_all_components").prop("checked",!0):z("#bp_search_select_all_components").prop("checked",!1),"bp_search_topic_tax_topic-tag"===z(this).attr("id")&&!0===z(this).prop("checked")&&!1===z("#bp_search_post_type_topic").prop("checked")&&z("#bp_search_post_type_topic").prop("checked",!0),"bp_search_post_type_topic"===z(this).attr("id")&&!0!==z(this).prop("checked")&&!0===z("#bp_search_topic_tax_topic-tag").prop("checked")&&z("#bp_search_topic_tax_topic-tag").prop("checked",!1)})),z("body .section-bp_search_settings_post_types").length&&(z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length&&z("#bp_search_select_all_post_types").prop("checked",!0),z("#bp_search_select_all_post_types").click(function(){var e=z("body .section-bp_search_settings_post_types table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_post_types table td input:checkbox").click(function(){z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length?z("#bp_search_select_all_post_types").prop("checked",!0):z("#bp_search_select_all_post_types").prop("checked",!1)})),z("body .section-bp_document_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length&&z("#bp_select_extensions").prop("checked",!0),z("#bp_select_extensions").click(function(){var e=z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").click(function(){z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length?z("#bp_select_extensions").prop("checked",!0):z("#bp_select_extensions").prop("checked",!1)}),z("form").submit(function(){var e=!1;if(z('body .section-bp_document_settings_extensions table tbody tr td table tbody tr.document-extensions td [type="text"]').each(function(){""===z.trim(z(this).val())?(z(this).addClass("error"),e=!0):z(this).hasClass("error")&&z(this).removeClass("error")}),e)return!1})),z(".buddyboss_page_bp-activity").length&&z(document).on("click",".activity-attached-gif-container",function(e){e.preventDefault();var t=z(this).find("video").get(0),e=z(this).find(".gif-play-button");!0===t.paused?(t.play(),e.hide()):(t.pause(),e.show())}),z("body.buddyboss_page_bp-help").length&&(z(".bp-help-card-grid").on("click","span.open",function(){z(this).toggleClass("active"),z(this).closest(".main").find("ul:first").toggle()}),z(".bp-help-card-grid li.selected").closest("ul").show().closest("li").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid li.selected").find("ul:first").show(),z(".bp-help-card-grid li.selected").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid .sub-menu-count").each(function(){z(this).text("("+z(this).closest("li").find("ul:first li").size()+")")})),z(".buddyboss_page_bp-settings .section-bp_groups_hierarchies").length&&(document.getElementById("bp-enable-group-hierarchies").checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z(document).on("click","#bp-enable-group-hierarchies",function(){!0===this.checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():(z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z("#bp-enable-group-restrict-invites, #bp-enable-group-hide-subgroups").prop("checked",!1))}),z(document).on("click","#bp-enable-group-restrict-invites",function(){if(!0===this.checked)return!!confirm(BP_ADMIN.group.restrict_invites_confirm_message)})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-headers-elements .bb-group-headers-element-group-type").show():z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-headers-elements .bb-group-headers-element-group-type").show(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!0)):(z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-cover-image-uploads").checked?z(".bb-group-elements .bb-group-element-cover-images").show():z(".bb-group-elements .bb-group-element-cover-images").hide(),z(document).on("click","#bp-disable-group-cover-image-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-cover-images").show(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-cover-images").hide(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-avatar-uploads").checked?z(".bb-group-elements .bb-group-element-avatars").show():z(".bb-group-elements .bb-group-element-avatars").hide(),z(document).on("click","#bp-disable-group-avatar-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-avatars").show(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-avatars").hide(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups_types").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-elements .bb-group-element-group-type").show():z(".bb-group-elements .bb-group-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-group-type").show(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-group-type").hide(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").length&&(z(".bp-feed-post-type-checkbox").each(function(){var e=z(this).data("post_type");!0===this.checked&&z(".bp-feed-post-type-comment-"+e).closest("tr").show()}),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").on("click",".bp-feed-post-type-checkbox",function(){var e=z(this).data("post_type"),e=z(".bp-feed-post-type-comment-"+e);!0===this.checked?e.closest("tr").show():e.prop("checked",!1).closest("tr").hide()})),z("#bp_media_profile_media_support").change(function(){this.checked?z("#bp_media_profile_albums_support").prop("disabled",!1):(z("#bp_media_profile_albums_support").prop("disabled",!0),z("#bp_media_profile_albums_support").attr("checked",!1))}),z("#bp_media_group_media_support").change(function(){this.checked?z("#bp_media_group_albums_support").prop("disabled",!1):(z("#bp_media_group_albums_support").prop("disabled",!0),z("#bp_media_group_albums_support").attr("checked",!1))}),z("body .section-bp_video_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z(".video-extensions-listing #bp_select_extensions").click(function(){var e=z("body .section-bp_video_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)})),z(".buddyboss_page_bp-tools .section-default_data").length&&(jQuery(".bp-admin-form .checkbox").click(function(){"import-f-replies"===jQuery(this).attr("id")&&jQuery("#import-f-topics").prop("checked",!0),"import-f-topics"===jQuery(this).attr("id")&&jQuery("#import-f-replies").prop("checked",!1),"checked"!==jQuery(this).attr("checked")||jQuery(this).closest("li.main").find(".main-header").attr("disabled")||jQuery(this).closest("li.main").find(".main-header").prop("checked",!0)}),jQuery(".bp-admin-form #import-groups, .bp-admin-form #import-users, .bp-admin-form #import-forums").click(function(){"checked"!==jQuery(this).attr("checked")&&jQuery(this).closest("li").find("ul .checkbox").prop("checked",!1)}),jQuery(".bp-admin-form #bp-admin-submit").click(function(){return!!confirm(BP_ADMIN.tools.default_data.submit_button_message)}),jQuery(".bp-admin-form #bp-admin-clear").click(function(){return!!confirm(BP_ADMIN.tools.default_data.clear_button_message)}));setTimeout(function(){z('iframe[src*="youtube"], iframe[src*="vimeo"]').parent().fitVids()},300);function r(){z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_media_import_status_request"},success:function(e){var t,i,o,n,a;void 0!==e.success&&void 0!==e.data?(t=e.data.total_media,i=e.data.total_albums,o=e.data.albums_done,n=e.data.media_done,a=e.data.import_status,z("#bp-media-import-albums-total").text(i),z("#bp-media-import-media-total").text(t),z("#bp-media-import-albums-done").text(o),z("#bp-media-import-media-done").text(n),"reset_albums"==a||"reset_media"==a||"reset_forum"==a||"reset_topic"==a||"reset_reply"==a||"reset_options"==a?z("#bp-media-resetting").show():z("#bp-media-resetting").hide(),"done"==a&&i==o&&t==n?(z("#bp-media-import-msg").text(e.data.success_msg),z("#bp-media-import-submit").show()):r()):z("#bp-media-import-msg").text(e.data.error_msg)},error:function(){}})}var p,c,d;z("#bp-media-import-updating").length&&r(),z(".display-options:not(.button)").length&&(p=z(".display-options:not(.button)"),c=z("select[name=bp-display-name-format]"),d=c.val(),z(p).each(function(){z(this).hide()}),"first_name"===d?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide()),z(c).change(function(){z(p).each(function(){z(this).hide()}),"first_name"===(d=z(this).val())?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide())}));var l,u=z(".profile-layout-options");u.length&&(f=z("select[name=bp-profile-layout-format]"),l=f.val(),z(u).each(function(){z(this).hide()}),"list_grid"===l?z(".profile-default-layout").show():z(".profile-default-layout").hide(),z(f).change(function(){z(u).each(function(){z(this).hide()}),"list_grid"===(l=z(this).val())?z(".profile-default-layout").show():z(".profile-default-layout").hide()}),function(){for(var e=document.cookie.split(";"),t={},i=0;i'),z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_repair_tools_wrapper_function",type:F[t],offset:e,nonce:z('body .section-repair_community .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){if(void 0!==e.success){if(!e.success||void 0===e.data)return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1;"running"===e.data.status?(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z(".section-repair_community .settings fieldset").append('"),void 0!==e.data.records&&""!==e.data.records&&(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")),t+=1),m(e.data.offset,t),F.length===t&&z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn")}},error:function(){return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-submit",function(e){e.preventDefault(),F=[],setTimeout(function(){z("body .section-repair_community .settings fieldset .updated").remove()},500),z.each(z('.section-repair_community .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){F.push(z(this).val())}),F.length&&(z("body .section-repair_community .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_community .settings fieldset .checkbox code").remove(),m(0,0))})),z("#bb-giphy-connect").length&&z(document).on("click","#bb-giphy-connect",function(e){return e.preventDefault(),z("#bb-giphy-connect").data("connected")?(z("#bb-giphy-connect").data("connected",!1),z("#bb-giphy-connect").addClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!1),z("#bp_media_gif_api_key").val(""),z("#bp_media_profiles_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_groups_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_messages_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_forums_gif_support").attr("disabled",!0).attr("checked",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("connect-text")),!1):(z("#bb-giphy-connect").addClass("disable-btn"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice").addClass("hidden"),void z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bb_admin_check_valid_giphy_key",key:z("#bp_media_gif_api_key").val(),nonce:z("#bb-giphy-connect").data("nonce")},success:function(e){e.data.code&&200===e.data.code?(z("#bb-giphy-connect").data("connected",!0),z("#bb-giphy-connect").removeClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!0),z("#bp_media_profiles_gif_support").attr("disabled",!1),z("#bp_media_groups_gif_support").attr("disabled",!1),z("#bp_media_messages_gif_support").attr("disabled",!1),z("#bp_media_forums_gif_support").attr("disabled",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("disconnect-text"))):(z("#bp_media_settings_gifs .bp-new-notice-panel-notice").removeClass("hidden"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_code").html(e.data.code),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_message").html(e.data.message))},error:function(){z("#bb-giphy-connect").removeClass("disable-btn")}}))}),z("#bp-tools-forum-submit").length&&(h=function(e,t){z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(''),void 0!==G[t]&&z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_forum_repair_tools_wrapper_function",type:G[t],offset:e,site_id:z("body .section-repair_forums #bbp-network-site").val(),nonce:z('body .section-repair_forums .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){void 0!==e.success&&void 0!==e.data&&("running"===e.data.status?(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] code').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),0===e.data.status?z(".section-repair_forums .settings fieldset").append('"):z(".section-repair_forums .settings fieldset").append('"),t+=1),h(e.data.offset,t),G.length===t&&z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"))},error:function(){return z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-forum-submit",function(e){e.preventDefault(),G=[];e=z("body .section-repair_forums #bbp-network-site");if(e.length&&"0"===e.val())return alert(BP_ADMIN.tools.repair_forums.validate_site_id_message),!1;setTimeout(function(){z("body .section-repair_forums .settings fieldset .updated").remove()},500),z.each(z('.section-repair_forums .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){G.push(z(this).val())}),G.length&&(z("body .section-repair_forums .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_forums .settings fieldset .checkbox code").remove(),h(1,0))}));var f=z("#allow-custom-registration");f.length&&(0===parseInt(f.val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show()),z(f).change(function(){0===parseInt(z(this).val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show(),z(".registration-form-main-select p.description").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show(),z(".registration-form-main-select p.description").hide())}));var v,y=z("#bp-profile-avatar-type"),w=z("input[type=radio][name=bp-default-profile-avatar-type]"),k=(z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),z(".default-profile-avatar-type")),x=z(".default-profile-avatar-custom"),C=z(".enable-profile-gravatar-field"),D=z(".bb-wordpress-profile-gravatar-warning"),B=z(".preview-avatar-cover-image"),I=B.find(".web-preview-wrap"),P=B.find(".app-preview-wrap");y.length&&z(y).change(function(){k.addClass("bp-hide"),x.addClass("bp-hide"),D.addClass("bp-hide"),C.addClass("bp-hide");var e="",t=I.find(".preview-item-avatar img");B.find(".preview_avatar_cover").removeClass("has-avatar"),"BuddyBoss"===z(this).val()?(C.removeClass("bp-hide"),k.removeClass("bp-hide"),v=z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),e=z("."+v+"-profile-avatar").prop("src"),"custom"===v&&(x.removeClass("bp-hide"),void 0!==(e=z("#bp-default-user-custom-avatar").val()).length&&0==e.length&&(e=t.attr("data-blank-avatar")))):"WordPress"===z(this).val()&&(BP_ADMIN.avatar_settings.wordpress_show_avatar||D.removeClass("bp-hide"),e=t.attr("data-wordpress-avatar")),void 0!==e.length&&0'+t+"")}),z(this).closest("td").find("select.extension-icon").parent().append('"),e=z(this).closest("td").find(".extension-icon").val(),t=z(this).closest("td").find(".extension-icon option:selected").text(),z(this).closest("td").find(".icon-select-main .icon-select-button").html(''+t+""))})}z("#bp_member_avatar_settings .image-width-height").length&&(T=z("select#bb-cover-profile-width").find("option:selected").val(),E=z("select#bb-cover-profile-height").find("option:selected").val(),z("#bp_member_avatar_settings").on("change","select#bb-cover-profile-width, select#bb-cover-profile-height",function(e){e.preventDefault(),U=!0,("bb-cover-profile-width"===z(this).attr("id")&&T===z(this).val()||"bb-cover-profile-height"===z(this).attr("id")&&E===z(this).val())&&(U=!1),"bb-cover-profile-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("#bp_groups_avatar_settings .image-width-height").length&&(Q=z("select#bb-cover-group-width").find("option:selected").val(),S=z("select#bb-cover-group-height").find("option:selected").val(),z("#bp_groups_avatar_settings").on("change","select#bb-cover-group-width, select#bb-cover-group-height",function(e){e.preventDefault(),U=!0,("bb-cover-group-width"===z(this).attr("id")&&Q===z(this).val()||"bb-cover-group-height"===z(this).attr("id")&&S===z(this).val())&&(U=!1),"bb-cover-group-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("body.buddyboss_page_bp-settings").on("click",'input[name="submit"]',function(e){if(U&&(z("#bp_member_avatar_settings").length||z("#bp_groups_avatar_settings").length)){var t=BP_ADMIN.cover_size_alert.profile;return z("#bp_groups_avatar_settings").length&&(t=BP_ADMIN.cover_size_alert.group),!!confirm(t)||(e.preventDefault(),!1)}return!0}),z('.profile-header-style input[type="radio"], .group-header-style input[type="radio"]').on("change",function(){z(".web-preview-wrap .preview-item-avatar").removeClass("left-image").removeClass("centered-image").addClass(z(this).val()+"-image")}),z("#bp_profile_list_settings").on("change",'.member-directory-profile-actions input[type="checkbox"]',function(){var i=[],o=[],n=BP_ADMIN.member_directories.profile_action_btn;z('.member-directory-profile-actions input[type="checkbox"]:checked').each(function(e,t){i.push(t.value),o.push(BP_ADMIN.member_directories.profile_actions.filter(function(e){return e.element_name===t.value}))}),z(".member-directory-profile-primary-action select").find("option:not(:first)").remove(),z.each(o,function(e,t){var i;void 0!==t[0]&&void 0!==t[0].element_name&&void 0!==t[0].element_label&&(i=!1,n===t[0].element_name&&(i=!0),z(".member-directory-profile-primary-action select").append(z("").attr("value",t[0].element_name).text(t[0].element_label).attr("selected",i)))}),0===i.length?(z(".member-directory-profile-primary-action").addClass("bp-hide"),z(".member-directory-profile-primary-action select").find("option:eq(0)").prop("selected",!0)):z(".member-directory-profile-primary-action").removeClass("bp-hide")}),z(document).on("click","table.extension-listing #btn-add-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_document_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_document_extensions_support["+i+"][extension]"),z(this).find("select.extension-icon").attr("name","bp_document_extensions_support["+i+"][icon]"),z(this).find("select.extension-icon").attr("data-name","bp_document_extensions_support["+i+"][icon]"),z(this).find("input.extension-mime").attr("name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_document_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_document_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_document_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),z(document).on("click","table.extension-listing #btn-add-video-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-mime").attr("name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_video_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_video_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_video_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),q(),z(document).on("click",".custom-extension-list-select li",function(){var e=z(this).find("i").attr("class"),t=''+this.innerText+"";z(this).closest("td").find(".icon-select-main .icon-select-button").html(t),z(this).closest("td").find(".icon-select-main .custom-extension-list").toggle(),z(this).closest("td").find('select.extension-icon option[value="'+e+'"]').attr("selected","selected"),z(this).closest(".icon-select-main").siblings(".bb-icon").length&&z(this).closest(".icon-select-main").siblings(".bb-icon").attr("class","bb-icon "+e)}),z(document).on("click",".icon-select-main .icon-select-button",function(){z(this).siblings(".custom-extension-list").toggle()}),z(document).on("click","table.extension-listing #btn-remove-extensions",function(){var e=z(this).closest("table.extension-listing");z(this).closest("tr").remove();var t=parseInt(z(".extension-listing tr.extra-extension").length),t=1,i="bp_document";0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.querySelector("#bp-hello-container:not(.bb-onload-modal)");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),document.addEventListener("click",function(e){var t=document.getElementById("bp-hello-backdrop");t&&document.getElementById("bp-hello-container")&&(t=t.contains(e.target),(e.target.classList.contains("close-modal")||t)&&(z(e.target).closest("#bp-hello-container").hide(),z(document).find("#bp-document-file-input").val(""),z(document).find(".show-document-mime-type").hide(),z(document).find(".show-document-mime-type input#mime-type").val("")))},!1),z(document).on("click",".bp-show-moderation-alert",function(){var e=z(this).attr("data-action");z("#bp-hello-backdrop").show(),z("#bp-hello-container").find(".bp-spam-action-msg").hide(),z("#bp-hello-container").find(".bp-not-spam-action-msg").hide(),"spam"===e?z("#bp-hello-container").find(".bp-spam-action-msg").show():"not-spam"===e&&z("#bp-hello-container").find(".bp-not-spam-action-msg").show(),z("#bp-hello-container").show().addClass("deactivation-popup")}),z(document).on("click",".bp-show-deactivate-popup a",function(e){e.preventDefault(),z("#bp-hello-container").find(".bp-hello-content").empty(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").attr("data-redirect",z(this).attr("href")),z("#bp-hello-container").find(".bp-hello-content").append(z(this).parent().closest(".row-actions").find(".component-deactivate-msg").text())}),z(document).on("click",".close-modal",function(){z("#bp-hello-backdrop").hide(),z("#bp-hello-container").hide().removeClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").removeClass("form-submit")}),z(document).on("click",".component-deactivate",function(e){e.preventDefault(),z(this).hasClass("form-submit")?z("form#bp-admin-component-form").find('input[name="bp-admin-component-submit"]').trigger("click"):window.location=z(this).attr("data-redirect")}),z("form#bp-admin-component-form").submit(function(e){var t=(t=z('#bulk-action-selector-top[name="action"]').find(":selected").val())||z('#bulk-action-selector-top[name="action2"]').find(":selected").val(),i=!1,o="";z(".mass-check-deactivate").each(function(){1==z(this).prop("checked")&&(i=!0),o+=z(this).parent().find(".component-deactivate-msg").text()}),z("#bp-hello-container").find(".component-deactivate").hasClass("form-submit")||"inactive"!==t||!0!==i||(z("#bp-hello-container").find(".bp-hello-content").empty(),o&&(e.preventDefault(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".bp-hello-content").html(o),z("#bp-hello-container").find(".component-deactivate").addClass("form-submit")))}),z(document).on("change","#bp_moderation_settings_reporting .bpm_reporting_content_content_label > input",function(){z(this).prop("checked")?z(this).parent().next("label").removeClass("is_disabled").find('input[type="checkbox"]').prop("disabled",!1):z(this).parent().next("label").addClass("is_disabled").find('input[type="checkbox"]').removeProp("checked").removeAttr("checked").prop("disabled","disabled"),z('label[for="bpm_reporting_email_notification"]').removeClass("is_disabled"),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled"))}),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled")),z(document).on("click",".bp-suspend-user, .bp-unsuspend-user",function(){var e=z(this).attr("data-action");return"suspend"===e?confirm(BP_ADMIN.moderation.suspend_confirm_message):"unsuspend"===e?confirm(BP_ADMIN.moderation.unsuspend_confirm_message):void 0}),z(document).on("click",".notification-defaults",function(){z(this).next(".manage-defaults").hasClass("manage-defaults-hide")?z(this).next(".manage-defaults").removeClass("manage-defaults-hide"):z(this).next(".manage-defaults").addClass("manage-defaults-hide")}),z(document).on("click",".bb-notification-checkbox",function(){!1===z(this).prop("checked")?z(this).parents(".field-block").find(".manage-defaults .field-wrap").addClass("disabled"):z(this).parents(".field-block").find(".manage-defaults .field-wrap").removeClass("disabled")}),void 0===BP_ADMIN.post_type||"object"!=typeof jQuery.wp||"function"!=typeof jQuery.wp.wpColorPicker||(L=BP_ADMIN.post_type)&&(z("#"+L+"-label-background-color").length&&z("#"+L+"-label-background-color").wpColorPicker(),z("#"+L+"-label-text-color").length&&z("#"+L+"-label-text-color").wpColorPicker(),z("#"+L+"-label-color-type").length&&z(document).on("change","#"+L+"-label-color-type",function(e){e.preventDefault(),"default"===z(this).val()?z("#"+L+"-color-settings").hide():z("#"+L+"-color-settings").show()}),z(".wp-picker-input-wrap .wp-picker-clear").click(function(e){e.preventDefault();var t=z(this).closest("span").find(".wp-color-picker").attr("id");L+"-label-background-color"!==t||(e=void 0!==BP_ADMIN.background_color?BP_ADMIN.background_color:"")&&(z("#"+L+"-label-background-color").val(e),z("#"+L+"-background-color-colorpicker .wp-color-result").css("background-color",e)),L+"-label-text-color"!==t||(t=void 0!==BP_ADMIN.color?BP_ADMIN.color:"")&&(z("#"+L+"-label-text-color").val(t),z("#"+L+"-text-color-colorpicker .wp-color-result").css("background-color",t))})),z(document).on("click",".bb-hide-pw",function(e){e.preventDefault();var t=z(this),i=t.closest(".password-toggle").find("input"),e=i.data("type")?i.data("type"):"text";t.toggleClass("bb-show-pass"),t.hasClass("bb-show-pass")?i.attr("type",e):i.attr("type","password")}),void 0!==z.fn.select2&&(0 '+e.replace(o,i)+" "),t.prev(".registration-restrictions-lastindex").val(i),n()}),z(document).on("click",".registration-restrictions-listing .registration-restrictions-rule-remove",function(e){e.preventDefault();var t=z(e.currentTarget),i=t.parents(".bb-domain-restrictions-listing"),e=parseInt(t.prev(".registration-restrictions-lastindex").val())-1;t.closest(".registration-restrictions-rule").hasClass("custom")||(t.closest(".registration-restrictions-rule").remove(),t.parents(".registration-restrictions-listing").find(".registration-restrictions-lastindex").val(e)),void 0!==i&&0
Date: Thu, 23 May 2024 12:42:38 +0300
Subject: [PATCH 2/2] [PROD-7474] Profile settings - add back option to switch
the preview cover image preview
---
src/bp-core/admin/js/settings-page.js | 13 +++++++++++++
src/bp-core/admin/js/settings-page.min.js | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/bp-core/admin/js/settings-page.js b/src/bp-core/admin/js/settings-page.js
index 9ff01af106..3c8d2dfe1d 100644
--- a/src/bp-core/admin/js/settings-page.js
+++ b/src/bp-core/admin/js/settings-page.js
@@ -1900,6 +1900,19 @@ window.bp = window.bp || {};
}
);
+ // Show/hide web/app preview.
+ $( '.preview-switcher .button' ).on(
+ 'click',
+ function( event ) {
+ event.preventDefault();
+
+ var tab = $( this ).attr( 'href' );
+ $( this ).closest( '.preview-switcher-main' ).find( '.preview-block.active' ).removeClass( 'active' );
+ $( tab ).addClass( 'active' );
+ $( this ).addClass( 'button-primary' ).siblings().removeClass( 'button-primary' );
+ }
+ );
+
// Change preview avatar on change member header layout.
$( '.profile-header-style input[type="radio"], .group-header-style input[type="radio"]' ).on(
'change',
diff --git a/src/bp-core/admin/js/settings-page.min.js b/src/bp-core/admin/js/settings-page.min.js
index 9d60c7b96c..7285a19324 100644
--- a/src/bp-core/admin/js/settings-page.min.js
+++ b/src/bp-core/admin/js/settings-page.min.js
@@ -1 +1 @@
-window.bp=window.bp||{},function(){var z=jQuery.noConflict(),F=[],G=[];function V(e,t,i){var o=new Date;o.setTime(o.getTime()+60*i*1e3);o="expires="+o.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}function e(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");e=new RegExp("[\\?&]"+e+"=([^]*)").exec(location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))}function n(){z(".bb-sortable .registration-restrictions-rule:not(.custom)").each(function(e){z(this).find(".registration-restrictions-priority").html(e+1)})}function r(e,o){var n=z("#bb-domain-restrictions-setting"),a=[],s=[];e&&e.currentTarget&&z(e.currentTarget).closest(".registration-restrictions-rule").hasClass("untouched")&&z(e.currentTarget).closest(".registration-restrictions-rule").removeClass("untouched"),"submit"!==o&&"remove"!==o&&"add"!==o||z(".registration-restrictions-rule").removeClass("untouched"),z(".bb-domain-restrictions-listing .registration-restrictions-rule").not(".custom").not(".untouched").each(function(){var e=z(this).find(".registration-restrictions-domain").val().trim().toLowerCase(),t=z(this).find(".registration-restrictions-tld").val().trim().toLowerCase(),i=z(this).find(".registration-restrictions-input-select").val();z(this).removeClass("error"),n.children(".restrictions-error").html(""),""!==e&&""!==t&&(void 0===a[e+"_"+t]?a[e+"_"+t]=1:(a[e+"_"+t]+=1,z(this).addClass("error"),s.includes(BP_ADMIN.bb_registration_restrictions.feedback_messages.duplicate)||s.push(BP_ADMIN.bb_registration_restrictions.feedback_messages.duplicate))),"submit"!==o&&"remove"!==o&&"add"!==o||""!==e&&""!==t&&""!==i||(z(this).addClass("error"),s.includes(BP_ADMIN.bb_registration_restrictions.feedback_messages.empty)||s.push(BP_ADMIN.bb_registration_restrictions.feedback_messages.empty))}),z("#bb-domain-restrictions-setting").children(".restrictions-error").html("");for(var t=0;t";z("#bb-domain-restrictions-setting").children(".restrictions-error").append(i)}0";z("#bb-email-restrictions-setting").children(".restrictions-error").append(t)}0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.getElementById("bp-hello-container");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),"yes"===z.bbGetParameterByName("popup")&&z(".btn-open-missing-email").trigger("click"),"bpmissingemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-missing-emails").offset().top},1500),z(".label-bp-missing-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-missing-emails").css("background-color","transparent")},1500)),"bpreinstallemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-reinstall-emails").offset().top},1500),z(".label-bp-reinstall-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-reinstall-emails").css("background-color","transparent")},1500)),z("[data-run-js-condition]").each(function(){var t=z(this).data("run-js-condition"),i=z(this).prop("tagName");z(this).on("change.run-condition",function(){if("SELECT"===i&&z(this).is(":visible")){var e=t+"-"+z(this).val();return z('[class*="js-show-on-'+t+'-"]:not(.js-show-on-'+e+")").hide(),z(".js-show-on-"+e).show().find("[data-run-js-condition]").trigger("change.run-condition"),!0}z(this).prop("checked")&&z(this).is(":visible")?(z(".js-hide-on-"+t).hide(),z(".js-show-on-"+t).show().find("[data-run-js-condition]").trigger("change.run-condition")):(z(".js-hide-on-"+t).show(),z(".js-show-on-"+t).hide().find("[data-run-js-condition]").trigger("change.run-condition"))}).trigger("change.run-condition")}),z(document).find(".buddyboss_page_bp-pages .bp-admin-card").length&&z(document).on("click",".create-background-page",function(){var e=z(this).attr("data-name");z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_core_admin_create_background_page",page:e},success:function(e){e.success&&(window.location.href=e.data.url)}})}),z(".bp-search-child-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).prevAll(".bp-search-parent-field").first();t.length&&e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!0)}),z(".bp-search-parent-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).nextUntil(".bp-search-parent-field");t.length&&!e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!1)}),z(document).on("change","#bpm_blocking_member_blocking",function(){z('label[for="bpm_blocking_auto_suspend"]').toggleClass("is_disabled"),z("#bpm_blocking_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),z(document).on("change","#bb_blocking_member_reporting",function(){z('label[for="bb_reporting_auto_suspend"]').toggleClass("is_disabled"),z("#bb_reporting_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled")),z("#bb_reporting_category_description").length&&z(".wp-heading-inline").append(z("#bb_reporting_category_description")),z('body.taxonomy-bpm_category span:contains("Slug")').each(function(){z(this).parent().remove()}),z(".taxonomy-bpm_category #the-list").on("click","button.editinline",function(e){e.preventDefault();var t=z(this).closest("tr").find("td.bb_category_show_when_reporting").text();""!==t&&(z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').prop("selected",!1),z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').filter(function(){return this.text===t}).prop("selected",!0))})}),z(document).ready(function(){var e,t,i,o,n,a,s=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu #toplevel_page_buddyboss-platform ul.wp-submenu li");z("body.buddypress.post-type-bp-group-type").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-groups"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-groups"]').parent().addClass("current")),z("body.buddypress.post-type-bp-email").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-email"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-email"]').parent().addClass("current")),z("body.buddypress.post-type-topic").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-reply").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-bp-member-type").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.post-type-bp_ps_form").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-repair").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-converter").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bp-media-import").length&&(n=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(n).addClass("current"),z(n).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),(z("body.buddypress.buddyboss_page_bp-member-type-import").length||z("body.buddypress.buddyboss_page_bp-repair-community").length)&&(a=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(a).addClass("current"),z(a).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.taxonomy-bpm_category").length&&(n=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu li"),a=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform"),c=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-moderation"]'),z(n).removeClass("wp-has-current-submenu"),z(n).removeClass("wp-menu-open"),z(a).addClass("wp-has-current-submenu wp-menu-open"),z(s).removeClass("current"),z(c).addClass("current"),z(c).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-moderation"]').parent().addClass("current")),z("body .section-bp_search_settings_community").length&&(z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length&&z("#bp_search_select_all_components").prop("checked",!0),z("#bp_search_select_all_components").click(function(){var e=z("body .section-bp_search_settings_community table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_community table td input:checkbox").click(function(){z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length?z("#bp_search_select_all_components").prop("checked",!0):z("#bp_search_select_all_components").prop("checked",!1),"bp_search_topic_tax_topic-tag"===z(this).attr("id")&&!0===z(this).prop("checked")&&!1===z("#bp_search_post_type_topic").prop("checked")&&z("#bp_search_post_type_topic").prop("checked",!0),"bp_search_post_type_topic"===z(this).attr("id")&&!0!==z(this).prop("checked")&&!0===z("#bp_search_topic_tax_topic-tag").prop("checked")&&z("#bp_search_topic_tax_topic-tag").prop("checked",!1)})),z("body .section-bp_search_settings_post_types").length&&(z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length&&z("#bp_search_select_all_post_types").prop("checked",!0),z("#bp_search_select_all_post_types").click(function(){var e=z("body .section-bp_search_settings_post_types table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_post_types table td input:checkbox").click(function(){z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length?z("#bp_search_select_all_post_types").prop("checked",!0):z("#bp_search_select_all_post_types").prop("checked",!1)})),z("body .section-bp_document_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length&&z("#bp_select_extensions").prop("checked",!0),z("#bp_select_extensions").click(function(){var e=z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").click(function(){z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length?z("#bp_select_extensions").prop("checked",!0):z("#bp_select_extensions").prop("checked",!1)}),z("form").submit(function(){var e=!1;if(z('body .section-bp_document_settings_extensions table tbody tr td table tbody tr.document-extensions td [type="text"]').each(function(){""===z.trim(z(this).val())?(z(this).addClass("error"),e=!0):z(this).hasClass("error")&&z(this).removeClass("error")}),e)return!1})),z(".buddyboss_page_bp-activity").length&&z(document).on("click",".activity-attached-gif-container",function(e){e.preventDefault();var t=z(this).find("video").get(0),e=z(this).find(".gif-play-button");!0===t.paused?(t.play(),e.hide()):(t.pause(),e.show())}),z("body.buddyboss_page_bp-help").length&&(z(".bp-help-card-grid").on("click","span.open",function(){z(this).toggleClass("active"),z(this).closest(".main").find("ul:first").toggle()}),z(".bp-help-card-grid li.selected").closest("ul").show().closest("li").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid li.selected").find("ul:first").show(),z(".bp-help-card-grid li.selected").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid .sub-menu-count").each(function(){z(this).text("("+z(this).closest("li").find("ul:first li").size()+")")})),z(".buddyboss_page_bp-settings .section-bp_groups_hierarchies").length&&(document.getElementById("bp-enable-group-hierarchies").checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z(document).on("click","#bp-enable-group-hierarchies",function(){!0===this.checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():(z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z("#bp-enable-group-restrict-invites, #bp-enable-group-hide-subgroups").prop("checked",!1))}),z(document).on("click","#bp-enable-group-restrict-invites",function(){if(!0===this.checked)return!!confirm(BP_ADMIN.group.restrict_invites_confirm_message)})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-headers-elements .bb-group-headers-element-group-type").show():z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-headers-elements .bb-group-headers-element-group-type").show(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!0)):(z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-cover-image-uploads").checked?z(".bb-group-elements .bb-group-element-cover-images").show():z(".bb-group-elements .bb-group-element-cover-images").hide(),z(document).on("click","#bp-disable-group-cover-image-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-cover-images").show(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-cover-images").hide(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-avatar-uploads").checked?z(".bb-group-elements .bb-group-element-avatars").show():z(".bb-group-elements .bb-group-element-avatars").hide(),z(document).on("click","#bp-disable-group-avatar-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-avatars").show(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-avatars").hide(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups_types").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-elements .bb-group-element-group-type").show():z(".bb-group-elements .bb-group-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-group-type").show(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-group-type").hide(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").length&&(z(".bp-feed-post-type-checkbox").each(function(){var e=z(this).data("post_type");!0===this.checked&&z(".bp-feed-post-type-comment-"+e).closest("tr").show()}),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").on("click",".bp-feed-post-type-checkbox",function(){var e=z(this).data("post_type"),e=z(".bp-feed-post-type-comment-"+e);!0===this.checked?e.closest("tr").show():e.prop("checked",!1).closest("tr").hide()})),z("#bp_media_profile_media_support").change(function(){this.checked?z("#bp_media_profile_albums_support").prop("disabled",!1):(z("#bp_media_profile_albums_support").prop("disabled",!0),z("#bp_media_profile_albums_support").attr("checked",!1))}),z("#bp_media_group_media_support").change(function(){this.checked?z("#bp_media_group_albums_support").prop("disabled",!1):(z("#bp_media_group_albums_support").prop("disabled",!0),z("#bp_media_group_albums_support").attr("checked",!1))}),z("body .section-bp_video_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z(".video-extensions-listing #bp_select_extensions").click(function(){var e=z("body .section-bp_video_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)})),z(".buddyboss_page_bp-tools .section-default_data").length&&(jQuery(".bp-admin-form .checkbox").click(function(){"import-f-replies"===jQuery(this).attr("id")&&jQuery("#import-f-topics").prop("checked",!0),"import-f-topics"===jQuery(this).attr("id")&&jQuery("#import-f-replies").prop("checked",!1),"checked"!==jQuery(this).attr("checked")||jQuery(this).closest("li.main").find(".main-header").attr("disabled")||jQuery(this).closest("li.main").find(".main-header").prop("checked",!0)}),jQuery(".bp-admin-form #import-groups, .bp-admin-form #import-users, .bp-admin-form #import-forums").click(function(){"checked"!==jQuery(this).attr("checked")&&jQuery(this).closest("li").find("ul .checkbox").prop("checked",!1)}),jQuery(".bp-admin-form #bp-admin-submit").click(function(){return!!confirm(BP_ADMIN.tools.default_data.submit_button_message)}),jQuery(".bp-admin-form #bp-admin-clear").click(function(){return!!confirm(BP_ADMIN.tools.default_data.clear_button_message)}));setTimeout(function(){z('iframe[src*="youtube"], iframe[src*="vimeo"]').parent().fitVids()},300);function r(){z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_media_import_status_request"},success:function(e){var t,i,o,n,a;void 0!==e.success&&void 0!==e.data?(t=e.data.total_media,i=e.data.total_albums,o=e.data.albums_done,n=e.data.media_done,a=e.data.import_status,z("#bp-media-import-albums-total").text(i),z("#bp-media-import-media-total").text(t),z("#bp-media-import-albums-done").text(o),z("#bp-media-import-media-done").text(n),"reset_albums"==a||"reset_media"==a||"reset_forum"==a||"reset_topic"==a||"reset_reply"==a||"reset_options"==a?z("#bp-media-resetting").show():z("#bp-media-resetting").hide(),"done"==a&&i==o&&t==n?(z("#bp-media-import-msg").text(e.data.success_msg),z("#bp-media-import-submit").show()):r()):z("#bp-media-import-msg").text(e.data.error_msg)},error:function(){}})}var p,c,d;z("#bp-media-import-updating").length&&r(),z(".display-options:not(.button)").length&&(p=z(".display-options:not(.button)"),c=z("select[name=bp-display-name-format]"),d=c.val(),z(p).each(function(){z(this).hide()}),"first_name"===d?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide()),z(c).change(function(){z(p).each(function(){z(this).hide()}),"first_name"===(d=z(this).val())?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide())}));var l,u=z(".profile-layout-options");u.length&&(f=z("select[name=bp-profile-layout-format]"),l=f.val(),z(u).each(function(){z(this).hide()}),"list_grid"===l?z(".profile-default-layout").show():z(".profile-default-layout").hide(),z(f).change(function(){z(u).each(function(){z(this).hide()}),"list_grid"===(l=z(this).val())?z(".profile-default-layout").show():z(".profile-default-layout").hide()}),function(){for(var e=document.cookie.split(";"),t={},i=0;i'),z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_repair_tools_wrapper_function",type:F[t],offset:e,nonce:z('body .section-repair_community .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){if(void 0!==e.success){if(!e.success||void 0===e.data)return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1;"running"===e.data.status?(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z(".section-repair_community .settings fieldset").append('"),void 0!==e.data.records&&""!==e.data.records&&(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")),t+=1),m(e.data.offset,t),F.length===t&&z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn")}},error:function(){return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-submit",function(e){e.preventDefault(),F=[],setTimeout(function(){z("body .section-repair_community .settings fieldset .updated").remove()},500),z.each(z('.section-repair_community .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){F.push(z(this).val())}),F.length&&(z("body .section-repair_community .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_community .settings fieldset .checkbox code").remove(),m(0,0))})),z("#bb-giphy-connect").length&&z(document).on("click","#bb-giphy-connect",function(e){return e.preventDefault(),z("#bb-giphy-connect").data("connected")?(z("#bb-giphy-connect").data("connected",!1),z("#bb-giphy-connect").addClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!1),z("#bp_media_gif_api_key").val(""),z("#bp_media_profiles_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_groups_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_messages_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_forums_gif_support").attr("disabled",!0).attr("checked",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("connect-text")),!1):(z("#bb-giphy-connect").addClass("disable-btn"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice").addClass("hidden"),void z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bb_admin_check_valid_giphy_key",key:z("#bp_media_gif_api_key").val(),nonce:z("#bb-giphy-connect").data("nonce")},success:function(e){e.data.code&&200===e.data.code?(z("#bb-giphy-connect").data("connected",!0),z("#bb-giphy-connect").removeClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!0),z("#bp_media_profiles_gif_support").attr("disabled",!1),z("#bp_media_groups_gif_support").attr("disabled",!1),z("#bp_media_messages_gif_support").attr("disabled",!1),z("#bp_media_forums_gif_support").attr("disabled",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("disconnect-text"))):(z("#bp_media_settings_gifs .bp-new-notice-panel-notice").removeClass("hidden"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_code").html(e.data.code),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_message").html(e.data.message))},error:function(){z("#bb-giphy-connect").removeClass("disable-btn")}}))}),z("#bp-tools-forum-submit").length&&(h=function(e,t){z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(''),void 0!==G[t]&&z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_forum_repair_tools_wrapper_function",type:G[t],offset:e,site_id:z("body .section-repair_forums #bbp-network-site").val(),nonce:z('body .section-repair_forums .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){void 0!==e.success&&void 0!==e.data&&("running"===e.data.status?(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] code').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),0===e.data.status?z(".section-repair_forums .settings fieldset").append('"):z(".section-repair_forums .settings fieldset").append('"),t+=1),h(e.data.offset,t),G.length===t&&z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"))},error:function(){return z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-forum-submit",function(e){e.preventDefault(),G=[];e=z("body .section-repair_forums #bbp-network-site");if(e.length&&"0"===e.val())return alert(BP_ADMIN.tools.repair_forums.validate_site_id_message),!1;setTimeout(function(){z("body .section-repair_forums .settings fieldset .updated").remove()},500),z.each(z('.section-repair_forums .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){G.push(z(this).val())}),G.length&&(z("body .section-repair_forums .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_forums .settings fieldset .checkbox code").remove(),h(1,0))}));var f=z("#allow-custom-registration");f.length&&(0===parseInt(f.val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show()),z(f).change(function(){0===parseInt(z(this).val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show(),z(".registration-form-main-select p.description").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show(),z(".registration-form-main-select p.description").hide())}));var v,y=z("#bp-profile-avatar-type"),w=z("input[type=radio][name=bp-default-profile-avatar-type]"),k=(z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),z(".default-profile-avatar-type")),x=z(".default-profile-avatar-custom"),C=z(".enable-profile-gravatar-field"),D=z(".bb-wordpress-profile-gravatar-warning"),B=z(".preview-avatar-cover-image"),I=B.find(".web-preview-wrap"),P=B.find(".app-preview-wrap");y.length&&z(y).change(function(){k.addClass("bp-hide"),x.addClass("bp-hide"),D.addClass("bp-hide"),C.addClass("bp-hide");var e="",t=I.find(".preview-item-avatar img");B.find(".preview_avatar_cover").removeClass("has-avatar"),"BuddyBoss"===z(this).val()?(C.removeClass("bp-hide"),k.removeClass("bp-hide"),v=z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),e=z("."+v+"-profile-avatar").prop("src"),"custom"===v&&(x.removeClass("bp-hide"),void 0!==(e=z("#bp-default-user-custom-avatar").val()).length&&0==e.length&&(e=t.attr("data-blank-avatar")))):"WordPress"===z(this).val()&&(BP_ADMIN.avatar_settings.wordpress_show_avatar||D.removeClass("bp-hide"),e=t.attr("data-wordpress-avatar")),void 0!==e.length&&0'+t+"")}),z(this).closest("td").find("select.extension-icon").parent().append('"),e=z(this).closest("td").find(".extension-icon").val(),t=z(this).closest("td").find(".extension-icon option:selected").text(),z(this).closest("td").find(".icon-select-main .icon-select-button").html(''+t+""))})}z("#bp_member_avatar_settings .image-width-height").length&&(T=z("select#bb-cover-profile-width").find("option:selected").val(),E=z("select#bb-cover-profile-height").find("option:selected").val(),z("#bp_member_avatar_settings").on("change","select#bb-cover-profile-width, select#bb-cover-profile-height",function(e){e.preventDefault(),U=!0,("bb-cover-profile-width"===z(this).attr("id")&&T===z(this).val()||"bb-cover-profile-height"===z(this).attr("id")&&E===z(this).val())&&(U=!1),"bb-cover-profile-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("#bp_groups_avatar_settings .image-width-height").length&&(Q=z("select#bb-cover-group-width").find("option:selected").val(),S=z("select#bb-cover-group-height").find("option:selected").val(),z("#bp_groups_avatar_settings").on("change","select#bb-cover-group-width, select#bb-cover-group-height",function(e){e.preventDefault(),U=!0,("bb-cover-group-width"===z(this).attr("id")&&Q===z(this).val()||"bb-cover-group-height"===z(this).attr("id")&&S===z(this).val())&&(U=!1),"bb-cover-group-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("body.buddyboss_page_bp-settings").on("click",'input[name="submit"]',function(e){if(U&&(z("#bp_member_avatar_settings").length||z("#bp_groups_avatar_settings").length)){var t=BP_ADMIN.cover_size_alert.profile;return z("#bp_groups_avatar_settings").length&&(t=BP_ADMIN.cover_size_alert.group),!!confirm(t)||(e.preventDefault(),!1)}return!0}),z('.profile-header-style input[type="radio"], .group-header-style input[type="radio"]').on("change",function(){z(".web-preview-wrap .preview-item-avatar").removeClass("left-image").removeClass("centered-image").addClass(z(this).val()+"-image")}),z("#bp_profile_list_settings").on("change",'.member-directory-profile-actions input[type="checkbox"]',function(){var i=[],o=[],n=BP_ADMIN.member_directories.profile_action_btn;z('.member-directory-profile-actions input[type="checkbox"]:checked').each(function(e,t){i.push(t.value),o.push(BP_ADMIN.member_directories.profile_actions.filter(function(e){return e.element_name===t.value}))}),z(".member-directory-profile-primary-action select").find("option:not(:first)").remove(),z.each(o,function(e,t){var i;void 0!==t[0]&&void 0!==t[0].element_name&&void 0!==t[0].element_label&&(i=!1,n===t[0].element_name&&(i=!0),z(".member-directory-profile-primary-action select").append(z("").attr("value",t[0].element_name).text(t[0].element_label).attr("selected",i)))}),0===i.length?(z(".member-directory-profile-primary-action").addClass("bp-hide"),z(".member-directory-profile-primary-action select").find("option:eq(0)").prop("selected",!0)):z(".member-directory-profile-primary-action").removeClass("bp-hide")}),z(document).on("click","table.extension-listing #btn-add-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_document_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_document_extensions_support["+i+"][extension]"),z(this).find("select.extension-icon").attr("name","bp_document_extensions_support["+i+"][icon]"),z(this).find("select.extension-icon").attr("data-name","bp_document_extensions_support["+i+"][icon]"),z(this).find("input.extension-mime").attr("name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_document_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_document_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_document_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),z(document).on("click","table.extension-listing #btn-add-video-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-mime").attr("name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_video_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_video_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_video_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),q(),z(document).on("click",".custom-extension-list-select li",function(){var e=z(this).find("i").attr("class"),t=''+this.innerText+"";z(this).closest("td").find(".icon-select-main .icon-select-button").html(t),z(this).closest("td").find(".icon-select-main .custom-extension-list").toggle(),z(this).closest("td").find('select.extension-icon option[value="'+e+'"]').attr("selected","selected"),z(this).closest(".icon-select-main").siblings(".bb-icon").length&&z(this).closest(".icon-select-main").siblings(".bb-icon").attr("class","bb-icon "+e)}),z(document).on("click",".icon-select-main .icon-select-button",function(){z(this).siblings(".custom-extension-list").toggle()}),z(document).on("click","table.extension-listing #btn-remove-extensions",function(){var e=z(this).closest("table.extension-listing");z(this).closest("tr").remove();var t=parseInt(z(".extension-listing tr.extra-extension").length),t=1,i="bp_document";0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.querySelector("#bp-hello-container:not(.bb-onload-modal)");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),document.addEventListener("click",function(e){var t=document.getElementById("bp-hello-backdrop");t&&document.getElementById("bp-hello-container")&&(t=t.contains(e.target),(e.target.classList.contains("close-modal")||t)&&(z(e.target).closest("#bp-hello-container").hide(),z(document).find("#bp-document-file-input").val(""),z(document).find(".show-document-mime-type").hide(),z(document).find(".show-document-mime-type input#mime-type").val("")))},!1),z(document).on("click",".bp-show-moderation-alert",function(){var e=z(this).attr("data-action");z("#bp-hello-backdrop").show(),z("#bp-hello-container").find(".bp-spam-action-msg").hide(),z("#bp-hello-container").find(".bp-not-spam-action-msg").hide(),"spam"===e?z("#bp-hello-container").find(".bp-spam-action-msg").show():"not-spam"===e&&z("#bp-hello-container").find(".bp-not-spam-action-msg").show(),z("#bp-hello-container").show().addClass("deactivation-popup")}),z(document).on("click",".bp-show-deactivate-popup a",function(e){e.preventDefault(),z("#bp-hello-container").find(".bp-hello-content").empty(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").attr("data-redirect",z(this).attr("href")),z("#bp-hello-container").find(".bp-hello-content").append(z(this).parent().closest(".row-actions").find(".component-deactivate-msg").text())}),z(document).on("click",".close-modal",function(){z("#bp-hello-backdrop").hide(),z("#bp-hello-container").hide().removeClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").removeClass("form-submit")}),z(document).on("click",".component-deactivate",function(e){e.preventDefault(),z(this).hasClass("form-submit")?z("form#bp-admin-component-form").find('input[name="bp-admin-component-submit"]').trigger("click"):window.location=z(this).attr("data-redirect")}),z("form#bp-admin-component-form").submit(function(e){var t=(t=z('#bulk-action-selector-top[name="action"]').find(":selected").val())||z('#bulk-action-selector-top[name="action2"]').find(":selected").val(),i=!1,o="";z(".mass-check-deactivate").each(function(){1==z(this).prop("checked")&&(i=!0),o+=z(this).parent().find(".component-deactivate-msg").text()}),z("#bp-hello-container").find(".component-deactivate").hasClass("form-submit")||"inactive"!==t||!0!==i||(z("#bp-hello-container").find(".bp-hello-content").empty(),o&&(e.preventDefault(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".bp-hello-content").html(o),z("#bp-hello-container").find(".component-deactivate").addClass("form-submit")))}),z(document).on("change","#bp_moderation_settings_reporting .bpm_reporting_content_content_label > input",function(){z(this).prop("checked")?z(this).parent().next("label").removeClass("is_disabled").find('input[type="checkbox"]').prop("disabled",!1):z(this).parent().next("label").addClass("is_disabled").find('input[type="checkbox"]').removeProp("checked").removeAttr("checked").prop("disabled","disabled"),z('label[for="bpm_reporting_email_notification"]').removeClass("is_disabled"),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled"))}),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled")),z(document).on("click",".bp-suspend-user, .bp-unsuspend-user",function(){var e=z(this).attr("data-action");return"suspend"===e?confirm(BP_ADMIN.moderation.suspend_confirm_message):"unsuspend"===e?confirm(BP_ADMIN.moderation.unsuspend_confirm_message):void 0}),z(document).on("click",".notification-defaults",function(){z(this).next(".manage-defaults").hasClass("manage-defaults-hide")?z(this).next(".manage-defaults").removeClass("manage-defaults-hide"):z(this).next(".manage-defaults").addClass("manage-defaults-hide")}),z(document).on("click",".bb-notification-checkbox",function(){!1===z(this).prop("checked")?z(this).parents(".field-block").find(".manage-defaults .field-wrap").addClass("disabled"):z(this).parents(".field-block").find(".manage-defaults .field-wrap").removeClass("disabled")}),void 0===BP_ADMIN.post_type||"object"!=typeof jQuery.wp||"function"!=typeof jQuery.wp.wpColorPicker||(L=BP_ADMIN.post_type)&&(z("#"+L+"-label-background-color").length&&z("#"+L+"-label-background-color").wpColorPicker(),z("#"+L+"-label-text-color").length&&z("#"+L+"-label-text-color").wpColorPicker(),z("#"+L+"-label-color-type").length&&z(document).on("change","#"+L+"-label-color-type",function(e){e.preventDefault(),"default"===z(this).val()?z("#"+L+"-color-settings").hide():z("#"+L+"-color-settings").show()}),z(".wp-picker-input-wrap .wp-picker-clear").click(function(e){e.preventDefault();var t=z(this).closest("span").find(".wp-color-picker").attr("id");L+"-label-background-color"!==t||(e=void 0!==BP_ADMIN.background_color?BP_ADMIN.background_color:"")&&(z("#"+L+"-label-background-color").val(e),z("#"+L+"-background-color-colorpicker .wp-color-result").css("background-color",e)),L+"-label-text-color"!==t||(t=void 0!==BP_ADMIN.color?BP_ADMIN.color:"")&&(z("#"+L+"-label-text-color").val(t),z("#"+L+"-text-color-colorpicker .wp-color-result").css("background-color",t))})),z(document).on("click",".bb-hide-pw",function(e){e.preventDefault();var t=z(this),i=t.closest(".password-toggle").find("input"),e=i.data("type")?i.data("type"):"text";t.toggleClass("bb-show-pass"),t.hasClass("bb-show-pass")?i.attr("type",e):i.attr("type","password")}),void 0!==z.fn.select2&&(0 '+e.replace(o,i)+" "),t.prev(".registration-restrictions-lastindex").val(i),n()}),z(document).on("click",".registration-restrictions-listing .registration-restrictions-rule-remove",function(e){e.preventDefault();var t=z(e.currentTarget),i=t.parents(".bb-domain-restrictions-listing"),e=parseInt(t.prev(".registration-restrictions-lastindex").val())-1;t.closest(".registration-restrictions-rule").hasClass("custom")||(t.closest(".registration-restrictions-rule").remove(),t.parents(".registration-restrictions-listing").find(".registration-restrictions-lastindex").val(e)),void 0!==i&&0";z("#bb-domain-restrictions-setting").children(".restrictions-error").append(i)}0";z("#bb-email-restrictions-setting").children(".restrictions-error").append(t)}0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.getElementById("bp-hello-container");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),"yes"===z.bbGetParameterByName("popup")&&z(".btn-open-missing-email").trigger("click"),"bpmissingemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-missing-emails").offset().top},1500),z(".label-bp-missing-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-missing-emails").css("background-color","transparent")},1500)),"bpreinstallemails"===e("scrollto")&&(z("html, body").animate({scrollTop:z("#bp-reinstall-emails").offset().top},1500),z(".label-bp-reinstall-emails").css("background-color","#faafaa"),setTimeout(function(){z(".label-bp-reinstall-emails").css("background-color","transparent")},1500)),z("[data-run-js-condition]").each(function(){var t=z(this).data("run-js-condition"),i=z(this).prop("tagName");z(this).on("change.run-condition",function(){if("SELECT"===i&&z(this).is(":visible")){var e=t+"-"+z(this).val();return z('[class*="js-show-on-'+t+'-"]:not(.js-show-on-'+e+")").hide(),z(".js-show-on-"+e).show().find("[data-run-js-condition]").trigger("change.run-condition"),!0}z(this).prop("checked")&&z(this).is(":visible")?(z(".js-hide-on-"+t).hide(),z(".js-show-on-"+t).show().find("[data-run-js-condition]").trigger("change.run-condition")):(z(".js-hide-on-"+t).show(),z(".js-show-on-"+t).hide().find("[data-run-js-condition]").trigger("change.run-condition"))}).trigger("change.run-condition")}),z(document).find(".buddyboss_page_bp-pages .bp-admin-card").length&&z(document).on("click",".create-background-page",function(){var e=z(this).attr("data-name");z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_core_admin_create_background_page",page:e},success:function(e){e.success&&(window.location.href=e.data.url)}})}),z(".bp-search-child-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).prevAll(".bp-search-parent-field").first();t.length&&e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!0)}),z(".bp-search-parent-field").on("click",'input[type="checkbox"]',function(e){var t=z(e.delegateTarget).nextUntil(".bp-search-parent-field");t.length&&!e.currentTarget.checked&&t.find('input[type="checkbox"]').prop("checked",!1)}),z(document).on("change","#bpm_blocking_member_blocking",function(){z('label[for="bpm_blocking_auto_suspend"]').toggleClass("is_disabled"),z("#bpm_blocking_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),z(document).on("change","#bb_blocking_member_reporting",function(){z('label[for="bb_reporting_auto_suspend"]').toggleClass("is_disabled"),z("#bb_reporting_auto_suspend").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').removeClass("is_disabled"),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled"))}),!1===z("#bpm_blocking_member_blocking").prop("checked")&&!1===z("#bb_blocking_member_reporting").prop("checked")&&(z("#bpm_blocking_email_notification").prop("checked",!1),z('label[for="bpm_blocking_email_notification"]').addClass("is_disabled")),z("#bb_reporting_category_description").length&&z(".wp-heading-inline").append(z("#bb_reporting_category_description")),z('body.taxonomy-bpm_category span:contains("Slug")').each(function(){z(this).parent().remove()}),z(".taxonomy-bpm_category #the-list").on("click","button.editinline",function(e){e.preventDefault();var t=z(this).closest("tr").find("td.bb_category_show_when_reporting").text();""!==t&&(z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').prop("selected",!1),z('tr.inline-edit-row select[name="bb_category_show_when_reporting"] option').filter(function(){return this.text===t}).prop("selected",!0))})}),z(document).ready(function(){var e,t,i,o,n,a,s=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu #toplevel_page_buddyboss-platform ul.wp-submenu li");z("body.buddypress.post-type-bp-group-type").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-groups"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-groups"]').parent().addClass("current")),z("body.buddypress.post-type-bp-email").length&&(e=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-email"]'),z(s).removeClass("current"),z(e).addClass("current"),z(e).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-email"]').parent().addClass("current")),z("body.buddypress.post-type-topic").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-reply").length&&(t=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="post_type=forum"]'),z(t).addClass("current"),z(t).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="post_type=forum"]').parent().addClass("current")),z("body.buddypress.post-type-bp-member-type").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.post-type-bp_ps_form").length&&(i=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-profile-setup"]'),z(s).removeClass("current"),z(i).addClass("current"),z(i).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-profile-setup"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-repair").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bbp-converter").length&&(o=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(o).addClass("current"),z(o).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.buddyboss_page_bp-media-import").length&&(n=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(n).addClass("current"),z(n).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),(z("body.buddypress.buddyboss_page_bp-member-type-import").length||z("body.buddypress.buddyboss_page_bp-repair-community").length)&&(a=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-tools"]'),z(s).removeClass("current"),z(a).addClass("current"),z(a).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-tools"]').parent().addClass("current")),z("body.buddypress.taxonomy-bpm_category").length&&(n=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu li"),a=z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform"),c=z('#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li a[href*="bp-moderation"]'),z(n).removeClass("wp-has-current-submenu"),z(n).removeClass("wp-menu-open"),z(a).addClass("wp-has-current-submenu wp-menu-open"),z(s).removeClass("current"),z(c).addClass("current"),z(c).attr("aria-current","page"),z("#wpwrap #adminmenumain #adminmenuwrap #adminmenu .toplevel_page_buddyboss-platform ul.wp-submenu-wrap li").find('a[href*="bp-moderation"]').parent().addClass("current")),z("body .section-bp_search_settings_community").length&&(z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length&&z("#bp_search_select_all_components").prop("checked",!0),z("#bp_search_select_all_components").click(function(){var e=z("body .section-bp_search_settings_community table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_community table td input:checkbox").click(function(){z("body .section-bp_search_settings_community table td input:checkbox:checked").length===z("body .section-bp_search_settings_community table td input:checkbox").length?z("#bp_search_select_all_components").prop("checked",!0):z("#bp_search_select_all_components").prop("checked",!1),"bp_search_topic_tax_topic-tag"===z(this).attr("id")&&!0===z(this).prop("checked")&&!1===z("#bp_search_post_type_topic").prop("checked")&&z("#bp_search_post_type_topic").prop("checked",!0),"bp_search_post_type_topic"===z(this).attr("id")&&!0!==z(this).prop("checked")&&!0===z("#bp_search_topic_tax_topic-tag").prop("checked")&&z("#bp_search_topic_tax_topic-tag").prop("checked",!1)})),z("body .section-bp_search_settings_post_types").length&&(z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length&&z("#bp_search_select_all_post_types").prop("checked",!0),z("#bp_search_select_all_post_types").click(function(){var e=z("body .section-bp_search_settings_post_types table");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_search_settings_post_types table td input:checkbox").click(function(){z("body .section-bp_search_settings_post_types table td input:checkbox:checked").length===z("body .section-bp_search_settings_post_types table td input:checkbox").length?z("#bp_search_select_all_post_types").prop("checked",!0):z("#bp_search_select_all_post_types").prop("checked",!1)})),z("body .section-bp_document_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length&&z("#bp_select_extensions").prop("checked",!0),z("#bp_select_extensions").click(function(){var e=z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)}),z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").click(function(){z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox:checked").length===z("body .section-bp_document_settings_extensions table tbody tr td table tbody tr td input:checkbox").length?z("#bp_select_extensions").prop("checked",!0):z("#bp_select_extensions").prop("checked",!1)}),z("form").submit(function(){var e=!1;if(z('body .section-bp_document_settings_extensions table tbody tr td table tbody tr.document-extensions td [type="text"]').each(function(){""===z.trim(z(this).val())?(z(this).addClass("error"),e=!0):z(this).hasClass("error")&&z(this).removeClass("error")}),e)return!1})),z(".buddyboss_page_bp-activity").length&&z(document).on("click",".activity-attached-gif-container",function(e){e.preventDefault();var t=z(this).find("video").get(0),e=z(this).find(".gif-play-button");!0===t.paused?(t.play(),e.hide()):(t.pause(),e.show())}),z("body.buddyboss_page_bp-help").length&&(z(".bp-help-card-grid").on("click","span.open",function(){z(this).toggleClass("active"),z(this).closest(".main").find("ul:first").toggle()}),z(".bp-help-card-grid li.selected").closest("ul").show().closest("li").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid li.selected").find("ul:first").show(),z(".bp-help-card-grid li.selected").find("> span.actions .open").addClass("active"),z(".bp-help-card-grid .sub-menu-count").each(function(){z(this).text("("+z(this).closest("li").find("ul:first li").size()+")")})),z(".buddyboss_page_bp-settings .section-bp_groups_hierarchies").length&&(document.getElementById("bp-enable-group-hierarchies").checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z(document).on("click","#bp-enable-group-hierarchies",function(){!0===this.checked?z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").show():(z(".bp-enable-group-restrict-invites, .bp-enable-group-hide-subgroups").hide(),z("#bp-enable-group-restrict-invites, #bp-enable-group-hide-subgroups").prop("checked",!1))}),z(document).on("click","#bp-enable-group-restrict-invites",function(){if(!0===this.checked)return!!confirm(BP_ADMIN.group.restrict_invites_confirm_message)})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-headers-elements .bb-group-headers-element-group-type").show():z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-headers-elements .bb-group-headers-element-group-type").show(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!0)):(z(".bb-group-headers-elements .bb-group-headers-element-group-type").hide(),z(".bb-group-headers-elements #bb-group-headers-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-cover-image-uploads").checked?z(".bb-group-elements .bb-group-element-cover-images").show():z(".bb-group-elements .bb-group-element-cover-images").hide(),z(document).on("click","#bp-disable-group-cover-image-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-cover-images").show(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-cover-images").hide(),z(".bb-group-elements #bb-group-directory-layout-element-cover-images").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups").length&&(document.getElementById("bp-disable-group-avatar-uploads").checked?z(".bb-group-elements .bb-group-element-avatars").show():z(".bb-group-elements .bb-group-element-avatars").hide(),z(document).on("click","#bp-disable-group-avatar-uploads",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-avatars").show(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-avatars").hide(),z(".bb-group-elements #bb-group-directory-layout-element-avatars").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_groups_types").length&&(document.getElementById("bp-disable-group-type-creation").checked?z(".bb-group-elements .bb-group-element-group-type").show():z(".bb-group-elements .bb-group-element-group-type").hide(),z(document).on("click","#bp-disable-group-type-creation",function(){!0===this.checked?(z(".bb-group-elements .bb-group-element-group-type").show(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!0)):(z(".bb-group-elements .bb-group-element-group-type").hide(),z(".bb-group-elements #bb-group-directory-layout-element-group-type").prop("checked",!1))})),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").length&&(z(".bp-feed-post-type-checkbox").each(function(){var e=z(this).data("post_type");!0===this.checked&&z(".bp-feed-post-type-comment-"+e).closest("tr").show()}),z(".buddyboss_page_bp-settings .section-bp_custom_post_type").on("click",".bp-feed-post-type-checkbox",function(){var e=z(this).data("post_type"),e=z(".bp-feed-post-type-comment-"+e);!0===this.checked?e.closest("tr").show():e.prop("checked",!1).closest("tr").hide()})),z("#bp_media_profile_media_support").change(function(){this.checked?z("#bp_media_profile_albums_support").prop("disabled",!1):(z("#bp_media_profile_albums_support").prop("disabled",!0),z("#bp_media_profile_albums_support").attr("checked",!1))}),z("#bp_media_group_media_support").change(function(){this.checked?z("#bp_media_group_albums_support").prop("disabled",!1):(z("#bp_media_group_albums_support").prop("disabled",!0),z("#bp_media_group_albums_support").attr("checked",!1))}),z("body .section-bp_video_settings_extensions").length&&(z(document).find(".nav-settings-subsubsub .subsubsub li.bp-media a").addClass("current"),z(".video-extensions-listing #bp_select_extensions").click(function(){var e=z("body .section-bp_video_settings_extensions table tbody tr td table tbody tr");z("td input:checkbox",e).prop("checked",this.checked)})),z(".buddyboss_page_bp-tools .section-default_data").length&&(jQuery(".bp-admin-form .checkbox").click(function(){"import-f-replies"===jQuery(this).attr("id")&&jQuery("#import-f-topics").prop("checked",!0),"import-f-topics"===jQuery(this).attr("id")&&jQuery("#import-f-replies").prop("checked",!1),"checked"!==jQuery(this).attr("checked")||jQuery(this).closest("li.main").find(".main-header").attr("disabled")||jQuery(this).closest("li.main").find(".main-header").prop("checked",!0)}),jQuery(".bp-admin-form #import-groups, .bp-admin-form #import-users, .bp-admin-form #import-forums").click(function(){"checked"!==jQuery(this).attr("checked")&&jQuery(this).closest("li").find("ul .checkbox").prop("checked",!1)}),jQuery(".bp-admin-form #bp-admin-submit").click(function(){return!!confirm(BP_ADMIN.tools.default_data.submit_button_message)}),jQuery(".bp-admin-form #bp-admin-clear").click(function(){return!!confirm(BP_ADMIN.tools.default_data.clear_button_message)}));setTimeout(function(){z('iframe[src*="youtube"], iframe[src*="vimeo"]').parent().fitVids()},300);function r(){z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_media_import_status_request"},success:function(e){var t,i,o,n,a;void 0!==e.success&&void 0!==e.data?(t=e.data.total_media,i=e.data.total_albums,o=e.data.albums_done,n=e.data.media_done,a=e.data.import_status,z("#bp-media-import-albums-total").text(i),z("#bp-media-import-media-total").text(t),z("#bp-media-import-albums-done").text(o),z("#bp-media-import-media-done").text(n),"reset_albums"==a||"reset_media"==a||"reset_forum"==a||"reset_topic"==a||"reset_reply"==a||"reset_options"==a?z("#bp-media-resetting").show():z("#bp-media-resetting").hide(),"done"==a&&i==o&&t==n?(z("#bp-media-import-msg").text(e.data.success_msg),z("#bp-media-import-submit").show()):r()):z("#bp-media-import-msg").text(e.data.error_msg)},error:function(){}})}var p,c,d;z("#bp-media-import-updating").length&&r(),z(".display-options:not(.button)").length&&(p=z(".display-options:not(.button)"),c=z("select[name=bp-display-name-format]"),d=c.val(),z(p).each(function(){z(this).hide()}),"first_name"===d?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide()),z(c).change(function(){z(p).each(function(){z(this).hide()}),"first_name"===(d=z(this).val())?(z(".first-name-options").show(),z(".nick-name-options").hide(),z(".first-last-name-options").hide()):"first_last_name"===d?(z(".first-last-name-options").show(),z(".first-name-options").hide(),z(".nick-name-options").hide()):(z(".nick-name-options").show(),z(".first-name-options").hide(),z(".first-last-name-options").hide())}));var l,u=z(".profile-layout-options");u.length&&(f=z("select[name=bp-profile-layout-format]"),l=f.val(),z(u).each(function(){z(this).hide()}),"list_grid"===l?z(".profile-default-layout").show():z(".profile-default-layout").hide(),z(f).change(function(){z(u).each(function(){z(this).hide()}),"list_grid"===(l=z(this).val())?z(".profile-default-layout").show():z(".profile-default-layout").hide()}),function(){for(var e=document.cookie.split(";"),t={},i=0;i'),z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_repair_tools_wrapper_function",type:F[t],offset:e,nonce:z('body .section-repair_community .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){if(void 0!==e.success){if(!e.success||void 0===e.data)return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1;"running"===e.data.status?(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] .loader-repair-tools').remove(),z(".section-repair_community .settings fieldset").append('"),void 0!==e.data.records&&""!==e.data.records&&(z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"] code').remove(),z('body .section-repair_community .settings fieldset .checkbox label[for="'+F[t]+'"]').append(""+e.data.records+"
")),t+=1),m(e.data.offset,t),F.length===t&&z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn")}},error:function(){return z("body .section-repair_community .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-submit",function(e){e.preventDefault(),F=[],setTimeout(function(){z("body .section-repair_community .settings fieldset .updated").remove()},500),z.each(z('.section-repair_community .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){F.push(z(this).val())}),F.length&&(z("body .section-repair_community .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_community .settings fieldset .checkbox code").remove(),m(0,0))})),z("#bb-giphy-connect").length&&z(document).on("click","#bb-giphy-connect",function(e){return e.preventDefault(),z("#bb-giphy-connect").data("connected")?(z("#bb-giphy-connect").data("connected",!1),z("#bb-giphy-connect").addClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!1),z("#bp_media_gif_api_key").val(""),z("#bp_media_profiles_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_groups_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_messages_gif_support").attr("disabled",!0).attr("checked",!1),z("#bp_media_forums_gif_support").attr("disabled",!0).attr("checked",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("connect-text")),!1):(z("#bb-giphy-connect").addClass("disable-btn"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice").addClass("hidden"),void z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bb_admin_check_valid_giphy_key",key:z("#bp_media_gif_api_key").val(),nonce:z("#bb-giphy-connect").data("nonce")},success:function(e){e.data.code&&200===e.data.code?(z("#bb-giphy-connect").data("connected",!0),z("#bb-giphy-connect").removeClass("button-primary"),z("#bp_media_gif_api_key").attr("readonly",!0),z("#bp_media_profiles_gif_support").attr("disabled",!1),z("#bp_media_groups_gif_support").attr("disabled",!1),z("#bp_media_messages_gif_support").attr("disabled",!1),z("#bp_media_forums_gif_support").attr("disabled",!1),z("#bb-giphy-connect").val(z("#bb-giphy-connect").data("disconnect-text"))):(z("#bp_media_settings_gifs .bp-new-notice-panel-notice").removeClass("hidden"),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_code").html(e.data.code),z("#bp_media_settings_gifs .bp-new-notice-panel-notice span#giphy_response_message").html(e.data.message))},error:function(){z("#bb-giphy-connect").removeClass("disable-btn")}}))}),z("#bp-tools-forum-submit").length&&(h=function(e,t){z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(''),void 0!==G[t]&&z.ajax({url:BP_ADMIN.ajax_url,method:"POST",data:{action:"bp_admin_forum_repair_tools_wrapper_function",type:G[t],offset:e,site_id:z("body .section-repair_forums #bbp-network-site").val(),nonce:z('body .section-repair_forums .settings fieldset .submit input[name="_wpnonce"]').val()},success:function(e){void 0!==e.success&&void 0!==e.data&&("running"===e.data.status?(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] code').remove(),z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"]').append(""+e.data.records+"
")):(z('body .section-repair_forums .settings fieldset .checkbox label[for="'+G[t]+'"] .loader-repair-tools').remove(),0===e.data.status?z(".section-repair_forums .settings fieldset").append('"):z(".section-repair_forums .settings fieldset").append('"),t+=1),h(e.data.offset,t),G.length===t&&z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"))},error:function(){return z("body .section-repair_forums .settings fieldset .submit a").removeClass("disable-btn"),!1}})},z(document).on("click","#bp-tools-forum-submit",function(e){e.preventDefault(),G=[];e=z("body .section-repair_forums #bbp-network-site");if(e.length&&"0"===e.val())return alert(BP_ADMIN.tools.repair_forums.validate_site_id_message),!1;setTimeout(function(){z("body .section-repair_forums .settings fieldset .updated").remove()},500),z.each(z('.section-repair_forums .settings fieldset .checkbox input[class="checkbox"]:checked'),function(){G.push(z(this).val())}),G.length&&(z("body .section-repair_forums .settings fieldset .submit a").addClass("disable-btn"),z("body .section-repair_forums .settings fieldset .checkbox code").remove(),h(1,0))}));var f=z("#allow-custom-registration");f.length&&(0===parseInt(f.val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show()),z(f).change(function(){0===parseInt(z(this).val())?(z(".register-text-box").hide(),z(".register-email-checkbox").show(),z(".register-password-checkbox").show(),z(".register-legal-agreement-checkbox").show(),z(".registration-form-main-select p.description").show()):(z(".register-email-checkbox").hide(),z(".register-password-checkbox").hide(),z(".register-legal-agreement-checkbox").hide(),z(".register-text-box").show(),z(".registration-form-main-select p.description").hide())}));var v,y=z("#bp-profile-avatar-type"),w=z("input[type=radio][name=bp-default-profile-avatar-type]"),k=(z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),z(".default-profile-avatar-type")),x=z(".default-profile-avatar-custom"),C=z(".enable-profile-gravatar-field"),D=z(".bb-wordpress-profile-gravatar-warning"),B=z(".preview-avatar-cover-image"),I=B.find(".web-preview-wrap"),P=B.find(".app-preview-wrap");y.length&&z(y).change(function(){k.addClass("bp-hide"),x.addClass("bp-hide"),D.addClass("bp-hide"),C.addClass("bp-hide");var e="",t=I.find(".preview-item-avatar img");B.find(".preview_avatar_cover").removeClass("has-avatar"),"BuddyBoss"===z(this).val()?(C.removeClass("bp-hide"),k.removeClass("bp-hide"),v=z("input[type=radio][name=bp-default-profile-avatar-type]:checked").val(),e=z("."+v+"-profile-avatar").prop("src"),"custom"===v&&(x.removeClass("bp-hide"),void 0!==(e=z("#bp-default-user-custom-avatar").val()).length&&0==e.length&&(e=t.attr("data-blank-avatar")))):"WordPress"===z(this).val()&&(BP_ADMIN.avatar_settings.wordpress_show_avatar||D.removeClass("bp-hide"),e=t.attr("data-wordpress-avatar")),void 0!==e.length&&0'+t+"")}),z(this).closest("td").find("select.extension-icon").parent().append('"),e=z(this).closest("td").find(".extension-icon").val(),t=z(this).closest("td").find(".extension-icon option:selected").text(),z(this).closest("td").find(".icon-select-main .icon-select-button").html(''+t+""))})}z("#bp_member_avatar_settings .image-width-height").length&&(T=z("select#bb-cover-profile-width").find("option:selected").val(),E=z("select#bb-cover-profile-height").find("option:selected").val(),z("#bp_member_avatar_settings").on("change","select#bb-cover-profile-width, select#bb-cover-profile-height",function(e){e.preventDefault(),U=!0,("bb-cover-profile-width"===z(this).attr("id")&&T===z(this).val()||"bb-cover-profile-height"===z(this).attr("id")&&E===z(this).val())&&(U=!1),"bb-cover-profile-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("#bp_groups_avatar_settings .image-width-height").length&&(Q=z("select#bb-cover-group-width").find("option:selected").val(),S=z("select#bb-cover-group-height").find("option:selected").val(),z("#bp_groups_avatar_settings").on("change","select#bb-cover-group-width, select#bb-cover-group-height",function(e){e.preventDefault(),U=!0,("bb-cover-group-width"===z(this).attr("id")&&Q===z(this).val()||"bb-cover-group-height"===z(this).attr("id")&&S===z(this).val())&&(U=!1),"bb-cover-group-height"===z(this).attr("id")&&("small"===z(this).val()?z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").removeClass("large-image"):z(".preview_avatar_cover .web-preview-wrap .preview-item-cover").addClass("large-image"))})),z("body.buddyboss_page_bp-settings").on("click",'input[name="submit"]',function(e){if(U&&(z("#bp_member_avatar_settings").length||z("#bp_groups_avatar_settings").length)){var t=BP_ADMIN.cover_size_alert.profile;return z("#bp_groups_avatar_settings").length&&(t=BP_ADMIN.cover_size_alert.group),!!confirm(t)||(e.preventDefault(),!1)}return!0}),z(".preview-switcher .button").on("click",function(e){e.preventDefault();e=z(this).attr("href");z(this).closest(".preview-switcher-main").find(".preview-block.active").removeClass("active"),z(e).addClass("active"),z(this).addClass("button-primary").siblings().removeClass("button-primary")}),z('.profile-header-style input[type="radio"], .group-header-style input[type="radio"]').on("change",function(){z(".web-preview-wrap .preview-item-avatar").removeClass("left-image").removeClass("centered-image").addClass(z(this).val()+"-image")}),z("#bp_profile_list_settings").on("change",'.member-directory-profile-actions input[type="checkbox"]',function(){var i=[],o=[],n=BP_ADMIN.member_directories.profile_action_btn;z('.member-directory-profile-actions input[type="checkbox"]:checked').each(function(e,t){i.push(t.value),o.push(BP_ADMIN.member_directories.profile_actions.filter(function(e){return e.element_name===t.value}))}),z(".member-directory-profile-primary-action select").find("option:not(:first)").remove(),z.each(o,function(e,t){var i;void 0!==t[0]&&void 0!==t[0].element_name&&void 0!==t[0].element_label&&(i=!1,n===t[0].element_name&&(i=!0),z(".member-directory-profile-primary-action select").append(z("").attr("value",t[0].element_name).text(t[0].element_label).attr("selected",i)))}),0===i.length?(z(".member-directory-profile-primary-action").addClass("bp-hide"),z(".member-directory-profile-primary-action select").find("option:eq(0)").prop("selected",!0)):z(".member-directory-profile-primary-action").removeClass("bp-hide")}),z(document).on("click","table.extension-listing #btn-add-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_document_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_document_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_document_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_document_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_document_extensions_support["+i+"][extension]"),z(this).find("select.extension-icon").attr("name","bp_document_extensions_support["+i+"][icon]"),z(this).find("select.extension-icon").attr("data-name","bp_document_extensions_support["+i+"][icon]"),z(this).find("input.extension-mime").attr("name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_document_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_document_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_document_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_document_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),z(document).on("click","table.extension-listing #btn-add-video-extensions",function(){var e=z(this).closest("table.extension-listing"),t=z(this).closest("table.extension-listing").find("tbody tr.custom-extension-data").html(),i=1;e.find("tbody").append(' "),q(),e.find("tbody tr.extra-extension").each(function(){z(this).find("input.extension-check").attr("name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-check").attr("data-name","bp_video_extensions_support["+i+"][is_active]"),z(this).find("input.extension-name").attr("name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-name").attr("data-name","bp_video_extensions_support["+i+"][name]"),z(this).find("input.extension-hidden").attr("name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-hidden").attr("data-name","bp_video_extensions_support["+i+"][hidden]"),z(this).find("input.extension-extension").attr("name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-extension").attr("data-name","bp_video_extensions_support["+i+"][extension]"),z(this).find("input.extension-mime").attr("name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-mime").attr("data-name","bp_video_extensions_support["+i+"][mime_type]"),z(this).find("input.extension-desc").attr("name","bp_video_extensions_support["+i+"][description]"),z(this).find("input.extension-desc").attr("data-name","bp_video_extensions_support["+i+"][description]"),z(this).find("a.btn-check-mime-type").attr("id","bp_video_extensions_support["+i+"][mime_type]"),i+=1}),i=parseInt(z(".extension-listing tr.default-extension").length)}),q(),z(document).on("click",".custom-extension-list-select li",function(){var e=z(this).find("i").attr("class"),t=''+this.innerText+"";z(this).closest("td").find(".icon-select-main .icon-select-button").html(t),z(this).closest("td").find(".icon-select-main .custom-extension-list").toggle(),z(this).closest("td").find('select.extension-icon option[value="'+e+'"]').attr("selected","selected"),z(this).closest(".icon-select-main").siblings(".bb-icon").length&&z(this).closest(".icon-select-main").siblings(".bb-icon").attr("class","bb-icon "+e)}),z(document).on("click",".icon-select-main .icon-select-button",function(){z(this).siblings(".custom-extension-list").toggle()}),z(document).on("click","table.extension-listing #btn-remove-extensions",function(){var e=z(this).closest("table.extension-listing");z(this).closest("tr").remove();var t=parseInt(z(".extension-listing tr.extra-extension").length),t=1,i="bp_document";0').insertBefore(t));var e=document.getElementById("bp-hello-backdrop"),t=document.querySelector("#bp-hello-container:not(.bb-onload-modal)");null!==e&&(document.body.classList.add("bp-disable-scroll"),e.style.display="",t.style.display="",t=t.querySelectorAll("a[href], button"),(t=Array.prototype.slice.call(t))[0].focus())}),document.addEventListener("click",function(e){var t=document.getElementById("bp-hello-backdrop");t&&document.getElementById("bp-hello-container")&&(t=t.contains(e.target),(e.target.classList.contains("close-modal")||t)&&(z(e.target).closest("#bp-hello-container").hide(),z(document).find("#bp-document-file-input").val(""),z(document).find(".show-document-mime-type").hide(),z(document).find(".show-document-mime-type input#mime-type").val("")))},!1),z(document).on("click",".bp-show-moderation-alert",function(){var e=z(this).attr("data-action");z("#bp-hello-backdrop").show(),z("#bp-hello-container").find(".bp-spam-action-msg").hide(),z("#bp-hello-container").find(".bp-not-spam-action-msg").hide(),"spam"===e?z("#bp-hello-container").find(".bp-spam-action-msg").show():"not-spam"===e&&z("#bp-hello-container").find(".bp-not-spam-action-msg").show(),z("#bp-hello-container").show().addClass("deactivation-popup")}),z(document).on("click",".bp-show-deactivate-popup a",function(e){e.preventDefault(),z("#bp-hello-container").find(".bp-hello-content").empty(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").attr("data-redirect",z(this).attr("href")),z("#bp-hello-container").find(".bp-hello-content").append(z(this).parent().closest(".row-actions").find(".component-deactivate-msg").text())}),z(document).on("click",".close-modal",function(){z("#bp-hello-backdrop").hide(),z("#bp-hello-container").hide().removeClass("deactivation-popup"),z("#bp-hello-container").find(".component-deactivate").removeClass("form-submit")}),z(document).on("click",".component-deactivate",function(e){e.preventDefault(),z(this).hasClass("form-submit")?z("form#bp-admin-component-form").find('input[name="bp-admin-component-submit"]').trigger("click"):window.location=z(this).attr("data-redirect")}),z("form#bp-admin-component-form").submit(function(e){var t=(t=z('#bulk-action-selector-top[name="action"]').find(":selected").val())||z('#bulk-action-selector-top[name="action2"]').find(":selected").val(),i=!1,o="";z(".mass-check-deactivate").each(function(){1==z(this).prop("checked")&&(i=!0),o+=z(this).parent().find(".component-deactivate-msg").text()}),z("#bp-hello-container").find(".component-deactivate").hasClass("form-submit")||"inactive"!==t||!0!==i||(z("#bp-hello-container").find(".bp-hello-content").empty(),o&&(e.preventDefault(),z("#bp-hello-backdrop").show(),z("#bp-hello-container").show().addClass("deactivation-popup"),z("#bp-hello-container").find(".bp-hello-content").html(o),z("#bp-hello-container").find(".component-deactivate").addClass("form-submit")))}),z(document).on("change","#bp_moderation_settings_reporting .bpm_reporting_content_content_label > input",function(){z(this).prop("checked")?z(this).parent().next("label").removeClass("is_disabled").find('input[type="checkbox"]').prop("disabled",!1):z(this).parent().next("label").addClass("is_disabled").find('input[type="checkbox"]').removeProp("checked").removeAttr("checked").prop("disabled","disabled"),z('label[for="bpm_reporting_email_notification"]').removeClass("is_disabled"),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled"))}),0===z(".bpm_reporting_content_content_label > input:checked").length&&(z("#bpm_reporting_email_notification").prop("checked",!1),z('label[for="bpm_reporting_email_notification"]').addClass("is_disabled")),z(document).on("click",".bp-suspend-user, .bp-unsuspend-user",function(){var e=z(this).attr("data-action");return"suspend"===e?confirm(BP_ADMIN.moderation.suspend_confirm_message):"unsuspend"===e?confirm(BP_ADMIN.moderation.unsuspend_confirm_message):void 0}),z(document).on("click",".notification-defaults",function(){z(this).next(".manage-defaults").hasClass("manage-defaults-hide")?z(this).next(".manage-defaults").removeClass("manage-defaults-hide"):z(this).next(".manage-defaults").addClass("manage-defaults-hide")}),z(document).on("click",".bb-notification-checkbox",function(){!1===z(this).prop("checked")?z(this).parents(".field-block").find(".manage-defaults .field-wrap").addClass("disabled"):z(this).parents(".field-block").find(".manage-defaults .field-wrap").removeClass("disabled")}),void 0===BP_ADMIN.post_type||"object"!=typeof jQuery.wp||"function"!=typeof jQuery.wp.wpColorPicker||(L=BP_ADMIN.post_type)&&(z("#"+L+"-label-background-color").length&&z("#"+L+"-label-background-color").wpColorPicker(),z("#"+L+"-label-text-color").length&&z("#"+L+"-label-text-color").wpColorPicker(),z("#"+L+"-label-color-type").length&&z(document).on("change","#"+L+"-label-color-type",function(e){e.preventDefault(),"default"===z(this).val()?z("#"+L+"-color-settings").hide():z("#"+L+"-color-settings").show()}),z(".wp-picker-input-wrap .wp-picker-clear").click(function(e){e.preventDefault();var t=z(this).closest("span").find(".wp-color-picker").attr("id");L+"-label-background-color"!==t||(e=void 0!==BP_ADMIN.background_color?BP_ADMIN.background_color:"")&&(z("#"+L+"-label-background-color").val(e),z("#"+L+"-background-color-colorpicker .wp-color-result").css("background-color",e)),L+"-label-text-color"!==t||(t=void 0!==BP_ADMIN.color?BP_ADMIN.color:"")&&(z("#"+L+"-label-text-color").val(t),z("#"+L+"-text-color-colorpicker .wp-color-result").css("background-color",t))})),z(document).on("click",".bb-hide-pw",function(e){e.preventDefault();var t=z(this),i=t.closest(".password-toggle").find("input"),e=i.data("type")?i.data("type"):"text";t.toggleClass("bb-show-pass"),t.hasClass("bb-show-pass")?i.attr("type",e):i.attr("type","password")}),void 0!==z.fn.select2&&(0 '+e.replace(o,i)+" "),t.prev(".registration-restrictions-lastindex").val(i),n()}),z(document).on("click",".registration-restrictions-listing .registration-restrictions-rule-remove",function(e){e.preventDefault();var t=z(e.currentTarget),i=t.parents(".bb-domain-restrictions-listing"),e=parseInt(t.prev(".registration-restrictions-lastindex").val())-1;t.closest(".registration-restrictions-rule").hasClass("custom")||(t.closest(".registration-restrictions-rule").remove(),t.parents(".registration-restrictions-listing").find(".registration-restrictions-lastindex").val(e)),void 0!==i&&0