svg-scroll-draw 2.20.1 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +11 -9
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +1 -1
  4. package/dist/angular/index.d.ts +1 -1
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +3 -3
  7. package/dist/astro/index.mjs +1 -1
  8. package/dist/cdn/svg-scroll-draw.dev.global.js +83 -29
  9. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  10. package/dist/chunk-2PYLM3E7.mjs +1 -0
  11. package/dist/chunk-DY5JCXVR.mjs +1 -0
  12. package/dist/{chunk-MTEGM4RR.mjs → chunk-GVBO5GRD.mjs} +1 -1
  13. package/dist/chunk-HX4SP5WN.mjs +3 -0
  14. package/dist/chunk-LTCJVVSC.mjs +1 -0
  15. package/dist/chunk-N6PDF6O6.mjs +2 -0
  16. package/dist/{chunk-SMRTRZSD.mjs → chunk-OTDD2ROH.mjs} +1 -1
  17. package/dist/{chunk-ECHMYVSK.mjs → chunk-PKY27MO4.mjs} +1 -1
  18. package/dist/chunk-VDTAYUAR.mjs +1 -0
  19. package/dist/chunk-WXUOF4NM.mjs +1 -0
  20. package/dist/cinematic/index.cjs +2 -2
  21. package/dist/cinematic/index.mjs +1 -1
  22. package/dist/{engine-DQyBzZDl.d.ts → engine-B7UpB4fT.d.ts} +2 -1
  23. package/dist/{engine-P8u6OK4m.d.mts → engine-o1VSQ1lX.d.mts} +2 -1
  24. package/dist/group/index.cjs +3 -3
  25. package/dist/group/index.d.mts +2 -2
  26. package/dist/group/index.d.ts +2 -2
  27. package/dist/group/index.mjs +1 -1
  28. package/dist/horizontal/index.cjs +1 -1
  29. package/dist/horizontal/index.d.mts +2 -1
  30. package/dist/horizontal/index.d.ts +2 -1
  31. package/dist/horizontal/index.mjs +1 -1
  32. package/dist/{index-CMqK0GCT.d.mts → index-BY-CNE8c.d.mts} +1 -1
  33. package/dist/{index-DPqPEnO-.d.ts → index-DqXXiDIk.d.ts} +1 -1
  34. package/dist/index.cjs +4 -4
  35. package/dist/index.d.mts +2 -2
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.mjs +1 -1
  38. package/dist/nuxt/index.cjs +3 -3
  39. package/dist/nuxt/index.d.mts +1 -1
  40. package/dist/nuxt/index.d.ts +1 -1
  41. package/dist/nuxt/index.mjs +1 -1
  42. package/dist/react/index.cjs +3 -3
  43. package/dist/react/index.d.mts +1 -1
  44. package/dist/react/index.d.ts +1 -1
  45. package/dist/react/index.mjs +1 -1
  46. package/dist/reveal/index.cjs +1 -1
  47. package/dist/reveal/index.mjs +1 -1
  48. package/dist/snap/index.mjs +1 -1
  49. package/dist/solid/index.cjs +3 -3
  50. package/dist/solid/index.d.mts +1 -1
  51. package/dist/solid/index.d.ts +1 -1
  52. package/dist/solid/index.mjs +1 -1
  53. package/dist/svelte/index.cjs +3 -3
  54. package/dist/svelte/index.d.mts +1 -1
  55. package/dist/svelte/index.d.ts +1 -1
  56. package/dist/svelte/index.mjs +1 -1
  57. package/dist/text/index.cjs +1 -1
  58. package/dist/text/index.mjs +1 -1
  59. package/dist/timeline/index.mjs +1 -1
  60. package/dist/video/index.cjs +1 -1
  61. package/dist/video/index.mjs +1 -1
  62. package/dist/vue/index.cjs +3 -3
  63. package/dist/vue/index.d.mts +1 -1
  64. package/dist/vue/index.d.ts +1 -1
  65. package/dist/vue/index.mjs +1 -1
  66. package/dist/web-component/index.cjs +3 -3
  67. package/dist/web-component/index.mjs +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-7SBTYJGH.mjs +0 -1
  70. package/dist/chunk-BFX2CSQ3.mjs +0 -1
  71. package/dist/chunk-ENACACPZ.mjs +0 -3
  72. package/dist/chunk-I45LCJUP.mjs +0 -1
  73. package/dist/chunk-KGAJQP2N.mjs +0 -2
  74. package/dist/chunk-KHQ7OGQK.mjs +0 -1
@@ -1 +1 @@
1
- 'use strict';function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,c=[];for(let l=0;l<n;l++){let p=Math.pow(s,l);c.push(p),i+=p;}let m=[0],u=0;for(let l=0;l<n;l++)u+=c[l]/i,m.push(u);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=m[p+1]){let g=(l-m[p])/(m[p+1]-m[p]);if(p===0)return g*(2-g);let T=1-Math.pow(r,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var H={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Xe(),elastic:Ye()};function Ee(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ve(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function we(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function G(e,t,n,r){return n===t?0:Ee((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,s){let i=ve(e.top,e.height,t,r.element)-we(r.viewport,n),c=ve(e.top,e.height,t,s.element)-we(s.viewport,n);return {tStart:i,tEnd:c}}function Se(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Me(e,t,n){let r=xe(e),s=xe(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var je="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Re=33;function Ge(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ue(e){let t=[];for(let n=0;n<Re;n++){let r=n/(Re-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Te(e){switch(e){case "linear":return "linear";case "ease-in":return je;case "ease-out":return qe;case "ease-in-out":return Ge()?Ue(H["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Pe(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Pe().set(e,t);}function le(e){Pe().delete(e);}var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function U(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var z,Q=new Set,K=new WeakMap,k=new Map,$e=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Ae(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();z??(z=new ResizeObserver(s=>{let i=false;for(let{target:c}of s)K.get(c)!==$e(c)&&(i=true),K.set(c,"");i&&Q.forEach(c=>c());})),Q.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{K.has(s)||K.set(s,$e(s)),k.set(s,(k.get(s)??0)+1),z.observe(s);}),()=>{Q.delete(n)&&(r.forEach(s=>{let i=(k.get(s)??1)-1;if(i)return void k.set(s,i);k.delete(s),z?.unobserve(s);}),Q.size||(z?.disconnect(),z=void 0));}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],c=r[2].trim();if(c)for(let m of c.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Je(e,t,n){let r=Ie(e),s=Ie(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,c)=>{let m=s[c];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((u,l)=>`${u}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,l)=>`${u}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,l)=>`${u+(m.nums[l]-u)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function _e(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(Ze(r))return Me(r,s,n);if(r.includes("("))return Je(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),c=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&c){let m=parseFloat(i[1]),u=parseFloat(c[1]);return `${m+(u-m)*n}${i[2]||c[2]}`}return n<1?r:s}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:s={},easing:i="ease-out",speed:c=1,once:m=false,axis:u="y",scrollContainer:l,native:p=true,velocityScale:g=false,respectReducedMotion:T=true,triggerElement:N,onProgress:L,onComplete:P,onEnter:F,onLeave:B,onEnterBack:W,onLeaveBack:$}=t,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof i=="function"?i:H[i]??H["ease-out"],pe=ae(s.start??"top bottom"),fe=ae(s.end??"bottom top"),X=N??e,h=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([o,a])=>({prop:et(o),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function Ve(){let o=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=o.getPropertyValue(a.prop).trim()||"0");}function De(){for(let o of y)e.style.setProperty(o.prop,String(o.to));}let Z=new Map;for(let o of [...y.map(a=>a.prop),Ce])Z.set(o,e.style.getPropertyValue(o));function J(){for(let[o,a]of Z)a?e.style.setProperty(o,a):e.style.removeProperty(o);}if(O)return De(),P?.(),{...n,destroy:J,getProgress:()=>1};Ve();let de=typeof i=="string"?Te(i):null;function He(){if(!p||!rt()||!de||u!=="y"||h||X!==e||m||c!==1||L||P||F||B||W||$||g!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let o of y)if(!tt.has(o.prop))return false;return true}function ze(){let o=`ssd-a-${++nt}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${o}{from{${a}}to{${_}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(o);let f=()=>u==="x"?window.scrollX:window.scrollY,b=()=>u==="x"?window.innerWidth:window.innerHeight,C=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},f(),b(),pe,fe)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:C});let oe={refresh(){},destroy(){e.classList.remove(o),v.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(o);for(let ie of y)e.style.setProperty(ie.prop,_e(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=C();return S(G(f(),d,se,c))}};return oe}if(He())return ze();let E=0,w=0,x=0,Y=false,M=false,A=-1,I=0,j=false,R=NaN,ee=-1,ge=0,be=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,ke=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,V=X===e?y:[],he=false;function te(){let o=e.style,a=V.map(b=>o.getPropertyValue(b.prop)),_=o.transition;V.length&&(o.transition="none"),V.forEach(b=>o.setProperty(b.prop,Z.get(b.prop)??""));let v=Se(X,h,u);V.forEach((b,C)=>o.setProperty(b.prop,a[C])),V.length&&(e.offsetWidth,o.transition=_);let f=ue(v,v.scroll,ke(),pe,fe);he&&Math.abs(f.tStart-E)<1&&Math.abs(f.tEnd-w)<1||(he=true,E=f.tStart,w=f.tEnd);}function q(o){e.style.setProperty(Ce,String(o));for(let a of y)e.style.setProperty(a.prop,_e(a.from,a.to,o));L?.(o);}function Be(o){if(isNaN(R)){R=o;return}R<=0&&o>0?F?.():R>0&&o<=0&&$?.(),R<1&&o>=1?B?.():R>=1&&o<1&&W?.(),R=o;}function ne(){if(!Y||M)return;let o=performance.now(),a=be(),_=c;if(g!==false){let b=o-ge,C=b>0?Math.abs(a-(ee<0?a:ee))/b:0;_=c*Math.max(.2,1+C*(typeof g=="number"?g:1)*.04);}ee=a,ge=o;let v=w===E?0:(a-E)/(w-E);Be(v);let f=S(G(a,E,w,_));m&&(A=Math.max(A,f),f=A),I=f,q(f),f>=1&&!j?(j=true,P?.()):f<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===E&&U("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let o=S(G(be(),E,w,c));m&&o>0&&(A=o),I=o,q(o);}let ye=new IntersectionObserver(o=>{o.forEach(a=>{Y=a.isIntersecting,Y&&!M?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:h??null}),re;function D(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let We=Ae([X],D);return ye.observe(e),ce(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:E,tEnd:w})}),{destroy(){cancelAnimationFrame(x),ye.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),We(),clearTimeout(re),J(),le(e);},replay(){A=-1,j=false,I=0,M=false,q(0);},pause(){M=true,cancelAnimationFrame(x);},resume(){M&&(M=false,Y&&(x=requestAnimationFrame(ne)));},seek(o){let a=Math.min(1,Math.max(0,o));I=a,A=a,M=true,cancelAnimationFrame(x),q(a);},getProgress(){return I},refresh(){te();}}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Fe(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(s=>{let i=s.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Oe={destroy:()=>{}};function At(e,t={}){if(typeof window>"u")return Oe;let n=it(e);if(!n.length)return U("scrollReveal: no elements found:",e),Oe;let{preset:r="fadeUp",from:s,stagger:i=.15,easing:c="ease-out",once:m=true,trigger:u,onEnter:l,onLeave:p}=t,g={...ot[r],...s},T=st(g),N=u?.start??"top 88%",L=u?.end??"top 53%",P=Math.abs(me(N)[1]-me(L)[1]),F=Math.min(Math.max(i,0),1)*P,B=F>0?at(n):n.map(()=>0),W=n.map(($,O)=>{let S=Math.min(B[O]*F,P);return Ne($,{props:T,easing:c,once:m,native:false,trigger:S>0?{start:Fe(N,S),end:Fe(L,S)}:{start:N,end:L},onEnter:O===0?l:void 0,onLeave:O===n.length-1?p:void 0})});return {destroy(){W.forEach($=>$.destroy());}}}exports.scrollReveal=At;
1
+ 'use strict';function je({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,u=[];for(let l=0;l<n;l++){let f=Math.pow(o,l);u.push(f),i+=f;}let m=[0],c=0;for(let l=0;l<n;l++)c+=u[l]/i,m.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let f=0;f<n;f++)if(l<=m[f+1]){let g=(l-m[f])/(m[f+1]-m[f]);if(f===0)return g*(2-g);let T=1-Math.pow(r,f);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),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 D={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:je(),elastic:Ye()};function be(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ye(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 ve(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 q(e,t,n,r){return n===t?0:be((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,o){let i=ye(e.top,e.height,t,r.element)-ve(r.viewport,n),u=ye(e.top,e.height,t,o.element)-ve(o.viewport,n);return {tStart:i,tEnd:u}}function Ee(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.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function we(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 Se(e,t,n){let r=we(e),o=we(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 qe="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ge="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Me=33;function Ue(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ke(e){let t=[];for(let n=0;n<Me;n++){let r=n/(Me-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function xe(e){switch(e){case "linear":return "linear";case "ease-in":return qe;case "ease-out":return Ge;case "ease-in-out":return Ue()?Ke(D["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Re(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Re().set(e,t);}function le(e){Re().delete(e);}var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function G(e,...t){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var H,U=new Set,K=new WeakMap,W=new Map,Te=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Je(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 Pe(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();H??(H=new ResizeObserver(o=>{let i=false;for(let{target:u}of o)K.get(u)!==Te(u)&&(i=true),K.set(u,"");i&&U.forEach(u=>u());})),U.add(n);let r=Je(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{K.has(o)||K.set(o,Te(o)),W.set(o,(W.get(o)??0)+1),H.observe(o);}),()=>{U.delete(n)&&(r.forEach(o=>{let i=(W.get(o)??1)-1;if(i)return void W.set(o,i);W.delete(o),H?.unobserve(o);}),U.size||(H?.disconnect(),H=void 0));}}function $e(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 Ae(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=$e(i=>{if(!i)return;r();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=t(u?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(n))o[i]=(...u)=>n[i]?.(...u);return o.destroy=()=>{r(),n.destroy();},o}function et(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],i=[],u=r[2].trim();if(u)for(let m of u.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:i});}return t}function tt(e,t,n){let r=Ie(e),o=Ie(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((i,u)=>{let m=o[u];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((c,l)=>`${c}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,l)=>`${c}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,l)=>`${c+(m.nums[l]-c)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function Ce(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(et(r))return Se(r,o,n);if(r.includes("("))return tt(r,o,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),u=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&u){let m=parseFloat(i[1]),c=parseFloat(u[1]);return `${m+(c-m)*n}${i[2]||u[2]}`}return n<1?r:o}function nt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var rt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ot=0,_e="--scroll-draw-progress";function st(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Oe={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Fe(e,t){return typeof window>"u"?Oe:t.respectReducedMotion===false?Ne(e,t,false):Ae(t,(n,r)=>Ne(e,n,r))}function Ne(e,t,n){let{props:r,trigger:o={},easing:i="ease-out",speed:u=1,once:m=false,axis:c="y",scrollContainer:l,native:f=true,velocityScale:g=false,triggerElement:T,onProgress:P,onComplete:S,onEnter:O,onLeave:F,onEnterBack:z,onLeaveBack:B}=t,M=typeof i=="function"?i:D[i]??D["ease-out"],$=ae(o.start??"top bottom"),A=ae(o.end??"bottom top"),X=T??e,b=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([s,a])=>({prop:nt(s),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function De(){let s=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=s.getPropertyValue(a.prop).trim()||"0");}function He(){for(let s of y)e.style.setProperty(s.prop,String(s.to));}let Z=new Map;for(let s of [...y.map(a=>a.prop),_e])Z.set(s,e.style.getPropertyValue(s));function J(){for(let[s,a]of Z)a?e.style.setProperty(s,a):e.style.removeProperty(s);}if(n)return He(),S?.(),{...Oe,destroy:J,getProgress:()=>1};De();let fe=typeof i=="string"?xe(i):null;function We(){if(!f||!st()||!fe||c!=="y"||b||X!==e||m||u!==1||P||S||O||F||z||B||g!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let s of y)if(!rt.has(s.prop))return false;return true}function ze(){let s=`ssd-a-${++ot}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),E=document.createElement("style");E.setAttribute("data-ssd-animate",""),E.textContent=`@keyframes ${s}{from{${a}}to{${_}}}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(E),e.classList.add(s);let p=()=>c==="x"?window.scrollX:window.scrollY,h=()=>c==="x"?window.innerWidth:window.innerHeight,N=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},p(),h(),$,A)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:N});let oe={refresh(){},destroy(){e.classList.remove(s),E.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(s),e.offsetWidth,e.classList.add(s);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(s);for(let ie of y)e.style.setProperty(ie.prop,Ce(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=N();return M(q(p(),d,se,u))}};return oe}if(We())return ze();let v=0,w=0,x=0,Q=false,L=false,I=-1,C=0,j=false,R=NaN,ee=-1,pe=0,de=()=>b?c==="x"?b.scrollLeft:b.scrollTop:c==="x"?window.scrollX:window.scrollY,Be=()=>b?c==="x"?b.clientWidth:b.clientHeight:c==="x"?window.innerWidth:window.innerHeight,k=X===e?y:[],ge=false;function te(){let s=e.style,a=k.map(h=>s.getPropertyValue(h.prop)),_=s.transition;k.length&&(s.transition="none"),k.forEach(h=>s.setProperty(h.prop,Z.get(h.prop)??""));let E=Ee(X,b,c);k.forEach((h,N)=>s.setProperty(h.prop,a[N])),k.length&&(e.offsetWidth,s.transition=_);let p=ue(E,E.scroll,Be(),$,A);ge&&Math.abs(p.tStart-v)<1&&Math.abs(p.tEnd-w)<1||(ge=true,v=p.tStart,w=p.tEnd);}function Y(s){e.style.setProperty(_e,String(s));for(let a of y)e.style.setProperty(a.prop,Ce(a.from,a.to,s));P?.(s);}function Xe(s){if(isNaN(R)){R=s;return}R<=0&&s>0?O?.():R>0&&s<=0&&B?.(),R<1&&s>=1?F?.():R>=1&&s<1&&z?.(),R=s;}function ne(){if(!Q||L)return;let s=performance.now(),a=de(),_=u;if(g!==false){let h=s-pe,N=h>0?Math.abs(a-(ee<0?a:ee))/h:0;_=u*Math.max(.2,1+N*(typeof g=="number"?g:1)*.04);}ee=a,pe=s;let E=w===v?0:(a-v)/(w-v);Xe(E);let p=M(q(a,v,w,_));m&&(I=Math.max(I,p),p=I),C=p,Y(p),p>=1&&!j?(j=true,S?.()):p<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===v&&G("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let s=M(q(de(),v,w,u));m&&s>0&&(I=s),C=s,Y(s);}let he=new IntersectionObserver(s=>{s.forEach(a=>{Q=a.isIntersecting,Q&&!L?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:b??null}),re;function V(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",V),window.addEventListener("orientationchange",V);let Qe=Pe([X],V);return he.observe(e),ce(e,{type:"animate",getProgress:()=>C,getTrigger:()=>({tStart:v,tEnd:w})}),{destroy(){cancelAnimationFrame(x),he.disconnect(),window.removeEventListener("resize",V),window.removeEventListener("orientationchange",V),Qe(),clearTimeout(re),J(),le(e);},replay(){I=-1,j=false,C=0,L=false,Y(0);},pause(){L=true,cancelAnimationFrame(x);},resume(){L&&(L=false,Q&&(x=requestAnimationFrame(ne)));},seek(s){let a=Math.min(1,Math.max(0,s));C=a,I=a,L=true,cancelAnimationFrame(x),Y(a);},getProgress(){return C},refresh(){te();}}}var it={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function at(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function ut(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function ke(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function ct(e){let t=NaN,n=0,r=0;return e.map(o=>{let i=o.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Ve={destroy:()=>{}};function Ft(e,t={}){if(typeof window>"u")return Ve;let n=ut(e);if(!n.length)return G("scrollReveal: no elements found:",e),Ve;let{preset:r="fadeUp",from:o,stagger:i=.15,easing:u="ease-out",once:m=true,trigger:c,onEnter:l,onLeave:f}=t,g={...it[r],...o},T=at(g),P=c?.start??"top 88%",S=c?.end??"top 53%",O=Math.abs(me(P)[1]-me(S)[1]),F=Math.min(Math.max(i,0),1)*O,z=F>0?ct(n):n.map(()=>0),B=n.map((M,$)=>{let A=Math.min(z[$]*F,O);return Fe(M,{props:T,easing:u,once:m,native:false,trigger:A>0?{start:ke(P,A),end:ke(S,A)}:{start:P,end:S},onEnter:$===0?l:void 0,onLeave:$===n.length-1?f:void 0})});return {destroy(){B.forEach(M=>M.destroy());}}}exports.scrollReveal=Ft;
@@ -1 +1 @@
1
- import {a}from'../chunk-BFX2CSQ3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-LTCJVVSC.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1 +1 @@
1
- import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var O={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function G(s){return typeof s=="string"?Array.from(document.querySelectorAll(s)):s instanceof NodeList?Array.from(s):s}function Q(s,q={}){if(typeof window>"u")return O;let r=G(s);if(!r.length)return b("scrollSnap: no sections found"),O;let{direction:z="vertical",duration:B=600,easing:m="ease-in-out",threshold:b$2=.3,scrollContainer:d$1,onSnap:p,respectReducedMotion:y=true}=q,E=y&&a(),P=y?a$1(e=>{E=e;}):()=>{},X=typeof m=="function"?m:d[m]??d["ease-in-out"],i=z==="horizontal",o=typeof d$1=="string"?document.querySelector(d$1):d$1??null,n=0,l=false,f=0;function L(){return o?i?o.scrollLeft:o.scrollTop:i?window.scrollX:window.scrollY}function M(e){o?i?o.scrollLeft=e:o.scrollTop=e:window.scrollTo(i?{left:e}:{top:e});}function g(){return r.map(e=>{let t=e.getBoundingClientRect();if(o){let c=o.getBoundingClientRect();return i?t.left-c.left+o.scrollLeft:t.top-c.top+o.scrollTop}return i?t.left+window.scrollX:t.top+window.scrollY})}function u(e){let t=a$3(e,0,r.length-1);l&&(cancelAnimationFrame(f),l=false),l=true;let c=g(),a=L(),T=c[t];if(Math.abs(a-T)<1){l=false,n=t,p?.(t);return}if(E){M(T),l=false,n=t,p?.(t);return}let Y=performance.now();function I(_){let A=a$3((_-Y)/B,0,1);M(a+(T-a)*X(A)),A<1?f=requestAnimationFrame(I):(l=false,n=t,p?.(t));}f=requestAnimationFrame(I);}let S;function v(){l||(clearTimeout(S),S=setTimeout(()=>{let e=L(),t=g();if(Math.abs(e-t[n])<1)return;let c=i?r[n].offsetWidth:r[n].offsetHeight,a=e-t[n];a>c*b$2&&n<r.length-1?u(n+1):a<-(c*b$2)&&n>0?u(n-1):u(n);},100));}let x=o??window;return x.addEventListener("scroll",v,{passive:true}),a$2(r[0],{type:"snap",getProgress:()=>n/(r.length-1||1),getTrigger:()=>{let e=g();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(f),clearTimeout(S),x.removeEventListener("scroll",v),P(),b$1(r[0]);},snapTo:u,getCurrentIndex(){return n}}}export{Q as scrollSnap};
1
+ import {a}from'../chunk-AJ22VSHC.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var O={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function G(s){return typeof s=="string"?Array.from(document.querySelectorAll(s)):s instanceof NodeList?Array.from(s):s}function Q(s,q={}){if(typeof window>"u")return O;let r=G(s);if(!r.length)return b("scrollSnap: no sections found"),O;let{direction:z="vertical",duration:B=600,easing:m="ease-in-out",threshold:b$2=.3,scrollContainer:d$1,onSnap:p,respectReducedMotion:y=true}=q,E=y&&a(),P=y?a$1(e=>{E=e;}):()=>{},X=typeof m=="function"?m:d[m]??d["ease-in-out"],i=z==="horizontal",o=typeof d$1=="string"?document.querySelector(d$1):d$1??null,n=0,l=false,f=0;function L(){return o?i?o.scrollLeft:o.scrollTop:i?window.scrollX:window.scrollY}function M(e){o?i?o.scrollLeft=e:o.scrollTop=e:window.scrollTo(i?{left:e}:{top:e});}function g(){return r.map(e=>{let t=e.getBoundingClientRect();if(o){let c=o.getBoundingClientRect();return i?t.left-c.left+o.scrollLeft:t.top-c.top+o.scrollTop}return i?t.left+window.scrollX:t.top+window.scrollY})}function u(e){let t=a$3(e,0,r.length-1);l&&(cancelAnimationFrame(f),l=false),l=true;let c=g(),a=L(),T=c[t];if(Math.abs(a-T)<1){l=false,n=t,p?.(t);return}if(E){M(T),l=false,n=t,p?.(t);return}let Y=performance.now();function I(_){let A=a$3((_-Y)/B,0,1);M(a+(T-a)*X(A)),A<1?f=requestAnimationFrame(I):(l=false,n=t,p?.(t));}f=requestAnimationFrame(I);}let S;function v(){l||(clearTimeout(S),S=setTimeout(()=>{let e=L(),t=g();if(Math.abs(e-t[n])<1)return;let c=i?r[n].offsetWidth:r[n].offsetHeight,a=e-t[n];a>c*b$2&&n<r.length-1?u(n+1):a<-(c*b$2)&&n>0?u(n-1):u(n);},100));}let x=o??window;return x.addEventListener("scroll",v,{passive:true}),a$2(r[0],{type:"snap",getProgress:()=>n/(r.length-1||1),getTrigger:()=>{let e=g();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(f),clearTimeout(S),x.removeEventListener("scroll",v),P(),b$1(r[0]);},snapTo:u,getCurrentIndex(){return n}}}export{Q as scrollSnap};
@@ -1,3 +1,3 @@
1
- 'use strict';var solidJs=require('solid-js');function sr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),s=0,a=[];for(let d=0;d<r;d++){let T=Math.pow(i,d);a.push(T),s+=T;}let u=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<r;T++)if(d<=u[T+1]){let R=(d-u[T])/(u[T+1]-u[T]);if(T===0)return R*(2-R);let A=1-Math.pow(t,T);return A+(1-A)*(2*R-1)*(2*R-1)}return 1}}function ir({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/t)+1}var le={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:sr(),elastic:ir()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function be(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function kt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Ot(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,i){let s=kt(e.top,e.height,n,t.element)-Ot(t.viewport,r),a=kt(e.top,e.height,n,i.element)-Ot(i.viewport,r);return {tStart:s,tEnd:a}}function ot(e,n,r){let t=e.getBoundingClientRect(),i=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function It(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Ue(e,n,r){let t=It(e),i=It(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[2]-t[2])*r)})`}var Ft={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 we(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Dt=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let n=[];for(let r=0;r<Dt;r++){let t=r/(Dt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(le["ease-in-out"]):null;default:return null}}var Rt=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Rt]||(e[Rt]=new Map)}function Oe(e,n){Ht().set(e,n);}function Ie(e){Ht().delete(e);}var Qe,it=new Set,at=new WeakMap,Ze=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function mr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(i=>{let s=false;for(let{target:a}of i)at.get(a)!==Nt(a)&&(s=true),at.set(a,"");s&&it.forEach(a=>a());})),it.add(r);let t=mr(e);return [document.body,document.documentElement].forEach(i=>i&&t.add(i)),t.forEach(i=>{at.has(i)||at.set(i,Nt(i)),Ze.set(i,(Ze.get(i)??0)+1),Qe.observe(i);}),()=>{it.delete(r)&&(t.forEach(i=>{let s=(Ze.get(i)??1)-1;if(s)return void Ze.set(i,s);Ze.delete(i),Qe?.unobserve(i);}),it.size||(Qe?.disconnect(),Qe=void 0));}}var fr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Vt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var zt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Ke)return;let n=Vt(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!zt.has(r)&&!zt.has(Vt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,u=n-s,m=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,n,r){if(!Ke)return;let t=(e.match(Wt)??[]).join("").toUpperCase(),i=(n.match(Wt)??[]).join("").toUpperCase(),s=(e.match(_t)??[]).length,a=(n.match(_t)??[]).length;if(t!==i){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=t[i++]??a;return String(+(a+(u-a)*r).toFixed(4))})}function gt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...Ft[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:te=false,debug:Pe=false,axis:G="y",scrollContainer:ce,autoReverse:re=false,delay:Y=0,strokeColor:H,strokeWidth:P,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:ne=0,morphTo:L,clip:oe,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:N,onStart:C,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=i,v=oe===true?"left":typeof oe=="string"?oe:false,V=typeof d=="function"?d:le[d]??le.linear,ue=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ce=="string"?document.querySelector(ce):ce??null,Ae=Array.isArray(H)?H[0]:null,me=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,se=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ie=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let l=o*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(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let z=v?[]:Array.from(e.querySelectorAll(a)),F=[],fe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,pe=false,he=-1,Ve=[],ae=-1,j=false,Te=0,ze=0,_e,lt=null;function Et(){lt?.destroy(),lt=null;}let We=new Set,St=NaN,qe=true,Je=-1,Tt=performance.now(),Be=NaN;function Ye(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function xt(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,xt(),ue,He)}function Jt(){let o=Se-J,l=z.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=R,R>0&&l>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(R,Le/(l*o)));}h=Se+l*c*o;}function At(){(({tStart:J,tEnd:Se}=Mt())),Jt(),Pe&&Ke&&(Et(),lt=gr(J,Se,G));}function ct(o,l=Mt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function er(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=l==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}z.forEach((y,Q)=>{y.style.strokeDashoffset=l==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=l==="reverse"?`${1-o}`:`${o}`),Ae&&me?y.style.stroke=Ue(Ae,me,o):me&&(y.style.stroke=me),X!==null&&se!==null?y.style.strokeWidth=`${X+(se-X)*o}`:se!==null&&(y.style.strokeWidth=`${se}`),ie!==null&&K!==null?y.style.fillOpacity=`${ie+(K-ie)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&fe[Q]&&y.setAttribute("d",dt(fe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}z.forEach((o,l)=>{o.style.strokeDasharray=`${F[l]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[l]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`),L&&o.tagName.toLowerCase()==="path"&&fe[l]&&o.setAttribute("d",fe[l]);});}if(z.forEach(o=>{dr(o);let l=je(o);F.push(l);let y=o.tagName.toLowerCase()==="path";y?fe.push(o.getAttribute("d")??""):fe.push(""),L&&(y?yr(fe[fe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?`${l}`:"0",m&&(o.style.opacity="1"),me&&(o.style.stroke=me),se!==null&&(o.style.strokeWidth=`${se}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?"0":`${l}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),v){if(s)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Lt=typeof d=="string"?st(d):null;function tr(){return !(ye===false||!pr()||!z.length||!Lt||v||G!=="y"||Ee||u!==1||R!==0||te||re||k!==false||L||w||E||Y>0||N||C||f||p||I||q||Me||H!=null||P!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function rr(){let o=++fr,l=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Lt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(l);}z.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Ce({top:g.top,height:g.height},Ye(),xt(),ue,He);return V(ee(Ye(),Z,$e,u))}return {destroy(){e.classList.remove(y),z.forEach(g=>{g.classList.remove(l),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,z.forEach(de);},pause(){b=true,z.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,z.forEach(($e,xe)=>{$e.classList.remove(l),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){z.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(tr())return ct(rr());function nr(){let o=Math.max(1,ge),l=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=V(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),N?.(g),U<1&&(W=false);}else z.forEach((U,g)=>{let Z=g*R*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=V($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&me?U.style.stroke=Ue(Ae,me,xe):me&&(U.style.stroke=me),X!==null&&se!==null?U.style.strokeWidth=`${X+(se-X)*xe}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&K!==null?U.style.fillOpacity=`${ie+(K-ie)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&fe[g]&&U.setAttribute("d",dt(fe[g],L,xe)),g===0&&(Te=xe,N?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=V(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!We.has($e)&&(We.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-l;B||(B=true,C?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*R)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{l=performance.now(),B=false,_=false,We.clear(),et(),$=requestAnimationFrame(Fe);},ne));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(_e),l=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,We.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(te&&_)?ke():!W.isIntersecting&&!te&&!_&&(cancelAnimationFrame($),clearTimeout(_e),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-l,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,l=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,l=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(nr());At();function $t(){if(j||!Ge)return;let o=performance.now(),l=Ye();if(!qe&&k===false&&l===St){mt(l);return}qe=false,St=l;let y=u;if(k!==false){let S=o-Tt,D=S>0?Math.abs(l-(Je<0?l:Je))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Je=l,Tt=o;let Q=re?ae===-1||l>=ae?"forward":"reverse":A;ae=l;let Le=Se-J,Fe=true,ke=Le===0?0:(l-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=V(ee(l,J,Se,y));te&&!re&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),N?.(S),!B&&ee(l,J,Se,y)>0&&(B=true,C?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},ne))):S<1&&!te&&(_=false),mt(l);return}if(z.forEach((S,D)=>{let de=D*c*Le,b=V(ee(l,J+de,Se+de,y));te&&!re&&(b=Ve[D]=Math.max(Ve[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&me?S.style.stroke=Ue(Ae,me,b):me&&(S.style.stroke=me),X!==null&&se!==null?S.style.strokeWidth=`${X+(se-X)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&K!==null?S.style.fillOpacity=`${ie+(K-ie)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&fe[D]&&S.setAttribute("d",dt(fe[D],L,b)),D===0&&(Te=b,N?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=V(ee(l,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!We.has(de)&&(We.add(de),w[D]?.());}}!B&&ee(l,J,Se,y)>0&&(B=true,C?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,Ve=[],B=false,_=false,We.clear(),et(),qe=true;},ne))):!Fe&&!te&&(_=false),mt(l);}function ut(o){return o>=Se&&o<h}function mt(o){pe||ut(o)?$=requestAnimationFrame($t):Ge=false;}function ft(){return pe||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){$t();}));}function rt(){Ge=false,cancelAnimationFrame($);}let pt=new IntersectionObserver(o=>{o.forEach(l=>{pe=l.isIntersecting,pe&&!j?(qe=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function Ct(){z.forEach((o,l)=>{F[l]=je(o),o.style.strokeDasharray=`${F[l]}`;}),At(),qe=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Ct,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let or=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(_e),rt(),pt.disconnect(),or(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),Et();},replay(){he=-1,Ve=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Te=0,We.clear(),clearTimeout(_e),et(),qe=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,qe=true,ft()&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));Te=l,he=l,Ve=[],j=true,rt(),er(l,A),qe=true;},getProgress(){return Te},refresh(){clearTimeout(nt),Ct(),ft()&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var qt=new WeakMap,hr=0;function Bt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++hr),`el#${t}`}return r})}function Gt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function br(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function jt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],s=[],a=t[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:s});}return n}function wr(e,n,r){let t=jt(e),i=jt(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((s,a)=>{let u=i[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function Ut(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(br(t))return Ue(t,i,r);if(t.includes("("))return wr(t,i,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),m=parseFloat(a[1]);return `${u+(m-u)*r}${s[2]||a[2]}`}return r<1?t:i}function vr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Er=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Sr=0,Yt="--scroll-draw-progress";function Tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function yt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:s="ease-out",speed:a=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:te,onProgress:Pe,onComplete:G,onEnter:ce,onLeave:re,onEnterBack:Y,onLeaveBack:H}=n,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:le[s]??le["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=te??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:vr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function ne(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let oe=new Map;for(let c of [...E.map(h=>h.prop),Yt])oe.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of oe)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};ne();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Tr()||!ge||m!=="y"||M||x!==e||u||a!==1||Pe||G||ce||re||Y||H||R!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!Er.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Sr}`,h=E.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=E.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,pe=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let ae=e.getBoundingClientRect();return Ce({top:ae.top,height:ae.height},$(),pe(),w,k)};Oe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:he});let Ve={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,Ut(Te.from,Te.to,j));},getProgress(){let{tStart:ae,tEnd:j}=he();return O(ee($(),ae,j,a))}};return Ve}if(ye())return N();let C=0,f=0,p=0,I=false,q=false,Me=-1,v=0,V=false,ue=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],se=false;function ie(){let c=e.style,h=X.map(pe=>c.getPropertyValue(pe.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(pe=>c.setProperty(pe.prop,oe.get(pe.prop)??""));let B=ot(x,M,m);X.forEach((pe,he)=>c.setProperty(pe.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,me(),w,k);se&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(se=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Yt,String(c));for(let h of E)e.style.setProperty(h.prop,Ut(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(ue)){ue=c;return}ue<=0&&c>0?ce?.():ue>0&&c<=0&&H?.(),ue<1&&c>=1?re?.():ue>=1&&c<1&&Y?.(),ue=c;}function z(){if(!I||q)return;let c=performance.now(),h=Ae(),_=a;if(R!==false){let pe=c-Ee,he=pe>0?Math.abs(h-(He<0?h:He))/pe:0;_=a*Math.max(.2,1+he*(typeof R=="number"?R:1)*.04);}He=h,Ee=c;let B=f===C?0:(h-C)/(f-C);Ne(B);let $=O(ee(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ie(),f===C&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(ee(Ae(),C,f,a));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(z):cancelAnimationFrame(p);});},{root:M??null}),fe;function J(){clearTimeout(fe),fe=setTimeout(ie,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(fe),ve(),Ie(e);},replay(){Me=-1,V=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ie();}}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n){if(typeof window>"u")return ht;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),ht;let t=r,{from:i=0,to:s,format:a,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:R}=n,A=T!==void 0?f=>f.toFixed(T):a??(f=>String(Math.round(f))),te=typeof u=="function"?u:le[u]??le["ease-out"],Pe=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),R?.(),ht;let re=0,Y=0,H=false,P=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,ne=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),ne(),Pe,G);H&&Math.abs(p.tStart-re)<1&&Math.abs(p.tEnd-Y)<1||(H=true,re=p.tStart,Y=p.tEnd);}function oe(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=te(ee(E(),re,Y,1));d&&(k=Math.max(k,f),f=k),x=f,oe(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=te(ee(E(),re,Y,1));d&&f>0&&(k=f),x=f,oe(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?P=requestAnimationFrame(ve):cancelAnimationFrame(P);});}),ye;function N(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",N),window.addEventListener("orientationchange",N);let C=De([t],N);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:re,tEnd:Y})}),{destroy(){cancelAnimationFrame(P),ge.disconnect(),window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),C(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(P);},resume(){w&&(w=false,O&&(P=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(P),oe(p);},getProgress(){return x}}}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function wt(e,n={}){if(typeof window>"u")return Xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Xt;let t=r,{trigger:i={},easing:s="linear",once:a=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:R,onProgress:A}=n,te=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:le[s]??le.linear,ce=be(i.start??"top top"),re=be(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,H=n.to,P=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=false,oe=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=te.getBoundingClientRect(),V=u==="x"?v.left:v.top,ue=u==="x"?v.width:v.height,He=Ce({top:V,height:ue},oe(),ve(),ce,re);P=He.tStart,O=He.tEnd,L&&O===P&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function N(v){if(!L)return;let V=H??t.duration??0,ue=Y+(V-Y)*v;ue!==ye&&(ye=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(ee(oe(),P,O,1));a&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!ne?(ne=true,R?.()):v<1&&!a&&(ne=false),w=requestAnimationFrame(C);}function f(){if(L=true,H===void 0&&(H=t.duration),Pe){N(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(C));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(V=>{k=V.isIntersecting,k&&!x&&L?w=requestAnimationFrame(C):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([te],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,ye=NaN,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(C)));},seek(v){let V=Math.min(1,Math.max(0,v));E=V,M=V,x=true,cancelAnimationFrame(w),ye=NaN,N(V);},getProgress(){return E}}}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function xr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Kt(e){let n=Zt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],i=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of i){let a=r.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<a.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Mr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,s=n*t,a=s+(1-i);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Ar(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,n={}){if(typeof window>"u")return Qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Qt;let t=r,{split:i="words",stagger:s=.04,easing:a="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof a=="function"?a:le[a]??le["ease-out"],te=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ce;i==="chars"?ce=xr(t):i==="lines"?ce=Kt(t):ce=Zt(t);let re=ce.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Ar(I,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ce.forEach((I,q)=>{let Me=A(Mr(p,q,re,s));Y(I,Me);});}if(R)return H(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let P=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=()=>window.scrollY,oe=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Ce({top:p.top,height:p.height},L(),oe(),te,Pe);P=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=ee(L(),P,O,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!ne?(ne=true,T?.()):p<1&&!d&&(ne=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),N;function C(){clearTimeout(N),N=setTimeout(()=>{if(i==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ce=Kt(t),H(p);}ve();},150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let f=De([t],C);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),f(),clearTimeout(N),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,H(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),H(I);},getProgress(){return E}}}function Re(e,n){let r,t,i,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=Bt(s);!r||a===i||(i=a,solidJs.untrack(()=>{t?.destroy(),t=n(r,Gt(s,()=>s));}));}),solidJs.onCleanup(()=>{t?.destroy(),t=i=void 0;}),{ref:a=>{r=a;},getInstance:()=>t}}function Rn(e={}){return Re(e,gt).ref}function Hn(e={}){return Re(e,gt)}function Nn(e){return Re(e,yt).ref}function Vn(e){return Re(e,yt)}function zn(e){return Re(e,bt).ref}function _n(e){return Re(e,bt)}function Wn(e={}){return Re(e,wt).ref}function qn(e={}){return Re(e,wt)}function Bn(e={}){return Re(e,vt).ref}function Gn(e={}){return Re(e,vt)}exports.createScrollAnimate=Vn;exports.createScrollCounter=_n;exports.createScrollDraw=Hn;exports.createScrollText=Gn;exports.createScrollVideo=qn;exports.useScrollAnimate=Nn;exports.useScrollCounter=zn;exports.useScrollDraw=Rn;exports.useScrollText=Bn;exports.useScrollVideo=Wn;
1
+ 'use strict';var solidJs=require('solid-js');function mn({bounces:e=3,decay:r=.5}={}){let t=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(n),i=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(s,d);a.push(x),i+=x;}let m=[0],f=0;for(let d=0;d<t;d++)f+=a[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let R=(d-m[x])/(m[x+1]-m[x]);if(x===0)return R*(2-R);let C=1-Math.pow(n,x);return C+(1-C)*(2*R-1)*(2*R-1)}return 1}}function fn({amplitude:e=1,period:r=.4}={}){let t=Math.max(1,e),n=Math.max(.1,r),s=t<=1?n/4:n/(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)/n)+1}var oe={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:mn(),elastic:fn()};function Ot(e,r,t){return Math.min(t,Math.max(r,e))}function ye(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[t="top",n="bottom"]=r.split(/\s+/).filter(Boolean);return {element:t,viewport:n}}function It(e,r,t,n){switch(n){case "top":return e+t;case "center":return e+t+r/2;case "bottom":return e+t+r;default:return e+t}}function Dt(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 ee(e,r,t,n){return t===r?0:Ot((e-r)/(t-r)*n,0,1)}function Le(e,r,t,n,s){let i=It(e.top,e.height,r,n.element)-Dt(n.viewport,t),a=It(e.top,e.height,r,s.element)-Dt(s.viewport,t);return {tStart:i,tEnd:a}}function st(e,r,t){let n=e.getBoundingClientRect(),s=t==="x"?n.width:n.height;return r?{top:t==="x"?n.left-r.getBoundingClientRect().left+r.scrollLeft:n.top-r.getBoundingClientRect().top+r.scrollTop,height:s,scroll:0}:{top:t==="x"?n.left:n.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function Qe(e){let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(t+n)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ft(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 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ue(e,r,t){let n=Ft(e),s=Ft(r);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*t)},${Math.round(n[1]+(s[1]-n[1])*t)},${Math.round(n[2]+(s[2]-n[2])*t)})`}var Rt={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 he(e,...r){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var pn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",dn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ht=33;function gn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function yn(e){let r=[];for(let t=0;t<Ht;t++){let n=t/(Ht-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return pn;case "ease-out":return dn;case "ease-in-out":return gn()?yn(oe["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function Vt(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Pe(e,r){Vt().set(e,r);}function ke(e){Vt().delete(e);}var Ze,at=new Set,lt=new WeakMap,Je=new Map,zt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function hn(e){let r=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling)r.add(n);return r}function Fe(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>r();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==zt(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(t);let n=hn(e);return [document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{lt.has(s)||lt.set(s,zt(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{at.delete(t)&&(n.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),at.size||(Ze?.disconnect(),Ze=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",t),()=>r.removeEventListener("change",t);let n=r;return n.addListener?.(t),()=>n.removeListener?.(t)}function Be(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let t=r(e,false),n=ct(i=>{if(!i)return;n();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=r(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...a)=>t[i]?.(...a);return s.destroy=()=>{n(),t.destroy();},s}var bn=0;function wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function _t(e,r){let t="";try{t=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return t||(e.getAttribute(r)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function vn(e){if(!Ke)return;let r=_t(e,"stroke");if(!r||r==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Wt.has(t)&&!Wt.has(_t(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function En(e,r,t){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.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,a=e-i,m=r-i,f=t==="x";n.innerHTML=`
2
+ <div style="position:absolute;${f?`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;${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(n),window.addEventListener("scroll",s,{passive:true}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove();}}}var qt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Bt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sn(e,r,t){if(!Ke)return;let n=(e.match(Bt)??[]).join("").toUpperCase(),s=(r.match(Bt)??[]).join("").toUpperCase(),i=(e.match(qt)??[]).length,a=(r.match(qt)??[]).length;if(n!==s){he(`morphTo: command sequence differs (${n||"\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!==a&&he(`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.`,t);}function yt(e,r,t){let n=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=n[s++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function ht(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Be(r,(t,n)=>Tn(e,t,n))}function Tn(e,r,t){let{preset:n,...s}=r,i=n?{...Rt[n],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:x={},stagger:R=0,direction:C="forward",once:Q=false,debug:me=false,axis:I="y",scrollContainer:se,autoReverse:be=false,delay:D=0,strokeColor:H,strokeWidth:k,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Ee=false,duration:ie=1e3,native:z=true,onProgress:u,onStart:A,onComplete:h,onEnter:O,onLeave:te,onEnterBack:pe,onLeaveBack:Se}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,E=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(H)?H[0]:null,ne=Array.isArray(H)?H[1]:typeof H=="string"?H:null,re=Array.isArray(k)?k[0]:null,Y=Array.isArray(k)?k[1]:typeof k=="number"?k:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let c=o*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),P=[],we=[],l=0,p=0,$e=R,Te=0,$=false,V=false,G=0,Ve=false,q=-1,He=[],ze=-1,ce=false,Ie=0,Ne=0,_e,ut=null;function Tt(){ut?.destroy(),ut=null;}let We=new Set,xt=NaN,qe=true,et=-1,Mt=performance.now(),Ge=NaN;function Ye(){return ae?I==="x"?ae.scrollLeft:ae.scrollTop:I==="x"?window.scrollX:window.scrollY}function Lt(){return ae?I==="x"?ae.clientWidth:ae.clientHeight:I==="x"?window.innerWidth:window.innerHeight}function At(){let o=st(e,ae,I);return Le(o,o.scroll,Lt(),de,Ae)}function on(){let o=p-l,c=_.length-1,y=ae??document.documentElement,X=I==="x"?"Width":"Height";if($e=R,R>0&&c>0&&o>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-o/m;xe>=0&&($e=Math.min(R,xe/(c*o)));}Te=p+c*$e*o;}function $t(){(({tStart:l,tEnd:p}=At())),on(),me&&Ke&&(Tt(),ut=En(l,p,I));}function mt(o,c=At){Pe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),ke(e);},o}function sn(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),Z){let y=c==="reverse"?1-o:o;e.style.clipPath=Oe(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${P[X]*o}`:`${P[X]*(1-o)}`,f&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),le&&ne?y.style.stroke=Ue(le,ne,o):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*o}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",yt(we[X],L,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=Oe(0);return}_.forEach((o,c)=>{o.style.strokeDasharray=`${P[c]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${P[c]}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`),L&&o.tagName.toLowerCase()==="path"&&we[c]&&o.setAttribute("d",we[c]);});}if(_.forEach(o=>{vn(o);let c=Qe(o);P.push(c);let y=o.tagName.toLowerCase()==="path";y?we.push(o.getAttribute("d")??""):we.push(""),L&&(y?Sn(we[we.length-1],L,o):he(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?`${c}`:"0",f&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Y!==null&&(o.style.strokeWidth=`${Y}`),J!==null&&(o.style.fillOpacity=`${J}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?"0":`${c}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),Z){if(t)return e.style.clipPath=Oe(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(t)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Ct=typeof d=="string"?it(d):null;function an(){return !(z===false||!wn()||!_.length||!Ct||Z||I!=="y"||ae||m!==1||R!==0||Q||be||v!==false||L||w||N||D>0||u||A||h||O||te||pe||Se||H!=null||k!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function ln(){let o=++bn,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,X=`--svg-scroll-draw-${o}`,xe=C==="reverse"?"0":"var(--ssd-len)",De=C==="reverse"?"var(--ssd-len)":"0",Ce=`stroke-dashoffset:${xe};`,S=`stroke-dashoffset:${De};`;f&&(Ce+=`opacity:${C==="reverse"?1:0};`,S+=`opacity:${C==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${c}{from{${Ce}}to{${S}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Ye(),Lt(),de,Ae);return E(ee(Ye(),K,Me,m))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),F.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=C==="reverse"?`${P[ve]*K}`:`${P[ve]*(1-K)}`,f&&(Me.style.opacity=C==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{P[K]=Qe(g),g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`;});}}}if(an())return mt(ln());function cn(){let o=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/o)),g=E(j);Ie=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Oe(C==="reverse"?1-g:g),u?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*R*o,Me=Math.min(1,Math.max(0,(b-K)/o)),ve=E(Me);j.style.strokeDashoffset=C==="reverse"?`${P[g]*ve}`:`${P[g]*(1-ve)}`,f&&(j.style.opacity=C==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Ue(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",yt(we[g],L,ve)),g===0&&(Ie=ve,u?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/o)),g=E(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!We.has(Me)&&(We.add(Me),w[K]?.());}}return W}function De(b){if(ce)return;let W=b-c;V||(V=true,A?.());let j=xe(W);if(j&&!$){$=true,xe(o*(1+Math.max(0,_.length-1)*R)),h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{c=performance.now(),V=false,$=false,We.clear(),tt(),G=requestAnimationFrame(De);},B));return}j||(G=requestAnimationFrame(De));}function Ce(){cancelAnimationFrame(G),clearTimeout(_e),c=performance.now(),y=0,ce=false,V=false,$=false,Ne=0,X=true,Ie=0,We.clear(),tt(),G=requestAnimationFrame(De);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&$)?Ce():!W.isIntersecting&&!Q&&!$&&(cancelAnimationFrame(G),clearTimeout(_e),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),F;function ue(){clearTimeout(F),F=setTimeout(()=>{_.forEach((b,W)=>{P[W]=Qe(b),b.style.strokeDasharray=`${P[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),D>0?setTimeout(()=>S.observe(e),D):S.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(F);},replay(){Ne=0,Ce();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(De));},seek(b){let W=Math.min(1,Math.max(0,b));Ie=W,ce=true,y=W*o,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Ie},refresh(){clearTimeout(F),_.forEach((b,W)=>{P[W]=Qe(b),b.style.strokeDasharray=`${P[W]}`;});}}}if(Ee)return mt(cn());$t();function Pt(){if(ce||!je)return;let o=performance.now(),c=Ye();if(!qe&&v===false&&c===xt){pt(c);return}qe=false,xt=c;let y=m;if(v!==false){let S=o-Mt,F=S>0?Math.abs(c-(et<0?c:et))/S:0;y=m*Math.max(.2,1+F*(typeof v=="number"?v:1)*.04);}et=c,Mt=o;let X=be?ze===-1||c>=ze?"forward":"reverse":C;ze=c;let xe=p-l,De=true,Ce=xe===0?0:(c-l)/xe;if(isNaN(Ge)||(Ge<=0&&Ce>0?O?.():Ge>0&&Ce<=0&&Se?.(),Ge<1&&Ce>=1?te?.():Ge>=1&&Ce<1&&pe?.()),Ge=Ce,Z){let S=E(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,S),S=q),Ie=S,e.style.setProperty("--scroll-draw-progress",String(S));let F=X==="reverse"?1-S:S;e.style.clipPath=Oe(F),u?.(S),!V&&ee(c,l,p,y)>0&&(V=true,A?.()),S>=1&&!$?($=true,h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{q=-1,V=false,$=false,e.style.clipPath=Oe(0);},B))):S<1&&!Q&&($=false),pt(c);return}if(_.forEach((S,F)=>{let ue=F*$e*xe,b=E(ee(c,l+ue,p+ue,y));Q&&!be&&(b=He[F]=Math.max(He[F]??q,b)),S.style.strokeDashoffset=X==="reverse"?`${P[F]*b}`:`${P[F]*(1-b)}`,f&&(S.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?S.style.stroke=Ue(le,ne,b):ne&&(S.style.stroke=ne),re!==null&&Y!==null?S.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(S.style.strokeWidth=`${Y}`),ge!==null&&J!==null?S.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(S.style.fillOpacity=`${J}`),L&&S.tagName.toLowerCase()==="path"&&we[F]&&S.setAttribute("d",yt(we[F],L,b)),F===0&&(Ie=b,u?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),w){let S=E(ee(c,l,p,y));for(let F in w){let ue=parseFloat(F);S>=ue&&!We.has(ue)&&(We.add(ue),w[F]?.());}}!V&&ee(c,l,p,y)>0&&(V=true,A?.()),De&&!$?($=true,h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{q=-1,He=[],V=false,$=false,We.clear(),tt(),qe=true;},B))):!De&&!Q&&($=false),pt(c);}function ft(o){return o>=p&&o<Te}function pt(o){Ve||ft(o)?G=requestAnimationFrame(Pt):je=false;}function dt(){return Ve||ft(Ye())}let je=false;function nt(){je||(je=true,G=requestAnimationFrame(function(){Pt();}));}function rt(){je=false,cancelAnimationFrame(G);}let gt=new IntersectionObserver(o=>{o.forEach(c=>{Ve=c.isIntersecting,Ve&&!ce?(qe=true,nt()):je&&!ce&&ft(Ye())||rt();});},{root:ae??null,threshold:T,rootMargin:U});function kt(){_.forEach((o,c)=>{P[c]=Qe(o),o.style.strokeDasharray=`${P[c]}`;}),$t(),qe=true;}let ot;function Xe(){clearTimeout(ot),ot=setTimeout(kt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let un=Fe([e],Xe);return D>0?setTimeout(()=>gt.observe(e),D):gt.observe(e),mt({destroy(){cancelAnimationFrame(G),clearTimeout(_e),rt(),gt.disconnect(),un(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(ot),Tt();},replay(){q=-1,He=[],ze=-1,et=-1,V=false,$=false,Ne=0,ce=false,Ie=0,We.clear(),clearTimeout(_e),tt(),qe=true,dt()&&nt();},pause(){ce=true,rt();},resume(){ce&&(ce=false,qe=true,dt()&&nt());},seek(o){let c=Math.min(1,Math.max(0,o));Ie=c,q=c,He=[],ce=true,rt(),sn(c,C),qe=true;},getProgress(){return Ie},refresh(){clearTimeout(ot),kt(),dt()&&!ce&&nt();}},()=>({tStart:l,tEnd:p}))}var Gt=new WeakMap,xn=0;function jt(e){return JSON.stringify(e,(r,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let n=Gt.get(t);return n===void 0&&Gt.set(t,n=++xn),`el#${n}`}return t})}function Qt(e,r){let t={...e};for(let n of Object.keys(t))typeof t[n]=="function"&&(t[n]=(...s)=>r()[n]?.(...s));return t}function Mn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ut(e){let r=[],t=/([\w]+)\(([^)]*)\)/g,n;for(;(n=t.exec(e))!==null;){let s=[],i=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}r.push({fn:n[1],nums:s,units:i});}return r}function Ln(e,r,t){let n=Ut(e),s=Ut(r);return n.length===0||n.length!==s.length?t<1?e:r:n.map((i,a)=>{let m=s[a];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 Yt(e,r,t){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*t);let n=String(e),s=String(r);if(Mn(n))return Ue(n,s,t);if(n.includes("("))return Ln(n,s,t);let i=n.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),f=parseFloat(a[1]);return `${m+(f-m)*t}${i[2]||a[2]}`}return t<1?n:s}function An(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var $n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Cn=0,Xt="--scroll-draw-progress";function Pn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,r){return typeof window>"u"?Zt:r.respectReducedMotion===false?Kt(e,r,false):Be(r,(t,n)=>Kt(e,t,n))}function Kt(e,r,t){let{props:n,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:R=false,triggerElement:C,onProgress:Q,onComplete:me,onEnter:I,onLeave:se,onEnterBack:be,onLeaveBack:D}=r,H=typeof i=="function"?i:oe[i]??oe["ease-out"],k=ye(s.start??"top bottom"),M=ye(s.end??"bottom top"),w=C??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(n).map(([l,p])=>({prop:An(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),Xt])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return N(),me?.(),{...Zt,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?it(i):null;function Ee(){if(!x||!Pn()||!fe||f!=="y"||v||w!==e||m||a!==1||Q||me||I||se||be||D||R!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!$n.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++Cn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),$e=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${$e}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let $=()=>f==="x"?window.scrollX:window.scrollY,V=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},$(),V(),k,M)};Pe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:G});let Ve={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let He=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let ze of T)e.style.setProperty(ze.prop,Yt(ze.from,ze.to,He));},getProgress(){let{tStart:q,tEnd:He}=G();return H(ee($(),q,He,a))}};return Ve}if(Ee())return ie();let z=0,u=0,A=0,h=false,O=false,te=-1,pe=0,Se=false,Z=NaN,E=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(V=>l.getPropertyValue(V.prop)),$e=l.transition;le.length&&(l.transition="none"),le.forEach(V=>l.setProperty(V.prop,B.get(V.prop)??""));let Te=st(w,v,f);le.forEach((V,G)=>l.setProperty(V.prop,p[G])),le.length&&(e.offsetWidth,l.transition=$e);let $=Le(Te,Te.scroll,ae(),k,M);ne&&Math.abs($.tStart-z)<1&&Math.abs($.tEnd-u)<1||(ne=true,z=$.tStart,u=$.tEnd);}function Y(l){e.style.setProperty(Xt,String(l));for(let p of T)e.style.setProperty(p.prop,Yt(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?I?.():Z>0&&l<=0&&D?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||O)return;let l=performance.now(),p=Ae(),$e=a;if(R!==false){let V=l-de,G=V>0?Math.abs(p-(E<0?p:E))/V:0;$e=a*Math.max(.2,1+G*(typeof R=="number"?R:1)*.04);}E=p,de=l;let Te=u===z?0:(p-z)/(u-z);ge(Te);let $=H(ee(p,z,u,$e));m&&(te=Math.max(te,$),$=te),pe=$,Y($),$>=1&&!Se?(Se=true,me?.()):$<1&&!m&&(Se=false),A=requestAnimationFrame(J);}re(),u===z&&he("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=H(ee(Ae(),z,u,a));m&&l>0&&(te=l),pe=l,Y(l);}let Oe=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!O?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function P(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let we=Fe([w],P);return Oe.observe(e),Pe(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:z,tEnd:u})}),{destroy(){cancelAnimationFrame(A),Oe.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),we(),clearTimeout(_),L(),ke(e);},replay(){te=-1,Se=false,pe=0,O=false,Y(0);},pause(){O=true,cancelAnimationFrame(A);},resume(){O&&(O=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,O=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,r){if(typeof window>"u")return wt;let t=typeof e=="string"?document.querySelector(e):e;return t?Be(r,(n,s)=>kn(t,n,s)):(he("scrollCounter: element not found:",e),wt)}function kn(e,r,t){let{from:n=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:x}=r,R=d!==void 0?u=>u.toFixed(d):i??(u=>String(Math.round(u))),C=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(m.start??"top 80%"),me=ye(m.end??"top 20%");if(t)return e.textContent=R(s),x?.(),{...wt,getProgress:()=>1};let I=0,se=0,be=false,D=0,H=false,k=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let u=e.getBoundingClientRect(),A=Le({top:u.top,height:u.height},T(),U(),Q,me);be&&Math.abs(A.tStart-I)<1&&Math.abs(A.tEnd-se)<1||(be=true,I=A.tStart,se=A.tEnd);}function B(u){e.textContent=R(n+(s-n)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function L(){if(!H||k)return;let u=C(ee(T(),I,se,1));f&&(M=Math.max(M,u),u=M),w=u,B(u),u>=1&&!v?(v=true,x?.()):u<1&&!f&&(v=false),D=requestAnimationFrame(L);}N();{let u=C(ee(T(),I,se,1));f&&u>0&&(M=u),w=u,B(u);}let fe=new IntersectionObserver(u=>{u.forEach(A=>{H=A.isIntersecting,H&&!k?D=requestAnimationFrame(L):cancelAnimationFrame(D);});}),Ee;function ie(){clearTimeout(Ee),Ee=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let z=Fe([e],ie);return fe.observe(e),Pe(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:se})}),{destroy(){cancelAnimationFrame(D),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),z(),clearTimeout(Ee),ke(e);},replay(){M=-1,v=false,w=0,k=false,B(0);},pause(){k=true,cancelAnimationFrame(D);},resume(){k&&(k=false,H&&(D=requestAnimationFrame(L)));},seek(u){let A=Math.min(1,Math.max(0,u));w=A,M=A,k=true,cancelAnimationFrame(D),B(A);},getProgress(){return w}}}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,r={}){if(typeof window>"u")return Jt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),Jt;let n=t,{trigger:s={},easing:i="linear",once:a=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:R,onProgress:C}=r,Q=d??n,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:oe[i]??oe.linear,se=ye(s.start??"top top"),be=ye(s.end??"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=f);let D=r.from??0,H=r.to,k=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>m==="x"?window.scrollX:window.scrollY,Ee=()=>m==="x"?window.innerWidth:window.innerHeight;function ie(){let E=Q.getBoundingClientRect(),de=m==="x"?E.left:E.top,Ae=m==="x"?E.width:E.height,ae=Le({top:de,height:Ae},fe(),Ee(),se,be);k=ae.tStart,M=ae.tEnd,L&&M===k&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let z=NaN;function u(E){if(!L)return;let de=H??n.duration??0,Ae=D+(de-D)*E;Ae!==z&&(z=Ae,n.currentTime=Ae),n.style.setProperty("--scroll-draw-progress",String(E)),C?.(E);}function A(){if(!v||T||!L||me)return;let E=I(ee(fe(),k,M,1));a&&(U=Math.max(U,E),E=U),N=E,u(E),E>=1&&!B?(B=true,R?.()):E<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,H===void 0&&(H=n.duration),me){u(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}n.readyState>=1?h():n.addEventListener("loadedmetadata",h,{once:true}),L||ie();let O=me?()=>{}:ct(E=>{E&&(O(),me=true,cancelAnimationFrame(w),u(1));}),te=new IntersectionObserver(E=>{E.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Se(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Z=Fe([Q],Se);return te.observe(n),Pe(n,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:k,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),n.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),Z(),O(),clearTimeout(pe),ke(n);},replay(){U=-1,B=false,N=0,T=false,z=NaN,u(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(E){let de=Math.min(1,Math.max(0,E));N=de,U=de,T=true,cancelAnimationFrame(w),z=NaN,u(de);},getProgress(){return N}}}function en(e,r){let t=document.createElement("span");t.textContent=r,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 rn(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(n.textContent=t,n.style.whiteSpace="pre"):(n.textContent=t,n.style.display="inline-block"),e.appendChild(n),/^\s+$/.test(t)?null:n}).filter(t=>t!==null)}function On(e){let r=e.textContent??"";return e.textContent="",r.split("").map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=t,t===" "?n.style.whiteSpace="pre":n.style.display="inline-block",e.appendChild(n),t===" "?null:n}).filter(t=>t!==null)}function tn(e){let r=rn(e),t=new Map;for(let i of r){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let n=[],s=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of s){let a=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;m.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),n.push(m);}return e.textContent="",n.forEach((i,a)=>{e.appendChild(i),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function In(e,r,t,n){if(t<=1||n===0)return e;let s=(t-1)*n,i=r*n,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Dn(e,r){let t=[];if(r?.y!==void 0&&t.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&t.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&t.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let n=r.scale+(1-r.scale)*e;t.push(`scale(${n})`);}return t.join(" ")||""}var nn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,r={}){if(typeof window>"u")return nn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return he("scrollText: element not found:",e),nn;let n=t;return Be(r,(s,i)=>Fn(n,s,i))}function Fn(e,r,t){let{split:n="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=r,x=typeof i=="function"?i:oe[i]??oe["ease-out"],R=ye(m.start??"top 85%"),C=ye(m.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",I;n==="chars"?I=On(e):n==="lines"?I=tn(e):I=rn(e),en(e,me);let se=I.length;function be(h,O){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*O));let te=Dn(O,a);te&&(h.style.transform=te);}function D(h){e.style.setProperty("--scroll-draw-progress",String(h)),I.forEach((O,te)=>{let pe=x(In(h,te,se,s));be(O,pe);});}if(t)return D(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let H=0,k=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),O=Le({top:h.top,height:h.height},B(),L(),R,C);H=O.tStart,k=O.tEnd;}function Ee(){if(!w||v)return;let h=ee(B(),H,k,1);f&&(T=Math.max(T,h),h=T),U=h,D(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Ee);}fe();let ie=new IntersectionObserver(h=>{h.forEach(O=>{w=O.isIntersecting,w&&!v?M=requestAnimationFrame(Ee):cancelAnimationFrame(M);});}),z;function u(){clearTimeout(z),z=setTimeout(()=>{if(n==="lines"){let h=U;e.innerHTML=Q,I=tn(e),en(e,me),D(h);}fe();},150);}window.addEventListener("resize",u),window.addEventListener("orientationchange",u);let A=Fe([e],u);return ie.observe(e),Pe(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:H,tEnd:k})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",u),A(),clearTimeout(z),e.innerHTML=Q,ke(e);},replay(){T=-1,N=false,U=0,v=false,D(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Ee)));},seek(h){let O=Math.min(1,Math.max(0,h));U=O,T=O,v=true,cancelAnimationFrame(M),D(O);},getProgress(){return U}}}function Re(e,r){let t,n,s,i;return solidJs.createEffect(()=>{i=typeof e=="function"?e():e;let a=jt(i);!t||a===s||(s=a,solidJs.untrack(()=>{n?.destroy(),n=r(t,Qt(i,()=>i));}));}),solidJs.onCleanup(()=>{n?.destroy(),n=s=void 0;}),{ref:a=>{t=a;},getInstance:()=>n}}function Zr(e={}){return Re(e,ht).ref}function Jr(e={}){return Re(e,ht)}function eo(e){return Re(e,bt).ref}function to(e){return Re(e,bt)}function no(e){return Re(e,vt).ref}function ro(e){return Re(e,vt)}function oo(e={}){return Re(e,Et).ref}function so(e={}){return Re(e,Et)}function io(e={}){return Re(e,St).ref}function ao(e={}){return Re(e,St)}exports.createScrollAnimate=to;exports.createScrollCounter=ro;exports.createScrollDraw=Jr;exports.createScrollText=ao;exports.createScrollVideo=so;exports.useScrollAnimate=eo;exports.useScrollCounter=no;exports.useScrollDraw=Zr;exports.useScrollText=io;exports.useScrollVideo=oo;
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
- import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
2
+ import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
3
3
  import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
4
4
  import { ScrollVideoOptions } from '../video/index.mjs';
5
5
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
- import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
2
+ import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
3
3
  import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
4
4
  import { ScrollVideoOptions } from '../video/index.js';
5
5
  import { ScrollTextOptions } from '../text/index.js';
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-VDTAYUAR.mjs';import {a as a$4}from'../chunk-DY5JCXVR.mjs';import {a as a$2}from'../chunk-WXUOF4NM.mjs';import {a as a$1}from'../chunk-LTCJVVSC.mjs';import {b as b$1}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
@@ -1,3 +1,3 @@
1
- 'use strict';function sr({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),i=Math.sqrt(t),s=0,l=[];for(let d=0;d<n;d++){let T=Math.pow(i,d);l.push(T),s+=T;}let u=[0],m=0;for(let d=0;d<n;d++)m+=l[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<n;T++)if(d<=u[T+1]){let R=(d-u[T])/(u[T+1]-u[T]);if(T===0)return R*(2-R);let A=1-Math.pow(t,T);return A+(1-A)*(2*R-1)*(2*R-1)}return 1}}function ir({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),i=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/t)+1}var le={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:sr(),elastic:ir()};function It(e,r,n){return Math.min(n,Math.max(r,e))}function be(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function Ot(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function Dt(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 ee(e,r,n,t){return n===r?0:It((e-r)/(n-r)*t,0,1)}function Ce(e,r,n,t,i){let s=Ot(e.top,e.height,r,t.element)-Dt(t.viewport,n),l=Ot(e.top,e.height,r,i.element)-Dt(i.viewport,n);return {tStart:s,tEnd:l}}function ot(e,r,n){let t=e.getBoundingClientRect(),i=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:i,scroll:0}:{top:n==="x"?t.left:t.top,height:i,scroll:n==="x"?window.scrollX:window.scrollY}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Ft(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 t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,r,n){let t=Ft(e),i=Ft(r);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*n)},${Math.round(t[1]+(i[1]-t[1])*n)},${Math.round(t[2]+(i[2]-t[2])*n)})`}var Rt={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 we(e,...r){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ht=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let r=[];for(let n=0;n<Ht;n++){let t=n/(Ht-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(le["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function Vt(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Ie(e,r){Vt().set(e,r);}function Oe(e){Vt().delete(e);}var Ke,it=new Set,at=new WeakMap,Qe=new Map,zt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function mr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let t=n;t;t=t.previousElementSibling)r.add(t);return r}function Fe(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Ke??(Ke=new ResizeObserver(i=>{let s=false;for(let{target:l}of i)at.get(l)!==zt(l)&&(s=true),at.set(l,"");s&&it.forEach(l=>l());})),it.add(n);let t=mr(e);return [document.body,document.documentElement].forEach(i=>i&&t.add(i)),t.forEach(i=>{at.has(i)||at.set(i,zt(i)),Qe.set(i,(Qe.get(i)??0)+1),Ke.observe(i);}),()=>{it.delete(n)&&(t.forEach(i=>{let s=(Qe.get(i)??1)-1;if(s)return void Qe.set(i,s);Qe.delete(i),Ke?.unobserve(i);}),it.size||(Ke?.disconnect(),Ke=void 0));}}var fr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function _t(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Xe)return;let r=_t(e,"stroke");if(!r||r==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Wt.has(n)&&!Wt.has(_t(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let s=n==="x"?window.scrollX:window.scrollY,l=e-s,u=r-s,m=n==="x";t.innerHTML=`
2
- <div style="position:absolute;${m?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var qt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Bt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,r,n){if(!Xe)return;let t=(e.match(Bt)??[]).join("").toUpperCase(),i=(r.match(Bt)??[]).join("").toUpperCase(),s=(e.match(qt)??[]).length,l=(r.match(qt)??[]).length;if(t!==i){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==l&&we(`morphTo: coordinate count differs (${s} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function dt(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let l=parseFloat(s),u=t[i++]??l;return String(+(l+(u-l)*n).toFixed(4))})}function gt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,i=n?{...Rt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:te=false,debug:Pe=false,axis:G="y",scrollContainer:ce,autoReverse:re=false,delay:Y=0,strokeColor:H,strokeWidth:P,fillOpacity:I,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:ne=0,morphTo:L,clip:oe,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:N,onStart:C,onComplete:f,onEnter:p,onLeave:O,onEnterBack:q,onLeaveBack:Me}=i,v=oe===true?"left":typeof oe=="string"?oe:false,V=typeof d=="function"?d:le[d]??le.linear,ue=be(T.start??"top bottom"),Re=be(T.end??"bottom top"),Ee=typeof ce=="string"?document.querySelector(ce):ce??null,Ae=Array.isArray(H)?H[0]:null,me=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,se=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ie=Array.isArray(I)?I[0]:null,K=Array.isArray(I)?I[1]:typeof I=="number"?I:null;function He(o){let a=o*100;switch(v){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 z=v?[]:Array.from(e.querySelectorAll(l)),D=[],fe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,pe=false,he=-1,Ne=[],ae=-1,j=false,Te=0,Ve=0,ze,lt=null;function Tt(){lt?.destroy(),lt=null;}let _e=new Set,xt=NaN,We=true,Je=-1,Mt=performance.now(),qe=NaN;function Ue(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function At(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Lt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,At(),ue,Re)}function Jt(){let o=Se-J,a=z.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=R,R>0&&a>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(R,Le/(a*o)));}h=Se+a*c*o;}function $t(){(({tStart:J,tEnd:Se}=Lt())),Jt(),Pe&&Xe&&(Tt(),lt=gr(J,Se,G));}function ct(o,a=Lt){Ie(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Oe(e);},o}function er(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=a==="reverse"?1-o:o;e.style.clipPath=He(y);return}z.forEach((y,Q)=>{y.style.strokeDashoffset=a==="reverse"?`${D[Q]*o}`:`${D[Q]*(1-o)}`,m&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Ae&&me?y.style.stroke=je(Ae,me,o):me&&(y.style.stroke=me),X!==null&&se!==null?y.style.strokeWidth=`${X+(se-X)*o}`:se!==null&&(y.style.strokeWidth=`${se}`),ie!==null&&K!==null?y.style.fillOpacity=`${ie+(K-ie)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&fe[Q]&&y.setAttribute("d",dt(fe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=He(0);return}z.forEach((o,a)=>{o.style.strokeDasharray=`${D[a]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${D[a]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`),L&&o.tagName.toLowerCase()==="path"&&fe[a]&&o.setAttribute("d",fe[a]);});}if(z.forEach(o=>{dr(o);let a=Ge(o);D.push(a);let y=o.tagName.toLowerCase()==="path";y?fe.push(o.getAttribute("d")??""):fe.push(""),L&&(y?yr(fe[fe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),me&&(o.style.stroke=me),se!==null&&(o.style.strokeWidth=`${se}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?"0":`${a}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),v){if(s)return e.style.clipPath=He(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=He(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Ct=typeof d=="string"?st(d):null;function tr(){return !(ye===false||!pr()||!z.length||!Ct||v||G!=="y"||Ee||u!==1||R!==0||te||re||k!==false||L||w||E||Y>0||N||C||f||p||O||q||Me||H!=null||P!=null||I!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function rr(){let o=++fr,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",De=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${De};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${a}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(D[Z])),g.style.strokeDasharray=`${D[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a);}z.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Ce({top:g.top,height:g.height},Ue(),At(),ue,Re);return V(ee(Ue(),Z,$e,u))}return {destroy(){e.classList.remove(y),z.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),F.remove();},replay(){b=false,W=-1,z.forEach(de);},pause(){b=true,z.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,z.forEach(($e,xe)=>{$e.classList.remove(a),$e.style.strokeDashoffset=A==="reverse"?`${D[xe]*Z}`:`${D[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){z.forEach((g,Z)=>{D[Z]=Ge(g),g.style.setProperty("--ssd-len",String(D[Z])),g.style.strokeDasharray=`${D[Z]}`;});}}}if(tr())return ct(rr());function nr(){let o=Math.max(1,ge),a=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=V(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=He(A==="reverse"?1-g:g),N?.(g),U<1&&(W=false);}else z.forEach((U,g)=>{let Z=g*R*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=V($e);U.style.strokeDashoffset=A==="reverse"?`${D[g]*xe}`:`${D[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&me?U.style.stroke=je(Ae,me,xe):me&&(U.style.stroke=me),X!==null&&se!==null?U.style.strokeWidth=`${X+(se-X)*xe}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&K!==null?U.style.fillOpacity=`${ie+(K-ie)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&fe[g]&&U.setAttribute("d",dt(fe[g],L,xe)),g===0&&(Te=xe,N?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=V(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!_e.has($e)&&(_e.add($e),w[Z]?.());}}return W}function De(b){if(j)return;let W=b-a;B||(B=true,C?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*R)),f?.(),Ve<(E==="infinite"?1/0:E??0)&&(Ve++,ze=setTimeout(()=>{a=performance.now(),B=false,_=false,_e.clear(),et(),$=requestAnimationFrame(De);},ne));return}U||($=requestAnimationFrame(De));}function ke(){cancelAnimationFrame($),clearTimeout(ze),a=performance.now(),y=0,j=false,B=false,_=false,Ve=0,Q=true,Te=0,_e.clear(),et(),$=requestAnimationFrame(De);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(te&&_)?ke():!W.isIntersecting&&!te&&!_&&(cancelAnimationFrame($),clearTimeout(ze),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),F;function de(){clearTimeout(F),F=setTimeout(()=>{z.forEach((b,W)=>{D[W]=Ge(b),b.style.strokeDasharray=`${D[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(ze),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(F);},replay(){Ve=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-a,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,a=performance.now()-y,$=requestAnimationFrame(De));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,a=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(F),z.forEach((b,W)=>{D[W]=Ge(b),b.style.strokeDasharray=`${D[W]}`;});}}}if(ve)return ct(nr());$t();function Pt(){if(j||!Be)return;let o=performance.now(),a=Ue();if(!We&&k===false&&a===xt){mt(a);return}We=false,xt=a;let y=u;if(k!==false){let S=o-Mt,F=S>0?Math.abs(a-(Je<0?a:Je))/S:0;y=u*Math.max(.2,1+F*(typeof k=="number"?k:1)*.04);}Je=a,Mt=o;let Q=re?ae===-1||a>=ae?"forward":"reverse":A;ae=a;let Le=Se-J,De=true,ke=Le===0?0:(a-J)/Le;if(isNaN(qe)||(qe<=0&&ke>0?p?.():qe>0&&ke<=0&&Me?.(),qe<1&&ke>=1?O?.():qe>=1&&ke<1&&q?.()),qe=ke,v){let S=V(ee(a,J,Se,y));te&&!re&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let F=Q==="reverse"?1-S:S;e.style.clipPath=He(F),N?.(S),!B&&ee(a,J,Se,y)>0&&(B=true,C?.()),S>=1&&!_?(_=true,f?.(),Ve<(E==="infinite"?1/0:E??0)&&(Ve++,ze=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=He(0);},ne))):S<1&&!te&&(_=false),mt(a);return}if(z.forEach((S,F)=>{let de=F*c*Le,b=V(ee(a,J+de,Se+de,y));te&&!re&&(b=Ne[F]=Math.max(Ne[F]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${D[F]*b}`:`${D[F]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&me?S.style.stroke=je(Ae,me,b):me&&(S.style.stroke=me),X!==null&&se!==null?S.style.strokeWidth=`${X+(se-X)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&K!==null?S.style.fillOpacity=`${ie+(K-ie)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&fe[F]&&S.setAttribute("d",dt(fe[F],L,b)),F===0&&(Te=b,N?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),w){let S=V(ee(a,J,Se,y));for(let F in w){let de=parseFloat(F);S>=de&&!_e.has(de)&&(_e.add(de),w[F]?.());}}!B&&ee(a,J,Se,y)>0&&(B=true,C?.()),De&&!_?(_=true,f?.(),Ve<(E==="infinite"?1/0:E??0)&&(Ve++,ze=setTimeout(()=>{he=-1,Ne=[],B=false,_=false,_e.clear(),et(),We=true;},ne))):!De&&!te&&(_=false),mt(a);}function ut(o){return o>=Se&&o<h}function mt(o){pe||ut(o)?$=requestAnimationFrame(Pt):Be=false;}function ft(){return pe||ut(Ue())}let Be=false;function tt(){Be||(Be=true,$=requestAnimationFrame(function(){Pt();}));}function rt(){Be=false,cancelAnimationFrame($);}let pt=new IntersectionObserver(o=>{o.forEach(a=>{pe=a.isIntersecting,pe&&!j?(We=true,tt()):Be&&!j&&ut(Ue())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function kt(){z.forEach((o,a)=>{D[a]=Ge(o),o.style.strokeDasharray=`${D[a]}`;}),$t(),We=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout(kt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let or=Fe([e],Ye);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(ze),rt(),pt.disconnect(),or(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),Tt();},replay(){he=-1,Ne=[],ae=-1,Je=-1,B=false,_=false,Ve=0,j=false,Te=0,_e.clear(),clearTimeout(ze),et(),We=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,We=true,ft()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Te=a,he=a,Ne=[],j=true,rt(),er(a,A),We=true;},getProgress(){return Te},refresh(){clearTimeout(nt),kt(),ft()&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var Gt=new WeakMap,hr=0;function yt(e){return JSON.stringify(e,(r,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let t=Gt.get(n);return t===void 0&&Gt.set(n,t=++hr),`el#${t}`}return n})}function ht(e,r){let n={...e};for(let t of Object.keys(n))typeof n[t]=="function"&&(n[t]=(...i)=>r()[t]?.(...i));return n}function br(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function jt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let i=[],s=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:i,units:s});}return r}function wr(e,r,n){let t=jt(e),i=jt(r);return t.length===0||t.length!==i.length?n<1?e:r:t.map((s,l)=>{let u=i[l];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*n}${s.units[d]}`).join(", ")})`}).join(" ")}function Ut(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),i=String(r);if(br(t))return je(t,i,n);if(t.includes("("))return wr(t,i,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),l=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&l){let u=parseFloat(s[1]),m=parseFloat(l[1]);return `${u+(m-u)*n}${s[2]||l[2]}`}return n<1?t:i}function vr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var Er=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Sr=0,Yt="--scroll-draw-progress";function Tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function bt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:i={},easing:s="ease-out",speed:l=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:te,onProgress:Pe,onComplete:G,onEnter:ce,onLeave:re,onEnterBack:Y,onLeaveBack:H}=r,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof s=="function"?s:le[s]??le["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=te??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:vr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function ne(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let oe=new Map;for(let c of [...E.map(h=>h.prop),Yt])oe.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of oe)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...n,destroy:ve,getProgress:()=>1};ne();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Tr()||!ge||m!=="y"||M||x!==e||u||l!==1||Pe||G||ce||re||Y||H||R!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!Er.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Sr}`,h=E.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=E.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,pe=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let ae=e.getBoundingClientRect();return Ce({top:ae.top,height:ae.height},$(),pe(),w,k)};Ie(e,{type:"animate",getProgress:()=>Ne.getProgress(),getTrigger:he});let Ne={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Oe(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,Ut(Te.from,Te.to,j));},getProgress(){let{tStart:ae,tEnd:j}=he();return I(ee($(),ae,j,l))}};return Ne}if(ye())return N();let C=0,f=0,p=0,O=false,q=false,Me=-1,v=0,V=false,ue=NaN,Re=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],se=false;function ie(){let c=e.style,h=X.map(pe=>c.getPropertyValue(pe.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(pe=>c.setProperty(pe.prop,oe.get(pe.prop)??""));let B=ot(x,M,m);X.forEach((pe,he)=>c.setProperty(pe.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,me(),w,k);se&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(se=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Yt,String(c));for(let h of E)e.style.setProperty(h.prop,Ut(h.from,h.to,c));Pe?.(c);}function He(c){if(isNaN(ue)){ue=c;return}ue<=0&&c>0?ce?.():ue>0&&c<=0&&H?.(),ue<1&&c>=1?re?.():ue>=1&&c<1&&Y?.(),ue=c;}function z(){if(!O||q)return;let c=performance.now(),h=Ae(),_=l;if(R!==false){let pe=c-Ee,he=pe>0?Math.abs(h-(Re<0?h:Re))/pe:0;_=l*Math.max(.2,1+he*(typeof R=="number"?R:1)*.04);}Re=h,Ee=c;let B=f===C?0:(h-C)/(f-C);He(B);let $=I(ee(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ie(),f===C&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=I(ee(Ae(),C,f,l));u&&c>0&&(Me=c),v=c,K(c);}let D=new IntersectionObserver(c=>{c.forEach(h=>{O=h.isIntersecting,O&&!q?p=requestAnimationFrame(z):cancelAnimationFrame(p);});},{root:M??null}),fe;function J(){clearTimeout(fe),fe=setTimeout(ie,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=Fe([x],J);return D.observe(e),Ie(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:f})}),{destroy(){cancelAnimationFrame(p),D.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(fe),ve(),Oe(e);},replay(){Me=-1,V=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,O&&(p=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ie();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,r){if(typeof window>"u")return wt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),wt;let t=n,{from:i=0,to:s,format:l,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:R}=r,A=T!==void 0?f=>f.toFixed(T):l??(f=>String(Math.round(f))),te=typeof u=="function"?u:le[u]??le["ease-out"],Pe=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),R?.(),wt;let re=0,Y=0,H=false,P=0,I=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,ne=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),ne(),Pe,G);H&&Math.abs(p.tStart-re)<1&&Math.abs(p.tEnd-Y)<1||(H=true,re=p.tStart,Y=p.tEnd);}function oe(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!I||w)return;let f=te(ee(E(),re,Y,1));d&&(k=Math.max(k,f),f=k),x=f,oe(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=te(ee(E(),re,Y,1));d&&f>0&&(k=f),x=f,oe(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{I=p.isIntersecting,I&&!w?P=requestAnimationFrame(ve):cancelAnimationFrame(P);});}),ye;function N(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",N),window.addEventListener("orientationchange",N);let C=Fe([t],N);return ge.observe(t),Ie(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:re,tEnd:Y})}),{destroy(){cancelAnimationFrame(P),ge.disconnect(),window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),C(),clearTimeout(ye),Oe(t);},replay(){k=-1,M=false,x=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(P);},resume(){w&&(w=false,I&&(P=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(P),oe(p);},getProgress(){return x}}}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,r={}){if(typeof window>"u")return Xt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Xt;let t=n,{trigger:i={},easing:s="linear",once:l=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:R,onProgress:A}=r,te=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:le[s]??le.linear,ce=be(i.start??"top top"),re=be(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=r.from??0,H=r.to,P=0,I=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=false,oe=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=te.getBoundingClientRect(),V=u==="x"?v.left:v.top,ue=u==="x"?v.width:v.height,Re=Ce({top:V,height:ue},oe(),ve(),ce,re);P=Re.tStart,I=Re.tEnd,L&&I===P&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function N(v){if(!L)return;let V=H??t.duration??0,ue=Y+(V-Y)*v;ue!==ye&&(ye=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(ee(oe(),P,I,1));l&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!ne?(ne=true,R?.()):v<1&&!l&&(ne=false),w=requestAnimationFrame(C);}function f(){if(L=true,H===void 0&&(H=t.duration),Pe){N(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(C));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(V=>{k=V.isIntersecting,k&&!x&&L?w=requestAnimationFrame(C):cancelAnimationFrame(w);});}),O;function q(){clearTimeout(O),O=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=Fe([te],q);return p.observe(t),Ie(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:I})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(O),Oe(t);},replay(){M=-1,ne=false,E=0,x=false,ye=NaN,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(C)));},seek(v){let V=Math.min(1,Math.max(0,v));E=V,M=V,x=true,cancelAnimationFrame(w),ye=NaN,N(V);},getProgress(){return E}}}function Zt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function xr(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Kt(e){let r=Zt(e),n=new Map;for(let s of r){let l=s.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(s);}let t=[],i=Array.from(n.keys()).sort((s,l)=>s-l);for(let s of i){let l=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<l.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,l)=>{e.appendChild(s),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Mr(e,r,n,t){if(n<=1||t===0)return e;let i=(n-1)*t,s=r*t,l=s+(1-i);return l<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(l-s)))}function Ar(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,r={}){if(typeof window>"u")return Qt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),Qt;let t=n,{split:i="words",stagger:s=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=r,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof l=="function"?l:le[l]??le["ease-out"],te=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ce;i==="chars"?ce=xr(t):i==="lines"?ce=Kt(t):ce=Zt(t);let re=ce.length;function Y(p,O){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*O));let q=Ar(O,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ce.forEach((O,q)=>{let Me=A(Mr(p,q,re,s));Y(O,Me);});}if(R)return H(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let P=0,I=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=()=>window.scrollY,oe=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),O=Ce({top:p.top,height:p.height},L(),oe(),te,Pe);P=O.tStart,I=O.tEnd;}function ge(){if(!k||x)return;let p=ee(L(),P,I,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!ne?(ne=true,T?.()):p<1&&!d&&(ne=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(O=>{k=O.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),N;function C(){clearTimeout(N),N=setTimeout(()=>{if(i==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ce=Kt(t),H(p);}ve();},150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let f=Fe([t],C);return ye.observe(t),Ie(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:I})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),f(),clearTimeout(N),t.innerHTML=G,t.removeAttribute("aria-label"),Oe(t);},replay(){M=-1,ne=false,E=0,x=false,H(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let O=Math.min(1,Math.max(0,p));E=O,M=O,x=true,cancelAnimationFrame(w),H(O);},getProgress(){return E}}}function Ze(e,r,n){let t=r,i=yt(r),s=n(e,ht(r,()=>t));return {update(l){t=l;let u=yt(l);u!==i&&(i=u,s.destroy(),s=n(e,ht(l,()=>t)));},destroy(){s.destroy();}}}function In(e,r={}){return Ze(e,r,gt)}function On(e={}){let r=null;function n(t){return r=gt(t,e),{destroy(){r?.destroy(),r=null;}}}return {action:n,getInstance:()=>r}}function Dn(e,r){return Ze(e,r,bt)}function Fn(e){let r=null;function n(t){return r=bt(t,e),{destroy(){r?.destroy(),r=null;}}}return {action:n,getInstance:()=>r}}function Rn(e,r){return Ze(e,r,vt)}function Hn(e){let r=null;function n(t){return r=vt(t,e),{destroy(){r?.destroy(),r=null;}}}return {action:n,getInstance:()=>r}}function Nn(e,r={}){return Ze(e,r,Et)}function Vn(e={}){let r=null;function n(t){return r=Et(t,e),{destroy(){r?.destroy(),r=null;}}}return {action:n,getInstance:()=>r}}function zn(e,r={}){return Ze(e,r,St)}function _n(e={}){let r=null;function n(t){return r=St(t,e),{destroy(){r?.destroy(),r=null;}}}return {action:n,getInstance:()=>r}}exports.createScrollAnimate=Fn;exports.createScrollCounter=Hn;exports.createScrollDraw=On;exports.createScrollText=_n;exports.createScrollVideo=Vn;exports.scrollAnimate=Dn;exports.scrollCounterAction=Rn;exports.scrollDraw=In;exports.scrollTextAction=zn;exports.scrollVideoAction=Nn;
1
+ 'use strict';function mn({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,a=[];for(let d=0;d<n;d++){let x=Math.pow(s,d);a.push(x),i+=x;}let u=[0],f=0;for(let d=0;d<n;d++)f+=a[d]/i,u.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<n;x++)if(d<=u[x+1]){let R=(d-u[x])/(u[x+1]-u[x]);if(x===0)return R*(2-R);let C=1-Math.pow(r,x);return C+(1-C)*(2*R-1)*(2*R-1)}return 1}}function fn({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var oe={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:mn(),elastic:fn()};function Dt(e,t,n){return Math.min(n,Math.max(t,e))}function ye(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 Ft(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 Rt(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 ee(e,t,n,r){return n===t?0:Dt((e-t)/(n-t)*r,0,1)}function Le(e,t,n,r,s){let i=Ft(e.top,e.height,t,r.element)-Rt(r.viewport,n),a=Ft(e.top,e.height,t,s.element)-Rt(s.viewport,n);return {tStart:i,tEnd:a}}function st(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function je(e){let t=e.tagName.toLowerCase();if(t==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(n+r)}if(t==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Ht(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 Qe(e,t,n){let r=Ht(e),s=Ht(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var Nt={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 he(e,...t){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var pn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",dn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Vt=33;function gn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function yn(e){let t=[];for(let n=0;n<Vt;n++){let r=n/(Vt-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return pn;case "ease-out":return dn;case "ease-in-out":return gn()?yn(oe["ease-in-out"]):null;default:return null}}var zt=Symbol.for("svg-scroll-draw.registry");function _t(){let e=globalThis;return e[zt]||(e[zt]=new Map)}function Pe(e,t){_t().set(e,t);}function ke(e){_t().delete(e);}var Ke,at=new Set,lt=new WeakMap,Ze=new Map,Wt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function hn(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 Fe(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Ke??(Ke=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==Wt(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(n);let r=hn(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{lt.has(s)||lt.set(s,Wt(s)),Ze.set(s,(Ze.get(s)??0)+1),Ke.observe(s);}),()=>{at.delete(n)&&(r.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Ke?.unobserve(s);}),at.size||(Ke?.disconnect(),Ke=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=s=>e(!!s.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 qe(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=ct(i=>{if(!i)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(n))s[i]=(...a)=>n[i]?.(...a);return s.destroy=()=>{r(),n.destroy();},s}var bn=0;function wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function qt(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Bt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function vn(e){if(!Xe)return;let t=qt(e,"stroke");if(!t||t==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Bt.has(n)&&!Bt.has(qt(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function En(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 s(){let i=n==="x"?window.scrollX:window.scrollY,a=e-i,u=t-i,f=n==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`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;${f?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var Gt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sn(e,t,n){if(!Xe)return;let r=(e.match(jt)??[]).join("").toUpperCase(),s=(t.match(jt)??[]).join("").toUpperCase(),i=(e.match(Gt)??[]).length,a=(t.match(Gt)??[]).length;if(r!==s){he(`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.`,n);return}i!==a&&he(`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 yt(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),u=r[s++]??a;return String(+(a+(u-a)*n).toFixed(4))})}function ht(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(t,(n,r)=>Tn(e,n,r))}function Tn(e,t,n){let{preset:r,...s}=t,i=r?{...Nt[r],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:d="linear",trigger:x={},stagger:R=0,direction:C="forward",once:Q=false,debug:me=false,axis:I="y",scrollContainer:se,autoReverse:be=false,delay:D=0,strokeColor:H,strokeWidth:k,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Ee=false,duration:ie=1e3,native:z=true,onProgress:m,onStart:A,onComplete:h,onEnter:O,onLeave:te,onEnterBack:pe,onLeaveBack:Se}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,E=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(H)?H[0]:null,ne=Array.isArray(H)?H[1]:typeof H=="string"?H:null,re=Array.isArray(k)?k[0]:null,Y=Array.isArray(k)?k[1]:typeof k=="number"?k:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let c=o*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),P=[],we=[],l=0,p=0,$e=R,Te=0,$=false,V=false,G=0,Ne=false,q=-1,Re=[],Ve=-1,ce=false,Ie=0,He=0,ze,ut=null;function Mt(){ut?.destroy(),ut=null;}let _e=new Set,Lt=NaN,We=true,et=-1,At=performance.now(),Be=NaN;function Ue(){return ae?I==="x"?ae.scrollLeft:ae.scrollTop:I==="x"?window.scrollX:window.scrollY}function $t(){return ae?I==="x"?ae.clientWidth:ae.clientHeight:I==="x"?window.innerWidth:window.innerHeight}function Ct(){let o=st(e,ae,I);return Le(o,o.scroll,$t(),de,Ae)}function on(){let o=p-l,c=_.length-1,y=ae??document.documentElement,X=I==="x"?"Width":"Height";if($e=R,R>0&&c>0&&o>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-o/u;xe>=0&&($e=Math.min(R,xe/(c*o)));}Te=p+c*$e*o;}function Pt(){(({tStart:l,tEnd:p}=Ct())),on(),me&&Xe&&(Mt(),ut=En(l,p,I));}function mt(o,c=Ct){Pe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),ke(e);},o}function sn(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),Z){let y=c==="reverse"?1-o:o;e.style.clipPath=Oe(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${P[X]*o}`:`${P[X]*(1-o)}`,f&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),le&&ne?y.style.stroke=Qe(le,ne,o):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*o}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",yt(we[X],L,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=Oe(0);return}_.forEach((o,c)=>{o.style.strokeDasharray=`${P[c]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${P[c]}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`),L&&o.tagName.toLowerCase()==="path"&&we[c]&&o.setAttribute("d",we[c]);});}if(_.forEach(o=>{vn(o);let c=je(o);P.push(c);let y=o.tagName.toLowerCase()==="path";y?we.push(o.getAttribute("d")??""):we.push(""),L&&(y?Sn(we[we.length-1],L,o):he(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),n?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?`${c}`:"0",f&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Y!==null&&(o.style.strokeWidth=`${Y}`),J!==null&&(o.style.fillOpacity=`${J}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?"0":`${c}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),Z){if(n)return e.style.clipPath=Oe(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(n)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let kt=typeof d=="string"?it(d):null;function an(){return !(z===false||!wn()||!_.length||!kt||Z||I!=="y"||ae||u!==1||R!==0||Q||be||v!==false||L||w||N||D>0||m||A||h||O||te||pe||Se||H!=null||k!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function ln(){let o=++bn,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,X=`--svg-scroll-draw-${o}`,xe=C==="reverse"?"0":"var(--ssd-len)",De=C==="reverse"?"var(--ssd-len)":"0",Ce=`stroke-dashoffset:${xe};`,S=`stroke-dashoffset:${De};`;f&&(Ce+=`opacity:${C==="reverse"?1:0};`,S+=`opacity:${C==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${c}{from{${Ce}}to{${S}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${kt};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Ue(),$t(),de,Ae);return E(ee(Ue(),K,Me,u))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),F.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=C==="reverse"?`${P[ve]*K}`:`${P[ve]*(1-K)}`,f&&(Me.style.opacity=C==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{P[K]=je(g),g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`;});}}}if(an())return mt(ln());function cn(){let o=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/o)),g=E(j);Ie=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Oe(C==="reverse"?1-g:g),m?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*R*o,Me=Math.min(1,Math.max(0,(b-K)/o)),ve=E(Me);j.style.strokeDashoffset=C==="reverse"?`${P[g]*ve}`:`${P[g]*(1-ve)}`,f&&(j.style.opacity=C==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Qe(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",yt(we[g],L,ve)),g===0&&(Ie=ve,m?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/o)),g=E(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!_e.has(Me)&&(_e.add(Me),w[K]?.());}}return W}function De(b){if(ce)return;let W=b-c;V||(V=true,A?.());let j=xe(W);if(j&&!$){$=true,xe(o*(1+Math.max(0,_.length-1)*R)),h?.(),He<(N==="infinite"?1/0:N??0)&&(He++,ze=setTimeout(()=>{c=performance.now(),V=false,$=false,_e.clear(),tt(),G=requestAnimationFrame(De);},B));return}j||(G=requestAnimationFrame(De));}function Ce(){cancelAnimationFrame(G),clearTimeout(ze),c=performance.now(),y=0,ce=false,V=false,$=false,He=0,X=true,Ie=0,_e.clear(),tt(),G=requestAnimationFrame(De);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&$)?Ce():!W.isIntersecting&&!Q&&!$&&(cancelAnimationFrame(G),clearTimeout(ze),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),F;function ue(){clearTimeout(F),F=setTimeout(()=>{_.forEach((b,W)=>{P[W]=je(b),b.style.strokeDasharray=`${P[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),D>0?setTimeout(()=>S.observe(e),D):S.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(ze),S.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(F);},replay(){He=0,Ce();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(De));},seek(b){let W=Math.min(1,Math.max(0,b));Ie=W,ce=true,y=W*o,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Ie},refresh(){clearTimeout(F),_.forEach((b,W)=>{P[W]=je(b),b.style.strokeDasharray=`${P[W]}`;});}}}if(Ee)return mt(cn());Pt();function Ot(){if(ce||!Ge)return;let o=performance.now(),c=Ue();if(!We&&v===false&&c===Lt){pt(c);return}We=false,Lt=c;let y=u;if(v!==false){let S=o-At,F=S>0?Math.abs(c-(et<0?c:et))/S:0;y=u*Math.max(.2,1+F*(typeof v=="number"?v:1)*.04);}et=c,At=o;let X=be?Ve===-1||c>=Ve?"forward":"reverse":C;Ve=c;let xe=p-l,De=true,Ce=xe===0?0:(c-l)/xe;if(isNaN(Be)||(Be<=0&&Ce>0?O?.():Be>0&&Ce<=0&&Se?.(),Be<1&&Ce>=1?te?.():Be>=1&&Ce<1&&pe?.()),Be=Ce,Z){let S=E(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,S),S=q),Ie=S,e.style.setProperty("--scroll-draw-progress",String(S));let F=X==="reverse"?1-S:S;e.style.clipPath=Oe(F),m?.(S),!V&&ee(c,l,p,y)>0&&(V=true,A?.()),S>=1&&!$?($=true,h?.(),He<(N==="infinite"?1/0:N??0)&&(He++,ze=setTimeout(()=>{q=-1,V=false,$=false,e.style.clipPath=Oe(0);},B))):S<1&&!Q&&($=false),pt(c);return}if(_.forEach((S,F)=>{let ue=F*$e*xe,b=E(ee(c,l+ue,p+ue,y));Q&&!be&&(b=Re[F]=Math.max(Re[F]??q,b)),S.style.strokeDashoffset=X==="reverse"?`${P[F]*b}`:`${P[F]*(1-b)}`,f&&(S.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?S.style.stroke=Qe(le,ne,b):ne&&(S.style.stroke=ne),re!==null&&Y!==null?S.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(S.style.strokeWidth=`${Y}`),ge!==null&&J!==null?S.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(S.style.fillOpacity=`${J}`),L&&S.tagName.toLowerCase()==="path"&&we[F]&&S.setAttribute("d",yt(we[F],L,b)),F===0&&(Ie=b,m?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),w){let S=E(ee(c,l,p,y));for(let F in w){let ue=parseFloat(F);S>=ue&&!_e.has(ue)&&(_e.add(ue),w[F]?.());}}!V&&ee(c,l,p,y)>0&&(V=true,A?.()),De&&!$?($=true,h?.(),He<(N==="infinite"?1/0:N??0)&&(He++,ze=setTimeout(()=>{q=-1,Re=[],V=false,$=false,_e.clear(),tt(),We=true;},B))):!De&&!Q&&($=false),pt(c);}function ft(o){return o>=p&&o<Te}function pt(o){Ne||ft(o)?G=requestAnimationFrame(Ot):Ge=false;}function dt(){return Ne||ft(Ue())}let Ge=false;function nt(){Ge||(Ge=true,G=requestAnimationFrame(function(){Ot();}));}function rt(){Ge=false,cancelAnimationFrame(G);}let gt=new IntersectionObserver(o=>{o.forEach(c=>{Ne=c.isIntersecting,Ne&&!ce?(We=true,nt()):Ge&&!ce&&ft(Ue())||rt();});},{root:ae??null,threshold:T,rootMargin:U});function It(){_.forEach((o,c)=>{P[c]=je(o),o.style.strokeDasharray=`${P[c]}`;}),Pt(),We=true;}let ot;function Ye(){clearTimeout(ot),ot=setTimeout(It,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let un=Fe([e],Ye);return D>0?setTimeout(()=>gt.observe(e),D):gt.observe(e),mt({destroy(){cancelAnimationFrame(G),clearTimeout(ze),rt(),gt.disconnect(),un(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(ot),Mt();},replay(){q=-1,Re=[],Ve=-1,et=-1,V=false,$=false,He=0,ce=false,Ie=0,_e.clear(),clearTimeout(ze),tt(),We=true,dt()&&nt();},pause(){ce=true,rt();},resume(){ce&&(ce=false,We=true,dt()&&nt());},seek(o){let c=Math.min(1,Math.max(0,o));Ie=c,q=c,Re=[],ce=true,rt(),sn(c,C),We=true;},getProgress(){return Ie},refresh(){clearTimeout(ot),It(),dt()&&!ce&&nt();}},()=>({tStart:l,tEnd:p}))}var Qt=new WeakMap,xn=0;function bt(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=Qt.get(n);return r===void 0&&Qt.set(n,r=++xn),`el#${r}`}return n})}function wt(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...s)=>t()[r]?.(...s));return n}function Mn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ut(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],a=r[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Ln(e,t,n){let r=Ut(e),s=Ut(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,a)=>{let u=s[a];return i.fn!==u.fn||i.nums.length!==u.nums.length?n<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,d)=>`${f}${u.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(u.nums[d]-f)*n}${i.units[d]}`).join(", ")})`}).join(" ")}function Yt(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(Mn(r))return Qe(r,s,n);if(r.includes("("))return Ln(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let u=parseFloat(i[1]),f=parseFloat(a[1]);return `${u+(f-u)*n}${i[2]||a[2]}`}return n<1?r:s}function An(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var $n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Cn=0,Xt="--scroll-draw-progress";function Pn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,t){return typeof window>"u"?Zt:t.respectReducedMotion===false?Kt(e,t,false):qe(t,(n,r)=>Kt(e,n,r))}function Kt(e,t,n){let{props:r,trigger:s={},easing:i="ease-out",speed:a=1,once:u=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:R=false,triggerElement:C,onProgress:Q,onComplete:me,onEnter:I,onLeave:se,onEnterBack:be,onLeaveBack:D}=t,H=typeof i=="function"?i:oe[i]??oe["ease-out"],k=ye(s.start??"top bottom"),M=ye(s.end??"bottom top"),w=C??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(r).map(([l,p])=>({prop:An(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),Xt])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(n)return N(),me?.(),{...Zt,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?it(i):null;function Ee(){if(!x||!Pn()||!fe||f!=="y"||v||w!==e||u||a!==1||Q||me||I||se||be||D||R!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!$n.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++Cn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),$e=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${$e}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let $=()=>f==="x"?window.scrollX:window.scrollY,V=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},$(),V(),k,M)};Pe(e,{type:"animate",getProgress:()=>Ne.getProgress(),getTrigger:G});let Ne={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let Re=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let Ve of T)e.style.setProperty(Ve.prop,Yt(Ve.from,Ve.to,Re));},getProgress(){let{tStart:q,tEnd:Re}=G();return H(ee($(),q,Re,a))}};return Ne}if(Ee())return ie();let z=0,m=0,A=0,h=false,O=false,te=-1,pe=0,Se=false,Z=NaN,E=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(V=>l.getPropertyValue(V.prop)),$e=l.transition;le.length&&(l.transition="none"),le.forEach(V=>l.setProperty(V.prop,B.get(V.prop)??""));let Te=st(w,v,f);le.forEach((V,G)=>l.setProperty(V.prop,p[G])),le.length&&(e.offsetWidth,l.transition=$e);let $=Le(Te,Te.scroll,ae(),k,M);ne&&Math.abs($.tStart-z)<1&&Math.abs($.tEnd-m)<1||(ne=true,z=$.tStart,m=$.tEnd);}function Y(l){e.style.setProperty(Xt,String(l));for(let p of T)e.style.setProperty(p.prop,Yt(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?I?.():Z>0&&l<=0&&D?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||O)return;let l=performance.now(),p=Ae(),$e=a;if(R!==false){let V=l-de,G=V>0?Math.abs(p-(E<0?p:E))/V:0;$e=a*Math.max(.2,1+G*(typeof R=="number"?R:1)*.04);}E=p,de=l;let Te=m===z?0:(p-z)/(m-z);ge(Te);let $=H(ee(p,z,m,$e));u&&(te=Math.max(te,$),$=te),pe=$,Y($),$>=1&&!Se?(Se=true,me?.()):$<1&&!u&&(Se=false),A=requestAnimationFrame(J);}re(),m===z&&he("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=H(ee(Ae(),z,m,a));u&&l>0&&(te=l),pe=l,Y(l);}let Oe=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!O?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function P(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let we=Fe([w],P);return Oe.observe(e),Pe(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:z,tEnd:m})}),{destroy(){cancelAnimationFrame(A),Oe.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),we(),clearTimeout(_),L(),ke(e);},replay(){te=-1,Se=false,pe=0,O=false,Y(0);},pause(){O=true,cancelAnimationFrame(A);},resume(){O&&(O=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,O=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var Et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,t){if(typeof window>"u")return Et;let n=typeof e=="string"?document.querySelector(e):e;return n?qe(t,(r,s)=>kn(n,r,s)):(he("scrollCounter: element not found:",e),Et)}function kn(e,t,n){let{from:r=0,to:s,format:i,easing:a="ease-out",trigger:u={},once:f=true,decimals:d,onComplete:x}=t,R=d!==void 0?m=>m.toFixed(d):i??(m=>String(Math.round(m))),C=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(u.start??"top 80%"),me=ye(u.end??"top 20%");if(n)return e.textContent=R(s),x?.(),{...Et,getProgress:()=>1};let I=0,se=0,be=false,D=0,H=false,k=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let m=e.getBoundingClientRect(),A=Le({top:m.top,height:m.height},T(),U(),Q,me);be&&Math.abs(A.tStart-I)<1&&Math.abs(A.tEnd-se)<1||(be=true,I=A.tStart,se=A.tEnd);}function B(m){e.textContent=R(r+(s-r)*m),e.style.setProperty("--scroll-draw-progress",String(m));}function L(){if(!H||k)return;let m=C(ee(T(),I,se,1));f&&(M=Math.max(M,m),m=M),w=m,B(m),m>=1&&!v?(v=true,x?.()):m<1&&!f&&(v=false),D=requestAnimationFrame(L);}N();{let m=C(ee(T(),I,se,1));f&&m>0&&(M=m),w=m,B(m);}let fe=new IntersectionObserver(m=>{m.forEach(A=>{H=A.isIntersecting,H&&!k?D=requestAnimationFrame(L):cancelAnimationFrame(D);});}),Ee;function ie(){clearTimeout(Ee),Ee=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let z=Fe([e],ie);return fe.observe(e),Pe(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:se})}),{destroy(){cancelAnimationFrame(D),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),z(),clearTimeout(Ee),ke(e);},replay(){M=-1,v=false,w=0,k=false,B(0);},pause(){k=true,cancelAnimationFrame(D);},resume(){k&&(k=false,H&&(D=requestAnimationFrame(L)));},seek(m){let A=Math.min(1,Math.max(0,m));w=A,M=A,k=true,cancelAnimationFrame(D),B(A);},getProgress(){return w}}}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Tt(e,t={}){if(typeof window>"u")return Jt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),Jt;let r=n,{trigger:s={},easing:i="linear",once:a=false,axis:u="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:R,onProgress:C}=t,Q=d??r,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:oe[i]??oe.linear,se=ye(s.start??"top top"),be=ye(s.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let D=t.from??0,H=t.to,k=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>u==="x"?window.scrollX:window.scrollY,Ee=()=>u==="x"?window.innerWidth:window.innerHeight;function ie(){let E=Q.getBoundingClientRect(),de=u==="x"?E.left:E.top,Ae=u==="x"?E.width:E.height,ae=Le({top:de,height:Ae},fe(),Ee(),se,be);k=ae.tStart,M=ae.tEnd,L&&M===k&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let z=NaN;function m(E){if(!L)return;let de=H??r.duration??0,Ae=D+(de-D)*E;Ae!==z&&(z=Ae,r.currentTime=Ae),r.style.setProperty("--scroll-draw-progress",String(E)),C?.(E);}function A(){if(!v||T||!L||me)return;let E=I(ee(fe(),k,M,1));a&&(U=Math.max(U,E),E=U),N=E,m(E),E>=1&&!B?(B=true,R?.()):E<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,H===void 0&&(H=r.duration),me){m(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}r.readyState>=1?h():r.addEventListener("loadedmetadata",h,{once:true}),L||ie();let O=me?()=>{}:ct(E=>{E&&(O(),me=true,cancelAnimationFrame(w),m(1));}),te=new IntersectionObserver(E=>{E.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Se(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Z=Fe([Q],Se);return te.observe(r),Pe(r,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:k,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),r.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),Z(),O(),clearTimeout(pe),ke(r);},replay(){U=-1,B=false,N=0,T=false,z=NaN,m(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(E){let de=Math.min(1,Math.max(0,E));N=de,U=de,T=true,cancelAnimationFrame(w),z=NaN,m(de);},getProgress(){return N}}}function en(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 rn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(r.textContent=n,r.style.whiteSpace="pre"):(r.textContent=n,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(n)?null:r}).filter(n=>n!==null)}function On(e){let t=e.textContent??"";return e.textContent="",t.split("").map(n=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=n,n===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),n===" "?null:r}).filter(n=>n!==null)}function tn(e){let t=rn(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=[],s=Array.from(n.keys()).sort((i,a)=>i-a);for(let i of s){let a=n.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;u.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&u.appendChild(x);}),r.push(u);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function In(e,t,n,r){if(n<=1||r===0)return e;let s=(n-1)*r,i=t*r,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Dn(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 nn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,t={}){if(typeof window>"u")return nn;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return he("scrollText: element not found:",e),nn;let r=n;return qe(t,(s,i)=>Fn(r,s,i))}function Fn(e,t,n){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:u={},once:f=true,onComplete:d}=t,x=typeof i=="function"?i:oe[i]??oe["ease-out"],R=ye(u.start??"top 85%"),C=ye(u.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",I;r==="chars"?I=On(e):r==="lines"?I=tn(e):I=rn(e),en(e,me);let se=I.length;function be(h,O){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*O));let te=Dn(O,a);te&&(h.style.transform=te);}function D(h){e.style.setProperty("--scroll-draw-progress",String(h)),I.forEach((O,te)=>{let pe=x(In(h,te,se,s));be(O,pe);});}if(n)return D(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let H=0,k=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),O=Le({top:h.top,height:h.height},B(),L(),R,C);H=O.tStart,k=O.tEnd;}function Ee(){if(!w||v)return;let h=ee(B(),H,k,1);f&&(T=Math.max(T,h),h=T),U=h,D(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Ee);}fe();let ie=new IntersectionObserver(h=>{h.forEach(O=>{w=O.isIntersecting,w&&!v?M=requestAnimationFrame(Ee):cancelAnimationFrame(M);});}),z;function m(){clearTimeout(z),z=setTimeout(()=>{if(r==="lines"){let h=U;e.innerHTML=Q,I=tn(e),en(e,me),D(h);}fe();},150);}window.addEventListener("resize",m),window.addEventListener("orientationchange",m);let A=Fe([e],m);return ie.observe(e),Pe(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:H,tEnd:k})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),A(),clearTimeout(z),e.innerHTML=Q,ke(e);},replay(){T=-1,N=false,U=0,v=false,D(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Ee)));},seek(h){let O=Math.min(1,Math.max(0,h));U=O,T=O,v=true,cancelAnimationFrame(M),D(O);},getProgress(){return U}}}function Je(e,t,n){let r=t,s=bt(t),i=n(e,wt(t,()=>r));return {update(a){r=a;let u=bt(a);u!==s&&(s=u,i.destroy(),i=n(e,wt(a,()=>r)));},destroy(){i.destroy();}}}function Ur(e,t={}){return Je(e,t,ht)}function Yr(e={}){let t=null;function n(r){return t=ht(r,e),{destroy(){t?.destroy(),t=null;}}}return {action:n,getInstance:()=>t}}function Xr(e,t){return Je(e,t,vt)}function Kr(e){let t=null;function n(r){return t=vt(r,e),{destroy(){t?.destroy(),t=null;}}}return {action:n,getInstance:()=>t}}function Zr(e,t){return Je(e,t,St)}function Jr(e){let t=null;function n(r){return t=St(r,e),{destroy(){t?.destroy(),t=null;}}}return {action:n,getInstance:()=>t}}function eo(e,t={}){return Je(e,t,Tt)}function to(e={}){let t=null;function n(r){return t=Tt(r,e),{destroy(){t?.destroy(),t=null;}}}return {action:n,getInstance:()=>t}}function no(e,t={}){return Je(e,t,xt)}function ro(e={}){let t=null;function n(r){return t=xt(r,e),{destroy(){t?.destroy(),t=null;}}}return {action:n,getInstance:()=>t}}exports.createScrollAnimate=Kr;exports.createScrollCounter=Jr;exports.createScrollDraw=Yr;exports.createScrollText=ro;exports.createScrollVideo=to;exports.scrollAnimate=Xr;exports.scrollCounterAction=Zr;exports.scrollDraw=Ur;exports.scrollTextAction=no;exports.scrollVideoAction=eo;
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
- import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
2
+ import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
3
3
  import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
4
4
  import { ScrollVideoOptions } from '../video/index.mjs';
5
5
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
- import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
2
+ import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
3
3
  import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
4
4
  import { ScrollVideoOptions } from '../video/index.js';
5
5
  import { ScrollTextOptions } from '../text/index.js';