svg-scroll-draw 2.24.0 → 2.26.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 (120) hide show
  1. package/README.md +174 -30
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +60 -6
  4. package/dist/angular/index.d.ts +60 -6
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +2 -2
  7. package/dist/astro/index.d.mts +3 -3
  8. package/dist/astro/index.d.ts +3 -3
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +69 -31
  11. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  12. package/dist/chunk-5SJE7725.mjs +1 -0
  13. package/dist/{chunk-NX74KN5X.mjs → chunk-5U4JXBHR.mjs} +1 -1
  14. package/dist/chunk-7LDSB4FT.mjs +1 -0
  15. package/dist/chunk-ASCOHQQD.mjs +2 -0
  16. package/dist/chunk-GBFWTY5L.mjs +1 -0
  17. package/dist/chunk-HAGTU5EX.mjs +1 -0
  18. package/dist/chunk-HJTHOZK5.mjs +1 -0
  19. package/dist/chunk-IXR6RML7.mjs +1 -0
  20. package/dist/chunk-KN2YB54Z.mjs +1 -0
  21. package/dist/chunk-NJV6S5LD.mjs +1 -0
  22. package/dist/chunk-UBH4K5YD.mjs +1 -0
  23. package/dist/chunk-UF3MO5XQ.mjs +1 -0
  24. package/dist/chunk-XLXVGQ3P.mjs +3 -0
  25. package/dist/chunk-YOOPMYT6.mjs +1 -0
  26. package/dist/chunk-Z72TVDHY.mjs +1 -0
  27. package/dist/cinematic/index.cjs +2 -2
  28. package/dist/cinematic/index.d.mts +3 -1
  29. package/dist/cinematic/index.d.ts +3 -1
  30. package/dist/cinematic/index.mjs +1 -1
  31. package/dist/{engine-6VsjEwzb.d.ts → engine-Bi2x8-X-.d.mts} +2 -2
  32. package/dist/{engine-BLWKCfxC.d.mts → engine-DAlvk6i0.d.ts} +2 -2
  33. package/dist/frames/index.cjs +1 -1
  34. package/dist/frames/index.d.mts +2 -2
  35. package/dist/frames/index.d.ts +2 -2
  36. package/dist/frames/index.mjs +1 -1
  37. package/dist/group/index.cjs +3 -3
  38. package/dist/group/index.d.mts +3 -3
  39. package/dist/group/index.d.ts +3 -3
  40. package/dist/group/index.mjs +1 -1
  41. package/dist/horizontal/index.cjs +1 -1
  42. package/dist/horizontal/index.d.mts +2 -2
  43. package/dist/horizontal/index.d.ts +2 -2
  44. package/dist/horizontal/index.mjs +1 -1
  45. package/dist/{index-BN8yKeQ3.d.ts → index-BMMZ8aW7.d.mts} +2 -2
  46. package/dist/{index-hSQqLVbg.d.ts → index-CEMsUTEG.d.ts} +3 -3
  47. package/dist/{index-DAiRJgtF.d.mts → index-ClAFxNEp.d.mts} +3 -3
  48. package/dist/{index-DVjblK_4.d.mts → index-MdQ4ti_z.d.ts} +2 -2
  49. package/dist/index.cjs +4 -4
  50. package/dist/index.d.mts +6 -6
  51. package/dist/index.d.ts +6 -6
  52. package/dist/index.mjs +1 -1
  53. package/dist/lenis/index.cjs +1 -1
  54. package/dist/lenis/index.d.mts +15 -16
  55. package/dist/lenis/index.d.ts +15 -16
  56. package/dist/lenis/index.mjs +1 -1
  57. package/dist/nuxt/index.cjs +3 -3
  58. package/dist/nuxt/index.d.mts +8 -5
  59. package/dist/nuxt/index.d.ts +8 -5
  60. package/dist/nuxt/index.mjs +1 -1
  61. package/dist/progress/index.cjs +1 -1
  62. package/dist/progress/index.d.mts +2 -2
  63. package/dist/progress/index.d.ts +2 -2
  64. package/dist/progress/index.mjs +1 -1
  65. package/dist/react/index.cjs +3 -3
  66. package/dist/react/index.d.mts +21 -5
  67. package/dist/react/index.d.ts +21 -5
  68. package/dist/react/index.mjs +1 -1
  69. package/dist/reveal/index.cjs +1 -1
  70. package/dist/reveal/index.d.mts +2 -2
  71. package/dist/reveal/index.d.ts +2 -2
  72. package/dist/reveal/index.mjs +1 -1
  73. package/dist/{scroll-draw-Fzir8hlU.d.mts → scroll-draw-CKZysh22.d.mts} +1 -1
  74. package/dist/{scroll-draw-BsU_Ohmu.d.ts → scroll-draw-DbY8RUJE.d.ts} +1 -1
  75. package/dist/snap/index.cjs +1 -1
  76. package/dist/snap/index.d.mts +2 -2
  77. package/dist/snap/index.d.ts +2 -2
  78. package/dist/snap/index.mjs +1 -1
  79. package/dist/solid/index.cjs +3 -3
  80. package/dist/solid/index.d.mts +40 -4
  81. package/dist/solid/index.d.ts +40 -4
  82. package/dist/solid/index.mjs +1 -1
  83. package/dist/svelte/index.cjs +3 -3
  84. package/dist/svelte/index.d.mts +47 -4
  85. package/dist/svelte/index.d.ts +47 -4
  86. package/dist/svelte/index.mjs +1 -1
  87. package/dist/text/index.cjs +1 -1
  88. package/dist/text/index.d.mts +2 -2
  89. package/dist/text/index.d.ts +2 -2
  90. package/dist/text/index.mjs +1 -1
  91. package/dist/timeline/index.cjs +10 -10
  92. package/dist/timeline/index.d.mts +2 -2
  93. package/dist/timeline/index.d.ts +2 -2
  94. package/dist/timeline/index.mjs +2 -2
  95. package/dist/{types-9bcJdVcg.d.mts → types-iITMwrru.d.mts} +10 -2
  96. package/dist/{types-9bcJdVcg.d.ts → types-iITMwrru.d.ts} +10 -2
  97. package/dist/video/index.cjs +1 -1
  98. package/dist/video/index.d.mts +2 -2
  99. package/dist/video/index.d.ts +2 -2
  100. package/dist/video/index.mjs +1 -1
  101. package/dist/vue/index.cjs +3 -3
  102. package/dist/vue/index.d.mts +37 -4
  103. package/dist/vue/index.d.ts +37 -4
  104. package/dist/vue/index.mjs +1 -1
  105. package/dist/web-component/index.cjs +3 -3
  106. package/dist/web-component/index.mjs +1 -1
  107. package/dist/wrapper-BOHrDnBO.d.mts +8 -0
  108. package/dist/wrapper-Cm7JTIVl.d.ts +8 -0
  109. package/package.json +1 -1
  110. package/dist/chunk-32ZCSGFZ.mjs +0 -1
  111. package/dist/chunk-5SKWSPQT.mjs +0 -1
  112. package/dist/chunk-7USW2XFB.mjs +0 -1
  113. package/dist/chunk-7XOFQCQE.mjs +0 -3
  114. package/dist/chunk-BDXWPUBJ.mjs +0 -2
  115. package/dist/chunk-BRV2B2YW.mjs +0 -1
  116. package/dist/chunk-QZKYGS74.mjs +0 -1
  117. package/dist/chunk-THPTANES.mjs +0 -1
  118. package/dist/chunk-U5TKLHGW.mjs +0 -1
  119. package/dist/chunk-V3Z6G5JE.mjs +0 -1
  120. package/dist/chunk-XSVTHCLO.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import { E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.js';
1
+ import { E as Easing, S as ScrollDrawInstance } from '../types-iITMwrru.js';
2
2
 
3
3
  interface TimelineTrack {
4
4
  /** CSS selector for paths within the container to animate on this track. */
@@ -8,7 +8,7 @@ interface TimelineTrack {
8
8
  /** Progress value (0–1) within the overall scroll range where this track ends. */
9
9
  to: number;
10
10
  /** Easing for this track. Defaults to 'linear'. */
11
- easing?: EasingName | ((t: number) => number);
11
+ easing?: Easing;
12
12
  /** Fade opacity in sync with this track's draw progress. */
13
13
  fade?: boolean;
14
14
  }
@@ -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'../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">
1
+ import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-XC5NR2MU.mjs';import {a as a$4}from'../chunk-YOOPMYT6.mjs';import {a,e,c,b as b$2}from'../chunk-NV6YTPHI.mjs';import {f}from'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$2}from'../chunk-5PJEKEEP.mjs';import {a as a$5,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var de=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Ce(f$1,ce){let q={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return q;let B=typeof f$1=="string"?document.querySelector(f$1):f$1;if(!B)return b("timeline: Container not found:",f$1),q;let l=B,{trigger:V={},speed:N=1,once:$=false,axis:h="y",tracks:U,onComplete:fe,repeat:x,repeatDelay:I=0,loop:R=false,loopDuration:ue=1500,debug:me=false,label:ge,respectReducedMotion:X=true}=ce,ye=a(V.start||"top bottom"),be=a(V.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,H=X&&a$1(),he=a$2(e=>{H=X&&e,H&&(s=false,clearTimeout(i),i=void 0);}),z=()=>C>0&&!H,A=new Map,O=U.map(e=>{let o=f(e.easing),r=Array.from(l.querySelectorAll(e.selector)),n=r.map(t=>a$3(t));return r.forEach((t,a)=>{A.has(t)||A.set(t,t.getAttribute("style")??""),t.style.strokeDasharray=a$4(n[a]),t.style.strokeDashoffset=`${n[a]}`,e.fade&&(t.style.opacity="0");}),{...e,elements:r,lengths:n,easeFn:o}});function xe(){for(let[e,o]of A)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=0,p=null;me&&(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 we(e){if(!p)return;let o=ge??(typeof f$1=="string"?f$1:"timeline"),r=U.map(({selector:n,from:t,to:a},G)=>{let g=de[G%de.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>
@@ -20,4 +20,4 @@ import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-XC5N
20
20
  <div style="height:2px;background:#2a2a2a;border-radius:1px;overflow:hidden">
21
21
  <div style="height:100%;background:#fff;border-radius:1px;width:${e*100}%;transition:width 0.05s linear"></div>
22
22
  </div>
23
- </div>`;}function E(){return h==="x"?window.scrollX:window.scrollY}function K(){return h==="x"?window.innerWidth:window.innerHeight}function Q(){let e=l.getBoundingClientRect(),o=E(),r=h==="x"?e.left:e.top,n=h==="x"?e.width:e.height,t=c({top:r,height:n},o,K(),ge,ye);v=t.tStart,T=t.tEnd,Y=r+o-K(),J=r+o+n;}function Z(e){l.style.setProperty("--scroll-draw-progress",String(e)),G.forEach(({elements:o,lengths:r,from:n,to:t,easeFn:a,fade:j})=>{let g=t-n,D=g>0?Math.min(1,Math.max(0,(e-n)/g)):0,S=a(D);o.forEach((te,ve)=>{te.style.strokeDashoffset=`${r[ve]*(1-S)}`,j&&(te.style.opacity=String(S));});}),xe(e);}function M(){L=false,b$3=-1,d$1=0,y=false,G.forEach(({elements:e,lengths:o,fade:r})=>{e.forEach((n,t)=>{n.style.strokeDashoffset=`${o[t]}`,r&&(n.style.opacity="0");});}),l.style.setProperty("--scroll-draw-progress","0");}function ee(){return s?b$2(E(),Y,J,1):b$2(E(),v,T,Math.min(V,1))}function we(){L&&ee()%1&&M();let e;s?e=Math.min(1,(performance.now()-P)/ce):(e=b$2(E(),v,T,V),(k||H())&&(b$3=Math.max(b$3,e),e=b$3)),d$1=e,Z(e),e>=1&&!y?(y=true,fe?.(),H()&&!s&&!i?i=setTimeout(()=>{i=void 0,u!==1/0&&u--,M(),s=true,P=performance.now(),f();},I):w>0&&k&&!s&&!i&&(i=setTimeout(()=>{i=void 0,w!==1/0&&w--,L=true;},I))):!s&&e<1&&!k&&(y=false),s&&e>=1&&!i&&(y=false,u>0&&H()?i=setTimeout(()=>{i=void 0,u!==1/0&&u--,M(),P=performance.now(),f();},I):s=false);}Q();let O=e(window,[l],ee,we,()=>{G.forEach(({elements:e,lengths:o})=>{e.forEach((r,n)=>{o[n]=a$3(r),r.style.strokeDasharray=`${o[n]}`;});}),Q();}),f=()=>O.hold(m);return f(),a$4(l,{type:"draw",getProgress:()=>d$1,getTrigger:()=>({tStart:v,tEnd:T})}),{destroy(){O.off(),clearTimeout(i),b$1(l),be(),p&&(p.remove(),p=null),he(),l.style.removeProperty("--scroll-draw-progress");},refresh:O.remeasure,replay(){w=x==="infinite"?1/0:x??0,u=C,s=false,clearTimeout(i),i=void 0,M(),m=false,f();},pause(){m=true,f();},resume(){m&&(m=false,f());},seek(e){d$1=Math.min(1,Math.max(0,e)),b$3=d$1,m=true,f(),Z(d$1);},getProgress(){return d$1}}}export{Re as scrollDrawTimeline};
23
+ </div>`;}function E(){return h==="x"?window.scrollX:window.scrollY}function K(){return h==="x"?window.innerWidth:window.innerHeight}function Q(){let e=l.getBoundingClientRect(),o=E(),r=h==="x"?e.left:e.top,n=h==="x"?e.width:e.height,t=c({top:r,height:n},o,K(),ye,be);v=t.tStart,T=t.tEnd,Y=r+o-K(),J=r+o+n;}function Z(e){l.style.setProperty("--scroll-draw-progress",String(e)),O.forEach(({elements:o,lengths:r,from:n,to:t,easeFn:a,fade:G})=>{let g=t-n,D=g>0?Math.min(1,Math.max(0,(e-n)/g)):0,S=a(D);o.forEach((te,Te)=>{te.style.strokeDashoffset=`${r[Te]*(1-S)}`,G&&(te.style.opacity=String(S));});}),we(e);}function M(){L=false,b$3=-1,d=0,y=false,O.forEach(({elements:e,lengths:o,fade:r})=>{e.forEach((n,t)=>{n.style.strokeDashoffset=`${o[t]}`,r&&(n.style.opacity="0");});}),l.style.setProperty("--scroll-draw-progress","0");}function ee(){return s?b$2(E(),Y,J,1):b$2(E(),v,T,Math.min(N,1))}function ve(){L&&ee()%1&&M();let e;s?e=Math.min(1,(performance.now()-P)/ue):(e=b$2(E(),v,T,N),($||z())&&(b$3=Math.max(b$3,e),e=b$3)),d=e,Z(e),e>=1&&!y?(y=true,fe?.(),z()&&!s&&!i?i=setTimeout(()=>{i=void 0,u!==1/0&&u--,M(),s=true,P=performance.now(),c$1();},I):w>0&&$&&!s&&!i&&(i=setTimeout(()=>{i=void 0,w!==1/0&&w--,L=true;},I))):!s&&e<1&&!$&&(y=false),s&&e>=1&&!i&&(y=false,u>0&&z()?i=setTimeout(()=>{i=void 0,u!==1/0&&u--,M(),P=performance.now(),c$1();},I):s=false);}Q();let F=e(window,[l],ee,ve,()=>{O.forEach(({elements:e,lengths:o})=>{e.forEach((r,n)=>{o[n]=a$3(r),r.style.strokeDasharray=a$4(o[n]);});}),Q();}),c$1=()=>F.hold(m);return c$1(),a$5(l,{type:"draw",getProgress:()=>d,getTrigger:()=>({tStart:v,tEnd:T})}),{destroy(){F.off(),clearTimeout(i),b$1(l),he(),p&&(p.remove(),p=null),xe(),l.style.removeProperty("--scroll-draw-progress");},refresh:F.remeasure,replay(){w=x==="infinite"?1/0:x??0,u=C,s=false,clearTimeout(i),i=void 0,M(),m=false,c$1();},pause(){m=true,c$1();},resume(){m&&(m=false,c$1());},seek(e){d=Math.min(1,Math.max(0,e)),b$3=d,m=true,c$1(),Z(d);},getProgress(){return d}}}export{Ce as scrollDrawTimeline};
@@ -1,4 +1,12 @@
1
1
  type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
+ /**
3
+ * A CSS timing function (2.26.0+): `cubic-bezier(x1, y1, x2, y2)` with x1 and
4
+ * x2 in [0, 1], or the keyword `ease`. The library's own `ease-in`, `ease-out`
5
+ * and `ease-in-out` are its quadratics, not the CSS keywords of the same name.
6
+ */
7
+ type CssEasing = 'ease' | `cubic-bezier(${string})`;
8
+ /** What every `easing` option takes: a name, a CSS cubic-bezier(), or a curve over [0, 1]. */
9
+ type Easing = EasingName | CssEasing | ((t: number) => number);
2
10
  type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
3
11
  interface TriggerConfig {
4
12
  start?: string;
@@ -18,7 +26,7 @@ interface ScrollDrawOptions {
18
26
  selector?: string;
19
27
  speed?: number;
20
28
  fade?: boolean;
21
- easing?: EasingName | ((t: number) => number);
29
+ easing?: Easing;
22
30
  trigger?: TriggerConfig;
23
31
  /**
24
32
  * Each path starts this fraction of the scroll range after the previous one,
@@ -159,4 +167,4 @@ interface ScrollDrawInstance {
159
167
  refresh?: () => void;
160
168
  }
161
169
 
162
- export type { EasingName as E, PresetName as P, ScrollDrawInstance as S, TriggerConfig as T, ScrollDrawOptions as a };
170
+ export type { CssEasing as C, Easing as E, PresetName as P, ScrollDrawInstance as S, TriggerConfig as T, ScrollDrawOptions as a };
@@ -1,4 +1,12 @@
1
1
  type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
+ /**
3
+ * A CSS timing function (2.26.0+): `cubic-bezier(x1, y1, x2, y2)` with x1 and
4
+ * x2 in [0, 1], or the keyword `ease`. The library's own `ease-in`, `ease-out`
5
+ * and `ease-in-out` are its quadratics, not the CSS keywords of the same name.
6
+ */
7
+ type CssEasing = 'ease' | `cubic-bezier(${string})`;
8
+ /** What every `easing` option takes: a name, a CSS cubic-bezier(), or a curve over [0, 1]. */
9
+ type Easing = EasingName | CssEasing | ((t: number) => number);
2
10
  type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
3
11
  interface TriggerConfig {
4
12
  start?: string;
@@ -18,7 +26,7 @@ interface ScrollDrawOptions {
18
26
  selector?: string;
19
27
  speed?: number;
20
28
  fade?: boolean;
21
- easing?: EasingName | ((t: number) => number);
29
+ easing?: Easing;
22
30
  trigger?: TriggerConfig;
23
31
  /**
24
32
  * Each path starts this fraction of the scroll range after the previous one,
@@ -159,4 +167,4 @@ interface ScrollDrawInstance {
159
167
  refresh?: () => void;
160
168
  }
161
169
 
162
- export type { EasingName as E, PresetName as P, ScrollDrawInstance as S, TriggerConfig as T, ScrollDrawOptions as a };
170
+ export type { CssEasing as C, Easing as E, PresetName as P, ScrollDrawInstance as S, TriggerConfig as T, ScrollDrawOptions as a };
@@ -1 +1 @@
1
- 'use strict';function le({tension:e=2.5,friction:t=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,t)}function fe({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(n),i=0,a=[];for(let u=0;u<r;u++){let s=Math.pow(o,u);a.push(s),i+=s;}let c=[0],l=0;for(let u=0;u<r;u++)l+=a[u]/i,c.push(l);return u=>{if(u<=0)return 0;if(u>=1)return 1;for(let s=0;s<r;s++)if(u<=c[s+1]){let f=(u-c[s])/(c[s+1]-c[s]);if(s===0)return f*(2-f);let p=1-Math.pow(n,s);return p+(1-p)*(2*f-1)*(2*f-1)}return 1}}function pe({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),o=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/n)+1}var Q={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:le(),bounce:fe(),elastic:pe()};function K(e,t,r){return Math.min(r,Math.max(t,e))}function k(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}var J=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function X(e,t,r,n){return e+r+t*J(n,0)}function j(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:J(e,1))}function U(e,t,r,n){return r===t?0:K((e-t)/(r-t)*n,0,1)}function Z(e,t,r,n,o){let i=X(e.top,e.height,t,n.element)-j(n.viewport,r),a=X(e.top,e.height,t,o.element)-j(o.viewport,r);return {tStart:i,tEnd:a}}var ee=Symbol.for("svg-scroll-draw.registry");function te(){let e=globalThis;return e[ee]||(e[ee]=new Map)}function ne(e,t){te().set(e,t);}function re(e){te().delete(e);}var ge=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function W(e,...t){ge&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function oe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",r),()=>t.removeEventListener("change",r);let n=t;return n.addListener?.(r),()=>n.removeListener?.(r)}var S,P=new Set,D=new WeakMap,_=new Map,ie=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function be(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function se(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();S??(S=new ResizeObserver(o=>{let i=false;for(let{target:a}of o)D.get(a)!==ie(a)&&(i=true),D.set(a,"");i&&P.forEach(a=>a());})),P.add(r);let n=be(e);return [document.body,document.documentElement].forEach(o=>o&&n.add(o)),n.forEach(o=>{D.has(o)||D.set(o,ie(o)),_.set(o,(_.get(o)??0)+1),S.observe(o);}),()=>{P.delete(r)&&(n.forEach(o=>{let i=(_.get(o)??1)-1;if(i)return void _.set(o,i);_.delete(o),S?.unobserve(o);}),P.size||(S?.disconnect(),S=void 0));}}function ae(e,t,r,n,o){let i,a=NaN,c,l,u=()=>{i=0,n(),!c&&!i&&(a=r())>0&&a<1&&(i=requestAnimationFrame(u));},s=()=>{!i&&!c&&r()!==a&&(i=requestAnimationFrame(u));},f=b=>{c=b,cancelAnimationFrame(i),i=a=NaN,s();},p=()=>{clearTimeout(l),o(),s();},v=()=>{clearTimeout(l),l=setTimeout(p,150);},g=se(t,v),M=b=>{e[b]("scroll",s,{passive:true}),window[b]("resize",v),window[b]("orientationchange",v);};return M("addEventListener"),s(),{hold:f,remeasure:p,off(){f(true),M("removeEventListener"),g(),clearTimeout(l);}}}var ue={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function De(e,t={}){if(typeof window>"u")return ue;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return W("scrollVideo: <video> element not found:",e),ue;let n=r,{trigger:o={},easing:i="linear",once:a=false,axis:c="y",preload:l="auto",triggerElement:u,onReady:s,onComplete:f,onProgress:p}=t,v=u??n,g=window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof i=="function"?i:Q[i]??Q.linear,b=k(o.start||"top top"),de=k(o.end||"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=l);let F=t.from??0,I=t.to,R=0,T=0,h=false,O=-1,N=0,w=0,A=false,y=false,q=()=>c==="x"?window.scrollX:window.scrollY,ce=()=>c==="x"?window.innerWidth:window.innerHeight;function z(){let d=v.getBoundingClientRect(),m=c==="x"?d.left:d.top,L=c==="x"?d.width:d.height,H=Z({top:m,height:L},q(),ce(),b,de);R=H.tStart,T=H.tEnd,y&&T===R&&W("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let V=NaN;function E(d){if(!y)return;let m=I??n.duration??0,L=F+(m-F)*d;L!==V&&(V=L,n.currentTime=L),n.style.setProperty("--scroll-draw-progress",String(d)),p?.(d);}let B=()=>U(q(),R,T,1);function me(){if(!y||g)return;let d=B(),m=a?Math.max(O,M(N=Math.max(N,d))):M(d);w=m,E(m),m>=1&&!A?(A=true,f?.()):m<1&&!a&&(A=false);}let x=ae(window,[v],B,me,z),C=()=>x.hold(h||!y||g);C();function G(){if(y=true,I===void 0&&(I=n.duration),g){E(1),s?.();return}z(),s?.(),h?E(w):C();}n.readyState>=1?G():n.addEventListener("loadedmetadata",G,{once:true}),y||z();let Y=g?()=>{}:oe(d=>{d&&(Y(),g=true,x.hold(true),E(1));});ne(n,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:R,tEnd:T})});function $(){h&&(h=false,C());}return {destroy(){x.off(),n.removeEventListener("loadedmetadata",G),Y(),re(n);},replay(){O=-1,N=0,A=false,w=0,V=NaN,E(0),$();},pause(){h=true,x.hold(true);},resume:$,seek(d){let m=Math.min(1,Math.max(0,d));w=m,O=m,N=0,h=true,x.hold(true),V=NaN,E(m);},getProgress(){return w}}}exports.scrollVideo=De;
1
+ 'use strict';var pe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function x(e,...n){pe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function ge({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function be({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(r),o=0,s=[];for(let a=0;a<t;a++){let d=Math.pow(i,a);s.push(d),o+=d;}let u=[0],m=0;for(let a=0;a<t;a++)m+=s[a]/o,u.push(m);return a=>{if(a<=0)return 0;if(a>=1)return 1;for(let d=0;d<t;d++)if(a<=u[d+1]){let f=(a-u[d])/(u[d+1]-u[d]);if(d===0)return f*(2-f);let p=1-Math.pow(r,d);return p+(1-p)*(2*f-1)*(2*f-1)}return 1}}function ve({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),i=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return o=>o<=0?0:o>=1?1:t*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/r)+1}var A={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:ge(),bounce:be(),elastic:ve()};function he(e,n,t,r){let i=(o,s,u)=>((1+3*o-3*s)*u+3*s-6*o)*u*u+3*o*u;return o=>{if(o<=0||o>=1)return +(o>0);let s=o;for(let u=0;u<8;u++)s-=(i(e,t,s)-o)/((3*(1+3*e-3*t)*s+6*t-12*e)*s+3*e);if(!(s>=0&&s<=1&&Math.abs(i(e,t,s)-o)<1e-9))for(let u=0,m=0,a=1;u<30;u++)s=(m+a)/2,i(e,t,s)<o?m=s:a=s;return i(n,r,s)}}function we(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [he(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var J=new Set;function K(e,n="linear"){if(typeof e=="function")return e;if(e==null)return A[n];if({}.hasOwnProperty.call(A,e))return A[e];let t=we(String(e));return t?t[0]:(!J.has(e)&&J.add(e)&&x(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),A[n])}function U(e,n,t){return Math.min(t,Math.max(n,e))}function G(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}var Z=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function X(e,n,t,r){return e+t+n*Z(r,0)}function j(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Z(e,1))}function ee(e,n,t,r){return t===n?0:U((e-n)/(t-n)*r,0,1)}function te(e,n,t,r,i){let o=X(e.top,e.height,n,r.element)-j(r.viewport,t),s=X(e.top,e.height,n,i.element)-j(i.viewport,t);return {tStart:o,tEnd:s}}var ne=Symbol.for("svg-scroll-draw.registry");function re(){let e=globalThis;return e[ne]||(e[ne]=new Map)}function oe(e,n){re().set(e,n);}function ie(e){re().delete(e);}function se(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}var _,O=new Set,D=new WeakMap,R=new Map,ue=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Ee(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function ae(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();_??(_=new ResizeObserver(i=>{let o=false;for(let{target:s}of i)D.get(s)!==ue(s)&&(o=true),D.set(s,"");o&&O.forEach(s=>s());})),O.add(t);let r=Ee(e);return [document.body,document.documentElement].forEach(i=>i&&r.add(i)),r.forEach(i=>{D.has(i)||D.set(i,ue(i)),R.set(i,(R.get(i)??0)+1),_.observe(i);}),()=>{O.delete(t)&&(r.forEach(i=>{let o=(R.get(i)??1)-1;if(o)return void R.set(i,o);R.delete(i),_?.unobserve(i);}),O.size||(_?.disconnect(),_=void 0));}}function de(e,n,t,r,i){let o,s=NaN,u,m,a=()=>{o=0,r(),!u&&!o&&(s=t())>0&&s<1&&(o=requestAnimationFrame(a));},d=()=>{!o&&!u&&t()!==s&&(o=requestAnimationFrame(a));},f=b=>{u=b,cancelAnimationFrame(o),o=s=NaN,d();},p=()=>{clearTimeout(m),i(),d();},v=()=>{clearTimeout(m),m=setTimeout(p,150);},g=ae(n,v),M=b=>{e[b]("scroll",d,{passive:true}),window[b]("resize",v),window[b]("orientationchange",v);};return M("addEventListener"),d(),{hold:f,remeasure:p,off(){f(true),M("removeEventListener"),g(),clearTimeout(m);}}}var ce={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ke(e,n={}){if(typeof window>"u")return ce;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return x("scrollVideo: <video> element not found:",e),ce;let r=t,{trigger:i={},easing:o="linear",once:s=false,axis:u="y",preload:m="auto",triggerElement:a,onReady:d,onComplete:f,onProgress:p}=n,v=a??r,g=window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=K(o),b=G(i.start||"top top"),me=G(i.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=m);let W=n.from??0,I=n.to,T=0,N=0,h=false,C=-1,z=0,w=0,P=false,E=false,q=()=>u==="x"?window.scrollX:window.scrollY,le=()=>u==="x"?window.innerWidth:window.innerHeight;function k(){let c=v.getBoundingClientRect(),l=u==="x"?c.left:c.top,S=u==="x"?c.width:c.height,H=te({top:l,height:S},q(),le(),b,me);T=H.tStart,N=H.tEnd,E&&N===T&&x("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let V=NaN;function y(c){if(!E)return;let l=I??r.duration??0,S=W+(l-W)*c;S!==V&&(V=S,r.currentTime=S),r.style.setProperty("--scroll-draw-progress",String(c)),p?.(c);}let $=()=>ee(q(),T,N,1);function fe(){if(!E||g)return;let c=$(),l=s?Math.max(C,M(z=Math.max(z,c))):M(c);w=l,y(l),l>=1&&!P?(P=true,f?.()):l<1&&!s&&(P=false);}let L=de(window,[v],$,fe,k),F=()=>L.hold(h||!E||g);F();function Q(){if(E=true,I===void 0&&(I=r.duration),g){y(1),d?.();return}k(),d?.(),h?y(w):F();}r.readyState>=1?Q():r.addEventListener("loadedmetadata",Q,{once:true}),E||k();let B=g?()=>{}:se(c=>{c&&(B(),g=true,L.hold(true),y(1));});oe(r,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:T,tEnd:N})});function Y(){h&&(h=false,F());}return {destroy(){L.off(),r.removeEventListener("loadedmetadata",Q),B(),ie(r);},replay(){C=-1,z=0,P=false,w=0,V=NaN,y(0),Y();},pause(){h=true,L.hold(true);},resume:Y,seek(c){let l=Math.min(1,Math.max(0,c));w=l,C=l,z=0,h=true,L.hold(true),V=NaN,y(l);},getProgress(){return w}}}exports.scrollVideo=ke;
@@ -1,10 +1,10 @@
1
- import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.mjs';
1
+ import { T as TriggerConfig, E as Easing, S as ScrollDrawInstance } from '../types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollVideoOptions {
4
4
  trigger?: TriggerConfig;
5
5
  from?: number;
6
6
  to?: number;
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  once?: boolean;
9
9
  axis?: 'x' | 'y';
10
10
  preload?: 'auto' | 'metadata';
@@ -1,10 +1,10 @@
1
- import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.js';
1
+ import { T as TriggerConfig, E as Easing, S as ScrollDrawInstance } from '../types-iITMwrru.js';
2
2
 
3
3
  interface ScrollVideoOptions {
4
4
  trigger?: TriggerConfig;
5
5
  from?: number;
6
6
  to?: number;
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  once?: boolean;
9
9
  axis?: 'x' | 'y';
10
10
  preload?: 'auto' | 'metadata';
@@ -1 +1 @@
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
+ export{a as scrollVideo}from'../chunk-HJTHOZK5.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.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');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 k(e,...r){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}function kr({tension:e=2.5,friction:r=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,r)}function Rr({bounces:e=3,decay:r=.5}={}){let t=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,r)),o=Math.sqrt(n),s=0,i=[];for(let g=0;g<t;g++){let w=Math.pow(o,g);i.push(w),s+=w;}let c=[0],m=0;for(let g=0;g<t;g++)m+=i[g]/s,c.push(m);return g=>{if(g<=0)return 0;if(g>=1)return 1;for(let w=0;w<t;w++)if(g<=c[w+1]){let A=(g-c[w])/(c[w+1]-c[w]);if(w===0)return A*(2-A);let S=1-Math.pow(n,w);return S+(1-S)*(2*A-1)*(2*A-1)}return 1}}function $r({amplitude:e=1,period:r=.4}={}){let t=Math.max(1,e),n=Math.max(.1,r),o=t<=1?n/4:n/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/n)+1}var Je={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:kr(),bounce:Rr(),elastic:$r()};function Fr(e,r,t,n){let o=(s,i,c)=>((1+3*s-3*i)*c+3*i-6*s)*c*c+3*s*c;return s=>{if(s<=0||s>=1)return +(s>0);let i=s;for(let c=0;c<8;c++)i-=(o(e,t,i)-s)/((3*(1+3*e-3*t)*i+6*t-12*e)*i+3*e);if(!(i>=0&&i<=1&&Math.abs(o(e,t,i)-s)<1e-9))for(let c=0,m=0,g=1;c<30;c++)i=(m+g)/2,o(e,t,i)<s?m=i:g=i;return o(r,n,i)}}function xt(e){let r=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=r?r[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [Fr(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var Yt=new Set;function Ie(e,r="linear"){if(typeof e=="function")return e;if(e==null)return Je[r];if({}.hasOwnProperty.call(Je,e))return Je[e];let t=xt(String(e));return t?t[0]:(!Yt.has(e)&&Yt.add(e)&&k(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),Je[r])}function it(e,r,t){return Math.min(t,Math.max(r,e))}function ae(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[t="top",n="bottom"]=r.split(/\s+/).filter(Boolean);return {element:t,viewport:n}}var Kt=(e,r)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:r;function Ut(e,r,t,n){return e+t+r*Kt(n,0)}function Qt(e,r){return r*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Kt(e,1))}function U(e,r,t,n){return t===r?0:it((e-r)/(t-r)*n,0,1)}function Le(e,r,t,n,o){let s=Ut(e.top,e.height,r,n.element)-Qt(n.viewport,t),i=Ut(e.top,e.height,r,o.element)-Qt(o.viewport,t);return {tStart:s,tEnd:i}}function mt(e,r,t){let n=e.getBoundingClientRect(),o=t==="x"?n.width:n.height;return r?{top:t==="x"?n.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:n.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:o,scroll:0}:{top:t==="x"?n.left:n.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function pt(e){let r=parseFloat(e.getAttribute("pathLength")??"");if(r>0)return r;let t=e.tagName.toLowerCase();if(t==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(n+o)}if(t==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function dt(e){return `${e} ${e*2}`}function Xt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function gt(e,r,t){let n=Xt(e),o=Xt(r);return !n||!o?e:`rgb(${Math.round(n[0]+(o[0]-n[0])*t)},${Math.round(n[1]+(o[1]-n[1])*t)},${Math.round(n[2]+(o[2]-n[2])*t)})`}var Jt={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 Hr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ir="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Zt=33;function Dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Nr(e){let r=[];for(let t=0;t<Zt;t++){let n=t/(Zt-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function yt(e){switch(e){case "linear":return "linear";case "ease-in":return Hr;case "ease-out":return Ir;case "ease-in-out":return Dr()?Nr(Je["ease-in-out"]):null;default:return xt(e)?.[1]??null}}var er=Symbol.for("svg-scroll-draw.registry");function tr(){let e=globalThis;return e[er]||(e[er]=new Map)}function Pe(e,r){tr().set(e,r);}function ke(e){tr().delete(e);}function Ze(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",t),()=>r.removeEventListener("change",t);let n=r;return n.addListener?.(t),()=>n.removeListener?.(t)}function qe(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let t=r(e,false),n=Ze(s=>{if(!s)return;n();let i=(t.getProgress?.()??0)>=1;t.destroy(),t=r(i?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(t))o[s]=(...i)=>t[s]?.(...i);return o.destroy=()=>{n(),t.destroy();},o}var at,ht=new Set,bt=new WeakMap,lt=new Map,rr=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function _r(e){let r=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling)r.add(n);return r}function nr(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>r();at??(at=new ResizeObserver(o=>{let s=false;for(let{target:i}of o)bt.get(i)!==rr(i)&&(s=true),bt.set(i,"");s&&ht.forEach(i=>i());})),ht.add(t);let n=_r(e);return [document.body,document.documentElement].forEach(o=>o&&n.add(o)),n.forEach(o=>{bt.has(o)||bt.set(o,rr(o)),lt.set(o,(lt.get(o)??0)+1),at.observe(o);}),()=>{ht.delete(t)&&(n.forEach(o=>{let s=(lt.get(o)??1)-1;if(s)return void lt.set(o,s);lt.delete(o),at?.unobserve(o);}),ht.size||(at?.disconnect(),at=void 0));}}function De(e,r,t,n,o){let s,i=NaN,c,m,g=()=>{s=0,n(),!c&&!s&&(i=t())>0&&i<1&&(s=requestAnimationFrame(g));},w=()=>{!s&&!c&&t()!==i&&(s=requestAnimationFrame(g));},A=z=>{c=z,cancelAnimationFrame(s),s=i=NaN,w();},S=()=>{clearTimeout(m),o(),w();},B=()=>{clearTimeout(m),m=setTimeout(S,150);},Q=nr(r,B),v=z=>{e[z]("scroll",w,{passive:true}),window[z]("resize",B),window[z]("orientationchange",B);};return v("addEventListener"),w(),{hold:A,remeasure:S,off(){A(true),v("removeEventListener"),Q(),clearTimeout(m);}}}var Vr=0;function zr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function or(e,r){let t="";try{t=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return t||(e.getAttribute(r)??"").trim()}var sr=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Wr(e){if(!Xe)return;let r=or(e,"stroke");if(!r||r==="none"){k("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!sr.has(t)&&!sr.has(or(e,"fill"))&&k("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Br(e,r,t){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.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=t==="x"?window.scrollX:window.scrollY,i=e-s,c=r-s,m=t==="x";n.innerHTML=`
2
+ <div style="position:absolute;${m?`left:${i}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${i}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:${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(n),window.addEventListener("scroll",o,{passive:true}),o(),{el:n,destroy(){window.removeEventListener("scroll",o),n.remove();}}}var ir=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,ar=/[MmLlHhVvCcSsQqTtAaZz]/g;function Gr(e,r,t){if(!Xe)return;let n=(e.match(ar)??[]).join("").toUpperCase(),o=(r.match(ar)??[]).join("").toUpperCase(),s=(e.match(ir)??[]).length,i=(r.match(ir)??[]).length;if(n!==o){k(`morphTo: command sequence differs (${n||"\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.`,t);return}s!==i&&k(`morphTo: coordinate count differs (${s} \u2192 ${i}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function jr(e,r,t){let n=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let i=parseFloat(s),c=n[o++]??i;return String(+(i+(c-i)*t).toFixed(4))})}function Lt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(r,(t,n)=>qr(e,t,n))}function qr(e,r,t){let{preset:n,...o}=r,s=n?{...Jt[n],...o}:o,{selector:i="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:g="linear",trigger:w={},stagger:A=0,direction:S="forward",once:B=false,debug:Q=false,axis:v="y",scrollContainer:z,autoReverse:Z=false,delay:P=0,strokeColor:O,strokeWidth:L,fillOpacity:R,waypoints:y,velocityScale:$=false,threshold:W=0,rootMargin:se="0px",repeat:K=0,repeatDelay:_=0,morphTo:I,clip:T,autoplay:X=false,duration:E=1e3,native:C=true,onProgress:ye,onStart:D,onComplete:j,onEnter:ue,onLeave:Ee,onEnterBack:fe,onLeaveBack:ie}=s,M=T===true?"left":typeof T=="string"?T:false,x=Ie(g),re=ae(w.start||"top bottom"),Re=ae(w.end||"bottom top"),J=typeof z=="string"?document.querySelector(z):z??null,$e=Array.isArray(O)?O[0]:null,Se=Array.isArray(O)?O[1]:typeof O=="string"?O:null,he=Array.isArray(L)?L[0]:null,ze=Array.isArray(L)?L[1]:typeof L=="number"?L:null,Fe=Array.isArray(R)?R[0]:null,Te=Array.isArray(R)?R[1]:typeof R=="number"?R:null;function Ce(a){let f=a*100;switch(M){case "right":return `inset(0 0 0 ${100-f}%)`;case "top":return `inset(0 0 ${100-f}% 0)`;case "bottom":return `inset(${100-f}% 0 0 0)`;case "center":return `circle(${a*150}% at 50% 50%)`;default:return `inset(0 ${100-f}% 0 0)`}}let l=M?[]:Array.from(e.querySelectorAll(i)),d=[],ne=[],F=0,V=0,G=A,q=0,Ve=0,oe=false,He=false,be=0,Qe=-1,Ye=[],Ue=-1,me=false,u=0,p=0,b,le=false,we=null;function We(){we?.destroy(),we=null;}let Oe=new Set,Be=NaN,Ge=true,ut=-1,It=performance.now(),Ke=NaN;function ft(){return J?v==="x"?J.scrollLeft:J.scrollTop:v==="x"?window.scrollX:window.scrollY}function Dt(){return J?v==="x"?J.clientWidth:J.clientHeight:v==="x"?window.innerWidth:window.innerHeight}function Nt(){let a=mt(e,J,v);return Le(a,a.scroll,Dt(),re,Re)}function Mr(){let a=V-F,f=l.length-1,h=J??document.documentElement,N=v==="x"?"Width":"Height";if(G=A,A>0&&f>0&&a>0){let pe=h[`scroll${N}`]-h[`client${N}`]-1-F-a/c;pe>=0&&(G=Math.min(A,pe/(f*a)));}let ce=Math.max(0,f)*G*a,Me=a/Math.min(c,1);q=F+Math.min(0,ce,Me,ce+Me),Ve=F+Math.max(0,ce,Me,ce+Me);}function _t(){(({tStart:F,tEnd:V}=Nt())),Mr(),Q&&Xe&&(We(),we=Br(F,V,v));}function Et(a,f=Nt){Pe(e,{type:"draw",getProgress:()=>a.getProgress(),getTrigger:f});let h=a.destroy;return a.destroy=()=>{h.call(a),ke(e);},a}function Vt(a,f){return B&&!Z?Math.max(Qe,x(Ye[a]=Math.max(Ye[a]??0,f))):x(f)}function xr(a,f){if(e.style.setProperty("--scroll-draw-progress",String(a)),M){let h=f==="reverse"?1-a:a;e.style.clipPath=Ce(h);return}l.forEach((h,N)=>St(h,N,a,f));}function St(a,f,h,N){a.style.strokeDashoffset=N==="reverse"?`${d[f]*h}`:`${d[f]*(1-h)}`,m&&(a.style.opacity=N==="reverse"?`${1-h}`:`${h}`),$e&&Se?a.style.stroke=gt($e,Se,h):Se&&(a.style.stroke=Se),he!==null&&ze!==null?a.style.strokeWidth=`${he+(ze-he)*h}`:ze!==null&&(a.style.strokeWidth=`${ze}`),Fe!==null&&Te!==null?a.style.fillOpacity=`${Fe+(Te-Fe)*h}`:Te!==null&&(a.style.fillOpacity=`${Te}`),I&&a.tagName.toLowerCase()==="path"&&ne[f]&&a.setAttribute("d",jr(ne[f],I,h));}function Tt(){if(e.style.setProperty("--scroll-draw-progress","0"),M){e.style.clipPath=Ce(S==="reverse"?1:0);return}l.forEach((a,f)=>{a.style.strokeDasharray=dt(d[f]),a.style.strokeDashoffset=S==="reverse"?"0":`${d[f]}`,m?a.style.opacity=S==="reverse"?"1":"0":a.style.opacity="",$e&&(a.style.stroke=$e),he!==null&&(a.style.strokeWidth=`${he}`),Fe!==null&&(a.style.fillOpacity=`${Fe}`),I&&a.tagName.toLowerCase()==="path"&&ne[f]&&a.setAttribute("d",ne[f]);});}function nt(a,f){let h=a.getAttribute("d"),N=pt(a);if(I&&ne[f]){a.setAttribute("d",I);let ce=pt(a);a.setAttribute("d",ne[f]),N=Math.max(pt(a),ce),a.setAttribute("d",h);}d[f]=N,a.style.strokeDasharray=dt(N);}if(l.forEach((a,f)=>{Wr(a);let h=a.tagName.toLowerCase()==="path";h?ne.push(a.getAttribute("d")??""):ne.push(""),nt(a,f);let N=d[f];I&&(h?Gr(ne[ne.length-1],I,a):k(`morphTo only applies to <path> elements \u2014 ignored on <${a.tagName}>.`,a)),t?(a.style.strokeDashoffset=S==="reverse"?`${N}`:"0",m&&(a.style.opacity="1"),Se&&(a.style.stroke=Se),ze!==null&&(a.style.strokeWidth=`${ze}`),Te!==null&&(a.style.fillOpacity=`${Te}`),I&&a.tagName.toLowerCase()==="path"&&a.setAttribute("d",I)):(a.style.strokeDashoffset=S==="reverse"?"0":`${N}`,m?a.style.opacity=S==="reverse"?"1":"0":a.style.opacity="",$e&&(a.style.stroke=$e),he!==null&&(a.style.strokeWidth=`${he}`),Fe!==null&&(a.style.fillOpacity=`${Fe}`));}),t)return M&&(e.style.clipPath=Ce(1)),j?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};M&&(e.style.clipPath=Ce(S==="reverse"?1:0));let zt=typeof g=="string"?yt(g):null;function Lr(){return !(C===false||X||Q&&Xe||!zr()||!l.length||!zt||M||v!=="y"||J||c!==1||A!==0||B||Z||$!==false||I||y||K||P>0||ye||D||j||ue||Ee||fe||ie||O!=null||L!=null||R!=null||(w.start||"top bottom").trim()!=="top bottom"||(w.end||"bottom top").trim()!=="bottom top")}function Cr(){let a=++Vr,f=`svg-scroll-draw-${a}`,h=`svg-scroll-draw-host-${a}`,N=`--svg-scroll-draw-${a}`,ce=S==="reverse"?"0":"var(--ssd-len)",Me=S==="reverse"?"var(--ssd-len)":"0",pe=`stroke-dashoffset:${ce};`,ee=`stroke-dashoffset:${Me};`;m&&(pe+=`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 ${f}{from{${pe}}to{${ee}}}.${h}{view-timeline-name:${N};view-timeline-axis:block;}.${f}{animation-name:${f};animation-duration:auto;animation-timing-function:${zt};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(te),e.classList.add(h);function ve(H,Y){H.style.setProperty("--ssd-len",String(d[Y])),H.style.strokeDasharray=dt(d[Y]),H.style.strokeDashoffset="",H.style.opacity="",H.style.animationPlayState="",H.classList.add(f);}l.forEach(ve);let de=false,xe=-1;function Ae(){if(xe>=0)return xe;let H=e.getBoundingClientRect(),{tStart:Y,tEnd:ge}=Le({top:H.top,height:H.height},ft(),Dt(),re,Re);return x(U(ft(),Y,ge,c))}return {destroy(){e.classList.remove(h),l.forEach(H=>{H.classList.remove(f),H.style.removeProperty("--ssd-len"),H.style.animationPlayState="";}),te.remove();},replay(){de=false,xe=-1,l.forEach(ve);},pause(){de=true,l.forEach(H=>{H.style.animationPlayState="paused";});},resume(){de&&(de=false,l.forEach(H=>{H.style.animationPlayState="running";}));},seek(H){let Y=Math.min(1,Math.max(0,H));xe=Y,de=true,l.forEach((ge,je)=>{ge.classList.remove(f),ge.style.strokeDashoffset=S==="reverse"?`${d[je]*Y}`:`${d[je]*(1-Y)}`,m&&(ge.style.opacity=S==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return Ae()},refresh(){l.forEach((H,Y)=>{nt(H,Y),H.style.setProperty("--ssd-len",String(d[Y]));});}}}if(Lr())return Et(Cr());function Or(){let a=Math.max(1,E),f=M?a:a*(1+Math.max(0,l.length-1)*A),h=0,N=0,ce=false;function Me(xe){let Ae=true,H=Math.min(1,Math.max(0,xe/f));if(M){let Y=Math.min(1,Math.max(0,xe/a)),ge=x(Y);u=ge,e.style.setProperty("--scroll-draw-progress",String(ge)),e.style.clipPath=Ce(S==="reverse"?1-ge:ge),ye?.(ge),Y<1&&(Ae=false);}else {l.forEach((ge,je)=>{let Pr=je*A*a,qt=Math.min(1,Math.max(0,(xe-Pr)/a));St(ge,je,x(qt),S),qt<1&&(Ae=false);});let Y=x(H);u=Y,ye?.(Y),e.style.setProperty("--scroll-draw-progress",String(Y));}if(y){let Y=x(H);for(let ge in y){let je=parseFloat(ge);Y>=je&&!Oe.has(je)&&(Oe.add(je),y[ge]?.());}}return Ae}function pe(xe){if(me)return;let Ae=xe-h;He||(He=true,D?.());let H=Me(Ae);if(H&&!oe){oe=true,Me(f),j?.(),p<(K==="infinite"?1/0:K??0)&&(p++,b=setTimeout(()=>{h=performance.now(),He=false,oe=false,Oe.clear(),Tt(),be=requestAnimationFrame(pe);},_));return}H||(be=requestAnimationFrame(pe));}function ee(){cancelAnimationFrame(be),clearTimeout(b),h=performance.now(),N=0,me=false,He=false,oe=false,p=0,ce=true,u=0,Oe.clear(),Tt(),be=requestAnimationFrame(pe);}let te=new IntersectionObserver(xe=>{xe.forEach(Ae=>{Ae.isIntersecting&&!(B&&oe)?ee():!Ae.isIntersecting&&!B&&!oe&&(cancelAnimationFrame(be),clearTimeout(b),ce=false);});},{root:J??null,threshold:W,rootMargin:se}),ve;function de(){clearTimeout(ve),ve=setTimeout(()=>l.forEach(nt),150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),P>0?setTimeout(()=>te.observe(e),P):te.observe(e),{destroy(){cancelAnimationFrame(be),clearTimeout(b),te.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(ve);},replay(){p=0,ee();},pause(){me||!ce||(me=true,N=performance.now()-h,cancelAnimationFrame(be));},resume(){me&&(me=false,ce=true,h=performance.now()-N,be=requestAnimationFrame(pe));},seek(xe){let Ae=Math.min(1,Math.max(0,xe));u=Ae,me=true,N=Ae*f,h=performance.now()-N,cancelAnimationFrame(be),Me(N);},getProgress(){return u},refresh(){clearTimeout(ve),l.forEach(nt);}}}if(X)return Et(Or());_t();let Wt=()=>U(ft(),q,Ve,1);function Bt(){oe=true,j?.(),p<(K==="infinite"?1/0:K)&&(p++,b=setTimeout(()=>{le=true;},_));}function Gt(){Qe=-1,Ye=[],He=false,oe=false,le=false,Oe.clear(),Tt(),Ge=true;}function Ar(){let a=performance.now(),f=ft();if(le&&Wt()%1&&Gt(),!Ge&&$===false&&f===Be)return;Ge=false,Be=f;let h=c;if($!==false){let ee=a-It,te=ee>0?Math.abs(f-(ut<0?f:ut))/ee:0;h=c*Math.max(.2,1+te*(typeof $=="number"?$:1)*.04);}ut=f,It=a;let N=Z?Ue===-1||f>=Ue?"forward":"reverse":S;Ue=f;let ce=V-F,Me=true,pe=ce===0?0:(f-F)/ce;if(isNaN(Ke)||(Ke<=0&&pe>0&&ue?.(),Ke<1&&pe>=1&&Ee?.(),Ke>=1&&pe<1&&fe?.(),Ke>0&&pe<=0&&ie?.()),Ke=pe,M){let ee=Vt(0,U(f,F,V,h));u=ee,e.style.setProperty("--scroll-draw-progress",String(ee));let te=N==="reverse"?1-ee:ee;e.style.clipPath=Ce(te),ye?.(ee),!He&&U(f,F,V,h)>0&&(He=true,D?.()),ee>=1&&!oe?Bt():ee<1&&!B&&(oe=false);return}if(l.forEach((ee,te)=>{let ve=te*G*ce,de=Vt(te,U(f,F+ve,V+ve,h));St(ee,te,de,N),te===0&&(u=de,ye?.(de),e.style.setProperty("--scroll-draw-progress",String(de))),de<1&&(Me=false);}),y){let ee=x(U(f,F,V,h));for(let te in y){let ve=parseFloat(te);ee>=ve&&!Oe.has(ve)&&(Oe.add(ve),y[te]?.());}}!He&&U(f,F,V,h)>0&&(He=true,D?.()),Me&&!oe?Bt():!Me&&!B&&(oe=false);}let ot=De(J??window,[e],Wt,Ar,()=>{let a=d.join();l.forEach(nt),_t(),Ge=true,d.join()!==a&&st();}),Mt=P>0;function st(){ot.hold(me||Mt);}let jt;return Mt&&(jt=setTimeout(()=>{Mt=false,st();},P)),st(),Et({destroy(){clearTimeout(b),clearTimeout(jt),ot.off(),We();},replay(){Gt(),Ue=-1,ut=-1,p=0,me=false,u=0,clearTimeout(b),st();},pause(){me=true,ot.hold(true);},resume(){me&&(me=false,Ge=true,st());},seek(a){let f=Math.min(1,Math.max(0,a));u=f,Qe=f,Ye=[],me=true,ot.hold(true),xr(f,S),Ge=true;},getProgress(){return u},refresh:ot.remeasure},()=>({tStart:F,tEnd:V}))}var lr=new WeakMap,Yr=0;function ct(e){return JSON.stringify(e,(r,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let n=lr.get(t);return n===void 0&&lr.set(t,n=++Yr),`el#${n}`}return t})}function cr(e,r){let t={...e};for(let n of Object.keys(t))typeof t[n]=="function"&&(t[n]=(...o)=>r()[n]?.(...o));return t}function Ur(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function ur(e){let r=[],t=/([\w]+)\(([^)]*)\)/g,n;for(;(n=t.exec(e))!==null;){let o=[],s=[],i=n[2].trim();if(i)for(let c of i.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:n[1],nums:o,units:s});}return r}function Qr(e,r,t){let n=ur(e),o=ur(r);return n.length===0||n.length!==o.length?t<1?e:r:n.map((s,i)=>{let c=o[i];return s.fn!==c.fn||s.nums.length!==c.nums.length?t<1?`${s.fn}(${s.nums.map((m,g)=>`${m}${s.units[g]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,g)=>`${m}${c.units[g]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,g)=>`${m+(c.nums[g]-m)*t}${s.units[g]}`).join(", ")})`}).join(" ")}function fr(e,r,t){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*t);let n=String(e),o=String(r);if(Ur(n))return gt(n,o,t);if(n.includes("("))return Qr(n,o,t);let s=n.match(/^([-+]?[\d.]+)(.*)$/),i=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&i){let c=parseFloat(s[1]),m=parseFloat(i[1]);return `${c+(m-c)*t}${s[2]||i[2]}`}return t<1?n:o}function Kr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var Xr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Jr=0,mr="--scroll-draw-progress";function Zr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var dr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,r){return typeof window>"u"?dr:r.respectReducedMotion===false?pr(e,r,false):qe(r,(t,n)=>pr(e,t,n))}function pr(e,r,t){let{props:n,trigger:o={},easing:s="ease-out",speed:i=1,once:c=false,axis:m="y",scrollContainer:g,native:w=true,velocityScale:A=false,triggerElement:S,onProgress:B,onComplete:Q,onEnter:v,onLeave:z,onEnterBack:Z,onLeaveBack:P}=r,O=Ie(s,"ease-out"),L=ae(o.start||"top bottom"),R=ae(o.end||"bottom top"),y=S??e,$=typeof g=="string"?document.querySelector(g):g??null,W=Object.entries(n).map(([l,d])=>({prop:Kr(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function se(){let l=window.getComputedStyle(e);for(let d of W)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function K(){for(let l of W)e.style.setProperty(l.prop,String(l.to));}let _=new Map;for(let l of [...W.map(d=>d.prop),mr])_.set(l,e.style.getPropertyValue(l));function I(){for(let[l,d]of _)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if(t)return K(),Q?.(),{...dr,destroy:I,getProgress:()=>1};se();let T=()=>$?m==="x"?$.scrollLeft:$.scrollTop:m==="x"?window.scrollX:window.scrollY,X=()=>$?m==="x"?$.clientWidth:$.clientHeight:m==="x"?window.innerWidth:window.innerHeight,E=typeof s=="string"?yt(s):null;function C(){if(!w||!Zr()||!E||m!=="y"||$||y!==e||c||i!==1||B||Q||v||z||Z||P||A!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of W)if(!Xr.has(l.prop))return false;return true}function ye(){let l=`ssd-a-${++Jr}`,d=W.map(q=>`${q.prop}:${q.from}`).join(";"),ne=W.map(q=>`${q.prop}:${q.to}`).join(";"),F=document.createElement("style");F.setAttribute("data-ssd-animate",""),F.textContent=`@keyframes ${l}{from{${d}}to{${ne}}}.${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(F),e.classList.add(l);let V=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},T(),X(),L,R)};Pe(e,{type:"animate",getProgress:()=>G.getProgress(),getTrigger:V});let G={refresh(){},destroy(){e.classList.remove(l),F.remove(),e.style.animationPlayState="",I(),ke(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 oe of W)e.style.setProperty(oe.prop,fr(oe.from,oe.to,Ve));},getProgress(){let{tStart:q,tEnd:Ve}=V();return O(U(T(),q,Ve,i))}};return G}if(C())return ye();let D=0,j=0,ue=false,Ee=-1,fe=0,ie=0,M=false,x=NaN,re=-1,Re=0,J=y===e?W:[],$e=false;function Se(){let l=e.style,d=J.map(G=>l.getPropertyValue(G.prop)),ne=l.transition;J.length&&(l.transition="none"),J.forEach(G=>l.setProperty(G.prop,_.get(G.prop)??""));let F=mt(y,$,m);J.forEach((G,q)=>l.setProperty(G.prop,d[q])),J.length&&(e.offsetWidth,l.transition=ne);let V=Le(F,F.scroll,X(),L,R);$e&&Math.abs(V.tStart-D)<1&&Math.abs(V.tEnd-j)<1||($e=true,D=V.tStart,j=V.tEnd);}function he(l){e.style.setProperty(mr,String(l));for(let d of W)e.style.setProperty(d.prop,fr(d.from,d.to,l));B?.(l);}function ze(l){if(isNaN(x)){x=l;return}x<=0&&l>0&&v?.(),x<1&&l>=1&&z?.(),x>=1&&l<1&&Z?.(),x>0&&l<=0&&P?.(),x=l;}function Fe(){if(ue)return;let l=performance.now(),d=T(),ne=i;if(A!==false){let q=l-Re,Ve=q>0?Math.abs(d-(re<0?d:re))/q:0;ne=i*Math.max(.2,1+Ve*(typeof A=="number"?A:1)*.04);}re=d,Re=l;let F=j===D?0:(d-D)/(j-D);ze(F);let V=U(d,D,j,ne),G=c?Math.max(Ee,O(fe=Math.max(fe,V))):O(V);ie=G,he(G),G>=1&&!M?(M=true,Q?.()):G<1&&!c&&(M=false);}let Te=De($??window,[y],()=>U(T(),D,j,Math.min(i,1)),Fe,Se);Se(),j===D&&k("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),fe=U(T(),D,j,i),ie=O(fe),he(ie),Pe(e,{type:"animate",getProgress:()=>ie,getTrigger:()=>({tStart:D,tEnd:j})});function Ce(){ue=true,Te.hold(true);}return {destroy(){ue=true,Te.off(),I(),ke(e);},replay(){Ee=-1,fe=0,M=false,ie=0,ue=false,he(0),Te.hold(false);},pause:Ce,resume(){ue&&(ue=false,Te.hold(false));},seek(l){let d=Math.min(1,Math.max(0,l));ie=d,Ee=d,fe=0,Ce(),he(d);},getProgress(){return ie},refresh:Te.remeasure}}var Ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function At(e,r){if(typeof window>"u")return Ot;let t=typeof e=="string"?document.querySelector(e):e;return t?qe(r,(n,o)=>en(t,n,o)):(k("scrollCounter: element not found:",e),Ot)}function en(e,r,t){let{from:n=0,to:o,format:s,easing:i="ease-out",trigger:c={},once:m=true,decimals:g,onComplete:w}=r,A=g!==void 0?E=>E.toFixed(g):s??(E=>String(Math.round(E))),S=Ie(i,"ease-out"),B=ae(c.start||"top 80%"),Q=ae(c.end||"top 20%");if(t)return e.textContent=A(o),w?.(),{...Ot,getProgress:()=>1};let v=0,z=0,Z=false,P=-1,O=0,L=0,R=false,y=()=>window.scrollY,$=()=>window.innerHeight;function W(){let E=e.getBoundingClientRect(),C=Le({top:E.top,height:E.height},y(),$(),B,Q);Z&&Math.abs(C.tStart-v)<1&&Math.abs(C.tEnd-z)<1||(Z=true,v=C.tStart,z=C.tEnd);}let se=e.style.getPropertyValue("--scroll-draw-progress");function K(E){e.textContent=A(n+(o-n)*E),e.style.setProperty("--scroll-draw-progress",String(E));}let _=()=>U(y(),v,z,1);function I(){let E=_(),C=m?Math.max(P,S(O=Math.max(O,E))):S(E);L=C,K(C),C>=1&&!R?(R=true,w?.()):C<1&&!m&&(R=false);}W();{O=U(y(),v,z,1);let E=S(O);L=E,K(E);}let T=De(window,[e],_,I,W);Pe(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",se),ke(e);},replay(){P=-1,O=0,R=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,O=0,T.hold(true),K(C);},getProgress(){return L}}}var gr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,r={}){if(typeof window>"u")return gr;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return k("scrollVideo: <video> element not found:",e),gr;let n=t,{trigger:o={},easing:s="linear",once:i=false,axis:c="y",preload:m="auto",triggerElement:g,onReady:w,onComplete:A,onProgress:S}=r,B=g??n,Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches,v=Ie(s),z=ae(o.start||"top top"),Z=ae(o.end||"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=m);let P=r.from??0,O=r.to,L=0,R=0,y=false,$=-1,W=0,se=0,K=false,_=false,I=()=>c==="x"?window.scrollX:window.scrollY,T=()=>c==="x"?window.innerWidth:window.innerHeight;function X(){let M=B.getBoundingClientRect(),x=c==="x"?M.left:M.top,re=c==="x"?M.width:M.height,Re=Le({top:x,height:re},I(),T(),z,Z);L=Re.tStart,R=Re.tEnd,_&&R===L&&k("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let E=NaN;function C(M){if(!_)return;let x=O??n.duration??0,re=P+(x-P)*M;re!==E&&(E=re,n.currentTime=re),n.style.setProperty("--scroll-draw-progress",String(M)),S?.(M);}let ye=()=>U(I(),L,R,1);function D(){if(!_||Q)return;let M=ye(),x=i?Math.max($,v(W=Math.max(W,M))):v(M);se=x,C(x),x>=1&&!K?(K=true,A?.()):x<1&&!i&&(K=false);}let j=De(window,[B],ye,D,X),ue=()=>j.hold(y||!_||Q);ue();function Ee(){if(_=true,O===void 0&&(O=n.duration),Q){C(1),w?.();return}X(),w?.(),y?C(se):ue();}n.readyState>=1?Ee():n.addEventListener("loadedmetadata",Ee,{once:true}),_||X();let fe=Q?()=>{}:Ze(M=>{M&&(fe(),Q=true,j.hold(true),C(1));});Pe(n,{type:"video",getProgress:()=>se,getTrigger:()=>({tStart:L,tEnd:R})});function ie(){y&&(y=false,ue());}return {destroy(){j.off(),n.removeEventListener("loadedmetadata",Ee),fe(),ke(n);},replay(){$=-1,W=0,K=false,se=0,E=NaN,C(0),ie();},pause(){y=true,j.hold(true);},resume:ie,seek(M){let x=Math.min(1,Math.max(0,M));se=x,$=x,W=0,y=true,j.hold(true),E=NaN,C(x);},getProgress(){return se}}}var tn=1e4;function kt(e){let{frames:r,count:t}=e;if(typeof r!="function")return ct(e);let n=Number.isFinite(t)?Math.min(Math.max(Math.floor(t),0),tn):0,o;try{o=Array.from({length:n},(s,i)=>r(i));}catch{o=["throws"];}return ct({...e,frames:o})}function yr(e,r="<ScrollFrames>"){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")||k(`${r}: the canvas has no aria-label. Say what the frames show, or set aria-hidden="true" if they are decoration.`,e);}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rn(e){let r=e>1?[0,e-1]:[0],t=[[0,e-1]];for(let n=0;n<t.length;n++){let[o,s]=t[n];if(s-o<2)continue;let i=o+s>>1;r.push(i),t.push([o,i],[i,s]);}return r}function hr(e,r){if(typeof window>"u")return wt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="canvas")return k("scrollFrames: <canvas> element not found:",e),wt;let n=t,{frames:o,trigger:s={},easing:i="linear",once:c=false,axis:m="y",fit:g="cover",triggerElement:w,onReady:A,onLoad:S,onComplete:B,onProgress:Q}=r||{},v=Array.isArray(o)?o:null,z=r?.count,Z=Math.floor(v?Math.min(z??v.length,v.length):z??NaN);if(!(v||typeof o=="function")||!Number.isFinite(Z)||Z<1)return k("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",n),wt;let P=r.concurrency??6;(!Number.isFinite(P)||P<1)&&(k("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",r.concurrency),P=6),P=Math.floor(P);let O=n.getContext("2d");if(!O)return k("scrollFrames: the canvas has no 2D context.",n),wt;let L=Z-1,R=w??n,y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,$=Ie(i),W=u=>{let p=$(u);return p===p?p:0},se=ae(s.start||"top top"),K=ae(s.end||"bottom top"),_=0,I=0,T=false,X=-1,E=0,C=0,ye=false,D=false,j=false,ue=false,Ee=0,fe=-1,ie=new Array(Z),M=new Uint8Array(Z),x=new Set,re=y?[L]:rn(Z),Re=0,J=0,$e=false,Se=(u,...p)=>{if(u)try{u(...p);}catch(b){typeof reportError=="function"?reportError(b):setTimeout(()=>{throw b});}},he=false,ze=u=>{let p;try{p=v?v[u]:o(u);}catch(b){p=b;}return typeof p=="string"&&p?p:(he||(he=true,k(`scrollFrames: no URL for frame ${u}; it is skipped for its nearest neighbour.`,p)),null)},Fe=()=>m==="x"?window.scrollX:window.scrollY,Te=()=>m==="x"?window.innerWidth:window.innerHeight;function Ce(){!$e&&J===re.length&&($e=true,Se(S));}function l(){for(;!D&&x.size<P&&Re<re.length;){let u=re[Re++];M[u]||d(u);}}function d(u){M[u]=1;let p=ze(u);if(p===null){J++,queueMicrotask(()=>{D||Ce();});return}let b=new Image,le=false,we=We=>{le||D||(le=true,b.onload=b.onerror=null,x.delete(b),We?ie[u]=b:k("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",p),J++,l(),V(),Ce());};x.add(b),b.decoding="async",b.onerror=()=>we(false),b.src=p,typeof b.decode=="function"?b.decode().then(()=>we(true),()=>{b.complete?we(b.naturalWidth>0):b.onload=()=>we(true);}):b.onload=()=>we(true);}function ne(u){for(let p=0;p<=L;p++){if(ie[u-p])return u-p;if(ie[u+p])return u+p}return -1}function F(){let u=n.clientWidth,p=n.clientHeight;if(!u||!p)return;let b=Math.min(window.devicePixelRatio||1,2),le=Math.round(u*b),we=Math.round(p*b);if(Math.abs(n.width-le)<=1&&Math.abs(n.height-we)<=1)return;n.width=le,n.height=we,fe=-1;let We=n.clientWidth,Oe=n.clientHeight;if(We!==u||Oe!==p){let Be=n.style;We!==u&&Oe!==p?(Be.width=`${u}px`,Be.height=`${p}px`):Be.aspectRatio=`${u} / ${p}`;}}function V(){let u=ne(Ee);if(u<0||u===fe)return;let p=ie[u],b=n.width,le=n.height,we=p.naturalWidth||b,We=p.naturalHeight||le,Oe=(g==="contain"?Math.min:Math.max)(b/we,le/We),Be=we*Oe,Ge=We*Oe;O.clearRect(0,0,b,le),O.drawImage(p,(b-Be)/2,(le-Ge)/2,Be,Ge),fe=u,j||(j=true,Se(A));}function G(u){Ee=Math.min(L,Math.max(0,Math.round(u*L))),n.style.setProperty("--scroll-draw-progress",String(u)),V(),Se(Q,u,Ee);}function q(){let u=R.getBoundingClientRect(),p=m==="x"?u.left:u.top,b=m==="x"?u.width:u.height,le=Le({top:p,height:b},Fe(),Te(),se,K);_=le.tStart,I=le.tEnd,I===_&&b>0&&!y&&!ue&&(ue=true,k("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n));}let Ve=()=>U(Fe(),_,I,1);function oe(){if(y)return;let u=Ve(),p=c?Math.max(X,W(E=Math.max(E,u))):W(u);C=p,G(p),p>=1&&!ye?(ye=true,Se(B)):p<1&&!c&&(ye=false);}function He(){C=1,G(1);}F(),y||q();let be=De(window,[R],Ve,oe,()=>{F(),y||q(),V();}),Qe=()=>be.hold(T||y);Qe(),y&&He(),l();let Ye=typeof ResizeObserver=="function"?new ResizeObserver(()=>{F(),V();}):null;Ye?.observe(n);let Ue=y?()=>{}:Ze(u=>{u&&(Ue(),y=true,be.hold(true),re=re.slice(0,Re),M[L]||re.push(L),Ce(),He(),l());});Pe(n,{type:"frames",getProgress:()=>C,getTrigger:()=>({tStart:_,tEnd:I})});function me(){D||!T||(T=false,Qe());}return {destroy(){if(!D){D=true,be.off(),Ye?.disconnect(),Ue();for(let u of x)u.onload=u.onerror=null,u.src="";x.clear(),ke(n);}},replay(){D||(X=-1,E=0,ye=false,C=0,G(0),me());},pause(){D||(T=true,be.hold(true));},resume:me,seek(u){if(D)return;let p=Math.min(1,Math.max(0,u===u?u:0));C=p,X=p,E=0,T=true,be.hold(true),G(p);},getProgress(){return C}}}function Rt(e,{triggerElement:r,...t},n){let o=r;return typeof r=="string"&&typeof document<"u"&&(o=document.querySelector(r),o||k(`scrollFrames: triggerElement "${r}" matches nothing; measuring the canvas.`)),hr(e,{...t,frames:n.frames,triggerElement:o??void 0})}function br(e,r){let t=document.createElement("span");t.textContent=r,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function vt(e=""){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=e,r}function vr(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(t=>{let n=e.appendChild(vt(t)),o=/^\s+$/.test(t);return o?n.style.whiteSpace="pre":n.style.display="inline-block",o?null:n}).filter(t=>t!==null)}function nn(e){let r=e.textContent??"";e.textContent="";let t=[],n=null;for(let o of r){let s=vt(o),i=o===" ";i?s.style.whiteSpace="pre":(s.style.display="inline-block",t.push(s)),i||o>"\u0DFF"?n=null:n||(n=e.appendChild(vt()),n.style.cssText="display:inline-block;white-space:nowrap"),(n??e).appendChild(s);}return t}function wr(e){let r=vr(e),t=new Map;for(let s of r){let i=s.offsetTop;t.has(i)||t.set(i,[]),t.get(i).push(s);}let n=[],o=Array.from(t.keys()).sort((s,i)=>s-i);for(let s of o){let i=t.get(s),c=vt();c.style.display="inline-block",i.forEach((m,g)=>{let w=m.nextElementSibling;c.appendChild(m),g<i.length-1&&w&&w.style.whiteSpace==="pre"&&c.appendChild(w);}),n.push(c);}return e.textContent="",n.forEach((s,i)=>{e.appendChild(s),i<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function on(e,r,t,n){if(t<=1||n===0)return e;n=Math.min(n,1/t);let o=(t-1)*n,s=r*n,i=s+(1-o);return i<=s?e>=s?1:0:it((e-s)/(i-s),0,1)}function sn(e,r){let t=[];if(r?.y!==void 0&&t.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&t.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&t.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let n=r.scale+(1-r.scale)*e;t.push(`scale(${n})`);}return t.join(" ")}var $t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ft(e,r={}){if(typeof window>"u")return $t;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return k("scrollText: element not found:",e),$t;let n=t;return qe(r,(o,s)=>an(n,o,s))}function an(e,r,t){let{split:n="words",stagger:o=.04,easing:s="ease-out",from:i={opacity:0,y:24},trigger:c={},once:m=true,onComplete:g}=r,w=Ie(s,"ease-out"),A=ae(c.start||"top 85%"),S=ae(c.end||"top 40%"),B=e.innerHTML,Q=e.textContent??"",v;n==="chars"?v=nn(e):n==="lines"?v=wr(e):v=vr(e),br(e,Q);let z=v.length;function Z(T,X){i?.opacity!==void 0&&(T.style.opacity=String(i.opacity+(1-i.opacity)*X));let E=sn(X,i);E&&(T.style.transform=E);}function P(T){e.style.setProperty("--scroll-draw-progress",String(T)),v.forEach((X,E)=>{let C=w(on(T,E,z,o));Z(X,C);});}if(t)return P(1),g?.(),{...$t,destroy:()=>{e.innerHTML=B;},getProgress:()=>1};P(0);let O=0,L=0,R=-1,y=0,$=false;function W(){({tStart:O,tEnd:L}=Le(e.getBoundingClientRect(),window.scrollY,window.innerHeight,A,S));}let se=()=>U(window.scrollY,O,L,1);function K(){let T=m?R=Math.max(R,se()):se();y=T,P(T),T>=1&&!$?($=true,g?.()):T<1&&!m&&($=false);}W();let _=De(window,[e],se,K,()=>{n==="lines"&&(e.innerHTML=B,v=wr(e),br(e,Q),P(y)),W();});Pe(e,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:O,tEnd:L})});let I=()=>_.hold(false);return {destroy(){_.off(),e.innerHTML=B,ke(e);},replay(){R=-1,$=false,y=0,P(0),I();},pause:()=>_.hold(true),resume:I,seek(T){_.hold(true),P(y=R=it(T,0,1));},getProgress(){return y}}}var rt=e=>typeof e=="function"?e():vue.unref(e);function _e(e,r,t,n=ct){let o=null,s=r(),i=()=>{o?.destroy(),o=e.value?t(e.value,cr(s,()=>s),s):null;};vue.onMounted(i),vue.watch(()=>n(s=r()),i),vue.onUnmounted(()=>{o?.destroy(),o=null;});}function Yo(e={}){let r=vue.ref(null);return _e(r,()=>rt(e),Lt),r}var Er={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},fn=[null,Boolean,[Boolean,String],[Boolean,Number]],Ht=e=>({type:e,default:void 0}),Uo=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(Er).map(([e,r])=>[e,r?Ht(fn[r]):null])),setup(e,{slots:r}){let t=vue.ref(null);return _e(t,()=>{let n={};for(let o in Er){let s=e[o];s!=null&&(n[o]=s);}return n},Lt),()=>vue.h("div",{ref:t},r.default?.())}});function Qo(e){let r=vue.ref(null);return _e(r,()=>rt(e),Ct),r}var Ko=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let t=vue.ref(null);return _e(t,()=>e.options,Ct),()=>vue.h("div",{ref:t},r.default?.())}});function Xo(e){let r=vue.ref(null);return _e(r,()=>rt(e),At),r}var Jo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:Ht(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=vue.ref(null);return _e(r,()=>{let t={to:e.to};return e.from!=null&&(t.from=e.from),e.format!=null&&(t.format=e.format),e.easing!=null&&(t.easing=e.easing),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.decimals!=null&&(t.decimals=e.decimals),e.onComplete!=null&&(t.onComplete=e.onComplete),t},At),()=>vue.h("span",{ref:r})}});function Zo(e={}){let r=vue.ref(null);return _e(r,()=>rt(e),Pt),r}var es=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 r=vue.ref(null);return _e(r,()=>e.options??{},Pt),()=>vue.h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function ts(e){let r=vue.ref(null);return _e(r,()=>rt(e),Rt,kt),r}var Sr={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},rs=vue.defineComponent({name:"ScrollFrames",props:Object.fromEntries(Object.entries(Sr).map(([e,r])=>[e,r?Ht(Boolean):e==="frames"?{required:true}:null])),setup(e){let r=vue.ref(null);return _e(r,()=>{let t={};for(let n in Sr){let o=e[n];o!=null&&(t[n]=o);}return t},Rt,kt),vue.onMounted(()=>yr(r.value)),()=>vue.h("canvas",{ref:r,role:"img"})}});function ns(e={}){let r=vue.ref(null);return _e(r,()=>rt(e),Ft),r}var os=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let t=vue.ref(null);return _e(t,()=>e.options??{},Ft),()=>vue.h(e.tag,{ref:t},r.default?.())}});exports.ScrollAnimate=Ko;exports.ScrollCounter=Jo;exports.ScrollDraw=Uo;exports.ScrollFrames=rs;exports.ScrollText=os;exports.ScrollVideo=es;exports.useScrollAnimate=Qo;exports.useScrollCounter=Xo;exports.useScrollDraw=Yo;exports.useScrollFrames=ts;exports.useScrollText=ns;exports.useScrollVideo=Zo;
@@ -1,9 +1,11 @@
1
1
  import * as vue from 'vue';
2
2
  import { Ref } from 'vue';
3
- import { a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
4
- import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
5
- import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
3
+ import { F as FramesInput } from '../wrapper-BOHrDnBO.mjs';
4
+ import { a as ScrollDrawOptions } from '../types-iITMwrru.mjs';
5
+ import { S as ScrollAnimateOptions } from '../engine-Bi2x8-X-.mjs';
6
+ import { S as ScrollCounterOptions } from '../index-BMMZ8aW7.mjs';
6
7
  import { ScrollVideoOptions } from '../video/index.mjs';
8
+ import { ScrollFramesOptions } from '../frames/index.mjs';
7
9
  import { ScrollTextOptions } from '../text/index.mjs';
8
10
 
9
11
  /** Options as a plain object, a ref, or a getter — the getter or ref keeps them live. */
@@ -186,6 +188,37 @@ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
186
188
  muted: boolean;
187
189
  playsInline: boolean;
188
190
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
191
+ /**
192
+ * Composable — returns a ref to bind to a <canvas>, which scrubs an image
193
+ * sequence with the scroll. Options as in useScrollDraw: a getter or a ref
194
+ * keeps them live.
195
+ *
196
+ * @example
197
+ * <script setup>
198
+ * import { useScrollFrames } from 'svg-scroll-draw/vue';
199
+ * const film = useScrollFrames({ frames: (i) => `/film/${i + 1}.jpg`, count: 120 });
200
+ * </script>
201
+ * <canvas :ref="film" role="img" aria-label="The headphones turning" />
202
+ */
203
+ declare function useScrollFrames(options: MaybeRefOrGetter<FramesInput>): Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
204
+ /**
205
+ * Component — renders a <canvas role="img"> that scrubs an image sequence with
206
+ * the scroll. Every option is a prop; `class`, `style` and `aria-label` fall
207
+ * through to the canvas. Pass a `style` that changes as an object: Vue rewrites
208
+ * a changed style string whole, over the inline size scrollFrames holds on a
209
+ * canvas sized by its attributes.
210
+ *
211
+ * @example
212
+ * <section id="track" style="height: 400vh">
213
+ * <div style="position: sticky; top: 0; height: 100vh">
214
+ * <ScrollFrames :frames="(i) => `/film/${i + 1}.jpg`" :count="120" trigger-element="#track"
215
+ * :trigger="{ start: 'top top', end: 'bottom bottom' }" aria-label="The headphones turning" />
216
+ * </div>
217
+ * </section>
218
+ */
219
+ declare const ScrollFrames: vue.DefineComponent<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
220
+ [key: string]: any;
221
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
189
222
  /**
190
223
  * Composable — returns a ref to bind to any text element; splits and animates on scroll.
191
224
  *
@@ -227,4 +260,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
227
260
  tag: string;
228
261
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
229
262
 
230
- export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
263
+ export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollFrames, ScrollFramesOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollFrames, useScrollText, useScrollVideo };
@@ -1,9 +1,11 @@
1
1
  import * as vue from 'vue';
2
2
  import { Ref } from 'vue';
3
- import { a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
4
- import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
5
- import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
3
+ import { F as FramesInput } from '../wrapper-Cm7JTIVl.js';
4
+ import { a as ScrollDrawOptions } from '../types-iITMwrru.js';
5
+ import { S as ScrollAnimateOptions } from '../engine-DAlvk6i0.js';
6
+ import { S as ScrollCounterOptions } from '../index-MdQ4ti_z.js';
6
7
  import { ScrollVideoOptions } from '../video/index.js';
8
+ import { ScrollFramesOptions } from '../frames/index.js';
7
9
  import { ScrollTextOptions } from '../text/index.js';
8
10
 
9
11
  /** Options as a plain object, a ref, or a getter — the getter or ref keeps them live. */
@@ -186,6 +188,37 @@ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
186
188
  muted: boolean;
187
189
  playsInline: boolean;
188
190
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
191
+ /**
192
+ * Composable — returns a ref to bind to a <canvas>, which scrubs an image
193
+ * sequence with the scroll. Options as in useScrollDraw: a getter or a ref
194
+ * keeps them live.
195
+ *
196
+ * @example
197
+ * <script setup>
198
+ * import { useScrollFrames } from 'svg-scroll-draw/vue';
199
+ * const film = useScrollFrames({ frames: (i) => `/film/${i + 1}.jpg`, count: 120 });
200
+ * </script>
201
+ * <canvas :ref="film" role="img" aria-label="The headphones turning" />
202
+ */
203
+ declare function useScrollFrames(options: MaybeRefOrGetter<FramesInput>): Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
204
+ /**
205
+ * Component — renders a <canvas role="img"> that scrubs an image sequence with
206
+ * the scroll. Every option is a prop; `class`, `style` and `aria-label` fall
207
+ * through to the canvas. Pass a `style` that changes as an object: Vue rewrites
208
+ * a changed style string whole, over the inline size scrollFrames holds on a
209
+ * canvas sized by its attributes.
210
+ *
211
+ * @example
212
+ * <section id="track" style="height: 400vh">
213
+ * <div style="position: sticky; top: 0; height: 100vh">
214
+ * <ScrollFrames :frames="(i) => `/film/${i + 1}.jpg`" :count="120" trigger-element="#track"
215
+ * :trigger="{ start: 'top top', end: 'bottom bottom' }" aria-label="The headphones turning" />
216
+ * </div>
217
+ * </section>
218
+ */
219
+ declare const ScrollFrames: vue.DefineComponent<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
220
+ [key: string]: any;
221
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<Record<keyof ScrollFramesOptions, null>>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
189
222
  /**
190
223
  * Composable — returns a ref to bind to any text element; splits and animates on scroll.
191
224
  *
@@ -227,4 +260,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
227
260
  tag: string;
228
261
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
229
262
 
230
- export { type MaybeRefOrGetter, ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
263
+ 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-5SKWSPQT.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
+ 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-5SJE7725.mjs';import'../chunk-NJV6S5LD.mjs';import'../chunk-KN2YB54Z.mjs';import'../chunk-HJTHOZK5.mjs';import'../chunk-GBFWTY5L.mjs';import'../chunk-UF3MO5XQ.mjs';import'../chunk-Z72TVDHY.mjs';import'../chunk-HAGTU5EX.mjs';import'../chunk-XLXVGQ3P.mjs';import'../chunk-7LDSB4FT.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-YOOPMYT6.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';