{"version":3,"sources":["webpack:///./src/js/modules/featured-cards-row.js"],"names":["Module","Component","setupDefaults","this","dom","$titleContainers","el","querySelectorAll","setupTitlesHeight","addListeners","window","addEventListener","bind","getAllContainersHeight","Array","from","map","titleContainer","offsetHeight","cleanHeight","title","hasAttribute","setAttribute","containersHeight","maxHeight","sort","length","style","minHeight"],"mappings":"2FAAA,kBAEA,MAAMA,UAAeC,YACnBC,gBACEC,KAAKC,IAAM,CACTC,iBAAkBF,KAAKG,GAAGC,iBAAiB,0BAE7CJ,KAAKK,oBAGPC,eACEC,OAAOC,iBAAiB,SAAUR,KAAKK,kBAAkBI,KAAKT,OAGhEU,yBAIE,OAHyBC,MAAMC,KAAKZ,KAAKC,IAAIC,kBAAkBW,IAC5DC,GAAmBA,EAAeC,cAKvCC,cACEL,MAAMC,KAAKZ,KAAKC,IAAIC,kBAAkBW,IAAKI,IACrCA,EAAMC,aAAa,UACrBD,EAAME,aAAa,QAAS,MAKlCd,oBACEL,KAAKgB,cACL,MAAMI,EAAmBpB,KAAKU,yBACxBW,EAAYD,EAAiBE,OAAOF,EAAiBG,OAAS,GAEpEZ,MAAMC,KAAKZ,KAAKC,IAAIC,kBAAkBW,IAAKI,IACzCA,EAAMO,MAAMC,UAAeJ,EAAF,QAKhBxB","file":"92.bundle.js","sourcesContent":["import { Component } from '@verndale/core'\n\nclass Module extends Component {\n  setupDefaults() {\n    this.dom = {\n      $titleContainers: this.el.querySelectorAll('.featured-card__title')\n    }\n    this.setupTitlesHeight()\n  }\n\n  addListeners() {\n    window.addEventListener('resize', this.setupTitlesHeight.bind(this))\n  }\n\n  getAllContainersHeight() {\n    const containersHeight = Array.from(this.dom.$titleContainers).map(\n      (titleContainer) => titleContainer.offsetHeight\n    )\n    return containersHeight\n  }\n\n  cleanHeight(){\n    Array.from(this.dom.$titleContainers).map((title) => {\n      if (title.hasAttribute('style')) {\n        title.setAttribute('style', '')\n      }\n    })\n  }\n\n  setupTitlesHeight() {\n    this.cleanHeight();\n    const containersHeight = this.getAllContainersHeight();\n    const maxHeight = containersHeight.sort()[containersHeight.length - 1]\n\n    Array.from(this.dom.$titleContainers).map((title) => {\n      title.style.minHeight = `${maxHeight}px`\n    })\n  }\n}\n\nexport default Module\n"],"sourceRoot":""}