File Editor
Directories:
.. (Back)
src
Files:
buttons-customizer-preview.js
customizer-controls.min.js
customizer-notices-handler.js
customizer.js
hestia-elementor-notice.js
hestia-pagebuilder.js
typography-customizer-preview.js
zerif-frontpage-import-notice.js
Create New File
Create
Edit File: customizer-controls.min.js
function acp_get_alpha_value_from_color(e){var t;return t=(e=e.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(e.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),parseInt(t)):100}function acp_update_alpha_value_on_color_control(e,t,i,r){var o,n,a;o=t.data("a8cIris"),n=t.data("wpWpColorPicker"),o._color._alpha=e,a=o._color.toString(),t.val(a),n.toggler.css({"background-color":a}),r&&acp_update_alpha_value_on_alpha_slider(e,i),t.wpColorPicker("color",a)}function acp_update_alpha_value_on_alpha_slider(e,t){t.slider("value",e),t.find(".ui-slider-handle").text(e.toString())}function media_upload(e){"use strict";jQuery("body").on("click",e,function(){var i="#"+jQuery(this).attr("id"),r=jQuery(this).parent().children("input:text"),o=!0;return wp.media.editor.send.attachment=function(e,t){if(!o)return wp.media.editor.send.attachment(i,[e,t]);if(void 0!==r)switch(e.size){case"full":r.val(t.sizes.full.url),r.trigger("change");break;case"medium":r.val(t.sizes.medium.url),r.trigger("change");break;case"thumbnail":r.val(t.sizes.thumbnail.url),r.trigger("change");break;default:r.val(t.url),r.trigger("change")}o=!1},wp.media.editor.open(e),!1})}function customizer_repeater_uniqid(e,t){"use strict";var i,r;void 0===e&&(e="");var o=function(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?new Array(t-e.length+1).join("0")+e:e};return r||(r={}),r.uniqidSeed||(r.uniqidSeed=Math.floor(123456789*Math.random())),r.uniqidSeed++,i=e,i+=o(parseInt((new Date).getTime()/1e3,10),8),i+=o(r.uniqidSeed,5),t&&(i+=(10*Math.random()).toFixed(8).toString()),i}function customizer_repeater_refresh_social_icons(e){"use strict";var r=[];e.find(".customizer-repeater-social-repeater-container").each(function(){var e=jQuery(this).find(".icp").val(),t=jQuery(this).find(".customizer-repeater-social-repeater-link").val(),i=jQuery(this).find(".customizer-repeater-social-repeater-id").val();i||(i="customizer-repeater-social-repeater-"+customizer_repeater_uniqid(),jQuery(this).find(".customizer-repeater-social-repeater-id").val(i)),""!==e&&""!==t&&r.push({icon:e,link:t,id:i})}),e.find(".social-repeater-socials-repeater-colector").val(JSON.stringify(r)),customizer_repeater_refresh_general_control_values()}function customizer_repeater_refresh_general_control_values(){"use strict";jQuery(".customizer-repeater-general-control-repeater").each(function(){var f=[],e=jQuery(this);e.find(".customizer-repeater-general-control-repeater-container").each(function(){var e=jQuery(this).find(".icp").val(),t=jQuery(this).find(".customizer-repeater-text-control").val(),i=jQuery(this).find(".customizer-repeater-link-control").val(),r=jQuery(this).find(".customizer-repeater-text2-control").val(),o=jQuery(this).find(".customizer-repeater-link2-control").val(),n=jQuery(this).find("input.customizer-repeater-color-control").val(),a=jQuery(this).find("input.customizer-repeater-color2-control").val(),c=jQuery(this).find(".custom-media-url").val(),s=jQuery(this).find(".customizer-repeater-image-choice").val(),l=jQuery(this).find(".customizer-repeater-title-control").val(),u=jQuery(this).find(".customizer-repeater-subtitle-control").val(),p=jQuery(this).find(".social-repeater-box-id").val();p||(p="social-repeater-"+customizer_repeater_uniqid(),jQuery(this).find(".social-repeater-box-id").val(p));var d=jQuery(this).find(".social-repeater-socials-repeater-colector").val(),h=jQuery(this).find(".customizer-repeater-shortcode-control").val();""===t&&""===c&&""===l&&""===u&&""===e&&""===i&&""===s&&""===d&&""===h&&""===n||f.push({icon_value:"customizer_repeater_none"===s?"":e,color:n,color2:a,text:escapeHtml(t),link:i,text2:escapeHtml(r),link2:o,image_url:"customizer_repeater_none"===s?"":c,choice:s,title:escapeHtml(l),subtitle:escapeHtml(u),social_repeater:escapeHtml(d),id:p,shortcode:escapeHtml(h)})}),e.find(".customizer-repeater-colector").val(JSON.stringify(f)),e.find(".customizer-repeater-colector").trigger("change")})}jQuery(document).ready(function(){"use strict";jQuery.aboutBackground={init:function(){this.updateBackgroundControl(),this.updateBackgroundControlBuffer(),this.focusMenu(),this.updateEditorLink()},updateBackgroundControl:function(){wp.customize("page_on_front",function(e){e.bind(function(e){jQuery.ajax({type:"POST",data:{action:"update_image_buffer",pid:e,nonce:imageObject.imagenonce},url:imageObject.ajaxurl,success:function(e){var t,i=e.data;t=""!==i&&"undefined"!==i?'<label for="hestia_feature_thumbnail-button"><span class="customize-control-title">About background</span></label><div class="attachment-media-view attachment-media-view-image landscape"><div class="thumbnail thumbnail-image"><img class="attachment-thumb" src="'+i+'" draggable="false" alt=""> </div><div class="actions"><button type="button" class="button remove-button">Remove</button><button type="button" class="button upload-button control-focus" id="hestia_feature_thumbnail-button">Change Image</button> <div style="clear:both"></div></div></div>':'<label class="customize-control-title" for="customize-media-control-button-105">About background</label><div class="customize-control-notifications-container" style="display: none;"><ul></ul></div><div class="attachment-media-view">\n<div class="placeholder">No image selected</div><div class="actions"><button type="button" class="button default-button">Default</button><button type="button" class="button upload-button" id="customize-media-control-button-105">Select image</button></div></div>',wp.customize.control("hestia_feature_thumbnail").container[0].innerHTML=t,wp.customize.instance("hestia_feature_thumbnail").previewer.refresh()}})})})},updateBackgroundControlBuffer:function(){wp.customize("hestia_feature_thumbnail",function(e){e.bind(function(e){jQuery.ajax({type:"POST",url:imageObject.ajaxurl,data:{action:"update_image_buffer",value:e,nonce:imageObject.imagenonce}})})})},focusMenu:function(){wp.customize.previewer.bind("trigger-focus-menu",function(){wp.customize.section("menu_locations").focus()})},updateEditorLink:function(){wp.customize("page_on_front",function(e){e.bind(function(e){if(void 0!==wp.customize.control("hestia_shortcut_editor")){var t=wp.customize.control("hestia_shortcut_editor").container[0].innerHTML.replace(/(post=).*?(&)/,"$1"+e+"$2");wp.customize.control("hestia_shortcut_editor").container[0].innerHTML=t}})})}},jQuery.aboutBackground.init(),wp.customize("hestia_team_content",function(e){e.bind(function(){var i,r="";jQuery.isFunction(wp.customize._value.hestia_authors_on_blog)&&(i=wp.customize._value.hestia_authors_on_blog()),jQuery("#customize-control-hestia_team_content .customizer-repeater-general-control-repeater-container").each(function(){var e=jQuery(this).find(".customizer-repeater-title-control").val(),t=jQuery(this).find(".social-repeater-box-id").val();void 0!==e&&""!==e&&void 0!==t&&""!==t&&(r+='<option value="'+t+'" ',i&&"undefined"!==i&&-1!==i.indexOf(t)&&(r+="selected"),r+=">"+e+"</option>")}),jQuery("#customize-control-hestia_authors_on_blog .repeater-multiselect-team").html(r)})}),void 0!==wp.customize.control("hestia_placeholder_sidebar_1")&&wp.customize.control("hestia_placeholder_sidebar_1").section("sidebar-widgets-sidebar-1"),void 0!==wp.customize.control("hestia_placeholder_sidebar_woocommerce")&&wp.customize.control("hestia_placeholder_sidebar_woocommerce").section("sidebar-widgets-sidebar-woocommerce"),jQuery(document).on("click",".quick-links a",function(e){e.preventDefault(),e.stopPropagation();var t=jQuery(this).data("control-focus");t&&(wp.customize.control(t).focus(),jQuery("label."+t).click());var i=jQuery(this).data("section-focus");i&&wp.customize.section(i).focus()}),jQuery(".focus-customizer-header-image").on("click",function(e){e.preventDefault(),wp.customize.section("header_image").focus()});var i=wp.customize;void 0!==i&&i.hasOwnProperty("previewer")&&(i.previewer.bind("hestia-customize-disable-section",function(e){jQuery("[data-customize-setting-link="+e+"]").trigger("click")}),i.previewer.bind("hestia-customize-focus-control",function(e){wp.customize.control(e).focus()})),i.control("header_video",function(t){t.deferred.embedded.done(function(){var e=function(){i.section(t.section()).notifications.remove("video_header_not_available")};e(),t.active.bind(e)})}),wp.customize.section("hestia_navigation").expanded.bind(function(e){if(e&&0===jQuery("#customize-control-hestia_cart_icon").length){var t=jQuery("#customize-control-hestia_cart_icon_status input:checkbox");if(0===jQuery("#customize-control-hestia_mobile_menu_icon").length){var i=(t=jQuery("#customize-control-hestia_mobile_menu_icon_status input:checkbox")).next("label");0===i.find(".dashicons-lock").length&&(t.attr("readonly",!0),i.html(i.html()+' <span class="dashicons dashicons-lock"></span>'),t.parents("li").addClass("customize-locked-control"))}}}),wp.customize.control("hestia_cart_icon",function(e){e.container.on("change","input:radio",function(){"code"===jQuery(this).val()?jQuery("#customize-control-hestia_cart_custom_icon").addClass("hestia-show-custom-icon"):jQuery("#customize-control-hestia_cart_custom_icon").removeClass("hestia-show-custom-icon")}),jQuery("input:radio:checked",e.container).trigger("change")}),wp.customize.control("hestia_cart_icon_status",function(e){e.container.on("change","input:checkbox",function(){jQuery(this).is(":checked")?jQuery("#customize-control-hestia_cart_icon").fadeIn("show"):jQuery("#customize-control-hestia_cart_icon").fadeOut()}),jQuery("input:checkbox:checked",e.container).trigger("change")})}),Color.prototype.toString=function(e){if("no-alpha"==e)return this.toCSS("rgba","1").replace(/\s+/g,"");if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var i=6-t.length-1;0<=i;i--)t="0"+t;return"#"+t},jQuery(document).ready(function(u){u(".alpha-color-control").each(function(){var n,r,e,t,a,i,c,s,o,l=(n=u(this)).attr("readonly");r=n.val().replace(/\s+/g,""),e=n.attr("data-palette"),t=n.attr("data-show-opacity"),a=n.attr("data-default-color"),i={change:function(e,t){var i,r,o;i=n.attr("data-customize-setting-link"),r=n.wpColorPicker("color"),a==r&&(o=acp_get_alpha_value_from_color(r),s.find(".ui-slider-handle").text(o)),wp.customize(i,function(e){e.set(r)}),c.find(".transparency").css("background-color",t.color.toString("no-alpha"))},palettes:-1!==e.indexOf("|")?e.split("|"):"false"!=e},n.wpColorPicker(i),c=n.parents(".wp-picker-container:first"),l&&c.addClass("pro-alpha-color"),u('<div class="alpha-color-picker-container"><div class="min-click-zone click-zone"></div><div class="max-click-zone click-zone"></div><div class="alpha-slider"></div><div class="transparency"></div></div>').appendTo(c.find(".wp-picker-holder")),s=c.find(".alpha-slider"),o={create:function(e,t){var i=u(this).slider("value");u(this).find(".ui-slider-handle").text(i),u(this).siblings(".transparency ").css("background-color",r)},value:acp_get_alpha_value_from_color(r),range:"max",step:1,min:0,max:100,animate:300},s.slider(o),"true"==t&&s.find(".ui-slider-handle").addClass("show-opacity"),c.find(".min-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(0,n,s,!0)}),c.find(".max-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(100,n,s,!0)}),c.find(".iris-palette").on("click",function(){var e,t;acp_update_alpha_value_on_alpha_slider(t=acp_get_alpha_value_from_color(e=u(this).css("background-color")),s),100!=t&&(e=e.replace(/[^,]+(?=\))/,(t/100).toFixed(2))),n.wpColorPicker("color",e)}),c.find(".button.wp-picker-clear").on("click",function(){var e=n.attr("data-customize-setting-link");n.wpColorPicker("color","#ffffff"),wp.customize(e,function(e){e.set("")}),acp_update_alpha_value_on_alpha_slider(100,s)}),c.find(".button.wp-picker-default").on("click",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(a),s)}),n.on("input",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(u(this).val()),s)}),s.slider().on("slide",function(e,t){acp_update_alpha_value_on_color_control(parseFloat(t.value)/100,n,s,!1),u(this).find(".ui-slider-handle").text(t.value)})})}),function(r){"use strict";wp.hestiaSelect={init:function(){var e=this;r(".hestia-fs-main-input, .hestia-fs-input-addon").on("click",function(e){return r(this).parent().toggleClass("active"),r(".hestia-ss-wrap.active .hestia-fs-search input").focus(),e.stopPropagation(),!1}),r(".hestia-fs-option").on("click",function(){var e=r(this).data("option"),t=r(".hestia-ss-wrap.active input.hestia-fs-main-input"),i=r(".hestia-ss-wrap.active .hestia-ss-collector");return r(".hestia-ss-wrap.active").removeClass("active"),t.val(e),"Default"===e&&(e=""),i.val(e),i.trigger("change"),!1}),r(".hestia-fs-search input").on("keyup",function(){return e.search(r(this)),!1}),r(document).mouseup(function(e){var t=r(".hestia-ss-wrap.active .hestia-fs-dropdown");t.is(e.target)||0!==t.has(e.target).length||r(".hestia-ss-wrap.active").removeClass("active")})},search:function(e){var t=jQuery(".hestia-ss-wrap.active .hestia-fs-options-wrapper"),i=e.val().toLowerCase();0<i.length?t.children().children(".hestia-fs-option").each(function(){0<r(this).filter("[data-filter*=".concat(i).concat("]")).length||i.length<1?r(this).show():r(this).hide()}):t.children().children().show()}},r(document).ready(function(){wp.hestiaSelect.init()})}(jQuery),function(i,e){"use strict";e.controlConstructor["select-multiple"]=e.Control.extend({ready:function(){var t=this;i("select",t.container).change(function(){var e=i(this).val();null===e?t.setting.set(""):t.setting.set(e)})}})}(jQuery,wp.customize),wp.customize.controlConstructor["range-value"]=wp.customize.Control.extend({ready:function(){"use strict";jQuery.fn.exists=function(){return 0<this.length};var e,t=this,i=jQuery("#customize-theme-controls");function r(e,t,i){switch(i){case"slider":var r=e.val();"text"===jQuery(t).attr("type")&&0<=r&&(r="+"+r),t.val(r);break;case"input":e.val(t.val())}}function n(e){var t=e.find(".range-collector"),i=function(e){var t,i,r,o={},n=e.find('.range-slider__range[data-query="desktop"]'),a=e.find('.range-slider__range[data-query="tablet"]'),c=e.find('.range-slider__range[data-query="mobile"]');n.exists()&&"undefined"!==(t=n.val())&&""!==t&&(o.desktop=t);a.exists()&&"undefined"!==(i=a.val())&&""!==i&&(o.tablet=i);c.exists()&&"undefined"!==(r=c.val())&&""!==r&&(o.mobile=r);return o}(e);1<Object.keys(i).length?t.val(JSON.stringify(i)):t.val(i.desktop),t.trigger("change")}i.unbind().on("click",".preview-desktop.active",function(){jQuery(".responsive-switchers").toggleClass("responsive-switchers-open")}),i.on("input",".range-slider__range",function(){var e=jQuery(this),t=jQuery(this).next(),i=jQuery(this).parent().parent();r(e,t,"slider"),n(i)}),i.on("keyup",".range-slider-value",function(){n(jQuery(this).parent().parent())}),i.on("keydown",".range-slider-value",function(){r(jQuery(this).prev(),jQuery(this),"input")}),i.on("click",".range-reset-slider",function(e){e.preventDefault();var t=jQuery(this).prev(),i=t.prev(),r=jQuery(this).parent().parent(),o=i.data("default");"text"===jQuery(t).attr("type")&&(o="+0"),t.val(o),i.val(o),n(r)}),e="postMessage"===t.setting.transport?"mousemove change":"change",this.container.on(e,".range-collector",function(){t.setting.set(jQuery(this).val())})}}),function(o){"use strict";wp.customizerRepeater={init:function(){o(".iconpicker-items>i").on("click",function(){var e=o(this).attr("class").toString(),t=o(this).parents(".iconpicker-popover").prev().find(".icp");t.val(e),t.attr("value",e);var i=t.next(".input-group-addon"),r='<i class="'+e+'"></i>';return i.empty(),i.append(r),t.trigger("change"),!1})},search:function(e){var t=e.parent().next().find(".iconpicker-items"),i=e.val().toLowerCase();0<i.length?t.children().each(function(){0<o(this).filter("[title*=".concat(i).concat("]")).length||i.length<1?o(this).show():o(this).hide()}):t.children().show()},iconPickerToggle:function(e){e.parent().next().addClass("iconpicker-visible")}},o(document).ready(function(){wp.customizerRepeater.init(),o(".iconpicker-search").on("keyup",function(){wp.customizerRepeater.search(o(this))}),o(".icp-auto").on("click",function(){wp.customizerRepeater.iconPickerToggle(o(this))}),o(document).mouseup(function(e){var t=o(".iconpicker-popover");t.is(e.target)||0!==t.has(e.target).length||t.removeClass("iconpicker-visible")})})}(jQuery),jQuery(document).ready(function(){"use strict";var e=jQuery("#customize-theme-controls");setTimeout(function(){jQuery(document).find("input.customizer-repeater-color-control").wpColorPicker(r),jQuery(document).find("input.customizer-repeater-color2-control").wpColorPicker(r)},500),e.on("click",".customizer-repeater-customize-control-title",function(){jQuery(this).next().slideToggle("medium",function(){jQuery(this).is(":visible")?(jQuery(this).prev().addClass("repeater-expanded"),jQuery(this).css("display","block")):jQuery(this).prev().removeClass("repeater-expanded")})}),e.on("change",".icp",function(){return customizer_repeater_refresh_general_control_values(),!1}),e.on("change",".customizer-repeater-image-choice",function(){return"customizer_repeater_image"===jQuery(this).val()&&(jQuery(this).parent().parent().find(".social-repeater-general-control-icon").hide(),jQuery(this).parent().parent().find(".customizer-repeater-image-control").show(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").prev().prev().hide(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").hide()),"customizer_repeater_icon"===jQuery(this).val()&&(jQuery(this).parent().parent().find(".social-repeater-general-control-icon").show(),jQuery(this).parent().parent().find(".customizer-repeater-image-control").hide(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").prev().prev().show(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").show()),"customizer_repeater_none"===jQuery(this).val()&&(jQuery(this).parent().parent().find(".social-repeater-general-control-icon").hide(),jQuery(this).parent().parent().find(".customizer-repeater-image-control").hide(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").prev().prev().hide(),jQuery(this).parent().parent().find(".customizer-repeater-color-control").hide()),customizer_repeater_refresh_general_control_values(),!1}),media_upload(".customizer-repeater-custom-media-button"),jQuery(".custom-media-url").on("change",function(){return customizer_repeater_refresh_general_control_values(),!1});var r={change:function(e,t){jQuery(e.target).val(t.color.toString()),customizer_repeater_refresh_general_control_values()}};e.on("click",".customizer-repeater-new-field",function(){var e=jQuery(this).parent(),t="customizer-repeater-"+customizer_repeater_uniqid();if(void 0!==e){var i=e.find(".customizer-repeater-general-control-repeater-container:first").clone(!0,!0);void 0!==i&&(i.find(".customizer-repeater-image-choice").val("customizer_repeater_icon"),i.find(".social-repeater-general-control-icon").show(),0<i.find(".social-repeater-general-control-icon").length&&i.find(".customizer-repeater-image-control").hide(),i.find(".social-repeater-general-control-remove-field").show(),i.find(".input-group-addon").find(".fa").attr("class","fa"),i.find(".customizer-repeater-social-repeater").find(".customizer-repeater-social-repeater-container").not(":first").remove(),i.find(".customizer-repeater-social-repeater-link").val(""),i.find(".social-repeater-socials-repeater-colector").val(""),i.find(".icp").val(""),i.find(".customizer-repeater-text-control").val(""),i.find(".customizer-repeater-link-control").val(""),i.find(".customizer-repeater-text2-control").val(""),i.find(".customizer-repeater-link2-control").val(""),i.find(".social-repeater-box-id").val(t),i.find(".custom-media-url").val(""),i.find(".customizer-repeater-title-control").val(""),i.find("div.customizer-repeater-color-control .wp-picker-container").replaceWith('<input type="text" class="customizer-repeater-color-control '+t+'">'),i.find("input.customizer-repeater-color-control").wpColorPicker(r),i.find("div.customizer-repeater-color2-control .wp-picker-container").replaceWith('<input type="text" class="customizer-repeater-color2-control '+t+'">'),i.find("input.customizer-repeater-color2-control").wpColorPicker(r),i.find(".customizer-repeater-subtitle-control").val(""),i.find(".customizer-repeater-shortcode-control").val(""),e.find(".customizer-repeater-general-control-repeater-container:first").parent().append(i),customizer_repeater_refresh_general_control_values())}return!1}),e.on("click",".social-repeater-general-control-remove-field",function(){return void 0!==jQuery(this).parent()&&jQuery(this).parent().hide(500,function(){jQuery(this).parent().remove(),customizer_repeater_refresh_general_control_values()}),!1}),e.on("keyup",".customizer-repeater-title-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-subtitle-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-shortcode-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-text-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-link-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-text2-control",function(){customizer_repeater_refresh_general_control_values()}),e.on("keyup",".customizer-repeater-link2-control",function(){customizer_repeater_refresh_general_control_values()}),jQuery(".customizer-repeater-general-control-droppable").sortable({axis:"y",update:function(){customizer_repeater_refresh_general_control_values()}}),e.on("click",".social-repeater-add-social-item",function(e){e.preventDefault();var t=jQuery(this).parent(),i="customizer-repeater-social-repeater-"+customizer_repeater_uniqid();if(void 0!==t){var r=t.find(".customizer-repeater-social-repeater-container:first").clone(!0,!0);void 0!==r&&(r.find(".icp").val(""),r.find(".input-group-addon").find(".fa").attr("class","fa"),r.find(".social-repeater-remove-social-item").show(),r.find(".customizer-repeater-social-repeater-link").val(""),r.find(".customizer-repeater-social-repeater-id").val(i),t.find(".customizer-repeater-social-repeater-container:first").parent().append(r))}return!1}),e.on("click",".social-repeater-remove-social-item",function(e){e.preventDefault();var t=jQuery(this).parent(),i=jQuery(this).parent().parent();return t.remove(),customizer_repeater_refresh_social_icons(i),!1}),e.on("keyup",".customizer-repeater-social-repeater-link",function(e){return e.preventDefault(),customizer_repeater_refresh_social_icons(jQuery(this).parent().parent()),!1}),e.on("change",".customizer-repeater-social-repeater-container .icp",function(e){return e.preventDefault(),customizer_repeater_refresh_social_icons(jQuery(this).parent().parent().parent()),!1})});var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function escapeHtml(e){"use strict";return e=String(e).replace(new RegExp("\r?\n","g"),"<br />"),e=String(e).replace(/\\/g,"\"),String(e).replace(/[&<>"'\/]/g,function(e){return entityMap[e]})}jQuery(window).on("load",function(){"use strict";var e=jQuery(".hestia-toggle-section");e.each(function(){var e,t=jQuery(this).data("control");void 0!==wp.customize.control(t)&&(e=wp.customize.control(t).setting.get());var i=jQuery(this).parent();if(void 0!==t&&""!==t){var r="dashicons-visibility";!0===e?(r="dashicons-hidden",i.addClass("hestia-section-hidden").removeClass("hestia-section-visible")):i.addClass("hestia-section-visible").removeClass("hestia-section-hidden"),jQuery(this).children().attr("class","dashicons "+r)}}),e.on("click",function(e){e.stopPropagation();var t=jQuery(this).data("control"),i=jQuery(this).parent(),r=wp.customize.control(t).setting.get();if(void 0!==t&&""!==t){var o="dashicons-visibility";!1===r?(o="dashicons-hidden",i.addClass("hestia-section-hidden").removeClass("hestia-section-visible")):i.addClass("hestia-section-visible").removeClass("hestia-section-hidden"),wp.customize.control(t).setting.set(!r),jQuery(this).children().attr("class","dashicons "+o)}}),jQuery("ul").find("[data-customize-setting-link]").on("click",function(){var e=jQuery(this).data("customize-setting-link");if(!(["hestia_big_title_hide","hestia_features_hide","hestia_about_hide","hestia_shop_hide","hestia_portfolio_hide","hestia_team_hide","hestia_pricing_hide","hestia_ribbon_hide","hestia_testimonials_hide","hestia_subscribe_hide","hestia_clients_bar_hide","hestia_blog_hide","hestia_contact_hide"].indexOf(e)<=-1)){var t=jQuery(this).parent().parent().parent().attr("id");t=t.replace("sub-","");var i=jQuery("#"+t).find(".accordion-section-title");if(void 0!==t&&""!==t&&wp.customize.control(e)&&wp.customize.control(e).setting){var r="dashicons-visibility";!1===wp.customize.control(e).setting.get()?(r="dashicons-hidden",i.addClass("hestia-section-hidden").removeClass("hestia-section-visible")):(i.addClass("hestia-section-visible"),i.removeClass("hestia-section-hidden")),i.find(".hestia-toggle-section").children().attr("class","dashicons "+r)}}})}),function(e,w){var t=w.Control.extend({ready:function(){var b=this;b.container.find(".buttonset").buttonset(),w.bind("ready",function(){w(b.id,function(e){var t=function(e){var t,i,r,o,n,a,c,s,l,u,p=b.params.subcontrols,d=b.section(),h=wp.customize.section(d).container,f=e,m=p[f];if(void 0!==b.params.parent){var _=b.params.parent,v=wp.customize.control(_);if(void 0!==v){var g=v.setting._value,y=v.params.subcontrols[g];void 0!==y&&0===y.length&&(m=[])}}var z=Object.values(p);for(t in z=[].concat.apply([],z))if("widgets"===(o=z[t]))jQuery(h).children('li[class*="widget"]').css("display","none");else{if(void 0!==(a=wp.customize.control(o)).params.subcontrols)for(i in a.params.subcontrols)for(r in a.params.subcontrols[i])n=w.control(a.params.subcontrols[i][r]).selector,jQuery(n).hide();void 0!==a&&(n=a.selector,jQuery(n).hide())}for(t in m)if("widgets"===(o=m[t]))jQuery(h).children('li[class*="widget"]').css("display","list-item");else if(void 0!==(a=wp.customize.control(o))&&(n=a.selector,jQuery(n).show(),f=a.setting._value,void 0!==wp.customize.control(o).params.subcontrols))for(i in l=wp.customize.control(o).params.subcontrols[f])u=l[i],void 0!==(c=wp.customize.control(u))&&(s=c.selector,jQuery(s).show())};t(e.get()),e.bind(t)})})}});w.controlConstructor["radio-image"]=t,w.controlConstructor["select-hiding"]=t}(jQuery,wp.customize);var hestia_customize_scroller=function(i){"use strict";i(function(){var t=wp.customize;i('ul[id*="hestia_frontpage_sections"] .accordion-section').not(".panel-meta").each(function(){i(this).on("click",function(){var e=i(this).attr("aria-owns").split("_").pop();t.previewer.send("clicked-customizer-section",e)})})})};hestia_customize_scroller(jQuery),wp.customize.controlConstructor["interface-tabs"]=wp.customize.Control.extend({ready:function(){wp.customize.previewer.bind("tab-previewer-edit",function(e){jQuery(e.selector).trigger("click")}),wp.customize.previewer.bind("focus-control",function(e){setTimeout(function(){void 0!==wp.customize.control(e)&&wp.customize.control(e).focus()},100)}),wp.customize.previewer.bind("focus-section",function(e){setTimeout(function(){wp.customize.section(e).focus()},100)}),wp.customize.previewer.bind("ready",function(){for(var e=window.location.search.substr(1).split("&"),t={},i=0;i<e.length;i++){var r=e[i].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}void 0!==t["autofocus[control]"]&&""!==t["autofocus[control]"]&&jQuery('li[id^="customize-control-sidebars_widgets"]').on("DOMNodeInserted",function(){jQuery(".hestia-customizer-tab > label."+t["autofocus[control]"]).trigger("click")})}),this.init(),this.handleClick()},init:function(){var n=this,a=n.section();setTimeout(function(){jQuery('li[id^="customize-control-hestia_"]').each(function(){jQuery(this).on("DOMNodeInserted",function(){jQuery(".hestia-customizer-tab.active > label").trigger("click")})})},100),wp.customize.bind("ready",function(){n.hideAllControls(a);var e=Object.keys(n.params.controls)[0],t=n.params.controls[e],i=[];for(var r in t)if(t.hasOwnProperty(r)){if(!1===jQuery.isEmptyObject(t[r])&&void 0!==wp.customize.control(r)){var o=wp.customize.control(r).setting._value;i=i.concat(t[r][o])}i.push(r)}n.showControls(i,a)})},hideAllControls:function(e){var t=wp.customize.section(e).controls(),i=this.id,r=["hestia_pricing_upsell_notice"];for(var o in t){var n=t[o].id;if(-1!==jQuery.inArray(n,r)){var a=wp.customize.control(n).selector,c=jQuery(a+"~ li:visible");if(0<c.length){var s=c.find("label, span.customize-control-title");0===s.find(".dashicons-lock").length&&s.html(s.html()+' <span class="dashicons dashicons-lock"></span>')}}if(-1===jQuery.inArray(n,r))if("widgets"===n){var l=wp.customize.section(e).container;jQuery(l).children('li[class*="widget"]').css("display","none")}else if(n!==i){a=wp.customize.control(n).selector;jQuery(a).hide()}}},handleClick:function(){var n=this,a=n.section(),e=n.container;jQuery(e).find(".hestia-customizer-tab").on("click",function(){jQuery(this).parent().find(".hestia-customizer-tab").removeClass("active"),jQuery(this).addClass("active"),n.hideAllControls(a);var e=jQuery(this).data("tab"),t=n.params.controls[e],i=[];for(var r in t){if(!1===jQuery.isEmptyObject(t[r])&&void 0!==wp.customize.control(r)){var o=wp.customize.control(r).setting._value;i=i.concat(t[r][o])}i.push(r)}n.showControls(i,a)})},showControls:function(e,t){for(var i in e){var r=e[i];if("widgets"===r){var o=wp.customize.section(t).container;jQuery(o).children('li[class*="widget"]').css("display","list-item")}else if(void 0!==wp.customize.control(r)){var n=wp.customize.control(r).selector;jQuery(n).show()}}}}),wp.customize.control("hestia_slider_type",function(e){var t=jQuery(e.container).parents("ul"),i=e.setting._value||"";if(!1!==(e.params.locked||!1)){"video"===i&&t.addClass("hestia-locked-icon");var r=t.find("li:is(#customize-control-header_video,#customize-control-external_header_video,#customize-control-hestia_slider_content,#customize-control-hestia_slider_alignment),#customize-control-hestia_slider_disable_autoplay,#customize-control-hestia_slider_tabs");jQuery.each(r,function(){var e=jQuery(this).find("label:not(.ui-checkboxradio-radio-label), span.customize-control-title");jQuery.each(e,function(){0===jQuery(this).find(".dashicons-lock").length&&jQuery(this).html(jQuery(this).html()+' <span class="dashicons dashicons-lock"></span>')})}),e.container.on("change","select",function(e){jQuery("option:selected",this).hasClass("hestia-locked-icon")?jQuery(this).parents("ul").addClass("hestia-locked-icon"):jQuery(this).parents("ul").removeClass("hestia-locked-icon")})}});
Save Changes
Rename File
Rename