{"version":3,"names":["elements","selector","offset","multiple","window","addEventListener","callback","entries","forEach","entry","isIntersecting","target","classList","add","observer","threshold","IntersectionObserver","el","document","querySelector","querySelectorAll","observe"],"sources":["animateOnScroll.js","front.js"],"sourcesContent":["export default function (elements) {\n window.addEventListener(\"load\", () => {\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n entry.target.classList.add(\"animate\");\n }\n });\n };\n \n const observer = (threshold) => {\n return new IntersectionObserver(callback, {\n threshold: [threshold]\n });\n };\n \n elements.forEach((el) => {\n if (document.querySelector(el.selector)) {\n if (el.multiple) {\n document.querySelectorAll(el.selector).forEach(multiple => {\n observer(el.offset).observe(multiple);\n })\n } else {\n observer(el.offset).observe(document.querySelector(el.selector));\n }\n }\n });\n });\n}","import animateOnScroll from \"./animateOnScroll\"\n\n//animate elements\nanimateOnScroll([\n { selector: \"#Element .element\", offset: 0.25, multiple: true }\n]);"],"mappings":"yBAAe,IAAUA,ICGT,CACZ,CAAEC,SAAU,oBAAqBC,OAAQ,IAAMC,UAAU,IDHzDC,OAAOC,iBAAiB,QAAQ,WAC5B,IAAMC,EAAW,SAACC,GACdA,EAAQC,SAAQ,SAACC,GACTA,EAAMC,gBACND,EAAME,OAAOC,UAAUC,IAAI,U,KAKjCC,EAAW,SAACC,GACd,OAAO,IAAIC,qBAAqBV,EAAU,CACtCS,UAAW,CAACA,I,EAIpBf,EAASQ,SAAQ,SAACS,GACVC,SAASC,cAAcF,EAAGhB,YACtBgB,EAAGd,SACHe,SAASE,iBAAiBH,EAAGhB,UAAUO,SAAQ,SAAAL,GAC3CW,EAASG,EAAGf,QAAQmB,QAAQlB,E,IAGhCW,EAASG,EAAGf,QAAQmB,QAAQH,SAASC,cAAcF,EAAGhB,W"}