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,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,n){for(var t=0;tn||o{var t,d="wc/store/cart",a=300;function l(){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 r(){l(),document.body.dispatchEvent(new CustomEvent("wc_fragment_refresh"))}function e(e,n){try{var t=n;if(null==n){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";t=JSON.parse(window.sessionStorage[window.wc_cart_fragments_params.fragment_name])}c(".brandy-mini-cart").html(t["div.widget_shopping_cart_content"]),c(".brandy-cart-qtybadge").html(t.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.body).on("click",".ajax_add_to_cart",function(e){var n=null!=(n=e.currentTarget)?n:c(e.target).closest(".ajax_add_to_cart");c(n).addClass("loading")}),window.addEventListener("wc-blocks_store_sync_required",function(e){var n,t=[];"from_iAPI"===(null==(n=e.detail)?void 0:n.type)&&null!=(n=e.detail)&&null!=(n=n.quantityChanges)&&n.productsPendingAdd&&t.push(e.detail.quantityChanges.productsPendingAdd),"from_iAPI"===(null==(n=e.detail)?void 0:n.type)&&null!=(n=e.detail)&&null!=(n=n.quantityChanges)&&n.cartItemsPendingQuantity&&e.detail.quantityChanges.cartItemsPendingQuantity.forEach(function(n){var e=null!=(e=null==(e=window.wp.data.select(d).getCartData().items.find(function(e){return e.key===n}))?void 0:e.id)?e:"";e&&t.push(e)}),t.forEach(function(e){e=c('.ajax_add_to_cart[data-product_id="'.concat(e,'"]'));0{var n=_asyncToGenerator(_regenerator().m(function e(n){var t,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:t=c(n.currentTarget),t=t.data("cart_item_key"),a=window.wp.data.dispatch(d),a=a.removeItemFromCart,l(),a(t);case 1:return e.a(2)}},e)}));return function(e){return n.apply(this,arguments)}})())}),c(document).on("wc-blocks_added_to_cart wc-blocks_removed_from_cart",r);var o=!1;function n(){c(".update-cart-btn").removeAttr("disabled")}function i(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(_regenerator().m(function e(n){var s=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:clearTimeout(t),t=setTimeout(_asyncToGenerator(_regenerator().m(function e(){var n,t,a,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(l(),e.p=1,n=c(s).parent(),null==(n=n.find("input")))throw"Cannot find input";e.n=2;break;case 2:if(null==(t=+n.val()))throw"Invalid value";e.n=3;break;case 3:if(null==(a=n.attr("name")))throw"Invalid name";e.n=4;break;case 4:if(r=a.match(/\[(.*?)\]/),null==(r=null==r?void 0:r[1]))throw"Invalid cart item key";e.n=5;break;case 5:null!=(i=window.wp)&&i.data&&(i=window.wp.data.dispatch(d),o=i.changeCartItemQuantity,i=i.removeItemFromCart,t<1?i(r):o(r,t)),e.n=7;break;case 6:e.p=6,u();case 7:return e.a(2)}},e,null,[[1,6]])})),a);case 1:return e.a(2)}},e)}))).apply(this,arguments)}function m(e){var n,t=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),(t=>{t("document").ready(function(){t("head").append(""))});var r={actions:{startZoom:function(e){var n=e.target;if(!n.classList.contains("wc-block-woocommerce-product-gallery-large-image__image"))return r.actions.resetZoom(e);var t=e.target,a=e.offsetX/t.clientWidth*100,e=e.offsetY/t.clientHeight*100;n.style.transform="scale(1.3)",n.style.transformOrigin="".concat(a,"% ").concat(e,"%")},resetZoom:function(e){e=e.target;e&&(e.style.transform="scale(1.0)",e.style.transformOrigin="")}}};t(document).on("mousemove",".wc-block-product-gallery.show-all .wc-block-woocommerce-product-gallery-large-image__image--hoverZoom",function(e){r.actions.startZoom(e)}),t(document).on("mouseleave",".wc-block-product-gallery.show-all .wc-block-woocommerce-product-gallery-large-image__image--hoverZoom",function(e){r.actions.resetZoom(e)}),t(document).on("click",".wc-block-woocommerce-product-gallery-large-image__image:not(.wc-block-woocommerce-product-gallery-large-image__image--full-screen-on-click)",function(e){e.preventDefault()}),t(document).on("click",".wc-block-woocommerce-product-gallery-large-image__image.wc-block-woocommerce-product-gallery-large-image__image--full-screen-on-click",function(e){var n=t(this).data("image-id");setTimeout(function(){var e=t(".wc-block-product-gallery-dialog__images");0!==e.length&&0!==(e=e.find('[data-image-id="'.concat(n,'"]'))).length&&e[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},100)})})(window.jQuery),(c=>{c(document).ready(function(){var s;c(".brandy-subscribe-box__action-send-mail").on("click",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(s);var e=c(this).closest("form"),i=c(".brandy-subscribe-box__action-send-mail");i.addClass("loading"),c.ajax({url:window.brandyFrontend.ajax.path,method:"POST",data:{email:e.find("input[name='email']").val(),action:window.brandyFrontend.ajax.actions.sendSubscription,nonce:window.brandyFrontend.ajax.nonces.sendSubscription},success:function(e){var n,t,a,r,o;e.success&&(i.removeClass("loading"),n=(null==e||null==(n=e.data)?void 0:n.message)||"",o=(null==e||null==(o=e.data)?void 0:o.success)||!1,a="\n \n "),(r=c("body")).css({position:"relative"}),o?c(".brandy-subscribe-box").replaceWith('

'.concat((null==e||null==(o=e.data)?void 0:o.message)||"You have been subscribed to our newsletter!","

")):(((e=c("#send-mail-message")).length<1?(r.append(a),c("#send-mail-message")):(c(".send-mail-message-icon").attr("fill",t),e.find(".send-mail-message-content").html(n),e)).fadeIn("slow"),s=setTimeout(function(){c("#send-mail-message").fadeOut("slow")},3e3)))},error:function(e){i.removeClass("loading"),console.log(e)},finally:function(){i.removeClass("loading")}})})})})(jQuery),(r=>{r("document").ready(function(){var e="".concat([1,2,3,4,5].map(function(e){return'\t\t\t\t\n\t\t\t')}).join(""));r("#brandy-rating .brandy-ratings__stars").html(e),r(".comment-form-author input").attr("placeholder","Enter your fullname"),r(".comment-form-email input").attr("placeholder","Enter your email"),r(document).on("click","#brandy-rating > .brandy-ratings__stars > label",function(){var t=r(this).find("input[type='radio']").val();r(this).closest("#brandy-rating").find(".star-item").each(function(e,n){e\n .woocommerce-product-gallery__trigger::after {\n background-image: url(".concat(window.brandyFrontend.urls.assets+"/images/zoom-icon.svg",")\n }\n "))}),r(document).ready(function(){r(document).on("click",".brandy-cart-actions .single_add_to_cart_button, .woocommerce-variation-add-to-cart .single_add_to_cart_button",function(){r(this).addClass("loading"),r(this).addClass("disabled"),r(this).append('')})}),r(document).ready(function(){document.querySelectorAll(".wc-block-product-gallery-thumbnails__scrollable").forEach(function(n){var t,a,r=!1;n.addEventListener("mousedown",function(e){r=!0,n.classList.add("active"),t=e.pageX-n.offsetLeft,a=n.scrollLeft,n.style.cursor="grabbing"}),n.addEventListener("mouseleave",function(){r=!1,n.classList.remove("active"),n.style.cursor="grab"}),n.addEventListener("mouseup",function(){r=!1,n.classList.remove("active"),n.style.cursor="grab"}),n.addEventListener("mousemove",function(e){r&&(e.preventDefault(),e=2*(e.pageX-n.offsetLeft-t),n.scrollLeft=a-e)}),n.style.cursor="grab"})})})(window.jQuery),(i=>{function e(){var e=i(".wp-block-woocommerce-empty-cart-block .ajax_add_to_cart.wc-interactive");e.length<1||i(e).removeClass("wc-interactive")}i(document).ready(function(){function t(){var o=0{a(document).ready(function(){a(document).on("click",".brandy-currency-element .brandy-currency-switcher__placeholder",function(){a(this).toggleClass("opened")}),a(document).on("click",function(e){var n=a(".brandy-currency-element .brandy-currency-switcher__placeholder");n.has(e.target).length<=0&&!n.is(e.target)&&n.removeClass("opened")}),a(document).on("click",".brandy-currency-element .brandy-currency-option",function(){var e,n,t=window.YayCurrency_Callback;t&&(n=a(this).attr("data-yay_id"),t.Helper.setCookie(null!=(e=yayCurrency.cookie_name)?e:"yay_currency_widget",n,1),t.Helper.setCookie(null!=(e=yayCurrency.cookie_switcher_name)?e:"yay_currency_do_change_switcher",n,1),a(".brandy-yay-currency-form").find("select.yay-currency-switcher").val(n).change())})})})(window.jQuery),(n=>{var t,e,a=n(".brandy-dark-mode-toggle");a.length&&(t=a.attr("data-storage-key"),e=n("html").attr("data-theme")||"light",a.attr("aria-pressed","dark"===e?"true":"false"),window.jQuery(document).on("click",".brandy-dark-mode-toggle",function(){var e="dark"===(document.documentElement.getAttribute("data-theme")||"light")?"light":"dark";document.documentElement.setAttribute("data-theme",e),document.documentElement.style.colorScheme=e,n(".brandy-dark-mode-toggle").attr("aria-pressed","dark"==e?"true":"false");try{localStorage.setItem(t,e)}catch(e){}window.parent&&window.parent!==window&&window.parent.postMessage({type:"brandy-color-scheme-change",scheme:e},"*")}))})(window.jQuery),(c=>{c(document).ready(function(){var i=0;function s(){return window.pageYOffset||document.documentElement.scrollTop}function n(){var e=c(".sticky-headers");e.length<0||e.each(function(e,n){var t=!(0r+a&&t?(c(n).addClass("is-stickying"),c(n).closest(".header-within-device").addClass("sticky-start"),r=c("body").outerWidth()-c("body").width(),c(n).find(".sticky-part").css("width","calc(100% - ".concat(r,"px )"))):(window.scrollY<=o||0==window.scrollY||!t)&&(c(n).removeClass("is-stickying"),c(n).closest(".header-within-device").removeClass("sticky-start"),c(n).find(".sticky-part").css("width","100%"))})}window.addEventListener("scroll",function(){var e=s();n(),i=e<=0?0:e}),n()})})(window.jQuery),(t=>{t(document).ready(function(){t(document).on("click",".brandy-lang-switcher-element .brandy-lang-switcher__placeholder",function(){t(this).toggleClass("opened"),t(this).hasClass("opened")&&window.dispatchEvent(new CustomEvent("brandy-language-switcher-opened",{detail:{activator:this}}))}),t(document).on("click",function(e){var n=t(".brandy-lang-switcher-element .brandy-lang-switcher__placeholder");n.has(e.target).length<=0&&!n.is(e.target)&&n.removeClass("opened")}),t(document).on("click",".brandy-lang-switcher-element .brandy-lang-option",function(){t(".brandy-lang-switcher-element .brandy-lang-option").removeClass("selected"),t(this).addClass("selected"),t(".brandy-lang-switcher__placeholder .brandy-lang-flag").replaceWith(t(this).find(".brandy-lang-flag").clone()),t(".brandy-lang-switcher__placeholder .brandy-lang-name").replaceWith(t(this).find(".brandy-lang-name").clone())}),t(window).on("brandy-language-switcher-opened",function(e){var e=t(e.detail.activator).parent(),n=t(e).find(".brandy-lang-options"),e=0{a(document).ready(function(){window.addEventListener("scroll",function(){a("#brandy-header div:not(.brandy-toc-elements-wrapper) > .brandy-logo-element").each(function(e,n){var t;1==a(n).data("has-sticky-logo")&&(t=a(n).find('.brandy-logo[logo-type="primary"]'),n=a(n).find('.brandy-logo[logo-type="sticky"]'),100{function i(){l(".brandy-element-wrapper[layout='vertical']").toArray().map(function(e){var n=e.querySelector(".brandy-menu-navigation.has-navigation"),t=0,a=(n&&(a=n.getBoundingClientRect(),n=window.getComputedStyle(n),t=a.height+(parseFloat(n.marginBottom)||0)),0 .brandy-element-wrapper",function(){var e=l("".concat(i," .brandy-menu__item.current-menu-item"));if(0More
    '),t=l(t),(d=(r=l(n).find(".brandy-menu-items")).children(".brandy-menu__item").toArray()).length<=1)||(o=l(n).closest(".header-col"),i=window.brandyFrontend.rtl,s=l(window).width(),a=o.offset().left+o.outerWidth(),i&&(a=s-n.offsetLeft),0!==(d=d.map(function(e,n){return 0===n?{item:e,shouldCollapse:!1}:(n=e.offsetLeft+e.offsetWidth,{item:e,itemEndX:n=i?s-e.offsetLeft:n,shouldCollapse:Math.ceil(n)-10>a})}).filter(function(e){return e.shouldCollapse&&!l(e.item).is(".more-options")})).length&&(c=t.children(".brandy-sub-menu"),d.forEach(function(e){e=e.item;e.classList.add("brandy-sub-menu__item"),c.append(e)}),0===l(n).find(".more-options").length&&(d=l(n).find(".brandy-menu__item:not(.current-menu-item)").data("isGradientText"),t.attr("data-is-gradient-text",d?"true":"false"),r.append(t)),requestAnimationFrame(function(){var t,a,e=r.children(".brandy-menu__item:not(.more-options)").toArray();e.length<=1||(t=i?s-n.offsetLeft:o.offset().left+o.outerWidth(),a=[],e.slice(1).forEach(function(e){var n=e.offsetLeft+e.offsetWidth;i&&(n=s-e.offsetLeft),Math.ceil(n)-10>t&&a.push(e)}),0{var r=null,o='form[name="brandy-search-form"]',i=".brandy-live-result__close",n=(()=>{return _createClass(function e(n){_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=n,this.hasLiveResult=null!=a(this.element).attr("has-live-results"),this.hasImage=null!=a(this.element).attr("has-image"),this.hasPrice=null!=a(this.element).attr("has-price"),this.hasViewMore=null!=a(this.element).attr("has-view-more"),this.isIcon="icon"==a(this.element).find(".brandy-search-box").attr("type"),this.limit=6,this.closeLiveResult(),this.createHandlers(),this.main()},[{key:"addHeaderPriority",value:function(){a(".header-within-device").each(function(e,n){var t=!0;a(n).find(".brandy-element-wrapper[backdrop-type='type_6']").length<1||a(n).find(".brandy-child-header").each(function(e,n){(t=0\n
    \n
    \n
    \n
    \n
    \n \n ';return'\n
    \n '.concat(e,"\n
    \n ")}},{key:"stopLoading",value:function(){a(this.element).find(".brandy-result-placeholder").remove()}},{key:"mapDataToContent",value:function(e){a(this.element).find(".brandy-live-result__content").append(e)}},{key:"clearResult",value:function(){a(this.element).find(".brandy-live-result__content").html("")}},{key:"fetchPosts",value:(t=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(;;)if(0===e.n)return t=new URLSearchParams(n),e.a(2,new Promise(function(n){r=a.ajax({url:window.brandyFrontend.ajax.path+"?".concat(t.toString()),type:"GET",data:{action:"brandy_search"},success:function(e){e.success&&n(null!=(e=null==(e=e.data)?void 0:e.html)?e:""),n("")}})}))},e)})),function(e){return t.apply(this,arguments)})},{key:"onSearch",value:(n=_asyncToGenerator(_regenerator().m(function e(n){var t,a,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return t=n.s,a=n.post_types,r=n.offset,o=n.limit,i=void 0!==(i=n.showMore)&&i,this.openLiveResult(),i||this.clearResult(),this.loading(),e.n=1,this.fetchPosts({s:t,post_types:a,offset:r,limit:o});case 1:i=e.v,this.mapDataToContent(i),this.stopLoading();case 2:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"onSubmit",value:function(e){e.preventDefault(),e.stopPropagation();var n=new FormData(e.target).get("search_value"),e=null!=(e=a(e.target).attr("search-criteria"))?e:"",t={s:n,post_types:e,offset:0..toString(),limit:this.limit.toString()};this.hasLiveResult?(this.isIcon&&this.openLiveResult(),null!=n&&""!=n&&this.onSearch(t)):window.location.href=window.location.origin+"/?s=".concat(n,"&post_type=").concat(""!=e?e:"any")}},{key:"onShowMore",value:function(){var e,n,t=a(o);t.length<=0||(e=new FormData(t[0]).get("search_value"),t=null!=(t=a(t[0]).attr("search-criteria"))?t:"",n=a(".brandy-live-result__content .brandy-result-item").length||0,this.onSearch({s:e,post_types:t,offset:n.toString(),limit:this.limit.toString(),showMore:!0}))}},{key:"searchBySuggestion",value:function(e){var n,e=e.target.dataset.value,e=(a(".brandy-search-box__input").val(e),a(o));e.length<=0||(n=new FormData(e[0]).get("search_value"),e=null!=(e=a(e[0]).attr("search-criteria"))?e:"",this.onSearch({s:n,post_types:e,offset:0..toString(),limit:this.limit.toString()}))}},{key:"parentSubmit",value:function(e){e.stopPropagation(),e.preventDefault(),a(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(){a(this.element).find(o+" button[type='submit']").on("click",this.parentSubmit),a(this.element).find(o).on("submit",this.submitHandler),a(document).on("keyup",".brandy-search-box__input",function(e){a(".brandy-search-box__input").val(e.target.value)}),a(document).on("focus",".brandy-search-box__input",function(){a(".brandy-search-box").addClass("focused")}),a(document).on("focusout",".brandy-search-box__input",function(){a(".brandy-search-box").removeClass("focused")}),a(this.element).find(".brandy-live-result__suggestions__item").on("click",this.searchBySuggestionHandler)}},{key:"removeListeners",value:function(){a(this.element).find(o+" button[type='submit']").off("click",this.parentSubmit),a(this.element).find(o).off("submit",this.submitHandler),a(this.element).find(".brandy-live-result__suggestions__item").off("click",this.searchBySuggestionHandler)}}]);var n,t})();function t(){var e=[];return a(".brandy-search-element .brandy-element-wrapper").each(function(){e.push(new n(this))}),e}a(document).ready(function(){var e=t();window.addEventListener("partials-refreshed",function(){e.forEach(function(e){e.removeListeners()}),e=t()})})})(window.jQuery),(s=>{function e(){s("body").removeClass("toc-opened")}function n(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",n),s(document).on("click",".brandy-toc-close-icon, .brandy-toc-backdrop",e)}),s(window).on("resize",function(){0{o(document).ready(function(){function n(){var r=0