PageSourceSearch

https://www.maybelline.com.ar/frontend/master/js/copy-card-carousel.dee876ac.js

js maybelline.com.ar collected 2026-10-05 17:53:24 UTC 4,417 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkwsf_master_mny"]=self["webpackChunkwsf_master_mny"]||[]).push([[462],{1978:function(t,e,s){s.r(e),s.d(e,{default:function(){return C}});var i=s(5906),r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"copy-card-carousel",class:{"disable-carousel":!t.isShowCarousel},attrs:{"data-qa":"copy-card-carousel"}},[t._t("title"),t._v(" "),e("div",{ref:"cardsWrapper",staticClass:"copy-card-slides",class:{"center-items":t.isCenteredItems}},[t._t("slides")],2),t._v(" "),t.cardsAmount>1&&!t.isCenteredItems?e("div",{staticClass:"copy-card-carousel-nav_wrapper"},[t.activeCard>0?e("button",{staticClass:"copy-card-carousel-nav prev",on:{click:t.goPrev}},[e("svg",{staticClass:"icon icon--arrow",attrs:{"aria-label":t.navPrevAltText,role:"img"}},[e("use",{attrs:{"xlink:href":"#icon-chevron",href:"#icon-chevron"}})])]):t._e(),t._v(" "),t.isCenteredItems?t._e():e("div",{staticClass:"copy-card-carousel__pagination per_view_3_2_1"},[e("pagination",{attrs:{"pagination-items":t.cardsAmount,"current-page":t.activeCard,"is-paused":!1,"is-animation-enabled":!1,"go-to-slide-aria-label":t.goToSlideAriaLabel},on:{selectPagination:t.scrollToSlide,isPausedCarousel:()=>null}})],1),t._v(" "),t.isNextDisabled?t._e():e("button",{staticClass:"copy-card-carousel-nav next",on:{click:t.goNext}},[e("svg",{staticClass:"icon icon--arrow",attrs:{"aria-label":t.navNextAltText,role:"img"}},[e("use",{attrs:{"xlink:href":"#icon-chevron",href:"#icon-chevron"}})])])]):t._e()],2)},a=[],o=s(7061);const n=".copy-card-carousel",c=".copy-card",d=`${c}.active`;var l={name:"CopyCardCarousel",components:{Pagination:o.A},props:{goToSlideAriaLabel:{type:String,default:""},navPrevAltText:{type:String,default:""},navNextAltText:{type:String,default:""}},data(){return{activeCard:0,cardsAmount:0,windowWidth:window.innerWidth}},computed:{scrollInterval(){return this.windowWidth>1100?3:this.windowWidth<568?1:2},isNextDisabled(){return this.activeCard+this.scrollInterval>=this.cardsAmount},isShowCarousel(){return this.cardsAmount>3},isCenteredItems(){return this.windowWidth>1100?this.cardsAmount<=3:this.windowWidth<=1100&&this.windowWidth>568&&this.cardsAmount<=2}},watch:{activeCard(){this.setActive()},windowWidth(t,e){t>e&&t>1100&&this.resetScroll()}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.getCardAmount(),this.setActive(),this.swipeDetection()},500)},beforeDestroy(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.windowWidth=window.innerWidth,this.getCardAmount()},getCardAmount(){this.cardsAmount=this.$refs.cardsWrapper.querySelectorAll(c).length},scrollToSlide(t){this.activeCard=t,this.setActive()},setActive(){const t=document.body.classList.contains("rtl"),e=this.$refs.cardsWrapper.querySelector(c),s=parseInt(window.getComputedStyle(e).width)+parseInt(window.getComputedStyle(e).marginRight)+parseInt(window.getComputedStyle(e).marginLeft);this.$refs.cardsWrapper.style.transform=`translateX(${t?"":"-"}${this.activeCard*s}px)`,this.addActiveCardClass()},resetScroll(){this.$refs.cardsWrapper.style.transform="translateX(0)",this.activeCard=0},addActiveCardClass(){const t=this.$refs.cardsWrapper.querySelector(d);t?.classList.remove("active"),t?.removeAttribute("aria-current");const e=Array.from(this.$refs.cardsWrapper.querySelectorAll(c)).filter((t,e)=>e===this.activeCard)[0];e?.classList.add("active"),e?.setAttribute("aria-current",!0)},goNext(){const t=this.isShowCarousel&&Boolean(window.innerWidth>968)&&this.cardsAmount>3?this.cardsAmount-2:this.cardsAmount-1;this.activeCard<t?this.activeCard=this.activeCard+this.scrollInterval:this.activeCard=0,this.setActive()},goPrev(){this.activeCard>0&&(this.activeCard=this.activeCard-this.scrollInterval),this.setActive()},swipeDetection(){this.touchstartX=0,this.touchendX=0;const t=this.$refs.cardsWrapper.closest(n);t.addEventListener("touchstart",t=>{this.touchstartX=t.changedTouches[0].screenX},{passive:!0}),t.addEventListener("touchend",t=>{this.touchendX=t.changedTouches[0].screenX,this.handleGesture()},{passive:!0})},handleGesture(){const t=document.body.classList.contains("rtl"),e=Math.abs(this.touchendX-this.touchstartX),s=e>30,i=t?this.touchendX>this.touchstartX:this.touchendX<this.touchstartX;s&&(i?this.goNext():i||this.goPrev())}}},h=l,u=s(1656),v=(0,u.A)(h,r,a,!1,null,null,null),p=v.exports,C=(0,i.fC)({components:{CopyCardCarousel:p}})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.