{"version":3,"file":"elements-timeline.168ecaa0d637860bfe1c.js","mappings":"0IAGAA,EAAAA,GAAAA,eAAoBC,EAAAA,GAEpBC,SAASC,iBAAiB,qBAAqBC,SAASC,IACtD,GAAIC,OAAOC,WAAW,sBAAsBC,QAC1C,OAGF,MAAMC,EAAQJ,EAAGK,cAAc,mBAE3BD,GAASA,EAAME,UAAUC,SAAS,cACpCP,EAAGF,iBAAiB,kBAAkBC,SAASS,IAC7CZ,EAAAA,EAAAA,OAAqB,CACnBa,QAASD,EACTE,SAAS,EACTC,MAAO,KACL,MAAMC,EAAqBC,SACzBC,iBAAiBjB,SAASkB,iBAAiBC,iBAAiB,+BAExDC,EAAeJ,SACnBC,iBAAiBjB,SAASkB,iBAAiBC,iBAAiB,yBAI9D,MAAQ,OAFOE,KAAKC,KAAKP,EAAqBK,EAAmC,IAApBhB,OAAOmB,eAItEC,QAAS,KACP,MAAMC,EAAQd,EAAKe,QAAQD,MAE3BlB,EAAMC,cAAc,gBAAgBC,UAAUkB,IAAI,eAClDpB,EAAMC,cAAe,sBAAqBiB,MAAUhB,UAAUkB,IAAI,cAEpEC,YAAa,KACX,MAAMH,EAAQT,SAASL,EAAKe,QAAQD,OAEpClB,EAAMC,cAAc,gBAAgBC,UAAUoB,OAAO,eACrDtB,EAAMC,cAAe,sBAAqBiB,MAAUhB,UAAUoB,OAAO,uB","sources":["webpack://adjusters/./src/elements/timeline.js"],"sourcesContent":["import { gsap } from 'gsap'\nimport { ScrollTrigger } from 'gsap/ScrollTrigger'\n\ngsap.registerPlugin(ScrollTrigger)\n\ndocument.querySelectorAll('.element-timeline').forEach((el) => {\n if (window.matchMedia('(max-width: 767px)').matches) {\n return\n }\n\n const image = el.querySelector('.timeline-image')\n\n if (image && image.classList.contains('has-image')) {\n el.querySelectorAll('.timeline-item').forEach((item) => {\n ScrollTrigger.create({\n trigger: item,\n markers: false,\n start: () => {\n const announcementHeight = parseInt(\n getComputedStyle(document.documentElement).getPropertyValue('--site-announcement-height')\n )\n const headerHeight = parseInt(\n getComputedStyle(document.documentElement).getPropertyValue('--site-header-height')\n )\n const offset = Math.ceil(announcementHeight + headerHeight + window.innerWidth * 0.25)\n\n return `top ${offset}`\n },\n onEnter: () => {\n const index = item.dataset.index\n\n image.querySelector('.intro-image').classList.add('is-inactive')\n image.querySelector(`[data-image-index=\"${index}\"`).classList.add('is-active')\n },\n onLeaveBack: () => {\n const index = parseInt(item.dataset.index)\n\n image.querySelector('.intro-image').classList.remove('is-inactive')\n image.querySelector(`[data-image-index=\"${index}\"`).classList.remove('is-active')\n },\n })\n })\n }\n})\n"],"names":["gsap","ScrollTrigger","document","querySelectorAll","forEach","el","window","matchMedia","matches","image","querySelector","classList","contains","item","trigger","markers","start","announcementHeight","parseInt","getComputedStyle","documentElement","getPropertyValue","headerHeight","Math","ceil","innerWidth","onEnter","index","dataset","add","onLeaveBack","remove"],"sourceRoot":""}