/*! Custom Sidebars - v3.2.2 * https://premium.wpmudev.org/project/custom-sidebars-pro/ * Copyright (c) 2018; * Licensed GPLv2+ */ jQuery(function(){var a=jQuery(document),b=function(a){var b=jQuery(this),c=b.closest(".csb-option-row"),d=b.closest(".widget"),e="."+jQuery.trim(c.attr("class").replace("csb-option-row","")),f=d.find('[data-for="'+e+'"]'),g=c.find("input, select, textarea");return a.preventDefault(),f.show(),c.fadeOut(400,function(){g.val("").trigger("change.select2"),d.trigger("csb:update")}),!1},c=function(a){jQuery(".csb-action .dropdown:visible").hide()},d=function(a){var b=jQuery(this),d=b.data("for"),e=b.closest(".widget"),f=e.find(".csb-always"),g=e.find(d);return a.preventDefault(),g.show(),b.hide(),f.hide(),c(),e.trigger("csb:update"),!1},e=function(){var a=jQuery(this).closest(".widget"),b=a.find(".csb-always"),c=a.find(".csb-option-row:visible:not(.csb-action,.csb-always)");0===c.length?b.show():(b.hide(),c.find(".csb-and").show(),c.first().find(".csb-and").hide()),wpmUi.upgrade_multiselect(a)},f=function(b){var d=jQuery(this),e=d.closest(".csb-option-row"),f=e.find(".dropdown");return b.preventDefault(),f.show(),a.one("click",c),!1},g=function(a){var b=jQuery(this),c=b.closest(".widget"),d=c.find(".csb-visibility-inner"),e=d.find(".csb-visible-flag");return a.preventDefault(),"0"===e.val()?(e.val("1"),d.show(),c.trigger("csb:update")):(e.val("0"),d.hide()),!1},h=function(a){var b=jQuery(this).closest("label"),c=b.closest(".widget"),d="#"+b.attr("for"),e=c.find(d),f=e.val(),g=c.find(".lbl-show-if"),h=c.find(".lbl-hide-if");return a.preventDefault(),"show"!==f?(g.show(),h.hide(),e.val("show")):(g.hide(),h.show(),e.val("hide")),!1},i=function(a){var b=jQuery(this).closest("label"),c=b.closest(".csb-detail-row"),d=b.find("input[type=checkbox]"),e=b.find(".lbl"),f=c.find(".detail"),g=f.find("input,select,textarea");d.prop("checked")?(e.text(d.data("lbl-single")),f.show()):(e.text(d.data("lbl-all")),f.hide(),g.val("").trigger("change.select2"))},j=function(a){var b,c=jQuery(this),d=c.closest(".csb-option-row"),e=d.find(".csb-detail-row"),f=c.val();if(e.addClass("csb-hide"),f)for(b=0;b