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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n{var n,l="wc/store/cart",r=300;function d(){var e=c(".brandy-mini-cart");e.length<1||e.addClass("refreshing")}function u(){var e=c(".brandy-mini-cart");e.length<1||e.removeClass("refreshing")}function a(){d(),document.body.dispatchEvent(new CustomEvent("wc_fragment_refresh"))}function e(e,t){try{var n=t;if(null==t){if(null==window.sessionStorage||null==window.wc_cart_fragments_params)throw"Cannot find session";if(null==window.sessionStorage[window.wc_cart_fragments_params.fragment_name])throw"Cannot find storage";n=JSON.parse(window.sessionStorage[window.wc_cart_fragments_params.fragment_name])}c(".brandy-mini-cart").html(n["div.widget_shopping_cart_content"]),c(".brandy-cart-qtybadge").html(n.count||"")}catch(e){}finally{u()}}c(document).ready(function(){c(document.body).on("wc_fragments_refreshed added_to_cart removed_from_cart",e)}),c(document).on("wc-blocks_added_to_cart wc-blocks_removed_from_cart",a);var o=!1;function t(){c(".update-cart-btn").removeAttr("disabled")}function i(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){var s=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:clearTimeout(n),n=setTimeout(_asyncToGenerator(_regeneratorRuntime().mark(function e(){var t,n,r,a,o,i;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d(),e.prev=1,t=c(s).parent(),null==(t=t.find("input")))throw"Cannot find input";e.next=6;break;case 6:if(null==(n=+t.val()))throw"Invalid value";e.next=9;break;case 9:if(null==(r=t.attr("name")))throw"Invalid name";e.next=12;break;case 12:if(a=r.match(/\[(.*?)\]/),null==(a=null==a?void 0:a[1]))throw"Invalid cart item key";e.next=16;break;case 16:null!=(i=window.wp)&&i.data&&(i=window.wp.data.dispatch(l),o=i.changeCartItemQuantity,i=i.removeItemFromCart,n<1?i(a):o(a,n)),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),u();case 22:case"end":return e.stop()}},e,null,[[1,19]])})),r);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function h(e){var t,n=1{e(document).ready(function(){e(".single-comment__detail__action .reply-btn").on("click",function(){e(this).closest(".single-comment").find(".single-comment__reply-form").show()})})})(window.jQuery),(e=>{e("document").ready(function(){e("head").append(""))})})(window.jQuery),(s=>{s(document).ready(function(){var i;s(".brandy-subscribe-box__action-send-mail").on("click",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(i);var e=s(".brandy-subscribe-box__input").val(),o=s(".brandy-subscribe-box__action-send-mail");o.addClass("loading"),s.ajax({url:window.brandyData.ajax.path,method:"POST",data:{email:e,action:"brandy_send_subscribe_mail",nonce:window.brandyData.ajax.nonces.send_subscribe_mail},success:function(e){var t,n,r,a;e.success&&(o.removeClass("loading"),t=(null==e||null==(t=e.data)?void 0:t.message)||"",e=(null==e||null==(e=e.data)?void 0:e.success)||!1?"#7ED321":"#FF0000",n="\n \n "),(r=s("body")).css({position:"relative"}),((a=s("#send-mail-message")).length<1?(r.append(n),s("#send-mail-message")):(s(".send-mail-message-icon").attr("fill",e),a.find(".send-mail-message-content").html(t),a)).fadeIn("slow"),i=setTimeout(function(){s("#send-mail-message").fadeOut("slow")},3e3))},error:function(e){o.removeClass("loading"),console.log(e)}})})})})(jQuery),(a=>{a("document").ready(function(){var e="".concat([1,2,3,4,5].map(function(e){return'\t\t\t\t\n\t\t\t')}).join(""));a("#brandy-rating .brandy-ratings__stars").html(e),a(".comment-form-author input").attr("placeholder","Enter your fullname"),a(".comment-form-email input").attr("placeholder","Enter your email"),a(document).on("click","#brandy-rating > .brandy-ratings__stars > label",function(){var n=a(this).find("input[type='radio']").val();a(this).closest("#brandy-rating").find(".star-item").each(function(e,t){e\n .woocommerce-product-gallery__trigger::after {\n background-image: url(".concat(window.brandyData.urls.assets+"/images/zoom-icon.svg",")\n }\n "))}),a(document).ready(function(){a(document).on("click",".brandy-cart-actions .single_add_to_cart_button, .woocommerce-variation-add-to-cart .single_add_to_cart_button",function(){a(this).addClass("loading"),a(this).addClass("disabled"),a(this).append('')})})})(window.jQuery),(i=>{i(document).ready(function(){function n(){var o=0{n(document).ready(function(){n(document).on("click",".brandy-currency-element .brandy-currency-switcher__placeholder",function(){n(this).toggleClass("opened")}),n(document).on("click",function(e){var t=n(".brandy-currency-element .brandy-currency-switcher__placeholder");t.has(e.target).length<=0&&!t.is(e.target)&&t.removeClass("opened")}),n(document).on("click",".brandy-currency-element .brandy-currency-option",function(){n(".brandy-yay-currency-form").find("select.yay-currency-switcher").val(n(this).attr("data-yay_id")).change()})})})(window.jQuery),(c=>{c(document).ready(function(){var i=0;function s(){return window.pageYOffset||document.documentElement.scrollTop}function t(){var e=c(".sticky-headers");e.length<0||e.each(function(e,t){var n=!(0a+r&&n?(c(t).addClass("is-stickying"),c(t).closest(".header-within-device").addClass("sticky-start"),a=c("body").outerWidth()-c("body").width(),c(t).find(".sticky-part").css("width","calc(100% - ".concat(a,"px )"))):(window.scrollY<=o||0==window.scrollY||!n)&&(c(t).removeClass("is-stickying"),c(t).closest(".header-within-device").removeClass("sticky-start"),c(t).find(".sticky-part").css("width","100%"))})}window.addEventListener("scroll",function(){var e=s();t(),i=e<=0?0:e}),t()})})(window.jQuery),(n=>{n(document).ready(function(){n(document).on("click",".brandy-lang-switcher-element .brandy-lang-switcher__placeholder",function(){n(this).toggleClass("opened"),n(this).hasClass("opened")&&window.dispatchEvent(new CustomEvent("brandy-language-switcher-opened",{detail:{activator:this}}))}),n(document).on("click",function(e){var t=n(".brandy-lang-switcher-element .brandy-lang-switcher__placeholder");t.has(e.target).length<=0&&!t.is(e.target)&&t.removeClass("opened")}),n(document).on("click",".brandy-lang-switcher-element .brandy-lang-option",function(){n(".brandy-lang-switcher-element .brandy-lang-option").removeClass("selected"),n(this).addClass("selected"),n(".brandy-lang-switcher__placeholder .brandy-lang-flag").replaceWith(n(this).find(".brandy-lang-flag").clone()),n(".brandy-lang-switcher__placeholder .brandy-lang-name").replaceWith(n(this).find(".brandy-lang-name").clone())}),n(window).on("brandy-language-switcher-opened",function(e){var e=n(e.detail.activator).parent(),t=n(e).find(".brandy-lang-options"),e=0{r(document).ready(function(){window.addEventListener("scroll",function(){r("#brandy-header div:not(.brandy-toc-elements-wrapper) > .brandy-logo-element").each(function(e,t){var n;1==r(t).data("has-sticky-logo")&&(n=r(t).find('.brandy-logo[logo-type="primary"]'),t=r(t).find('.brandy-logo[logo-type="sticky"]'),100{function o(){l(".brandy-element-wrapper[layout='vertical']").each(function(e,t){var n,r=t.querySelector(".brandy-menu-navigation.has-navigation"),a=0;r&&(n=window.getComputedStyle(r),a=r.getBoundingClientRect().height+(parseFloat(n.marginBottom)||0),l(t).find(".brandy-sub-menu").css("top",a)),l(t).find(".has-navigation").length<1?l(t).css("height",(null==(r=t.querySelector(".brandy-menu-items"))?void 0:r.getBoundingClientRect().height)+a):l(t).css("height",(null==(n=t.querySelector(".sub-menu-active"))?void 0:n.getBoundingClientRect().height)+a)})}l(document).ready(function(){var i=".brandy-element-wrapper[layout='vertical']";function s(e){var t,n=l(e).closest(i);e.length<=0||(t=e.attr("aria-label"),e=e.attr("menu-key"),l(n).find(".brandy-menu-navigation").addClass("has-navigation"),l(n).find(".brandy-menu-navigation .menu-mavigation-text").html(null!=t?t:""),l(n).find(".brandy-menu-navigation").attr("active-key",null!=e?e:""))}function c(){l("".concat(i," .brandy-menu__item")).on("click",function(e){e.stopPropagation(),this.classList.contains("menu-item-has-children")&&(e.preventDefault(),s(l(this)),e=l(this).attr("menu-key"),l(".brandy-sub-menu.sub-menu-active").addClass("parent-menu-active").removeClass("sub-menu-active"),l('.brandy-sub-menu[parent-key="'.concat(e,'"]')).addClass("sub-menu-active").removeClass("parent-menu-active"),window.dispatchEvent(new CustomEvent("brandy-menu-changed")))})}l(document.body).on("click",".brandy-menu-navigation",function(){var e=l(this).closest(i),t=l(this).attr("active-key"),n=l(e).find(".brandy-sub-menu[parent-key=".concat(t,"]")),n=(n.removeClass("sub-menu-active"),n.removeClass("parent-menu-active"),l(e).find('.brandy-menu__item[menu-key="'.concat(t,'"]')).closest(".brandy-sub-menu"));0 .brandy-element-wrapper",function(){var e=l("".concat(i," .brandy-menu__item.current-menu-item"));if(0More
    '));for(var n,r,a=l(n);;)if(r=(()=>{var n=[],e=l(t).find(".brandy-menu-items").children(".brandy-menu__item"),r=l(t).closest(".header-col").offset().left+l(t).closest(".header-col").outerWidth();if(window.brandyData.rtl&&(r=l(window).width()-t.offsetLeft),e.each(function(e,t){0!=e&&(e=t.offsetLeft+t.offsetWidth,window.brandyData.rtl&&(e=l(window).width()-t.offsetLeft),Math.ceil(e)-10>r)&&(l(t).is(".more-options")?((e=l(t).prev()).addClass("brandy-sub-menu__item"),n.push(e)):(t.classList.add("brandy-sub-menu__item"),n.push(t)))}),n.forEach(function(e){a.children(".brandy-sub-menu").append(e)}),0{var a=null,o='form[name="brandy-search-form"]',i=".brandy-live-result__close",t=(()=>{return _createClass(function e(t){_classCallCheck(this,e),_defineProperty(this,"hasLiveResult",void 0),_defineProperty(this,"hasImage",void 0),_defineProperty(this,"hasPrice",void 0),_defineProperty(this,"hasViewMore",void 0),_defineProperty(this,"isIcon",void 0),_defineProperty(this,"limit",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"closeLiveResultHandler",void 0),_defineProperty(this,"submitHandler",void 0),_defineProperty(this,"showMoreHandler",void 0),_defineProperty(this,"searchBySuggestionHandler",void 0),this.element=t,this.hasLiveResult=null!=r(this.element).attr("has-live-results"),this.hasImage=null!=r(this.element).attr("has-image"),this.hasPrice=null!=r(this.element).attr("has-price"),this.hasViewMore=null!=r(this.element).attr("has-view-more"),this.isIcon="icon"==r(this.element).find(".brandy-search-box").attr("type"),this.limit=6,this.closeLiveResult(),this.createHandlers(),this.main()},[{key:"addHeaderPriority",value:function(){r(".header-within-device").each(function(e,t){var n=!0;r(t).find(".brandy-element-wrapper[backdrop-type='type_6']").length<1||r(t).find(".brandy-child-header").each(function(e,t){(n=0\n
    \n
    \n
    \n \n ';return'\n
    \n '.concat(e,"\n
    \n ")}},{key:"stopLoading",value:function(){r(this.element).find(".brandy-result-placeholder").remove()}},{key:"mapDataToContent",value:function(e){r(this.element).find(".brandy-live-result__content").append(e)}},{key:"clearResult",value:function(){r(this.element).find(".brandy-live-result__content").html("")}},{key:"fetchPosts",value:(n=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){var n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new URLSearchParams(t),e.abrupt("return",new Promise(function(t){a=r.ajax({url:window.brandyData.ajax.path+"?".concat(n.toString()),type:"GET",data:{action:"brandy_search"},success:function(e){e.success&&t(null!=(e=null==(e=e.data)?void 0:e.html)?e:""),t("")}})}));case 2:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"onSearch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){var n,r,a,o,i;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.s,r=t.post_types,a=t.offset,o=t.limit,i=void 0!==(i=t.showMore)&&i,this.openLiveResult(),i||this.clearResult(),this.loading(),e.next=6,this.fetchPosts({s:n,post_types:r,offset:a,limit:o});case 6:i=e.sent,this.mapDataToContent(i),this.stopLoading();case 9:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"onSubmit",value:function(e){e.preventDefault(),e.stopPropagation();var t=new FormData(e.target).get("search_value"),e=null!=(e=r(e.target).attr("search-criteria"))?e:"",n={s:t,post_types:e,offset:0..toString(),limit:this.limit.toString()};this.hasLiveResult?(this.isIcon&&this.openLiveResult(),null!=t&&""!=t&&this.onSearch(n)):window.location.href=window.location.origin+"/?s=".concat(t,"&post_type=").concat(""!=e?e:"any")}},{key:"onShowMore",value:function(){var e,t,n=r(o);n.length<=0||(e=new FormData(n[0]).get("search_value"),n=null!=(n=r(n[0]).attr("search-criteria"))?n:"",t=r(".brandy-live-result__content .brandy-result-item").length||0,this.onSearch({s:e,post_types:n,offset:t.toString(),limit:this.limit.toString(),showMore:!0}))}},{key:"searchBySuggestion",value:function(e){var t,e=e.target.dataset.value,e=(r(".brandy-search-box__input").val(e),r(o));e.length<=0||(t=new FormData(e[0]).get("search_value"),e=null!=(e=r(e[0]).attr("search-criteria"))?e:"",this.onSearch({s:t,post_types:e,offset:0..toString(),limit:this.limit.toString()}))}},{key:"parentSubmit",value:function(e){e.stopPropagation(),e.preventDefault(),r(this).parent().submit()}},{key:"createHandlers",value:function(){this.closeLiveResultHandler=this.closeLiveResult.bind(this),this.submitHandler=this.onSubmit.bind(this),this.showMoreHandler=this.onShowMore.bind(this),this.searchBySuggestionHandler=this.searchBySuggestion.bind(this),this.onEscEvent=this.onEsc.bind(this)}},{key:"onEsc",value:function(e){"Escape"===e.key&&this.closeLiveResult()}},{key:"main",value:function(){r(this.element).find(o+" button[type='submit']").on("click",this.parentSubmit),r(this.element).find(o).on("submit",this.submitHandler),r(document).on("keyup",".brandy-search-box__input",function(e){r(".brandy-search-box__input").val(e.target.value)}),r(document).on("focus",".brandy-search-box__input",function(){r(".brandy-search-box").addClass("focused")}),r(document).on("focusout",".brandy-search-box__input",function(){r(".brandy-search-box").removeClass("focused")}),r(this.element).find(".brandy-live-result__suggestions__item").on("click",this.searchBySuggestionHandler)}},{key:"removeListeners",value:function(){r(this.element).find(o+" button[type='submit']").off("click",this.parentSubmit),r(this.element).find(o).off("submit",this.submitHandler),r(this.element).find(".brandy-live-result__suggestions__item").off("click",this.searchBySuggestionHandler)}}]);var t,n})();function n(){var e=[];return r(".brandy-search-element .brandy-element-wrapper").each(function(){e.push(new t(this))}),e}r(document).ready(function(){var e=n();window.addEventListener("partials-refreshed",function(){e.forEach(function(e){e.removeListeners()}),e=n()})})})(window.jQuery),(s=>{function e(){s("body").removeClass("toc-opened")}function t(e){s("body").toggleClass("toc-opened"),s("body").hasClass("toc-opened")&&window.dispatchEvent(new CustomEvent("brandy-canvas-opened"))}s(document).ready(function(){s(document).on("click",".brandy-toggle-button-element > .brandy-element-wrapper",t),s(document).on("click",".brandy-toc-close-icon, .brandy-toc-backdrop",e)}),s(window).on("resize",function(){0{o(document).ready(function(){function t(){var a=0