{"version":3,"file":"scripts/3450.js","mappings":"gFAAA,MAAMA,EAAkBC,SAASC,cAAc,6BAE/C,GAAIF,EAAiB,CACjB,MAAMG,EAAkBH,EAAgBI,iBAAiB,yBACzD,IAAIC,EAAkBC,EAAyBH,GAE/C,GAAwB,IAApBE,GAAyBA,EAAkB,IAC3CE,YAAW,KACPF,EAAkBC,EAAyBH,GAE3C,IAAK,MAAMK,KAAUL,EAEbK,EAAOC,MAAMC,MADO,IAApBL,GAAyBA,EAAkB,IACtB,QAEA,GAAGA,KAEhC,GACD,UAGH,IAAK,MAAMG,KAAUL,EACjBK,EAAOC,MAAMC,MAAQ,GAAGL,MAyBhC,SAASC,EAAyBK,GAC9B,IAAIC,EAAyB,EAE7B,IAAK,MAAMJ,KAAUG,EACbH,EAAOK,YAAcD,IACrBA,EAAyBJ,EAAOK,YAAc,GAItD,OAAOD,CACX,CA/BgBZ,EAAgBI,iBAAiB,wBACzCU,SAAQN,IACZ,IAAIO,EAAqBP,EAAON,cAAc,KAC9C,GAAkD,WAA9Ca,EAAmBC,aAAa,UAAwB,CACxD,MAAMC,EAAgBhB,SAASC,cAAc,SAASc,aAAa,wBACnE,GAAKD,EAAmBG,aAAa,cAS9B,CACH,MAAMC,EAAgBJ,EAAmBC,aAAa,cACtDD,EAAmBK,aAAa,aAAc,GAAGD,KAAiBF,IACtE,KAZoD,CAChD,MAAMI,EAAWN,EAAmBO,UAC9BC,EAAYR,EAAmBC,aAAa,SAClDD,EAAmBK,aAAa,aAAc,GAAGC,KAAYJ,KACzDM,EACAR,EAAmBK,aAAa,QAAS,GAAGG,KAAaN,KAEzDF,EAAmBK,aAAa,QAAS,GAAGC,KAAYJ,IAEhE,CAIJ,IAcR,C","sources":["webpack://wwwroot/./src/scripts/downloadBlock.js"],"sourcesContent":["const downloadSection = document.querySelector(\".adm-section-c17-download\");\r\n\r\nif (downloadSection) {\r\n const downloadButtons = downloadSection.querySelectorAll(\".adm-btn.adm-bg-white\");\r\n let largestBtnWidth = calculateLargestBtnWidth(downloadButtons);\r\n\r\n if (largestBtnWidth === 0 || largestBtnWidth > 250) {\r\n setTimeout(() => {\r\n largestBtnWidth = calculateLargestBtnWidth(downloadButtons);\r\n\r\n for (const button of downloadButtons) {\r\n if (largestBtnWidth === 0 || largestBtnWidth > 250) {\r\n button.style.width = `250px`;\r\n } else {\r\n button.style.width = `${largestBtnWidth}px`;\r\n }\r\n }\r\n }, 300);\r\n\r\n } else {\r\n for (const button of downloadButtons) {\r\n button.style.width = `${largestBtnWidth}px`;\r\n }\r\n }\r\n\r\n const buttons = downloadSection.querySelectorAll(\".adm-btn.adm-bg-navy\");\r\n buttons.forEach(button => {\r\n var downloadButtonLink = button.querySelector(\"a\");\r\n if (downloadButtonLink.getAttribute(\"target\") === \"_blank\") {\r\n const ariaLabelText = document.querySelector(\"main\")?.getAttribute(\"data-link-popup-aria\");\r\n if (!downloadButtonLink.hasAttribute(\"aria-label\")) {\r\n const linkText = downloadButtonLink.innerText;\r\n const linkTitle = downloadButtonLink.getAttribute(\"title\");\r\n downloadButtonLink.setAttribute(\"aria-label\", `${linkText} ${ariaLabelText}`);\r\n if (linkTitle) {\r\n downloadButtonLink.setAttribute(\"title\", `${linkTitle} ${ariaLabelText}`);\r\n } else {\r\n downloadButtonLink.setAttribute(\"title\", `${linkText} ${ariaLabelText}`);\r\n }\r\n } else {\r\n const linkAriaLabel = downloadButtonLink.getAttribute(\"aria-label\");\r\n downloadButtonLink.setAttribute(\"aria-label\", `${linkAriaLabel} ${ariaLabelText}`);\r\n }\r\n }\r\n });\r\n\r\n function calculateLargestBtnWidth(downloadBttns) {\r\n let currentLargestBtnWidth = 0;\r\n\r\n for (const button of downloadBttns) {\r\n if (button.offsetWidth > currentLargestBtnWidth) {\r\n currentLargestBtnWidth = button.offsetWidth + 1;\r\n }\r\n }\r\n\r\n return currentLargestBtnWidth;\r\n }\r\n}\r\n"],"names":["downloadSection","document","querySelector","downloadButtons","querySelectorAll","largestBtnWidth","calculateLargestBtnWidth","setTimeout","button","style","width","downloadBttns","currentLargestBtnWidth","offsetWidth","forEach","downloadButtonLink","getAttribute","ariaLabelText","hasAttribute","linkAriaLabel","setAttribute","linkText","innerText","linkTitle"],"sourceRoot":""}