{"version":3,"file":"chunk.4831.aa705f67306ec2d2.js","mappings":"4NAcA,MAAMA,EACLC,WAAAA,CAAYC,GACXC,KAAKD,GAAKA,EACVC,KAAKC,cACLC,EAAAA,EAA0BC,IAAIJ,EAC/B,CAEAE,WAAAA,GAECD,KAAKD,GAAGK,iBAAiB,SAAUJ,KAAKK,QAAQC,KAAKN,MACtD,CAEAK,OAAAA,GACC,MAAM,GAAEN,GAAOC,KACTO,EAAUR,EAAGS,cAAc,YAAYC,SAC7C,IAAIC,EAAKC,EAAAA,GAAKC,SAASC,EAAAA,IACvBH,EAAGI,MAAK,KACPf,EAAGgB,UAAUZ,IAAI,aAAa,IAE/BO,EAAGM,cACFT,EACAU,EAAAA,IACAC,EAAAA,EAAAA,IAAI,CAAEC,MAAOC,EAAAA,IAAoBC,EAAAA,IACjCC,EAAAA,GACAC,EAAAA,GACA,YAEDb,GAAKc,EAAAA,EAAAA,GACJ,CACCC,QAAS1B,EAAGS,cAAc,kBAC1BkB,MAAO3B,EAAGS,cAAc,kBAEzBE,EACA,YAEDA,EAAGiB,MACJ,EAGD,eACO,MAAMC,EAAsB,KAAIC,EAAAA,EAAAA,IAAI,aAAaC,KACvD/B,GAAM,IAAIF,EAAQE,I","sources":["webpack://tombras/./js/components/Journey.js"],"sourcesContent":["import { qsa } from \"../utils\";\nimport { componentAnimationHandler } from \"../animations/AnimationHandler\";\nimport gsap from \"gsap\";\nimport {\n\tpaused,\n\tDEFAULT_TIME,\n\tSTART_OPACITY,\n\tSIMPLE_ANIMATION_START,\n\tSIMPLE_ANIMATION_FINISH,\n\tDEFAULT_STAGGER,\n\tani,\n\tNOT_SUBTLE_DELAY,\n} from \"../animations/config\";\nimport { tweenImagesWithOverlay } from \"../animations\";\nclass Journey {\n\tconstructor(el) {\n\t\tthis.el = el;\n\t\tthis.setupEvents();\n\t\tcomponentAnimationHandler.add(el);\n\t}\n\n\tsetupEvents() {\n\t\tconsole.log(\"hi guys\");\n\t\tthis.el.addEventListener(\"inview\", this.animate.bind(this));\n\t}\n\n\tanimate() {\n\t\tconst { el } = this;\n\t\tconst content = el.querySelector(\".content\").children;\n\t\tlet tl = gsap.timeline(paused);\n\t\ttl.call(() => {\n\t\t\tel.classList.add(\"animate-bg\");\n\t\t});\n\t\ttl.staggerFromTo(\n\t\t\tcontent,\n\t\t\tDEFAULT_TIME,\n\t\t\tani({ delay: NOT_SUBTLE_DELAY }, SIMPLE_ANIMATION_START),\n\t\t\tSIMPLE_ANIMATION_FINISH,\n\t\t\tDEFAULT_STAGGER,\n\t\t\t\"together\",\n\t\t);\n\t\ttl = tweenImagesWithOverlay(\n\t\t\t{\n\t\t\t\toverlay: el.querySelector(\".hider-overlay\"),\n\t\t\t\timage: el.querySelector(\".image-holder\"),\n\t\t\t},\n\t\t\ttl,\n\t\t\t\"together\",\n\t\t);\n\t\ttl.play();\n\t}\n}\n\nexport default Journey;\nexport const instantiatedJourney = [...qsa(\".journey\")].map(\n\tel => new Journey(el),\n);\n"],"names":["Journey","constructor","el","this","setupEvents","componentAnimationHandler","add","addEventListener","animate","bind","content","querySelector","children","tl","gsap","timeline","paused","call","classList","staggerFromTo","DEFAULT_TIME","ani","delay","NOT_SUBTLE_DELAY","SIMPLE_ANIMATION_START","SIMPLE_ANIMATION_FINISH","DEFAULT_STAGGER","tweenImagesWithOverlay","overlay","image","play","instantiatedJourney","qsa","map"],"sourceRoot":""}