svg-scroll-draw 2.18.0 → 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 +10 -3
  29. package/dist/horizontal/index.d.ts +10 -3
  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
@@ -0,0 +1 @@
1
+ import {b,a as a$3}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a,b as b$2,d as d$1,c}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$3}from'./chunk-BCV4RAIX.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function Ae(t){return t.startsWith("#")||t.startsWith("rgb")||t.startsWith("hsl")}function ge(t){let u=[],l=/([\w]+)\(([^)]*)\)/g,s;for(;(s=l.exec(t))!==null;){let a=[],o=[],m=s[2].trim();if(m)for(let i of m.split(/[\s,]+/)){let r=i.match(/^([-+]?[\d.eE]+)(.*)$/);a.push(r?parseFloat(r[1]):0),o.push(r?r[2]:"");}u.push({fn:s[1],nums:a,units:o});}return u}function He(t,u,l){let s=ge(t),a=ge(u);return s.length===0||s.length!==a.length?l<1?t:u:s.map((o,m)=>{let i=a[m];return o.fn!==i.fn||o.nums.length!==i.nums.length?l<1?`${o.fn}(${o.nums.map((r,g)=>`${r}${o.units[g]}`).join(", ")})`:`${i.fn}(${i.nums.map((r,g)=>`${r}${i.units[g]}`).join(", ")})`:`${o.fn}(${o.nums.map((r,g)=>`${r+(i.nums[g]-r)*l}${o.units[g]}`).join(", ")})`}).join(" ")}function de(t,u,l){if(typeof t=="number"&&typeof u=="number")return String(t+(u-t)*l);let s=String(t),a=String(u);if(Ae(s))return a$3(s,a,l);if(s.includes("("))return He(s,a,l);let o=s.match(/^([-+]?[\d.]+)(.*)$/),m=a.match(/^([-+]?[\d.]+)(.*)$/);if(o&&m){let i=parseFloat(o[1]),r=parseFloat(m[1]);return `${i+(r-i)*l}${o[2]||m[2]}`}return l<1?s:a}function xe(t){return t.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`)}var Ce=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Fe=0,ye="--scroll-draw-progress";function Ne(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function je(t,u){let l={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return l;let{props:s,trigger:a$3={},easing:o="ease-out",speed:m=1,once:i=false,axis:r="y",scrollContainer:g,native:he=true,velocityScale:H=false,respectReducedMotion:ve=true,triggerElement:Ee,onProgress:J,onComplete:R,onEnter:K,onLeave:Q,onEnterBack:ee,onLeaveBack:te}=u,be=ve&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof o=="function"?o:d[o]??d["ease-out"],ne=a(a$3.start??"top bottom"),re=a(a$3.end??"bottom top"),x=Ee??t,d$2=typeof g=="string"?document.querySelector(g):g??null,y=Object.entries(s).map(([e,n])=>({prop:xe(e),from:Array.isArray(n)?n[0]:"",to:Array.isArray(n)?n[1]:n}));function we(){let e=window.getComputedStyle(t);for(let n of y)n.from===""&&(n.from=e.getPropertyValue(n.prop).trim()||"0");}function Se(){for(let e of y)t.style.setProperty(e.prop,String(e.to));}let V=new Map;for(let e of [...y.map(n=>n.prop),ye])V.set(e,t.style.getPropertyValue(e));function z(){for(let[e,n]of V)n?t.style.setProperty(e,n):t.style.removeProperty(e);}if(be)return Se(),R?.(),{...l,destroy:z,getProgress:()=>1};we();let oe=typeof o=="string"?b(o):null;function Te(){if(!he||!Ne()||!oe||r!=="y"||d$2||x!==t||i||m!==1||J||R||K||Q||ee||te||H!==false||(a$3.start??"top bottom").trim()!=="top bottom"||(a$3.end??"bottom top").trim()!=="bottom top")return false;for(let e of y)if(!Ce.has(e.prop))return false;return true}function Le(){let e=`ssd-a-${++Fe}`,n=y.map(f=>`${f.prop}:${f.from}`).join(";"),P=y.map(f=>`${f.prop}:${f.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${e}{from{${n}}to{${P}}}.${e}{animation-name:${e};animation-duration:auto;animation-timing-function:${oe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),t.classList.add(e);let c$1=()=>r==="x"?window.scrollX:window.scrollY,p=()=>r==="x"?window.innerWidth:window.innerHeight,M=()=>{let f=t.getBoundingClientRect();return c({top:f.top,height:f.height},c$1(),p(),ne,re)};a$1(t,{type:"animate",getProgress:()=>D.getProgress(),getTrigger:M});let D={refresh(){},destroy(){t.classList.remove(e),v.remove(),t.style.animationPlayState="",z(),b$3(t);},replay(){t.classList.remove(e),t.offsetWidth,t.classList.add(e);},pause(){t.style.animationPlayState="paused";},resume(){t.style.animationPlayState="";},seek(f){let _=Math.min(1,Math.max(0,f));t.classList.remove(e);for(let q of y)t.style.setProperty(q.prop,de(q.from,q.to,_));},getProgress(){let{tStart:f,tEnd:_}=M();return k(b$2(c$1(),f,_,m))}};return D}if(Te())return Le();let h=0,E=0,b$4=0,C=false,w=false,T=-1,L=0,F=false,S=NaN,O=-1,se=0,ie=()=>d$2?r==="x"?d$2.scrollLeft:d$2.scrollTop:r==="x"?window.scrollX:window.scrollY,Pe=()=>d$2?r==="x"?d$2.clientWidth:d$2.clientHeight:r==="x"?window.innerWidth:window.innerHeight,$=x===t?y:[],ae=false;function W(){let e=t.style,n=$.map(p=>e.getPropertyValue(p.prop)),P=e.transition;$.length&&(e.transition="none"),$.forEach(p=>e.setProperty(p.prop,V.get(p.prop)??""));let v=a$2(x,d$2,r);$.forEach((p,M)=>e.setProperty(p.prop,n[M])),$.length&&(t.offsetWidth,e.transition=P);let c$1=c(v,v.scroll,Pe(),ne,re);ae&&Math.abs(c$1.tStart-h)<1&&Math.abs(c$1.tEnd-E)<1||(ae=true,h=c$1.tStart,E=c$1.tEnd);}function N(e){t.style.setProperty(ye,String(e));for(let n of y)t.style.setProperty(n.prop,de(n.from,n.to,e));J?.(e);}function Me(e){if(isNaN(S)){S=e;return}S<=0&&e>0?K?.():S>0&&e<=0&&te?.(),S<1&&e>=1?Q?.():S>=1&&e<1&&ee?.(),S=e;}function B(){if(!C||w)return;let e=performance.now(),n=ie(),P=m;if(H!==false){let p=e-se,M=p>0?Math.abs(n-(O<0?n:O))/p:0;P=m*Math.max(.2,1+M*(typeof H=="number"?H:1)*.04);}O=n,se=e;let v=E===h?0:(n-h)/(E-h);Me(v);let c=k(b$2(n,h,E,P));i&&(T=Math.max(T,c),c=T),L=c,N(c),c>=1&&!F?(F=true,R?.()):c<1&&!i&&(F=false),b$4=requestAnimationFrame(B);}W(),E===h&&b$1("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`.",t);{let e=k(b$2(ie(),h,E,m));i&&e>0&&(T=e),L=e,N(e);}let le=new IntersectionObserver(e=>{e.forEach(n=>{C=n.isIntersecting,C&&!w?b$4=requestAnimationFrame(B):cancelAnimationFrame(b$4);});},{root:d$2??null}),j;function A(){clearTimeout(j),j=setTimeout(W,150);}window.addEventListener("resize",A),window.addEventListener("orientationchange",A);let $e=d$1([x],A);return le.observe(t),a$1(t,{type:"animate",getProgress:()=>L,getTrigger:()=>({tStart:h,tEnd:E})}),{destroy(){cancelAnimationFrame(b$4),le.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),$e(),clearTimeout(j),z(),b$3(t);},replay(){T=-1,F=false,L=0,w=false,N(0);},pause(){w=true,cancelAnimationFrame(b$4);},resume(){w&&(w=false,C&&(b$4=requestAnimationFrame(B)));},seek(e){let n=Math.min(1,Math.max(0,e));L=n,T=n,w=true,cancelAnimationFrame(b$4),N(n);},getProgress(){return L},refresh(){W();}}}export{je as a};
@@ -0,0 +1 @@
1
+ import {a,d as d$1,c,b as b$2}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';function B(n){let o=n.textContent??"";return n.textContent="",o.split(/(\s+)/).filter(Boolean).map(t=>{let e=document.createElement("span");return e.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(e.textContent=t,e.style.whiteSpace="pre"):(e.textContent=t,e.style.display="inline-block"),n.appendChild(e),/^\s+$/.test(t)?null:e}).filter(t=>t!==null)}function K(n){let o=n.textContent??"";return n.textContent="",o.split("").map(t=>{let e=document.createElement("span");return e.setAttribute("aria-hidden","true"),e.textContent=t,t===" "?e.style.whiteSpace="pre":e.style.display="inline-block",n.appendChild(e),t===" "?null:e}).filter(t=>t!==null)}function D(n){let o=B(n),t=new Map;for(let s of o){let i=s.offsetTop;t.has(i)||t.set(i,[]),t.get(i).push(s);}let e=[],c=Array.from(t.keys()).sort((s,i)=>s-i);for(let s of c){let i=t.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",i.forEach((y,T)=>{let m=y.nextElementSibling;l.appendChild(y),T<i.length-1&&m&&m.style.whiteSpace==="pre"&&l.appendChild(m);}),e.push(l);}return n.textContent="",e.forEach((s,i)=>{n.appendChild(s),i<e.length-1&&n.appendChild(document.createTextNode(" "));}),e}function Q(n,o,t,e){if(t<=1||e===0)return n;let c=(t-1)*e,s=o*e,i=s+(1-c);return i<=s?n>=s?1:0:Math.min(1,Math.max(0,(n-s)/(i-s)))}function Z(n,o){let t=[];if(o?.y!==void 0&&t.push(`translateY(${o.y*(1-n)}px)`),o?.x!==void 0&&t.push(`translateX(${o.x*(1-n)}px)`),o?.rotate!==void 0&&t.push(`rotate(${o.rotate*(1-n)}deg)`),o?.scale!==void 0){let e=o.scale+(1-o.scale)*n;t.push(`scale(${e})`);}return t.join(" ")||""}var R={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ie(n,o={}){if(typeof window>"u")return R;let t=typeof n=="string"?document.querySelector(n):n;if(!t)return b("scrollText: element not found:",n),R;let e=t,{split:c$1="words",stagger:s=.04,easing:i="ease-out",from:l={opacity:0,y:24},trigger:y={},once:T=true,onComplete:m}=o,Y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,_=typeof i=="function"?i:d[i]??d["ease-out"],j=a(y.start??"top 85%"),G=a(y.end??"top 40%"),S=e.innerHTML;e.setAttribute("aria-label",e.textContent??"");let d$2;c$1==="chars"?d$2=K(e):c$1==="lines"?d$2=D(e):d$2=B(e);let U=d$2.length;function V(r,a){l?.opacity!==void 0&&(r.style.opacity=String(l.opacity+(1-l.opacity)*a));let x=Z(a,l);x&&(r.style.transform=x);}function f(r){e.style.setProperty("--scroll-draw-progress",String(r)),d$2.forEach((a,x)=>{let J=_(Q(r,x,U,s));V(a,J);});}if(Y)return f(1),m?.(),{destroy(){e.innerHTML=S,e.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};f(0);let C=0,M=0,p=0,w=false,u=false,b$3=-1,g=0,E=false,I=()=>window.scrollY,W=()=>window.innerHeight;function F(){let r=e.getBoundingClientRect(),a=c({top:r.top,height:r.height},I(),W(),j,G);C=a.tStart,M=a.tEnd;}function L(){if(!w||u)return;let r=b$2(I(),C,M,1);T&&(b$3=Math.max(b$3,r),r=b$3),g=r,f(r),r>=1&&!E?(E=true,m?.()):r<1&&!T&&(E=false),p=requestAnimationFrame(L);}F();let P=new IntersectionObserver(r=>{r.forEach(a=>{w=a.isIntersecting,w&&!u?p=requestAnimationFrame(L):cancelAnimationFrame(p);});}),v;function h(){clearTimeout(v),v=setTimeout(()=>{if(c$1==="lines"){let r=g;e.innerHTML=S,e.setAttribute("aria-label",e.textContent??""),d$2=D(e),f(r);}F();},150);}window.addEventListener("resize",h),window.addEventListener("orientationchange",h);let X=d$1([e],h);return P.observe(e),a$1(e,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:C,tEnd:M})}),{destroy(){cancelAnimationFrame(p),P.disconnect(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),X(),clearTimeout(v),e.innerHTML=S,e.removeAttribute("aria-label"),b$1(e);},replay(){b$3=-1,E=false,g=0,u=false,f(0);},pause(){u=true,cancelAnimationFrame(p);},resume(){u&&(u=false,w&&(p=requestAnimationFrame(L)));},seek(r){let a=Math.min(1,Math.max(0,r));g=a,b$3=a,u=true,cancelAnimationFrame(p),f(a);},getProgress(){return g}}}export{ie as a};
@@ -0,0 +1 @@
1
+ import {a,b as b$1,d as d$1,c}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var C={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function X(m,H){if(typeof window>"u")return C;let E=typeof m=="string"?document.querySelector(m):m;if(!E)return b("scrollCounter: element not found:",m),C;let r=E,{from:T=0,to:A,format:_,easing:p="ease-out",trigger:F={},once:g=true,decimals:M,onComplete:x}=H,I=M!==void 0?e=>e.toFixed(M):_??(e=>String(Math.round(e))),P=typeof p=="function"?p:d[p]??d["ease-out"],B=a(F.start??"top 80%"),G=a(F.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r.textContent=I(A),x?.(),C;let a$2=0,c$1=0,z=false,n=0,u=false,o=false,i=-1,s=0,f=false,w=()=>window.scrollY,V=()=>window.innerHeight;function L(){let e=r.getBoundingClientRect(),t=c({top:e.top,height:e.height},w(),V(),B,G);z&&Math.abs(t.tStart-a$2)<1&&Math.abs(t.tEnd-c$1)<1||(z=true,a$2=t.tStart,c$1=t.tEnd);}function d$2(e){r.textContent=I(T+(A-T)*e),r.style.setProperty("--scroll-draw-progress",String(e));}function h(){if(!u||o)return;let e=P(b$1(w(),a$2,c$1,1));g&&(i=Math.max(i,e),e=i),s=e,d$2(e),e>=1&&!f?(f=true,x?.()):e<1&&!g&&(f=false),n=requestAnimationFrame(h);}L();{let e=P(b$1(w(),a$2,c$1,1));g&&e>0&&(i=e),s=e,d$2(e);}let O=new IntersectionObserver(e=>{e.forEach(t=>{u=t.isIntersecting,u&&!o?n=requestAnimationFrame(h):cancelAnimationFrame(n);});}),b$3;function l(){clearTimeout(b$3),b$3=setTimeout(L,150);}window.addEventListener("resize",l),window.addEventListener("orientationchange",l);let Y=d$1([r],l);return O.observe(r),a$1(r,{type:"counter",getProgress:()=>s,getTrigger:()=>({tStart:a$2,tEnd:c$1})}),{destroy(){cancelAnimationFrame(n),O.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("orientationchange",l),Y(),clearTimeout(b$3),b$2(r);},replay(){i=-1,f=false,s=0,o=false,d$2(0);},pause(){o=true,cancelAnimationFrame(n);},resume(){o&&(o=false,u&&(n=requestAnimationFrame(h)));},seek(e){let t=Math.min(1,Math.max(0,e));s=t,i=t,o=true,cancelAnimationFrame(n),d$2(t);},getProgress(){return s}}}export{X as a};
@@ -0,0 +1,3 @@
1
+ import {b as b$1,a as a$5}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a as a$1}from'./chunk-YZV4Z3EQ.mjs';import {a,d as d$1,c,b as b$3}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var dt={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 Lt=0;function Mt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function yt(r,w){let d="";try{d=getComputedStyle(r).getPropertyValue(w).trim();}catch{}return d||(r.getAttribute(w)??"").trim()}var ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Dt(r){if(!a$3)return;let w=yt(r,"stroke");if(!w||w==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let d=(r.getAttribute("fill")??"").trim();d&&!ht.has(d)&&!ht.has(yt(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function Ct(r,w,d){let b=document.createElement("div");b.setAttribute("data-svg-scroll-draw-debug",""),b.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 W(){let N=d==="x"?window.scrollX:window.scrollY,F=r-N,V=w-N,H=d==="x";b.innerHTML=`
2
+ <div style="position:absolute;${H?`left:${F}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${F}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${H?`left:${V}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${V}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(b),window.addEventListener("scroll",W,{passive:true}),W(),{el:b,destroy(){window.removeEventListener("scroll",W),b.remove();}}}var gt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Ot(r,w,d){if(!a$3)return;let b$1=(r.match(vt)??[]).join("").toUpperCase(),W=(w.match(vt)??[]).join("").toUpperCase(),N=(r.match(gt)??[]).length,F=(w.match(gt)??[]).length;if(b$1!==W){b(`morphTo: command sequence differs (${b$1||"\u2205"} \u2192 ${W||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,d);return}N!==F&&b(`morphTo: coordinate count differs (${N} \u2192 ${F}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,d);}function Ge(r,w,d){let b=(w.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),W=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,N=>{let F=parseFloat(N),V=b[W++]??F;return String(+(F+(V-F)*d).toFixed(4))})}function _t(r,w={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:d$2,...b$4}=w,W=d$2?{...dt[d$2],...b$4}:b$4,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:F="path, polyline, line, polygon, rect, circle",speed:V=1,fade:H=false,easing:de="linear",trigger:be={},stagger:J=0,direction:y="forward",once:K=false,debug:wt=false,axis:U="y",scrollContainer:Oe,autoReverse:$e=false,delay:ye=0,strokeColor:ee,strokeWidth:te,fillOpacity:re,waypoints:se,velocityScale:he=false,threshold:Be=0,rootMargin:_e="0px",repeat:oe=0,repeatDelay:Ne=0,morphTo:P,clip:Fe,autoplay:bt=false,duration:$t=1e3,native:Et=true,onProgress:ge,onStart:Ee,onComplete:le,onEnter:Ue,onLeave:je,onEnterBack:Xe,onLeaveBack:Ye}=W,j=Fe===true?"left":typeof Fe=="string"?Fe:false,ne=typeof de=="function"?de:d[de]??d.linear,Qe=a(be.start??"top bottom"),Ze=a(be.end??"bottom top"),R=typeof Oe=="string"?document.querySelector(Oe):Oe??null,q=Array.isArray(ee)?ee[0]:null,$=Array.isArray(ee)?ee[1]:typeof ee=="string"?ee:null,S=Array.isArray(te)?te[0]:null,E=Array.isArray(te)?te[1]:typeof te=="number"?te:null,x=Array.isArray(re)?re[0]:null,T=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function ie(e){let t=e*100;switch(j){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let p=j?[]:Array.from(r.querySelectorAll(F)),l=[],L=[],M=0,D=0,Te=J,Je=0,v=false,I=false,A=0,fe=false,X=-1,ve=[],ke=-1,h=false,G=0,_=0,Y,He=null;function Ke(){He?.destroy(),He=null;}let Q=new Set,et=NaN,Z=true,Se=-1,tt=performance.now(),ce=NaN;function xe(){return R?U==="x"?R.scrollLeft:R.scrollTop:U==="x"?window.scrollX:window.scrollY}function rt(){return R?U==="x"?R.clientWidth:R.clientHeight:U==="x"?window.innerWidth:window.innerHeight}function st(){let e=a$2(r,R,U);return c(e,e.scroll,rt(),Qe,Ze)}function Tt(){let e=D-M,t=p.length-1,o=R??document.documentElement,u=U==="x"?"Width":"Height";if(Te=J,J>0&&t>0&&e>0){let C=o[`scroll${u}`]-o[`client${u}`]-1-M-e/V;C>=0&&(Te=Math.min(J,C/(t*e)));}Je=D+t*Te*e;}function ot(){(({tStart:M,tEnd:D}=st())),Tt(),wt&&a$3&&(Ke(),He=Ct(M,D,U));}function Re(e,t=st){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let o=e.destroy;return e.destroy=()=>{o.call(e),b$2(r);},e}function kt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),j){let o=t==="reverse"?1-e:e;r.style.clipPath=ie(o);return}p.forEach((o,u)=>{o.style.strokeDashoffset=t==="reverse"?`${l[u]*e}`:`${l[u]*(1-e)}`,H&&(o.style.opacity=t==="reverse"?`${1-e}`:`${e}`),q&&$?o.style.stroke=a$5(q,$,e):$&&(o.style.stroke=$),S!==null&&E!==null?o.style.strokeWidth=`${S+(E-S)*e}`:E!==null&&(o.style.strokeWidth=`${E}`),x!==null&&T!==null?o.style.fillOpacity=`${x+(T-x)*e}`:T!==null&&(o.style.fillOpacity=`${T}`),P&&o.tagName.toLowerCase()==="path"&&L[u]&&o.setAttribute("d",Ge(L[u],P,e));});}function Ae(){if(r.style.setProperty("--scroll-draw-progress","0"),j){r.style.clipPath=ie(0);return}p.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=y==="reverse"?"0":`${l[t]}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(p.forEach(e=>{Dt(e);let t=a$1(e);l.push(t);let o=e.tagName.toLowerCase()==="path";o?L.push(e.getAttribute("d")??""):L.push(""),P&&(o?Ot(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),N?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?`${t}`:"0",H&&(e.style.opacity="1"),$&&(e.style.stroke=$),E!==null&&(e.style.strokeWidth=`${E}`),T!==null&&(e.style.fillOpacity=`${T}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?"0":`${t}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`));}),j){if(N)return r.style.clipPath=ie(1),le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ie(0);}else if(N)return le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let nt=typeof de=="string"?b$1(de):null;function St(){return !(Et===false||!Mt()||!p.length||!nt||j||U!=="y"||R||V!==1||J!==0||K||$e||he!==false||P||se||oe||ye>0||ge||Ee||le||Ue||je||Xe||Ye||ee!=null||te!=null||re!=null||(be.start??"top bottom").trim()!=="top bottom"||(be.end??"bottom top").trim()!=="bottom top")}function xt(){let e=++Lt,t=`svg-scroll-draw-${e}`,o=`svg-scroll-draw-host-${e}`,u=`--svg-scroll-draw-${e}`,C=y==="reverse"?"0":"var(--ssd-len)",B=y==="reverse"?"var(--ssd-len)":"0",z=`stroke-dashoffset:${C};`,i=`stroke-dashoffset:${B};`;H&&(z+=`opacity:${y==="reverse"?1:0};`,i+=`opacity:${y==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${z}}to{${i}}}.${o}{view-timeline-name:${u};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${nt};animation-fill-mode:both;animation-timeline:${u};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(o);function g(s,m){s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}p.forEach(g);let n=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:m,tEnd:O}=c({top:s.top,height:s.height},xe(),rt(),Qe,Ze);return ne(b$3(xe(),m,O,V))}return {destroy(){r.classList.remove(o),p.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){n=false,f=-1,p.forEach(g);},pause(){n=true,p.forEach(s=>{s.style.animationPlayState="paused";});},resume(){n&&(n=false,p.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let m=Math.min(1,Math.max(0,s));f=m,n=true,p.forEach((O,k)=>{O.classList.remove(t),O.style.strokeDashoffset=y==="reverse"?`${l[k]*m}`:`${l[k]*(1-m)}`,H&&(O.style.opacity=y==="reverse"?`${1-m}`:`${m}`);});},getProgress(){return c$1()},refresh(){p.forEach((s,m)=>{l[m]=a$1(s),s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`;});}}}if(St())return Re(xt());function At(){let e=Math.max(1,$t),t=0,o=0,u=false;function C(n){let f=true;if(j){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);G=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ie(y==="reverse"?1-s:s),ge?.(s),c<1&&(f=false);}else p.forEach((c,s)=>{let m=s*J*e,O=Math.min(1,Math.max(0,(n-m)/e)),k=ne(O);c.style.strokeDashoffset=y==="reverse"?`${l[s]*k}`:`${l[s]*(1-k)}`,H&&(c.style.opacity=y==="reverse"?`${1-k}`:`${k}`),q&&$?c.style.stroke=a$5(q,$,k):$&&(c.style.stroke=$),S!==null&&E!==null?c.style.strokeWidth=`${S+(E-S)*k}`:E!==null&&(c.style.strokeWidth=`${E}`),x!==null&&T!==null?c.style.fillOpacity=`${x+(T-x)*k}`:T!==null&&(c.style.fillOpacity=`${T}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",Ge(L[s],P,k)),s===0&&(G=k,ge?.(k),r.style.setProperty("--scroll-draw-progress",String(k))),O<1&&(f=false);});if(se){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);for(let m in se){let O=parseFloat(m);s>=O&&!Q.has(O)&&(Q.add(O),se[m]?.());}}return f}function B(n){if(h)return;let f=n-t;I||(I=true,Ee?.());let c=C(f);if(c&&!v){v=true,C(e*(1+Math.max(0,p.length-1)*J)),le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{t=performance.now(),I=false,v=false,Q.clear(),Ae(),A=requestAnimationFrame(B);},Ne));return}c||(A=requestAnimationFrame(B));}function z(){cancelAnimationFrame(A),clearTimeout(Y),t=performance.now(),o=0,h=false,I=false,v=false,_=0,u=true,G=0,Q.clear(),Ae(),A=requestAnimationFrame(B);}let i=new IntersectionObserver(n=>{n.forEach(f=>{f.isIntersecting&&!(K&&v)?z():!f.isIntersecting&&!K&&!v&&(cancelAnimationFrame(A),clearTimeout(Y),u=false);});},{root:R??null,threshold:Be,rootMargin:_e}),a;function g(){clearTimeout(a),a=setTimeout(()=>{p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),ye>0?setTimeout(()=>i.observe(r),ye):i.observe(r),{destroy(){cancelAnimationFrame(A),clearTimeout(Y),i.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(a);},replay(){_=0,z();},pause(){h||!u||(h=true,o=performance.now()-t,cancelAnimationFrame(A));},resume(){h&&(h=false,u=true,t=performance.now()-o,A=requestAnimationFrame(B));},seek(n){let f=Math.min(1,Math.max(0,n));G=f,h=true,o=f*e,t=performance.now()-o,cancelAnimationFrame(A),C(o);},getProgress(){return G},refresh(){clearTimeout(a),p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});}}}if(bt)return Re(At());ot();function it(){if(h||!ue)return;let e=performance.now(),t=xe();if(!Z&&he===false&&t===et){Ie(t);return}Z=false,et=t;let o=V;if(he!==false){let i=e-tt,a=i>0?Math.abs(t-(Se<0?t:Se))/i:0;o=V*Math.max(.2,1+a*(typeof he=="number"?he:1)*.04);}Se=t,tt=e;let u=$e?ke===-1||t>=ke?"forward":"reverse":y;ke=t;let C=D-M,B=true,z=C===0?0:(t-M)/C;if(isNaN(ce)||(ce<=0&&z>0?Ue?.():ce>0&&z<=0&&Ye?.(),ce<1&&z>=1?je?.():ce>=1&&z<1&&Xe?.()),ce=z,j){let i=ne(b$3(t,M,D,o));K&&!$e&&(X=Math.max(X,i),i=X),G=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=u==="reverse"?1-i:i;r.style.clipPath=ie(a),ge?.(i),!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),i>=1&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,I=false,v=false,r.style.clipPath=ie(0);},Ne))):i<1&&!K&&(v=false),Ie(t);return}if(p.forEach((i,a)=>{let g=a*Te*C,n=ne(b$3(t,M+g,D+g,o));K&&!$e&&(n=ve[a]=Math.max(ve[a]??X,n)),i.style.strokeDashoffset=u==="reverse"?`${l[a]*n}`:`${l[a]*(1-n)}`,H&&(i.style.opacity=u==="reverse"?`${1-n}`:`${n}`),q&&$?i.style.stroke=a$5(q,$,n):$&&(i.style.stroke=$),S!==null&&E!==null?i.style.strokeWidth=`${S+(E-S)*n}`:E!==null&&(i.style.strokeWidth=`${E}`),x!==null&&T!==null?i.style.fillOpacity=`${x+(T-x)*n}`:T!==null&&(i.style.fillOpacity=`${T}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",Ge(L[a],P,n)),a===0&&(G=n,ge?.(n),r.style.setProperty("--scroll-draw-progress",String(n))),n<1&&(B=false);}),se){let i=ne(b$3(t,M,D,o));for(let a in se){let g=parseFloat(a);i>=g&&!Q.has(g)&&(Q.add(g),se[a]?.());}}!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),B&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,ve=[],I=false,v=false,Q.clear(),Ae(),Z=true;},Ne))):!B&&!K&&(v=false),Ie(t);}function at(e){return e>=D&&e<Je}function Ie(e){fe||at(e)?A=requestAnimationFrame(it):ue=false;}let ue=false;function Pe(){ue||(ue=true,A=requestAnimationFrame(function(){it();}));}function Le(){ue=false,cancelAnimationFrame(A);}let ze=new IntersectionObserver(e=>{e.forEach(t=>{fe=t.isIntersecting,fe&&!h?(Z=true,Pe()):ue&&!h&&at(xe())||Le();});},{root:R??null,threshold:Be,rootMargin:_e});function lt(){p.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),ot(),Z=true;}let Me;function we(){clearTimeout(Me),Me=setTimeout(lt,150);}window.addEventListener("resize",we),window.addEventListener("orientationchange",we);let Pt=d$1([r],we);return ye>0?setTimeout(()=>ze.observe(r),ye):ze.observe(r),Re({destroy(){cancelAnimationFrame(A),clearTimeout(Y),Le(),ze.disconnect(),Pt(),window.removeEventListener("resize",we),window.removeEventListener("orientationchange",we),clearTimeout(Me),Ke();},replay(){X=-1,ve=[],ke=-1,Se=-1,I=false,v=false,_=0,h=false,G=0,Q.clear(),clearTimeout(Y),Ae(),Z=true,fe&&Pe();},pause(){h=true,Le();},resume(){h&&(h=false,Z=true,fe&&Pe());},seek(e){let t=Math.min(1,Math.max(0,e));G=t,X=t,ve=[],h=true,Le(),kt(t,y),Z=true;},getProgress(){return G},refresh(){clearTimeout(Me),lt(),fe&&!h&&Pe();}},()=>({tStart:M,tEnd:D}))}export{dt as a,_t as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-BFX2CSQ3.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function b(e,o){if(typeof window>"u")return n;let r=typeof e=="string"?document.querySelector(e):e;return r?a(r,o):(b$1("scrollAnimate: element not found:",e),n)}function P(e,o={}){if(typeof window>"u")return n;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return b$1("scrollParallax: element not found:",e),n;let{speed:c=.3,axis:p="y",easing:f="linear",trigger:u,onProgress:g}=o,i=-c*100,s=r.style,m=!!r.ownerSVGElement,y=s.getPropertyValue("transform-box");m&&s.setProperty("transform-box","fill-box");let l=a(r,{props:p==="x"?{transform:["translateX(0%)",`translateX(${i}%)`]}:{transform:["translateY(0%)",`translateY(${i}%)`]},trigger:u??{start:"top bottom",end:"bottom top"},easing:f,native:false,onProgress:g});return m?{...l,destroy(){l.destroy(),s.setProperty("transform-box",y);}}:l}export{b as a,P as b};
@@ -0,0 +1 @@
1
+ import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-7SBTYJGH.mjs';import {a as a$4}from'./chunk-I45LCJUP.mjs';import {a as a$2}from'./chunk-KHQ7OGQK.mjs';import {a as a$1}from'./chunk-BFX2CSQ3.mjs';import {b as b$2}from'./chunk-LQBXJRFY.mjs';import {defineComponent,ref,h as h$1,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o){let l=null,i=t(),s=()=>{l?.destroy(),l=e.value?o(e.value,b$1(i,()=>i)):null;};onMounted(s),watch(()=>a(i=t()),s),onUnmounted(()=>{l?.destroy(),l=null;});}function B(e={}){let t=ref(null);return r(t,()=>u(e),b$2),t}var g={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},b=[null,Boolean,[Boolean,String],[Boolean,Number]],T=e=>({type:e,default:void 0}),H=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(g).map(([e,t])=>[e,t?T(b[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let l={};for(let i in g){let s=e[i];s!=null&&(l[i]=s);}return l},b$2),()=>h$1("div",{ref:o},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var j=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h$1("div",{ref:o},t.default?.())}});function G(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var h=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:T(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h$1("span",{ref:t})}});function N(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var F=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h$1("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function q(e={}){let t=ref(null);return r(t,()=>u(e),a$4),t}var I=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$4),()=>h$1(e.tag,{ref:o},t.default?.())}});export{B as a,H as b,V as c,j as d,G as e,h as f,N as g,F as h,q as i,I as j};
@@ -1,4 +1,4 @@
1
- import { T as TriggerConfig, E as EasingName } from './types-DHU1zNEw.js';
1
+ import { T as TriggerConfig, E as EasingName } from './types-MswK0erX.js';
2
2
 
3
3
  interface ScrollAnimateOptions {
4
4
  props: Record<string, string | number | [string | number, string | number]>;
@@ -1,4 +1,4 @@
1
- import { T as TriggerConfig, E as EasingName } from './types-DHU1zNEw.mjs';
1
+ import { T as TriggerConfig, E as EasingName } from './types-MswK0erX.mjs';
2
2
 
3
3
  interface ScrollAnimateOptions {
4
4
  props: Record<string, string | number | [string | number, string | number]>;
@@ -1,3 +1,3 @@
1
- 'use strict';function Ht({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),c=0,m=[];for(let h=0;h<r;h++){let S=Math.pow(o,h);m.push(S),c+=S;}let i=[0],u=0;for(let h=0;h<r;h++)u+=m[h]/c,i.push(u);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let S=0;S<r;S++)if(h<=i[S+1]){let V=(h-i[S])/(i[S+1]-i[S]);if(S===0)return V*(2-V);let x=1-Math.pow(t,S);return x+(1-x)*(2*V-1)*(2*V-1)}return 1}}function Vt({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 c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var xe={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:Ht(),elastic:Vt()};function wt(e,n,r){return Math.min(r,Math.max(n,e))}function Ie(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 vt(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 Et(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 re(e,n,r,t){return r===n?0:wt((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,o){let c=vt(e.top,e.height,n,t.element)-Et(t.viewport,r),m=vt(e.top,e.height,n,o.element)-Et(o.viewport,r);return {tStart:c,tEnd:m}}function et(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 Oe(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 St(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 Re(e,n,r){let t=St(e),o=St(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 xt={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 We=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function fe(e,...n){We&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var zt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Wt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function qt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Gt(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 zt;case "ease-out":return Wt;case "ease-in-out":return qt()?Gt(xe["ease-in-out"]):null;default:return null}}var $t=Symbol.for("svg-scroll-draw.registry");function At(){let e=globalThis;return e[$t]||(e[$t]=new Map)}function qe(e,n){At().set(e,n);}function Ge(e){At().delete(e);}var Bt=0;function jt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Pt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Mt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ut(e){if(!We)return;let n=Pt(e,"stroke");if(!n||n==="none"){fe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Mt.has(r)&&!Mt.has(Pt(e,"fill"))&&fe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Xt(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 c=r==="x"?window.scrollX:window.scrollY,m=e-c,i=n-c,u=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${u?`left:${m}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${m}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}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 kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Lt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Yt(e,n,r){if(!We)return;let t=(e.match(Lt)??[]).join("").toUpperCase(),o=(n.match(Lt)??[]).join("").toUpperCase(),c=(e.match(kt)??[]).length,m=(n.match(kt)??[]).length;if(t!==o){fe(`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}c!==m&&fe(`morphTo: coordinate count differs (${c} \u2192 ${m}). 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),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let m=parseFloat(c),i=t[o++]??m;return String(+(m+(i-m)*r).toFixed(4))})}function ct(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...xt[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:h="linear",trigger:S={},stagger:V=0,direction:x="forward",once:me=false,debug:je=false,axis:K="y",scrollContainer:Me,autoReverse:Te=false,delay:he=0,strokeColor:ne,strokeWidth:pe,fillOpacity:J,waypoints:oe,velocityScale:be=false,threshold:Fe=0,rootMargin:X="0px",repeat:C=0,repeatDelay:_e=0,morphTo:z,clip:ke,autoplay:He=false,duration:Ue=1e3,native:rt=true,onProgress:$e,onStart:B,onComplete:W,onEnter:se,onLeave:Ae,onEnterBack:ie,onLeaveBack:de}=o,_=ke===true?"left":typeof ke=="string"?ke:false,Y=typeof h=="function"?h:xe[h]??xe.linear,ae=Ie(S.start??"top bottom"),Le=Ie(S.end??"bottom top"),j=typeof Me=="string"?document.querySelector(Me):Me??null,U=Array.isArray(ne)?ne[0]:null,O=Array.isArray(ne)?ne[1]:typeof ne=="string"?ne:null,R=Array.isArray(pe)?pe[0]:null,M=Array.isArray(pe)?pe[1]:typeof pe=="number"?pe:null,H=Array.isArray(J)?J[0]:null,D=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function le(s){let l=s*100;switch(_){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(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let T=_?[]:Array.from(e.querySelectorAll(m)),b=[],a=[],f=0,q=0,v=false,$=false,A=0,ee=false,Q=-1,I=[],we=-1,k=false,ce=0,ge=0,ve,nt=null;function ft(){nt?.destroy(),nt=null;}let Ee=new Set,mt=NaN,Se=true,Xe=-1,pt=performance.now(),De=NaN;function ot(){return j?K==="x"?j.scrollLeft:j.scrollTop:K==="x"?window.scrollX:window.scrollY}function dt(){return j?K==="x"?j.clientWidth:j.clientHeight:K==="x"?window.innerWidth:window.innerHeight}function gt(){let s=et(e,j,K);return Ce(s,s.scroll,dt(),ae,Le)}function yt(){(({tStart:f,tEnd:q}=gt())),je&&We&&(ft(),nt=Xt(f,q,K));}function st(s,l=gt){qe(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),Ge(e);},s}function Rt(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),_){let g=l==="reverse"?1-s:s;e.style.clipPath=le(g);return}T.forEach((g,N)=>{g.style.strokeDashoffset=l==="reverse"?`${b[N]*s}`:`${b[N]*(1-s)}`,u&&(g.style.opacity=l==="reverse"?`${1-s}`:`${s}`),U&&O?g.style.stroke=Re(U,O,s):O&&(g.style.stroke=O),R!==null&&M!==null?g.style.strokeWidth=`${R+(M-R)*s}`:M!==null&&(g.style.strokeWidth=`${M}`),H!==null&&D!==null?g.style.fillOpacity=`${H+(D-H)*s}`:D!==null&&(g.style.fillOpacity=`${D}`),z&&g.tagName.toLowerCase()==="path"&&a[N]&&g.setAttribute("d",lt(a[N],z,s));});}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=le(0);return}T.forEach((s,l)=>{s.style.strokeDasharray=`${b[l]}`,s.style.strokeDashoffset=x==="reverse"?"0":`${b[l]}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",U&&(s.style.stroke=U),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`),z&&s.tagName.toLowerCase()==="path"&&a[l]&&s.setAttribute("d",a[l]);});}if(T.forEach(s=>{Ut(s);let l=Oe(s);b.push(l);let g=s.tagName.toLowerCase()==="path";g?a.push(s.getAttribute("d")??""):a.push(""),z&&(g?Yt(a[a.length-1],z,s):fe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?`${l}`:"0",u&&(s.style.opacity="1"),O&&(s.style.stroke=O),M!==null&&(s.style.strokeWidth=`${M}`),D!==null&&(s.style.fillOpacity=`${D}`),z&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",z)):(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?"0":`${l}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",U&&(s.style.stroke=U),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`));}),_){if(c)return e.style.clipPath=le(1),W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=le(0);}else if(c)return W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ht=typeof h=="string"?tt(h):null;function Nt(){return !(rt===false||!jt()||!T.length||!ht||_||K!=="y"||j||i!==1||V!==0||me||Te||be!==false||z||oe||C||he>0||$e||B||W||se||Ae||ie||de||ne!=null||pe!=null||J!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Ft(){let s=++Bt,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,N=`--svg-scroll-draw-${s}`,ye=x==="reverse"?"0":"var(--ssd-len)",ue=x==="reverse"?"var(--ssd-len)":"0",te=`stroke-dashoffset:${ye};`,y=`stroke-dashoffset:${ue};`;u&&(te+=`opacity:${x==="reverse"?1:0};`,y+=`opacity:${x==="reverse"?0:1};`);let w=document.createElement("style");w.setAttribute("data-svg-scroll-draw",""),w.textContent=`@keyframes ${l}{from{${te}}to{${y}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${ht};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(w),e.classList.add(g);function F(p,L){p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`,p.style.strokeDashoffset="",p.style.opacity="",p.style.animationPlayState="",p.classList.add(l);}T.forEach(F);let d=false,E=-1;function P(){if(E>=0)return E;let p=e.getBoundingClientRect(),{tStart:L,tEnd:Z}=Ce({top:p.top,height:p.height},ot(),dt(),ae,Le);return Y(re(ot(),L,Z,i))}return {destroy(){e.classList.remove(g),T.forEach(p=>{p.classList.remove(l),p.style.removeProperty("--ssd-len"),p.style.animationPlayState="";}),w.remove();},replay(){d=false,E=-1,T.forEach(F);},pause(){d=true,T.forEach(p=>{p.style.animationPlayState="paused";});},resume(){d&&(d=false,T.forEach(p=>{p.style.animationPlayState="running";}));},seek(p){let L=Math.min(1,Math.max(0,p));E=L,d=true,T.forEach((Z,G)=>{Z.classList.remove(l),Z.style.strokeDashoffset=x==="reverse"?`${b[G]*L}`:`${b[G]*(1-L)}`,u&&(Z.style.opacity=x==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return P()},refresh(){T.forEach((p,L)=>{b[L]=Oe(p),p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`;});}}}if(Nt())return st(Ft());function _t(){let s=Math.max(1,Ue),l=0,g=0,N=false;function ye(d){let E=true;if(_){let P=Math.min(1,Math.max(0,d/s)),p=Y(P);ce=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=le(x==="reverse"?1-p:p),$e?.(p),P<1&&(E=false);}else T.forEach((P,p)=>{let L=p*V*s,Z=Math.min(1,Math.max(0,(d-L)/s)),G=Y(Z);P.style.strokeDashoffset=x==="reverse"?`${b[p]*G}`:`${b[p]*(1-G)}`,u&&(P.style.opacity=x==="reverse"?`${1-G}`:`${G}`),U&&O?P.style.stroke=Re(U,O,G):O&&(P.style.stroke=O),R!==null&&M!==null?P.style.strokeWidth=`${R+(M-R)*G}`:M!==null&&(P.style.strokeWidth=`${M}`),H!==null&&D!==null?P.style.fillOpacity=`${H+(D-H)*G}`:D!==null&&(P.style.fillOpacity=`${D}`),z&&P.tagName.toLowerCase()==="path"&&a[p]&&P.setAttribute("d",lt(a[p],z,G)),p===0&&(ce=G,$e?.(G),e.style.setProperty("--scroll-draw-progress",String(G))),Z<1&&(E=false);});if(oe){let P=Math.min(1,Math.max(0,d/s)),p=Y(P);for(let L in oe){let Z=parseFloat(L);p>=Z&&!Ee.has(Z)&&(Ee.add(Z),oe[L]?.());}}return E}function ue(d){if(k)return;let E=d-l;$||($=true,B?.());let P=ye(E);if(P&&!v){v=true,ye(s*(1+Math.max(0,T.length-1)*V)),W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{l=performance.now(),$=false,v=false,Ee.clear(),Ye(),A=requestAnimationFrame(ue);},_e));return}P||(A=requestAnimationFrame(ue));}function te(){cancelAnimationFrame(A),clearTimeout(ve),l=performance.now(),g=0,k=false,$=false,v=false,ge=0,N=true,ce=0,Ee.clear(),Ye(),A=requestAnimationFrame(ue);}let y=new IntersectionObserver(d=>{d.forEach(E=>{E.isIntersecting&&!(me&&v)?te():!E.isIntersecting&&!me&&!v&&(cancelAnimationFrame(A),clearTimeout(ve),N=false);});},{root:j??null,threshold:Fe,rootMargin:X}),w;function F(){clearTimeout(w),w=setTimeout(()=>{T.forEach((d,E)=>{b[E]=Oe(d),d.style.strokeDasharray=`${b[E]}`;});},150);}return window.addEventListener("resize",F),window.addEventListener("orientationchange",F),he>0?setTimeout(()=>y.observe(e),he):y.observe(e),{destroy(){cancelAnimationFrame(A),clearTimeout(ve),y.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){ge=0,te();},pause(){k||!N||(k=true,g=performance.now()-l,cancelAnimationFrame(A));},resume(){k&&(k=false,N=true,l=performance.now()-g,A=requestAnimationFrame(ue));},seek(d){let E=Math.min(1,Math.max(0,d));ce=E,k=true,g=E*s,l=performance.now()-g,cancelAnimationFrame(A),ye(g);},getProgress(){return ce},refresh(){clearTimeout(w),T.forEach((d,E)=>{b[E]=Oe(d),d.style.strokeDasharray=`${b[E]}`;});}}}if(He)return st(_t());yt();function Qe(){if(!ee||k)return;let s=performance.now(),l=ot();if(!Se&&be===false&&l===mt){A=requestAnimationFrame(Qe);return}Se=false,mt=l;let g=i;if(be!==false){let y=s-pt,w=y>0?Math.abs(l-(Xe<0?l:Xe))/y:0;g=i*Math.max(.2,1+w*(typeof be=="number"?be:1)*.04);}Xe=l,pt=s;let N=Te?we===-1||l>=we?"forward":"reverse":x;we=l;let ye=q-f,ue=true,te=ye===0?0:(l-f)/ye;if(isNaN(De)||(De<=0&&te>0?se?.():De>0&&te<=0&&de?.(),De<1&&te>=1?Ae?.():De>=1&&te<1&&ie?.()),De=te,_){let y=Y(re(l,f,q,g));me&&!Te&&(Q=Math.max(Q,y),y=Q),ce=y,e.style.setProperty("--scroll-draw-progress",String(y));let w=N==="reverse"?1-y:y;e.style.clipPath=le(w),$e?.(y),!$&&re(l,f,q,g)>0&&($=true,B?.()),y>=1&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{Q=-1,$=false,v=false,e.style.clipPath=le(0);},_e))):y<1&&!me&&(v=false),A=requestAnimationFrame(Qe);return}if(T.forEach((y,w)=>{let F=w*V*ye,d=Y(re(l,f+F,q+F,g));me&&!Te&&(d=I[w]=Math.max(I[w]??Q,d)),ce=d,y.style.strokeDashoffset=N==="reverse"?`${b[w]*d}`:`${b[w]*(1-d)}`,u&&(y.style.opacity=N==="reverse"?`${1-d}`:`${d}`),U&&O?y.style.stroke=Re(U,O,d):O&&(y.style.stroke=O),R!==null&&M!==null?y.style.strokeWidth=`${R+(M-R)*d}`:M!==null&&(y.style.strokeWidth=`${M}`),H!==null&&D!==null?y.style.fillOpacity=`${H+(D-H)*d}`:D!==null&&(y.style.fillOpacity=`${D}`),z&&y.tagName.toLowerCase()==="path"&&a[w]&&y.setAttribute("d",lt(a[w],z,d)),w===0&&($e?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(ue=false);}),oe){let y=Y(re(l,f,q,g));for(let w in oe){let F=parseFloat(w);y>=F&&!Ee.has(F)&&(Ee.add(F),oe[w]?.());}}!$&&re(l,f,q,g)>0&&($=true,B?.()),ue&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{Q=-1,I=[],$=false,v=false,Ee.clear(),Ye(),Se=true;},_e))):!ue&&!me&&(v=false),A=requestAnimationFrame(Qe);}let it=false;function Ze(){it||(it=true,A=requestAnimationFrame(function(){Qe();}));}function Ke(){it=false,cancelAnimationFrame(A);}let at=new IntersectionObserver(s=>{s.forEach(l=>{ee=l.isIntersecting,ee&&!k?(Se=true,Ze()):Ke();});},{root:j??null,threshold:Fe,rootMargin:X});function bt(){T.forEach((s,l)=>{b[l]=Oe(s),s.style.strokeDasharray=`${b[l]}`;}),yt(),Se=true;}let Je;function Ve(){clearTimeout(Je),Je=setTimeout(bt,150);}window.addEventListener("resize",Ve),window.addEventListener("orientationchange",Ve);let ze;return typeof ResizeObserver<"u"&&(ze=new ResizeObserver(()=>Ve()),ze.observe(document.body),ze.observe(document.documentElement),ze.observe(e)),he>0?setTimeout(()=>at.observe(e),he):at.observe(e),st({destroy(){cancelAnimationFrame(A),clearTimeout(ve),Ke(),at.disconnect(),ze?.disconnect(),window.removeEventListener("resize",Ve),window.removeEventListener("orientationchange",Ve),clearTimeout(Je),ft();},replay(){Q=-1,I=[],we=-1,Xe=-1,$=false,v=false,ge=0,k=false,ce=0,Ee.clear(),clearTimeout(ve),Ye(),Se=true,ee&&Ze();},pause(){k=true,Ke();},resume(){k&&(k=false,Se=true,ee&&Ze());},seek(s){let l=Math.min(1,Math.max(0,s));ce=l,Q=l,I=[],k=true,Ke(),Rt(l,x),Se=true;},getProgress(){return ce},refresh(){clearTimeout(Je),bt(),ee&&!k&&Ze();}},()=>({tStart:f,tEnd:q}))}function Qt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Dt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],m=t[2].trim();if(m)for(let i of m.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function Zt(e,n,r){let t=Dt(e),o=Dt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,m)=>{let i=o[m];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,h)=>`${u}${c.units[h]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,h)=>`${u}${i.units[h]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,h)=>`${u+(i.nums[h]-u)*r}${c.units[h]}`).join(", ")})`}).join(" ")}function ut(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Qt(t))return Re(t,o,r);if(t.includes("("))return Zt(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),m=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&m){let i=parseFloat(c[1]),u=parseFloat(m[1]);return `${i+(u-i)*r}${c[2]||m[2]}`}return r<1?t:o}function Kt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Jt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),er=0,It="--scroll-draw-progress";function tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:m=1,once:i=false,axis:u="y",scrollContainer:h,native:S=true,velocityScale:V=false,respectReducedMotion:x=true,triggerElement:me,onProgress:je,onComplete:K,onEnter:Me,onLeave:Te,onEnterBack:he,onLeaveBack:ne}=n,pe=x&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=typeof c=="function"?c:xe[c]??xe["ease-out"],oe=Ie(o.start??"top bottom"),be=Ie(o.end??"bottom top"),Fe=me??e,X=typeof h=="string"?document.querySelector(h):h??null,C=Object.entries(t).map(([a,f])=>({prop:Kt(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function _e(){let a=window.getComputedStyle(e);for(let f of C)f.from===""&&(f.from=a.getPropertyValue(f.prop).trim()||"0");}function z(){for(let a of C)e.style.setProperty(a.prop,String(a.to));}let ke=new Map;for(let a of [...C.map(f=>f.prop),It])ke.set(a,e.style.getPropertyValue(a));function He(){for(let[a,f]of ke)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(pe)return z(),K?.(),{...r,destroy:He,getProgress:()=>1};_e();let Ue=typeof c=="string"?tt(c):null;function rt(){if(!S||!tr()||!Ue||u!=="y"||X||Fe!==e||i||m!==1||je||K||Me||Te||he||ne||V!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let a of C)if(!Jt.has(a.prop))return false;return true}function $e(){let a=`ssd-a-${++er}`,f=C.map(I=>`${I.prop}:${I.from}`).join(";"),q=C.map(I=>`${I.prop}:${I.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${a}{from{${f}}to{${q}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(a);let $=()=>u==="x"?window.scrollX:window.scrollY,A=()=>u==="x"?window.innerWidth:window.innerHeight,ee=()=>{let I=e.getBoundingClientRect();return Ce({top:I.top,height:I.height},$(),A(),oe,be)};qe(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:ee});let Q={destroy(){e.classList.remove(a),v.remove(),e.style.animationPlayState="",He(),Ge(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(I){let we=Math.min(1,Math.max(0,I));e.classList.remove(a);for(let k of C)e.style.setProperty(k.prop,ut(k.from,k.to,we));},getProgress(){let{tStart:I,tEnd:we}=ee();return J(re($(),I,we,m))}};return Q}if(rt())return $e();let B=0,W=0,se=0,Ae=false,ie=false,de=-1,_=0,Y=false,ae=NaN,Le=-1,j=0,U=()=>X?u==="x"?X.scrollLeft:X.scrollTop:u==="x"?window.scrollX:window.scrollY,O=()=>X?u==="x"?X.clientWidth:X.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function R(){let a=et(Fe,X,u),f=Ce(a,a.scroll,O(),oe,be);B=f.tStart,W=f.tEnd;}function M(a){e.style.setProperty(It,String(a));for(let f of C)e.style.setProperty(f.prop,ut(f.from,f.to,a));je?.(a);}function H(a){if(isNaN(ae)){ae=a;return}ae<=0&&a>0?Me?.():ae>0&&a<=0&&ne?.(),ae<1&&a>=1?Te?.():ae>=1&&a<1&&he?.(),ae=a;}function D(){if(!Ae||ie)return;let a=performance.now(),f=U(),q=m;if(V!==false){let A=a-j,ee=A>0?Math.abs(f-(Le<0?f:Le))/A:0;q=m*Math.max(.2,1+ee*(typeof V=="number"?V:1)*.04);}Le=f,j=a;let v=W===B?0:(f-B)/(W-B);H(v);let $=J(re(f,B,W,q));i&&(de=Math.max(de,$),$=de),_=$,M($),$>=1&&!Y?(Y=true,K?.()):$<1&&!i&&(Y=false),se=requestAnimationFrame(D);}R(),W===B&&fe("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=J(re(U(),B,W,m));i&&a>0&&(de=a),_=a,M(a);}let le=new IntersectionObserver(a=>{a.forEach(f=>{Ae=f.isIntersecting,Ae&&!ie?se=requestAnimationFrame(D):cancelAnimationFrame(se);});},{root:X??null}),T;function b(){clearTimeout(T),T=setTimeout(R,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),le.observe(e),qe(e,{type:"animate",getProgress:()=>_,getTrigger:()=>({tStart:B,tEnd:W})}),{destroy(){cancelAnimationFrame(se),le.disconnect(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(T),He(),Ge(e);},replay(){de=-1,Y=false,_=0,ie=false,M(0);},pause(){ie=true,cancelAnimationFrame(se);},resume(){ie&&(ie=false,Ae&&(se=requestAnimationFrame(D)));},seek(a){let f=Math.min(1,Math.max(0,a));_=f,de=f,ie=true,cancelAnimationFrame(se),M(f);},getProgress(){return _}}}var Ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ot(e,n={}){if(typeof window>"u")return Ct;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return fe("scrollParallax: element not found:",e),Ct;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:m,onProgress:i}=n,u=r.getBoundingClientRect(),h=o==="x"?u.width:u.height,S=t*h;return Ne(r,{props:o==="x"?{transform:["translateX(0px)",`translateX(${-S}px)`]}:{transform:["translateY(0px)",`translateY(${-S}px)`]},trigger:m??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i})}function Be(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Pe={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function _r(e,n={}){if(typeof window>"u")return Pe;let r=Be(e).map(t=>ct(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function Hr(e,n={}){if(typeof window>"u")return Pe;let r=Be(e);if(r.length===0)return Pe;let t=0,o=[];function c(i){return ct(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Vr(e,n){if(typeof window>"u")return Pe;let r=Be(e).map(t=>Ne(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function zr(e,n){if(typeof window>"u")return Pe;let r=Be(e);if(r.length===0)return Pe;let t=0,o=[];function c(i){return Ne(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Wr(e,n={}){if(typeof window>"u")return Pe;let r=Be(e).map(t=>Ot(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=Vr;exports.scrollAnimateSequence=zr;exports.scrollDrawGroup=_r;exports.scrollDrawSequence=Hr;exports.scrollParallaxGroup=Wr;
1
+ 'use strict';function Qt({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),c=0,f=[];for(let y=0;y<r;y++){let $=Math.pow(o,y);f.push($),c+=$;}let i=[0],u=0;for(let y=0;y<r;y++)u+=f[y]/c,i.push(u);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let $=0;$<r;$++)if(y<=i[$+1]){let L=(y-i[$])/(i[$+1]-i[$]);if($===0)return L*(2-L);let w=1-Math.pow(t,$);return w+(1-w)*(2*L-1)*(2*L-1)}return 1}}function Zt({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 c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var $e={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:Qt(),elastic:Zt()};function At(e,n,r){return Math.min(r,Math.max(n,e))}function Ne(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 Mt(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 Lt(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 ie(e,n,r,t){return r===n?0:At((e-n)/(r-n)*t,0,1)}function Fe(e,n,r,t,o){let c=Mt(e.top,e.height,n,t.element)-Lt(t.viewport,r),f=Mt(e.top,e.height,n,o.element)-Lt(o.viewport,r);return {tStart:c,tEnd:f}}function ot(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 _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 kt(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 He(e,n,r){let t=kt(e),o=kt(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 Dt={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 qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function pe(e,...n){qe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Kt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Jt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",It=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<It;r++){let t=r/(It-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return Kt;case "ease-out":return Jt;case "ease-in-out":return er()?tr($e["ease-in-out"]):null;default:return null}}var Ct=Symbol.for("svg-scroll-draw.registry");function Ot(){let e=globalThis;return e[Ct]||(e[Ct]=new Map)}function Be(e,n){Ot().set(e,n);}function je(e){Ot().delete(e);}var Ue,it=new Set,at=new WeakMap,Xe=new Map,Rt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function rr(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 lt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ue??(Ue=new ResizeObserver(o=>{let c=false;for(let{target:f}of o)at.get(f)!==Rt(f)&&(c=true),at.set(f,"");c&&it.forEach(f=>f());})),it.add(r);let t=rr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{at.has(o)||at.set(o,Rt(o)),Xe.set(o,(Xe.get(o)??0)+1),Ue.observe(o);}),()=>{it.delete(r)&&(t.forEach(o=>{let c=(Xe.get(o)??1)-1;if(c)return void Xe.set(o,c);Xe.delete(o),Ue?.unobserve(o);}),it.size||(Ue?.disconnect(),Ue=void 0));}}var nr=0;function or(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Nt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ft=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function sr(e){if(!qe)return;let n=Nt(e,"stroke");if(!n||n==="none"){pe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ft.has(r)&&!Ft.has(Nt(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function ir(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 c=r==="x"?window.scrollX:window.scrollY,f=e-c,i=n-c,u=r==="x";t.innerHTML=`
2
+ <div style="position:absolute;${u?`left:${f}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${f}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}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 _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ht=/[MmLlHhVvCcSsQqTtAaZz]/g;function ar(e,n,r){if(!qe)return;let t=(e.match(Ht)??[]).join("").toUpperCase(),o=(n.match(Ht)??[]).join("").toUpperCase(),c=(e.match(_t)??[]).length,f=(n.match(_t)??[]).length;if(t!==o){pe(`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}c!==f&&pe(`morphTo: coordinate count differs (${c} \u2192 ${f}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let f=parseFloat(c),i=t[o++]??f;return String(+(f+(i-f)*r).toFixed(4))})}function gt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Dt[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:f="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:y="linear",trigger:$={},stagger:L=0,direction:w="forward",once:de=false,debug:Qe=false,axis:J="y",scrollContainer:Ie,autoReverse:Pe=false,delay:Ee=0,strokeColor:ae,strokeWidth:ge,fillOpacity:oe,waypoints:le,velocityScale:ve=false,threshold:Ae=0,rootMargin:ee="0px",repeat:N=0,repeatDelay:ze=0,morphTo:j,clip:Me,autoplay:We=false,duration:Ze=1e3,native:ct=true,onProgress:Le,onStart:U,onComplete:G,onEnter:ce,onLeave:ke,onEnterBack:ue,onLeaveBack:ye}=o,q=Me===true?"left":typeof Me=="string"?Me:false,te=typeof y=="function"?y:$e[y]??$e.linear,fe=Ne($.start??"top bottom"),Ce=Ne($.end??"bottom top"),X=typeof Ie=="string"?document.querySelector(Ie):Ie??null,K=Array.isArray(ae)?ae[0]:null,V=Array.isArray(ae)?ae[1]:typeof ae=="string"?ae:null,k=Array.isArray(ge)?ge[0]:null,F=Array.isArray(ge)?ge[1]:typeof ge=="number"?ge:null,_=Array.isArray(oe)?oe[0]:null,D=Array.isArray(oe)?oe[1]:typeof oe=="number"?oe:null;function he(s){let a=s*100;switch(q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let S=q?[]:Array.from(e.querySelectorAll(f)),E=[],z=[],O=0,Y=0,l=L,d=0,x=false,P=false,b=0,R=false,B=-1,be=[],H=-1,A=false,Q=0,we=0,Se,ut=null;function ht(){ut?.destroy(),ut=null;}let xe=new Set,bt=NaN,Te=true,Ke=-1,wt=performance.now(),Oe=NaN;function Je(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function Et(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function vt(){let s=ot(e,X,J);return Fe(s,s.scroll,Et(),fe,Ce)}function qt(){let s=Y-O,a=S.length-1,p=X??document.documentElement,I=J==="x"?"Width":"Height";if(l=L,L>0&&a>0&&s>0){let re=p[`scroll${I}`]-p[`client${I}`]-1-O-s/i;re>=0&&(l=Math.min(L,re/(a*s)));}d=Y+a*l*s;}function St(){(({tStart:O,tEnd:Y}=vt())),qt(),Qe&&qe&&(ht(),ut=ir(O,Y,J));}function ft(s,a=vt){Be(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let p=s.destroy;return s.destroy=()=>{p.call(s),je(e);},s}function Bt(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),q){let p=a==="reverse"?1-s:s;e.style.clipPath=he(p);return}S.forEach((p,I)=>{p.style.strokeDashoffset=a==="reverse"?`${E[I]*s}`:`${E[I]*(1-s)}`,u&&(p.style.opacity=a==="reverse"?`${1-s}`:`${s}`),K&&V?p.style.stroke=He(K,V,s):V&&(p.style.stroke=V),k!==null&&F!==null?p.style.strokeWidth=`${k+(F-k)*s}`:F!==null&&(p.style.strokeWidth=`${F}`),_!==null&&D!==null?p.style.fillOpacity=`${_+(D-_)*s}`:D!==null&&(p.style.fillOpacity=`${D}`),j&&p.tagName.toLowerCase()==="path"&&z[I]&&p.setAttribute("d",dt(z[I],j,s));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),q){e.style.clipPath=he(0);return}S.forEach((s,a)=>{s.style.strokeDasharray=`${E[a]}`,s.style.strokeDashoffset=w==="reverse"?"0":`${E[a]}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),_!==null&&(s.style.fillOpacity=`${_}`),j&&s.tagName.toLowerCase()==="path"&&z[a]&&s.setAttribute("d",z[a]);});}if(S.forEach(s=>{sr(s);let a=_e(s);E.push(a);let p=s.tagName.toLowerCase()==="path";p?z.push(s.getAttribute("d")??""):z.push(""),j&&(p?ar(z[z.length-1],j,s):pe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?`${a}`:"0",u&&(s.style.opacity="1"),V&&(s.style.stroke=V),F!==null&&(s.style.strokeWidth=`${F}`),D!==null&&(s.style.fillOpacity=`${D}`),j&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",j)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?"0":`${a}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),_!==null&&(s.style.fillOpacity=`${_}`));}),q){if(c)return e.style.clipPath=he(1),G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=he(0);}else if(c)return G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let xt=typeof y=="string"?st(y):null;function jt(){return !(ct===false||!or()||!S.length||!xt||q||J!=="y"||X||i!==1||L!==0||de||Pe||ve!==false||j||le||N||Ee>0||Le||U||G||ce||ke||ue||ye||ae!=null||ge!=null||oe!=null||($.start??"top bottom").trim()!=="top bottom"||($.end??"bottom top").trim()!=="bottom top")}function Ut(){let s=++nr,a=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,I=`--svg-scroll-draw-${s}`,re=w==="reverse"?"0":"var(--ssd-len)",me=w==="reverse"?"var(--ssd-len)":"0",se=`stroke-dashoffset:${re};`,h=`stroke-dashoffset:${me};`;u&&(se+=`opacity:${w==="reverse"?1:0};`,h+=`opacity:${w==="reverse"?0:1};`);let v=document.createElement("style");v.setAttribute("data-svg-scroll-draw",""),v.textContent=`@keyframes ${a}{from{${se}}to{${h}}}.${p}{view-timeline-name:${I};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${I};animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(p);function W(m,C){m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`,m.style.strokeDashoffset="",m.style.opacity="",m.style.animationPlayState="",m.classList.add(a);}S.forEach(W);let g=false,T=-1;function M(){if(T>=0)return T;let m=e.getBoundingClientRect(),{tStart:C,tEnd:ne}=Fe({top:m.top,height:m.height},Je(),Et(),fe,Ce);return te(ie(Je(),C,ne,i))}return {destroy(){e.classList.remove(p),S.forEach(m=>{m.classList.remove(a),m.style.removeProperty("--ssd-len"),m.style.animationPlayState="";}),v.remove();},replay(){g=false,T=-1,S.forEach(W);},pause(){g=true,S.forEach(m=>{m.style.animationPlayState="paused";});},resume(){g&&(g=false,S.forEach(m=>{m.style.animationPlayState="running";}));},seek(m){let C=Math.min(1,Math.max(0,m));T=C,g=true,S.forEach((ne,Z)=>{ne.classList.remove(a),ne.style.strokeDashoffset=w==="reverse"?`${E[Z]*C}`:`${E[Z]*(1-C)}`,u&&(ne.style.opacity=w==="reverse"?`${1-C}`:`${C}`);});},getProgress(){return M()},refresh(){S.forEach((m,C)=>{E[C]=_e(m),m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`;});}}}if(jt())return ft(Ut());function Xt(){let s=Math.max(1,Ze),a=0,p=0,I=false;function re(g){let T=true;if(q){let M=Math.min(1,Math.max(0,g/s)),m=te(M);Q=m,e.style.setProperty("--scroll-draw-progress",String(m)),e.style.clipPath=he(w==="reverse"?1-m:m),Le?.(m),M<1&&(T=false);}else S.forEach((M,m)=>{let C=m*L*s,ne=Math.min(1,Math.max(0,(g-C)/s)),Z=te(ne);M.style.strokeDashoffset=w==="reverse"?`${E[m]*Z}`:`${E[m]*(1-Z)}`,u&&(M.style.opacity=w==="reverse"?`${1-Z}`:`${Z}`),K&&V?M.style.stroke=He(K,V,Z):V&&(M.style.stroke=V),k!==null&&F!==null?M.style.strokeWidth=`${k+(F-k)*Z}`:F!==null&&(M.style.strokeWidth=`${F}`),_!==null&&D!==null?M.style.fillOpacity=`${_+(D-_)*Z}`:D!==null&&(M.style.fillOpacity=`${D}`),j&&M.tagName.toLowerCase()==="path"&&z[m]&&M.setAttribute("d",dt(z[m],j,Z)),m===0&&(Q=Z,Le?.(Z),e.style.setProperty("--scroll-draw-progress",String(Z))),ne<1&&(T=false);});if(le){let M=Math.min(1,Math.max(0,g/s)),m=te(M);for(let C in le){let ne=parseFloat(C);m>=ne&&!xe.has(ne)&&(xe.add(ne),le[C]?.());}}return T}function me(g){if(A)return;let T=g-a;P||(P=true,U?.());let M=re(T);if(M&&!x){x=true,re(s*(1+Math.max(0,S.length-1)*L)),G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{a=performance.now(),P=false,x=false,xe.clear(),et(),b=requestAnimationFrame(me);},ze));return}M||(b=requestAnimationFrame(me));}function se(){cancelAnimationFrame(b),clearTimeout(Se),a=performance.now(),p=0,A=false,P=false,x=false,we=0,I=true,Q=0,xe.clear(),et(),b=requestAnimationFrame(me);}let h=new IntersectionObserver(g=>{g.forEach(T=>{T.isIntersecting&&!(de&&x)?se():!T.isIntersecting&&!de&&!x&&(cancelAnimationFrame(b),clearTimeout(Se),I=false);});},{root:X??null,threshold:Ae,rootMargin:ee}),v;function W(){clearTimeout(v),v=setTimeout(()=>{S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});},150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),Ee>0?setTimeout(()=>h.observe(e),Ee):h.observe(e),{destroy(){cancelAnimationFrame(b),clearTimeout(Se),h.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(v);},replay(){we=0,se();},pause(){A||!I||(A=true,p=performance.now()-a,cancelAnimationFrame(b));},resume(){A&&(A=false,I=true,a=performance.now()-p,b=requestAnimationFrame(me));},seek(g){let T=Math.min(1,Math.max(0,g));Q=T,A=true,p=T*s,a=performance.now()-p,cancelAnimationFrame(b),re(p);},getProgress(){return Q},refresh(){clearTimeout(v),S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});}}}if(We)return ft(Xt());St();function Tt(){if(A||!Re)return;let s=performance.now(),a=Je();if(!Te&&ve===false&&a===bt){mt(a);return}Te=false,bt=a;let p=i;if(ve!==false){let h=s-wt,v=h>0?Math.abs(a-(Ke<0?a:Ke))/h:0;p=i*Math.max(.2,1+v*(typeof ve=="number"?ve:1)*.04);}Ke=a,wt=s;let I=Pe?H===-1||a>=H?"forward":"reverse":w;H=a;let re=Y-O,me=true,se=re===0?0:(a-O)/re;if(isNaN(Oe)||(Oe<=0&&se>0?ce?.():Oe>0&&se<=0&&ye?.(),Oe<1&&se>=1?ke?.():Oe>=1&&se<1&&ue?.()),Oe=se,q){let h=te(ie(a,O,Y,p));de&&!Pe&&(B=Math.max(B,h),h=B),Q=h,e.style.setProperty("--scroll-draw-progress",String(h));let v=I==="reverse"?1-h:h;e.style.clipPath=he(v),Le?.(h),!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),h>=1&&!x?(x=true,G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{B=-1,P=false,x=false,e.style.clipPath=he(0);},ze))):h<1&&!de&&(x=false),mt(a);return}if(S.forEach((h,v)=>{let W=v*l*re,g=te(ie(a,O+W,Y+W,p));de&&!Pe&&(g=be[v]=Math.max(be[v]??B,g)),h.style.strokeDashoffset=I==="reverse"?`${E[v]*g}`:`${E[v]*(1-g)}`,u&&(h.style.opacity=I==="reverse"?`${1-g}`:`${g}`),K&&V?h.style.stroke=He(K,V,g):V&&(h.style.stroke=V),k!==null&&F!==null?h.style.strokeWidth=`${k+(F-k)*g}`:F!==null&&(h.style.strokeWidth=`${F}`),_!==null&&D!==null?h.style.fillOpacity=`${_+(D-_)*g}`:D!==null&&(h.style.fillOpacity=`${D}`),j&&h.tagName.toLowerCase()==="path"&&z[v]&&h.setAttribute("d",dt(z[v],j,g)),v===0&&(Q=g,Le?.(g),e.style.setProperty("--scroll-draw-progress",String(g))),g<1&&(me=false);}),le){let h=te(ie(a,O,Y,p));for(let v in le){let W=parseFloat(v);h>=W&&!xe.has(W)&&(xe.add(W),le[v]?.());}}!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),me&&!x?(x=true,G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{B=-1,be=[],P=false,x=false,xe.clear(),et(),Te=true;},ze))):!me&&!de&&(x=false),mt(a);}function $t(s){return s>=Y&&s<d}function mt(s){R||$t(s)?b=requestAnimationFrame(Tt):Re=false;}let Re=false;function tt(){Re||(Re=true,b=requestAnimationFrame(function(){Tt();}));}function rt(){Re=false,cancelAnimationFrame(b);}let pt=new IntersectionObserver(s=>{s.forEach(a=>{R=a.isIntersecting,R&&!A?(Te=true,tt()):Re&&!A&&$t(Je())||rt();});},{root:X??null,threshold:Ae,rootMargin:ee});function Pt(){S.forEach((s,a)=>{E[a]=_e(s),s.style.strokeDasharray=`${E[a]}`;}),St(),Te=true;}let nt;function Ge(){clearTimeout(nt),nt=setTimeout(Pt,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let Yt=lt([e],Ge);return Ee>0?setTimeout(()=>pt.observe(e),Ee):pt.observe(e),ft({destroy(){cancelAnimationFrame(b),clearTimeout(Se),rt(),pt.disconnect(),Yt(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(nt),ht();},replay(){B=-1,be=[],H=-1,Ke=-1,P=false,x=false,we=0,A=false,Q=0,xe.clear(),clearTimeout(Se),et(),Te=true,R&&tt();},pause(){A=true,rt();},resume(){A&&(A=false,Te=true,R&&tt());},seek(s){let a=Math.min(1,Math.max(0,s));Q=a,B=a,be=[],A=true,rt(),Bt(a,w),Te=true;},getProgress(){return Q},refresh(){clearTimeout(nt),Pt(),R&&!A&&tt();}},()=>({tStart:O,tEnd:Y}))}function lr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Vt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],f=t[2].trim();if(f)for(let i of f.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function cr(e,n,r){let t=Vt(e),o=Vt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,f)=>{let i=o[f];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,y)=>`${u}${c.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,y)=>`${u}${i.units[y]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,y)=>`${u+(i.nums[y]-u)*r}${c.units[y]}`).join(", ")})`}).join(" ")}function yt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(lr(t))return He(t,o,r);if(t.includes("("))return cr(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),f=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&f){let i=parseFloat(c[1]),u=parseFloat(f[1]);return `${i+(u-i)*r}${c[2]||f[2]}`}return r<1?t:o}function ur(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var fr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),mr=0,zt="--scroll-draw-progress";function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ve(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:f=1,once:i=false,axis:u="y",scrollContainer:y,native:$=true,velocityScale:L=false,respectReducedMotion:w=true,triggerElement:de,onProgress:Qe,onComplete:J,onEnter:Ie,onLeave:Pe,onEnterBack:Ee,onLeaveBack:ae}=n,ge=w&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,oe=typeof c=="function"?c:$e[c]??$e["ease-out"],le=Ne(o.start??"top bottom"),ve=Ne(o.end??"bottom top"),Ae=de??e,ee=typeof y=="string"?document.querySelector(y):y??null,N=Object.entries(t).map(([l,d])=>({prop:ur(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function ze(){let l=window.getComputedStyle(e);for(let d of N)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function j(){for(let l of N)e.style.setProperty(l.prop,String(l.to));}let Me=new Map;for(let l of [...N.map(d=>d.prop),zt])Me.set(l,e.style.getPropertyValue(l));function We(){for(let[l,d]of Me)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if(ge)return j(),J?.(),{...r,destroy:We,getProgress:()=>1};ze();let Ze=typeof c=="string"?st(c):null;function ct(){if(!$||!pr()||!Ze||u!=="y"||ee||Ae!==e||i||f!==1||Qe||J||Ie||Pe||Ee||ae||L!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of N)if(!fr.has(l.prop))return false;return true}function Le(){let l=`ssd-a-${++mr}`,d=N.map(H=>`${H.prop}:${H.from}`).join(";"),x=N.map(H=>`${H.prop}:${H.to}`).join(";"),P=document.createElement("style");P.setAttribute("data-ssd-animate",""),P.textContent=`@keyframes ${l}{from{${d}}to{${x}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Ze};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(P),e.classList.add(l);let b=()=>u==="x"?window.scrollX:window.scrollY,R=()=>u==="x"?window.innerWidth:window.innerHeight,B=()=>{let H=e.getBoundingClientRect();return Fe({top:H.top,height:H.height},b(),R(),le,ve)};Be(e,{type:"animate",getProgress:()=>be.getProgress(),getTrigger:B});let be={refresh(){},destroy(){e.classList.remove(l),P.remove(),e.style.animationPlayState="",We(),je(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(H){let A=Math.min(1,Math.max(0,H));e.classList.remove(l);for(let Q of N)e.style.setProperty(Q.prop,yt(Q.from,Q.to,A));},getProgress(){let{tStart:H,tEnd:A}=B();return oe(ie(b(),H,A,f))}};return be}if(ct())return Le();let U=0,G=0,ce=0,ke=false,ue=false,ye=-1,q=0,te=false,fe=NaN,Ce=-1,X=0,K=()=>ee?u==="x"?ee.scrollLeft:ee.scrollTop:u==="x"?window.scrollX:window.scrollY,V=()=>ee?u==="x"?ee.clientWidth:ee.clientHeight:u==="x"?window.innerWidth:window.innerHeight,k=Ae===e?N:[],F=false;function _(){let l=e.style,d=k.map(R=>l.getPropertyValue(R.prop)),x=l.transition;k.length&&(l.transition="none"),k.forEach(R=>l.setProperty(R.prop,Me.get(R.prop)??""));let P=ot(Ae,ee,u);k.forEach((R,B)=>l.setProperty(R.prop,d[B])),k.length&&(e.offsetWidth,l.transition=x);let b=Fe(P,P.scroll,V(),le,ve);F&&Math.abs(b.tStart-U)<1&&Math.abs(b.tEnd-G)<1||(F=true,U=b.tStart,G=b.tEnd);}function D(l){e.style.setProperty(zt,String(l));for(let d of N)e.style.setProperty(d.prop,yt(d.from,d.to,l));Qe?.(l);}function he(l){if(isNaN(fe)){fe=l;return}fe<=0&&l>0?Ie?.():fe>0&&l<=0&&ae?.(),fe<1&&l>=1?Pe?.():fe>=1&&l<1&&Ee?.(),fe=l;}function S(){if(!ke||ue)return;let l=performance.now(),d=K(),x=f;if(L!==false){let R=l-X,B=R>0?Math.abs(d-(Ce<0?d:Ce))/R:0;x=f*Math.max(.2,1+B*(typeof L=="number"?L:1)*.04);}Ce=d,X=l;let P=G===U?0:(d-U)/(G-U);he(P);let b=oe(ie(d,U,G,x));i&&(ye=Math.max(ye,b),b=ye),q=b,D(b),b>=1&&!te?(te=true,J?.()):b<1&&!i&&(te=false),ce=requestAnimationFrame(S);}_(),G===U&&pe("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 l=oe(ie(K(),U,G,f));i&&l>0&&(ye=l),q=l,D(l);}let E=new IntersectionObserver(l=>{l.forEach(d=>{ke=d.isIntersecting,ke&&!ue?ce=requestAnimationFrame(S):cancelAnimationFrame(ce);});},{root:ee??null}),z;function O(){clearTimeout(z),z=setTimeout(_,150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let Y=lt([Ae],O);return E.observe(e),Be(e,{type:"animate",getProgress:()=>q,getTrigger:()=>({tStart:U,tEnd:G})}),{destroy(){cancelAnimationFrame(ce),E.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),Y(),clearTimeout(z),We(),je(e);},replay(){ye=-1,te=false,q=0,ue=false,D(0);},pause(){ue=true,cancelAnimationFrame(ce);},resume(){ue&&(ue=false,ke&&(ce=requestAnimationFrame(S)));},seek(l){let d=Math.min(1,Math.max(0,l));q=d,ye=d,ue=true,cancelAnimationFrame(ce),D(d);},getProgress(){return q},refresh(){_();}}}var Wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Gt(e,n={}){if(typeof window>"u")return Wt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return pe("scrollParallax: element not found:",e),Wt;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:f,onProgress:i}=n,u=-t*100,y=r.style,$=!!r.ownerSVGElement,L=y.getPropertyValue("transform-box");$&&y.setProperty("transform-box","fill-box");let w=Ve(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${u}%)`]}:{transform:["translateY(0%)",`translateY(${u}%)`]},trigger:f??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i});return $?{...w,destroy(){w.destroy(),y.setProperty("transform-box",L);}}:w}function Ye(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var De={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jr(e,n={}){if(typeof window>"u")return De;let r=Ye(e).map(t=>gt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function en(e,n={}){if(typeof window>"u")return De;let r=Ye(e);if(r.length===0)return De;let t=0,o=[];function c(i){return gt(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function tn(e,n){if(typeof window>"u")return De;let r=Ye(e).map(t=>Ve(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function rn(e,n){if(typeof window>"u")return De;let r=Ye(e);if(r.length===0)return De;let t=0,o=[];function c(i){return Ve(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function nn(e,n={}){if(typeof window>"u")return De;let r=Ye(e).map(t=>Gt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=tn;exports.scrollAnimateSequence=rn;exports.scrollDrawGroup=Jr;exports.scrollDrawSequence=en;exports.scrollParallaxGroup=nn;
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-DHU1zNEw.mjs';
2
- import { S as ScrollParallaxOptions } from '../index-CGR7pSOR.mjs';
3
- import { S as ScrollAnimateOptions } from '../engine-Ci08nM91.mjs';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
+ import { S as ScrollParallaxOptions } from '../index-CMqK0GCT.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
4
4
 
5
5
  /**
6
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-DHU1zNEw.js';
2
- import { S as ScrollParallaxOptions } from '../index-BVuNgQSd.js';
3
- import { S as ScrollAnimateOptions } from '../engine-6AXEX8CL.js';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
+ import { S as ScrollParallaxOptions } from '../index-DPqPEnO-.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
4
4
 
5
5
  /**
6
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -1 +1 @@
1
- import {b as b$1}from'../chunk-KBFWDHF4.mjs';import {a as a$1}from'../chunk-QJ4H2HW3.mjs';import {b}from'../chunk-LINFV2GK.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
1
+ import {b as b$1}from'../chunk-MTEGM4RR.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
@@ -1 +1 @@
1
- 'use strict';function _e({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),a=Math.sqrt(n),i=0,l=[];for(let c=0;c<r;c++){let f=Math.pow(a,c);l.push(f),i+=f;}let m=[0],u=0;for(let c=0;c<r;c++)u+=l[c]/i,m.push(u);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let f=0;f<r;f++)if(c<=m[f+1]){let g=(c-m[f])/(m[f+1]-m[f]);if(f===0)return g*(2-g);let E=1-Math.pow(n,f);return E+(1-E)*(2*g-1)*(2*g-1)}return 1}}function He({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),a=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-a)*(2*Math.PI)/n)+1}var C={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:_e(),elastic:He()};function pe(e,t,r){return Math.min(r,Math.max(t,e))}function Y(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}function fe(e,t,r,n){switch(n){case "top":return e+r;case "center":return e+r+t/2;case "bottom":return e+r+t;default:return e+r}}function ge(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 W(e,t,r,n){return r===t?0:pe((e-t)/(r-t)*n,0,1)}function K(e,t,r,n,a){let i=fe(e.top,e.height,t,n.element)-ge(n.viewport,r),l=fe(e.top,e.height,t,a.element)-ge(a.viewport,r);return {tStart:i,tEnd:l}}function de(e,t,r){let n=e.getBoundingClientRect(),a=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:a,scroll:0}:{top:r==="x"?n.left:n.top,height:a,scroll:r==="x"?window.scrollX:window.scrollY}}function be(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 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function ye(e,t,r){let n=be(e),a=be(t);return !n||!a?e:`rgb(${Math.round(n[0]+(a[0]-n[0])*r)},${Math.round(n[1]+(a[1]-n[1])*r)},${Math.round(n[2]+(a[2]-n[2])*r)})`}var Ne="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",ze="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",he=33;function De(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Fe(e){let t=[];for(let r=0;r<he;r++){let n=r/(he-1);t.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${t.join(",")})`}function Ee(e){switch(e){case "linear":return "linear";case "ease-in":return Ne;case "ease-out":return ze;case "ease-in-out":return De()?Fe(C["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 Z(e,t){Se().set(e,t);}function J(e){Se().delete(e);}var Oe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function _(e,...t){Oe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function Ve(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function ve(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let a=[],i=[],l=n[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);a.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:n[1],nums:a,units:i});}return t}function We(e,t,r){let n=ve(e),a=ve(t);return n.length===0||n.length!==a.length?r<1?e:t:n.map((i,l)=>{let m=a[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?r<1?`${i.fn}(${i.nums.map((u,c)=>`${u}${i.units[c]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,c)=>`${u}${m.units[c]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,c)=>`${u+(m.nums[c]-u)*r}${i.units[c]}`).join(", ")})`}).join(" ")}function Me(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),a=String(t);if(Ve(n))return ye(n,a,r);if(n.includes("("))return We(n,a,r);let i=n.match(/^([-+]?[\d.]+)(.*)$/),l=a.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),u=parseFloat(l[1]);return `${m+(u-m)*r}${i[2]||l[2]}`}return r<1?n:a}function ke(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Be=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),qe=0,xe="--scroll-draw-progress";function je(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function ee(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:a={},easing:i="ease-out",speed:l=1,once:m=false,axis:u="y",scrollContainer:c,native:f=true,velocityScale:g=false,respectReducedMotion:E=true,triggerElement:I,onProgress:b,onComplete:P,onEnter:p,onLeave:R,onEnterBack:te,onLeaveBack:ne}=t,Pe=E&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof i=="function"?i:C[i]??C["ease-out"],re=Y(a.start??"top bottom"),oe=Y(a.end??"bottom top"),se=I??e,y=typeof c=="string"?document.querySelector(c):c??null,w=Object.entries(n).map(([o,s])=>({prop:ke(o),from:Array.isArray(s)?s[0]:"",to:Array.isArray(s)?s[1]:s}));function Le(){let o=window.getComputedStyle(e);for(let s of w)s.from===""&&(s.from=o.getPropertyValue(s.prop).trim()||"0");}function Ae(){for(let o of w)e.style.setProperty(o.prop,String(o.to));}let ie=new Map;for(let o of [...w.map(s=>s.prop),xe])ie.set(o,e.style.getPropertyValue(o));function B(){for(let[o,s]of ie)s?e.style.setProperty(o,s):e.style.removeProperty(o);}if(Pe)return Ae(),P?.(),{...r,destroy:B,getProgress:()=>1};Le();let ae=typeof i=="string"?Ee(i):null;function $e(){if(!f||!je()||!ae||u!=="y"||y||se!==e||m||l!==1||b||P||p||R||te||ne||g!==false||(a.start??"top bottom").trim()!=="top bottom"||(a.end??"bottom top").trim()!=="bottom top")return false;for(let o of w)if(!Be.has(o.prop))return false;return true}function Ie(){let o=`ssd-a-${++qe}`,s=w.map(d=>`${d.prop}:${d.from}`).join(";"),F=w.map(d=>`${d.prop}:${d.to}`).join(";"),$=document.createElement("style");$.setAttribute("data-ssd-animate",""),$.textContent=`@keyframes ${o}{from{${s}}to{${F}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ae};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild($),e.classList.add(o);let h=()=>u==="x"?window.scrollX:window.scrollY,O=()=>u==="x"?window.innerWidth:window.innerHeight,V=()=>{let d=e.getBoundingClientRect();return K({top:d.top,height:d.height},h(),O(),re,oe)};Z(e,{type:"animate",getProgress:()=>X.getProgress(),getTrigger:V});let X={destroy(){e.classList.remove(o),$.remove(),e.style.animationPlayState="",B(),J(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let U=Math.min(1,Math.max(0,d));e.classList.remove(o);for(let Q of w)e.style.setProperty(Q.prop,Me(Q.from,Q.to,U));},getProgress(){let{tStart:d,tEnd:U}=V();return k(W(h(),d,U,l))}};return X}if($e())return Ie();let S=0,v=0,M=0,H=false,x=false,L=-1,A=0,N=false,T=NaN,q=-1,ue=0,le=()=>y?u==="x"?y.scrollLeft:y.scrollTop:u==="x"?window.scrollX:window.scrollY,Re=()=>y?u==="x"?y.clientWidth:y.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function ce(){let o=de(se,y,u),s=K(o,o.scroll,Re(),re,oe);S=s.tStart,v=s.tEnd;}function z(o){e.style.setProperty(xe,String(o));for(let s of w)e.style.setProperty(s.prop,Me(s.from,s.to,o));b?.(o);}function Ce(o){if(isNaN(T)){T=o;return}T<=0&&o>0?p?.():T>0&&o<=0&&ne?.(),T<1&&o>=1?R?.():T>=1&&o<1&&te?.(),T=o;}function j(){if(!H||x)return;let o=performance.now(),s=le(),F=l;if(g!==false){let O=o-ue,V=O>0?Math.abs(s-(q<0?s:q))/O:0;F=l*Math.max(.2,1+V*(typeof g=="number"?g:1)*.04);}q=s,ue=o;let $=v===S?0:(s-S)/(v-S);Ce($);let h=k(W(s,S,v,F));m&&(L=Math.max(L,h),h=L),A=h,z(h),h>=1&&!N?(N=true,P?.()):h<1&&!m&&(N=false),M=requestAnimationFrame(j);}ce(),v===S&&_("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=k(W(le(),S,v,l));m&&o>0&&(L=o),A=o,z(o);}let me=new IntersectionObserver(o=>{o.forEach(s=>{H=s.isIntersecting,H&&!x?M=requestAnimationFrame(j):cancelAnimationFrame(M);});},{root:y??null}),G;function D(){clearTimeout(G),G=setTimeout(ce,150);}return window.addEventListener("resize",D),window.addEventListener("orientationchange",D),me.observe(e),Z(e,{type:"animate",getProgress:()=>A,getTrigger:()=>({tStart:S,tEnd:v})}),{destroy(){cancelAnimationFrame(M),me.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),clearTimeout(G),B(),J(e);},replay(){L=-1,N=false,A=0,x=false,z(0);},pause(){x=true,cancelAnimationFrame(M);},resume(){x&&(x=false,H&&(M=requestAnimationFrame(j)));},seek(o){let s=Math.min(1,Math.max(0,o));A=s,L=s,x=true,cancelAnimationFrame(M),z(s);},getProgress(){return A}}}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function pt(e,t={}){if(typeof window>"u")return Te;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return _("scrollHorizontal: track element not found:",e),Te;let n=r,{easing:a="linear",trigger:i={start:"top top",end:"bottom bottom"},scrollContainer:l,respectReducedMotion:m=false,onProgress:u}=t;function c(){let p=typeof l=="string"?document.querySelector(l):l??null;return p?p.clientWidth:window.innerWidth}function f(){return t.distance??n.scrollWidth-c()}function g(){if(t.triggerElement!==void 0){let p=typeof t.triggerElement=="string"?document.querySelector(t.triggerElement):t.triggerElement;if(p)return p;_("scrollHorizontal: triggerElement not found:",t.triggerElement);}for(let p=n.parentElement;p;p=p.parentElement)if(window.getComputedStyle(p).position==="sticky")return p.parentElement??p;return n}let E=f(),I=g(),b=ee(n,P(E,I));function P(p,R){return {props:{transform:["translateX(0px)",`translateX(${-p}px)`]},trigger:i,easing:a,native:false,respectReducedMotion:m,...R!==n&&{triggerElement:R},...l!==void 0&&{scrollContainer:l},...u!==void 0&&{onProgress:u}}}return {destroy(){b.destroy();},replay(){b.replay();},pause(){b.pause();},resume(){b.resume();},seek(p){b.seek(p);},getProgress(){return b.getProgress()},refresh(){b.destroy(),E=f(),I=g(),b=ee(n,P(E,I));}}}exports.scrollHorizontal=pt;
1
+ 'use strict';function ke({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),i=Math.sqrt(n),s=0,u=[];for(let l=0;l<r;l++){let p=Math.pow(i,l);u.push(p),s+=p;}let f=[0],c=0;for(let l=0;l<r;l++)c+=u[l]/s,f.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<r;p++)if(l<=f[p+1]){let w=(l-f[p])/(f[p+1]-f[p]);if(p===0)return w*(2-w);let P=1-Math.pow(n,p);return P+(1-P)*(2*w-1)*(2*w-1)}return 1}}function Be({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),i=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/n)+1}var j={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ke(),elastic:Be()};function Se(e,t,r){return Math.min(r,Math.max(t,e))}function fe(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}function Me(e,t,r,n){switch(n){case "top":return e+r;case "center":return e+r+t/2;case "bottom":return e+r+t;default:return e+r}}function Te(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 J(e,t,r,n){return r===t?0:Se((e-t)/(r-t)*n,0,1)}function pe(e,t,r,n,i){let s=Me(e.top,e.height,t,n.element)-Te(n.viewport,r),u=Me(e.top,e.height,t,i.element)-Te(i.viewport,r);return {tStart:s,tEnd:u}}function xe(e,t,r){let n=e.getBoundingClientRect(),i=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:i,scroll:0}:{top:r==="x"?n.left:n.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function Le(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 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Pe(e,t,r){let n=Le(e),i=Le(t);return !n||!i?e:`rgb(${Math.round(n[0]+(i[0]-n[0])*r)},${Math.round(n[1]+(i[1]-n[1])*r)},${Math.round(n[2]+(i[2]-n[2])*r)})`}var qe="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",je="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 Xe(e){let t=[];for(let r=0;r<Re;r++){let n=r/(Re-1);t.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${t.join(",")})`}function $e(e){switch(e){case "linear":return "linear";case "ease-in":return qe;case "ease-out":return je;case "ease-in-out":return Ge()?Xe(j["ease-in-out"]):null;default:return null}}var Ae=Symbol.for("svg-scroll-draw.registry");function Ce(){let e=globalThis;return e[Ae]||(e[Ae]=new Map)}function ge(e,t){Ce().set(e,t);}function de(e){Ce().delete(e);}var Ue=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function G(e,...t){Ue&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var X,ee=new Set,te=new WeakMap,U=new Map,Ie=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ye(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function ne(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();X??(X=new ResizeObserver(i=>{let s=false;for(let{target:u}of i)te.get(u)!==Ie(u)&&(s=true),te.set(u,"");s&&ee.forEach(u=>u());})),ee.add(r);let n=Ye(e);return [document.body,document.documentElement].forEach(i=>i&&n.add(i)),n.forEach(i=>{te.has(i)||te.set(i,Ie(i)),U.set(i,(U.get(i)??0)+1),X.observe(i);}),()=>{ee.delete(r)&&(n.forEach(i=>{let s=(U.get(i)??1)-1;if(s)return void U.set(i,s);U.delete(i),X?.unobserve(i);}),ee.size||(X?.disconnect(),X=void 0));}}function Ke(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function _e(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let i=[],s=[],u=n[2].trim();if(u)for(let f of u.split(/[\s,]+/)){let c=f.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}t.push({fn:n[1],nums:i,units:s});}return t}function Qe(e,t,r){let n=_e(e),i=_e(t);return n.length===0||n.length!==i.length?r<1?e:t:n.map((s,u)=>{let f=i[u];return s.fn!==f.fn||s.nums.length!==f.nums.length?r<1?`${s.fn}(${s.nums.map((c,l)=>`${c}${s.units[l]}`).join(", ")})`:`${f.fn}(${f.nums.map((c,l)=>`${c}${f.units[l]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,l)=>`${c+(f.nums[l]-c)*r}${s.units[l]}`).join(", ")})`}).join(" ")}function He(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),i=String(t);if(Ke(n))return Pe(n,i,r);if(n.includes("("))return Qe(n,i,r);let s=n.match(/^([-+]?[\d.]+)(.*)$/),u=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&u){let f=parseFloat(s[1]),c=parseFloat(u[1]);return `${f+(c-f)*r}${s[2]||u[2]}`}return r<1?n:i}function Ze(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Je=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),et=0,ze="--scroll-draw-progress";function tt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function be(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:i={},easing:s="ease-out",speed:u=1,once:f=false,axis:c="y",scrollContainer:l,native:p=true,velocityScale:w=false,respectReducedMotion:P=true,triggerElement:W,onProgress:I,onComplete:v,onEnter:g,onLeave:D,onEnterBack:T,onLeaveBack:V}=t,k=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,_=typeof s=="function"?s:j[s]??j["ease-out"],H=fe(i.start??"top bottom"),Y=fe(i.end??"bottom top"),M=W??e,h=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(n).map(([o,a])=>({prop:Ze(o),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function m(){let o=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=o.getPropertyValue(a.prop).trim()||"0");}function d(){for(let o of y)e.style.setProperty(o.prop,String(o.to));}let re=new Map;for(let o of [...y.map(a=>a.prop),ze])re.set(o,e.style.getPropertyValue(o));function oe(){for(let[o,a]of re)a?e.style.setProperty(o,a):e.style.removeProperty(o);}if(k)return d(),v?.(),{...r,destroy:oe,getProgress:()=>1};m();let he=typeof s=="string"?$e(s):null;function Oe(){if(!p||!tt()||!he||c!=="y"||h||M!==e||f||u!==1||I||v||g||D||T||V||w!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let o of y)if(!Je.has(o.prop))return false;return true}function Fe(){let o=`ssd-a-${++et}`,a=y.map(E=>`${E.prop}:${E.from}`).join(";"),O=y.map(E=>`${E.prop}:${E.to}`).join(";"),L=document.createElement("style");L.setAttribute("data-ssd-animate",""),L.textContent=`@keyframes ${o}{from{${a}}to{${O}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(L),e.classList.add(o);let b=()=>c==="x"?window.scrollX:window.scrollY,S=()=>c==="x"?window.innerWidth:window.innerHeight,F=()=>{let E=e.getBoundingClientRect();return pe({top:E.top,height:E.height},b(),S(),H,Y)};ge(e,{type:"animate",getProgress:()=>le.getProgress(),getTrigger:F});let le={refresh(){},destroy(){e.classList.remove(o),L.remove(),e.style.animationPlayState="",oe(),de(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(E){let ce=Math.min(1,Math.max(0,E));e.classList.remove(o);for(let me of y)e.style.setProperty(me.prop,He(me.from,me.to,ce));},getProgress(){let{tStart:E,tEnd:ce}=F();return _(J(b(),E,ce,u))}};return le}if(Oe())return Fe();let x=0,R=0,$=0,K=false,A=false,z=-1,N=0,Q=false,C=NaN,ie=-1,ye=0,Ee=()=>h?c==="x"?h.scrollLeft:h.scrollTop:c==="x"?window.scrollX:window.scrollY,We=()=>h?c==="x"?h.clientWidth:h.clientHeight:c==="x"?window.innerWidth:window.innerHeight,B=M===e?y:[],we=false;function se(){let o=e.style,a=B.map(S=>o.getPropertyValue(S.prop)),O=o.transition;B.length&&(o.transition="none"),B.forEach(S=>o.setProperty(S.prop,re.get(S.prop)??""));let L=xe(M,h,c);B.forEach((S,F)=>o.setProperty(S.prop,a[F])),B.length&&(e.offsetWidth,o.transition=O);let b=pe(L,L.scroll,We(),H,Y);we&&Math.abs(b.tStart-x)<1&&Math.abs(b.tEnd-R)<1||(we=true,x=b.tStart,R=b.tEnd);}function Z(o){e.style.setProperty(ze,String(o));for(let a of y)e.style.setProperty(a.prop,He(a.from,a.to,o));I?.(o);}function De(o){if(isNaN(C)){C=o;return}C<=0&&o>0?g?.():C>0&&o<=0&&V?.(),C<1&&o>=1?D?.():C>=1&&o<1&&T?.(),C=o;}function ae(){if(!K||A)return;let o=performance.now(),a=Ee(),O=u;if(w!==false){let S=o-ye,F=S>0?Math.abs(a-(ie<0?a:ie))/S:0;O=u*Math.max(.2,1+F*(typeof w=="number"?w:1)*.04);}ie=a,ye=o;let L=R===x?0:(a-x)/(R-x);De(L);let b=_(J(a,x,R,O));f&&(z=Math.max(z,b),b=z),N=b,Z(b),b>=1&&!Q?(Q=true,v?.()):b<1&&!f&&(Q=false),$=requestAnimationFrame(ae);}se(),R===x&&G("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=_(J(Ee(),x,R,u));f&&o>0&&(z=o),N=o,Z(o);}let ve=new IntersectionObserver(o=>{o.forEach(a=>{K=a.isIntersecting,K&&!A?$=requestAnimationFrame(ae):cancelAnimationFrame($);});},{root:h??null}),ue;function q(){clearTimeout(ue),ue=setTimeout(se,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Ve=ne([M],q);return ve.observe(e),ge(e,{type:"animate",getProgress:()=>N,getTrigger:()=>({tStart:x,tEnd:R})}),{destroy(){cancelAnimationFrame($),ve.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Ve(),clearTimeout(ue),oe(),de(e);},replay(){z=-1,Q=false,N=0,A=false,Z(0);},pause(){A=true,cancelAnimationFrame($);},resume(){A&&(A=false,K&&($=requestAnimationFrame(ae)));},seek(o){let a=Math.min(1,Math.max(0,o));N=a,z=a,A=true,cancelAnimationFrame($),Z(a);},getProgress(){return N},refresh(){se();}}}var Ne={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function xt(e,t={}){if(typeof window>"u")return Ne;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return G("scrollHorizontal: track element not found:",e),Ne;let n=r,{easing:i="linear",trigger:s={start:"top top",end:"bottom bottom"},scrollContainer:u,respectReducedMotion:f=false,onProgress:c}=t,l=typeof u=="string"?document.querySelector(u):u??null;function p(){for(let m=n.parentElement;m;m=m.parentElement)if(window.getComputedStyle(m).position==="sticky")return m;return null}function w(){let m=p();if(m){let d=window.getComputedStyle(m);return m.clientWidth-(parseFloat(d.paddingLeft)||0)-(parseFloat(d.paddingRight)||0)}return l?l.clientWidth:document.documentElement.clientWidth||window.innerWidth}function P(){return t.distance??n.scrollWidth-w()}function W(){if(t.triggerElement!==void 0){let d=typeof t.triggerElement=="string"?document.querySelector(t.triggerElement):t.triggerElement;if(d)return d;G("scrollHorizontal: triggerElement not found:",t.triggerElement);}let m=p();return m?m.parentElement??m:n}let I=P(),v=W(),g=be(n,V(I,v)),D=k(),T=null;function V(m,d){return {props:{transform:["translateX(0px)",`translateX(${-m}px)`]},trigger:s,easing:i,native:false,respectReducedMotion:f,...d!==n&&{triggerElement:d},...u!==void 0&&{scrollContainer:u},...c!==void 0&&{onProgress:c}}}function k(){let m=v.getBoundingClientRect(),d=l?m.top-l.getBoundingClientRect().top+l.scrollTop:m.top+window.scrollY;return `${P()} ${Math.round(d)} ${Math.round(m.height)}`}function _(){g.destroy();let m=W(),d=m!==v;I=P(),v=m,g=be(n,V(I,v)),D=k(),T!==null&&g.seek(T),d&&y();}let H;function Y(){(W()!==v||k()!==D)&&_();}function M(){clearTimeout(H),H=setTimeout(Y,150);}window.addEventListener("resize",M),window.addEventListener("orientationchange",M);let h=()=>{};function y(){h(),h=ne([n,v],M);}return y(),{destroy(){clearTimeout(H),window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),h(),g.destroy();},replay(){T=null,g.replay();},pause(){g.pause(),T=g.getProgress();},resume(){T=null,g.resume();},seek(m){g.seek(m),T=g.getProgress();},getProgress(){return g.getProgress()},refresh(){_();}}}exports.scrollHorizontal=xt;
@@ -1,11 +1,14 @@
1
- import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-DHU1zNEw.mjs';
1
+ import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-MswK0erX.mjs';
2
2
 
3
3
  interface ScrollHorizontalOptions {
4
4
  /**
5
5
  * Total horizontal travel distance in pixels.
6
6
  *
7
7
  * Default: `track.scrollWidth` minus the width it is seen through — the
8
- * viewport, or the `scrollContainer`'s client width when one is given.
8
+ * content box of the sticky stage around the track; without one, the
9
+ * `scrollContainer`'s client width, or the viewport's with any scrollbar left
10
+ * out. Re-measured whenever the layout changes, so leave it out unless you
11
+ * want a fixed number: a number you pass is used as given.
9
12
  */
10
13
  distance?: number;
11
14
  /**
@@ -50,7 +53,11 @@ interface ScrollHorizontalOptions {
50
53
  onProgress?: (progress: number) => void;
51
54
  }
52
55
  interface ScrollHorizontalInstance extends ScrollDrawInstance {
53
- /** Recalculate travel distance after layout change. */
56
+ /**
57
+ * Re-measure now. The strip already re-measures 150 ms after the window, the
58
+ * page, the track or its runway changes size; call this when something else
59
+ * moved it.
60
+ */
54
61
  refresh: () => void;
55
62
  }
56
63
  /**
@@ -1,11 +1,14 @@
1
- import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-DHU1zNEw.js';
1
+ import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-MswK0erX.js';
2
2
 
3
3
  interface ScrollHorizontalOptions {
4
4
  /**
5
5
  * Total horizontal travel distance in pixels.
6
6
  *
7
7
  * Default: `track.scrollWidth` minus the width it is seen through — the
8
- * viewport, or the `scrollContainer`'s client width when one is given.
8
+ * content box of the sticky stage around the track; without one, the
9
+ * `scrollContainer`'s client width, or the viewport's with any scrollbar left
10
+ * out. Re-measured whenever the layout changes, so leave it out unless you
11
+ * want a fixed number: a number you pass is used as given.
9
12
  */
10
13
  distance?: number;
11
14
  /**
@@ -50,7 +53,11 @@ interface ScrollHorizontalOptions {
50
53
  onProgress?: (progress: number) => void;
51
54
  }
52
55
  interface ScrollHorizontalInstance extends ScrollDrawInstance {
53
- /** Recalculate travel distance after layout change. */
56
+ /**
57
+ * Re-measure now. The strip already re-measures 150 ms after the window, the
58
+ * page, the track or its runway changes size; call this when something else
59
+ * moved it.
60
+ */
54
61
  refresh: () => void;
55
62
  }
56
63
  /**
@@ -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 E={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function z(l,t={}){if(typeof window>"u")return E;let c=typeof l=="string"?document.querySelector(l):l;if(!c)return b("scrollHorizontal: track element not found:",l),E;let n=c,{easing:y="linear",trigger:b$1={start:"top top",end:"bottom bottom"},scrollContainer:o,respectReducedMotion:S=false,onProgress:m}=t;function w(){let e=typeof o=="string"?document.querySelector(o):o??null;return e?e.clientWidth:window.innerWidth}function u(){return t.distance??n.scrollWidth-w()}function d(){if(t.triggerElement!==void 0){let e=typeof t.triggerElement=="string"?document.querySelector(t.triggerElement):t.triggerElement;if(e)return e;b("scrollHorizontal: triggerElement not found:",t.triggerElement);}for(let e=n.parentElement;e;e=e.parentElement)if(window.getComputedStyle(e).position==="sticky")return e.parentElement??e;return n}let i=u(),s=d(),r=a(n,f(i,s));function f(e,p){return {props:{transform:["translateX(0px)",`translateX(${-e}px)`]},trigger:b$1,easing:y,native:false,respectReducedMotion:S,...p!==n&&{triggerElement:p},...o!==void 0&&{scrollContainer:o},...m!==void 0&&{onProgress:m}}}return {destroy(){r.destroy();},replay(){r.replay();},pause(){r.pause();},resume(){r.resume();},seek(e){r.seek(e);},getProgress(){return r.getProgress()},refresh(){r.destroy(),i=u(),s=d(),r=a(n,f(i,s));}}}export{z as scrollHorizontal};
1
+ import {a}from'../chunk-BFX2CSQ3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import {d}from'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var x={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function $(a$1,r={}){if(typeof window>"u")return x;let h=typeof a$1=="string"?document.querySelector(a$1):a$1;if(!h)return b("scrollHorizontal: track element not found:",a$1),x;let o=h,{easing:C="linear",trigger:P={start:"top top",end:"bottom bottom"},scrollContainer:s,respectReducedMotion:R=false,onProgress:v}=r,u=typeof s=="string"?document.querySelector(s):s??null;function b$1(){for(let e=o.parentElement;e;e=e.parentElement)if(window.getComputedStyle(e).position==="sticky")return e;return null}function M(){let e=b$1();if(e){let t=window.getComputedStyle(e);return e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)}return u?u.clientWidth:document.documentElement.clientWidth||window.innerWidth}function d$1(){return r.distance??o.scrollWidth-M()}function g(){if(r.triggerElement!==void 0){let t=typeof r.triggerElement=="string"?document.querySelector(r.triggerElement):r.triggerElement;if(t)return t;b("scrollHorizontal: triggerElement not found:",r.triggerElement);}let e=b$1();return e?e.parentElement??e:o}let m=d$1(),i=g(),n=a(o,T(m,i)),S=f(),l=null;function T(e,t){return {props:{transform:["translateX(0px)",`translateX(${-e}px)`]},trigger:P,easing:C,native:false,respectReducedMotion:R,...t!==o&&{triggerElement:t},...s!==void 0&&{scrollContainer:s},...v!==void 0&&{onProgress:v}}}function f(){let e=i.getBoundingClientRect(),t=u?e.top-u.getBoundingClientRect().top+u.scrollTop:e.top+window.scrollY;return `${d$1()} ${Math.round(t)} ${Math.round(e.height)}`}function z(){n.destroy();let e=g(),t=e!==i;m=d$1(),i=e,n=a(o,T(m,i)),S=f(),l!==null&&n.seek(l),t&&H();}let p;function W(){(g()!==i||f()!==S)&&z();}function c(){clearTimeout(p),p=setTimeout(W,150);}window.addEventListener("resize",c),window.addEventListener("orientationchange",c);let E=()=>{};function H(){E(),E=d([o,i],c);}return H(),{destroy(){clearTimeout(p),window.removeEventListener("resize",c),window.removeEventListener("orientationchange",c),E(),n.destroy();},replay(){l=null,n.replay();},pause(){n.pause(),l=n.getProgress();},resume(){l=null,n.resume();},seek(e){n.seek(e),l=n.getProgress();},getProgress(){return n.getProgress()},refresh(){z();}}}export{$ as scrollHorizontal};
@@ -1,5 +1,5 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-DHU1zNEw.mjs';
2
- import { S as ScrollAnimateOptions } from './engine-Ci08nM91.mjs';
1
+ import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-MswK0erX.mjs';
2
+ import { S as ScrollAnimateOptions } from './engine-P8u6OK4m.mjs';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-DHU1zNEw.mjs';
1
+ import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-MswK0erX.mjs';
2
2
 
3
3
  interface ScrollCounterOptions {
4
4
  from?: number;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-DHU1zNEw.js';
1
+ import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-MswK0erX.js';
2
2
 
3
3
  interface ScrollCounterOptions {
4
4
  from?: number;
@@ -1,5 +1,5 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-DHU1zNEw.js';
2
- import { S as ScrollAnimateOptions } from './engine-6AXEX8CL.js';
1
+ import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-MswK0erX.js';
2
+ import { S as ScrollAnimateOptions } from './engine-DQyBzZDl.js';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;