{"version":3,"file":"zoomv.3633.min.js?t=b257fbe8bc159cd4a041","mappings":"wzBAqCA,QArCuB,WASpB,O,EARD,SAAAA,EAAYC,GAAI,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACdI,KAAKH,GAAKA,EACVG,KAAKC,OAAS,CACZC,mBAAoBL,EAAGM,iBAAiB,yBAE1CH,KAAKI,cACLJ,KAAKK,cACLC,OAAOC,iBAAiB,UAAU,kBAAMT,EAAKO,aAAa,GAC5D,G,EAAC,EAAAG,IAAA,cAAAC,MAED,WACqBT,KAAKH,GAAGM,iBAAiB,uDACjCO,SAAQ,SAASC,GAC1B,IAAMC,EAAaC,WAAWC,iBAAiBH,GAAQC,YACjDG,EAASF,WAAWC,iBAAiBH,GAAQI,QACnDJ,EAAOK,UAAUC,OAAO,iCAAkC,kCACtDF,EAASH,EACXD,EAAOK,UAAUE,IAAI,kCAErBP,EAAOK,UAAUE,IAAI,iCAEzB,GACF,GAAC,CAAAV,IAAA,cAAAC,MAED,WACiCT,KAAKC,OAA5BC,mBACWQ,SAAQ,SAACS,GACZA,EAAKC,cAAc,8BAG/BD,EAAKH,UAAUE,IAAI,gCAEvB,GACF,M,6EAAC,CAlCoB,E","sources":["webpack://@hero-digital/zoom/./src/components/components/ProductCategories/ProductCategories.js"],"sourcesContent":["class ProductCategories {\r\n constructor(el) {\r\n this.el = el\r\n this.domMap = {\r\n $megamenuListItems: el.querySelectorAll('.megamenu__list-item'),\r\n } \r\n this.detectIcons()\r\n this.uiObjective()\r\n window.addEventListener('resize', () => this.uiObjective());\r\n }\r\n\r\n uiObjective() { \r\n const $isAnchors = this.el.querySelectorAll('.allProducts-wrapper .megamenu__list-item-heading a')\r\n $isAnchors.forEach(function(anchor) {\r\n const lineHeight = parseFloat(getComputedStyle(anchor).lineHeight);\r\n const height = parseFloat(getComputedStyle(anchor).height);\r\n anchor.classList.remove(\"megamenu__list-item-heading-l1\", \"megamenu__list-item-heading-l2\");\r\n if (height > lineHeight) {\r\n anchor.classList.add('megamenu__list-item-heading-l2');\r\n } else {\r\n anchor.classList.add('megamenu__list-item-heading-l1');\r\n }\r\n });\r\n }\r\n\r\n detectIcons() {\r\n const { $megamenuListItems } = this.domMap\r\n $megamenuListItems.forEach((item) => {\r\n const $icon = item.querySelector('.megamenu__list-item-icon')\r\n\r\n if ($icon) {\r\n item.classList.add('megamenu__list-item--has-icon')\r\n }\r\n })\r\n }\r\n }\r\n\r\nexport default ProductCategories\r\n"],"names":["ProductCategories","el","_this","_classCallCheck","this","domMap","$megamenuListItems","querySelectorAll","detectIcons","uiObjective","window","addEventListener","key","value","forEach","anchor","lineHeight","parseFloat","getComputedStyle","height","classList","remove","add","item","querySelector"],"sourceRoot":""}