whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
themes
/
botiga
/
assets
/
js
/
admin
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/themes/botiga/assets/js/admin/botiga-bhfb.min.js
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,o){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||o&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,i=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw i}}}}function _unsupportedIterableToArray(e,o){if(e){if("string"==typeof e)return _arrayLikeToArray(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,o):void 0}}function _arrayLikeToArray(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}!function(O){window.bhfb={init:function(){this.builderGridContentFlag=!1,this.updateGridDelay=200,this.currentDevice="desktop",this.currentArea="header",this.currentRowInput="",this.currentRow="",this.currentColumn="",this.currentColumnPos="",this.currentComponent="",this.currentBuilder="",this.currentBuilderType="",this.componentsOrder="",this.addBodyClass(),this.preventEmptyRowValues(),this.customizeNavigation(),this.elementsPopup(),this.elementsButton(),this.storeGlobals(),this.devicesSwitcher(),this.elementsPopupContent(),this.builderGridContent(),this.elementsSortable(),this.builderCustomColumns(),this.builderColumnsLayout(),this.footerCustomizerOptions(),this.headerPresets(),this.extraNavigation(),this.showHideBuilder(),this.showHideBuilderTop()},jsonDecode:function(e){return JSON.parse(e.replace(/'/g,'"').replace(";",""))},addBodyClass:function(){O("body").addClass("has-bhfb-builder")},preventEmptyRowValues:function(){for(var e=["above","main","below"],o=0,t=["header","footer"];o<t.length;o++){var n,i=t[o],r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;""==O("#_customize-input-botiga_"+i+"_row__"+a+"_"+i+"_row").val()&&O("#_customize-input-botiga_"+i+"_row__"+a+"_"+i+"_row").val(botiga_hfb.rows.defaults[a+"_"+i+"_row"])}}catch(e){r.e(e)}finally{r.f()}}""==O("#_customize-input-botiga_header_row__mobile_offcanvas").val()&&O("#_customize-input-botiga_header_row__mobile_offcanvas").val(botiga_hfb.rows.defaults.mobile_offcanvas)},customizeNavigation:function(){void 0!==wp.customize.section("botiga_section_fb_wrapper")&&(O("#accordion-panel-botiga_panel_header").on("click keyup",function(e){return(!e.keyCode||13===e.keyCode)&&(e.preventDefault(),void wp.customize.section("botiga_section_hb_wrapper").focus())}),O("#accordion-panel-botiga_panel_footer").on("click keyup",function(e){return(!e.keyCode||13===e.keyCode)&&(e.preventDefault(),void wp.customize.section("botiga_section_fb_wrapper").focus())}));for(var o=["sub-accordion-section-botiga_section_hb_presets","sub-accordion-section-botiga_section_hb_above_header_row","sub-accordion-section-botiga_section_hb_main_header_row","sub-accordion-section-botiga_section_hb_below_header_row","sub-accordion-section-botiga_section_hb_mobile_offcanvas","sub-accordion-section-header_image","sub-accordion-section-botiga_section_hb_component__logo","sub-accordion-section-botiga_section_hb_component__search","sub-accordion-section-botiga_section_hb_component__social","sub-accordion-section-botiga_section_hb_component__menu","sub-accordion-section-botiga_section_hb_component__secondary_menu","sub-accordion-section-botiga_section_hb_component__contact_info","sub-accordion-section-botiga_section_hb_component__button","sub-accordion-section-botiga_section_hb_component__button2","sub-accordion-section-botiga_section_hb_component__html","sub-accordion-section-botiga_section_hb_component__html2","sub-accordion-section-botiga_section_hb_component__shortcode","sub-accordion-section-botiga_section_hb_component__shortcode2","sub-accordion-section-botiga_section_hb_component__shortcode3","sub-accordion-section-botiga_section_hb_component__login_register","sub-accordion-section-botiga_section_hb_component__woo_icons","sub-accordion-section-botiga_section_hb_component__pll_switcher","sub-accordion-section-botiga_section_hb_component__wpml_switcher","sub-accordion-section-botiga_section_hb_component__mobile_offcanvas_menu","sub-accordion-section-botiga_section_hb_component__mobile_hamburger","sub-accordion-section-botiga_section_fb_above_footer_row","sub-accordion-section-botiga_section_fb_main_footer_row","sub-accordion-section-botiga_section_fb_below_footer_row","sub-accordion-section-botiga_section_fb_component__footer_menu","sub-accordion-section-botiga_section_fb_component__copyright","sub-accordion-section-botiga_section_fb_component__social","sub-accordion-section-botiga_section_fb_component__button","sub-accordion-section-botiga_section_fb_component__button2","sub-accordion-section-botiga_section_fb_component__html","sub-accordion-section-botiga_section_fb_component__html2","sub-accordion-section-botiga_section_fb_component__shortcode","sub-accordion-section-botiga_section_fb_component__widget1","sub-accordion-section-botiga_section_fb_component__widget2","sub-accordion-section-botiga_section_fb_component__widget3","sub-accordion-section-botiga_section_fb_component__widget4"],e=0,t=["above","main","below"];e<t.length;e++)for(var n=t[e],i=1;i<=6;i++)o.push("sub-accordion-section-botiga_header_row__"+n+"_header_row_column"+i),o.push("sub-accordion-section-botiga_footer_row__"+n+"_footer_row_column"+i);var r="";O(document).on("mouseover focus",".customize-section-back",function(e){r=O(".control-section.open").attr("id")}),O(document).on("click keydown",".customize-section-back",function(e){return(!e.keyCode||13===e.keyCode||27===e.keyCode)&&(o.includes(r)?-1!==r.indexOf("above_header_row_column")?(wp.customize.section("botiga_section_hb_above_header_row").focus(),!1):-1!==r.indexOf("main_header_row_column")?(wp.customize.section("botiga_section_hb_main_header_row").focus(),!1):-1!==r.indexOf("below_header_row_column")?(wp.customize.section("botiga_section_hb_below_header_row").focus(),!1):-1!==r.indexOf("above_footer_row_column")?(wp.customize.section("botiga_section_fb_above_footer_row").focus(),!1):-1!==r.indexOf("main_footer_row_column")?(wp.customize.section("botiga_section_fb_main_footer_row").focus(),!1):-1!==r.indexOf("below_footer_row_column")?(wp.customize.section("botiga_section_fb_below_footer_row").focus(),!1):void(-1!==r.indexOf("_hb_")||-1!==r.indexOf("_header_")||-1!==r.indexOf("header_image")?wp.customize.section("botiga_section_hb_wrapper"):wp.customize.section("botiga_section_fb_wrapper")).focus():void 0)})},storeGlobals:function(){var o=this;O(".wp-full-overlay-footer .devices button, .botiga-devices-preview button").on("click",function(){var e=O(this).attr("data-device");"tablet"===e&&(e="mobile"),"footer"===o.currentBuilderType&&(e="desktop"),o.currentDevice=e,o.builderGridContent()}),O(document).on("click mouseover",".botiga-bhfb-area:not(.bhfb-available-components)",function(e){return!O("#botiga-bhfb-elements").hasClass("show")&&(o.currentRowInput=O("#_customize-input-botiga_"+o.currentBuilderType+"_row__"+O(this).data("bhfb-row")),o.currentRow=O(this).closest(".botiga-bhfb-row"),o.currentColumnPos=O(this).index()-1,o.currentColumn=O(this),void(!o.currentRow.length&&O(this).hasClass("botiga-bhfb-area-offcanvas")&&(o.currentRowInput=O("#_customize-input-botiga_header_row__mobile_offcanvas"),o.currentRow=O(".botiga-bhfb-area-offcanvas"),o.currentColumnPos=O(this).index())))}),O(document).on("click mouseover",".bhfb-button",function(e){o.currentComponent=O(this).data("bhfb-id")})},devicesSwitcher:function(){O(" .wp-full-overlay-footer .devices button, .botiga-devices-preview button").on("click",function(){var e=O(this).attr("data-device");"mobile"===e&&(e="tablet"),O(".botiga-bhfb-devices .botiga-bhfb-device-link").removeClass("active"),O('.botiga-bhfb-devices .botiga-bhfb-device-link[data-device="'+e+'"]').addClass("active")}),O(".botiga-bhfb-devices .botiga-bhfb-device-link").on("click",function(e){e.preventDefault();e=O(this).attr("data-device");O(' .wp-full-overlay-footer .devices button[data-device="'+e+'"]').trigger("click")})},getElementsUnused:function(){var e=botiga_hfb.components.desktop,t=botiga_hfb.components.mobile,o=["#_customize-input-botiga_header_row__above_header_row","#_customize-input-botiga_header_row__main_header_row","#_customize-input-botiga_header_row__below_header_row","#_customize-input-botiga_header_row__mobile_offcanvas"];"footer"===this.currentBuilderType&&(e=botiga_hfb.components.footer,o=["#_customize-input-botiga_footer_row__above_footer_row","#_customize-input-botiga_footer_row__main_footer_row","#_customize-input-botiga_footer_row__below_footer_row"]);for(var n=0,i=o;n<i.length;n++){var r,a=i[n],_=_createForOfIteratorHelper(e);try{for(_.s();!(r=_.n()).done;){r.value;var c=this.jsonDecode(O(a).val());if(c.desktop.length){var s,l=_createForOfIteratorHelper(c.desktop);try{for(l.s();!(s=l.n()).done;)!function(){var o=s.value;e=e.filter(function(e){return!o.includes(e.id)})}()}catch(e){l.e(e)}finally{l.f()}}}}catch(e){_.e(e)}finally{_.f()}var b,u=_createForOfIteratorHelper(t);try{for(u.s();!(b=u.n()).done;){b.value;var d=this.jsonDecode(O(a).val());if(d.mobile.length){var h,m=_createForOfIteratorHelper(d.mobile);try{for(m.s();!(h=m.n()).done;)!function(){var o=h.value;t=t.filter(function(e){return!o.includes(e.id)})}()}catch(e){m.e(e)}finally{m.f()}}if(-1!==a.indexOf("row__mobile_offcanvas")&&d.mobile_offcanvas.length){var f,p=_createForOfIteratorHelper(d.mobile_offcanvas);try{for(p.s();!(f=p.n()).done;)!function(){var o=f.value;t=t.filter(function(e){return!o.includes(e.id)})}()}catch(e){p.e(e)}finally{p.f()}}}}catch(e){u.e(e)}finally{u.f()}}return{desktop:e,mobile:t}},elementsPopup:function(){var i=this;O(document).on("click",".botiga-bhfb-area:not(.bhfb-available-components)",function(e){var o=i.currentBuilder.find("#botiga-bhfb-elements"),t=O(this)[0].getBoundingClientRect(),n=O(this).data("bhfb-row");setTimeout(function(){return o.css("top",0),o.css("left",t.left),o.css("top",t.top-(o.height()+50)),i.isElementInViewport(o)?(o.css("left",t.left),o.css("right","auto")):(o.css("left","auto"),o.css("right",25)),!e.target.classList.contains("bhfb-remove-element")&&!e.target.classList.contains("bhfb-button")&&void o.addClass("show")},200),i.elementsPopupContent(n),i.builderGridContent()}),O("#customize-preview iframe").on("mouseup",function(e){return!!i.currentBuilder&&void i.closeElementsPopup(e)}),O(document).on("mouseup",function(e){return!!i.currentBuilder&&void i.closeElementsPopup(e)})},closeElementsPopup:function(e){var o=this.currentBuilder.find("#botiga-bhfb-elements");null===e.target.closest("#botiga-bhfb-elements")&&o.removeClass("show")},isElementInViewport:function(e){e=(e="function"==typeof jQuery&&e instanceof jQuery?e[0]:e).getBoundingClientRect();return 0<=e.top&&0<=e.left&&e.bottom<=(window.innerHeight||O(window).height())&&e.right<=(window.innerWidth||O(window).width())},elementsPopupContent:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o=this.getElementsUnused(),t=O(".botiga-bhfb-elements-desktop"),n=O(".botiga-bhfb-elements-mobile");t.html(""),n.html("");var i="hb";if(this.currentBuilderType&&"footer"===this.currentBuilderType&&(i="fb"),o.desktop.length){var r,a=_createForOfIteratorHelper(o.desktop);try{for(a.s();!(r=a.n()).done;){var _=r.value;t.append('<div class="botiga-bhfb-element botiga-bhfb-element-desktop"><a href="#" class="bhfb-button" data-bhfb-id="'+_.id+'" data-bhfb-focus-section="botiga_section_'+i+"_component__"+_.id+'">'+_.label+"</a></div>")}}catch(e){a.e(e)}finally{a.f()}}else t.append('<p class="bhfb-elements-message">'+botiga_hfb.i18n.elementsMessage+"</p>");if(o.mobile="mobile_offcanvas"!==e?o.mobile.filter(function(e){return"mobile_offcanvas_menu"!==e.id}):o.mobile.filter(function(e){return"secondary_menu"!==e.id&&"mobile_hamburger"!==e.id}),o.mobile.length){var c,s=_createForOfIteratorHelper(o.mobile);try{for(s.s();!(c=s.n()).done;){var l=c.value;n.append('<div class="botiga-bhfb-element botiga-bhfb-element-mobile"><a href="#" class="bhfb-button" data-bhfb-id="'+l.id+'" data-bhfb-focus-section="botiga_section_'+i+"_component__"+l.id+'">'+l.label+"</a></div>")}}catch(e){s.e(e)}finally{s.f()}}else n.append('<p class="bhfb-elements-message">'+botiga_hfb.i18n.elementsMessage+"</p>");this.addUpsellComponents()},updateAvailableComponents:function(){"header"===this.currentBuilderType&&(O(".botiga-header-builder-available-components").html(""),O(".botiga-header-builder-available-components").html(O(".botiga-bhfb-header .botiga-bhfb-elements-desktop").html()),O(".botiga-header-builder-available-mobile-components").html(""),O(".botiga-header-builder-available-mobile-components").html(O(".botiga-bhfb-header .botiga-bhfb-elements-mobile").html())),"footer"===this.currentBuilderType&&(O(".botiga-footer-builder-available-footer-components").html(""),O(".botiga-footer-builder-available-footer-components").html(O(".botiga-bhfb-footer .botiga-bhfb-elements-desktop").html()))},addUpsellComponents:function(){if(!botiga_hfb.upsell_components.enable)return!1;var e,o="",t=_createForOfIteratorHelper("header"===this.currentBuilderType?botiga_hfb.upsell_components.header:botiga_hfb.upsell_components.footer);try{for(t.s();!(e=t.n()).done;){var n=e.value;o+='\n <div class="botiga-bhfb-element botiga-bhfb-element-desktop">\n <a href="#" class="bhfb-button">'.concat(n.label,"</a> \n </div>\n ")}}catch(e){t.e(e)}finally{t.f()}var i='\n <div class="botiga-bhfb-upsell-components-wrapper">\n <h4>'.concat(botiga_hfb.upsell_components.title,'</h4>\n <div class="botiga-bhfb-upsell-components">').concat(o,"</div>\n <p>").concat(botiga_hfb.upsell_components.total,'</p>\n <a href="').concat(botiga_hfb.upsell_components.link,'" target="_blank" class="bhfb-upsell-button">').concat(botiga_hfb.upsell_components.button,"</a>\n </div>\n ");O("#botiga-bhfb-elements .botiga-bhfb-elements-wrapper .botiga-bhfb-upsell-components-wrapper").remove(),O("#botiga-bhfb-elements .botiga-bhfb-elements-wrapper").append(i)},elementsButton:function(){var n=this;O(document).on("click",".botiga-bhfb-element > a",function(e){e.preventDefault(),e.stopPropagation();var o=O(this).data("bhfb-id"),t=O(this).data("bhfb-focus-section");if(O(this).closest("#botiga-bhfb-elements").length)n.elementsButtonAdd(o),n.currentBuilder.find("#botiga-bhfb-elements").removeClass("show");else if(e.target.classList.contains("bhfb-remove-element"))return n.elementsButtonRemove(o),!1;setTimeout(function(){wp.customize.section(t).focus()},n.updateGridDelay)})},elementsButtonAdd:function(e){var o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=this,n=t.jsonDecode(t.currentRowInput.val()),i=t.currentDevice;return"mobile"===t.currentDevice&&t.currentRow.hasClass("botiga-bhfb-area-offcanvas")&&(i="mobile_offcanvas"),o?n[i][t.currentColumnPos]=t.componentsOrder:n[i][t.currentColumnPos].push(e),!("mobile_offcanvas_menu"===t.currentComponent&&!t.currentRow.hasClass("botiga-bhfb-area-offcanvas"))&&(("mobile_hamburger"!==t.currentComponent||!t.currentRow.hasClass("botiga-bhfb-area-offcanvas"))&&(t.currentRowInput.val(JSON.stringify(n)),t.currentRowInput.trigger("change"),"header"===t.currentBuilderType&&t.currentRowInput.closest(".customize-control").next().find("input").val(Math.random()).trigger("change"),t.elementsPopupContent(),t.builderGridContent(),void O("#botiga-bhfb-elements").removeClass("show")))},elementsButtonRemove:function(o){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],t=this,n=t.jsonDecode(t.currentRowInput.val()),i=t.currentDevice;n[i="mobile"===t.currentDevice&&t.currentRow.hasClass("botiga-bhfb-area-offcanvas")?"mobile_offcanvas":i][t.currentColumnPos]=n[i][t.currentColumnPos].filter(function(e){return e!==o}),t.currentRowInput.val(JSON.stringify(n)),e&&(t.currentRowInput.trigger("change"),t.currentRowInput.closest(".customize-control").next().find("input").val(Math.random()).trigger("change")),t.elementsPopupContent(),t.builderGridContent()},elementsSortable:function(){var _=this;O(".botiga-bhfb-area").each(function(){O(this).sortable({placeholder:"botiga-bhfb-element bhfb-ui-state-highlight",connectWith:".botiga-bhfb-area",scroll:!1,cancel:".bhfb-edit-column",change:function(e,o){_.currentComponent=O(o.item[0]).find(".bhfb-button").data("bhfb-id"),_.currentRow=O(o.placeholder[0]).closest(".botiga-bhfb-row").length?O(o.placeholder[0]).closest(".botiga-bhfb-row"):O(o.placeholder[0]).closest(".botiga-bhfb-area-offcanvas"),_.currentRowInput=O("#_customize-input-botiga_"+_.currentBuilderType+"_row__"+o.placeholder.closest(".botiga-bhfb-area").data("bhfb-row"));var t=[];o.placeholder.closest(".botiga-bhfb-area").find(".ui-sortable-placeholder").attr("data-bhfb-id",_.currentComponent),o.placeholder.closest(".botiga-bhfb-area").find(".botiga-bhfb-element").each(function(){var e=(void 0!==O(this).find(".bhfb-button").data("bhfb-id")?O(this).find(".bhfb-button"):O(this)).data("bhfb-id");O(this).hasClass("ui-sortable-helper")||t.push(e)}),_.componentsOrder=t},update:function(e,o){if(this===o.item.parent()[0]){var t=o.item.find("> .bhfb-button").data("bhfb-id"),n=o.item.closest(".botiga-bhfb-area").data("bhfb-row"),i=o.item.closest(".botiga-bhfb-area").index()-1,r=null!==o.sender?o.sender.data("bhfb-row"):null,a=null!==o.sender?o.sender.index()-1:null;if(null===o.sender)return _.elementsButtonAdd("",!0),!1;o.sender.hasClass("bhfb-available-components")||(_.currentRowInput=O("#_customize-input-botiga_"+_.currentBuilderType+"_row__"+r)),_.currentColumnPos=a,_.elementsButtonRemove(t,!0),o.sender.hasClass("bhfb-available-components")||(_.currentRowInput=O("#_customize-input-botiga_"+_.currentBuilderType+"_row__"+n)),_.currentColumnPos=i,_.elementsButtonAdd(t,!0)}}}),O(this).disableSelection()})},builderGridContent:function(){var k=this,B=["#_customize-input-botiga_header_row__above_header_row","#_customize-input-botiga_header_row__main_header_row","#_customize-input-botiga_header_row__below_header_row","#_customize-input-botiga_header_row__mobile_offcanvas"],T="hb";if(k.currentBuilderType&&"footer"===k.currentBuilderType&&(B=["#_customize-input-botiga_footer_row__above_footer_row","#_customize-input-botiga_footer_row__main_footer_row","#_customize-input-botiga_footer_row__below_footer_row"],T="fb"),k.builderGridContentFlag)return!1;k.builderGridContentFlag=!0,setTimeout(function(){for(var e=0,o=B;e<o.length;e++){var t=o[e],n=k.jsonDecode(O(t).val()),i="";if(-1!==t.indexOf("above_"+k.currentBuilderType+"_row")&&(i="above"),-1!==t.indexOf("main_"+k.currentBuilderType+"_row")&&(i="main"),-1!==t.indexOf("below_"+k.currentBuilderType+"_row")&&(i="below"),-1!==t.indexOf("row__mobile_offcanvas")&&(i="mobile_offcanvas"),O('.botiga-bhfb-area[data-bhfb-row="'+i+"_"+k.currentBuilderType+'_row"]').each(function(){O(this).remove()}),"desktop"===k.currentDevice){var r,a=1,_=_createForOfIteratorHelper(n.desktop);try{for(_.s();!(r=_.n()).done;){var c=r.value;O(".botiga-bhfb-"+k.currentBuilderType+" .botiga-bhfb-"+i+"-row").append('<div class="botiga-bhfb-area" data-bhfb-row="'+i+"_"+k.currentBuilderType+'_row"><a class="bhfb-edit-column" href="#" onClick="event.stopPropagation(); wp.customize.section(\'botiga_'+k.currentBuilderType+"_row__"+i+"_"+k.currentBuilderType+"_row_column"+a+'\').focus();"><svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="15" fill="#FFF"/><rect x="7" width="2" height="15" fill="#FFF"/><rect y="3" width="3" height="16" transform="rotate(-90 0 3)" fill="#FFF"/><rect y="15" width="2" height="16" transform="rotate(-90 0 15)" fill="#FFF"/><rect x="14" width="2" height="15" fill="#FFF"/></svg></a>');var s=O(".botiga-bhfb-"+i+"-row").find(".botiga-bhfb-area:last-child");if(c.length){var l,b=_createForOfIteratorHelper(c);try{for(b.s();!(l=b.n()).done;){var u=l.value;"object"===_typeof(u=k.getElementData(u))&&s.append('<div class="botiga-bhfb-element"><a href="#" class="bhfb-button" data-bhfb-id="'+u.id+'" data-bhfb-focus-section="botiga_section_'+T+"_component__"+u.id+'"><span class="bhfb-title-element">'+u.label+'</span><i class="bhfb-edit-element dashicons dashicons-admin-generic"></i><i class="bhfb-remove-element dashicons dashicons-no-alt"></i></a></div>')}}catch(e){b.e(e)}finally{b.f()}}a++}}catch(e){_.e(e)}finally{_.f()}}if("mobile"===k.currentDevice){var d,h=1,m=_createForOfIteratorHelper(n.mobile);try{for(m.s();!(d=m.n()).done;){var f=d.value;O(".botiga-bhfb-"+i+"-row").append('<div class="botiga-bhfb-area" data-bhfb-row="'+i+"_"+k.currentBuilderType+'_row"><a class="bhfb-edit-column" href="#" onClick="event.stopPropagation(); wp.customize.section(\'botiga_'+k.currentBuilderType+"_row__"+i+"_"+k.currentBuilderType+"_row_column"+h+'\').focus();"><svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="15" fill="#FFF"/><rect x="7" width="2" height="15" fill="#FFF"/><rect y="3" width="3" height="16" transform="rotate(-90 0 3)" fill="#FFF"/><rect y="15" width="2" height="16" transform="rotate(-90 0 15)" fill="#FFF"/><rect x="14" width="2" height="15" fill="#FFF"/></svg></a>');var p=O(".botiga-bhfb-"+i+"-row").find(".botiga-bhfb-area:last-child");if(f.length){var g,w=_createForOfIteratorHelper(f);try{for(w.s();!(g=w.n()).done;){var v=g.value;"object"===_typeof(v=k.getElementData(v))&&p.append('<div class="botiga-bhfb-element"><a href="#" class="bhfb-button" data-bhfb-id="'+v.id+'" data-bhfb-focus-section="botiga_section_'+T+"_component__"+v.id+'"><span class="bhfb-title-element">'+v.label+'</span><i class="bhfb-edit-element dashicons dashicons-admin-generic"></i><i class="bhfb-remove-element dashicons dashicons-no-alt"></i></a></div>')}}catch(e){w.e(e)}finally{w.f()}}h++}}catch(e){m.e(e)}finally{m.f()}if(-1!==t.indexOf("mobile_offcanvas")&&(O(".botiga-bhfb-area-offcanvas").html(""),n.mobile_offcanvas.length)){var y,z=_createForOfIteratorHelper(n.mobile_offcanvas[0]);try{for(z.s();!(y=z.n()).done;){var C=y.value;"object"===_typeof(C=k.getElementData(C))&&O(".botiga-bhfb-area-offcanvas").append('<div class="botiga-bhfb-element"><a href="#" class="bhfb-button" data-bhfb-id="'+C.id+'" data-bhfb-focus-section="botiga_section_hb_component__'+C.id+'"><span class="bhfb-title-element">'+C.label+'</span><i class="bhfb-edit-element dashicons dashicons-admin-generic"></i><i class="bhfb-remove-element dashicons dashicons-no-alt"></i></a></div>')}}catch(e){z.e(e)}finally{z.f()}}}}if(!k.currentBuilder)return k.builderGridContentFlag=!1;k.currentBuilder.hasClass("show")&&!k.currentBuilder.hasClass("show-bottom")?(O(".botiga-bhfb").css("height",0),k.currentBuilder.css("height",k.currentBuilder.find(".botiga-bhfb-top").outerHeight()+47)):k.currentBuilder.css("height",0),k.updateAvailableComponents(),k.elementsSortable(),O(window).trigger("bhfb.grid.ready"),k.builderGridContentFlag=!1},k.updateGridDelay)},getElementData:function(e){var o,t=[].concat(_toConsumableArray(botiga_hfb.components.desktop),_toConsumableArray(botiga_hfb.components.mobile)),n=_createForOfIteratorHelper(t="footer"===this.currentBuilderType?botiga_hfb.components.footer:t);try{for(n.s();!(o=n.n()).done;){var i=o.value;if(i.id===e)return i}}catch(e){n.e(e)}finally{n.f()}return""},showHideBuilder:function(){for(var t=this,e=["botiga_section_hb_wrapper","botiga_section_hb_presets","botiga_section_hb_above_header_row","botiga_section_hb_main_header_row","botiga_section_hb_below_header_row","botiga_section_hb_mobile_offcanvas","header_image","botiga_section_hb_component__logo","botiga_section_hb_component__search","botiga_section_hb_component__social","botiga_section_hb_component__menu","botiga_section_hb_component__secondary_menu","botiga_section_hb_component__contact_info","botiga_section_hb_component__button","botiga_section_hb_component__button2","botiga_section_hb_component__html","botiga_section_hb_component__html2","botiga_section_hb_component__shortcode","botiga_section_hb_component__shortcode2","botiga_section_hb_component__shortcode3","botiga_section_hb_component__login_register","botiga_section_hb_component__woo_icons","botiga_section_hb_component__pll_switcher","botiga_section_hb_component__wpml_switcher","botiga_section_hb_component__mobile_offcanvas_menu","botiga_section_hb_component__mobile_hamburger","botiga_section_fb_wrapper","botiga_section_fb_above_footer_row","botiga_section_fb_main_footer_row","botiga_section_fb_below_footer_row","botiga_section_fb_component__social","botiga_section_fb_component__footer_menu","botiga_section_fb_component__copyright","botiga_section_fb_component__button","botiga_section_fb_component__button2","botiga_section_fb_component__html","botiga_section_fb_component__html2","botiga_section_fb_component__shortcode","botiga_section_fb_component__widget1","botiga_section_fb_component__widget2","botiga_section_fb_component__widget3","botiga_section_fb_component__widget4"],o=0,n=["above","main","below"];o<n.length;o++)for(var i=n[o],r=1;r<=6;r++)e.push("botiga_header_row__"+i+"_header_row_column"+r),e.push("botiga_footer_row__"+i+"_footer_row_column"+r);e.forEach(function(o){void 0!==wp.customize.section(o)&&wp.customize.section(o).expanded.bind(function(e){t.currentBuilder=t.getCurrentBuilderByComponent(o),t.currentBuilderType=t.currentBuilder.hasClass("botiga-bhfb-header")?"header":"footer",e?(O("body").addClass("bhfb-active"),t.currentBuilder.addClass("show"),t.scrollToRespectiveBuilderArea()):(O("body").removeClass("bhfb-active"),t.currentBuilder.removeClass("show")),setTimeout(function(){t.builderGridContent(),"botiga_section_hb_wrapper"!==o&&"botiga_section_fb_wrapper"!==o||(t.updateAvailableComponents(),setTimeout(function(){O(".botiga-bhfb-elements").removeClass("show")},200))},100)})})},scrollToRespectiveBuilderArea:function(){var e=document.querySelector("#customize-preview > iframe"),o=e?e.contentWindow.document.getElementsByTagName("html")[0]:null,e="header"===this.currentBuilderType?0:99999;if(null===o)return!1;O(o).animate({scrollTop:e},"fast")},getCurrentBuilderByComponent:function(e){return-1!==e.indexOf("_hb_")||-1!==e.indexOf("_header_")||-1!==e.indexOf("header_image")?O(".botiga-bhfb-header"):(-1!==e.indexOf("_fb_")||-1!==e.indexOf("_footer_"))&&O(".botiga-bhfb-footer")},showHideBuilderTop:function(){var o=this;O(".botiga-bhfb-bottom-display").on("click",function(e){e.preventDefault(),O("body").toggleClass("bhfb-active-bottom"),O(this).toggleClass("show"),O(".botiga-bhfb-top").toggleClass("show"),O(".botiga-bhfb").toggleClass("show-bottom"),o.builderGridContent()})},builderCustomColumns:function(){var b=this;["botiga_header_row__above_header_row_columns","botiga_header_row__main_header_row_columns","botiga_header_row__below_header_row_columns","botiga_footer_row__above_footer_row_columns_desktop","botiga_footer_row__main_footer_row_columns_desktop","botiga_footer_row__below_footer_row_columns_desktop"].forEach(function(l){if(void 0!==wp.customize.control(l))for(var e=-1!==l.indexOf("header")?["desktop","tablet"]:["desktop"],o=0,t=e;o<t.length;o++)!function(){var s=t[o],e=-1!==l.indexOf("header")?"_"+s:"";wp.customize(l+e,function(e){e.bind(function(e){for(var o="",t="",n=0,i=["above","main","below"];n<i.length;n++){var r=i[n],a="botiga_"+b.currentBuilderType+"_row__"+r+"_"+b.currentBuilderType,_="#_customize-input-botiga_"+b.currentBuilderType+"_row__"+r+"_"+b.currentBuilderType+"_row";-1!==l.indexOf(a)&&(o="botiga-bhfb-"+r+"-row",t=O(_),b.currentRow=r)}if(""===o||""===t)return!1;b.addBuilderRowColumnsClass(s,o,e);var c=b.jsonDecode(t.val());if(e<c[b.currentDevice].length)for(;c[b.currentDevice].length>e;)c[b.currentDevice].pop();else if(e>c[b.currentDevice].length)for(;c[b.currentDevice].length<e;)c[b.currentDevice].push([]);t.val(JSON.stringify(c)),b.updateColumnsLayoutOption(s,e),b.updateAvailableColumnsArea(s,e),t.trigger("change"),"header"===b.currentBuilderType&&"mobile"===b.currentDevice&&t.closest(".customize-control").next().find("input").val(Math.random()).trigger("change"),b.builderGridContent()})})}()});for(var e=["above","main","below"],o=0,t=["header","footer"];o<t.length;o++){var n,r=t[o],a="header"===r?"hb":"fb",i=_createForOfIteratorHelper(e);try{var _=function(){var i=n.value,t="botiga_section_"+a+"_"+i+"_"+r+"_row";void 0!==wp.customize.section(t)&&wp.customize.section(t).expanded.bind(function(e){if(e){-1!==t.indexOf("header")?b.currentBuilderType="header":-1!==t.indexOf("footer")&&(b.currentBuilderType="footer");for(var e="header"===b.currentBuilderType?["desktop","tablet"]:["desktop"],o=0,n=e;o<n.length;o++)!function(){var t=n[o];setTimeout(function(){var e="botiga-bhfb-"+i+"-row",o="botiga_"+b.currentBuilderType+"_row__"+i+"_"+b.currentBuilderType+"_row_columns_"+t;b.currentRow=i,b.currentRowInput=O("#_customize-input-botiga_"+b.currentBuilderType+"_row__"+i+"_"+b.currentBuilderType+"_row"),b.addBuilderRowColumnsClass(t,e,wp.customize(o).get()),b.updateColumnsLayoutOption(t,wp.customize(o).get()),b.updateAvailableColumnsArea(t,wp.customize(o).get())},50)}()}})};for(i.s();!(n=i.n()).done;)_()}catch(e){i.e(e)}finally{i.f()}}},addBuilderRowColumnsClass:function(e,o,t){"tablet"===e&&(e="mobile");for(var n=1;n<=6;n++)O(".botiga-bhfb-"+this.currentBuilderType+" .botiga-bhfb-"+e+" .botiga-bhfb-row."+o).removeClass("botiga-bhfb-row-"+n+"-columns");O(".botiga-bhfb-"+this.currentBuilderType+" .botiga-bhfb-"+e+" .botiga-bhfb-row."+o).addClass("botiga-bhfb-row-"+t+"-columns")},updateColumnsLayoutOption:function(e,o){var t="botiga_"+this.currentBuilderType+"_row__"+this.currentRow+"_"+this.currentBuilderType+"_row_columns_layout_"+e,e=t+"-"+wp.customize(t).get();if(O('label[for*="'+t+'"]').css("display","none"),O('label[for*="'+t+"-"+o+'col-"]').css("display","block"),O('label[for="'+e+'"]').parent().hasClass("bhfb-option-updated"))return!1;O('label[for="'+e+'"]').parent().addClass("bhfb-option-updated")},builderColumnsLayout:function(){var r=this;["botiga_header_row__above_header_row_columns_layout","botiga_header_row__main_header_row_columns_layout","botiga_header_row__below_header_row_columns_layout","botiga_footer_row__above_footer_row_columns_layout_desktop","botiga_footer_row__main_footer_row_columns_layout_desktop","botiga_footer_row__below_footer_row_columns_layout_desktop"].forEach(function(n){if(void 0!==wp.customize.control(n))for(var e=-1!==n.indexOf("header")?["desktop","tablet"]:["desktop"],o=0,i=e;o<i.length;o++)!function(){var t=i[o],e=-1!==n.indexOf("header")?"_"+t:"";wp.customize(n+e,function(e){e.bind(function(e){var o="above";-1!==n.indexOf("main")?o="main":-1!==n.indexOf("below")&&(o="below"),"tablet"===t&&(t="mobile"),r.currentRowInput=O("#_customize-input-botiga_"+r.currentBuilderType+"_row__"+o+"_"+r.currentBuilderType+"_row");o=O(".botiga-bhfb-"+r.currentBuilderType+" .botiga-bhfb-"+t+" .botiga-bhfb-row.botiga-bhfb-"+o+"-row");o.removeClass("botiga-bhfb-row-columns-layout-equal"),o.removeClass("botiga-bhfb-row-columns-layout-bigleft"),o.removeClass("botiga-bhfb-row-columns-layout-bigright"),-1!==e.indexOf("equal")&&o.addClass("botiga-bhfb-row-columns-layout-equal"),-1!==e.indexOf("bigleft")&&o.addClass("botiga-bhfb-row-columns-layout-bigleft"),-1!==e.indexOf("bigright")&&o.addClass("botiga-bhfb-row-columns-layout-bigright");o=r.currentRowInput.val();r.currentRowInput.val("").trigger("change"),r.currentRowInput.val(o).trigger("change"),"header"===r.currentBuilderType&&"mobile"===r.currentDevice&&r.currentRowInput.closest(".customize-control").next().find("input").val(Math.random()).trigger("change")})})}()})},updateAvailableColumnsArea:function(e,o){var t=this.currentRowInput.closest(".control-section").find(".bhfb-available-columns.bhfb-available-columns-"+e+" .bhfb-available-columns-item");t.addClass("hide");for(var n=1;n<=o;n++)t.eq(n-1).removeClass("hide")},footerCustomizerOptions:function(){for(var e=0,o=["above","main","below"];e<o.length;e++)wp.customize("botiga_footer_row__"+o[e]+"_footer_row",function(e){e.bind(function(e){O(".bhfb-footer").remove()})})},extraNavigation:function(){wp.customize.section("botiga_section_hb_mobile_offcanvas").expanded.bind(function(e){return!!e&&void("desktop"===O(".wp-full-overlay-footer .devices button.active").data("device")&&O('.wp-full-overlay-footer .devices button[data-device="tablet"]').trigger("click"))})},headerPresets:function(){var o=this;wp.customize("botiga_section_hb_presets__header_preset_layout",function(e){e.bind(function(e){o.updateHeaderPreset(e)})})},updateHeaderPreset:function(e){var o=O("#_customize-input-botiga_header_row__above_header_row"),t=O("#_customize-input-botiga_header_row__main_header_row"),n=O("#_customize-input-botiga_header_row__below_header_row");"header_layout_1"===e&&(wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_desktop").set("center"),wp.customize("botiga_header_row__main_header_row_column3_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column3_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column3_horizontal_alignment_desktop").set("end")),"header_layout_2"===e&&(wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_desktop").set("end")),"header_layout_3"===e&&(wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_desktop").set("center"),wp.customize("botiga_header_row__main_header_row_column3_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column3_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column3_horizontal_alignment_desktop").set("end"),wp.customize("botiga_header_row__below_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__below_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__below_header_row_column1_horizontal_alignment_desktop").set("center")),"header_layout_4"===e&&(wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_desktop").set("end"),wp.customize("botiga_header_row__below_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__below_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__below_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__below_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__below_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__below_header_row_column2_horizontal_alignment_desktop").set("end")),"header_layout_5"===e&&(wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_desktop").set("center"),wp.customize("botiga_header_row__main_header_row_column3_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__main_header_row_column3_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__main_header_row_column3_horizontal_alignment_desktop").set("end"),wp.customize("botiga_header_row__below_header_row_column1_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__below_header_row_column1_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__below_header_row_column1_horizontal_alignment_desktop").set("start"),wp.customize("botiga_header_row__below_header_row_column2_vertical_alignment_desktop").set("middle"),wp.customize("botiga_header_row__below_header_row_column2_inner_layout_desktop").set("inline"),wp.customize("botiga_header_row__below_header_row_column2_horizontal_alignment_desktop").set("end")),wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_tablet").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_tablet").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_tablet").set("start"),wp.customize("botiga_header_row__main_header_row_column1_vertical_alignment_mobile").set("middle"),wp.customize("botiga_header_row__main_header_row_column1_inner_layout_mobile").set("inline"),wp.customize("botiga_header_row__main_header_row_column1_horizontal_alignment_mobile").set("start"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_tablet").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_tablet").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_tablet").set("center"),wp.customize("botiga_header_row__main_header_row_column2_vertical_alignment_mobile").set("middle"),wp.customize("botiga_header_row__main_header_row_column2_inner_layout_mobile").set("inline"),wp.customize("botiga_header_row__main_header_row_column2_horizontal_alignment_mobile").set("center"),wp.customize("botiga_header_row__main_header_row_column3_vertical_alignment_tablet").set("middle"),wp.customize("botiga_header_row__main_header_row_column3_inner_layout_tablet").set("inline"),wp.customize("botiga_header_row__main_header_row_column3_horizontal_alignment_tablet").set("end"),wp.customize("botiga_header_row__main_header_row_column3_vertical_alignment_mobile").set("middle"),wp.customize("botiga_header_row__main_header_row_column3_inner_layout_mobile").set("inline"),wp.customize("botiga_header_row__main_header_row_column3_horizontal_alignment_mobile").set("end"),o.val(botiga_hfb.header_presets[e].above_row).trigger("change"),t.val(botiga_hfb.header_presets[e].main_row).trigger("change"),n.val(botiga_hfb.header_presets[e].below_row).trigger("change"),o.closest(".customize-control").next().find("input").val(Math.random()).trigger("change"),t.closest(".customize-control").next().find("input").val(Math.random()).trigger("change"),n.closest(".customize-control").next().find("input").val(Math.random()).trigger("change"),this.builderGridContent()}},O(document).ready(function(){bhfb.init()})}(jQuery);
Copyright ©2021 || Defacer Indonesia