AlkantarClanX12

Your IP : 3.149.24.192


Current Path : /home/thanudqk/thepball.com/wp-content/themes/astra/assets/js/minified/
Upload File :
Current File : /home/thanudqk/thepball.com/wp-content/themes/astra/assets/js/minified/customizer-dependency.min.js

!function(o){"use strict";var u=wp.customize,e={controls:{},init:function(){var i=this;i.handleDependency(),i.hideEmptySections(),u.bind("change",function(e,n){i.hasDependentControls(e.id)&&(i.handleDependency(),i.hideEmptySections())})},hasDependentControls:function(a){var s=!1;return o.each(astra.config,function(e,n){if(_.isUndefined(n.conditions)){var i=n[0];if(a==i)return void(s=!0)}else{var t=n.conditions;o.each(t,function(e,n){var i=n[0];a!=i||(s=!0)})}}),s},handleDependency:function(){var t=this,e=u.get();t.checked_controls={},_.each(e,function(e,n){var i=u.control(n);t.checkControlVisibility(i,n)})},checkControlVisibility:function(e,n){var i=u.get();if(!_.isUndefined(e)&&void 0!==astra.config[n]){var t=!1,a=astra.config[n],s=_.isUndefined(a.conditions)?a:a.conditions,o=_.isUndefined(a.operator)?"AND":a.operator;void 0!==s&&(t=this.checkDependency(s,i,o),(this.checked_controls[n]=t)?e.container.removeClass("ast-hide"):e.container.addClass("ast-hide"))}},checkDependency:function(e,r,d){var f=this,l=!0,h=!1,n=e[0];if(_.isString(n)){var i,t=e[1],a=e[2];if(!_.isUndefined(astra.config[n])){e=_.isUndefined(astra.config[n].conditions)?astra.config[n]:astra.config[n].conditions;var s=_.isUndefined(astra.config[n].operator)?"AND":astra.config[n].operator;if(!_.isUndefined(e))if(f.checkDependency(e,r,s))u.control(n).container.removeClass("ast-hide");else if(l=!(h=!0),"AND"==d)return}_.isUndefined(r[n])||h||!l||(i=r[n],l=f.compareValues(i,t,a))}else _.isArray(n)&&(o.each(e,function(e,n){var i=n[0],t=n[1],a=n[2],s=_.isUndefined(r[i])?"":r[i];if(void 0!==astra.config[i]){var o=_.isUndefined(astra.config[i].conditions)?astra.config[i]:astra.config[i].conditions,c=_.isUndefined(astra.config[i].operator)?"AND":astra.config[i].operator;if(!_.isUndefined(o))if(f.checkDependency(o,r,c))l=!0,u.control(i).container.removeClass("ast-hide");else if(l=!1,"AND"==d)return}else l=!0;if(l)if("AND"==d){if(!f.compareValues(s,t,a))return l=!1}else l=!!f.compareValues(s,t,a)&&(h=!0)}),h&&"OR"==d&&(l=!0));return l},hideEmptySections:function(){o("ul.accordion-section.control-section-ast_section").each(function(){var e=o(this).attr("id"),n=!1,i=o(this).find(" > .customize-control");0<i.length&&(i.each(function(){o(this).hasClass("ast-hide")||"none"==o(this).css("display")||(n=!0)}),n?o('.control-section[aria-owns="'+e+'"]').removeClass("ast-hide"):o('.control-section[aria-owns="'+e+'"]').addClass("ast-hide"))})},compareValues:function(e,n,i){var t=!1;switch(n){case"===":t=e===i;break;case">":t=i<e;break;case"<":t=e<i;break;case"<=":t=e<=i;break;case">=":t=i<=e;break;case"!=":t=e!=i;break;case"empty":var a=_.clone(e);t=_.isObject(a)||_.isArray(a)?(_.each(a,function(e,n){_.isEmpty(e)&&delete a[n]}),!!_.isEmpty(a)):!(!_.isNull(a)&&""!=a);break;case"not_empty":a=_.clone(e);(_.isObject(a)||_.isArray(a))&&_.each(a,function(e,n){_.isEmpty(e)&&delete a[n]}),t=!_.isEmpty(a);break;case"contains":_.isArray(e)&&-1!==o.inArray(i,e)&&(t=!0);break;default:t=_.isArray(i)?!_.isEmpty(i)&&!_.isEmpty(e)&&_.contains(i,e):e==i}return t}};o(function(){e.init()})}(jQuery);