'use strict' function _defineProperty(e, i, t) { return ( i in e ? Object.defineProperty(e, i, { value: t, enumerable: !0, configurable: !0, writable: !0, }) : (e[i] = t), e ) } function openSidebarModal(e) { e = '#' + e $(e).css({ zIndex: 22, opacity: 1 }), gsap.to($(e + ' .overflow'), { duration: 0.4, opacity: 1 }), gsap.to($(e + ' .sidebar-content'), { duration: 0.4, x: '0%' }), $(document.body).css({ overflow: 'hidden' }) } function closeSidebarModal(e) { var i = '#' + e gsap.to($(i + ' .overflow'), { duration: 0.4, opacity: 0 }), gsap.to($(i + ' .sidebar-content'), { duration: 0.4, x: '100%' }), $(document.body).css({ overflow: '' }), setTimeout(function () { $(i).css({ zIndex: -1, opacity: 0 }) }, 400) } function openModal(e) { e = '#' + e $(e).css({ zIndex: 22, opacity: 1 }), gsap.to($(e + ' .overflow'), { duration: 0.3, opacity: 1 }), gsap.to($(e + ' .box-modal-content'), { duration: 0.3, opacity: 1 }) } function getCookie(e) { e = '; '.concat(document.cookie).split('; '.concat(e, '=')) if (2 === e.length) return e.pop().split(';').shift() } function closeModal(e) { var i = '#' + e gsap.to($(i + ' .overflow'), { duration: 0.3, opacity: 0 }), gsap.to($(i + ' .box-modal-content'), { duration: 0.3, opacity: 0 }), setTimeout(function () { $(i).css({ zIndex: -1, opacity: 0 }) }, 200) } function openModalCostas() { var e = $('#open-modal-costas') e.click(function () { openModal('popup-exclude-departaments') }) } function asesoriaOnline() { var e = $('#asesoria-online'), i = $('#popup-costas-button'), t = $('#modal-asesoria-online .close-modal'), n = $('#modal-asesoria-online .close-modal-asesoria-online') function r() { $('#modal-asesoria-online').toggle() var e = $('#modal-asesoria-online').find('.container-canales') e.hasClass('active') ? e.removeClass('active') : e.addClass('active') } e.click(function () { r() }), t.click(function () { r() }), n.click(function () { r() }), i.click(function () { openModal('popup-costas') }) } function seasonPromoTags() { var e = new Date('Mar 08, 2024 00:00:00').getTime(), i = new Date('Dec 31, 2024 23:59:59').getTime(), t = new Date().getTime() e < t && t < i && (0 < (e = $('.discount-percent , .discount-offer , .message-discount')) .length && e.addClass('cyber'), localStorage.setItem('seasonPromo', !0)) } $(document).ready(function () { $('.close-notifications').click(function () { $('.container-notifications').toggle(), $('.notifications').removeClass('active') }), $('.notify-btn').click(function () { $('.container-notifications').toggle(), $('.notifications').addClass('active') }) var e, i, t, n = $('.body-notifications .notification').length, n = (0 < n && ($('.notify-btn .notify-count').text(n), $('.notify-btn').addClass('active')), new ScrollMagic.Controller()) new ScrollMagic.Scene({ offset: 30 }) .setClassToggle('#calypso-header', 'active') .addTo(n), (e = (n = $('.vitrine-container')).attr('items')), n.each(function (e, i) { var t null != i && ($(i).hasClass('new-products') && $('.new-products .product-card').append( "" ), null != (t = $(i).find('ul')[0])) && ($(i).find('li').addClass('swiper-slide'), $(t).addClass('swiper-wrapper'), $(t).wrap("
"), $(t.parentElement).append( "" )) }), (n = location.pathname.includes('ofertas')), (i = window.innerWidth), n && i < 786 && $('.checkbox').insertAfter( $('#newsletterForm fieldset:first-child input') ), null != (n = $('.container-shelf-two-columns')) && (n.each(function (e, i) { var t = $(i).find('ul')[0] null != t && ($(i).find('li').addClass('swiper-slide'), $(t).addClass('swiper-wrapper'), $(t).wrap(""), $(t.parentElement).append( "" )) }), new Swiper('.shelf-offers', { loop: !1, slidesPerView: 2.5, observer: !1, spaceBetween: 6, autoplay: { delay: 6e3 }, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, scrollbar: { el: '.scrollbar-vitrine' }, breakpoints: { 640: { slidesPerView: 3, slidesPerGroup: 1, spaceBetween: 10 }, 768: { slidesPerView: 3, slidesPerGroup: 2, spaceBetween: 20 }, 1024: { slidesPerView: 3, slidesPerGroup: 3, spaceBetween: 20 }, }, })), null != (i = $('.container-shelf-offerts-event-5')) && (i.each(function (e, i) { var t = $(i).find('ul')[0] null != t && ($(i).find('li').addClass('swiper-slide'), $(t).addClass('swiper-wrapper'), $(t).wrap( "" ), $(t.parentElement).append( "" )) }), new Swiper('.shelf-container-offers-event-on-5', { loop: !1, slidesPerView: 2.5, infinite: !1, autoplaySpeed: 2e4, slidesPerGroup: 1, spaceBetween: 8, observer: !1, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, scrollbar: { el: '.scrollbar-vitrine' }, breakpoints: { 640: { slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 10 }, 768: { slidesPerView: 3, slidesPerGroup: 1, spaceBetween: 12 }, 1024: { slidesPerView: 5, slidesPerGroup: 1, spaceBetween: 16 }, }, })), null != (n = $('.container-shelf-offerts-event')) && (n.each(function (e, i) { var t = $(i).find('ul')[0] null != t && ($(i).find('li').addClass('swiper-slide'), $(t).addClass('swiper-wrapper'), $(t).wrap( "" ), $(t.parentElement).append( "" )) }), new Swiper('.shelf-container-offers-event-on', { loop: !1, slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 8, observer: !0, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, scrollbar: { el: '.scrollbar-vitrine' }, breakpoints: { 640: { slidesPerView: 1, slidesPerGroup: 2, spaceBetween: 10 }, 768: { slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 20 }, 1024: { slidesPerView: 3, slidesPerGroup: 3, spaceBetween: 20 }, }, })), null != (i = $('.shelfCounter-container')) && (null != (n = $(i).find('ul')[0]) && ($(i).find('li').addClass('swiper-slide'), $(n).addClass('swiper-wrapper'), $(n).wrap(""), $(n.parentElement).append( "" ), $(n) .find('li') .each(function (e) { var i = $(this).find('.percent-price-discount'), i = parseFloat(i.text().split(' ')[0]) $(this) .find('.percent-price-discount') .text(i + ' %') })), new Swiper('.counterShelf-slider', { loop: !1, slidesPerView: 1, slidesPerGroup: 1, observer: !0, spaceBetween: 30, autoplay: { delay: 6e3 }, pagination: { el: '.pag-vitrine', clickable: !0 }, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, })), new Swiper('.products-vitrine', { loop: !1, slidesPerView: 2, slidesPerGroup: 2, observer: !0, spaceBetween: 10, autoplay: { delay: 6e3 }, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, scrollbar: { el: '.scrollbar-vitrine' }, pagination: { el: '.pag-vitrine', clickable: true }, breakpoints: { 640: { slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 10 }, 768: { slidesPerView: 4 == e ? 2 : 3, slidesPerGroup: 4 == e ? 2 : 3, spaceBetween: 4 == e ? 10 : 20, }, 1024: { slidesPerView: 4 == e ? e : 5, slidesPerGroup: 4 == e ? e : 5, spaceBetween: 16, pagination: { enabled: true }, // oculta/desactiva navigation: { enabled: true } // oculta/desactiva }, }, }), new Swiper('.banner-home-init', { loop: !0, autoplay: { delay: 4e3 }, pagination: { el: '.pag-banner', clickable: !0 }, navigation: { nextEl: '.next-banner', prevEl: '.prev-banner' }, }), new Swiper('.banner-offers', { loop: !1, pagination: { el: '.pag-banner', clickable: !0 }, navigation: { nextEl: '.next-banner', prevEl: '.prev-banner' }, }), new Swiper('.our-brands', { loop: !1, slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 50, pagination: { el: '.pag-our', clickable: !0 }, breakpoints: { 640: { slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 50 }, 768: { slidesPerView: 4, slidesPerGroup: 4, spaceBetween: 50 }, 1024: { slidesPerView: 4, slidesPerGroup: 4, spaceBetween: 100 }, }, }), new Swiper('.mySwiper', { autoplay: { delay: 4e3 }, loop: !1, slidesPerView: 3, slidesPerGroup: 3, breakpoints: { 1024: { slidesPerView: 3, slidesPerGroup: 3 }, 1366: { slidesPerView: 7, slidesPerGroup: 7 }, }, }), new Swiper('.sliderNewHome', { autoplay: { delay: 4e3 }, loop: !1, slidesPerView: 1, slidesPerGroup: 1, observer: !0, pagination: { el: '.pag-vitrine', clickable: !0 }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }), new Swiper('.seasonalPromoSwiper', { loop: false, observer: true, observeParents: true, uniqueNavElements: true, slidesPerView: 1.5, slidesPerGroup: 1, spaceBetween: 12, autoplay: { delay: 4000, disableOnInteraction: false }, // móviles / tablet: SÍ mostrar pagination: { el: '.pag-seasonal', clickable: true }, navigation: { nextEl: '.next-seasonal', prevEl: '.prev-seasonal' }, breakpoints: { 640: { slidesPerView: 1.5, slidesPerGroup: 1, spaceBetween: 12 }, 768: { slidesPerView: 3, slidesPerGroup: 3, spaceBetween: 16 }, // desktop: 5 items, SIN dots ni flechas 1024: { slidesPerView: 5, slidesPerGroup: 5, spaceBetween: 20, pagination: { enabled: false }, // oculta/desactiva navigation: { enabled: false } // oculta/desactiva }, 1366: { slidesPerView: 5, slidesPerGroup: 5, spaceBetween: 24, pagination: { enabled: false }, navigation: { enabled: false } } } }); new Swiper('.categorySliderSwiper', { loop: false, observer: true, observeParents: true, uniqueNavElements: true, slidesPerView: 2.5, slidesPerGroup: 1, spaceBetween: 16, autoplay: { delay: 4000, disableOnInteraction: false }, // usar las clases correctas pagination: { el: '.pag-category', clickable: true }, navigation: { nextEl: '.next-category', prevEl: '.prev-category' }, breakpoints: { 640: { slidesPerView: 2.5, slidesPerGroup: 1, spaceBetween: 12 }, 768: { slidesPerView: 3, slidesPerGroup: 3, spaceBetween: 16 }, // En desktop los quitas; si quieres ver dots también aquí, pon enabled:true 1024: { slidesPerView: 8, slidesPerGroup: 8, spaceBetween: 20, pagination: { enabled: false }, navigation: { enabled: false } }, 1366: { slidesPerView: 8, slidesPerGroup: 8, spaceBetween: 24, pagination: { enabled: false }, navigation: { enabled: false } } } }); new Swiper('.sp2-swiper', { loop: false, observer: true, observeParents: true, uniqueNavElements: true, // OK si hay un único set de controles // Mobile: 1.5 cards (producto y medio) slidesPerView: 1.5, slidesPerGroup: 1, spaceBetween: 16, // Dots + flechas en todos los breakpoints pagination: { el: '.sp2-pag', clickable: true }, navigation: { nextEl: '.sp2-next', prevEl: '.sp2-prev' }, breakpoints: { 640: { slidesPerView: 1.2, slidesPerGroup: 1, spaceBetween: 16 }, 1024: { slidesPerView: 3, slidesPerGroup: 1, spaceBetween: 10 }, 1366: { slidesPerView: 3, slidesPerGroup: 1, spaceBetween: 32 }, }, }); new Swiper('.secondSliderNewHome', { loop: !1, slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 10, pagination: { el: '.pag-vitrine', clickable: !0 }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }), new Swiper('.thirdSliderNewHome', { loop: !1, slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 10, pagination: { el: '.pag-vitrine', clickable: !0 }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }), new Swiper('.slideNewLife', { loop: !1, slidesPerView: 1, slidesPerGroup: 1, breakpoints: { 768: { slidesPerView: 'auto', spaceBetween: 30 }, 1024: { slidesPerView: 4, slidesPerGroup: 4 }, }, }), new Swiper( '.skills-top', (_defineProperty( (i = { loop: !0, slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 10, navigation: !1, }), 'navigation', { nextEl: '.next-skills', prevEl: '.prev-skills' } ), _defineProperty(i, 'breakpoints', { 640: { slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 10 }, 768: { slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 30 }, 1024: { slidesPerView: 4, slidesPerGroup: 4, spaceBetween: 30 }, }), i) ), new Swiper('.suggested-items-shelf', { loop: !1, slidesPerView: 2, slidesPerGroup: 2, observer: !0, spaceBetween: 10, autoplay: { delay: 6e3 }, navigation: { nextEl: '.next-vitrine', prevEl: '.prev-vitrine' }, scrollbar: { el: '.scrollbar-vitrine' }, breakpoints: { 640: { slidesPerView: 3, slidesPerGroup: 2, spaceBetween: 10 }, 768: { slidesPerView: 3 == e, slidesPerGroup: 2 == e, spaceBetween: 4 == e ? 10 : 20, }, 1024: { slidesPerView: 5 == e, slidesPerGroup: 5 == e, spaceBetween: 20, }, }, }), getOrderForm(), ((t = jQuery).fn.CalypsoInit = function () { t('body').on('click', '.open-sidebar-modal', function (e) { openSidebarModal(t(e.currentTarget).attr('data-sidebar-open')) }), t('body').on('click', '.close-sidebar-modal', function (e) { closeSidebarModal(t(e.currentTarget).attr('data-sidebar-close')) }), t('.open-modal').click(function (e) { openModal(t(e.currentTarget).attr('data-modal-open')) }), t('.close-modal').click(function (e) { closeModal(t(e.currentTarget).attr('data-modal-close')) }), t('input[name="birthday"]').datepicker({ format: 'mm/dd/yyyy', language: 'es', endDate: new Date(new Date().setDate(new Date().getDate() + 5)), }) }), $.fn.CalypsoInit && $(document).CalypsoInit() try { localStorage.getItem('popupCity') || localStorage.setItem('popupCity', ''), '' !== localStorage.getItem('popupCity') && ($('.locate-name').text( localStorage.getItem('popupCity') || getCookie('popupCity') ), $('.location-user span').text( localStorage.getItem('popupCity') || getCookie('popupCity') )) } catch (e) {} $('.save-city').click(function () { console.log('click save city') var e, i = PopupAddressViewModel.departamentSelected().name null != i && ((i = i.normalize('NFD').replace(/[\u0300-\u036f]/g, '')), localStorage.setItem('popupCity', i), $('.locate-name').text( localStorage.getItem('popupCity') || getCookie('popupCity') ), $('.location-user span').text( localStorage.getItem('popupCity') || getCookie('popupCity') ), (e = new Date()).setFullYear(e.getFullYear() + 1), (document.cookie = 'popupCity=' + i + '; expires=Thu, 18 Dec 2030 12:00:00 UTC; path=/'), closeModal('popup-section')) }), setTimeout(function () { $('#vtexIdUI-auth-selector .vtexIdUI-heading').append( "" ), new URL(window.location.href).searchParams.get('isB2B') && ($('#vtexIdUI-auth-selector .vtexIdUI-providers-list').prepend( '