{"version":3,"file":"components-headline-scroller.1384498560fc312ff473.js","mappings":"+IAEA,MAAMA,EAAgBC,SAASC,iBAAiB,kBAC1CC,EAAmBH,EAAcI,OAAS,EAEhD,GAAIJ,EAAcI,OAAQ,CACxB,MAAMC,EAAWC,EAAAA,GAAKD,SAAS,CAC7BE,OAAQJ,GAAoB,EAAI,IAGlCH,EAAcQ,SAASC,IACrB,MAAMC,EAAY,CAChB,CAAEC,EAAG,MAAOC,QAAS,EAAGC,SAAU,GAClC,CAAEF,EAAG,IAAKC,QAAS,EAAGC,SAAU,GAAKC,KAAM,SAGzCX,GACFO,EAAUK,KAAK,CACbJ,EAAG,OACHC,QAAS,EACTC,SAAU,GACVG,MAAO,EACPF,KAAM,SAIVT,EAASY,IACPX,EAAAA,GAAKY,GAAGT,EAAI,CACVC,cAEH,GAEL,C","sources":["webpack://silverstripe-base/./themes/app/src/components/headline-scroller.js"],"sourcesContent":["import { gsap } from 'gsap'\n\nconst headlineWords = document.querySelectorAll('.headline-word')\nconst hasMultipleWords = headlineWords.length > 1\n\nif (headlineWords.length) {\n const timeline = gsap.timeline({\n repeat: hasMultipleWords ? -1 : 0,\n })\n\n headlineWords.forEach((el) => {\n const keyframes = [\n { y: '10%', opacity: 0, duration: 0 },\n { y: '0', opacity: 1, duration: 0.5, ease: 'ease' },\n ]\n\n if (hasMultipleWords) {\n keyframes.push({\n y: '-10%',\n opacity: 0,\n duration: 0.5,\n delay: 1,\n ease: 'ease',\n })\n }\n\n timeline.add(\n gsap.to(el, {\n keyframes,\n })\n )\n })\n}\n"],"names":["headlineWords","document","querySelectorAll","hasMultipleWords","length","timeline","gsap","repeat","forEach","el","keyframes","y","opacity","duration","ease","push","delay","add","to"],"sourceRoot":""}