svg-scroll-draw 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/angular/index.cjs +2 -2
  2. package/dist/angular/index.d.mts +6 -0
  3. package/dist/angular/index.d.ts +6 -0
  4. package/dist/angular/index.mjs +2 -2
  5. package/dist/astro/index.cjs +3 -3
  6. package/dist/astro/index.mjs +3 -3
  7. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  8. package/dist/group/index.cjs +3 -3
  9. package/dist/group/index.d.mts +6 -0
  10. package/dist/group/index.d.ts +6 -0
  11. package/dist/group/index.mjs +3 -3
  12. package/dist/horizontal/index.cjs +1 -0
  13. package/dist/horizontal/index.d.mts +61 -0
  14. package/dist/horizontal/index.d.ts +61 -0
  15. package/dist/horizontal/index.mjs +1 -0
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.d.mts +6 -0
  18. package/dist/index.d.ts +6 -0
  19. package/dist/index.mjs +2 -2
  20. package/dist/nuxt/index.cjs +3 -3
  21. package/dist/nuxt/index.d.mts +6 -0
  22. package/dist/nuxt/index.d.ts +6 -0
  23. package/dist/nuxt/index.mjs +3 -3
  24. package/dist/pin/index.cjs +1 -1
  25. package/dist/pin/index.mjs +1 -1
  26. package/dist/progress/index.cjs +1 -0
  27. package/dist/progress/index.d.mts +59 -0
  28. package/dist/progress/index.d.ts +59 -0
  29. package/dist/progress/index.mjs +1 -0
  30. package/dist/react/index.cjs +3 -3
  31. package/dist/react/index.d.mts +6 -0
  32. package/dist/react/index.d.ts +6 -0
  33. package/dist/react/index.mjs +3 -3
  34. package/dist/reveal/index.cjs +1 -0
  35. package/dist/reveal/index.d.mts +80 -0
  36. package/dist/reveal/index.d.ts +80 -0
  37. package/dist/reveal/index.mjs +1 -0
  38. package/dist/solid/index.cjs +2 -2
  39. package/dist/solid/index.d.mts +6 -0
  40. package/dist/solid/index.d.ts +6 -0
  41. package/dist/solid/index.mjs +2 -2
  42. package/dist/svelte/index.cjs +2 -2
  43. package/dist/svelte/index.d.mts +6 -0
  44. package/dist/svelte/index.d.ts +6 -0
  45. package/dist/svelte/index.mjs +2 -2
  46. package/dist/vue/index.cjs +2 -2
  47. package/dist/vue/index.d.mts +6 -0
  48. package/dist/vue/index.d.ts +6 -0
  49. package/dist/vue/index.mjs +2 -2
  50. package/package.json +16 -1
@@ -0,0 +1,80 @@
1
+ type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
+ interface TriggerConfig {
3
+ start?: string;
4
+ end?: string;
5
+ }
6
+
7
+ interface ScrollRevealFrom {
8
+ /** Start opacity (0–1). Animates to 1. */
9
+ opacity?: number;
10
+ /** Start translateX in px. Animates to 0. */
11
+ x?: number;
12
+ /** Start translateY in px. Animates to 0. */
13
+ y?: number;
14
+ /** Start scale. Animates to 1. */
15
+ scale?: number;
16
+ /** Start rotate in degrees. Animates to 0. */
17
+ rotate?: number;
18
+ /** Start rotateX in degrees. Animates to 0. */
19
+ rotateX?: number;
20
+ /** Start rotateY in degrees. Animates to 0. */
21
+ rotateY?: number;
22
+ }
23
+ type ScrollRevealPreset = 'fadeUp' | 'fadeDown' | 'fadeLeft' | 'fadeRight' | 'scale' | 'flip' | 'flipX';
24
+ interface ScrollRevealOptions {
25
+ /**
26
+ * Named preset for the reveal animation. Default: `'fadeUp'`.
27
+ * Custom `from` overrides the preset when both are provided.
28
+ *
29
+ * Presets:
30
+ * - `fadeUp` — opacity 0→1, y +32→0 (default)
31
+ * - `fadeDown` — opacity 0→1, y -32→0
32
+ * - `fadeLeft` — opacity 0→1, x +32→0
33
+ * - `fadeRight` — opacity 0→1, x -32→0
34
+ * - `scale` — opacity 0→1, scale 0.88→1
35
+ * - `flip` — opacity 0→1, rotateX 20→0
36
+ * - `flipX` — opacity 0→1, rotateY 20→0
37
+ */
38
+ preset?: ScrollRevealPreset;
39
+ /** Custom start state. Keys: opacity, x, y, scale, rotate, rotateX, rotateY. */
40
+ from?: ScrollRevealFrom;
41
+ /**
42
+ * Delay between each element's animation start (seconds).
43
+ * Elements are staggered by offsetting their trigger window.
44
+ * Default: 0.08.
45
+ */
46
+ stagger?: number;
47
+ /** Animation easing. Default: `'ease-out'`. */
48
+ easing?: EasingName | ((t: number) => number);
49
+ /** Freeze at max progress — don't reverse on scroll back. Default: true. */
50
+ once?: boolean;
51
+ /** Override the default trigger window. */
52
+ trigger?: TriggerConfig;
53
+ /** Fires when the first element enters the trigger zone. */
54
+ onEnter?: () => void;
55
+ /** Fires when the last element leaves the trigger zone. */
56
+ onLeave?: () => void;
57
+ }
58
+ interface ScrollRevealInstance {
59
+ /** Remove all animations and restore original styles. */
60
+ destroy: () => void;
61
+ }
62
+ /**
63
+ * Reveal elements as they scroll into view.
64
+ *
65
+ * The zero-config replacement for AOS, ScrollReveal.js, and GSAP + ScrollTrigger
66
+ * for the most common scroll animation use case — in one function call.
67
+ *
68
+ * @example
69
+ * // Fade up (default)
70
+ * scrollReveal('.card');
71
+ *
72
+ * // Custom from state
73
+ * scrollReveal('.feature', { from: { opacity: 0, y: 40, scale: 0.95 } });
74
+ *
75
+ * // Named preset with stagger
76
+ * scrollReveal('.item', { preset: 'fadeLeft', stagger: 0.1 });
77
+ */
78
+ declare function scrollReveal(target: string | NodeList | Element[], options?: ScrollRevealOptions): ScrollRevealInstance;
79
+
80
+ export { type ScrollRevealFrom, type ScrollRevealInstance, type ScrollRevealOptions, type ScrollRevealPreset, scrollReveal };
@@ -0,0 +1,80 @@
1
+ type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
+ interface TriggerConfig {
3
+ start?: string;
4
+ end?: string;
5
+ }
6
+
7
+ interface ScrollRevealFrom {
8
+ /** Start opacity (0–1). Animates to 1. */
9
+ opacity?: number;
10
+ /** Start translateX in px. Animates to 0. */
11
+ x?: number;
12
+ /** Start translateY in px. Animates to 0. */
13
+ y?: number;
14
+ /** Start scale. Animates to 1. */
15
+ scale?: number;
16
+ /** Start rotate in degrees. Animates to 0. */
17
+ rotate?: number;
18
+ /** Start rotateX in degrees. Animates to 0. */
19
+ rotateX?: number;
20
+ /** Start rotateY in degrees. Animates to 0. */
21
+ rotateY?: number;
22
+ }
23
+ type ScrollRevealPreset = 'fadeUp' | 'fadeDown' | 'fadeLeft' | 'fadeRight' | 'scale' | 'flip' | 'flipX';
24
+ interface ScrollRevealOptions {
25
+ /**
26
+ * Named preset for the reveal animation. Default: `'fadeUp'`.
27
+ * Custom `from` overrides the preset when both are provided.
28
+ *
29
+ * Presets:
30
+ * - `fadeUp` — opacity 0→1, y +32→0 (default)
31
+ * - `fadeDown` — opacity 0→1, y -32→0
32
+ * - `fadeLeft` — opacity 0→1, x +32→0
33
+ * - `fadeRight` — opacity 0→1, x -32→0
34
+ * - `scale` — opacity 0→1, scale 0.88→1
35
+ * - `flip` — opacity 0→1, rotateX 20→0
36
+ * - `flipX` — opacity 0→1, rotateY 20→0
37
+ */
38
+ preset?: ScrollRevealPreset;
39
+ /** Custom start state. Keys: opacity, x, y, scale, rotate, rotateX, rotateY. */
40
+ from?: ScrollRevealFrom;
41
+ /**
42
+ * Delay between each element's animation start (seconds).
43
+ * Elements are staggered by offsetting their trigger window.
44
+ * Default: 0.08.
45
+ */
46
+ stagger?: number;
47
+ /** Animation easing. Default: `'ease-out'`. */
48
+ easing?: EasingName | ((t: number) => number);
49
+ /** Freeze at max progress — don't reverse on scroll back. Default: true. */
50
+ once?: boolean;
51
+ /** Override the default trigger window. */
52
+ trigger?: TriggerConfig;
53
+ /** Fires when the first element enters the trigger zone. */
54
+ onEnter?: () => void;
55
+ /** Fires when the last element leaves the trigger zone. */
56
+ onLeave?: () => void;
57
+ }
58
+ interface ScrollRevealInstance {
59
+ /** Remove all animations and restore original styles. */
60
+ destroy: () => void;
61
+ }
62
+ /**
63
+ * Reveal elements as they scroll into view.
64
+ *
65
+ * The zero-config replacement for AOS, ScrollReveal.js, and GSAP + ScrollTrigger
66
+ * for the most common scroll animation use case — in one function call.
67
+ *
68
+ * @example
69
+ * // Fade up (default)
70
+ * scrollReveal('.card');
71
+ *
72
+ * // Custom from state
73
+ * scrollReveal('.feature', { from: { opacity: 0, y: 40, scale: 0.95 } });
74
+ *
75
+ * // Named preset with stagger
76
+ * scrollReveal('.item', { preset: 'fadeLeft', stagger: 0.1 });
77
+ */
78
+ declare function scrollReveal(target: string | NodeList | Element[], options?: ScrollRevealOptions): ScrollRevealInstance;
79
+
80
+ export { type ScrollRevealFrom, type ScrollRevealInstance, type ScrollRevealOptions, type ScrollRevealPreset, scrollReveal };
@@ -0,0 +1 @@
1
+ function Ee({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),u=Math.sqrt(r),s=0,m=[];for(let c=0;c<t;c++){let p=Math.pow(u,c);m.push(p),s+=p;}let l=[0],a=0;for(let c=0;c<t;c++)a+=m[c]/s,l.push(a);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let p=0;p<t;p++)if(c<=l[p+1]){let d=(c-l[p])/(l[p+1]-l[p]);if(p===0)return d*(2-d);let v=1-Math.pow(r,p);return v+(1-v)*(2*d-1)*(2*d-1)}return 1}}function xe({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),u=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-u)*(2*Math.PI)/r)+1}var j={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Ee(),elastic:xe()};function G(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function te(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function ne(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function Se(e,n,t){return Math.min(t,Math.max(n,e))}function B(e,n,t,r){return t===n?0:Se((e-n)/(t-n)*r,0,1)}function U(e,n,t,r,u){let s=te(e.top,e.height,n,r.element)-ne(r.viewport,t),m=te(e.top,e.height,n,u.element)-ne(u.viewport,t);return {tStart:s,tEnd:m}}function re(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function oe(e,n,t){let r=re(e),u=re(n);return !r||!u?e:`rgb(${Math.round(r[0]+(u[0]-r[0])*t)},${Math.round(r[1]+(u[1]-r[1])*t)},${Math.round(r[2]+(u[2]-r[2])*t)})`}var se=new Map;function ie(e,n){se.set(e,n);}function ae(e){se.delete(e);}function Me(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function ue(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let u=[],s=[],m=r[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let a=l.match(/^([-+]?[\d.eE]+)(.*)$/);u.push(a?parseFloat(a[1]):0),s.push(a?a[2]:"");}n.push({fn:r[1],nums:u,units:s});}return n}function Pe(e,n,t){let r=ue(e),u=ue(n);return r.length===0||r.length!==u.length?t<1?e:n:r.map((s,m)=>{let l=u[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?t<1?`${s.fn}(${s.nums.map((a,c)=>`${a}${s.units[c]}`).join(", ")})`:`${l.fn}(${l.nums.map((a,c)=>`${a}${l.units[c]}`).join(", ")})`:`${s.fn}(${s.nums.map((a,c)=>`${a+(l.nums[c]-a)*t}${s.units[c]}`).join(", ")})`}).join(" ")}function ce(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),u=String(n);if(Me(r))return oe(r,u,t);if(r.includes("("))return Pe(r,u,t);let s=r.match(/^([-+]?[\d.]+)(.*)$/),m=u.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),a=parseFloat(m[1]);return `${l+(a-l)*t}${s[2]||m[2]}`}return t<1?r:u}function $e(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var le={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},Ae=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Te=0;function Le(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function me(e,n){let t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return t;let{props:r,trigger:u={},easing:s="ease-out",speed:m=1,once:l=false,axis:a="y",scrollContainer:c,native:p=true,velocityScale:d=false,onProgress:v,onComplete:R,onEnter:F,onLeave:P,onEnterBack:$,onLeaveBack:I}=n,k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof s=="function"?s:j[s]??j["ease-out"],Z=G(u.start??"top bottom"),J=G(u.end??"bottom top"),f=typeof c=="string"?document.querySelector(c):c??null,w=Object.entries(r).map(([o,i])=>({prop:$e(o),from:Array.isArray(i)?i[0]:"",to:Array.isArray(i)?i[1]:i}));function fe(){let o=window.getComputedStyle(e);for(let i of w)i.from===""&&(i.from=o.getPropertyValue(i.prop).trim()||"0");}function ge(){for(let o of w)e.style.setProperty(o.prop,String(o.to));}if(k)return ge(),R?.(),t;fe();function de(){if(!p||!Le()||typeof s!="string"||!(s in le)||a!=="y"||f||l||m!==1||v||R||F||P||$||I||d!==false||(u.start??"top bottom").trim()!=="top bottom"||(u.end??"bottom top").trim()!=="bottom top")return false;for(let o of w)if(!Ae.has(o.prop))return false;return true}function be(){let o=`ssd-a-${++Te}`,i=w.map(g=>`${g.prop}:${g.from}`).join(";"),y=w.map(g=>`${g.prop}:${g.to}`).join(";"),h=document.createElement("style");h.setAttribute("data-ssd-animate",""),h.textContent=`@keyframes ${o}{from{${i}}to{${y}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${le[s]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(h),e.classList.add(o);let b=()=>a==="x"?window.scrollX:window.scrollY,D=()=>a==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(o),h.remove();},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(g){let N=Math.min(1,Math.max(0,g));e.classList.remove(o);for(let C of w)e.style.setProperty(C.prop,ce(C.from,C.to,N));},getProgress(){let g=e.getBoundingClientRect(),N=b(),C=D(),{tStart:ve,tEnd:we}=U({top:g.top,height:g.height},N,C,Z,J);return H(B(N,ve,we,m))}}}if(de())return be();let E=0,A=0,x=0,O=false,S=false,T=-1,L=0,V=false,M=NaN,Y=-1,K=0,q=()=>f?a==="x"?f.scrollLeft:f.scrollTop:a==="x"?window.scrollX:window.scrollY,he=()=>f?a==="x"?f.clientWidth:f.clientHeight:a==="x"?window.innerWidth:window.innerHeight;function Q(){let o=e.getBoundingClientRect(),i,y;if(f){let b=f.getBoundingClientRect();i=a==="x"?o.left-b.left+f.scrollLeft:o.top-b.top+f.scrollTop,y=a==="x"?o.width:o.height;}else i=a==="x"?o.left:o.top,y=a==="x"?o.width:o.height;let h=U({top:i,height:y},q(),he(),Z,J);E=h.tStart,A=h.tEnd;}function X(o){e.style.setProperty("--scroll-draw-progress",String(o));for(let i of w)e.style.setProperty(i.prop,ce(i.from,i.to,o));v?.(o);}function ye(o){if(isNaN(M)){M=o;return}M<=0&&o>0?F?.():M>0&&o<=0&&I?.(),M<1&&o>=1?P?.():M>=1&&o<1&&$?.(),M=o;}function z(){if(!O||S)return;let o=performance.now(),i=q(),y=m;if(d!==false){let D=o-K,g=D>0?Math.abs(i-(Y<0?i:Y))/D:0;y=m*Math.max(.2,1+g*(typeof d=="number"?d:1)*.04);}Y=i,K=o;let h=A===E?0:(i-E)/(A-E);ye(h);let b=H(B(i,E,A,y));l&&(T=Math.max(T,b),b=T),L=b,X(b),b>=1&&!V?(V=true,R?.()):b<1&&!l&&(V=false),x=requestAnimationFrame(z);}Q();{let o=H(B(q(),E,A,m));l&&o>0&&(T=o),L=o,X(o);}let ee=new IntersectionObserver(o=>{o.forEach(i=>{O=i.isIntersecting,O&&!S?x=requestAnimationFrame(z):cancelAnimationFrame(x);});},{root:f??null}),W;function _(){clearTimeout(W),W=setTimeout(Q,150);}return window.addEventListener("resize",_),window.addEventListener("orientationchange",_),ee.observe(e),ie(e,{type:"animate",getProgress:()=>L,getTrigger:()=>({tStart:E,tEnd:A})}),{destroy(){cancelAnimationFrame(x),ee.disconnect(),window.removeEventListener("resize",_),window.removeEventListener("orientationchange",_),clearTimeout(W),ae(e);},replay(){T=-1,V=false,L=0,S=false,X(0);},pause(){S=true,cancelAnimationFrame(x);},resume(){S&&(S=false,O&&(x=requestAnimationFrame(z)));},seek(o){let i=Math.min(1,Math.max(0,o));L=i,T=i,S=true,cancelAnimationFrame(x),X(i);},getProgress(){return L}}}var Re={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function Ie(e){let n={};e.opacity!==void 0&&(n.opacity=[e.opacity,1]);let t=[],r=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),t.length>0&&(n.transform=[t.join(" "),r.join(" ")]),n}function Ne(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}var pe={destroy:()=>{}};function De(e,n={}){if(typeof window>"u")return pe;let t=Ne(e);if(!t.length)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollReveal: no elements found:",e),pe;let{preset:r="fadeUp",from:u,stagger:s=.08,easing:m="ease-out",once:l=true,trigger:a,onEnter:c,onLeave:p}=n,d={...Re[r],...u},v=Ie(d),R=Math.min(s*4,4),F=t.map((P,$)=>{let I=Math.max(50,88-$*R),k=Math.max(20,I-35);return me(P,{props:v,easing:m,once:l,native:false,trigger:a??{start:`top ${I}%`,end:`top ${k}%`},onEnter:$===0?c:void 0,onLeave:$===t.length-1?p:void 0})});return {destroy(){F.forEach(P=>P.destroy());}}}export{De as scrollReveal};
@@ -1,3 +1,3 @@
1
- 'use strict';var solidJs=require('solid-js');function Tt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),u=Math.sqrt(t),s=0,m=[];for(let h=0;h<n;h++){let $=Math.pow(u,h);m.push($),s+=$;}let l=[0],c=0;for(let h=0;h<n;h++)c+=m[h]/s,l.push(c);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let $=0;$<n;$++)if(h<=l[$+1]){let B=(h-l[$])/(l[$+1]-l[$]);if($===0)return B*(2-B);let S=1-Math.pow(t,$);return S+(1-S)*(2*B-1)*(2*B-1)}return 1}}function xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),u=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-u)*(2*Math.PI)/t)+1}var ie={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Tt(),elastic:xt()};function ae(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function st(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function it(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function At(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:At((e-r)/(n-r)*t,0,1)}function pe(e,r,n,t,u){let s=st(e.top,e.height,r,t.element)-it(t.viewport,n),m=st(e.top,e.height,r,u.element)-it(u.viewport,n);return {tStart:s,tEnd:m}}function at(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,r,n){let t=at(e),u=at(r);return !t||!u?e:`rgb(${Math.round(t[0]+(u[0]-t[0])*n)},${Math.round(t[1]+(u[1]-t[1])*n)},${Math.round(t[2]+(u[2]-t[2])*n)})`}var lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};function ct(e,r){process.env.NODE_ENV!=="production"&&console.warn(`[svg-scroll-draw] ${e}`,r);}var ut={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},Mt=0;function Lt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function $t(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ct("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ct("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ct(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function u(){let s=n==="x"?window.scrollX:window.scrollY,m=e-s,l=r-s,c=n==="x";t.innerHTML=`
1
+ 'use strict';var solidJs=require('solid-js');function Tt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),u=Math.sqrt(t),s=0,m=[];for(let h=0;h<n;h++){let P=Math.pow(u,h);m.push(P),s+=P;}let l=[0],c=0;for(let h=0;h<n;h++)c+=m[h]/s,l.push(c);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let P=0;P<n;P++)if(h<=l[P+1]){let R=(h-l[P])/(l[P+1]-l[P]);if(P===0)return R*(2-R);let E=1-Math.pow(t,P);return E+(1-E)*(2*R-1)*(2*R-1)}return 1}}function xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),u=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-u)*(2*Math.PI)/t)+1}var ae={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Tt(),elastic:xt()};function le(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function st(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function it(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Mt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:Mt((e-r)/(n-r)*t,0,1)}function ye(e,r,n,t,u){let s=st(e.top,e.height,r,t.element)-it(t.viewport,n),m=st(e.top,e.height,r,u.element)-it(u.viewport,n);return {tStart:s,tEnd:m}}function at(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,r,n){let t=at(e),u=at(r);return !t||!u?e:`rgb(${Math.round(t[0]+(u[0]-t[0])*n)},${Math.round(t[1]+(u[1]-t[1])*n)},${Math.round(t[2]+(u[2]-t[2])*n)})`}var lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};function ct(e,r){process.env.NODE_ENV!=="production"&&console.warn(`[svg-scroll-draw] ${e}`,r);}var ut={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},At=0;function Lt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function $t(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ct("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ct("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ct(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function u(){let s=n==="x"?window.scrollX:window.scrollY,m=e-s,l=r-s,c=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${m}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${l}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",u,{passive:true}),u(),t}function Ue(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),u=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let m=parseFloat(s),l=t[u++]??m;return String(+(m+(l-m)*n).toFixed(4))})}function Ze(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,u=n?{...lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:l=1,fade:c=false,easing:h="linear",trigger:$={},stagger:B=0,direction:S="forward",once:Q=false,debug:he=false,axis:R="y",scrollContainer:ee,autoReverse:te=false,delay:q=0,strokeColor:T,strokeWidth:A,fillOpacity:w,waypoints:b,velocityScale:P=false,threshold:I=0,rootMargin:G="0px",repeat:C=0,repeatDelay:F=0,morphTo:M,clip:V,autoplay:ne=false,duration:H=1e3,native:W=true,onProgress:d,onStart:L,onComplete:g,onEnter:y,onLeave:X,onEnterBack:xe,onLeaveBack:be}=u,we=V===true?"left":typeof V=="string"?V:false,de=typeof h=="function"?h:ie[h]??ie.linear,Ne=ae($.start??"top bottom"),ke=ae($.end??"bottom top"),U=typeof ee=="string"?document.querySelector(ee):ee??null,i=Array.isArray(T)?T[0]:null,p=Array.isArray(T)?T[1]:typeof T=="string"?T:null,Y=Array.isArray(A)?A[0]:null,N=Array.isArray(A)?A[1]:typeof A=="number"?A:null,Z=Array.isArray(w)?w[0]:null,oe=Array.isArray(w)?w[1]:typeof w=="number"?w:null;function J(o){let a=o*100;switch(we){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let _=we?[]:Array.from(e.querySelectorAll(m)),O=[],fe=[],ge=0,Me=0,se=false,ye=false,re=0,Ve=false,ve=-1,ze=-1,le=false,Ie=0,Ae=0,Le,Xe=null,$e=new Set,qe=-1,nt=performance.now(),De=NaN;function Re(){return U?R==="x"?U.scrollLeft:U.scrollTop:R==="x"?window.scrollX:window.scrollY}function rt(){return U?R==="x"?U.clientWidth:U.clientHeight:R==="x"?window.innerWidth:window.innerHeight}function ot(){let o=e.getBoundingClientRect(),a,E,j;if(U){let ue=U.getBoundingClientRect();a=R==="x"?o.left-ue.left+U.scrollLeft:o.top-ue.top+U.scrollTop,E=R==="x"?o.width:o.height,j=Re();}else a=R==="x"?o.left:o.top,E=R==="x"?o.width:o.height,j=Re();let ce=pe({top:a,height:E},j,rt(),Ne,ke);ge=ce.tStart,Me=ce.tEnd,he&&process.env.NODE_ENV!=="production"&&(Xe?.remove(),Xe=Ct(ge,Me,R));}function wt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),we){let E=a==="reverse"?1-o:o;e.style.clipPath=J(E);return}_.forEach((E,j)=>{E.style.strokeDashoffset=a==="reverse"?`${O[j]*o}`:`${O[j]*(1-o)}`,c&&(E.style.opacity=a==="reverse"?`${1-o}`:`${o}`),i&&p?E.style.stroke=He(i,p,o):p&&(E.style.stroke=p),Y!==null&&N!==null?E.style.strokeWidth=`${Y+(N-Y)*o}`:N!==null&&(E.style.strokeWidth=`${N}`),Z!==null&&oe!==null?E.style.fillOpacity=`${Z+(oe-Z)*o}`:oe!==null&&(E.style.fillOpacity=`${oe}`),M&&E.tagName.toLowerCase()==="path"&&fe[j]&&E.setAttribute("d",Ue(fe[j],M,o));});}function We(){if(e.style.setProperty("--scroll-draw-progress","0"),we){e.style.clipPath=J(0);return}_.forEach((o,a)=>{o.style.strokeDasharray=`${O[a]}`,o.style.strokeDashoffset=S==="reverse"?"0":`${O[a]}`,c?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",i&&(o.style.stroke=i),Y!==null&&(o.style.strokeWidth=`${Y}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&fe[a]&&o.setAttribute("d",fe[a]);});}if(_.forEach(o=>{$t(o);let a=Ge(o);O.push(a),o.tagName.toLowerCase()==="path"?fe.push(o.getAttribute("d")??""):fe.push(""),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=S==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),p&&(o.style.stroke=p),N!==null&&(o.style.strokeWidth=`${N}`),oe!==null&&(o.style.fillOpacity=`${oe}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=S==="reverse"?"0":`${a}`,c?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",i&&(o.style.stroke=i),Y!==null&&(o.style.strokeWidth=`${Y}`),Z!==null&&(o.style.fillOpacity=`${Z}`));}),we){if(s)return e.style.clipPath=J(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=J(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};function vt(){return !(W===false||!Lt()||!_.length||typeof h!="string"||!(h in ut)||we||R!=="y"||U||l!==1||B!==0||Q||te||P!==false||M||b||C||q>0||d||L||g||y||X||xe||be||T!=null||A!=null||w!=null||($.start??"top bottom").trim()!=="top bottom"||($.end??"bottom top").trim()!=="bottom top")}function Et(){let o=`svg-scroll-draw-${++Mt}`,a=S==="reverse"?"0":"var(--ssd-len)",E=S==="reverse"?"var(--ssd-len)":"0",j=`stroke-dashoffset:${a};`,ce=`stroke-dashoffset:${E};`;c&&(j+=`opacity:${S==="reverse"?1:0};`,ce+=`opacity:${S==="reverse"?0:1};`);let ue=document.createElement("style");ue.setAttribute("data-svg-scroll-draw",""),ue.textContent=`@keyframes ${o}{from{${j}}to{${ce}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ut[h]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ue);function me(f,x){f.style.setProperty("--ssd-len",String(O[x])),f.style.strokeDasharray=`${O[x]}`,f.style.strokeDashoffset="",f.style.opacity="",f.style.animationPlayState="",f.classList.add(o);}_.forEach(me);let v=false,k=-1;function D(){if(k>=0)return k;let f=e.getBoundingClientRect(),{tStart:x,tEnd:z}=pe({top:f.top,height:f.height},Re(),rt(),Ne,ke);return de(K(Re(),x,z,l))}return {destroy(){_.forEach(f=>{f.classList.remove(o),f.style.removeProperty("--ssd-len"),f.style.animationPlayState="";}),ue.remove();},replay(){v=false,k=-1,_.forEach(me);},pause(){v=true,_.forEach(f=>{f.style.animationPlayState="paused";});},resume(){v&&(v=false,_.forEach(f=>{f.style.animationPlayState="running";}));},seek(f){let x=Math.min(1,Math.max(0,f));k=x,v=true,_.forEach((z,Oe)=>{z.classList.remove(o),z.style.strokeDashoffset=S==="reverse"?`${O[Oe]*x}`:`${O[Oe]*(1-x)}`,c&&(z.style.opacity=S==="reverse"?`${1-x}`:`${x}`);});},getProgress(){return D()}}}if(vt())return Et();function St(){let o=Math.max(1,H),a=0,E=0;function j(D){let f=true;if(we){let x=Math.min(1,Math.max(0,D/o)),z=de(x);Ie=z,e.style.setProperty("--scroll-draw-progress",String(z)),e.style.clipPath=J(S==="reverse"?1-z:z),d?.(z),x<1&&(f=false);}else _.forEach((x,z)=>{let Oe=z*B*o,Fe=Math.min(1,Math.max(0,(D-Oe)/o)),Ee=de(Fe);x.style.strokeDashoffset=S==="reverse"?`${O[z]*Ee}`:`${O[z]*(1-Ee)}`,c&&(x.style.opacity=S==="reverse"?`${1-Ee}`:`${Ee}`),i&&p?x.style.stroke=He(i,p,Ee):p&&(x.style.stroke=p),Y!==null&&N!==null?x.style.strokeWidth=`${Y+(N-Y)*Ee}`:N!==null&&(x.style.strokeWidth=`${N}`),Z!==null&&oe!==null?x.style.fillOpacity=`${Z+(oe-Z)*Ee}`:oe!==null&&(x.style.fillOpacity=`${oe}`),M&&x.tagName.toLowerCase()==="path"&&fe[z]&&x.setAttribute("d",Ue(fe[z],M,Ee)),z===0&&(d?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Fe<1&&(f=false);});if(b){let x=Math.min(1,Math.max(0,D/o)),z=de(x);for(let Oe in b){let Fe=parseFloat(Oe);z>=Fe&&!$e.has(Fe)&&($e.add(Fe),b[Oe]?.());}}return f}function ce(D){if(le)return;let f=D-a;ye||(ye=true,L?.());let x=j(f);if(x&&!se){se=true,j(o*(1+Math.max(0,_.length-1)*B)),g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{a=performance.now(),ye=false,se=false,$e.clear(),We(),re=requestAnimationFrame(ce);},F));return}x||(re=requestAnimationFrame(ce));}function ue(){cancelAnimationFrame(re),clearTimeout(Le),a=performance.now(),E=0,le=false,ye=false,se=false,Ae=0,$e.clear(),We(),re=requestAnimationFrame(ce);}let me=new IntersectionObserver(D=>{D.forEach(f=>{f.isIntersecting&&!(Q&&se)?ue():!f.isIntersecting&&!Q&&!se&&(cancelAnimationFrame(re),clearTimeout(Le),a=null);});},{root:U??null,threshold:I,rootMargin:G}),v;function k(){clearTimeout(v),v=setTimeout(()=>{_.forEach((D,f)=>{O[f]=Ge(D),D.style.strokeDasharray=`${O[f]}`;});},150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),q>0?setTimeout(()=>me.observe(e),q):me.observe(e),{destroy(){cancelAnimationFrame(re),clearTimeout(Le),me.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(v);},replay(){Ae=0,ue();},pause(){le||(le=true,E=performance.now()-a,cancelAnimationFrame(re));},resume(){le&&(le=false,a=performance.now()-E,re=requestAnimationFrame(ce));},seek(D){let f=Math.min(1,Math.max(0,D));Ie=f,le=true,E=f*o,a=performance.now()-E,cancelAnimationFrame(re),j(E);},getProgress(){return Ie}}}if(ne)return St();ot();function _e(){if(!Ve||le)return;let o=performance.now(),a=Re(),E=l;if(P!==false){let v=o-nt,k=v>0?Math.abs(a-(qe<0?a:qe))/v:0;E=l*Math.max(.2,1+k*(typeof P=="number"?P:1)*.04);}qe=a,nt=o;let j=te?ze===-1||a>=ze?"forward":"reverse":S;ze=a;let ce=Me-ge,ue=true,me=ce===0?0:(a-ge)/ce;if(isNaN(De)||(De<=0&&me>0?y?.():De>0&&me<=0&&be?.(),De<1&&me>=1?X?.():De>=1&&me<1&&xe?.()),De=me,we){let v=de(K(a,ge,Me,E));Q&&!te&&(ve=Math.max(ve,v),v=ve),Ie=v,e.style.setProperty("--scroll-draw-progress",String(v));let k=j==="reverse"?1-v:v;e.style.clipPath=J(k),d?.(v),!ye&&K(a,ge,Me,E)>0&&(ye=true,L?.()),v>=1&&!se?(se=true,g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,ye=false,se=false,e.style.clipPath=J(0);},F))):v<1&&!Q&&(se=false),re=requestAnimationFrame(_e);return}if(_.forEach((v,k)=>{let D=k*B*ce,f=de(K(a,ge+D,Me+D,E));Q&&!te&&(ve=Math.max(ve,f),f=ve),Ie=f,v.style.strokeDashoffset=j==="reverse"?`${O[k]*f}`:`${O[k]*(1-f)}`,c&&(v.style.opacity=j==="reverse"?`${1-f}`:`${f}`),i&&p?v.style.stroke=He(i,p,f):p&&(v.style.stroke=p),Y!==null&&N!==null?v.style.strokeWidth=`${Y+(N-Y)*f}`:N!==null&&(v.style.strokeWidth=`${N}`),Z!==null&&oe!==null?v.style.fillOpacity=`${Z+(oe-Z)*f}`:oe!==null&&(v.style.fillOpacity=`${oe}`),M&&v.tagName.toLowerCase()==="path"&&fe[k]&&v.setAttribute("d",Ue(fe[k],M,f)),k===0&&(d?.(f),e.style.setProperty("--scroll-draw-progress",String(f))),f<1&&(ue=false);}),b){let v=de(K(a,ge,Me,E));for(let k in b){let D=parseFloat(k);v>=D&&!$e.has(D)&&($e.add(D),b[k]?.());}}!ye&&K(a,ge,Me,E)>0&&(ye=true,L?.()),ue&&!se?(se=true,g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,ye=false,se=false,$e.clear(),We();},F))):!ue&&!Q&&(se=false),re=requestAnimationFrame(_e);}let Ye=new IntersectionObserver(o=>{o.forEach(a=>{Ve=a.isIntersecting,Ve&&!le?re=requestAnimationFrame(_e):cancelAnimationFrame(re);});},{root:U??null,threshold:I,rootMargin:G}),je;function Be(){clearTimeout(je),je=setTimeout(()=>{_.forEach((o,a)=>{O[a]=Ge(o),o.style.strokeDasharray=`${O[a]}`;}),ot();},150);}return window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be),q>0?setTimeout(()=>Ye.observe(e),q):Ye.observe(e),{destroy(){cancelAnimationFrame(re),clearTimeout(Le),Ye.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(je),Xe?.remove();},replay(){ve=-1,ze=-1,qe=-1,ye=false,se=false,Ae=0,le=false,$e.clear(),clearTimeout(Le),We();},pause(){le=true,cancelAnimationFrame(re);},resume(){le&&(le=false,Ve&&(re=requestAnimationFrame(_e)));},seek(o){let a=Math.min(1,Math.max(0,o));Ie=a,ve=a,le=true,cancelAnimationFrame(re),wt(a,S);},getProgress(){return Ie}}}var ft=new Map;function Ce(e,r){ft.set(e,r);}function Pe(e){ft.delete(e);}function Pt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function mt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let u=[],s=[],m=t[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let c=l.match(/^([-+]?[\d.eE]+)(.*)$/);u.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}r.push({fn:t[1],nums:u,units:s});}return r}function It(e,r,n){let t=mt(e),u=mt(r);return t.length===0||t.length!==u.length?n<1?e:r:t.map((s,m)=>{let l=u[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((c,h)=>`${c}${s.units[h]}`).join(", ")})`:`${l.fn}(${l.nums.map((c,h)=>`${c}${l.units[h]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,h)=>`${c+(l.nums[h]-c)*n}${s.units[h]}`).join(", ")})`}).join(" ")}function pt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),u=String(r);if(Pt(t))return He(t,u,n);if(t.includes("("))return It(t,u,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),m=u.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),c=parseFloat(m[1]);return `${l+(c-l)*n}${s[2]||m[2]}`}return n<1?t:u}function Ot(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var dt={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dt=0;function Ft(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Je(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:u={},easing:s="ease-out",speed:m=1,once:l=false,axis:c="y",scrollContainer:h,native:$=true,onProgress:B,onComplete:S,onEnter:Q,onLeave:he,onEnterBack:R,onLeaveBack:ee}=r,te=window.matchMedia("(prefers-reduced-motion: reduce)").matches,q=typeof s=="function"?s:ie[s]??ie["ease-out"],T=ae(u.start??"top bottom"),A=ae(u.end??"bottom top"),w=typeof h=="string"?document.querySelector(h):h??null,b=Object.entries(t).map(([i,p])=>({prop:Ot(i),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function P(){let i=window.getComputedStyle(e);for(let p of b)p.from===""&&(p.from=i.getPropertyValue(p.prop).trim()||"0");}function I(){for(let i of b)e.style.setProperty(i.prop,String(i.to));}if(te)return I(),S?.(),n;P();function G(){if(!$||!Ft()||typeof s!="string"||!(s in dt)||c!=="y"||w||l||m!==1||B||S||Q||he||R||ee||(u.start??"top bottom").trim()!=="top bottom"||(u.end??"bottom top").trim()!=="bottom top")return false;for(let i of b)if(!kt.has(i.prop))return false;return true}function C(){let i=`ssd-a-${++Dt}`,p=b.map(J=>`${J.prop}:${J.from}`).join(";"),Y=b.map(J=>`${J.prop}:${J.to}`).join(";"),N=document.createElement("style");N.setAttribute("data-ssd-animate",""),N.textContent=`@keyframes ${i}{from{${p}}to{${Y}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${dt[s]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(i);let Z=()=>c==="x"?window.scrollX:window.scrollY,oe=()=>c==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),N.remove();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(J){let _=Math.min(1,Math.max(0,J));e.classList.remove(i);for(let O of b)e.style.setProperty(O.prop,pt(O.from,O.to,_));},getProgress(){let J=e.getBoundingClientRect(),_=Z(),O=oe(),{tStart:fe,tEnd:ge}=pe({top:J.top,height:J.height},_,O,T,A);return q(K(_,fe,ge,m))}}}if(G())return C();let F=0,M=0,V=0,ne=false,H=false,W=-1,d=0,L=false,g=NaN,y=()=>w?c==="x"?w.scrollLeft:w.scrollTop:c==="x"?window.scrollX:window.scrollY,X=()=>w?c==="x"?w.clientWidth:w.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function xe(){let i=e.getBoundingClientRect(),p,Y;if(w){let Z=w.getBoundingClientRect();p=c==="x"?i.left-Z.left+w.scrollLeft:i.top-Z.top+w.scrollTop,Y=c==="x"?i.width:i.height;}else p=c==="x"?i.left:i.top,Y=c==="x"?i.width:i.height;let N=pe({top:p,height:Y},y(),X(),T,A);F=N.tStart,M=N.tEnd;}function be(i){e.style.setProperty("--scroll-draw-progress",String(i));for(let p of b)e.style.setProperty(p.prop,pt(p.from,p.to,i));B?.(i);}function we(i){if(isNaN(g)){g=i;return}g<=0&&i>0?Q?.():g>0&&i<=0&&ee?.(),g<1&&i>=1?he?.():g>=1&&i<1&&R?.(),g=i;}function de(){if(!ne||H)return;let i=M===F?0:(y()-F)/(M-F);we(i);let p=q(K(y(),F,M,m));l&&(W=Math.max(W,p),p=W),d=p,be(p),p>=1&&!L?(L=true,S?.()):p<1&&!l&&(L=false),V=requestAnimationFrame(de);}xe();{let i=q(K(y(),F,M,m));l&&i>0&&(W=i),d=i,be(i);}let Ne=new IntersectionObserver(i=>{i.forEach(p=>{ne=p.isIntersecting,ne&&!H?V=requestAnimationFrame(de):cancelAnimationFrame(V);});},{root:w??null}),ke;function U(){clearTimeout(ke),ke=setTimeout(xe,150);}return window.addEventListener("resize",U),window.addEventListener("orientationchange",U),Ne.observe(e),Ce(e,{type:"animate",getProgress:()=>d,getTrigger:()=>({tStart:F,tEnd:M})}),{destroy(){cancelAnimationFrame(V),Ne.disconnect(),window.removeEventListener("resize",U),window.removeEventListener("orientationchange",U),clearTimeout(ke),Pe(e);},replay(){W=-1,L=false,d=0,H=false,be(0);},pause(){H=true,cancelAnimationFrame(V);},resume(){H&&(H=false,ne&&(V=requestAnimationFrame(de)));},seek(i){let p=Math.min(1,Math.max(0,i));d=p,W=p,H=true,cancelAnimationFrame(V),be(p);},getProgress(){return d}}}var Ke={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qe(e,r){if(typeof window>"u")return Ke;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollCounter: element not found:",e),Ke;let t=n,{from:u=0,to:s,format:m,easing:l="ease-out",trigger:c={},once:h=true,decimals:$,onComplete:B}=r,S=$!==void 0?d=>d.toFixed($):m??(d=>String(Math.round(d))),Q=typeof l=="function"?l:ie[l]??ie["ease-out"],he=ae(c.start??"top 80%"),R=ae(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=S(s),B?.(),Ke;t.textContent=S(u);let te=0,q=0,T=0,A=false,w=false,b=-1,P=0,I=false,G=()=>window.scrollY,C=()=>window.innerHeight;function F(){let d=t.getBoundingClientRect(),L=pe({top:d.top,height:d.height},G(),C(),he,R);te=L.tStart,q=L.tEnd;}function M(d){t.textContent=S(u+(s-u)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function V(){if(!A||w)return;let d=Q(K(G(),te,q,1));h&&(b=Math.max(b,d),d=b),P=d,M(d),d>=1&&!I?(I=true,B?.()):d<1&&!h&&(I=false),T=requestAnimationFrame(V);}F();{let d=Q(K(G(),te,q,1));h&&d>0&&(b=d),P=d,M(d);}let ne=new IntersectionObserver(d=>{d.forEach(L=>{A=L.isIntersecting,A&&!w?T=requestAnimationFrame(V):cancelAnimationFrame(T);});}),H;function W(){clearTimeout(H),H=setTimeout(F,150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),ne.observe(t),Ce(t,{type:"counter",getProgress:()=>P,getTrigger:()=>({tStart:te,tEnd:q})}),{destroy(){cancelAnimationFrame(T),ne.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(H),Pe(t);},replay(){b=-1,I=false,P=0,w=false,M(0);},pause(){w=true,cancelAnimationFrame(T);},resume(){w&&(w=false,A&&(T=requestAnimationFrame(V)));},seek(d){let L=Math.min(1,Math.max(0,d));P=L,b=L,w=true,cancelAnimationFrame(T),M(L);},getProgress(){return P}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function et(e,r={}){if(typeof window>"u")return gt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollVideo: <video> element not found:",e),gt;let t=n,{trigger:u={},easing:s="linear",once:m=false,axis:l="y",preload:c="auto",onReady:h,onComplete:$,onProgress:B}=r,S=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Q=typeof s=="function"?s:ie[s]??ie.linear,he=ae(u.start??"top top"),R=ae(u.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=c);let ee=r.from??0,te=r.to,q=0,T=0,A=0,w=false,b=false,P=-1,I=0,G=false,C=false,F=()=>l==="x"?window.scrollX:window.scrollY,M=()=>l==="x"?window.innerWidth:window.innerHeight;function V(){let y=t.getBoundingClientRect(),X=l==="x"?y.left:y.top,xe=l==="x"?y.width:y.height,be=pe({top:X,height:xe},F(),M(),he,R);q=be.tStart,T=be.tEnd;}function ne(y){if(!C)return;let X=te??t.duration??0;t.currentTime=ee+(X-ee)*y,t.style.setProperty("--scroll-draw-progress",String(y)),B?.(y);}function H(){if(!w||b||!C)return;let y=Q(K(F(),q,T,1));m&&(P=Math.max(P,y),y=P),I=y,ne(y),y>=1&&!G?(G=true,$?.()):y<1&&!m&&(G=false),A=requestAnimationFrame(H);}function W(){if(C=true,te===void 0&&(te=t.duration),S){ne(1),h?.();return}V(),h?.(),w&&!b&&(A=requestAnimationFrame(H));}t.readyState>=1?W():t.addEventListener("loadedmetadata",W,{once:true}),C||V();let d=new IntersectionObserver(y=>{y.forEach(X=>{w=X.isIntersecting,w&&!b&&C?A=requestAnimationFrame(H):cancelAnimationFrame(A);});}),L;function g(){clearTimeout(L),L=setTimeout(V,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),d.observe(t),Ce(t,{type:"video",getProgress:()=>I,getTrigger:()=>({tStart:q,tEnd:T})}),{destroy(){cancelAnimationFrame(A),d.disconnect(),t.removeEventListener("loadedmetadata",W),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(L),Pe(t);},replay(){P=-1,G=false,I=0,b=false,ne(0);},pause(){b=true,cancelAnimationFrame(A);},resume(){b&&(b=false,w&&C&&(A=requestAnimationFrame(H)));},seek(y){let X=Math.min(1,Math.max(0,y));I=X,P=X,b=true,cancelAnimationFrame(A),ne(X);},getProgress(){return I}}}function bt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Ht(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function yt(e){let r=bt(e),n=new Map;for(let s of r){let m=s.offsetTop;n.has(m)||n.set(m,[]),n.get(m).push(s);}let t=[],u=Array.from(n.keys()).sort((s,m)=>s-m);for(let s of u){let m=n.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block";for(let c of m)l.appendChild(c);t.push(l);}e.textContent="";for(let s of t)e.appendChild(s),e.appendChild(document.createTextNode(" "));return t}function Nt(e,r,n,t){if(n<=1||t===0)return e;let u=(n-1)*t,s=r*t,m=s+(1-u);return m<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(m-s)))}function Rt(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tt(e,r={}){if(typeof window>"u")return ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollText: element not found:",e),ht;let t=n,{split:u="words",stagger:s=.04,easing:m="ease-out",from:l={opacity:0,y:24},trigger:c={},once:h=true,onComplete:$}=r,B=window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof m=="function"?m:ie[m]??ie["ease-out"],Q=ae(c.start??"top 85%"),he=ae(c.end??"top 40%"),R=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ee;u==="chars"?ee=Ht(t):u==="lines"?ee=yt(t):ee=bt(t);let te=ee.length;function q(g,y){l?.opacity!==void 0&&(g.style.opacity=String(l.opacity+(1-l.opacity)*y));let X=Rt(y,l);X&&(g.style.transform=X);}function T(g){t.style.setProperty("--scroll-draw-progress",String(g)),ee.forEach((y,X)=>{let xe=S(Nt(g,X,te,s));q(y,xe);});}if(B)return T(1),$?.(),{destroy(){t.innerHTML=R,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};T(0);let A=0,w=0,b=0,P=false,I=false,G=-1,C=0,F=false,M=()=>window.scrollY,V=()=>window.innerHeight;function ne(){let g=t.getBoundingClientRect(),y=pe({top:g.top,height:g.height},M(),V(),Q,he);A=y.tStart,w=y.tEnd;}function H(){if(!P||I)return;let g=K(M(),A,w,1);h&&(G=Math.max(G,g),g=G),C=g,T(g),g>=1&&!F?(F=true,$?.()):g<1&&!h&&(F=false),b=requestAnimationFrame(H);}ne();let W=new IntersectionObserver(g=>{g.forEach(y=>{P=y.isIntersecting,P&&!I?b=requestAnimationFrame(H):cancelAnimationFrame(b);});}),d;function L(){clearTimeout(d),d=setTimeout(()=>{if(u==="lines"){let g=C;t.innerHTML=R,t.setAttribute("aria-label",t.textContent??""),ee=yt(t),T(g);}ne();},150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),W.observe(t),Ce(t,{type:"text",getProgress:()=>C,getTrigger:()=>({tStart:A,tEnd:w})}),{destroy(){cancelAnimationFrame(b),W.disconnect(),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(d),t.innerHTML=R,t.removeAttribute("aria-label"),Pe(t);},replay(){G=-1,F=false,C=0,I=false,T(0);},pause(){I=true,cancelAnimationFrame(b);},resume(){I&&(I=false,P&&(b=requestAnimationFrame(H)));},seek(g){let y=Math.min(1,Math.max(0,g));C=y,G=y,I=true,cancelAnimationFrame(b),T(y);},getProgress(){return C}}}function un(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=Ze(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function fn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=Ze(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function mn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Je(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function pn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Je(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function dn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Qe(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function gn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Qe(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function yn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=et(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function hn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=et(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function bn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=tt(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function wn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=tt(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}exports.createScrollAnimate=pn;exports.createScrollCounter=gn;exports.createScrollDraw=fn;exports.createScrollText=wn;exports.createScrollVideo=hn;exports.useScrollAnimate=mn;exports.useScrollCounter=dn;exports.useScrollDraw=un;exports.useScrollText=bn;exports.useScrollVideo=yn;
3
+ <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${l}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",u,{passive:true}),u(),t}function Ue(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),u=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let m=parseFloat(s),l=t[u++]??m;return String(+(m+(l-m)*n).toFixed(4))})}function Ze(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,u=n?{...lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:l=1,fade:c=false,easing:h="linear",trigger:P={},stagger:R=0,direction:E="forward",once:j=false,debug:he=false,axis:V="y",scrollContainer:ee,autoReverse:U=false,delay:Z=0,strokeColor:S,strokeWidth:A,fillOpacity:L,waypoints:g,velocityScale:T=false,threshold:O=0,rootMargin:G="0px",repeat:I=0,repeatDelay:se=0,morphTo:$,clip:_,autoplay:B=false,duration:X=1e3,native:z=true,onProgress:p,onStart:x,onComplete:b,onEnter:y,onLeave:q,onEnterBack:xe,onLeaveBack:Me}=u,be=_===true?"left":typeof _=="string"?_:false,we=typeof h=="function"?h:ae[h]??ae.linear,Ie=le(P.start??"top bottom"),Re=le(P.end??"bottom top"),te=typeof ee=="string"?document.querySelector(ee):ee??null,pe=Array.isArray(S)?S[0]:null,J=Array.isArray(S)?S[1]:typeof S=="string"?S:null,K=Array.isArray(A)?A[0]:null,i=Array.isArray(A)?A[1]:typeof A=="number"?A:null,d=Array.isArray(L)?L[0]:null,k=Array.isArray(L)?L[1]:typeof L=="number"?L:null;function ne(o){let a=o*100;switch(be){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let C=be?[]:Array.from(e.querySelectorAll(m)),N=[],D=[],ie=0,ce=0,re=false,de=false,oe=0,Ve=false,ve=-1,ze=-1,ue=false,Oe=0,Ae=0,Le,Xe=null,$e=new Set,qe=-1,nt=performance.now(),De=NaN;function Ne(){return te?V==="x"?te.scrollLeft:te.scrollTop:V==="x"?window.scrollX:window.scrollY}function rt(){return te?V==="x"?te.clientWidth:te.clientHeight:V==="x"?window.innerWidth:window.innerHeight}function ot(){let o=e.getBoundingClientRect(),a,v,Y;if(te){let me=te.getBoundingClientRect();a=V==="x"?o.left-me.left+te.scrollLeft:o.top-me.top+te.scrollTop,v=V==="x"?o.width:o.height,Y=Ne();}else a=V==="x"?o.left:o.top,v=V==="x"?o.width:o.height,Y=Ne();let fe=ye({top:a,height:v},Y,rt(),Ie,Re);ie=fe.tStart,ce=fe.tEnd,he&&process.env.NODE_ENV!=="production"&&(Xe?.remove(),Xe=Ct(ie,ce,V));}function wt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),be){let v=a==="reverse"?1-o:o;e.style.clipPath=ne(v);return}C.forEach((v,Y)=>{v.style.strokeDashoffset=a==="reverse"?`${N[Y]*o}`:`${N[Y]*(1-o)}`,c&&(v.style.opacity=a==="reverse"?`${1-o}`:`${o}`),pe&&J?v.style.stroke=He(pe,J,o):J&&(v.style.stroke=J),K!==null&&i!==null?v.style.strokeWidth=`${K+(i-K)*o}`:i!==null&&(v.style.strokeWidth=`${i}`),d!==null&&k!==null?v.style.fillOpacity=`${d+(k-d)*o}`:k!==null&&(v.style.fillOpacity=`${k}`),$&&v.tagName.toLowerCase()==="path"&&D[Y]&&v.setAttribute("d",Ue(D[Y],$,o));});}function We(){if(e.style.setProperty("--scroll-draw-progress","0"),be){e.style.clipPath=ne(0);return}C.forEach((o,a)=>{o.style.strokeDasharray=`${N[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${N[a]}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",pe&&(o.style.stroke=pe),K!==null&&(o.style.strokeWidth=`${K}`),d!==null&&(o.style.fillOpacity=`${d}`),$&&o.tagName.toLowerCase()==="path"&&D[a]&&o.setAttribute("d",D[a]);});}if(C.forEach(o=>{$t(o);let a=Ge(o);N.push(a),o.tagName.toLowerCase()==="path"?D.push(o.getAttribute("d")??""):D.push(""),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),J&&(o.style.stroke=J),i!==null&&(o.style.strokeWidth=`${i}`),k!==null&&(o.style.fillOpacity=`${k}`),$&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",$)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",pe&&(o.style.stroke=pe),K!==null&&(o.style.strokeWidth=`${K}`),d!==null&&(o.style.fillOpacity=`${d}`));}),be){if(s)return e.style.clipPath=ne(1),b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ne(0);}else if(s)return b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};function vt(){return !(z===false||!Lt()||!C.length||typeof h!="string"||!(h in ut)||be||V!=="y"||te||l!==1||R!==0||j||U||T!==false||$||g||I||Z>0||p||x||b||y||q||xe||Me||S!=null||A!=null||L!=null||(P.start??"top bottom").trim()!=="top bottom"||(P.end??"bottom top").trim()!=="bottom top")}function Et(){let o=`svg-scroll-draw-${++At}`,a=E==="reverse"?"0":"var(--ssd-len)",v=E==="reverse"?"var(--ssd-len)":"0",Y=`stroke-dashoffset:${a};`,fe=`stroke-dashoffset:${v};`;c&&(Y+=`opacity:${E==="reverse"?1:0};`,fe+=`opacity:${E==="reverse"?0:1};`);let me=document.createElement("style");me.setAttribute("data-svg-scroll-draw",""),me.textContent=`@keyframes ${o}{from{${Y}}to{${fe}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ut[h]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(me);function ge(f,M){f.style.setProperty("--ssd-len",String(N[M])),f.style.strokeDasharray=`${N[M]}`,f.style.strokeDashoffset="",f.style.opacity="",f.style.animationPlayState="",f.classList.add(o);}C.forEach(ge);let w=false,F=-1;function H(){if(F>=0)return F;let f=e.getBoundingClientRect(),{tStart:M,tEnd:W}=ye({top:f.top,height:f.height},Ne(),rt(),Ie,Re);return we(Q(Ne(),M,W,l))}return {destroy(){C.forEach(f=>{f.classList.remove(o),f.style.removeProperty("--ssd-len"),f.style.animationPlayState="";}),me.remove();},replay(){w=false,F=-1,C.forEach(ge);},pause(){w=true,C.forEach(f=>{f.style.animationPlayState="paused";});},resume(){w&&(w=false,C.forEach(f=>{f.style.animationPlayState="running";}));},seek(f){let M=Math.min(1,Math.max(0,f));F=M,w=true,C.forEach((W,ke)=>{W.classList.remove(o),W.style.strokeDashoffset=E==="reverse"?`${N[ke]*M}`:`${N[ke]*(1-M)}`,c&&(W.style.opacity=E==="reverse"?`${1-M}`:`${M}`);});},getProgress(){return H()}}}if(vt())return Et();function St(){let o=Math.max(1,X),a=0,v=0;function Y(H){let f=true;if(be){let M=Math.min(1,Math.max(0,H/o)),W=we(M);Oe=W,e.style.setProperty("--scroll-draw-progress",String(W)),e.style.clipPath=ne(E==="reverse"?1-W:W),p?.(W),M<1&&(f=false);}else C.forEach((M,W)=>{let ke=W*R*o,Fe=Math.min(1,Math.max(0,(H-ke)/o)),Ee=we(Fe);M.style.strokeDashoffset=E==="reverse"?`${N[W]*Ee}`:`${N[W]*(1-Ee)}`,c&&(M.style.opacity=E==="reverse"?`${1-Ee}`:`${Ee}`),pe&&J?M.style.stroke=He(pe,J,Ee):J&&(M.style.stroke=J),K!==null&&i!==null?M.style.strokeWidth=`${K+(i-K)*Ee}`:i!==null&&(M.style.strokeWidth=`${i}`),d!==null&&k!==null?M.style.fillOpacity=`${d+(k-d)*Ee}`:k!==null&&(M.style.fillOpacity=`${k}`),$&&M.tagName.toLowerCase()==="path"&&D[W]&&M.setAttribute("d",Ue(D[W],$,Ee)),W===0&&(p?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Fe<1&&(f=false);});if(g){let M=Math.min(1,Math.max(0,H/o)),W=we(M);for(let ke in g){let Fe=parseFloat(ke);W>=Fe&&!$e.has(Fe)&&($e.add(Fe),g[ke]?.());}}return f}function fe(H){if(ue)return;let f=H-a;de||(de=true,x?.());let M=Y(f);if(M&&!re){re=true,Y(o*(1+Math.max(0,C.length-1)*R)),b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{a=performance.now(),de=false,re=false,$e.clear(),We(),oe=requestAnimationFrame(fe);},se));return}M||(oe=requestAnimationFrame(fe));}function me(){cancelAnimationFrame(oe),clearTimeout(Le),a=performance.now(),v=0,ue=false,de=false,re=false,Ae=0,$e.clear(),We(),oe=requestAnimationFrame(fe);}let ge=new IntersectionObserver(H=>{H.forEach(f=>{f.isIntersecting&&!(j&&re)?me():!f.isIntersecting&&!j&&!re&&(cancelAnimationFrame(oe),clearTimeout(Le),a=null);});},{root:te??null,threshold:O,rootMargin:G}),w;function F(){clearTimeout(w),w=setTimeout(()=>{C.forEach((H,f)=>{N[f]=Ge(H),H.style.strokeDasharray=`${N[f]}`;});},150);}return window.addEventListener("resize",F),window.addEventListener("orientationchange",F),Z>0?setTimeout(()=>ge.observe(e),Z):ge.observe(e),{destroy(){cancelAnimationFrame(oe),clearTimeout(Le),ge.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){Ae=0,me();},pause(){ue||(ue=true,v=performance.now()-a,cancelAnimationFrame(oe));},resume(){ue&&(ue=false,a=performance.now()-v,oe=requestAnimationFrame(fe));},seek(H){let f=Math.min(1,Math.max(0,H));Oe=f,ue=true,v=f*o,a=performance.now()-v,cancelAnimationFrame(oe),Y(v);},getProgress(){return Oe}}}if(B)return St();ot();function _e(){if(!Ve||ue)return;let o=performance.now(),a=Ne(),v=l;if(T!==false){let w=o-nt,F=w>0?Math.abs(a-(qe<0?a:qe))/w:0;v=l*Math.max(.2,1+F*(typeof T=="number"?T:1)*.04);}qe=a,nt=o;let Y=U?ze===-1||a>=ze?"forward":"reverse":E;ze=a;let fe=ce-ie,me=true,ge=fe===0?0:(a-ie)/fe;if(isNaN(De)||(De<=0&&ge>0?y?.():De>0&&ge<=0&&Me?.(),De<1&&ge>=1?q?.():De>=1&&ge<1&&xe?.()),De=ge,be){let w=we(Q(a,ie,ce,v));j&&!U&&(ve=Math.max(ve,w),w=ve),Oe=w,e.style.setProperty("--scroll-draw-progress",String(w));let F=Y==="reverse"?1-w:w;e.style.clipPath=ne(F),p?.(w),!de&&Q(a,ie,ce,v)>0&&(de=true,x?.()),w>=1&&!re?(re=true,b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,de=false,re=false,e.style.clipPath=ne(0);},se))):w<1&&!j&&(re=false),oe=requestAnimationFrame(_e);return}if(C.forEach((w,F)=>{let H=F*R*fe,f=we(Q(a,ie+H,ce+H,v));j&&!U&&(ve=Math.max(ve,f),f=ve),Oe=f,w.style.strokeDashoffset=Y==="reverse"?`${N[F]*f}`:`${N[F]*(1-f)}`,c&&(w.style.opacity=Y==="reverse"?`${1-f}`:`${f}`),pe&&J?w.style.stroke=He(pe,J,f):J&&(w.style.stroke=J),K!==null&&i!==null?w.style.strokeWidth=`${K+(i-K)*f}`:i!==null&&(w.style.strokeWidth=`${i}`),d!==null&&k!==null?w.style.fillOpacity=`${d+(k-d)*f}`:k!==null&&(w.style.fillOpacity=`${k}`),$&&w.tagName.toLowerCase()==="path"&&D[F]&&w.setAttribute("d",Ue(D[F],$,f)),F===0&&(p?.(f),e.style.setProperty("--scroll-draw-progress",String(f))),f<1&&(me=false);}),g){let w=we(Q(a,ie,ce,v));for(let F in g){let H=parseFloat(F);w>=H&&!$e.has(H)&&($e.add(H),g[F]?.());}}!de&&Q(a,ie,ce,v)>0&&(de=true,x?.()),me&&!re?(re=true,b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,de=false,re=false,$e.clear(),We();},se))):!me&&!j&&(re=false),oe=requestAnimationFrame(_e);}let Ye=new IntersectionObserver(o=>{o.forEach(a=>{Ve=a.isIntersecting,Ve&&!ue?oe=requestAnimationFrame(_e):cancelAnimationFrame(oe);});},{root:te??null,threshold:O,rootMargin:G}),je;function Be(){clearTimeout(je),je=setTimeout(()=>{C.forEach((o,a)=>{N[a]=Ge(o),o.style.strokeDasharray=`${N[a]}`;}),ot();},150);}return window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be),Z>0?setTimeout(()=>Ye.observe(e),Z):Ye.observe(e),{destroy(){cancelAnimationFrame(oe),clearTimeout(Le),Ye.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(je),Xe?.remove();},replay(){ve=-1,ze=-1,qe=-1,de=false,re=false,Ae=0,ue=false,$e.clear(),clearTimeout(Le),We();},pause(){ue=true,cancelAnimationFrame(oe);},resume(){ue&&(ue=false,Ve&&(oe=requestAnimationFrame(_e)));},seek(o){let a=Math.min(1,Math.max(0,o));Oe=a,ve=a,ue=true,cancelAnimationFrame(oe),wt(a,E);},getProgress(){return Oe}}}var ft=new Map;function Ce(e,r){ft.set(e,r);}function Pe(e){ft.delete(e);}function Pt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function mt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let u=[],s=[],m=t[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let c=l.match(/^([-+]?[\d.eE]+)(.*)$/);u.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}r.push({fn:t[1],nums:u,units:s});}return r}function It(e,r,n){let t=mt(e),u=mt(r);return t.length===0||t.length!==u.length?n<1?e:r:t.map((s,m)=>{let l=u[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((c,h)=>`${c}${s.units[h]}`).join(", ")})`:`${l.fn}(${l.nums.map((c,h)=>`${c}${l.units[h]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,h)=>`${c+(l.nums[h]-c)*n}${s.units[h]}`).join(", ")})`}).join(" ")}function pt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),u=String(r);if(Pt(t))return He(t,u,n);if(t.includes("("))return It(t,u,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),m=u.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),c=parseFloat(m[1]);return `${l+(c-l)*n}${s[2]||m[2]}`}return n<1?t:u}function Ot(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var dt={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dt=0;function Ft(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Je(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:u={},easing:s="ease-out",speed:m=1,once:l=false,axis:c="y",scrollContainer:h,native:P=true,velocityScale:R=false,onProgress:E,onComplete:j,onEnter:he,onLeave:V,onEnterBack:ee,onLeaveBack:U}=r,Z=window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof s=="function"?s:ae[s]??ae["ease-out"],A=le(u.start??"top bottom"),L=le(u.end??"bottom top"),g=typeof h=="string"?document.querySelector(h):h??null,T=Object.entries(t).map(([i,d])=>({prop:Ot(i),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function O(){let i=window.getComputedStyle(e);for(let d of T)d.from===""&&(d.from=i.getPropertyValue(d.prop).trim()||"0");}function G(){for(let i of T)e.style.setProperty(i.prop,String(i.to));}if(Z)return G(),j?.(),n;O();function I(){if(!P||!Ft()||typeof s!="string"||!(s in dt)||c!=="y"||g||l||m!==1||E||j||he||V||ee||U||R!==false||(u.start??"top bottom").trim()!=="top bottom"||(u.end??"bottom top").trim()!=="bottom top")return false;for(let i of T)if(!kt.has(i.prop))return false;return true}function se(){let i=`ssd-a-${++Dt}`,d=T.map(D=>`${D.prop}:${D.from}`).join(";"),k=T.map(D=>`${D.prop}:${D.to}`).join(";"),ne=document.createElement("style");ne.setAttribute("data-ssd-animate",""),ne.textContent=`@keyframes ${i}{from{${d}}to{${k}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${dt[s]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ne),e.classList.add(i);let C=()=>c==="x"?window.scrollX:window.scrollY,N=()=>c==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),ne.remove();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(D){let ie=Math.min(1,Math.max(0,D));e.classList.remove(i);for(let ce of T)e.style.setProperty(ce.prop,pt(ce.from,ce.to,ie));},getProgress(){let D=e.getBoundingClientRect(),ie=C(),ce=N(),{tStart:re,tEnd:de}=ye({top:D.top,height:D.height},ie,ce,A,L);return S(Q(ie,re,de,m))}}}if(I())return se();let $=0,_=0,B=0,X=false,z=false,p=-1,x=0,b=false,y=NaN,q=-1,xe=0,Me=()=>g?c==="x"?g.scrollLeft:g.scrollTop:c==="x"?window.scrollX:window.scrollY,be=()=>g?c==="x"?g.clientWidth:g.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function we(){let i=e.getBoundingClientRect(),d,k;if(g){let C=g.getBoundingClientRect();d=c==="x"?i.left-C.left+g.scrollLeft:i.top-C.top+g.scrollTop,k=c==="x"?i.width:i.height;}else d=c==="x"?i.left:i.top,k=c==="x"?i.width:i.height;let ne=ye({top:d,height:k},Me(),be(),A,L);$=ne.tStart,_=ne.tEnd;}function Ie(i){e.style.setProperty("--scroll-draw-progress",String(i));for(let d of T)e.style.setProperty(d.prop,pt(d.from,d.to,i));E?.(i);}function Re(i){if(isNaN(y)){y=i;return}y<=0&&i>0?he?.():y>0&&i<=0&&U?.(),y<1&&i>=1?V?.():y>=1&&i<1&&ee?.(),y=i;}function te(){if(!X||z)return;let i=performance.now(),d=Me(),k=m;if(R!==false){let N=i-xe,D=N>0?Math.abs(d-(q<0?d:q))/N:0;k=m*Math.max(.2,1+D*(typeof R=="number"?R:1)*.04);}q=d,xe=i;let ne=_===$?0:(d-$)/(_-$);Re(ne);let C=S(Q(d,$,_,k));l&&(p=Math.max(p,C),C=p),x=C,Ie(C),C>=1&&!b?(b=true,j?.()):C<1&&!l&&(b=false),B=requestAnimationFrame(te);}we();{let i=S(Q(Me(),$,_,m));l&&i>0&&(p=i),x=i,Ie(i);}let pe=new IntersectionObserver(i=>{i.forEach(d=>{X=d.isIntersecting,X&&!z?B=requestAnimationFrame(te):cancelAnimationFrame(B);});},{root:g??null}),J;function K(){clearTimeout(J),J=setTimeout(we,150);}return window.addEventListener("resize",K),window.addEventListener("orientationchange",K),pe.observe(e),Ce(e,{type:"animate",getProgress:()=>x,getTrigger:()=>({tStart:$,tEnd:_})}),{destroy(){cancelAnimationFrame(B),pe.disconnect(),window.removeEventListener("resize",K),window.removeEventListener("orientationchange",K),clearTimeout(J),Pe(e);},replay(){p=-1,b=false,x=0,z=false,Ie(0);},pause(){z=true,cancelAnimationFrame(B);},resume(){z&&(z=false,X&&(B=requestAnimationFrame(te)));},seek(i){let d=Math.min(1,Math.max(0,i));x=d,p=d,z=true,cancelAnimationFrame(B),Ie(d);},getProgress(){return x}}}var Ke={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qe(e,r){if(typeof window>"u")return Ke;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollCounter: element not found:",e),Ke;let t=n,{from:u=0,to:s,format:m,easing:l="ease-out",trigger:c={},once:h=true,decimals:P,onComplete:R}=r,E=P!==void 0?p=>p.toFixed(P):m??(p=>String(Math.round(p))),j=typeof l=="function"?l:ae[l]??ae["ease-out"],he=le(c.start??"top 80%"),V=le(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=E(s),R?.(),Ke;t.textContent=E(u);let U=0,Z=0,S=0,A=false,L=false,g=-1,T=0,O=false,G=()=>window.scrollY,I=()=>window.innerHeight;function se(){let p=t.getBoundingClientRect(),x=ye({top:p.top,height:p.height},G(),I(),he,V);U=x.tStart,Z=x.tEnd;}function $(p){t.textContent=E(u+(s-u)*p),t.style.setProperty("--scroll-draw-progress",String(p));}function _(){if(!A||L)return;let p=j(Q(G(),U,Z,1));h&&(g=Math.max(g,p),p=g),T=p,$(p),p>=1&&!O?(O=true,R?.()):p<1&&!h&&(O=false),S=requestAnimationFrame(_);}se();{let p=j(Q(G(),U,Z,1));h&&p>0&&(g=p),T=p,$(p);}let B=new IntersectionObserver(p=>{p.forEach(x=>{A=x.isIntersecting,A&&!L?S=requestAnimationFrame(_):cancelAnimationFrame(S);});}),X;function z(){clearTimeout(X),X=setTimeout(se,150);}return window.addEventListener("resize",z),window.addEventListener("orientationchange",z),B.observe(t),Ce(t,{type:"counter",getProgress:()=>T,getTrigger:()=>({tStart:U,tEnd:Z})}),{destroy(){cancelAnimationFrame(S),B.disconnect(),window.removeEventListener("resize",z),window.removeEventListener("orientationchange",z),clearTimeout(X),Pe(t);},replay(){g=-1,O=false,T=0,L=false,$(0);},pause(){L=true,cancelAnimationFrame(S);},resume(){L&&(L=false,A&&(S=requestAnimationFrame(_)));},seek(p){let x=Math.min(1,Math.max(0,p));T=x,g=x,L=true,cancelAnimationFrame(S),$(x);},getProgress(){return T}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function et(e,r={}){if(typeof window>"u")return gt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollVideo: <video> element not found:",e),gt;let t=n,{trigger:u={},easing:s="linear",once:m=false,axis:l="y",preload:c="auto",onReady:h,onComplete:P,onProgress:R}=r,E=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=typeof s=="function"?s:ae[s]??ae.linear,he=le(u.start??"top top"),V=le(u.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=c);let ee=r.from??0,U=r.to,Z=0,S=0,A=0,L=false,g=false,T=-1,O=0,G=false,I=false,se=()=>l==="x"?window.scrollX:window.scrollY,$=()=>l==="x"?window.innerWidth:window.innerHeight;function _(){let y=t.getBoundingClientRect(),q=l==="x"?y.left:y.top,xe=l==="x"?y.width:y.height,Me=ye({top:q,height:xe},se(),$(),he,V);Z=Me.tStart,S=Me.tEnd;}function B(y){if(!I)return;let q=U??t.duration??0;t.currentTime=ee+(q-ee)*y,t.style.setProperty("--scroll-draw-progress",String(y)),R?.(y);}function X(){if(!L||g||!I)return;let y=j(Q(se(),Z,S,1));m&&(T=Math.max(T,y),y=T),O=y,B(y),y>=1&&!G?(G=true,P?.()):y<1&&!m&&(G=false),A=requestAnimationFrame(X);}function z(){if(I=true,U===void 0&&(U=t.duration),E){B(1),h?.();return}_(),h?.(),L&&!g&&(A=requestAnimationFrame(X));}t.readyState>=1?z():t.addEventListener("loadedmetadata",z,{once:true}),I||_();let p=new IntersectionObserver(y=>{y.forEach(q=>{L=q.isIntersecting,L&&!g&&I?A=requestAnimationFrame(X):cancelAnimationFrame(A);});}),x;function b(){clearTimeout(x),x=setTimeout(_,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),p.observe(t),Ce(t,{type:"video",getProgress:()=>O,getTrigger:()=>({tStart:Z,tEnd:S})}),{destroy(){cancelAnimationFrame(A),p.disconnect(),t.removeEventListener("loadedmetadata",z),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(x),Pe(t);},replay(){T=-1,G=false,O=0,g=false,B(0);},pause(){g=true,cancelAnimationFrame(A);},resume(){g&&(g=false,L&&I&&(A=requestAnimationFrame(X)));},seek(y){let q=Math.min(1,Math.max(0,y));O=q,T=q,g=true,cancelAnimationFrame(A),B(q);},getProgress(){return O}}}function bt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Ht(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function yt(e){let r=bt(e),n=new Map;for(let s of r){let m=s.offsetTop;n.has(m)||n.set(m,[]),n.get(m).push(s);}let t=[],u=Array.from(n.keys()).sort((s,m)=>s-m);for(let s of u){let m=n.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block";for(let c of m)l.appendChild(c);t.push(l);}e.textContent="";for(let s of t)e.appendChild(s),e.appendChild(document.createTextNode(" "));return t}function Nt(e,r,n,t){if(n<=1||t===0)return e;let u=(n-1)*t,s=r*t,m=s+(1-u);return m<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(m-s)))}function Rt(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tt(e,r={}){if(typeof window>"u")return ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollText: element not found:",e),ht;let t=n,{split:u="words",stagger:s=.04,easing:m="ease-out",from:l={opacity:0,y:24},trigger:c={},once:h=true,onComplete:P}=r,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,E=typeof m=="function"?m:ae[m]??ae["ease-out"],j=le(c.start??"top 85%"),he=le(c.end??"top 40%"),V=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ee;u==="chars"?ee=Ht(t):u==="lines"?ee=yt(t):ee=bt(t);let U=ee.length;function Z(b,y){l?.opacity!==void 0&&(b.style.opacity=String(l.opacity+(1-l.opacity)*y));let q=Rt(y,l);q&&(b.style.transform=q);}function S(b){t.style.setProperty("--scroll-draw-progress",String(b)),ee.forEach((y,q)=>{let xe=E(Nt(b,q,U,s));Z(y,xe);});}if(R)return S(1),P?.(),{destroy(){t.innerHTML=V,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};S(0);let A=0,L=0,g=0,T=false,O=false,G=-1,I=0,se=false,$=()=>window.scrollY,_=()=>window.innerHeight;function B(){let b=t.getBoundingClientRect(),y=ye({top:b.top,height:b.height},$(),_(),j,he);A=y.tStart,L=y.tEnd;}function X(){if(!T||O)return;let b=Q($(),A,L,1);h&&(G=Math.max(G,b),b=G),I=b,S(b),b>=1&&!se?(se=true,P?.()):b<1&&!h&&(se=false),g=requestAnimationFrame(X);}B();let z=new IntersectionObserver(b=>{b.forEach(y=>{T=y.isIntersecting,T&&!O?g=requestAnimationFrame(X):cancelAnimationFrame(g);});}),p;function x(){clearTimeout(p),p=setTimeout(()=>{if(u==="lines"){let b=I;t.innerHTML=V,t.setAttribute("aria-label",t.textContent??""),ee=yt(t),S(b);}B();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),z.observe(t),Ce(t,{type:"text",getProgress:()=>I,getTrigger:()=>({tStart:A,tEnd:L})}),{destroy(){cancelAnimationFrame(g),z.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(p),t.innerHTML=V,t.removeAttribute("aria-label"),Pe(t);},replay(){G=-1,se=false,I=0,O=false,S(0);},pause(){O=true,cancelAnimationFrame(g);},resume(){O&&(O=false,T&&(g=requestAnimationFrame(X)));},seek(b){let y=Math.min(1,Math.max(0,b));I=y,G=y,O=true,cancelAnimationFrame(g),S(y);},getProgress(){return I}}}function un(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=Ze(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function fn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=Ze(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function mn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Je(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function pn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Je(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function dn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Qe(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function gn(e){let r,n;return solidJs.onMount(()=>{r&&(n=Qe(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function yn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=et(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function hn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=et(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function bn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=tt(r,e));}),solidJs.onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function wn(e={}){let r,n;return solidJs.onMount(()=>{r&&(n=tt(r,e));}),solidJs.onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}exports.createScrollAnimate=pn;exports.createScrollCounter=gn;exports.createScrollDraw=fn;exports.createScrollText=wn;exports.createScrollVideo=hn;exports.useScrollAnimate=mn;exports.useScrollCounter=dn;exports.useScrollDraw=un;exports.useScrollText=bn;exports.useScrollVideo=yn;
@@ -136,6 +136,12 @@ interface ScrollAnimateOptions {
136
136
  axis?: 'x' | 'y';
137
137
  scrollContainer?: string | Element;
138
138
  native?: boolean;
139
+ /**
140
+ * Scale animation speed by scroll velocity — faster scrolling = faster animation.
141
+ * Pass `true` for default sensitivity (1) or a number to control it.
142
+ * Higher values = more dramatic speed-up. Default sensitivity: 1.
143
+ */
144
+ velocityScale?: boolean | number;
139
145
  onProgress?: (alpha: number) => void;
140
146
  onComplete?: () => void;
141
147
  /** Fires when scroll enters the trigger zone (scrolling forward). */
@@ -136,6 +136,12 @@ interface ScrollAnimateOptions {
136
136
  axis?: 'x' | 'y';
137
137
  scrollContainer?: string | Element;
138
138
  native?: boolean;
139
+ /**
140
+ * Scale animation speed by scroll velocity — faster scrolling = faster animation.
141
+ * Pass `true` for default sensitivity (1) or a number to control it.
142
+ * Higher values = more dramatic speed-up. Default sensitivity: 1.
143
+ */
144
+ velocityScale?: boolean | number;
139
145
  onProgress?: (alpha: number) => void;
140
146
  onComplete?: () => void;
141
147
  /** Fires when scroll enters the trigger zone (scrolling forward). */
@@ -1,3 +1,3 @@
1
- import {onMount,onCleanup}from'solid-js';function Tt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),u=Math.sqrt(t),s=0,m=[];for(let h=0;h<n;h++){let $=Math.pow(u,h);m.push($),s+=$;}let l=[0],c=0;for(let h=0;h<n;h++)c+=m[h]/s,l.push(c);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let $=0;$<n;$++)if(h<=l[$+1]){let B=(h-l[$])/(l[$+1]-l[$]);if($===0)return B*(2-B);let S=1-Math.pow(t,$);return S+(1-S)*(2*B-1)*(2*B-1)}return 1}}function xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),u=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-u)*(2*Math.PI)/t)+1}var ie={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Tt(),elastic:xt()};function ae(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function st(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function it(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function At(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:At((e-r)/(n-r)*t,0,1)}function pe(e,r,n,t,u){let s=st(e.top,e.height,r,t.element)-it(t.viewport,n),m=st(e.top,e.height,r,u.element)-it(u.viewport,n);return {tStart:s,tEnd:m}}function at(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,r,n){let t=at(e),u=at(r);return !t||!u?e:`rgb(${Math.round(t[0]+(u[0]-t[0])*n)},${Math.round(t[1]+(u[1]-t[1])*n)},${Math.round(t[2]+(u[2]-t[2])*n)})`}var lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};function ct(e,r){process.env.NODE_ENV!=="production"&&console.warn(`[svg-scroll-draw] ${e}`,r);}var ut={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},Mt=0;function Lt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function $t(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ct("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ct("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ct(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function u(){let s=n==="x"?window.scrollX:window.scrollY,m=e-s,l=r-s,c=n==="x";t.innerHTML=`
1
+ import {onMount,onCleanup}from'solid-js';function Tt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),u=Math.sqrt(t),s=0,m=[];for(let h=0;h<n;h++){let P=Math.pow(u,h);m.push(P),s+=P;}let l=[0],c=0;for(let h=0;h<n;h++)c+=m[h]/s,l.push(c);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let P=0;P<n;P++)if(h<=l[P+1]){let R=(h-l[P])/(l[P+1]-l[P]);if(P===0)return R*(2-R);let E=1-Math.pow(t,P);return E+(1-E)*(2*R-1)*(2*R-1)}return 1}}function xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),u=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-u)*(2*Math.PI)/t)+1}var ae={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Tt(),elastic:xt()};function le(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function st(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function it(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Mt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:Mt((e-r)/(n-r)*t,0,1)}function ye(e,r,n,t,u){let s=st(e.top,e.height,r,t.element)-it(t.viewport,n),m=st(e.top,e.height,r,u.element)-it(u.viewport,n);return {tStart:s,tEnd:m}}function at(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,r,n){let t=at(e),u=at(r);return !t||!u?e:`rgb(${Math.round(t[0]+(u[0]-t[0])*n)},${Math.round(t[1]+(u[1]-t[1])*n)},${Math.round(t[2]+(u[2]-t[2])*n)})`}var lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};function ct(e,r){process.env.NODE_ENV!=="production"&&console.warn(`[svg-scroll-draw] ${e}`,r);}var ut={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},At=0;function Lt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function $t(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ct("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ct("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ct(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function u(){let s=n==="x"?window.scrollX:window.scrollY,m=e-s,l=r-s,c=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${m}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${l}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",u,{passive:true}),u(),t}function Ue(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),u=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let m=parseFloat(s),l=t[u++]??m;return String(+(m+(l-m)*n).toFixed(4))})}function Ze(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,u=n?{...lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:l=1,fade:c=false,easing:h="linear",trigger:$={},stagger:B=0,direction:S="forward",once:Q=false,debug:he=false,axis:R="y",scrollContainer:ee,autoReverse:te=false,delay:q=0,strokeColor:T,strokeWidth:A,fillOpacity:w,waypoints:b,velocityScale:P=false,threshold:I=0,rootMargin:G="0px",repeat:C=0,repeatDelay:F=0,morphTo:M,clip:V,autoplay:ne=false,duration:H=1e3,native:W=true,onProgress:d,onStart:L,onComplete:g,onEnter:y,onLeave:X,onEnterBack:xe,onLeaveBack:be}=u,we=V===true?"left":typeof V=="string"?V:false,de=typeof h=="function"?h:ie[h]??ie.linear,Ne=ae($.start??"top bottom"),ke=ae($.end??"bottom top"),U=typeof ee=="string"?document.querySelector(ee):ee??null,i=Array.isArray(T)?T[0]:null,p=Array.isArray(T)?T[1]:typeof T=="string"?T:null,Y=Array.isArray(A)?A[0]:null,N=Array.isArray(A)?A[1]:typeof A=="number"?A:null,Z=Array.isArray(w)?w[0]:null,oe=Array.isArray(w)?w[1]:typeof w=="number"?w:null;function J(o){let a=o*100;switch(we){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let _=we?[]:Array.from(e.querySelectorAll(m)),O=[],fe=[],ge=0,Me=0,se=false,ye=false,re=0,Ve=false,ve=-1,ze=-1,le=false,Ie=0,Ae=0,Le,Xe=null,$e=new Set,qe=-1,nt=performance.now(),De=NaN;function Re(){return U?R==="x"?U.scrollLeft:U.scrollTop:R==="x"?window.scrollX:window.scrollY}function rt(){return U?R==="x"?U.clientWidth:U.clientHeight:R==="x"?window.innerWidth:window.innerHeight}function ot(){let o=e.getBoundingClientRect(),a,E,j;if(U){let ue=U.getBoundingClientRect();a=R==="x"?o.left-ue.left+U.scrollLeft:o.top-ue.top+U.scrollTop,E=R==="x"?o.width:o.height,j=Re();}else a=R==="x"?o.left:o.top,E=R==="x"?o.width:o.height,j=Re();let ce=pe({top:a,height:E},j,rt(),Ne,ke);ge=ce.tStart,Me=ce.tEnd,he&&process.env.NODE_ENV!=="production"&&(Xe?.remove(),Xe=Ct(ge,Me,R));}function wt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),we){let E=a==="reverse"?1-o:o;e.style.clipPath=J(E);return}_.forEach((E,j)=>{E.style.strokeDashoffset=a==="reverse"?`${O[j]*o}`:`${O[j]*(1-o)}`,c&&(E.style.opacity=a==="reverse"?`${1-o}`:`${o}`),i&&p?E.style.stroke=He(i,p,o):p&&(E.style.stroke=p),Y!==null&&N!==null?E.style.strokeWidth=`${Y+(N-Y)*o}`:N!==null&&(E.style.strokeWidth=`${N}`),Z!==null&&oe!==null?E.style.fillOpacity=`${Z+(oe-Z)*o}`:oe!==null&&(E.style.fillOpacity=`${oe}`),M&&E.tagName.toLowerCase()==="path"&&fe[j]&&E.setAttribute("d",Ue(fe[j],M,o));});}function We(){if(e.style.setProperty("--scroll-draw-progress","0"),we){e.style.clipPath=J(0);return}_.forEach((o,a)=>{o.style.strokeDasharray=`${O[a]}`,o.style.strokeDashoffset=S==="reverse"?"0":`${O[a]}`,c?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",i&&(o.style.stroke=i),Y!==null&&(o.style.strokeWidth=`${Y}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&fe[a]&&o.setAttribute("d",fe[a]);});}if(_.forEach(o=>{$t(o);let a=Ge(o);O.push(a),o.tagName.toLowerCase()==="path"?fe.push(o.getAttribute("d")??""):fe.push(""),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=S==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),p&&(o.style.stroke=p),N!==null&&(o.style.strokeWidth=`${N}`),oe!==null&&(o.style.fillOpacity=`${oe}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=S==="reverse"?"0":`${a}`,c?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",i&&(o.style.stroke=i),Y!==null&&(o.style.strokeWidth=`${Y}`),Z!==null&&(o.style.fillOpacity=`${Z}`));}),we){if(s)return e.style.clipPath=J(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=J(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};function vt(){return !(W===false||!Lt()||!_.length||typeof h!="string"||!(h in ut)||we||R!=="y"||U||l!==1||B!==0||Q||te||P!==false||M||b||C||q>0||d||L||g||y||X||xe||be||T!=null||A!=null||w!=null||($.start??"top bottom").trim()!=="top bottom"||($.end??"bottom top").trim()!=="bottom top")}function Et(){let o=`svg-scroll-draw-${++Mt}`,a=S==="reverse"?"0":"var(--ssd-len)",E=S==="reverse"?"var(--ssd-len)":"0",j=`stroke-dashoffset:${a};`,ce=`stroke-dashoffset:${E};`;c&&(j+=`opacity:${S==="reverse"?1:0};`,ce+=`opacity:${S==="reverse"?0:1};`);let ue=document.createElement("style");ue.setAttribute("data-svg-scroll-draw",""),ue.textContent=`@keyframes ${o}{from{${j}}to{${ce}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ut[h]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ue);function me(f,x){f.style.setProperty("--ssd-len",String(O[x])),f.style.strokeDasharray=`${O[x]}`,f.style.strokeDashoffset="",f.style.opacity="",f.style.animationPlayState="",f.classList.add(o);}_.forEach(me);let v=false,k=-1;function D(){if(k>=0)return k;let f=e.getBoundingClientRect(),{tStart:x,tEnd:z}=pe({top:f.top,height:f.height},Re(),rt(),Ne,ke);return de(K(Re(),x,z,l))}return {destroy(){_.forEach(f=>{f.classList.remove(o),f.style.removeProperty("--ssd-len"),f.style.animationPlayState="";}),ue.remove();},replay(){v=false,k=-1,_.forEach(me);},pause(){v=true,_.forEach(f=>{f.style.animationPlayState="paused";});},resume(){v&&(v=false,_.forEach(f=>{f.style.animationPlayState="running";}));},seek(f){let x=Math.min(1,Math.max(0,f));k=x,v=true,_.forEach((z,Oe)=>{z.classList.remove(o),z.style.strokeDashoffset=S==="reverse"?`${O[Oe]*x}`:`${O[Oe]*(1-x)}`,c&&(z.style.opacity=S==="reverse"?`${1-x}`:`${x}`);});},getProgress(){return D()}}}if(vt())return Et();function St(){let o=Math.max(1,H),a=0,E=0;function j(D){let f=true;if(we){let x=Math.min(1,Math.max(0,D/o)),z=de(x);Ie=z,e.style.setProperty("--scroll-draw-progress",String(z)),e.style.clipPath=J(S==="reverse"?1-z:z),d?.(z),x<1&&(f=false);}else _.forEach((x,z)=>{let Oe=z*B*o,Fe=Math.min(1,Math.max(0,(D-Oe)/o)),Ee=de(Fe);x.style.strokeDashoffset=S==="reverse"?`${O[z]*Ee}`:`${O[z]*(1-Ee)}`,c&&(x.style.opacity=S==="reverse"?`${1-Ee}`:`${Ee}`),i&&p?x.style.stroke=He(i,p,Ee):p&&(x.style.stroke=p),Y!==null&&N!==null?x.style.strokeWidth=`${Y+(N-Y)*Ee}`:N!==null&&(x.style.strokeWidth=`${N}`),Z!==null&&oe!==null?x.style.fillOpacity=`${Z+(oe-Z)*Ee}`:oe!==null&&(x.style.fillOpacity=`${oe}`),M&&x.tagName.toLowerCase()==="path"&&fe[z]&&x.setAttribute("d",Ue(fe[z],M,Ee)),z===0&&(d?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Fe<1&&(f=false);});if(b){let x=Math.min(1,Math.max(0,D/o)),z=de(x);for(let Oe in b){let Fe=parseFloat(Oe);z>=Fe&&!$e.has(Fe)&&($e.add(Fe),b[Oe]?.());}}return f}function ce(D){if(le)return;let f=D-a;ye||(ye=true,L?.());let x=j(f);if(x&&!se){se=true,j(o*(1+Math.max(0,_.length-1)*B)),g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{a=performance.now(),ye=false,se=false,$e.clear(),We(),re=requestAnimationFrame(ce);},F));return}x||(re=requestAnimationFrame(ce));}function ue(){cancelAnimationFrame(re),clearTimeout(Le),a=performance.now(),E=0,le=false,ye=false,se=false,Ae=0,$e.clear(),We(),re=requestAnimationFrame(ce);}let me=new IntersectionObserver(D=>{D.forEach(f=>{f.isIntersecting&&!(Q&&se)?ue():!f.isIntersecting&&!Q&&!se&&(cancelAnimationFrame(re),clearTimeout(Le),a=null);});},{root:U??null,threshold:I,rootMargin:G}),v;function k(){clearTimeout(v),v=setTimeout(()=>{_.forEach((D,f)=>{O[f]=Ge(D),D.style.strokeDasharray=`${O[f]}`;});},150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),q>0?setTimeout(()=>me.observe(e),q):me.observe(e),{destroy(){cancelAnimationFrame(re),clearTimeout(Le),me.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(v);},replay(){Ae=0,ue();},pause(){le||(le=true,E=performance.now()-a,cancelAnimationFrame(re));},resume(){le&&(le=false,a=performance.now()-E,re=requestAnimationFrame(ce));},seek(D){let f=Math.min(1,Math.max(0,D));Ie=f,le=true,E=f*o,a=performance.now()-E,cancelAnimationFrame(re),j(E);},getProgress(){return Ie}}}if(ne)return St();ot();function _e(){if(!Ve||le)return;let o=performance.now(),a=Re(),E=l;if(P!==false){let v=o-nt,k=v>0?Math.abs(a-(qe<0?a:qe))/v:0;E=l*Math.max(.2,1+k*(typeof P=="number"?P:1)*.04);}qe=a,nt=o;let j=te?ze===-1||a>=ze?"forward":"reverse":S;ze=a;let ce=Me-ge,ue=true,me=ce===0?0:(a-ge)/ce;if(isNaN(De)||(De<=0&&me>0?y?.():De>0&&me<=0&&be?.(),De<1&&me>=1?X?.():De>=1&&me<1&&xe?.()),De=me,we){let v=de(K(a,ge,Me,E));Q&&!te&&(ve=Math.max(ve,v),v=ve),Ie=v,e.style.setProperty("--scroll-draw-progress",String(v));let k=j==="reverse"?1-v:v;e.style.clipPath=J(k),d?.(v),!ye&&K(a,ge,Me,E)>0&&(ye=true,L?.()),v>=1&&!se?(se=true,g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,ye=false,se=false,e.style.clipPath=J(0);},F))):v<1&&!Q&&(se=false),re=requestAnimationFrame(_e);return}if(_.forEach((v,k)=>{let D=k*B*ce,f=de(K(a,ge+D,Me+D,E));Q&&!te&&(ve=Math.max(ve,f),f=ve),Ie=f,v.style.strokeDashoffset=j==="reverse"?`${O[k]*f}`:`${O[k]*(1-f)}`,c&&(v.style.opacity=j==="reverse"?`${1-f}`:`${f}`),i&&p?v.style.stroke=He(i,p,f):p&&(v.style.stroke=p),Y!==null&&N!==null?v.style.strokeWidth=`${Y+(N-Y)*f}`:N!==null&&(v.style.strokeWidth=`${N}`),Z!==null&&oe!==null?v.style.fillOpacity=`${Z+(oe-Z)*f}`:oe!==null&&(v.style.fillOpacity=`${oe}`),M&&v.tagName.toLowerCase()==="path"&&fe[k]&&v.setAttribute("d",Ue(fe[k],M,f)),k===0&&(d?.(f),e.style.setProperty("--scroll-draw-progress",String(f))),f<1&&(ue=false);}),b){let v=de(K(a,ge,Me,E));for(let k in b){let D=parseFloat(k);v>=D&&!$e.has(D)&&($e.add(D),b[k]?.());}}!ye&&K(a,ge,Me,E)>0&&(ye=true,L?.()),ue&&!se?(se=true,g?.(),Ae<(C==="infinite"?1/0:C??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,ye=false,se=false,$e.clear(),We();},F))):!ue&&!Q&&(se=false),re=requestAnimationFrame(_e);}let Ye=new IntersectionObserver(o=>{o.forEach(a=>{Ve=a.isIntersecting,Ve&&!le?re=requestAnimationFrame(_e):cancelAnimationFrame(re);});},{root:U??null,threshold:I,rootMargin:G}),je;function Be(){clearTimeout(je),je=setTimeout(()=>{_.forEach((o,a)=>{O[a]=Ge(o),o.style.strokeDasharray=`${O[a]}`;}),ot();},150);}return window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be),q>0?setTimeout(()=>Ye.observe(e),q):Ye.observe(e),{destroy(){cancelAnimationFrame(re),clearTimeout(Le),Ye.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(je),Xe?.remove();},replay(){ve=-1,ze=-1,qe=-1,ye=false,se=false,Ae=0,le=false,$e.clear(),clearTimeout(Le),We();},pause(){le=true,cancelAnimationFrame(re);},resume(){le&&(le=false,Ve&&(re=requestAnimationFrame(_e)));},seek(o){let a=Math.min(1,Math.max(0,o));Ie=a,ve=a,le=true,cancelAnimationFrame(re),wt(a,S);},getProgress(){return Ie}}}var ft=new Map;function Ce(e,r){ft.set(e,r);}function Pe(e){ft.delete(e);}function Pt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function mt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let u=[],s=[],m=t[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let c=l.match(/^([-+]?[\d.eE]+)(.*)$/);u.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}r.push({fn:t[1],nums:u,units:s});}return r}function It(e,r,n){let t=mt(e),u=mt(r);return t.length===0||t.length!==u.length?n<1?e:r:t.map((s,m)=>{let l=u[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((c,h)=>`${c}${s.units[h]}`).join(", ")})`:`${l.fn}(${l.nums.map((c,h)=>`${c}${l.units[h]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,h)=>`${c+(l.nums[h]-c)*n}${s.units[h]}`).join(", ")})`}).join(" ")}function pt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),u=String(r);if(Pt(t))return He(t,u,n);if(t.includes("("))return It(t,u,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),m=u.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),c=parseFloat(m[1]);return `${l+(c-l)*n}${s[2]||m[2]}`}return n<1?t:u}function Ot(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var dt={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dt=0;function Ft(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Je(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:u={},easing:s="ease-out",speed:m=1,once:l=false,axis:c="y",scrollContainer:h,native:$=true,onProgress:B,onComplete:S,onEnter:Q,onLeave:he,onEnterBack:R,onLeaveBack:ee}=r,te=window.matchMedia("(prefers-reduced-motion: reduce)").matches,q=typeof s=="function"?s:ie[s]??ie["ease-out"],T=ae(u.start??"top bottom"),A=ae(u.end??"bottom top"),w=typeof h=="string"?document.querySelector(h):h??null,b=Object.entries(t).map(([i,p])=>({prop:Ot(i),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function P(){let i=window.getComputedStyle(e);for(let p of b)p.from===""&&(p.from=i.getPropertyValue(p.prop).trim()||"0");}function I(){for(let i of b)e.style.setProperty(i.prop,String(i.to));}if(te)return I(),S?.(),n;P();function G(){if(!$||!Ft()||typeof s!="string"||!(s in dt)||c!=="y"||w||l||m!==1||B||S||Q||he||R||ee||(u.start??"top bottom").trim()!=="top bottom"||(u.end??"bottom top").trim()!=="bottom top")return false;for(let i of b)if(!kt.has(i.prop))return false;return true}function C(){let i=`ssd-a-${++Dt}`,p=b.map(J=>`${J.prop}:${J.from}`).join(";"),Y=b.map(J=>`${J.prop}:${J.to}`).join(";"),N=document.createElement("style");N.setAttribute("data-ssd-animate",""),N.textContent=`@keyframes ${i}{from{${p}}to{${Y}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${dt[s]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(i);let Z=()=>c==="x"?window.scrollX:window.scrollY,oe=()=>c==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),N.remove();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(J){let _=Math.min(1,Math.max(0,J));e.classList.remove(i);for(let O of b)e.style.setProperty(O.prop,pt(O.from,O.to,_));},getProgress(){let J=e.getBoundingClientRect(),_=Z(),O=oe(),{tStart:fe,tEnd:ge}=pe({top:J.top,height:J.height},_,O,T,A);return q(K(_,fe,ge,m))}}}if(G())return C();let F=0,M=0,V=0,ne=false,H=false,W=-1,d=0,L=false,g=NaN,y=()=>w?c==="x"?w.scrollLeft:w.scrollTop:c==="x"?window.scrollX:window.scrollY,X=()=>w?c==="x"?w.clientWidth:w.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function xe(){let i=e.getBoundingClientRect(),p,Y;if(w){let Z=w.getBoundingClientRect();p=c==="x"?i.left-Z.left+w.scrollLeft:i.top-Z.top+w.scrollTop,Y=c==="x"?i.width:i.height;}else p=c==="x"?i.left:i.top,Y=c==="x"?i.width:i.height;let N=pe({top:p,height:Y},y(),X(),T,A);F=N.tStart,M=N.tEnd;}function be(i){e.style.setProperty("--scroll-draw-progress",String(i));for(let p of b)e.style.setProperty(p.prop,pt(p.from,p.to,i));B?.(i);}function we(i){if(isNaN(g)){g=i;return}g<=0&&i>0?Q?.():g>0&&i<=0&&ee?.(),g<1&&i>=1?he?.():g>=1&&i<1&&R?.(),g=i;}function de(){if(!ne||H)return;let i=M===F?0:(y()-F)/(M-F);we(i);let p=q(K(y(),F,M,m));l&&(W=Math.max(W,p),p=W),d=p,be(p),p>=1&&!L?(L=true,S?.()):p<1&&!l&&(L=false),V=requestAnimationFrame(de);}xe();{let i=q(K(y(),F,M,m));l&&i>0&&(W=i),d=i,be(i);}let Ne=new IntersectionObserver(i=>{i.forEach(p=>{ne=p.isIntersecting,ne&&!H?V=requestAnimationFrame(de):cancelAnimationFrame(V);});},{root:w??null}),ke;function U(){clearTimeout(ke),ke=setTimeout(xe,150);}return window.addEventListener("resize",U),window.addEventListener("orientationchange",U),Ne.observe(e),Ce(e,{type:"animate",getProgress:()=>d,getTrigger:()=>({tStart:F,tEnd:M})}),{destroy(){cancelAnimationFrame(V),Ne.disconnect(),window.removeEventListener("resize",U),window.removeEventListener("orientationchange",U),clearTimeout(ke),Pe(e);},replay(){W=-1,L=false,d=0,H=false,be(0);},pause(){H=true,cancelAnimationFrame(V);},resume(){H&&(H=false,ne&&(V=requestAnimationFrame(de)));},seek(i){let p=Math.min(1,Math.max(0,i));d=p,W=p,H=true,cancelAnimationFrame(V),be(p);},getProgress(){return d}}}var Ke={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qe(e,r){if(typeof window>"u")return Ke;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollCounter: element not found:",e),Ke;let t=n,{from:u=0,to:s,format:m,easing:l="ease-out",trigger:c={},once:h=true,decimals:$,onComplete:B}=r,S=$!==void 0?d=>d.toFixed($):m??(d=>String(Math.round(d))),Q=typeof l=="function"?l:ie[l]??ie["ease-out"],he=ae(c.start??"top 80%"),R=ae(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=S(s),B?.(),Ke;t.textContent=S(u);let te=0,q=0,T=0,A=false,w=false,b=-1,P=0,I=false,G=()=>window.scrollY,C=()=>window.innerHeight;function F(){let d=t.getBoundingClientRect(),L=pe({top:d.top,height:d.height},G(),C(),he,R);te=L.tStart,q=L.tEnd;}function M(d){t.textContent=S(u+(s-u)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function V(){if(!A||w)return;let d=Q(K(G(),te,q,1));h&&(b=Math.max(b,d),d=b),P=d,M(d),d>=1&&!I?(I=true,B?.()):d<1&&!h&&(I=false),T=requestAnimationFrame(V);}F();{let d=Q(K(G(),te,q,1));h&&d>0&&(b=d),P=d,M(d);}let ne=new IntersectionObserver(d=>{d.forEach(L=>{A=L.isIntersecting,A&&!w?T=requestAnimationFrame(V):cancelAnimationFrame(T);});}),H;function W(){clearTimeout(H),H=setTimeout(F,150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),ne.observe(t),Ce(t,{type:"counter",getProgress:()=>P,getTrigger:()=>({tStart:te,tEnd:q})}),{destroy(){cancelAnimationFrame(T),ne.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(H),Pe(t);},replay(){b=-1,I=false,P=0,w=false,M(0);},pause(){w=true,cancelAnimationFrame(T);},resume(){w&&(w=false,A&&(T=requestAnimationFrame(V)));},seek(d){let L=Math.min(1,Math.max(0,d));P=L,b=L,w=true,cancelAnimationFrame(T),M(L);},getProgress(){return P}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function et(e,r={}){if(typeof window>"u")return gt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollVideo: <video> element not found:",e),gt;let t=n,{trigger:u={},easing:s="linear",once:m=false,axis:l="y",preload:c="auto",onReady:h,onComplete:$,onProgress:B}=r,S=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Q=typeof s=="function"?s:ie[s]??ie.linear,he=ae(u.start??"top top"),R=ae(u.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=c);let ee=r.from??0,te=r.to,q=0,T=0,A=0,w=false,b=false,P=-1,I=0,G=false,C=false,F=()=>l==="x"?window.scrollX:window.scrollY,M=()=>l==="x"?window.innerWidth:window.innerHeight;function V(){let y=t.getBoundingClientRect(),X=l==="x"?y.left:y.top,xe=l==="x"?y.width:y.height,be=pe({top:X,height:xe},F(),M(),he,R);q=be.tStart,T=be.tEnd;}function ne(y){if(!C)return;let X=te??t.duration??0;t.currentTime=ee+(X-ee)*y,t.style.setProperty("--scroll-draw-progress",String(y)),B?.(y);}function H(){if(!w||b||!C)return;let y=Q(K(F(),q,T,1));m&&(P=Math.max(P,y),y=P),I=y,ne(y),y>=1&&!G?(G=true,$?.()):y<1&&!m&&(G=false),A=requestAnimationFrame(H);}function W(){if(C=true,te===void 0&&(te=t.duration),S){ne(1),h?.();return}V(),h?.(),w&&!b&&(A=requestAnimationFrame(H));}t.readyState>=1?W():t.addEventListener("loadedmetadata",W,{once:true}),C||V();let d=new IntersectionObserver(y=>{y.forEach(X=>{w=X.isIntersecting,w&&!b&&C?A=requestAnimationFrame(H):cancelAnimationFrame(A);});}),L;function g(){clearTimeout(L),L=setTimeout(V,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),d.observe(t),Ce(t,{type:"video",getProgress:()=>I,getTrigger:()=>({tStart:q,tEnd:T})}),{destroy(){cancelAnimationFrame(A),d.disconnect(),t.removeEventListener("loadedmetadata",W),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(L),Pe(t);},replay(){P=-1,G=false,I=0,b=false,ne(0);},pause(){b=true,cancelAnimationFrame(A);},resume(){b&&(b=false,w&&C&&(A=requestAnimationFrame(H)));},seek(y){let X=Math.min(1,Math.max(0,y));I=X,P=X,b=true,cancelAnimationFrame(A),ne(X);},getProgress(){return I}}}function bt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Ht(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function yt(e){let r=bt(e),n=new Map;for(let s of r){let m=s.offsetTop;n.has(m)||n.set(m,[]),n.get(m).push(s);}let t=[],u=Array.from(n.keys()).sort((s,m)=>s-m);for(let s of u){let m=n.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block";for(let c of m)l.appendChild(c);t.push(l);}e.textContent="";for(let s of t)e.appendChild(s),e.appendChild(document.createTextNode(" "));return t}function Nt(e,r,n,t){if(n<=1||t===0)return e;let u=(n-1)*t,s=r*t,m=s+(1-u);return m<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(m-s)))}function Rt(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tt(e,r={}){if(typeof window>"u")return ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollText: element not found:",e),ht;let t=n,{split:u="words",stagger:s=.04,easing:m="ease-out",from:l={opacity:0,y:24},trigger:c={},once:h=true,onComplete:$}=r,B=window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof m=="function"?m:ie[m]??ie["ease-out"],Q=ae(c.start??"top 85%"),he=ae(c.end??"top 40%"),R=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ee;u==="chars"?ee=Ht(t):u==="lines"?ee=yt(t):ee=bt(t);let te=ee.length;function q(g,y){l?.opacity!==void 0&&(g.style.opacity=String(l.opacity+(1-l.opacity)*y));let X=Rt(y,l);X&&(g.style.transform=X);}function T(g){t.style.setProperty("--scroll-draw-progress",String(g)),ee.forEach((y,X)=>{let xe=S(Nt(g,X,te,s));q(y,xe);});}if(B)return T(1),$?.(),{destroy(){t.innerHTML=R,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};T(0);let A=0,w=0,b=0,P=false,I=false,G=-1,C=0,F=false,M=()=>window.scrollY,V=()=>window.innerHeight;function ne(){let g=t.getBoundingClientRect(),y=pe({top:g.top,height:g.height},M(),V(),Q,he);A=y.tStart,w=y.tEnd;}function H(){if(!P||I)return;let g=K(M(),A,w,1);h&&(G=Math.max(G,g),g=G),C=g,T(g),g>=1&&!F?(F=true,$?.()):g<1&&!h&&(F=false),b=requestAnimationFrame(H);}ne();let W=new IntersectionObserver(g=>{g.forEach(y=>{P=y.isIntersecting,P&&!I?b=requestAnimationFrame(H):cancelAnimationFrame(b);});}),d;function L(){clearTimeout(d),d=setTimeout(()=>{if(u==="lines"){let g=C;t.innerHTML=R,t.setAttribute("aria-label",t.textContent??""),ee=yt(t),T(g);}ne();},150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),W.observe(t),Ce(t,{type:"text",getProgress:()=>C,getTrigger:()=>({tStart:A,tEnd:w})}),{destroy(){cancelAnimationFrame(b),W.disconnect(),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(d),t.innerHTML=R,t.removeAttribute("aria-label"),Pe(t);},replay(){G=-1,F=false,C=0,I=false,T(0);},pause(){I=true,cancelAnimationFrame(b);},resume(){I&&(I=false,P&&(b=requestAnimationFrame(H)));},seek(g){let y=Math.min(1,Math.max(0,g));C=y,G=y,I=true,cancelAnimationFrame(b),T(y);},getProgress(){return C}}}function un(e={}){let r,n;return onMount(()=>{r&&(n=Ze(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function fn(e={}){let r,n;return onMount(()=>{r&&(n=Ze(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function mn(e){let r,n;return onMount(()=>{r&&(n=Je(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function pn(e){let r,n;return onMount(()=>{r&&(n=Je(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function dn(e){let r,n;return onMount(()=>{r&&(n=Qe(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function gn(e){let r,n;return onMount(()=>{r&&(n=Qe(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function yn(e={}){let r,n;return onMount(()=>{r&&(n=et(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function hn(e={}){let r,n;return onMount(()=>{r&&(n=et(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function bn(e={}){let r,n;return onMount(()=>{r&&(n=tt(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function wn(e={}){let r,n;return onMount(()=>{r&&(n=tt(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}export{pn as createScrollAnimate,gn as createScrollCounter,fn as createScrollDraw,wn as createScrollText,hn as createScrollVideo,mn as useScrollAnimate,dn as useScrollCounter,un as useScrollDraw,bn as useScrollText,yn as useScrollVideo};
3
+ <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${l}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",u,{passive:true}),u(),t}function Ue(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),u=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let m=parseFloat(s),l=t[u++]??m;return String(+(m+(l-m)*n).toFixed(4))})}function Ze(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,u=n?{...lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:l=1,fade:c=false,easing:h="linear",trigger:P={},stagger:R=0,direction:E="forward",once:j=false,debug:he=false,axis:V="y",scrollContainer:ee,autoReverse:U=false,delay:Z=0,strokeColor:S,strokeWidth:A,fillOpacity:L,waypoints:g,velocityScale:T=false,threshold:O=0,rootMargin:G="0px",repeat:I=0,repeatDelay:se=0,morphTo:$,clip:_,autoplay:B=false,duration:X=1e3,native:z=true,onProgress:p,onStart:x,onComplete:b,onEnter:y,onLeave:q,onEnterBack:xe,onLeaveBack:Me}=u,be=_===true?"left":typeof _=="string"?_:false,we=typeof h=="function"?h:ae[h]??ae.linear,Ie=le(P.start??"top bottom"),Re=le(P.end??"bottom top"),te=typeof ee=="string"?document.querySelector(ee):ee??null,pe=Array.isArray(S)?S[0]:null,J=Array.isArray(S)?S[1]:typeof S=="string"?S:null,K=Array.isArray(A)?A[0]:null,i=Array.isArray(A)?A[1]:typeof A=="number"?A:null,d=Array.isArray(L)?L[0]:null,k=Array.isArray(L)?L[1]:typeof L=="number"?L:null;function ne(o){let a=o*100;switch(be){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let C=be?[]:Array.from(e.querySelectorAll(m)),N=[],D=[],ie=0,ce=0,re=false,de=false,oe=0,Ve=false,ve=-1,ze=-1,ue=false,Oe=0,Ae=0,Le,Xe=null,$e=new Set,qe=-1,nt=performance.now(),De=NaN;function Ne(){return te?V==="x"?te.scrollLeft:te.scrollTop:V==="x"?window.scrollX:window.scrollY}function rt(){return te?V==="x"?te.clientWidth:te.clientHeight:V==="x"?window.innerWidth:window.innerHeight}function ot(){let o=e.getBoundingClientRect(),a,v,Y;if(te){let me=te.getBoundingClientRect();a=V==="x"?o.left-me.left+te.scrollLeft:o.top-me.top+te.scrollTop,v=V==="x"?o.width:o.height,Y=Ne();}else a=V==="x"?o.left:o.top,v=V==="x"?o.width:o.height,Y=Ne();let fe=ye({top:a,height:v},Y,rt(),Ie,Re);ie=fe.tStart,ce=fe.tEnd,he&&process.env.NODE_ENV!=="production"&&(Xe?.remove(),Xe=Ct(ie,ce,V));}function wt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),be){let v=a==="reverse"?1-o:o;e.style.clipPath=ne(v);return}C.forEach((v,Y)=>{v.style.strokeDashoffset=a==="reverse"?`${N[Y]*o}`:`${N[Y]*(1-o)}`,c&&(v.style.opacity=a==="reverse"?`${1-o}`:`${o}`),pe&&J?v.style.stroke=He(pe,J,o):J&&(v.style.stroke=J),K!==null&&i!==null?v.style.strokeWidth=`${K+(i-K)*o}`:i!==null&&(v.style.strokeWidth=`${i}`),d!==null&&k!==null?v.style.fillOpacity=`${d+(k-d)*o}`:k!==null&&(v.style.fillOpacity=`${k}`),$&&v.tagName.toLowerCase()==="path"&&D[Y]&&v.setAttribute("d",Ue(D[Y],$,o));});}function We(){if(e.style.setProperty("--scroll-draw-progress","0"),be){e.style.clipPath=ne(0);return}C.forEach((o,a)=>{o.style.strokeDasharray=`${N[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${N[a]}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",pe&&(o.style.stroke=pe),K!==null&&(o.style.strokeWidth=`${K}`),d!==null&&(o.style.fillOpacity=`${d}`),$&&o.tagName.toLowerCase()==="path"&&D[a]&&o.setAttribute("d",D[a]);});}if(C.forEach(o=>{$t(o);let a=Ge(o);N.push(a),o.tagName.toLowerCase()==="path"?D.push(o.getAttribute("d")??""):D.push(""),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),J&&(o.style.stroke=J),i!==null&&(o.style.strokeWidth=`${i}`),k!==null&&(o.style.fillOpacity=`${k}`),$&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",$)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",pe&&(o.style.stroke=pe),K!==null&&(o.style.strokeWidth=`${K}`),d!==null&&(o.style.fillOpacity=`${d}`));}),be){if(s)return e.style.clipPath=ne(1),b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ne(0);}else if(s)return b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};function vt(){return !(z===false||!Lt()||!C.length||typeof h!="string"||!(h in ut)||be||V!=="y"||te||l!==1||R!==0||j||U||T!==false||$||g||I||Z>0||p||x||b||y||q||xe||Me||S!=null||A!=null||L!=null||(P.start??"top bottom").trim()!=="top bottom"||(P.end??"bottom top").trim()!=="bottom top")}function Et(){let o=`svg-scroll-draw-${++At}`,a=E==="reverse"?"0":"var(--ssd-len)",v=E==="reverse"?"var(--ssd-len)":"0",Y=`stroke-dashoffset:${a};`,fe=`stroke-dashoffset:${v};`;c&&(Y+=`opacity:${E==="reverse"?1:0};`,fe+=`opacity:${E==="reverse"?0:1};`);let me=document.createElement("style");me.setAttribute("data-svg-scroll-draw",""),me.textContent=`@keyframes ${o}{from{${Y}}to{${fe}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ut[h]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(me);function ge(f,M){f.style.setProperty("--ssd-len",String(N[M])),f.style.strokeDasharray=`${N[M]}`,f.style.strokeDashoffset="",f.style.opacity="",f.style.animationPlayState="",f.classList.add(o);}C.forEach(ge);let w=false,F=-1;function H(){if(F>=0)return F;let f=e.getBoundingClientRect(),{tStart:M,tEnd:W}=ye({top:f.top,height:f.height},Ne(),rt(),Ie,Re);return we(Q(Ne(),M,W,l))}return {destroy(){C.forEach(f=>{f.classList.remove(o),f.style.removeProperty("--ssd-len"),f.style.animationPlayState="";}),me.remove();},replay(){w=false,F=-1,C.forEach(ge);},pause(){w=true,C.forEach(f=>{f.style.animationPlayState="paused";});},resume(){w&&(w=false,C.forEach(f=>{f.style.animationPlayState="running";}));},seek(f){let M=Math.min(1,Math.max(0,f));F=M,w=true,C.forEach((W,ke)=>{W.classList.remove(o),W.style.strokeDashoffset=E==="reverse"?`${N[ke]*M}`:`${N[ke]*(1-M)}`,c&&(W.style.opacity=E==="reverse"?`${1-M}`:`${M}`);});},getProgress(){return H()}}}if(vt())return Et();function St(){let o=Math.max(1,X),a=0,v=0;function Y(H){let f=true;if(be){let M=Math.min(1,Math.max(0,H/o)),W=we(M);Oe=W,e.style.setProperty("--scroll-draw-progress",String(W)),e.style.clipPath=ne(E==="reverse"?1-W:W),p?.(W),M<1&&(f=false);}else C.forEach((M,W)=>{let ke=W*R*o,Fe=Math.min(1,Math.max(0,(H-ke)/o)),Ee=we(Fe);M.style.strokeDashoffset=E==="reverse"?`${N[W]*Ee}`:`${N[W]*(1-Ee)}`,c&&(M.style.opacity=E==="reverse"?`${1-Ee}`:`${Ee}`),pe&&J?M.style.stroke=He(pe,J,Ee):J&&(M.style.stroke=J),K!==null&&i!==null?M.style.strokeWidth=`${K+(i-K)*Ee}`:i!==null&&(M.style.strokeWidth=`${i}`),d!==null&&k!==null?M.style.fillOpacity=`${d+(k-d)*Ee}`:k!==null&&(M.style.fillOpacity=`${k}`),$&&M.tagName.toLowerCase()==="path"&&D[W]&&M.setAttribute("d",Ue(D[W],$,Ee)),W===0&&(p?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Fe<1&&(f=false);});if(g){let M=Math.min(1,Math.max(0,H/o)),W=we(M);for(let ke in g){let Fe=parseFloat(ke);W>=Fe&&!$e.has(Fe)&&($e.add(Fe),g[ke]?.());}}return f}function fe(H){if(ue)return;let f=H-a;de||(de=true,x?.());let M=Y(f);if(M&&!re){re=true,Y(o*(1+Math.max(0,C.length-1)*R)),b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{a=performance.now(),de=false,re=false,$e.clear(),We(),oe=requestAnimationFrame(fe);},se));return}M||(oe=requestAnimationFrame(fe));}function me(){cancelAnimationFrame(oe),clearTimeout(Le),a=performance.now(),v=0,ue=false,de=false,re=false,Ae=0,$e.clear(),We(),oe=requestAnimationFrame(fe);}let ge=new IntersectionObserver(H=>{H.forEach(f=>{f.isIntersecting&&!(j&&re)?me():!f.isIntersecting&&!j&&!re&&(cancelAnimationFrame(oe),clearTimeout(Le),a=null);});},{root:te??null,threshold:O,rootMargin:G}),w;function F(){clearTimeout(w),w=setTimeout(()=>{C.forEach((H,f)=>{N[f]=Ge(H),H.style.strokeDasharray=`${N[f]}`;});},150);}return window.addEventListener("resize",F),window.addEventListener("orientationchange",F),Z>0?setTimeout(()=>ge.observe(e),Z):ge.observe(e),{destroy(){cancelAnimationFrame(oe),clearTimeout(Le),ge.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){Ae=0,me();},pause(){ue||(ue=true,v=performance.now()-a,cancelAnimationFrame(oe));},resume(){ue&&(ue=false,a=performance.now()-v,oe=requestAnimationFrame(fe));},seek(H){let f=Math.min(1,Math.max(0,H));Oe=f,ue=true,v=f*o,a=performance.now()-v,cancelAnimationFrame(oe),Y(v);},getProgress(){return Oe}}}if(B)return St();ot();function _e(){if(!Ve||ue)return;let o=performance.now(),a=Ne(),v=l;if(T!==false){let w=o-nt,F=w>0?Math.abs(a-(qe<0?a:qe))/w:0;v=l*Math.max(.2,1+F*(typeof T=="number"?T:1)*.04);}qe=a,nt=o;let Y=U?ze===-1||a>=ze?"forward":"reverse":E;ze=a;let fe=ce-ie,me=true,ge=fe===0?0:(a-ie)/fe;if(isNaN(De)||(De<=0&&ge>0?y?.():De>0&&ge<=0&&Me?.(),De<1&&ge>=1?q?.():De>=1&&ge<1&&xe?.()),De=ge,be){let w=we(Q(a,ie,ce,v));j&&!U&&(ve=Math.max(ve,w),w=ve),Oe=w,e.style.setProperty("--scroll-draw-progress",String(w));let F=Y==="reverse"?1-w:w;e.style.clipPath=ne(F),p?.(w),!de&&Q(a,ie,ce,v)>0&&(de=true,x?.()),w>=1&&!re?(re=true,b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,de=false,re=false,e.style.clipPath=ne(0);},se))):w<1&&!j&&(re=false),oe=requestAnimationFrame(_e);return}if(C.forEach((w,F)=>{let H=F*R*fe,f=we(Q(a,ie+H,ce+H,v));j&&!U&&(ve=Math.max(ve,f),f=ve),Oe=f,w.style.strokeDashoffset=Y==="reverse"?`${N[F]*f}`:`${N[F]*(1-f)}`,c&&(w.style.opacity=Y==="reverse"?`${1-f}`:`${f}`),pe&&J?w.style.stroke=He(pe,J,f):J&&(w.style.stroke=J),K!==null&&i!==null?w.style.strokeWidth=`${K+(i-K)*f}`:i!==null&&(w.style.strokeWidth=`${i}`),d!==null&&k!==null?w.style.fillOpacity=`${d+(k-d)*f}`:k!==null&&(w.style.fillOpacity=`${k}`),$&&w.tagName.toLowerCase()==="path"&&D[F]&&w.setAttribute("d",Ue(D[F],$,f)),F===0&&(p?.(f),e.style.setProperty("--scroll-draw-progress",String(f))),f<1&&(me=false);}),g){let w=we(Q(a,ie,ce,v));for(let F in g){let H=parseFloat(F);w>=H&&!$e.has(H)&&($e.add(H),g[F]?.());}}!de&&Q(a,ie,ce,v)>0&&(de=true,x?.()),me&&!re?(re=true,b?.(),Ae<(I==="infinite"?1/0:I??0)&&(Ae++,Le=setTimeout(()=>{ve=-1,de=false,re=false,$e.clear(),We();},se))):!me&&!j&&(re=false),oe=requestAnimationFrame(_e);}let Ye=new IntersectionObserver(o=>{o.forEach(a=>{Ve=a.isIntersecting,Ve&&!ue?oe=requestAnimationFrame(_e):cancelAnimationFrame(oe);});},{root:te??null,threshold:O,rootMargin:G}),je;function Be(){clearTimeout(je),je=setTimeout(()=>{C.forEach((o,a)=>{N[a]=Ge(o),o.style.strokeDasharray=`${N[a]}`;}),ot();},150);}return window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be),Z>0?setTimeout(()=>Ye.observe(e),Z):Ye.observe(e),{destroy(){cancelAnimationFrame(oe),clearTimeout(Le),Ye.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(je),Xe?.remove();},replay(){ve=-1,ze=-1,qe=-1,de=false,re=false,Ae=0,ue=false,$e.clear(),clearTimeout(Le),We();},pause(){ue=true,cancelAnimationFrame(oe);},resume(){ue&&(ue=false,Ve&&(oe=requestAnimationFrame(_e)));},seek(o){let a=Math.min(1,Math.max(0,o));Oe=a,ve=a,ue=true,cancelAnimationFrame(oe),wt(a,E);},getProgress(){return Oe}}}var ft=new Map;function Ce(e,r){ft.set(e,r);}function Pe(e){ft.delete(e);}function Pt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function mt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let u=[],s=[],m=t[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let c=l.match(/^([-+]?[\d.eE]+)(.*)$/);u.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}r.push({fn:t[1],nums:u,units:s});}return r}function It(e,r,n){let t=mt(e),u=mt(r);return t.length===0||t.length!==u.length?n<1?e:r:t.map((s,m)=>{let l=u[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((c,h)=>`${c}${s.units[h]}`).join(", ")})`:`${l.fn}(${l.nums.map((c,h)=>`${c}${l.units[h]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,h)=>`${c+(l.nums[h]-c)*n}${s.units[h]}`).join(", ")})`}).join(" ")}function pt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),u=String(r);if(Pt(t))return He(t,u,n);if(t.includes("("))return It(t,u,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),m=u.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),c=parseFloat(m[1]);return `${l+(c-l)*n}${s[2]||m[2]}`}return n<1?t:u}function Ot(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var dt={linear:"linear","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out"},kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dt=0;function Ft(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Je(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:u={},easing:s="ease-out",speed:m=1,once:l=false,axis:c="y",scrollContainer:h,native:P=true,velocityScale:R=false,onProgress:E,onComplete:j,onEnter:he,onLeave:V,onEnterBack:ee,onLeaveBack:U}=r,Z=window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof s=="function"?s:ae[s]??ae["ease-out"],A=le(u.start??"top bottom"),L=le(u.end??"bottom top"),g=typeof h=="string"?document.querySelector(h):h??null,T=Object.entries(t).map(([i,d])=>({prop:Ot(i),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function O(){let i=window.getComputedStyle(e);for(let d of T)d.from===""&&(d.from=i.getPropertyValue(d.prop).trim()||"0");}function G(){for(let i of T)e.style.setProperty(i.prop,String(i.to));}if(Z)return G(),j?.(),n;O();function I(){if(!P||!Ft()||typeof s!="string"||!(s in dt)||c!=="y"||g||l||m!==1||E||j||he||V||ee||U||R!==false||(u.start??"top bottom").trim()!=="top bottom"||(u.end??"bottom top").trim()!=="bottom top")return false;for(let i of T)if(!kt.has(i.prop))return false;return true}function se(){let i=`ssd-a-${++Dt}`,d=T.map(D=>`${D.prop}:${D.from}`).join(";"),k=T.map(D=>`${D.prop}:${D.to}`).join(";"),ne=document.createElement("style");ne.setAttribute("data-ssd-animate",""),ne.textContent=`@keyframes ${i}{from{${d}}to{${k}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${dt[s]};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ne),e.classList.add(i);let C=()=>c==="x"?window.scrollX:window.scrollY,N=()=>c==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),ne.remove();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(D){let ie=Math.min(1,Math.max(0,D));e.classList.remove(i);for(let ce of T)e.style.setProperty(ce.prop,pt(ce.from,ce.to,ie));},getProgress(){let D=e.getBoundingClientRect(),ie=C(),ce=N(),{tStart:re,tEnd:de}=ye({top:D.top,height:D.height},ie,ce,A,L);return S(Q(ie,re,de,m))}}}if(I())return se();let $=0,_=0,B=0,X=false,z=false,p=-1,x=0,b=false,y=NaN,q=-1,xe=0,Me=()=>g?c==="x"?g.scrollLeft:g.scrollTop:c==="x"?window.scrollX:window.scrollY,be=()=>g?c==="x"?g.clientWidth:g.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function we(){let i=e.getBoundingClientRect(),d,k;if(g){let C=g.getBoundingClientRect();d=c==="x"?i.left-C.left+g.scrollLeft:i.top-C.top+g.scrollTop,k=c==="x"?i.width:i.height;}else d=c==="x"?i.left:i.top,k=c==="x"?i.width:i.height;let ne=ye({top:d,height:k},Me(),be(),A,L);$=ne.tStart,_=ne.tEnd;}function Ie(i){e.style.setProperty("--scroll-draw-progress",String(i));for(let d of T)e.style.setProperty(d.prop,pt(d.from,d.to,i));E?.(i);}function Re(i){if(isNaN(y)){y=i;return}y<=0&&i>0?he?.():y>0&&i<=0&&U?.(),y<1&&i>=1?V?.():y>=1&&i<1&&ee?.(),y=i;}function te(){if(!X||z)return;let i=performance.now(),d=Me(),k=m;if(R!==false){let N=i-xe,D=N>0?Math.abs(d-(q<0?d:q))/N:0;k=m*Math.max(.2,1+D*(typeof R=="number"?R:1)*.04);}q=d,xe=i;let ne=_===$?0:(d-$)/(_-$);Re(ne);let C=S(Q(d,$,_,k));l&&(p=Math.max(p,C),C=p),x=C,Ie(C),C>=1&&!b?(b=true,j?.()):C<1&&!l&&(b=false),B=requestAnimationFrame(te);}we();{let i=S(Q(Me(),$,_,m));l&&i>0&&(p=i),x=i,Ie(i);}let pe=new IntersectionObserver(i=>{i.forEach(d=>{X=d.isIntersecting,X&&!z?B=requestAnimationFrame(te):cancelAnimationFrame(B);});},{root:g??null}),J;function K(){clearTimeout(J),J=setTimeout(we,150);}return window.addEventListener("resize",K),window.addEventListener("orientationchange",K),pe.observe(e),Ce(e,{type:"animate",getProgress:()=>x,getTrigger:()=>({tStart:$,tEnd:_})}),{destroy(){cancelAnimationFrame(B),pe.disconnect(),window.removeEventListener("resize",K),window.removeEventListener("orientationchange",K),clearTimeout(J),Pe(e);},replay(){p=-1,b=false,x=0,z=false,Ie(0);},pause(){z=true,cancelAnimationFrame(B);},resume(){z&&(z=false,X&&(B=requestAnimationFrame(te)));},seek(i){let d=Math.min(1,Math.max(0,i));x=d,p=d,z=true,cancelAnimationFrame(B),Ie(d);},getProgress(){return x}}}var Ke={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qe(e,r){if(typeof window>"u")return Ke;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollCounter: element not found:",e),Ke;let t=n,{from:u=0,to:s,format:m,easing:l="ease-out",trigger:c={},once:h=true,decimals:P,onComplete:R}=r,E=P!==void 0?p=>p.toFixed(P):m??(p=>String(Math.round(p))),j=typeof l=="function"?l:ae[l]??ae["ease-out"],he=le(c.start??"top 80%"),V=le(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=E(s),R?.(),Ke;t.textContent=E(u);let U=0,Z=0,S=0,A=false,L=false,g=-1,T=0,O=false,G=()=>window.scrollY,I=()=>window.innerHeight;function se(){let p=t.getBoundingClientRect(),x=ye({top:p.top,height:p.height},G(),I(),he,V);U=x.tStart,Z=x.tEnd;}function $(p){t.textContent=E(u+(s-u)*p),t.style.setProperty("--scroll-draw-progress",String(p));}function _(){if(!A||L)return;let p=j(Q(G(),U,Z,1));h&&(g=Math.max(g,p),p=g),T=p,$(p),p>=1&&!O?(O=true,R?.()):p<1&&!h&&(O=false),S=requestAnimationFrame(_);}se();{let p=j(Q(G(),U,Z,1));h&&p>0&&(g=p),T=p,$(p);}let B=new IntersectionObserver(p=>{p.forEach(x=>{A=x.isIntersecting,A&&!L?S=requestAnimationFrame(_):cancelAnimationFrame(S);});}),X;function z(){clearTimeout(X),X=setTimeout(se,150);}return window.addEventListener("resize",z),window.addEventListener("orientationchange",z),B.observe(t),Ce(t,{type:"counter",getProgress:()=>T,getTrigger:()=>({tStart:U,tEnd:Z})}),{destroy(){cancelAnimationFrame(S),B.disconnect(),window.removeEventListener("resize",z),window.removeEventListener("orientationchange",z),clearTimeout(X),Pe(t);},replay(){g=-1,O=false,T=0,L=false,$(0);},pause(){L=true,cancelAnimationFrame(S);},resume(){L&&(L=false,A&&(S=requestAnimationFrame(_)));},seek(p){let x=Math.min(1,Math.max(0,p));T=x,g=x,L=true,cancelAnimationFrame(S),$(x);},getProgress(){return T}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function et(e,r={}){if(typeof window>"u")return gt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollVideo: <video> element not found:",e),gt;let t=n,{trigger:u={},easing:s="linear",once:m=false,axis:l="y",preload:c="auto",onReady:h,onComplete:P,onProgress:R}=r,E=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=typeof s=="function"?s:ae[s]??ae.linear,he=le(u.start??"top top"),V=le(u.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=c);let ee=r.from??0,U=r.to,Z=0,S=0,A=0,L=false,g=false,T=-1,O=0,G=false,I=false,se=()=>l==="x"?window.scrollX:window.scrollY,$=()=>l==="x"?window.innerWidth:window.innerHeight;function _(){let y=t.getBoundingClientRect(),q=l==="x"?y.left:y.top,xe=l==="x"?y.width:y.height,Me=ye({top:q,height:xe},se(),$(),he,V);Z=Me.tStart,S=Me.tEnd;}function B(y){if(!I)return;let q=U??t.duration??0;t.currentTime=ee+(q-ee)*y,t.style.setProperty("--scroll-draw-progress",String(y)),R?.(y);}function X(){if(!L||g||!I)return;let y=j(Q(se(),Z,S,1));m&&(T=Math.max(T,y),y=T),O=y,B(y),y>=1&&!G?(G=true,P?.()):y<1&&!m&&(G=false),A=requestAnimationFrame(X);}function z(){if(I=true,U===void 0&&(U=t.duration),E){B(1),h?.();return}_(),h?.(),L&&!g&&(A=requestAnimationFrame(X));}t.readyState>=1?z():t.addEventListener("loadedmetadata",z,{once:true}),I||_();let p=new IntersectionObserver(y=>{y.forEach(q=>{L=q.isIntersecting,L&&!g&&I?A=requestAnimationFrame(X):cancelAnimationFrame(A);});}),x;function b(){clearTimeout(x),x=setTimeout(_,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),p.observe(t),Ce(t,{type:"video",getProgress:()=>O,getTrigger:()=>({tStart:Z,tEnd:S})}),{destroy(){cancelAnimationFrame(A),p.disconnect(),t.removeEventListener("loadedmetadata",z),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(x),Pe(t);},replay(){T=-1,G=false,O=0,g=false,B(0);},pause(){g=true,cancelAnimationFrame(A);},resume(){g&&(g=false,L&&I&&(A=requestAnimationFrame(X)));},seek(y){let q=Math.min(1,Math.max(0,y));O=q,T=q,g=true,cancelAnimationFrame(A),B(q);},getProgress(){return O}}}function bt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Ht(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function yt(e){let r=bt(e),n=new Map;for(let s of r){let m=s.offsetTop;n.has(m)||n.set(m,[]),n.get(m).push(s);}let t=[],u=Array.from(n.keys()).sort((s,m)=>s-m);for(let s of u){let m=n.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block";for(let c of m)l.appendChild(c);t.push(l);}e.textContent="";for(let s of t)e.appendChild(s),e.appendChild(document.createTextNode(" "));return t}function Nt(e,r,n,t){if(n<=1||t===0)return e;let u=(n-1)*t,s=r*t,m=s+(1-u);return m<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(m-s)))}function Rt(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tt(e,r={}){if(typeof window>"u")return ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return process.env.NODE_ENV!=="production"&&console.warn("[svg-scroll-draw] scrollText: element not found:",e),ht;let t=n,{split:u="words",stagger:s=.04,easing:m="ease-out",from:l={opacity:0,y:24},trigger:c={},once:h=true,onComplete:P}=r,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,E=typeof m=="function"?m:ae[m]??ae["ease-out"],j=le(c.start??"top 85%"),he=le(c.end??"top 40%"),V=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ee;u==="chars"?ee=Ht(t):u==="lines"?ee=yt(t):ee=bt(t);let U=ee.length;function Z(b,y){l?.opacity!==void 0&&(b.style.opacity=String(l.opacity+(1-l.opacity)*y));let q=Rt(y,l);q&&(b.style.transform=q);}function S(b){t.style.setProperty("--scroll-draw-progress",String(b)),ee.forEach((y,q)=>{let xe=E(Nt(b,q,U,s));Z(y,xe);});}if(R)return S(1),P?.(),{destroy(){t.innerHTML=V,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};S(0);let A=0,L=0,g=0,T=false,O=false,G=-1,I=0,se=false,$=()=>window.scrollY,_=()=>window.innerHeight;function B(){let b=t.getBoundingClientRect(),y=ye({top:b.top,height:b.height},$(),_(),j,he);A=y.tStart,L=y.tEnd;}function X(){if(!T||O)return;let b=Q($(),A,L,1);h&&(G=Math.max(G,b),b=G),I=b,S(b),b>=1&&!se?(se=true,P?.()):b<1&&!h&&(se=false),g=requestAnimationFrame(X);}B();let z=new IntersectionObserver(b=>{b.forEach(y=>{T=y.isIntersecting,T&&!O?g=requestAnimationFrame(X):cancelAnimationFrame(g);});}),p;function x(){clearTimeout(p),p=setTimeout(()=>{if(u==="lines"){let b=I;t.innerHTML=V,t.setAttribute("aria-label",t.textContent??""),ee=yt(t),S(b);}B();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),z.observe(t),Ce(t,{type:"text",getProgress:()=>I,getTrigger:()=>({tStart:A,tEnd:L})}),{destroy(){cancelAnimationFrame(g),z.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(p),t.innerHTML=V,t.removeAttribute("aria-label"),Pe(t);},replay(){G=-1,se=false,I=0,O=false,S(0);},pause(){O=true,cancelAnimationFrame(g);},resume(){O&&(O=false,T&&(g=requestAnimationFrame(X)));},seek(b){let y=Math.min(1,Math.max(0,b));I=y,G=y,O=true,cancelAnimationFrame(g),S(y);},getProgress(){return I}}}function un(e={}){let r,n;return onMount(()=>{r&&(n=Ze(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function fn(e={}){let r,n;return onMount(()=>{r&&(n=Ze(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function mn(e){let r,n;return onMount(()=>{r&&(n=Je(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function pn(e){let r,n;return onMount(()=>{r&&(n=Je(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function dn(e){let r,n;return onMount(()=>{r&&(n=Qe(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function gn(e){let r,n;return onMount(()=>{r&&(n=Qe(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function yn(e={}){let r,n;return onMount(()=>{r&&(n=et(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function hn(e={}){let r,n;return onMount(()=>{r&&(n=et(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}function bn(e={}){let r,n;return onMount(()=>{r&&(n=tt(r,e));}),onCleanup(()=>{n?.destroy();}),t=>{r=t;}}function wn(e={}){let r,n;return onMount(()=>{r&&(n=tt(r,e));}),onCleanup(()=>{n?.destroy(),n=void 0;}),{ref:t=>{r=t;},getInstance:()=>n}}export{pn as createScrollAnimate,gn as createScrollCounter,fn as createScrollDraw,wn as createScrollText,hn as createScrollVideo,mn as useScrollAnimate,dn as useScrollCounter,un as useScrollDraw,bn as useScrollText,yn as useScrollVideo};