<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://www.braelyngenerator.net" class="hidden">太阳城娱乐城</a> <a href="http://www.pf168shop.com" class="hidden">Sabah-online-platform-info@pf168shop.com</a> <a href="http://www.m-y-c.net" class="hidden">2024欧洲杯押注</a> <a href="http://www.letaoyizs.com" class="hidden">Crown-app-Download-careers@letaoyizs.com</a> <a href="http://www.swissabc.net" class="hidden">Sports-platform-marketing@swissabc.net</a> <a href="http://www.78278.net" class="hidden">ag8亚游</a> <a href="http://cvmejk.sxtsbd.com" class="hidden">点跃在线</a> <a href="http://bskuqh.bohuslan.net" class="hidden">淘米网小花仙官网</a> <a href="http://www.jijiayun.net" class="hidden">Crown-football-contactus@jijiayun.net</a> <a href="http://www.xingtaiyichuang.com" class="hidden">买球app</a> <a href="http://jjxwcu.hj8807.com" class="hidden">温州全城热恋婚纱摄影概念馆</a> <a href="http://mpckay.beanslot.net" class="hidden">中国山东网德州频道</a> <a href="http://www.xqykl.net" class="hidden">Sports-betting-sales@xqykl.net</a> <a href="http://www.mygril-yaoyao.com" class="hidden">Crown-betting-hr@mygril-yaoyao.com</a> <a href="http://jnfkdx.bjjdwxw.net" class="hidden">综艺巴士网</a> <a href="http://www.vipsjerseyonline.net" class="hidden">新濠天地在线</a> <a href="http://www.rf518.com" class="hidden">亚洲体育博彩平台</a> <a href="http://www.yibangyi.net" class="hidden">bet365亚洲官网</a> <a href="http://www.nbzhiai.com" class="hidden">Crown-Sports-Betting-support@nbzhiai.com</a> <a href="https://acrmc.com/search/✔️网址:la66.net✔️沙巴足球体育平台✔️网址:la66.net✔️沙巴足球体育平台.fjm" class="hidden">南海人才信息网</a> <a href="https://stock.adobe.com/search?k=新萄京正规网站(中国)有限公司✔️最新网址:la55.net✔️新萄京正规网站(中国)有限公司✔️最新网址:la55.net✔️" class="hidden">室内儿童乐园</a> <a href="https://m.facebook.com/public/✔️官方网址:la777.net✔️可靠的在线赌博十大赌博网站-维基百科.oyv" class="hidden">视觉同盟</a> <a href="https://m.facebook.com/public/✔️网址:ad11.net✔️十大网赌正规网站(中国)有限公司✔️网址:ad11.net✔️十大网赌正规网站(中国)有限公司.znb" class="hidden">招商贷</a> <a href="https://m.facebook.com/public/信誉的电子游戏排行榜>>✔️网址:ad11.net✔️手输<<" class="hidden">第一比分网</a> <a href="https://stock.adobe.com/search?k=>>✔️网址:la66.net✔️手输<<十大网赌网站大全" class="hidden">58同城潮州分类信息网</a> <a href="https://es-la.facebook.com/public/365集团官网(中国)有限公司✔️最新网址:la55.net✔️.wad" class="hidden">柒牌男装官网</a> <a href="https://stock.adobe.com/search?k=✔️最新网址:ad22.net✔️网络博彩排名靠谱的博彩网站-网络博彩排名靠谱的博彩网站官方网站.twz" class="hidden">中国养殖网 </a> <a href="https://stock.adobe.com/search?k=万博app下载平台介绍✔️官方网址:la777.net✔️万博app下载平台介绍✔️官方网址:la777.net✔️" class="hidden">烟台旅行社</a> <a href="https://es-la.facebook.com/public/✔️网址:ad11.net✔️科普一下kok体育官网的百科✔️网址:ad11.net✔️科普一下kok体育官网的百科" class="hidden">腾讯开放平台</a> <a href="/CN/etkpfb-681559" class="hidden">东北农业大学-招生与就业指导处</a> <a href="/cn/mfjhbo-519587.html" class="hidden">曙光电缆</a> <a href="/CN/xlyhpq-268623.html" class="hidden">广元新闻网</a> <a href="/sttcs/hot-news/syndesmography.html" class="hidden">桂林理工大学博文管理学院主页</a> <a href="/sitemap.xml" class="hidden">站点地图</a> </body></html>