svg-scroll-draw 2.23.3 → 2.23.4

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 (57) hide show
  1. package/README.md +10 -10
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.mjs +1 -1
  4. package/dist/astro/index.cjs +3 -3
  5. package/dist/astro/index.mjs +1 -1
  6. package/dist/cdn/svg-scroll-draw.dev.global.js +64 -59
  7. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  8. package/dist/chunk-6TWFLRUB.mjs +3 -0
  9. package/dist/{chunk-BLY6F6EC.mjs → chunk-DSFD227B.mjs} +1 -1
  10. package/dist/chunk-I73SOXBN.mjs +1 -0
  11. package/dist/chunk-NLPSVYFP.mjs +1 -0
  12. package/dist/chunk-OPXWNJBG.mjs +1 -0
  13. package/dist/chunk-QFSTKVA3.mjs +1 -0
  14. package/dist/chunk-XC5NR2MU.mjs +1 -0
  15. package/dist/{chunk-ETACBG7W.mjs → chunk-XTPAW6XR.mjs} +1 -1
  16. package/dist/{chunk-4I7MLTP5.mjs → chunk-ZNCZYV3Q.mjs} +1 -1
  17. package/dist/group/index.cjs +3 -3
  18. package/dist/group/index.mjs +1 -1
  19. package/dist/horizontal/index.cjs +1 -1
  20. package/dist/horizontal/index.d.mts +10 -7
  21. package/dist/horizontal/index.d.ts +10 -7
  22. package/dist/horizontal/index.mjs +1 -1
  23. package/dist/index.cjs +4 -4
  24. package/dist/index.mjs +1 -1
  25. package/dist/nuxt/index.cjs +3 -3
  26. package/dist/nuxt/index.mjs +1 -1
  27. package/dist/react/index.cjs +2 -2
  28. package/dist/react/index.d.mts +3 -1
  29. package/dist/react/index.d.ts +3 -1
  30. package/dist/react/index.mjs +1 -1
  31. package/dist/reveal/index.cjs +1 -1
  32. package/dist/reveal/index.d.mts +9 -3
  33. package/dist/reveal/index.d.ts +9 -3
  34. package/dist/reveal/index.mjs +1 -1
  35. package/dist/snap/index.cjs +1 -1
  36. package/dist/snap/index.mjs +1 -1
  37. package/dist/solid/index.cjs +3 -3
  38. package/dist/solid/index.mjs +1 -1
  39. package/dist/svelte/index.cjs +3 -3
  40. package/dist/svelte/index.mjs +1 -1
  41. package/dist/text/index.cjs +1 -1
  42. package/dist/text/index.mjs +1 -1
  43. package/dist/timeline/index.cjs +1 -1
  44. package/dist/timeline/index.mjs +1 -1
  45. package/dist/video/index.cjs +1 -1
  46. package/dist/video/index.mjs +1 -1
  47. package/dist/vue/index.cjs +3 -3
  48. package/dist/vue/index.mjs +1 -1
  49. package/dist/web-component/index.cjs +3 -3
  50. package/dist/web-component/index.mjs +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunk-23EALNDF.mjs +0 -3
  53. package/dist/chunk-4H2SGMAQ.mjs +0 -1
  54. package/dist/chunk-GMBIGV3M.mjs +0 -1
  55. package/dist/chunk-LGJQWZHH.mjs +0 -1
  56. package/dist/chunk-V4L3ELVC.mjs +0 -1
  57. package/dist/chunk-YZV4Z3EQ.mjs +0 -1
@@ -1 +1 @@
1
- 'use strict';function ce({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(r),o=0,s=[];for(let u=0;u<t;u++){let c=Math.pow(i,u);s.push(c),o+=c;}let d=[0],m=0;for(let u=0;u<t;u++)m+=s[u]/o,d.push(m);return u=>{if(u<=0)return 0;if(u>=1)return 1;for(let c=0;c<t;c++)if(u<=d[c+1]){let g=(u-d[c])/(d[c+1]-d[c]);if(c===0)return g*(2-g);let v=1-Math.pow(r,c);return v+(1-v)*(2*g-1)*(2*g-1)}return 1}}function de({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),i=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return o=>o<=0?0:o>=1?1:t*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/r)+1}var k={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ce(),elastic:de()};function V(e,n,t){return Math.min(t,Math.max(n,e))}function D(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function W(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function $(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 N(e,n,t,r){return t===n?0:V((e-n)/(t-n)*r,0,1)}function q(e,n,t,r,i){let o=W(e.top,e.height,n,r.element)-$(r.viewport,t),s=W(e.top,e.height,n,i.element)-$(i.viewport,t);return {tStart:o,tEnd:s}}var B=Symbol.for("svg-scroll-draw.registry");function G(){let e=globalThis;return e[B]||(e[B]=new Map)}function j(e,n){G().set(e,n);}function K(e){G().delete(e);}var x,C=new Set,R=new WeakMap,M=new Map,U=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function le(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function X(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();x??(x=new ResizeObserver(i=>{let o=false;for(let{target:s}of i)R.get(s)!==U(s)&&(o=true),R.set(s,"");o&&C.forEach(s=>s());})),C.add(t);let r=le(e);return [document.body,document.documentElement].forEach(i=>i&&r.add(i)),r.forEach(i=>{R.has(i)||R.set(i,U(i)),M.set(i,(M.get(i)??0)+1),x.observe(i);}),()=>{C.delete(t)&&(r.forEach(i=>{let o=(M.get(i)??1)-1;if(o)return void M.set(i,o);M.delete(i),x?.unobserve(i);}),C.size||(x?.disconnect(),x=void 0));}}var me=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function Y(e,...n){me&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function J(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function Z(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=J(o=>{if(!o)return;r();let s=(t.getProgress?.()??0)>=1;t.destroy(),t=n(s?{...e,onComplete:void 0}:e,true);}),i={};for(let o of Object.keys(t))i[o]=(...s)=>t[o]?.(...s);return i.destroy=()=>{r(),t.destroy();},i}function ee(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function re(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function pe(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function te(e){let n=re(e),t=new Map;for(let o of n){let s=o.offsetTop;t.has(s)||t.set(s,[]),t.get(s).push(o);}let r=[],i=Array.from(t.keys()).sort((o,s)=>o-s);for(let o of i){let s=t.get(o),d=document.createElement("span");d.setAttribute("aria-hidden","true"),d.style.display="inline-block",s.forEach((m,u)=>{let c=m.nextElementSibling;d.appendChild(m),u<s.length-1&&c&&c.style.whiteSpace==="pre"&&d.appendChild(c);}),r.push(d);}return e.textContent="",r.forEach((o,s)=>{e.appendChild(o),s<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function fe(e,n,t,r){if(t<=1||r===0)return e;let i=(t-1)*r,o=n*r,s=o+(1-i);return s<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(s-o)))}function ge(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var ne={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pe(e,n={}){if(typeof window>"u")return ne;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return Y("scrollText: element not found:",e),ne;let r=t;return Z(n,(i,o)=>be(r,i,o))}function be(e,n,t){let{split:r="words",stagger:i=.04,easing:o="ease-out",from:s={opacity:0,y:24},trigger:d={},once:m=true,onComplete:u}=n,c=typeof o=="function"?o:k[o]??k["ease-out"],g=D(d.start||"top 85%"),v=D(d.end||"top 40%"),_=e.innerHTML,H=e.textContent??"",b;r==="chars"?b=pe(e):r==="lines"?b=te(e):b=re(e),ee(e,H);let oe=b.length;function ie(a,l){s?.opacity!==void 0&&(a.style.opacity=String(s.opacity+(1-s.opacity)*l));let L=ge(l,s);L&&(a.style.transform=L);}function h(a){e.style.setProperty("--scroll-draw-progress",String(a)),b.forEach((l,L)=>{let ue=c(fe(a,L,oe,i));ie(l,ue);});}if(t)return h(1),u?.(),{destroy(){e.innerHTML=_;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};h(0);let A=0,I=0,p=0,T=false,f=false,w=-1,y=0,S=false,z=()=>window.scrollY,se=()=>window.innerHeight;function F(){let a=e.getBoundingClientRect(),l=q({top:a.top,height:a.height},z(),se(),g,v);A=l.tStart,I=l.tEnd;}function O(){if(!T||f)return;let a=N(z(),A,I,1);m&&(w=Math.max(w,a),a=w),y=a,h(a),a>=1&&!S?(S=true,u?.()):a<1&&!m&&(S=false),p=requestAnimationFrame(O);}F();let Q=new IntersectionObserver(a=>{a.forEach(l=>{T=l.isIntersecting,T&&!f?p=requestAnimationFrame(O):cancelAnimationFrame(p);});}),P;function E(){clearTimeout(P),P=setTimeout(()=>{if(r==="lines"){let a=y;e.innerHTML=_,b=te(e),ee(e,H),h(a);}F();},150);}window.addEventListener("resize",E),window.addEventListener("orientationchange",E);let ae=X([e],E);return Q.observe(e),j(e,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:A,tEnd:I})}),{destroy(){cancelAnimationFrame(p),Q.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E),ae(),clearTimeout(P),e.innerHTML=_,K(e);},replay(){w=-1,S=false,y=0,f=false,h(0);},pause(){f=true,cancelAnimationFrame(p);},resume(){f&&(f=false,T&&(p=requestAnimationFrame(O)));},seek(a){let l=Math.min(1,Math.max(0,a));y=l,w=l,f=true,cancelAnimationFrame(p),h(l);},getProgress(){return y}}}exports.scrollText=Pe;
1
+ 'use strict';function le({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),i=Math.sqrt(r),o=0,s=[];for(let u=0;u<n;u++){let c=Math.pow(i,u);s.push(c),o+=c;}let d=[0],m=0;for(let u=0;u<n;u++)m+=s[u]/o,d.push(m);return u=>{if(u<=0)return 0;if(u>=1)return 1;for(let c=0;c<n;c++)if(u<=d[c+1]){let f=(u-d[c])/(d[c+1]-d[c]);if(c===0)return f*(2-f);let x=1-Math.pow(r,c);return x+(1-x)*(2*f-1)*(2*f-1)}return 1}}function me({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),i=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/r)+1}var P={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:le(),elastic:me()};function $(e,t,n){return Math.min(n,Math.max(t,e))}function D(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function q(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function B(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function G(e,t,n,r){return n===t?0:$((e-t)/(n-t)*r,0,1)}function j(e,t,n,r,i){let o=q(e.top,e.height,t,r.element)-B(r.viewport,n),s=q(e.top,e.height,t,i.element)-B(i.viewport,n);return {tStart:o,tEnd:s}}var K=Symbol.for("svg-scroll-draw.registry");function U(){let e=globalThis;return e[K]||(e[K]=new Map)}function X(e,t){U().set(e,t);}function Y(e){U().delete(e);}var M,C=new Set,R=new WeakMap,v=new Map,J=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function pe(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Z(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();M??(M=new ResizeObserver(i=>{let o=false;for(let{target:s}of i)R.get(s)!==J(s)&&(o=true),R.set(s,"");o&&C.forEach(s=>s());})),C.add(n);let r=pe(e);return [document.body,document.documentElement].forEach(i=>i&&r.add(i)),r.forEach(i=>{R.has(i)||R.set(i,J(i)),v.set(i,(v.get(i)??0)+1),M.observe(i);}),()=>{C.delete(n)&&(r.forEach(i=>{let o=(v.get(i)??1)-1;if(o)return void v.set(i,o);v.delete(i),M?.unobserve(i);}),C.size||(M?.disconnect(),M=void 0));}}var fe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ee(e,...t){fe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function ne(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(!!i.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function te(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=ne(o=>{if(!o)return;r();let s=(n.getProgress?.()??0)>=1;n.destroy(),n=t(s?{...e,onComplete:void 0}:e,true);}),i={};for(let o of Object.keys(n))i[o]=(...s)=>n[o]?.(...s);return i.destroy=()=>{r(),n.destroy();},i}function re(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function _(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function ie(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(_(n)),i=/^\s+$/.test(n);return i?r.style.whiteSpace="pre":r.style.display="inline-block",i?null:r}).filter(n=>n!==null)}function be(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let i of t){let o=_(i),s=i===" ";s?o.style.whiteSpace="pre":(o.style.display="inline-block",n.push(o)),s||i>"\u0DFF"?r=null:r||(r=e.appendChild(_()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(o);}return n}function oe(e){let t=ie(e),n=new Map;for(let o of t){let s=o.offsetTop;n.has(s)||n.set(s,[]),n.get(s).push(o);}let r=[],i=Array.from(n.keys()).sort((o,s)=>o-s);for(let o of i){let s=n.get(o),d=_();d.style.display="inline-block",s.forEach((m,u)=>{let c=m.nextElementSibling;d.appendChild(m),u<s.length-1&&c&&c.style.whiteSpace==="pre"&&d.appendChild(c);}),r.push(d);}return e.textContent="",r.forEach((o,s)=>{e.appendChild(o),s<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function ge(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let i=(n-1)*r,o=t*r,s=o+(1-i);return s<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(s-o)))}function he(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var z={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pe(e,t={}){if(typeof window>"u")return z;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ee("scrollText: element not found:",e),z;let r=n;return te(t,(i,o)=>ye(r,i,o))}function ye(e,t,n){let{split:r="words",stagger:i=.04,easing:o="ease-out",from:s={opacity:0,y:24},trigger:d={},once:m=true,onComplete:u}=t,c=typeof o=="function"?o:P[o]??P["ease-out"],f=D(d.start||"top 85%"),x=D(d.end||"top 40%"),A=e.innerHTML,F=e.textContent??"",b;r==="chars"?b=be(e):r==="lines"?b=oe(e):b=ie(e),re(e,F);let se=b.length;function ae(a,l){s?.opacity!==void 0&&(a.style.opacity=String(s.opacity+(1-s.opacity)*l));let L=he(l,s);L&&(a.style.transform=L);}function g(a){e.style.setProperty("--scroll-draw-progress",String(a)),b.forEach((l,L)=>{let de=c(ge(a,L,se,i));ae(l,de);});}if(n)return g(1),u?.(),{...z,destroy:()=>{e.innerHTML=A;},getProgress:()=>1};g(0);let I=0,O=0,p=0,T=false,h=false,w=-1,y=0,S=false,Q=()=>window.scrollY,ue=()=>window.innerHeight;function V(){let a=e.getBoundingClientRect(),l=j({top:a.top,height:a.height},Q(),ue(),f,x);I=l.tStart,O=l.tEnd;}function k(){if(!T||h)return;let a=G(Q(),I,O,1);m&&(w=Math.max(w,a),a=w),y=a,g(a),a>=1&&!S?(S=true,u?.()):a<1&&!m&&(S=false),p=requestAnimationFrame(k);}V();let W=new IntersectionObserver(a=>{a.forEach(l=>{T=l.isIntersecting,T&&!h?p=requestAnimationFrame(k):cancelAnimationFrame(p);});}),H;function E(){clearTimeout(H),H=setTimeout(()=>{if(r==="lines"){let a=y;e.innerHTML=A,b=oe(e),re(e,F),g(a);}V();},150);}window.addEventListener("resize",E),window.addEventListener("orientationchange",E);let ce=Z([e],E);W.observe(e),X(e,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:I,tEnd:O})});function N(){h&&(h=false,T&&(p=requestAnimationFrame(k)));}return {destroy(){cancelAnimationFrame(p),W.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E),ce(),clearTimeout(H),e.innerHTML=A,Y(e);},replay(){w=-1,S=false,y=0,g(0),N();},pause(){h=true,cancelAnimationFrame(p);},resume:N,seek(a){let l=Math.min(1,Math.max(0,a));y=l,w=l,h=true,cancelAnimationFrame(p),g(l);},getProgress(){return y}}}exports.scrollText=Pe;
@@ -1 +1 @@
1
- export{a as scrollText}from'../chunk-4H2SGMAQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollText}from'../chunk-NLPSVYFP.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,4 +1,4 @@
1
- 'use strict';function ke({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),i=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(i),a=0,f=[];for(let l=0;l<n;l++){let p=Math.pow(o,l);f.push(p),a+=p;}let b=[0],v=0;for(let l=0;l<n;l++)v+=f[l]/a,b.push(v);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=b[p+1]){let g=(l-b[p])/(b[p+1]-b[p]);if(p===0)return g*(2-g);let L=1-Math.pow(i,p);return L+(1-L)*(2*g-1)*(2*g-1)}return 1}}function Fe({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),i=Math.max(.1,t),o=n<=1?i/4:i/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/i)+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:Fe()};function ae(e,t,n){return Math.min(n,Math.max(t,e))}function Y(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",i="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:i}}function ue(e,t,n,i){switch(i){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function ce(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 le(e,t,n,i){return n===t?0:ae((e-t)/(n-t)*i,0,1)}function de(e,t,n,i,o){let a=ue(e.top,e.height,t,i.element)-ce(i.viewport,n),f=ue(e.top,e.height,t,o.element)-ce(o.viewport,n);return {tStart:a,tEnd:f}}function Z(e){let t=e.tagName.toLowerCase();if(t==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),i=parseFloat(e.getAttribute("height")??"0");return 2*(n+i)}if(t==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function me(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function pe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let i=t;return i.addListener?.(n),()=>i.removeListener?.(n)}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 fe(e,...t){Oe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var be=Symbol.for("svg-scroll-draw.registry");function ge(){let e=globalThis;return e[be]||(e[be]=new Map)}function he(e,t){ge().set(e,t);}function ye(e){ge().delete(e);}var I,V=new Set,C=new WeakMap,A=new Map,we=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Pe(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let i=n;i;i=i.previousElementSibling)t.add(i);return t}function ve(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();I??(I=new ResizeObserver(o=>{let a=false;for(let{target:f}of o)C.get(f)!==we(f)&&(a=true),C.set(f,"");a&&V.forEach(f=>f());})),V.add(n);let i=Pe(e);return [document.body,document.documentElement].forEach(o=>o&&i.add(o)),i.forEach(o=>{C.has(o)||C.set(o,we(o)),A.set(o,(A.get(o)??0)+1),I.observe(o);}),()=>{V.delete(n)&&(i.forEach(o=>{let a=(A.get(o)??1)-1;if(a)return void A.set(o,a);A.delete(o),I?.unobserve(o);}),V.size||(I?.disconnect(),I=void 0));}}var xe=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function tt(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let i=typeof e=="string"?document.querySelector(e):e;if(!i)return fe("timeline: Container not found:",e),n;let o=i,{trigger:a={},speed:f=1,once:b=false,axis:v="y",tracks:l,onComplete:p,repeat:g,repeatDelay:L=0,loop:G=false,loopDuration:Ee=1500,debug:Me=false,label:Le,respectReducedMotion:ee=true}=t,Te=Y(a.start||"top bottom"),Se=Y(a.end||"bottom top"),$=g==="infinite"?1/0:g??0,d,Q=G===true?1/0:typeof G=="number"?G:0,h=false,W=0,T=Q,q=ee&&me(),Re=pe(r=>{q=ee&&r,q&&(h=false,clearTimeout(d),d=void 0);}),N=()=>Q>0&&!q,B=new Map,j=l.map(r=>{let u=typeof r.easing=="function"?r.easing:J[r.easing??"linear"]??J.linear,m=Array.from(o.querySelectorAll(r.selector)),c=m.map(s=>Z(s));return m.forEach((s,y)=>{B.has(s)||B.set(s,s.getAttribute("style")??""),s.style.strokeDasharray=`${c[y]}`,s.style.strokeDashoffset=`${c[y]}`,r.fade&&(s.style.opacity="0");}),{...r,elements:m,lengths:c,easeFn:u}});function De(){for(let[r,u]of B)u?r.setAttribute("style",u):r.removeAttribute("style");}let H=0,K=0,k=false,x=false,E=0,R=false,D=-1,M=0,w=null;Me&&(w=document.createElement("div"),Object.assign(w.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(w));function _e(r){if(!w)return;let u=Le??(typeof e=="string"?e:"timeline"),m=l.map(({selector:c,from:s,to:y},X)=>{let S=xe[X%xe.length],P=y>s?Math.min(1,Math.max(0,(r-s)/(y-s))):0,z=Math.round(P*100);return `<div style="margin:4px 0">
1
+ 'use strict';function ke({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),i=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(i),a=0,f=[];for(let l=0;l<n;l++){let p=Math.pow(o,l);f.push(p),a+=p;}let b=[0],v=0;for(let l=0;l<n;l++)v+=f[l]/a,b.push(v);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=b[p+1]){let g=(l-b[p])/(b[p+1]-b[p]);if(p===0)return g*(2-g);let L=1-Math.pow(i,p);return L+(1-L)*(2*g-1)*(2*g-1)}return 1}}function Fe({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),i=Math.max(.1,t),o=n<=1?i/4:i/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/i)+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:Fe()};function ae(e,t,n){return Math.min(n,Math.max(t,e))}function Y(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",i="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:i}}function ue(e,t,n,i){switch(i){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function ce(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 le(e,t,n,i){return n===t?0:ae((e-t)/(n-t)*i,0,1)}function de(e,t,n,i,o){let a=ue(e.top,e.height,t,i.element)-ce(i.viewport,n),f=ue(e.top,e.height,t,o.element)-ce(o.viewport,n);return {tStart:a,tEnd:f}}function Z(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let i=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(i+o)}if(n==="circle"){let i=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*i}return e.getTotalLength()}function me(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function pe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let i=t;return i.addListener?.(n),()=>i.removeListener?.(n)}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 fe(e,...t){Oe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var be=Symbol.for("svg-scroll-draw.registry");function ge(){let e=globalThis;return e[be]||(e[be]=new Map)}function he(e,t){ge().set(e,t);}function ye(e){ge().delete(e);}var I,V=new Set,C=new WeakMap,A=new Map,we=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Pe(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let i=n;i;i=i.previousElementSibling)t.add(i);return t}function ve(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();I??(I=new ResizeObserver(o=>{let a=false;for(let{target:f}of o)C.get(f)!==we(f)&&(a=true),C.set(f,"");a&&V.forEach(f=>f());})),V.add(n);let i=Pe(e);return [document.body,document.documentElement].forEach(o=>o&&i.add(o)),i.forEach(o=>{C.has(o)||C.set(o,we(o)),A.set(o,(A.get(o)??0)+1),I.observe(o);}),()=>{V.delete(n)&&(i.forEach(o=>{let a=(A.get(o)??1)-1;if(a)return void A.set(o,a);A.delete(o),I?.unobserve(o);}),V.size||(I?.disconnect(),I=void 0));}}var xe=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function tt(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let i=typeof e=="string"?document.querySelector(e):e;if(!i)return fe("timeline: Container not found:",e),n;let o=i,{trigger:a={},speed:f=1,once:b=false,axis:v="y",tracks:l,onComplete:p,repeat:g,repeatDelay:L=0,loop:G=false,loopDuration:Ee=1500,debug:Me=false,label:Le,respectReducedMotion:ee=true}=t,Te=Y(a.start||"top bottom"),Se=Y(a.end||"bottom top"),$=g==="infinite"?1/0:g??0,d,Q=G===true?1/0:typeof G=="number"?G:0,h=false,W=0,T=Q,q=ee&&me(),Re=pe(r=>{q=ee&&r,q&&(h=false,clearTimeout(d),d=void 0);}),N=()=>Q>0&&!q,B=new Map,j=l.map(r=>{let u=typeof r.easing=="function"?r.easing:J[r.easing??"linear"]??J.linear,m=Array.from(o.querySelectorAll(r.selector)),c=m.map(s=>Z(s));return m.forEach((s,y)=>{B.has(s)||B.set(s,s.getAttribute("style")??""),s.style.strokeDasharray=`${c[y]}`,s.style.strokeDashoffset=`${c[y]}`,r.fade&&(s.style.opacity="0");}),{...r,elements:m,lengths:c,easeFn:u}});function De(){for(let[r,u]of B)u?r.setAttribute("style",u):r.removeAttribute("style");}let H=0,K=0,k=false,x=false,E=0,R=false,D=-1,M=0,w=null;Me&&(w=document.createElement("div"),Object.assign(w.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(w));function _e(r){if(!w)return;let u=Le??(typeof e=="string"?e:"timeline"),m=l.map(({selector:c,from:s,to:y},X)=>{let S=xe[X%xe.length],P=y>s?Math.min(1,Math.max(0,(r-s)/(y-s))):0,z=Math.round(P*100);return `<div style="margin:4px 0">
2
2
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:2px">
3
3
  <span style="color:${S};max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${c}</span>
4
4
  <span style="color:#666;margin-left:8px">${z}%</span>
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-YZV4Z3EQ.mjs';import {a,d as d$1,c,b as b$2}from'../chunk-A4JCC3QQ.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$2}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$4,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var le=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Ae(u,ce){let V={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return V;let W=typeof u=="string"?document.querySelector(u):u;if(!W)return b("timeline: Container not found:",u),V;let s=W,{trigger:_={},speed:pe=1,once:$=false,axis:w="y",tracks:B,onComplete:de,repeat:x,repeatDelay:I=0,loop:L=false,loopDuration:fe=1500,debug:ue=false,label:me,respectReducedMotion:U=true}=ce,ge=a(_.start||"top bottom"),ye=a(_.end||"bottom top"),v=x==="infinite"?1/0:x??0,r,k=L===true?1/0:typeof L=="number"?L:0,a$5=false,A=0,m=k,R=U&&a$1(),be=a$2(e=>{R=U&&e,R&&(a$5=false,clearTimeout(r),r=void 0);}),F=()=>k>0&&!R,z=new Map,C=B.map(e=>{let n=typeof e.easing=="function"?e.easing:d[e.easing??"linear"]??d.linear,i=Array.from(s.querySelectorAll(e.selector)),o=i.map(t=>a$3(t));return i.forEach((t,l)=>{z.has(t)||z.set(t,t.getAttribute("style")??""),t.style.strokeDasharray=`${o[l]}`,t.style.strokeDashoffset=`${o[l]}`,e.fade&&(t.style.opacity="0");}),{...e,elements:i,lengths:o,easeFn:n}});function he(){for(let[e,n]of z)n?e.setAttribute("style",n):e.removeAttribute("style");}let P=0,H=0,T=false,p=false,d$2=0,y=false,b$3=-1,f=0,c$1=null;ue&&(c$1=document.createElement("div"),Object.assign(c$1.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(c$1));function we(e){if(!c$1)return;let n=me??(typeof u=="string"?u:"timeline"),i=B.map(({selector:o,from:t,to:l},q)=>{let g=le[q%le.length],D=l>t?Math.min(1,Math.max(0,(e-t)/(l-t))):0,S=Math.round(D*100);return `<div style="margin:4px 0">
1
+ import {a as a$1}from'../chunk-AJ22VSHC.mjs';import {a as a$3}from'../chunk-XC5NR2MU.mjs';import {a,d as d$1,c,b as b$2}from'../chunk-A4JCC3QQ.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$2}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$4,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var le=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Ae(u,ce){let V={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return V;let W=typeof u=="string"?document.querySelector(u):u;if(!W)return b("timeline: Container not found:",u),V;let s=W,{trigger:_={},speed:pe=1,once:$=false,axis:w="y",tracks:B,onComplete:de,repeat:x,repeatDelay:I=0,loop:L=false,loopDuration:fe=1500,debug:ue=false,label:me,respectReducedMotion:U=true}=ce,ge=a(_.start||"top bottom"),ye=a(_.end||"bottom top"),v=x==="infinite"?1/0:x??0,r,k=L===true?1/0:typeof L=="number"?L:0,a$5=false,A=0,m=k,R=U&&a$1(),be=a$2(e=>{R=U&&e,R&&(a$5=false,clearTimeout(r),r=void 0);}),F=()=>k>0&&!R,z=new Map,C=B.map(e=>{let n=typeof e.easing=="function"?e.easing:d[e.easing??"linear"]??d.linear,i=Array.from(s.querySelectorAll(e.selector)),o=i.map(t=>a$3(t));return i.forEach((t,l)=>{z.has(t)||z.set(t,t.getAttribute("style")??""),t.style.strokeDasharray=`${o[l]}`,t.style.strokeDashoffset=`${o[l]}`,e.fade&&(t.style.opacity="0");}),{...e,elements:i,lengths:o,easeFn:n}});function he(){for(let[e,n]of z)n?e.setAttribute("style",n):e.removeAttribute("style");}let P=0,H=0,T=false,p=false,d$2=0,y=false,b$3=-1,f=0,c$1=null;ue&&(c$1=document.createElement("div"),Object.assign(c$1.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(c$1));function we(e){if(!c$1)return;let n=me??(typeof u=="string"?u:"timeline"),i=B.map(({selector:o,from:t,to:l},q)=>{let g=le[q%le.length],D=l>t?Math.min(1,Math.max(0,(e-t)/(l-t))):0,S=Math.round(D*100);return `<div style="margin:4px 0">
2
2
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:2px">
3
3
  <span style="color:${g};max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${o}</span>
4
4
  <span style="color:#666;margin-left:8px">${S}%</span>
@@ -1 +1 @@
1
- 'use strict';function le({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(n),i=0,d=[];for(let a=0;a<r;a++){let u=Math.pow(o,a);d.push(u),i+=u;}let m=[0],x=0;for(let a=0;a<r;a++)x+=d[a]/i,m.push(x);return a=>{if(a<=0)return 0;if(a>=1)return 1;for(let u=0;u<r;u++)if(a<=m[u+1]){let g=(a-m[u])/(m[u+1]-m[u]);if(u===0)return g*(2-g);let L=1-Math.pow(n,u);return L+(1-L)*(2*g-1)*(2*g-1)}return 1}}function fe({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),o=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/n)+1}var Q={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:le(),elastic:fe()};function J(e,t,r){return Math.min(r,Math.max(t,e))}function q(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 U(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 Y(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function Z(e,t,r,n){return r===t?0:J((e-t)/(r-t)*n,0,1)}function H(e,t,r,n,o){let i=U(e.top,e.height,t,n.element)-Y(n.viewport,r),d=U(e.top,e.height,t,o.element)-Y(o.viewport,r);return {tStart:i,tEnd:d}}var ee=Symbol.for("svg-scroll-draw.registry");function te(){let e=globalThis;return e[ee]||(e[ee]=new Map)}function ne(e,t){te().set(e,t);}function re(e){te().delete(e);}var E,P=new Set,N=new WeakMap,M=new Map,oe=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function pe(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 ie(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();E??(E=new ResizeObserver(o=>{let i=false;for(let{target:d}of o)N.get(d)!==oe(d)&&(i=true),N.set(d,"");i&&P.forEach(d=>d());})),P.add(r);let n=pe(e);return [document.body,document.documentElement].forEach(o=>o&&n.add(o)),n.forEach(o=>{N.has(o)||N.set(o,oe(o)),M.set(o,(M.get(o)??0)+1),E.observe(o);}),()=>{P.delete(r)&&(n.forEach(o=>{let i=(M.get(o)??1)-1;if(i)return void M.set(o,i);M.delete(o),E?.unobserve(o);}),P.size||(E?.disconnect(),E=void 0));}}var ge=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function W(e,...t){ge&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function se(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",r),()=>t.removeEventListener("change",r);let n=t;return n.addListener?.(r),()=>n.removeListener?.(r)}var ae={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ie(e,t={}){if(typeof window>"u")return ae;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return W("scrollVideo: <video> element not found:",e),ae;let n=r,{trigger:o={},easing:i="linear",once:d=false,axis:m="y",preload:x="auto",triggerElement:a,onReady:u,onComplete:g,onProgress:L}=t,k=a??n,S=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:Q[i]??Q.linear,ue=q(o.start||"top top"),ce=q(o.end||"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=x);let B=t.from??0,z=t.to,R=0,_=0,l=0,b=false,f=false,O=-1,T=0,w=0,A=false,p=false,$=()=>m==="x"?window.scrollX:window.scrollY,de=()=>m==="x"?window.innerWidth:window.innerHeight;function D(){let s=k.getBoundingClientRect(),c=m==="x"?s.left:s.top,y=m==="x"?s.width:s.height,j=H({top:c,height:y},$(),de(),ue,ce);R=j.tStart,_=j.tEnd,p&&_===R&&W("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let I=NaN;function h(s){if(!p)return;let c=z??n.duration??0,y=B+(c-B)*s;y!==I&&(I=y,n.currentTime=y),n.style.setProperty("--scroll-draw-progress",String(s)),L?.(s);}function V(){if(!b||f||!p||S)return;let s=Z($(),R,_,1),c=d?Math.max(O,G(T=Math.max(T,s))):G(s);w=c,h(c),c>=1&&!A?(A=true,g?.()):c<1&&!d&&(A=false),l=requestAnimationFrame(V);}function F(){if(p=true,z===void 0&&(z=n.duration),S){h(1),u?.();return}D(),u?.(),b&&!f&&(l=requestAnimationFrame(V));}n.readyState>=1?F():n.addEventListener("loadedmetadata",F,{once:true}),p||D();let K=S?()=>{}:se(s=>{s&&(K(),S=true,cancelAnimationFrame(l),h(1));}),X=new IntersectionObserver(s=>{s.forEach(c=>{b=c.isIntersecting,b&&!f&&p?l=requestAnimationFrame(V):cancelAnimationFrame(l);});}),C;function v(){clearTimeout(C),C=setTimeout(D,150);}window.addEventListener("resize",v),window.addEventListener("orientationchange",v);let me=ie([k],v);return X.observe(n),ne(n,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:R,tEnd:_})}),{destroy(){cancelAnimationFrame(l),X.disconnect(),n.removeEventListener("loadedmetadata",F),window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v),me(),K(),clearTimeout(C),re(n);},replay(){O=-1,T=0,A=false,w=0,f=false,I=NaN,h(0);},pause(){f=true,cancelAnimationFrame(l);},resume(){f&&(f=false,b&&p&&(l=requestAnimationFrame(V)));},seek(s){let c=Math.min(1,Math.max(0,s));w=c,O=c,T=0,f=true,cancelAnimationFrame(l),I=NaN,h(c);},getProgress(){return w}}}exports.scrollVideo=Ie;
1
+ 'use strict';function fe({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(n),i=0,d=[];for(let a=0;a<r;a++){let u=Math.pow(o,a);d.push(u),i+=u;}let m=[0],x=0;for(let a=0;a<r;a++)x+=d[a]/i,m.push(x);return a=>{if(a<=0)return 0;if(a>=1)return 1;for(let u=0;u<r;u++)if(a<=m[u+1]){let g=(a-m[u])/(m[u+1]-m[u]);if(u===0)return g*(2-g);let L=1-Math.pow(n,u);return L+(1-L)*(2*g-1)*(2*g-1)}return 1}}function pe({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),o=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/n)+1}var Q={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:fe(),elastic:pe()};function U(e,t,r){return Math.min(r,Math.max(t,e))}function q(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 Y(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 Z(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 H(e,t,r,n){return r===t?0:U((e-t)/(r-t)*n,0,1)}function ee(e,t,r,n,o){let i=Y(e.top,e.height,t,n.element)-Z(n.viewport,r),d=Y(e.top,e.height,t,o.element)-Z(o.viewport,r);return {tStart:i,tEnd:d}}var te=Symbol.for("svg-scroll-draw.registry");function ne(){let e=globalThis;return e[te]||(e[te]=new Map)}function re(e,t){ne().set(e,t);}function oe(e){ne().delete(e);}var E,P=new Set,N=new WeakMap,M=new Map,ie=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function ge(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function se(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();E??(E=new ResizeObserver(o=>{let i=false;for(let{target:d}of o)N.get(d)!==ie(d)&&(i=true),N.set(d,"");i&&P.forEach(d=>d());})),P.add(r);let n=ge(e);return [document.body,document.documentElement].forEach(o=>o&&n.add(o)),n.forEach(o=>{N.has(o)||N.set(o,ie(o)),M.set(o,(M.get(o)??0)+1),E.observe(o);}),()=>{P.delete(r)&&(n.forEach(o=>{let i=(M.get(o)??1)-1;if(i)return void M.set(o,i);M.delete(o),E?.unobserve(o);}),P.size||(E?.disconnect(),E=void 0));}}var be=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function W(e,...t){be&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function ae(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",r),()=>t.removeEventListener("change",r);let n=t;return n.addListener?.(r),()=>n.removeListener?.(r)}var ue={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ve(e,t={}){if(typeof window>"u")return ue;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return W("scrollVideo: <video> element not found:",e),ue;let n=r,{trigger:o={},easing:i="linear",once:d=false,axis:m="y",preload:x="auto",triggerElement:a,onReady:u,onComplete:g,onProgress:L}=t,k=a??n,S=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:Q[i]??Q.linear,ce=q(o.start||"top top"),de=q(o.end||"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=x);let B=t.from??0,z=t.to,R=0,_=0,l=0,h=false,f=false,O=-1,T=0,b=0,A=false,p=false,$=()=>m==="x"?window.scrollX:window.scrollY,me=()=>m==="x"?window.innerWidth:window.innerHeight;function D(){let s=k.getBoundingClientRect(),c=m==="x"?s.left:s.top,y=m==="x"?s.width:s.height,J=ee({top:c,height:y},$(),me(),ce,de);R=J.tStart,_=J.tEnd,p&&_===R&&W("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let I=NaN;function w(s){if(!p)return;let c=z??n.duration??0,y=B+(c-B)*s;y!==I&&(I=y,n.currentTime=y),n.style.setProperty("--scroll-draw-progress",String(s)),L?.(s);}function V(){if(!h||f||!p||S)return;let s=H($(),R,_,1),c=d?Math.max(O,G(T=Math.max(T,s))):G(s);b=c,w(c),c>=1&&!A?(A=true,g?.()):c<1&&!d&&(A=false),l=requestAnimationFrame(V);}function F(){if(p=true,z===void 0&&(z=n.duration),S){w(1),u?.();return}D(),u?.(),f?w(b):h&&(l=requestAnimationFrame(V));}n.readyState>=1?F():n.addEventListener("loadedmetadata",F,{once:true}),p||D();let K=S?()=>{}:ae(s=>{s&&(K(),S=true,cancelAnimationFrame(l),w(1));}),X=new IntersectionObserver(s=>{s.forEach(c=>{h=c.isIntersecting,h&&!f&&p?l=requestAnimationFrame(V):cancelAnimationFrame(l);});}),C;function v(){clearTimeout(C),C=setTimeout(D,150);}window.addEventListener("resize",v),window.addEventListener("orientationchange",v);let le=se([k],v);X.observe(n),re(n,{type:"video",getProgress:()=>b,getTrigger:()=>({tStart:R,tEnd:_})});function j(){f&&(f=false,h&&p&&(l=requestAnimationFrame(V)));}return {destroy(){cancelAnimationFrame(l),X.disconnect(),n.removeEventListener("loadedmetadata",F),window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v),le(),K(),clearTimeout(C),oe(n);},replay(){O=-1,T=0,A=false,b=0,I=NaN,w(0),j();},pause(){f=true,cancelAnimationFrame(l);},resume:j,seek(s){let c=Math.min(1,Math.max(0,s));b=c,O=c,T=0,f=true,cancelAnimationFrame(l),I=NaN,w(c);},getProgress(){return b}}}exports.scrollVideo=Ve;
@@ -1 +1 @@
1
- export{a as scrollVideo}from'../chunk-GMBIGV3M.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollVideo}from'../chunk-QFSTKVA3.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';var vue=require('vue');function vn({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(r),i=0,l=[];for(let d=0;d<t;d++){let v=Math.pow(s,d);l.push(v),i+=v;}let m=[0],f=0;for(let d=0;d<t;d++)f+=l[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let v=0;v<t;v++)if(d<=m[v+1]){let R=(d-m[v])/(m[v+1]-m[v]);if(v===0)return R*(2-R);let E=1-Math.pow(r,v);return E+(1-E)*(2*R-1)*(2*R-1)}return 1}}function En({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),s=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var ne={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:vn(),elastic:En()};function Nt(e,n,t){return Math.min(t,Math.max(n,e))}function fe(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function Vt(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function zt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,t,r){return t===n?0:Nt((e-n)/(t-n)*r,0,1)}function Te(e,n,t,r,s){let i=Vt(e.top,e.height,n,r.element)-zt(r.viewport,t),l=Vt(e.top,e.height,n,s.element)-zt(s.viewport,t);return {tStart:i,tEnd:l}}function lt(e,n,t){let r=e.getBoundingClientRect(),s=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:s,scroll:0}:{top:t==="x"?r.left:r.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function Qe(e){let n=e.tagName.toLowerCase();if(n==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(t+r)}if(n==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}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 t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function ct(e,n,t){let r=_t(e),s=_t(n);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*t)},${Math.round(r[1]+(s[1]-r[1])*t)},${Math.round(r[2]+(s[2]-r[2])*t)})`}var qt={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 Ke=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){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Sn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Tn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Bt=33;function xn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Mn(e){let n=[];for(let t=0;t<Bt;t++){let r=t/(Bt-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function ut(e){switch(e){case "linear":return "linear";case "ease-in":return Sn;case "ease-out":return Tn;case "ease-in-out":return xn()?Mn(ne["ease-in-out"]):null;default:return null}}var Wt=Symbol.for("svg-scroll-draw.registry");function Gt(){let e=globalThis;return e[Wt]||(e[Wt]=new Map)}function Le(e,n){Gt().set(e,n);}function Ae(e){Gt().delete(e);}var Ze,mt=new Set,ft=new WeakMap,Je=new Map,jt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Ln(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function Re(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)ft.get(l)!==jt(l)&&(i=true),ft.set(l,"");i&&mt.forEach(l=>l());})),mt.add(t);let r=Ln(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{ft.has(s)||ft.set(s,jt(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{mt.delete(t)&&(r.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),mt.size||(Ze?.disconnect(),Ze=void 0));}}function pt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function We(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=pt(i=>{if(!i)return;r();let l=(t.getProgress?.()??0)>=1;t.destroy(),t=n(l?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...l)=>t[i]?.(...l);return s.destroy=()=>{r(),t.destroy();},s}var An=0;function Cn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Qt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Ut=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Pn(e){if(!Ke)return;let n=Qt(e,"stroke");if(!n||n==="none"){pe("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Ut.has(t)&&!Ut.has(Qt(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function On(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=t==="x"?window.scrollX:window.scrollY,l=e-i,m=n-i,f=t==="x";r.innerHTML=`
2
- <div style="position:absolute;${f?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${f?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var Yt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Xt=/[MmLlHhVvCcSsQqTtAaZz]/g;function $n(e,n,t){if(!Ke)return;let r=(e.match(Xt)??[]).join("").toUpperCase(),s=(n.match(Xt)??[]).join("").toUpperCase(),i=(e.match(Yt)??[]).length,l=(n.match(Yt)??[]).length;if(r!==s){pe(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}i!==l&&pe(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function kn(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),m=r[s++]??l;return String(+(l+(m-l)*t).toFixed(4))})}function Et(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:We(n,(t,r)=>Rn(e,t,r))}function Rn(e,n,t){let{preset:r,...s}=n,i=r?{...qt[r],...s}:s,{selector:l="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:v={},stagger:R=0,direction:E="forward",once:Z=false,debug:re=false,axis:M="y",scrollContainer:oe,autoReverse:ye=false,delay:C=0,strokeColor:P,strokeWidth:L,fillOpacity:A,waypoints:b,velocityScale:h=false,threshold:w=0,rootMargin:Y="0px",repeat:_=0,repeatDelay:X=0,morphTo:I,clip:D,autoplay:ce=false,duration:he=1e3,native:te=true,onProgress:G,onStart:p,onComplete:u,onEnter:T,onLeave:ue,onEnterBack:me,onLeaveBack:Ce}=i,H=D===true?"left":typeof D=="string"?D:false,J=typeof d=="function"?d:ne[d]??ne.linear,O=fe(v.start||"top bottom"),$=fe(v.end||"bottom top"),q=typeof oe=="string"?document.querySelector(oe):oe??null,ve=Array.isArray(P)?P[0]:null,Ee=Array.isArray(P)?P[1]:typeof P=="string"?P:null,Pe=Array.isArray(L)?L[0]:null,Oe=Array.isArray(L)?L[1]:typeof L=="number"?L:null,Se=Array.isArray(A)?A[0]:null,ze=Array.isArray(A)?A[1]:typeof A=="number"?A:null;function $e(o){let a=o*100;switch(H){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let B=H?[]:Array.from(e.querySelectorAll(l)),N=[],de=[],ge=0,c=0,g=R,De=0,k=false,V=false,x=0,z=false,xe=-1,Me=[],rt=-1,se=false,ke=0,He=0,_e,dt=null;function At(){dt?.destroy(),dt=null;}let qe=new Set,Ct=NaN,Be=true,ot=-1,Pt=performance.now(),Ge=NaN;function Ue(){return q?M==="x"?q.scrollLeft:q.scrollTop:M==="x"?window.scrollX:window.scrollY}function Ot(){return q?M==="x"?q.clientWidth:q.clientHeight:M==="x"?window.innerWidth:window.innerHeight}function $t(){let o=lt(e,q,M);return Te(o,o.scroll,Ot(),O,$)}function pn(){let o=c-ge,a=B.length-1,y=q??document.documentElement,j=M==="x"?"Width":"Height";if(g=R,R>0&&a>0&&o>0){let be=y[`scroll${j}`]-y[`client${j}`]-1-ge-o/m;be>=0&&(g=Math.min(R,be/(a*o)));}De=c+a*g*o;}function kt(){(({tStart:ge,tEnd:c}=$t())),pn(),re&&Ke&&(At(),dt=On(ge,c,M));}function gt(o,a=$t){Le(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Ae(e);},o}function Rt(o,a){return Z&&!ye?Math.max(xe,J(Me[o]=Math.max(Me[o]??0,a))):J(a)}function dn(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),H){let y=a==="reverse"?1-o:o;e.style.clipPath=$e(y);return}B.forEach((y,j)=>yt(y,j,o,a));}function yt(o,a,y,j){o.style.strokeDashoffset=j==="reverse"?`${N[a]*y}`:`${N[a]*(1-y)}`,f&&(o.style.opacity=j==="reverse"?`${1-y}`:`${y}`),ve&&Ee?o.style.stroke=ct(ve,Ee,y):Ee&&(o.style.stroke=Ee),Pe!==null&&Oe!==null?o.style.strokeWidth=`${Pe+(Oe-Pe)*y}`:Oe!==null&&(o.style.strokeWidth=`${Oe}`),Se!==null&&ze!==null?o.style.fillOpacity=`${Se+(ze-Se)*y}`:ze!==null&&(o.style.fillOpacity=`${ze}`),I&&o.tagName.toLowerCase()==="path"&&de[a]&&o.setAttribute("d",kn(de[a],I,y));}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),H){e.style.clipPath=$e(E==="reverse"?1:0);return}B.forEach((o,a)=>{o.style.strokeDasharray=`${N[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${N[a]}`,f?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ve&&(o.style.stroke=ve),Pe!==null&&(o.style.strokeWidth=`${Pe}`),Se!==null&&(o.style.fillOpacity=`${Se}`),I&&o.tagName.toLowerCase()==="path"&&de[a]&&o.setAttribute("d",de[a]);});}if(B.forEach(o=>{Pn(o);let a=Qe(o);N.push(a);let y=o.tagName.toLowerCase()==="path";y?de.push(o.getAttribute("d")??""):de.push(""),I&&(y?$n(de[de.length-1],I,o):pe(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",f&&(o.style.opacity="1"),Ee&&(o.style.stroke=Ee),Oe!==null&&(o.style.strokeWidth=`${Oe}`),ze!==null&&(o.style.fillOpacity=`${ze}`),I&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",I)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,f?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ve&&(o.style.stroke=ve),Pe!==null&&(o.style.strokeWidth=`${Pe}`),Se!==null&&(o.style.fillOpacity=`${Se}`));}),t)return H&&(e.style.clipPath=$e(1)),u?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H&&(e.style.clipPath=$e(E==="reverse"?1:0));let It=typeof d=="string"?ut(d):null;function gn(){return !(te===false||ce||re||!Cn()||!B.length||!It||H||M!=="y"||q||m!==1||R!==0||Z||ye||h!==false||I||b||_||C>0||G||p||u||T||ue||me||Ce||P!=null||L!=null||A!=null||(v.start||"top bottom").trim()!=="top bottom"||(v.end||"bottom top").trim()!=="bottom top")}function yn(){let o=++An,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,j=`--svg-scroll-draw-${o}`,be=E==="reverse"?"0":"var(--ssd-len)",Ne=E==="reverse"?"var(--ssd-len)":"0",we=`stroke-dashoffset:${be};`,W=`stroke-dashoffset:${Ne};`;f&&(we+=`opacity:${E==="reverse"?1:0};`,W+=`opacity:${E==="reverse"?0:1};`);let Q=document.createElement("style");Q.setAttribute("data-svg-scroll-draw",""),Q.textContent=`@keyframes ${a}{from{${we}}to{${W}}}.${y}{view-timeline-name:${j};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${It};animation-fill-mode:both;animation-timeline:${j};animation-range:cover 0% cover 100%;}`,document.head.appendChild(Q),e.classList.add(y);function ie(S,F){S.style.setProperty("--ssd-len",String(N[F])),S.style.strokeDasharray=`${N[F]}`,S.style.strokeDashoffset="",S.style.opacity="",S.style.animationPlayState="",S.classList.add(a);}B.forEach(ie);let ae=false,U=-1;function K(){if(U>=0)return U;let S=e.getBoundingClientRect(),{tStart:F,tEnd:le}=Te({top:S.top,height:S.height},Ue(),Ot(),O,$);return J(ee(Ue(),F,le,m))}return {destroy(){e.classList.remove(y),B.forEach(S=>{S.classList.remove(a),S.style.removeProperty("--ssd-len"),S.style.animationPlayState="";}),Q.remove();},replay(){ae=false,U=-1,B.forEach(ie);},pause(){ae=true,B.forEach(S=>{S.style.animationPlayState="paused";});},resume(){ae&&(ae=false,B.forEach(S=>{S.style.animationPlayState="running";}));},seek(S){let F=Math.min(1,Math.max(0,S));U=F,ae=true,B.forEach((le,Ve)=>{le.classList.remove(a),le.style.strokeDashoffset=E==="reverse"?`${N[Ve]*F}`:`${N[Ve]*(1-F)}`,f&&(le.style.opacity=E==="reverse"?`${1-F}`:`${F}`);});},getProgress(){return K()},refresh(){B.forEach((S,F)=>{N[F]=Qe(S),S.style.setProperty("--ssd-len",String(N[F])),S.style.strokeDasharray=`${N[F]}`;});}}}if(gn())return gt(yn());function hn(){let o=Math.max(1,he),a=H?o:o*(1+Math.max(0,B.length-1)*R),y=0,j=0,be=false;function Ne(U){let K=true,S=Math.min(1,Math.max(0,U/a));if(H){let F=Math.min(1,Math.max(0,U/o)),le=J(F);ke=le,e.style.setProperty("--scroll-draw-progress",String(le)),e.style.clipPath=$e(E==="reverse"?1-le:le),G?.(le),F<1&&(K=false);}else {B.forEach((le,Ve)=>{let wn=Ve*R*o,Ht=Math.min(1,Math.max(0,(U-wn)/o));yt(le,Ve,J(Ht),E),Ht<1&&(K=false);});let F=J(S);ke=F,G?.(F),e.style.setProperty("--scroll-draw-progress",String(F));}if(b){let F=J(S);for(let le in b){let Ve=parseFloat(le);F>=Ve&&!qe.has(Ve)&&(qe.add(Ve),b[le]?.());}}return K}function we(U){if(se)return;let K=U-y;V||(V=true,p?.());let S=Ne(K);if(S&&!k){k=true,Ne(a),u?.(),He<(_==="infinite"?1/0:_??0)&&(He++,_e=setTimeout(()=>{y=performance.now(),V=false,k=false,qe.clear(),Ye(),x=requestAnimationFrame(we);},X));return}S||(x=requestAnimationFrame(we));}function W(){cancelAnimationFrame(x),clearTimeout(_e),y=performance.now(),j=0,se=false,V=false,k=false,He=0,be=true,ke=0,qe.clear(),Ye(),x=requestAnimationFrame(we);}let Q=new IntersectionObserver(U=>{U.forEach(K=>{K.isIntersecting&&!(Z&&k)?W():!K.isIntersecting&&!Z&&!k&&(cancelAnimationFrame(x),clearTimeout(_e),be=false);});},{root:q??null,threshold:w,rootMargin:Y}),ie;function ae(){clearTimeout(ie),ie=setTimeout(()=>{B.forEach((U,K)=>{N[K]=Qe(U),U.style.strokeDasharray=`${N[K]}`;});},150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),C>0?setTimeout(()=>Q.observe(e),C):Q.observe(e),{destroy(){cancelAnimationFrame(x),clearTimeout(_e),Q.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ie);},replay(){He=0,W();},pause(){se||!be||(se=true,j=performance.now()-y,cancelAnimationFrame(x));},resume(){se&&(se=false,be=true,y=performance.now()-j,x=requestAnimationFrame(we));},seek(U){let K=Math.min(1,Math.max(0,U));ke=K,se=true,j=K*a,y=performance.now()-j,cancelAnimationFrame(x),Ne(j);},getProgress(){return ke},refresh(){clearTimeout(ie),B.forEach((U,K)=>{N[K]=Qe(U),U.style.strokeDasharray=`${N[K]}`;});}}}if(ce)return gt(hn());kt();function Ft(){if(se||!je)return;let o=performance.now(),a=Ue();if(!Be&&h===false&&a===Ct){bt(a);return}Be=false,Ct=a;let y=m;if(h!==false){let W=o-Pt,Q=W>0?Math.abs(a-(ot<0?a:ot))/W:0;y=m*Math.max(.2,1+Q*(typeof h=="number"?h:1)*.04);}ot=a,Pt=o;let j=ye?rt===-1||a>=rt?"forward":"reverse":E;rt=a;let be=c-ge,Ne=true,we=be===0?0:(a-ge)/be;if(isNaN(Ge)||(Ge<=0&&we>0?T?.():Ge>0&&we<=0&&Ce?.(),Ge<1&&we>=1?ue?.():Ge>=1&&we<1&&me?.()),Ge=we,H){let W=Rt(0,ee(a,ge,c,y));ke=W,e.style.setProperty("--scroll-draw-progress",String(W));let Q=j==="reverse"?1-W:W;e.style.clipPath=$e(Q),G?.(W),!V&&ee(a,ge,c,y)>0&&(V=true,p?.()),W>=1&&!k?(k=true,u?.(),He<(_==="infinite"?1/0:_??0)&&(He++,_e=setTimeout(()=>{xe=-1,Me=[],V=false,k=false,Ye();},X))):W<1&&!Z&&(k=false),bt(a);return}if(B.forEach((W,Q)=>{let ie=Q*g*be,ae=Rt(Q,ee(a,ge+ie,c+ie,y));yt(W,Q,ae,j),Q===0&&(ke=ae,G?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),ae<1&&(Ne=false);}),b){let W=J(ee(a,ge,c,y));for(let Q in b){let ie=parseFloat(Q);W>=ie&&!qe.has(ie)&&(qe.add(ie),b[Q]?.());}}!V&&ee(a,ge,c,y)>0&&(V=true,p?.()),Ne&&!k?(k=true,u?.(),He<(_==="infinite"?1/0:_??0)&&(He++,_e=setTimeout(()=>{xe=-1,Me=[],V=false,k=false,qe.clear(),Ye(),Be=true;},X))):!Ne&&!Z&&(k=false),bt(a);}function ht(o){return o>=c&&o<De}function bt(o){z||ht(o)?x=requestAnimationFrame(Ft):je=false;}function wt(){return z||ht(Ue())}let je=false;function st(){je||(je=true,x=requestAnimationFrame(function(){Ft();}));}function it(){je=false,cancelAnimationFrame(x);}let vt=new IntersectionObserver(o=>{o.forEach(a=>{z=a.isIntersecting,z&&!se?(Be=true,st()):je&&!se&&ht(Ue())||it();});},{root:q??null,threshold:w,rootMargin:Y});function Dt(){B.forEach((o,a)=>{N[a]=Qe(o),o.style.strokeDasharray=`${N[a]}`;}),kt(),Be=true;}let at;function Xe(){clearTimeout(at),at=setTimeout(Dt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let bn=Re([e],Xe);return C>0?setTimeout(()=>vt.observe(e),C):vt.observe(e),gt({destroy(){cancelAnimationFrame(x),clearTimeout(_e),it(),vt.disconnect(),bn(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(at),At();},replay(){xe=-1,Me=[],rt=-1,ot=-1,V=false,k=false,He=0,se=false,ke=0,qe.clear(),clearTimeout(_e),Ye(),Be=true,wt()&&st();},pause(){se=true,it();},resume(){se&&(se=false,Be=true,wt()&&st());},seek(o){let a=Math.min(1,Math.max(0,o));ke=a,xe=a,Me=[],se=true,it(),dn(a,E),Be=true;},getProgress(){return ke},refresh(){clearTimeout(at),Dt(),wt()&&!se&&st();}},()=>({tStart:ge,tEnd:c}))}var Kt=new WeakMap,In=0;function Zt(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=Kt.get(t);return r===void 0&&Kt.set(t,r=++In),`el#${r}`}return t})}function Jt(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...s)=>n()[r]?.(...s));return t}function Fn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function en(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let s=[],i=[],l=r[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:r[1],nums:s,units:i});}return n}function Dn(e,n,t){let r=en(e),s=en(n);return r.length===0||r.length!==s.length?t<1?e:n:r.map((i,l)=>{let m=s[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function tn(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),s=String(n);if(Fn(r))return ct(r,s,t);if(r.includes("("))return Dn(r,s,t);let i=r.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),f=parseFloat(l[1]);return `${m+(f-m)*t}${i[2]||l[2]}`}return t<1?r:s}function Hn(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Nn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Vn=0,nn="--scroll-draw-progress";function zn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var on={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,n){return typeof window>"u"?on:n.respectReducedMotion===false?rn(e,n,false):We(n,(t,r)=>rn(e,t,r))}function rn(e,n,t){let{props:r,trigger:s={},easing:i="ease-out",speed:l=1,once:m=false,axis:f="y",scrollContainer:d,native:v=true,velocityScale:R=false,triggerElement:E,onProgress:Z,onComplete:re,onEnter:M,onLeave:oe,onEnterBack:ye,onLeaveBack:C}=n,P=typeof i=="function"?i:ne[i]??ne["ease-out"],L=fe(s.start||"top bottom"),A=fe(s.end||"bottom top"),b=E??e,h=typeof d=="string"?document.querySelector(d):d??null,w=Object.entries(r).map(([c,g])=>({prop:Hn(c),from:Array.isArray(g)?g[0]:"",to:Array.isArray(g)?g[1]:g}));function Y(){let c=window.getComputedStyle(e);for(let g of w)g.from===""&&(g.from=c.getPropertyValue(g.prop).trim()||"0");}function _(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let X=new Map;for(let c of [...w.map(g=>g.prop),nn])X.set(c,e.style.getPropertyValue(c));function I(){for(let[c,g]of X)g?e.style.setProperty(c,g):e.style.removeProperty(c);}if(t)return _(),re?.(),{...on,destroy:I,getProgress:()=>1};Y();let D=()=>h?f==="x"?h.scrollLeft:h.scrollTop:f==="x"?window.scrollX:window.scrollY,ce=()=>h?f==="x"?h.clientWidth:h.clientHeight:f==="x"?window.innerWidth:window.innerHeight,he=typeof i=="string"?ut(i):null;function te(){if(!v||!zn()||!he||f!=="y"||h||b!==e||m||l!==1||Z||re||M||oe||ye||C||R!==false||(s.start||"top bottom").trim()!=="top bottom"||(s.end||"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Nn.has(c.prop))return false;return true}function G(){let c=`ssd-a-${++Vn}`,g=w.map(z=>`${z.prop}:${z.from}`).join(";"),De=w.map(z=>`${z.prop}:${z.to}`).join(";"),k=document.createElement("style");k.setAttribute("data-ssd-animate",""),k.textContent=`@keyframes ${c}{from{${g}}to{${De}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(c);let V=()=>{let z=e.getBoundingClientRect();return Te({top:z.top,height:z.height},D(),ce(),L,A)};Le(e,{type:"animate",getProgress:()=>x.getProgress(),getTrigger:V});let x={refresh(){},destroy(){e.classList.remove(c),k.remove(),e.style.animationPlayState="",I(),Ae(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(z){let xe=Math.min(1,Math.max(0,z));e.classList.remove(c);for(let Me of w)e.style.setProperty(Me.prop,tn(Me.from,Me.to,xe));},getProgress(){let{tStart:z,tEnd:xe}=V();return P(ee(D(),z,xe,l))}};return x}if(te())return G();let p=0,u=0,T=0,ue=false,me=false,Ce=-1,H=0,J=0,O=false,$=NaN,q=-1,ve=0,Ee=b===e?w:[],Pe=false;function Oe(){let c=e.style,g=Ee.map(x=>c.getPropertyValue(x.prop)),De=c.transition;Ee.length&&(c.transition="none"),Ee.forEach(x=>c.setProperty(x.prop,X.get(x.prop)??""));let k=lt(b,h,f);Ee.forEach((x,z)=>c.setProperty(x.prop,g[z])),Ee.length&&(e.offsetWidth,c.transition=De);let V=Te(k,k.scroll,ce(),L,A);Pe&&Math.abs(V.tStart-p)<1&&Math.abs(V.tEnd-u)<1||(Pe=true,p=V.tStart,u=V.tEnd);}function Se(c){e.style.setProperty(nn,String(c));for(let g of w)e.style.setProperty(g.prop,tn(g.from,g.to,c));Z?.(c);}function ze(c){if(isNaN($)){$=c;return}$<=0&&c>0?M?.():$>0&&c<=0&&C?.(),$<1&&c>=1?oe?.():$>=1&&c<1&&ye?.(),$=c;}function $e(){if(!ue||me)return;let c=performance.now(),g=D(),De=l;if(R!==false){let z=c-ve,xe=z>0?Math.abs(g-(q<0?g:q))/z:0;De=l*Math.max(.2,1+xe*(typeof R=="number"?R:1)*.04);}q=g,ve=c;let k=u===p?0:(g-p)/(u-p);ze(k);let V=ee(g,p,u,De),x=m?Math.max(Ce,P(H=Math.max(H,V))):P(V);J=x,Se(x),x>=1&&!O?(O=true,re?.()):x<1&&!m&&(O=false),T=requestAnimationFrame($e);}Oe(),u===p&&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),H=ee(D(),p,u,l),J=P(H),Se(J);let B=new IntersectionObserver(c=>{c.forEach(g=>{ue=g.isIntersecting,ue&&!me?T=requestAnimationFrame($e):cancelAnimationFrame(T);});},{root:h??null}),N;function de(){clearTimeout(N),N=setTimeout(Oe,150);}window.addEventListener("resize",de),window.addEventListener("orientationchange",de);let ge=Re([b],de);return B.observe(e),Le(e,{type:"animate",getProgress:()=>J,getTrigger:()=>({tStart:p,tEnd:u})}),{destroy(){cancelAnimationFrame(T),B.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),ge(),clearTimeout(N),I(),Ae(e);},replay(){Ce=-1,H=0,O=false,J=0,me=false,Se(0);},pause(){me=true,cancelAnimationFrame(T);},resume(){me&&(me=false,ue&&(T=requestAnimationFrame($e)));},seek(c){let g=Math.min(1,Math.max(0,c));J=g,Ce=g,H=0,me=true,cancelAnimationFrame(T),Se(g);},getProgress(){return J},refresh(){Oe();}}}var Tt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,n){if(typeof window>"u")return Tt;let t=typeof e=="string"?document.querySelector(e):e;return t?We(n,(r,s)=>_n(t,r,s)):(pe("scrollCounter: element not found:",e),Tt)}function _n(e,n,t){let{from:r=0,to:s,format:i,easing:l="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:v}=n,R=d!==void 0?p=>p.toFixed(d):i??(p=>String(Math.round(p))),E=typeof l=="function"?l:ne[l]??ne["ease-out"],Z=fe(m.start||"top 80%"),re=fe(m.end||"top 20%");if(t)return e.textContent=R(s),v?.(),{...Tt,getProgress:()=>1};let M=0,oe=0,ye=false,C=0,P=false,L=false,A=-1,b=0,h=0,w=false,Y=()=>window.scrollY,_=()=>window.innerHeight;function X(){let p=e.getBoundingClientRect(),u=Te({top:p.top,height:p.height},Y(),_(),Z,re);ye&&Math.abs(u.tStart-M)<1&&Math.abs(u.tEnd-oe)<1||(ye=true,M=u.tStart,oe=u.tEnd);}function I(p){e.textContent=R(r+(s-r)*p),e.style.setProperty("--scroll-draw-progress",String(p));}function D(){if(!P||L)return;let p=ee(Y(),M,oe,1),u=f?Math.max(A,E(b=Math.max(b,p))):E(p);h=u,I(u),u>=1&&!w?(w=true,v?.()):u<1&&!f&&(w=false),C=requestAnimationFrame(D);}X();{b=ee(Y(),M,oe,1);let p=E(b);h=p,I(p);}let ce=new IntersectionObserver(p=>{p.forEach(u=>{P=u.isIntersecting,P&&!L?C=requestAnimationFrame(D):cancelAnimationFrame(C);});}),he;function te(){clearTimeout(he),he=setTimeout(X,150);}window.addEventListener("resize",te),window.addEventListener("orientationchange",te);let G=Re([e],te);return ce.observe(e),Le(e,{type:"counter",getProgress:()=>h,getTrigger:()=>({tStart:M,tEnd:oe})}),{destroy(){cancelAnimationFrame(C),ce.disconnect(),window.removeEventListener("resize",te),window.removeEventListener("orientationchange",te),G(),clearTimeout(he),Ae(e);},replay(){A=-1,b=0,w=false,h=0,L=false,I(0);},pause(){L=true,cancelAnimationFrame(C);},resume(){L&&(L=false,P&&(C=requestAnimationFrame(D)));},seek(p){let u=Math.min(1,Math.max(0,p));h=u,A=u,b=0,L=true,cancelAnimationFrame(C),I(u);},getProgress(){return h}}}var sn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Mt(e,n={}){if(typeof window>"u")return sn;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return pe("scrollVideo: <video> element not found:",e),sn;let r=t,{trigger:s={},easing:i="linear",once:l=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:v,onComplete:R,onProgress:E}=n,Z=d??r,re=window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof i=="function"?i:ne[i]??ne.linear,oe=fe(s.start||"top top"),ye=fe(s.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let C=n.from??0,P=n.to,L=0,A=0,b=0,h=false,w=false,Y=-1,_=0,X=0,I=false,D=false,ce=()=>m==="x"?window.scrollX:window.scrollY,he=()=>m==="x"?window.innerWidth:window.innerHeight;function te(){let O=Z.getBoundingClientRect(),$=m==="x"?O.left:O.top,q=m==="x"?O.width:O.height,ve=Te({top:$,height:q},ce(),he(),oe,ye);L=ve.tStart,A=ve.tEnd,D&&A===L&&pe("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let G=NaN;function p(O){if(!D)return;let $=P??r.duration??0,q=C+($-C)*O;q!==G&&(G=q,r.currentTime=q),r.style.setProperty("--scroll-draw-progress",String(O)),E?.(O);}function u(){if(!h||w||!D||re)return;let O=ee(ce(),L,A,1),$=l?Math.max(Y,M(_=Math.max(_,O))):M(O);X=$,p($),$>=1&&!I?(I=true,R?.()):$<1&&!l&&(I=false),b=requestAnimationFrame(u);}function T(){if(D=true,P===void 0&&(P=r.duration),re){p(1),v?.();return}te(),v?.(),h&&!w&&(b=requestAnimationFrame(u));}r.readyState>=1?T():r.addEventListener("loadedmetadata",T,{once:true}),D||te();let ue=re?()=>{}:pt(O=>{O&&(ue(),re=true,cancelAnimationFrame(b),p(1));}),me=new IntersectionObserver(O=>{O.forEach($=>{h=$.isIntersecting,h&&!w&&D?b=requestAnimationFrame(u):cancelAnimationFrame(b);});}),Ce;function H(){clearTimeout(Ce),Ce=setTimeout(te,150);}window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let J=Re([Z],H);return me.observe(r),Le(r,{type:"video",getProgress:()=>X,getTrigger:()=>({tStart:L,tEnd:A})}),{destroy(){cancelAnimationFrame(b),me.disconnect(),r.removeEventListener("loadedmetadata",T),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),J(),ue(),clearTimeout(Ce),Ae(r);},replay(){Y=-1,_=0,I=false,X=0,w=false,G=NaN,p(0);},pause(){w=true,cancelAnimationFrame(b);},resume(){w&&(w=false,h&&D&&(b=requestAnimationFrame(u)));},seek(O){let $=Math.min(1,Math.max(0,O));X=$,Y=$,_=0,w=true,cancelAnimationFrame(b),G=NaN,p($);},getProgress(){return X}}}function an(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function un(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function qn(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function ln(e){let n=un(e),t=new Map;for(let i of n){let l=i.offsetTop;t.has(l)||t.set(l,[]),t.get(l).push(i);}let r=[],s=Array.from(t.keys()).sort((i,l)=>i-l);for(let i of s){let l=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",l.forEach((f,d)=>{let v=f.nextElementSibling;m.appendChild(f),d<l.length-1&&v&&v.style.whiteSpace==="pre"&&m.appendChild(v);}),r.push(m);}return e.textContent="",r.forEach((i,l)=>{e.appendChild(i),l<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Bn(e,n,t,r){if(t<=1||r===0)return e;let s=(t-1)*r,i=n*r,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Wn(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var cn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Lt(e,n={}){if(typeof window>"u")return cn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return pe("scrollText: element not found:",e),cn;let r=t;return We(n,(s,i)=>Gn(r,s,i))}function Gn(e,n,t){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:l={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=n,v=typeof i=="function"?i:ne[i]??ne["ease-out"],R=fe(m.start||"top 85%"),E=fe(m.end||"top 40%"),Z=e.innerHTML,re=e.textContent??"",M;r==="chars"?M=qn(e):r==="lines"?M=ln(e):M=un(e),an(e,re);let oe=M.length;function ye(u,T){l?.opacity!==void 0&&(u.style.opacity=String(l.opacity+(1-l.opacity)*T));let ue=Wn(T,l);ue&&(u.style.transform=ue);}function C(u){e.style.setProperty("--scroll-draw-progress",String(u)),M.forEach((T,ue)=>{let me=v(Bn(u,ue,oe,s));ye(T,me);});}if(t)return C(1),d?.(),{destroy(){e.innerHTML=Z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};C(0);let P=0,L=0,A=0,b=false,h=false,w=-1,Y=0,_=false,X=()=>window.scrollY,I=()=>window.innerHeight;function D(){let u=e.getBoundingClientRect(),T=Te({top:u.top,height:u.height},X(),I(),R,E);P=T.tStart,L=T.tEnd;}function ce(){if(!b||h)return;let u=ee(X(),P,L,1);f&&(w=Math.max(w,u),u=w),Y=u,C(u),u>=1&&!_?(_=true,d?.()):u<1&&!f&&(_=false),A=requestAnimationFrame(ce);}D();let he=new IntersectionObserver(u=>{u.forEach(T=>{b=T.isIntersecting,b&&!h?A=requestAnimationFrame(ce):cancelAnimationFrame(A);});}),te;function G(){clearTimeout(te),te=setTimeout(()=>{if(r==="lines"){let u=Y;e.innerHTML=Z,M=ln(e),an(e,re),C(u);}D();},150);}window.addEventListener("resize",G),window.addEventListener("orientationchange",G);let p=Re([e],G);return he.observe(e),Le(e,{type:"text",getProgress:()=>Y,getTrigger:()=>({tStart:P,tEnd:L})}),{destroy(){cancelAnimationFrame(A),he.disconnect(),window.removeEventListener("resize",G),window.removeEventListener("orientationchange",G),p(),clearTimeout(te),e.innerHTML=Z,Ae(e);},replay(){w=-1,_=false,Y=0,h=false,C(0);},pause(){h=true,cancelAnimationFrame(A);},resume(){h&&(h=false,b&&(A=requestAnimationFrame(ce)));},seek(u){let T=Math.min(1,Math.max(0,u));Y=T,w=T,h=true,cancelAnimationFrame(A),C(T);},getProgress(){return Y}}}var nt=e=>typeof e=="function"?e():vue.unref(e);function Fe(e,n,t){let r=null,s=n(),i=()=>{r?.destroy(),r=e.value?t(e.value,Jt(s,()=>s)):null;};vue.onMounted(i),vue.watch(()=>Zt(s=n()),i),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function uo(e={}){let n=vue.ref(null);return Fe(n,()=>nt(e),Et),n}var mn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Xn=[null,Boolean,[Boolean,String],[Boolean,Number]],fn=e=>({type:e,default:void 0}),mo=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(mn).map(([e,n])=>[e,n?fn(Xn[n]):null])),setup(e,{slots:n}){let t=vue.ref(null);return Fe(t,()=>{let r={};for(let s in mn){let i=e[s];i!=null&&(r[s]=i);}return r},Et),()=>vue.h("div",{ref:t},n.default?.())}});function fo(e){let n=vue.ref(null);return Fe(n,()=>nt(e),St),n}var po=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:n}){let t=vue.ref(null);return Fe(t,()=>e.options,St),()=>vue.h("div",{ref:t},n.default?.())}});function go(e){let n=vue.ref(null);return Fe(n,()=>nt(e),xt),n}var yo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:fn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let n=vue.ref(null);return Fe(n,()=>{let t={to:e.to};return e.from!=null&&(t.from=e.from),e.format!=null&&(t.format=e.format),e.easing!=null&&(t.easing=e.easing),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.decimals!=null&&(t.decimals=e.decimals),e.onComplete!=null&&(t.onComplete=e.onComplete),t},xt),()=>vue.h("span",{ref:n})}});function ho(e={}){let n=vue.ref(null);return Fe(n,()=>nt(e),Mt),n}var bo=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let n=vue.ref(null);return Fe(n,()=>e.options??{},Mt),()=>vue.h("video",{ref:n,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function wo(e={}){let n=vue.ref(null);return Fe(n,()=>nt(e),Lt),n}var vo=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:n}){let t=vue.ref(null);return Fe(t,()=>e.options??{},Lt),()=>vue.h(e.tag,{ref:t},n.default?.())}});exports.ScrollAnimate=po;exports.ScrollCounter=yo;exports.ScrollDraw=mo;exports.ScrollText=vo;exports.ScrollVideo=bo;exports.useScrollAnimate=fo;exports.useScrollCounter=go;exports.useScrollDraw=uo;exports.useScrollText=wo;exports.useScrollVideo=ho;
1
+ 'use strict';var vue=require('vue');function Sn({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),i=0,a=[];for(let y=0;y<n;y++){let E=Math.pow(o,y);a.push(E),i+=E;}let m=[0],p=0;for(let y=0;y<n;y++)p+=a[y]/i,m.push(p);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let E=0;E<n;E++)if(y<=m[E+1]){let N=(y-m[E])/(m[E+1]-m[E]);if(E===0)return N*(2-N);let S=1-Math.pow(r,E);return S+(1-S)*(2*N-1)*(2*N-1)}return 1}}function Tn({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1}var ee={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Sn(),elastic:Tn()};function _t(e,t,n){return Math.min(n,Math.max(t,e))}function de(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function Bt(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function Wt(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 U(e,t,n,r){return n===t?0:_t((e-t)/(n-t)*r,0,1)}function Le(e,t,n,r,o){let i=Bt(e.top,e.height,t,r.element)-Wt(r.viewport,n),a=Bt(e.top,e.height,t,o.element)-Wt(o.viewport,n);return {tStart:i,tEnd:a}}function lt(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function ct(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function qt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function ut(e,t,n){let r=qt(e),o=qt(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Gt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ge(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var xn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Mn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",jt=33;function Ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function An(e){let t=[];for(let n=0;n<jt;n++){let r=n/(jt-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function mt(e){switch(e){case "linear":return "linear";case "ease-in":return xn;case "ease-out":return Mn;case "ease-in-out":return Ln()?An(ee["ease-in-out"]):null;default:return null}}var Qt=Symbol.for("svg-scroll-draw.registry");function Ut(){let e=globalThis;return e[Qt]||(e[Qt]=new Map)}function Ce(e,t){Ut().set(e,t);}function Pe(e){Ut().delete(e);}var Ze,ft=new Set,pt=new WeakMap,Je=new Map,Yt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Cn(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function ke(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Ze??(Ze=new ResizeObserver(o=>{let i=false;for(let{target:a}of o)pt.get(a)!==Yt(a)&&(i=true),pt.set(a,"");i&&ft.forEach(a=>a());})),ft.add(n);let r=Cn(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{pt.has(o)||pt.set(o,Yt(o)),Je.set(o,(Je.get(o)??0)+1),Ze.observe(o);}),()=>{ft.delete(n)&&(r.forEach(o=>{let i=(Je.get(o)??1)-1;if(i)return void Je.set(o,i);Je.delete(o),Ze?.unobserve(o);}),ft.size||(Ze?.disconnect(),Ze=void 0));}}function dt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function We(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=dt(i=>{if(!i)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(n))o[i]=(...a)=>n[i]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var Pn=0;function On(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Xt(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Kt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Rn(e){if(!Qe)return;let t=Xt(e,"stroke");if(!t||t==="none"){ge("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Kt.has(n)&&!Kt.has(Xt(e,"fill"))&&ge("Element has a fill \u2014 it may obscure the stroke animation.",e);}function kn(e,t,n){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let i=n==="x"?window.scrollX:window.scrollY,a=e-i,m=t-i,p=n==="x";r.innerHTML=`
2
+ <div style="position:absolute;${p?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${p?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function $n(e,t,n){if(!Qe)return;let r=(e.match(Jt)??[]).join("").toUpperCase(),o=(t.match(Jt)??[]).join("").toUpperCase(),i=(e.match(Zt)??[]).length,a=(t.match(Zt)??[]).length;if(r!==o){ge(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}i!==a&&ge(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function In(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=r[o++]??a;return String(+(a+(m-a)*n).toFixed(4))})}function Tt(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:We(t,(n,r)=>Fn(e,n,r))}function Fn(e,t,n){let{preset:r,...o}=t,i=r?{...Gt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:p=false,easing:y="linear",trigger:E={},stagger:N=0,direction:S="forward",once:Y=false,debug:te=false,axis:L="y",scrollContainer:ne,autoReverse:we=false,delay:P=0,strokeColor:$,strokeWidth:O,fillOpacity:A,waypoints:b,velocityScale:h=false,threshold:v=0,rootMargin:G="0px",repeat:_=0,repeatDelay:W=0,morphTo:H,clip:I,autoplay:re=false,duration:Te=1e3,native:ce=true,onProgress:D,onStart:R,onComplete:k,onEnter:u,onLeave:d,onEnterBack:X,onLeaveBack:xe}=i,V=I===true?"left":typeof I=="string"?I:false,K=typeof y=="function"?y:ee[y]??ee.linear,Oe=de(E.start||"top bottom"),x=de(E.end||"bottom top"),T=typeof ne=="string"?document.querySelector(ne):ne??null,ue=Array.isArray($)?$[0]:null,me=Array.isArray($)?$[1]:typeof $=="string"?$:null,Re=Array.isArray(O)?O[0]:null,Fe=Array.isArray(O)?O[1]:typeof O=="number"?O:null,Me=Array.isArray(A)?A[0]:null,Ve=Array.isArray(A)?A[1]:typeof A=="number"?A:null;function Ne(s){let l=s*100;switch(V){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 F=V?[]:Array.from(e.querySelectorAll(a)),ye=[],ve=[],oe=0,Z=0,qe=N,rt=0,j=false,c=false,f=0,Ae=false,fe=-1,J=[],Q=-1,w=false,se=0,he=0,ze,yt=null;function Ot(){yt?.destroy(),yt=null;}let _e=new Set,Rt=NaN,Be=true,ot=-1,kt=performance.now(),Ge=NaN;function Ue(){return T?L==="x"?T.scrollLeft:T.scrollTop:L==="x"?window.scrollX:window.scrollY}function $t(){return T?L==="x"?T.clientWidth:T.clientHeight:L==="x"?window.innerWidth:window.innerHeight}function It(){let s=lt(e,T,L);return Le(s,s.scroll,$t(),Oe,x)}function gn(){let s=Z-oe,l=F.length-1,g=T??document.documentElement,C=L==="x"?"Width":"Height";if(qe=N,N>0&&l>0&&s>0){let pe=g[`scroll${C}`]-g[`client${C}`]-1-oe-s/m;pe>=0&&(qe=Math.min(N,pe/(l*s)));}rt=Z+l*qe*s;}function Ft(){(({tStart:oe,tEnd:Z}=It())),gn(),te&&Qe&&(Ot(),yt=kn(oe,Z,L));}function ht(s,l=It){Ce(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),Pe(e);},s}function Nt(s,l){return Y&&!we?Math.max(fe,K(J[s]=Math.max(J[s]??0,l))):K(l)}function yn(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),V){let g=l==="reverse"?1-s:s;e.style.clipPath=Ne(g);return}F.forEach((g,C)=>bt(g,C,s,l));}function bt(s,l,g,C){s.style.strokeDashoffset=C==="reverse"?`${ye[l]*g}`:`${ye[l]*(1-g)}`,p&&(s.style.opacity=C==="reverse"?`${1-g}`:`${g}`),ue&&me?s.style.stroke=ut(ue,me,g):me&&(s.style.stroke=me),Re!==null&&Fe!==null?s.style.strokeWidth=`${Re+(Fe-Re)*g}`:Fe!==null&&(s.style.strokeWidth=`${Fe}`),Me!==null&&Ve!==null?s.style.fillOpacity=`${Me+(Ve-Me)*g}`:Ve!==null&&(s.style.fillOpacity=`${Ve}`),H&&s.tagName.toLowerCase()==="path"&&ve[l]&&s.setAttribute("d",In(ve[l],H,g));}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),V){e.style.clipPath=Ne(S==="reverse"?1:0);return}F.forEach((s,l)=>{s.style.strokeDasharray=`${ye[l]}`,s.style.strokeDashoffset=S==="reverse"?"0":`${ye[l]}`,p?s.style.opacity=S==="reverse"?"1":"0":s.style.opacity="",ue&&(s.style.stroke=ue),Re!==null&&(s.style.strokeWidth=`${Re}`),Me!==null&&(s.style.fillOpacity=`${Me}`),H&&s.tagName.toLowerCase()==="path"&&ve[l]&&s.setAttribute("d",ve[l]);});}function Xe(s,l){let g=s.getAttribute("d"),C=ct(s);if(H&&ve[l]){s.setAttribute("d",H);let pe=ct(s);s.setAttribute("d",ve[l]),C=Math.max(ct(s),pe),s.setAttribute("d",g);}ye[l]=C,s.style.strokeDasharray=`${C}`;}if(F.forEach((s,l)=>{Rn(s);let g=s.tagName.toLowerCase()==="path";g?ve.push(s.getAttribute("d")??""):ve.push(""),Xe(s,l);let C=ye[l];H&&(g?$n(ve[ve.length-1],H,s):ge(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),n?(s.style.strokeDashoffset=S==="reverse"?`${C}`:"0",p&&(s.style.opacity="1"),me&&(s.style.stroke=me),Fe!==null&&(s.style.strokeWidth=`${Fe}`),Ve!==null&&(s.style.fillOpacity=`${Ve}`),H&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",H)):(s.style.strokeDashoffset=S==="reverse"?"0":`${C}`,p?s.style.opacity=S==="reverse"?"1":"0":s.style.opacity="",ue&&(s.style.stroke=ue),Re!==null&&(s.style.strokeWidth=`${Re}`),Me!==null&&(s.style.fillOpacity=`${Me}`));}),n)return V&&(e.style.clipPath=Ne(1)),k?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};V&&(e.style.clipPath=Ne(S==="reverse"?1:0));let Dt=typeof y=="string"?mt(y):null;function hn(){return !(ce===false||re||te&&Qe||!On()||!F.length||!Dt||V||L!=="y"||T||m!==1||N!==0||Y||we||h!==false||H||b||_||P>0||D||R||k||u||d||X||xe||$!=null||O!=null||A!=null||(E.start||"top bottom").trim()!=="top bottom"||(E.end||"bottom top").trim()!=="bottom top")}function bn(){let s=++Pn,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,C=`--svg-scroll-draw-${s}`,pe=S==="reverse"?"0":"var(--ssd-len)",De=S==="reverse"?"var(--ssd-len)":"0",Ee=`stroke-dashoffset:${pe};`,B=`stroke-dashoffset:${De};`;p&&(Ee+=`opacity:${S==="reverse"?1:0};`,B+=`opacity:${S==="reverse"?0:1};`);let q=document.createElement("style");q.setAttribute("data-svg-scroll-draw",""),q.textContent=`@keyframes ${l}{from{${Ee}}to{${B}}}.${g}{view-timeline-name:${C};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Dt};animation-fill-mode:both;animation-timeline:${C};animation-range:cover 0% cover 100%;}`,document.head.appendChild(q),e.classList.add(g);function ie(M,z){M.style.setProperty("--ssd-len",String(ye[z])),M.style.strokeDasharray=`${ye[z]}`,M.style.strokeDashoffset="",M.style.opacity="",M.style.animationPlayState="",M.classList.add(l);}F.forEach(ie);let ae=false,be=-1;function Se(){if(be>=0)return be;let M=e.getBoundingClientRect(),{tStart:z,tEnd:le}=Le({top:M.top,height:M.height},Ue(),$t(),Oe,x);return K(U(Ue(),z,le,m))}return {destroy(){e.classList.remove(g),F.forEach(M=>{M.classList.remove(l),M.style.removeProperty("--ssd-len"),M.style.animationPlayState="";}),q.remove();},replay(){ae=false,be=-1,F.forEach(ie);},pause(){ae=true,F.forEach(M=>{M.style.animationPlayState="paused";});},resume(){ae&&(ae=false,F.forEach(M=>{M.style.animationPlayState="running";}));},seek(M){let z=Math.min(1,Math.max(0,M));be=z,ae=true,F.forEach((le,He)=>{le.classList.remove(l),le.style.strokeDashoffset=S==="reverse"?`${ye[He]*z}`:`${ye[He]*(1-z)}`,p&&(le.style.opacity=S==="reverse"?`${1-z}`:`${z}`);});},getProgress(){return Se()},refresh(){F.forEach((M,z)=>{Xe(M,z),M.style.setProperty("--ssd-len",String(ye[z]));});}}}if(hn())return ht(bn());function wn(){let s=Math.max(1,Te),l=V?s:s*(1+Math.max(0,F.length-1)*N),g=0,C=0,pe=false;function De(be){let Se=true,M=Math.min(1,Math.max(0,be/l));if(V){let z=Math.min(1,Math.max(0,be/s)),le=K(z);se=le,e.style.setProperty("--scroll-draw-progress",String(le)),e.style.clipPath=Ne(S==="reverse"?1-le:le),D?.(le),z<1&&(Se=false);}else {F.forEach((le,He)=>{let En=He*N*s,zt=Math.min(1,Math.max(0,(be-En)/s));bt(le,He,K(zt),S),zt<1&&(Se=false);});let z=K(M);se=z,D?.(z),e.style.setProperty("--scroll-draw-progress",String(z));}if(b){let z=K(M);for(let le in b){let He=parseFloat(le);z>=He&&!_e.has(He)&&(_e.add(He),b[le]?.());}}return Se}function Ee(be){if(w)return;let Se=be-g;c||(c=true,R?.());let M=De(Se);if(M&&!j){j=true,De(l),k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{g=performance.now(),c=false,j=false,_e.clear(),Ye(),f=requestAnimationFrame(Ee);},W));return}M||(f=requestAnimationFrame(Ee));}function B(){cancelAnimationFrame(f),clearTimeout(ze),g=performance.now(),C=0,w=false,c=false,j=false,he=0,pe=true,se=0,_e.clear(),Ye(),f=requestAnimationFrame(Ee);}let q=new IntersectionObserver(be=>{be.forEach(Se=>{Se.isIntersecting&&!(Y&&j)?B():!Se.isIntersecting&&!Y&&!j&&(cancelAnimationFrame(f),clearTimeout(ze),pe=false);});},{root:T??null,threshold:v,rootMargin:G}),ie;function ae(){clearTimeout(ie),ie=setTimeout(()=>F.forEach(Xe),150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),P>0?setTimeout(()=>q.observe(e),P):q.observe(e),{destroy(){cancelAnimationFrame(f),clearTimeout(ze),q.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ie);},replay(){he=0,B();},pause(){w||!pe||(w=true,C=performance.now()-g,cancelAnimationFrame(f));},resume(){w&&(w=false,pe=true,g=performance.now()-C,f=requestAnimationFrame(Ee));},seek(be){let Se=Math.min(1,Math.max(0,be));se=Se,w=true,C=Se*l,g=performance.now()-C,cancelAnimationFrame(f),De(C);},getProgress(){return se},refresh(){clearTimeout(ie),F.forEach(Xe);}}}if(re)return ht(wn());Ft();function Ht(){if(w||!je)return;let s=performance.now(),l=Ue();if(!Be&&h===false&&l===Rt){vt(l);return}Be=false,Rt=l;let g=m;if(h!==false){let B=s-kt,q=B>0?Math.abs(l-(ot<0?l:ot))/B:0;g=m*Math.max(.2,1+q*(typeof h=="number"?h:1)*.04);}ot=l,kt=s;let C=we?Q===-1||l>=Q?"forward":"reverse":S;Q=l;let pe=Z-oe,De=true,Ee=pe===0?0:(l-oe)/pe;if(isNaN(Ge)||(Ge<=0&&Ee>0?u?.():Ge>0&&Ee<=0&&xe?.(),Ge<1&&Ee>=1?d?.():Ge>=1&&Ee<1&&X?.()),Ge=Ee,V){let B=Nt(0,U(l,oe,Z,g));se=B,e.style.setProperty("--scroll-draw-progress",String(B));let q=C==="reverse"?1-B:B;e.style.clipPath=Ne(q),D?.(B),!c&&U(l,oe,Z,g)>0&&(c=true,R?.()),B>=1&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{fe=-1,J=[],c=false,j=false,Ye();},W))):B<1&&!Y&&(j=false),vt(l);return}if(F.forEach((B,q)=>{let ie=q*qe*pe,ae=Nt(q,U(l,oe+ie,Z+ie,g));bt(B,q,ae,C),q===0&&(se=ae,D?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),ae<1&&(De=false);}),b){let B=K(U(l,oe,Z,g));for(let q in b){let ie=parseFloat(q);B>=ie&&!_e.has(ie)&&(_e.add(ie),b[q]?.());}}!c&&U(l,oe,Z,g)>0&&(c=true,R?.()),De&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{fe=-1,J=[],c=false,j=false,_e.clear(),Ye(),Be=true;},W))):!De&&!Y&&(j=false),vt(l);}function wt(s){return s>=Z&&s<rt}function vt(s){Ae||wt(s)?f=requestAnimationFrame(Ht):je=false;}function Et(){return Ae||wt(Ue())}let je=false;function st(){je||(je=true,f=requestAnimationFrame(function(){Ht();}));}function it(){je=false,cancelAnimationFrame(f);}let St=new IntersectionObserver(s=>{s.forEach(l=>{Ae=l.isIntersecting,Ae&&!w?(Be=true,st()):je&&!w&&wt(Ue())||it();});},{root:T??null,threshold:v,rootMargin:G});function Vt(){F.forEach(Xe),Ft(),Be=true;}let at;function Ke(){clearTimeout(at),at=setTimeout(Vt,150);}window.addEventListener("resize",Ke),window.addEventListener("orientationchange",Ke);let vn=ke([e],Ke);return P>0?setTimeout(()=>St.observe(e),P):St.observe(e),ht({destroy(){cancelAnimationFrame(f),clearTimeout(ze),it(),St.disconnect(),vn(),window.removeEventListener("resize",Ke),window.removeEventListener("orientationchange",Ke),clearTimeout(at),Ot();},replay(){fe=-1,J=[],Q=-1,ot=-1,c=false,j=false,he=0,w=false,se=0,_e.clear(),clearTimeout(ze),Ye(),Be=true,Et()&&st();},pause(){w=true,it();},resume(){w&&(w=false,Be=true,Et()&&st());},seek(s){let l=Math.min(1,Math.max(0,s));se=l,fe=l,J=[],w=true,it(),yn(l,S),Be=true;},getProgress(){return se},refresh(){clearTimeout(at),Vt(),Et()&&!w&&st();}},()=>({tStart:oe,tEnd:Z}))}var en=new WeakMap,Nn=0;function tn(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=en.get(n);return r===void 0&&en.set(n,r=++Nn),`el#${r}`}return n})}function nn(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...o)=>t()[r]?.(...o));return n}function Dn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function rn(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],i=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let p=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(p?parseFloat(p[1]):0),i.push(p?p[2]:"");}t.push({fn:r[1],nums:o,units:i});}return t}function Hn(e,t,n){let r=rn(e),o=rn(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((i,a)=>{let m=o[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((p,y)=>`${p}${i.units[y]}`).join(", ")})`:`${m.fn}(${m.nums.map((p,y)=>`${p}${m.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((p,y)=>`${p+(m.nums[y]-p)*n}${i.units[y]}`).join(", ")})`}).join(" ")}function on(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Dn(r))return ut(r,o,n);if(r.includes("("))return Hn(r,o,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),p=parseFloat(a[1]);return `${m+(p-m)*n}${i[2]||a[2]}`}return n<1?r:o}function Vn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var zn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),_n=0,sn="--scroll-draw-progress";function Bn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,t){return typeof window>"u"?ln:t.respectReducedMotion===false?an(e,t,false):We(t,(n,r)=>an(e,n,r))}function an(e,t,n){let{props:r,trigger:o={},easing:i="ease-out",speed:a=1,once:m=false,axis:p="y",scrollContainer:y,native:E=true,velocityScale:N=false,triggerElement:S,onProgress:Y,onComplete:te,onEnter:L,onLeave:ne,onEnterBack:we,onLeaveBack:P}=t,$=typeof i=="function"?i:ee[i]??ee["ease-out"],O=de(o.start||"top bottom"),A=de(o.end||"bottom top"),b=S??e,h=typeof y=="string"?document.querySelector(y):y??null,v=Object.entries(r).map(([c,f])=>({prop:Vn(c),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function G(){let c=window.getComputedStyle(e);for(let f of v)f.from===""&&(f.from=c.getPropertyValue(f.prop).trim()||"0");}function _(){for(let c of v)e.style.setProperty(c.prop,String(c.to));}let W=new Map;for(let c of [...v.map(f=>f.prop),sn])W.set(c,e.style.getPropertyValue(c));function H(){for(let[c,f]of W)f?e.style.setProperty(c,f):e.style.removeProperty(c);}if(n)return _(),te?.(),{...ln,destroy:H,getProgress:()=>1};G();let I=()=>h?p==="x"?h.scrollLeft:h.scrollTop:p==="x"?window.scrollX:window.scrollY,re=()=>h?p==="x"?h.clientWidth:h.clientHeight:p==="x"?window.innerWidth:window.innerHeight,Te=typeof i=="string"?mt(i):null;function ce(){if(!E||!Bn()||!Te||p!=="y"||h||b!==e||m||a!==1||Y||te||L||ne||we||P||N!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let c of v)if(!zn.has(c.prop))return false;return true}function D(){let c=`ssd-a-${++_n}`,f=v.map(w=>`${w.prop}:${w.from}`).join(";"),Ae=v.map(w=>`${w.prop}:${w.to}`).join(";"),fe=document.createElement("style");fe.setAttribute("data-ssd-animate",""),fe.textContent=`@keyframes ${c}{from{${f}}to{${Ae}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Te};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(fe),e.classList.add(c);let J=()=>{let w=e.getBoundingClientRect();return Le({top:w.top,height:w.height},I(),re(),O,A)};Ce(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:J});let Q={refresh(){},destroy(){e.classList.remove(c),fe.remove(),e.style.animationPlayState="",H(),Pe(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(w){let se=Math.min(1,Math.max(0,w));e.classList.remove(c);for(let he of v)e.style.setProperty(he.prop,on(he.from,he.to,se));},getProgress(){let{tStart:w,tEnd:se}=J();return $(U(I(),w,se,a))}};return Q}if(ce())return D();let R=0,k=0,u=0,d=NaN,X=false,xe=-1,V=0,K=0,Oe=false,x=NaN,T=-1,ue=0,me=b===e?v:[],Re=false;function Fe(){let c=e.style,f=me.map(Q=>c.getPropertyValue(Q.prop)),Ae=c.transition;me.length&&(c.transition="none"),me.forEach(Q=>c.setProperty(Q.prop,W.get(Q.prop)??""));let fe=lt(b,h,p);me.forEach((Q,w)=>c.setProperty(Q.prop,f[w])),me.length&&(e.offsetWidth,c.transition=Ae);let J=Le(fe,fe.scroll,re(),O,A);Re&&Math.abs(J.tStart-R)<1&&Math.abs(J.tEnd-k)<1||(Re=true,R=J.tStart,k=J.tEnd);}function Me(c){e.style.setProperty(sn,String(c));for(let f of v)e.style.setProperty(f.prop,on(f.from,f.to,c));Y?.(c);}function Ve(c){if(isNaN(x)){x=c;return}x<=0&&c>0?L?.():x>0&&c<=0&&P?.(),x<1&&c>=1?ne?.():x>=1&&c<1&&we?.(),x=c;}let Ne=c=>U(c,R,k,Math.min(a,1));function F(){!u&&!X&&Ne(I())!==d&&(u=requestAnimationFrame(ye));}function ye(){if(X)return;let c=performance.now(),f=I(),Ae=a;if(N!==false){let w=c-ue,se=w>0?Math.abs(f-(T<0?f:T))/w:0;Ae=a*Math.max(.2,1+se*(typeof N=="number"?N:1)*.04);}T=f,ue=c;let fe=k===R?0:(f-R)/(k-R);Ve(fe);let J=U(f,R,k,Ae),Q=m?Math.max(xe,$(V=Math.max(V,J))):$(J);K=Q,Me(Q),Q>=1&&!Oe?(Oe=true,te?.()):Q<1&&!m&&(Oe=false),!X&&(d=Ne(f),u=d>0&&d<1?requestAnimationFrame(ye):0);}Fe(),k===R&&ge("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),V=U(I(),R,k,a),K=$(V),Me(K);function ve(){Fe(),F();}let oe;function Z(){clearTimeout(oe),oe=setTimeout(ve,150);}let qe=h??window;qe.addEventListener("scroll",F,{passive:true}),window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z);let rt=ke([b],Z);F(),Ce(e,{type:"animate",getProgress:()=>K,getTrigger:()=>({tStart:R,tEnd:k})});function j(){X=true,cancelAnimationFrame(u),u=0,d=NaN;}return {destroy(){j(),qe.removeEventListener("scroll",F),window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),rt(),clearTimeout(oe),H(),Pe(e);},replay(){xe=-1,V=0,Oe=false,K=0,X=false,Me(0),d=0,F();},pause:j,resume(){X&&(X=false,F());},seek(c){let f=Math.min(1,Math.max(0,c));K=f,xe=f,V=0,j(),Me(f);},getProgress(){return K},refresh:ve}}var Mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Lt(e,t){if(typeof window>"u")return Mt;let n=typeof e=="string"?document.querySelector(e):e;return n?We(t,(r,o)=>Wn(n,r,o)):(ge("scrollCounter: element not found:",e),Mt)}function Wn(e,t,n){let{from:r=0,to:o,format:i,easing:a="ease-out",trigger:m={},once:p=true,decimals:y,onComplete:E}=t,N=y!==void 0?u=>u.toFixed(y):i??(u=>String(Math.round(u))),S=typeof a=="function"?a:ee[a]??ee["ease-out"],Y=de(m.start||"top 80%"),te=de(m.end||"top 20%");if(n)return e.textContent=N(o),E?.(),{...Mt,getProgress:()=>1};let L=0,ne=0,we=false,P=0,$=false,O=false,A=-1,b=0,h=0,v=false,G=()=>window.scrollY,_=()=>window.innerHeight;function W(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},G(),_(),Y,te);we&&Math.abs(d.tStart-L)<1&&Math.abs(d.tEnd-ne)<1||(we=true,L=d.tStart,ne=d.tEnd);}let H=e.style.getPropertyValue("--scroll-draw-progress");function I(u){e.textContent=N(r+(o-r)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function re(){if(!$||O)return;let u=U(G(),L,ne,1),d=p?Math.max(A,S(b=Math.max(b,u))):S(u);h=d,I(d),d>=1&&!v?(v=true,E?.()):d<1&&!p&&(v=false),P=requestAnimationFrame(re);}W();{b=U(G(),L,ne,1);let u=S(b);h=u,I(u);}let Te=new IntersectionObserver(u=>{u.forEach(d=>{$=d.isIntersecting,$&&!O?P=requestAnimationFrame(re):cancelAnimationFrame(P);});}),ce;function D(){clearTimeout(ce),ce=setTimeout(W,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let R=ke([e],D);Te.observe(e),Ce(e,{type:"counter",getProgress:()=>h,getTrigger:()=>({tStart:L,tEnd:ne})});function k(){O&&(O=false,$&&(P=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(P),Te.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),R(),clearTimeout(ce),e.style.setProperty("--scroll-draw-progress",H),Pe(e);},replay(){A=-1,b=0,v=false,h=0,I(0),k();},pause(){O=true,cancelAnimationFrame(P);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));h=d,A=d,b=0,O=true,cancelAnimationFrame(P),I(d);},getProgress(){return h}}}var cn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function At(e,t={}){if(typeof window>"u")return cn;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ge("scrollVideo: <video> element not found:",e),cn;let r=n,{trigger:o={},easing:i="linear",once:a=false,axis:m="y",preload:p="auto",triggerElement:y,onReady:E,onComplete:N,onProgress:S}=t,Y=y??r,te=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof i=="function"?i:ee[i]??ee.linear,ne=de(o.start||"top top"),we=de(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=p);let P=t.from??0,$=t.to,O=0,A=0,b=0,h=false,v=false,G=-1,_=0,W=0,H=false,I=false,re=()=>m==="x"?window.scrollX:window.scrollY,Te=()=>m==="x"?window.innerWidth:window.innerHeight;function ce(){let x=Y.getBoundingClientRect(),T=m==="x"?x.left:x.top,ue=m==="x"?x.width:x.height,me=Le({top:T,height:ue},re(),Te(),ne,we);O=me.tStart,A=me.tEnd,I&&A===O&&ge("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let D=NaN;function R(x){if(!I)return;let T=$??r.duration??0,ue=P+(T-P)*x;ue!==D&&(D=ue,r.currentTime=ue),r.style.setProperty("--scroll-draw-progress",String(x)),S?.(x);}function k(){if(!h||v||!I||te)return;let x=U(re(),O,A,1),T=a?Math.max(G,L(_=Math.max(_,x))):L(x);W=T,R(T),T>=1&&!H?(H=true,N?.()):T<1&&!a&&(H=false),b=requestAnimationFrame(k);}function u(){if(I=true,$===void 0&&($=r.duration),te){R(1),E?.();return}ce(),E?.(),v?R(W):h&&(b=requestAnimationFrame(k));}r.readyState>=1?u():r.addEventListener("loadedmetadata",u,{once:true}),I||ce();let d=te?()=>{}:dt(x=>{x&&(d(),te=true,cancelAnimationFrame(b),R(1));}),X=new IntersectionObserver(x=>{x.forEach(T=>{h=T.isIntersecting,h&&!v&&I?b=requestAnimationFrame(k):cancelAnimationFrame(b);});}),xe;function V(){clearTimeout(xe),xe=setTimeout(ce,150);}window.addEventListener("resize",V),window.addEventListener("orientationchange",V);let K=ke([Y],V);X.observe(r),Ce(r,{type:"video",getProgress:()=>W,getTrigger:()=>({tStart:O,tEnd:A})});function Oe(){v&&(v=false,h&&I&&(b=requestAnimationFrame(k)));}return {destroy(){cancelAnimationFrame(b),X.disconnect(),r.removeEventListener("loadedmetadata",u),window.removeEventListener("resize",V),window.removeEventListener("orientationchange",V),K(),d(),clearTimeout(xe),Pe(r);},replay(){G=-1,_=0,H=false,W=0,D=NaN,R(0),Oe();},pause(){v=true,cancelAnimationFrame(b);},resume:Oe,seek(x){let T=Math.min(1,Math.max(0,x));W=T,G=T,_=0,v=true,cancelAnimationFrame(b),D=NaN,R(T);},getProgress(){return W}}}function un(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function gt(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function fn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(gt(n)),o=/^\s+$/.test(n);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(n=>n!==null)}function qn(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let o of t){let i=gt(o),a=o===" ";a?i.style.whiteSpace="pre":(i.style.display="inline-block",n.push(i)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(gt()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(i);}return n}function mn(e){let t=fn(e),n=new Map;for(let i of t){let a=i.offsetTop;n.has(a)||n.set(a,[]),n.get(a).push(i);}let r=[],o=Array.from(n.keys()).sort((i,a)=>i-a);for(let i of o){let a=n.get(i),m=gt();m.style.display="inline-block",a.forEach((p,y)=>{let E=p.nextElementSibling;m.appendChild(p),y<a.length-1&&E&&E.style.whiteSpace==="pre"&&m.appendChild(E);}),r.push(m);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Gn(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let o=(n-1)*r,i=t*r,a=i+(1-o);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function jn(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var Ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,t={}){if(typeof window>"u")return Ct;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ge("scrollText: element not found:",e),Ct;let r=n;return We(t,(o,i)=>Qn(r,o,i))}function Qn(e,t,n){let{split:r="words",stagger:o=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:p=true,onComplete:y}=t,E=typeof i=="function"?i:ee[i]??ee["ease-out"],N=de(m.start||"top 85%"),S=de(m.end||"top 40%"),Y=e.innerHTML,te=e.textContent??"",L;r==="chars"?L=qn(e):r==="lines"?L=mn(e):L=fn(e),un(e,te);let ne=L.length;function we(u,d){a?.opacity!==void 0&&(u.style.opacity=String(a.opacity+(1-a.opacity)*d));let X=jn(d,a);X&&(u.style.transform=X);}function P(u){e.style.setProperty("--scroll-draw-progress",String(u)),L.forEach((d,X)=>{let xe=E(Gn(u,X,ne,o));we(d,xe);});}if(n)return P(1),y?.(),{...Ct,destroy:()=>{e.innerHTML=Y;},getProgress:()=>1};P(0);let $=0,O=0,A=0,b=false,h=false,v=-1,G=0,_=false,W=()=>window.scrollY,H=()=>window.innerHeight;function I(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},W(),H(),N,S);$=d.tStart,O=d.tEnd;}function re(){if(!b||h)return;let u=U(W(),$,O,1);p&&(v=Math.max(v,u),u=v),G=u,P(u),u>=1&&!_?(_=true,y?.()):u<1&&!p&&(_=false),A=requestAnimationFrame(re);}I();let Te=new IntersectionObserver(u=>{u.forEach(d=>{b=d.isIntersecting,b&&!h?A=requestAnimationFrame(re):cancelAnimationFrame(A);});}),ce;function D(){clearTimeout(ce),ce=setTimeout(()=>{if(r==="lines"){let u=G;e.innerHTML=Y,L=mn(e),un(e,te),P(u);}I();},150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let R=ke([e],D);Te.observe(e),Ce(e,{type:"text",getProgress:()=>G,getTrigger:()=>({tStart:$,tEnd:O})});function k(){h&&(h=false,b&&(A=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(A),Te.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),R(),clearTimeout(ce),e.innerHTML=Y,Pe(e);},replay(){v=-1,_=false,G=0,P(0),k();},pause(){h=true,cancelAnimationFrame(A);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));G=d,v=d,h=true,cancelAnimationFrame(A),P(d);},getProgress(){return G}}}var nt=e=>typeof e=="function"?e():vue.unref(e);function Ie(e,t,n){let r=null,o=t(),i=()=>{r?.destroy(),r=e.value?n(e.value,nn(o,()=>o)):null;};vue.onMounted(i),vue.watch(()=>tn(o=t()),i),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function fo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),Tt),t}var pn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Zn=[null,Boolean,[Boolean,String],[Boolean,Number]],dn=e=>({type:e,default:void 0}),po=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(pn).map(([e,t])=>[e,t?dn(Zn[t]):null])),setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>{let r={};for(let o in pn){let i=e[o];i!=null&&(r[o]=i);}return r},Tt),()=>vue.h("div",{ref:n},t.default?.())}});function go(e){let t=vue.ref(null);return Ie(t,()=>nt(e),xt),t}var yo=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>e.options,xt),()=>vue.h("div",{ref:n},t.default?.())}});function ho(e){let t=vue.ref(null);return Ie(t,()=>nt(e),Lt),t}var bo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:dn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=vue.ref(null);return Ie(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},Lt),()=>vue.h("span",{ref:t})}});function wo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),At),t}var vo=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=vue.ref(null);return Ie(t,()=>e.options??{},At),()=>vue.h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function Eo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),Pt),t}var So=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>e.options??{},Pt),()=>vue.h(e.tag,{ref:n},t.default?.())}});exports.ScrollAnimate=yo;exports.ScrollCounter=bo;exports.ScrollDraw=po;exports.ScrollText=So;exports.ScrollVideo=vo;exports.useScrollAnimate=go;exports.useScrollCounter=ho;exports.useScrollDraw=fo;exports.useScrollText=Eo;exports.useScrollVideo=wo;
@@ -1 +1 @@
1
- export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-4I7MLTP5.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-GMBIGV3M.mjs';import'../chunk-4H2SGMAQ.mjs';import'../chunk-LGJQWZHH.mjs';import'../chunk-V4L3ELVC.mjs';import'../chunk-23EALNDF.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-ZNCZYV3Q.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-QFSTKVA3.mjs';import'../chunk-NLPSVYFP.mjs';import'../chunk-I73SOXBN.mjs';import'../chunk-OPXWNJBG.mjs';import'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';function jt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,r)),i=Math.sqrt(o),a=0,u=[];for(let m=0;m<n;m++){let v=Math.pow(i,m);u.push(v),a+=v;}let b=[0],L=0;for(let m=0;m<n;m++)L+=u[m]/a,b.push(L);return m=>{if(m<=0)return 0;if(m>=1)return 1;for(let v=0;v<n;v++)if(m<=b[v+1]){let $=(m-b[v])/(b[v+1]-b[v]);if(v===0)return $*(2-$);let p=1-Math.pow(o,v);return p+(1-p)*(2*$-1)*(2*$-1)}return 1}}function Xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),o=Math.max(.1,r),i=n<=1?o/4:o/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/o)+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:jt(),elastic:Xt()};function yt(e,r,n){return Math.min(n,Math.max(r,e))}function Ue(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",o="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:o}}function bt(e,r,n,o){switch(o){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function vt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function re(e,r,n,o){return n===r?0:yt((e-r)/(n-r)*o,0,1)}function je(e,r,n,o,i){let a=bt(e.top,e.height,r,o.element)-vt(o.viewport,n),u=bt(e.top,e.height,r,i.element)-vt(i.viewport,n);return {tStart:a,tEnd:u}}function wt(e,r,n){let o=e.getBoundingClientRect(),i=n==="x"?o.width:o.height;return r?{top:n==="x"?o.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:o.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:i,scroll:0}:{top:n==="x"?o.left:o.top,height:i,scroll:n==="x"?window.scrollX:window.scrollY}}function me(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(n+o)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Et(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let o=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return o?[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]:null}function St(e,r,n){let o=Et(e),i=Et(r);return !o||!i?e:`rgb(${Math.round(o[0]+(i[0]-o[0])*n)},${Math.round(o[1]+(i[1]-o[1])*n)},${Math.round(o[2]+(i[2]-o[2])*n)})`}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 xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function de(e,...r){xe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Yt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Jt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Mt=33;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Zt(e){let r=[];for(let n=0;n<Mt;n++){let o=n/(Mt-1);r.push(String(Math.round(e(o)*1e5)/1e5));}return `linear(${r.join(",")})`}function Tt(e){switch(e){case "linear":return "linear";case "ease-in":return Yt;case "ease-out":return Jt;case "ease-in-out":return Kt()?Zt(Se["ease-in-out"]):null;default:return null}}var At=Symbol.for("svg-scroll-draw.registry");function Lt(){let e=globalThis;return e[At]||(e[At]=new Map)}function kt(e,r){Lt().set(e,r);}function $t(e){Lt().delete(e);}var Me,Oe=new Set,Ie=new WeakMap,Te=new Map,Pt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function er(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let o=n;o;o=o.previousElementSibling)r.add(o);return r}function Dt(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Me??(Me=new ResizeObserver(i=>{let a=false;for(let{target:u}of i)Ie.get(u)!==Pt(u)&&(a=true),Ie.set(u,"");a&&Oe.forEach(u=>u());})),Oe.add(n);let o=er(e);return [document.body,document.documentElement].forEach(i=>i&&o.add(i)),o.forEach(i=>{Ie.has(i)||Ie.set(i,Pt(i)),Te.set(i,(Te.get(i)??0)+1),Me.observe(i);}),()=>{Oe.delete(n)&&(o.forEach(i=>{let a=(Te.get(i)??1)-1;if(a)return void Te.set(i,a);Te.delete(i),Me?.unobserve(i);}),Oe.size||(Me?.disconnect(),Me=void 0));}}function Rt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(!!i.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let o=r;return o.addListener?.(n),()=>o.removeListener?.(n)}function Ct(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let n=r(e,false),o=Rt(a=>{if(!a)return;o();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=r(u?{...e,onComplete:void 0}:e,true);}),i={};for(let a of Object.keys(n))i[a]=(...u)=>n[a]?.(...u);return i.destroy=()=>{o(),n.destroy();},i}var tr=0;function rr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ot(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var It=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function nr(e){if(!xe)return;let r=Ot(e,"stroke");if(!r||r==="none"){de("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!It.has(n)&&!It.has(Ot(e,"fill"))&&de("Element has a fill \u2014 it may obscure the stroke animation.",e);}function or(e,r,n){let o=document.createElement("div");o.setAttribute("data-svg-scroll-draw-debug",""),o.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=n==="x"?window.scrollX:window.scrollY,u=e-a,b=r-a,L=n==="x";o.innerHTML=`
2
- <div style="position:absolute;${L?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}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;${L?`left:${b}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${b}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(o),window.addEventListener("scroll",i,{passive:true}),i(),{el:o,destroy(){window.removeEventListener("scroll",i),o.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ft=/[MmLlHhVvCcSsQqTtAaZz]/g;function sr(e,r,n){if(!xe)return;let o=(e.match(Ft)??[]).join("").toUpperCase(),i=(r.match(Ft)??[]).join("").toUpperCase(),a=(e.match(_t)??[]).length,u=(r.match(_t)??[]).length;if(o!==i){de(`morphTo: command sequence differs (${o||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}a!==u&&de(`morphTo: coordinate count differs (${a} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ir(e,r,n){let o=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),b=o[i++]??u;return String(+(u+(b-u)*n).toFixed(4))})}function Nt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Ct(r,(n,o)=>ar(e,n,o))}function ar(e,r,n){let{preset:o,...i}=r,a=o?{...xt[o],...i}:i,{selector:u="path, polyline, line, polygon, rect, circle",speed:b=1,fade:L=false,easing:m="linear",trigger:v={},stagger:$=0,direction:p="forward",once:ne=false,debug:Xe=false,axis:W="y",scrollContainer:_e,autoReverse:Fe=false,delay:pe=0,strokeColor:X,strokeWidth:Y,fillOpacity:J,waypoints:K,velocityScale:ge=false,threshold:Ye=0,rootMargin:Je="0px",repeat:Z=0,repeatDelay:Ne=0,morphTo:G,clip:Ve,autoplay:Ke=false,duration:Vt=1e3,native:zt=true,onProgress:he,onStart:Ae,onComplete:ye,onEnter:Ze,onLeave:et,onEnterBack:tt,onLeaveBack:rt}=a,F=Ve===true?"left":typeof Ve=="string"?Ve:false,q=typeof m=="function"?m:Se[m]??Se.linear,nt=Ue(v.start||"top bottom"),ot=Ue(v.end||"bottom top"),I=typeof _e=="string"?document.querySelector(_e):_e??null,oe=Array.isArray(X)?X[0]:null,se=Array.isArray(X)?X[1]:typeof X=="string"?X:null,ee=Array.isArray(Y)?Y[0]:null,ie=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null,te=Array.isArray(J)?J[0]:null,ae=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function le(t){let s=t*100;switch(F){case "right":return `inset(0 0 0 ${100-s}%)`;case "top":return `inset(0 0 ${100-s}% 0)`;case "bottom":return `inset(${100-s}% 0 0 0)`;case "center":return `circle(${t*150}% at 50% 50%)`;default:return `inset(0 ${100-s}% 0 0)`}}let E=F?[]:Array.from(e.querySelectorAll(u)),S=[],B=[],C=0,O=0,Le=$,st=0,k=false,_=false,P=0,ke=false,be=-1,ue=[],$e=-1,x=false,N=0,V=0,Q,ze=null;function it(){ze?.destroy(),ze=null;}let U=new Set,at=NaN,j=true,Pe=-1,lt=performance.now(),ce=NaN;function ve(){return I?W==="x"?I.scrollLeft:I.scrollTop:W==="x"?window.scrollX:window.scrollY}function ut(){return I?W==="x"?I.clientWidth:I.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function ct(){let t=wt(e,I,W);return je(t,t.scroll,ut(),nt,ot)}function Ht(){let t=O-C,s=E.length-1,l=I??document.documentElement,g=W==="x"?"Width":"Height";if(Le=$,$>0&&s>0&&t>0){let D=l[`scroll${g}`]-l[`client${g}`]-1-C-t/b;D>=0&&(Le=Math.min($,D/(s*t)));}st=O+s*Le*t;}function ft(){(({tStart:C,tEnd:O}=ct())),Ht(),Xe&&xe&&(it(),ze=or(C,O,W));}function He(t,s=ct){kt(e,{type:"draw",getProgress:()=>t.getProgress(),getTrigger:s});let l=t.destroy;return t.destroy=()=>{l.call(t),$t(e);},t}function mt(t,s){return ne&&!Fe?Math.max(be,q(ue[t]=Math.max(ue[t]??0,s))):q(s)}function Wt(t,s){if(e.style.setProperty("--scroll-draw-progress",String(t)),F){let l=s==="reverse"?1-t:t;e.style.clipPath=le(l);return}E.forEach((l,g)=>We(l,g,t,s));}function We(t,s,l,g){t.style.strokeDashoffset=g==="reverse"?`${S[s]*l}`:`${S[s]*(1-l)}`,L&&(t.style.opacity=g==="reverse"?`${1-l}`:`${l}`),oe&&se?t.style.stroke=St(oe,se,l):se&&(t.style.stroke=se),ee!==null&&ie!==null?t.style.strokeWidth=`${ee+(ie-ee)*l}`:ie!==null&&(t.style.strokeWidth=`${ie}`),te!==null&&ae!==null?t.style.fillOpacity=`${te+(ae-te)*l}`:ae!==null&&(t.style.fillOpacity=`${ae}`),G&&t.tagName.toLowerCase()==="path"&&B[s]&&t.setAttribute("d",ir(B[s],G,l));}function we(){if(e.style.setProperty("--scroll-draw-progress","0"),F){e.style.clipPath=le(p==="reverse"?1:0);return}E.forEach((t,s)=>{t.style.strokeDasharray=`${S[s]}`,t.style.strokeDashoffset=p==="reverse"?"0":`${S[s]}`,L?t.style.opacity=p==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`),G&&t.tagName.toLowerCase()==="path"&&B[s]&&t.setAttribute("d",B[s]);});}if(E.forEach(t=>{nr(t);let s=me(t);S.push(s);let l=t.tagName.toLowerCase()==="path";l?B.push(t.getAttribute("d")??""):B.push(""),G&&(l?sr(B[B.length-1],G,t):de(`morphTo only applies to <path> elements \u2014 ignored on <${t.tagName}>.`,t)),n?(t.style.strokeDasharray=`${s}`,t.style.strokeDashoffset=p==="reverse"?`${s}`:"0",L&&(t.style.opacity="1"),se&&(t.style.stroke=se),ie!==null&&(t.style.strokeWidth=`${ie}`),ae!==null&&(t.style.fillOpacity=`${ae}`),G&&t.tagName.toLowerCase()==="path"&&t.setAttribute("d",G)):(t.style.strokeDasharray=`${s}`,t.style.strokeDashoffset=p==="reverse"?"0":`${s}`,L?t.style.opacity=p==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`));}),n)return F&&(e.style.clipPath=le(1)),ye?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F&&(e.style.clipPath=le(p==="reverse"?1:0));let dt=typeof m=="string"?Tt(m):null;function Gt(){return !(zt===false||Ke||Xe||!rr()||!E.length||!dt||F||W!=="y"||I||b!==1||$!==0||ne||Fe||ge!==false||G||K||Z||pe>0||he||Ae||ye||Ze||et||tt||rt||X!=null||Y!=null||J!=null||(v.start||"top bottom").trim()!=="top bottom"||(v.end||"bottom top").trim()!=="bottom top")}function qt(){let t=++tr,s=`svg-scroll-draw-${t}`,l=`svg-scroll-draw-host-${t}`,g=`--svg-scroll-draw-${t}`,D=p==="reverse"?"0":"var(--ssd-len)",z=p==="reverse"?"var(--ssd-len)":"0",R=`stroke-dashoffset:${D};`,d=`stroke-dashoffset:${z};`;L&&(R+=`opacity:${p==="reverse"?1:0};`,d+=`opacity:${p==="reverse"?0:1};`);let h=document.createElement("style");h.setAttribute("data-svg-scroll-draw",""),h.textContent=`@keyframes ${s}{from{${R}}to{${d}}}.${l}{view-timeline-name:${g};view-timeline-axis:block;}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${dt};animation-fill-mode:both;animation-timeline:${g};animation-range:cover 0% cover 100%;}`,document.head.appendChild(h),e.classList.add(l);function M(c,f){c.style.setProperty("--ssd-len",String(S[f])),c.style.strokeDasharray=`${S[f]}`,c.style.strokeDashoffset="",c.style.opacity="",c.style.animationPlayState="",c.classList.add(s);}E.forEach(M);let T=false,y=-1;function w(){if(y>=0)return y;let c=e.getBoundingClientRect(),{tStart:f,tEnd:A}=je({top:c.top,height:c.height},ve(),ut(),nt,ot);return q(re(ve(),f,A,b))}return {destroy(){e.classList.remove(l),E.forEach(c=>{c.classList.remove(s),c.style.removeProperty("--ssd-len"),c.style.animationPlayState="";}),h.remove();},replay(){T=false,y=-1,E.forEach(M);},pause(){T=true,E.forEach(c=>{c.style.animationPlayState="paused";});},resume(){T&&(T=false,E.forEach(c=>{c.style.animationPlayState="running";}));},seek(c){let f=Math.min(1,Math.max(0,c));y=f,T=true,E.forEach((A,H)=>{A.classList.remove(s),A.style.strokeDashoffset=p==="reverse"?`${S[H]*f}`:`${S[H]*(1-f)}`,L&&(A.style.opacity=p==="reverse"?`${1-f}`:`${f}`);});},getProgress(){return w()},refresh(){E.forEach((c,f)=>{S[f]=me(c),c.style.setProperty("--ssd-len",String(S[f])),c.style.strokeDasharray=`${S[f]}`;});}}}if(Gt())return He(qt());function Bt(){let t=Math.max(1,Vt),s=F?t:t*(1+Math.max(0,E.length-1)*$),l=0,g=0,D=false;function z(y){let w=true,c=Math.min(1,Math.max(0,y/s));if(F){let f=Math.min(1,Math.max(0,y/t)),A=q(f);N=A,e.style.setProperty("--scroll-draw-progress",String(A)),e.style.clipPath=le(p==="reverse"?1-A:A),he?.(A),f<1&&(w=false);}else {E.forEach((A,H)=>{let Ut=H*$*t,ht=Math.min(1,Math.max(0,(y-Ut)/t));We(A,H,q(ht),p),ht<1&&(w=false);});let f=q(c);N=f,he?.(f),e.style.setProperty("--scroll-draw-progress",String(f));}if(K){let f=q(c);for(let A in K){let H=parseFloat(A);f>=H&&!U.has(H)&&(U.add(H),K[A]?.());}}return w}function R(y){if(x)return;let w=y-l;_||(_=true,Ae?.());let c=z(w);if(c&&!k){k=true,z(s),ye?.(),V<(Z==="infinite"?1/0:Z??0)&&(V++,Q=setTimeout(()=>{l=performance.now(),_=false,k=false,U.clear(),we(),P=requestAnimationFrame(R);},Ne));return}c||(P=requestAnimationFrame(R));}function d(){cancelAnimationFrame(P),clearTimeout(Q),l=performance.now(),g=0,x=false,_=false,k=false,V=0,D=true,N=0,U.clear(),we(),P=requestAnimationFrame(R);}let h=new IntersectionObserver(y=>{y.forEach(w=>{w.isIntersecting&&!(ne&&k)?d():!w.isIntersecting&&!ne&&!k&&(cancelAnimationFrame(P),clearTimeout(Q),D=false);});},{root:I??null,threshold:Ye,rootMargin:Je}),M;function T(){clearTimeout(M),M=setTimeout(()=>{E.forEach((y,w)=>{S[w]=me(y),y.style.strokeDasharray=`${S[w]}`;});},150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),pe>0?setTimeout(()=>h.observe(e),pe):h.observe(e),{destroy(){cancelAnimationFrame(P),clearTimeout(Q),h.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(M);},replay(){V=0,d();},pause(){x||!D||(x=true,g=performance.now()-l,cancelAnimationFrame(P));},resume(){x&&(x=false,D=true,l=performance.now()-g,P=requestAnimationFrame(R));},seek(y){let w=Math.min(1,Math.max(0,y));N=w,x=true,g=w*s,l=performance.now()-g,cancelAnimationFrame(P),z(g);},getProgress(){return N},refresh(){clearTimeout(M),E.forEach((y,w)=>{S[w]=me(y),y.style.strokeDasharray=`${S[w]}`;});}}}if(Ke)return He(Bt());ft();function pt(){if(x||!fe)return;let t=performance.now(),s=ve();if(!j&&ge===false&&s===at){qe(s);return}j=false,at=s;let l=b;if(ge!==false){let d=t-lt,h=d>0?Math.abs(s-(Pe<0?s:Pe))/d:0;l=b*Math.max(.2,1+h*(typeof ge=="number"?ge:1)*.04);}Pe=s,lt=t;let g=Fe?$e===-1||s>=$e?"forward":"reverse":p;$e=s;let D=O-C,z=true,R=D===0?0:(s-C)/D;if(isNaN(ce)||(ce<=0&&R>0?Ze?.():ce>0&&R<=0&&rt?.(),ce<1&&R>=1?et?.():ce>=1&&R<1&&tt?.()),ce=R,F){let d=mt(0,re(s,C,O,l));N=d,e.style.setProperty("--scroll-draw-progress",String(d));let h=g==="reverse"?1-d:d;e.style.clipPath=le(h),he?.(d),!_&&re(s,C,O,l)>0&&(_=true,Ae?.()),d>=1&&!k?(k=true,ye?.(),V<(Z==="infinite"?1/0:Z??0)&&(V++,Q=setTimeout(()=>{be=-1,ue=[],_=false,k=false,we();},Ne))):d<1&&!ne&&(k=false),qe(s);return}if(E.forEach((d,h)=>{let M=h*Le*D,T=mt(h,re(s,C+M,O+M,l));We(d,h,T,g),h===0&&(N=T,he?.(T),e.style.setProperty("--scroll-draw-progress",String(T))),T<1&&(z=false);}),K){let d=q(re(s,C,O,l));for(let h in K){let M=parseFloat(h);d>=M&&!U.has(M)&&(U.add(M),K[h]?.());}}!_&&re(s,C,O,l)>0&&(_=true,Ae?.()),z&&!k?(k=true,ye?.(),V<(Z==="infinite"?1/0:Z??0)&&(V++,Q=setTimeout(()=>{be=-1,ue=[],_=false,k=false,U.clear(),we(),j=true;},Ne))):!z&&!ne&&(k=false),qe(s);}function Ge(t){return t>=O&&t<st}function qe(t){ke||Ge(t)?P=requestAnimationFrame(pt):fe=false;}function Be(){return ke||Ge(ve())}let fe=false;function De(){fe||(fe=true,P=requestAnimationFrame(function(){pt();}));}function Re(){fe=false,cancelAnimationFrame(P);}let Qe=new IntersectionObserver(t=>{t.forEach(s=>{ke=s.isIntersecting,ke&&!x?(j=true,De()):fe&&!x&&Ge(ve())||Re();});},{root:I??null,threshold:Ye,rootMargin:Je});function gt(){E.forEach((t,s)=>{S[s]=me(t),t.style.strokeDasharray=`${S[s]}`;}),ft(),j=true;}let Ce;function Ee(){clearTimeout(Ce),Ce=setTimeout(gt,150);}window.addEventListener("resize",Ee),window.addEventListener("orientationchange",Ee);let Qt=Dt([e],Ee);return pe>0?setTimeout(()=>Qe.observe(e),pe):Qe.observe(e),He({destroy(){cancelAnimationFrame(P),clearTimeout(Q),Re(),Qe.disconnect(),Qt(),window.removeEventListener("resize",Ee),window.removeEventListener("orientationchange",Ee),clearTimeout(Ce),it();},replay(){be=-1,ue=[],$e=-1,Pe=-1,_=false,k=false,V=0,x=false,N=0,U.clear(),clearTimeout(Q),we(),j=true,Be()&&De();},pause(){x=true,Re();},resume(){x&&(x=false,j=true,Be()&&De());},seek(t){let s=Math.min(1,Math.max(0,t));N=s,be=s,ue=[],x=true,Re(),Wt(s,p),j=true;},getProgress(){return N},refresh(){clearTimeout(Ce),gt(),Be()&&!x&&De();}},()=>({tStart:C,tEnd:O}))}if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class r extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map($=>this.getAttribute($)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let a={},u=this.getAttribute("speed"),b=this.getAttribute("easing"),L=this.getAttribute("stagger"),m=this.getAttribute("direction"),v=this.getAttribute("selector");u&&(a.speed=parseFloat(u)),b&&(a.easing=b),L&&(a.stagger=parseFloat(L)),m&&(a.direction=m),v&&(a.selector=v),this.hasAttribute("fade")&&(a.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(a.once=this.getAttribute("once")!=="false"),this.instance=Nt(this,a);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}r.observedAttributes=e,customElements.define("scroll-draw",r);}
1
+ 'use strict';function Xt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,r)),i=Math.sqrt(o),a=0,u=[];for(let d=0;d<n;d++){let b=Math.pow(i,d);u.push(b),a+=b;}let y=[0],M=0;for(let d=0;d<n;d++)M+=u[d]/a,y.push(M);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<n;b++)if(d<=y[b+1]){let L=(d-y[b])/(y[b+1]-y[b]);if(b===0)return L*(2-L);let g=1-Math.pow(o,b);return g+(1-g)*(2*L-1)*(2*L-1)}return 1}}function Yt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),o=Math.max(.1,r),i=n<=1?o/4:o/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/o)+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:Xt(),elastic:Yt()};function bt(e,r,n){return Math.min(n,Math.max(r,e))}function je(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",o="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:o}}function vt(e,r,n,o){switch(o){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function wt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function re(e,r,n,o){return n===r?0:bt((e-r)/(n-r)*o,0,1)}function Xe(e,r,n,o,i){let a=vt(e.top,e.height,r,o.element)-wt(o.viewport,n),u=vt(e.top,e.height,r,i.element)-wt(i.viewport,n);return {tStart:a,tEnd:u}}function Et(e,r,n){let o=e.getBoundingClientRect(),i=n==="x"?o.width:o.height;return r?{top:n==="x"?o.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:o.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:i,scroll:0}:{top:n==="x"?o.left:o.top,height:i,scroll:n==="x"?window.scrollX:window.scrollY}}function Oe(e){let r=parseFloat(e.getAttribute("pathLength")??"");if(r>0)return r;let n=e.tagName.toLowerCase();if(n==="rect"){let o=parseFloat(e.getAttribute("width")??"0"),i=parseFloat(e.getAttribute("height")??"0");return 2*(o+i)}if(n==="circle"){let o=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*o}return e.getTotalLength()}function St(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let o=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return o?[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]:null}function xt(e,r,n){let o=St(e),i=St(r);return !o||!i?e:`rgb(${Math.round(o[0]+(i[0]-o[0])*n)},${Math.round(o[1]+(i[1]-o[1])*n)},${Math.round(o[2]+(i[2]-o[2])*n)})`}var Mt={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 me=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function de(e,...r){me&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Kt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function Zt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function er(e){let r=[];for(let n=0;n<Tt;n++){let o=n/(Tt-1);r.push(String(Math.round(e(o)*1e5)/1e5));}return `linear(${r.join(",")})`}function At(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return Kt;case "ease-in-out":return Zt()?er(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 $t(e,r){kt().set(e,r);}function Pt(e){kt().delete(e);}var Me,Ie=new Set,_e=new WeakMap,Te=new Map,Dt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function tr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let o=n;o;o=o.previousElementSibling)r.add(o);return r}function Rt(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Me??(Me=new ResizeObserver(i=>{let a=false;for(let{target:u}of i)_e.get(u)!==Dt(u)&&(a=true),_e.set(u,"");a&&Ie.forEach(u=>u());})),Ie.add(n);let o=tr(e);return [document.body,document.documentElement].forEach(i=>i&&o.add(i)),o.forEach(i=>{_e.has(i)||_e.set(i,Dt(i)),Te.set(i,(Te.get(i)??0)+1),Me.observe(i);}),()=>{Ie.delete(n)&&(o.forEach(i=>{let a=(Te.get(i)??1)-1;if(a)return void Te.set(i,a);Te.delete(i),Me?.unobserve(i);}),Ie.size||(Me?.disconnect(),Me=void 0));}}function Ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(!!i.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let o=r;return o.addListener?.(n),()=>o.removeListener?.(n)}function Ot(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let n=r(e,false),o=Ct(a=>{if(!a)return;o();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=r(u?{...e,onComplete:void 0}:e,true);}),i={};for(let a of Object.keys(n))i[a]=(...u)=>n[a]?.(...u);return i.destroy=()=>{o(),n.destroy();},i}var rr=0;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function It(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var _t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function or(e){if(!me)return;let r=It(e,"stroke");if(!r||r==="none"){de("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!_t.has(n)&&!_t.has(It(e,"fill"))&&de("Element has a fill \u2014 it may obscure the stroke animation.",e);}function sr(e,r,n){let o=document.createElement("div");o.setAttribute("data-svg-scroll-draw-debug",""),o.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=n==="x"?window.scrollX:window.scrollY,u=e-a,y=r-a,M=n==="x";o.innerHTML=`
2
+ <div style="position:absolute;${M?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${M?`left:${y}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${y}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(o),window.addEventListener("scroll",i,{passive:true}),i(),{el:o,destroy(){window.removeEventListener("scroll",i),o.remove();}}}var Ft=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Nt=/[MmLlHhVvCcSsQqTtAaZz]/g;function ir(e,r,n){if(!me)return;let o=(e.match(Nt)??[]).join("").toUpperCase(),i=(r.match(Nt)??[]).join("").toUpperCase(),a=(e.match(Ft)??[]).length,u=(r.match(Ft)??[]).length;if(o!==i){de(`morphTo: command sequence differs (${o||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}a!==u&&de(`morphTo: coordinate count differs (${a} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ar(e,r,n){let o=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),y=o[i++]??u;return String(+(u+(y-u)*n).toFixed(4))})}function Vt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Ot(r,(n,o)=>lr(e,n,o))}function lr(e,r,n){let{preset:o,...i}=r,a=o?{...Mt[o],...i}:i,{selector:u="path, polyline, line, polygon, rect, circle",speed:y=1,fade:M=false,easing:d="linear",trigger:b={},stagger:L=0,direction:g="forward",once:ne=false,debug:Ye=false,axis:q="y",scrollContainer:Fe,autoReverse:Ne=false,delay:pe=0,strokeColor:X,strokeWidth:Y,fillOpacity:J,waypoints:K,velocityScale:ge=false,threshold:Je=0,rootMargin:Ke="0px",repeat:Z=0,repeatDelay:Ve=0,morphTo:F,clip:ze,autoplay:Ze=false,duration:zt=1e3,native:Ht=true,onProgress:he,onStart:Ae,onComplete:ye,onEnter:et,onLeave:tt,onEnterBack:rt,onLeaveBack:nt}=a,N=ze===true?"left":typeof ze=="string"?ze:false,B=typeof d=="function"?d:xe[d]??xe.linear,ot=je(b.start||"top bottom"),st=je(b.end||"bottom top"),O=typeof Fe=="string"?document.querySelector(Fe):Fe??null,oe=Array.isArray(X)?X[0]:null,se=Array.isArray(X)?X[1]:typeof X=="string"?X:null,ee=Array.isArray(Y)?Y[0]:null,ie=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null,te=Array.isArray(J)?J[0]:null,ae=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function le(t){let s=t*100;switch(N){case "right":return `inset(0 0 0 ${100-s}%)`;case "top":return `inset(0 0 ${100-s}% 0)`;case "bottom":return `inset(${100-s}% 0 0 0)`;case "center":return `circle(${t*150}% at 50% 50%)`;default:return `inset(0 ${100-s}% 0 0)`}}let v=N?[]:Array.from(e.querySelectorAll(u)),I=[],V=[],R=0,C=0,Le=L,it=0,T=false,_=false,$=0,ke=false,be=-1,ue=[],$e=-1,w=false,z=0,H=0,Q,He=null;function at(){He?.destroy(),He=null;}let U=new Set,lt=NaN,j=true,Pe=-1,ut=performance.now(),ce=NaN;function ve(){return O?q==="x"?O.scrollLeft:O.scrollTop:q==="x"?window.scrollX:window.scrollY}function ct(){return O?q==="x"?O.clientWidth:O.clientHeight:q==="x"?window.innerWidth:window.innerHeight}function ft(){let t=Et(e,O,q);return Xe(t,t.scroll,ct(),ot,st)}function Wt(){let t=C-R,s=v.length-1,l=O??document.documentElement,f=q==="x"?"Width":"Height";if(Le=L,L>0&&s>0&&t>0){let A=l[`scroll${f}`]-l[`client${f}`]-1-R-t/y;A>=0&&(Le=Math.min(L,A/(s*t)));}it=C+s*Le*t;}function mt(){(({tStart:R,tEnd:C}=ft())),Wt(),Ye&&me&&(at(),He=sr(R,C,q));}function We(t,s=ft){$t(e,{type:"draw",getProgress:()=>t.getProgress(),getTrigger:s});let l=t.destroy;return t.destroy=()=>{l.call(t),Pt(e);},t}function dt(t,s){return ne&&!Ne?Math.max(be,B(ue[t]=Math.max(ue[t]??0,s))):B(s)}function Gt(t,s){if(e.style.setProperty("--scroll-draw-progress",String(t)),N){let l=s==="reverse"?1-t:t;e.style.clipPath=le(l);return}v.forEach((l,f)=>Ge(l,f,t,s));}function Ge(t,s,l,f){t.style.strokeDashoffset=f==="reverse"?`${I[s]*l}`:`${I[s]*(1-l)}`,M&&(t.style.opacity=f==="reverse"?`${1-l}`:`${l}`),oe&&se?t.style.stroke=xt(oe,se,l):se&&(t.style.stroke=se),ee!==null&&ie!==null?t.style.strokeWidth=`${ee+(ie-ee)*l}`:ie!==null&&(t.style.strokeWidth=`${ie}`),te!==null&&ae!==null?t.style.fillOpacity=`${te+(ae-te)*l}`:ae!==null&&(t.style.fillOpacity=`${ae}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",ar(V[s],F,l));}function we(){if(e.style.setProperty("--scroll-draw-progress","0"),N){e.style.clipPath=le(g==="reverse"?1:0);return}v.forEach((t,s)=>{t.style.strokeDasharray=`${I[s]}`,t.style.strokeDashoffset=g==="reverse"?"0":`${I[s]}`,M?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",V[s]);});}function Ee(t,s){let l=t.getAttribute("d"),f=Oe(t);if(F&&V[s]){t.setAttribute("d",F);let A=Oe(t);t.setAttribute("d",V[s]),f=Math.max(Oe(t),A),t.setAttribute("d",l);}I[s]=f,t.style.strokeDasharray=`${f}`;}if(v.forEach((t,s)=>{or(t);let l=t.tagName.toLowerCase()==="path";l?V.push(t.getAttribute("d")??""):V.push(""),Ee(t,s);let f=I[s];F&&(l?ir(V[V.length-1],F,t):de(`morphTo only applies to <path> elements \u2014 ignored on <${t.tagName}>.`,t)),n?(t.style.strokeDashoffset=g==="reverse"?`${f}`:"0",M&&(t.style.opacity="1"),se&&(t.style.stroke=se),ie!==null&&(t.style.strokeWidth=`${ie}`),ae!==null&&(t.style.fillOpacity=`${ae}`),F&&t.tagName.toLowerCase()==="path"&&t.setAttribute("d",F)):(t.style.strokeDashoffset=g==="reverse"?"0":`${f}`,M?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`));}),n)return N&&(e.style.clipPath=le(1)),ye?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};N&&(e.style.clipPath=le(g==="reverse"?1:0));let pt=typeof d=="string"?At(d):null;function qt(){return !(Ht===false||Ze||Ye&&me||!nr()||!v.length||!pt||N||q!=="y"||O||y!==1||L!==0||ne||Ne||ge!==false||F||K||Z||pe>0||he||Ae||ye||et||tt||rt||nt||X!=null||Y!=null||J!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function Bt(){let t=++rr,s=`svg-scroll-draw-${t}`,l=`svg-scroll-draw-host-${t}`,f=`--svg-scroll-draw-${t}`,A=g==="reverse"?"0":"var(--ssd-len)",W=g==="reverse"?"var(--ssd-len)":"0",P=`stroke-dashoffset:${A};`,p=`stroke-dashoffset:${W};`;M&&(P+=`opacity:${g==="reverse"?1:0};`,p+=`opacity:${g==="reverse"?0:1};`);let h=document.createElement("style");h.setAttribute("data-svg-scroll-draw",""),h.textContent=`@keyframes ${s}{from{${P}}to{${p}}}.${l}{view-timeline-name:${f};view-timeline-axis:block;}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${pt};animation-fill-mode:both;animation-timeline:${f};animation-range:cover 0% cover 100%;}`,document.head.appendChild(h),e.classList.add(l);function E(c,m){c.style.setProperty("--ssd-len",String(I[m])),c.style.strokeDasharray=`${I[m]}`,c.style.strokeDashoffset="",c.style.opacity="",c.style.animationPlayState="",c.classList.add(s);}v.forEach(E);let S=false,k=-1;function D(){if(k>=0)return k;let c=e.getBoundingClientRect(),{tStart:m,tEnd:x}=Xe({top:c.top,height:c.height},ve(),ct(),ot,st);return B(re(ve(),m,x,y))}return {destroy(){e.classList.remove(l),v.forEach(c=>{c.classList.remove(s),c.style.removeProperty("--ssd-len"),c.style.animationPlayState="";}),h.remove();},replay(){S=false,k=-1,v.forEach(E);},pause(){S=true,v.forEach(c=>{c.style.animationPlayState="paused";});},resume(){S&&(S=false,v.forEach(c=>{c.style.animationPlayState="running";}));},seek(c){let m=Math.min(1,Math.max(0,c));k=m,S=true,v.forEach((x,G)=>{x.classList.remove(s),x.style.strokeDashoffset=g==="reverse"?`${I[G]*m}`:`${I[G]*(1-m)}`,M&&(x.style.opacity=g==="reverse"?`${1-m}`:`${m}`);});},getProgress(){return D()},refresh(){v.forEach((c,m)=>{Ee(c,m),c.style.setProperty("--ssd-len",String(I[m]));});}}}if(qt())return We(Bt());function Qt(){let t=Math.max(1,zt),s=N?t:t*(1+Math.max(0,v.length-1)*L),l=0,f=0,A=false;function W(k){let D=true,c=Math.min(1,Math.max(0,k/s));if(N){let m=Math.min(1,Math.max(0,k/t)),x=B(m);z=x,e.style.setProperty("--scroll-draw-progress",String(x)),e.style.clipPath=le(g==="reverse"?1-x:x),he?.(x),m<1&&(D=false);}else {v.forEach((x,G)=>{let jt=G*L*t,yt=Math.min(1,Math.max(0,(k-jt)/t));Ge(x,G,B(yt),g),yt<1&&(D=false);});let m=B(c);z=m,he?.(m),e.style.setProperty("--scroll-draw-progress",String(m));}if(K){let m=B(c);for(let x in K){let G=parseFloat(x);m>=G&&!U.has(G)&&(U.add(G),K[x]?.());}}return D}function P(k){if(w)return;let D=k-l;_||(_=true,Ae?.());let c=W(D);if(c&&!T){T=true,W(s),ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{l=performance.now(),_=false,T=false,U.clear(),we(),$=requestAnimationFrame(P);},Ve));return}c||($=requestAnimationFrame(P));}function p(){cancelAnimationFrame($),clearTimeout(Q),l=performance.now(),f=0,w=false,_=false,T=false,H=0,A=true,z=0,U.clear(),we(),$=requestAnimationFrame(P);}let h=new IntersectionObserver(k=>{k.forEach(D=>{D.isIntersecting&&!(ne&&T)?p():!D.isIntersecting&&!ne&&!T&&(cancelAnimationFrame($),clearTimeout(Q),A=false);});},{root:O??null,threshold:Je,rootMargin:Ke}),E;function S(){clearTimeout(E),E=setTimeout(()=>v.forEach(Ee),150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),pe>0?setTimeout(()=>h.observe(e),pe):h.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(Q),h.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S),clearTimeout(E);},replay(){H=0,p();},pause(){w||!A||(w=true,f=performance.now()-l,cancelAnimationFrame($));},resume(){w&&(w=false,A=true,l=performance.now()-f,$=requestAnimationFrame(P));},seek(k){let D=Math.min(1,Math.max(0,k));z=D,w=true,f=D*s,l=performance.now()-f,cancelAnimationFrame($),W(f);},getProgress(){return z},refresh(){clearTimeout(E),v.forEach(Ee);}}}if(Ze)return We(Qt());mt();function gt(){if(w||!fe)return;let t=performance.now(),s=ve();if(!j&&ge===false&&s===lt){Be(s);return}j=false,lt=s;let l=y;if(ge!==false){let p=t-ut,h=p>0?Math.abs(s-(Pe<0?s:Pe))/p:0;l=y*Math.max(.2,1+h*(typeof ge=="number"?ge:1)*.04);}Pe=s,ut=t;let f=Ne?$e===-1||s>=$e?"forward":"reverse":g;$e=s;let A=C-R,W=true,P=A===0?0:(s-R)/A;if(isNaN(ce)||(ce<=0&&P>0?et?.():ce>0&&P<=0&&nt?.(),ce<1&&P>=1?tt?.():ce>=1&&P<1&&rt?.()),ce=P,N){let p=dt(0,re(s,R,C,l));z=p,e.style.setProperty("--scroll-draw-progress",String(p));let h=f==="reverse"?1-p:p;e.style.clipPath=le(h),he?.(p),!_&&re(s,R,C,l)>0&&(_=true,Ae?.()),p>=1&&!T?(T=true,ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{be=-1,ue=[],_=false,T=false,we();},Ve))):p<1&&!ne&&(T=false),Be(s);return}if(v.forEach((p,h)=>{let E=h*Le*A,S=dt(h,re(s,R+E,C+E,l));Ge(p,h,S,f),h===0&&(z=S,he?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(W=false);}),K){let p=B(re(s,R,C,l));for(let h in K){let E=parseFloat(h);p>=E&&!U.has(E)&&(U.add(E),K[h]?.());}}!_&&re(s,R,C,l)>0&&(_=true,Ae?.()),W&&!T?(T=true,ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{be=-1,ue=[],_=false,T=false,U.clear(),we(),j=true;},Ve))):!W&&!ne&&(T=false),Be(s);}function qe(t){return t>=C&&t<it}function Be(t){ke||qe(t)?$=requestAnimationFrame(gt):fe=false;}function Qe(){return ke||qe(ve())}let fe=false;function De(){fe||(fe=true,$=requestAnimationFrame(function(){gt();}));}function Re(){fe=false,cancelAnimationFrame($);}let Ue=new IntersectionObserver(t=>{t.forEach(s=>{ke=s.isIntersecting,ke&&!w?(j=true,De()):fe&&!w&&qe(ve())||Re();});},{root:O??null,threshold:Je,rootMargin:Ke});function ht(){v.forEach(Ee),mt(),j=true;}let Ce;function Se(){clearTimeout(Ce),Ce=setTimeout(ht,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Ut=Rt([e],Se);return pe>0?setTimeout(()=>Ue.observe(e),pe):Ue.observe(e),We({destroy(){cancelAnimationFrame($),clearTimeout(Q),Re(),Ue.disconnect(),Ut(),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),clearTimeout(Ce),at();},replay(){be=-1,ue=[],$e=-1,Pe=-1,_=false,T=false,H=0,w=false,z=0,U.clear(),clearTimeout(Q),we(),j=true,Qe()&&De();},pause(){w=true,Re();},resume(){w&&(w=false,j=true,Qe()&&De());},seek(t){let s=Math.min(1,Math.max(0,t));z=s,be=s,ue=[],w=true,Re(),Gt(s,g),j=true;},getProgress(){return z},refresh(){clearTimeout(Ce),ht(),Qe()&&!w&&De();}},()=>({tStart:R,tEnd:C}))}if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class r extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(L=>this.getAttribute(L)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let a={},u=this.getAttribute("speed"),y=this.getAttribute("easing"),M=this.getAttribute("stagger"),d=this.getAttribute("direction"),b=this.getAttribute("selector");u&&(a.speed=parseFloat(u)),y&&(a.easing=y),M&&(a.stagger=parseFloat(M)),d&&(a.direction=d),b&&(a.selector=b),this.hasAttribute("fade")&&(a.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(a.once=this.getAttribute("once")!=="false"),this.instance=Vt(this,a);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}r.observedAttributes=e,customElements.define("scroll-draw",r);}
@@ -1 +1 @@
1
- import {b}from'../chunk-23EALNDF.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
1
+ import {b}from'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svg-scroll-draw",
3
- "version": "2.23.3",
3
+ "version": "2.23.4",
4
4
  "description": "Scroll-driven animation for the web — draw SVG paths, reveal elements, pin sections, scrub video. Zero dependencies, native CSS fast path, works with React, Vue, Svelte, Solid, Angular, Astro and vanilla JS",
5
5
  "keywords": [
6
6
  "svg",
@@ -1,3 +0,0 @@
1
- import {b as b$1,a as a$6}from'./chunk-OJFWQ6CU.mjs';import {a as a$3}from'./chunk-UPWWULKI.mjs';import {a as a$2}from'./chunk-YZV4Z3EQ.mjs';import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,d as d$1,c,b as b$3}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$5,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$4}from'./chunk-LFSU6LR3.mjs';var bt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ft=0;function Nt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Et(r,y){let u="";try{u=getComputedStyle(r).getPropertyValue(y).trim();}catch{}return u||(r.getAttribute(y)??"").trim()}var Tt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ht(r){if(!a$4)return;let y=Et(r,"stroke");if(!y||y==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let u=(r.getAttribute("fill")??"").trim();u&&!Tt.has(u)&&!Tt.has(Et(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function It(r,y,u){let h=document.createElement("div");h.setAttribute("data-svg-scroll-draw-debug",""),h.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 A(){let F=u==="x"?window.scrollX:window.scrollY,P=r-F,D=y-F,N=u==="x";h.innerHTML=`
2
- <div style="position:absolute;${N?`left:${P}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${P}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;${N?`left:${D}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${D}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(h),window.addEventListener("scroll",A,{passive:true}),A(),{el:h,destroy(){window.removeEventListener("scroll",A),h.remove();}}}var St=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,$t=/[MmLlHhVvCcSsQqTtAaZz]/g;function Rt(r,y,u){if(!a$4)return;let h=(r.match($t)??[]).join("").toUpperCase(),A=(y.match($t)??[]).join("").toUpperCase(),F=(r.match(St)??[]).length,P=(y.match(St)??[]).length;if(h!==A){b(`morphTo: command sequence differs (${h||"\u2205"} \u2192 ${A||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,u);return}F!==P&&b(`morphTo: coordinate count differs (${F} \u2192 ${P}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,u);}function zt(r,y,u){let h=(y.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),A=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,F=>{let P=parseFloat(F),D=h[A++]??P;return String(+(P+(D-P)*u).toFixed(4))})}function Kt(r,y={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:a(y,(u,h)=>Vt(r,u,h))}function Vt(r,y,u){let{preset:h,...A}=y,F=h?{...bt[h],...A}:A,{selector:P="path, polyline, line, polygon, rect, circle",speed:D=1,fade:N=false,easing:me="linear",trigger:Ee={},stagger:U=0,direction:d$2="forward",once:te=false,debug:_e=false,axis:z="y",scrollContainer:De,autoReverse:Ce=false,delay:pe=0,strokeColor:j,strokeWidth:X,fillOpacity:Y,waypoints:Q,velocityScale:de=false,threshold:Ue=0,rootMargin:je="0px",repeat:Z=0,repeatDelay:Oe=0,morphTo:V,clip:Fe,autoplay:Xe=false,duration:kt=1e3,native:xt=true,onProgress:ye,onStart:Te,onComplete:he,onEnter:Ye,onLeave:Qe,onEnterBack:Ze,onLeaveBack:Je}=F,C=Fe===true?"left":typeof Fe=="string"?Fe:false,W=typeof me=="function"?me:d[me]??d.linear,Ke=a$1(Ee.start||"top bottom"),et=a$1(Ee.end||"bottom top"),L=typeof De=="string"?document.querySelector(De):De??null,re=Array.isArray(j)?j[0]:null,se=Array.isArray(j)?j[1]:typeof j=="string"?j:null,J=Array.isArray(X)?X[0]:null,ne=Array.isArray(X)?X[1]:typeof X=="number"?X:null,K=Array.isArray(Y)?Y[0]:null,oe=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null;function ie(e){let t=e*100;switch(C){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=C?[]:Array.from(r.querySelectorAll(P)),p=[],q=[],k=0,x=0,Se=U,tt=0,E=false,M=false,T=0,$e=false,ge=-1,ae=[],ke=-1,g=false,O=0,H=0,G,Ne=null;function rt(){Ne?.destroy(),Ne=null;}let B=new Set,st=NaN,_=true,xe=-1,nt=performance.now(),le=NaN;function ve(){return L?z==="x"?L.scrollLeft:L.scrollTop:z==="x"?window.scrollX:window.scrollY}function ot(){return L?z==="x"?L.clientWidth:L.clientHeight:z==="x"?window.innerWidth:window.innerHeight}function it(){let e=a$3(r,L,z);return c(e,e.scroll,ot(),Ke,et)}function At(){let e=x-k,t=m.length-1,s=L??document.documentElement,a=z==="x"?"Width":"Height";if(Se=U,U>0&&t>0&&e>0){let S=s[`scroll${a}`]-s[`client${a}`]-1-k-e/D;S>=0&&(Se=Math.min(U,S/(t*e)));}tt=x+t*Se*e;}function at(){(({tStart:k,tEnd:x}=it())),At(),_e&&a$4&&(rt(),Ne=It(k,x,z));}function He(e,t=it){a$5(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let s=e.destroy;return e.destroy=()=>{s.call(e),b$2(r);},e}function lt(e,t){return te&&!Ce?Math.max(ge,W(ae[e]=Math.max(ae[e]??0,t))):W(t)}function Pt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),C){let s=t==="reverse"?1-e:e;r.style.clipPath=ie(s);return}m.forEach((s,a)=>Ie(s,a,e,t));}function Ie(e,t,s,a){e.style.strokeDashoffset=a==="reverse"?`${p[t]*s}`:`${p[t]*(1-s)}`,N&&(e.style.opacity=a==="reverse"?`${1-s}`:`${s}`),re&&se?e.style.stroke=a$6(re,se,s):se&&(e.style.stroke=se),J!==null&&ne!==null?e.style.strokeWidth=`${J+(ne-J)*s}`:ne!==null&&(e.style.strokeWidth=`${ne}`),K!==null&&oe!==null?e.style.fillOpacity=`${K+(oe-K)*s}`:oe!==null&&(e.style.fillOpacity=`${oe}`),V&&e.tagName.toLowerCase()==="path"&&q[t]&&e.setAttribute("d",zt(q[t],V,s));}function we(){if(r.style.setProperty("--scroll-draw-progress","0"),C){r.style.clipPath=ie(d$2==="reverse"?1:0);return}m.forEach((e,t)=>{e.style.strokeDasharray=`${p[t]}`,e.style.strokeDashoffset=d$2==="reverse"?"0":`${p[t]}`,N?e.style.opacity=d$2==="reverse"?"1":"0":e.style.opacity="",re&&(e.style.stroke=re),J!==null&&(e.style.strokeWidth=`${J}`),K!==null&&(e.style.fillOpacity=`${K}`),V&&e.tagName.toLowerCase()==="path"&&q[t]&&e.setAttribute("d",q[t]);});}if(m.forEach(e=>{Ht(e);let t=a$2(e);p.push(t);let s=e.tagName.toLowerCase()==="path";s?q.push(e.getAttribute("d")??""):q.push(""),V&&(s?Rt(q[q.length-1],V,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),u?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$2==="reverse"?`${t}`:"0",N&&(e.style.opacity="1"),se&&(e.style.stroke=se),ne!==null&&(e.style.strokeWidth=`${ne}`),oe!==null&&(e.style.fillOpacity=`${oe}`),V&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",V)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$2==="reverse"?"0":`${t}`,N?e.style.opacity=d$2==="reverse"?"1":"0":e.style.opacity="",re&&(e.style.stroke=re),J!==null&&(e.style.strokeWidth=`${J}`),K!==null&&(e.style.fillOpacity=`${K}`));}),u)return C&&(r.style.clipPath=ie(1)),he?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};C&&(r.style.clipPath=ie(d$2==="reverse"?1:0));let ft=typeof me=="string"?b$1(me):null;function Lt(){return !(xt===false||Xe||_e||!Nt()||!m.length||!ft||C||z!=="y"||L||D!==1||U!==0||te||Ce||de!==false||V||Q||Z||pe>0||ye||Te||he||Ye||Qe||Ze||Je||j!=null||X!=null||Y!=null||(Ee.start||"top bottom").trim()!=="top bottom"||(Ee.end||"bottom top").trim()!=="bottom top")}function Mt(){let e=++Ft,t=`svg-scroll-draw-${e}`,s=`svg-scroll-draw-host-${e}`,a=`--svg-scroll-draw-${e}`,S=d$2==="reverse"?"0":"var(--ssd-len)",I=d$2==="reverse"?"var(--ssd-len)":"0",$=`stroke-dashoffset:${S};`,i=`stroke-dashoffset:${I};`;N&&($+=`opacity:${d$2==="reverse"?1:0};`,i+=`opacity:${d$2==="reverse"?0:1};`);let l=document.createElement("style");l.setAttribute("data-svg-scroll-draw",""),l.textContent=`@keyframes ${t}{from{${$}}to{${i}}}.${s}{view-timeline-name:${a};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${ft};animation-fill-mode:both;animation-timeline:${a};animation-range:cover 0% cover 100%;}`,document.head.appendChild(l),r.classList.add(s);function v(n,o){n.style.setProperty("--ssd-len",String(p[o])),n.style.strokeDasharray=`${p[o]}`,n.style.strokeDashoffset="",n.style.opacity="",n.style.animationPlayState="",n.classList.add(t);}m.forEach(v);let w=false,f=-1;function c$1(){if(f>=0)return f;let n=r.getBoundingClientRect(),{tStart:o,tEnd:b}=c({top:n.top,height:n.height},ve(),ot(),Ke,et);return W(b$3(ve(),o,b,D))}return {destroy(){r.classList.remove(s),m.forEach(n=>{n.classList.remove(t),n.style.removeProperty("--ssd-len"),n.style.animationPlayState="";}),l.remove();},replay(){w=false,f=-1,m.forEach(v);},pause(){w=true,m.forEach(n=>{n.style.animationPlayState="paused";});},resume(){w&&(w=false,m.forEach(n=>{n.style.animationPlayState="running";}));},seek(n){let o=Math.min(1,Math.max(0,n));f=o,w=true,m.forEach((b,R)=>{b.classList.remove(t),b.style.strokeDashoffset=d$2==="reverse"?`${p[R]*o}`:`${p[R]*(1-o)}`,N&&(b.style.opacity=d$2==="reverse"?`${1-o}`:`${o}`);});},getProgress(){return c$1()},refresh(){m.forEach((n,o)=>{p[o]=a$2(n),n.style.setProperty("--ssd-len",String(p[o])),n.style.strokeDasharray=`${p[o]}`;});}}}if(Lt())return He(Mt());function Dt(){let e=Math.max(1,kt),t=C?e:e*(1+Math.max(0,m.length-1)*U),s=0,a=0,S=false;function I(f){let c=true,n=Math.min(1,Math.max(0,f/t));if(C){let o=Math.min(1,Math.max(0,f/e)),b=W(o);O=b,r.style.setProperty("--scroll-draw-progress",String(b)),r.style.clipPath=ie(d$2==="reverse"?1-b:b),ye?.(b),o<1&&(c=false);}else {m.forEach((b,R)=>{let Ot=R*U*e,mt=Math.min(1,Math.max(0,(f-Ot)/e));Ie(b,R,W(mt),d$2),mt<1&&(c=false);});let o=W(n);O=o,ye?.(o),r.style.setProperty("--scroll-draw-progress",String(o));}if(Q){let o=W(n);for(let b in Q){let R=parseFloat(b);o>=R&&!B.has(R)&&(B.add(R),Q[b]?.());}}return c}function $(f){if(g)return;let c=f-s;M||(M=true,Te?.());let n=I(c);if(n&&!E){E=true,I(t),he?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,G=setTimeout(()=>{s=performance.now(),M=false,E=false,B.clear(),we(),T=requestAnimationFrame($);},Oe));return}n||(T=requestAnimationFrame($));}function i(){cancelAnimationFrame(T),clearTimeout(G),s=performance.now(),a=0,g=false,M=false,E=false,H=0,S=true,O=0,B.clear(),we(),T=requestAnimationFrame($);}let l=new IntersectionObserver(f=>{f.forEach(c=>{c.isIntersecting&&!(te&&E)?i():!c.isIntersecting&&!te&&!E&&(cancelAnimationFrame(T),clearTimeout(G),S=false);});},{root:L??null,threshold:Ue,rootMargin:je}),v;function w(){clearTimeout(v),v=setTimeout(()=>{m.forEach((f,c)=>{p[c]=a$2(f),f.style.strokeDasharray=`${p[c]}`;});},150);}return window.addEventListener("resize",w),window.addEventListener("orientationchange",w),pe>0?setTimeout(()=>l.observe(r),pe):l.observe(r),{destroy(){cancelAnimationFrame(T),clearTimeout(G),l.disconnect(),window.removeEventListener("resize",w),window.removeEventListener("orientationchange",w),clearTimeout(v);},replay(){H=0,i();},pause(){g||!S||(g=true,a=performance.now()-s,cancelAnimationFrame(T));},resume(){g&&(g=false,S=true,s=performance.now()-a,T=requestAnimationFrame($));},seek(f){let c=Math.min(1,Math.max(0,f));O=c,g=true,a=c*t,s=performance.now()-a,cancelAnimationFrame(T),I(a);},getProgress(){return O},refresh(){clearTimeout(v),m.forEach((f,c)=>{p[c]=a$2(f),f.style.strokeDasharray=`${p[c]}`;});}}}if(Xe)return He(Dt());at();function ct(){if(g||!fe)return;let e=performance.now(),t=ve();if(!_&&de===false&&t===st){ze(t);return}_=false,st=t;let s=D;if(de!==false){let i=e-nt,l=i>0?Math.abs(t-(xe<0?t:xe))/i:0;s=D*Math.max(.2,1+l*(typeof de=="number"?de:1)*.04);}xe=t,nt=e;let a=Ce?ke===-1||t>=ke?"forward":"reverse":d$2;ke=t;let S=x-k,I=true,$=S===0?0:(t-k)/S;if(isNaN(le)||(le<=0&&$>0?Ye?.():le>0&&$<=0&&Je?.(),le<1&&$>=1?Qe?.():le>=1&&$<1&&Ze?.()),le=$,C){let i=lt(0,b$3(t,k,x,s));O=i,r.style.setProperty("--scroll-draw-progress",String(i));let l=a==="reverse"?1-i:i;r.style.clipPath=ie(l),ye?.(i),!M&&b$3(t,k,x,s)>0&&(M=true,Te?.()),i>=1&&!E?(E=true,he?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,G=setTimeout(()=>{ge=-1,ae=[],M=false,E=false,we();},Oe))):i<1&&!te&&(E=false),ze(t);return}if(m.forEach((i,l)=>{let v=l*Se*S,w=lt(l,b$3(t,k+v,x+v,s));Ie(i,l,w,a),l===0&&(O=w,ye?.(w),r.style.setProperty("--scroll-draw-progress",String(w))),w<1&&(I=false);}),Q){let i=W(b$3(t,k,x,s));for(let l in Q){let v=parseFloat(l);i>=v&&!B.has(v)&&(B.add(v),Q[l]?.());}}!M&&b$3(t,k,x,s)>0&&(M=true,Te?.()),I&&!E?(E=true,he?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,G=setTimeout(()=>{ge=-1,ae=[],M=false,E=false,B.clear(),we(),_=true;},Oe))):!I&&!te&&(E=false),ze(t);}function Re(e){return e>=x&&e<tt}function ze(e){$e||Re(e)?T=requestAnimationFrame(ct):fe=false;}function Ve(){return $e||Re(ve())}let fe=false;function Ae(){fe||(fe=true,T=requestAnimationFrame(function(){ct();}));}function Pe(){fe=false,cancelAnimationFrame(T);}let We=new IntersectionObserver(e=>{e.forEach(t=>{$e=t.isIntersecting,$e&&!g?(_=true,Ae()):fe&&!g&&Re(ve())||Pe();});},{root:L??null,threshold:Ue,rootMargin:je});function ut(){m.forEach((e,t)=>{p[t]=a$2(e),e.style.strokeDasharray=`${p[t]}`;}),at(),_=true;}let Le;function be(){clearTimeout(Le),Le=setTimeout(ut,150);}window.addEventListener("resize",be),window.addEventListener("orientationchange",be);let Ct=d$1([r],be);return pe>0?setTimeout(()=>We.observe(r),pe):We.observe(r),He({destroy(){cancelAnimationFrame(T),clearTimeout(G),Pe(),We.disconnect(),Ct(),window.removeEventListener("resize",be),window.removeEventListener("orientationchange",be),clearTimeout(Le),rt();},replay(){ge=-1,ae=[],ke=-1,xe=-1,M=false,E=false,H=0,g=false,O=0,B.clear(),clearTimeout(G),we(),_=true,Ve()&&Ae();},pause(){g=true,Pe();},resume(){g&&(g=false,_=true,Ve()&&Ae());},seek(e){let t=Math.min(1,Math.max(0,e));O=t,ge=t,ae=[],g=true,Pe(),Pt(t,d$2),_=true;},getProgress(){return O},refresh(){clearTimeout(Le),ut(),Ve()&&!g&&Ae();}},()=>({tStart:k,tEnd:x}))}export{bt as a,Kt as b};