function tagSpotsById(e,i,t,r=1){let c=document.getElementById(e);if(null!==c){let e=c.querySelectorAll('div[class*="'+t+'"]');(e=2==r?c.querySelectorAll('div[id^="'+t+'"]'):e).forEach(function(e,r){var t=e.querySelector("img"),o=t?t.getAttribute("alt"):"",a=(new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&("object"==typeof TAGGEOS&&((e=[]).namePromotion=i,e.dataItem=r+1,e.imageAlt=o,TAGGEOS.view_promotion(e)),t.disconnect())})}).observe(c),function(){var e;"object"==typeof TAGGEOS&&((e=[]).namePromotion=i,e.dataItem=r+1,e.imageAlt=o,TAGGEOS.select_promotion(e)),t.removeEventListener("click",a)});t.addEventListener("click",a)})}}function encryptData(i){return new Promise((t,r)=>{if(window.crypto&&window.crypto.subtle){const o="AES-GCM";var e=window.crypto.subtle.generateKey({name:o,length:256},!0,["encrypt","decrypt"]);const a=(new TextEncoder).encode(i);e.then(e=>{window.crypto.subtle.encrypt({name:o,iv:window.crypto.getRandomValues(new Uint8Array(12)),tagLength:128},e,a).then(e=>{e=Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join("");t(e)}).catch(e=>{r(e)})})}else r("Este navegador no admite la API Web Crypto.")})}TAGGEOS=function(){function D(e){2==e.length&&(S.price=e.filter(e=>"display"==e.usage.toLowerCase())[0].value||0,S.offer=e.filter(e=>"offer"==e.usage.toLowerCase())[0].value||0,S.discount=S.price-S.offer||0)}var t="Analitycs",S={top_category:"",top_category2:"",parent_category_rn:"",categoryId:"",discount:0,price:0,offer:0,currency:"MXN"},b=[];return{select_item:function(t=""){if(""==t)return console.warn("uniqueId was not retrieved"),!1;var e=0,r=new Array,o="",a="";r[0]="",r[1]="",r[2]="",r[3]="",$("#widget_breadcrumb ul li").each(function(){r[e]=$(this).text().replace("/",""),e++});try{if(0e.uniqueID==t)[0],c=(D(i.price),""),n=new Array,m=!1,g=!1,_="",c=JSON.stringify(i.attributes);n[0]="",n[1]="",-1{dataLayer.push({ecommerce:null}),dataLayer.push({event:"sign_up",method:"email",user_id:e})}).catch(e=>{console.error(e)})},login:function(e){e&&(dataLayer.push({ecommerce:null}),dataLayer.push({event:"login",method:e}))},select_promotion:function(e=null){dataLayer.push({ecommerce:null}),dataLayer.push({event:"select_promotion",ecommerce:{creative_name:e.namePromotion,creative_slot:e.dataItem,promotion_id:"",promotion_name:e.imageAlt}})},view_promotion:function(e=null){dataLayer.push({ecommerce:null}),dataLayer.push({event:"view_promotion",ecommerce:{creative_name:e.namePromotion,creative_slot:e.dataItem,promotion_id:"",promotion_name:e.imageAlt}})}}}(),$(document).ready(function(){$("body").on("click",'div[id^="CatalogEntryProdImg_"]',function(){"object"==typeof TAGGEOS&&TAGGEOS.select_item($(this).attr("id"))})}),$(document).ready(function(){$("body").on("click",'div[id^="WC_CatalogEntryDBThumbnailDisplayJSPF_"]',function(){var e=$(this).attr("id").split("_")[2];"object"==typeof TAGGEOS&&TAGGEOS.select_item("CatalogEntryProdImg_"+e)})}),$(document).ready(function(){$("body").on("click",'div[id^="compare_"]',function(){var e=$(this).attr("id").split("_")[1];"object"==typeof TAGGEOS&&TAGGEOS.select_item("CatalogEntryProdImg_"+e)})}),$(document).ready(function(){var e;null!=document.querySelector('input[name="logonId"]')&&null!=document.querySelector("div[id^='WC_ActivationResendForm_div_1']")&&(e=document.querySelector('input[name="logonId"]').value,"object"==typeof TAGGEOS)&&TAGGEOS.sign_up(e)}),$(document).ready(function(){setTimeout(()=>{var e,t,r;null!=document.getElementById("WC_AccountDisplay_links_2")&&null!=document.getElementById("WC_AccountDisplay_links_3")&&null!=document.getElementById("WC_AccountDisplay_links_4")&&(r=document.getElementById("WC_AccountDisplay_links_2"),e=document.getElementById("WC_AccountDisplay_links_3"),t=document.getElementById("WC_AccountDisplay_links_4"),r.addEventListener("click",()=>{localStorage.setItem("tipoLogin","email")}),e.addEventListener("click",()=>{localStorage.setItem("tipoLogin","facebook")}),t.addEventListener("click",()=>{localStorage.setItem("tipoLogin","google")})),null!=document.getElementById("Header_GlobalLogin_loggedInDropdown")&&document.getElementById("Header_GlobalLogin_loggedInDropdown").classList.contains("active")&&(r=localStorage.getItem("tipoLogin"),"object"==typeof TAGGEOS)&&TAGGEOS.login(r)},500)}),$(document).ready(function(){if(null!=document.querySelector("div[id^='contentCarouselWidget_3']")){const i=new Set;document.querySelectorAll(".contentCarouselWidget .owl-item").forEach((o,e)=>{o.setAttribute("data-item",e+1);const a=o.querySelector("img");a.addEventListener("click",()=>{var e,t=o.getAttribute("data-item"),r=a.getAttribute("alt");"object"==typeof TAGGEOS&&((e=[]).namePromotion="Banner_Home_Page",e.dataItem=t,e.imageAlt=r,TAGGEOS.select_promotion(e))})});var e,t,r=document.querySelector("div[id^='contentCarouselWidget_3']"),o=new MutationObserver(e=>{e.forEach(e=>{var t,r;"class"===e.attributeName&&(e=e.target).classList.contains("active")&&(t=e.getAttribute("data-item"),e=e.querySelector("img").getAttribute("alt"),i.has(t)||(i.add(t),"object"==typeof TAGGEOS&&((r=[]).namePromotion="Banner_Home_Page",r.dataItem=t,r.imageAlt=e,TAGGEOS.view_promotion(r))))})}),a=r.querySelector(".active");a&&(e=a.getAttribute("data-item"),a=a.querySelector("img").getAttribute("alt"),i.has(e)||(i.add(e),"object"==typeof TAGGEOS&&((t=[]).namePromotion="Banner_Home_Page",t.dataItem=e,t.imageAlt=a,TAGGEOS.view_promotion(t)))),o.observe(r,{attributes:!0,subtree:!0})}}),$(document).ready(function(){tagSpotsById("ci_espot_33016_MejoresOfertas_Content","Lo_más_destacado","item-img"),tagSpotsById("ci_espot_33017_TePuedeInteresar_Content","Te_puede_interesar","item-img"),tagSpotsById("ci_espot_33014_BannerCentral_Content","Categorias_top","item-img"),tagSpotsById("ci_espot_33013_BannerCentral2_Content","Calzado_familia","bannerCentral2"),setTimeout(()=>{tagSpotsById("ci_espot_39502_FormasDePago_Content","Outlet_70","copy_outlet_content",2),tagSpotsById("newsletter","Tarjeta_bradescard","footer_items_links")},500),tagSpotsById("ci_espot__BannerPromocionesPLP_Content","Banner_paypal","bannerPaypal")});