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CtB,EAAYoB,gBAAgB,UAC5BnB,EAAakB,aAAa,SAAU,GACtC,GAAC,CAAAX,IAAA,OAAAC,MAED,WACE,IAAAc,EAAsC7B,KAAKC,OAAnCC,EAAgB2B,EAAhB3B,iBAAkBE,EAAOyB,EAAPzB,QAC1B0B,EAA4B9B,KAAKQ,OAAzBC,EAAMqB,EAANrB,OAAQC,EAAOoB,EAAPpB,QAEZW,OAAOU,YAAc/B,KAAKW,iBAC5BT,EAAiB8B,MAAMC,MAAQ,GAAHC,OAAMxB,EAAUN,EAAQ+B,OAAM,MAC1DjC,EAAiBqB,UAAUC,IAAI,qCAE/BtB,EAAiB8B,MAAMC,MAAQ,GAAHC,OAAMzB,EAASL,EAAQ+B,OAAM,MACzDjC,EAAiBqB,UAAUC,IAAI,mCAEnC,M,6EAAC,CApDY,E","sources":["webpack://@hero-digital/zoom/./src/components/foundation/LogoSlide/LogoSlide.js"],"sourcesContent":["// LogoSlide Component\r\nclass LogoSlide {\r\n constructor(el) {\r\n this.el = el\r\n this.domMap = {\r\n $slidesContainer: this.el.querySelector('.fdn-logo-slide__slides'),\r\n $slides: this.el.querySelectorAll('.fdn-logo-slide__slide'),\r\n $playButton: this.el.querySelector('.fdn-logo-slide__control--play'),\r\n $pauseButton: this.el.querySelector('.fdn-logo-slide__control--pause')\r\n }\r\n this.widths = {\r\n mobile: 184,\r\n desktop: 286\r\n }\r\n this.largeBreakpoint = 1025\r\n this.init()\r\n this.addListeners()\r\n }\r\n\r\n addListeners() {\r\n const { $playButton, $pauseButton, $slidesContainer } = this.domMap\r\n $playButton.addEventListener('click', this.play.bind(this))\r\n $pauseButton.addEventListener('click', this.pause.bind(this))\r\n $slidesContainer.addEventListener('mouseover', this.pause.bind(this))\r\n $slidesContainer.addEventListener('mouseout', this.play.bind(this))\r\n window.addEventListener('resize', this.init.bind(this))\r\n }\r\n\r\n play() {\r\n const { $slidesContainer, $playButton, $pauseButton } = this.domMap\r\n $slidesContainer.classList.add('fdn-logo-slide__slides--playing')\r\n $playButton.setAttribute('hidden', '')\r\n $pauseButton.removeAttribute('hidden')\r\n }\r\n\r\n pause() {\r\n const { $slidesContainer, $playButton, $pauseButton } = this.domMap\r\n $slidesContainer.classList.remove('fdn-logo-slide__slides--playing')\r\n $playButton.removeAttribute('hidden')\r\n $pauseButton.setAttribute('hidden', '')\r\n }\r\n\r\n init() {\r\n const { $slidesContainer, $slides } = this.domMap\r\n const { mobile, desktop } = this.widths\r\n\r\n if (window.innerWidth >= this.largeBreakpoint) {\r\n $slidesContainer.style.width = `${desktop * $slides.length}px`\r\n $slidesContainer.classList.add('fdn-logo-slide__slides--playing')\r\n } else {\r\n $slidesContainer.style.width = `${mobile * $slides.length}px`\r\n $slidesContainer.classList.add('fdn-logo-slide__slides--playing')\r\n }\r\n }\r\n}\r\n\r\nexport default LogoSlide\r\n"],"names":["LogoSlide","el","_classCallCheck","this","domMap","$slidesContainer","querySelector","$slides","querySelectorAll","$playButton","$pauseButton","widths","mobile","desktop","largeBreakpoint","init","addListeners","key","value","_this$domMap","addEventListener","play","bind","pause","window","_this$domMap2","classList","add","setAttribute","removeAttribute","_this$domMap3","remove","_this$domMap4","_this$widths","innerWidth","style","width","concat","length"],"sourceRoot":""}