{"version":3,"file":"common-24386f6d.js","sources":["../../src/plugins/common.js"],"sourcesContent":["\nconst PausePlayAnimation = (entries, ...ids) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n ids.forEach(id => {\n let elem = document.getElementById(id)\n if(elem !== null){\n elem.play();\n }\n });\n } else {\n ids.forEach(id => {\n let elem = document.getElementById(id)\n if(elem !== null){\n elem.pause();\n }\n });\n }\n });\n}\n\n// Swiper Autoplay Pause when swiper is not in viewport \n\nconst PauseSwiperAutoPlay = (swiper) => {\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n if (swiper.autoplay && swiper.autoplay.start) {\n swiper.autoplay.start();\n }\n } else {\n if (swiper.autoplay && swiper.autoplay.stop) {\n swiper.autoplay.stop();\n }\n }\n },\n { threshold: 0 }\n );\n observer.observe(swiper.el);\n}\n\n\nexport { PausePlayAnimation, PauseSwiperAutoPlay }"],"names":["PausePlayAnimation","entries","ids","forEach","entry","isIntersecting","id","elem","document","getElementById","play","pause","PauseSwiperAutoPlay","swiper","IntersectionObserver","autoplay","start","stop","threshold","observe","el"],"mappings":"AACK,MAACA,EAAqB,CAACC,KAAYC,KAC5BD,EAAAE,SAASC,IACTA,EAAMC,eACNH,EAAIC,SAAcG,IACX,IAAAC,EAAOC,SAASC,eAAeH,GACvB,OAATC,GACFA,EAAKG,MACL,IAGJR,EAAIC,SAAcG,IACV,IAAAC,EAAOC,SAASC,eAAeH,GACvB,OAATC,GACCA,EAAKI,OACR,GAER,GACJ,EAKCC,EAAuBC,IACR,IAAIC,sBACjB,EAAEV,MACMA,EAAMC,eACFQ,EAAOE,UAAYF,EAAOE,SAASC,OACnCH,EAAOE,SAASC,QAGhBH,EAAOE,UAAYF,EAAOE,SAASE,MACnCJ,EAAOE,SAASE,MAEvB,GAEL,CAAEC,UAAW,IAERC,QAAQN,EAAOO,GAAE"}