window.usePageDots=window.PXUTheme.theme_settings.page_dots_enabled,window.imageFunctions={zoom:function(){var $image=$(event.target),zoomSrc=$image.data("zoom-src");zoomSrc&&$image.wrap(' ').css("display","block").parent().zoom({url:zoomSrc,touch:!1,magnify:1})},linkGalleryAndCarousel:function($gallery,$carousel){debugger;$carousel.find(".gallery-cell:nth-child(1)").addClass("is-nav-selected"),$carousel.on("click",".gallery-cell",function(){var index=$(this).index();$carousel.find(".is-nav-selected").removeClass("is-nav-selected"),$(this).addClass("is-nav-selected"),$gallery.flickity("select",index)}),$gallery.on("select.flickity",function(){var galleryData=$(this).data("flickity");galleryData&&($carousel.find(".is-nav-selected").removeClass("is-nav-selected"),$carousel.find(".gallery-cell:nth-child("+(galleryData.selectedIndex+1)+")").addClass("is-nav-selected"))})},fullWidth:function(images,imageContainer){$(images).each(function(){var $image=$(this),alt=$image.attr("alt"),src=$image.attr("src");if(alt.indexOf("[")>=0){$image.remove();var shortcodes=alt.match(/\[(.*?)\]/gi);alt=alt.replace(/\[(.*?)\]/gi,"");var captionClass=$.map(shortcodes,function(value,index){return value=value.replace(/[\[\]']+/g,""),value}),caption=['
"].join("");$image.attr({alt,class:"lazyload fade-in",src,dataSizes:"auto"});var image=$image.prop("outerHTML"),banner=''+image+caption+"
";$(imageContainer).append(banner)}})},showSecondaryImage:function(){window.PXUTheme.media_queries.large.matches&&($(".has-secondary-media-swap").off().on("mouseenter",function(){window.PXUTheme.theme_settings.product_form_style=="select"&&$(this).find(".product_gallery").toggleClass("secondary-media-hidden"),$(this).find(".image-element__wrap img").toggleClass("secondary-media-hidden"),$(this).find("[data-html5-video]").toggleClass("secondary-media-hidden"),$(this).find(".external-video__container").toggleClass("secondary-media-hidden"),window.videoFeature.enableVideoOnHover($(this))}),$(".has-secondary-media-swap").on("mouseleave",function(){window.PXUTheme.theme_settings.product_form_style=="select"&&$(this).find(".product_gallery").toggleClass("secondary-media-hidden"),$(this).find(".image-element__wrap img").toggleClass("secondary-media-hidden"),$(this).find("[data-html5-video]").toggleClass("secondary-media-hidden"),$(this).find(".external-video__container").toggleClass("secondary-media-hidden"),window.videoFeature.enableVideoOnHover($(this))}))},flickityIosFix:function(){var touchingCarousel=!1,touchStartCoords;document.body.addEventListener("touchstart",function(e){if(e.target.closest(".flickity-slider"))touchingCarousel=!0;else{touchingCarousel=!1;return}touchStartCoords={x:e.touches[0].pageX,y:e.touches[0].pageY}}),document.body.addEventListener("touchmove",function(e){if(touchingCarousel&&e.cancelable){var moveVector={x:e.touches[0].pageX-touchStartCoords.x,y:e.touches[0].pageY-touchStartCoords.y};Math.abs(moveVector.x)>7&&e.preventDefault()}},{passive:!1})}},window.recentlyViewed={init(){let productHandle,rvCookie,rvProducts,displayProducts,rvProductArray;if($(".js-product-section[data-rv-handle]").length?(productHandle=$(".js-product-section").data("rv-handle").toString(),rvCookie=window.Cookies.get("recentlyViewed"),rvProducts=window.recentlyViewed.getCookieProducts(rvCookie,productHandle)):($(".recently-viewed__section").length||$(".js-sidebar-recently-viewed").length)&&(rvCookie=window.Cookies.get("recentlyViewed"),rvProducts=window.recentlyViewed.getCookieProducts(rvCookie,productHandle)),rvProducts&&(rvProductArray=unescape(rvProducts).split(",")),productHandle?(!$.inArray(productHandle,rvProductArray)!==-1&&(displayProducts=[],rvProductArray.unshift(productHandle),$.each(rvProductArray,(_i,el)=>{$.inArray(el,displayProducts)===-1&&displayProducts.push(el)})),window.recentlyViewed.setCookieProducts(displayProducts)):displayProducts=rvProductArray,$(".recently-viewed__section").length){const parent=".recently-viewed__section";if($(parent).data("recently-viewed-items-loaded"))return!1;window.recentlyViewed.getProductInformation(parent,displayProducts,productHandle)}else if($(".js-recently-viewed .rv-main").length){const parent=".js-recently-viewed";if($(parent).data("recently-viewed-items-loaded"))return!1;window.recentlyViewed.getProductInformation(parent,displayProducts,productHandle)}if($(".sidebar .js-sidebar-recently-viewed").length){const parent=".sidebar .js-sidebar-recently-viewed";if($(parent).data("recently-viewed-items-loaded"))return!1;productHandle?window.recentlyViewed.getProductInformation(parent,displayProducts,productHandle):window.recentlyViewed.getProductInformation(parent,displayProducts)}},getCookieProducts(rvCookie,productHandle){return!rvCookie&&productHandle&&window.Cookies.set("recentlyViewed",productHandle,{expires:30,path:"/",sameSite:"None",secure:!0}),rvCookie=window.Cookies.get("recentlyViewed"),rvCookie},setCookieProducts(rvProductArray){window.Cookies.set("recentlyViewed",escape(rvProductArray.join(",")),{expires:30,path:"/",sameSite:"None",secure:!0})},getProductInformation(parent,displayProducts,productHandle){$(parent).attr("data-recently-viewed-items-loaded","true"),productHandle&&displayProducts.splice($.inArray(productHandle,displayProducts),1);const productLimit=$(parent).data("visible-products");productLimit&&displayProducts&&(displayProducts=displayProducts.slice(0,productLimit)),$.each(displayProducts,(index,value)=>{value&&($(parent).removeClass("hidden"),$(parent).parents(".sidebar-block").show(),$.ajax({type:"GET",url:`${window.PXUTheme.routes.all_products_collection_url}/products/${value}?view=rv`,success(data){const rvProduct=$(data).find(".js-recently-viewed-product");$(parent).find(`.rv-box-${index}`).append(rvProduct),$(`.rv-box-${index} [data-product-gallery]`).each((_,gallery)=>{const $productGallery=$(gallery);window.productPage.enableGallery($productGallery)}),window.PXUTheme.currency.show_multiple_currencies&&window.currencyConverter.convertCurrencies(),window.productPage.runOptionSelector($(`.rv-box-${index}`)),Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.hideNoScript(),$(".swatch_options label").on("click",function(){window.quickShop.toggleSwatchImages($(this))}),window.PXUTheme.theme_settings.collection_secondary_image&&window.imageFunctions.showSecondaryImage(),rvProduct.find("[data-html5-video] video, [data-youtube-video]").length>0&&window.videoFeature.setupPlayerForRecentlyViewedProducts(rvProduct.find("[data-html5-video] video, [data-youtube-video]"))},error(x,t,m){console.log(x),console.log(t),console.log(m)},dataType:"html"})),$(parent).find(".rv-main").hasClass("js-rv-grid")&&(displayProducts.length<=productLimit?$(".js-rv-grid .thumbnail").eq(displayProducts.length).nextAll().addBack().remove():$(".js-rv-grid .thumbnail").eq(productLimit).nextAll().addBack().remove())})}};let infiniteScroll=null;var disableInfiniteScroll=function(){infiniteScroll&&(infiniteScroll.disable(),console.log("disabling infinite scroll"))},enableLoadMoreProducts=function(){$("body").on("click",".js-load-more a",function(e){return enableInfiniteScroll(".product-list"),e.stopPropagation(),!1})},enableLoadMoreButton=function(parentClass){var $grid=parentClass+"[data-load-more--grid]",$gridItems=parentClass+" [data-load-more--grid-item]";$("body").on("click","[data-load-more]",function(e){e.preventDefault();var $button=$(this),url4=$button.attr("href");loadNextPage(url4,$button)});function loadNextPage(url4,$button){$.ajax({type:"GET",dataType:"html",url:url4,beforeSend:function(){$button.addClass("is-loading"),$(".load-more__icon").addClass("loading-in-progress").css({height:"40px",width:"40px",opacity:"1"})},success:function(data){$button.removeClass("is-loading"),$(".load-more__icon").removeClass("loading-in-progress").css({height:"0",width:"0",opacity:"0"});const thumbnails=$(data).find($gridItems);var loadMoreButtonUrl=$(data).find("[data-load-more]").attr("href");$("[data-load-more]").attr("href",loadMoreButtonUrl),$($grid).first().append(thumbnails).append($(".js-load-more")),window.PXUTheme.currency.show_multiple_currencies&&window.currencyConverter.convertCurrencies(),window.productPage.init(),window.productPage.runOptionSelector(thumbnails),Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.PXUTheme.theme_settings.quick_shop_enabled&&window.quickShop.init(),window.hideNoScript(),window.videoFeature.init(),window.PXUTheme.theme_settings.collection_secondary_image&&window.imageFunctions.showSecondaryImage(),typeof loadMoreButtonUrl>"u"&&$("[data-load-more]").addClass("is-hidden")},error:function(x,t,m){console.log(x),console.log(t),console.log(m),location.replace(location.protocol+"//"+location.host+filterURL)}})}},enableInfiniteScroll=function(parentClass){$(parentClass).length&&(infiniteScroll=new Waypoint.Infinite({element:$(parentClass)[0],items:parentClass,more:"[data-load-more]",loadingClass:"loading-in-progress",onBeforePageLoad:function(){$(".js-load-more").hide()},onAfterPageLoad:function(data){const $gridItems=$(`${parentClass} [data-load-more--grid-item]`),thumbnails=$(data).find($gridItems);$(`${parentClass} > ${parentClass} .thumbnail`).unwrap(parentClass),window.PXUTheme.currency.show_multiple_currencies&&window.currencyConverter.convertCurrencies(),window.productPage.init(),window.productPage.runOptionSelector(thumbnails),Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.PXUTheme.theme_settings.quick_shop_enabled&&window.quickShop.init(),window.hideNoScript(),window.videoFeature.init(),window.PXUTheme.theme_settings.collection_secondary_image&&window.imageFunctions.showSecondaryImage(),Waypoint.refreshAll()}}))};if(window.hideNoScript=function(){$(".image__container .noscript").addClass("hidden")},Shopify.queryParams={},location.search.length)for(var aKeyValue,i=0,aCouples=location.search.substr(1).split("&");i1&&(Shopify.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]));var quickFilter={init:function(){var selectedOptions=[],query="",currentTags="",url1=$.url("1")?"/"+$.url("1")+"/":"";if(url1.length<=4?(url2=$.url("2")?$.url("2")+"/":"",url3=$.url("3")?$.url("3")+"/":"",path=url1+url2+url3):(url2=$.url("2")?$.url("2")+"/":"",path=url1+url2),$("#sort-by").length?query=$("#sort-by").val():query=url("?sort_by"),$("#tag_filter").length){var $tagFilterValue=$("#tag_filter").val();if($("#tag_filter").data("default-collection")!=$tagFilterValue){urlTag=$tagFilterValue.substr($tagFilterValue.lastIndexOf("/")+1);var tagFilterUrl=$tagFilterValue.substr($tagFilterValue);$("#tag_filter option").removeAttr("selected"),$('#tag_filter option[value="'+tagFilterUrl+'"]').attr("selected","selected"),urlTag!="all"&&($.inArray(urlTag,selectedOptions)>-1||selectedOptions.unshift(urlTag))}}$("[data-option-filter] input:checked").each(function(){selectedOptions.push($(this).val())}),selectedOptions=$.makeArray(selectedOptions),$.each(selectedOptions,function(i2,value){i2!=selectedOptions.length-1?currentTags+=selectedOptions[i2]+"+":currentTags+=selectedOptions[i2]}),Shopify.queryParams.sort_by=query,query="?"+$.param(Shopify.queryParams).replaceAll("%2B","+"),quickFilter.processUrl(path,currentTags,query)},updateView:function(filterURL2){$.ajax({type:"GET",url:filterURL2,beforeSend:function(){$(".product-list--collection").addClass("fadeOut animated loading-in-progress filter-loading"),Waypoint.destroyAll()},success:function(data){const $gridItems=$(".product-list--collection [data-load-more--grid-item"),thumbnails=$(data).find($gridItems);$(".product-list--collection").removeClass("loading-in-progress"),$(".product-list--collection").removeClass("filter-loading");var filteredBreadcrumb=$(data).find(".breadcrumb_text").html();$(".breadcrumb_text").html(filteredBreadcrumb);var filteredPagination=$(data).find(".paginate").html();$(".paginate").html(filteredPagination);var filteredSidebar=$(data).find(".sidebar").html();$(".sidebar").html(filteredSidebar);var filteredPageLinks=$(data).find(".paginate").html();$(".paginate").empty(),$(".paginate").html(filteredPageLinks);var filteredData=$(data).find(".product-list--collection");$(".product-list--collection").remove(),filteredData.insertBefore($(".load-more__icon"));let pro_count=document.querySelectorAll(".product-list .product__details").length;var product_dis_limit=$(".allProducts").data("count");$(".paginate").removeClass("is_paginate_hide"),product_dis_limit>pro_count&&$(".paginate").addClass("is_paginate_hide"),window.history&&window.history.pushState&&window.history.pushState("","",filterURL2),$(".sidebar__collection-filter").length&&window.collectionSidebarFilter.init(),window.recentlyViewed.init(),window.PXUTheme.currency.show_multiple_currencies&&window.currencyConverter.convertCurrencies(),window.productPage.init(),window.productPage.runOptionSelector(thumbnails),Shopify.PaymentButton&&Shopify.PaymentButton.init(),$("body").off("click",".swatch-element"),window.productPage.productSwatches(),$(".swatch_options label").on("click",function(){window.quickShop.toggleSwatchImages($(this))}),window.PXUTheme.theme_settings.pagination_type==="load_more"&&window.enableLoadMoreProducts(),window.PXUTheme.theme_settings.pagination_type==="load_more_button"&&window.enableLoadMoreButton(".product-list"),window.PXUTheme.theme_settings.pagination_type==="infinite_scroll"&&window.enableInfiniteScroll(".product-list"),window.PXUTheme.theme_settings.search_pagination_type==="load_more"&&window.enableLoadMoreProducts(),window.PXUTheme.theme_settings.search_pagination_type==="load_more_button"&&window.enableLoadMoreButton(".product-list"),window.PXUTheme.theme_settings.search_pagination_type==="infinite_scroll"&&window.enableInfiniteScroll(".product-list")},error:function(x,t,m){console.log(x),console.log(t),console.log(m),location.replace(location.protocol+"//"+location.host+filterURL2)},dataType:"html"})},processUrl:function(path1,tags,query){const pathname=window.location.origin+path1,newQuery=query.replace(/\page=(\w+)&/,""),urlString=(pathname.slice(-1)==="/"?pathname:`${pathname}/`)+tags+newQuery;quickFilter.updateView(urlString)}};window.searchAutocomplete={result_count:0,vars:{term:"",searchPath:window.PXUTheme.routes.search_url,displayTimer:""},init:function(){this.unload(),$("[data-autocomplete-true]").on("focus",function(){$(this).parents("[data-autocomplete-true]").find(".search__results-wrapper").show()}),$(document).on("click focusout",function(e){if(window.PXUTheme.media_queries.large.matches){var searchForm=$(e.target).parents(".search__form");searchForm.length===0&&$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}}),$('[data-dropdown-rel="search"]').on("click",function(e){if(window.PXUTheme.theme_settings.enable_autocomplete&&window.PXUTheme.media_queries.medium.matches){e.preventDefault();var formType=$(this).closest("form").find('[name="type"]').val(),position=$(document).scrollTop();window.searchAutocomplete.showMobileSearch(formType,position)}}),$(".search-close").on("click touchstart",function(){$("body").removeClass("is-active"),$(".dropdown_link").removeClass("active_link"),$(".dropdown_container").hide(),$(".mobile_nav").find("div").removeClass("open"),$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}),$("[data-autocomplete-true] form").on("submit",function(e){e.preventDefault();var formValue=$(this).find('input[name="q"]').val(),cleanFormValue=encodeURI(formValue);if($(this).find('[name="type"]').length>0)var searchType=$(this).find('[name="type"]').val();else var searchType=window.PXUTheme.theme_settings.search_option;cleanFormValue==null?window.location.href=window.PXUTheme.routes.search_url+"?type="+searchType:window.location.href=window.searchAutocomplete.vars.searchPath+"?type="+searchType+"&q="+cleanFormValue+"*"}),$("[data-autocomplete-true] form").each(function(){var $this=$(this),input=$this.find('input[name="q"]');$('').appendTo($this),input.attr("autocomplete","off").on("input",function(){clearTimeout(window.searchAutocomplete.vars.displayTimer),$(this).val().length>0?(window.searchAutocomplete.vars.term=$(this).val(),window.searchAutocomplete.getResults(window.searchAutocomplete.vars.term,$this),window.searchAutocomplete.showAllProductsResultsCount(window.searchAutocomplete.vars.term,$this)):$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")})})},showAllProductsResultsCount:function(term,$this){let searchPath=window.location.origin+"/search?type=product&q=",cleanTerm=encodeURI(term),searchURL=searchPath+cleanTerm;fetch(searchURL+"*&view=search-count").then(res=>res.json()).then(data=>{window.searchAutocomplete.result_count=data.results_count}).catch(err=>console.log("err in fetch of showAllProductsResultsCount",err))},getResults:function(term,$this){if($this.find('[name="type"]').length>0)var searchType=$this.find('[name="type"]').val();else var searchType=window.PXUTheme.theme_settings.search_option;jQuery.getJSON("/search/suggest.json",{q:term,resources:{type:searchType,limit:window.PXUTheme.theme_settings.search_items_to_display,options:{unavailable_products:"last",fields:"title,body,variants.title,vendor,product_type,tag"}}}).done(function(response){var suggestions=[response.resources.results.products,response.resources.results.pages,response.resources.results.articles],filteredResults=[];$.each(suggestions,function(index,suggestion){suggestion!==void 0&&suggestion.length>0&&filteredResults.push(suggestion)}),window.searchAutocomplete.vars.displayTimer=setTimeout(function(){window.searchAutocomplete.displayResults(filteredResults[0],$this)},500)})},displayResults:function(results,$this){var $resultsWrapper=$this.find(".search__results-wrapper"),$resultsList=$this.find(".search__results");if($resultsWrapper.show(),$resultsList.empty(),$this.find('[name="type"]').length>0)var searchType=$this.find('[name="type"]').val();else var searchType=window.PXUTheme.theme_settings.search_option;if(results&&results.length>0)$.each(results,function(index,result){var link=$(' ').attr("href",result.url);if(window.PXUTheme.routes.root_url!=="/"&&(link=$(' ').attr("href",window.PXUTheme.routes.root_url+result.url)),result.price){let formatPrice2=function(price){return price=parseFloat(price/100).toFixed(2),window.PXUTheme.currency.display_format==="money_with_currency_format"?`${window.PXUTheme.currency.symbol}${price} ${window.PXUTheme.currency.iso_code} `:`${window.PXUTheme.currency.symbol}${price} `};var formatPrice=formatPrice2;if(result.available===!0){const maxComparePrice=parseFloat(result.compare_at_price_max),minComparePrice=parseFloat(result.compare_at_price_min),minPrice=parseFloat(result.price_min),maxPrice=parseFloat(result.price_max),resultPrice=parseFloat(result.price);if(maxComparePrice>maxPrice||minComparePrice>minPrice)var itemPrice=formatPrice2(result.price)+' '+formatPrice2(result.compare_at_price_min)+" ";else if(resultPrice>0)if(minPrice!=maxPrice)var itemPrice=" "+formatPrice2(result.price);else var itemPrice=formatPrice2(result.price);else var itemPrice=window.PXUTheme.theme_settings.free_text}else var itemPrice=window.PXUTheme.translation.sold_out_text;result.image&&link.append(''),link.append(''+result.title+''+itemPrice+"
")}else result.summary_html?(result.image!="NULL"&&link.append(''),link.append(''+result.title+''+result.summary_html.replace(/(<([^>]+)>)/gi,"").slice(0,25)+"
")):result.published_at&&link.append(''+result.title+''+result.body.replace(/(<([^>]+)>)/gi,"").slice(0,25)+"
");link.wrap(' '),$resultsList.append(link.parent())}),$resultsList.append(''+window.PXUTheme.translation.all_results+' ('+window.searchAutocomplete.result_count+") "),(window.PXUTheme.currency.show_multiple_currencies||window.PXUTheme.currency.native_multi_currency)&&window.currencyConverter.init(),$resultsList.parents(".search__results-wrapper").addClass("results-found");else{var noResults=''+window.PXUTheme.translation.no_results+" ";$resultsList.append(noResults),$resultsList.parents(".search__results-wrapper").removeClass("results-found")}$resultsList.show()},showMobileSearch:function(formType,position){$(".mobile-search").fadeIn(200),/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1?$(".mobile-search input#q").focus():setTimeout(function(){$(".mobile-search input#q").focus()},205),document.body.style.position="fixed",document.body.style.top="-"+position+"px",$(".mobile-search").css("top",position);var searchHeight=window.innerHeight-60;$(".mobile-search .search__results-wrapper").css("max-height",searchHeight),formType?$('.mobile-search [name="type"]').val(formType):$('.mobile-search [name="type"]').val(window.PXUTheme.theme_settings.search_option),$(".search-form .close-search").on("click touchstart",function(e){e.preventDefault(),e.stopPropagation(),window.searchAutocomplete.hideMobileSearch(position),$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}),$(".search-form .submit-search").on("click touchstart",function(e){$(this).parents("form").submit()})},hideMobileSearch:function(position){document.body.style.position="",document.body.style.top="",window.scrollTo(0,position),$(".mobile-search").fadeOut(200),$('.mobile-search [name="q"]').val(""),$("body").off("focus",".search-form .close-search"),$("body").off("focus",".search-form .submit-search")},unload:function(){$("body").off("focus","[data-autocomplete-true] input"),$('input[name="q"]').off(),$('[data-dropdown-rel="search"], [data-autocomplete-true] input').off(),$(".search__results-wrapper").remove()}},window.collectionSidebarFilter={init:function(){$(".filter-active-tag input:checked").parents(".filter-active-tag").siblings(".filter-all-tags").hide(),(()=>{const sidebar=document.querySelector("[data-sidebar]");if(!sidebar)return;const sidebarBlocks=sidebar.querySelectorAll("[data-sidebar-block]");window.outerWidth<768&&sidebarBlocks.forEach(block=>{block.querySelector("[data-active-legacy-filter]")?block.open=!0:block.open=!1})})(),($.url(2)==="types"||$.url(2)==="vendors")&&$(".sidebar__collection-filter").remove(),$(".sidebar-block:empty").prev().css("border-bottom","none"),window.recentlyViewed.init()},clearAllFilters:function(){$("[data-option-filter] input").prop("checked",!1),$("[data-option-filter] input").trigger("change"),window.recentlyViewed.init()},clearSelectedFilter:function(optionFilter){$("#tag_filter").length&&optionFilter.find("[data-option-filter] input").val()===$("#tag_filter option:selected ").val().substr($("#tag_filter option:selected ").val().lastIndexOf("/")+1)&&$("#tag_filter").val($("#tag_filter option:first").val()),optionFilter.find("[data-option-filter] input").prop("checked",!1),optionFilter.find("[data-option-filter] input").trigger("change"),window.recentlyViewed.init()}},window.sidebarAccordions={init:function(){const sidebar=document.querySelector("[data-sidebar]");if(!sidebar)return;const sidebarBlocks=sidebar.querySelectorAll("[data-sidebar-block]"),facetedFilterForm=sidebar.querySelector("[data-faceted-filter-form]"),allowToggleOnDesktop=sidebar.dataset.sidebarAllowToggle==="true",closeAll=()=>sidebarBlocks.forEach(block=>{block.open=!1}),openAll=()=>sidebarBlocks.forEach(block=>{block.open=!0});let wasMobileLastResize=!1;const setState=()=>{window.PXUTheme.media_queries.medium.matches?(wasMobileLastResize||closeAll(),wasMobileLastResize=!0):(allowToggleOnDesktop||openAll(),wasMobileLastResize=!1)};if(setState(),window.addEventListener("resize",setState),facetedFilterForm){facetedFilterForm.addEventListener("keypress",e=>{e.target.classList.contains("faceted-filter-group-display__list-item-input")&&e.keyCode==13&&(e.preventDefault(),e.target.checked=!e.target.checked)});const sortByEl=document.querySelector("[data-sort-by]");facetedFilterForm.addEventListener("change",e=>{if(e.target.type=="number")return;e.preventDefault(),e.target.hasAttribute("hasChildren")&&e.target.closest(".faceted-filter-group-display__list-item").querySelectorAll(".faceted-filter-group-display__list-item-input").forEach(checkbox=>{checkbox.checked=e.target.checked});const formData=new FormData(facetedFilterForm),queryString=new URLSearchParams(formData);if(sortByEl){const sortValue=sortByEl.value;queryString.set("sort_by",sortValue)}fetch(`${window.location.pathname}?${queryString.toString()}`).then(response=>response.text()).then(html=>{const newProducts=new DOMParser().parseFromString(html,"text/html").querySelector(".product-list").innerHTML;document.querySelector(".product-list").innerHTML=newProducts,document.querySelector(".js-load-more").style.display="none",disableInfiniteScroll()}).catch(error=>{console.error("Error fetching filtered products:",error)})});const clearFiltersButton=document.querySelector(".faceted-active-filters__clear");clearFiltersButton&&clearFiltersButton.addEventListener("click",e=>{e.preventDefault(),facetedFilterForm.querySelectorAll('input[type="checkbox"]').forEach(checkbox=>{checkbox.checked=!1});const formData=new FormData(facetedFilterForm),queryString=new URLSearchParams(formData);if(sortByEl){const sortValue=sortByEl.value;queryString.set("sort_by",sortValue)}fetch(`${window.location.pathname}?${queryString.toString()}`).then(response=>response.text()).then(html=>{const newProducts=new DOMParser().parseFromString(html,"text/html").querySelector(".product-list").innerHTML;document.querySelector(".product-list").innerHTML=newProducts,enableInfiniteScroll(".product-list")}).catch(error=>{console.error("Error fetching filtered products:",error)})})}const setOpenHeight=el=>{el.style.setProperty("--open-height",`${el.scrollHeight}px`)};sidebarBlocks.forEach(block=>{const summary=block.querySelector("summary");if(!summary)return;const transition=window.animations.transition({el:block,state:block.open?"open":"closed",stateAttribute:"data-sidebar-block-state",stateChangeAttribute:"data-sidebar-block-animation"});summary.addEventListener("click",e=>{if(e.preventDefault(),!window.PXUTheme.media_queries.medium.matches&&!allowToggleOnDesktop)return;const{height:closedHeight}=summary.getBoundingClientRect();block.style.setProperty("--closed-height",`${closedHeight}px`),block.open?(block.style.setProperty("--open-height",`${block.scrollHeight}px`),transition.animateTo("closed").then(()=>{block.open=!1})):(block.open=!0,transition.animateTo("open",{onStart:()=>{block.style.setProperty("--open-height",`${block.scrollHeight}px`)}}))})})}},window.PXUTheme.theme_settings.slideshow_arrow_size=="bold"?(window.arrowSize={x0:10,x1:40,y1:50,x2:80,y2:50,x3:50},window.svgArrowSizeLeft=' ',window.svgArrowSizeRight=' '):window.PXUTheme.theme_settings.slideshow_arrow_size=="light"?(window.arrowSize={x0:10,x1:60,y1:50,x2:62,y2:40,x3:22},window.svgArrowSizeLeft=' ',window.svgArrowSizeRight=' '):window.PXUTheme.theme_settings.slideshow_arrow_size=="regular"&&(window.arrowSize={x0:10,x1:60,y1:50,x2:70,y2:40,x3:30},window.svgArrowSizeLeft=' ',window.svgArrowSizeRight=' '),window.isScreenSizeLarge=function(){if(window.matchMedia("(min-width: 1024px)").matches)return!0},window.utils={createAccordion:function(container,tab,content){var $container2=$(container),$tab2=$(container).find(tab),$content2=$(container).find(content),specificTab=container+" "+tab;if(container.indexOf(".accordion-tabs")>=0){var rearrangedTabs=$.map($tab2,function(v,i2){return[v,$content2[i2]]});$container2.empty(),$.each(rearrangedTabs,function(index,value){$container2.append(this)}),$content2.removeClass("active"),$container2.find(".active").next().slideToggle(),tab=container+"> a"}$(container).children("a").each(function(i2,tab2){var tab2=$(this),tabValue=tab2.attr("href");tab2.attr("data-tab-value",tabValue),tab2.removeAttr("href")}),$(container).find(tab+".active").next().slideToggle(),$("body").on("click",specificTab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).next().slideToggle()})},mobileAccordion:function(container,tab,content){$container=$(container),$tab=$(container).find(tab),$content=$(container).find(content),$(tab+".active").next().slideToggle(),$("body").on("click",tab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).next().slideToggle()})},mobileParentActiveAccordion:function(container,tab,content){$container=$(container),$tab=$(container).find(tab),$content=$(container).find(content),$(tab+".active").parent().next().slideToggle(),$("body").on("click",tab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).parent().next().slideToggle()})},initializeTabs:function(){$("ul.tabs > li > a").attr("data-no-instant",!0),$("body").on("click","ul.tabs > li > a",function(e){e.preventDefault();var contentLocation=$(this).attr("href");contentLocation.charAt(0)=="#"&&($("ul.tabs > li > a.active").removeClass("active"),$(this).addClass("active"),$(this).parents("ul.tabs").next().find(contentLocation).show().css({display:"block"}).addClass("active").siblings().hide().removeClass("active"))})},scrollToTop:function(element,height){height!=null?$("html, body").animate({scrollTop:$(element).offset().top-height},1e3):$("html, body").animate({scrollTop:$(element).offset().top},1e3)},initializeSectionWrapper:function(){const firstSection=document.querySelector(".section-wrapper .shopify-section");firstSection&&(window.navigationDesktopManager.initAll(),firstSection.classList.contains("under-menu")&&firstSection.querySelector(".full-width--true")?($(".header").hasClass("header-background--solid")||($(".header").parent().addClass("feature_image"),$(".header").addClass("is-absolute")),$(".feature_image").hasClass("secondary_logo--true")&&($(".secondary_logo--true").find(".secondary_logo").show(),$(".secondary_logo--true").find(".primary_logo").hide()),window.headerFader.updateShouldFade(!0)):($(".feature_image").removeClass("feature_image"),$(".header.is-absolute").removeClass("is-absolute"),$("header.feature_image").hasClass("secondary_logo--true")||($(".secondary_logo--true").find(".secondary_logo").hide(),$(".secondary_logo--true").find(".primary_logo").show()),window.headerFader.updateShouldFade(!1)))},enableDisclosure:function(){var $disclosure=$("[data-disclosure]"),$toggle=$("[data-disclosure-toggle]"),$disclosureWrap=$(".disclosure__list-wrap");function checkOffScreen($openedToggle){$openedToggle.siblings(".disclosure__list-wrap").is(":off-right")&&$openedToggle.siblings(".disclosure__list-wrap").addClass("disclosure--left")}function closeDisclosures(ignoreTarget,currentTarget){ignoreTarget===!0?($toggle.not(currentTarget).removeClass("is-clicked"),$toggle.not(currentTarget).attr("aria-expanded","false")):($toggle.removeClass("is-clicked"),$toggle.attr("aria-expanded","false")),$disclosureWrap.removeClass("disclosure--left")}$("body").on("keyup",function(e){e.which=="27"&&closeDisclosures()}),$disclosure.on("mouseleave",function(e){closeDisclosures()}),$toggle.on("mouseenter focus",function(e){closeDisclosures(!0,this);var $target=$(e.currentTarget);$target.attr("aria-expanded","true").addClass("is-clicked"),checkOffScreen($target)}),$(".disclosure__button").on("focusout",function(e){(!$(e.relatedTarget).hasClass("disclosure__button")||$(e.relatedTarget).hasClass("disclosure__toggle"))&&closeDisclosures()}),$toggle.on("touchstart",function(e){if(window.PXUTheme.media_queries.medium.matches||!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var $target=$(e.currentTarget);closeDisclosures(!0,this),$target.hasClass("is-clicked")?($target.attr("aria-expanded","false").removeClass("is-clicked"),$disclosureWrap.removeClass("disclosure--left")):($target.attr("aria-expanded","true").addClass("is-clicked"),checkOffScreen($target))}})},addImageDimension:function(imageUrl,size){var insertPosition=imageUrl.lastIndexOf(".");return imageUrl.substring(0,insertPosition)+size+imageUrl.substring(insertPosition)},unload:function($target){$("[data-disclosure]").off(),$("[data-disclosure-toggle]").off()}},window.sliderBlock={select:function(blockId,$parentSection){var $blocks=$parentSection.find(".gallery-cell"),blockIdsArray=$blocks.map(function(){return String($(this).data("block-id"))}),$slider=$parentSection.find("[data-slider-id]"),settings={slideshowTextAnimation:$slider.data("slideshow-text-animation")},flkty=$slider.data("flickity");$slider.flickity("pausePlayer");for(var i2=0;i2{e.preventDefault();const $currentTarget=$(e.currentTarget);window.productPage.loadQuickshop($currentTarget.data("url")).then(data=>{if(!data)return;const html=data.html;$(".js-quick-shop").html(html.content),$(".fancybox-active").length||$.fancybox.open($(".js-quick-shop"),{baseClass:`quick-shop__lightbox product-${$currentTarget.data("id")}`,hash:!1,infobar:!1,toolbar:!1,loop:!1,smallBtn:!0,video:{autoStart:!1},touch:!1,mobile:{preventCaptionOverlap:!1,toolbar:!0,buttons:["close"]},beforeLoad:()=>{window.productPage.init(),window.productPage.runOptionSelector($(".js-quick-shop")),window.accordion.init(),videoFeature.setupVideoPlayer(),productMedia.setupMedia(),utils.initializeTabs(),productPage.productSwatches(),Shopify.PaymentButton&&Shopify.PaymentButton.init()},afterShow:(_e,instance)=>{const{src}=instance,$quickshop=$(src).find(".quick-shop");$quickshop.addClass("quick-shop--loaded"),$quickshop.addClass("content-loaded")},beforeClose:(_e,instance)=>{const{src}=instance,$quickshop=$(src).find(".quick-shop");$quickshop.removeClass("quick-shop--loaded"),$quickshop.removeClass("content-loaded")}})}).catch(error=>console.error(error))}),$(".swatch_options label").on("click",function(){window.quickShop.toggleSwatchImages($(this))})},toggleSwatchImages:function(swatchInput){var swatchImageID=$(swatchInput).data("image"),$quickShopElement=$(swatchInput).parents(".thumbnail").find(".image__container img");$quickShopElement.attr("src",swatchImageID),$quickShopElement.attr("srcset",swatchImageID)},populateGallery:function(productData){var $gallery=$(".js-gallery-modal"),$carousel=$(".js-gallery-carousel");function addMainGalleryImages(){$.each(productData.image_array,function(i2,image){if(image.path==""||image.id==null)var imgPath=productData.feat_img;else var imgPath=image.path;if(image.alt==null||image.alt=="")var alt="";else var alt=image.alt;var img2048x2048=imgPath.replace(/(\.[^.]*)$/,"_2048x2048$1").replace("http:",""),cellContent;!image.mediaType||image.mediaType.indexOf("image")>=0?cellContent='':cellContent=unescape(imgPath);var $cellElems=$(''+cellContent+"
");$(".js-gallery-modal").append($cellElems)})}function addCarouselGalleryImages(){$.each(productData.thumbnail_array,function(i2,image){if(image.path!=""){var imgPath=image.path,carouselSizedImg=imgPath.replace(/(\.[^.]*)$/,"_grande$1").replace("http:",""),mediaBadge="";image.alt.indexOf("model")>=0?mediaBadge=' ':(image.alt.indexOf("external_video")>=0||image.alt.indexOf("video")>=0)&&(mediaBadge=' ');var img=' ',$carouselCellElems=$(''+img+mediaBadge+"
");$carousel.append($carouselCellElems)}}),imageFunctions.linkGalleryAndCarousel($gallery,$carousel)}addMainGalleryImages(),$gallery.find(".gallery-cell").length>1&&addCarouselGalleryImages()}},window.newsletter_popup={init:function(){var popup=window.Cookies.get("popup"),newsletter_popup_days=parseInt(window.PXUTheme.theme_settings.newsletter_popup_days),cookie_enabled=newsletter_popup_days!=0;if(cookie_enabled&&popup=="open")return!1;window.newsletter_popup.open(),cookie_enabled&&window.Cookies.set("popup","open",{expires:newsletter_popup_days,path:"",domain:"",sameSite:"None",secure:!0})},open:function(){var newsletter_popup_seconds=parseInt(window.PXUTheme.theme_settings.newsletter_popup_seconds);(window.PXUTheme.theme_settings.newsletter_popup_mobile||window.PXUTheme.media_queries.large.matches)&&setTimeout(function(){$.fancybox.open($(".js-newsletter-popup"),{baseClass:"newsletter__lightbox",hash:!1,infobar:!1,toolbar:!1,loop:!0,smallBtn:!0,mobile:{preventCaptionOverlap:!1,toolbar:!0,buttons:["close"]}})},newsletter_popup_seconds*1e3)}},window.productMedia={models:[],setupMedia:function(){var config={controls:["zoom-in","zoom-out","fullscreen"],focusOnPlay:!1};$($("model-viewer",$(".js-product-gallery, .js-gallery-modal"))).each(function(index,model){model=new Shopify.ModelViewerUI(model,config),window.productMedia.models.push(model)}),$(".product-gallery__model model-viewer").on("mousedown",function(){window.productMedia.hideModelIcon(this)})},showModelIcon:function(slide){$(slide).find(".button--poster, .model-icon-button-control").show()},hideModelIcon:function(slide){$(slide).find(".button--poster, .model-icon-button-control").hide()}},window.videoEl={playButtonIcon:'Play ',playButton:'Pause Play ',muteButton:'Unmute Mute ',progressInput:'',volume:'
',fullscreen:'Exit fullscreen Enter fullscreen '},window.videoControls=window.videoEl.playButtonIcon+''+window.videoEl.playButton+window.videoEl.progressInput+window.videoEl.muteButton+videoEl.volume+window.videoEl.fullscreen+"
",window.globalVideoPlayers=[],window.videoPlayers=[],window.videosInRecommendedProductsPlayer,window.videoFeature={init:function(){this.setupVideoPlayer(),this.setupRecommendedVideoPlayer()},setupVideoPlayer:function(){var productVideos=document.querySelectorAll("[data-html5-video] video, [data-youtube-video]"),setupVideoPlayers=Plyr.setup(productVideos,{controls:window.videoControls,ratio:this.aspect_ratio,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}});window.globalVideoPlayers&&$.each(setupVideoPlayers,function(index,player){window.globalVideoPlayers.push(player)});var videoLooping=$("[data-video-loop]").data("video-loop")||!1;$.each(setupVideoPlayers,function(index,player){player.loop=videoLooping,window.videoPlayers.push(player)}),this.setupListeners()},setupPlayerForRecentlyViewedProducts:function(video){if(video){var recentlyViewedProductPlayer=new Plyr(video,{controls:window.videoControls,ratio:this.aspect_ratio,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}});window.videoPlayers!==null&&(window.videoPlayers.push(recentlyViewedProductPlayer),this.setupListeners())}},setupRecommendedVideoPlayer:function(){var videosInRecommendedProducts=document.querySelectorAll(".product-recommendations [data-html5-video] video, .product-recommendations [data-youtube-video]");if(videosInRecommendedProducts.length>0)if(window.videosInRecommendedProductsPlayer=Plyr.setup(videosInRecommendedProducts,{controls:window.videoControls,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}}),window.videoPlayers!==null){var combinedArray=window.videoPlayers.concat(window.videosInRecommendedProductsPlayer);window.videoPlayers=combinedArray}else window.videoPlayers=videosInRecommendedProductsPlayer;this.setupListeners()},setupListeners:function(){$.each(window.videoPlayers,function(index,player){var id=player.id||player.media.dataset.plyrVideoId,$video;player.isHTML5&&($video=$(player.elements.wrapper).find("video"),$video.attr("data-plyr-video-id",id))}),$.each(window.globalVideoPlayers,function(index,player){player.on("play",function(event2){var instance=event2.detail.plyr;$.each(window.globalVideoPlayers,function(index2,player2){instance.id!=player2.id&&player2.pause()})})})},enableVideoOnHover:function($thumbnail){var $html5Video=$thumbnail.find("[data-html5-video]"),$youtubeVideo=$thumbnail.find("[data-youtube-video]"),videoID;$html5Video.length>0?videoID=$html5Video.find("[data-plyr-video-id]").data("plyr-video-id"):$youtubeVideo.length>0&&(videoID=$youtubeVideo.find("iframe").attr("id")),videoID&&$.each(window.videoPlayers,function(index,player){(player.id==videoID||player.media.id==videoID)&&(player.toggleControls(!1),player.muted=!0,player.play())})},disableVideoOnHover:function($thumbnail){var $html5Video=$thumbnail.find("[data-html5-video]"),$youtubeVideo=$thumbnail.find("[data-youtube-video]"),videoID;$html5Video.length>0?videoID=$html5Video.find("[data-plyr-video-id]").data("plyr-video-id"):$youtubeVideo.length>0&&(videoID=$youtubeVideo.find("iframe").attr("id")),videoID&&$.each(window.videoPlayers,function(index,player){(player.id==videoID||player.media.id==videoID)&&player.playing&&player.pause()})}};
//# sourceMappingURL=/cdn/shop/t/320/assets/utilities.js.map?v=6141944370352730601741130036