svg-scroll-draw 2.15.3 → 2.16.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 (128) hide show
  1. package/README.md +19 -16
  2. package/dist/angular/index.cjs +2 -2
  3. package/dist/angular/index.d.mts +7 -240
  4. package/dist/angular/index.d.ts +7 -240
  5. package/dist/angular/index.mjs +1 -3
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -2
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.d.mts +1 -33
  10. package/dist/aos/react/index.d.ts +1 -33
  11. package/dist/aos/react/index.mjs +1 -2
  12. package/dist/astro/index.cjs +2 -2
  13. package/dist/astro/index.d.mts +4 -148
  14. package/dist/astro/index.d.ts +4 -148
  15. package/dist/astro/index.mjs +1 -3
  16. package/dist/cdn/aos.global.js +2 -2
  17. package/dist/cdn/scrollreveal.global.js +2 -2
  18. package/dist/cdn/svg-scroll-draw.dev.global.js +51 -39
  19. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  20. package/dist/cdn/vivus.global.js +1 -1
  21. package/dist/chunk-4DOJSIEQ.mjs +1 -0
  22. package/dist/chunk-4MH5SQTH.mjs +1 -0
  23. package/dist/chunk-4T5R3ZTL.mjs +2 -0
  24. package/dist/chunk-5PJEKEEP.mjs +1 -0
  25. package/dist/chunk-AJ22VSHC.mjs +1 -0
  26. package/dist/chunk-BCV4RAIX.mjs +1 -0
  27. package/dist/chunk-DM6EDKWH.mjs +1 -0
  28. package/dist/chunk-E4M2PB7B.mjs +1 -0
  29. package/dist/chunk-JC5BD4RB.mjs +1 -0
  30. package/dist/chunk-KBFWDHF4.mjs +1 -0
  31. package/dist/chunk-KGAJQP2N.mjs +2 -0
  32. package/dist/chunk-LFSU6LR3.mjs +1 -0
  33. package/dist/chunk-OJFWQ6CU.mjs +1 -0
  34. package/dist/chunk-OMI46IXL.mjs +2 -0
  35. package/dist/chunk-OWMO2S3V.mjs +1 -0
  36. package/dist/chunk-PEFR3ZB7.mjs +1 -0
  37. package/dist/chunk-QJ4H2HW3.mjs +1 -0
  38. package/dist/chunk-SNCRC6BA.mjs +1 -0
  39. package/dist/chunk-WDIHLRZZ.mjs +3 -0
  40. package/dist/chunk-WQZKXAXK.mjs +2 -0
  41. package/dist/chunk-YWKPTYSG.mjs +1 -0
  42. package/dist/chunk-YZV4Z3EQ.mjs +1 -0
  43. package/dist/cinematic/index.cjs +1 -1
  44. package/dist/cinematic/index.mjs +1 -2
  45. package/dist/devtools/index.mjs +1 -1
  46. package/dist/engine-6AXEX8CL.d.ts +57 -0
  47. package/dist/engine-Ci08nM91.d.mts +57 -0
  48. package/dist/group/index.cjs +2 -2
  49. package/dist/group/index.d.mts +4 -207
  50. package/dist/group/index.d.ts +4 -207
  51. package/dist/group/index.mjs +1 -3
  52. package/dist/horizontal/index.cjs +1 -1
  53. package/dist/horizontal/index.d.mts +1 -33
  54. package/dist/horizontal/index.d.ts +1 -33
  55. package/dist/horizontal/index.mjs +1 -1
  56. package/dist/index-BDGQEK6X.d.mts +15 -0
  57. package/dist/index-BVuNgQSd.d.ts +14 -0
  58. package/dist/index-CGR7pSOR.d.mts +14 -0
  59. package/dist/index-DxjUOIbK.d.ts +15 -0
  60. package/dist/index.cjs +3 -3
  61. package/dist/index.d.mts +8 -294
  62. package/dist/index.d.ts +8 -294
  63. package/dist/index.mjs +1 -4
  64. package/dist/nuxt/index.cjs +2 -2
  65. package/dist/nuxt/index.d.mts +7 -507
  66. package/dist/nuxt/index.d.ts +7 -507
  67. package/dist/nuxt/index.mjs +1 -3
  68. package/dist/pin/index.cjs +1 -1
  69. package/dist/pin/index.mjs +1 -1
  70. package/dist/progress/index.cjs +1 -1
  71. package/dist/progress/index.d.mts +1 -33
  72. package/dist/progress/index.d.ts +1 -33
  73. package/dist/progress/index.mjs +1 -1
  74. package/dist/react/index.cjs +2 -2
  75. package/dist/react/index.d.mts +5 -212
  76. package/dist/react/index.d.ts +5 -212
  77. package/dist/react/index.mjs +1 -3
  78. package/dist/reveal/index.cjs +1 -1
  79. package/dist/reveal/index.d.mts +1 -5
  80. package/dist/reveal/index.d.ts +1 -5
  81. package/dist/reveal/index.mjs +1 -1
  82. package/dist/scroll-draw-BlJfbTDv.d.ts +5 -0
  83. package/dist/scroll-draw-CNlq4Z_L.d.mts +5 -0
  84. package/dist/scrollreveal/index.cjs +2 -2
  85. package/dist/scrollreveal/index.mjs +1 -2
  86. package/dist/scrollreveal/react/index.cjs +2 -2
  87. package/dist/scrollreveal/react/index.d.mts +1 -36
  88. package/dist/scrollreveal/react/index.d.ts +1 -36
  89. package/dist/scrollreveal/react/index.mjs +1 -2
  90. package/dist/snap/index.cjs +1 -1
  91. package/dist/snap/index.d.mts +1 -1
  92. package/dist/snap/index.d.ts +1 -1
  93. package/dist/snap/index.mjs +1 -1
  94. package/dist/solid/index.cjs +2 -2
  95. package/dist/solid/index.d.mts +6 -240
  96. package/dist/solid/index.d.ts +6 -240
  97. package/dist/solid/index.mjs +1 -3
  98. package/dist/svelte/index.cjs +2 -2
  99. package/dist/svelte/index.d.mts +6 -240
  100. package/dist/svelte/index.d.ts +6 -240
  101. package/dist/svelte/index.mjs +1 -3
  102. package/dist/text/index.cjs +1 -1
  103. package/dist/text/index.d.mts +1 -33
  104. package/dist/text/index.d.ts +1 -33
  105. package/dist/text/index.mjs +1 -1
  106. package/dist/timeline/index.cjs +7 -7
  107. package/dist/timeline/index.d.mts +1 -29
  108. package/dist/timeline/index.d.ts +1 -29
  109. package/dist/timeline/index.mjs +11 -11
  110. package/dist/types-DHU1zNEw.d.mts +147 -0
  111. package/dist/types-DHU1zNEw.d.ts +147 -0
  112. package/dist/video/index.cjs +1 -1
  113. package/dist/video/index.d.mts +1 -33
  114. package/dist/video/index.d.ts +1 -33
  115. package/dist/video/index.mjs +1 -1
  116. package/dist/vivus/index.cjs +2 -2
  117. package/dist/vivus/index.mjs +1 -2
  118. package/dist/vivus/react/index.cjs +2 -1
  119. package/dist/vivus/react/index.d.mts +1 -99
  120. package/dist/vivus/react/index.d.ts +1 -99
  121. package/dist/vivus/react/index.mjs +1 -1
  122. package/dist/vue/index.cjs +2 -2
  123. package/dist/vue/index.d.mts +6 -213
  124. package/dist/vue/index.d.ts +6 -213
  125. package/dist/vue/index.mjs +1 -3
  126. package/dist/web-component/index.cjs +2 -2
  127. package/dist/web-component/index.mjs +1 -3
  128. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- 'use strict';function Ft({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 _t({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 Se={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:Ft(),elastic:_t()};function De(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 ht(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 bt(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){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 Ht(e,n,r){return Math.min(r,Math.max(n,e))}function ne(e,n,r,t){return r===n?0:Ht((e-n)/(r-n)*t,0,1)}function Ke(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 Ce(e,n,r,t,o){let c=ht(e.top,e.height,n,t.element)-bt(t.viewport,r),m=ht(e.top,e.height,n,o.element)-bt(o.viewport,r);return {tStart:c,tEnd:m}}function wt(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 Oe(e,n,r){let t=wt(e),o=wt(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 vt={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 Ve=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ye(e,...n){Ve&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Vt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",zt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Et=33;function Wt(){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<Et;r++){let t=r/(Et-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function Je(e){switch(e){case "linear":return "linear";case "ease-in":return Vt;case "ease-out":return zt;case "ease-in-out":return Wt()?qt(Se["ease-in-out"]):null;default:return null}}var St=Symbol.for("svg-scroll-draw.registry");function xt(){let e=globalThis;return e[St]||(e[St]=new Map)}function ze(e,n){xt().set(e,n);}function We(e){xt().delete(e);}var Gt=0;function Bt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Tt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var $t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function jt(e){if(!Ve)return;let n=Tt(e,"stroke");if(!n||n==="none"){ye("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!$t.has(r)&&!$t.has(Tt(e,"fill"))&&ye("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ut(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 _t({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 Ht({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 Se={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:_t(),elastic:Ht()};function bt(e,n,r){return Math.min(r,Math.max(n,e))}function De(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function wt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function vt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ne(e,n,r,t){return r===n?0:bt((e-n)/(r-n)*t,0,1)}function Ie(e,n,r,t,o){let c=wt(e.top,e.height,n,t.element)-vt(t.viewport,r),m=wt(e.top,e.height,n,o.element)-vt(o.viewport,r);return {tStart:c,tEnd:m}}function Je(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 Ce(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Et(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Oe(e,n,r){let t=Et(e),o=Et(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 St={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var ze=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){ze&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Vt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",zt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",xt=33;function Wt(){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<xt;r++){let t=r/(xt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function et(e){switch(e){case "linear":return "linear";case "ease-in":return Vt;case "ease-out":return zt;case "ease-in-out":return Wt()?qt(Se["ease-in-out"]):null;default:return null}}var Tt=Symbol.for("svg-scroll-draw.registry");function $t(){let e=globalThis;return e[Tt]||(e[Tt]=new Map)}function We(e,n){$t().set(e,n);}function qe(e){$t().delete(e);}var Gt=0;function Bt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function At(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Pt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function jt(e){if(!ze)return;let n=At(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&&!Pt.has(r)&&!Pt.has(At(e,"fill"))&&fe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ut(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let c=r==="x"?window.scrollX:window.scrollY,m=e-c,i=n-c,u=r==="x";t.innerHTML=`
2
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 At=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Pt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Xt(e,n,r){if(!Ve)return;let t=(e.match(Pt)??[]).join("").toUpperCase(),o=(n.match(Pt)??[]).join("").toUpperCase(),c=(e.match(At)??[]).length,m=(n.match(At)??[]).length;if(t!==o){ye(`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&&ye(`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 at(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 lt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...vt[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:fe=false,debug:Ge=false,axis:J="y",scrollContainer:Pe,autoReverse:xe=false,delay:he=0,strokeColor:oe,strokeWidth:me,fillOpacity:ee,waypoints:se,velocityScale:be=false,threshold:Re=0,rootMargin:Q="0px",repeat:C=0,repeatDelay:Ne=0,morphTo:z,clip:Me,autoplay:Fe=false,duration:Be=1e3,native:tt=true,onProgress:Te,onStart:U,onComplete:W,onEnter:ie,onLeave:$e,onEnterBack:ae,onLeaveBack:pe}=o,_=Me===true?"left":typeof Me=="string"?Me:false,Z=typeof h=="function"?h:Se[h]??Se.linear,le=De(S.start??"top bottom"),ke=De(S.end??"bottom top"),X=typeof Pe=="string"?document.querySelector(Pe):Pe??null,Y=Array.isArray(oe)?oe[0]:null,O=Array.isArray(oe)?oe[1]:typeof oe=="string"?oe:null,R=Array.isArray(me)?me[0]:null,M=Array.isArray(me)?me[1]:typeof me=="number"?me:null,H=Array.isArray(ee)?ee[0]:null,D=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null;function ce(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,te=false,G=-1,I=-1,k=false,B=0,de=0,we,rt=null;function ct(){rt?.destroy(),rt=null;}let ve=new Set,ut=NaN,Ee=true,je=-1,ft=performance.now(),Le=NaN;function nt(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function mt(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function pt(){let s=Ke(e,X,J);return Ce(s,s.scroll,mt(),le,ke)}function dt(){(({tStart:f,tEnd:q}=pt())),Ge&&Ve&&(ct(),rt=Ut(f,q,J));}function ot(s,l=pt){ze(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),We(e);},s}function Ct(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),_){let g=l==="reverse"?1-s:s;e.style.clipPath=ce(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}`),Y&&O?g.style.stroke=Oe(Y,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",at(a[N],z,s));});}function Ue(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=ce(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="",Y&&(s.style.stroke=Y),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=>{jt(s);let l=Ie(s);b.push(l);let g=s.tagName.toLowerCase()==="path";g?a.push(s.getAttribute("d")??""):a.push(""),z&&(g?Xt(a[a.length-1],z,s):ye(`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="",Y&&(s.style.stroke=Y),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`));}),_){if(c)return e.style.clipPath=ce(1),W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ce(0);}else if(c)return W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let gt=typeof h=="string"?Je(h):null;function Ot(){return !(tt===false||!Bt()||!T.length||!gt||_||J!=="y"||X||i!==1||V!==0||fe||xe||be!==false||z||se||C||he>0||Te||U||W||ie||$e||ae||pe||oe!=null||me!=null||ee!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Rt(){let s=++Gt,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,N=`--svg-scroll-draw-${s}`,ge=x==="reverse"?"0":"var(--ssd-len)",ue=x==="reverse"?"var(--ssd-len)":"0",re=`stroke-dashoffset:${ge};`,y=`stroke-dashoffset:${ue};`;u&&(re+=`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{${re}}to{${y}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${gt};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:K}=Ce({top:p.top,height:p.height},nt(),mt(),le,ke);return Z(ne(nt(),L,K,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((K,j)=>{K.classList.remove(l),K.style.strokeDashoffset=x==="reverse"?`${b[j]*L}`:`${b[j]*(1-L)}`,u&&(K.style.opacity=x==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return P()},refresh(){T.forEach((p,L)=>{b[L]=Ie(p),p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`;});}}}if(Ot())return ot(Rt());function Nt(){let s=Math.max(1,Be),l=0,g=0,N=false;function ge(d){let E=true;if(_){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);B=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=ce(x==="reverse"?1-p:p),Te?.(p),P<1&&(E=false);}else T.forEach((P,p)=>{let L=p*V*s,K=Math.min(1,Math.max(0,(d-L)/s)),j=Z(K);P.style.strokeDashoffset=x==="reverse"?`${b[p]*j}`:`${b[p]*(1-j)}`,u&&(P.style.opacity=x==="reverse"?`${1-j}`:`${j}`),Y&&O?P.style.stroke=Oe(Y,O,j):O&&(P.style.stroke=O),R!==null&&M!==null?P.style.strokeWidth=`${R+(M-R)*j}`:M!==null&&(P.style.strokeWidth=`${M}`),H!==null&&D!==null?P.style.fillOpacity=`${H+(D-H)*j}`:D!==null&&(P.style.fillOpacity=`${D}`),z&&P.tagName.toLowerCase()==="path"&&a[p]&&P.setAttribute("d",at(a[p],z,j)),p===0&&(B=j,Te?.(j),e.style.setProperty("--scroll-draw-progress",String(j))),K<1&&(E=false);});if(se){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);for(let L in se){let K=parseFloat(L);p>=K&&!ve.has(K)&&(ve.add(K),se[L]?.());}}return E}function ue(d){if(k)return;let E=d-l;$||($=true,U?.());let P=ge(E);if(P&&!v){v=true,ge(s*(1+Math.max(0,T.length-1)*V)),W?.(),de<(C==="infinite"?1/0:C??0)&&(de++,we=setTimeout(()=>{l=performance.now(),$=false,v=false,ve.clear(),Ue(),A=requestAnimationFrame(ue);},Ne));return}P||(A=requestAnimationFrame(ue));}function re(){cancelAnimationFrame(A),clearTimeout(we),l=performance.now(),g=0,k=false,$=false,v=false,de=0,N=true,B=0,ve.clear(),Ue(),A=requestAnimationFrame(ue);}let y=new IntersectionObserver(d=>{d.forEach(E=>{E.isIntersecting&&!(fe&&v)?re():!E.isIntersecting&&!fe&&!v&&(cancelAnimationFrame(A),clearTimeout(we),N=false);});},{root:X??null,threshold:Re,rootMargin:Q}),w;function F(){clearTimeout(w),w=setTimeout(()=>{T.forEach((d,E)=>{b[E]=Ie(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(we),y.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){de=0,re();},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));B=E,k=true,g=E*s,l=performance.now()-g,cancelAnimationFrame(A),ge(g);},getProgress(){return B},refresh(){clearTimeout(w),T.forEach((d,E)=>{b[E]=Ie(d),d.style.strokeDasharray=`${b[E]}`;});}}}if(Fe)return ot(Nt());dt();function Xe(){if(!te||k)return;let s=performance.now(),l=nt();if(!Ee&&be===false&&l===ut){A=requestAnimationFrame(Xe);return}Ee=false,ut=l;let g=i;if(be!==false){let y=s-ft,w=y>0?Math.abs(l-(je<0?l:je))/y:0;g=i*Math.max(.2,1+w*(typeof be=="number"?be:1)*.04);}je=l,ft=s;let N=xe?I===-1||l>=I?"forward":"reverse":x;I=l;let ge=q-f,ue=true,re=ge===0?0:(l-f)/ge;if(isNaN(Le)||(Le<=0&&re>0?ie?.():Le>0&&re<=0&&pe?.(),Le<1&&re>=1?$e?.():Le>=1&&re<1&&ae?.()),Le=re,_){let y=Z(ne(l,f,q,g));fe&&!xe&&(G=Math.max(G,y),y=G),B=y,e.style.setProperty("--scroll-draw-progress",String(y));let w=N==="reverse"?1-y:y;e.style.clipPath=ce(w),Te?.(y),!$&&ne(l,f,q,g)>0&&($=true,U?.()),y>=1&&!v?(v=true,W?.(),de<(C==="infinite"?1/0:C??0)&&(de++,we=setTimeout(()=>{G=-1,$=false,v=false,e.style.clipPath=ce(0);},Ne))):y<1&&!fe&&(v=false),A=requestAnimationFrame(Xe);return}if(T.forEach((y,w)=>{let F=w*V*ge,d=Z(ne(l,f+F,q+F,g));fe&&!xe&&(G=Math.max(G,d),d=G),B=d,y.style.strokeDashoffset=N==="reverse"?`${b[w]*d}`:`${b[w]*(1-d)}`,u&&(y.style.opacity=N==="reverse"?`${1-d}`:`${d}`),Y&&O?y.style.stroke=Oe(Y,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",at(a[w],z,d)),w===0&&(Te?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(ue=false);}),se){let y=Z(ne(l,f,q,g));for(let w in se){let F=parseFloat(w);y>=F&&!ve.has(F)&&(ve.add(F),se[w]?.());}}!$&&ne(l,f,q,g)>0&&($=true,U?.()),ue&&!v?(v=true,W?.(),de<(C==="infinite"?1/0:C??0)&&(de++,we=setTimeout(()=>{G=-1,$=false,v=false,ve.clear(),Ue(),Ee=true;},Ne))):!ue&&!fe&&(v=false),A=requestAnimationFrame(Xe);}let st=false;function Ye(){st||(st=true,A=requestAnimationFrame(function(){Xe();}));}function Qe(){st=false,cancelAnimationFrame(A);}let it=new IntersectionObserver(s=>{s.forEach(l=>{te=l.isIntersecting,te&&!k?(Ee=true,Ye()):Qe();});},{root:X??null,threshold:Re,rootMargin:Q});function yt(){T.forEach((s,l)=>{b[l]=Ie(s),s.style.strokeDasharray=`${b[l]}`;}),dt(),Ee=true;}let Ze;function _e(){clearTimeout(Ze),Ze=setTimeout(yt,150);}window.addEventListener("resize",_e),window.addEventListener("orientationchange",_e);let He;return typeof ResizeObserver<"u"&&(He=new ResizeObserver(()=>_e()),He.observe(document.body),He.observe(document.documentElement),He.observe(e)),he>0?setTimeout(()=>it.observe(e),he):it.observe(e),ot({destroy(){cancelAnimationFrame(A),clearTimeout(we),Qe(),it.disconnect(),He?.disconnect(),window.removeEventListener("resize",_e),window.removeEventListener("orientationchange",_e),clearTimeout(Ze),ct();},replay(){G=-1,I=-1,je=-1,$=false,v=false,de=0,k=false,B=0,ve.clear(),clearTimeout(we),Ue(),Ee=true,te&&Ye();},pause(){k=true,Qe();},resume(){k&&(k=false,Ee=true,te&&Ye());},seek(s){let l=Math.min(1,Math.max(0,s));B=l,G=l,k=true,Qe(),Ct(l,x),Ee=true;},getProgress(){return B},refresh(){clearTimeout(Ze),yt(),te&&!k&&Ye();}},()=>({tStart:f,tEnd:q}))}function Yt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Mt(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 Qt(e,n,r){let t=Mt(e),o=Mt(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 kt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Yt(t))return Oe(t,o,r);if(t.includes("("))return Qt(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 Zt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Jt=0,Lt="--scroll-draw-progress";function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function et(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:fe,onProgress:Ge,onComplete:J,onEnter:Pe,onLeave:xe,onEnterBack:he,onLeaveBack:oe}=n,me=x&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=typeof c=="function"?c:Se[c]??Se["ease-out"],se=De(o.start??"top bottom"),be=De(o.end??"bottom top"),Re=fe??e,Q=typeof h=="string"?document.querySelector(h):h??null,C=Object.entries(t).map(([a,f])=>({prop:Zt(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function Ne(){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 Me=new Map;for(let a of [...C.map(f=>f.prop),Lt])Me.set(a,e.style.getPropertyValue(a));function Fe(){for(let[a,f]of Me)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(me)return z(),J?.(),{...r,destroy:Fe,getProgress:()=>1};Ne();let Be=typeof c=="string"?Je(c):null;function tt(){if(!S||!er()||!Be||u!=="y"||Q||Re!==e||i||m!==1||Ge||J||Pe||xe||he||oe||V!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let a of C)if(!Kt.has(a.prop))return false;return true}function Te(){let a=`ssd-a-${++Jt}`,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:${Be};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,te=()=>{let I=e.getBoundingClientRect();return Ce({top:I.top,height:I.height},$(),A(),se,be)};ze(e,{type:"animate",getProgress:()=>G.getProgress(),getTrigger:te});let G={destroy(){e.classList.remove(a),v.remove(),e.style.animationPlayState="",Fe(),We(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(I){let k=Math.min(1,Math.max(0,I));e.classList.remove(a);for(let B of C)e.style.setProperty(B.prop,kt(B.from,B.to,k));},getProgress(){let{tStart:I,tEnd:k}=te();return ee(ne($(),I,k,m))}};return G}if(tt())return Te();let U=0,W=0,ie=0,$e=false,ae=false,pe=-1,_=0,Z=false,le=NaN,ke=-1,X=0,Y=()=>Q?u==="x"?Q.scrollLeft:Q.scrollTop:u==="x"?window.scrollX:window.scrollY,O=()=>Q?u==="x"?Q.clientWidth:Q.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function R(){let a=Ke(Re,Q,u),f=Ce(a,a.scroll,O(),se,be);U=f.tStart,W=f.tEnd;}function M(a){e.style.setProperty(Lt,String(a));for(let f of C)e.style.setProperty(f.prop,kt(f.from,f.to,a));Ge?.(a);}function H(a){if(isNaN(le)){le=a;return}le<=0&&a>0?Pe?.():le>0&&a<=0&&oe?.(),le<1&&a>=1?xe?.():le>=1&&a<1&&he?.(),le=a;}function D(){if(!$e||ae)return;let a=performance.now(),f=Y(),q=m;if(V!==false){let A=a-X,te=A>0?Math.abs(f-(ke<0?f:ke))/A:0;q=m*Math.max(.2,1+te*(typeof V=="number"?V:1)*.04);}ke=f,X=a;let v=W===U?0:(f-U)/(W-U);H(v);let $=ee(ne(f,U,W,q));i&&(pe=Math.max(pe,$),$=pe),_=$,M($),$>=1&&!Z?(Z=true,J?.()):$<1&&!i&&(Z=false),ie=requestAnimationFrame(D);}R(),W===U&&ye("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let a=ee(ne(Y(),U,W,m));i&&a>0&&(pe=a),_=a,M(a);}let ce=new IntersectionObserver(a=>{a.forEach(f=>{$e=f.isIntersecting,$e&&!ae?ie=requestAnimationFrame(D):cancelAnimationFrame(ie);});},{root:Q??null}),T;function b(){clearTimeout(T),T=setTimeout(R,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),ce.observe(e),ze(e,{type:"animate",getProgress:()=>_,getTrigger:()=>({tStart:U,tEnd:W})}),{destroy(){cancelAnimationFrame(ie),ce.disconnect(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(T),Fe(),We(e);},replay(){pe=-1,Z=false,_=0,ae=false,M(0);},pause(){ae=true,cancelAnimationFrame(ie);},resume(){ae&&(ae=false,$e&&(ie=requestAnimationFrame(D)));},seek(a){let f=Math.min(1,Math.max(0,a));_=f,pe=f,ae=true,cancelAnimationFrame(ie),M(f);},getProgress(){return _}}}var Dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function It(e,n={}){if(typeof window>"u")return Dt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ye("scrollParallax: element not found:",e),Dt;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 et(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 qe(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Ae={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vr(e,n={}){if(typeof window>"u")return Ae;let r=qe(e).map(t=>lt(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 Er(e,n={}){if(typeof window>"u")return Ae;let r=qe(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return lt(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 Sr(e,n){if(typeof window>"u")return Ae;let r=qe(e).map(t=>et(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 xr(e,n){if(typeof window>"u")return Ae;let r=qe(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return et(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 Tr(e,n={}){if(typeof window>"u")return Ae;let r=qe(e).map(t=>It(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=Sr;exports.scrollAnimateSequence=xr;exports.scrollDrawGroup=vr;exports.scrollDrawSequence=Er;exports.scrollParallaxGroup=Tr;
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 Mt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,kt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Xt(e,n,r){if(!ze)return;let t=(e.match(kt)??[]).join("").toUpperCase(),o=(n.match(kt)??[]).join("").toUpperCase(),c=(e.match(Mt)??[]).length,m=(n.match(Mt)??[]).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 at(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 lt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...St[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:Be=false,axis:J="y",scrollContainer:Pe,autoReverse:xe=false,delay:he=0,strokeColor:oe,strokeWidth:pe,fillOpacity:ee,waypoints:se,velocityScale:be=false,threshold:Ne=0,rootMargin:Q="0px",repeat:C=0,repeatDelay:Fe=0,morphTo:z,clip:Me,autoplay:_e=false,duration:je=1e3,native:tt=true,onProgress:Te,onStart:U,onComplete:W,onEnter:ie,onLeave:$e,onEnterBack:ae,onLeaveBack:de}=o,_=Me===true?"left":typeof Me=="string"?Me:false,Z=typeof h=="function"?h:Se[h]??Se.linear,le=De(S.start??"top bottom"),ke=De(S.end??"bottom top"),X=typeof Pe=="string"?document.querySelector(Pe):Pe??null,Y=Array.isArray(oe)?oe[0]:null,O=Array.isArray(oe)?oe[1]:typeof oe=="string"?oe:null,R=Array.isArray(pe)?pe[0]:null,M=Array.isArray(pe)?pe[1]:typeof pe=="number"?pe:null,H=Array.isArray(ee)?ee[0]:null,D=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null;function ce(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,te=false,G=-1,I=-1,k=false,B=0,ge=0,we,rt=null;function ut(){rt?.destroy(),rt=null;}let ve=new Set,ft=NaN,Ee=true,Ue=-1,mt=performance.now(),Le=NaN;function nt(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function pt(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function dt(){let s=Je(e,X,J);return Ie(s,s.scroll,pt(),le,ke)}function gt(){(({tStart:f,tEnd:q}=dt())),Be&&ze&&(ut(),rt=Ut(f,q,J));}function ot(s,l=dt){We(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),qe(e);},s}function Ot(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),_){let g=l==="reverse"?1-s:s;e.style.clipPath=ce(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}`),Y&&O?g.style.stroke=Oe(Y,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",at(a[N],z,s));});}function Xe(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=ce(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="",Y&&(s.style.stroke=Y),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=>{jt(s);let l=Ce(s);b.push(l);let g=s.tagName.toLowerCase()==="path";g?a.push(s.getAttribute("d")??""):a.push(""),z&&(g?Xt(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="",Y&&(s.style.stroke=Y),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`));}),_){if(c)return e.style.clipPath=ce(1),W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ce(0);}else if(c)return W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let yt=typeof h=="string"?et(h):null;function Rt(){return !(tt===false||!Bt()||!T.length||!yt||_||J!=="y"||X||i!==1||V!==0||me||xe||be!==false||z||se||C||he>0||Te||U||W||ie||$e||ae||de||oe!=null||pe!=null||ee!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Nt(){let s=++Gt,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",re=`stroke-dashoffset:${ye};`,y=`stroke-dashoffset:${ue};`;u&&(re+=`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{${re}}to{${y}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${yt};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:K}=Ie({top:p.top,height:p.height},nt(),pt(),le,ke);return Z(ne(nt(),L,K,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((K,j)=>{K.classList.remove(l),K.style.strokeDashoffset=x==="reverse"?`${b[j]*L}`:`${b[j]*(1-L)}`,u&&(K.style.opacity=x==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return P()},refresh(){T.forEach((p,L)=>{b[L]=Ce(p),p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`;});}}}if(Rt())return ot(Nt());function Ft(){let s=Math.max(1,je),l=0,g=0,N=false;function ye(d){let E=true;if(_){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);B=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=ce(x==="reverse"?1-p:p),Te?.(p),P<1&&(E=false);}else T.forEach((P,p)=>{let L=p*V*s,K=Math.min(1,Math.max(0,(d-L)/s)),j=Z(K);P.style.strokeDashoffset=x==="reverse"?`${b[p]*j}`:`${b[p]*(1-j)}`,u&&(P.style.opacity=x==="reverse"?`${1-j}`:`${j}`),Y&&O?P.style.stroke=Oe(Y,O,j):O&&(P.style.stroke=O),R!==null&&M!==null?P.style.strokeWidth=`${R+(M-R)*j}`:M!==null&&(P.style.strokeWidth=`${M}`),H!==null&&D!==null?P.style.fillOpacity=`${H+(D-H)*j}`:D!==null&&(P.style.fillOpacity=`${D}`),z&&P.tagName.toLowerCase()==="path"&&a[p]&&P.setAttribute("d",at(a[p],z,j)),p===0&&(B=j,Te?.(j),e.style.setProperty("--scroll-draw-progress",String(j))),K<1&&(E=false);});if(se){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);for(let L in se){let K=parseFloat(L);p>=K&&!ve.has(K)&&(ve.add(K),se[L]?.());}}return E}function ue(d){if(k)return;let E=d-l;$||($=true,U?.());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++,we=setTimeout(()=>{l=performance.now(),$=false,v=false,ve.clear(),Xe(),A=requestAnimationFrame(ue);},Fe));return}P||(A=requestAnimationFrame(ue));}function re(){cancelAnimationFrame(A),clearTimeout(we),l=performance.now(),g=0,k=false,$=false,v=false,ge=0,N=true,B=0,ve.clear(),Xe(),A=requestAnimationFrame(ue);}let y=new IntersectionObserver(d=>{d.forEach(E=>{E.isIntersecting&&!(me&&v)?re():!E.isIntersecting&&!me&&!v&&(cancelAnimationFrame(A),clearTimeout(we),N=false);});},{root:X??null,threshold:Ne,rootMargin:Q}),w;function F(){clearTimeout(w),w=setTimeout(()=>{T.forEach((d,E)=>{b[E]=Ce(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(we),y.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){ge=0,re();},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));B=E,k=true,g=E*s,l=performance.now()-g,cancelAnimationFrame(A),ye(g);},getProgress(){return B},refresh(){clearTimeout(w),T.forEach((d,E)=>{b[E]=Ce(d),d.style.strokeDasharray=`${b[E]}`;});}}}if(_e)return ot(Ft());gt();function Ye(){if(!te||k)return;let s=performance.now(),l=nt();if(!Ee&&be===false&&l===ft){A=requestAnimationFrame(Ye);return}Ee=false,ft=l;let g=i;if(be!==false){let y=s-mt,w=y>0?Math.abs(l-(Ue<0?l:Ue))/y:0;g=i*Math.max(.2,1+w*(typeof be=="number"?be:1)*.04);}Ue=l,mt=s;let N=xe?I===-1||l>=I?"forward":"reverse":x;I=l;let ye=q-f,ue=true,re=ye===0?0:(l-f)/ye;if(isNaN(Le)||(Le<=0&&re>0?ie?.():Le>0&&re<=0&&de?.(),Le<1&&re>=1?$e?.():Le>=1&&re<1&&ae?.()),Le=re,_){let y=Z(ne(l,f,q,g));me&&!xe&&(G=Math.max(G,y),y=G),B=y,e.style.setProperty("--scroll-draw-progress",String(y));let w=N==="reverse"?1-y:y;e.style.clipPath=ce(w),Te?.(y),!$&&ne(l,f,q,g)>0&&($=true,U?.()),y>=1&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,we=setTimeout(()=>{G=-1,$=false,v=false,e.style.clipPath=ce(0);},Fe))):y<1&&!me&&(v=false),A=requestAnimationFrame(Ye);return}if(T.forEach((y,w)=>{let F=w*V*ye,d=Z(ne(l,f+F,q+F,g));me&&!xe&&(G=Math.max(G,d),d=G),B=d,y.style.strokeDashoffset=N==="reverse"?`${b[w]*d}`:`${b[w]*(1-d)}`,u&&(y.style.opacity=N==="reverse"?`${1-d}`:`${d}`),Y&&O?y.style.stroke=Oe(Y,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",at(a[w],z,d)),w===0&&(Te?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(ue=false);}),se){let y=Z(ne(l,f,q,g));for(let w in se){let F=parseFloat(w);y>=F&&!ve.has(F)&&(ve.add(F),se[w]?.());}}!$&&ne(l,f,q,g)>0&&($=true,U?.()),ue&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,we=setTimeout(()=>{G=-1,$=false,v=false,ve.clear(),Xe(),Ee=true;},Fe))):!ue&&!me&&(v=false),A=requestAnimationFrame(Ye);}let st=false;function Qe(){st||(st=true,A=requestAnimationFrame(function(){Ye();}));}function Ze(){st=false,cancelAnimationFrame(A);}let it=new IntersectionObserver(s=>{s.forEach(l=>{te=l.isIntersecting,te&&!k?(Ee=true,Qe()):Ze();});},{root:X??null,threshold:Ne,rootMargin:Q});function ht(){T.forEach((s,l)=>{b[l]=Ce(s),s.style.strokeDasharray=`${b[l]}`;}),gt(),Ee=true;}let Ke;function He(){clearTimeout(Ke),Ke=setTimeout(ht,150);}window.addEventListener("resize",He),window.addEventListener("orientationchange",He);let Ve;return typeof ResizeObserver<"u"&&(Ve=new ResizeObserver(()=>He()),Ve.observe(document.body),Ve.observe(document.documentElement),Ve.observe(e)),he>0?setTimeout(()=>it.observe(e),he):it.observe(e),ot({destroy(){cancelAnimationFrame(A),clearTimeout(we),Ze(),it.disconnect(),Ve?.disconnect(),window.removeEventListener("resize",He),window.removeEventListener("orientationchange",He),clearTimeout(Ke),ut();},replay(){G=-1,I=-1,Ue=-1,$=false,v=false,ge=0,k=false,B=0,ve.clear(),clearTimeout(we),Xe(),Ee=true,te&&Qe();},pause(){k=true,Ze();},resume(){k&&(k=false,Ee=true,te&&Qe());},seek(s){let l=Math.min(1,Math.max(0,s));B=l,G=l,k=true,Ze(),Ot(l,x),Ee=true;},getProgress(){return B},refresh(){clearTimeout(Ke),ht(),te&&!k&&Qe();}},()=>({tStart:f,tEnd:q}))}function Yt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Lt(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 Qt(e,n,r){let t=Lt(e),o=Lt(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 ct(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Yt(t))return Oe(t,o,r);if(t.includes("("))return Qt(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 Zt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Jt=0,Dt="--scroll-draw-progress";function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Re(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:Be,onComplete:J,onEnter:Pe,onLeave:xe,onEnterBack:he,onLeaveBack:oe}=n,pe=x&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=typeof c=="function"?c:Se[c]??Se["ease-out"],se=De(o.start??"top bottom"),be=De(o.end??"bottom top"),Ne=me??e,Q=typeof h=="string"?document.querySelector(h):h??null,C=Object.entries(t).map(([a,f])=>({prop:Zt(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function Fe(){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 Me=new Map;for(let a of [...C.map(f=>f.prop),Dt])Me.set(a,e.style.getPropertyValue(a));function _e(){for(let[a,f]of Me)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(pe)return z(),J?.(),{...r,destroy:_e,getProgress:()=>1};Fe();let je=typeof c=="string"?et(c):null;function tt(){if(!S||!er()||!je||u!=="y"||Q||Ne!==e||i||m!==1||Be||J||Pe||xe||he||oe||V!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let a of C)if(!Kt.has(a.prop))return false;return true}function Te(){let a=`ssd-a-${++Jt}`,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:${je};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,te=()=>{let I=e.getBoundingClientRect();return Ie({top:I.top,height:I.height},$(),A(),se,be)};We(e,{type:"animate",getProgress:()=>G.getProgress(),getTrigger:te});let G={destroy(){e.classList.remove(a),v.remove(),e.style.animationPlayState="",_e(),qe(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(I){let k=Math.min(1,Math.max(0,I));e.classList.remove(a);for(let B of C)e.style.setProperty(B.prop,ct(B.from,B.to,k));},getProgress(){let{tStart:I,tEnd:k}=te();return ee(ne($(),I,k,m))}};return G}if(tt())return Te();let U=0,W=0,ie=0,$e=false,ae=false,de=-1,_=0,Z=false,le=NaN,ke=-1,X=0,Y=()=>Q?u==="x"?Q.scrollLeft:Q.scrollTop:u==="x"?window.scrollX:window.scrollY,O=()=>Q?u==="x"?Q.clientWidth:Q.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function R(){let a=Je(Ne,Q,u),f=Ie(a,a.scroll,O(),se,be);U=f.tStart,W=f.tEnd;}function M(a){e.style.setProperty(Dt,String(a));for(let f of C)e.style.setProperty(f.prop,ct(f.from,f.to,a));Be?.(a);}function H(a){if(isNaN(le)){le=a;return}le<=0&&a>0?Pe?.():le>0&&a<=0&&oe?.(),le<1&&a>=1?xe?.():le>=1&&a<1&&he?.(),le=a;}function D(){if(!$e||ae)return;let a=performance.now(),f=Y(),q=m;if(V!==false){let A=a-X,te=A>0?Math.abs(f-(ke<0?f:ke))/A:0;q=m*Math.max(.2,1+te*(typeof V=="number"?V:1)*.04);}ke=f,X=a;let v=W===U?0:(f-U)/(W-U);H(v);let $=ee(ne(f,U,W,q));i&&(de=Math.max(de,$),$=de),_=$,M($),$>=1&&!Z?(Z=true,J?.()):$<1&&!i&&(Z=false),ie=requestAnimationFrame(D);}R(),W===U&&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=ee(ne(Y(),U,W,m));i&&a>0&&(de=a),_=a,M(a);}let ce=new IntersectionObserver(a=>{a.forEach(f=>{$e=f.isIntersecting,$e&&!ae?ie=requestAnimationFrame(D):cancelAnimationFrame(ie);});},{root:Q??null}),T;function b(){clearTimeout(T),T=setTimeout(R,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),ce.observe(e),We(e,{type:"animate",getProgress:()=>_,getTrigger:()=>({tStart:U,tEnd:W})}),{destroy(){cancelAnimationFrame(ie),ce.disconnect(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(T),_e(),qe(e);},replay(){de=-1,Z=false,_=0,ae=false,M(0);},pause(){ae=true,cancelAnimationFrame(ie);},resume(){ae&&(ae=false,$e&&(ie=requestAnimationFrame(D)));},seek(a){let f=Math.min(1,Math.max(0,a));_=f,de=f,ae=true,cancelAnimationFrame(ie),M(f);},getProgress(){return _}}}var It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,n={}){if(typeof window>"u")return It;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return fe("scrollParallax: element not found:",e),It;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 Re(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 Ge(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Ae={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Fr(e,n={}){if(typeof window>"u")return Ae;let r=Ge(e).map(t=>lt(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 _r(e,n={}){if(typeof window>"u")return Ae;let r=Ge(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return lt(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 Hr(e,n){if(typeof window>"u")return Ae;let r=Ge(e).map(t=>Re(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 Vr(e,n){if(typeof window>"u")return Ae;let r=Ge(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return Re(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 zr(e,n={}){if(typeof window>"u")return Ae;let r=Ge(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?.());}}}exports.scrollAnimateGroup=Hr;exports.scrollAnimateSequence=Vr;exports.scrollDrawGroup=Fr;exports.scrollDrawSequence=_r;exports.scrollParallaxGroup=zr;
@@ -1,209 +1,6 @@
1
- type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
- type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
3
- interface TriggerConfig {
4
- start?: string;
5
- end?: string;
6
- }
7
- interface ScrollDrawOptions {
8
- /**
9
- * Apply a named preset as the base configuration. User-supplied options
10
- * always override the preset. Available presets:
11
- * - `'sketch'` — staggered ease-in draw, pencil feel
12
- * - `'reveal'` — fade + ease-out, draws once on viewport entry
13
- * - `'typewriter'` — fast linear draw with stagger
14
- * - `'cinematic'` — slow ease-in-out with fade, dramatic entrance
15
- * - `'spring'` — spring easing, bouncy organic feel
16
- */
17
- preset?: PresetName;
18
- selector?: string;
19
- speed?: number;
20
- fade?: boolean;
21
- easing?: EasingName | ((t: number) => number);
22
- trigger?: TriggerConfig;
23
- stagger?: number;
24
- direction?: 'forward' | 'reverse';
25
- once?: boolean;
26
- debug?: boolean;
27
- /** Scroll axis to track. 'y' (default) for vertical, 'x' for horizontal. */
28
- axis?: 'x' | 'y';
29
- /** CSS selector or Element for a custom scroll container (default: window). */
30
- scrollContainer?: string | Element;
31
- /** Automatically reverse the animation when the user scrolls back up. */
32
- autoReverse?: boolean;
33
- /** Delay in milliseconds before the engine starts observing. */
34
- delay?: number;
35
- /** Animate stroke color. Single string = static override. Tuple = interpolate from → to. */
36
- strokeColor?: string | [string, string];
37
- /** Animate stroke width. Single number = static override. Tuple = interpolate from → to. */
38
- strokeWidth?: number | [number, number];
39
- /** Animate fill opacity. Single number = static override. Tuple [from, to] = interpolate as the path draws. Use [0, 1] to flood fill in sync with the stroke draw. */
40
- fillOpacity?: number | [number, number];
41
- /**
42
- * Reveal the container using CSS clip-path instead of stroke-dashoffset.
43
- * Works on any content — SVG, images, text, divs.
44
- *
45
- * Pass a direction string to control which edge the reveal starts from,
46
- * or `true` as shorthand for `'left'`.
47
- *
48
- * Values: `'left' | 'right' | 'top' | 'bottom' | 'center'`
49
- */
50
- clip?: boolean | 'left' | 'right' | 'top' | 'bottom' | 'center';
51
- /** Fire callbacks at specific progress thresholds (0–1). Resets on replay(). */
52
- waypoints?: Record<number, () => void>;
53
- /** Scale animation speed by scroll velocity — faster scrolling = faster draw. Pass a number to control sensitivity (default 1). */
54
- velocityScale?: boolean | number;
55
- /** IntersectionObserver threshold (0–1). Default 0. */
56
- threshold?: number;
57
- /** IntersectionObserver rootMargin. Default "0px". */
58
- rootMargin?: string;
59
- /** Repeat the animation N times after completion. Use 'infinite' to loop forever. */
60
- repeat?: number | 'infinite';
61
- /** Milliseconds to wait between repeats. Default 0. */
62
- repeatDelay?: number;
63
- /**
64
- * Target path `d` attribute to morph toward as the animation progresses.
65
- * Paths must have compatible command structures (same number of numeric tokens).
66
- *
67
- * Only applies to `<path>` elements — silently no-ops on `<rect>`, `<circle>`,
68
- * `<line>`, and other SVG shape elements.
69
- */
70
- morphTo?: string;
71
- onProgress?: (alpha: number) => void;
72
- onStart?: () => void;
73
- onComplete?: () => void;
74
- /** Fires when scroll position enters the trigger zone (scrolling forward). */
75
- onEnter?: () => void;
76
- /** Fires when scroll position exits the trigger zone at the end (scrolling forward). */
77
- onLeave?: () => void;
78
- /** Fires when scroll position re-enters the trigger zone from the end (scrolling back). */
79
- onEnterBack?: () => void;
80
- /** Fires when scroll position exits the trigger zone at the start (scrolling back). */
81
- onLeaveBack?: () => void;
82
- /**
83
- * Trigger the animation when the element enters the viewport instead of
84
- * tying it to scroll position. The draw runs over `duration` milliseconds,
85
- * replaying each time the element re-enters the viewport (use `once: true`
86
- * to play only the first time).
87
- *
88
- * All visual options work in autoplay mode — `easing`, `stagger`, `fade`,
89
- * `strokeColor`, `strokeWidth`, `fillOpacity`, `clip`, `morphTo`, `waypoints`,
90
- * `repeat`, `repeatDelay`, `onStart`, `onComplete`, `onProgress`, etc.
91
- *
92
- * The full instance API (`pause`, `resume`, `seek`, `replay`, `getProgress`)
93
- * also works — `seek(0.5)` pauses at 50% of the duration.
94
- */
95
- autoplay?: boolean;
96
- /**
97
- * Duration of the autoplay animation in milliseconds. Only used when
98
- * `autoplay: true`. Default `1000`.
99
- */
100
- duration?: number;
101
- /**
102
- * Use the browser's native CSS scroll-driven animation
103
- * (`animation-timeline: view()`) when the configuration is simple enough and
104
- * the browser supports it. The browser drives the draw from the scroll
105
- * position — zero per-frame JavaScript, zero scroll/resize listeners. (It
106
- * still repaints on the main thread: browsers don't composite
107
- * `stroke-dashoffset`.)
108
- *
109
- * Falls back to the JS engine automatically when unsupported or when the
110
- * config uses a feature native CSS can't express (callbacks, stagger, morph,
111
- * velocity scaling, custom triggers, `once`, custom easing functions, etc.).
112
- *
113
- * - `undefined` / `true` (default): use native when eligible.
114
- * - `false`: always use the JS engine.
115
- */
116
- native?: boolean;
117
- }
118
- interface ScrollDrawInstance {
119
- destroy: () => void;
120
- /** Reset and replay the animation from the beginning. */
121
- replay: () => void;
122
- /** Pause the animation at the current progress. */
123
- pause: () => void;
124
- /** Resume a paused animation. */
125
- resume: () => void;
126
- /** Jump to a specific progress value (0–1) and pause. */
127
- seek: (progress: number) => void;
128
- /** Returns current draw progress (0–1). */
129
- getProgress: () => number;
130
- /**
131
- * Re-measure after a layout change: path lengths, and the scroll trigger window.
132
- *
133
- * The engine already re-measures on `resize`, on `orientationchange`, and via a
134
- * `ResizeObserver` on the document element — but none of those fire for a layout
135
- * change that leaves the document height alone, such as a tab switching, a
136
- * sibling collapsing, or a font swapping inside a fixed-height box. Call this
137
- * after one of those.
138
- *
139
- * Optional on this shared type because several instances here are fan-outs over
140
- * other instances or SSR no-op stubs. `scrollDraw`, `scrollPin`,
141
- * `scrollHorizontal`, `scrollDrawTimeline` and the group APIs all provide it;
142
- * use `instance.refresh?.()` if you hold an instance of unknown origin.
143
- */
144
- refresh?: () => void;
145
- }
146
-
147
- interface ScrollAnimateOptions {
148
- props: Record<string, string | number | [string | number, string | number]>;
149
- trigger?: TriggerConfig;
150
- easing?: EasingName | ((t: number) => number);
151
- speed?: number;
152
- once?: boolean;
153
- axis?: 'x' | 'y';
154
- scrollContainer?: string | Element;
155
- native?: boolean;
156
- /**
157
- * Scale animation speed by scroll velocity — faster scrolling = faster animation.
158
- * Pass `true` for default sensitivity (1) or a number to control it.
159
- * Higher values = more dramatic speed-up. Default sensitivity: 1.
160
- */
161
- velocityScale?: boolean | number;
162
- /**
163
- * Honour `prefers-reduced-motion: reduce` by applying the final state and not
164
- * animating. Default: `true`.
165
- *
166
- * Set to `false` only when the movement is *scroll-linked scrubbing* rather
167
- * than autonomous motion — it advances solely as the user scrolls, 1:1 with
168
- * their input, so it is direct manipulation rather than something that plays at
169
- * them. `scrollHorizontal` sets this, because jumping to the final state there
170
- * would leave every panel but the last unreachable inside the sticky
171
- * `overflow: hidden` container.
172
- */
173
- respectReducedMotion?: boolean;
174
- /**
175
- * Element whose geometry defines the trigger window, when that is not the
176
- * element being animated. Defaults to the animated element.
177
- *
178
- * Needed whenever the animated element cannot supply the scroll length itself —
179
- * the case that matters is a `position: sticky` stage, where the pinned element
180
- * is exactly one viewport tall and all of the scroll room belongs to its
181
- * container. Resolving `top top` → `bottom bottom` against the pinned element
182
- * there yields tStart === tEnd, a zero-length window, and no movement at all.
183
- *
184
- * Setting this disables the native CSS fast path: `animation-timeline: view()`
185
- * always measures the element the animation is attached to, so it cannot express
186
- * a separate subject.
187
- */
188
- triggerElement?: Element;
189
- onProgress?: (alpha: number) => void;
190
- onComplete?: () => void;
191
- /** Fires when scroll enters the trigger zone (scrolling forward). */
192
- onEnter?: () => void;
193
- /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
194
- onLeave?: () => void;
195
- /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
196
- onEnterBack?: () => void;
197
- /** Fires when scroll exits the trigger zone at the start (scrolling back). */
198
- onLeaveBack?: () => void;
199
- }
200
- interface ScrollParallaxOptions {
201
- speed?: number;
202
- axis?: 'x' | 'y';
203
- easing?: EasingName | ((t: number) => number);
204
- trigger?: TriggerConfig;
205
- onProgress?: (alpha: number) => void;
206
- }
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';
207
4
 
208
5
  /**
209
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -290,4 +87,4 @@ declare function scrollAnimateSequence(targets: Array<string | Element>, options
290
87
  */
291
88
  declare function scrollParallaxGroup(targets: Array<string | Element>, options?: ScrollParallaxOptions): ScrollDrawInstance;
292
89
 
293
- export { type ScrollAnimateOptions, type ScrollDrawOptions, type ScrollParallaxOptions, scrollAnimateGroup, scrollAnimateSequence, scrollDrawGroup, scrollDrawSequence, scrollParallaxGroup };
90
+ export { ScrollAnimateOptions, ScrollDrawOptions, ScrollParallaxOptions, scrollAnimateGroup, scrollAnimateSequence, scrollDrawGroup, scrollDrawSequence, scrollParallaxGroup };
@@ -1,209 +1,6 @@
1
- type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
2
- type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
3
- interface TriggerConfig {
4
- start?: string;
5
- end?: string;
6
- }
7
- interface ScrollDrawOptions {
8
- /**
9
- * Apply a named preset as the base configuration. User-supplied options
10
- * always override the preset. Available presets:
11
- * - `'sketch'` — staggered ease-in draw, pencil feel
12
- * - `'reveal'` — fade + ease-out, draws once on viewport entry
13
- * - `'typewriter'` — fast linear draw with stagger
14
- * - `'cinematic'` — slow ease-in-out with fade, dramatic entrance
15
- * - `'spring'` — spring easing, bouncy organic feel
16
- */
17
- preset?: PresetName;
18
- selector?: string;
19
- speed?: number;
20
- fade?: boolean;
21
- easing?: EasingName | ((t: number) => number);
22
- trigger?: TriggerConfig;
23
- stagger?: number;
24
- direction?: 'forward' | 'reverse';
25
- once?: boolean;
26
- debug?: boolean;
27
- /** Scroll axis to track. 'y' (default) for vertical, 'x' for horizontal. */
28
- axis?: 'x' | 'y';
29
- /** CSS selector or Element for a custom scroll container (default: window). */
30
- scrollContainer?: string | Element;
31
- /** Automatically reverse the animation when the user scrolls back up. */
32
- autoReverse?: boolean;
33
- /** Delay in milliseconds before the engine starts observing. */
34
- delay?: number;
35
- /** Animate stroke color. Single string = static override. Tuple = interpolate from → to. */
36
- strokeColor?: string | [string, string];
37
- /** Animate stroke width. Single number = static override. Tuple = interpolate from → to. */
38
- strokeWidth?: number | [number, number];
39
- /** Animate fill opacity. Single number = static override. Tuple [from, to] = interpolate as the path draws. Use [0, 1] to flood fill in sync with the stroke draw. */
40
- fillOpacity?: number | [number, number];
41
- /**
42
- * Reveal the container using CSS clip-path instead of stroke-dashoffset.
43
- * Works on any content — SVG, images, text, divs.
44
- *
45
- * Pass a direction string to control which edge the reveal starts from,
46
- * or `true` as shorthand for `'left'`.
47
- *
48
- * Values: `'left' | 'right' | 'top' | 'bottom' | 'center'`
49
- */
50
- clip?: boolean | 'left' | 'right' | 'top' | 'bottom' | 'center';
51
- /** Fire callbacks at specific progress thresholds (0–1). Resets on replay(). */
52
- waypoints?: Record<number, () => void>;
53
- /** Scale animation speed by scroll velocity — faster scrolling = faster draw. Pass a number to control sensitivity (default 1). */
54
- velocityScale?: boolean | number;
55
- /** IntersectionObserver threshold (0–1). Default 0. */
56
- threshold?: number;
57
- /** IntersectionObserver rootMargin. Default "0px". */
58
- rootMargin?: string;
59
- /** Repeat the animation N times after completion. Use 'infinite' to loop forever. */
60
- repeat?: number | 'infinite';
61
- /** Milliseconds to wait between repeats. Default 0. */
62
- repeatDelay?: number;
63
- /**
64
- * Target path `d` attribute to morph toward as the animation progresses.
65
- * Paths must have compatible command structures (same number of numeric tokens).
66
- *
67
- * Only applies to `<path>` elements — silently no-ops on `<rect>`, `<circle>`,
68
- * `<line>`, and other SVG shape elements.
69
- */
70
- morphTo?: string;
71
- onProgress?: (alpha: number) => void;
72
- onStart?: () => void;
73
- onComplete?: () => void;
74
- /** Fires when scroll position enters the trigger zone (scrolling forward). */
75
- onEnter?: () => void;
76
- /** Fires when scroll position exits the trigger zone at the end (scrolling forward). */
77
- onLeave?: () => void;
78
- /** Fires when scroll position re-enters the trigger zone from the end (scrolling back). */
79
- onEnterBack?: () => void;
80
- /** Fires when scroll position exits the trigger zone at the start (scrolling back). */
81
- onLeaveBack?: () => void;
82
- /**
83
- * Trigger the animation when the element enters the viewport instead of
84
- * tying it to scroll position. The draw runs over `duration` milliseconds,
85
- * replaying each time the element re-enters the viewport (use `once: true`
86
- * to play only the first time).
87
- *
88
- * All visual options work in autoplay mode — `easing`, `stagger`, `fade`,
89
- * `strokeColor`, `strokeWidth`, `fillOpacity`, `clip`, `morphTo`, `waypoints`,
90
- * `repeat`, `repeatDelay`, `onStart`, `onComplete`, `onProgress`, etc.
91
- *
92
- * The full instance API (`pause`, `resume`, `seek`, `replay`, `getProgress`)
93
- * also works — `seek(0.5)` pauses at 50% of the duration.
94
- */
95
- autoplay?: boolean;
96
- /**
97
- * Duration of the autoplay animation in milliseconds. Only used when
98
- * `autoplay: true`. Default `1000`.
99
- */
100
- duration?: number;
101
- /**
102
- * Use the browser's native CSS scroll-driven animation
103
- * (`animation-timeline: view()`) when the configuration is simple enough and
104
- * the browser supports it. The browser drives the draw from the scroll
105
- * position — zero per-frame JavaScript, zero scroll/resize listeners. (It
106
- * still repaints on the main thread: browsers don't composite
107
- * `stroke-dashoffset`.)
108
- *
109
- * Falls back to the JS engine automatically when unsupported or when the
110
- * config uses a feature native CSS can't express (callbacks, stagger, morph,
111
- * velocity scaling, custom triggers, `once`, custom easing functions, etc.).
112
- *
113
- * - `undefined` / `true` (default): use native when eligible.
114
- * - `false`: always use the JS engine.
115
- */
116
- native?: boolean;
117
- }
118
- interface ScrollDrawInstance {
119
- destroy: () => void;
120
- /** Reset and replay the animation from the beginning. */
121
- replay: () => void;
122
- /** Pause the animation at the current progress. */
123
- pause: () => void;
124
- /** Resume a paused animation. */
125
- resume: () => void;
126
- /** Jump to a specific progress value (0–1) and pause. */
127
- seek: (progress: number) => void;
128
- /** Returns current draw progress (0–1). */
129
- getProgress: () => number;
130
- /**
131
- * Re-measure after a layout change: path lengths, and the scroll trigger window.
132
- *
133
- * The engine already re-measures on `resize`, on `orientationchange`, and via a
134
- * `ResizeObserver` on the document element — but none of those fire for a layout
135
- * change that leaves the document height alone, such as a tab switching, a
136
- * sibling collapsing, or a font swapping inside a fixed-height box. Call this
137
- * after one of those.
138
- *
139
- * Optional on this shared type because several instances here are fan-outs over
140
- * other instances or SSR no-op stubs. `scrollDraw`, `scrollPin`,
141
- * `scrollHorizontal`, `scrollDrawTimeline` and the group APIs all provide it;
142
- * use `instance.refresh?.()` if you hold an instance of unknown origin.
143
- */
144
- refresh?: () => void;
145
- }
146
-
147
- interface ScrollAnimateOptions {
148
- props: Record<string, string | number | [string | number, string | number]>;
149
- trigger?: TriggerConfig;
150
- easing?: EasingName | ((t: number) => number);
151
- speed?: number;
152
- once?: boolean;
153
- axis?: 'x' | 'y';
154
- scrollContainer?: string | Element;
155
- native?: boolean;
156
- /**
157
- * Scale animation speed by scroll velocity — faster scrolling = faster animation.
158
- * Pass `true` for default sensitivity (1) or a number to control it.
159
- * Higher values = more dramatic speed-up. Default sensitivity: 1.
160
- */
161
- velocityScale?: boolean | number;
162
- /**
163
- * Honour `prefers-reduced-motion: reduce` by applying the final state and not
164
- * animating. Default: `true`.
165
- *
166
- * Set to `false` only when the movement is *scroll-linked scrubbing* rather
167
- * than autonomous motion — it advances solely as the user scrolls, 1:1 with
168
- * their input, so it is direct manipulation rather than something that plays at
169
- * them. `scrollHorizontal` sets this, because jumping to the final state there
170
- * would leave every panel but the last unreachable inside the sticky
171
- * `overflow: hidden` container.
172
- */
173
- respectReducedMotion?: boolean;
174
- /**
175
- * Element whose geometry defines the trigger window, when that is not the
176
- * element being animated. Defaults to the animated element.
177
- *
178
- * Needed whenever the animated element cannot supply the scroll length itself —
179
- * the case that matters is a `position: sticky` stage, where the pinned element
180
- * is exactly one viewport tall and all of the scroll room belongs to its
181
- * container. Resolving `top top` → `bottom bottom` against the pinned element
182
- * there yields tStart === tEnd, a zero-length window, and no movement at all.
183
- *
184
- * Setting this disables the native CSS fast path: `animation-timeline: view()`
185
- * always measures the element the animation is attached to, so it cannot express
186
- * a separate subject.
187
- */
188
- triggerElement?: Element;
189
- onProgress?: (alpha: number) => void;
190
- onComplete?: () => void;
191
- /** Fires when scroll enters the trigger zone (scrolling forward). */
192
- onEnter?: () => void;
193
- /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
194
- onLeave?: () => void;
195
- /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
196
- onEnterBack?: () => void;
197
- /** Fires when scroll exits the trigger zone at the start (scrolling back). */
198
- onLeaveBack?: () => void;
199
- }
200
- interface ScrollParallaxOptions {
201
- speed?: number;
202
- axis?: 'x' | 'y';
203
- easing?: EasingName | ((t: number) => number);
204
- trigger?: TriggerConfig;
205
- onProgress?: (alpha: number) => void;
206
- }
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';
207
4
 
208
5
  /**
209
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -290,4 +87,4 @@ declare function scrollAnimateSequence(targets: Array<string | Element>, options
290
87
  */
291
88
  declare function scrollParallaxGroup(targets: Array<string | Element>, options?: ScrollParallaxOptions): ScrollDrawInstance;
292
89
 
293
- export { type ScrollAnimateOptions, type ScrollDrawOptions, type ScrollParallaxOptions, scrollAnimateGroup, scrollAnimateSequence, scrollDrawGroup, scrollDrawSequence, scrollParallaxGroup };
90
+ export { ScrollAnimateOptions, ScrollDrawOptions, ScrollParallaxOptions, scrollAnimateGroup, scrollAnimateSequence, scrollDrawGroup, scrollDrawSequence, scrollParallaxGroup };