$(()=>{window.utils.enableDisclosure();const oldFlickityCreate=window.Flickity.prototype._create;window.Flickity.prototype._create=function(){const that=this;return this.element.addEventListener&&this.element.addEventListener("load",()=>{that.onresize()},!0),this._create=oldFlickityCreate,oldFlickityCreate.apply(this,arguments)},document.addEventListener("lazyloaded",e2=>{let bg=e2.target.getAttribute("data-bg");const mobileBg=e2.target.getAttribute("data-mobile-bg");bg&&(window.Shopify.media_queries.medium.matches&&mobileBg&&(bg=mobileBg),e2.target.style.backgroundImage=`url(${bg})`)}),window.imageFunctions.flickityIosFix(),window.objectFitImages(),window.header.loadMegaMenu(),window.header.init(),window.Shopify.theme_settings.enable_autocomplete&&window.searchAutocomplete.init(),window.utils.pageBannerCheck(),window.slideshow.init(),window.testimonials.init(),window.video.init(),window.gallery.init(),window.videoFeature.setupVideoPlayer(),window.featuredPromotions.init(),window.featuredCollection.init(),window.collectionSidebarFilter.init(),window.cart.init(),window.map.init(),window.productPage.init(),window.productPage.runOptionSelector(),window.productPage.initializeQuantityBox(),window.recentlyViewed.init(),window.sidebarAccordions.init(),(window.Currency.show_multiple_currencies||window.Currency.native_multi_currency)&&window.currencyConverter.init();const{pathname}=location;pathname.startsWith("/challenge")&&$("html, body").animate({scrollTop:0},"slow"),window.utils.productReviewScroll();let resizeTimeout;const beforeResizeWidth=$(window).width();window.addEventListener("resize",()=>{resizeTimeout||(resizeTimeout=setTimeout(()=>{resizeTimeout=null;const currentScreenWidth=$(window).width();window.Shopify.media_queries.medium.matches&¤tScreenWidth!==beforeResizeWidth&&(window.cart.init(),window.is_touch_device()||(window.header.unload(),window.header.init())),document.querySelectorAll("[data-bg]").forEach(image=>{let bg=image.getAttribute("data-bg");const mobileBg=image.getAttribute("data-mobile-bg");bg&&(window.Shopify.media_queries.medium.matches&&mobileBg&&(bg=mobileBg),image.style.backgroundImage=`url(${bg})`)})},66))},!1),$.fancybox.defaults.animationEffect="fade",$.fancybox.defaults.transitionEffect="fade",$.fancybox.defaults.hash=!1,$.fancybox.defaults.infobar=!1,$.fancybox.defaults.toolbar=!1,$.fancybox.defaults.arrows=!1,$.fancybox.defaults.loop=!0,$.fancybox.defaults.smallBtn=!0,$.fancybox.defaults.live=!1,$.fancybox.defaults.zoom=!1,$.fancybox.defaults.mobile.preventCaptionOverlap=!1,$.fancybox.defaults.mobile.toolbar=!0,$.fancybox.defaults.mobile.buttons=["close"],$.fancybox.defaults.mobile.clickSlide="close",$.fancybox.defaults.mobile.clickContent="zoom",$.fancybox.defaults.afterLoad=function(instance,slide){instance.current.type==="image"&&slide.$content.wrapInner("
"),instance.group.length>1&&slide.$content.find(".fancybox-image-wrap").append(`${window.svgArrowSizeLeft}${svgArrowSizeRight}`)},$('.lightbox[rel="gallery"]').fancybox();const $videoIframes=$('iframe[src*="youtube.com"], iframe[src*="vimeo.com"], iframe[src*="facebook.com/plugins/video"]');function getAspectRatio(width,height){const ratio=width/height;return Math.abs(ratio-1/1)===0?"1:1":Math.abs(ratio-4/3){const $iframe=$(iframe),source=$iframe.attr("src");!$iframe.parents(".plyr__video-wrapper").length&&!$iframe.parents(".lazyframe").length&&$iframe.wrap(``)}),window.lazyframe(".lazyframe"),$(".shopify-policy__container").wrap(''),$(".shopify-policy__container").closest(".section").prepend(''),$(".shopify-policy__container").addClass("five-eighths offset-by-three columns is-hidden-offset-mobile-only medium-down--one-whole"),$(".shopify-policy__title").append('');const currentValue=$(".search__form input[name='q']").val();$(".search__form input[name='q']").length>0&&$(".search__form input[name='q']").val(currentValue.replace("*","")),$("#sort-by").val($("#sort-by").data("default-sort")),$("body").on("change","#sort-by",()=>{window.quickFilter.init()}),$("body").on("change","#tag_filter",()=>{$("[data-option-filter] input").prop("checked",!1),window.quickFilter.init()}),$("body").on("change","#blog_filter",function(){const url=$(this).val();window.location=url}),$("input, select, textarea").on("focus blur",event=>{$("meta[name=viewport]").attr("content",`width=device-width,initial-scale=1,maximum-scale=${event.type==="blur"?10:1}`)}),$("body").on("change","[data-option-filter] input",()=>{window.quickFilter.init(),$("html, body").animate({scrollTop:$("#pagecontent").offset().top},500)}),$("body").on("click","[data-reset-filters]",()=>{window.collectionSidebarFilter.clearAllFilters()}),$("body").on("click","[data-clear-filter]",e2=>{const selectedOption=$(e2.currentTarget).parents(".filter-active-tag");window.collectionSidebarFilter.clearSelectedFilter(selectedOption)}),$("body").on("change",".currencies",()=>{$("[data-initial-modal-price]").attr("data-initial-modal-price","")}),$("body").on("change",".js-quick-shop select",()=>{const currentVariant=$('.js-quick-shop select[name="id"]').val();currentVariant&&window.globalQuickShopProduct&&window.quickShop.updateVariant(currentVariant)}),window.Shopify.theme_settings.quick_shop_enabled&&window.quickShop.init();let touchStartPos=0;if($(document).bind("touchstart",()=>{touchStartPos=$(window).scrollTop()}).bind("touchend",e2=>{const distance=touchStartPos-$(window).scrollTop();(distance>20||distance<-20)&&e2.preventDefault}),$("body").on("click",".sidebar .parent-link--false",function(e2){e2.preventDefault();const $menu=$(this).parent("li");$menu.find(".menu-toggle").toggleClass("active"),$menu.find("ul").slideToggle()}),window.Shopify.theme_settings.newsletter_popup&&window.newsletter_popup.init(),window.location.pathname.indexOf("/comments")!==-1&&$("html,body").animate({scrollTop:$("#new-comment").offset().top-140},"slow"),$("body").on("mouseenter",".icon-search",()=>{$(".search-terms").focus()}),$("body").on("click",".icon-search",()=>{$("input.search-terms").focus()}),$("body").on("click",".search-submit",e2=>{$(e2.currentTarget).parent().submit()}),window.Shopify.media_queries.large.matches&&($(".animate_right").waypoint(function(){$(this.element).addClass("animated fadeInRight")},{offset:"70%"}),$(".animate_left").waypoint(function(){$(this.element).addClass("animated fadeInLeft")},{offset:"70%"}),$(".animate_up").waypoint(function(){$(this.element).addClass("animated fadeInUp")},{offset:"70%"}),$(".animate_down").waypoint(function(){$(this.element).addClass("animated fadeInDown")},{offset:"70%"})),$(".slider, .flexslider").find("li").unwrap(),$(".slider, .flexslider").flickity({pageDots:window.usePageDots,imagesLoaded:!0,arrowShape:window.arrowSize,lazyLoad:2}),window.utils.createAccordion(".footer_menu","h6","ul"),window.utils.createAccordion(".footer_content","h6","div.toggle_content"),window.utils.createAccordion(".product_section .accordion-tabs",".tabs li > a",".tabs-content li"),window.utils.mobileParentActiveAccordion("#mobile_menu","li.sublink > a.parent-link--true span","li.sublink ul"),window.utils.mobileAccordion("#mobile_menu","li.sublink > a.parent-link--false","li.sublink ul"),window.utils.initializeTabs(),window.accordion.init(),$("body").on("click",".menu-toggle",function(){$(this).next("ul").slideToggle(),$(this).toggleClass("active"),$(this).attr("aria-expanded",$(this).attr("aria-expanded")==="true"?"false":"true")}),window.Shopify.theme_settings.collection_swatches&&window.Shopify.media_queries.large.matches&&($("body").on("mouseenter",".collection_swatches",function(){$(".swatch span",$(this)).each(function(){$(this).data("image").indexOf("no-image")===-1&&($("
")[0].src=$(this).data("image"))})}),$("body").on("mouseenter",".swatch span",function(){$(this).data("image").indexOf("no-image")===-1&&($(this).parents(".thumbnail").find(".image__container img:not(.secondary)").attr("src",$(this).data("image")),$(this).parents(".thumbnail").find(".image__container img:not(.secondary)").attr("srcset",$(this).data("image")))})),window.Shopify.theme_settings.display_tos_checkbox&&$("body").on("click touchstart",".cart_content .tos_label",function(){$(this).prev("input").prop("checked",!0)}),window.Shopify.theme_settings.display_tos_checkbox&&window.Shopify.theme_settings.go_to_checkout?$("body").on("click",".tos_warning [data-cart-checkout-button]",function(e2){if($(this).parents("form").find(".tos_agree").is(":checked"))window.Shopify.theme_settings.go_to_checkout||$("body").hasClass("cart")?$(this).submit():(e2.preventDefault(),document.location.href=Shopify.routes.cart_url);else{const warning2=`${Shopify.translation.agree_to_terms_warning}
`;return $("p.warning").length===0&&$(this).before(warning2),!1}}):window.Shopify.theme_settings.go_to_checkout||$("body").on("click",".cart_content [data-minicart-checkout-button]",e2=>{e2.preventDefault(),document.location.href=window.Shopify.routes.cart_url}),window.Shopify.theme_settings.collection_secondary_image&&window.imageFunctions.showSecondaryImage(),$("[data-is-required]").length){const $checkboxGroup=$(".contact-block--checkbox input");$checkboxGroup.prop("required",!0),$(".contact-block--checkbox [data-is-required] input").on("change",()=>{$checkboxGroup.prop("required",!0),$checkboxGroup.is(":checked")&&$checkboxGroup.prop("required",!1)})}$(".maps").click(()=>{$(".maps iframe").css("pointer-events","auto")}),window.Shopify.theme_settings.pagination_type==="load_more_button"&&window.enableLoadMoreButton(".collection-matrix"),window.Shopify.theme_settings.pagination_type==="load_more"&&window.enableLoadMoreProducts(),window.Shopify.theme_settings.pagination_type==="infinite_scroll"&&window.enableInfiniteScroll(),window.Shopify.theme_settings.search_pagination_type==="load_more_button"&&window.enableLoadMoreButton(".search-matrix"),window.Shopify.theme_settings.search_pagination_type==="load_more"&&window.enableLoadMoreSearch(),window.Shopify.theme_settings.search_pagination_type==="infinite_scroll"&&window.enableInfiniteSearchScroll();function ajaxSubmitCart(cart){const $cart=cart;$.ajax({url:"/cart/update.js",dataType:"json",cache:!1,type:"post",data:$cart.serialize(),success(data){refreshCart(data)}})}function updateCartItemQuantity(cartItem){$.ajax({url:"/cart/change.js",dataType:"json",cache:!1,type:"post",data:{quantity:cartItem.quantity,line:cartItem.lineID},success(data){const cartItemsArray=data.items,lineIDIndex=cartItem.lineID-1,totalCartItems=cartItem.parentCartForm.find("[data-variant-id]").length,$quantityInputs=cartItem.parentCartForm.find(`[data-variant-id="${cartItem.variantID}"] input`);let initialQuantityTotal=0,apiQuantityTotal=0;const apiLineItemQuantity=typeof data.items[lineIDIndex]<"u"?data.items[lineIDIndex].quantity:0;if($quantityInputs.length>1?($.each($quantityInputs,(_i,input)=>{initialQuantityTotal+=parseInt($(input).val())}),cartItemsArray.forEach(item=>{item.variant_id===cartItem.variantID&&(apiQuantityTotal+=item.quantity)})):(initialQuantityTotal=parseInt($quantityInputs.val()),apiQuantityTotal=typeof data.items[lineIDIndex]<"u"?data.items[lineIDIndex].quantity:0),initialQuantityTotal>0&&initialQuantityTotal>apiQuantityTotal)if(apiQuantityTotal===1?itemsLeftText=window.Shopify.translation.one_item_left:itemsLeftText=window.Shopify.translation.items_left_text,$(".warning--quantity").remove(),totalCartItems${apiQuantityTotal} ${itemsLeftText}`;cartItem.parentCartForm.find(`[data-line-id='${cartItem.lineID}'] input`).parent().after(warning2),cartItem.parentCartForm.find(`[data-line-id='${cartItem.lineID}'] input`).val(apiLineItemQuantity)}else cartItem.parentCartForm.data("cart-form")==="cart-template"?cartItem.parentCartForm.submit():refreshCart(data)}})}function refreshCartID(){const cartItem=document.querySelectorAll(".cart__item");for(let i2=0;i2'+title+""}const lineID=index+1;var line_id=lineID;if(cartItemsHTML+=``,item.image&&(cartItemsHTML+=``),cart_items_html+='',item.image&&(cart_items_html+=''),cart_items_html+='",item.properties&&(item.product_type.toUpperCase().indexOf("CHILD")>=0||item.product_type.toUpperCase().indexOf("INSTALACION")>=0)&&$.each(item.properties,function(title2,value2){value2&&title2.charAt(0)!="_"&&(cart_items_html+='
'+title2+": "+value2+"
")}),item.id==41697001078944&&(cart_items_html+='
Muestra
'),cart_items_html+='
',$.ajax({dataType:"json",async:!1,cache:!1,url:"/products/"+item.handle+".js",success:function(data){if(data.variants){var itemVariants=data.variants;if(itemVariants.length>1){for(v=0;vdata.price&&(productHasSale=!0,productCompareAtPrice=data.compare_at_price,productFinalPrice=data.price):productHasSale=!1}}),item.product_title.toUpperCase().indexOf("SAMPLE")>=0||item.product_title.toUpperCase().indexOf("MUESTRA")>=0)cart_items_html+="Gratis";else if(productHasSale==!0){var itemPrice=Shopify.formatMoney(productFinalPrice,$("body").data("money-format"))+'
'+Shopify.formatMoney(productCompareAtPrice,$("body").data("money-format"))+"";cart_items_html+='
'+itemPrice+"",saving=(productCompareAtPrice-productFinalPrice)*item.quantity,total_saving=saving+total_saving}else if(item.price>item.final_price){saving=(productCompareAtPrice-productFinalPrice)*item.quantity,total_saving=saving+total_saving;var itemPrice=Shopify.formatMoney(item.final_price,$("body").data("money-format"))+' '+Shopify.formatMoney(item.price,$("body").data("money-format"))+"";cart_items_html+='
'+itemPrice+""}else{var itemPrice=Shopify.formatMoney(item.price,$("body").data("money-format"));cart_items_html+=''+itemPrice+""}item.price>item.final_price&&(cart_items_html+=discountMessage),item.product_type.toUpperCase().indexOf("INSTALACION")<0||item.product_type.toUpperCase().indexOf("CHILD")<0?(cart_items_html+='',cart_items_html+="Cantidad: "+item.quantity+"",cart_items_html+="
"):item.product_title.toUpperCase().indexOf("MUESTRA")<0&&item.product_title.toUpperCase().indexOf("SAMPLE")<0&&(cart_items_html+='
',cart_items_html+='',cart_items_html+='',cart_items_html+='',cart_items_html+="
"),cart_items_html+="",cart_items_html+=''});const cartDiscounts=cart.cart_level_discount_applications;for(let i2=0;i2${title}`,cartDiscountsHTML+='',cartDiscountsHTML+=`-${amount}`}cart_action_html+=''+Shopify.formatMoney(cart.total_price,$("body").data("money-format"))+""+Shopify.translation.cart_subtotal_text+"",total_saving=total_saving+cart.total_discount,cartSavingsHTML+=''+Shopify.formatMoney(total_saving,$("body").data("money-format"))+"Ahorras",console.log("total_saving",total_saving),Shopify.theme_settings.display_savings&&total_saving>0?cart_savings_html=''+Shopify.formatMoney(total_saving,$("body").data("money-format"))+""+Shopify.translation.cart_savings_text+"":cart_savings_html=""}$(".js-cart_items").html(cart_items_html),$(".js-cart_discounts").html(cartDiscountsHTML),$(".js-cart_subtotal").html(cart_action_html),$(".js-cart_savings").html(cartSavingsHTML),Shopify.theme_settings.show_multiple_currencies&&convertCurrencies()}$("body").on("change","[data-cart-quantity-input]",function(){const cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:$(this).val(),parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};$(this).parents(".product-quantity-box").find(".js-change-quantity").addClass("is-disabled"),updateCartItemQuantity(cartItem)}),$("body").on("click","[data-remove-item]",function(e2){e2.preventDefault();const cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:0,parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};cartItem.$element.addClass("animated fadeOutLeft"),updateCartItemQuantity(cartItem),cartItem.parentCartForm.data("cart-form")==="cart-template"&&(cartItem.$element.find("input").val("0"),cartItem.parentCartForm.submit()),cartItem.parentCartForm.data("cart-form")==="mini-cart"&&cartItem.$element.find("input").val("0")}),window.Shopify.theme_settings.cart_action==="ajax"&&$(document).on("click",".ajax-submit",function(e){e.preventDefault();const $addToCartForm=$(this).closest("form"),$addToCartBtn=$addToCartForm.find(".add_to_cart");$("body").hasClass("cart")&&$addToCartForm.submit(),console.log("Ajax adding to cart");var cartData=[],animationButton=$addToCartBtn;if(window.sample)cartData=window.sample,animationButton=$(".add-free-sample");else if(window.childrenProducts){var rollerQuantity=$("#quantity").length&&parseInt($("#quantity").val())>0?$("#quantity").val():1,items=[];window.currentChildren.installation&&window.currentChildren.installation!="no-instalacion"&&items.push({quantity:rollerQuantity,id:window.currentChildren.installation,properties:{_name:window.currentChildren.name,Para:window.currentChildren.name,"Posici\xF3n de Ca\xEDda":window.currentChildren.fall,"Posici\xF3n de Cadena":window.currentChildren.chain,Ancho:window.childrenProducts.dimensions.selected.width+" cm",Alto:window.childrenProducts.dimensions.selected.height+" cm"}}),items.push({quantity:rollerQuantity,id:window.currentChildren.selected.id,properties:{_name:window.currentChildren.name,"Posici\xF3n de Ca\xEDda":window.currentChildren.fall,"Posici\xF3n de Cadena":window.currentChildren.chain,Ancho:window.childrenProducts.dimensions.selected.width+" cm",Alto:window.childrenProducts.dimensions.selected.height+" cm"}}),cartData={items},animationButton=$(".add-roller-to-cart")}else cartData=$addToCartForm.serialize();return $.ajax({url:"/cart/add.js",dataType:"json",cache:!1,type:"post",data:cartData,beforeSend:function(){animationButton.attr("disabled","disabled").addClass("disabled"),animationButton.find("span").removeClass("fadeInDown").addClass("animated zoomOut")},success:function(itemData){window.sample&&(window.sample=null),animationButton.find(".checkmark").addClass("checkmark-active"),window.setTimeout(()=>{animationButton.removeAttr("disabled").removeClass("disabled"),animationButton.find(".checkmark").removeClass("checkmark-active"),animationButton.find("span").removeClass("zoomOut").addClass("fadeInDown")},1e3),$.ajax({url:"/cart.js",dataType:"json",cache:!1,success(cart){setTimeout(function(){refreshCart(cart),$("body").hasClass("fancybox-active")&&$.fancybox.close(),$("#header").is(":visible")?$("#header .cart-container").addClass("active_link"):$(".sticky_nav--stick").length?$(".sticky_nav .cart-container").addClass("active_link"):$(".top-bar .cart-container").addClass("active_link"),window.Shopify.media_queries.medium.matches&&($(this).parent().hasClass("active_link"),$("body").addClass("blocked-scroll"))},500)}})},error(XMLHttpRequest){let response=eval(`(${XMLHttpRequest.responseText})`);response=response.description,$(".warning").remove();const warning=`${response.replace("All 1 ","All ")}
`;$addToCartForm.after(warning),$addToCartBtn.removeAttr("disabled").removeClass("disabled"),$addToCartBtn.find("span").text(window.Shopify.translation.add_to_cart).removeClass("zoomOut").addClass("zoomIn")}}),!1}),window.productPage.productSwatches()}),window.Shopify.updateOptionsInSelector=function(selectorIndex,parent){switch(selectorIndex){case 0:var key="root";break;case 1:var key=$(`${parent} .single-option-selector:eq(0)`).val();break;case 2:var key=$(`${parent} .single-option-selector:eq(0)`).val();key+=` / ${$(`${parent} .single-option-selector:eq(1)`).val()}`}const availableOptions=Shopify.optionsMap[key];$(`${parent} .swatch[data-option-index="${selectorIndex}"] .swatch-element`).each(function(){$.inArray($(this).attr("data-value"),availableOptions)!==-1?$(this).removeClass("soldout").find(":radio").removeAttr("disabled","disabled").removeAttr("checked"):$(this).addClass("soldout").find(":radio").removeAttr("checked").attr("disabled","disabled")})},window.Shopify.linkOptionSelectors=function(product,parent){window.Shopify.optionsMap={};for(let i2=0;i21){const key=variant.option1;window.Shopify.optionsMap[key]=window.Shopify.optionsMap[key]||[],window.Shopify.optionsMap[key].push(variant.option2),window.Shopify.optionsMap[key]=window.Shopify.uniq(window.Shopify.optionsMap[key])}if(product.options.length===3){const key=`${variant.option1} / ${variant.option2}`;window.Shopify.optionsMap[key]=window.Shopify.optionsMap[key]||[],window.Shopify.optionsMap[key].push(variant.option3),window.Shopify.optionsMap[key]=window.Shopify.uniq(window.Shopify.optionsMap[key])}}}window.Shopify.updateOptionsInSelector(0,parent),product.options.length>1&&window.Shopify.updateOptionsInSelector(1,parent),product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),$(`${parent} .single-option-selector:eq(0)`).change(()=>(window.Shopify.updateOptionsInSelector(1,parent),product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),!0)),$(`${parent} .single-option-selector:eq(1)`).change(()=>(product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),!0))},window.htmlEncode=function htmlEncode2(value){return value?$("").text(value).html():""},window.is_touch_device=function is_touch_device(){return"ontouchstart"in window||navigator.maxTouchPoints},window.touch_device=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);function floatToString(t,e2){var o=t.toFixed(e2).toString();return o.match(/^\.\d+/)?"0"+o:o}typeof window.Shopify>"u"&&(window.Shopify={}),window.Shopify.each=function(t,e2){for(var o=0;o"u")},window.Shopify.getClass=function(t){return Object.prototype.toString.call(t).slice(8,-1)},window.Shopify.extend=function(t,e2){function o(){}o.prototype=e2.prototype,t.prototype=new o,t.prototype.constructor=t,t.baseConstructor=e2,t.superClass=e2.prototype},window.Shopify.locationSearch=function(){return window.location.search},window.Shopify.locationHash=function(){return window.location.hash},window.Shopify.replaceState=function(t){window.history.replaceState({},document.title,t)},window.Shopify.urlParam=function(t){var e2=RegExp("[?&]"+t+"=([^]*)").exec(window.Shopify.locationSearch());return e2&&decodeURIComponent(e2[1].replace(/\+/g," "))},window.Shopify.newState=function(t,e2){var o;return o=window.Shopify.urlParam(t)?window.Shopify.locationSearch().replace(RegExp("("+t+"=)[^]+"),"$1"+e2):window.Shopify.locationSearch()===""?"?"+t+"="+e2:window.Shopify.locationSearch()+"&"+t+"="+e2,o+window.Shopify.locationHash()},window.Shopify.setParam=function(t,e2){window.Shopify.replaceState(window.Shopify.newState(t,e2))},window.Shopify.Product=function(t){window.Shopify.isDefined(t)&&this.update(t)},window.Shopify.Product.prototype.update=function(t){for(property in t)this[property]=t[property]},window.Shopify.Product.prototype.optionNames=function(){return window.Shopify.getClass(this.options)=="Array"?this.options:[]},window.Shopify.Product.prototype.optionValues=function(t){if(!window.Shopify.isDefined(this.variants))return null;var e2=window.Shopify.map(this.variants,function(e3){var o="option"+(t+1);return e3[o]==null?null:e3[o]});return e2[0]==null?null:window.Shopify.uniq(e2)},window.Shopify.Product.prototype.getVariant=function(t){var e2=null;return t.length!=this.options.length||window.Shopify.each(this.variants,function(o){for(var i2=!0,r=0;r"u"?e3:t2}function i2(t2,e3,i3,r2){if(e3=o(e3,2),i3=o(i3,","),r2=o(r2,"."),isNaN(t2)||t2==null)return 0;t2=(t2/100).toFixed(e3);var n2=t2.split("."),a2=n2[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i3),s=n2[1]?r2+n2[1]:"";return a2+s}typeof t=="string"&&(t=t.replace(".",""));var r="",n=/\{\{\s*(\w+)\s*\}\}/,a=e2||this.money_format;switch(a.match(n)[1]){case"amount":r=i2(t,2);break;case"amount_no_decimals":r=i2(t,0);break;case"amount_with_comma_separator":r=i2(t,2,".",",");break;case"amount_with_apostrophe_separator":r=i2(t,2,"'",".");break;case"amount_no_decimals_with_comma_separator":r=i2(t,0,".",",")}return a.replace(n,r)},window.Shopify.OptionSelectors=function(t,e2){return this.selectorDivClass="selector-wrapper",this.selectorClass="single-option-selector",this.variantIdFieldIdSuffix="-variant-id",this.variantIdField=null,this.historyState=null,this.selectors=[],this.domIdPrefix=t,this.product=new window.Shopify.Product(e2.product),this.onVariantSelected=window.Shopify.isDefined(e2.onVariantSelected)?e2.onVariantSelected:function(){},this.replaceSelector(t),this.initDropdown(),e2.enableHistoryState&&(this.historyState=new window.Shopify.OptionSelectors.HistoryState(this)),!0},window.Shopify.OptionSelectors.prototype.initDropdown=function(){var t={initialLoad:!0},e2=this.selectVariantFromDropdown(t);if(!e2){var o=this;setTimeout(function(){o.selectVariantFromParams(t)||o.fireOnChangeForFirstDropdown.call(o,t)})}},window.Shopify.OptionSelectors.prototype.fireOnChangeForFirstDropdown=function(t){this.selectors[0].element.onchange(t)},window.Shopify.OptionSelectors.prototype.selectVariantFromParamsOrDropdown=function(t){var e2=this.selectVariantFromParams(t);e2||this.selectVariantFromDropdown(t)},window.Shopify.OptionSelectors.prototype.replaceSelector=function(t){var e2=document.getElementById(t),o=e2.parentNode;window.Shopify.each(this.buildSelectors(),function(t2){o.insertBefore(t2,e2)}),e2.style.display="none",this.variantIdField=e2},window.Shopify.OptionSelectors.prototype.selectVariantFromDropdown=function(t){var e2=document.getElementById(this.domIdPrefix).querySelector("[selected]");if(e2||(e2=document.getElementById(this.domIdPrefix).querySelector('[selected="selected"]')),!e2)return!1;var o=e2.value;return this.selectVariant(o,t)},window.Shopify.OptionSelectors.prototype.selectVariantFromParams=function(t){var e2=window.Shopify.urlParam("variant");return this.selectVariant(e2,t)},window.Shopify.OptionSelectors.prototype.selectVariant=function(t,e2){var o=this.product.getVariantById(t);if(o==null)return!1;for(var i2=0;i21){var r2=document.createElement("label");r2.htmlFor=t2.element.id,r2.innerHTML=t2.name,e3.appendChild(r2)}return e3.appendChild(t2.element),e3});return r},window.Shopify.OptionSelectors.prototype.selectedValues=function(){for(var t=[],e2=0;e2l;l++)p.options[l]="option "+(l+1)}else p.options=e2;return p},window.Shopify.SingleOptionSelector=function(t,e2,o,i2){this.multiSelector=t,this.values=i2,this.index=e2,this.name=o,this.element=document.createElement("select");for(var r=0;r=1&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()})}),$(document).on("shopify:block:deselect",function(e2){var $parentSection=$("#shopify-section-"+e2.detail.sectionId);($parentSection.hasClass("shopify-section--slideshow")||$parentSection.hasClass("shopify-section--testimonials"))&&window.sliderBlock.deselect($parentSection)}),$(document).on("shopify:section:reorder",function(e2){window.utils.pageBannerCheck()}),$(document).on("shopify:section:load",function(e2){var $parentSection=$("#shopify-section-"+e2.detail.sectionId);window.utils.pageBannerCheck(),window.utils.enableDisclosure(),window.Shopify.theme_settings.enable_autocomplete&&window.searchAutocomplete.init(),window.Shopify.theme_settings.newsletter_popup&&window.newsletter_popup.init(),$parentSection.hasClass("shopify-section--article-template")&&window.sidebarAccordions.init(),$parentSection.hasClass("shopify-section--blog-template")&&window.sidebarAccordions.init(),$parentSection.hasClass("shopify-section--product-sidebar")&&window.sidebarAccordions.init(),$parentSection.hasClass("shopify-section--page-gallery-template")&&window.gallery.init($parentSection),$parentSection.hasClass("shopify-section--gallery")&&window.gallery.init(),($parentSection.hasClass("shopify-section--page-faq-template")||$parentSection.hasClass("shopify-section--faq"))&&window.globalAccordions.init(),$parentSection.hasClass("shopify-section--cart-template")&&(window.cart.init(),$(".block__featured_collection").length&&window.featuredCollection.init()),$parentSection.hasClass("shopify-section--featured-promotions")&&window.featuredPromotions.init(),$parentSection.hasClass("shopify-section--slideshow")&&window.slideshow.init(),$parentSection.hasClass("shopify-section--testimonials")&&window.testimonials.init(),($parentSection.hasClass("shopify-section--featured-product")||$parentSection.hasClass("shopify-section--quickshop"))&&(window.productPage.init(),window.productPage.runOptionSelector(),window.videoFeature.init(),window.productPage.productSwatches(),window.Shopify.theme_settings.enable_shopify_review_comments&&$(".shopify-product-reviews-badge").length&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()})),$parentSection.hasClass("shopify-section--map")&&window.map.init(),$parentSection.hasClass("shopify-section--featured-collection")&&(window.featuredCollection.init(),window.videoFeature.init()),$parentSection.hasClass("shopify-section--video")&&window.video.init(),($parentSection.hasClass("shopify-section--product-template")||$parentSection.hasClass("shopify-section--quick-shop"))&&(window.productPage.init(),window.productPage.runOptionSelector(),window.videoFeature.init(),window.productPage.productSwatches(),window.recentlyViewed.init(),window.Shopify.theme_settings.enable_shopify_review_comments&&($("#shopify-product-reviews").length||$(".shopify-product-reviews-badge").length)&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()}),window.utils.productReviewScroll()),$parentSection.hasClass("shopify-section--recommended-products")&&(window.productPage.init(),window.productPage.runOptionSelector()),$parentSection.hasClass("shopify-section--recently-viewed-products")&&window.recentlyViewed.init(),$parentSection.hasClass("shopify-section--article-template")&&window.location.pathname.indexOf("/comments")!=-1&&$("html,body").animate({scrollTop:$("#new-comment").offset().top-140},"slow"),$parentSection.hasClass("shopify-section--collection-template")&&(window.collectionSidebarFilter.init(),window.recentlyViewed.init(),window.productPage.runOptionSelector(),window.sidebarAccordions.init()),$parentSection.hasClass("shopify-section--contact-section")&&window.map.init(),$parentSection.hasClass("shopify-section--search-template")&&(window.Shopify.theme_settings.enable_autocomplete&&window.searchAutocomplete.init(),window.collectionSidebarFilter.init(),window.sidebarAccordions.init()),$parentSection.hasClass("shopify-section--header")&&(window.header.init(),window.header.loadMegaMenu()),$parentSection.hasClass("shopify-section--mega-menu")&&window.header.loadMegaMenu(),$parentSection.hasClass("shopify-section--page-details-template")&&(window.featuredCollection.init(),window.video.init(),window.recentlyViewed.init(),$(".block__image_gallery").length&&window.gallery.init())}),$(document).on("shopify:section:unload",function(e2){var $target=$(e2.target),$parentSection=$("#shopify-section-"+e2.detail.sectionId);$parentSection.hasClass("shopify-section--header")&&(window.header.unload($target),window.header.unloadMegaMenu()),$parentSection.hasClass("shopify-section--slideshow")&&window.slideshow.unload($target),$parentSection.hasClass("shopify-section--testimonials")&&window.testimonials.unload($target),$parentSection.hasClass("shopify-section--search")&&window.searchAutocomplete.unload($target),$parentSection.hasClass("shopify-section--product-template")&&window.productPage.unload($parentSection),$parentSection.hasClass("shopify-section--featured-product")&&window.productPage.unload($parentSection),$parentSection.hasClass("shopify-section--mega-menu")&&window.header.unloadMegaMenu()}),$(document).on("shopify:section:select",function(e2){var $parentSection=$("#shopify-section-"+e2.detail.sectionId);if($parentSection.hasClass("shopify-section--mega-menu")){var megaMenuParent=$(".header ."+e2.detail.sectionId).data("dropdown");setTimeout(function(){$('a.mega-menu-parent[data-dropdown-rel="'+megaMenuParent+'"]').trigger("mouseenter"),$('a.mega-menu-parent[data-dropdown-rel="'+megaMenuParent+'"]').parents("header").addClass("editor-hover--true"),header.removeDataAttributes(".header .mega-menu.dropdown_container .dropdown_column")},10)}$parentSection.hasClass("shopify-section--featured-collection")&&(window.featuredCollection.unload($parentSection),window.featuredCollection.init()),window.utils.pageBannerCheck();var evt=document.createEvent("UIEvents");evt.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(evt)}),$(document).on("shopify:section:deselect",function(e2){var $parentSection=$("#shopify-section-"+e2.detail.sectionId);if($parentSection.hasClass("shopify-section--mega-menu")){var megaMenuParent=$(".header ."+e2.detail.sectionId).data("dropdown");$('a.mega-menu-parent[data-dropdown-rel="'+megaMenuParent+'"]').trigger("mouseout"),$('a.mega-menu-parent[data-dropdown-rel="'+megaMenuParent+'"]').parents("header").removeClass("editor-hover--true")}}),$(document).ready(function(){$("#youtube-1901").contents().find("head").append($(".ytp-large-play-button").css("display","none"))}),$(function(){$(".swatch-element").on("click",function(){let imgURL=$(this).attr("data-img"),imgID=$(this).attr("data-id"),variant=$(this).attr("data-select"),precio=$(this).attr("data-price"),sku=$(this).attr("data-sku");$(".gallery-cell.is-selected img").attr("srcset",imgURL),$(".gallery-cell.is-selected img").attr("src",imgURL),$(".variant_"+variant).val(imgID),$(".sku").html("SKU: "+sku+""),$("#variacion_precios").length>0&&$(".price-min .money").html(precio)})}),$(".search-boost").bind("keyup focus",function(e2){setTimeout(()=>{const discountText=document.querySelector("#discountText");let searchBoostTitle=document.querySelectorAll(".boost-pfs-search-suggestion-product-title");for(var i2=0;i2Desde')}},1e3)});const searchBoostInput=document.querySelector(".search-boost");searchBoostInput.addEventListener("click",function(){setTimeout(()=>{const discountText=document.querySelector("#discountText");let searchBoostTitle=document.querySelectorAll(".boost-pfs-search-suggestion-product-title");for(var i2=0;i2Desde')}},1e3)}),console.log(document.querySelector('a[href="/cart"].icon-cart.mini_cart')),document.querySelectorAll('a[href="/cart"].icon-cart.mini_cart').forEach(btn=>{btn.addEventListener("click",function(){window.location.href="/cart"})});
//# sourceMappingURL=/cdn/shop/t/446/assets/app.js.map?v=1959011287904225421753621700