| @@ -1 +1,2 @@ | ||
| 1 | -(()=>{"use strict";const t=class{constructor(t){if(this.ablocksAnimation=t,!this.ablocksAnimation||!t?.classList.contains("ablocks-invisible"))return;const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(this.applyAnimation(t.target),e.unobserve(t.target))})},{threshold:.5});Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{e.observe(t)}):t&&e.observe(t),window.addEventListener("resize",()=>this.handleResize(t))}applyAnimation(t){if(t.getAttribute("data-settings")){const e=JSON.parse(t.getAttribute("data-settings")),i=window.matchMedia(`(max-width: ${this.getBreakpoint("tablet")}) and (min-width: ${this.getBreakpoint("mobile")})`).matches,a=window.matchMedia(`(max-width: ${this.getBreakpoint("mobile")})`).matches;let n=e.animationType;if(i?n=e.animationTypeTablet||e.animationType:a&&(n=e.animationTypeMobile||e.animationType),t.style.visibility="visible","none"===n)return;t.style.setProperty("--animate-duration",`${e.animationDuration||1}s`),t.style.setProperty("--animate-delay",`${e.animationDelay||0}s`),t.classList.add("animate__animated","animate__"+n)}}handleResize(t){Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{this.applyAnimation(t)}):t&&this.applyAnimation(t)}getBreakpoint(t){switch(t){case"tablet":return"800px";case"mobile":return"480px";default:return"1200px"}}};document.addEventListener("DOMContentLoaded",()=>{!function(){const e=document.querySelectorAll(".ablocks-invisible");e?.length&&e.forEach(e=>{new t(e)})}()})})(); | |
| 1 | +(()=>{"use strict";const t=class{constructor(t){if(this.ablocksAnimation=t,!this.ablocksAnimation||!t?.classList.contains("ablocks-invisible"))return;const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(this.applyAnimation(t.target),e.unobserve(t.target))})},{threshold:.5});Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{e.observe(t)}):t&&e.observe(t),window.addEventListener("resize",()=>this.handleResize(t))}applyAnimation(t){if(t.getAttribute("data-settings")){const e=JSON.parse(t.getAttribute("data-settings")),i=window.matchMedia(`(max-width: ${this.getBreakpoint("tablet")}) and (min-width: ${this.getBreakpoint("mobile")})`).matches,a=window.matchMedia(`(max-width: ${this.getBreakpoint("mobile")})`).matches;let n=e.animationType;if(i?n=e.animationTypeTablet||e.animationType:a&&(n=e.animationTypeMobile||e.animationType),t.style.visibility="visible","none"===n)return;t.style.setProperty("--animate-duration",`${e.animationDuration||1}s`), | |
| 2 | +t.style.setProperty("--animate-delay",`${e.animationDelay||0}s`),t.classList.add("animate__animated","animate__"+n)}}handleResize(t){Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{this.applyAnimation(t)}):t&&this.applyAnimation(t)}getBreakpoint(t){switch(t){case"tablet":return"800px";case"mobile":return"480px";default:return"1200px"}}};document.addEventListener("DOMContentLoaded",()=>{!function(){const e=document.querySelectorAll(".ablocks-invisible");e?.length&&e.forEach(e=>{new t(e)})}()})})(); | |