{"version":3,"file":"/scripts/lead-video.js","mappings":"iIAAMA,EAAAA,WACF,cAAc,eACVC,KAAA,SACAA,KAAA,eACAA,KAAA,c,2CAGJ,c,yBAEA,WACI,IAAIC,EAAUC,SAAAA,eAAd,iBACIC,EAAWD,SAAAA,eAAf,oBACA,UAAGC,EACC,OAAO,EACX,IAAIC,EAAWD,EAAAA,aAAf,YACAF,EAAAA,iBAAAA,cAAuC,WAC/BA,EAAAA,YAAJ,IACIA,EAAAA,OACAE,EAAAA,UAAAA,OAAAA,cAGRA,EAAAA,iBAAAA,SACA,WACQF,EAAJ,QACIA,EAAAA,OACAE,EAAAA,UAAqB,eAArBA,6DAEAF,EAAAA,QACAE,EAAAA,UAAqB,eAArBA,+D,0BAKZ,WACIE,YAAW,WACP,IAAIC,EAAMJ,SAAAA,cAAV,6CAEA,GAAIK,EAAAA,6CAAAA,OAAJ,EAA+D,CAC3D,IAAIC,EAAYF,EAAhB,aACaJ,SAAAA,cAF8C,SAG3DO,MAAAA,YAAAA,cAAsCD,EAAtCC,SANRJ,O,oBAWJ,WACIL,KAAA,mB,EA9CFD,GAmDN,IAAIA,G,iBCnDJW,EAAOC,QAAUC,OAAe,S","sources":["webpack://sage/./resources/scripts/modules/lead-video.js","webpack://sage/external window \"jQuery\""],"sourcesContent":["class leadVideo {\n constructor() {\n this.events();\n this.changeHeight();\n this.videoLoaded();\n }\n\n resizeEvents() {}\n\n videoLoaded() {\n var myVideo = document.getElementById('js-hero-video');\n var ppbutton = document.getElementById('js-trigger-video');\n if(ppbutton===null)\n return false;\n var basePath = ppbutton.getAttribute('data-url');\n myVideo.addEventListener('loadeddata', function(){\n if( myVideo.readyState >= 2 ){\n myVideo.play();\n ppbutton.classList.remove('d-none');\n }\n });\n ppbutton.addEventListener('click', playPause);\n function playPause() {\n if (myVideo.paused) {\n myVideo.play();\n ppbutton.innerHTML = '
';\n } else {\n myVideo.pause();\n ppbutton.innerHTML = '
';\n }\n }\n }\n\n changeHeight() {\n setTimeout(function(){\n let box = document.querySelector('.icn-description .icn-description-wrapper');\n \n if ($('.icn-description .icn-description-wrapper').length > 0) {\n let desHeight = box.offsetHeight;\n const root = document.querySelector(':root'); //grabbing the root element\n root.style.setProperty('--icoheight', desHeight + 'px');\n }\n }, 200);\n }\n\n events() {\n this.resizeEvents();\n }\n}\n\nexport default leadVideo;\nnew leadVideo();\n","module.exports = window[\"jQuery\"];"],"names":["leadVideo","this","myVideo","document","ppbutton","basePath","setTimeout","box","$","desHeight","root","module","exports","window"],"sourceRoot":""}