{"version":3,"sources":["webpack:///./src/js/modules/section-hero.js"],"names":["SectionHero","this","dom","image","el","querySelector","setBackground","addEventListener","imageUrl","currentSrc","src","style","backgroundImage","Component"],"mappings":"8jDAEMA,E,sWACJ,WACEC,KAAKC,IAAM,CACTC,MAAOF,KAAKG,GAAGC,cAAc,yBAE/BJ,KAAKK,kB,0BAGP,WACML,KAAKC,IAAIC,OACXF,KAAKC,IAAIC,MAAMI,iBAAiB,OAAUN,KAAKK,cAA/C,KAA0CL,S,2BAI9C,WACE,IAAMO,EAAWP,KAAKC,IAAIC,MAAMM,YAAcR,KAAKC,IAAIC,MAAMO,IAC7DT,KAAKC,IAAIC,MAAMQ,MAAMC,gBAArB,eAA+CJ,EAA/C,W,8BAhBsBK,aAoBXb","file":"37.7d84dc428b256bc0547d.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass SectionHero extends Component {\n setupDefaults() {\n this.dom = {\n image: this.el.querySelector('.section-hero__image')\n };\n this.setBackground();\n }\n\n addListeners() {\n if (this.dom.image) {\n this.dom.image.addEventListener('load', ::this.setBackground);\n }\n }\n\n setBackground() {\n const imageUrl = this.dom.image.currentSrc || this.dom.image.src;\n this.dom.image.style.backgroundImage = `url(\"${imageUrl}\")`;\n }\n}\n\nexport default SectionHero;\n"],"sourceRoot":""}