PageSourceSearch

https://musique-facile.fr/assets/animations.DYRQvgY3.js

js musique-facile.fr collected 2026-10-07 18:59:14 UTC 9,099 bytes, 1 lines download raw bytes

1class ScrollAnimationManager{constructor(){this.observers=new Map,this.init()}init(){this.setupSectionReveal(),this.setupStaggerGroups(),this.setupFadeInObserver(),this.setupCounterAnimations(),this.setupSmoothScroll()}setupSectionReveal(){const e=document.querySelectorAll('[data-animate="reveal"]');if(0===e.length)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("is-visible"),t.unobserve(e.target))})},{threshold:.08,rootMargin:"0px 0px -40px 0px"});e.forEach(e=>{e.classList.add("animate-reveal"),t.observe(e)}),this.observers.set("sectionReveal",t)}setupStaggerGroups(){const e=document.querySelectorAll("[data-stagger-group]");if(0===e.length)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target,r=n.dataset.staggerGroup||"> *";let a;a="> *"===r?n.children:n.querySelectorAll(r),Array.from(a).forEach((e,t)=>{e.style.transitionDelay=150*t+"ms",e.classList.add("stagger-visible")}),t.unobserve(n)}})},{threshold:.1,rootMargin:"0px 0px -30px 0px"});e.forEach(e=>{const n=e.dataset.staggerGroup||"> *";let r;r="> *"===n?e.children:e.querySelectorAll(n),Array.from(r).forEach(e=>{e.classList.add("stagger-item")}),t.observe(e)}),this.observers.set("stagger",t)}setupFadeInObserver(){const e=document.querySelectorAll(".fade-in");if(0===e.length)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("is-visible"),t.unobserve(e.target))})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});e.forEach(e=>{e.classList.add("animate-reveal"),t.observe(e)}),this.observers.set("fadeIn",t)}setupCounterAnimations(){const e=document.querySelectorAll("[data-counter]");if(0===e.length)return;const t=e=>{const t=e.textContent,n=parseInt(e.dataset.counter),r=parseInt(e.dataset.duration)||2e3,a=e.dataset.counterSuffix||"",o=e.dataset.counterPrefix||"",s=parseInt(e.dataset.counterDecimals)||0,i=performance.now(),l=c=>{const d=c-i,m=Math.min(d/r,1),p=1===m?1:1-Math.pow(2,-10*m),h=s>0?0+(n-0)*p:Math.floor(0+(n-0)*p);var u;e.textContent=o+(u=h,s>0?u.toFixed(s).replace(".",","):u>=1e3?u.toLocaleString("fr-FR"):Math.floor(u).toString())+a,m<1?requestAnimationFrame(l):e.textContent=t};requestAnimationFrame(l)},n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(t(e.target),n.unobserve(e.target))})},{threshold:.5});e.forEach(e=>n.observe(e)),this.observers.set("counters",n)}setupSmoothScroll(){document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){const t=this.getAttribute("href");if("#"===t||"#!"===t)return;const n=document.querySelector(t);if(!n)return;e.preventDefault();const r=n.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:r,behavior:"smooth"})})})}}class ParallaxManager{constructor(){this.elements=[],this.decorElements=[],this.ticking=!1,this.scrollY=0,this.isDesktop=window.innerWidth>=768,this.init()}init(){this.isDesktop&&(this.collectElements(),this.collectDecorElements(),0===this.elements.length&&0===this.decorElements.length||(this.elements.forEach(({el:e})=>{e.style.willChange="transform"}),this.decorElements.forEach(({el:e})=>{e.style.willChange="transform"}),this.scrollY=window.pageYOffset,this.onScroll=this.onScroll.bind(this),this.onResize=this.onResize.bind(this),window.addEventListener("scroll",this.onScroll,{passive:!0}),window.addEventListener("resize",this.onResize,{passive:!0}),this.update()))}collectElements(){document.querySelectorAll("[data-parallax-speed]").forEach(e=>{const t=parseFloat(e.dataset.parallaxSpeed)||.1,n=e.dataset.parallaxDirection||"vertical",r="none"!==getComputedStyle(e).animationName;this.elements.push({el:e,speed:t,direction:n,hasAnimation:r})})}collectDecorElements(){document.querySelectorAll("[data-parallax-decor]").forEach(e=>{const t=parseFloat(e.dataset.parallaxSpeed)||.05;this.decorElements.push({el:e,speed:t})})}onScroll(){this.scrollY=window.pageYOffset,this.ticking||(requestAnimationFrame(()=>{this.update(),this.ticking=!1}),this.ticking=!0)}onResize(){this.isDesktop=window.innerWidth>
1=768,this.isDesktop||(this.elements.forEach(({el:e})=>{e.style.transform="",e.style.willChange=""}),this.decorElements.forEach(({el:e})=>{e.style.transform="",e.style.willChange=""}),window.removeEventListener("scroll",this.onScroll))}update(){const e=window.innerHeight;this.elements.forEach(({el:t,speed:n,direction:r,hasAnimation:a})=>{const o=t.getBoundingClientRect();if(o.bottom<-200||o.top>e+200)return;const s=this.scrollY*n;a?t.style.setProperty("--parallax-y",-s+"px"):t.style.transform="horizontal"===r?`translateX(${s}px)`:`translateY(${-s}px)`}),this.decorElements.forEach(({el:t,speed:n})=>{const r=t.getBoundingClientRect();if(r.bottom<-300||r.top>e+300)return;const a=(r.top+r.height/2-e/2)*n;t.style.transform=`translateY(${a}px)`})}}class HoverEffectsManager{constructor(){this.init()}init(){window.matchMedia("(hover: hover)").matches&&this.setupMagneticButtons()}setupMagneticButtons(){document.querySelectorAll(".cta-button, .pricing-cta, .quiz-cta-button").forEach(e=>{e.addEventListener("mousemove",t=>{const n=e.getBoundingClientRect(),r=t.clientX-n.left-n.width/2,a=t.clientY-n.top-n.height/2,o=Math.sqrt(r*r+a*a);if(o<50){const t=(50-o)/50,n=r*t*.3,s=a*t*.3;e.style.transform=`translate(${n}px, ${s}px) translateY(-5px)`}}),e.addEventListener("mouseleave",()=>{e.style.transform=""})})}}class PerformanceMonitor{constructor(){this.init()}init(){this.setupLazyLoading()}setupLazyLoading(){const e=document.querySelectorAll('img[loading="lazy"]');if("IntersectionObserver"in window){const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;n.dataset.src&&(n.src=n.dataset.src,n.removeAttribute("data-src")),t.unobserve(n)}})},{rootMargin:"50px"});e.forEach(e=>t.observe(e))}}}function injectAnimationStyles(){if(document.getElementById("mf-animation-styles"))return;const e=document.createElement("style");e.id="mf-animation-styles",e.textContent="\n    /* Section reveal — fade-in + slide-up */\n    .animate-reveal {\n      opacity: 0;\n      transform: translateY(20px);\n      transition: opacity 0.6s ease-out, transform 0.6s ease-out;\n    }\n    .animate-reveal.is-visible {\n      opacity: 1;\n      transform: translateY(0);\n    }\n\n    /* Stagger items */\n    .stagger-item {\n      opacity: 0;\n      transform: translateY(16px);\n      transition: opacity 0.5s ease-out, transform 0.5s ease-out;\n    }\n    .stagger-item.stagger-visible {\n      opacity: 1;\n      transform: translateY(0);\n    }\n\n    /* Parallax decorative elements */\n    .parallax-decor {\n      position: absolute;\n      pointer-events: none;\n      z-index: 0;\n      opacity: 0.07;\n      font-size: 2rem;\n      color: var(--brand-400, #a78bfa);\n    }\n\n    /* Marquee banner */\n    .marquee-banner {\n      overflow: hidden;\n      white-space: nowrap;\n      position: relative;\n    }\n    .marquee-track {\n      display: inline-flex;\n      animation: marquee-scroll 35s linear infinite;\n    }\n    .marquee-track:hover {\n      animation-play-state: paused;\n    }\n    @keyframes marquee-scroll {\n      0% { transform: translateX(0); }\n      100% { transform: translateX(-50%); }\n    }\n\n    /* Neumorphic shadows on cards */\n    .neumorphic-card {\n      box-shadow:\n        8px 8px 16px rgba(60, 65, 124, 0.08),\n        -4px -4px 12px rgba(255, 255, 255, 0.6);\n      transition: box-shadow 0.3s ease, transform 0.3s ease;\n    }\n    .neumorphic-card:hover {\n      box-shadow:\n        12px 12px 24px rgba(60, 65, 124, 0.12),\n        -6px -6px 16px rgba(255, 255, 255, 0.8);\n    }\n\n    /* prefers-reduced-motion : tout afficher directement */\n    @media (prefers-reduced-motion: reduce) {\n      .animate-reveal,\n      .stagger-item {\n        opacity: 1 !important;\n        transform: none !important;\n        transition: none !important;\n      }\n      .marquee-track {\n        animation: none !important;\n      }\n      [data-parallax-speed],\n      [data-parallax-decor] {\n        transform: none !important;\n      }\n      .instrument {\n        animation: none !important;\n      }\n    }\n\n    /* Mobile: masquer les decorations parallax */\n    @media (max-width: 767px) {\n      .parallax-decor {\n        display: none;\n      }\n    }\n  ",document.head.appendChild(e)}const initAnimations=()=>{const e=window.matchMedia("(prefers-reduced-motion: reduce)").matches,t=navigator.connection&&("slow-2g"===navigator.connection.effectiveType||"2g"===navigator.connection.effectiveType||"3g"===navigator.connection.effectiveType),n="IntersectionObserver"in window;new PerformanceMonitor,e||t||!n||(injectAnimationStyles(),new ScrollAnimationManager,new ParallaxManager),e||new HoverEffectsManager};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initAnimations):initAnimations(),"undefined"!=typeof module&&module.exports&&(module.exports={ScrollAnimationManager:ScrollAnimationManager,ParallaxManager:ParallaxManager,HoverEffectsManager:HoverEffectsManager,PerformanceMonitor:PerformanceMonitor});

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.