1"use strict";(self["webpackChunkwsf_master_mny"]=self["webpackChunkwsf_master_mny"]||[]).push([[1744],{3439:function(t,e,i){i.r(e),i.d(e,{default:function(){return m}});var s=i(2895),o=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:!t.hideStickyButton,expression:"!hideStickyButton"}],staticClass:"pdp-sticky-button",attrs:{"data-qa":"pdp-sticky-button"}},[e("div",{staticClass:"pdp-sticky-content"},[t.isDisplayImgSlot?t._t("product-image"):e("img",{staticClass:"pdp-sticky-button-image",attrs:{src:t.imgSrc,alt:""}}),t._v(" "),t._t("product-name")],2),t._v(" "),e("button",{staticClass:"pdp-sticky-cta",on:{click:t.onCtaClick}},[e("span",{staticClass:"pdp-sticky-cta-label"},[t._v("\n "+t._s(t.ctaLabel)+"\n ")])])])},a=[],n=i(4017),c=i(2954),r={name:"PdpStickyButton",props:{ctaLabel:{type:String,default:"buy now"},productType:{type:String,default:"[product type]"},taggingData:{type:Object,default:()=>({})},hideSticky:{type:Boolean,default:!1}},data(){return{imgSrc:null,displayProductName:"",isDisplayImgSlot:!0,isDisplayProductNameSlot:!0,productName:"",productEAN:"",hideStickyButton:!1}},mounted(){window.addEventListener("resize",this.onResize),n.B.$on("pdpImageUpdated",this.updateImage),n.B.$on("sendStickyButtonData",this.setProductData),n.B.$on("pdpShadeChangeNm",t=>this.onShadeChange(t)),this.onResize(),this.hideStickyButton=this.hideSticky},beforeDestroy(){window.removeEventListener("resize",this.onResize)},methods:{setProductData(t){const{productReferenceName:e,variantEAN:i,displayName:s}=t;i&&(this.productEAN=i.toLowerCase()),e&&(this.productName=e.toLowerCase()),s&&(this.displayProductName=s,this.isDisplayProductNameSlot=!1)},onResize(){window.innerWidth<568&&this.addMenuScrollBehavior()},isVisibleInViewport(t){if(!t)return!1;const{bottom:e}=t.getBoundingClientRect();return e>60},addMenuScrollBehavior(){let t,e,i=!1;const s=document.querySelector(".pdp-sticky-button"),o=document.querySelector(".commerce-cta"),a=document.querySelector(".rfp-mctb-common-buynow"),n=document.querySelector(".product-col__right")?.offsetHeight||1e3,c=()=>{const e=window.scrollY;t=this.isVisibleInViewport(o)||this.isVisibleInViewport(a),!t&&e+window.innerHeight>n?s.classList.add("visible"):s.classList.remove("visible")};window.onscroll=()=>{i||(i=!0,clearTimeout(e),c(),setTimeout(()=>{i=!1},100),e=setTimeout(()=>{c()},200))}},onCtaClick(){n.B.$emit("pdpStickyCtaClick"),n.B.$emit("rfp-auto-popup-open-buynow-true"),n.B.$emit("pdpStickyMikmak"),this.sendTagging()},updateImage(t){if(!t)return!1;this.imgSrc=t,this.isDisplayImgSlot=!1},sendTagging(){const t={...this.taggingData};this.productName&&this.productEAN&&(t.eventLabel=`${this.productName}::${this.productEAN}`,t.product_info=`${this.productName}::${this.productEAN}`),c.Xj.pushDataLayer(t)},onShadeChange(t){let e=t.nmEnabled,i=t.disabledEnabled;this.hideStickyButton="true"==e||"true"==i}}},d=r,u=i(1656),p=(0,u.A)(d,o,a,!1,null,null,null),l=p.exports,m=(0,s.fC)({components:{PdpStickyButton:l}})}}]);
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.