1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[72552],{552(t,e,r){r.r(e),r.d(e,{default:()=>d});var o=r(220),i=r(927);class d extends o.A{init(){"undefined"!=typeof gtmIsTrackingAddToWishlistClicks&&!0===gtmIsTrackingAddToWishlistClicks&&this._registerEvents()}_registerEvents(){this.el.addEventListener("Wishlist/onProductAdded",this._onAddToWishlistClicked.bind(this))}_onAddToWishlistClicked(t){try{let e=this._getProduct(t.detail);delete e.index,window.dataLayer.push({event:"add_to_wishlist",ecommerce:{items:[e]}})}catch(t){console.info(t)}}_getProduct(t){return i.A.getProductNoFromProductId(t.productId)}}},795(t,e,r){r.d(e,{A:()=>i});var o=r(707);class i{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!i.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===i.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],d=e.replace(/^data(|-)/,""),n=o.A.toLowerCamelCase(d,"-");if(!i.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let s=t.dataset[n];if(void 0===s){if(r)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return s}return o.A.parsePrimitive(s)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let o=t.querySelector(e)||!1;if(r&&!1===o)throw Error(`The required element "${e}" does not exist in parent node!`);return o}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!i.isNode(t))throw Error("The parent node is not a valid HTML Node!");let o=t.querySelectorAll(e);if(0===o.length&&(o=!1),r&&!1===o)throw Error(`At least one item of "${e}" must exist in parent node!`);return o}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]), 7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},927(t,e,r){r.d(e,{A:()=>d});var o=r(795),i=r(948);class d{static getProductNoFromProductBox(t){let e=t.closest(".product-box");return o.A.querySelector(e,'[name="sku"]').value}static getProductNoFromProductId(t){let e=[...document.querySelectorAll("[data-add-to-wishlist-options]")].find(e=>JSON.parse(e.dataset.addToWishlistOptions).productId===t),r=JSON.parse(e.getAttribute("data-add-to-wishlist-options")).productsku;if(null===e.closest(".offcanvas-cart"))return i.A.getProductFromImpressions(r);{let t=window.dataLayer.findLast(t=>"view_cart"===t.event).ecommerce.items;if(null===t||0===t.length){console.info("no items found in dataLayer");return}return i.A.getProductFromItems(t,r)}}}}}]);
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.