{"version":3,"file":"appear.1988673dbed2c912483b.min.js","mappings":"gJAAe,MAAMA,EACjBC,WAAAA,CAAYC,GACRC,KAAKD,UAAYA,EACjBC,KAAKC,KAAOD,KAAKD,UAAUG,aAAa,oBACxCF,KAAKG,UAAYH,KAAKD,UAAUG,aAAa,yBAEzCF,KAAKC,MAAMD,KAAKI,cAChBJ,KAAKG,WAAWH,KAAKK,kBAC7B,CAEAD,WAAAA,GACIE,YAAW,KACPN,KAAKD,UAAUQ,UAAUC,IAAI,YAAY,GAC9B,IAAZR,KAAKC,KACZ,CAEAI,gBAAAA,GACI,MAAMI,EAAOT,KACPU,EAASC,SAASC,cAAcZ,KAAKG,WAEtCO,IAELV,KAAKa,SAAW,IAAIC,sBAAqBC,IACrCA,EAAQC,SAAQC,IACoB,IAA5BA,EAAMC,kBACNT,EAAKV,UAAUQ,UAAUC,IAAI,aAE7BC,EAAKV,UAAUQ,UAAUY,OAAO,YACpC,GACF,GACH,CAAEC,UAAW,IAEhBpB,KAAKa,SAASQ,QAAQX,GAC1B,E","sources":["webpack://intracto-deheus/./Frontend/js/components/appear/index.js"],"sourcesContent":["export default class Appear {\r\n constructor(component) {\r\n this.component = component;\r\n this.time = this.component.getAttribute('data-appear-time');\r\n this.showafter = this.component.getAttribute('data-appear-showafter');\r\n\r\n if (this.time) this.timeHandler();\r\n if (this.showafter) this.showafterHandler();\r\n }\r\n\r\n timeHandler() {\r\n setTimeout(() => {\r\n this.component.classList.add('is-active');\r\n }, this.time * 1000);\r\n }\r\n\r\n showafterHandler() {\r\n const root = this;\r\n const target = document.querySelector(this.showafter);\r\n\r\n if (!target) return;\r\n\r\n this.observer = new IntersectionObserver(entries => {\r\n entries.forEach(entry => {\r\n if (entry.intersectionRatio === 0) {\r\n root.component.classList.add('is-active');\r\n } else {\r\n root.component.classList.remove('is-active');\r\n }\r\n });\r\n }, { threshold: 0 });\r\n\r\n this.observer.observe(target);\r\n }\r\n}"],"names":["Appear","constructor","component","this","time","getAttribute","showafter","timeHandler","showafterHandler","setTimeout","classList","add","root","target","document","querySelector","observer","IntersectionObserver","entries","forEach","entry","intersectionRatio","remove","threshold","observe"],"sourceRoot":""}