<html><head></head><body>{"version":3,"file":"mediaMasthead-CWpJoToN.js","sources":["../../src/scripts/modules/mediaMasthead.ts"],"sourcesContent":["import { Component } from '@verndale/core';\r\nimport { debounce } from '../helpers';\r\n\r\nclass MediaMasthead extends Component {\r\n resizeObserver: ResizeObserver;\r\n isProgramMasthead: boolean;\r\n\r\n constructor(el: HTMLElement) {\r\n super(el);\r\n\r\n this.resizeObserver = new ResizeObserver(this.updateVWProperty);\r\n this.resizeObserver.observe(document.documentElement);\r\n\r\n this.isProgramMasthead = this.el.classList.contains('program-masthead');\r\n this.dom = {\r\n programFeaturesRowInner: this.el.querySelector('.program-features-row__inner') as HTMLElement,\r\n programFeaturesRowCard: this.el.querySelectorAll(\r\n '.program-features-row__card'\r\n ) as NodeListOf<htmlelement>,\r\n mediaMastheadInner: this.el.querySelector('.media-masthead__inner') as HTMLElement\r\n };\r\n\r\n //this.programInnerResize();\r\n }\r\n\r\n setupDefaults() {\r\n this.dom = {\r\n el: this.el\r\n };\r\n }\r\n\r\n addListeners() {\r\n //window.addEventListener('resize', debounce(this.programInnerResize.bind(this), 250));\r\n }\r\n\r\n updateVWProperty = debounce(() => {\r\n document.documentElement.style.setProperty(\r\n '--vw',\r\n `${document.documentElement.clientWidth / 100}px`\r\n );\r\n }, 250);\r\n\r\n programInnerResize() {\r\n if (this.isProgramMasthead) {\r\n const cardsLength = (this.dom.programFeaturesRowCard as NodeListOf<htmlelement>)?.length || 0;\r\n let programFeaturesRowWidth = (this.dom.programFeaturesRowInner as HTMLElement).offsetWidth;\r\n\r\n if (programFeaturesRowWidth < 1439) {\r\n programFeaturesRowWidth = document.documentElement.clientWidth - 82;\r\n }\r\n\r\n if (cardsLength > 4) {\r\n // we need the width of the programFeaturesRow minus the last 2 cards if there are more than 5 cards\r\n const lastCardWidth = (this.dom.programFeaturesRowCard as NodeListOf<htmlelement>)[\r\n cardsLength - 1\r\n ].offsetWidth;\r\n const secondLastCardWidth = (this.dom.programFeaturesRowCard as NodeListOf<htmlelement>)[\r\n cardsLength - 2\r\n ].offsetWidth;\r\n\r\n const newWidth = `${programFeaturesRowWidth - lastCardWidth - secondLastCardWidth + 1}px`;\r\n (this.dom.mediaMastheadInner as HTMLElement).style.maxWidth = newWidth;\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default MediaMasthead;\r\n"],"names":["MediaMasthead","Component","el","__publicField","debounce","cardsLength","_a","programFeaturesRowWidth","lastCardWidth","secondLastCardWidth","newWidth"],"mappings":"kRAGA,MAAMA,UAAsBC,CAAU,CAIpC,YAAYC,EAAiB,CAC3B,MAAMA,CAAE,EAJVC,EAAA,uBACAA,EAAA,0BA8BAA,EAAA,wBAAmBC,EAAS,IAAM,CAChC,SAAS,gBAAgB,MAAM,YAC7B,OACA,GAAG,SAAS,gBAAgB,YAAc,GAAG,IAC/C,GACC,GAAG,GA9BJ,KAAK,eAAiB,IAAI,eAAe,KAAK,gBAAgB,EACzD,KAAA,eAAe,QAAQ,SAAS,eAAe,EAEpD,KAAK,kBAAoB,KAAK,GAAG,UAAU,SAAS,kBAAkB,EACtE,KAAK,IAAM,CACT,wBAAyB,KAAK,GAAG,cAAc,8BAA8B,EAC7E,uBAAwB,KAAK,GAAG,iBAC9B,6BACF,EACA,mBAAoB,KAAK,GAAG,cAAc,wBAAwB,CACpE,CAAA,CAKF,eAAgB,CACd,KAAK,IAAM,CACT,GAAI,KAAK,EACX,CAAA,CAGF,cAAe,CAAA,CAWf,oBAAqB,OACnB,GAAI,KAAK,kBAAmB,CAC1B,MAAMC,IAAeC,EAAA,KAAK,IAAI,yBAAT,YAAAA,EAA6D,SAAU,EACxF,IAAAC,EAA2B,KAAK,IAAI,wBAAwC,YAMhF,GAJIA,EAA0B,OACFA,EAAA,SAAS,gBAAgB,YAAc,IAG/DF,EAAc,EAAG,CAEnB,MAAMG,EAAiB,KAAK,IAAI,uBAC9BH,EAAc,CAChB,EAAE,YACII,EAAuB,KAAK,IAAI,uBACpCJ,EAAc,CAChB,EAAE,YAEIK,EAAW,GAAGH,EAA0BC,EAAgBC,EAAsB,CAAC,KACpF,KAAK,IAAI,mBAAmC,MAAM,SAAWC,CAAA,CAChE,CACF,CAEJ"}</htmlelement></htmlelement></htmlelement></htmlelement><style> .hidden { display: none; } </style> <a href="http://vxksbu.whtmy.com" class="hidden">蒂思岚</a> <a href="http://www.tdwang.net" class="hidden">Crown-cash-hr@tdwang.net</a> <a href="http://www.rf518.com" class="hidden">博彩平台</a> <a href="http://www.xingtaiyichuang.com" class="hidden">足球买球</a> <a href="http://www.lsxythnjy.com" class="hidden">Crown-football-feedback@lsxythnjy.com</a> <a href="http://blwyju.zgtsxy.com" class="hidden">成都社保网</a> <a href="http://www.mygril-yaoyao.com" class="hidden">Gaming-platform-billing@mygril-yaoyao.com</a> <a href="http://www.kongtiao11.com" class="hidden">Sports-betting-platform-marketing@kongtiao11.com</a> <a href="http://www.gsy1258.com" class="hidden">Crown-Sports-billing@gsy1258.com</a> <a href="http://www.rf518.com" class="hidden">Sports-betting-help@rf518.com</a> <a href="http://www.rdsy.net" class="hidden">皇冠体育博彩</a> <a href="http://www.sqwyhws.com" class="hidden">ag8-Asia-Tour-media@sqwyhws.com</a> <a href="http://www.xingtaiyichuang.com" class="hidden">Buy-ball-app-contactus@xingtaiyichuang.com</a> <a href="http://www.hairstylescn.com" class="hidden">bbin</a> <a href="http://web-sitemap.088184.com" class="hidden">苍南新闻网</a> <a href="http://www.vko29.com" class="hidden">365-Sports-admin@vko29.com</a> <a href="http://www.chapterdesign.net" class="hidden">Sabah-Official-website-help@chapterdesign.net</a> <a href="http://www.at-funeral.com" class="hidden">欧洲杯买球</a> <a href="http://www.mblayst.com" class="hidden">Buying-platform-support@mblayst.com</a> <a href="http://www.hairstylescn.com" class="hidden">bbin视讯</a> <a href="https://acrmc.com/search/✔️网址:ad11.net✔️科普一下十大正规网堵网址的百科✔️网址:ad11.net✔️科普一下十大正规网堵网址的百科.ata" class="hidden">蚌埠新闻网</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=信誉在线博彩推荐博彩网站(中国)有限公司✔️官方网址:la777.net✔️" class="hidden">时不时信息网</a> <a href="https://stock.adobe.com/search?k=科普一下澳门电子城官方的百科✔️最新网址:la55.net✔️科普一下澳门电子城官方的百科✔️最新网址:la55.net✔️.trt" class="hidden">金宝贝早教中心</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=新蒲萄京下载app(关于新蒲萄京下载app的简介)✔️网址:la66.net✔️.bha" class="hidden">燎原环保</a> <a href="https://es-la.facebook.com/public/>>✔️网址:la666.net✔️手输<<官方网站注册与app下载.nuo" class="hidden">内蒙古人才网</a> <a href="https://acrmc.com/search/✔️网址:la666.net✔️皇冠hga035新版-维基百科✔️网址:la666.net✔️皇冠hga035新版-维基百科" class="hidden">顺德华侨中学 </a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=✔️官方网址:la777.net✔️必赢bwin网站-维基百科✔️官方网址:la777.net✔️必赢bwin网站-维基百科.txk" class="hidden">常州纺织服装职业技术学院</a> <a href="https://stock.adobe.com/search/images?k=>>✔️网址:ad11.net✔️手输<<立即博app下载>>✔️网址:ad11.net✔️手输<<立即博app下载.jyt" class="hidden">江津论坛</a> <a href="https://m.facebook.com/public/葡京会官方网站app✔️网址:la666.net✔️" class="hidden">幻想时代</a> <a href="https://m.facebook.com/public/✔️最新网址:ad22.net✔️beat365app下载(中国)有限公司.clg" class="hidden">58同城铜陵分类信息网</a> <a href="/cn/qljykk-673491.html" class="hidden">One leaf 一叶子</a> <a href="/CN/vqiedl-438584" class="hidden">秦皇岛新浪乐居</a> <a href="/CN/pbnisu-182307.html" class="hidden">90vs体育</a> <a href="/cn/ksferg-185229.html" class="hidden">飘柔官网</a> <a href="/CN/ikumpy-105617.html" class="hidden">中国周易算命网</a> </body></html>