!function(t){"use strict";window.awb_oc_timeouts={},window.awbOffCanvas={timeouts:{},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},set:function(t,n,a){t=t?"_"+t:"_data";let e=localStorage.getItem("off_canvas"+t);e=e?JSON.parse(e):{},e[n]=a,localStorage.setItem("off_canvas"+t,JSON.stringify(e))},get:function(t,n){t=t?"_"+t:"_data";let a=localStorage.getItem("off_canvas"+t);return a=a?JSON.parse(a):{},a[n]||""},animationsWithoutDirection:["flash","rubberBand","shake","flipinx","flipiny","lightspeedin","flipOutX","flipOutY","lightSpeedOut"],open_off_canvas:function(n,a=!0,e=!1){const o=t('.awb-off-canvas-wrap[data-id="'+n+'"]'),i=o.find(".awb-off-canvas"),s=window["off_canvas_"+n],c=this;if(!o.length)return;if(o.hasClass("awb-show")&&e)return void this.close_off_canvas(n);if(this.set(n,"last_open_date",new Date),o.hasClass("awb-show")&&!e)return;let f=s.enter_animation;const r=s.enter_animation_direction&&"static"!==s.enter_animation_direction?this.capitalize(s.enter_animation_direction):"",d=s.enter_animation_speed||1,l=s.enter_animation_timing||"ease";if(("off"===s.status_css_animations||"desktop"===s.status_css_animations&&window.cssua.ua.mobile)&&(f=!1),f){if(this.animationsWithoutDirection.includes(f)||(f=f+"In"+r),i.addClass("fusion-animated "+f),i.attr("data-animation-type",f),i.css({visibility:"visible","animation-duration":d+"s","animation-timing-function":l}),"sliding-bar"===s.type&&"push"===s.transition&&"top"===s.position){const n={transition:"margin-top "+s.enter_animation_speed+"s"};n.marginTop=i.outerHeight()+"px";let a="#wrapper";o.hasClass("init-for-studio")&&(a=".post-preview"),t(a).css(n);const e=t(".fusion-tb-header").find(".fusion-sticky-container.fusion-container-stuck");e.length&&e.each(function(){t(this).attr("data-top",t(this).css("top")),t(this).css({top:"calc("+n.marginTop+" + "+t(this).attr("data-top")+")",transition:"top "+s.enter_animation_speed+"s"})})}if("sliding-bar"===s.type&&"push"===s.transition&&("left"===s.position||"right"===s.position)){const n={transition:"margin-inline-start "+s.enter_animation_speed+"s"};t("body").hasClass("rtl")?(n.marginInlineStart="-"+i.outerWidth()+"px","right"===s.position&&(n.marginInlineStart=i.outerWidth()+"px")):(n.marginInlineStart=i.outerWidth()+"px","right"===s.position&&(n.marginInlineStart="-"+i.outerWidth()+"px"));let a="#wrapper";o.hasClass("init-for-studio")&&(a=".post-preview"),t(a).css(n),t('#sliders-container .tfs-slider[data-parallax="1"]').length&&t('#sliders-container .tfs-slider[data-parallax="1"]').css(n)}}else this.enableTrapFocus(o);if("yes"===s.overlay&&"no"===s.overlay_page_scrollbar&&t("html").css("overflow","hidden"),o.addClass("awb-show"),t('a[href^="#awb-oc__'+n+'"]').addClass("awb-oc-active"),a){const t=this.get(n,"open_count")||0;this.set(n,"open_count",t+1)}const w=parseInt(s.auto_close_after_time);w&&(window.awb_oc_timeouts["close_after_time_"+n]=setTimeout(()=>{c.close_off_canvas(n)},1e3*w));const _=parseInt(s.show_close_button_after_time);_&&(window.awb_oc_timeouts["show_close_button_"+n]=setTimeout(()=>{i.children(".off-canvas-close").removeClass("hidden")},1e3*_)),o.trigger(t.Event("awb-oc-opened"),[n])},close_off_canvas:function(n,a=!0){const e=t('.awb-off-canvas-wrap[data-id="'+n+'"]'),o=e.find(".awb-off-canvas"),i=window["off_canvas_"+n];if(0===e.length||void 0===i)return;let s=i.exit_animation;const c=i.exit_animation_direction&&"static"!==i.exit_animation_direction?this.capitalize(i.exit_animation_direction):"",f=i.exit_animation_speed||1,r=i.exit_animation_timing||"ease";if(("off"===i.status_css_animations||"desktop"===i.status_css_animations&&window.cssua.ua.mobile)&&(s=!1),s){if(this.animationsWithoutDirection.includes(s)||(s=s+"Out"+c),o.addClass("fusion-animated "+s),o.attr("data-animation-type",s),o.addClass("is-closing"),o.css({"animation-duration":f+"s","animation-timing-function":r}),"sliding-bar"===i.type&&"push"===i.transition&&"top"===i.position){const n={transition:"margin-top "+i.enter_animation_speed+"s",marginTop:0};let a="#wrapper";e.hasClass("init-for-studio")&&(a=".post-preview"),t(a).css(n);const o=t(".fusion-tb-header").find(".fusion-sticky-container");o.length&&o.each(function(){const n=this;void 0!==t(this).attr("data-top")&&(t(this).css("top",t(this).attr("data-top")),t(this).removeAttr("data-top"),setTimeout(function(){t(n).css("transition","")},1e3*i.enter_animation_speed))})}if("sliding-bar"===i.type&&"push"===i.transition&&("left"===i.position||"right"===i.position)){const n={transition:"margin-inline-start "+i.exit_animation_speed+"s",marginInlineStart:0};let a="#wrapper";e.hasClass("init-for-studio")&&(a=".post-preview"),t(a).css(n),t('#sliders-container .tfs-slider[data-parallax="1"]').length&&t('#sliders-container .tfs-slider[data-parallax="1"]').css(n)}}else"yes"===i.overlay&&e.hasClass("init-for-studio")&&o.addClass("is-closing"),"no"===i.overlay&&e.hasClass("init-for-studio")&&t("#icon-bar .go-back").click(),e.removeClass("awb-show");if(t('a[href^="#awb-oc__'+n+'"]').removeClass("awb-oc-active"),"yes"===i.overlay&&"no"===i.overlay_page_scrollbar&&t("html").css("overflow",""),setTimeout(()=>{this.removeHash()},10),a){const t=this.get(n,"close_count")||0;this.set(n,"close_count",t+1)}this.set(n,"closed",!0),clearTimeout(window.awb_oc_timeouts["close_after_time_"+n]),clearTimeout(window.awb_oc_timeouts["show_close_button_"+n]);parseInt(i.show_close_button_after_time)&&o.children(".off-canvas-close").addClass("hidden"),e.trigger(t.Event("awb-oc-closed"),[n]),this.moveOCContentToPostCard(e)},removeHash(){const t=window.location.href.split("#")[0];history.replaceState({},"",t)},enableTrapFocus(t){if(!t.hasClass("type-popup"))return;const n=t.find(".awb-off-canvas"),a=n.find('a[href]:not([disabled]):visible, button:not([disabled]):visible, textarea:not([disabled]):visible, input[type="text"]:not([disabled]):visible, input[type="radio"]:not([disabled]):visible, input[type="checkbox"]:not([disabled]):visible, select:not([disabled]):visible'),e=a[0],o=a[a.length-1];setTimeout(()=>{n[0].focus()},100),n[0].addEventListener("keydown",function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement===e&&(o.focus(),t.preventDefault()):document.activeElement===o&&(e.focus(),t.preventDefault()))})},movePostCardOCContentToOC(n,a){const e=a.closest(".post-card:not(.fusion_builder_column_inner)");if(e.length&&e.children(".awb-post-card-off-canvas-content").length){const a=t('.awb-off-canvas-wrap[data-id="'+n+'"]');if(a.length){const o=a.find(".off-canvas-content"),i=e.children(".awb-post-card-off-canvas-content");o.data("post-card",i).empty(),i.children().appendTo(o),o.children().find(".fusion-lottie").each(function(){if(!t(this).find("lottie-player").length){const n=t(this).find(".fusion-lottie-animation"),a=parseInt(n.data("speed")),e=parseInt(n.data("loop"));let o=parseInt(n.data("reverse"));o=1===o?-1:0,n.append('<lottie-player loop="'+e+'" speed="'+a+'" direction="'+o+'"></lottie-player>')}}),setTimeout(function(){t(window).trigger("fusion-dynamic-content-render",o)},10),o.find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids(),o.find(".fusion-flexslider, .flexslider").each(function(){1<t(this).find(".slides li").length&&t(this).flexslider(0)}),o.find(".awb-openstreet-map").trigger("awb_openstreetmap/updateMap"),window.awbOffCanvas.handlePagination(n,a,e)}}},handlePagination(t,n,a){const e=n.find(".off-canvas-content").find(".fusion-pagination-tb");if(e.length){const o=a.next().length?a.next():a.parent().children().first(),i=a.prev().length?a.prev():a.parent().children().last(),s=e.find(".fusion-tb-next"),c=e.find(".fusion-tb-previous");e.hasClass("layout-preview")?(s.find(".fusion-item-media").html(o.children(".awb-post-card-off-canvas-add-content").find(".awb-thumbnail").html()),s.find(".fusion-item-title").html(o.children(".awb-post-card-off-canvas-add-content").find(".awb-title").html()),c.find(".fusion-item-media").html(i.children(".awb-post-card-off-canvas-add-content").find(".awb-thumbnail").html()),c.find(".fusion-item-title").html(i.children(".awb-post-card-off-canvas-add-content").find(".awb-title").html())):e.hasClass("layout-post_titles")&&(s.children("a").html(o.children(".awb-post-card-off-canvas-add-content").find(".awb-title").html()),c.children("a").html(i.children(".awb-post-card-off-canvas-add-content").find(".awb-title").html())),s.off(),c.off(),s.one("click",function(a){a.preventDefault(),window.awbOffCanvas.moveOCContentToPostCard(n),setTimeout(function(){window.awbOffCanvas.movePostCardOCContentToOC(t,o.children(".awb-post-card-off-canvas-content"))},10)}),c.one("click",function(a){a.preventDefault(),window.awbOffCanvas.moveOCContentToPostCard(n),setTimeout(function(){window.awbOffCanvas.movePostCardOCContentToOC(t,i.children(".awb-post-card-off-canvas-content"))},10)})}},moveOCContentToPostCard(t){const n=t.find(".off-canvas-content"),a=void 0!==n.data("post-card")?n.data("post-card"):{};a.length&&(n.removeData("post-card"),n.children().appendTo(a))}},t(".awb-off-canvas").on("animationend",function(n){if(n.target!==this)return;const a=t(this),e=a.parent();a.attr("data-animation-type")&&a.removeClass("fusion-animated").removeClass(a.attr("data-animation-type")).removeAttr("data-animation-type"),a.hasClass("is-closing")?(a.removeClass("is-closing"),a.addClass("oc-waiting-for-close"),e.removeClass("awb-show"),e.hasClass("init-for-studio")&&t("#icon-bar .go-back").click()):window.awbOffCanvas.enableTrapFocus(e)}),t(".awb-off-canvas-wrap").on("transitionend",function(n){const a=t(this).find(".awb-off-canvas");a.hasClass("is-closing")&&t(this).hasClass("init-for-studio")&&(t("#icon-bar .go-back").click(),a.removeClass("is-closing")),a.removeClass("oc-waiting-for-close")}),t(window).on("load",function(){if(location.hash&&location.hash.startsWith("#awb-oc__")||location.hash&&location.hash.startsWith("#awb-open-oc__")){const t=location.hash.split("__")[1];window.awbOffCanvas.open_off_canvas(t,!1,!1)}t(".awb-off-canvas-wrap.init-for-studio").each(function(n,a){const e=t(a).data("id");window.awbOffCanvas.open_off_canvas(e,!1,!1)}),t(".awb-off-canvas-wrap").each(function(){t(this).on("awb-oc-closed",function(){t(this).find(".fusion-youtube iframe").each(function(){this.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),t(this).find(".fusion-vimeo iframe").each(function(){new Vimeo.Player(this).pause()}),t(this).find("video").each(function(){t(this).get(0).pause()}),t(this).find(".mejs-audio").each(function(){t(this).find(".mejs-playpause-button.mejs-pause button").trigger("click")})})})}),t("body").on("click",'a[href^="#awb-oc__"]',function(n){n.preventDefault();const a=(t(this).attr("href")||"").split("__")[1];window.awbOffCanvas.movePostCardOCContentToOC(a,t(this)),window.awbOffCanvas.open_off_canvas(a,!1,!0)}),t("body").on("click",'a[href^="#awb-open-oc__"]',function(n){n.preventDefault();const a=(t(this).attr("href")||"").split("__")[1];window.awbOffCanvas.movePostCardOCContentToOC(a,t(this)),window.awbOffCanvas.open_off_canvas(a,!1,!1)}),t("body").on("click",'a[href^="#awb-close-oc__"]',function(n){n.preventDefault();const a=(t(this).attr("href")||"").split("__")[1];a?window.awbOffCanvas.close_off_canvas(a):t(".awb-off-canvas-wrap.awb-show").each(function(){const n=t(this).data("id");window.awbOffCanvas.close_off_canvas(n)}),window.awbOffCanvas.removeHash()}),t(".awb-off-canvas-wrap:not(.overlay-disable-close)").on("click",function(n){if(n.target===this){const n=t(this).data("id");window.awbOffCanvas.close_off_canvas(n)}}),t(".close-on-anchor a").on("click",function(){if((t(this).attr("href")||"").includes("#")){const n=t(this).closest(".awb-off-canvas-wrap").data("id");window.awbOffCanvas.close_off_canvas(n)}}),t(".off-canvas-close").on("click",function(n){n.preventDefault();const a=t(this).closest(".awb-off-canvas-wrap").data("id");window.awbOffCanvas.close_off_canvas(a)}),t(document).on("keydown",function(n){if(27!==n.keyCode)return;t(".awb-off-canvas-wrap.awb-show:not(.disable-close-on-esc)").each(function(n,a){const e=t(a).data("id");window.awbOffCanvas.close_off_canvas(e)})}),t(".awb-off-canvas").on("mouseover",function(){const n=t(this).closest(".awb-off-canvas-wrap").data("id"),a=window["off_canvas_"+n];parseInt(a.auto_close_after_time)&&window.awb_oc_timeouts["close_after_time_"+n]&&clearTimeout(window.awb_oc_timeouts["close_after_time_"+n])}),t(".awb-off-canvas").on("mouseleave",function(){const n=t(this).closest(".awb-off-canvas-wrap").data("id"),a=window["off_canvas_"+n],e=parseInt(a.auto_close_after_time);e&&window.awb_oc_timeouts["close_after_time_"+n]&&(window.awb_oc_timeouts["close_after_time_"+n]=setTimeout(()=>{window.awbOffCanvas.close_off_canvas(n)},1e3*e))}),t("body").on("goback",function(n){t(".post-preview").css({"margin-right":0,"margin-left":0})}),t(".awb-off-canvas-wrap").each(function(n,a){const e=t(a).data("id"),o=window["off_canvas_"+e],i=t("#wpadminbar"),s=i.outerHeight();if("full"===o.height&&i.length&&t(a).find(".awb-off-canvas").css("height",`calc(100vh - ${s}px)`),"sliding-bar"===o.type&&"top"===o.position&&i.length&&t(a).find(".awb-off-canvas").css("margin-top",`${s}px`),"yes"===o.on_click){const n=o.on_click_element?t(o.on_click_element):null;n&&n.length&&(n.attr("data-off-canvas",o.on_click_element),t(document).on("click",o.on_click_element,function(t){t.preventDefault(),window.awbOffCanvas.open_off_canvas(e,!1)}))}"yes"===o.on_add_to_cart&&t(document).on("added_to_cart",function(){window.awbOffCanvas.open_off_canvas(e)});let c=!1;if(o.frequency){if("close"===o.frequency){!0===window.awbOffCanvas.get(e,"closed")&&(c=!0)}if("once"===o.frequency){0<window.awbOffCanvas.get(e,"open_count")&&(c=!0)}if("xtimes"===o.frequency&&o.frequency_xtimes){const t=window.awbOffCanvas.get(e,"open_count");parseInt(o.frequency_xtimes)<=t&&(c=!0)}if("session"===o.frequency){sessionStorage.getItem("off_canvas_"+e+"_opened")?c=!0:sessionStorage.setItem("off_canvas_"+e+"_opened",!0)}let t=window.awbOffCanvas.get(e,"last_open_date");const n=new Date;if("day"===o.frequency&&t){t=new Date(t);n<t.getTime()+864e5&&(c=!0)}if("week"===o.frequency&&t){t=new Date(t);n<t.getTime()+6048e5&&(c=!0)}if("month"===o.frequency&&t){t=new Date(t);n<new Date(t).setMonth(t.getMonth()+1)&&(c=!0)}if("xdays"===o.frequency&&o.frequency_xdays&&t){t=new Date(t);const a=parseInt(o.frequency_xdays);n<t.getTime()+24*a*60*60*1e3&&(c=!0)}}if("yes"===o.after_x_page_views){const t=window.awbOffCanvas.get(e,"page_views")||0;t<parseInt(o.number_of_page_views)&&(c=!0),window.awbOffCanvas.set(e,"page_views",t+1)}if("yes"===o.after_x_sessions){let t;sessionStorage.getItem("off_canvas_"+e)||(sessionStorage.setItem("off_canvas_"+e,!0),t=window.awbOffCanvas.get(e,"sessions")||0,window.awbOffCanvas.set(e,"sessions",t+1)),t=window.awbOffCanvas.get(e,"sessions"),t<=parseInt(o.number_of_sessions)&&(c=!0)}if(o.when_arriving_from){const t=document.referrer,n=window.location.host,a=o.when_arriving_from;let e;!t||t.includes(n)?e="internal":(e="external",/\.?(google|bing|yahoo|duckduckbot|yandex|baidu|msn|teoma|slurp)\./.test(t)&&(e="search")),c=!a.includes(e)}if("until_consent"===o.until_consent_interaction||"until_consent_close"===o.until_consent_interaction){let n=!1;"undefined"!=typeof avadaPrivacyVars&&avadaPrivacyVars.name&&(n=document.cookie.split(";").some(function(t){return t.trim().startsWith(avadaPrivacyVars.name+"=")})),n?c=!0:"until_consent_close"===o.until_consent_interaction&&t(document).one("awb_privacy_saved",function(){window.awbOffCanvas.close_off_canvas(e)})}if("opened"===o.off_canvas_state&&"sliding-bar"===o.type&&o.has_js_rules&&!c&&(t(window).on("load",function(){window.awbOffCanvas.open_off_canvas(e)}),c=!0),!0===o.isOpened&&(c=!0),!c){if("yes"===o.on_page_load&&setTimeout(()=>{window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0},100),"yes"===o.time_on_page&&o.time_on_page_duration&&setTimeout(()=>{window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0},1e3*o.time_on_page_duration),"yes"===o.on_scroll){const n=o.scroll_direction,a=o.scroll_to,i=document.documentElement.scrollHeight;let s=o.scroll_position;if(s&&isNaN(s)&&(s=s.includes("%")?i/100*parseInt(s):parseInt(s)),"down"===n&&"element"===a){const t=o.scroll_element?document.querySelector(o.scroll_element):null;if(t){const n=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0,n.unobserve(t.target))})});n.observe(t)}}else t(window).on("scroll",function(t){"up"===o.scroll_direction&&this.oldScroll>this.scrollY&&(o.isOpened||window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0),"down"===o.scroll_direction&&this.oldScroll<this.scrollY&&this.scrollY>=s&&(o.isOpened||window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0),this.oldScroll=this.scrollY})}if("yes"===o.exit_intent){const t=function(n){null==n.relatedTarget&&"select"!==n.target.nodeName.toLowerCase()&&(window.awbOffCanvas.open_off_canvas(e),document.removeEventListener("mouseout",t),o.isOpened=!0)};document.addEventListener("mouseout",t)}if("yes"===o.after_inactivity&&o.inactivity_duration){const t=o.inactivity_duration;let n;const a=function(){n=window.setTimeout(i,1e3*t)},i=function(){o.isOpened||window.awbOffCanvas.open_off_canvas(e),o.isOpened=!0},s=function(){document.addEventListener("mousemove",c,!1),document.addEventListener("mousedown",c,!1),document.addEventListener("keypress",c,!1),document.addEventListener("touchmove",c,!1),document.addEventListener("scroll",c,!1),a()},c=function(){window.clearTimeout(n),a()};s()}}}),t(".awb-off-canvas-wrap").on("select2:open",function(n){const a=t(n.target);t(".select2-dropdown").css("z-index",a.closest(".awb-off-canvas-wrap").css("z-index"))})}(jQuery);