svg-scroll-draw 2.18.1 → 2.19.1

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 (97) hide show
  1. package/README.md +11 -11
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +3 -3
  4. package/dist/angular/index.d.ts +3 -3
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +3 -3
  7. package/dist/astro/index.d.mts +6 -5
  8. package/dist/astro/index.d.ts +6 -5
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +161 -37
  11. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  12. package/dist/{chunk-DIMNQPW5.mjs → chunk-6SSA5V7J.mjs} +1 -1
  13. package/dist/chunk-7SBTYJGH.mjs +1 -0
  14. package/dist/chunk-A4JCC3QQ.mjs +1 -0
  15. package/dist/chunk-BFX2CSQ3.mjs +1 -0
  16. package/dist/chunk-I45LCJUP.mjs +1 -0
  17. package/dist/chunk-KHQ7OGQK.mjs +1 -0
  18. package/dist/chunk-LQBXJRFY.mjs +3 -0
  19. package/dist/chunk-MTEGM4RR.mjs +1 -0
  20. package/dist/chunk-VVFGB4RT.mjs +1 -0
  21. package/dist/{engine-6AXEX8CL.d.ts → engine-DQyBzZDl.d.ts} +1 -1
  22. package/dist/{engine-Ci08nM91.d.mts → engine-P8u6OK4m.d.mts} +1 -1
  23. package/dist/group/index.cjs +3 -3
  24. package/dist/group/index.d.mts +3 -3
  25. package/dist/group/index.d.ts +3 -3
  26. package/dist/group/index.mjs +1 -1
  27. package/dist/horizontal/index.cjs +1 -1
  28. package/dist/horizontal/index.d.mts +1 -1
  29. package/dist/horizontal/index.d.ts +1 -1
  30. package/dist/horizontal/index.mjs +1 -1
  31. package/dist/{index-CGR7pSOR.d.mts → index-CMqK0GCT.d.mts} +2 -2
  32. package/dist/{index-BDGQEK6X.d.mts → index-CdaBYn3A.d.mts} +1 -1
  33. package/dist/{index-DxjUOIbK.d.ts → index-D3o4vT3e.d.ts} +1 -1
  34. package/dist/{index-BVuNgQSd.d.ts → index-DPqPEnO-.d.ts} +2 -2
  35. package/dist/index.cjs +4 -4
  36. package/dist/index.d.mts +6 -6
  37. package/dist/index.d.ts +6 -6
  38. package/dist/index.mjs +1 -1
  39. package/dist/nuxt/index.cjs +3 -3
  40. package/dist/nuxt/index.d.mts +3 -3
  41. package/dist/nuxt/index.d.ts +3 -3
  42. package/dist/nuxt/index.mjs +1 -1
  43. package/dist/pin/index.cjs +1 -1
  44. package/dist/pin/index.mjs +1 -1
  45. package/dist/progress/index.cjs +1 -1
  46. package/dist/progress/index.d.mts +1 -1
  47. package/dist/progress/index.d.ts +1 -1
  48. package/dist/progress/index.mjs +1 -1
  49. package/dist/react/index.cjs +3 -3
  50. package/dist/react/index.d.mts +16 -13
  51. package/dist/react/index.d.ts +16 -13
  52. package/dist/react/index.mjs +1 -1
  53. package/dist/reveal/index.cjs +1 -1
  54. package/dist/reveal/index.d.mts +1 -1
  55. package/dist/reveal/index.d.ts +1 -1
  56. package/dist/reveal/index.mjs +1 -1
  57. package/dist/{scroll-draw-CNlq4Z_L.d.mts → scroll-draw-Dej-GIRP.d.mts} +1 -1
  58. package/dist/{scroll-draw-BlJfbTDv.d.ts → scroll-draw-DsBMkwrX.d.ts} +1 -1
  59. package/dist/snap/index.d.mts +1 -1
  60. package/dist/snap/index.d.ts +1 -1
  61. package/dist/solid/index.cjs +3 -3
  62. package/dist/solid/index.d.mts +3 -3
  63. package/dist/solid/index.d.ts +3 -3
  64. package/dist/solid/index.mjs +1 -1
  65. package/dist/svelte/index.cjs +2 -2
  66. package/dist/svelte/index.d.mts +3 -3
  67. package/dist/svelte/index.d.ts +3 -3
  68. package/dist/svelte/index.mjs +1 -1
  69. package/dist/text/index.cjs +1 -1
  70. package/dist/text/index.d.mts +1 -1
  71. package/dist/text/index.d.ts +1 -1
  72. package/dist/text/index.mjs +1 -1
  73. package/dist/timeline/index.cjs +11 -11
  74. package/dist/timeline/index.d.mts +1 -1
  75. package/dist/timeline/index.d.ts +1 -1
  76. package/dist/timeline/index.mjs +4 -4
  77. package/dist/{types-DHU1zNEw.d.mts → types-MswK0erX.d.mts} +12 -1
  78. package/dist/{types-DHU1zNEw.d.ts → types-MswK0erX.d.ts} +12 -1
  79. package/dist/video/index.cjs +1 -1
  80. package/dist/video/index.d.mts +1 -1
  81. package/dist/video/index.d.ts +1 -1
  82. package/dist/video/index.mjs +1 -1
  83. package/dist/vue/index.cjs +3 -3
  84. package/dist/vue/index.d.mts +5 -83
  85. package/dist/vue/index.d.ts +5 -83
  86. package/dist/vue/index.mjs +1 -1
  87. package/dist/web-component/index.cjs +3 -3
  88. package/dist/web-component/index.mjs +1 -1
  89. package/package.json +2 -2
  90. package/dist/chunk-4MH5SQTH.mjs +0 -1
  91. package/dist/chunk-CTVQDBD3.mjs +0 -1
  92. package/dist/chunk-KBFWDHF4.mjs +0 -1
  93. package/dist/chunk-LINFV2GK.mjs +0 -3
  94. package/dist/chunk-PEFR3ZB7.mjs +0 -1
  95. package/dist/chunk-QJ4H2HW3.mjs +0 -1
  96. package/dist/chunk-SNCRC6BA.mjs +0 -1
  97. package/dist/chunk-TIRZOSQ4.mjs +0 -1
@@ -1 +1 @@
1
- import {a as a$2}from'../chunk-YWKPTYSG.mjs';import {a,b as b$1,c}from'../chunk-PEFR3ZB7.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1,b as b$2}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var R={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function B(c$1,D={}){if(typeof window>"u")return R;let s=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!s)return b("scrollProgress: element not found:",c$1),R;let i=s,{variable:x="--scroll-progress",easedVariable:m="--scroll-progress-eased",trigger:F={},easing:f="linear",speed:A=1,axis:l="y",scrollContainer:w,onProgress:H}=D,y=typeof f=="function"?f:d[f]??d.linear,M=a(F.start??"top bottom"),V=a(F.end??"bottom top"),t=typeof w=="string"?document.querySelector(w):w??null,u=0,g=0,n=0,d$1=false,o=false,a$3=0,I=()=>t?l==="x"?t.scrollLeft:t.scrollTop:l==="x"?window.scrollX:window.scrollY,k=()=>t?l==="x"?t.clientWidth:t.clientHeight:l==="x"?window.innerWidth:window.innerHeight;function b$3(){let e=a$2(i,t,l),r=c(e,e.scroll,k(),M,V);u=r.tStart,g=r.tEnd;}function v(e,r){i.style.setProperty(x,String(e)),m!=null&&i.style.setProperty(m,String(r)),H?.(e,r);}function E(){if(!d$1||o)return;let e=b$1(I(),u,g,A),r=y(e);a$3=e,v(e,r),n=requestAnimationFrame(E);}b$3();{let e=b$1(I(),u,g,A),r=y(e);a$3=e,v(e,r);}let C=new IntersectionObserver(e=>{e.forEach(r=>{d$1=r.isIntersecting,d$1&&!o?n=requestAnimationFrame(E):cancelAnimationFrame(n);});},{root:t??null}),P;function p(){clearTimeout(P),P=setTimeout(b$3,150);}return window.addEventListener("resize",p),window.addEventListener("orientationchange",p),C.observe(s),a$1(s,{type:"animate",getProgress:()=>a$3,getTrigger:()=>({tStart:u,tEnd:g})}),{destroy(){cancelAnimationFrame(n),C.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p),clearTimeout(P),i.style.removeProperty(x),m!=null&&i.style.removeProperty(m),b$2(s);},replay(){b$3();},pause(){o=true,cancelAnimationFrame(n);},resume(){o&&(o=false,d$1&&(n=requestAnimationFrame(E)));},seek(e){let r=Math.min(1,Math.max(0,e)),W=y(r);a$3=r,o=true,cancelAnimationFrame(n),v(r,W);},getProgress(){return a$3}}}export{B as scrollProgress};
1
+ import {a as a$2}from'../chunk-YWKPTYSG.mjs';import {a,b as b$1,d as d$1,c}from'../chunk-A4JCC3QQ.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1,b as b$2}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var D={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Q(m,H={}){if(typeof window>"u")return D;let i=typeof m=="string"?document.querySelector(m):m;if(!i)return b("scrollProgress: element not found:",m),D;let o=i,{variable:x="--scroll-progress",easedVariable:u="--scroll-progress-eased",trigger:F={},easing:f="linear",speed:A=1,axis:l="y",scrollContainer:w,onProgress:M}=H,y=typeof f=="function"?f:d[f]??d.linear,V=a(F.start??"top bottom"),k=a(F.end??"bottom top"),t=typeof w=="string"?document.querySelector(w):w??null,g=0,d$2=0,n=0,p=false,s=false,a$3=0,I=()=>t?l==="x"?t.scrollLeft:t.scrollTop:l==="x"?window.scrollX:window.scrollY,W=()=>t?l==="x"?t.clientWidth:t.clientHeight:l==="x"?window.innerWidth:window.innerHeight;function b$3(){let e=a$2(o,t,l),r=c(e,e.scroll,W(),V,k);g=r.tStart,d$2=r.tEnd;}function v(e,r){o.style.setProperty(x,String(e)),u!=null&&o.style.setProperty(u,String(r)),M?.(e,r);}function E(){if(!p||s)return;let e=b$1(I(),g,d$2,A),r=y(e);a$3=e,v(e,r),n=requestAnimationFrame(E);}b$3();{let e=b$1(I(),g,d$2,A),r=y(e);a$3=e,v(e,r);}let L=new IntersectionObserver(e=>{e.forEach(r=>{p=r.isIntersecting,p&&!s?n=requestAnimationFrame(E):cancelAnimationFrame(n);});},{root:t??null}),P;function c$1(){clearTimeout(P),P=setTimeout(b$3,150);}window.addEventListener("resize",c$1),window.addEventListener("orientationchange",c$1);let _=d$1([o],c$1);return L.observe(i),a$1(i,{type:"animate",getProgress:()=>a$3,getTrigger:()=>({tStart:g,tEnd:d$2})}),{destroy(){cancelAnimationFrame(n),L.disconnect(),window.removeEventListener("resize",c$1),window.removeEventListener("orientationchange",c$1),_(),clearTimeout(P),o.style.removeProperty(x),u!=null&&o.style.removeProperty(u),b$2(i);},replay(){b$3();},pause(){s=true,cancelAnimationFrame(n);},resume(){s&&(s=false,p&&(n=requestAnimationFrame(E)));},seek(e){let r=Math.min(1,Math.max(0,e)),G=y(r);a$3=r,s=true,cancelAnimationFrame(n),v(r,G);},getProgress(){return a$3}}}export{Q as scrollProgress};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- 'use strict';var vr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var vr__default=/*#__PURE__*/_interopDefault(vr);function Kt({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),o=0,l=[];for(let p=0;p<r;p++){let S=Math.pow(i,p);l.push(S),o+=S;}let u=[0],m=0;for(let p=0;p<r;p++)m+=l[p]/o,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let S=0;S<r;S++)if(p<=u[S+1]){let k=(p-u[S])/(u[S+1]-u[S]);if(S===0)return k*(2-k);let C=1-Math.pow(t,S);return C+(1-C)*(2*k-1)*(2*k-1)}return 1}}function Qt({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return o=>o<=0?0:o>=1?1:r*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/t)+1}var K={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Kt(),elastic:Qt()};function bt(e,n,r){return Math.min(r,Math.max(n,e))}function se(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function wt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function vt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function Q(e,n,r,t){return r===n?0:bt((e-n)/(r-n)*t,0,1)}function ve(e,n,r,t,i){let o=wt(e.top,e.height,n,t.element)-vt(t.viewport,r),l=wt(e.top,e.height,n,i.element)-vt(i.viewport,r);return {tStart:o,tEnd:l}}function et(e,n,r){let t=e.getBoundingClientRect(),i=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function _e(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Et(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function qe(e,n,r){let t=Et(e),i=Et(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[2]-t[2])*r)})`}var St={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 je=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ye(e,...n){je&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Zt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function tr(e){let n=[];for(let r=0;r<Tt;r++){let t=r/(Tt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function tt(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return Zt;case "ease-in-out":return er()?tr(K["ease-in-out"]):null;default:return null}}var xt=Symbol.for("svg-scroll-draw.registry");function At(){let e=globalThis;return e[xt]||(e[xt]=new Map)}function Le(e,n){At().set(e,n);}function Ce(e){At().delete(e);}var rr=0;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Mt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Pt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function or(e){if(!je)return;let n=Mt(e,"stroke");if(!n||n==="none"){ye("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Pt.has(r)&&!Pt.has(Mt(e,"fill"))&&ye("Element has a fill \u2014 it may obscure the stroke animation.",e);}function sr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let o=r==="x"?window.scrollX:window.scrollY,l=e-o,u=n-o,m=r==="x";t.innerHTML=`
3
- <div style="position:absolute;${m?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
4
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var Lt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ct=/[MmLlHhVvCcSsQqTtAaZz]/g;function ir(e,n,r){if(!je)return;let t=(e.match(Ct)??[]).join("").toUpperCase(),i=(n.match(Ct)??[]).join("").toUpperCase(),o=(e.match(Lt)??[]).length,l=(n.match(Lt)??[]).length;if(t!==i){ye(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}o!==l&&ye(`morphTo: coordinate count differs (${o} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function lt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let l=parseFloat(o),u=t[i++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function $t(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...St[r],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:S={},stagger:k=0,direction:C="forward",once:te=false,debug:he=false,axis:H="y",scrollContainer:j,autoReverse:q=false,delay:W=0,strokeColor:P,strokeWidth:F,fillOpacity:L,waypoints:b,velocityScale:$=false,threshold:A=0,rootMargin:w="0px",repeat:y=0,repeatDelay:z=0,morphTo:T,clip:U,autoplay:ie=false,duration:le=1e3,native:ce=true,onProgress:d,onStart:M,onComplete:g,onEnter:I,onLeave:ue,onEnterBack:ae,onLeaveBack:R}=i,N=U===true?"left":typeof U=="string"?U:false,re=typeof p=="function"?p:K[p]??K.linear,Ee=se(S.start??"top bottom"),ze=se(S.end??"bottom top"),Se=typeof j=="string"?document.querySelector(j):j??null,Te=Array.isArray(P)?P[0]:null,me=Array.isArray(P)?P[1]:typeof P=="string"?P:null,fe=Array.isArray(F)?F[0]:null,J=Array.isArray(F)?F[1]:typeof F=="number"?F:null,ge=Array.isArray(L)?L[0]:null,ne=Array.isArray(L)?L[1]:typeof L=="number"?L:null;function $e(s){let c=s*100;switch(N){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let B=N?[]:Array.from(e.querySelectorAll(l)),O=[],a=[],f=0,be=0,V=false,G=false,X=0,Me=false,xe=-1,oe=[],Fe=-1,Z=false,ke=0,Ie=0,Ne,nt=null;function ut(){nt?.destroy(),nt=null;}let De=new Set,mt=NaN,He=true,Xe=-1,ft=performance.now(),Ve=NaN;function ot(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function pt(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function dt(){let s=et(e,Se,H);return ve(s,s.scroll,pt(),Ee,ze)}function gt(){(({tStart:f,tEnd:be}=dt())),he&&je&&(ut(),nt=sr(f,be,H));}function st(s,c=dt){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let E=s.destroy;return s.destroy=()=>{E.call(s),Ce(e);},s}function jt(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),N){let E=c==="reverse"?1-s:s;e.style.clipPath=$e(E);return}B.forEach((E,pe)=>{E.style.strokeDashoffset=c==="reverse"?`${O[pe]*s}`:`${O[pe]*(1-s)}`,m&&(E.style.opacity=c==="reverse"?`${1-s}`:`${s}`),Te&&me?E.style.stroke=qe(Te,me,s):me&&(E.style.stroke=me),fe!==null&&J!==null?E.style.strokeWidth=`${fe+(J-fe)*s}`:J!==null&&(E.style.strokeWidth=`${J}`),ge!==null&&ne!==null?E.style.fillOpacity=`${ge+(ne-ge)*s}`:ne!==null&&(E.style.fillOpacity=`${ne}`),T&&E.tagName.toLowerCase()==="path"&&a[pe]&&E.setAttribute("d",lt(a[pe],T,s));});}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),N){e.style.clipPath=$e(0);return}B.forEach((s,c)=>{s.style.strokeDasharray=`${O[c]}`,s.style.strokeDashoffset=C==="reverse"?"0":`${O[c]}`,m?s.style.opacity=C==="reverse"?"1":"0":s.style.opacity="",Te&&(s.style.stroke=Te),fe!==null&&(s.style.strokeWidth=`${fe}`),ge!==null&&(s.style.fillOpacity=`${ge}`),T&&s.tagName.toLowerCase()==="path"&&a[c]&&s.setAttribute("d",a[c]);});}if(B.forEach(s=>{or(s);let c=_e(s);O.push(c);let E=s.tagName.toLowerCase()==="path";E?a.push(s.getAttribute("d")??""):a.push(""),T&&(E?ir(a[a.length-1],T,s):ye(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=C==="reverse"?`${c}`:"0",m&&(s.style.opacity="1"),me&&(s.style.stroke=me),J!==null&&(s.style.strokeWidth=`${J}`),ne!==null&&(s.style.fillOpacity=`${ne}`),T&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",T)):(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=C==="reverse"?"0":`${c}`,m?s.style.opacity=C==="reverse"?"1":"0":s.style.opacity="",Te&&(s.style.stroke=Te),fe!==null&&(s.style.strokeWidth=`${fe}`),ge!==null&&(s.style.fillOpacity=`${ge}`));}),N){if(o)return e.style.clipPath=$e(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=$e(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let yt=typeof p=="string"?tt(p):null;function Ut(){return !(ce===false||!nr()||!B.length||!yt||N||H!=="y"||Se||u!==1||k!==0||te||q||$!==false||T||b||y||W>0||d||M||g||I||ue||ae||R||P!=null||F!=null||L!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Xt(){let s=++rr,c=`svg-scroll-draw-${s}`,E=`svg-scroll-draw-host-${s}`,pe=`--svg-scroll-draw-${s}`,Oe=C==="reverse"?"0":"var(--ssd-len)",Re=C==="reverse"?"var(--ssd-len)":"0",Pe=`stroke-dashoffset:${Oe};`,x=`stroke-dashoffset:${Re};`;m&&(Pe+=`opacity:${C==="reverse"?1:0};`,x+=`opacity:${C==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${c}{from{${Pe}}to{${x}}}.${E}{view-timeline-name:${pe};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${yt};animation-fill-mode:both;animation-timeline:${pe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(E);function de(h,ee){h.style.setProperty("--ssd-len",String(O[ee])),h.style.strokeDasharray=`${O[ee]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(c);}B.forEach(de);let v=false,_=-1;function Y(){if(_>=0)return _;let h=e.getBoundingClientRect(),{tStart:ee,tEnd:Ae}=ve({top:h.top,height:h.height},ot(),pt(),Ee,ze);return re(Q(ot(),ee,Ae,u))}return {destroy(){e.classList.remove(E),B.forEach(h=>{h.classList.remove(c),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),D.remove();},replay(){v=false,_=-1,B.forEach(de);},pause(){v=true,B.forEach(h=>{h.style.animationPlayState="paused";});},resume(){v&&(v=false,B.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let ee=Math.min(1,Math.max(0,h));_=ee,v=true,B.forEach((Ae,we)=>{Ae.classList.remove(c),Ae.style.strokeDashoffset=C==="reverse"?`${O[we]*ee}`:`${O[we]*(1-ee)}`,m&&(Ae.style.opacity=C==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return Y()},refresh(){B.forEach((h,ee)=>{O[ee]=_e(h),h.style.setProperty("--ssd-len",String(O[ee])),h.style.strokeDasharray=`${O[ee]}`;});}}}if(Ut())return st(Xt());function Yt(){let s=Math.max(1,le),c=0,E=0,pe=false;function Oe(v){let _=true;if(N){let Y=Math.min(1,Math.max(0,v/s)),h=re(Y);ke=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=$e(C==="reverse"?1-h:h),d?.(h),Y<1&&(_=false);}else B.forEach((Y,h)=>{let ee=h*k*s,Ae=Math.min(1,Math.max(0,(v-ee)/s)),we=re(Ae);Y.style.strokeDashoffset=C==="reverse"?`${O[h]*we}`:`${O[h]*(1-we)}`,m&&(Y.style.opacity=C==="reverse"?`${1-we}`:`${we}`),Te&&me?Y.style.stroke=qe(Te,me,we):me&&(Y.style.stroke=me),fe!==null&&J!==null?Y.style.strokeWidth=`${fe+(J-fe)*we}`:J!==null&&(Y.style.strokeWidth=`${J}`),ge!==null&&ne!==null?Y.style.fillOpacity=`${ge+(ne-ge)*we}`:ne!==null&&(Y.style.fillOpacity=`${ne}`),T&&Y.tagName.toLowerCase()==="path"&&a[h]&&Y.setAttribute("d",lt(a[h],T,we)),h===0&&(ke=we,d?.(we),e.style.setProperty("--scroll-draw-progress",String(we))),Ae<1&&(_=false);});if(b){let Y=Math.min(1,Math.max(0,v/s)),h=re(Y);for(let ee in b){let Ae=parseFloat(ee);h>=Ae&&!De.has(Ae)&&(De.add(Ae),b[ee]?.());}}return _}function Re(v){if(Z)return;let _=v-c;G||(G=true,M?.());let Y=Oe(_);if(Y&&!V){V=true,Oe(s*(1+Math.max(0,B.length-1)*k)),g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{c=performance.now(),G=false,V=false,De.clear(),Ye(),X=requestAnimationFrame(Re);},z));return}Y||(X=requestAnimationFrame(Re));}function Pe(){cancelAnimationFrame(X),clearTimeout(Ne),c=performance.now(),E=0,Z=false,G=false,V=false,Ie=0,pe=true,ke=0,De.clear(),Ye(),X=requestAnimationFrame(Re);}let x=new IntersectionObserver(v=>{v.forEach(_=>{_.isIntersecting&&!(te&&V)?Pe():!_.isIntersecting&&!te&&!V&&(cancelAnimationFrame(X),clearTimeout(Ne),pe=false);});},{root:Se??null,threshold:A,rootMargin:w}),D;function de(){clearTimeout(D),D=setTimeout(()=>{B.forEach((v,_)=>{O[_]=_e(v),v.style.strokeDasharray=`${O[_]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),W>0?setTimeout(()=>x.observe(e),W):x.observe(e),{destroy(){cancelAnimationFrame(X),clearTimeout(Ne),x.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){Ie=0,Pe();},pause(){Z||!pe||(Z=true,E=performance.now()-c,cancelAnimationFrame(X));},resume(){Z&&(Z=false,pe=true,c=performance.now()-E,X=requestAnimationFrame(Re));},seek(v){let _=Math.min(1,Math.max(0,v));ke=_,Z=true,E=_*s,c=performance.now()-E,cancelAnimationFrame(X),Oe(E);},getProgress(){return ke},refresh(){clearTimeout(D),B.forEach((v,_)=>{O[_]=_e(v),v.style.strokeDasharray=`${O[_]}`;});}}}if(ie)return st(Yt());gt();function Ke(){if(!Me||Z)return;let s=performance.now(),c=ot();if(!He&&$===false&&c===mt){X=requestAnimationFrame(Ke);return}He=false,mt=c;let E=u;if($!==false){let x=s-ft,D=x>0?Math.abs(c-(Xe<0?c:Xe))/x:0;E=u*Math.max(.2,1+D*(typeof $=="number"?$:1)*.04);}Xe=c,ft=s;let pe=q?Fe===-1||c>=Fe?"forward":"reverse":C;Fe=c;let Oe=be-f,Re=true,Pe=Oe===0?0:(c-f)/Oe;if(isNaN(Ve)||(Ve<=0&&Pe>0?I?.():Ve>0&&Pe<=0&&R?.(),Ve<1&&Pe>=1?ue?.():Ve>=1&&Pe<1&&ae?.()),Ve=Pe,N){let x=re(Q(c,f,be,E));te&&!q&&(xe=Math.max(xe,x),x=xe),ke=x,e.style.setProperty("--scroll-draw-progress",String(x));let D=pe==="reverse"?1-x:x;e.style.clipPath=$e(D),d?.(x),!G&&Q(c,f,be,E)>0&&(G=true,M?.()),x>=1&&!V?(V=true,g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{xe=-1,G=false,V=false,e.style.clipPath=$e(0);},z))):x<1&&!te&&(V=false),X=requestAnimationFrame(Ke);return}if(B.forEach((x,D)=>{let de=D*k*Oe,v=re(Q(c,f+de,be+de,E));te&&!q&&(v=oe[D]=Math.max(oe[D]??xe,v)),ke=v,x.style.strokeDashoffset=pe==="reverse"?`${O[D]*v}`:`${O[D]*(1-v)}`,m&&(x.style.opacity=pe==="reverse"?`${1-v}`:`${v}`),Te&&me?x.style.stroke=qe(Te,me,v):me&&(x.style.stroke=me),fe!==null&&J!==null?x.style.strokeWidth=`${fe+(J-fe)*v}`:J!==null&&(x.style.strokeWidth=`${J}`),ge!==null&&ne!==null?x.style.fillOpacity=`${ge+(ne-ge)*v}`:ne!==null&&(x.style.fillOpacity=`${ne}`),T&&x.tagName.toLowerCase()==="path"&&a[D]&&x.setAttribute("d",lt(a[D],T,v)),D===0&&(d?.(v),e.style.setProperty("--scroll-draw-progress",String(v))),v<1&&(Re=false);}),b){let x=re(Q(c,f,be,E));for(let D in b){let de=parseFloat(D);x>=de&&!De.has(de)&&(De.add(de),b[D]?.());}}!G&&Q(c,f,be,E)>0&&(G=true,M?.()),Re&&!V?(V=true,g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{xe=-1,oe=[],G=false,V=false,De.clear(),Ye(),He=true;},z))):!Re&&!te&&(V=false),X=requestAnimationFrame(Ke);}let it=false;function Qe(){it||(it=true,X=requestAnimationFrame(function(){Ke();}));}function Je(){it=false,cancelAnimationFrame(X);}let at=new IntersectionObserver(s=>{s.forEach(c=>{Me=c.isIntersecting,Me&&!Z?(He=true,Qe()):Je();});},{root:Se??null,threshold:A,rootMargin:w});function ht(){B.forEach((s,c)=>{O[c]=_e(s),s.style.strokeDasharray=`${O[c]}`;}),gt(),He=true;}let Ze;function Be(){clearTimeout(Ze),Ze=setTimeout(ht,150);}window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be);let Ge;return typeof ResizeObserver<"u"&&(Ge=new ResizeObserver(()=>Be()),Ge.observe(document.body),Ge.observe(document.documentElement),Ge.observe(e)),W>0?setTimeout(()=>at.observe(e),W):at.observe(e),st({destroy(){cancelAnimationFrame(X),clearTimeout(Ne),Je(),at.disconnect(),Ge?.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(Ze),ut();},replay(){xe=-1,oe=[],Fe=-1,Xe=-1,G=false,V=false,Ie=0,Z=false,ke=0,De.clear(),clearTimeout(Ne),Ye(),He=true,Me&&Qe();},pause(){Z=true,Je();},resume(){Z&&(Z=false,He=true,Me&&Qe());},seek(s){let c=Math.min(1,Math.max(0,s));ke=c,xe=c,oe=[],Z=true,Je(),jt(c,C),He=true;},getProgress(){return ke},refresh(){clearTimeout(Ze),ht(),Me&&!Z&&Qe();}},()=>({tStart:f,tEnd:be}))}var kt=new WeakMap,ar=0;function Rt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=kt.get(r);return t===void 0&&kt.set(r,t=++ar),`el#${t}`}return r})}function It(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function lr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ot(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],o=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:o});}return n}function cr(e,n,r){let t=Ot(e),i=Ot(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((o,l)=>{let u=i[l];return o.fn!==u.fn||o.nums.length!==u.nums.length?r<1?`${o.fn}(${o.nums.map((m,p)=>`${m}${o.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,p)=>`${m+(u.nums[p]-m)*r}${o.units[p]}`).join(", ")})`}).join(" ")}function Ft(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(lr(t))return qe(t,i,r);if(t.includes("("))return cr(t,i,r);let o=t.match(/^([-+]?[\d.]+)(.*)$/),l=i.match(/^([-+]?[\d.]+)(.*)$/);if(o&&l){let u=parseFloat(o[1]),m=parseFloat(l[1]);return `${u+(m-u)*r}${o[2]||l[2]}`}return r<1?t:i}function ur(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),fr=0,Nt="--scroll-draw-progress";function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Dt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:o="ease-out",speed:l=1,once:u=false,axis:m="y",scrollContainer:p,native:S=true,velocityScale:k=false,respectReducedMotion:C=true,triggerElement:te,onProgress:he,onComplete:H,onEnter:j,onLeave:q,onEnterBack:W,onLeaveBack:P}=n,F=C&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof o=="function"?o:K[o]??K["ease-out"],b=se(i.start??"top bottom"),$=se(i.end??"bottom top"),A=te??e,w=typeof p=="string"?document.querySelector(p):p??null,y=Object.entries(t).map(([a,f])=>({prop:ur(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function z(){let a=window.getComputedStyle(e);for(let f of y)f.from===""&&(f.from=a.getPropertyValue(f.prop).trim()||"0");}function T(){for(let a of y)e.style.setProperty(a.prop,String(a.to));}let U=new Map;for(let a of [...y.map(f=>f.prop),Nt])U.set(a,e.style.getPropertyValue(a));function ie(){for(let[a,f]of U)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(F)return T(),H?.(),{...r,destroy:ie,getProgress:()=>1};z();let le=typeof o=="string"?tt(o):null;function ce(){if(!S||!pr()||!le||m!=="y"||w||A!==e||u||l!==1||he||H||j||q||W||P||k!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let a of y)if(!mr.has(a.prop))return false;return true}function d(){let a=`ssd-a-${++fr}`,f=y.map(oe=>`${oe.prop}:${oe.from}`).join(";"),be=y.map(oe=>`${oe.prop}:${oe.to}`).join(";"),V=document.createElement("style");V.setAttribute("data-ssd-animate",""),V.textContent=`@keyframes ${a}{from{${f}}to{${be}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${le};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(V),e.classList.add(a);let G=()=>m==="x"?window.scrollX:window.scrollY,X=()=>m==="x"?window.innerWidth:window.innerHeight,Me=()=>{let oe=e.getBoundingClientRect();return ve({top:oe.top,height:oe.height},G(),X(),b,$)};Le(e,{type:"animate",getProgress:()=>xe.getProgress(),getTrigger:Me});let xe={destroy(){e.classList.remove(a),V.remove(),e.style.animationPlayState="",ie(),Ce(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(oe){let Fe=Math.min(1,Math.max(0,oe));e.classList.remove(a);for(let Z of y)e.style.setProperty(Z.prop,Ft(Z.from,Z.to,Fe));},getProgress(){let{tStart:oe,tEnd:Fe}=Me();return L(Q(G(),oe,Fe,l))}};return xe}if(ce())return d();let M=0,g=0,I=0,ue=false,ae=false,R=-1,N=0,re=false,Ee=NaN,ze=-1,Se=0,Te=()=>w?m==="x"?w.scrollLeft:w.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>w?m==="x"?w.clientWidth:w.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function fe(){let a=et(A,w,m),f=ve(a,a.scroll,me(),b,$);M=f.tStart,g=f.tEnd;}function J(a){e.style.setProperty(Nt,String(a));for(let f of y)e.style.setProperty(f.prop,Ft(f.from,f.to,a));he?.(a);}function ge(a){if(isNaN(Ee)){Ee=a;return}Ee<=0&&a>0?j?.():Ee>0&&a<=0&&P?.(),Ee<1&&a>=1?q?.():Ee>=1&&a<1&&W?.(),Ee=a;}function ne(){if(!ue||ae)return;let a=performance.now(),f=Te(),be=l;if(k!==false){let X=a-Se,Me=X>0?Math.abs(f-(ze<0?f:ze))/X:0;be=l*Math.max(.2,1+Me*(typeof k=="number"?k:1)*.04);}ze=f,Se=a;let V=g===M?0:(f-M)/(g-M);ge(V);let G=L(Q(f,M,g,be));u&&(R=Math.max(R,G),G=R),N=G,J(G),G>=1&&!re?(re=true,H?.()):G<1&&!u&&(re=false),I=requestAnimationFrame(ne);}fe(),g===M&&ye("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let a=L(Q(Te(),M,g,l));u&&a>0&&(R=a),N=a,J(a);}let $e=new IntersectionObserver(a=>{a.forEach(f=>{ue=f.isIntersecting,ue&&!ae?I=requestAnimationFrame(ne):cancelAnimationFrame(I);});},{root:w??null}),B;function O(){clearTimeout(B),B=setTimeout(fe,150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),$e.observe(e),Le(e,{type:"animate",getProgress:()=>N,getTrigger:()=>({tStart:M,tEnd:g})}),{destroy(){cancelAnimationFrame(I),$e.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(B),ie(),Ce(e);},replay(){R=-1,re=false,N=0,ae=false,J(0);},pause(){ae=true,cancelAnimationFrame(I);},resume(){ae&&(ae=false,ue&&(I=requestAnimationFrame(ne)));},seek(a){let f=Math.min(1,Math.max(0,a));N=f,R=f,ae=true,cancelAnimationFrame(I),J(f);},getProgress(){return N}}}var ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ht(e,n){if(typeof window>"u")return ct;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ye("scrollCounter: element not found:",e),ct;let t=r,{from:i=0,to:o,format:l,easing:u="ease-out",trigger:m={},once:p=true,decimals:S,onComplete:k}=n,C=S!==void 0?d=>d.toFixed(S):l??(d=>String(Math.round(d))),te=typeof u=="function"?u:K[u]??K["ease-out"],he=se(m.start??"top 80%"),H=se(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=C(o),k?.(),ct;let q=0,W=0,P=0,F=false,L=false,b=-1,$=0,A=false,w=()=>window.scrollY,y=()=>window.innerHeight;function z(){let d=t.getBoundingClientRect(),M=ve({top:d.top,height:d.height},w(),y(),he,H);q=M.tStart,W=M.tEnd;}function T(d){t.textContent=C(i+(o-i)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function U(){if(!F||L)return;let d=te(Q(w(),q,W,1));p&&(b=Math.max(b,d),d=b),$=d,T(d),d>=1&&!A?(A=true,k?.()):d<1&&!p&&(A=false),P=requestAnimationFrame(U);}z();{let d=te(Q(w(),q,W,1));p&&d>0&&(b=d),$=d,T(d);}let ie=new IntersectionObserver(d=>{d.forEach(M=>{F=M.isIntersecting,F&&!L?P=requestAnimationFrame(U):cancelAnimationFrame(P);});}),le;function ce(){clearTimeout(le),le=setTimeout(z,150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),ie.observe(t),Le(t,{type:"counter",getProgress:()=>$,getTrigger:()=>({tStart:q,tEnd:W})}),{destroy(){cancelAnimationFrame(P),ie.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(le),Ce(t);},replay(){b=-1,A=false,$=0,L=false,T(0);},pause(){L=true,cancelAnimationFrame(P);},resume(){L&&(L=false,F&&(P=requestAnimationFrame(U)));},seek(d){let M=Math.min(1,Math.max(0,d));$=M,b=M,L=true,cancelAnimationFrame(P),T(M);},getProgress(){return $}}}var zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Vt(e,n={}){if(typeof window>"u")return zt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ye("scrollVideo: <video> element not found:",e),zt;let t=r,{trigger:i={},easing:o="linear",once:l=false,axis:u="y",preload:m="auto",triggerElement:p,onReady:S,onComplete:k,onProgress:C}=n,te=p??t,he=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof o=="function"?o:K[o]??K.linear,j=se(i.start??"top top"),q=se(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let W=n.from??0,P=n.to,F=0,L=0,b=0,$=false,A=false,w=-1,y=0,z=false,T=false,U=()=>u==="x"?window.scrollX:window.scrollY,ie=()=>u==="x"?window.innerWidth:window.innerHeight;function le(){let R=te.getBoundingClientRect(),N=u==="x"?R.left:R.top,re=u==="x"?R.width:R.height,Ee=ve({top:N,height:re},U(),ie(),j,q);F=Ee.tStart,L=Ee.tEnd,T&&L===F&&ye("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function d(R){if(!T)return;let N=P??t.duration??0,re=W+(N-W)*R;re!==ce&&(ce=re,t.currentTime=re),t.style.setProperty("--scroll-draw-progress",String(R)),C?.(R);}function M(){if(!$||A||!T||he)return;let R=H(Q(U(),F,L,1));l&&(w=Math.max(w,R),R=w),y=R,d(R),R>=1&&!z?(z=true,k?.()):R<1&&!l&&(z=false),b=requestAnimationFrame(M);}function g(){if(T=true,P===void 0&&(P=t.duration),he){d(1),S?.();return}le(),S?.(),$&&!A&&(b=requestAnimationFrame(M));}t.readyState>=1?g():t.addEventListener("loadedmetadata",g,{once:true}),T||le();let I=new IntersectionObserver(R=>{R.forEach(N=>{$=N.isIntersecting,$&&!A&&T?b=requestAnimationFrame(M):cancelAnimationFrame(b);});}),ue;function ae(){clearTimeout(ue),ue=setTimeout(le,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),I.observe(t),Le(t,{type:"video",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:L})}),{destroy(){cancelAnimationFrame(b),I.disconnect(),t.removeEventListener("loadedmetadata",g),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ue),Ce(t);},replay(){w=-1,z=false,y=0,A=false,ce=NaN,d(0);},pause(){A=true,cancelAnimationFrame(b);},resume(){A&&(A=false,$&&T&&(b=requestAnimationFrame(M)));},seek(R){let N=Math.min(1,Math.max(0,R));y=N,w=N,A=true,cancelAnimationFrame(b),ce=NaN,d(N);},getProgress(){return y}}}function Wt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function dr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function _t(e){let n=Wt(e),r=new Map;for(let o of n){let l=o.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(o);}let t=[],i=Array.from(r.keys()).sort((o,l)=>o-l);for(let o of i){let l=r.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((m,p)=>{let S=m.nextElementSibling;u.appendChild(m),p<l.length-1&&S&&S.style.whiteSpace==="pre"&&u.appendChild(S);}),t.push(u);}return e.textContent="",t.forEach((o,l)=>{e.appendChild(o),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function gr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,o=n*t,l=o+(1-i);return l<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(l-o)))}function yr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Bt(e,n={}){if(typeof window>"u")return qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ye("scrollText: element not found:",e),qt;let t=r,{split:i="words",stagger:o=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:S}=n,k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,C=typeof l=="function"?l:K[l]??K["ease-out"],te=se(m.start??"top 85%"),he=se(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let j;i==="chars"?j=dr(t):i==="lines"?j=_t(t):j=Wt(t);let q=j.length;function W(g,I){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*I));let ue=yr(I,u);ue&&(g.style.transform=ue);}function P(g){t.style.setProperty("--scroll-draw-progress",String(g)),j.forEach((I,ue)=>{let ae=C(gr(g,ue,q,o));W(I,ae);});}if(k)return P(1),S?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};P(0);let F=0,L=0,b=0,$=false,A=false,w=-1,y=0,z=false,T=()=>window.scrollY,U=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),I=ve({top:g.top,height:g.height},T(),U(),te,he);F=I.tStart,L=I.tEnd;}function le(){if(!$||A)return;let g=Q(T(),F,L,1);p&&(w=Math.max(w,g),g=w),y=g,P(g),g>=1&&!z?(z=true,S?.()):g<1&&!p&&(z=false),b=requestAnimationFrame(le);}ie();let ce=new IntersectionObserver(g=>{g.forEach(I=>{$=I.isIntersecting,$&&!A?b=requestAnimationFrame(le):cancelAnimationFrame(b);});}),d;function M(){clearTimeout(d),d=setTimeout(()=>{if(i==="lines"){let g=y;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),j=_t(t),P(g);}ie();},150);}return window.addEventListener("resize",M),window.addEventListener("orientationchange",M),ce.observe(t),Le(t,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:L})}),{destroy(){cancelAnimationFrame(b),ce.disconnect(),window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),clearTimeout(d),t.innerHTML=H,t.removeAttribute("aria-label"),Ce(t);},replay(){w=-1,z=false,y=0,A=false,P(0);},pause(){A=true,cancelAnimationFrame(b);},resume(){A&&(A=false,$&&(b=requestAnimationFrame(le)));},seek(g){let I=Math.min(1,Math.max(0,g));y=I,w=I,A=true,cancelAnimationFrame(b),P(I);},getProgress(){return y}}}function wr(e,n={}){let[r,t]=vr.useState(0),i=vr.useRef(n);i.current=n;let o=vr.useRef(-1);return vr.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let l=typeof e=="string"?document.querySelector(e):e.current;if(!l)return;let u=l,{axis:m="y",scrollContainer:p,trigger:S={}}=i.current,k=typeof p=="string"?document.querySelector(p):p??null,C=se(S.start??"top bottom"),te=se(S.end??"bottom top"),he=0,H=0,j=false,q=0;function W(){return k?m==="x"?k.scrollLeft:k.scrollTop:m==="x"?window.scrollX:window.scrollY}function P(){return k?m==="x"?k.clientWidth:k.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function F(){let w=u.getBoundingClientRect(),y=W(),z=m==="x"?w.left:w.top,T=m==="x"?w.width:w.height,U=ve({top:z,height:T},y,P(),C,te);he=U.tStart,H=U.tEnd;}function L(){if(!j)return;let{speed:w=1,easing:y="linear",once:z=false}=i.current,T=typeof y=="function"?y:K[y]??K.linear,U=Q(W(),he,H,w),ie=T(U);z&&(o.current=Math.max(o.current,ie),ie=o.current),t(ie),q=requestAnimationFrame(L);}let b=new IntersectionObserver(w=>{w.forEach(y=>{j=y.isIntersecting,j?q=requestAnimationFrame(L):cancelAnimationFrame(q);});},{root:k??null,threshold:0});F(),b.observe(u);let $;function A(){clearTimeout($),$=setTimeout(F,150);}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),()=>{cancelAnimationFrame(q),clearTimeout($),b.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A);}},[]),r}function Ue(e,n,r){let t=vr.useRef(n);t.current=n;let i=Rt(n);vr.useEffect(()=>{if(!e.current)return;let o=r(e.current,It(t.current,()=>t.current));return ()=>o.destroy()},[i]);}function Mn({children:e,className:n,style:r,...t}){let i=vr.useRef(null);return Ue(i,t,$t),jsxRuntime.jsx("div",{ref:i,className:n,style:r,children:e})}function Pn({children:e,className:n,style:r,...t}){let i=vr.useRef(null);return Ue(i,t,Dt),jsxRuntime.jsx("div",{ref:i,className:n,style:r,children:e})}function Ln({className:e,style:n,...r}){let t=vr.useRef(null);return Ue(t,r,Ht),jsxRuntime.jsx("span",{ref:t,className:e,style:n})}function Cn({src:e,className:n,style:r,muted:t=true,playsInline:i=true,...o}){let l=vr.useRef(null);return Ue(l,o,Vt),jsxRuntime.jsx("video",{ref:l,src:e,className:n,style:r,muted:t,playsInline:i,preload:"auto"})}function $n({children:e,as:n="p",className:r,style:t,...i}){let o=vr.useRef(null);return Ue(o,i,Bt),vr__default.default.createElement(n,{ref:o,className:r,style:t},e)}exports.ScrollAnimate=Pn;exports.ScrollCounter=Ln;exports.ScrollDraw=Mn;exports.ScrollText=$n;exports.ScrollVideo=Cn;exports.useScrollDrawProgress=wr;
2
+ 'use strict';var Or=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Or__default=/*#__PURE__*/_interopDefault(Or);function lr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),s=0,a=[];for(let d=0;d<r;d++){let x=Math.pow(o,d);a.push(x),s+=x;}let c=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,c.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<r;x++)if(d<=c[x+1]){let M=(d-c[x])/(c[x+1]-c[x]);if(x===0)return M*(2-M);let P=1-Math.pow(t,x);return P+(1-P)*(2*M-1)*(2*M-1)}return 1}}function cr({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var Z={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:lr(),elastic:cr()};function Lt(e,n,r){return Math.min(r,Math.max(n,e))}function ce(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Pt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Ct(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:Lt((e-n)/(r-n)*t,0,1)}function Me(e,n,r,t,o){let s=Pt(e.top,e.height,n,t.element)-Ct(t.viewport,r),a=Pt(e.top,e.height,n,o.element)-Ct(o.viewport,r);return {tStart:s,tEnd:a}}function it(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ge(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function $t(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,n,r){let t=$t(e),o=$t(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var kt={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 Ye=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ve(e,...n){Ye&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ur="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",mr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function fr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function pr(e){let n=[];for(let r=0;r<Rt;r++){let t=r/(Rt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return ur;case "ease-out":return mr;case "ease-in-out":return fr()?pr(Z["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function It(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function Re(e,n){It().set(e,n);}function Oe(e){It().delete(e);}var Ke,lt=new Set,ct=new WeakMap,Qe=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function dr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ke??(Ke=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Nt(a)&&(s=true),ct.set(a,"");s&&lt.forEach(a=>a());})),lt.add(r);let t=dr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ct.has(o)||ct.set(o,Nt(o)),Qe.set(o,(Qe.get(o)??0)+1),Ke.observe(o);}),()=>{lt.delete(r)&&(t.forEach(o=>{let s=(Qe.get(o)??1)-1;if(s)return void Qe.set(o,s);Qe.delete(o),Ke?.unobserve(o);}),lt.size||(Ke?.disconnect(),Ke=void 0));}}var gr=0;function yr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ft(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Dt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function hr(e){if(!Ye)return;let n=Ft(e,"stroke");if(!n||n==="none"){ve("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Dt.has(r)&&!Dt.has(Ft(e,"fill"))&&ve("Element has a fill \u2014 it may obscure the stroke animation.",e);}function br(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
3
+ <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
4
+ <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(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var Ht=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function wr(e,n,r){if(!Ye)return;let t=(e.match(zt)??[]).join("").toUpperCase(),o=(n.match(zt)??[]).join("").toUpperCase(),s=(e.match(Ht)??[]).length,a=(n.match(Ht)??[]).length;if(t!==o){ve(`morphTo: command sequence differs (${t||"\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.`,r);return}s!==a&&ve(`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.`,r);}function gt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function Vt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...kt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:d="linear",trigger:x={},stagger:M=0,direction:P="forward",once:te=false,debug:Ee=false,axis:H="y",scrollContainer:K,autoReverse:z=false,delay:V=0,strokeColor:I,strokeWidth:$,fillOpacity:k,waypoints:h,velocityScale:C=false,threshold:E=0,rootMargin:b="0px",repeat:g=0,repeatDelay:U=0,morphTo:L,clip:_,autoplay:ie=false,duration:he=1e3,native:be=true,onProgress:q,onStart:O,onComplete:f,onEnter:p,onLeave:N,onEnterBack:X,onLeaveBack:Le}=o,T=_===true?"left":typeof _=="string"?_:false,W=typeof d=="function"?d:Z[d]??Z.linear,pe=ce(x.start??"top bottom"),Fe=ce(x.end??"bottom top"),Se=typeof K=="string"?document.querySelector(K):K??null,Pe=Array.isArray(I)?I[0]:null,de=Array.isArray(I)?I[1]:typeof I=="string"?I:null,re=Array.isArray($)?$[0]:null,ue=Array.isArray($)?$[1]:typeof $=="number"?$:null,me=Array.isArray(k)?k[0]:null,ne=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function De(i){let l=i*100;switch(T){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=T?[]:Array.from(e.querySelectorAll(a)),F=[],ge=[],ae=0,Te=0,u=M,v=0,G=false,Y=false,R=0,le=false,we=-1,He=[],fe=-1,Q=false,xe=0,ze=0,Ve,mt=null;function ht(){mt?.destroy(),mt=null;}let _e=new Set,bt=NaN,qe=true,et=-1,wt=performance.now(),We=NaN;function tt(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function vt(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function Et(){let i=it(e,Se,H);return Me(i,i.scroll,vt(),pe,Fe)}function rr(){let i=Te-ae,l=B.length-1,w=Se??document.documentElement,oe=H==="x"?"Width":"Height";if(u=M,M>0&&l>0&&i>0){let Ce=w[`scroll${oe}`]-w[`client${oe}`]-1-ae-i/c;Ce>=0&&(u=Math.min(M,Ce/(l*i)));}v=Te+l*u*i;}function St(){(({tStart:ae,tEnd:Te}=Et())),rr(),Ee&&Ye&&(ht(),mt=br(ae,Te,H));}function ft(i,l=Et){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let w=i.destroy;return i.destroy=()=>{w.call(i),Oe(e);},i}function nr(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),T){let w=l==="reverse"?1-i:i;e.style.clipPath=De(w);return}B.forEach((w,oe)=>{w.style.strokeDashoffset=l==="reverse"?`${F[oe]*i}`:`${F[oe]*(1-i)}`,m&&(w.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&de?w.style.stroke=je(Pe,de,i):de&&(w.style.stroke=de),re!==null&&ue!==null?w.style.strokeWidth=`${re+(ue-re)*i}`:ue!==null&&(w.style.strokeWidth=`${ue}`),me!==null&&ne!==null?w.style.fillOpacity=`${me+(ne-me)*i}`:ne!==null&&(w.style.fillOpacity=`${ne}`),L&&w.tagName.toLowerCase()==="path"&&ge[oe]&&w.setAttribute("d",gt(ge[oe],L,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),T){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${F[l]}`,i.style.strokeDashoffset=P==="reverse"?"0":`${F[l]}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`),L&&i.tagName.toLowerCase()==="path"&&ge[l]&&i.setAttribute("d",ge[l]);});}if(B.forEach(i=>{hr(i);let l=Ge(i);F.push(l);let w=i.tagName.toLowerCase()==="path";w?ge.push(i.getAttribute("d")??""):ge.push(""),L&&(w?wr(ge[ge.length-1],L,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),de&&(i.style.stroke=de),ue!==null&&(i.style.strokeWidth=`${ue}`),ne!==null&&(i.style.fillOpacity=`${ne}`),L&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",L)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?"0":`${l}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`));}),T){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof d=="string"?at(d):null;function or(){return !(be===false||!yr()||!B.length||!Tt||T||H!=="y"||Se||c!==1||M!==0||te||z||C!==false||L||h||g||V>0||q||O||f||p||N||X||Le||I!=null||$!=null||k!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function sr(){let i=++gr,l=`svg-scroll-draw-${i}`,w=`svg-scroll-draw-host-${i}`,oe=`--svg-scroll-draw-${i}`,Ce=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,A=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${P==="reverse"?1:0};`,A+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${A}}}.${w}{view-timeline-name:${oe};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${oe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function ye(y,se){y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(ye);let S=false,j=-1;function J(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:se,tEnd:$e}=Me({top:y.top,height:y.height},tt(),vt(),pe,Fe);return W(ee(tt(),se,$e,c))}return {destroy(){e.classList.remove(w),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){S=false,j=-1,B.forEach(ye);},pause(){S=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){S&&(S=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let se=Math.min(1,Math.max(0,y));j=se,S=true,B.forEach(($e,Ae)=>{$e.classList.remove(l),$e.style.strokeDashoffset=P==="reverse"?`${F[Ae]*se}`:`${F[Ae]*(1-se)}`,m&&($e.style.opacity=P==="reverse"?`${1-se}`:`${se}`);});},getProgress(){return J()},refresh(){B.forEach((y,se)=>{F[se]=Ge(y),y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`;});}}}if(or())return ft(sr());function ir(){let i=Math.max(1,he),l=0,w=0,oe=false;function Ce(S){let j=true;if(T){let J=Math.min(1,Math.max(0,S/i)),y=W(J);xe=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De(P==="reverse"?1-y:y),q?.(y),J<1&&(j=false);}else B.forEach((J,y)=>{let se=y*M*i,$e=Math.min(1,Math.max(0,(S-se)/i)),Ae=W($e);J.style.strokeDashoffset=P==="reverse"?`${F[y]*Ae}`:`${F[y]*(1-Ae)}`,m&&(J.style.opacity=P==="reverse"?`${1-Ae}`:`${Ae}`),Pe&&de?J.style.stroke=je(Pe,de,Ae):de&&(J.style.stroke=de),re!==null&&ue!==null?J.style.strokeWidth=`${re+(ue-re)*Ae}`:ue!==null&&(J.style.strokeWidth=`${ue}`),me!==null&&ne!==null?J.style.fillOpacity=`${me+(ne-me)*Ae}`:ne!==null&&(J.style.fillOpacity=`${ne}`),L&&J.tagName.toLowerCase()==="path"&&ge[y]&&J.setAttribute("d",gt(ge[y],L,Ae)),y===0&&(xe=Ae,q?.(Ae),e.style.setProperty("--scroll-draw-progress",String(Ae))),$e<1&&(j=false);});if(h){let J=Math.min(1,Math.max(0,S/i)),y=W(J);for(let se in h){let $e=parseFloat(se);y>=$e&&!_e.has($e)&&(_e.add($e),h[se]?.());}}return j}function Ie(S){if(Q)return;let j=S-l;Y||(Y=true,O?.());let J=Ce(j);if(J&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*M)),f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),R=requestAnimationFrame(Ie);},U));return}J||(R=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(R),clearTimeout(Ve),l=performance.now(),w=0,Q=false,Y=false,G=false,ze=0,oe=true,xe=0,_e.clear(),rt(),R=requestAnimationFrame(Ie);}let A=new IntersectionObserver(S=>{S.forEach(j=>{j.isIntersecting&&!(te&&G)?ke():!j.isIntersecting&&!te&&!G&&(cancelAnimationFrame(R),clearTimeout(Ve),oe=false);});},{root:Se??null,threshold:E,rootMargin:b}),D;function ye(){clearTimeout(D),D=setTimeout(()=>{B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});},150);}return window.addEventListener("resize",ye),window.addEventListener("orientationchange",ye),V>0?setTimeout(()=>A.observe(e),V):A.observe(e),{destroy(){cancelAnimationFrame(R),clearTimeout(Ve),A.disconnect(),window.removeEventListener("resize",ye),window.removeEventListener("orientationchange",ye),clearTimeout(D);},replay(){ze=0,ke();},pause(){Q||!oe||(Q=true,w=performance.now()-l,cancelAnimationFrame(R));},resume(){Q&&(Q=false,oe=true,l=performance.now()-w,R=requestAnimationFrame(Ie));},seek(S){let j=Math.min(1,Math.max(0,S));xe=j,Q=true,w=j*i,l=performance.now()-w,cancelAnimationFrame(R),Ce(w);},getProgress(){return xe},refresh(){clearTimeout(D),B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});}}}if(ie)return ft(ir());St();function xt(){if(Q||!Be)return;let i=performance.now(),l=tt();if(!qe&&C===false&&l===bt){pt(l);return}qe=false,bt=l;let w=c;if(C!==false){let A=i-wt,D=A>0?Math.abs(l-(et<0?l:et))/A:0;w=c*Math.max(.2,1+D*(typeof C=="number"?C:1)*.04);}et=l,wt=i;let oe=z?fe===-1||l>=fe?"forward":"reverse":P;fe=l;let Ce=Te-ae,Ie=true,ke=Ce===0?0:(l-ae)/Ce;if(isNaN(We)||(We<=0&&ke>0?p?.():We>0&&ke<=0&&Le?.(),We<1&&ke>=1?N?.():We>=1&&ke<1&&X?.()),We=ke,T){let A=W(ee(l,ae,Te,w));te&&!z&&(we=Math.max(we,A),A=we),xe=A,e.style.setProperty("--scroll-draw-progress",String(A));let D=oe==="reverse"?1-A:A;e.style.clipPath=De(D),q?.(A),!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),A>=1&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},U))):A<1&&!te&&(G=false),pt(l);return}if(B.forEach((A,D)=>{let ye=D*u*Ce,S=W(ee(l,ae+ye,Te+ye,w));te&&!z&&(S=He[D]=Math.max(He[D]??we,S)),A.style.strokeDashoffset=oe==="reverse"?`${F[D]*S}`:`${F[D]*(1-S)}`,m&&(A.style.opacity=oe==="reverse"?`${1-S}`:`${S}`),Pe&&de?A.style.stroke=je(Pe,de,S):de&&(A.style.stroke=de),re!==null&&ue!==null?A.style.strokeWidth=`${re+(ue-re)*S}`:ue!==null&&(A.style.strokeWidth=`${ue}`),me!==null&&ne!==null?A.style.fillOpacity=`${me+(ne-me)*S}`:ne!==null&&(A.style.fillOpacity=`${ne}`),L&&A.tagName.toLowerCase()==="path"&&ge[D]&&A.setAttribute("d",gt(ge[D],L,S)),D===0&&(xe=S,q?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(Ie=false);}),h){let A=W(ee(l,ae,Te,w));for(let D in h){let ye=parseFloat(D);A>=ye&&!_e.has(ye)&&(_e.add(ye),h[D]?.());}}!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),Ie&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},U))):!Ie&&!te&&(G=false),pt(l);}function At(i){return i>=Te&&i<v}function pt(i){le||At(i)?R=requestAnimationFrame(xt):Be=false;}let Be=false;function nt(){Be||(Be=true,R=requestAnimationFrame(function(){xt();}));}function ot(){Be=false,cancelAnimationFrame(R);}let dt=new IntersectionObserver(i=>{i.forEach(l=>{le=l.isIntersecting,le&&!Q?(qe=true,nt()):Be&&!Q&&At(tt())||ot();});},{root:Se??null,threshold:E,rootMargin:b});function Mt(){B.forEach((i,l)=>{F[l]=Ge(i),i.style.strokeDasharray=`${F[l]}`;}),St(),qe=true;}let st;function Xe(){clearTimeout(st),st=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let ar=Ne([e],Xe);return V>0?setTimeout(()=>dt.observe(e),V):dt.observe(e),ft({destroy(){cancelAnimationFrame(R),clearTimeout(Ve),ot(),dt.disconnect(),ar(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(st),ht();},replay(){we=-1,He=[],fe=-1,et=-1,Y=false,G=false,ze=0,Q=false,xe=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,le&&nt();},pause(){Q=true,ot();},resume(){Q&&(Q=false,qe=true,le&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));xe=l,we=l,He=[],Q=true,ot(),nr(l,P),qe=true;},getProgress(){return xe},refresh(){clearTimeout(st),Mt(),le&&!Q&&nt();}},()=>({tStart:ae,tEnd:Te}))}var _t=new WeakMap,vr=0;function qt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=_t.get(r);return t===void 0&&_t.set(r,t=++vr),`el#${t}`}return r})}function Wt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Er(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function Sr(e,n,r){let t=Bt(e),o=Bt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,d)=>`${m}${c.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(c.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function Gt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Er(t))return je(t,o,r);if(t.includes("("))return Sr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function Tr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var xr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Ar=0,jt="--scroll-draw-progress";function Mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ut(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:M=false,respectReducedMotion:P=true,triggerElement:te,onProgress:Ee,onComplete:H,onEnter:K,onLeave:z,onEnterBack:V,onLeaveBack:I}=n,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof s=="function"?s:Z[s]??Z["ease-out"],h=ce(o.start??"top bottom"),C=ce(o.end??"bottom top"),E=te??e,b=typeof d=="string"?document.querySelector(d):d??null,g=Object.entries(t).map(([u,v])=>({prop:Tr(u),from:Array.isArray(v)?v[0]:"",to:Array.isArray(v)?v[1]:v}));function U(){let u=window.getComputedStyle(e);for(let v of g)v.from===""&&(v.from=u.getPropertyValue(v.prop).trim()||"0");}function L(){for(let u of g)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...g.map(v=>v.prop),jt])_.set(u,e.style.getPropertyValue(u));function ie(){for(let[u,v]of _)v?e.style.setProperty(u,v):e.style.removeProperty(u);}if($)return L(),H?.(),{...r,destroy:ie,getProgress:()=>1};U();let he=typeof s=="string"?at(s):null;function be(){if(!x||!Mr()||!he||m!=="y"||b||E!==e||c||a!==1||Ee||H||K||z||V||I||M!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of g)if(!xr.has(u.prop))return false;return true}function q(){let u=`ssd-a-${++Ar}`,v=g.map(fe=>`${fe.prop}:${fe.from}`).join(";"),G=g.map(fe=>`${fe.prop}:${fe.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${v}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let R=()=>m==="x"?window.scrollX:window.scrollY,le=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let fe=e.getBoundingClientRect();return Me({top:fe.top,height:fe.height},R(),le(),h,C)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ie(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(fe){let Q=Math.min(1,Math.max(0,fe));e.classList.remove(u);for(let xe of g)e.style.setProperty(xe.prop,Gt(xe.from,xe.to,Q));},getProgress(){let{tStart:fe,tEnd:Q}=we();return k(ee(R(),fe,Q,a))}};return He}if(be())return q();let O=0,f=0,p=0,N=false,X=false,Le=-1,T=0,W=false,pe=NaN,Fe=-1,Se=0,Pe=()=>b?m==="x"?b.scrollLeft:b.scrollTop:m==="x"?window.scrollX:window.scrollY,de=()=>b?m==="x"?b.clientWidth:b.clientHeight:m==="x"?window.innerWidth:window.innerHeight,re=E===e?g:[],ue=false;function me(){let u=e.style,v=re.map(le=>u.getPropertyValue(le.prop)),G=u.transition;re.length&&(u.transition="none"),re.forEach(le=>u.setProperty(le.prop,_.get(le.prop)??""));let Y=it(E,b,m);re.forEach((le,we)=>u.setProperty(le.prop,v[we])),re.length&&(e.offsetWidth,u.transition=G);let R=Me(Y,Y.scroll,de(),h,C);ue&&Math.abs(R.tStart-O)<1&&Math.abs(R.tEnd-f)<1||(ue=true,O=R.tStart,f=R.tEnd);}function ne(u){e.style.setProperty(jt,String(u));for(let v of g)e.style.setProperty(v.prop,Gt(v.from,v.to,u));Ee?.(u);}function De(u){if(isNaN(pe)){pe=u;return}pe<=0&&u>0?K?.():pe>0&&u<=0&&I?.(),pe<1&&u>=1?z?.():pe>=1&&u<1&&V?.(),pe=u;}function B(){if(!N||X)return;let u=performance.now(),v=Pe(),G=a;if(M!==false){let le=u-Se,we=le>0?Math.abs(v-(Fe<0?v:Fe))/le:0;G=a*Math.max(.2,1+we*(typeof M=="number"?M:1)*.04);}Fe=v,Se=u;let Y=f===O?0:(v-O)/(f-O);De(Y);let R=k(ee(v,O,f,G));c&&(Le=Math.max(Le,R),R=Le),T=R,ne(R),R>=1&&!W?(W=true,H?.()):R<1&&!c&&(W=false),p=requestAnimationFrame(B);}me(),f===O&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=k(ee(Pe(),O,f,a));c&&u>0&&(Le=u),T=u,ne(u);}let F=new IntersectionObserver(u=>{u.forEach(v=>{N=v.isIntersecting,N&&!X?p=requestAnimationFrame(B):cancelAnimationFrame(p);});},{root:b??null}),ge;function ae(){clearTimeout(ge),ge=setTimeout(me,150);}window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae);let Te=Ne([E],ae);return F.observe(e),Re(e,{type:"animate",getProgress:()=>T,getTrigger:()=>({tStart:O,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),Te(),clearTimeout(ge),ie(),Oe(e);},replay(){Le=-1,W=false,T=0,X=false,ne(0);},pause(){X=true,cancelAnimationFrame(p);},resume(){X&&(X=false,N&&(p=requestAnimationFrame(B)));},seek(u){let v=Math.min(1,Math.max(0,u));T=v,Le=v,X=true,cancelAnimationFrame(p),ne(v);},getProgress(){return T},refresh(){me();}}}var yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,n){if(typeof window>"u")return yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollCounter: element not found:",e),yt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:M}=n,P=x!==void 0?f=>f.toFixed(x):a??(f=>String(Math.round(f))),te=typeof c=="function"?c:Z[c]??Z["ease-out"],Ee=ce(m.start??"top 80%"),H=ce(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(s),M?.(),yt;let z=0,V=0,I=false,$=0,k=false,h=false,C=-1,E=0,b=false,g=()=>window.scrollY,U=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Me({top:f.top,height:f.height},g(),U(),Ee,H);I&&Math.abs(p.tStart-z)<1&&Math.abs(p.tEnd-V)<1||(I=true,z=p.tStart,V=p.tEnd);}function _(f){t.textContent=P(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ie(){if(!k||h)return;let f=te(ee(g(),z,V,1));d&&(C=Math.max(C,f),f=C),E=f,_(f),f>=1&&!b?(b=true,M?.()):f<1&&!d&&(b=false),$=requestAnimationFrame(ie);}L();{let f=te(ee(g(),z,V,1));d&&f>0&&(C=f),E=f,_(f);}let he=new IntersectionObserver(f=>{f.forEach(p=>{k=p.isIntersecting,k&&!h?$=requestAnimationFrame(ie):cancelAnimationFrame($);});}),be;function q(){clearTimeout(be),be=setTimeout(L,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let O=Ne([t],q);return he.observe(t),Re(t,{type:"counter",getProgress:()=>E,getTrigger:()=>({tStart:z,tEnd:V})}),{destroy(){cancelAnimationFrame($),he.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),O(),clearTimeout(be),Oe(t);},replay(){C=-1,b=false,E=0,h=false,_(0);},pause(){h=true,cancelAnimationFrame($);},resume(){h&&(h=false,k&&($=requestAnimationFrame(ie)));},seek(f){let p=Math.min(1,Math.max(0,f));E=p,C=p,h=true,cancelAnimationFrame($),_(p);},getProgress(){return E}}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Yt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:d,onReady:x,onComplete:M,onProgress:P}=n,te=d??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof s=="function"?s:Z[s]??Z.linear,K=ce(o.start??"top top"),z=ce(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let V=n.from??0,I=n.to,$=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=false,_=()=>c==="x"?window.scrollX:window.scrollY,ie=()=>c==="x"?window.innerWidth:window.innerHeight;function he(){let T=te.getBoundingClientRect(),W=c==="x"?T.left:T.top,pe=c==="x"?T.width:T.height,Fe=Me({top:W,height:pe},_(),ie(),K,z);$=Fe.tStart,k=Fe.tEnd,L&&k===$&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let be=NaN;function q(T){if(!L)return;let W=I??t.duration??0,pe=V+(W-V)*T;pe!==be&&(be=pe,t.currentTime=pe),t.style.setProperty("--scroll-draw-progress",String(T)),P?.(T);}function O(){if(!C||E||!L||Ee)return;let T=H(ee(_(),$,k,1));a&&(b=Math.max(b,T),T=b),g=T,q(T),T>=1&&!U?(U=true,M?.()):T<1&&!a&&(U=false),h=requestAnimationFrame(O);}function f(){if(L=true,I===void 0&&(I=t.duration),Ee){q(1),x?.();return}he(),x?.(),C&&!E&&(h=requestAnimationFrame(O));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||he();let p=new IntersectionObserver(T=>{T.forEach(W=>{C=W.isIntersecting,C&&!E&&L?h=requestAnimationFrame(O):cancelAnimationFrame(h);});}),N;function X(){clearTimeout(N),N=setTimeout(he,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let Le=Ne([te],X);return p.observe(t),Re(t,{type:"video",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),Le(),clearTimeout(N),Oe(t);},replay(){b=-1,U=false,g=0,E=false,be=NaN,q(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&L&&(h=requestAnimationFrame(O)));},seek(T){let W=Math.min(1,Math.max(0,T));g=W,b=W,E=true,cancelAnimationFrame(h),be=NaN,q(W);},getProgress(){return g}}}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Lr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Qt(e){let n=Zt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,d)=>{let x=m.nextElementSibling;c.appendChild(m),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&c.appendChild(x);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Pr(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Cr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function er(e,n={}){if(typeof window>"u")return Jt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),Jt;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=n,M=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof a=="function"?a:Z[a]??Z["ease-out"],te=ce(m.start??"top 85%"),Ee=ce(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let K;o==="chars"?K=Lr(t):o==="lines"?K=Qt(t):K=Zt(t);let z=K.length;function V(p,N){c?.opacity!==void 0&&(p.style.opacity=String(c.opacity+(1-c.opacity)*N));let X=Cr(N,c);X&&(p.style.transform=X);}function I(p){t.style.setProperty("--scroll-draw-progress",String(p)),K.forEach((N,X)=>{let Le=P(Pr(p,X,z,s));V(N,Le);});}if(M)return I(1),x?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};I(0);let $=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=()=>window.scrollY,_=()=>window.innerHeight;function ie(){let p=t.getBoundingClientRect(),N=Me({top:p.top,height:p.height},L(),_(),te,Ee);$=N.tStart,k=N.tEnd;}function he(){if(!C||E)return;let p=ee(L(),$,k,1);d&&(b=Math.max(b,p),p=b),g=p,I(p),p>=1&&!U?(U=true,x?.()):p<1&&!d&&(U=false),h=requestAnimationFrame(he);}ie();let be=new IntersectionObserver(p=>{p.forEach(N=>{C=N.isIntersecting,C&&!E?h=requestAnimationFrame(he):cancelAnimationFrame(h);});}),q;function O(){clearTimeout(q),q=setTimeout(()=>{if(o==="lines"){let p=g;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),K=Qt(t),I(p);}ie();},150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let f=Ne([t],O);return be.observe(t),Re(t,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),be.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),f(),clearTimeout(q),t.innerHTML=H,t.removeAttribute("aria-label"),Oe(t);},replay(){b=-1,U=false,g=0,E=false,I(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&(h=requestAnimationFrame(he)));},seek(p){let N=Math.min(1,Math.max(0,p));g=N,b=N,E=true,cancelAnimationFrame(h),I(N);},getProgress(){return g}}}function Rr(e,n={}){let[r,t]=Or.useState(0),o=Or.useRef(n);o.current=n;let s=Or.useRef(-1);return Or.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:d,trigger:x={}}=o.current,M=typeof d=="string"?document.querySelector(d):d??null,P=ce(x.start??"top bottom"),te=ce(x.end??"bottom top"),Ee=0,H=0,K=false,z=0;function V(){return M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY}function I(){return M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function $(){let b=c.getBoundingClientRect(),g=V(),U=m==="x"?b.left:b.top,L=m==="x"?b.width:b.height,_=Me({top:U,height:L},g,I(),P,te);Ee=_.tStart,H=_.tEnd;}function k(){if(!K)return;let{speed:b=1,easing:g="linear",once:U=false}=o.current,L=typeof g=="function"?g:Z[g]??Z.linear,_=ee(V(),Ee,H,b),ie=L(_);U&&(s.current=Math.max(s.current,ie),ie=s.current),t(ie),z=requestAnimationFrame(k);}let h=new IntersectionObserver(b=>{b.forEach(g=>{K=g.isIntersecting,K?z=requestAnimationFrame(k):cancelAnimationFrame(z);});},{root:M??null,threshold:0});$(),h.observe(c);let C;function E(){clearTimeout(C),C=setTimeout($,150);}return window.addEventListener("resize",E),window.addEventListener("orientationchange",E),()=>{cancelAnimationFrame(z),clearTimeout(C),h.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E);}},[]),r}function Je(e,n,r){let t=Or.useRef(n);t.current=n;let o=qt(n);Or.useEffect(()=>{if(!e.current)return;let s=r(e.current,Wt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Nr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function Ze(e){let n={},r={};for(let[t,o]of Object.entries(e))(Nr.test(t)?r:n)[t]=o;return [n,r]}function jn({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Vt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Un({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Ut),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Xn({className:e,style:n,...r}){let t=Or.useRef(null),[o,s]=Ze(r);return Je(t,o,Xt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Yn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Or.useRef(null),[c,m]=Ze(s);return Je(a,c,Kt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Kn({children:e,as:n="p",className:r,style:t,...o}){let s=Or.useRef(null),[a,c]=Ze(o);return Je(s,a,er),Or__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Un;exports.ScrollCounter=Xn;exports.ScrollDraw=jn;exports.ScrollText=Kn;exports.ScrollVideo=Yn;exports.useScrollDrawProgress=Rr;
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { RefObject } from 'react';
3
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-DHU1zNEw.mjs';
4
- import { S as ScrollAnimateOptions } from '../engine-Ci08nM91.mjs';
5
- import { S as ScrollCounterOptions } from '../index-BDGQEK6X.mjs';
3
+ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
4
+ import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
5
+ import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
6
6
  import { ScrollVideoOptions } from '../video/index.mjs';
7
7
  import { ScrollTextOptions } from '../text/index.mjs';
8
8
 
@@ -32,38 +32,41 @@ interface UseScrollDrawProgressOptions {
32
32
  */
33
33
  declare function useScrollDrawProgress(target: RefObject<Element | null> | string, options?: UseScrollDrawProgressOptions): number;
34
34
 
35
- type ScrollDrawProps = ScrollDrawOptions & {
35
+ type ElementAttrs = React.AriaAttributes & Pick<React.HTMLAttributes<HTMLElement>, 'id' | 'role' | 'title' | 'tabIndex' | 'lang' | 'dir' | 'hidden'> & {
36
+ [data: `data-${string}`]: string | number | boolean | undefined;
37
+ };
38
+ type ScrollDrawProps = ScrollDrawOptions & ElementAttrs & {
36
39
  children: React.ReactNode;
37
40
  className?: string;
38
41
  style?: React.CSSProperties;
39
42
  };
40
- declare function ScrollDraw({ children, className, style, ...options }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
41
- type ScrollAnimateProps = ScrollAnimateOptions & {
43
+ declare function ScrollDraw({ children, className, style, ...rest }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
44
+ type ScrollAnimateProps = ScrollAnimateOptions & ElementAttrs & {
42
45
  children: React.ReactNode;
43
46
  className?: string;
44
47
  style?: React.CSSProperties;
45
48
  };
46
- declare function ScrollAnimate({ children, className, style, ...options }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
47
- type ScrollCounterProps = ScrollCounterOptions & {
49
+ declare function ScrollAnimate({ children, className, style, ...rest }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
50
+ type ScrollCounterProps = ScrollCounterOptions & ElementAttrs & {
48
51
  className?: string;
49
52
  style?: React.CSSProperties;
50
53
  };
51
- declare function ScrollCounter({ className, style, ...options }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
52
- type ScrollVideoProps = ScrollVideoOptions & {
54
+ declare function ScrollCounter({ className, style, ...rest }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
55
+ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
53
56
  src: string;
54
57
  className?: string;
55
58
  style?: React.CSSProperties;
56
59
  muted?: boolean;
57
60
  playsInline?: boolean;
58
61
  };
59
- declare function ScrollVideo({ src, className, style, muted, playsInline, ...options }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
60
- type ScrollTextProps = ScrollTextOptions & {
62
+ declare function ScrollVideo({ src, className, style, muted, playsInline, ...rest }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
63
+ type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
61
64
  children: string;
62
65
  as?: keyof React.JSX.IntrinsicElements;
63
66
  className?: string;
64
67
  style?: React.CSSProperties;
65
68
  };
66
- declare function ScrollText({ children, as: Tag, className, style, ...options }: ScrollTextProps): React.ReactElement<{
69
+ declare function ScrollText({ children, as: Tag, className, style, ...rest }: ScrollTextProps): React.ReactElement<{
67
70
  ref: React.RefObject<HTMLElement>;
68
71
  className: string | undefined;
69
72
  style: React.CSSProperties | undefined;
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { RefObject } from 'react';
3
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-DHU1zNEw.js';
4
- import { S as ScrollAnimateOptions } from '../engine-6AXEX8CL.js';
5
- import { S as ScrollCounterOptions } from '../index-DxjUOIbK.js';
3
+ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-MswK0erX.js';
4
+ import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
5
+ import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
6
6
  import { ScrollVideoOptions } from '../video/index.js';
7
7
  import { ScrollTextOptions } from '../text/index.js';
8
8
 
@@ -32,38 +32,41 @@ interface UseScrollDrawProgressOptions {
32
32
  */
33
33
  declare function useScrollDrawProgress(target: RefObject<Element | null> | string, options?: UseScrollDrawProgressOptions): number;
34
34
 
35
- type ScrollDrawProps = ScrollDrawOptions & {
35
+ type ElementAttrs = React.AriaAttributes & Pick<React.HTMLAttributes<HTMLElement>, 'id' | 'role' | 'title' | 'tabIndex' | 'lang' | 'dir' | 'hidden'> & {
36
+ [data: `data-${string}`]: string | number | boolean | undefined;
37
+ };
38
+ type ScrollDrawProps = ScrollDrawOptions & ElementAttrs & {
36
39
  children: React.ReactNode;
37
40
  className?: string;
38
41
  style?: React.CSSProperties;
39
42
  };
40
- declare function ScrollDraw({ children, className, style, ...options }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
41
- type ScrollAnimateProps = ScrollAnimateOptions & {
43
+ declare function ScrollDraw({ children, className, style, ...rest }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
44
+ type ScrollAnimateProps = ScrollAnimateOptions & ElementAttrs & {
42
45
  children: React.ReactNode;
43
46
  className?: string;
44
47
  style?: React.CSSProperties;
45
48
  };
46
- declare function ScrollAnimate({ children, className, style, ...options }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
47
- type ScrollCounterProps = ScrollCounterOptions & {
49
+ declare function ScrollAnimate({ children, className, style, ...rest }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
50
+ type ScrollCounterProps = ScrollCounterOptions & ElementAttrs & {
48
51
  className?: string;
49
52
  style?: React.CSSProperties;
50
53
  };
51
- declare function ScrollCounter({ className, style, ...options }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
52
- type ScrollVideoProps = ScrollVideoOptions & {
54
+ declare function ScrollCounter({ className, style, ...rest }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
55
+ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
53
56
  src: string;
54
57
  className?: string;
55
58
  style?: React.CSSProperties;
56
59
  muted?: boolean;
57
60
  playsInline?: boolean;
58
61
  };
59
- declare function ScrollVideo({ src, className, style, muted, playsInline, ...options }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
60
- type ScrollTextProps = ScrollTextOptions & {
62
+ declare function ScrollVideo({ src, className, style, muted, playsInline, ...rest }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
63
+ type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
61
64
  children: string;
62
65
  as?: keyof React.JSX.IntrinsicElements;
63
66
  className?: string;
64
67
  style?: React.CSSProperties;
65
68
  };
66
- declare function ScrollText({ children, as: Tag, className, style, ...options }: ScrollTextProps): React.ReactElement<{
69
+ declare function ScrollText({ children, as: Tag, className, style, ...rest }: ScrollTextProps): React.ReactElement<{
67
70
  ref: React.RefObject<HTMLElement>;
68
71
  className: string | undefined;
69
72
  style: React.CSSProperties | undefined;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-TIRZOSQ4.mjs';import {a as a$5}from'../chunk-SNCRC6BA.mjs';import {a as a$3}from'../chunk-4MH5SQTH.mjs';import {a as a$2}from'../chunk-QJ4H2HW3.mjs';import {b as b$2}from'../chunk-LINFV2GK.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-PEFR3ZB7.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(r,t={}){let[n,e]=useState(0),o=useRef(t);o.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let u=typeof r=="string"?document.querySelector(r):r.current;if(!u)return;let b$1=u,{axis:a$1="y",scrollContainer:y,trigger:h={}}=o.current,l=typeof y=="string"?document.querySelector(y):y??null,W=a(h.start??"top bottom"),X=a(h.end??"bottom top"),O=0,C=0,w=false,f=0;function N(){return l?a$1==="x"?l.scrollLeft:l.scrollTop:a$1==="x"?window.scrollX:window.scrollY}function B(){return l?a$1==="x"?l.clientWidth:l.clientHeight:a$1==="x"?window.innerWidth:window.innerHeight}function D(){let i=b$1.getBoundingClientRect(),c$1=N(),v=a$1==="x"?i.left:i.top,x=a$1==="x"?i.width:i.height,g=c({top:v,height:x},c$1,B(),W,X);O=g.tStart,C=g.tEnd;}function A(){if(!w)return;let{speed:i=1,easing:c="linear",once:v=false}=o.current,x=typeof c=="function"?c:d[c]??d.linear,g=b(N(),O,C,i),P=x(g);v&&(s.current=Math.max(s.current,P),P=s.current),e(P),f=requestAnimationFrame(A);}let L=new IntersectionObserver(i=>{i.forEach(c=>{w=c.isIntersecting,w?f=requestAnimationFrame(A):cancelAnimationFrame(f);});},{root:l??null,threshold:0});D(),L.observe(b$1);let E;function d$1(){clearTimeout(E),E=setTimeout(D,150);}return window.addEventListener("resize",d$1),window.addEventListener("orientationchange",d$1),()=>{cancelAnimationFrame(f),clearTimeout(E),L.disconnect(),window.removeEventListener("resize",d$1),window.removeEventListener("orientationchange",d$1);}},[]),n}function p(r,t,n){let e=useRef(t);e.current=t;let o=a$1(t);useEffect(()=>{if(!r.current)return;let s=n(r.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[o]);}function ce({children:r,className:t,style:n,...e}){let o=useRef(null);return p(o,e,b$2),jsx("div",{ref:o,className:t,style:n,children:r})}function ae({children:r,className:t,style:n,...e}){let o=useRef(null);return p(o,e,a$2),jsx("div",{ref:o,className:t,style:n,children:r})}function me({className:r,style:t,...n}){let e=useRef(null);return p(e,n,a$3),jsx("span",{ref:e,className:r,style:t})}function ue({src:r,className:t,style:n,muted:e=true,playsInline:o=true,...s}){let u=useRef(null);return p(u,s,a$4),jsx("video",{ref:u,src:r,className:t,style:n,muted:e,playsInline:o,preload:"auto"})}function pe({children:r,as:t="p",className:n,style:e,...o}){let s=useRef(null);return p(s,o,a$5),Y.createElement(t,{ref:s,className:n,style:e},r)}export{ae as ScrollAnimate,me as ScrollCounter,ce as ScrollDraw,pe as ScrollText,ue as ScrollVideo,K as useScrollDrawProgress};
2
+ import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-I45LCJUP.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
@@ -1 +1 @@
1
- 'use strict';function Fe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),a=Math.sqrt(r),s=0,m=[];for(let c=0;c<n;c++){let p=Math.pow(a,c);m.push(p),s+=p;}let l=[0],u=0;for(let c=0;c<n;c++)u+=m[c]/s,l.push(u);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let p=0;p<n;p++)if(c<=l[p+1]){let g=(c-l[p])/(l[p+1]-l[p]);if(p===0)return g*(2-g);let M=1-Math.pow(r,p);return M+(1-M)*(2*g-1)*(2*g-1)}return 1}}function Ve({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),a=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-a)*(2*Math.PI)/r)+1}var N={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Fe(),elastic:Ve()};function fe(e,t,n){return Math.min(n,Math.max(t,e))}function J(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}}function ge(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function de(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function z(e,t,n,r){return n===t?0:fe((e-t)/(n-t)*r,0,1)}function ee(e,t,n,r,a){let s=ge(e.top,e.height,t,r.element)-de(r.viewport,n),m=ge(e.top,e.height,t,a.element)-de(a.viewport,n);return {tStart:s,tEnd:m}}function be(e,t,n){let r=e.getBoundingClientRect(),a=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:a,scroll:0}:{top:n==="x"?r.left:r.top,height:a,scroll:n==="x"?window.scrollX:window.scrollY}}function he(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 ye(e,t,n){let r=he(e),a=he(t);return !r||!a?e:`rgb(${Math.round(r[0]+(a[0]-r[0])*n)},${Math.round(r[1]+(a[1]-r[1])*n)},${Math.round(r[2]+(a[2]-r[2])*n)})`}var De="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Oe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",ve=33;function He(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ke(e){let t=[];for(let n=0;n<ve;n++){let r=n/(ve-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Ee(e){switch(e){case "linear":return "linear";case "ease-in":return De;case "ease-out":return Oe;case "ease-in-out":return He()?ke(N["ease-in-out"]):null;default:return null}}var we=Symbol.for("svg-scroll-draw.registry");function Se(){let e=globalThis;return e[we]||(e[we]=new Map)}function te(e,t){Se().set(e,t);}function ne(e){Se().delete(e);}var Be=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function Y(e,...t){Be&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function Xe(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xe(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let a=[],s=[],m=r[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let u=l.match(/^([-+]?[\d.eE]+)(.*)$/);a.push(u?parseFloat(u[1]):0),s.push(u?u[2]:"");}t.push({fn:r[1],nums:a,units:s});}return t}function We(e,t,n){let r=xe(e),a=xe(t);return r.length===0||r.length!==a.length?n<1?e:t:r.map((s,m)=>{let l=a[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((u,c)=>`${u}${s.units[c]}`).join(", ")})`:`${l.fn}(${l.nums.map((u,c)=>`${u}${l.units[c]}`).join(", ")})`:`${s.fn}(${s.nums.map((u,c)=>`${u+(l.nums[c]-u)*n}${s.units[c]}`).join(", ")})`}).join(" ")}function Me(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),a=String(t);if(Xe(r))return ye(r,a,n);if(r.includes("("))return We(r,a,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),m=a.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),u=parseFloat(m[1]);return `${l+(u-l)*n}${s[2]||m[2]}`}return n<1?r:a}function ze(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Ye=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),je=0,Te="--scroll-draw-progress";function qe(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Re(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:a={},easing:s="ease-out",speed:m=1,once:l=false,axis:u="y",scrollContainer:c,native:p=true,velocityScale:g=false,respectReducedMotion:M=true,triggerElement:I,onProgress:T,onComplete:R,onEnter:_,onLeave:F,onEnterBack:V,onLeaveBack:L}=t,C=M&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,v=typeof s=="function"?s:N[s]??N["ease-out"],oe=J(a.start??"top bottom"),se=J(a.end??"bottom top"),ie=I??e,d=typeof c=="string"?document.querySelector(c):c??null,h=Object.entries(r).map(([o,i])=>({prop:ze(o),from:Array.isArray(i)?i[0]:"",to:Array.isArray(i)?i[1]:i}));function Pe(){let o=window.getComputedStyle(e);for(let i of h)i.from===""&&(i.from=o.getPropertyValue(i.prop).trim()||"0");}function Ae(){for(let o of h)e.style.setProperty(o.prop,String(o.to));}let ae=new Map;for(let o of [...h.map(i=>i.prop),Te])ae.set(o,e.style.getPropertyValue(o));function j(){for(let[o,i]of ae)i?e.style.setProperty(o,i):e.style.removeProperty(o);}if(C)return Ae(),R?.(),{...n,destroy:j,getProgress:()=>1};Pe();let ue=typeof s=="string"?Ee(s):null;function Ie(){if(!p||!qe()||!ue||u!=="y"||d||ie!==e||l||m!==1||T||R||_||F||V||L||g!==false||(a.start??"top bottom").trim()!=="top bottom"||(a.end??"bottom top").trim()!=="bottom top")return false;for(let o of h)if(!Ye.has(o.prop))return false;return true}function _e(){let o=`ssd-a-${++je}`,i=h.map(f=>`${f.prop}:${f.from}`).join(";"),B=h.map(f=>`${f.prop}:${f.to}`).join(";"),A=document.createElement("style");A.setAttribute("data-ssd-animate",""),A.textContent=`@keyframes ${o}{from{${i}}to{${B}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(o);let b=()=>u==="x"?window.scrollX:window.scrollY,X=()=>u==="x"?window.innerWidth:window.innerHeight,W=()=>{let f=e.getBoundingClientRect();return ee({top:f.top,height:f.height},b(),X(),oe,se)};te(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:W});let Q={destroy(){e.classList.remove(o),A.remove(),e.style.animationPlayState="",j(),ne(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(f){let K=Math.min(1,Math.max(0,f));e.classList.remove(o);for(let Z of h)e.style.setProperty(Z.prop,Me(Z.from,Z.to,K));},getProgress(){let{tStart:f,tEnd:K}=W();return v(z(b(),f,K,m))}};return Q}if(Ie())return _e();let y=0,E=0,w=0,D=false,S=false,$=-1,P=0,O=false,x=NaN,q=-1,ce=0,le=()=>d?u==="x"?d.scrollLeft:d.scrollTop:u==="x"?window.scrollX:window.scrollY,Ce=()=>d?u==="x"?d.clientWidth:d.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function me(){let o=be(ie,d,u),i=ee(o,o.scroll,Ce(),oe,se);y=i.tStart,E=i.tEnd;}function H(o){e.style.setProperty(Te,String(o));for(let i of h)e.style.setProperty(i.prop,Me(i.from,i.to,o));T?.(o);}function Ne(o){if(isNaN(x)){x=o;return}x<=0&&o>0?_?.():x>0&&o<=0&&L?.(),x<1&&o>=1?F?.():x>=1&&o<1&&V?.(),x=o;}function G(){if(!D||S)return;let o=performance.now(),i=le(),B=m;if(g!==false){let X=o-ce,W=X>0?Math.abs(i-(q<0?i:q))/X:0;B=m*Math.max(.2,1+W*(typeof g=="number"?g:1)*.04);}q=i,ce=o;let A=E===y?0:(i-y)/(E-y);Ne(A);let b=v(z(i,y,E,B));l&&($=Math.max($,b),b=$),P=b,H(b),b>=1&&!O?(O=true,R?.()):b<1&&!l&&(O=false),w=requestAnimationFrame(G);}me(),E===y&&Y("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let o=v(z(le(),y,E,m));l&&o>0&&($=o),P=o,H(o);}let pe=new IntersectionObserver(o=>{o.forEach(i=>{D=i.isIntersecting,D&&!S?w=requestAnimationFrame(G):cancelAnimationFrame(w);});},{root:d??null}),U;function k(){clearTimeout(U),U=setTimeout(me,150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),pe.observe(e),te(e,{type:"animate",getProgress:()=>P,getTrigger:()=>({tStart:y,tEnd:E})}),{destroy(){cancelAnimationFrame(w),pe.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(U),j(),ne(e);},replay(){$=-1,O=false,P=0,S=false,H(0);},pause(){S=true,cancelAnimationFrame(w);},resume(){S&&(S=false,D&&(w=requestAnimationFrame(G)));},seek(o){let i=Math.min(1,Math.max(0,o));P=i,$=i,S=true,cancelAnimationFrame(w),H(i);},getProgress(){return P}}}var Ge={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function Ue(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function Qe(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function re(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Le(e,t){let[n,r]=re(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function Ke(e){let t=NaN,n=0,r=0;return e.map(a=>{let s=a.getBoundingClientRect();return Math.abs(s.top-t)<=Math.max(8,Math.min(s.height,n||s.height)/2)?r++:(t=s.top,n=s.height,r=0),r})}var $e={destroy:()=>{}};function yt(e,t={}){if(typeof window>"u")return $e;let n=Qe(e);if(!n.length)return Y("scrollReveal: no elements found:",e),$e;let{preset:r="fadeUp",from:a,stagger:s=.15,easing:m="ease-out",once:l=true,trigger:u,onEnter:c,onLeave:p}=t,g={...Ge[r],...a},M=Ue(g),I=u?.start??"top 88%",T=u?.end??"top 53%",R=Math.abs(re(I)[1]-re(T)[1]),_=Math.min(Math.max(s,0),1)*R,F=_>0?Ke(n):n.map(()=>0),V=n.map((L,C)=>{let v=Math.min(F[C]*_,R);return Re(L,{props:M,easing:m,once:l,native:false,trigger:v>0?{start:Le(I,v),end:Le(T,v)}:{start:I,end:T},onEnter:C===0?c:void 0,onLeave:C===n.length-1?p:void 0})});return {destroy(){V.forEach(L=>L.destroy());}}}exports.scrollReveal=yt;
1
+ 'use strict';function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,c=[];for(let l=0;l<n;l++){let p=Math.pow(s,l);c.push(p),i+=p;}let m=[0],u=0;for(let l=0;l<n;l++)u+=c[l]/i,m.push(u);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=m[p+1]){let g=(l-m[p])/(m[p+1]-m[p]);if(p===0)return g*(2-g);let T=1-Math.pow(r,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var H={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Xe(),elastic:Ye()};function Ee(e,t,n){return Math.min(n,Math.max(t,e))}function ae(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}}function ve(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function we(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function G(e,t,n,r){return n===t?0:Ee((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,s){let i=ve(e.top,e.height,t,r.element)-we(r.viewport,n),c=ve(e.top,e.height,t,s.element)-we(s.viewport,n);return {tStart:i,tEnd:c}}function Se(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(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 Me(e,t,n){let r=xe(e),s=xe(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var je="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Re=33;function Ge(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ue(e){let t=[];for(let n=0;n<Re;n++){let r=n/(Re-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Te(e){switch(e){case "linear":return "linear";case "ease-in":return je;case "ease-out":return qe;case "ease-in-out":return Ge()?Ue(H["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Pe(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Pe().set(e,t);}function le(e){Pe().delete(e);}var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function U(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var z,Q=new Set,K=new WeakMap,k=new Map,$e=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(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 Ae(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();z??(z=new ResizeObserver(s=>{let i=false;for(let{target:c}of s)K.get(c)!==$e(c)&&(i=true),K.set(c,"");i&&Q.forEach(c=>c());})),Q.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{K.has(s)||K.set(s,$e(s)),k.set(s,(k.get(s)??0)+1),z.observe(s);}),()=>{Q.delete(n)&&(r.forEach(s=>{let i=(k.get(s)??1)-1;if(i)return void k.set(s,i);k.delete(s),z?.unobserve(s);}),Q.size||(z?.disconnect(),z=void 0));}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],c=r[2].trim();if(c)for(let m of c.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Je(e,t,n){let r=Ie(e),s=Ie(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,c)=>{let m=s[c];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((u,l)=>`${u}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,l)=>`${u}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,l)=>`${u+(m.nums[l]-u)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function _e(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(Ze(r))return Me(r,s,n);if(r.includes("("))return Je(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),c=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&c){let m=parseFloat(i[1]),u=parseFloat(c[1]);return `${m+(u-m)*n}${i[2]||c[2]}`}return n<1?r:s}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:s={},easing:i="ease-out",speed:c=1,once:m=false,axis:u="y",scrollContainer:l,native:p=true,velocityScale:g=false,respectReducedMotion:T=true,triggerElement:N,onProgress:L,onComplete:P,onEnter:F,onLeave:B,onEnterBack:W,onLeaveBack:$}=t,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof i=="function"?i:H[i]??H["ease-out"],pe=ae(s.start??"top bottom"),fe=ae(s.end??"bottom top"),X=N??e,h=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([o,a])=>({prop:et(o),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function Ve(){let o=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=o.getPropertyValue(a.prop).trim()||"0");}function De(){for(let o of y)e.style.setProperty(o.prop,String(o.to));}let Z=new Map;for(let o of [...y.map(a=>a.prop),Ce])Z.set(o,e.style.getPropertyValue(o));function J(){for(let[o,a]of Z)a?e.style.setProperty(o,a):e.style.removeProperty(o);}if(O)return De(),P?.(),{...n,destroy:J,getProgress:()=>1};Ve();let de=typeof i=="string"?Te(i):null;function He(){if(!p||!rt()||!de||u!=="y"||h||X!==e||m||c!==1||L||P||F||B||W||$||g!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let o of y)if(!tt.has(o.prop))return false;return true}function ze(){let o=`ssd-a-${++nt}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${o}{from{${a}}to{${_}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(o);let f=()=>u==="x"?window.scrollX:window.scrollY,b=()=>u==="x"?window.innerWidth:window.innerHeight,C=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},f(),b(),pe,fe)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:C});let oe={refresh(){},destroy(){e.classList.remove(o),v.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(o);for(let ie of y)e.style.setProperty(ie.prop,_e(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=C();return S(G(f(),d,se,c))}};return oe}if(He())return ze();let E=0,w=0,x=0,Y=false,M=false,A=-1,I=0,j=false,R=NaN,ee=-1,ge=0,be=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,ke=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,V=X===e?y:[],he=false;function te(){let o=e.style,a=V.map(b=>o.getPropertyValue(b.prop)),_=o.transition;V.length&&(o.transition="none"),V.forEach(b=>o.setProperty(b.prop,Z.get(b.prop)??""));let v=Se(X,h,u);V.forEach((b,C)=>o.setProperty(b.prop,a[C])),V.length&&(e.offsetWidth,o.transition=_);let f=ue(v,v.scroll,ke(),pe,fe);he&&Math.abs(f.tStart-E)<1&&Math.abs(f.tEnd-w)<1||(he=true,E=f.tStart,w=f.tEnd);}function q(o){e.style.setProperty(Ce,String(o));for(let a of y)e.style.setProperty(a.prop,_e(a.from,a.to,o));L?.(o);}function Be(o){if(isNaN(R)){R=o;return}R<=0&&o>0?F?.():R>0&&o<=0&&$?.(),R<1&&o>=1?B?.():R>=1&&o<1&&W?.(),R=o;}function ne(){if(!Y||M)return;let o=performance.now(),a=be(),_=c;if(g!==false){let b=o-ge,C=b>0?Math.abs(a-(ee<0?a:ee))/b:0;_=c*Math.max(.2,1+C*(typeof g=="number"?g:1)*.04);}ee=a,ge=o;let v=w===E?0:(a-E)/(w-E);Be(v);let f=S(G(a,E,w,_));m&&(A=Math.max(A,f),f=A),I=f,q(f),f>=1&&!j?(j=true,P?.()):f<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===E&&U("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let o=S(G(be(),E,w,c));m&&o>0&&(A=o),I=o,q(o);}let ye=new IntersectionObserver(o=>{o.forEach(a=>{Y=a.isIntersecting,Y&&!M?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:h??null}),re;function D(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let We=Ae([X],D);return ye.observe(e),ce(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:E,tEnd:w})}),{destroy(){cancelAnimationFrame(x),ye.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),We(),clearTimeout(re),J(),le(e);},replay(){A=-1,j=false,I=0,M=false,q(0);},pause(){M=true,cancelAnimationFrame(x);},resume(){M&&(M=false,Y&&(x=requestAnimationFrame(ne)));},seek(o){let a=Math.min(1,Math.max(0,o));I=a,A=a,M=true,cancelAnimationFrame(x),q(a);},getProgress(){return I},refresh(){te();}}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Fe(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(s=>{let i=s.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Oe={destroy:()=>{}};function At(e,t={}){if(typeof window>"u")return Oe;let n=it(e);if(!n.length)return U("scrollReveal: no elements found:",e),Oe;let{preset:r="fadeUp",from:s,stagger:i=.15,easing:c="ease-out",once:m=true,trigger:u,onEnter:l,onLeave:p}=t,g={...ot[r],...s},T=st(g),N=u?.start??"top 88%",L=u?.end??"top 53%",P=Math.abs(me(N)[1]-me(L)[1]),F=Math.min(Math.max(i,0),1)*P,B=F>0?at(n):n.map(()=>0),W=n.map(($,O)=>{let S=Math.min(B[O]*F,P);return Ne($,{props:T,easing:c,once:m,native:false,trigger:S>0?{start:Fe(N,S),end:Fe(L,S)}:{start:N,end:L},onEnter:O===0?l:void 0,onLeave:O===n.length-1?p:void 0})});return {destroy(){W.forEach($=>$.destroy());}}}exports.scrollReveal=At;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-DHU1zNEw.mjs';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-MswK0erX.mjs';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-DHU1zNEw.js';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-MswK0erX.js';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1 +1 @@
1
- import {a}from'../chunk-QJ4H2HW3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-BFX2CSQ3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-DHU1zNEw.mjs';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-MswK0erX.mjs';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-DHU1zNEw.js';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-MswK0erX.js';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-DHU1zNEw.mjs';
1
+ import { E as EasingName } from '../types-MswK0erX.mjs';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-DHU1zNEw.js';
1
+ import { E as EasingName } from '../types-MswK0erX.js';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */