{"version":3,"sources":["webpack://frontendplaceholder/./Src/Scripts/components/font-resizer.js"],"names":["constructor","elm","property","currentValue","increment","resize","offsetRight","window","innerWidth","lastElementChild","getBoundingClientRect","right","style","setProperty","pxToIncrease","addEventListener"],"mappings":"gNAAe,MACXA,YAAYC,GACR,MAAMC,EAAW,wBAIjB,IAAIC,EAFc,EAGlB,MAAMC,EAAY,KAClB,SAASC,IACL,MAAMC,EAAcC,OAAOC,WAAaP,EAAIQ,iBAAiBC,wBAAwBC,MACjFL,EAPgB,KAOiBH,EAAeC,GAChDD,GAAgBC,EAChBH,EAAIW,MAAMC,YAAYX,EAAUC,EAAe,OAC/CE,KACOC,EAAeQ,KAVZ,EAU2DX,IACrEA,GAAgBC,EAChBH,EAAIW,MAAMC,YAAYX,EAAUC,EAAe,OAC/CE,KAIRA,IACAE,OAAOQ,iBAAiB,SAAUV","file":"8926.5d173bed7902e5ad0de3.js","sourcesContent":["export default class FontResizer {\n constructor(elm) {\n const property = '--main-menu-font-size';\n const spaceToTheRight = 105;\n const baseValue = 1;\n const pxToIncrease = 200;\n let currentValue = baseValue;\n const increment = 0.125;\n function resize() {\n const offsetRight = window.innerWidth - elm.lastElementChild.getBoundingClientRect().right;\n if (offsetRight < spaceToTheRight && currentValue > increment) {\n currentValue -= increment;\n elm.style.setProperty(property, currentValue + 'rem');\n resize();\n } else if (offsetRight > (pxToIncrease + spaceToTheRight) && baseValue > currentValue) {\n currentValue += increment;\n elm.style.setProperty(property, currentValue + 'rem');\n resize();\n }\n }\n\n resize();\n window.addEventListener('resize', resize);\n }\n}\n"],"sourceRoot":""}