1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8441],{441:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});var r=s(568),o=s(49),c=s(206),i=s(971);class l extends r.Z{init(){"undefined"!=typeof gtmIsTrackingProductClicks&&!0===gtmIsTrackingProductClicks&&this._registerEvents()}_registerEvents(){let t=this;this.el.addEventListener("click",e=>{t.onProductClicked(e)})}onProductClicked(t){if(!this.el.dataset.hasOwnProperty("addToWishlist")||!this.el.dataset.addToWishlist){o.Z.hasAttribute(this.el,"href")&&t.preventDefault();try{let t=this._getProduct();window.dataLayer.push({event:"select_item",ecommerce:{items:[t]}})}catch(t){console.info(t)}if(this._shouldRedirect(t)){let e=t.shiftKey||t.ctrlKey||t.metaKey||1===t.button,s=o.Z.getAttribute(this.el,"href");setTimeout(()=>{e?window.open(s,"_blank"):document.location=s},100)}}}_getProduct(){let t=i.Z.getProductNoFromProductBox(this.el);return c.Z.getProductFromImpressions(t)}_shouldRedirect(t){let e=!1;o.Z.hasAttribute(this.el,"href")&&(e=!0),t.target.classList.contains("btn-buy")&&(e=!1);let s='[data-swag-cms-extensions-quickview="true"]';return(null!==this.el.closest(".cms-section")&&null!==this.el.closest(".cms-section").querySelector(s)||document.body.classList.contains("is-ctl-search")&&null!==this.el.closest(".container-main")&&null!==this.el.closest(".container-main").querySelector(s))&&(e=!1),e}}},971:(t,e,s)=>{s.d(e,{Z:()=>o});var r=s(49);class o{static getProductNoFromProductDetail(){return r.Z.querySelector(document,'[itemprop="sku"]').innerText}static getProductNoFromProductBox(t){let e=t.closest(".product-box");return r.Z.querySelector(e,'[name="sku"]').value}static getProductNoFromProductId(t){let e=r.Z.querySelector(document,".cms-element-product-listing",!1);if(!e)return null;let s=r.Z.querySelector(e,'input[type="hidden"][name="product-id"][value="'.concat(t,'"]'),!1),o=null==s?void 0:s.closest(".product-info");return this.getProductNoFromProductBox(o)}}}}]);
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.