PageSourceSearch

https://www.silvianheach.com/cdn/shop/t/51/assets/intersection-observer.js?v=93597575307584849551777984752

js silvianheach.com collected 2026-10-03 21:35:29 UTC 2,956 bytes, 2 lines download raw bytes

1customElements.get("animation-observer")||customElements.define("animation-observer",class extends HTMLElement{static get observedAttributes(){return["data-intersect-once","data-animation-mobile","data-intersection-observer"]}constructor(){super(),this.observer=null,this.isAnimated=!1,this.DEFAULT_DELAY=300,this.DEFAULT_DURATION=900}connectedCallback(){this.initObserver()}disconnectedCallback(){this.observer&&this.observer.disconnect()}attributeChangedCallback(name,oldValue,newValue){this.observer&&this.observer.disconnect(),this.initObserver()}parseIntSafe(value,fallback){const parsed=parseInt(value);return isNaN(parsed)?fallback:parsed}initObserver(){const observerElement=this,intersectOnce=observerElement.dataset.intersectOnce!=="false",observerOptions={rootMargin:"0px 0px -50% 0px",threshold:0,...this.getIntersectionOptions()};this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(!entry.isIntersecting)return;const allowMobileAnimation=observerElement.dataset.animationMobile!=="false";DeviceDetector.isMobile()&&!allowMobileAnimation||this.isAnimated&&intersectOnce||(this.isAnimated=!0,this.triggerAnimation(),intersectOnce&&this.observer.unobserve(observerElement))})},observerOptions),this.observer.observe(observerElement)}getIntersectionOptions(){try{return JSON.parse(this.dataset.intersectionObserver||"{}")}catch(e){return console.error("Invalid JSON in data-intersection-observer:",e),{}}}triggerAnimation(){const animationBody=this.querySelector(".full-width-banner__animation--body"),animationElements=this.querySelectorAll(".full-width-banner__animation");if(this.addEventListener("animationend",()=>{this.isAnimated=!1},{once:!0}),!animationElements.length){this.classList.add("isAnimated");return}const baseAnimationDelay=animationBody?this.parseIntSafe(animationBody.dataset.animationDelay,this.DEFAULT_DELAY):this.DEFAULT_DELAY,baseAnimationDuration=animationBody?this.parseIntSafe(animationBody.dataset.animationDuration,this.DEFAULT_DURATION):this.DEFAULT_DURATION;this.classList.add("inAnimation");let completedAnimations=0;const totalAnimations=animationElements.length;animationElements.forEach((element,i)=>{const elementDelay=this.parseIntSafe(element.dataset.animationDelay,baseAnimationDelay),elementDuration=this.parseIntSafe(element.dataset.animationDuration,baseAnimationDuration),startDelay=i*(elementDelay/2);setTimeout(()=>{element.classList.add("inAnimation");const childElement=element.querySelector("*");childElement&&(childElement.style.animationDuration=`${elementDuration}ms`)},startDelay),setTimeout(()=>{element.classList.remove("inAnimation"),element.classList.add("isAnimated"),completedAnimations++,completedAnimations===totalAnimations&&(this.classList.remove("inAnimation"),this.classList.add("isAnimated"),this.isAnimated=!0)},startDelay+baseAnimationDuration)})}});
2//# sourceMappingURL=/cdn/shop/t/51/assets/intersection-observer.js.map?v=93597575307584849551777984752

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.