svg-scroll-draw 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +10 -10
  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 +133 -31
  11. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  12. package/dist/chunk-7SBTYJGH.mjs +1 -0
  13. package/dist/chunk-A4JCC3QQ.mjs +1 -0
  14. package/dist/chunk-BFX2CSQ3.mjs +1 -0
  15. package/dist/chunk-I45LCJUP.mjs +1 -0
  16. package/dist/{chunk-DIMNQPW5.mjs → chunk-JPK2NJWO.mjs} +1 -1
  17. package/dist/chunk-KHQ7OGQK.mjs +1 -0
  18. package/dist/chunk-MTEGM4RR.mjs +1 -0
  19. package/dist/chunk-PKHX3HSS.mjs +1 -0
  20. package/dist/chunk-WHFRS7IP.mjs +3 -0
  21. package/dist/{engine-6AXEX8CL.d.ts → engine-C9LKls__.d.ts} +1 -1
  22. package/dist/{engine-Ci08nM91.d.mts → engine-CvzRSkuk.d.mts} +1 -1
  23. package/dist/group/index.cjs +2 -2
  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-BDGQEK6X.d.mts → index-BlIjovDN.d.mts} +1 -1
  32. package/dist/{index-DxjUOIbK.d.ts → index-DZjvLJcU.d.ts} +1 -1
  33. package/dist/{index-BVuNgQSd.d.ts → index-G3VfLIN8.d.ts} +2 -2
  34. package/dist/{index-CGR7pSOR.d.mts → index-Zxa5HIes.d.mts} +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-B4CadBz0.d.mts} +1 -1
  58. package/dist/{scroll-draw-BlJfbTDv.d.ts → scroll-draw-Cs6Z5ype.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 +2 -2
  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-B0YM4nQP.d.mts} +6 -1
  78. package/dist/{types-DHU1zNEw.d.ts → types-B0YM4nQP.d.ts} +6 -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 +1 -1
  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,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 ct={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 kt=0;function St(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function ut(r,b){let p="";try{p=getComputedStyle(r).getPropertyValue(b).trim();}catch{}return p||(r.getAttribute(b)??"").trim()}var mt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function At(r){if(!a$3)return;let b$1=ut(r,"stroke");if(!b$1||b$1==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let p=(r.getAttribute("fill")??"").trim();p&&!mt.has(p)&&!mt.has(ut(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function xt(r,b,p){let $=document.createElement("div");$.setAttribute("data-svg-scroll-draw-debug",""),$.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 H(){let D=p==="x"?window.scrollX:window.scrollY,C=r-D,V=b-D,O=p==="x";$.innerHTML=`
2
+ <div style="position:absolute;${O?`left:${C}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${C}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;${O?`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($),window.addEventListener("scroll",H,{passive:true}),H(),{el:$,destroy(){window.removeEventListener("scroll",H),$.remove();}}}var pt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,dt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Pt(r,b$1,p){if(!a$3)return;let $=(r.match(dt)??[]).join("").toUpperCase(),H=(b$1.match(dt)??[]).join("").toUpperCase(),D=(r.match(pt)??[]).length,C=(b$1.match(pt)??[]).length;if($!==H){b(`morphTo: command sequence differs (${$||"\u2205"} \u2192 ${H||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,p);return}D!==C&&b(`morphTo: coordinate count differs (${D} \u2192 ${C}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,p);}function Ve(r,b,p){let $=(b.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),H=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,D=>{let C=parseFloat(D),V=$[H++]??C;return String(+(C+(V-C)*p).toFixed(4))})}function Wt(r,b$4={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:p,...$}=b$4,H=p?{...ct[p],...$}:$,D=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:C="path, polyline, line, polygon, rect, circle",speed:V=1,fade:O=false,easing:me="linear",trigger:ve={},stagger:we=0,direction:d$2="forward",once:Z=false,debug:yt=false,axis:J="y",scrollContainer:De,autoReverse:be=false,delay:pe=0,strokeColor:K,strokeWidth:ee,fillOpacity:te,waypoints:re,velocityScale:de=false,threshold:Ge=0,rootMargin:Be="0px",repeat:se=0,repeatDelay:Ce=0,morphTo:P,clip:Oe,autoplay:ht=false,duration:gt=1e3,native:vt=true,onProgress:ye,onStart:$e,onComplete:ae,onEnter:_e,onLeave:Ue,onEnterBack:je,onLeaveBack:Xe}=H,U=Oe===true?"left":typeof Oe=="string"?Oe:false,oe=typeof me=="function"?me:d[me]??d.linear,Ye=a(ve.start??"top bottom"),Qe=a(ve.end??"bottom top"),R=typeof De=="string"?document.querySelector(De):De??null,I=Array.isArray(K)?K[0]:null,E=Array.isArray(K)?K[1]:typeof K=="string"?K:null,A=Array.isArray(ee)?ee[0]:null,T=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null,x=Array.isArray(te)?te[0]:null,k=Array.isArray(te)?te[1]:typeof te=="number"?te:null;function ne(e){let t=e*100;switch(U){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 m=U?[]:Array.from(r.querySelectorAll(C)),l=[],L=[],z=0,G=0,g=false,F=false,v=0,le=false,j=-1,he=[],Ee=-1,w=false,W=0,B=0,X,Fe=null;function Ze(){Fe?.destroy(),Fe=null;}let Y=new Set,Je=NaN,Q=true,Te=-1,Ke=performance.now(),fe=NaN;function Ne(){return R?J==="x"?R.scrollLeft:R.scrollTop:J==="x"?window.scrollX:window.scrollY}function et(){return R?J==="x"?R.clientWidth:R.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function tt(){let e=a$2(r,R,J);return c(e,e.scroll,et(),Ye,Qe)}function rt(){(({tStart:z,tEnd:G}=tt())),yt&&a$3&&(Ze(),Fe=xt(z,G,J));}function He(e,t=tt){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let n=e.destroy;return e.destroy=()=>{n.call(e),b$2(r);},e}function wt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),U){let n=t==="reverse"?1-e:e;r.style.clipPath=ne(n);return}m.forEach((n,y)=>{n.style.strokeDashoffset=t==="reverse"?`${l[y]*e}`:`${l[y]*(1-e)}`,O&&(n.style.opacity=t==="reverse"?`${1-e}`:`${e}`),I&&E?n.style.stroke=a$5(I,E,e):E&&(n.style.stroke=E),A!==null&&T!==null?n.style.strokeWidth=`${A+(T-A)*e}`:T!==null&&(n.style.strokeWidth=`${T}`),x!==null&&k!==null?n.style.fillOpacity=`${x+(k-x)*e}`:k!==null&&(n.style.fillOpacity=`${k}`),P&&n.tagName.toLowerCase()==="path"&&L[y]&&n.setAttribute("d",Ve(L[y],P,e));});}function ke(){if(r.style.setProperty("--scroll-draw-progress","0"),U){r.style.clipPath=ne(0);return}m.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=d$2==="reverse"?"0":`${l[t]}`,O?e.style.opacity=d$2==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(m.forEach(e=>{At(e);let t=a$1(e);l.push(t);let n=e.tagName.toLowerCase()==="path";n?L.push(e.getAttribute("d")??""):L.push(""),P&&(n?Pt(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),D?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$2==="reverse"?`${t}`:"0",O&&(e.style.opacity="1"),E&&(e.style.stroke=E),T!==null&&(e.style.strokeWidth=`${T}`),k!==null&&(e.style.fillOpacity=`${k}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$2==="reverse"?"0":`${t}`,O?e.style.opacity=d$2==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`));}),U){if(D)return r.style.clipPath=ne(1),ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ne(0);}else if(D)return ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let st=typeof me=="string"?b$1(me):null;function bt(){return !(vt===false||!St()||!m.length||!st||U||J!=="y"||R||V!==1||we!==0||Z||be||de!==false||P||re||se||pe>0||ye||$e||ae||_e||Ue||je||Xe||K!=null||ee!=null||te!=null||(ve.start??"top bottom").trim()!=="top bottom"||(ve.end??"bottom top").trim()!=="bottom top")}function $t(){let e=++kt,t=`svg-scroll-draw-${e}`,n=`svg-scroll-draw-host-${e}`,y=`--svg-scroll-draw-${e}`,_=d$2==="reverse"?"0":"var(--ssd-len)",q=d$2==="reverse"?"var(--ssd-len)":"0",N=`stroke-dashoffset:${_};`,i=`stroke-dashoffset:${q};`;O&&(N+=`opacity:${d$2==="reverse"?1:0};`,i+=`opacity:${d$2==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${N}}to{${i}}}.${n}{view-timeline-name:${y};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${st};animation-fill-mode:both;animation-timeline:${y};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(n);function h(s,u){s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}m.forEach(h);let o=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:u,tEnd:M}=c({top:s.top,height:s.height},Ne(),et(),Ye,Qe);return oe(b$3(Ne(),u,M,V))}return {destroy(){r.classList.remove(n),m.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){o=false,f=-1,m.forEach(h);},pause(){o=true,m.forEach(s=>{s.style.animationPlayState="paused";});},resume(){o&&(o=false,m.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let u=Math.min(1,Math.max(0,s));f=u,o=true,m.forEach((M,S)=>{M.classList.remove(t),M.style.strokeDashoffset=d$2==="reverse"?`${l[S]*u}`:`${l[S]*(1-u)}`,O&&(M.style.opacity=d$2==="reverse"?`${1-u}`:`${u}`);});},getProgress(){return c$1()},refresh(){m.forEach((s,u)=>{l[u]=a$1(s),s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`;});}}}if(bt())return He($t());function Et(){let e=Math.max(1,gt),t=0,n=0,y=false;function _(o){let f=true;if(U){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);W=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ne(d$2==="reverse"?1-s:s),ye?.(s),c<1&&(f=false);}else m.forEach((c,s)=>{let u=s*we*e,M=Math.min(1,Math.max(0,(o-u)/e)),S=oe(M);c.style.strokeDashoffset=d$2==="reverse"?`${l[s]*S}`:`${l[s]*(1-S)}`,O&&(c.style.opacity=d$2==="reverse"?`${1-S}`:`${S}`),I&&E?c.style.stroke=a$5(I,E,S):E&&(c.style.stroke=E),A!==null&&T!==null?c.style.strokeWidth=`${A+(T-A)*S}`:T!==null&&(c.style.strokeWidth=`${T}`),x!==null&&k!==null?c.style.fillOpacity=`${x+(k-x)*S}`:k!==null&&(c.style.fillOpacity=`${k}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",Ve(L[s],P,S)),s===0&&(W=S,ye?.(S),r.style.setProperty("--scroll-draw-progress",String(S))),M<1&&(f=false);});if(re){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);for(let u in re){let M=parseFloat(u);s>=M&&!Y.has(M)&&(Y.add(M),re[u]?.());}}return f}function q(o){if(w)return;let f=o-t;F||(F=true,$e?.());let c=_(f);if(c&&!g){g=true,_(e*(1+Math.max(0,m.length-1)*we)),ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{t=performance.now(),F=false,g=false,Y.clear(),ke(),v=requestAnimationFrame(q);},Ce));return}c||(v=requestAnimationFrame(q));}function N(){cancelAnimationFrame(v),clearTimeout(X),t=performance.now(),n=0,w=false,F=false,g=false,B=0,y=true,W=0,Y.clear(),ke(),v=requestAnimationFrame(q);}let i=new IntersectionObserver(o=>{o.forEach(f=>{f.isIntersecting&&!(Z&&g)?N():!f.isIntersecting&&!Z&&!g&&(cancelAnimationFrame(v),clearTimeout(X),y=false);});},{root:R??null,threshold:Ge,rootMargin:Be}),a;function h(){clearTimeout(a),a=setTimeout(()=>{m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",h),window.addEventListener("orientationchange",h),pe>0?setTimeout(()=>i.observe(r),pe):i.observe(r),{destroy(){cancelAnimationFrame(v),clearTimeout(X),i.disconnect(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),clearTimeout(a);},replay(){B=0,N();},pause(){w||!y||(w=true,n=performance.now()-t,cancelAnimationFrame(v));},resume(){w&&(w=false,y=true,t=performance.now()-n,v=requestAnimationFrame(q));},seek(o){let f=Math.min(1,Math.max(0,o));W=f,w=true,n=f*e,t=performance.now()-n,cancelAnimationFrame(v),_(n);},getProgress(){return W},refresh(){clearTimeout(a),m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});}}}if(ht)return He(Et());rt();function Se(){if(!le||w)return;let e=performance.now(),t=Ne();if(!Q&&de===false&&t===Je){v=requestAnimationFrame(Se);return}Q=false,Je=t;let n=V;if(de!==false){let i=e-Ke,a=i>0?Math.abs(t-(Te<0?t:Te))/i:0;n=V*Math.max(.2,1+a*(typeof de=="number"?de:1)*.04);}Te=t,Ke=e;let y=be?Ee===-1||t>=Ee?"forward":"reverse":d$2;Ee=t;let _=G-z,q=true,N=_===0?0:(t-z)/_;if(isNaN(fe)||(fe<=0&&N>0?_e?.():fe>0&&N<=0&&Xe?.(),fe<1&&N>=1?Ue?.():fe>=1&&N<1&&je?.()),fe=N,U){let i=oe(b$3(t,z,G,n));Z&&!be&&(j=Math.max(j,i),i=j),W=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=y==="reverse"?1-i:i;r.style.clipPath=ne(a),ye?.(i),!F&&b$3(t,z,G,n)>0&&(F=true,$e?.()),i>=1&&!g?(g=true,ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{j=-1,F=false,g=false,r.style.clipPath=ne(0);},Ce))):i<1&&!Z&&(g=false),v=requestAnimationFrame(Se);return}if(m.forEach((i,a)=>{let h=a*we*_,o=oe(b$3(t,z+h,G+h,n));Z&&!be&&(o=he[a]=Math.max(he[a]??j,o)),i.style.strokeDashoffset=y==="reverse"?`${l[a]*o}`:`${l[a]*(1-o)}`,O&&(i.style.opacity=y==="reverse"?`${1-o}`:`${o}`),I&&E?i.style.stroke=a$5(I,E,o):E&&(i.style.stroke=E),A!==null&&T!==null?i.style.strokeWidth=`${A+(T-A)*o}`:T!==null&&(i.style.strokeWidth=`${T}`),x!==null&&k!==null?i.style.fillOpacity=`${x+(k-x)*o}`:k!==null&&(i.style.fillOpacity=`${k}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",Ve(L[a],P,o)),a===0&&(W=o,ye?.(o),r.style.setProperty("--scroll-draw-progress",String(o))),o<1&&(q=false);}),re){let i=oe(b$3(t,z,G,n));for(let a in re){let h=parseFloat(a);i>=h&&!Y.has(h)&&(Y.add(h),re[a]?.());}}!F&&b$3(t,z,G,n)>0&&(F=true,$e?.()),q&&!g?(g=true,ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{j=-1,he=[],F=false,g=false,Y.clear(),ke(),Q=true;},Ce))):!q&&!Z&&(g=false),v=requestAnimationFrame(Se);}let Re=false;function Ae(){Re||(Re=true,v=requestAnimationFrame(function(){Se();}));}function xe(){Re=false,cancelAnimationFrame(v);}let Ie=new IntersectionObserver(e=>{e.forEach(t=>{le=t.isIntersecting,le&&!w?(Q=true,Ae()):xe();});},{root:R??null,threshold:Ge,rootMargin:Be});function ot(){m.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),rt(),Q=true;}let Pe;function ge(){clearTimeout(Pe),Pe=setTimeout(ot,150);}window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge);let Tt=d$1([r],ge);return pe>0?setTimeout(()=>Ie.observe(r),pe):Ie.observe(r),He({destroy(){cancelAnimationFrame(v),clearTimeout(X),xe(),Ie.disconnect(),Tt(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(Pe),Ze();},replay(){j=-1,he=[],Ee=-1,Te=-1,F=false,g=false,B=0,w=false,W=0,Y.clear(),clearTimeout(X),ke(),Q=true,le&&Ae();},pause(){w=true,xe();},resume(){w&&(w=false,Q=true,le&&Ae());},seek(e){let t=Math.min(1,Math.max(0,e));W=t,j=t,he=[],w=true,xe(),wt(t,d$2),Q=true;},getProgress(){return W},refresh(){clearTimeout(Pe),ot(),le&&!w&&Ae();}},()=>({tStart:z,tEnd:G}))}export{ct as a,Wt as b};
@@ -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-B0YM4nQP.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-B0YM4nQP.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=`
1
+ 'use strict';function Bt({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 y=0;y<r;y++){let P=Math.pow(o,y);m.push(P),c+=P;}let a=[0],u=0;for(let y=0;y<r;y++)u+=m[y]/c,a.push(u);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let P=0;P<r;P++)if(y<=a[P+1]){let N=(y-a[P])/(a[P+1]-a[P]);if(P===0)return N*(2-N);let b=1-Math.pow(t,P);return b+(1-b)*(2*N-1)*(2*N-1)}return 1}}function jt({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:Bt(),elastic:jt()};function xt(e,n,r){return Math.min(r,Math.max(n,e))}function Ce(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Tt(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 Pt(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:xt((e-n)/(r-n)*t,0,1)}function Oe(e,n,r,t,o){let c=Tt(e.top,e.height,n,t.element)-Pt(t.viewport,r),m=Tt(e.top,e.height,n,o.element)-Pt(o.viewport,r);return {tStart:c,tEnd:m}}function tt(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 Re(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function $t(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Ne(e,n,r){let t=$t(e),o=$t(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var At={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function pe(e,...n){ze&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Ut="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Xt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Mt=33;function Yt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let n=[];for(let r=0;r<Mt;r++){let t=r/(Mt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Ut;case "ease-out":return Xt;case "ease-in-out":return Yt()?Qt(xe["ease-in-out"]):null;default:return null}}var Lt=Symbol.for("svg-scroll-draw.registry");function kt(){let e=globalThis;return e[Lt]||(e[Lt]=new Map)}function We(e,n){kt().set(e,n);}function qe(e){kt().delete(e);}var Ge,nt=new Set,ot=new WeakMap,Be=new Map,Dt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Zt(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 st(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ge??(Ge=new ResizeObserver(o=>{let c=false;for(let{target:m}of o)ot.get(m)!==Dt(m)&&(c=true),ot.set(m,"");c&&nt.forEach(m=>m());})),nt.add(r);let t=Zt(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ot.has(o)||ot.set(o,Dt(o)),Be.set(o,(Be.get(o)??0)+1),Ge.observe(o);}),()=>{nt.delete(r)&&(t.forEach(o=>{let c=(Be.get(o)??1)-1;if(c)return void Be.set(o,c);Be.delete(o),Ge?.unobserve(o);}),nt.size||(Ge?.disconnect(),Ge=void 0));}}var Kt=0;function Jt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function It(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ct=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function er(e){if(!ze)return;let n=It(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&&!Ct.has(r)&&!Ct.has(It(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function tr(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,a=n-c,u=r==="x";t.innerHTML=`
2
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;
3
+ <div style="position:absolute;${u?`left:${a}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${a}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 Ot=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Rt=/[MmLlHhVvCcSsQqTtAaZz]/g;function rr(e,n,r){if(!ze)return;let t=(e.match(Rt)??[]).join("").toUpperCase(),o=(n.match(Rt)??[]).join("").toUpperCase(),c=(e.match(Ot)??[]).length,m=(n.match(Ot)??[]).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!==m&&pe(`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 mt(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),a=t[o++]??m;return String(+(m+(a-m)*r).toFixed(4))})}function pt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...At[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:a=1,fade:u=false,easing:y="linear",trigger:P={},stagger:N=0,direction:b="forward",once:de=false,debug:Ue=false,axis:te="y",scrollContainer:ke,autoReverse:Te=false,delay:we=0,strokeColor:ae,strokeWidth:ge,fillOpacity:re,waypoints:le,velocityScale:Ee=false,threshold:Pe=0,rootMargin:Z="0px",repeat:I=0,repeatDelay:_e=0,morphTo:B,clip:$e,autoplay:He=false,duration:Xe=1e3,native:it=true,onProgress:Ae,onStart:j,onComplete:q,onEnter:ce,onLeave:Me,onEnterBack:ue,onLeaveBack:ye}=o,G=$e===true?"left":typeof $e=="string"?$e:false,K=typeof y=="function"?y:xe[y]??xe.linear,fe=Ce(P.start??"top bottom"),De=Ce(P.end??"bottom top"),X=typeof ke=="string"?document.querySelector(ke):ke??null,Y=Array.isArray(ae)?ae[0]:null,F=Array.isArray(ae)?ae[1]:typeof ae=="string"?ae:null,M=Array.isArray(ge)?ge[0]:null,C=Array.isArray(ge)?ge[1]:typeof ge=="number"?ge:null,O=Array.isArray(re)?re[0]:null,L=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function he(s){let l=s*100;switch(G){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 $=G?[]:Array.from(e.querySelectorAll(m)),w=[],_=[],H=0,ne=0,i=false,f=false,x=0,V=false,v=-1,R=[],oe=-1,k=false,S=0,Q=0,J,at=null;function gt(){at?.destroy(),at=null;}let ve=new Set,yt=NaN,Se=true,Ye=-1,ht=performance.now(),Ie=NaN;function lt(){return X?te==="x"?X.scrollLeft:X.scrollTop:te==="x"?window.scrollX:window.scrollY}function bt(){return X?te==="x"?X.clientWidth:X.clientHeight:te==="x"?window.innerWidth:window.innerHeight}function wt(){let s=tt(e,X,te);return Oe(s,s.scroll,bt(),fe,De)}function Et(){(({tStart:H,tEnd:ne}=wt())),Ue&&ze&&(gt(),at=tr(H,ne,te));}function ct(s,l=wt){We(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),qe(e);},s}function Vt(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),G){let g=l==="reverse"?1-s:s;e.style.clipPath=he(g);return}$.forEach((g,z)=>{g.style.strokeDashoffset=l==="reverse"?`${w[z]*s}`:`${w[z]*(1-s)}`,u&&(g.style.opacity=l==="reverse"?`${1-s}`:`${s}`),Y&&F?g.style.stroke=Ne(Y,F,s):F&&(g.style.stroke=F),M!==null&&C!==null?g.style.strokeWidth=`${M+(C-M)*s}`:C!==null&&(g.style.strokeWidth=`${C}`),O!==null&&L!==null?g.style.fillOpacity=`${O+(L-O)*s}`:L!==null&&(g.style.fillOpacity=`${L}`),B&&g.tagName.toLowerCase()==="path"&&_[z]&&g.setAttribute("d",mt(_[z],B,s));});}function Qe(){if(e.style.setProperty("--scroll-draw-progress","0"),G){e.style.clipPath=he(0);return}$.forEach((s,l)=>{s.style.strokeDasharray=`${w[l]}`,s.style.strokeDashoffset=b==="reverse"?"0":`${w[l]}`,u?s.style.opacity=b==="reverse"?"1":"0":s.style.opacity="",Y&&(s.style.stroke=Y),M!==null&&(s.style.strokeWidth=`${M}`),O!==null&&(s.style.fillOpacity=`${O}`),B&&s.tagName.toLowerCase()==="path"&&_[l]&&s.setAttribute("d",_[l]);});}if($.forEach(s=>{er(s);let l=Re(s);w.push(l);let g=s.tagName.toLowerCase()==="path";g?_.push(s.getAttribute("d")??""):_.push(""),B&&(g?rr(_[_.length-1],B,s):pe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=b==="reverse"?`${l}`:"0",u&&(s.style.opacity="1"),F&&(s.style.stroke=F),C!==null&&(s.style.strokeWidth=`${C}`),L!==null&&(s.style.fillOpacity=`${L}`),B&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",B)):(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=b==="reverse"?"0":`${l}`,u?s.style.opacity=b==="reverse"?"1":"0":s.style.opacity="",Y&&(s.style.stroke=Y),M!==null&&(s.style.strokeWidth=`${M}`),O!==null&&(s.style.fillOpacity=`${O}`));}),G){if(c)return e.style.clipPath=he(1),q?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=he(0);}else if(c)return q?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let vt=typeof y=="string"?rt(y):null;function zt(){return !(it===false||!Jt()||!$.length||!vt||G||te!=="y"||X||a!==1||N!==0||de||Te||Ee!==false||B||le||I||we>0||Ae||j||q||ce||Me||ue||ye||ae!=null||ge!=null||re!=null||(P.start??"top bottom").trim()!=="top bottom"||(P.end??"bottom top").trim()!=="bottom top")}function Wt(){let s=++Kt,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,z=`--svg-scroll-draw-${s}`,be=b==="reverse"?"0":"var(--ssd-len)",me=b==="reverse"?"var(--ssd-len)":"0",se=`stroke-dashoffset:${be};`,h=`stroke-dashoffset:${me};`;u&&(se+=`opacity:${b==="reverse"?1:0};`,h+=`opacity:${b==="reverse"?0:1};`);let E=document.createElement("style");E.setAttribute("data-svg-scroll-draw",""),E.textContent=`@keyframes ${l}{from{${se}}to{${h}}}.${g}{view-timeline-name:${z};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${vt};animation-fill-mode:both;animation-timeline:${z};animation-range:cover 0% cover 100%;}`,document.head.appendChild(E),e.classList.add(g);function W(p,D){p.style.setProperty("--ssd-len",String(w[D])),p.style.strokeDasharray=`${w[D]}`,p.style.strokeDashoffset="",p.style.opacity="",p.style.animationPlayState="",p.classList.add(l);}$.forEach(W);let d=false,T=-1;function A(){if(T>=0)return T;let p=e.getBoundingClientRect(),{tStart:D,tEnd:ee}=Oe({top:p.top,height:p.height},lt(),bt(),fe,De);return K(ie(lt(),D,ee,a))}return {destroy(){e.classList.remove(g),$.forEach(p=>{p.classList.remove(l),p.style.removeProperty("--ssd-len"),p.style.animationPlayState="";}),E.remove();},replay(){d=false,T=-1,$.forEach(W);},pause(){d=true,$.forEach(p=>{p.style.animationPlayState="paused";});},resume(){d&&(d=false,$.forEach(p=>{p.style.animationPlayState="running";}));},seek(p){let D=Math.min(1,Math.max(0,p));T=D,d=true,$.forEach((ee,U)=>{ee.classList.remove(l),ee.style.strokeDashoffset=b==="reverse"?`${w[U]*D}`:`${w[U]*(1-D)}`,u&&(ee.style.opacity=b==="reverse"?`${1-D}`:`${D}`);});},getProgress(){return A()},refresh(){$.forEach((p,D)=>{w[D]=Re(p),p.style.setProperty("--ssd-len",String(w[D])),p.style.strokeDasharray=`${w[D]}`;});}}}if(zt())return ct(Wt());function qt(){let s=Math.max(1,Xe),l=0,g=0,z=false;function be(d){let T=true;if(G){let A=Math.min(1,Math.max(0,d/s)),p=K(A);S=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=he(b==="reverse"?1-p:p),Ae?.(p),A<1&&(T=false);}else $.forEach((A,p)=>{let D=p*N*s,ee=Math.min(1,Math.max(0,(d-D)/s)),U=K(ee);A.style.strokeDashoffset=b==="reverse"?`${w[p]*U}`:`${w[p]*(1-U)}`,u&&(A.style.opacity=b==="reverse"?`${1-U}`:`${U}`),Y&&F?A.style.stroke=Ne(Y,F,U):F&&(A.style.stroke=F),M!==null&&C!==null?A.style.strokeWidth=`${M+(C-M)*U}`:C!==null&&(A.style.strokeWidth=`${C}`),O!==null&&L!==null?A.style.fillOpacity=`${O+(L-O)*U}`:L!==null&&(A.style.fillOpacity=`${L}`),B&&A.tagName.toLowerCase()==="path"&&_[p]&&A.setAttribute("d",mt(_[p],B,U)),p===0&&(S=U,Ae?.(U),e.style.setProperty("--scroll-draw-progress",String(U))),ee<1&&(T=false);});if(le){let A=Math.min(1,Math.max(0,d/s)),p=K(A);for(let D in le){let ee=parseFloat(D);p>=ee&&!ve.has(ee)&&(ve.add(ee),le[D]?.());}}return T}function me(d){if(k)return;let T=d-l;f||(f=true,j?.());let A=be(T);if(A&&!i){i=true,be(s*(1+Math.max(0,$.length-1)*N)),q?.(),Q<(I==="infinite"?1/0:I??0)&&(Q++,J=setTimeout(()=>{l=performance.now(),f=false,i=false,ve.clear(),Qe(),x=requestAnimationFrame(me);},_e));return}A||(x=requestAnimationFrame(me));}function se(){cancelAnimationFrame(x),clearTimeout(J),l=performance.now(),g=0,k=false,f=false,i=false,Q=0,z=true,S=0,ve.clear(),Qe(),x=requestAnimationFrame(me);}let h=new IntersectionObserver(d=>{d.forEach(T=>{T.isIntersecting&&!(de&&i)?se():!T.isIntersecting&&!de&&!i&&(cancelAnimationFrame(x),clearTimeout(J),z=false);});},{root:X??null,threshold:Pe,rootMargin:Z}),E;function W(){clearTimeout(E),E=setTimeout(()=>{$.forEach((d,T)=>{w[T]=Re(d),d.style.strokeDasharray=`${w[T]}`;});},150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),we>0?setTimeout(()=>h.observe(e),we):h.observe(e),{destroy(){cancelAnimationFrame(x),clearTimeout(J),h.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(E);},replay(){Q=0,se();},pause(){k||!z||(k=true,g=performance.now()-l,cancelAnimationFrame(x));},resume(){k&&(k=false,z=true,l=performance.now()-g,x=requestAnimationFrame(me));},seek(d){let T=Math.min(1,Math.max(0,d));S=T,k=true,g=T*s,l=performance.now()-g,cancelAnimationFrame(x),be(g);},getProgress(){return S},refresh(){clearTimeout(E),$.forEach((d,T)=>{w[T]=Re(d),d.style.strokeDasharray=`${w[T]}`;});}}}if(He)return ct(qt());Et();function Ze(){if(!V||k)return;let s=performance.now(),l=lt();if(!Se&&Ee===false&&l===yt){x=requestAnimationFrame(Ze);return}Se=false,yt=l;let g=a;if(Ee!==false){let h=s-ht,E=h>0?Math.abs(l-(Ye<0?l:Ye))/h:0;g=a*Math.max(.2,1+E*(typeof Ee=="number"?Ee:1)*.04);}Ye=l,ht=s;let z=Te?oe===-1||l>=oe?"forward":"reverse":b;oe=l;let be=ne-H,me=true,se=be===0?0:(l-H)/be;if(isNaN(Ie)||(Ie<=0&&se>0?ce?.():Ie>0&&se<=0&&ye?.(),Ie<1&&se>=1?Me?.():Ie>=1&&se<1&&ue?.()),Ie=se,G){let h=K(ie(l,H,ne,g));de&&!Te&&(v=Math.max(v,h),h=v),S=h,e.style.setProperty("--scroll-draw-progress",String(h));let E=z==="reverse"?1-h:h;e.style.clipPath=he(E),Ae?.(h),!f&&ie(l,H,ne,g)>0&&(f=true,j?.()),h>=1&&!i?(i=true,q?.(),Q<(I==="infinite"?1/0:I??0)&&(Q++,J=setTimeout(()=>{v=-1,f=false,i=false,e.style.clipPath=he(0);},_e))):h<1&&!de&&(i=false),x=requestAnimationFrame(Ze);return}if($.forEach((h,E)=>{let W=E*N*be,d=K(ie(l,H+W,ne+W,g));de&&!Te&&(d=R[E]=Math.max(R[E]??v,d)),h.style.strokeDashoffset=z==="reverse"?`${w[E]*d}`:`${w[E]*(1-d)}`,u&&(h.style.opacity=z==="reverse"?`${1-d}`:`${d}`),Y&&F?h.style.stroke=Ne(Y,F,d):F&&(h.style.stroke=F),M!==null&&C!==null?h.style.strokeWidth=`${M+(C-M)*d}`:C!==null&&(h.style.strokeWidth=`${C}`),O!==null&&L!==null?h.style.fillOpacity=`${O+(L-O)*d}`:L!==null&&(h.style.fillOpacity=`${L}`),B&&h.tagName.toLowerCase()==="path"&&_[E]&&h.setAttribute("d",mt(_[E],B,d)),E===0&&(S=d,Ae?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(me=false);}),le){let h=K(ie(l,H,ne,g));for(let E in le){let W=parseFloat(E);h>=W&&!ve.has(W)&&(ve.add(W),le[E]?.());}}!f&&ie(l,H,ne,g)>0&&(f=true,j?.()),me&&!i?(i=true,q?.(),Q<(I==="infinite"?1/0:I??0)&&(Q++,J=setTimeout(()=>{v=-1,R=[],f=false,i=false,ve.clear(),Qe(),Se=true;},_e))):!me&&!de&&(i=false),x=requestAnimationFrame(Ze);}let ut=false;function Ke(){ut||(ut=true,x=requestAnimationFrame(function(){Ze();}));}function Je(){ut=false,cancelAnimationFrame(x);}let ft=new IntersectionObserver(s=>{s.forEach(l=>{V=l.isIntersecting,V&&!k?(Se=true,Ke()):Je();});},{root:X??null,threshold:Pe,rootMargin:Z});function St(){$.forEach((s,l)=>{w[l]=Re(s),s.style.strokeDasharray=`${w[l]}`;}),Et(),Se=true;}let et;function Ve(){clearTimeout(et),et=setTimeout(St,150);}window.addEventListener("resize",Ve),window.addEventListener("orientationchange",Ve);let Gt=st([e],Ve);return we>0?setTimeout(()=>ft.observe(e),we):ft.observe(e),ct({destroy(){cancelAnimationFrame(x),clearTimeout(J),Je(),ft.disconnect(),Gt(),window.removeEventListener("resize",Ve),window.removeEventListener("orientationchange",Ve),clearTimeout(et),gt();},replay(){v=-1,R=[],oe=-1,Ye=-1,f=false,i=false,Q=0,k=false,S=0,ve.clear(),clearTimeout(J),Qe(),Se=true,V&&Ke();},pause(){k=true,Je();},resume(){k&&(k=false,Se=true,V&&Ke());},seek(s){let l=Math.min(1,Math.max(0,s));S=l,v=l,R=[],k=true,Je(),Vt(l,b),Se=true;},getProgress(){return S},refresh(){clearTimeout(et),St(),V&&!k&&Ke();}},()=>({tStart:H,tEnd:ne}))}function nr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Nt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],m=t[2].trim();if(m)for(let a of m.split(/[\s,]+/)){let u=a.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 or(e,n,r){let t=Nt(e),o=Nt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,m)=>{let a=o[m];return c.fn!==a.fn||c.nums.length!==a.nums.length?r<1?`${c.fn}(${c.nums.map((u,y)=>`${u}${c.units[y]}`).join(", ")})`:`${a.fn}(${a.nums.map((u,y)=>`${u}${a.units[y]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,y)=>`${u+(a.nums[y]-u)*r}${c.units[y]}`).join(", ")})`}).join(" ")}function dt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(nr(t))return Ne(t,o,r);if(t.includes("("))return or(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),m=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&m){let a=parseFloat(c[1]),u=parseFloat(m[1]);return `${a+(u-a)*r}${c[2]||m[2]}`}return r<1?t:o}function sr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var ir=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ar=0,Ft="--scroll-draw-progress";function lr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Fe(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:a=false,axis:u="y",scrollContainer:y,native:P=true,velocityScale:N=false,respectReducedMotion:b=true,triggerElement:de,onProgress:Ue,onComplete:te,onEnter:ke,onLeave:Te,onEnterBack:we,onLeaveBack:ae}=n,ge=b&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,re=typeof c=="function"?c:xe[c]??xe["ease-out"],le=Ce(o.start??"top bottom"),Ee=Ce(o.end??"bottom top"),Pe=de??e,Z=typeof y=="string"?document.querySelector(y):y??null,I=Object.entries(t).map(([i,f])=>({prop:sr(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function _e(){let i=window.getComputedStyle(e);for(let f of I)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function B(){for(let i of I)e.style.setProperty(i.prop,String(i.to));}let $e=new Map;for(let i of [...I.map(f=>f.prop),Ft])$e.set(i,e.style.getPropertyValue(i));function He(){for(let[i,f]of $e)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if(ge)return B(),te?.(),{...r,destroy:He,getProgress:()=>1};_e();let Xe=typeof c=="string"?rt(c):null;function it(){if(!P||!lr()||!Xe||u!=="y"||Z||Pe!==e||a||m!==1||Ue||te||ke||Te||we||ae||N!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let i of I)if(!ir.has(i.prop))return false;return true}function Ae(){let i=`ssd-a-${++ar}`,f=I.map(S=>`${S.prop}:${S.from}`).join(";"),x=I.map(S=>`${S.prop}:${S.to}`).join(";"),V=document.createElement("style");V.setAttribute("data-ssd-animate",""),V.textContent=`@keyframes ${i}{from{${f}}to{${x}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${Xe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(V),e.classList.add(i);let v=()=>u==="x"?window.scrollX:window.scrollY,R=()=>u==="x"?window.innerWidth:window.innerHeight,oe=()=>{let S=e.getBoundingClientRect();return Oe({top:S.top,height:S.height},v(),R(),le,Ee)};We(e,{type:"animate",getProgress:()=>k.getProgress(),getTrigger:oe});let k={refresh(){},destroy(){e.classList.remove(i),V.remove(),e.style.animationPlayState="",He(),qe(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(S){let Q=Math.min(1,Math.max(0,S));e.classList.remove(i);for(let J of I)e.style.setProperty(J.prop,dt(J.from,J.to,Q));},getProgress(){let{tStart:S,tEnd:Q}=oe();return re(ie(v(),S,Q,m))}};return k}if(it())return Ae();let j=0,q=0,ce=0,Me=false,ue=false,ye=-1,G=0,K=false,fe=NaN,De=-1,X=0,Y=()=>Z?u==="x"?Z.scrollLeft:Z.scrollTop:u==="x"?window.scrollX:window.scrollY,F=()=>Z?u==="x"?Z.clientWidth:Z.clientHeight:u==="x"?window.innerWidth:window.innerHeight,M=Pe===e?I:[],C=false;function O(){let i=e.style,f=M.map(R=>i.getPropertyValue(R.prop)),x=i.transition;M.length&&(i.transition="none"),M.forEach(R=>i.setProperty(R.prop,$e.get(R.prop)??""));let V=tt(Pe,Z,u);M.forEach((R,oe)=>i.setProperty(R.prop,f[oe])),M.length&&(e.offsetWidth,i.transition=x);let v=Oe(V,V.scroll,F(),le,Ee);C&&Math.abs(v.tStart-j)<1&&Math.abs(v.tEnd-q)<1||(C=true,j=v.tStart,q=v.tEnd);}function L(i){e.style.setProperty(Ft,String(i));for(let f of I)e.style.setProperty(f.prop,dt(f.from,f.to,i));Ue?.(i);}function he(i){if(isNaN(fe)){fe=i;return}fe<=0&&i>0?ke?.():fe>0&&i<=0&&ae?.(),fe<1&&i>=1?Te?.():fe>=1&&i<1&&we?.(),fe=i;}function $(){if(!Me||ue)return;let i=performance.now(),f=Y(),x=m;if(N!==false){let R=i-X,oe=R>0?Math.abs(f-(De<0?f:De))/R:0;x=m*Math.max(.2,1+oe*(typeof N=="number"?N:1)*.04);}De=f,X=i;let V=q===j?0:(f-j)/(q-j);he(V);let v=re(ie(f,j,q,x));a&&(ye=Math.max(ye,v),v=ye),G=v,L(v),v>=1&&!K?(K=true,te?.()):v<1&&!a&&(K=false),ce=requestAnimationFrame($);}O(),q===j&&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 i=re(ie(Y(),j,q,m));a&&i>0&&(ye=i),G=i,L(i);}let w=new IntersectionObserver(i=>{i.forEach(f=>{Me=f.isIntersecting,Me&&!ue?ce=requestAnimationFrame($):cancelAnimationFrame(ce);});},{root:Z??null}),_;function H(){clearTimeout(_),_=setTimeout(O,150);}window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let ne=st([Pe],H);return w.observe(e),We(e,{type:"animate",getProgress:()=>G,getTrigger:()=>({tStart:j,tEnd:q})}),{destroy(){cancelAnimationFrame(ce),w.disconnect(),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),ne(),clearTimeout(_),He(),qe(e);},replay(){ye=-1,K=false,G=0,ue=false,L(0);},pause(){ue=true,cancelAnimationFrame(ce);},resume(){ue&&(ue=false,Me&&(ce=requestAnimationFrame($)));},seek(i){let f=Math.min(1,Math.max(0,i));G=f,ye=f,ue=true,cancelAnimationFrame(ce),L(f);},getProgress(){return G},refresh(){O();}}}var _t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ht(e,n={}){if(typeof window>"u")return _t;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return pe("scrollParallax: element not found:",e),_t;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:m,onProgress:a}=n,u=-t*100,y=r.style,P=!!r.ownerSVGElement,N=y.getPropertyValue("transform-box");P&&y.setProperty("transform-box","fill-box");let b=Fe(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${u}%)`]}:{transform:["translateY(0%)",`translateY(${u}%)`]},trigger:m??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:a});return P?{...b,destroy(){b.destroy(),y.setProperty("transform-box",N);}}:b}function je(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Le={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xr(e,n={}){if(typeof window>"u")return Le;let r=je(e).map(t=>pt(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 Yr(e,n={}){if(typeof window>"u")return Le;let r=je(e);if(r.length===0)return Le;let t=0,o=[];function c(a){return pt(r[a],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(a+1,r.length-1),t>a&&o[t]?.resume();}})}function m(){r.forEach((a,u)=>{o[u]=c(u);});for(let a=1;a<o.length;a++)o[a].pause();}return m(),{destroy(){o.forEach(a=>a.destroy()),o.length=0;},replay(){o.forEach(a=>a.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(a){o[t]?.seek(a);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(a=>a.refresh?.());}}}function Qr(e,n){if(typeof window>"u")return Le;let r=je(e).map(t=>Fe(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 Le;let r=je(e);if(r.length===0)return Le;let t=0,o=[];function c(a){return Fe(r[a],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(a+1,r.length-1),t>a&&o[t]?.resume();}})}function m(){r.forEach((a,u)=>{o[u]=c(u);});for(let a=1;a<o.length;a++)o[a].pause();}return m(),{destroy(){o.forEach(a=>a.destroy()),o.length=0;},replay(){o.forEach(a=>a.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(a){o[t]?.seek(a);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(a=>a.refresh?.());}}}function Kr(e,n={}){if(typeof window>"u")return Le;let r=je(e).map(t=>Ht(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=Qr;exports.scrollAnimateSequence=Zr;exports.scrollDrawGroup=Xr;exports.scrollDrawSequence=Yr;exports.scrollParallaxGroup=Kr;
@@ -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-B0YM4nQP.mjs';
2
+ import { S as ScrollParallaxOptions } from '../index-Zxa5HIes.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-CvzRSkuk.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-B0YM4nQP.js';
2
+ import { S as ScrollParallaxOptions } from '../index-G3VfLIN8.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-C9LKls__.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-WHFRS7IP.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-B0YM4nQP.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-B0YM4nQP.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,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-B0YM4nQP.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-B0YM4nQP.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-B0YM4nQP.js';
2
+ import { S as ScrollAnimateOptions } from './engine-C9LKls__.js';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;
@@ -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-B0YM4nQP.mjs';
2
+ import { S as ScrollAnimateOptions } from './engine-CvzRSkuk.mjs';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;