PageSourceSearch

https://precoro.com/build/js/heroes.product-hero.RTSNsK0_.js

js precoro.com collected 2026-09-24 08:54:52 UTC 1,690 bytes, 2 lines download raw bytes

1import{g as a,S as A}from"./app.qQtaN1au.js";a.registerPlugin(A);const S=1.6,T=()=>window.innerWidth<1024?64:96,w=c=>{const r=c.querySelector("[data-hero-pin]"),n=c.querySelector("[data-hero-frame]"),g=c.querySelector("[data-hero-track]"),e=[...c.querySelectorAll("[data-hero-screen]")];if(!r||!n||!g||!e.length)return;const h=a.matchMedia();return h.add("(min-width: 768px)",()=>{const f=()=>Math.max(0,(r.offsetHeight-n.offsetHeight)/2-T()),i=()=>(r.offsetHeight+n.offsetHeight)/2,t=a.timeline({defaults:{ease:"none"},scrollTrigger:{trigger:r,start:"top top",end:()=>"+="+t.duration()*window.innerHeight*S,pin:!0,scrub:1,invalidateOnRefresh:!0}});t.fromTo(n,{y:()=>-f()},{y:0},0),e.slice(1).forEach((s,l)=>{t.to(e[l],{y:()=>i(),autoAlpha:0}),t.fromTo(s,{y:()=>-i(),autoAlpha:0},{y:0,autoAlpha:1},"<")});const o=r.querySelector("[data-hero-bg]");if(o){let u=25,d=25;A.create({trigger:r,start:"top bottom",end:()=>"+="+(window.innerHeight*2+t.duration()*window.innerHeight*S),scrub:!0,invalidateOnRefresh:!0,onUpdate:m=>{u=25-m.progress*25*2}});const p=(m,G)=>{const _=1-Math.exp(-(G/1e3)/.4);d+=(u-d)*_,a.set(o,{yPercent:d})};return a.ticker.add(p),()=>a.ticker.remove(p)}}),h.add("(max-width: 767px)",()=>{if(e.length<2)return;const f=o=>o.offsetLeft-e[0].offsetLeft,i=()=>g.scrollWidth-n.clientWidth,t=a.timeline({defaults:{ease:"none"},scrollTrigger:{trigger:r,start:"top top",end:()=>"+="+i()*2,pin:!0,scrub:1,invalidateOnRefresh:!0}});e.slice(1).forEach((o,s)=>{const l=s===e.length-2;t.to(g,{x:()=>-(l?i():f(o))}),t.to(e[s],{autoAlpha:0},"<"),t.fromTo(o,{autoAlpha:0},{autoAlpha:1},"<")})}),()=>h.revert()};export{w as init};
2//# sourceMappingURL=heroes.product-hero.RTSNsK0_.js.map

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.