svg-scroll-draw 2.23.7 → 2.25.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/README.md +129 -5
  2. package/dist/angular/index.mjs +1 -1
  3. package/dist/astro/index.mjs +1 -1
  4. package/dist/chunk-22P4KBPG.mjs +1 -0
  5. package/dist/{chunk-XNM3VKEK.mjs → chunk-32ZCSGFZ.mjs} +1 -1
  6. package/dist/{chunk-VJ5ZU55P.mjs → chunk-7USW2XFB.mjs} +1 -1
  7. package/dist/{chunk-K6VATIJH.mjs → chunk-7XOFQCQE.mjs} +1 -1
  8. package/dist/{chunk-G6K54ZFI.mjs → chunk-BDXWPUBJ.mjs} +1 -1
  9. package/dist/{chunk-NYQJPPMP.mjs → chunk-BRV2B2YW.mjs} +1 -1
  10. package/dist/chunk-D2BHE4F2.mjs +1 -0
  11. package/dist/chunk-EBU6E26L.mjs +1 -0
  12. package/dist/{chunk-22B37AWY.mjs → chunk-NX74KN5X.mjs} +1 -1
  13. package/dist/{chunk-CZLUBJAI.mjs → chunk-QZKYGS74.mjs} +1 -1
  14. package/dist/{chunk-PAGN26EH.mjs → chunk-U5TKLHGW.mjs} +1 -1
  15. package/dist/chunk-WKOT2MND.mjs +1 -0
  16. package/dist/cinematic/index.mjs +1 -1
  17. package/dist/devtools/index.cjs +1 -1
  18. package/dist/devtools/index.mjs +1 -1
  19. package/dist/frames/index.cjs +1 -0
  20. package/dist/frames/index.d.mts +42 -0
  21. package/dist/frames/index.d.ts +42 -0
  22. package/dist/frames/index.mjs +1 -0
  23. package/dist/group/index.mjs +1 -1
  24. package/dist/horizontal/index.mjs +1 -1
  25. package/dist/index.mjs +1 -1
  26. package/dist/nuxt/index.cjs +3 -3
  27. package/dist/nuxt/index.d.mts +4 -2
  28. package/dist/nuxt/index.d.ts +4 -2
  29. package/dist/nuxt/index.mjs +1 -1
  30. package/dist/pin/index.mjs +1 -1
  31. package/dist/progress/index.mjs +1 -1
  32. package/dist/react/index.cjs +3 -3
  33. package/dist/react/index.d.mts +17 -1
  34. package/dist/react/index.d.ts +17 -1
  35. package/dist/react/index.mjs +1 -1
  36. package/dist/reveal/index.mjs +1 -1
  37. package/dist/snap/index.mjs +1 -1
  38. package/dist/solid/index.mjs +1 -1
  39. package/dist/svelte/index.mjs +1 -1
  40. package/dist/text/index.mjs +1 -1
  41. package/dist/timeline/index.mjs +1 -1
  42. package/dist/video/index.mjs +1 -1
  43. package/dist/vue/index.cjs +3 -3
  44. package/dist/vue/index.d.mts +37 -1
  45. package/dist/vue/index.d.ts +37 -1
  46. package/dist/vue/index.mjs +1 -1
  47. package/dist/web-component/index.mjs +1 -1
  48. package/package.json +18 -2
  49. package/dist/chunk-BCV4RAIX.mjs +0 -1
  50. package/dist/chunk-OSGWGHQJ.mjs +0 -1
@@ -3,6 +3,7 @@ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../
3
3
  import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
4
4
  import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
5
5
  import { ScrollVideoOptions } from '../video/index.mjs';
6
+ import { ScrollFramesOptions } from '../frames/index.mjs';
6
7
  import { ScrollTextOptions } from '../text/index.mjs';
7
8
 
8
9
  interface UseScrollDrawProgressOptions {
@@ -61,6 +62,21 @@ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
61
62
  playsInline?: boolean;
62
63
  };
63
64
  declare function ScrollVideo({ src, poster, className, style, muted, playsInline, ...rest }: ScrollVideoProps): React.JSX.Element;
65
+ type ScrollFramesProps = Omit<ScrollFramesOptions, 'triggerElement'> & ElementAttrs & {
66
+ /**
67
+ * The tall track behind a sticky stage: an element, or a ref to one. A ref is
68
+ * read when the film starts, after React has attached it, so the track can
69
+ * be an ancestor rendered by the same component.
70
+ */
71
+ triggerElement?: Element | RefObject<Element | null> | null;
72
+ className?: string;
73
+ style?: React.CSSProperties;
74
+ };
75
+ /**
76
+ * A <canvas> that scrubs an image sequence with the scroll (scrollFrames). It
77
+ * renders role="img": pass an aria-label saying what the frames show.
78
+ */
79
+ declare function ScrollFrames({ className, style, role, triggerElement, ...rest }: ScrollFramesProps): React.JSX.Element;
64
80
  type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
65
81
  children: string;
66
82
  as?: keyof React.JSX.IntrinsicElements;
@@ -73,4 +89,4 @@ declare function ScrollText({ children, as: Tag, className, style, ...rest }: Sc
73
89
  style: React.CSSProperties | undefined;
74
90
  }, string | React.JSXElementConstructor<any>>;
75
91
 
76
- export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollText, ScrollVideo, type UseScrollDrawProgressOptions, useScrollDrawProgress };
92
+ export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollFrames, ScrollText, ScrollVideo, type UseScrollDrawProgressOptions, useScrollDrawProgress };
@@ -3,6 +3,7 @@ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../
3
3
  import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
4
4
  import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
5
5
  import { ScrollVideoOptions } from '../video/index.js';
6
+ import { ScrollFramesOptions } from '../frames/index.js';
6
7
  import { ScrollTextOptions } from '../text/index.js';
7
8
 
8
9
  interface UseScrollDrawProgressOptions {
@@ -61,6 +62,21 @@ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
61
62
  playsInline?: boolean;
62
63
  };
63
64
  declare function ScrollVideo({ src, poster, className, style, muted, playsInline, ...rest }: ScrollVideoProps): React.JSX.Element;
65
+ type ScrollFramesProps = Omit<ScrollFramesOptions, 'triggerElement'> & ElementAttrs & {
66
+ /**
67
+ * The tall track behind a sticky stage: an element, or a ref to one. A ref is
68
+ * read when the film starts, after React has attached it, so the track can
69
+ * be an ancestor rendered by the same component.
70
+ */
71
+ triggerElement?: Element | RefObject<Element | null> | null;
72
+ className?: string;
73
+ style?: React.CSSProperties;
74
+ };
75
+ /**
76
+ * A <canvas> that scrubs an image sequence with the scroll (scrollFrames). It
77
+ * renders role="img": pass an aria-label saying what the frames show.
78
+ */
79
+ declare function ScrollFrames({ className, style, role, triggerElement, ...rest }: ScrollFramesProps): React.JSX.Element;
64
80
  type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
65
81
  children: string;
66
82
  as?: keyof React.JSX.IntrinsicElements;
@@ -73,4 +89,4 @@ declare function ScrollText({ children, as: Tag, className, style, ...rest }: Sc
73
89
  style: React.CSSProperties | undefined;
74
90
  }, string | React.JSXElementConstructor<any>>;
75
91
 
76
- export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollText, ScrollVideo, type UseScrollDrawProgressOptions, useScrollDrawProgress };
92
+ export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollFrames, ScrollText, ScrollVideo, type UseScrollDrawProgressOptions, useScrollDrawProgress };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$3,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$6}from'../chunk-NYQJPPMP.mjs';import {a as a$7}from'../chunk-XNM3VKEK.mjs';import {a as a$5}from'../chunk-PAGN26EH.mjs';import {a as a$4}from'../chunk-VJ5ZU55P.mjs';import {b as b$2}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import {a as a$2}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import {a,e,b,c}from'../chunk-NV6YTPHI.mjs';import {d as d$1}from'../chunk-THPTANES.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import B,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function Y(o,r={}){let[n,e$1]=useState(0),t=useRef(r);t.current=r;let s=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e$1(1);return}let l=typeof o=="string"?document.querySelector(o):o.current;if(!l)return;let a$3=l,{axis:i="y",scrollContainer:u,trigger:R={}}=t.current,c$1=typeof u=="string"?document.querySelector(u):u??null,U=a(R.start||"top bottom"),q=a(R.end||"bottom top"),S=0,y=0;function b$1(){return c$1?i==="x"?c$1.scrollLeft:c$1.scrollTop:i==="x"?window.scrollX:window.scrollY}function z(){return c$1?i==="x"?c$1.clientWidth:c$1.clientHeight:i==="x"?window.innerWidth:window.innerHeight}function P(){let p=a$2(a$3,c$1,i);({tStart:S,tEnd:y}=c(p,p.scroll,z(),U,q));}function G(){let{speed:p=1,easing:w="linear",once:W=false}=t.current,X=typeof w=="function"?w:d$1[w]??d$1.linear,C=b(b$1(),S,y,p),$=X(W?s.current=Math.max(s.current,C):C);e$1($);}P();let T=e(c$1??window,[a$3],()=>b(b$1(),S,y,Math.min(t.current.speed??1,1)),G,P),A=a$1(p=>{p&&(A(),T.off(),e$1(1));});return ()=>{A(),T.off();}},[]),n}function f(o,r,n){let e=useRef(r);e.current=r;let t=a$3(r);useEffect(()=>{if(!o.current)return;let s=n(o.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[t]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function d(o){let r={},n={};for(let[e,t]of Object.entries(o))(Z.test(e)?n:r)[e]=t;return [r,n]}function fe({children:o,className:r,style:n,...e}){let t=useRef(null),[s,l]=d(e);return f(t,s,b$2),jsx("div",{ref:t,className:r,style:n,...l,children:o})}function de({children:o,className:r,style:n,...e}){let t=useRef(null),[s,l]=d(e);return f(t,s,a$4),jsx("div",{ref:t,className:r,style:n,...l,children:o})}function ge({className:o,style:r,...n}){let e=useRef(null),[t,s]=d(n);return f(e,t,a$5),jsx("span",{ref:e,className:o,style:r,...s})}function Se({src:o,poster:r,className:n,style:e,muted:t=true,playsInline:s=true,...l}){let a=useRef(null),[i,u]=d(l);return f(a,i,a$6),jsx("video",{...u,ref:a,src:o,poster:r,className:n,style:e,muted:t,playsInline:s,preload:i.preload??"auto"})}function ye({children:o,as:r="p",className:n,style:e,...t}){let s=useRef(null),[l,a]=d(t);return f(s,l,a$7),B.createElement(r,{...a,ref:s,className:n,style:e},o)}export{de as ScrollAnimate,ge as ScrollCounter,fe as ScrollDraw,ye as ScrollText,Se as ScrollVideo,Y as useScrollDrawProgress};
2
+ import {a as a$2,b as b$1}from'../chunk-22P4KBPG.mjs';import {a as a$3}from'../chunk-D2BHE4F2.mjs';import {b as b$2,a as a$5}from'../chunk-XSVTHCLO.mjs';import {a as a$8}from'../chunk-BRV2B2YW.mjs';import {a as a$9}from'../chunk-32ZCSGFZ.mjs';import {a as a$7}from'../chunk-U5TKLHGW.mjs';import {a as a$6}from'../chunk-7USW2XFB.mjs';import {b as b$3}from'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import {a as a$4}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import {a,e,b,c}from'../chunk-NV6YTPHI.mjs';import {d as d$1}from'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';import ee,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function _(o,r={}){let[s,e$1]=useState(0),t=useRef(r);t.current=r;let n=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e$1(1);return}let l=typeof o=="string"?document.querySelector(o):o.current;if(!l)return;let c$1=l,{axis:i="y",scrollContainer:m,trigger:g={}}=t.current,a$2=typeof m=="string"?document.querySelector(m):m??null,K=a(g.start||"top bottom"),W=a(g.end||"bottom top"),y=0,E=0;function P(){return a$2?i==="x"?a$2.scrollLeft:a$2.scrollTop:i==="x"?window.scrollX:window.scrollY}function X(){return a$2?i==="x"?a$2.clientWidth:a$2.clientHeight:i==="x"?window.innerWidth:window.innerHeight}function b$1(){let u=a$4(c$1,a$2,i);({tStart:y,tEnd:E}=c(u,u.scroll,X(),K,W));}function $(){let{speed:u=1,easing:O="linear",once:J=false}=t.current,Y=typeof O=="function"?O:d$1[O]??d$1.linear,v=b(P(),y,E,u),B=Y(J?n.current=Math.max(n.current,v):v);e$1(B);}b$1();let T=e(a$2??window,[c$1],()=>b(P(),y,E,Math.min(t.current.speed??1,1)),$,b$1),C=a$1(u=>{u&&(C(),T.off(),e$1(1));});return ()=>{C(),T.off();}},[]),s}function f(o,r,s,e=a$5(r)){let t=useRef(r);t.current=r,useEffect(()=>{if(!o.current)return;let n=s(o.current,b$2(t.current,()=>t.current));return ()=>n.destroy()},[e]);}var te=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function d(o){let r={},s={};for(let[e,t]of Object.entries(o))(te.test(e)?s:r)[e]=t;return [r,s]}function Ee({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,b$3),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function Oe({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,a$6),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function we({className:o,style:r,...s}){let e=useRef(null),[t,n]=d(s);return f(e,t,a$7),jsx("span",{ref:e,className:o,style:r,...n})}function Re({src:o,poster:r,className:s,style:e,muted:t=true,playsInline:n=true,...l}){let c=useRef(null),[i,m]=d(l);return f(c,i,a$8),jsx("video",{...m,ref:c,src:o,poster:r,className:s,style:e,muted:t,playsInline:n,preload:i.preload??"auto"})}function xe({className:o,style:r,role:s="img",triggerElement:e,...t}){let n=useRef(null),[l,c]=d(t),i=e&&"current"in e?e:null;return !i&&e&&(l.triggerElement=e),f(n,l,(m,g)=>a$3(m,{...g,frames:l.frames,...i&&{triggerElement:i.current??void 0}}),a$2(l)+(i?"+ref":"")),useEffect(()=>b$1(n.current),[]),jsx("canvas",{...c,ref:n,role:s,className:o,style:r})}function Pe({children:o,as:r="p",className:s,style:e,...t}){let n=useRef(null),[l,c]=d(t);return f(n,l,a$9),ee.createElement(r,{...c,ref:n,className:s,style:e},o)}export{Oe as ScrollAnimate,we as ScrollCounter,Ee as ScrollDraw,xe as ScrollFrames,Pe as ScrollText,Re as ScrollVideo,_ as useScrollDrawProgress};
@@ -1 +1 @@
1
- import {a}from'../chunk-VJ5ZU55P.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={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 N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start||"top 88%",i=d?.end||"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-7USW2XFB.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={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 N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start||"top 88%",i=d?.end||"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1 +1 @@
1
- import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-THPTANES.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function k(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,$={}){if(typeof window>"u")return z;let i=k(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:B="vertical",duration:P=600,easing:g="ease-in-out",threshold:v=.3,scrollContainer:S,onSnap:_,respectReducedMotion:w=true}=$,M=w&&a(),G=w?a$1(e=>{M=e;}):()=>{},W=typeof g=="function"?g:d[g]??d["ease-in-out"],a$4=B==="horizontal",b$2=a$4?"Width":"Height",x=a$4?"left":"top",s=typeof S=="string"?document.querySelector(S):S??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function L(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d$1(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${b$2}`]-e[`client${b$2}`],n=s?s.getBoundingClientRect()[x]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[x]-n+r,0,t))}function X(){let e=m(),t=d$1();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=X();function T(e){h=false,o=e,_?.(e);}function f(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d$1(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(M)return L(l),T(t);let Y=performance.now();function R(j){let C=a$3((j-Y)/P,0,1);L(r+(l-r)*W(C)),C<1?u=requestAnimationFrame(R):T(t);}u=requestAnimationFrame(R);}let E;function I(){h||(clearTimeout(E),E=setTimeout(()=>{let e=m(),t=d$1();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${b$2}`],r=e-t[o];r>n*v&&o<i.length-1?f(o+1):r<-(n*v)&&o>0?f(o-1):f(o);},100));}let A=s??window;return A.addEventListener("scroll",I,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d$1();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(E),A.removeEventListener("scroll",I),G(),b$1(i[0]);},snapTo:f,getCurrentIndex(){return o}}}export{Z as scrollSnap};
1
+ import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-THPTANES.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function k(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,$={}){if(typeof window>"u")return z;let i=k(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:B="vertical",duration:P=600,easing:g="ease-in-out",threshold:v=.3,scrollContainer:S,onSnap:_,respectReducedMotion:w=true}=$,M=w&&a(),G=w?a$1(e=>{M=e;}):()=>{},W=typeof g=="function"?g:d[g]??d["ease-in-out"],a$4=B==="horizontal",b$2=a$4?"Width":"Height",x=a$4?"left":"top",s=typeof S=="string"?document.querySelector(S):S??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function L(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d$1(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${b$2}`]-e[`client${b$2}`],n=s?s.getBoundingClientRect()[x]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[x]-n+r,0,t))}function X(){let e=m(),t=d$1();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=X();function T(e){h=false,o=e,_?.(e);}function f(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d$1(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(M)return L(l),T(t);let Y=performance.now();function R(j){let C=a$3((j-Y)/P,0,1);L(r+(l-r)*W(C)),C<1?u=requestAnimationFrame(R):T(t);}u=requestAnimationFrame(R);}let E;function I(){h||(clearTimeout(E),E=setTimeout(()=>{let e=m(),t=d$1();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${b$2}`],r=e-t[o];r>n*v&&o<i.length-1?f(o+1):r<-(n*v)&&o>0?f(o-1):f(o);},100));}let A=s??window;return A.addEventListener("scroll",I,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d$1();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(E),A.removeEventListener("scroll",I),G(),b$1(i[0]);},snapTo:f,getCurrentIndex(){return o}}}export{Z as scrollSnap};
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-NYQJPPMP.mjs';import {a as a$4}from'../chunk-XNM3VKEK.mjs';import {a as a$2}from'../chunk-PAGN26EH.mjs';import {a as a$1}from'../chunk-VJ5ZU55P.mjs';import {b as b$1}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-BRV2B2YW.mjs';import {a as a$4}from'../chunk-32ZCSGFZ.mjs';import {a as a$2}from'../chunk-U5TKLHGW.mjs';import {a as a$1}from'../chunk-7USW2XFB.mjs';import {b as b$1}from'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
@@ -1 +1 @@
1
- import {a as a$4,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-NYQJPPMP.mjs';import {a as a$2}from'../chunk-XNM3VKEK.mjs';import {a as a$1}from'../chunk-PAGN26EH.mjs';import {a}from'../chunk-VJ5ZU55P.mjs';import {b}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function r(n,t,o){let e=t,f=a$4(t),l=o(n,b$1(t,()=>e));return {update(c){e=c;let d=a$4(c);d!==f&&(f=d,l.destroy(),l=o(n,b$1(c,()=>e)));},destroy(){l.destroy();}}}function D(n,t={}){return r(n,t,b)}function I(n={}){let t=null;function o(e){return t=b(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function A(n,t){return r(n,t,a)}function H(n){let t=null;function o(e){return t=a(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function L(n,t){return r(n,t,a$1)}function M(n){let t=null;function o(e){return t=a$1(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function V(n,t={}){return r(n,t,a$3)}function g(n={}){let t=null;function o(e){return t=a$3(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function C(n,t={}){return r(n,t,a$2)}function v(n={}){let t=null;function o(e){return t=a$2(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}export{H as createScrollAnimate,M as createScrollCounter,I as createScrollDraw,v as createScrollText,g as createScrollVideo,A as scrollAnimate,L as scrollCounterAction,D as scrollDraw,C as scrollTextAction,V as scrollVideoAction};
1
+ import {a as a$4,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-BRV2B2YW.mjs';import {a as a$2}from'../chunk-32ZCSGFZ.mjs';import {a as a$1}from'../chunk-U5TKLHGW.mjs';import {a}from'../chunk-7USW2XFB.mjs';import {b}from'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';function r(n,t,o){let e=t,f=a$4(t),l=o(n,b$1(t,()=>e));return {update(c){e=c;let d=a$4(c);d!==f&&(f=d,l.destroy(),l=o(n,b$1(c,()=>e)));},destroy(){l.destroy();}}}function D(n,t={}){return r(n,t,b)}function I(n={}){let t=null;function o(e){return t=b(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function A(n,t){return r(n,t,a)}function H(n){let t=null;function o(e){return t=a(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function L(n,t){return r(n,t,a$1)}function M(n){let t=null;function o(e){return t=a$1(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function V(n,t={}){return r(n,t,a$3)}function g(n={}){let t=null;function o(e){return t=a$3(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}function C(n,t={}){return r(n,t,a$2)}function v(n={}){let t=null;function o(e){return t=a$2(e,n),{destroy(){t?.destroy(),t=null;}}}return {action:o,getInstance:()=>t}}export{H as createScrollAnimate,M as createScrollCounter,I as createScrollDraw,v as createScrollText,g as createScrollVideo,A as scrollAnimate,L as scrollCounterAction,D as scrollDraw,C as scrollTextAction,V as scrollVideoAction};
@@ -1 +1 @@
1
- export{a as scrollText}from'../chunk-XNM3VKEK.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollText}from'../chunk-32ZCSGFZ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-XC5NR2MU.mjs';import {a,e,c,b as b$2}from'../chunk-NV6YTPHI.mjs';import {d}from'../chunk-THPTANES.mjs';import {a as a$2}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$4,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var pe=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Re(c$1,de){let _={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return _;let q=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!q)return b("timeline: Container not found:",c$1),_;let l=q,{trigger:B={},speed:V=1,once:k=false,axis:h="y",tracks:U,onComplete:fe,repeat:x,repeatDelay:I=0,loop:R=false,loopDuration:ce=1500,debug:ue=false,label:me,respectReducedMotion:X=true}=de,ge=a(B.start||"top bottom"),ye=a(B.end||"bottom top"),w=x==="infinite"?1/0:x??0,i,L=false,C=R===true?1/0:typeof R=="number"?R:0,s=false,P=0,u=C,A=X&&a$1(),be=a$2(e=>{A=X&&e,A&&(s=false,clearTimeout(i),i=void 0);}),H=()=>C>0&&!A,z=new Map,G=U.map(e=>{let o=typeof e.easing=="function"?e.easing:d[e.easing??"linear"]??d.linear,r=Array.from(l.querySelectorAll(e.selector)),n=r.map(t=>a$3(t));return r.forEach((t,a)=>{z.has(t)||z.set(t,t.getAttribute("style")??""),t.style.strokeDasharray=`${n[a]}`,t.style.strokeDashoffset=`${n[a]}`,e.fade&&(t.style.opacity="0");}),{...e,elements:r,lengths:n,easeFn:o}});function he(){for(let[e,o]of z)o?e.setAttribute("style",o):e.removeAttribute("style");}let v=0,T=0,Y=0,J=0,m=false,y=false,b$3=-1,d$1=0,p=null;ue&&(p=document.createElement("div"),Object.assign(p.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(p));function xe(e){if(!p)return;let o=me??(typeof c$1=="string"?c$1:"timeline"),r=U.map(({selector:n,from:t,to:a},j)=>{let g=pe[j%pe.length],D=a>t?Math.min(1,Math.max(0,(e-t)/(a-t))):0,S=Math.round(D*100);return `<div style="margin:4px 0">
1
+ import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-XC5NR2MU.mjs';import {a,e,c,b as b$2}from'../chunk-NV6YTPHI.mjs';import {d}from'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$2}from'../chunk-5PJEKEEP.mjs';import {a as a$4,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var pe=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Re(c$1,de){let _={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return _;let q=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!q)return b("timeline: Container not found:",c$1),_;let l=q,{trigger:B={},speed:V=1,once:k=false,axis:h="y",tracks:U,onComplete:fe,repeat:x,repeatDelay:I=0,loop:R=false,loopDuration:ce=1500,debug:ue=false,label:me,respectReducedMotion:X=true}=de,ge=a(B.start||"top bottom"),ye=a(B.end||"bottom top"),w=x==="infinite"?1/0:x??0,i,L=false,C=R===true?1/0:typeof R=="number"?R:0,s=false,P=0,u=C,A=X&&a$1(),be=a$2(e=>{A=X&&e,A&&(s=false,clearTimeout(i),i=void 0);}),H=()=>C>0&&!A,z=new Map,G=U.map(e=>{let o=typeof e.easing=="function"?e.easing:d[e.easing??"linear"]??d.linear,r=Array.from(l.querySelectorAll(e.selector)),n=r.map(t=>a$3(t));return r.forEach((t,a)=>{z.has(t)||z.set(t,t.getAttribute("style")??""),t.style.strokeDasharray=`${n[a]}`,t.style.strokeDashoffset=`${n[a]}`,e.fade&&(t.style.opacity="0");}),{...e,elements:r,lengths:n,easeFn:o}});function he(){for(let[e,o]of z)o?e.setAttribute("style",o):e.removeAttribute("style");}let v=0,T=0,Y=0,J=0,m=false,y=false,b$3=-1,d$1=0,p=null;ue&&(p=document.createElement("div"),Object.assign(p.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(p));function xe(e){if(!p)return;let o=me??(typeof c$1=="string"?c$1:"timeline"),r=U.map(({selector:n,from:t,to:a},j)=>{let g=pe[j%pe.length],D=a>t?Math.min(1,Math.max(0,(e-t)/(a-t))):0,S=Math.round(D*100);return `<div style="margin:4px 0">
2
2
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:2px">
3
3
  <span style="color:${g};max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${n}</span>
4
4
  <span style="color:#666;margin-left:8px">${S}%</span>
@@ -1 +1 @@
1
- export{a as scrollVideo}from'../chunk-NYQJPPMP.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollVideo}from'../chunk-BRV2B2YW.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';var vue=require('vue');function En({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function Sn({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),s=0,a=[];for(let p=0;p<n;p++){let g=Math.pow(o,p);a.push(g),s+=g;}let c=[0],f=0;for(let p=0;p<n;p++)f+=a[p]/s,c.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let g=0;g<n;g++)if(p<=c[g+1]){let x=(p-c[g])/(c[g+1]-c[g]);if(g===0)return x*(2-x);let y=1-Math.pow(r,g);return y+(1-y)*(2*x-1)*(2*x-1)}return 1}}function Tn({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var ee={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:En(),bounce:Sn(),elastic:Tn()};function Qe(e,t,n){return Math.min(n,Math.max(t,e))}function ie(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}var Gt=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function Vt(e,t,n,r){return e+n+t*Gt(r,0)}function _t(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Gt(e,1))}function z(e,t,n,r){return n===t?0:Qe((e-t)/(n-t)*r,0,1)}function we(e,t,n,r,o){let s=Vt(e.top,e.height,t,r.element)-_t(r.viewport,n),a=Vt(e.top,e.height,t,o.element)-_t(o.viewport,n);return {tStart:s,tEnd:a}}function ot(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function st(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Wt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[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 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 it(e,t,n){let r=Wt(e),o=Wt(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Bt={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}};var ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ae(e,...t){ze&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var xn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Mn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",zt=33;function Ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Cn(e){let t=[];for(let n=0;n<zt;n++){let r=n/(zt-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return xn;case "ease-out":return Mn;case "ease-in-out":return Ln()?Cn(ee["ease-in-out"]):null;default:return null}}var jt=Symbol.for("svg-scroll-draw.registry");function qt(){let e=globalThis;return e[jt]||(e[jt]=new Map)}function ve(e,t){qt().set(e,t);}function Ee(e){qt().delete(e);}function lt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function Fe(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=lt(s=>{if(!s)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(n))o[s]=(...a)=>n[s]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var Ue,ut=new Set,ct=new WeakMap,Xe=new Map,Yt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function An(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Qt(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Ue??(Ue=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Yt(a)&&(s=true),ct.set(a,"");s&&ut.forEach(a=>a());})),ut.add(n);let r=An(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{ct.has(o)||ct.set(o,Yt(o)),Xe.set(o,(Xe.get(o)??0)+1),Ue.observe(o);}),()=>{ut.delete(n)&&(r.forEach(o=>{let s=(Xe.get(o)??1)-1;if(s)return void Xe.set(o,s);Xe.delete(o),Ue?.unobserve(o);}),ut.size||(Ue?.disconnect(),Ue=void 0));}}function Me(e,t,n,r,o){let s,a=NaN,c,f,p=()=>{s=0,r(),!c&&!s&&(a=n())>0&&a<1&&(s=requestAnimationFrame(p));},g=()=>{!s&&!c&&n()!==a&&(s=requestAnimationFrame(p));},x=H=>{c=H,cancelAnimationFrame(s),s=a=NaN,g();},y=()=>{clearTimeout(f),o(),g();},R=()=>{clearTimeout(f),f=setTimeout(y,150);},j=Qt(t,R),w=H=>{e[H]("scroll",g,{passive:true}),window[H]("resize",R),window[H]("orientationchange",R);};return w("addEventListener"),g(),{hold:x,remeasure:y,off(){x(true),w("removeEventListener"),j(),clearTimeout(f);}}}var Pn=0;function On(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ut(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Xt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function kn(e){if(!ze)return;let t=Ut(e,"stroke");if(!t||t==="none"){ae("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Xt.has(n)&&!Xt.has(Ut(e,"fill"))&&ae("Element has a fill \u2014 it may obscure the stroke animation.",e);}function $n(e,t,n){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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 o(){let s=n==="x"?window.scrollX:window.scrollY,a=e-s,c=t-s,f=n==="x";r.innerHTML=`
2
- <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${f?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}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(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Rn(e,t,n){if(!ze)return;let r=(e.match(Zt)??[]).join("").toUpperCase(),o=(t.match(Zt)??[]).join("").toUpperCase(),s=(e.match(Kt)??[]).length,a=(t.match(Kt)??[]).length;if(r!==o){ae(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==a&&ae(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function Hn(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=r[o++]??a;return String(+(a+(c-a)*n).toFixed(4))})}function wt(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Fe(t,(n,r)=>Nn(e,n,r))}function Nn(e,t,n){let{preset:r,...o}=t,s=r?{...Bt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:f=false,easing:p="linear",trigger:g={},stagger:x=0,direction:y="forward",once:R=false,debug:j=false,axis:w="y",scrollContainer:H,autoReverse:ce=false,delay:N=0,strokeColor:M,strokeWidth:C,fillOpacity:O,waypoints:v,velocityScale:A=false,threshold:D=0,rootMargin:te="0px",repeat:q=0,repeatDelay:F=0,morphTo:I,clip:E,autoplay:Q=false,duration:h=1e3,native:P=true,onProgress:Se,onStart:U,onComplete:_,onEnter:fe,onLeave:Te,onEnterBack:ge,onLeaveBack:me}=s,b=E===true?"left":typeof E=="string"?E:false,S=typeof p=="function"?p:ee[p]??ee.linear,ye=ie(g.start||"top bottom"),Ne=ie(g.end||"bottom top"),X=typeof H=="string"?document.querySelector(H):H??null,Ae=Array.isArray(M)?M[0]:null,Pe=Array.isArray(M)?M[1]:typeof M=="string"?M:null,he=Array.isArray(C)?C[0]:null,De=Array.isArray(C)?C[1]:typeof C=="number"?C:null,Oe=Array.isArray(O)?O[0]:null,be=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function ke(i){let u=i*100;switch(b){case "right":return `inset(0 0 0 ${100-u}%)`;case "top":return `inset(0 0 ${100-u}% 0)`;case "bottom":return `inset(${100-u}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-u}% 0 0)`}}let l=b?[]:Array.from(e.querySelectorAll(a)),m=[],K=[],k=0,V=0,Y=x,G=0,Ie=0,Z=false,$e=false,Re=0,mt=-1,et=[],tt=-1,pe=false,xe=0,Ve=0,_e,pt=false,dt=null;function Lt(){dt?.destroy(),dt=null;}let Ge=new Set,Ct=NaN,We=true,nt=-1,At=performance.now(),Be=NaN;function rt(){return X?w==="x"?X.scrollLeft:X.scrollTop:w==="x"?window.scrollX:window.scrollY}function Pt(){return X?w==="x"?X.clientWidth:X.clientHeight:w==="x"?window.innerWidth:window.innerHeight}function Ot(){let i=ot(e,X,w);return we(i,i.scroll,Pt(),ye,Ne)}function dn(){let i=V-k,u=l.length-1,d=X??document.documentElement,L=w==="x"?"Width":"Height";if(Y=x,x>0&&u>0&&i>0){let ne=d[`scroll${L}`]-d[`client${L}`]-1-k-i/c;ne>=0&&(Y=Math.min(x,ne/(u*i)));}let J=Math.max(0,u)*Y*i,le=i/Math.min(c,1);G=k+Math.min(0,J,le,J+le),Ie=k+Math.max(0,J,le,J+le);}function kt(){(({tStart:k,tEnd:V}=Ot())),dn(),j&&ze&&(Lt(),dt=$n(k,V,w));}function gt(i,u=Ot){ve(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:u});let d=i.destroy;return i.destroy=()=>{d.call(i),Ee(e);},i}function $t(i,u){return R&&!ce?Math.max(mt,S(et[i]=Math.max(et[i]??0,u))):S(u)}function gn(i,u){if(e.style.setProperty("--scroll-draw-progress",String(i)),b){let d=u==="reverse"?1-i:i;e.style.clipPath=ke(d);return}l.forEach((d,L)=>yt(d,L,i,u));}function yt(i,u,d,L){i.style.strokeDashoffset=L==="reverse"?`${m[u]*d}`:`${m[u]*(1-d)}`,f&&(i.style.opacity=L==="reverse"?`${1-d}`:`${d}`),Ae&&Pe?i.style.stroke=it(Ae,Pe,d):Pe&&(i.style.stroke=Pe),he!==null&&De!==null?i.style.strokeWidth=`${he+(De-he)*d}`:De!==null&&(i.style.strokeWidth=`${De}`),Oe!==null&&be!==null?i.style.fillOpacity=`${Oe+(be-Oe)*d}`:be!==null&&(i.style.fillOpacity=`${be}`),I&&i.tagName.toLowerCase()==="path"&&K[u]&&i.setAttribute("d",Hn(K[u],I,d));}function ht(){if(e.style.setProperty("--scroll-draw-progress","0"),b){e.style.clipPath=ke(y==="reverse"?1:0);return}l.forEach((i,u)=>{i.style.strokeDasharray=`${m[u]}`,i.style.strokeDashoffset=y==="reverse"?"0":`${m[u]}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Oe!==null&&(i.style.fillOpacity=`${Oe}`),I&&i.tagName.toLowerCase()==="path"&&K[u]&&i.setAttribute("d",K[u]);});}function je(i,u){let d=i.getAttribute("d"),L=st(i);if(I&&K[u]){i.setAttribute("d",I);let J=st(i);i.setAttribute("d",K[u]),L=Math.max(st(i),J),i.setAttribute("d",d);}m[u]=L,i.style.strokeDasharray=`${L}`;}if(l.forEach((i,u)=>{kn(i);let d=i.tagName.toLowerCase()==="path";d?K.push(i.getAttribute("d")??""):K.push(""),je(i,u);let L=m[u];I&&(d?Rn(K[K.length-1],I,i):ae(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),n?(i.style.strokeDashoffset=y==="reverse"?`${L}`:"0",f&&(i.style.opacity="1"),Pe&&(i.style.stroke=Pe),De!==null&&(i.style.strokeWidth=`${De}`),be!==null&&(i.style.fillOpacity=`${be}`),I&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",I)):(i.style.strokeDashoffset=y==="reverse"?"0":`${L}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Oe!==null&&(i.style.fillOpacity=`${Oe}`));}),n)return b&&(e.style.clipPath=ke(1)),_?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};b&&(e.style.clipPath=ke(y==="reverse"?1:0));let Rt=typeof p=="string"?at(p):null;function yn(){return !(P===false||Q||j&&ze||!On()||!l.length||!Rt||b||w!=="y"||X||c!==1||x!==0||R||ce||A!==false||I||v||q||N>0||Se||U||_||fe||Te||ge||me||M!=null||C!=null||O!=null||(g.start||"top bottom").trim()!=="top bottom"||(g.end||"bottom top").trim()!=="bottom top")}function hn(){let i=++Pn,u=`svg-scroll-draw-${i}`,d=`svg-scroll-draw-host-${i}`,L=`--svg-scroll-draw-${i}`,J=y==="reverse"?"0":"var(--ssd-len)",le=y==="reverse"?"var(--ssd-len)":"0",ne=`stroke-dashoffset:${J};`,W=`stroke-dashoffset:${le};`;f&&(ne+=`opacity:${y==="reverse"?1:0};`,W+=`opacity:${y==="reverse"?0:1};`);let B=document.createElement("style");B.setAttribute("data-svg-scroll-draw",""),B.textContent=`@keyframes ${u}{from{${ne}}to{${W}}}.${d}{view-timeline-name:${L};view-timeline-axis:block;}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Rt};animation-fill-mode:both;animation-timeline:${L};animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(d);function se(T,$){T.style.setProperty("--ssd-len",String(m[$])),T.style.strokeDasharray=`${m[$]}`,T.style.strokeDashoffset="",T.style.opacity="",T.style.animationPlayState="",T.classList.add(u);}l.forEach(se);let re=false,ue=-1;function de(){if(ue>=0)return ue;let T=e.getBoundingClientRect(),{tStart:$,tEnd:oe}=we({top:T.top,height:T.height},rt(),Pt(),ye,Ne);return S(z(rt(),$,oe,c))}return {destroy(){e.classList.remove(d),l.forEach(T=>{T.classList.remove(u),T.style.removeProperty("--ssd-len"),T.style.animationPlayState="";}),B.remove();},replay(){re=false,ue=-1,l.forEach(se);},pause(){re=true,l.forEach(T=>{T.style.animationPlayState="paused";});},resume(){re&&(re=false,l.forEach(T=>{T.style.animationPlayState="running";}));},seek(T){let $=Math.min(1,Math.max(0,T));ue=$,re=true,l.forEach((oe,He)=>{oe.classList.remove(u),oe.style.strokeDashoffset=y==="reverse"?`${m[He]*$}`:`${m[He]*(1-$)}`,f&&(oe.style.opacity=y==="reverse"?`${1-$}`:`${$}`);});},getProgress(){return de()},refresh(){l.forEach((T,$)=>{je(T,$),T.style.setProperty("--ssd-len",String(m[$]));});}}}if(yn())return gt(hn());function bn(){let i=Math.max(1,h),u=b?i:i*(1+Math.max(0,l.length-1)*x),d=0,L=0,J=false;function le(ue){let de=true,T=Math.min(1,Math.max(0,ue/u));if(b){let $=Math.min(1,Math.max(0,ue/i)),oe=S($);xe=oe,e.style.setProperty("--scroll-draw-progress",String(oe)),e.style.clipPath=ke(y==="reverse"?1-oe:oe),Se?.(oe),$<1&&(de=false);}else {l.forEach((oe,He)=>{let vn=He*x*i,Ft=Math.min(1,Math.max(0,(ue-vn)/i));yt(oe,He,S(Ft),y),Ft<1&&(de=false);});let $=S(T);xe=$,Se?.($),e.style.setProperty("--scroll-draw-progress",String($));}if(v){let $=S(T);for(let oe in v){let He=parseFloat(oe);$>=He&&!Ge.has(He)&&(Ge.add(He),v[oe]?.());}}return de}function ne(ue){if(pe)return;let de=ue-d;$e||($e=true,U?.());let T=le(de);if(T&&!Z){Z=true,le(u),_?.(),Ve<(q==="infinite"?1/0:q??0)&&(Ve++,_e=setTimeout(()=>{d=performance.now(),$e=false,Z=false,Ge.clear(),ht(),Re=requestAnimationFrame(ne);},F));return}T||(Re=requestAnimationFrame(ne));}function W(){cancelAnimationFrame(Re),clearTimeout(_e),d=performance.now(),L=0,pe=false,$e=false,Z=false,Ve=0,J=true,xe=0,Ge.clear(),ht(),Re=requestAnimationFrame(ne);}let B=new IntersectionObserver(ue=>{ue.forEach(de=>{de.isIntersecting&&!(R&&Z)?W():!de.isIntersecting&&!R&&!Z&&(cancelAnimationFrame(Re),clearTimeout(_e),J=false);});},{root:X??null,threshold:D,rootMargin:te}),se;function re(){clearTimeout(se),se=setTimeout(()=>l.forEach(je),150);}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),N>0?setTimeout(()=>B.observe(e),N):B.observe(e),{destroy(){cancelAnimationFrame(Re),clearTimeout(_e),B.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(se);},replay(){Ve=0,W();},pause(){pe||!J||(pe=true,L=performance.now()-d,cancelAnimationFrame(Re));},resume(){pe&&(pe=false,J=true,d=performance.now()-L,Re=requestAnimationFrame(ne));},seek(ue){let de=Math.min(1,Math.max(0,ue));xe=de,pe=true,L=de*u,d=performance.now()-L,cancelAnimationFrame(Re),le(L);},getProgress(){return xe},refresh(){clearTimeout(se),l.forEach(je);}}}if(Q)return gt(bn());kt();let Ht=()=>z(rt(),G,Ie,1);function Nt(){Z=true,_?.(),Ve<(q==="infinite"?1/0:q)&&(Ve++,_e=setTimeout(()=>{pt=true;},F));}function Dt(){mt=-1,et=[],$e=false,Z=false,pt=false,Ge.clear(),ht(),We=true;}function wn(){let i=performance.now(),u=rt();if(pt&&Ht()%1&&Dt(),!We&&A===false&&u===Ct)return;We=false,Ct=u;let d=c;if(A!==false){let W=i-At,B=W>0?Math.abs(u-(nt<0?u:nt))/W:0;d=c*Math.max(.2,1+B*(typeof A=="number"?A:1)*.04);}nt=u,At=i;let L=ce?tt===-1||u>=tt?"forward":"reverse":y;tt=u;let J=V-k,le=true,ne=J===0?0:(u-k)/J;if(isNaN(Be)||(Be<=0&&ne>0&&fe?.(),Be<1&&ne>=1&&Te?.(),Be>=1&&ne<1&&ge?.(),Be>0&&ne<=0&&me?.()),Be=ne,b){let W=$t(0,z(u,k,V,d));xe=W,e.style.setProperty("--scroll-draw-progress",String(W));let B=L==="reverse"?1-W:W;e.style.clipPath=ke(B),Se?.(W),!$e&&z(u,k,V,d)>0&&($e=true,U?.()),W>=1&&!Z?Nt():W<1&&!R&&(Z=false);return}if(l.forEach((W,B)=>{let se=B*Y*J,re=$t(B,z(u,k+se,V+se,d));yt(W,B,re,L),B===0&&(xe=re,Se?.(re),e.style.setProperty("--scroll-draw-progress",String(re))),re<1&&(le=false);}),v){let W=S(z(u,k,V,d));for(let B in v){let se=parseFloat(B);W>=se&&!Ge.has(se)&&(Ge.add(se),v[B]?.());}}!$e&&z(u,k,V,d)>0&&($e=true,U?.()),le&&!Z?Nt():!le&&!R&&(Z=false);}let qe=Me(X??window,[e],Ht,wn,()=>{let i=m.join();l.forEach(je),kt(),We=true,m.join()!==i&&Ye();}),bt=N>0;function Ye(){qe.hold(pe||bt);}let It;return bt&&(It=setTimeout(()=>{bt=false,Ye();},N)),Ye(),gt({destroy(){clearTimeout(_e),clearTimeout(It),qe.off(),Lt();},replay(){Dt(),tt=-1,nt=-1,Ve=0,pe=false,xe=0,clearTimeout(_e),Ye();},pause(){pe=true,qe.hold(true);},resume(){pe&&(pe=false,We=true,Ye());},seek(i){let u=Math.min(1,Math.max(0,i));xe=u,mt=u,et=[],pe=true,qe.hold(true),gn(u,y),We=true;},getProgress(){return xe},refresh:qe.remeasure},()=>({tStart:k,tEnd:V}))}var Jt=new WeakMap,Dn=0;function en(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=Jt.get(n);return r===void 0&&Jt.set(n,r=++Dn),`el#${r}`}return n})}function tn(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...o)=>t()[r]?.(...o));return n}function In(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function nn(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let f=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),s.push(f?f[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function Fn(e,t,n){let r=nn(e),o=nn(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?n<1?`${s.fn}(${s.nums.map((f,p)=>`${f}${s.units[p]}`).join(", ")})`:`${c.fn}(${c.nums.map((f,p)=>`${f}${c.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((f,p)=>`${f+(c.nums[p]-f)*n}${s.units[p]}`).join(", ")})`}).join(" ")}function rn(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(In(r))return it(r,o,n);if(r.includes("("))return Fn(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),f=parseFloat(a[1]);return `${c+(f-c)*n}${s[2]||a[2]}`}return n<1?r:o}function Vn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var _n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Gn=0,on="--scroll-draw-progress";function Wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var an={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,t){return typeof window>"u"?an:t.respectReducedMotion===false?sn(e,t,false):Fe(t,(n,r)=>sn(e,n,r))}function sn(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:f="y",scrollContainer:p,native:g=true,velocityScale:x=false,triggerElement:y,onProgress:R,onComplete:j,onEnter:w,onLeave:H,onEnterBack:ce,onLeaveBack:N}=t,M=typeof s=="function"?s:ee[s]??ee["ease-out"],C=ie(o.start||"top bottom"),O=ie(o.end||"bottom top"),v=y??e,A=typeof p=="string"?document.querySelector(p):p??null,D=Object.entries(r).map(([l,m])=>({prop:Vn(l),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function te(){let l=window.getComputedStyle(e);for(let m of D)m.from===""&&(m.from=l.getPropertyValue(m.prop).trim()||"0");}function q(){for(let l of D)e.style.setProperty(l.prop,String(l.to));}let F=new Map;for(let l of [...D.map(m=>m.prop),on])F.set(l,e.style.getPropertyValue(l));function I(){for(let[l,m]of F)m?e.style.setProperty(l,m):e.style.removeProperty(l);}if(n)return q(),j?.(),{...an,destroy:I,getProgress:()=>1};te();let E=()=>A?f==="x"?A.scrollLeft:A.scrollTop:f==="x"?window.scrollX:window.scrollY,Q=()=>A?f==="x"?A.clientWidth:A.clientHeight:f==="x"?window.innerWidth:window.innerHeight,h=typeof s=="string"?at(s):null;function P(){if(!g||!Wn()||!h||f!=="y"||A||v!==e||c||a!==1||R||j||w||H||ce||N||x!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of D)if(!_n.has(l.prop))return false;return true}function Se(){let l=`ssd-a-${++Gn}`,m=D.map(G=>`${G.prop}:${G.from}`).join(";"),K=D.map(G=>`${G.prop}:${G.to}`).join(";"),k=document.createElement("style");k.setAttribute("data-ssd-animate",""),k.textContent=`@keyframes ${l}{from{${m}}to{${K}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${h};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(l);let V=()=>{let G=e.getBoundingClientRect();return we({top:G.top,height:G.height},E(),Q(),C,O)};ve(e,{type:"animate",getProgress:()=>Y.getProgress(),getTrigger:V});let Y={refresh(){},destroy(){e.classList.remove(l),k.remove(),e.style.animationPlayState="",I(),Ee(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(G){let Ie=Math.min(1,Math.max(0,G));e.classList.remove(l);for(let Z of D)e.style.setProperty(Z.prop,rn(Z.from,Z.to,Ie));},getProgress(){let{tStart:G,tEnd:Ie}=V();return M(z(E(),G,Ie,a))}};return Y}if(P())return Se();let U=0,_=0,fe=false,Te=-1,ge=0,me=0,b=false,S=NaN,ye=-1,Ne=0,X=v===e?D:[],Ae=false;function Pe(){let l=e.style,m=X.map(Y=>l.getPropertyValue(Y.prop)),K=l.transition;X.length&&(l.transition="none"),X.forEach(Y=>l.setProperty(Y.prop,F.get(Y.prop)??""));let k=ot(v,A,f);X.forEach((Y,G)=>l.setProperty(Y.prop,m[G])),X.length&&(e.offsetWidth,l.transition=K);let V=we(k,k.scroll,Q(),C,O);Ae&&Math.abs(V.tStart-U)<1&&Math.abs(V.tEnd-_)<1||(Ae=true,U=V.tStart,_=V.tEnd);}function he(l){e.style.setProperty(on,String(l));for(let m of D)e.style.setProperty(m.prop,rn(m.from,m.to,l));R?.(l);}function De(l){if(isNaN(S)){S=l;return}S<=0&&l>0&&w?.(),S<1&&l>=1&&H?.(),S>=1&&l<1&&ce?.(),S>0&&l<=0&&N?.(),S=l;}function Oe(){if(fe)return;let l=performance.now(),m=E(),K=a;if(x!==false){let G=l-Ne,Ie=G>0?Math.abs(m-(ye<0?m:ye))/G:0;K=a*Math.max(.2,1+Ie*(typeof x=="number"?x:1)*.04);}ye=m,Ne=l;let k=_===U?0:(m-U)/(_-U);De(k);let V=z(m,U,_,K),Y=c?Math.max(Te,M(ge=Math.max(ge,V))):M(V);me=Y,he(Y),Y>=1&&!b?(b=true,j?.()):Y<1&&!c&&(b=false);}let be=Me(A??window,[v],()=>z(E(),U,_,Math.min(a,1)),Oe,Pe);Pe(),_===U&&ae("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ge=z(E(),U,_,a),me=M(ge),he(me),ve(e,{type:"animate",getProgress:()=>me,getTrigger:()=>({tStart:U,tEnd:_})});function ke(){fe=true,be.hold(true);}return {destroy(){fe=true,be.off(),I(),Ee(e);},replay(){Te=-1,ge=0,b=false,me=0,fe=false,he(0),be.hold(false);},pause:ke,resume(){fe&&(fe=false,be.hold(false));},seek(l){let m=Math.min(1,Math.max(0,l));me=m,Te=m,ge=0,ke(),he(m);},getProgress(){return me},refresh:be.remeasure}}var Et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,t){if(typeof window>"u")return Et;let n=typeof e=="string"?document.querySelector(e):e;return n?Fe(t,(r,o)=>Bn(n,r,o)):(ae("scrollCounter: element not found:",e),Et)}function Bn(e,t,n){let{from:r=0,to:o,format:s,easing:a="ease-out",trigger:c={},once:f=true,decimals:p,onComplete:g}=t,x=p!==void 0?h=>h.toFixed(p):s??(h=>String(Math.round(h))),y=typeof a=="function"?a:ee[a]??ee["ease-out"],R=ie(c.start||"top 80%"),j=ie(c.end||"top 20%");if(n)return e.textContent=x(o),g?.(),{...Et,getProgress:()=>1};let w=0,H=0,ce=false,N=-1,M=0,C=0,O=false,v=()=>window.scrollY,A=()=>window.innerHeight;function D(){let h=e.getBoundingClientRect(),P=we({top:h.top,height:h.height},v(),A(),R,j);ce&&Math.abs(P.tStart-w)<1&&Math.abs(P.tEnd-H)<1||(ce=true,w=P.tStart,H=P.tEnd);}let te=e.style.getPropertyValue("--scroll-draw-progress");function q(h){e.textContent=x(r+(o-r)*h),e.style.setProperty("--scroll-draw-progress",String(h));}let F=()=>z(v(),w,H,1);function I(){let h=F(),P=f?Math.max(N,y(M=Math.max(M,h))):y(h);C=P,q(P),P>=1&&!O?(O=true,g?.()):P<1&&!f&&(O=false);}D();{M=z(v(),w,H,1);let h=y(M);C=h,q(h);}let E=Me(window,[e],F,I,D);ve(e,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:w,tEnd:H})});let Q=()=>E.hold(false);return {destroy(){E.off(),e.style.setProperty("--scroll-draw-progress",te),Ee(e);},replay(){N=-1,M=0,O=false,C=0,q(0),Q();},pause:()=>E.hold(true),resume:Q,seek(h){let P=Math.min(1,Math.max(0,h));C=P,N=P,M=0,E.hold(true),q(P);},getProgress(){return C}}}var ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Tt(e,t={}){if(typeof window>"u")return ln;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ae("scrollVideo: <video> element not found:",e),ln;let r=n,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:f="auto",triggerElement:p,onReady:g,onComplete:x,onProgress:y}=t,R=p??r,j=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=typeof s=="function"?s:ee[s]??ee.linear,H=ie(o.start||"top top"),ce=ie(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let N=t.from??0,M=t.to,C=0,O=0,v=false,A=-1,D=0,te=0,q=false,F=false,I=()=>c==="x"?window.scrollX:window.scrollY,E=()=>c==="x"?window.innerWidth:window.innerHeight;function Q(){let b=R.getBoundingClientRect(),S=c==="x"?b.left:b.top,ye=c==="x"?b.width:b.height,Ne=we({top:S,height:ye},I(),E(),H,ce);C=Ne.tStart,O=Ne.tEnd,F&&O===C&&ae("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let h=NaN;function P(b){if(!F)return;let S=M??r.duration??0,ye=N+(S-N)*b;ye!==h&&(h=ye,r.currentTime=ye),r.style.setProperty("--scroll-draw-progress",String(b)),y?.(b);}let Se=()=>z(I(),C,O,1);function U(){if(!F||j)return;let b=Se(),S=a?Math.max(A,w(D=Math.max(D,b))):w(b);te=S,P(S),S>=1&&!q?(q=true,x?.()):S<1&&!a&&(q=false);}let _=Me(window,[R],Se,U,Q),fe=()=>_.hold(v||!F||j);fe();function Te(){if(F=true,M===void 0&&(M=r.duration),j){P(1),g?.();return}Q(),g?.(),v?P(te):fe();}r.readyState>=1?Te():r.addEventListener("loadedmetadata",Te,{once:true}),F||Q();let ge=j?()=>{}:lt(b=>{b&&(ge(),j=true,_.hold(true),P(1));});ve(r,{type:"video",getProgress:()=>te,getTrigger:()=>({tStart:C,tEnd:O})});function me(){v&&(v=false,fe());}return {destroy(){_.off(),r.removeEventListener("loadedmetadata",Te),ge(),Ee(r);},replay(){A=-1,D=0,q=false,te=0,h=NaN,P(0),me();},pause(){v=true,_.hold(true);},resume:me,seek(b){let S=Math.min(1,Math.max(0,b));te=S,A=S,D=0,v=true,_.hold(true),h=NaN,P(S);},getProgress(){return te}}}function un(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function ft(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function fn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(ft(n)),o=/^\s+$/.test(n);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(n=>n!==null)}function zn(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let o of t){let s=ft(o),a=o===" ";a?s.style.whiteSpace="pre":(s.style.display="inline-block",n.push(s)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(ft()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(s);}return n}function cn(e){let t=fn(e),n=new Map;for(let s of t){let a=s.offsetTop;n.has(a)||n.set(a,[]),n.get(a).push(s);}let r=[],o=Array.from(n.keys()).sort((s,a)=>s-a);for(let s of o){let a=n.get(s),c=ft();c.style.display="inline-block",a.forEach((f,p)=>{let g=f.nextElementSibling;c.appendChild(f),p<a.length-1&&g&&g.style.whiteSpace==="pre"&&c.appendChild(g);}),r.push(c);}return e.textContent="",r.forEach((s,a)=>{e.appendChild(s),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function jn(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let o=(n-1)*r,s=t*r,a=s+(1-o);return a<=s?e>=s?1:0:Qe((e-s)/(a-s),0,1)}function qn(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Mt(e,t={}){if(typeof window>"u")return xt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ae("scrollText: element not found:",e),xt;let r=n;return Fe(t,(o,s)=>Yn(r,o,s))}function Yn(e,t,n){let{split:r="words",stagger:o=.04,easing:s="ease-out",from:a={opacity:0,y:24},trigger:c={},once:f=true,onComplete:p}=t,g=typeof s=="function"?s:ee[s]??ee["ease-out"],x=ie(c.start||"top 85%"),y=ie(c.end||"top 40%"),R=e.innerHTML,j=e.textContent??"",w;r==="chars"?w=zn(e):r==="lines"?w=cn(e):w=fn(e),un(e,j);let H=w.length;function ce(E,Q){a?.opacity!==void 0&&(E.style.opacity=String(a.opacity+(1-a.opacity)*Q));let h=qn(Q,a);h&&(E.style.transform=h);}function N(E){e.style.setProperty("--scroll-draw-progress",String(E)),w.forEach((Q,h)=>{let P=g(jn(E,h,H,o));ce(Q,P);});}if(n)return N(1),p?.(),{...xt,destroy:()=>{e.innerHTML=R;},getProgress:()=>1};N(0);let M=0,C=0,O=-1,v=0,A=false;function D(){({tStart:M,tEnd:C}=we(e.getBoundingClientRect(),window.scrollY,window.innerHeight,x,y));}let te=()=>z(window.scrollY,M,C,1);function q(){let E=f?O=Math.max(O,te()):te();v=E,N(E),E>=1&&!A?(A=true,p?.()):E<1&&!f&&(A=false);}D();let F=Me(window,[e],te,q,()=>{r==="lines"&&(e.innerHTML=R,w=cn(e),un(e,j),N(v)),D();});ve(e,{type:"text",getProgress:()=>v,getTrigger:()=>({tStart:M,tEnd:C})});let I=()=>F.hold(false);return {destroy(){F.off(),e.innerHTML=R,Ee(e);},replay(){O=-1,A=false,v=0,N(0),I();},pause:()=>F.hold(true),resume:I,seek(E){F.hold(true),N(v=O=Qe(E,0,1));},getProgress(){return v}}}var Je=e=>typeof e=="function"?e():vue.unref(e);function Ce(e,t,n){let r=null,o=t(),s=()=>{r?.destroy(),r=e.value?n(e.value,tn(o,()=>o)):null;};vue.onMounted(s),vue.watch(()=>en(o=t()),s),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function yo(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),wt),t}var mn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Zn=[null,Boolean,[Boolean,String],[Boolean,Number]],pn=e=>({type:e,default:void 0}),ho=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(mn).map(([e,t])=>[e,t?pn(Zn[t]):null])),setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>{let r={};for(let o in mn){let s=e[o];s!=null&&(r[o]=s);}return r},wt),()=>vue.h("div",{ref:n},t.default?.())}});function bo(e){let t=vue.ref(null);return Ce(t,()=>Je(e),vt),t}var wo=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>e.options,vt),()=>vue.h("div",{ref:n},t.default?.())}});function vo(e){let t=vue.ref(null);return Ce(t,()=>Je(e),St),t}var Eo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:pn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=vue.ref(null);return Ce(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},St),()=>vue.h("span",{ref:t})}});function So(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),Tt),t}var To=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=vue.ref(null);return Ce(t,()=>e.options??{},Tt),()=>vue.h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function xo(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),Mt),t}var Mo=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>e.options??{},Mt),()=>vue.h(e.tag,{ref:n},t.default?.())}});exports.ScrollAnimate=wo;exports.ScrollCounter=Eo;exports.ScrollDraw=ho;exports.ScrollText=Mo;exports.ScrollVideo=To;exports.useScrollAnimate=bo;exports.useScrollCounter=vo;exports.useScrollDraw=yo;exports.useScrollText=xo;exports.useScrollVideo=So;
1
+ 'use strict';var vue=require('vue');function An({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function On({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),s=0,a=[];for(let g=0;g<n;g++){let w=Math.pow(o,g);a.push(w),s+=w;}let f=[0],m=0;for(let g=0;g<n;g++)m+=a[g]/s,f.push(m);return g=>{if(g<=0)return 0;if(g>=1)return 1;for(let w=0;w<n;w++)if(g<=f[w+1]){let O=(g-f[w])/(f[w+1]-f[w]);if(w===0)return O*(2-O);let S=1-Math.pow(r,w);return S+(1-S)*(2*O-1)*(2*O-1)}return 1}}function Pn({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var ne={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:An(),bounce:On(),elastic:Pn()};function st(e,t,n){return Math.min(n,Math.max(t,e))}function le(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}var jt=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function Wt(e,t,n,r){return e+n+t*jt(r,0)}function Bt(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:jt(e,1))}function U(e,t,n,r){return n===t?0:st((e-t)/(n-t)*r,0,1)}function Ce(e,t,n,r,o){let s=Wt(e.top,e.height,t,r.element)-Bt(r.viewport,n),a=Wt(e.top,e.height,t,o.element)-Bt(o.viewport,n);return {tStart:s,tEnd:a}}function ft(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function mt(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function qt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[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 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 pt(e,t,n){let r=qt(e),o=qt(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Yt={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}};var Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function D(e,...t){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var kn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Rn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ut=33;function $n(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Fn(e){let t=[];for(let n=0;n<Ut;n++){let r=n/(Ut-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function dt(e){switch(e){case "linear":return "linear";case "ease-in":return kn;case "ease-out":return Rn;case "ease-in-out":return $n()?Fn(ne["ease-in-out"]):null;default:return null}}var Qt=Symbol.for("svg-scroll-draw.registry");function Kt(){let e=globalThis;return e[Qt]||(e[Qt]=new Map)}function ke(e,t){Kt().set(e,t);}function Re(e){Kt().delete(e);}function Ze(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function qe(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=Ze(s=>{if(!s)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(n))o[s]=(...a)=>n[s]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var it,gt=new Set,yt=new WeakMap,at=new Map,Xt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Hn(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Zt(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();it??(it=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)yt.get(a)!==Xt(a)&&(s=true),yt.set(a,"");s&&gt.forEach(a=>a());})),gt.add(n);let r=Hn(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{yt.has(o)||yt.set(o,Xt(o)),at.set(o,(at.get(o)??0)+1),it.observe(o);}),()=>{gt.delete(n)&&(r.forEach(o=>{let s=(at.get(o)??1)-1;if(s)return void at.set(o,s);at.delete(o),it?.unobserve(o);}),gt.size||(it?.disconnect(),it=void 0));}}function Ne(e,t,n,r,o){let s,a=NaN,f,m,g=()=>{s=0,r(),!f&&!s&&(a=n())>0&&a<1&&(s=requestAnimationFrame(g));},w=()=>{!s&&!f&&n()!==a&&(s=requestAnimationFrame(g));},O=z=>{f=z,cancelAnimationFrame(s),s=a=NaN,w();},S=()=>{clearTimeout(m),o(),w();},W=()=>{clearTimeout(m),m=setTimeout(S,150);},Q=Zt(t,W),v=z=>{e[z]("scroll",w,{passive:true}),window[z]("resize",W),window[z]("orientationchange",W);};return v("addEventListener"),w(),{hold:O,remeasure:S,off(){O(true),v("removeEventListener"),Q(),clearTimeout(m);}}}var In=0;function Nn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var en=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Dn(e){if(!Xe)return;let t=Jt(e,"stroke");if(!t||t==="none"){D("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!en.has(n)&&!en.has(Jt(e,"fill"))&&D("Element has a fill \u2014 it may obscure the stroke animation.",e);}function _n(e,t,n){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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 o(){let s=n==="x"?window.scrollX:window.scrollY,a=e-s,f=t-s,m=n==="x";r.innerHTML=`
2
+ <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${m?`left:${f}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${f}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(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var tn=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,nn=/[MmLlHhVvCcSsQqTtAaZz]/g;function Vn(e,t,n){if(!Xe)return;let r=(e.match(nn)??[]).join("").toUpperCase(),o=(t.match(nn)??[]).join("").toUpperCase(),s=(e.match(tn)??[]).length,a=(t.match(tn)??[]).length;if(r!==o){D(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==a&&D(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function zn(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),f=r[o++]??a;return String(+(a+(f-a)*n).toFixed(4))})}function Tt(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(t,(n,r)=>Gn(e,n,r))}function Gn(e,t,n){let{preset:r,...o}=t,s=r?{...Yt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:f=1,fade:m=false,easing:g="linear",trigger:w={},stagger:O=0,direction:S="forward",once:W=false,debug:Q=false,axis:v="y",scrollContainer:z,autoReverse:J=false,delay:P=0,strokeColor:A,strokeWidth:L,fillOpacity:k,waypoints:y,velocityScale:R=false,threshold:G=0,rootMargin:ie="0px",repeat:K=0,repeatDelay:_=0,morphTo:H,clip:T,autoplay:X=false,duration:E=1e3,native:C=true,onProgress:he,onStart:I,onComplete:j,onEnter:fe,onLeave:Se,onEnterBack:me,onLeaveBack:ae}=s,x=T===true?"left":typeof T=="string"?T:false,M=typeof g=="function"?g:ne[g]??ne.linear,re=le(w.start||"top bottom"),$e=le(w.end||"bottom top"),Z=typeof z=="string"?document.querySelector(z):z??null,Fe=Array.isArray(A)?A[0]:null,Te=Array.isArray(A)?A[1]:typeof A=="string"?A:null,be=Array.isArray(L)?L[0]:null,ze=Array.isArray(L)?L[1]:typeof L=="number"?L:null,He=Array.isArray(k)?k[0]:null,xe=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function Ae(i){let u=i*100;switch(x){case "right":return `inset(0 0 0 ${100-u}%)`;case "top":return `inset(0 0 ${100-u}% 0)`;case "bottom":return `inset(${100-u}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-u}% 0 0)`}}let l=x?[]:Array.from(e.querySelectorAll(a)),d=[],oe=[],$=0,V=0,B=O,q=0,Ve=0,se=false,Ie=false,we=0,Qe=-1,Ye=[],Ue=-1,pe=false,c=0,p=0,b,ce=false,ve=null;function Ge(){ve?.destroy(),ve=null;}let Oe=new Set,We=NaN,Be=true,ct=-1,Rt=performance.now(),Ke=NaN;function ut(){return Z?v==="x"?Z.scrollLeft:Z.scrollTop:v==="x"?window.scrollX:window.scrollY}function $t(){return Z?v==="x"?Z.clientWidth:Z.clientHeight:v==="x"?window.innerWidth:window.innerHeight}function Ft(){let i=ft(e,Z,v);return Ce(i,i.scroll,$t(),re,$e)}function En(){let i=V-$,u=l.length-1,h=Z??document.documentElement,N=v==="x"?"Width":"Height";if(B=O,O>0&&u>0&&i>0){let de=h[`scroll${N}`]-h[`client${N}`]-1-$-i/f;de>=0&&(B=Math.min(O,de/(u*i)));}let ue=Math.max(0,u)*B*i,Me=i/Math.min(f,1);q=$+Math.min(0,ue,Me,ue+Me),Ve=$+Math.max(0,ue,Me,ue+Me);}function Ht(){(({tStart:$,tEnd:V}=Ft())),En(),Q&&Xe&&(Ge(),ve=_n($,V,v));}function wt(i,u=Ft){ke(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:u});let h=i.destroy;return i.destroy=()=>{h.call(i),Re(e);},i}function It(i,u){return W&&!J?Math.max(Qe,M(Ye[i]=Math.max(Ye[i]??0,u))):M(u)}function Sn(i,u){if(e.style.setProperty("--scroll-draw-progress",String(i)),x){let h=u==="reverse"?1-i:i;e.style.clipPath=Ae(h);return}l.forEach((h,N)=>vt(h,N,i,u));}function vt(i,u,h,N){i.style.strokeDashoffset=N==="reverse"?`${d[u]*h}`:`${d[u]*(1-h)}`,m&&(i.style.opacity=N==="reverse"?`${1-h}`:`${h}`),Fe&&Te?i.style.stroke=pt(Fe,Te,h):Te&&(i.style.stroke=Te),be!==null&&ze!==null?i.style.strokeWidth=`${be+(ze-be)*h}`:ze!==null&&(i.style.strokeWidth=`${ze}`),He!==null&&xe!==null?i.style.fillOpacity=`${He+(xe-He)*h}`:xe!==null&&(i.style.fillOpacity=`${xe}`),H&&i.tagName.toLowerCase()==="path"&&oe[u]&&i.setAttribute("d",zn(oe[u],H,h));}function Et(){if(e.style.setProperty("--scroll-draw-progress","0"),x){e.style.clipPath=Ae(S==="reverse"?1:0);return}l.forEach((i,u)=>{i.style.strokeDasharray=`${d[u]}`,i.style.strokeDashoffset=S==="reverse"?"0":`${d[u]}`,m?i.style.opacity=S==="reverse"?"1":"0":i.style.opacity="",Fe&&(i.style.stroke=Fe),be!==null&&(i.style.strokeWidth=`${be}`),He!==null&&(i.style.fillOpacity=`${He}`),H&&i.tagName.toLowerCase()==="path"&&oe[u]&&i.setAttribute("d",oe[u]);});}function nt(i,u){let h=i.getAttribute("d"),N=mt(i);if(H&&oe[u]){i.setAttribute("d",H);let ue=mt(i);i.setAttribute("d",oe[u]),N=Math.max(mt(i),ue),i.setAttribute("d",h);}d[u]=N,i.style.strokeDasharray=`${N}`;}if(l.forEach((i,u)=>{Dn(i);let h=i.tagName.toLowerCase()==="path";h?oe.push(i.getAttribute("d")??""):oe.push(""),nt(i,u);let N=d[u];H&&(h?Vn(oe[oe.length-1],H,i):D(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),n?(i.style.strokeDashoffset=S==="reverse"?`${N}`:"0",m&&(i.style.opacity="1"),Te&&(i.style.stroke=Te),ze!==null&&(i.style.strokeWidth=`${ze}`),xe!==null&&(i.style.fillOpacity=`${xe}`),H&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",H)):(i.style.strokeDashoffset=S==="reverse"?"0":`${N}`,m?i.style.opacity=S==="reverse"?"1":"0":i.style.opacity="",Fe&&(i.style.stroke=Fe),be!==null&&(i.style.strokeWidth=`${be}`),He!==null&&(i.style.fillOpacity=`${He}`));}),n)return x&&(e.style.clipPath=Ae(1)),j?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};x&&(e.style.clipPath=Ae(S==="reverse"?1:0));let Nt=typeof g=="string"?dt(g):null;function Tn(){return !(C===false||X||Q&&Xe||!Nn()||!l.length||!Nt||x||v!=="y"||Z||f!==1||O!==0||W||J||R!==false||H||y||K||P>0||he||I||j||fe||Se||me||ae||A!=null||L!=null||k!=null||(w.start||"top bottom").trim()!=="top bottom"||(w.end||"bottom top").trim()!=="bottom top")}function xn(){let i=++In,u=`svg-scroll-draw-${i}`,h=`svg-scroll-draw-host-${i}`,N=`--svg-scroll-draw-${i}`,ue=S==="reverse"?"0":"var(--ssd-len)",Me=S==="reverse"?"var(--ssd-len)":"0",de=`stroke-dashoffset:${ue};`,ee=`stroke-dashoffset:${Me};`;m&&(de+=`opacity:${S==="reverse"?1:0};`,ee+=`opacity:${S==="reverse"?0:1};`);let te=document.createElement("style");te.setAttribute("data-svg-scroll-draw",""),te.textContent=`@keyframes ${u}{from{${de}}to{${ee}}}.${h}{view-timeline-name:${N};view-timeline-axis:block;}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Nt};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(te),e.classList.add(h);function Ee(F,Y){F.style.setProperty("--ssd-len",String(d[Y])),F.style.strokeDasharray=`${d[Y]}`,F.style.strokeDashoffset="",F.style.opacity="",F.style.animationPlayState="",F.classList.add(u);}l.forEach(Ee);let ge=false,Le=-1;function Pe(){if(Le>=0)return Le;let F=e.getBoundingClientRect(),{tStart:Y,tEnd:ye}=Ce({top:F.top,height:F.height},ut(),$t(),re,$e);return M(U(ut(),Y,ye,f))}return {destroy(){e.classList.remove(h),l.forEach(F=>{F.classList.remove(u),F.style.removeProperty("--ssd-len"),F.style.animationPlayState="";}),te.remove();},replay(){ge=false,Le=-1,l.forEach(Ee);},pause(){ge=true,l.forEach(F=>{F.style.animationPlayState="paused";});},resume(){ge&&(ge=false,l.forEach(F=>{F.style.animationPlayState="running";}));},seek(F){let Y=Math.min(1,Math.max(0,F));Le=Y,ge=true,l.forEach((ye,je)=>{ye.classList.remove(u),ye.style.strokeDashoffset=S==="reverse"?`${d[je]*Y}`:`${d[je]*(1-Y)}`,m&&(ye.style.opacity=S==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return Pe()},refresh(){l.forEach((F,Y)=>{nt(F,Y),F.style.setProperty("--ssd-len",String(d[Y]));});}}}if(Tn())return wt(xn());function Mn(){let i=Math.max(1,E),u=x?i:i*(1+Math.max(0,l.length-1)*O),h=0,N=0,ue=false;function Me(Le){let Pe=true,F=Math.min(1,Math.max(0,Le/u));if(x){let Y=Math.min(1,Math.max(0,Le/i)),ye=M(Y);c=ye,e.style.setProperty("--scroll-draw-progress",String(ye)),e.style.clipPath=Ae(S==="reverse"?1-ye:ye),he?.(ye),Y<1&&(Pe=false);}else {l.forEach((ye,je)=>{let Cn=je*O*i,Gt=Math.min(1,Math.max(0,(Le-Cn)/i));vt(ye,je,M(Gt),S),Gt<1&&(Pe=false);});let Y=M(F);c=Y,he?.(Y),e.style.setProperty("--scroll-draw-progress",String(Y));}if(y){let Y=M(F);for(let ye in y){let je=parseFloat(ye);Y>=je&&!Oe.has(je)&&(Oe.add(je),y[ye]?.());}}return Pe}function de(Le){if(pe)return;let Pe=Le-h;Ie||(Ie=true,I?.());let F=Me(Pe);if(F&&!se){se=true,Me(u),j?.(),p<(K==="infinite"?1/0:K??0)&&(p++,b=setTimeout(()=>{h=performance.now(),Ie=false,se=false,Oe.clear(),Et(),we=requestAnimationFrame(de);},_));return}F||(we=requestAnimationFrame(de));}function ee(){cancelAnimationFrame(we),clearTimeout(b),h=performance.now(),N=0,pe=false,Ie=false,se=false,p=0,ue=true,c=0,Oe.clear(),Et(),we=requestAnimationFrame(de);}let te=new IntersectionObserver(Le=>{Le.forEach(Pe=>{Pe.isIntersecting&&!(W&&se)?ee():!Pe.isIntersecting&&!W&&!se&&(cancelAnimationFrame(we),clearTimeout(b),ue=false);});},{root:Z??null,threshold:G,rootMargin:ie}),Ee;function ge(){clearTimeout(Ee),Ee=setTimeout(()=>l.forEach(nt),150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),P>0?setTimeout(()=>te.observe(e),P):te.observe(e),{destroy(){cancelAnimationFrame(we),clearTimeout(b),te.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(Ee);},replay(){p=0,ee();},pause(){pe||!ue||(pe=true,N=performance.now()-h,cancelAnimationFrame(we));},resume(){pe&&(pe=false,ue=true,h=performance.now()-N,we=requestAnimationFrame(de));},seek(Le){let Pe=Math.min(1,Math.max(0,Le));c=Pe,pe=true,N=Pe*u,h=performance.now()-N,cancelAnimationFrame(we),Me(N);},getProgress(){return c},refresh(){clearTimeout(Ee),l.forEach(nt);}}}if(X)return wt(Mn());Ht();let Dt=()=>U(ut(),q,Ve,1);function _t(){se=true,j?.(),p<(K==="infinite"?1/0:K)&&(p++,b=setTimeout(()=>{ce=true;},_));}function Vt(){Qe=-1,Ye=[],Ie=false,se=false,ce=false,Oe.clear(),Et(),Be=true;}function Ln(){let i=performance.now(),u=ut();if(ce&&Dt()%1&&Vt(),!Be&&R===false&&u===We)return;Be=false,We=u;let h=f;if(R!==false){let ee=i-Rt,te=ee>0?Math.abs(u-(ct<0?u:ct))/ee:0;h=f*Math.max(.2,1+te*(typeof R=="number"?R:1)*.04);}ct=u,Rt=i;let N=J?Ue===-1||u>=Ue?"forward":"reverse":S;Ue=u;let ue=V-$,Me=true,de=ue===0?0:(u-$)/ue;if(isNaN(Ke)||(Ke<=0&&de>0&&fe?.(),Ke<1&&de>=1&&Se?.(),Ke>=1&&de<1&&me?.(),Ke>0&&de<=0&&ae?.()),Ke=de,x){let ee=It(0,U(u,$,V,h));c=ee,e.style.setProperty("--scroll-draw-progress",String(ee));let te=N==="reverse"?1-ee:ee;e.style.clipPath=Ae(te),he?.(ee),!Ie&&U(u,$,V,h)>0&&(Ie=true,I?.()),ee>=1&&!se?_t():ee<1&&!W&&(se=false);return}if(l.forEach((ee,te)=>{let Ee=te*B*ue,ge=It(te,U(u,$+Ee,V+Ee,h));vt(ee,te,ge,N),te===0&&(c=ge,he?.(ge),e.style.setProperty("--scroll-draw-progress",String(ge))),ge<1&&(Me=false);}),y){let ee=M(U(u,$,V,h));for(let te in y){let Ee=parseFloat(te);ee>=Ee&&!Oe.has(Ee)&&(Oe.add(Ee),y[te]?.());}}!Ie&&U(u,$,V,h)>0&&(Ie=true,I?.()),Me&&!se?_t():!Me&&!W&&(se=false);}let rt=Ne(Z??window,[e],Dt,Ln,()=>{let i=d.join();l.forEach(nt),Ht(),Be=true,d.join()!==i&&ot();}),St=P>0;function ot(){rt.hold(pe||St);}let zt;return St&&(zt=setTimeout(()=>{St=false,ot();},P)),ot(),wt({destroy(){clearTimeout(b),clearTimeout(zt),rt.off(),Ge();},replay(){Vt(),Ue=-1,ct=-1,p=0,pe=false,c=0,clearTimeout(b),ot();},pause(){pe=true,rt.hold(true);},resume(){pe&&(pe=false,Be=true,ot());},seek(i){let u=Math.min(1,Math.max(0,i));c=u,Qe=u,Ye=[],pe=true,rt.hold(true),Sn(u,S),Be=true;},getProgress(){return c},refresh:rt.remeasure},()=>({tStart:$,tEnd:V}))}var rn=new WeakMap,Wn=0;function lt(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=rn.get(n);return r===void 0&&rn.set(n,r=++Wn),`el#${r}`}return n})}function on(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...o)=>t()[r]?.(...o));return n}function Bn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function sn(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let f of a.split(/[\s,]+/)){let m=f.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function jn(e,t,n){let r=sn(e),o=sn(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,a)=>{let f=o[a];return s.fn!==f.fn||s.nums.length!==f.nums.length?n<1?`${s.fn}(${s.nums.map((m,g)=>`${m}${s.units[g]}`).join(", ")})`:`${f.fn}(${f.nums.map((m,g)=>`${m}${f.units[g]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,g)=>`${m+(f.nums[g]-m)*n}${s.units[g]}`).join(", ")})`}).join(" ")}function an(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Bn(r))return pt(r,o,n);if(r.includes("("))return jn(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let f=parseFloat(s[1]),m=parseFloat(a[1]);return `${f+(m-f)*n}${s[2]||a[2]}`}return n<1?r:o}function qn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Yn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Un=0,ln="--scroll-draw-progress";function Qn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var un={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,t){return typeof window>"u"?un:t.respectReducedMotion===false?cn(e,t,false):qe(t,(n,r)=>cn(e,n,r))}function cn(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:f=false,axis:m="y",scrollContainer:g,native:w=true,velocityScale:O=false,triggerElement:S,onProgress:W,onComplete:Q,onEnter:v,onLeave:z,onEnterBack:J,onLeaveBack:P}=t,A=typeof s=="function"?s:ne[s]??ne["ease-out"],L=le(o.start||"top bottom"),k=le(o.end||"bottom top"),y=S??e,R=typeof g=="string"?document.querySelector(g):g??null,G=Object.entries(r).map(([l,d])=>({prop:qn(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function ie(){let l=window.getComputedStyle(e);for(let d of G)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function K(){for(let l of G)e.style.setProperty(l.prop,String(l.to));}let _=new Map;for(let l of [...G.map(d=>d.prop),ln])_.set(l,e.style.getPropertyValue(l));function H(){for(let[l,d]of _)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if(n)return K(),Q?.(),{...un,destroy:H,getProgress:()=>1};ie();let T=()=>R?m==="x"?R.scrollLeft:R.scrollTop:m==="x"?window.scrollX:window.scrollY,X=()=>R?m==="x"?R.clientWidth:R.clientHeight:m==="x"?window.innerWidth:window.innerHeight,E=typeof s=="string"?dt(s):null;function C(){if(!w||!Qn()||!E||m!=="y"||R||y!==e||f||a!==1||W||Q||v||z||J||P||O!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of G)if(!Yn.has(l.prop))return false;return true}function he(){let l=`ssd-a-${++Un}`,d=G.map(q=>`${q.prop}:${q.from}`).join(";"),oe=G.map(q=>`${q.prop}:${q.to}`).join(";"),$=document.createElement("style");$.setAttribute("data-ssd-animate",""),$.textContent=`@keyframes ${l}{from{${d}}to{${oe}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${E};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild($),e.classList.add(l);let V=()=>{let q=e.getBoundingClientRect();return Ce({top:q.top,height:q.height},T(),X(),L,k)};ke(e,{type:"animate",getProgress:()=>B.getProgress(),getTrigger:V});let B={refresh(){},destroy(){e.classList.remove(l),$.remove(),e.style.animationPlayState="",H(),Re(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let Ve=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let se of G)e.style.setProperty(se.prop,an(se.from,se.to,Ve));},getProgress(){let{tStart:q,tEnd:Ve}=V();return A(U(T(),q,Ve,a))}};return B}if(C())return he();let I=0,j=0,fe=false,Se=-1,me=0,ae=0,x=false,M=NaN,re=-1,$e=0,Z=y===e?G:[],Fe=false;function Te(){let l=e.style,d=Z.map(B=>l.getPropertyValue(B.prop)),oe=l.transition;Z.length&&(l.transition="none"),Z.forEach(B=>l.setProperty(B.prop,_.get(B.prop)??""));let $=ft(y,R,m);Z.forEach((B,q)=>l.setProperty(B.prop,d[q])),Z.length&&(e.offsetWidth,l.transition=oe);let V=Ce($,$.scroll,X(),L,k);Fe&&Math.abs(V.tStart-I)<1&&Math.abs(V.tEnd-j)<1||(Fe=true,I=V.tStart,j=V.tEnd);}function be(l){e.style.setProperty(ln,String(l));for(let d of G)e.style.setProperty(d.prop,an(d.from,d.to,l));W?.(l);}function ze(l){if(isNaN(M)){M=l;return}M<=0&&l>0&&v?.(),M<1&&l>=1&&z?.(),M>=1&&l<1&&J?.(),M>0&&l<=0&&P?.(),M=l;}function He(){if(fe)return;let l=performance.now(),d=T(),oe=a;if(O!==false){let q=l-$e,Ve=q>0?Math.abs(d-(re<0?d:re))/q:0;oe=a*Math.max(.2,1+Ve*(typeof O=="number"?O:1)*.04);}re=d,$e=l;let $=j===I?0:(d-I)/(j-I);ze($);let V=U(d,I,j,oe),B=f?Math.max(Se,A(me=Math.max(me,V))):A(V);ae=B,be(B),B>=1&&!x?(x=true,Q?.()):B<1&&!f&&(x=false);}let xe=Ne(R??window,[y],()=>U(T(),I,j,Math.min(a,1)),He,Te);Te(),j===I&&D("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),me=U(T(),I,j,a),ae=A(me),be(ae),ke(e,{type:"animate",getProgress:()=>ae,getTrigger:()=>({tStart:I,tEnd:j})});function Ae(){fe=true,xe.hold(true);}return {destroy(){fe=true,xe.off(),H(),Re(e);},replay(){Se=-1,me=0,x=false,ae=0,fe=false,be(0),xe.hold(false);},pause:Ae,resume(){fe&&(fe=false,xe.hold(false));},seek(l){let d=Math.min(1,Math.max(0,l));ae=d,Se=d,me=0,Ae(),be(d);},getProgress(){return ae},refresh:xe.remeasure}}var Mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Lt(e,t){if(typeof window>"u")return Mt;let n=typeof e=="string"?document.querySelector(e):e;return n?qe(t,(r,o)=>Kn(n,r,o)):(D("scrollCounter: element not found:",e),Mt)}function Kn(e,t,n){let{from:r=0,to:o,format:s,easing:a="ease-out",trigger:f={},once:m=true,decimals:g,onComplete:w}=t,O=g!==void 0?E=>E.toFixed(g):s??(E=>String(Math.round(E))),S=typeof a=="function"?a:ne[a]??ne["ease-out"],W=le(f.start||"top 80%"),Q=le(f.end||"top 20%");if(n)return e.textContent=O(o),w?.(),{...Mt,getProgress:()=>1};let v=0,z=0,J=false,P=-1,A=0,L=0,k=false,y=()=>window.scrollY,R=()=>window.innerHeight;function G(){let E=e.getBoundingClientRect(),C=Ce({top:E.top,height:E.height},y(),R(),W,Q);J&&Math.abs(C.tStart-v)<1&&Math.abs(C.tEnd-z)<1||(J=true,v=C.tStart,z=C.tEnd);}let ie=e.style.getPropertyValue("--scroll-draw-progress");function K(E){e.textContent=O(r+(o-r)*E),e.style.setProperty("--scroll-draw-progress",String(E));}let _=()=>U(y(),v,z,1);function H(){let E=_(),C=m?Math.max(P,S(A=Math.max(A,E))):S(E);L=C,K(C),C>=1&&!k?(k=true,w?.()):C<1&&!m&&(k=false);}G();{A=U(y(),v,z,1);let E=S(A);L=E,K(E);}let T=Ne(window,[e],_,H,G);ke(e,{type:"counter",getProgress:()=>L,getTrigger:()=>({tStart:v,tEnd:z})});let X=()=>T.hold(false);return {destroy(){T.off(),e.style.setProperty("--scroll-draw-progress",ie),Re(e);},replay(){P=-1,A=0,k=false,L=0,K(0),X();},pause:()=>T.hold(true),resume:X,seek(E){let C=Math.min(1,Math.max(0,E));L=C,P=C,A=0,T.hold(true),K(C);},getProgress(){return L}}}var fn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,t={}){if(typeof window>"u")return fn;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return D("scrollVideo: <video> element not found:",e),fn;let r=n,{trigger:o={},easing:s="linear",once:a=false,axis:f="y",preload:m="auto",triggerElement:g,onReady:w,onComplete:O,onProgress:S}=t,W=g??r,Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches,v=typeof s=="function"?s:ne[s]??ne.linear,z=le(o.start||"top top"),J=le(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=m);let P=t.from??0,A=t.to,L=0,k=0,y=false,R=-1,G=0,ie=0,K=false,_=false,H=()=>f==="x"?window.scrollX:window.scrollY,T=()=>f==="x"?window.innerWidth:window.innerHeight;function X(){let x=W.getBoundingClientRect(),M=f==="x"?x.left:x.top,re=f==="x"?x.width:x.height,$e=Ce({top:M,height:re},H(),T(),z,J);L=$e.tStart,k=$e.tEnd,_&&k===L&&D("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let E=NaN;function C(x){if(!_)return;let M=A??r.duration??0,re=P+(M-P)*x;re!==E&&(E=re,r.currentTime=re),r.style.setProperty("--scroll-draw-progress",String(x)),S?.(x);}let he=()=>U(H(),L,k,1);function I(){if(!_||Q)return;let x=he(),M=a?Math.max(R,v(G=Math.max(G,x))):v(x);ie=M,C(M),M>=1&&!K?(K=true,O?.()):M<1&&!a&&(K=false);}let j=Ne(window,[W],he,I,X),fe=()=>j.hold(y||!_||Q);fe();function Se(){if(_=true,A===void 0&&(A=r.duration),Q){C(1),w?.();return}X(),w?.(),y?C(ie):fe();}r.readyState>=1?Se():r.addEventListener("loadedmetadata",Se,{once:true}),_||X();let me=Q?()=>{}:Ze(x=>{x&&(me(),Q=true,j.hold(true),C(1));});ke(r,{type:"video",getProgress:()=>ie,getTrigger:()=>({tStart:L,tEnd:k})});function ae(){y&&(y=false,fe());}return {destroy(){j.off(),r.removeEventListener("loadedmetadata",Se),me(),Re(r);},replay(){R=-1,G=0,K=false,ie=0,E=NaN,C(0),ae();},pause(){y=true,j.hold(true);},resume:ae,seek(x){let M=Math.min(1,Math.max(0,x));ie=M,R=M,G=0,y=true,j.hold(true),E=NaN,C(M);},getProgress(){return ie}}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xn(e){let t=e>1?[0,e-1]:[0],n=[[0,e-1]];for(let r=0;r<n.length;r++){let[o,s]=n[r];if(s-o<2)continue;let a=o+s>>1;t.push(a),n.push([o,a],[a,s]);}return t}function mn(e,t){if(typeof window>"u")return ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="canvas")return D("scrollFrames: <canvas> element not found:",e),ht;let r=n,{frames:o,trigger:s={},easing:a="linear",once:f=false,axis:m="y",fit:g="cover",triggerElement:w,onReady:O,onLoad:S,onComplete:W,onProgress:Q}=t||{},v=Array.isArray(o)?o:null,z=t?.count,J=Math.floor(v?Math.min(z??v.length,v.length):z??NaN);if(!(v||typeof o=="function")||!Number.isFinite(J)||J<1)return D("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",r),ht;let P=t.concurrency??6;(!Number.isFinite(P)||P<1)&&(D("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",t.concurrency),P=6),P=Math.floor(P);let A=r.getContext("2d");if(!A)return D("scrollFrames: the canvas has no 2D context.",r),ht;let L=J-1,k=w??r,y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof a=="function"?a:ne[a]??ne.linear,G=c=>{let p=R(c);return p===p?p:0},ie=le(s.start||"top top"),K=le(s.end||"bottom top"),_=0,H=0,T=false,X=-1,E=0,C=0,he=false,I=false,j=false,fe=false,Se=0,me=-1,ae=new Array(J),x=new Uint8Array(J),M=new Set,re=y?[L]:Xn(J),$e=0,Z=0,Fe=false,Te=(c,...p)=>{if(c)try{c(...p);}catch(b){typeof reportError=="function"?reportError(b):setTimeout(()=>{throw b});}},be=false,ze=c=>{let p;try{p=v?v[c]:o(c);}catch(b){p=b;}return typeof p=="string"&&p?p:(be||(be=true,D(`scrollFrames: no URL for frame ${c}; it is skipped for its nearest neighbour.`,p)),null)},He=()=>m==="x"?window.scrollX:window.scrollY,xe=()=>m==="x"?window.innerWidth:window.innerHeight;function Ae(){!Fe&&Z===re.length&&(Fe=true,Te(S));}function l(){for(;!I&&M.size<P&&$e<re.length;){let c=re[$e++];x[c]||d(c);}}function d(c){x[c]=1;let p=ze(c);if(p===null){Z++,queueMicrotask(()=>{I||Ae();});return}let b=new Image,ce=false,ve=Ge=>{ce||I||(ce=true,b.onload=b.onerror=null,M.delete(b),Ge?ae[c]=b:D("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",p),Z++,l(),V(),Ae());};M.add(b),b.decoding="async",b.onerror=()=>ve(false),b.src=p,typeof b.decode=="function"?b.decode().then(()=>ve(true),()=>{b.complete?ve(b.naturalWidth>0):b.onload=()=>ve(true);}):b.onload=()=>ve(true);}function oe(c){for(let p=0;p<=L;p++){if(ae[c-p])return c-p;if(ae[c+p])return c+p}return -1}function $(){let c=r.clientWidth,p=r.clientHeight;if(!c||!p)return;let b=Math.min(window.devicePixelRatio||1,2),ce=Math.round(c*b),ve=Math.round(p*b);if(Math.abs(r.width-ce)<=1&&Math.abs(r.height-ve)<=1)return;r.width=ce,r.height=ve,me=-1;let Ge=r.clientWidth,Oe=r.clientHeight;if(Ge!==c||Oe!==p){let We=r.style;Ge!==c&&Oe!==p?(We.width=`${c}px`,We.height=`${p}px`):We.aspectRatio=`${c} / ${p}`;}}function V(){let c=oe(Se);if(c<0||c===me)return;let p=ae[c],b=r.width,ce=r.height,ve=p.naturalWidth||b,Ge=p.naturalHeight||ce,Oe=(g==="contain"?Math.min:Math.max)(b/ve,ce/Ge),We=ve*Oe,Be=Ge*Oe;A.clearRect(0,0,b,ce),A.drawImage(p,(b-We)/2,(ce-Be)/2,We,Be),me=c,j||(j=true,Te(O));}function B(c){Se=Math.min(L,Math.max(0,Math.round(c*L))),r.style.setProperty("--scroll-draw-progress",String(c)),V(),Te(Q,c,Se);}function q(){let c=k.getBoundingClientRect(),p=m==="x"?c.left:c.top,b=m==="x"?c.width:c.height,ce=Ce({top:p,height:b},He(),xe(),ie,K);_=ce.tStart,H=ce.tEnd,H===_&&b>0&&!y&&!fe&&(fe=true,D("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r));}let Ve=()=>U(He(),_,H,1);function se(){if(y)return;let c=Ve(),p=f?Math.max(X,G(E=Math.max(E,c))):G(c);C=p,B(p),p>=1&&!he?(he=true,Te(W)):p<1&&!f&&(he=false);}function Ie(){C=1,B(1);}$(),y||q();let we=Ne(window,[k],Ve,se,()=>{$(),y||q(),V();}),Qe=()=>we.hold(T||y);Qe(),y&&Ie(),l();let Ye=typeof ResizeObserver=="function"?new ResizeObserver(()=>{$(),V();}):null;Ye?.observe(r);let Ue=y?()=>{}:Ze(c=>{c&&(Ue(),y=true,we.hold(true),re=re.slice(0,$e),x[L]||re.push(L),Ae(),Ie(),l());});ke(r,{type:"frames",getProgress:()=>C,getTrigger:()=>({tStart:_,tEnd:H})});function pe(){I||!T||(T=false,Qe());}return {destroy(){if(!I){I=true,we.off(),Ye?.disconnect(),Ue();for(let c of M)c.onload=c.onerror=null,c.src="";M.clear(),Re(r);}},replay(){I||(X=-1,E=0,he=false,C=0,B(0),pe());},pause(){I||(T=true,we.hold(true));},resume:pe,seek(c){if(I)return;let p=Math.min(1,Math.max(0,c===c?c:0));C=p,X=p,E=0,T=true,we.hold(true),B(p);},getProgress(){return C}}}var Zn=1e4;function At(e){let{frames:t,count:n}=e;if(typeof t!="function")return lt(e);let r=Number.isFinite(n)?Math.min(Math.max(Math.floor(n),0),Zn):0,o;try{o=Array.from({length:r},(s,a)=>t(a));}catch{o=["throws"];}return lt({...e,frames:o})}function pn(e){if(!e||e.getAttribute("aria-hidden")==="true")return;let t=e.getAttribute("role");t==="presentation"||t==="none"||e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||D('<ScrollFrames>: the canvas has no aria-label. Say what the frames show, or set aria-hidden="true" if they are decoration.',e);}function dn(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function bt(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function yn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(bt(n)),o=/^\s+$/.test(n);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(n=>n!==null)}function Jn(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let o of t){let s=bt(o),a=o===" ";a?s.style.whiteSpace="pre":(s.style.display="inline-block",n.push(s)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(bt()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(s);}return n}function gn(e){let t=yn(e),n=new Map;for(let s of t){let a=s.offsetTop;n.has(a)||n.set(a,[]),n.get(a).push(s);}let r=[],o=Array.from(n.keys()).sort((s,a)=>s-a);for(let s of o){let a=n.get(s),f=bt();f.style.display="inline-block",a.forEach((m,g)=>{let w=m.nextElementSibling;f.appendChild(m),g<a.length-1&&w&&w.style.whiteSpace==="pre"&&f.appendChild(w);}),r.push(f);}return e.textContent="",r.forEach((s,a)=>{e.appendChild(s),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function er(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let o=(n-1)*r,s=t*r,a=s+(1-o);return a<=s?e>=s?1:0:st((e-s)/(a-s),0,1)}function tr(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var Ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,t={}){if(typeof window>"u")return Ot;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return D("scrollText: element not found:",e),Ot;let r=n;return qe(t,(o,s)=>nr(r,o,s))}function nr(e,t,n){let{split:r="words",stagger:o=.04,easing:s="ease-out",from:a={opacity:0,y:24},trigger:f={},once:m=true,onComplete:g}=t,w=typeof s=="function"?s:ne[s]??ne["ease-out"],O=le(f.start||"top 85%"),S=le(f.end||"top 40%"),W=e.innerHTML,Q=e.textContent??"",v;r==="chars"?v=Jn(e):r==="lines"?v=gn(e):v=yn(e),dn(e,Q);let z=v.length;function J(T,X){a?.opacity!==void 0&&(T.style.opacity=String(a.opacity+(1-a.opacity)*X));let E=tr(X,a);E&&(T.style.transform=E);}function P(T){e.style.setProperty("--scroll-draw-progress",String(T)),v.forEach((X,E)=>{let C=w(er(T,E,z,o));J(X,C);});}if(n)return P(1),g?.(),{...Ot,destroy:()=>{e.innerHTML=W;},getProgress:()=>1};P(0);let A=0,L=0,k=-1,y=0,R=false;function G(){({tStart:A,tEnd:L}=Ce(e.getBoundingClientRect(),window.scrollY,window.innerHeight,O,S));}let ie=()=>U(window.scrollY,A,L,1);function K(){let T=m?k=Math.max(k,ie()):ie();y=T,P(T),T>=1&&!R?(R=true,g?.()):T<1&&!m&&(R=false);}G();let _=Ne(window,[e],ie,K,()=>{r==="lines"&&(e.innerHTML=W,v=gn(e),dn(e,Q),P(y)),G();});ke(e,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:A,tEnd:L})});let H=()=>_.hold(false);return {destroy(){_.off(),e.innerHTML=W,Re(e);},replay(){k=-1,R=false,y=0,P(0),H();},pause:()=>_.hold(true),resume:H,seek(T){_.hold(true),P(y=k=st(T,0,1));},getProgress(){return y}}}var tt=e=>typeof e=="function"?e():vue.unref(e);function _e(e,t,n,r=lt){let o=null,s=t(),a=()=>{o?.destroy(),o=e.value?n(e.value,on(s,()=>s),s):null;};vue.onMounted(a),vue.watch(()=>r(s=t()),a),vue.onUnmounted(()=>{o?.destroy(),o=null;});}function No(e={}){let t=vue.ref(null);return _e(t,()=>tt(e),Tt),t}var hn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},ir=[null,Boolean,[Boolean,String],[Boolean,Number]],kt=e=>({type:e,default:void 0}),Do=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(hn).map(([e,t])=>[e,t?kt(ir[t]):null])),setup(e,{slots:t}){let n=vue.ref(null);return _e(n,()=>{let r={};for(let o in hn){let s=e[o];s!=null&&(r[o]=s);}return r},Tt),()=>vue.h("div",{ref:n},t.default?.())}});function _o(e){let t=vue.ref(null);return _e(t,()=>tt(e),xt),t}var Vo=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=vue.ref(null);return _e(n,()=>e.options,xt),()=>vue.h("div",{ref:n},t.default?.())}});function zo(e){let t=vue.ref(null);return _e(t,()=>tt(e),Lt),t}var Go=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:kt(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=vue.ref(null);return _e(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},Lt),()=>vue.h("span",{ref:t})}});function Wo(e={}){let t=vue.ref(null);return _e(t,()=>tt(e),Ct),t}var Bo=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=vue.ref(null);return _e(t,()=>e.options??{},Ct),()=>vue.h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}}),vn=(e,{triggerElement:t,...n},r)=>{let o=typeof t=="string"?document.querySelector(t):t;return typeof t=="string"&&!o&&D(`<ScrollFrames>: triggerElement "${t}" matches nothing; measuring the canvas.`),mn(e,{...n,frames:r.frames,triggerElement:o??void 0})};function jo(e){let t=vue.ref(null);return _e(t,()=>tt(e),vn,At),t}var bn={frames:0,count:0,trigger:0,easing:0,once:1,axis:0,triggerElement:0,fit:0,concurrency:0,onReady:0,onLoad:0,onComplete:0,onProgress:0},qo=vue.defineComponent({name:"ScrollFrames",props:Object.fromEntries(Object.entries(bn).map(([e,t])=>[e,t?kt(Boolean):e==="frames"?{required:true}:null])),setup(e){let t=vue.ref(null);return _e(t,()=>{let n={};for(let r in bn){let o=e[r];o!=null&&(n[r]=o);}return n},vn,At),vue.onMounted(()=>pn(t.value)),()=>vue.h("canvas",{ref:t,role:"img"})}});function Yo(e={}){let t=vue.ref(null);return _e(t,()=>tt(e),Pt),t}var Uo=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=vue.ref(null);return _e(n,()=>e.options??{},Pt),()=>vue.h(e.tag,{ref:n},t.default?.())}});exports.ScrollAnimate=Vo;exports.ScrollCounter=Go;exports.ScrollDraw=Do;exports.ScrollFrames=qo;exports.ScrollText=Uo;exports.ScrollVideo=Bo;exports.useScrollAnimate=_o;exports.useScrollCounter=zo;exports.useScrollDraw=No;exports.useScrollFrames=jo;exports.useScrollText=Yo;exports.useScrollVideo=Wo;
@@ -4,6 +4,7 @@ import { a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
4
4
  import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
5
5
  import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
6
6
  import { ScrollVideoOptions } from '../video/index.mjs';
7
+ import { ScrollFramesOptions } from '../frames/index.mjs';
7
8
  import { ScrollTextOptions } from '../text/index.mjs';
8
9
 
9
10
  /** Options as a plain object, a ref, or a getter — the getter or ref keeps them live. */
@@ -186,6 +187,41 @@ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
186
187
  muted: boolean;
187
188
  playsInline: boolean;
188
189
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
190
+ /** The options as scrollFrames takes them, but `triggerElement` may be a selector. */
191
+ type FramesInput = Omit<ScrollFramesOptions, 'triggerElement'> & {
192
+ triggerElement?: Element | string | null;
193
+ };
194
+ /**
195
+ * Composable — returns a ref to bind to a <canvas>, which scrubs an image
196
+ * sequence with the scroll. Options as in useScrollDraw: a getter or a ref
197
+ * keeps them live.
198
+ *
199
+ * @example
200
+ * <script setup>
201
+ * import { useScrollFrames } from 'svg-scroll-draw/vue';
202
+ * const film = useScrollFrames({ frames: (i) => `/film/${i + 1}.jpg`, count: 120 });
203
+ * </script>
204
+ * <canvas :ref="film" role="img" aria-label="The headphones turning" />
205
+ */
206
+ declare function useScrollFrames(options: MaybeRefOrGetter<FramesInput>): Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
207
+ /**
208
+ * Component — renders a <canvas role="img"> that scrubs an image sequence with
209
+ * the scroll. Every option is a prop; `class`, `style` and `aria-label` fall
210
+ * through to the canvas. Pass a `style` that changes as an object: Vue rewrites
211
+ * a changed style string whole, over the inline size scrollFrames holds on a
212
+ * canvas sized by its attributes.
213
+ *
214
+ * @example
215
+ * <section id="track" style="height: 400vh">
216
+ * <div style="position: sticky; top: 0; height: 100vh">
217
+ * <ScrollFrames :frames="(i) => `/film/${i + 1}.jpg`" :count="120" trigger-element="#track"
218
+ * :trigger="{ start: 'top top', end: 'bottom bottom' }" aria-label="The headphones turning" />
219
+ * </div>
220
+ * </section>
221
+ */
222
+ declare const ScrollFrames: vue.DefineComponent<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
223
+ [key: string]: any;
224
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
189
225
  /**
190
226
  * Composable — returns a ref to bind to any text element; splits and animates on scroll.
191
227
  *
@@ -227,4 +263,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
227
263
  tag: string;
228
264
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
229
265
 
230
- export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
266
+ export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollFrames, ScrollFramesOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollFrames, useScrollText, useScrollVideo };
@@ -4,6 +4,7 @@ import { a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
4
4
  import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
5
5
  import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
6
6
  import { ScrollVideoOptions } from '../video/index.js';
7
+ import { ScrollFramesOptions } from '../frames/index.js';
7
8
  import { ScrollTextOptions } from '../text/index.js';
8
9
 
9
10
  /** Options as a plain object, a ref, or a getter — the getter or ref keeps them live. */
@@ -186,6 +187,41 @@ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
186
187
  muted: boolean;
187
188
  playsInline: boolean;
188
189
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
190
+ /** The options as scrollFrames takes them, but `triggerElement` may be a selector. */
191
+ type FramesInput = Omit<ScrollFramesOptions, 'triggerElement'> & {
192
+ triggerElement?: Element | string | null;
193
+ };
194
+ /**
195
+ * Composable — returns a ref to bind to a <canvas>, which scrubs an image
196
+ * sequence with the scroll. Options as in useScrollDraw: a getter or a ref
197
+ * keeps them live.
198
+ *
199
+ * @example
200
+ * <script setup>
201
+ * import { useScrollFrames } from 'svg-scroll-draw/vue';
202
+ * const film = useScrollFrames({ frames: (i) => `/film/${i + 1}.jpg`, count: 120 });
203
+ * </script>
204
+ * <canvas :ref="film" role="img" aria-label="The headphones turning" />
205
+ */
206
+ declare function useScrollFrames(options: MaybeRefOrGetter<FramesInput>): Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
207
+ /**
208
+ * Component — renders a <canvas role="img"> that scrubs an image sequence with
209
+ * the scroll. Every option is a prop; `class`, `style` and `aria-label` fall
210
+ * through to the canvas. Pass a `style` that changes as an object: Vue rewrites
211
+ * a changed style string whole, over the inline size scrollFrames holds on a
212
+ * canvas sized by its attributes.
213
+ *
214
+ * @example
215
+ * <section id="track" style="height: 400vh">
216
+ * <div style="position: sticky; top: 0; height: 100vh">
217
+ * <ScrollFrames :frames="(i) => `/film/${i + 1}.jpg`" :count="120" trigger-element="#track"
218
+ * :trigger="{ start: 'top top', end: 'bottom bottom' }" aria-label="The headphones turning" />
219
+ * </div>
220
+ * </section>
221
+ */
222
+ declare const ScrollFrames: vue.DefineComponent<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
223
+ [key: string]: any;
224
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
189
225
  /**
190
226
  * Composable — returns a ref to bind to any text element; splits and animates on scroll.
191
227
  *
@@ -227,4 +263,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
227
263
  tag: string;
228
264
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
229
265
 
230
- export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
266
+ export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollFrames, ScrollFramesOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollFrames, useScrollText, useScrollVideo };
@@ -1 +1 @@
1
- export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-OSGWGHQJ.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-NYQJPPMP.mjs';import'../chunk-XNM3VKEK.mjs';import'../chunk-PAGN26EH.mjs';import'../chunk-VJ5ZU55P.mjs';import'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollFrames,l as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollFrames,k as useScrollText,g as useScrollVideo}from'../chunk-WKOT2MND.mjs';import'../chunk-22P4KBPG.mjs';import'../chunk-D2BHE4F2.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-BRV2B2YW.mjs';import'../chunk-32ZCSGFZ.mjs';import'../chunk-U5TKLHGW.mjs';import'../chunk-7USW2XFB.mjs';import'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1 +1 @@
1
- import {b}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
1
+ import {b}from'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svg-scroll-draw",
3
- "version": "2.23.7",
4
- "description": "SVG line drawing on scroll, on the browser's own scroll timeline (CSS animation-timeline, JS fallback). Drop-in for AOS, ScrollReveal and vivus. Plus reveal, pin, snap, text, video. Zero dependencies. React, Vue, Svelte, Solid, Angular, Astro, vanilla JS",
3
+ "version": "2.25.0",
4
+ "description": "SVG line drawing on scroll, on the browser's own scroll timeline (CSS animation-timeline, JS fallback). Drop-in for AOS, ScrollReveal and vivus. Plus reveal, pin, snap, text, video and image-sequence scrub. Zero dependencies. React, Vue, Svelte, Solid, Angular, Astro, vanilla JS",
5
5
  "keywords": [
6
6
  "svg",
7
7
  "scroll",
@@ -54,6 +54,9 @@
54
54
  "split-text",
55
55
  "text-animation",
56
56
  "scroll-video",
57
+ "image-sequence",
58
+ "scroll-frames",
59
+ "canvas-animation",
57
60
  "counter",
58
61
  "gsap-alternative",
59
62
  "scrolltrigger-alternative",
@@ -137,6 +140,9 @@
137
140
  "video": [
138
141
  "./dist/video/index.d.ts"
139
142
  ],
143
+ "frames": [
144
+ "./dist/frames/index.d.ts"
145
+ ],
140
146
  "text": [
141
147
  "./dist/text/index.d.ts"
142
148
  ],
@@ -317,6 +323,16 @@
317
323
  "default": "./dist/video/index.cjs"
318
324
  }
319
325
  },
326
+ "./frames": {
327
+ "import": {
328
+ "types": "./dist/frames/index.d.mts",
329
+ "default": "./dist/frames/index.mjs"
330
+ },
331
+ "require": {
332
+ "types": "./dist/frames/index.d.ts",
333
+ "default": "./dist/frames/index.cjs"
334
+ }
335
+ },
320
336
  "./text": {
321
337
  "import": {
322
338
  "types": "./dist/text/index.d.mts",
@@ -1 +0,0 @@
1
- var n=Symbol.for("svg-scroll-draw.registry");function t(){let e=globalThis;return e[n]||(e[n]=new Map)}function o(e,r){t().set(e,r);}function s(e){t().delete(e);}function i(){return t()}export{o as a,s as b,i as c};
@@ -1 +0,0 @@
1
- import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-NYQJPPMP.mjs';import {a as a$4}from'./chunk-XNM3VKEK.mjs';import {a as a$2}from'./chunk-PAGN26EH.mjs';import {a as a$1}from'./chunk-VJ5ZU55P.mjs';import {b as b$2}from'./chunk-K6VATIJH.mjs';import {defineComponent,ref,h as h$1,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o){let l=null,i=t(),s=()=>{l?.destroy(),l=e.value?o(e.value,b$1(i,()=>i)):null;};onMounted(s),watch(()=>a(i=t()),s),onUnmounted(()=>{l?.destroy(),l=null;});}function B(e={}){let t=ref(null);return r(t,()=>u(e),b$2),t}var g={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},b=[null,Boolean,[Boolean,String],[Boolean,Number]],T=e=>({type:e,default:void 0}),H=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(g).map(([e,t])=>[e,t?T(b[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let l={};for(let i in g){let s=e[i];s!=null&&(l[i]=s);}return l},b$2),()=>h$1("div",{ref:o},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var j=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h$1("div",{ref:o},t.default?.())}});function G(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var h=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:T(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h$1("span",{ref:t})}});function N(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var F=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h$1("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function q(e={}){let t=ref(null);return r(t,()=>u(e),a$4),t}var I=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$4),()=>h$1(e.tag,{ref:o},t.default?.())}});export{B as a,H as b,V as c,j as d,G as e,h as f,N as g,F as h,q as i,I as j};