svg-scroll-draw 2.10.1 → 2.11.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.
package/README.md CHANGED
@@ -13,6 +13,8 @@
13
13
 
14
14
  **Try it in your browser, no install:** [Vanilla JS on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/vanilla) · [React on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/react)
15
15
 
16
+ **Using an AI coding agent?** Give it the [svg-scroll-draw skill](https://github.com/DhruvilChauahan0210/ink-scroll/blob/main/skills/svg-scroll-draw/SKILL.md) or point it at [llms.txt](https://svg-scroll-draw.vercel.app/llms.txt).
17
+
16
18
  ![svg-scroll-draw demo: SVG paths drawing as the page scrolls](https://raw.githubusercontent.com/DhruvilChauahan0210/ink-scroll/main/demo.gif)
17
19
 
18
20
  ---
@@ -28,6 +30,7 @@
28
30
  | `scrollVideo` | `svg-scroll-draw/video` | Tie `<video>.currentTime` to scroll. The Apple/Stripe product-page pattern. |
29
31
  | `scrollText` | `svg-scroll-draw/text` | Split text into chars/words/lines and stagger-animate each on scroll. 2.5 KB, nothing else to load. |
30
32
  | `devtools` | `svg-scroll-draw/devtools` | Visual overlay showing every active animation's triggers and progress. Dev-only. |
33
+ | `AOS` | `svg-scroll-draw/aos` | Drop-in replacement for AOS: same `AOS.init()`, same `data-aos` markup, no `aos.css`. |
31
34
 
32
35
  All APIs return the same instance object: `{ destroy, replay, pause, resume, seek, getProgress }`.
33
36
 
@@ -355,6 +358,45 @@ import { ScrollDraw } from 'svg-scroll-draw/vue';
355
358
 
356
359
  ---
357
360
 
361
+ ## AOS drop-in — switch from AOS in one line
362
+
363
+ Already using [AOS](https://github.com/michalsnik/aos)? `svg-scroll-draw/aos` speaks its API and
364
+ reads its markup, so the move is an import change. Keep every `data-aos`, `data-aos-offset`,
365
+ `data-aos-delay`, `data-aos-anchor-placement` and custom animation; delete `aos.css` — the styles ship
366
+ inside the module. 3.0 KB gzipped with the styles, against 6.7 KB for AOS 2.3.4 with its stylesheet.
367
+
368
+ ```diff
369
+ - import AOS from 'aos';
370
+ - import 'aos/dist/aos.css';
371
+ + import AOS from 'svg-scroll-draw/aos';
372
+
373
+ AOS.init({ once: true });
374
+ ```
375
+
376
+ No bundler? Swap the script tag, and drop the stylesheet link:
377
+
378
+ ```html
379
+ <script src="https://unpkg.com/svg-scroll-draw/dist/cdn/aos.global.js"></script>
380
+ <script>AOS.init();</script>
381
+ ```
382
+
383
+ `init`, `refresh` and `refreshHard` behave as in AOS 2.3.4: the same trigger positions (anchor
384
+ placements, `data-aos-anchor`, offsets — including AOS's rule that an inline anchor placement without an
385
+ inline offset uses 0), the same `aos-init` / `aos-animate` classes, the same transforms and end states.
386
+ The browser suite runs AOS 2.3.4 and the drop-in side by side on one page in Chromium, Firefox and
387
+ WebKit and fails if any element differs at any scroll stop. AOS 3's `mirror`, `anchorPlacement`,
388
+ `initClassName`, `animatedClassName`, `useClassNames` and the `aos:in` / `aos:out` events work too.
389
+
390
+ Differences, on purpose:
391
+
392
+ - `prefers-reduced-motion: reduce` shows every element in its final state, with no transition.
393
+ - `disable: 'phone' | 'tablet' | 'mobile'` checks the viewport width, not the user agent.
394
+ - Trigger positions are re-measured on `load`, so images that finish late do not shift them.
395
+ - `AOS.destroy()` stops everything, for single-page apps that unmount the page.
396
+ - `throttleDelay` / `debounceDelay` are accepted and ignored: scroll work is batched per frame.
397
+
398
+ ---
399
+
358
400
  ## Instance API
359
401
 
360
402
  Every function returns the same instance object:
@@ -445,6 +487,7 @@ devtools.highlight('#my-element'); // outline for 2 seconds
445
487
  | `svg-scroll-draw/timeline` | `scrollDrawTimeline` |
446
488
  | `svg-scroll-draw/cinematic` | `Cinematic` |
447
489
  | `svg-scroll-draw/devtools` | `devtools` (dev-only) |
490
+ | `svg-scroll-draw/aos` | `AOS` (default), `init`, `refresh`, `refreshHard`, `destroy` |
448
491
 
449
492
  ---
450
493
 
@@ -457,6 +500,7 @@ devtools.highlight('#my-element'); // outline for 2 seconds
457
500
  | `svg-scroll-draw/reveal` | 4.5 KB |
458
501
  | `svg-scroll-draw/text` | 2.5 KB |
459
502
  | `svg-scroll-draw/video` | 2.0 KB |
503
+ | `svg-scroll-draw/aos` (styles included) | 3.0 KB |
460
504
  | `svg-scroll-draw/snap` | 1.7 KB |
461
505
  | `svg-scroll-draw/devtools` | 1.7 KB (dev only) |
462
506
  | `svg-scroll-draw/pin` | 1.6 KB |
@@ -1,3 +1,3 @@
1
- 'use strict';function Bt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),o=0,c=[];for(let d=0;d<n;d++){let x=Math.pow(l,d);c.push(x),o+=x;}let u=[0],m=0;for(let d=0;d<n;d++)m+=c[d]/o,u.push(m);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 N=(d-u[x])/(u[x+1]-u[x]);if(x===0)return N*(2-N);let L=1-Math.pow(t,x);return L+(1-L)*(2*N-1)*(2*N-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-l)*(2*Math.PI)/t)+1}var ee={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Bt(),elastic:Gt()};function fe(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 dt(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 gt(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 _e(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 jt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function Qe(e,r,n){let t=e.getBoundingClientRect(),l=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:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let o=dt(e.top,e.height,r,t.element)-gt(t.viewport,n),c=dt(e.top,e.height,r,l.element)-gt(l.viewport,n);return {tStart:o,tEnd:c}}function ht(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 Ve(e,r,n){let t=ht(e),l=ht(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var yt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function be(e,...r){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Yt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ut="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",bt=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<bt;n++){let t=n/(bt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function Ke(e){switch(e){case "linear":return "linear";case "ease-in":return Yt;case "ease-out":return Ut;case "ease-in-out":return Xt()?Qt(ee["ease-in-out"]):null;default:return null}}var wt=Symbol.for("svg-scroll-draw.registry");function vt(){let e=globalThis;return e[wt]||(e[wt]=new Map)}function Le(e,r){vt().set(e,r);}function Pe(e){vt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?be("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&be("Element has a fill \u2014 it may obscure the stroke animation.",e);}function er(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 l(){let o=n==="x"?window.scrollX:window.scrollY,c=e-o,u=r-o,m=n==="x";t.innerHTML=`
1
+ 'use strict';function Bt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),o=0,c=[];for(let p=0;p<n;p++){let T=Math.pow(l,p);c.push(T),o+=T;}let u=[0],m=0;for(let p=0;p<n;p++)m+=c[p]/o,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let T=0;T<n;T++)if(p<=u[T+1]){let z=(p-u[T])/(u[T+1]-u[T]);if(T===0)return z*(2-z);let P=1-Math.pow(t,T);return P+(1-P)*(2*z-1)*(2*z-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-l)*(2*Math.PI)/t)+1}var re={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Bt(),elastic:Gt()};function de(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 dt(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 gt(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 _e(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 jt(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function Qe(e,r,n){let t=e.getBoundingClientRect(),l=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:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let o=dt(e.top,e.height,r,t.element)-gt(t.viewport,n),c=dt(e.top,e.height,r,l.element)-gt(l.viewport,n);return {tStart:o,tEnd:c}}function ht(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 Ve(e,r,n){let t=ht(e),l=ht(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var yt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Yt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ut="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",bt=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<bt;n++){let t=n/(bt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function Ke(e){switch(e){case "linear":return "linear";case "ease-in":return Yt;case "ease-out":return Ut;case "ease-in-out":return Xt()?Qt(re["ease-in-out"]):null;default:return null}}var wt=Symbol.for("svg-scroll-draw.registry");function vt(){let e=globalThis;return e[wt]||(e[wt]=new Map)}function Le(e,r){vt().set(e,r);}function Pe(e){vt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?we("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function er(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 l(){let o=n==="x"?window.scrollX:window.scrollY,c=e-o,u=r-o,m=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${c}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${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",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Et=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,St=/[MmLlHhVvCcSsQqTtAaZz]/g;function tr(e,r,n){if(!Ze)return;let t=(e.match(St)??[]).join("").toUpperCase(),l=(r.match(St)??[]).join("").toUpperCase(),o=(e.match(Et)??[]).length,c=(r.match(Et)??[]).length;if(t!==l){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}o!==c&&be(`morphTo: coordinate count differs (${o} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function st(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let c=parseFloat(o),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function Tt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...yt[n],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:x={},stagger:N=0,direction:L="forward",once:te=false,debug:$e=false,axis:W="y",scrollContainer:Z,autoReverse:U=false,delay:B=0,strokeColor:A,strokeWidth:P,fillOpacity:M,waypoints:v,velocityScale:k=false,threshold:I=0,rootMargin:$="0px",repeat:S=0,repeatDelay:re=0,morphTo:O,clip:ne,autoplay:se=false,duration:K=1e3,native:ce=true,onProgress:h,onStart:T,onComplete:g,onEnter:p,onLeave:F,onEnterBack:pe,onLeaveBack:Ee}=l,ue=ne===true?"left":typeof ne=="string"?ne:false,Se=typeof d=="function"?d:ee[d]??ee.linear,Ce=fe(x.start??"top bottom"),Ne=fe(x.end??"bottom top"),we=typeof Z=="string"?document.querySelector(Z):Z??null,ve=Array.isArray(A)?A[0]:null,oe=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ie=Array.isArray(P)?P[0]:null,G=Array.isArray(P)?P[1]:typeof P=="number"?P:null,me=Array.isArray(M)?M[0]:null,X=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function ke(s){let a=s*100;switch(ue){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=ue?[]:Array.from(e.querySelectorAll(c)),C=[],i=[],f=0,de=0,R=false,_=false,V=0,Ae=false,ge=-1,J=-1,j=false,he=0,Oe=0,Fe,Je=null;function it(){Je?.destroy(),Je=null;}let Re=new Set,at=NaN,He=true,Be=-1,lt=performance.now(),ze=NaN;function et(){return we?W==="x"?we.scrollLeft:we.scrollTop:W==="x"?window.scrollX:window.scrollY}function ct(){return we?W==="x"?we.clientWidth:we.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function ut(){let s=Qe(e,we,W);return xe(s,s.scroll,ct(),Ce,Ne)}function mt(){(({tStart:f,tEnd:de}=ut())),$e&&Ze&&(it(),Je=er(f,de,W));}function tt(s,a=ut){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let w=s.destroy;return s.destroy=()=>{w.call(s),Pe(e);},s}function _t(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),ue){let w=a==="reverse"?1-s:s;e.style.clipPath=ke(w);return}z.forEach((w,ae)=>{w.style.strokeDashoffset=a==="reverse"?`${C[ae]*s}`:`${C[ae]*(1-s)}`,m&&(w.style.opacity=a==="reverse"?`${1-s}`:`${s}`),ve&&oe?w.style.stroke=Ve(ve,oe,s):oe&&(w.style.stroke=oe),ie!==null&&G!==null?w.style.strokeWidth=`${ie+(G-ie)*s}`:G!==null&&(w.style.strokeWidth=`${G}`),me!==null&&X!==null?w.style.fillOpacity=`${me+(X-me)*s}`:X!==null&&(w.style.fillOpacity=`${X}`),O&&w.tagName.toLowerCase()==="path"&&i[ae]&&w.setAttribute("d",st(i[ae],O,s));});}function Ge(){if(e.style.setProperty("--scroll-draw-progress","0"),ue){e.style.clipPath=ke(0);return}z.forEach((s,a)=>{s.style.strokeDasharray=`${C[a]}`,s.style.strokeDashoffset=L==="reverse"?"0":`${C[a]}`,m?s.style.opacity=L==="reverse"?"1":"0":s.style.opacity="",ve&&(s.style.stroke=ve),ie!==null&&(s.style.strokeWidth=`${ie}`),me!==null&&(s.style.fillOpacity=`${me}`),O&&s.tagName.toLowerCase()==="path"&&i[a]&&s.setAttribute("d",i[a]);});}if(z.forEach(s=>{Jt(s);let a=_e(s);C.push(a);let w=s.tagName.toLowerCase()==="path";w?i.push(s.getAttribute("d")??""):i.push(""),O&&(w?tr(i[i.length-1],O,s):be(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=L==="reverse"?`${a}`:"0",m&&(s.style.opacity="1"),oe&&(s.style.stroke=oe),G!==null&&(s.style.strokeWidth=`${G}`),X!==null&&(s.style.fillOpacity=`${X}`),O&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",O)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=L==="reverse"?"0":`${a}`,m?s.style.opacity=L==="reverse"?"1":"0":s.style.opacity="",ve&&(s.style.stroke=ve),ie!==null&&(s.style.strokeWidth=`${ie}`),me!==null&&(s.style.fillOpacity=`${me}`));}),ue){if(o)return e.style.clipPath=ke(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ft=typeof d=="string"?Ke(d):null;function Vt(){return !(ce===false||!Kt()||!z.length||!ft||ue||W!=="y"||we||u!==1||N!==0||te||U||k!==false||O||v||S||B>0||h||T||g||p||F||pe||Ee||A!=null||P!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function qt(){let s=++Zt,a=`svg-scroll-draw-${s}`,w=`svg-scroll-draw-host-${s}`,ae=`--svg-scroll-draw-${s}`,De=L==="reverse"?"0":"var(--ssd-len)",Ie=L==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${De};`,E=`stroke-dashoffset:${Ie};`;m&&(Me+=`opacity:${L==="reverse"?1:0};`,E+=`opacity:${L==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${a}{from{${Me}}to{${E}}}.${w}{view-timeline-name:${ae};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${ft};animation-fill-mode:both;animation-timeline:${ae};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function le(y,Y){y.style.setProperty("--ssd-len",String(C[Y])),y.style.strokeDasharray=`${C[Y]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(a);}z.forEach(le);let b=false,H=-1;function q(){if(H>=0)return H;let y=e.getBoundingClientRect(),{tStart:Y,tEnd:Te}=xe({top:y.top,height:y.height},et(),ct(),Ce,Ne);return Se(Q(et(),Y,Te,u))}return {destroy(){e.classList.remove(w),z.forEach(y=>{y.classList.remove(a),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){b=false,H=-1,z.forEach(le);},pause(){b=true,z.forEach(y=>{y.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let Y=Math.min(1,Math.max(0,y));H=Y,b=true,z.forEach((Te,ye)=>{Te.classList.remove(a),Te.style.strokeDashoffset=L==="reverse"?`${C[ye]*Y}`:`${C[ye]*(1-Y)}`,m&&(Te.style.opacity=L==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return q()},refresh(){z.forEach((y,Y)=>{C[Y]=_e(y),y.style.setProperty("--ssd-len",String(C[Y])),y.style.strokeDasharray=`${C[Y]}`;});}}}if(Vt())return tt(qt());function Wt(){let s=Math.max(1,K),a=0,w=0,ae=false;function De(b){let H=true;if(ue){let q=Math.min(1,Math.max(0,b/s)),y=Se(q);he=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=ke(L==="reverse"?1-y:y),h?.(y),q<1&&(H=false);}else z.forEach((q,y)=>{let Y=y*N*s,Te=Math.min(1,Math.max(0,(b-Y)/s)),ye=Se(Te);q.style.strokeDashoffset=L==="reverse"?`${C[y]*ye}`:`${C[y]*(1-ye)}`,m&&(q.style.opacity=L==="reverse"?`${1-ye}`:`${ye}`),ve&&oe?q.style.stroke=Ve(ve,oe,ye):oe&&(q.style.stroke=oe),ie!==null&&G!==null?q.style.strokeWidth=`${ie+(G-ie)*ye}`:G!==null&&(q.style.strokeWidth=`${G}`),me!==null&&X!==null?q.style.fillOpacity=`${me+(X-me)*ye}`:X!==null&&(q.style.fillOpacity=`${X}`),O&&q.tagName.toLowerCase()==="path"&&i[y]&&q.setAttribute("d",st(i[y],O,ye)),y===0&&(he=ye,h?.(ye),e.style.setProperty("--scroll-draw-progress",String(ye))),Te<1&&(H=false);});if(v){let q=Math.min(1,Math.max(0,b/s)),y=Se(q);for(let Y in v){let Te=parseFloat(Y);y>=Te&&!Re.has(Te)&&(Re.add(Te),v[Y]?.());}}return H}function Ie(b){if(j)return;let H=b-a;_||(_=true,T?.());let q=De(H);if(q&&!R){R=true,De(s*(1+Math.max(0,z.length-1)*N)),g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{a=performance.now(),_=false,R=false,Re.clear(),Ge(),V=requestAnimationFrame(Ie);},re));return}q||(V=requestAnimationFrame(Ie));}function Me(){cancelAnimationFrame(V),clearTimeout(Fe),a=performance.now(),w=0,j=false,_=false,R=false,Oe=0,ae=true,he=0,Re.clear(),Ge(),V=requestAnimationFrame(Ie);}let E=new IntersectionObserver(b=>{b.forEach(H=>{H.isIntersecting&&!(te&&R)?Me():!H.isIntersecting&&!te&&!R&&(cancelAnimationFrame(V),clearTimeout(Fe),ae=false);});},{root:we??null,threshold:I,rootMargin:$}),D;function le(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,H)=>{C[H]=_e(b),b.style.strokeDasharray=`${C[H]}`;});},150);}return window.addEventListener("resize",le),window.addEventListener("orientationchange",le),B>0?setTimeout(()=>E.observe(e),B):E.observe(e),{destroy(){cancelAnimationFrame(V),clearTimeout(Fe),E.disconnect(),window.removeEventListener("resize",le),window.removeEventListener("orientationchange",le),clearTimeout(D);},replay(){Oe=0,Me();},pause(){j||!ae||(j=true,w=performance.now()-a,cancelAnimationFrame(V));},resume(){j&&(j=false,ae=true,a=performance.now()-w,V=requestAnimationFrame(Ie));},seek(b){let H=Math.min(1,Math.max(0,b));he=H,j=true,w=H*s,a=performance.now()-w,cancelAnimationFrame(V),De(w);},getProgress(){return he},refresh(){clearTimeout(D),z.forEach((b,H)=>{C[H]=_e(b),b.style.strokeDasharray=`${C[H]}`;});}}}if(se)return tt(Wt());mt();function je(){if(!Ae||j)return;let s=performance.now(),a=et();if(!He&&k===false&&a===at){V=requestAnimationFrame(je);return}He=false,at=a;let w=u;if(k!==false){let E=s-lt,D=E>0?Math.abs(a-(Be<0?a:Be))/E:0;w=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Be=a,lt=s;let ae=U?J===-1||a>=J?"forward":"reverse":L;J=a;let De=de-f,Ie=true,Me=De===0?0:(a-f)/De;if(isNaN(ze)||(ze<=0&&Me>0?p?.():ze>0&&Me<=0&&Ee?.(),ze<1&&Me>=1?F?.():ze>=1&&Me<1&&pe?.()),ze=Me,ue){let E=Se(Q(a,f,de,w));te&&!U&&(ge=Math.max(ge,E),E=ge),he=E,e.style.setProperty("--scroll-draw-progress",String(E));let D=ae==="reverse"?1-E:E;e.style.clipPath=ke(D),h?.(E),!_&&Q(a,f,de,w)>0&&(_=true,T?.()),E>=1&&!R?(R=true,g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{ge=-1,_=false,R=false,e.style.clipPath=ke(0);},re))):E<1&&!te&&(R=false),V=requestAnimationFrame(je);return}if(z.forEach((E,D)=>{let le=D*N*De,b=Se(Q(a,f+le,de+le,w));te&&!U&&(ge=Math.max(ge,b),b=ge),he=b,E.style.strokeDashoffset=ae==="reverse"?`${C[D]*b}`:`${C[D]*(1-b)}`,m&&(E.style.opacity=ae==="reverse"?`${1-b}`:`${b}`),ve&&oe?E.style.stroke=Ve(ve,oe,b):oe&&(E.style.stroke=oe),ie!==null&&G!==null?E.style.strokeWidth=`${ie+(G-ie)*b}`:G!==null&&(E.style.strokeWidth=`${G}`),me!==null&&X!==null?E.style.fillOpacity=`${me+(X-me)*b}`:X!==null&&(E.style.fillOpacity=`${X}`),O&&E.tagName.toLowerCase()==="path"&&i[D]&&E.setAttribute("d",st(i[D],O,b)),D===0&&(h?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Ie=false);}),v){let E=Se(Q(a,f,de,w));for(let D in v){let le=parseFloat(D);E>=le&&!Re.has(le)&&(Re.add(le),v[D]?.());}}!_&&Q(a,f,de,w)>0&&(_=true,T?.()),Ie&&!R?(R=true,g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{ge=-1,_=false,R=false,Re.clear(),Ge(),He=true;},re))):!Ie&&!te&&(R=false),V=requestAnimationFrame(je);}let rt=false;function Ye(){rt||(rt=true,V=requestAnimationFrame(function(){je();}));}function Ue(){rt=false,cancelAnimationFrame(V);}let nt=new IntersectionObserver(s=>{s.forEach(a=>{Ae=a.isIntersecting,Ae&&!j?(He=true,Ye()):Ue();});},{root:we??null,threshold:I,rootMargin:$});function pt(){z.forEach((s,a)=>{C[a]=_e(s),s.style.strokeDasharray=`${C[a]}`;}),mt(),He=true;}let Xe;function qe(){clearTimeout(Xe),Xe=setTimeout(pt,150);}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(()=>qe()),We.observe(document.body),We.observe(document.documentElement),We.observe(e)),B>0?setTimeout(()=>nt.observe(e),B):nt.observe(e),tt({destroy(){cancelAnimationFrame(V),clearTimeout(Fe),Ue(),nt.disconnect(),We?.disconnect(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(Xe),it();},replay(){ge=-1,J=-1,Be=-1,_=false,R=false,Oe=0,j=false,he=0,Re.clear(),clearTimeout(Fe),Ge(),He=true,Ae&&Ye();},pause(){j=true,Ue();},resume(){j&&(j=false,He=true,Ae&&Ye());},seek(s){let a=Math.min(1,Math.max(0,s));he=a,ge=a,j=true,Ue(),_t(a,L),He=true;},getProgress(){return he},refresh(){clearTimeout(Xe),pt(),Ae&&!j&&Ye();}},()=>({tStart:f,tEnd:de}))}function rr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],o=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:o});}return r}function nr(e,r,n){let t=xt(e),l=xt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((o,c)=>{let u=l[c];return o.fn!==u.fn||o.nums.length!==u.nums.length?n<1?`${o.fn}(${o.nums.map((m,d)=>`${m}${o.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,d)=>`${m+(u.nums[d]-m)*n}${o.units[d]}`).join(", ")})`}).join(" ")}function At(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(rr(t))return Ve(t,l,n);if(t.includes("("))return nr(t,l,n);let o=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(o&&c){let u=parseFloat(o[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${o[2]||c[2]}`}return n<1?t:l}function sr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var or=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ir=0,Mt="--scroll-draw-progress";function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Lt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:o="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:N=false,respectReducedMotion:L=true,triggerElement:te,onProgress:$e,onComplete:W,onEnter:Z,onLeave:U,onEnterBack:B,onLeaveBack:A}=r,P=L&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof o=="function"?o:ee[o]??ee["ease-out"],v=fe(l.start??"top bottom"),k=fe(l.end??"bottom top"),I=te??e,$=typeof d=="string"?document.querySelector(d):d??null,S=Object.entries(t).map(([i,f])=>({prop:sr(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function re(){let i=window.getComputedStyle(e);for(let f of S)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function O(){for(let i of S)e.style.setProperty(i.prop,String(i.to));}let ne=new Map;for(let i of [...S.map(f=>f.prop),Mt])ne.set(i,e.style.getPropertyValue(i));function se(){for(let[i,f]of ne)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if(P)return O(),W?.(),{...n,destroy:se,getProgress:()=>1};re();let K=typeof o=="string"?Ke(o):null;function ce(){if(!x||!ar()||!K||m!=="y"||$||I!==e||u||c!==1||$e||W||Z||U||B||A||N!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of S)if(!or.has(i.prop))return false;return true}function h(){let i=`ssd-a-${++ir}`,f=S.map(J=>`${J.prop}:${J.from}`).join(";"),de=S.map(J=>`${J.prop}:${J.to}`).join(";"),R=document.createElement("style");R.setAttribute("data-ssd-animate",""),R.textContent=`@keyframes ${i}{from{${f}}to{${de}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${K};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(i);let _=()=>m==="x"?window.scrollX:window.scrollY,V=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let J=e.getBoundingClientRect();return xe({top:J.top,height:J.height},_(),V(),v,k)};Le(e,{type:"animate",getProgress:()=>ge.getProgress(),getTrigger:Ae});let ge={destroy(){e.classList.remove(i),R.remove(),e.style.animationPlayState="",se(),Pe(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(J){let j=Math.min(1,Math.max(0,J));e.classList.remove(i);for(let he of S)e.style.setProperty(he.prop,At(he.from,he.to,j));},getProgress(){let{tStart:J,tEnd:j}=Ae();return M(Q(_(),J,j,c))}};return ge}if(ce())return h();let T=0,g=0,p=0,F=false,pe=false,Ee=-1,ue=0,Se=false,Ce=NaN,Ne=-1,we=0,ve=()=>$?m==="x"?$.scrollLeft:$.scrollTop:m==="x"?window.scrollX:window.scrollY,oe=()=>$?m==="x"?$.clientWidth:$.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ie(){let i=Qe(I,$,m),f=xe(i,i.scroll,oe(),v,k);T=f.tStart,g=f.tEnd;}function G(i){e.style.setProperty(Mt,String(i));for(let f of S)e.style.setProperty(f.prop,At(f.from,f.to,i));$e?.(i);}function me(i){if(isNaN(Ce)){Ce=i;return}Ce<=0&&i>0?Z?.():Ce>0&&i<=0&&A?.(),Ce<1&&i>=1?U?.():Ce>=1&&i<1&&B?.(),Ce=i;}function X(){if(!F||pe)return;let i=performance.now(),f=ve(),de=c;if(N!==false){let V=i-we,Ae=V>0?Math.abs(f-(Ne<0?f:Ne))/V:0;de=c*Math.max(.2,1+Ae*(typeof N=="number"?N:1)*.04);}Ne=f,we=i;let R=g===T?0:(f-T)/(g-T);me(R);let _=M(Q(f,T,g,de));u&&(Ee=Math.max(Ee,_),_=Ee),ue=_,G(_),_>=1&&!Se?(Se=true,W?.()):_<1&&!u&&(Se=false),p=requestAnimationFrame(X);}ie(),g===T&&be("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let i=M(Q(ve(),T,g,c));u&&i>0&&(Ee=i),ue=i,G(i);}let ke=new IntersectionObserver(i=>{i.forEach(f=>{F=f.isIntersecting,F&&!pe?p=requestAnimationFrame(X):cancelAnimationFrame(p);});},{root:$??null}),z;function C(){clearTimeout(z),z=setTimeout(ie,150);}return window.addEventListener("resize",C),window.addEventListener("orientationchange",C),ke.observe(e),Le(e,{type:"animate",getProgress:()=>ue,getTrigger:()=>({tStart:T,tEnd:g})}),{destroy(){cancelAnimationFrame(p),ke.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),clearTimeout(z),se(),Pe(e);},replay(){Ee=-1,Se=false,ue=0,pe=false,G(0);},pause(){pe=true,cancelAnimationFrame(p);},resume(){pe&&(pe=false,F&&(p=requestAnimationFrame(X)));},seek(i){let f=Math.min(1,Math.max(0,i));ue=f,Ee=f,pe=true,cancelAnimationFrame(p),G(f);},getProgress(){return ue}}}var ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,r){if(typeof window>"u")return ot;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollCounter: element not found:",e),ot;let t=n,{from:l=0,to:o,format:c,easing:u="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:N}=r,L=x!==void 0?h=>h.toFixed(x):c??(h=>String(Math.round(h))),te=typeof u=="function"?u:ee[u]??ee["ease-out"],$e=fe(m.start??"top 80%"),W=fe(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=L(o),N?.(),ot;let U=0,B=0,A=0,P=false,M=false,v=-1,k=0,I=false,$=()=>window.scrollY,S=()=>window.innerHeight;function re(){let h=t.getBoundingClientRect(),T=xe({top:h.top,height:h.height},$(),S(),$e,W);U=T.tStart,B=T.tEnd;}function O(h){t.textContent=L(l+(o-l)*h),t.style.setProperty("--scroll-draw-progress",String(h));}function ne(){if(!P||M)return;let h=te(Q($(),U,B,1));d&&(v=Math.max(v,h),h=v),k=h,O(h),h>=1&&!I?(I=true,N?.()):h<1&&!d&&(I=false),A=requestAnimationFrame(ne);}re();{let h=te(Q($(),U,B,1));d&&h>0&&(v=h),k=h,O(h);}let se=new IntersectionObserver(h=>{h.forEach(T=>{P=T.isIntersecting,P&&!M?A=requestAnimationFrame(ne):cancelAnimationFrame(A);});}),K;function ce(){clearTimeout(K),K=setTimeout(re,150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),se.observe(t),Le(t,{type:"counter",getProgress:()=>k,getTrigger:()=>({tStart:U,tEnd:B})}),{destroy(){cancelAnimationFrame(A),se.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(K),Pe(t);},replay(){v=-1,I=false,k=0,M=false,O(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,P&&(A=requestAnimationFrame(ne)));},seek(h){let T=Math.min(1,Math.max(0,h));k=T,v=T,M=true,cancelAnimationFrame(A),O(T);},getProgress(){return k}}}var $t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,r={}){if(typeof window>"u")return $t;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),$t;let t=n,{trigger:l={},easing:o="linear",once:c=false,axis:u="y",preload:m="auto",onReady:d,onComplete:x,onProgress:N}=r,L=window.matchMedia("(prefers-reduced-motion: reduce)").matches,te=typeof o=="function"?o:ee[o]??ee.linear,$e=fe(l.start??"top top"),W=fe(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Z=r.from??0,U=r.to,B=0,A=0,P=0,M=false,v=false,k=-1,I=0,$=false,S=false,re=()=>u==="x"?window.scrollX:window.scrollY,O=()=>u==="x"?window.innerWidth:window.innerHeight;function ne(){let p=t.getBoundingClientRect(),F=u==="x"?p.left:p.top,pe=u==="x"?p.width:p.height,Ee=xe({top:F,height:pe},re(),O(),$e,W);B=Ee.tStart,A=Ee.tEnd;}function se(p){if(!S)return;let F=U??t.duration??0;t.currentTime=Z+(F-Z)*p,t.style.setProperty("--scroll-draw-progress",String(p)),N?.(p);}function K(){if(!M||v||!S)return;let p=te(Q(re(),B,A,1));c&&(k=Math.max(k,p),p=k),I=p,se(p),p>=1&&!$?($=true,x?.()):p<1&&!c&&($=false),P=requestAnimationFrame(K);}function ce(){if(S=true,U===void 0&&(U=t.duration),L){se(1),d?.();return}ne(),d?.(),M&&!v&&(P=requestAnimationFrame(K));}t.readyState>=1?ce():t.addEventListener("loadedmetadata",ce,{once:true}),S||ne();let h=new IntersectionObserver(p=>{p.forEach(F=>{M=F.isIntersecting,M&&!v&&S?P=requestAnimationFrame(K):cancelAnimationFrame(P);});}),T;function g(){clearTimeout(T),T=setTimeout(ne,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),h.observe(t),Le(t,{type:"video",getProgress:()=>I,getTrigger:()=>({tStart:B,tEnd:A})}),{destroy(){cancelAnimationFrame(P),h.disconnect(),t.removeEventListener("loadedmetadata",ce),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(T),Pe(t);},replay(){k=-1,$=false,I=0,v=false,se(0);},pause(){v=true,cancelAnimationFrame(P);},resume(){v&&(v=false,M&&S&&(P=requestAnimationFrame(K)));},seek(p){let F=Math.min(1,Math.max(0,p));I=F,k=F,v=true,cancelAnimationFrame(P),se(F);},getProgress(){return I}}}function Ot(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 lr(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=Ot(e),n=new Map;for(let o of r){let c=o.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(o);}let t=[],l=Array.from(n.keys()).sort((o,c)=>o-c);for(let o of l){let c=n.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,d)=>{let x=m.nextElementSibling;u.appendChild(m),d<c.length-1&&x&&x.style.whiteSpace==="pre"&&u.appendChild(x);}),t.push(u);}return e.textContent="",t.forEach((o,c)=>{e.appendChild(o),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function cr(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,o=r*t,c=o+(1-l);return c<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(c-o)))}function ur(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 It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:o=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=r,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof c=="function"?c:ee[c]??ee["ease-out"],te=fe(m.start??"top 85%"),$e=fe(m.end??"top 40%"),W=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let Z;l==="chars"?Z=lr(t):l==="lines"?Z=kt(t):Z=Ot(t);let U=Z.length;function B(g,p){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*p));let F=ur(p,u);F&&(g.style.transform=F);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),Z.forEach((p,F)=>{let pe=L(cr(g,F,U,o));B(p,pe);});}if(N)return A(1),x?.(),{destroy(){t.innerHTML=W,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let P=0,M=0,v=0,k=false,I=false,$=-1,S=0,re=false,O=()=>window.scrollY,ne=()=>window.innerHeight;function se(){let g=t.getBoundingClientRect(),p=xe({top:g.top,height:g.height},O(),ne(),te,$e);P=p.tStart,M=p.tEnd;}function K(){if(!k||I)return;let g=Q(O(),P,M,1);d&&($=Math.max($,g),g=$),S=g,A(g),g>=1&&!re?(re=true,x?.()):g<1&&!d&&(re=false),v=requestAnimationFrame(K);}se();let ce=new IntersectionObserver(g=>{g.forEach(p=>{k=p.isIntersecting,k&&!I?v=requestAnimationFrame(K):cancelAnimationFrame(v);});}),h;function T(){clearTimeout(h),h=setTimeout(()=>{if(l==="lines"){let g=S;t.innerHTML=W,t.setAttribute("aria-label",t.textContent??""),Z=kt(t),A(g);}se();},150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),ce.observe(t),Le(t,{type:"text",getProgress:()=>S,getTrigger:()=>({tStart:P,tEnd:M})}),{destroy(){cancelAnimationFrame(v),ce.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(h),t.innerHTML=W,t.removeAttribute("aria-label"),Pe(t);},replay(){$=-1,re=false,S=0,I=false,A(0);},pause(){I=true,cancelAnimationFrame(v);},resume(){I&&(I=false,k&&(v=requestAnimationFrame(K)));},seek(g){let p=Math.min(1,Math.max(0,g));S=p,$=p,I=true,cancelAnimationFrame(v),A(p);},getProgress(){return S}}}var Ft=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Tt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Rt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Lt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Ht=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Pt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Nt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Ct(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},zt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Dt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}};exports.ScrollAnimateRef=Rt;exports.ScrollCounterRef=Ht;exports.ScrollDrawRef=Ft;exports.ScrollTextRef=zt;exports.ScrollVideoRef=Nt;
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",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Et=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,St=/[MmLlHhVvCcSsQqTtAaZz]/g;function tr(e,r,n){if(!Ze)return;let t=(e.match(St)??[]).join("").toUpperCase(),l=(r.match(St)??[]).join("").toUpperCase(),o=(e.match(Et)??[]).length,c=(r.match(Et)??[]).length;if(t!==l){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}o!==c&&we(`morphTo: coordinate count differs (${o} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function st(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let c=parseFloat(o),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function Tt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...yt[n],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:T={},stagger:z=0,direction:P="forward",once:ne=false,debug:$e=false,axis:B="y",scrollContainer:J,autoReverse:X=false,delay:G=0,strokeColor:A,strokeWidth:$,fillOpacity:M,waypoints:w,velocityScale:I=false,threshold:O=0,rootMargin:C="0px",repeat:E=0,repeatDelay:se=0,morphTo:D,clip:oe,autoplay:ie=false,duration:ee=1e3,native:ae=true,onProgress:d,onStart:x,onComplete:g,onEnter:L,onLeave:S,onEnterBack:N,onLeaveBack:fe}=l,Q=oe===true?"left":typeof oe=="string"?oe:false,Se=typeof p=="function"?p:re[p]??re.linear,Ce=de(T.start??"top bottom"),He=de(T.end??"bottom top"),ve=typeof J=="string"?document.querySelector(J):J??null,Ee=Array.isArray(A)?A[0]:null,le=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ce=Array.isArray($)?$[0]:null,j=Array.isArray($)?$[1]:typeof $=="number"?$:null,pe=Array.isArray(M)?M[0]:null,Z=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function ke(s){let a=s*100;switch(Q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let _=Q?[]:Array.from(e.querySelectorAll(c)),k=[],i=[],f=0,ge=0,R=false,V=false,q=0,Ae=false,he=-1,te=-1,Y=false,ye=0,Oe=0,Fe,Je=null;function it(){Je?.destroy(),Je=null;}let Ne=new Set,at=NaN,Re=true,Be=-1,lt=performance.now(),ze=NaN;function et(){return ve?B==="x"?ve.scrollLeft:ve.scrollTop:B==="x"?window.scrollX:window.scrollY}function ct(){return ve?B==="x"?ve.clientWidth:ve.clientHeight:B==="x"?window.innerWidth:window.innerHeight}function ut(){let s=Qe(e,ve,B);return xe(s,s.scroll,ct(),Ce,He)}function mt(){(({tStart:f,tEnd:ge}=ut())),$e&&Ze&&(it(),Je=er(f,ge,B));}function tt(s,a=ut){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let b=s.destroy;return s.destroy=()=>{b.call(s),Pe(e);},s}function _t(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),Q){let b=a==="reverse"?1-s:s;e.style.clipPath=ke(b);return}_.forEach((b,ue)=>{b.style.strokeDashoffset=a==="reverse"?`${k[ue]*s}`:`${k[ue]*(1-s)}`,m&&(b.style.opacity=a==="reverse"?`${1-s}`:`${s}`),Ee&&le?b.style.stroke=Ve(Ee,le,s):le&&(b.style.stroke=le),ce!==null&&j!==null?b.style.strokeWidth=`${ce+(j-ce)*s}`:j!==null&&(b.style.strokeWidth=`${j}`),pe!==null&&Z!==null?b.style.fillOpacity=`${pe+(Z-pe)*s}`:Z!==null&&(b.style.fillOpacity=`${Z}`),D&&b.tagName.toLowerCase()==="path"&&i[ue]&&b.setAttribute("d",st(i[ue],D,s));});}function Ge(){if(e.style.setProperty("--scroll-draw-progress","0"),Q){e.style.clipPath=ke(0);return}_.forEach((s,a)=>{s.style.strokeDasharray=`${k[a]}`,s.style.strokeDashoffset=P==="reverse"?"0":`${k[a]}`,m?s.style.opacity=P==="reverse"?"1":"0":s.style.opacity="",Ee&&(s.style.stroke=Ee),ce!==null&&(s.style.strokeWidth=`${ce}`),pe!==null&&(s.style.fillOpacity=`${pe}`),D&&s.tagName.toLowerCase()==="path"&&i[a]&&s.setAttribute("d",i[a]);});}if(_.forEach(s=>{Jt(s);let a=_e(s);k.push(a);let b=s.tagName.toLowerCase()==="path";b?i.push(s.getAttribute("d")??""):i.push(""),D&&(b?tr(i[i.length-1],D,s):we(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=P==="reverse"?`${a}`:"0",m&&(s.style.opacity="1"),le&&(s.style.stroke=le),j!==null&&(s.style.strokeWidth=`${j}`),Z!==null&&(s.style.fillOpacity=`${Z}`),D&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",D)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=P==="reverse"?"0":`${a}`,m?s.style.opacity=P==="reverse"?"1":"0":s.style.opacity="",Ee&&(s.style.stroke=Ee),ce!==null&&(s.style.strokeWidth=`${ce}`),pe!==null&&(s.style.fillOpacity=`${pe}`));}),Q){if(o)return e.style.clipPath=ke(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ft=typeof p=="string"?Ke(p):null;function Vt(){return !(ae===false||!Kt()||!_.length||!ft||Q||B!=="y"||ve||u!==1||z!==0||ne||X||I!==false||D||w||E||G>0||d||x||g||L||S||N||fe||A!=null||$!=null||M!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function qt(){let s=++Zt,a=`svg-scroll-draw-${s}`,b=`svg-scroll-draw-host-${s}`,ue=`--svg-scroll-draw-${s}`,De=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${De};`,v=`stroke-dashoffset:${Ie};`;m&&(Me+=`opacity:${P==="reverse"?1:0};`,v+=`opacity:${P==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${a}{from{${Me}}to{${v}}}.${b}{view-timeline-name:${ue};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${ft};animation-fill-mode:both;animation-timeline:${ue};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(b);function me(h,U){h.style.setProperty("--ssd-len",String(k[U])),h.style.strokeDasharray=`${k[U]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(a);}_.forEach(me);let y=false,H=-1;function W(){if(H>=0)return H;let h=e.getBoundingClientRect(),{tStart:U,tEnd:Te}=xe({top:h.top,height:h.height},et(),ct(),Ce,He);return Se(K(et(),U,Te,u))}return {destroy(){e.classList.remove(b),_.forEach(h=>{h.classList.remove(a),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),F.remove();},replay(){y=false,H=-1,_.forEach(me);},pause(){y=true,_.forEach(h=>{h.style.animationPlayState="paused";});},resume(){y&&(y=false,_.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let U=Math.min(1,Math.max(0,h));H=U,y=true,_.forEach((Te,be)=>{Te.classList.remove(a),Te.style.strokeDashoffset=P==="reverse"?`${k[be]*U}`:`${k[be]*(1-U)}`,m&&(Te.style.opacity=P==="reverse"?`${1-U}`:`${U}`);});},getProgress(){return W()},refresh(){_.forEach((h,U)=>{k[U]=_e(h),h.style.setProperty("--ssd-len",String(k[U])),h.style.strokeDasharray=`${k[U]}`;});}}}if(Vt())return tt(qt());function Wt(){let s=Math.max(1,ee),a=0,b=0,ue=false;function De(y){let H=true;if(Q){let W=Math.min(1,Math.max(0,y/s)),h=Se(W);ye=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=ke(P==="reverse"?1-h:h),d?.(h),W<1&&(H=false);}else _.forEach((W,h)=>{let U=h*z*s,Te=Math.min(1,Math.max(0,(y-U)/s)),be=Se(Te);W.style.strokeDashoffset=P==="reverse"?`${k[h]*be}`:`${k[h]*(1-be)}`,m&&(W.style.opacity=P==="reverse"?`${1-be}`:`${be}`),Ee&&le?W.style.stroke=Ve(Ee,le,be):le&&(W.style.stroke=le),ce!==null&&j!==null?W.style.strokeWidth=`${ce+(j-ce)*be}`:j!==null&&(W.style.strokeWidth=`${j}`),pe!==null&&Z!==null?W.style.fillOpacity=`${pe+(Z-pe)*be}`:Z!==null&&(W.style.fillOpacity=`${Z}`),D&&W.tagName.toLowerCase()==="path"&&i[h]&&W.setAttribute("d",st(i[h],D,be)),h===0&&(ye=be,d?.(be),e.style.setProperty("--scroll-draw-progress",String(be))),Te<1&&(H=false);});if(w){let W=Math.min(1,Math.max(0,y/s)),h=Se(W);for(let U in w){let Te=parseFloat(U);h>=Te&&!Ne.has(Te)&&(Ne.add(Te),w[U]?.());}}return H}function Ie(y){if(Y)return;let H=y-a;V||(V=true,x?.());let W=De(H);if(W&&!R){R=true,De(s*(1+Math.max(0,_.length-1)*z)),g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{a=performance.now(),V=false,R=false,Ne.clear(),Ge(),q=requestAnimationFrame(Ie);},se));return}W||(q=requestAnimationFrame(Ie));}function Me(){cancelAnimationFrame(q),clearTimeout(Fe),a=performance.now(),b=0,Y=false,V=false,R=false,Oe=0,ue=true,ye=0,Ne.clear(),Ge(),q=requestAnimationFrame(Ie);}let v=new IntersectionObserver(y=>{y.forEach(H=>{H.isIntersecting&&!(ne&&R)?Me():!H.isIntersecting&&!ne&&!R&&(cancelAnimationFrame(q),clearTimeout(Fe),ue=false);});},{root:ve??null,threshold:O,rootMargin:C}),F;function me(){clearTimeout(F),F=setTimeout(()=>{_.forEach((y,H)=>{k[H]=_e(y),y.style.strokeDasharray=`${k[H]}`;});},150);}return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),G>0?setTimeout(()=>v.observe(e),G):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(Fe),v.disconnect(),window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me),clearTimeout(F);},replay(){Oe=0,Me();},pause(){Y||!ue||(Y=true,b=performance.now()-a,cancelAnimationFrame(q));},resume(){Y&&(Y=false,ue=true,a=performance.now()-b,q=requestAnimationFrame(Ie));},seek(y){let H=Math.min(1,Math.max(0,y));ye=H,Y=true,b=H*s,a=performance.now()-b,cancelAnimationFrame(q),De(b);},getProgress(){return ye},refresh(){clearTimeout(F),_.forEach((y,H)=>{k[H]=_e(y),y.style.strokeDasharray=`${k[H]}`;});}}}if(ie)return tt(Wt());mt();function je(){if(!Ae||Y)return;let s=performance.now(),a=et();if(!Re&&I===false&&a===at){q=requestAnimationFrame(je);return}Re=false,at=a;let b=u;if(I!==false){let v=s-lt,F=v>0?Math.abs(a-(Be<0?a:Be))/v:0;b=u*Math.max(.2,1+F*(typeof I=="number"?I:1)*.04);}Be=a,lt=s;let ue=X?te===-1||a>=te?"forward":"reverse":P;te=a;let De=ge-f,Ie=true,Me=De===0?0:(a-f)/De;if(isNaN(ze)||(ze<=0&&Me>0?L?.():ze>0&&Me<=0&&fe?.(),ze<1&&Me>=1?S?.():ze>=1&&Me<1&&N?.()),ze=Me,Q){let v=Se(K(a,f,ge,b));ne&&!X&&(he=Math.max(he,v),v=he),ye=v,e.style.setProperty("--scroll-draw-progress",String(v));let F=ue==="reverse"?1-v:v;e.style.clipPath=ke(F),d?.(v),!V&&K(a,f,ge,b)>0&&(V=true,x?.()),v>=1&&!R?(R=true,g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{he=-1,V=false,R=false,e.style.clipPath=ke(0);},se))):v<1&&!ne&&(R=false),q=requestAnimationFrame(je);return}if(_.forEach((v,F)=>{let me=F*z*De,y=Se(K(a,f+me,ge+me,b));ne&&!X&&(he=Math.max(he,y),y=he),ye=y,v.style.strokeDashoffset=ue==="reverse"?`${k[F]*y}`:`${k[F]*(1-y)}`,m&&(v.style.opacity=ue==="reverse"?`${1-y}`:`${y}`),Ee&&le?v.style.stroke=Ve(Ee,le,y):le&&(v.style.stroke=le),ce!==null&&j!==null?v.style.strokeWidth=`${ce+(j-ce)*y}`:j!==null&&(v.style.strokeWidth=`${j}`),pe!==null&&Z!==null?v.style.fillOpacity=`${pe+(Z-pe)*y}`:Z!==null&&(v.style.fillOpacity=`${Z}`),D&&v.tagName.toLowerCase()==="path"&&i[F]&&v.setAttribute("d",st(i[F],D,y)),F===0&&(d?.(y),e.style.setProperty("--scroll-draw-progress",String(y))),y<1&&(Ie=false);}),w){let v=Se(K(a,f,ge,b));for(let F in w){let me=parseFloat(F);v>=me&&!Ne.has(me)&&(Ne.add(me),w[F]?.());}}!V&&K(a,f,ge,b)>0&&(V=true,x?.()),Ie&&!R?(R=true,g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{he=-1,V=false,R=false,Ne.clear(),Ge(),Re=true;},se))):!Ie&&!ne&&(R=false),q=requestAnimationFrame(je);}let rt=false;function Ye(){rt||(rt=true,q=requestAnimationFrame(function(){je();}));}function Ue(){rt=false,cancelAnimationFrame(q);}let nt=new IntersectionObserver(s=>{s.forEach(a=>{Ae=a.isIntersecting,Ae&&!Y?(Re=true,Ye()):Ue();});},{root:ve??null,threshold:O,rootMargin:C});function pt(){_.forEach((s,a)=>{k[a]=_e(s),s.style.strokeDasharray=`${k[a]}`;}),mt(),Re=true;}let Xe;function qe(){clearTimeout(Xe),Xe=setTimeout(pt,150);}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(()=>qe()),We.observe(document.body),We.observe(document.documentElement),We.observe(e)),G>0?setTimeout(()=>nt.observe(e),G):nt.observe(e),tt({destroy(){cancelAnimationFrame(q),clearTimeout(Fe),Ue(),nt.disconnect(),We?.disconnect(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(Xe),it();},replay(){he=-1,te=-1,Be=-1,V=false,R=false,Oe=0,Y=false,ye=0,Ne.clear(),clearTimeout(Fe),Ge(),Re=true,Ae&&Ye();},pause(){Y=true,Ue();},resume(){Y&&(Y=false,Re=true,Ae&&Ye());},seek(s){let a=Math.min(1,Math.max(0,s));ye=a,he=a,Y=true,Ue(),_t(a,P),Re=true;},getProgress(){return ye},refresh(){clearTimeout(Xe),pt(),Ae&&!Y&&Ye();}},()=>({tStart:f,tEnd:ge}))}function rr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],o=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:o});}return r}function nr(e,r,n){let t=xt(e),l=xt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((o,c)=>{let u=l[c];return o.fn!==u.fn||o.nums.length!==u.nums.length?n<1?`${o.fn}(${o.nums.map((m,p)=>`${m}${o.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,p)=>`${m+(u.nums[p]-m)*n}${o.units[p]}`).join(", ")})`}).join(" ")}function At(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(rr(t))return Ve(t,l,n);if(t.includes("("))return nr(t,l,n);let o=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(o&&c){let u=parseFloat(o[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${o[2]||c[2]}`}return n<1?t:l}function sr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var or=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ir=0,Mt="--scroll-draw-progress";function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Lt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:o="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:p,native:T=true,velocityScale:z=false,respectReducedMotion:P=true,triggerElement:ne,onProgress:$e,onComplete:B,onEnter:J,onLeave:X,onEnterBack:G,onLeaveBack:A}=r,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof o=="function"?o:re[o]??re["ease-out"],w=de(l.start??"top bottom"),I=de(l.end??"bottom top"),O=ne??e,C=typeof p=="string"?document.querySelector(p):p??null,E=Object.entries(t).map(([i,f])=>({prop:sr(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function se(){let i=window.getComputedStyle(e);for(let f of E)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function D(){for(let i of E)e.style.setProperty(i.prop,String(i.to));}let oe=new Map;for(let i of [...E.map(f=>f.prop),Mt])oe.set(i,e.style.getPropertyValue(i));function ie(){for(let[i,f]of oe)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if($)return D(),B?.(),{...n,destroy:ie,getProgress:()=>1};se();let ee=typeof o=="string"?Ke(o):null;function ae(){if(!T||!ar()||!ee||m!=="y"||C||O!==e||u||c!==1||$e||B||J||X||G||A||z!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of E)if(!or.has(i.prop))return false;return true}function d(){let i=`ssd-a-${++ir}`,f=E.map(te=>`${te.prop}:${te.from}`).join(";"),ge=E.map(te=>`${te.prop}:${te.to}`).join(";"),R=document.createElement("style");R.setAttribute("data-ssd-animate",""),R.textContent=`@keyframes ${i}{from{${f}}to{${ge}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(i);let V=()=>m==="x"?window.scrollX:window.scrollY,q=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let te=e.getBoundingClientRect();return xe({top:te.top,height:te.height},V(),q(),w,I)};Le(e,{type:"animate",getProgress:()=>he.getProgress(),getTrigger:Ae});let he={destroy(){e.classList.remove(i),R.remove(),e.style.animationPlayState="",ie(),Pe(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(te){let Y=Math.min(1,Math.max(0,te));e.classList.remove(i);for(let ye of E)e.style.setProperty(ye.prop,At(ye.from,ye.to,Y));},getProgress(){let{tStart:te,tEnd:Y}=Ae();return M(K(V(),te,Y,c))}};return he}if(ae())return d();let x=0,g=0,L=0,S=false,N=false,fe=-1,Q=0,Se=false,Ce=NaN,He=-1,ve=0,Ee=()=>C?m==="x"?C.scrollLeft:C.scrollTop:m==="x"?window.scrollX:window.scrollY,le=()=>C?m==="x"?C.clientWidth:C.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ce(){let i=Qe(O,C,m),f=xe(i,i.scroll,le(),w,I);x=f.tStart,g=f.tEnd;}function j(i){e.style.setProperty(Mt,String(i));for(let f of E)e.style.setProperty(f.prop,At(f.from,f.to,i));$e?.(i);}function pe(i){if(isNaN(Ce)){Ce=i;return}Ce<=0&&i>0?J?.():Ce>0&&i<=0&&A?.(),Ce<1&&i>=1?X?.():Ce>=1&&i<1&&G?.(),Ce=i;}function Z(){if(!S||N)return;let i=performance.now(),f=Ee(),ge=c;if(z!==false){let q=i-ve,Ae=q>0?Math.abs(f-(He<0?f:He))/q:0;ge=c*Math.max(.2,1+Ae*(typeof z=="number"?z:1)*.04);}He=f,ve=i;let R=g===x?0:(f-x)/(g-x);pe(R);let V=M(K(f,x,g,ge));u&&(fe=Math.max(fe,V),V=fe),Q=V,j(V),V>=1&&!Se?(Se=true,B?.()):V<1&&!u&&(Se=false),L=requestAnimationFrame(Z);}ce(),g===x&&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 i=M(K(Ee(),x,g,c));u&&i>0&&(fe=i),Q=i,j(i);}let ke=new IntersectionObserver(i=>{i.forEach(f=>{S=f.isIntersecting,S&&!N?L=requestAnimationFrame(Z):cancelAnimationFrame(L);});},{root:C??null}),_;function k(){clearTimeout(_),_=setTimeout(ce,150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),ke.observe(e),Le(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:x,tEnd:g})}),{destroy(){cancelAnimationFrame(L),ke.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(_),ie(),Pe(e);},replay(){fe=-1,Se=false,Q=0,N=false,j(0);},pause(){N=true,cancelAnimationFrame(L);},resume(){N&&(N=false,S&&(L=requestAnimationFrame(Z)));},seek(i){let f=Math.min(1,Math.max(0,i));Q=f,fe=f,N=true,cancelAnimationFrame(L),j(f);},getProgress(){return Q}}}var ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,r){if(typeof window>"u")return ot;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),ot;let t=n,{from:l=0,to:o,format:c,easing:u="ease-out",trigger:m={},once:p=true,decimals:T,onComplete:z}=r,P=T!==void 0?d=>d.toFixed(T):c??(d=>String(Math.round(d))),ne=typeof u=="function"?u:re[u]??re["ease-out"],$e=de(m.start??"top 80%"),B=de(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(o),z?.(),ot;let X=0,G=0,A=0,$=false,M=false,w=-1,I=0,O=false,C=()=>window.scrollY,E=()=>window.innerHeight;function se(){let d=t.getBoundingClientRect(),x=xe({top:d.top,height:d.height},C(),E(),$e,B);X=x.tStart,G=x.tEnd;}function D(d){t.textContent=P(l+(o-l)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function oe(){if(!$||M)return;let d=ne(K(C(),X,G,1));p&&(w=Math.max(w,d),d=w),I=d,D(d),d>=1&&!O?(O=true,z?.()):d<1&&!p&&(O=false),A=requestAnimationFrame(oe);}se();{let d=ne(K(C(),X,G,1));p&&d>0&&(w=d),I=d,D(d);}let ie=new IntersectionObserver(d=>{d.forEach(x=>{$=x.isIntersecting,$&&!M?A=requestAnimationFrame(oe):cancelAnimationFrame(A);});}),ee;function ae(){clearTimeout(ee),ee=setTimeout(se,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),ie.observe(t),Le(t,{type:"counter",getProgress:()=>I,getTrigger:()=>({tStart:X,tEnd:G})}),{destroy(){cancelAnimationFrame(A),ie.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ee),Pe(t);},replay(){w=-1,O=false,I=0,M=false,D(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,$&&(A=requestAnimationFrame(oe)));},seek(d){let x=Math.min(1,Math.max(0,d));I=x,w=x,M=true,cancelAnimationFrame(A),D(x);},getProgress(){return I}}}var $t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,r={}){if(typeof window>"u")return $t;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),$t;let t=n,{trigger:l={},easing:o="linear",once:c=false,axis:u="y",preload:m="auto",onReady:p,onComplete:T,onProgress:z}=r,P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ne=typeof o=="function"?o:re[o]??re.linear,$e=de(l.start??"top top"),B=de(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let J=r.from??0,X=r.to,G=0,A=0,$=0,M=false,w=false,I=-1,O=0,C=false,E=false,se=()=>u==="x"?window.scrollX:window.scrollY,D=()=>u==="x"?window.innerWidth:window.innerHeight;function oe(){let S=t.getBoundingClientRect(),N=u==="x"?S.left:S.top,fe=u==="x"?S.width:S.height,Q=xe({top:N,height:fe},se(),D(),$e,B);G=Q.tStart,A=Q.tEnd;}let ie=NaN;function ee(S){if(!E)return;let N=X??t.duration??0,fe=J+(N-J)*S;fe!==ie&&(ie=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(S)),z?.(S);}function ae(){if(!M||w||!E)return;let S=ne(K(se(),G,A,1));c&&(I=Math.max(I,S),S=I),O=S,ee(S),S>=1&&!C?(C=true,T?.()):S<1&&!c&&(C=false),$=requestAnimationFrame(ae);}function d(){if(E=true,X===void 0&&(X=t.duration),P){ee(1),p?.();return}oe(),p?.(),M&&!w&&($=requestAnimationFrame(ae));}t.readyState>=1?d():t.addEventListener("loadedmetadata",d,{once:true}),E||oe();let x=new IntersectionObserver(S=>{S.forEach(N=>{M=N.isIntersecting,M&&!w&&E?$=requestAnimationFrame(ae):cancelAnimationFrame($);});}),g;function L(){clearTimeout(g),g=setTimeout(oe,150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),x.observe(t),Le(t,{type:"video",getProgress:()=>O,getTrigger:()=>({tStart:G,tEnd:A})}),{destroy(){cancelAnimationFrame($),x.disconnect(),t.removeEventListener("loadedmetadata",d),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(g),Pe(t);},replay(){I=-1,C=false,O=0,w=false,ie=NaN,ee(0);},pause(){w=true,cancelAnimationFrame($);},resume(){w&&(w=false,M&&E&&($=requestAnimationFrame(ae)));},seek(S){let N=Math.min(1,Math.max(0,S));O=N,I=N,w=true,cancelAnimationFrame($),ie=NaN,ee(N);},getProgress(){return O}}}function Ot(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 lr(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=Ot(e),n=new Map;for(let o of r){let c=o.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(o);}let t=[],l=Array.from(n.keys()).sort((o,c)=>o-c);for(let o of l){let c=n.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,p)=>{let T=m.nextElementSibling;u.appendChild(m),p<c.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((o,c)=>{e.appendChild(o),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function cr(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,o=r*t,c=o+(1-l);return c<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(c-o)))}function ur(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 It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:o=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:T}=r,z=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof c=="function"?c:re[c]??re["ease-out"],ne=de(m.start??"top 85%"),$e=de(m.end??"top 40%"),B=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let J;l==="chars"?J=lr(t):l==="lines"?J=kt(t):J=Ot(t);let X=J.length;function G(g,L){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*L));let S=ur(L,u);S&&(g.style.transform=S);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),J.forEach((L,S)=>{let N=P(cr(g,S,X,o));G(L,N);});}if(z)return A(1),T?.(),{destroy(){t.innerHTML=B,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let $=0,M=0,w=0,I=false,O=false,C=-1,E=0,se=false,D=()=>window.scrollY,oe=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),L=xe({top:g.top,height:g.height},D(),oe(),ne,$e);$=L.tStart,M=L.tEnd;}function ee(){if(!I||O)return;let g=K(D(),$,M,1);p&&(C=Math.max(C,g),g=C),E=g,A(g),g>=1&&!se?(se=true,T?.()):g<1&&!p&&(se=false),w=requestAnimationFrame(ee);}ie();let ae=new IntersectionObserver(g=>{g.forEach(L=>{I=L.isIntersecting,I&&!O?w=requestAnimationFrame(ee):cancelAnimationFrame(w);});}),d;function x(){clearTimeout(d),d=setTimeout(()=>{if(l==="lines"){let g=E;t.innerHTML=B,t.setAttribute("aria-label",t.textContent??""),J=kt(t),A(g);}ie();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),ae.observe(t),Le(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:$,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ae.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(d),t.innerHTML=B,t.removeAttribute("aria-label"),Pe(t);},replay(){C=-1,se=false,E=0,O=false,A(0);},pause(){O=true,cancelAnimationFrame(w);},resume(){O&&(O=false,I&&(w=requestAnimationFrame(ee)));},seek(g){let L=Math.min(1,Math.max(0,g));E=L,C=L,O=true,cancelAnimationFrame(w),A(L);},getProgress(){return E}}}var Ft=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Tt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Nt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Lt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Rt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Pt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Ht=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Ct(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},zt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Dt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}};exports.ScrollAnimateRef=Nt;exports.ScrollCounterRef=Rt;exports.ScrollDrawRef=Ft;exports.ScrollTextRef=zt;exports.ScrollVideoRef=Ht;
@@ -1,3 +1,3 @@
1
- function Bt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),o=0,c=[];for(let d=0;d<n;d++){let x=Math.pow(l,d);c.push(x),o+=x;}let u=[0],m=0;for(let d=0;d<n;d++)m+=c[d]/o,u.push(m);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 N=(d-u[x])/(u[x+1]-u[x]);if(x===0)return N*(2-N);let L=1-Math.pow(t,x);return L+(1-L)*(2*N-1)*(2*N-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-l)*(2*Math.PI)/t)+1}var ee={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Bt(),elastic:Gt()};function fe(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 dt(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 gt(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 _e(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 jt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function Qe(e,r,n){let t=e.getBoundingClientRect(),l=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:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let o=dt(e.top,e.height,r,t.element)-gt(t.viewport,n),c=dt(e.top,e.height,r,l.element)-gt(l.viewport,n);return {tStart:o,tEnd:c}}function ht(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 Ve(e,r,n){let t=ht(e),l=ht(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var yt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function be(e,...r){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Yt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ut="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",bt=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<bt;n++){let t=n/(bt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function Ke(e){switch(e){case "linear":return "linear";case "ease-in":return Yt;case "ease-out":return Ut;case "ease-in-out":return Xt()?Qt(ee["ease-in-out"]):null;default:return null}}var wt=Symbol.for("svg-scroll-draw.registry");function vt(){let e=globalThis;return e[wt]||(e[wt]=new Map)}function Le(e,r){vt().set(e,r);}function Pe(e){vt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?be("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&be("Element has a fill \u2014 it may obscure the stroke animation.",e);}function er(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 l(){let o=n==="x"?window.scrollX:window.scrollY,c=e-o,u=r-o,m=n==="x";t.innerHTML=`
1
+ function Bt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),o=0,c=[];for(let p=0;p<n;p++){let T=Math.pow(l,p);c.push(T),o+=T;}let u=[0],m=0;for(let p=0;p<n;p++)m+=c[p]/o,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let T=0;T<n;T++)if(p<=u[T+1]){let z=(p-u[T])/(u[T+1]-u[T]);if(T===0)return z*(2-z);let P=1-Math.pow(t,T);return P+(1-P)*(2*z-1)*(2*z-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-l)*(2*Math.PI)/t)+1}var re={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Bt(),elastic:Gt()};function de(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 dt(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 gt(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 _e(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 jt(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function Qe(e,r,n){let t=e.getBoundingClientRect(),l=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:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let o=dt(e.top,e.height,r,t.element)-gt(t.viewport,n),c=dt(e.top,e.height,r,l.element)-gt(l.viewport,n);return {tStart:o,tEnd:c}}function ht(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 Ve(e,r,n){let t=ht(e),l=ht(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var yt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Yt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ut="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",bt=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<bt;n++){let t=n/(bt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function Ke(e){switch(e){case "linear":return "linear";case "ease-in":return Yt;case "ease-out":return Ut;case "ease-in-out":return Xt()?Qt(re["ease-in-out"]):null;default:return null}}var wt=Symbol.for("svg-scroll-draw.registry");function vt(){let e=globalThis;return e[wt]||(e[wt]=new Map)}function Le(e,r){vt().set(e,r);}function Pe(e){vt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?we("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function er(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 l(){let o=n==="x"?window.scrollX:window.scrollY,c=e-o,u=r-o,m=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${c}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${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",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Et=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,St=/[MmLlHhVvCcSsQqTtAaZz]/g;function tr(e,r,n){if(!Ze)return;let t=(e.match(St)??[]).join("").toUpperCase(),l=(r.match(St)??[]).join("").toUpperCase(),o=(e.match(Et)??[]).length,c=(r.match(Et)??[]).length;if(t!==l){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}o!==c&&be(`morphTo: coordinate count differs (${o} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function st(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let c=parseFloat(o),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function Tt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...yt[n],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:x={},stagger:N=0,direction:L="forward",once:te=false,debug:$e=false,axis:W="y",scrollContainer:Z,autoReverse:U=false,delay:B=0,strokeColor:A,strokeWidth:P,fillOpacity:M,waypoints:v,velocityScale:k=false,threshold:I=0,rootMargin:$="0px",repeat:S=0,repeatDelay:re=0,morphTo:O,clip:ne,autoplay:se=false,duration:K=1e3,native:ce=true,onProgress:h,onStart:T,onComplete:g,onEnter:p,onLeave:F,onEnterBack:pe,onLeaveBack:Ee}=l,ue=ne===true?"left":typeof ne=="string"?ne:false,Se=typeof d=="function"?d:ee[d]??ee.linear,Ce=fe(x.start??"top bottom"),Ne=fe(x.end??"bottom top"),we=typeof Z=="string"?document.querySelector(Z):Z??null,ve=Array.isArray(A)?A[0]:null,oe=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ie=Array.isArray(P)?P[0]:null,G=Array.isArray(P)?P[1]:typeof P=="number"?P:null,me=Array.isArray(M)?M[0]:null,X=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function ke(s){let a=s*100;switch(ue){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=ue?[]:Array.from(e.querySelectorAll(c)),C=[],i=[],f=0,de=0,R=false,_=false,V=0,Ae=false,ge=-1,J=-1,j=false,he=0,Oe=0,Fe,Je=null;function it(){Je?.destroy(),Je=null;}let Re=new Set,at=NaN,He=true,Be=-1,lt=performance.now(),ze=NaN;function et(){return we?W==="x"?we.scrollLeft:we.scrollTop:W==="x"?window.scrollX:window.scrollY}function ct(){return we?W==="x"?we.clientWidth:we.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function ut(){let s=Qe(e,we,W);return xe(s,s.scroll,ct(),Ce,Ne)}function mt(){(({tStart:f,tEnd:de}=ut())),$e&&Ze&&(it(),Je=er(f,de,W));}function tt(s,a=ut){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let w=s.destroy;return s.destroy=()=>{w.call(s),Pe(e);},s}function _t(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),ue){let w=a==="reverse"?1-s:s;e.style.clipPath=ke(w);return}z.forEach((w,ae)=>{w.style.strokeDashoffset=a==="reverse"?`${C[ae]*s}`:`${C[ae]*(1-s)}`,m&&(w.style.opacity=a==="reverse"?`${1-s}`:`${s}`),ve&&oe?w.style.stroke=Ve(ve,oe,s):oe&&(w.style.stroke=oe),ie!==null&&G!==null?w.style.strokeWidth=`${ie+(G-ie)*s}`:G!==null&&(w.style.strokeWidth=`${G}`),me!==null&&X!==null?w.style.fillOpacity=`${me+(X-me)*s}`:X!==null&&(w.style.fillOpacity=`${X}`),O&&w.tagName.toLowerCase()==="path"&&i[ae]&&w.setAttribute("d",st(i[ae],O,s));});}function Ge(){if(e.style.setProperty("--scroll-draw-progress","0"),ue){e.style.clipPath=ke(0);return}z.forEach((s,a)=>{s.style.strokeDasharray=`${C[a]}`,s.style.strokeDashoffset=L==="reverse"?"0":`${C[a]}`,m?s.style.opacity=L==="reverse"?"1":"0":s.style.opacity="",ve&&(s.style.stroke=ve),ie!==null&&(s.style.strokeWidth=`${ie}`),me!==null&&(s.style.fillOpacity=`${me}`),O&&s.tagName.toLowerCase()==="path"&&i[a]&&s.setAttribute("d",i[a]);});}if(z.forEach(s=>{Jt(s);let a=_e(s);C.push(a);let w=s.tagName.toLowerCase()==="path";w?i.push(s.getAttribute("d")??""):i.push(""),O&&(w?tr(i[i.length-1],O,s):be(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=L==="reverse"?`${a}`:"0",m&&(s.style.opacity="1"),oe&&(s.style.stroke=oe),G!==null&&(s.style.strokeWidth=`${G}`),X!==null&&(s.style.fillOpacity=`${X}`),O&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",O)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=L==="reverse"?"0":`${a}`,m?s.style.opacity=L==="reverse"?"1":"0":s.style.opacity="",ve&&(s.style.stroke=ve),ie!==null&&(s.style.strokeWidth=`${ie}`),me!==null&&(s.style.fillOpacity=`${me}`));}),ue){if(o)return e.style.clipPath=ke(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ft=typeof d=="string"?Ke(d):null;function Vt(){return !(ce===false||!Kt()||!z.length||!ft||ue||W!=="y"||we||u!==1||N!==0||te||U||k!==false||O||v||S||B>0||h||T||g||p||F||pe||Ee||A!=null||P!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function qt(){let s=++Zt,a=`svg-scroll-draw-${s}`,w=`svg-scroll-draw-host-${s}`,ae=`--svg-scroll-draw-${s}`,De=L==="reverse"?"0":"var(--ssd-len)",Ie=L==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${De};`,E=`stroke-dashoffset:${Ie};`;m&&(Me+=`opacity:${L==="reverse"?1:0};`,E+=`opacity:${L==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${a}{from{${Me}}to{${E}}}.${w}{view-timeline-name:${ae};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${ft};animation-fill-mode:both;animation-timeline:${ae};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function le(y,Y){y.style.setProperty("--ssd-len",String(C[Y])),y.style.strokeDasharray=`${C[Y]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(a);}z.forEach(le);let b=false,H=-1;function q(){if(H>=0)return H;let y=e.getBoundingClientRect(),{tStart:Y,tEnd:Te}=xe({top:y.top,height:y.height},et(),ct(),Ce,Ne);return Se(Q(et(),Y,Te,u))}return {destroy(){e.classList.remove(w),z.forEach(y=>{y.classList.remove(a),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){b=false,H=-1,z.forEach(le);},pause(){b=true,z.forEach(y=>{y.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let Y=Math.min(1,Math.max(0,y));H=Y,b=true,z.forEach((Te,ye)=>{Te.classList.remove(a),Te.style.strokeDashoffset=L==="reverse"?`${C[ye]*Y}`:`${C[ye]*(1-Y)}`,m&&(Te.style.opacity=L==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return q()},refresh(){z.forEach((y,Y)=>{C[Y]=_e(y),y.style.setProperty("--ssd-len",String(C[Y])),y.style.strokeDasharray=`${C[Y]}`;});}}}if(Vt())return tt(qt());function Wt(){let s=Math.max(1,K),a=0,w=0,ae=false;function De(b){let H=true;if(ue){let q=Math.min(1,Math.max(0,b/s)),y=Se(q);he=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=ke(L==="reverse"?1-y:y),h?.(y),q<1&&(H=false);}else z.forEach((q,y)=>{let Y=y*N*s,Te=Math.min(1,Math.max(0,(b-Y)/s)),ye=Se(Te);q.style.strokeDashoffset=L==="reverse"?`${C[y]*ye}`:`${C[y]*(1-ye)}`,m&&(q.style.opacity=L==="reverse"?`${1-ye}`:`${ye}`),ve&&oe?q.style.stroke=Ve(ve,oe,ye):oe&&(q.style.stroke=oe),ie!==null&&G!==null?q.style.strokeWidth=`${ie+(G-ie)*ye}`:G!==null&&(q.style.strokeWidth=`${G}`),me!==null&&X!==null?q.style.fillOpacity=`${me+(X-me)*ye}`:X!==null&&(q.style.fillOpacity=`${X}`),O&&q.tagName.toLowerCase()==="path"&&i[y]&&q.setAttribute("d",st(i[y],O,ye)),y===0&&(he=ye,h?.(ye),e.style.setProperty("--scroll-draw-progress",String(ye))),Te<1&&(H=false);});if(v){let q=Math.min(1,Math.max(0,b/s)),y=Se(q);for(let Y in v){let Te=parseFloat(Y);y>=Te&&!Re.has(Te)&&(Re.add(Te),v[Y]?.());}}return H}function Ie(b){if(j)return;let H=b-a;_||(_=true,T?.());let q=De(H);if(q&&!R){R=true,De(s*(1+Math.max(0,z.length-1)*N)),g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{a=performance.now(),_=false,R=false,Re.clear(),Ge(),V=requestAnimationFrame(Ie);},re));return}q||(V=requestAnimationFrame(Ie));}function Me(){cancelAnimationFrame(V),clearTimeout(Fe),a=performance.now(),w=0,j=false,_=false,R=false,Oe=0,ae=true,he=0,Re.clear(),Ge(),V=requestAnimationFrame(Ie);}let E=new IntersectionObserver(b=>{b.forEach(H=>{H.isIntersecting&&!(te&&R)?Me():!H.isIntersecting&&!te&&!R&&(cancelAnimationFrame(V),clearTimeout(Fe),ae=false);});},{root:we??null,threshold:I,rootMargin:$}),D;function le(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,H)=>{C[H]=_e(b),b.style.strokeDasharray=`${C[H]}`;});},150);}return window.addEventListener("resize",le),window.addEventListener("orientationchange",le),B>0?setTimeout(()=>E.observe(e),B):E.observe(e),{destroy(){cancelAnimationFrame(V),clearTimeout(Fe),E.disconnect(),window.removeEventListener("resize",le),window.removeEventListener("orientationchange",le),clearTimeout(D);},replay(){Oe=0,Me();},pause(){j||!ae||(j=true,w=performance.now()-a,cancelAnimationFrame(V));},resume(){j&&(j=false,ae=true,a=performance.now()-w,V=requestAnimationFrame(Ie));},seek(b){let H=Math.min(1,Math.max(0,b));he=H,j=true,w=H*s,a=performance.now()-w,cancelAnimationFrame(V),De(w);},getProgress(){return he},refresh(){clearTimeout(D),z.forEach((b,H)=>{C[H]=_e(b),b.style.strokeDasharray=`${C[H]}`;});}}}if(se)return tt(Wt());mt();function je(){if(!Ae||j)return;let s=performance.now(),a=et();if(!He&&k===false&&a===at){V=requestAnimationFrame(je);return}He=false,at=a;let w=u;if(k!==false){let E=s-lt,D=E>0?Math.abs(a-(Be<0?a:Be))/E:0;w=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Be=a,lt=s;let ae=U?J===-1||a>=J?"forward":"reverse":L;J=a;let De=de-f,Ie=true,Me=De===0?0:(a-f)/De;if(isNaN(ze)||(ze<=0&&Me>0?p?.():ze>0&&Me<=0&&Ee?.(),ze<1&&Me>=1?F?.():ze>=1&&Me<1&&pe?.()),ze=Me,ue){let E=Se(Q(a,f,de,w));te&&!U&&(ge=Math.max(ge,E),E=ge),he=E,e.style.setProperty("--scroll-draw-progress",String(E));let D=ae==="reverse"?1-E:E;e.style.clipPath=ke(D),h?.(E),!_&&Q(a,f,de,w)>0&&(_=true,T?.()),E>=1&&!R?(R=true,g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{ge=-1,_=false,R=false,e.style.clipPath=ke(0);},re))):E<1&&!te&&(R=false),V=requestAnimationFrame(je);return}if(z.forEach((E,D)=>{let le=D*N*De,b=Se(Q(a,f+le,de+le,w));te&&!U&&(ge=Math.max(ge,b),b=ge),he=b,E.style.strokeDashoffset=ae==="reverse"?`${C[D]*b}`:`${C[D]*(1-b)}`,m&&(E.style.opacity=ae==="reverse"?`${1-b}`:`${b}`),ve&&oe?E.style.stroke=Ve(ve,oe,b):oe&&(E.style.stroke=oe),ie!==null&&G!==null?E.style.strokeWidth=`${ie+(G-ie)*b}`:G!==null&&(E.style.strokeWidth=`${G}`),me!==null&&X!==null?E.style.fillOpacity=`${me+(X-me)*b}`:X!==null&&(E.style.fillOpacity=`${X}`),O&&E.tagName.toLowerCase()==="path"&&i[D]&&E.setAttribute("d",st(i[D],O,b)),D===0&&(h?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Ie=false);}),v){let E=Se(Q(a,f,de,w));for(let D in v){let le=parseFloat(D);E>=le&&!Re.has(le)&&(Re.add(le),v[D]?.());}}!_&&Q(a,f,de,w)>0&&(_=true,T?.()),Ie&&!R?(R=true,g?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Fe=setTimeout(()=>{ge=-1,_=false,R=false,Re.clear(),Ge(),He=true;},re))):!Ie&&!te&&(R=false),V=requestAnimationFrame(je);}let rt=false;function Ye(){rt||(rt=true,V=requestAnimationFrame(function(){je();}));}function Ue(){rt=false,cancelAnimationFrame(V);}let nt=new IntersectionObserver(s=>{s.forEach(a=>{Ae=a.isIntersecting,Ae&&!j?(He=true,Ye()):Ue();});},{root:we??null,threshold:I,rootMargin:$});function pt(){z.forEach((s,a)=>{C[a]=_e(s),s.style.strokeDasharray=`${C[a]}`;}),mt(),He=true;}let Xe;function qe(){clearTimeout(Xe),Xe=setTimeout(pt,150);}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(()=>qe()),We.observe(document.body),We.observe(document.documentElement),We.observe(e)),B>0?setTimeout(()=>nt.observe(e),B):nt.observe(e),tt({destroy(){cancelAnimationFrame(V),clearTimeout(Fe),Ue(),nt.disconnect(),We?.disconnect(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(Xe),it();},replay(){ge=-1,J=-1,Be=-1,_=false,R=false,Oe=0,j=false,he=0,Re.clear(),clearTimeout(Fe),Ge(),He=true,Ae&&Ye();},pause(){j=true,Ue();},resume(){j&&(j=false,He=true,Ae&&Ye());},seek(s){let a=Math.min(1,Math.max(0,s));he=a,ge=a,j=true,Ue(),_t(a,L),He=true;},getProgress(){return he},refresh(){clearTimeout(Xe),pt(),Ae&&!j&&Ye();}},()=>({tStart:f,tEnd:de}))}function rr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],o=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:o});}return r}function nr(e,r,n){let t=xt(e),l=xt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((o,c)=>{let u=l[c];return o.fn!==u.fn||o.nums.length!==u.nums.length?n<1?`${o.fn}(${o.nums.map((m,d)=>`${m}${o.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,d)=>`${m+(u.nums[d]-m)*n}${o.units[d]}`).join(", ")})`}).join(" ")}function At(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(rr(t))return Ve(t,l,n);if(t.includes("("))return nr(t,l,n);let o=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(o&&c){let u=parseFloat(o[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${o[2]||c[2]}`}return n<1?t:l}function sr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var or=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ir=0,Mt="--scroll-draw-progress";function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Lt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:o="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:N=false,respectReducedMotion:L=true,triggerElement:te,onProgress:$e,onComplete:W,onEnter:Z,onLeave:U,onEnterBack:B,onLeaveBack:A}=r,P=L&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof o=="function"?o:ee[o]??ee["ease-out"],v=fe(l.start??"top bottom"),k=fe(l.end??"bottom top"),I=te??e,$=typeof d=="string"?document.querySelector(d):d??null,S=Object.entries(t).map(([i,f])=>({prop:sr(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function re(){let i=window.getComputedStyle(e);for(let f of S)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function O(){for(let i of S)e.style.setProperty(i.prop,String(i.to));}let ne=new Map;for(let i of [...S.map(f=>f.prop),Mt])ne.set(i,e.style.getPropertyValue(i));function se(){for(let[i,f]of ne)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if(P)return O(),W?.(),{...n,destroy:se,getProgress:()=>1};re();let K=typeof o=="string"?Ke(o):null;function ce(){if(!x||!ar()||!K||m!=="y"||$||I!==e||u||c!==1||$e||W||Z||U||B||A||N!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of S)if(!or.has(i.prop))return false;return true}function h(){let i=`ssd-a-${++ir}`,f=S.map(J=>`${J.prop}:${J.from}`).join(";"),de=S.map(J=>`${J.prop}:${J.to}`).join(";"),R=document.createElement("style");R.setAttribute("data-ssd-animate",""),R.textContent=`@keyframes ${i}{from{${f}}to{${de}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${K};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(i);let _=()=>m==="x"?window.scrollX:window.scrollY,V=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let J=e.getBoundingClientRect();return xe({top:J.top,height:J.height},_(),V(),v,k)};Le(e,{type:"animate",getProgress:()=>ge.getProgress(),getTrigger:Ae});let ge={destroy(){e.classList.remove(i),R.remove(),e.style.animationPlayState="",se(),Pe(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(J){let j=Math.min(1,Math.max(0,J));e.classList.remove(i);for(let he of S)e.style.setProperty(he.prop,At(he.from,he.to,j));},getProgress(){let{tStart:J,tEnd:j}=Ae();return M(Q(_(),J,j,c))}};return ge}if(ce())return h();let T=0,g=0,p=0,F=false,pe=false,Ee=-1,ue=0,Se=false,Ce=NaN,Ne=-1,we=0,ve=()=>$?m==="x"?$.scrollLeft:$.scrollTop:m==="x"?window.scrollX:window.scrollY,oe=()=>$?m==="x"?$.clientWidth:$.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ie(){let i=Qe(I,$,m),f=xe(i,i.scroll,oe(),v,k);T=f.tStart,g=f.tEnd;}function G(i){e.style.setProperty(Mt,String(i));for(let f of S)e.style.setProperty(f.prop,At(f.from,f.to,i));$e?.(i);}function me(i){if(isNaN(Ce)){Ce=i;return}Ce<=0&&i>0?Z?.():Ce>0&&i<=0&&A?.(),Ce<1&&i>=1?U?.():Ce>=1&&i<1&&B?.(),Ce=i;}function X(){if(!F||pe)return;let i=performance.now(),f=ve(),de=c;if(N!==false){let V=i-we,Ae=V>0?Math.abs(f-(Ne<0?f:Ne))/V:0;de=c*Math.max(.2,1+Ae*(typeof N=="number"?N:1)*.04);}Ne=f,we=i;let R=g===T?0:(f-T)/(g-T);me(R);let _=M(Q(f,T,g,de));u&&(Ee=Math.max(Ee,_),_=Ee),ue=_,G(_),_>=1&&!Se?(Se=true,W?.()):_<1&&!u&&(Se=false),p=requestAnimationFrame(X);}ie(),g===T&&be("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let i=M(Q(ve(),T,g,c));u&&i>0&&(Ee=i),ue=i,G(i);}let ke=new IntersectionObserver(i=>{i.forEach(f=>{F=f.isIntersecting,F&&!pe?p=requestAnimationFrame(X):cancelAnimationFrame(p);});},{root:$??null}),z;function C(){clearTimeout(z),z=setTimeout(ie,150);}return window.addEventListener("resize",C),window.addEventListener("orientationchange",C),ke.observe(e),Le(e,{type:"animate",getProgress:()=>ue,getTrigger:()=>({tStart:T,tEnd:g})}),{destroy(){cancelAnimationFrame(p),ke.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),clearTimeout(z),se(),Pe(e);},replay(){Ee=-1,Se=false,ue=0,pe=false,G(0);},pause(){pe=true,cancelAnimationFrame(p);},resume(){pe&&(pe=false,F&&(p=requestAnimationFrame(X)));},seek(i){let f=Math.min(1,Math.max(0,i));ue=f,Ee=f,pe=true,cancelAnimationFrame(p),G(f);},getProgress(){return ue}}}var ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,r){if(typeof window>"u")return ot;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollCounter: element not found:",e),ot;let t=n,{from:l=0,to:o,format:c,easing:u="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:N}=r,L=x!==void 0?h=>h.toFixed(x):c??(h=>String(Math.round(h))),te=typeof u=="function"?u:ee[u]??ee["ease-out"],$e=fe(m.start??"top 80%"),W=fe(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=L(o),N?.(),ot;let U=0,B=0,A=0,P=false,M=false,v=-1,k=0,I=false,$=()=>window.scrollY,S=()=>window.innerHeight;function re(){let h=t.getBoundingClientRect(),T=xe({top:h.top,height:h.height},$(),S(),$e,W);U=T.tStart,B=T.tEnd;}function O(h){t.textContent=L(l+(o-l)*h),t.style.setProperty("--scroll-draw-progress",String(h));}function ne(){if(!P||M)return;let h=te(Q($(),U,B,1));d&&(v=Math.max(v,h),h=v),k=h,O(h),h>=1&&!I?(I=true,N?.()):h<1&&!d&&(I=false),A=requestAnimationFrame(ne);}re();{let h=te(Q($(),U,B,1));d&&h>0&&(v=h),k=h,O(h);}let se=new IntersectionObserver(h=>{h.forEach(T=>{P=T.isIntersecting,P&&!M?A=requestAnimationFrame(ne):cancelAnimationFrame(A);});}),K;function ce(){clearTimeout(K),K=setTimeout(re,150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),se.observe(t),Le(t,{type:"counter",getProgress:()=>k,getTrigger:()=>({tStart:U,tEnd:B})}),{destroy(){cancelAnimationFrame(A),se.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(K),Pe(t);},replay(){v=-1,I=false,k=0,M=false,O(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,P&&(A=requestAnimationFrame(ne)));},seek(h){let T=Math.min(1,Math.max(0,h));k=T,v=T,M=true,cancelAnimationFrame(A),O(T);},getProgress(){return k}}}var $t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,r={}){if(typeof window>"u")return $t;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),$t;let t=n,{trigger:l={},easing:o="linear",once:c=false,axis:u="y",preload:m="auto",onReady:d,onComplete:x,onProgress:N}=r,L=window.matchMedia("(prefers-reduced-motion: reduce)").matches,te=typeof o=="function"?o:ee[o]??ee.linear,$e=fe(l.start??"top top"),W=fe(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Z=r.from??0,U=r.to,B=0,A=0,P=0,M=false,v=false,k=-1,I=0,$=false,S=false,re=()=>u==="x"?window.scrollX:window.scrollY,O=()=>u==="x"?window.innerWidth:window.innerHeight;function ne(){let p=t.getBoundingClientRect(),F=u==="x"?p.left:p.top,pe=u==="x"?p.width:p.height,Ee=xe({top:F,height:pe},re(),O(),$e,W);B=Ee.tStart,A=Ee.tEnd;}function se(p){if(!S)return;let F=U??t.duration??0;t.currentTime=Z+(F-Z)*p,t.style.setProperty("--scroll-draw-progress",String(p)),N?.(p);}function K(){if(!M||v||!S)return;let p=te(Q(re(),B,A,1));c&&(k=Math.max(k,p),p=k),I=p,se(p),p>=1&&!$?($=true,x?.()):p<1&&!c&&($=false),P=requestAnimationFrame(K);}function ce(){if(S=true,U===void 0&&(U=t.duration),L){se(1),d?.();return}ne(),d?.(),M&&!v&&(P=requestAnimationFrame(K));}t.readyState>=1?ce():t.addEventListener("loadedmetadata",ce,{once:true}),S||ne();let h=new IntersectionObserver(p=>{p.forEach(F=>{M=F.isIntersecting,M&&!v&&S?P=requestAnimationFrame(K):cancelAnimationFrame(P);});}),T;function g(){clearTimeout(T),T=setTimeout(ne,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),h.observe(t),Le(t,{type:"video",getProgress:()=>I,getTrigger:()=>({tStart:B,tEnd:A})}),{destroy(){cancelAnimationFrame(P),h.disconnect(),t.removeEventListener("loadedmetadata",ce),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(T),Pe(t);},replay(){k=-1,$=false,I=0,v=false,se(0);},pause(){v=true,cancelAnimationFrame(P);},resume(){v&&(v=false,M&&S&&(P=requestAnimationFrame(K)));},seek(p){let F=Math.min(1,Math.max(0,p));I=F,k=F,v=true,cancelAnimationFrame(P),se(F);},getProgress(){return I}}}function Ot(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 lr(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=Ot(e),n=new Map;for(let o of r){let c=o.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(o);}let t=[],l=Array.from(n.keys()).sort((o,c)=>o-c);for(let o of l){let c=n.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,d)=>{let x=m.nextElementSibling;u.appendChild(m),d<c.length-1&&x&&x.style.whiteSpace==="pre"&&u.appendChild(x);}),t.push(u);}return e.textContent="",t.forEach((o,c)=>{e.appendChild(o),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function cr(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,o=r*t,c=o+(1-l);return c<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(c-o)))}function ur(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 It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:o=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=r,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof c=="function"?c:ee[c]??ee["ease-out"],te=fe(m.start??"top 85%"),$e=fe(m.end??"top 40%"),W=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let Z;l==="chars"?Z=lr(t):l==="lines"?Z=kt(t):Z=Ot(t);let U=Z.length;function B(g,p){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*p));let F=ur(p,u);F&&(g.style.transform=F);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),Z.forEach((p,F)=>{let pe=L(cr(g,F,U,o));B(p,pe);});}if(N)return A(1),x?.(),{destroy(){t.innerHTML=W,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let P=0,M=0,v=0,k=false,I=false,$=-1,S=0,re=false,O=()=>window.scrollY,ne=()=>window.innerHeight;function se(){let g=t.getBoundingClientRect(),p=xe({top:g.top,height:g.height},O(),ne(),te,$e);P=p.tStart,M=p.tEnd;}function K(){if(!k||I)return;let g=Q(O(),P,M,1);d&&($=Math.max($,g),g=$),S=g,A(g),g>=1&&!re?(re=true,x?.()):g<1&&!d&&(re=false),v=requestAnimationFrame(K);}se();let ce=new IntersectionObserver(g=>{g.forEach(p=>{k=p.isIntersecting,k&&!I?v=requestAnimationFrame(K):cancelAnimationFrame(v);});}),h;function T(){clearTimeout(h),h=setTimeout(()=>{if(l==="lines"){let g=S;t.innerHTML=W,t.setAttribute("aria-label",t.textContent??""),Z=kt(t),A(g);}se();},150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),ce.observe(t),Le(t,{type:"text",getProgress:()=>S,getTrigger:()=>({tStart:P,tEnd:M})}),{destroy(){cancelAnimationFrame(v),ce.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(h),t.innerHTML=W,t.removeAttribute("aria-label"),Pe(t);},replay(){$=-1,re=false,S=0,I=false,A(0);},pause(){I=true,cancelAnimationFrame(v);},resume(){I&&(I=false,k&&(v=requestAnimationFrame(K)));},seek(g){let p=Math.min(1,Math.max(0,g));S=p,$=p,I=true,cancelAnimationFrame(v),A(p);},getProgress(){return S}}}var Ft=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Tt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Rt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Lt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Ht=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Pt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Nt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Ct(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},zt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Dt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}};export{Rt as ScrollAnimateRef,Ht as ScrollCounterRef,Ft as ScrollDrawRef,zt as ScrollTextRef,Nt as ScrollVideoRef};
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",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Et=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,St=/[MmLlHhVvCcSsQqTtAaZz]/g;function tr(e,r,n){if(!Ze)return;let t=(e.match(St)??[]).join("").toUpperCase(),l=(r.match(St)??[]).join("").toUpperCase(),o=(e.match(Et)??[]).length,c=(r.match(Et)??[]).length;if(t!==l){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}o!==c&&we(`morphTo: coordinate count differs (${o} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function st(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let c=parseFloat(o),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function Tt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...yt[n],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:T={},stagger:z=0,direction:P="forward",once:ne=false,debug:$e=false,axis:B="y",scrollContainer:J,autoReverse:X=false,delay:G=0,strokeColor:A,strokeWidth:$,fillOpacity:M,waypoints:w,velocityScale:I=false,threshold:O=0,rootMargin:C="0px",repeat:E=0,repeatDelay:se=0,morphTo:D,clip:oe,autoplay:ie=false,duration:ee=1e3,native:ae=true,onProgress:d,onStart:x,onComplete:g,onEnter:L,onLeave:S,onEnterBack:N,onLeaveBack:fe}=l,Q=oe===true?"left":typeof oe=="string"?oe:false,Se=typeof p=="function"?p:re[p]??re.linear,Ce=de(T.start??"top bottom"),He=de(T.end??"bottom top"),ve=typeof J=="string"?document.querySelector(J):J??null,Ee=Array.isArray(A)?A[0]:null,le=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ce=Array.isArray($)?$[0]:null,j=Array.isArray($)?$[1]:typeof $=="number"?$:null,pe=Array.isArray(M)?M[0]:null,Z=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function ke(s){let a=s*100;switch(Q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let _=Q?[]:Array.from(e.querySelectorAll(c)),k=[],i=[],f=0,ge=0,R=false,V=false,q=0,Ae=false,he=-1,te=-1,Y=false,ye=0,Oe=0,Fe,Je=null;function it(){Je?.destroy(),Je=null;}let Ne=new Set,at=NaN,Re=true,Be=-1,lt=performance.now(),ze=NaN;function et(){return ve?B==="x"?ve.scrollLeft:ve.scrollTop:B==="x"?window.scrollX:window.scrollY}function ct(){return ve?B==="x"?ve.clientWidth:ve.clientHeight:B==="x"?window.innerWidth:window.innerHeight}function ut(){let s=Qe(e,ve,B);return xe(s,s.scroll,ct(),Ce,He)}function mt(){(({tStart:f,tEnd:ge}=ut())),$e&&Ze&&(it(),Je=er(f,ge,B));}function tt(s,a=ut){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let b=s.destroy;return s.destroy=()=>{b.call(s),Pe(e);},s}function _t(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),Q){let b=a==="reverse"?1-s:s;e.style.clipPath=ke(b);return}_.forEach((b,ue)=>{b.style.strokeDashoffset=a==="reverse"?`${k[ue]*s}`:`${k[ue]*(1-s)}`,m&&(b.style.opacity=a==="reverse"?`${1-s}`:`${s}`),Ee&&le?b.style.stroke=Ve(Ee,le,s):le&&(b.style.stroke=le),ce!==null&&j!==null?b.style.strokeWidth=`${ce+(j-ce)*s}`:j!==null&&(b.style.strokeWidth=`${j}`),pe!==null&&Z!==null?b.style.fillOpacity=`${pe+(Z-pe)*s}`:Z!==null&&(b.style.fillOpacity=`${Z}`),D&&b.tagName.toLowerCase()==="path"&&i[ue]&&b.setAttribute("d",st(i[ue],D,s));});}function Ge(){if(e.style.setProperty("--scroll-draw-progress","0"),Q){e.style.clipPath=ke(0);return}_.forEach((s,a)=>{s.style.strokeDasharray=`${k[a]}`,s.style.strokeDashoffset=P==="reverse"?"0":`${k[a]}`,m?s.style.opacity=P==="reverse"?"1":"0":s.style.opacity="",Ee&&(s.style.stroke=Ee),ce!==null&&(s.style.strokeWidth=`${ce}`),pe!==null&&(s.style.fillOpacity=`${pe}`),D&&s.tagName.toLowerCase()==="path"&&i[a]&&s.setAttribute("d",i[a]);});}if(_.forEach(s=>{Jt(s);let a=_e(s);k.push(a);let b=s.tagName.toLowerCase()==="path";b?i.push(s.getAttribute("d")??""):i.push(""),D&&(b?tr(i[i.length-1],D,s):we(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=P==="reverse"?`${a}`:"0",m&&(s.style.opacity="1"),le&&(s.style.stroke=le),j!==null&&(s.style.strokeWidth=`${j}`),Z!==null&&(s.style.fillOpacity=`${Z}`),D&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",D)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=P==="reverse"?"0":`${a}`,m?s.style.opacity=P==="reverse"?"1":"0":s.style.opacity="",Ee&&(s.style.stroke=Ee),ce!==null&&(s.style.strokeWidth=`${ce}`),pe!==null&&(s.style.fillOpacity=`${pe}`));}),Q){if(o)return e.style.clipPath=ke(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ft=typeof p=="string"?Ke(p):null;function Vt(){return !(ae===false||!Kt()||!_.length||!ft||Q||B!=="y"||ve||u!==1||z!==0||ne||X||I!==false||D||w||E||G>0||d||x||g||L||S||N||fe||A!=null||$!=null||M!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function qt(){let s=++Zt,a=`svg-scroll-draw-${s}`,b=`svg-scroll-draw-host-${s}`,ue=`--svg-scroll-draw-${s}`,De=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${De};`,v=`stroke-dashoffset:${Ie};`;m&&(Me+=`opacity:${P==="reverse"?1:0};`,v+=`opacity:${P==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${a}{from{${Me}}to{${v}}}.${b}{view-timeline-name:${ue};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${ft};animation-fill-mode:both;animation-timeline:${ue};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(b);function me(h,U){h.style.setProperty("--ssd-len",String(k[U])),h.style.strokeDasharray=`${k[U]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(a);}_.forEach(me);let y=false,H=-1;function W(){if(H>=0)return H;let h=e.getBoundingClientRect(),{tStart:U,tEnd:Te}=xe({top:h.top,height:h.height},et(),ct(),Ce,He);return Se(K(et(),U,Te,u))}return {destroy(){e.classList.remove(b),_.forEach(h=>{h.classList.remove(a),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),F.remove();},replay(){y=false,H=-1,_.forEach(me);},pause(){y=true,_.forEach(h=>{h.style.animationPlayState="paused";});},resume(){y&&(y=false,_.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let U=Math.min(1,Math.max(0,h));H=U,y=true,_.forEach((Te,be)=>{Te.classList.remove(a),Te.style.strokeDashoffset=P==="reverse"?`${k[be]*U}`:`${k[be]*(1-U)}`,m&&(Te.style.opacity=P==="reverse"?`${1-U}`:`${U}`);});},getProgress(){return W()},refresh(){_.forEach((h,U)=>{k[U]=_e(h),h.style.setProperty("--ssd-len",String(k[U])),h.style.strokeDasharray=`${k[U]}`;});}}}if(Vt())return tt(qt());function Wt(){let s=Math.max(1,ee),a=0,b=0,ue=false;function De(y){let H=true;if(Q){let W=Math.min(1,Math.max(0,y/s)),h=Se(W);ye=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=ke(P==="reverse"?1-h:h),d?.(h),W<1&&(H=false);}else _.forEach((W,h)=>{let U=h*z*s,Te=Math.min(1,Math.max(0,(y-U)/s)),be=Se(Te);W.style.strokeDashoffset=P==="reverse"?`${k[h]*be}`:`${k[h]*(1-be)}`,m&&(W.style.opacity=P==="reverse"?`${1-be}`:`${be}`),Ee&&le?W.style.stroke=Ve(Ee,le,be):le&&(W.style.stroke=le),ce!==null&&j!==null?W.style.strokeWidth=`${ce+(j-ce)*be}`:j!==null&&(W.style.strokeWidth=`${j}`),pe!==null&&Z!==null?W.style.fillOpacity=`${pe+(Z-pe)*be}`:Z!==null&&(W.style.fillOpacity=`${Z}`),D&&W.tagName.toLowerCase()==="path"&&i[h]&&W.setAttribute("d",st(i[h],D,be)),h===0&&(ye=be,d?.(be),e.style.setProperty("--scroll-draw-progress",String(be))),Te<1&&(H=false);});if(w){let W=Math.min(1,Math.max(0,y/s)),h=Se(W);for(let U in w){let Te=parseFloat(U);h>=Te&&!Ne.has(Te)&&(Ne.add(Te),w[U]?.());}}return H}function Ie(y){if(Y)return;let H=y-a;V||(V=true,x?.());let W=De(H);if(W&&!R){R=true,De(s*(1+Math.max(0,_.length-1)*z)),g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{a=performance.now(),V=false,R=false,Ne.clear(),Ge(),q=requestAnimationFrame(Ie);},se));return}W||(q=requestAnimationFrame(Ie));}function Me(){cancelAnimationFrame(q),clearTimeout(Fe),a=performance.now(),b=0,Y=false,V=false,R=false,Oe=0,ue=true,ye=0,Ne.clear(),Ge(),q=requestAnimationFrame(Ie);}let v=new IntersectionObserver(y=>{y.forEach(H=>{H.isIntersecting&&!(ne&&R)?Me():!H.isIntersecting&&!ne&&!R&&(cancelAnimationFrame(q),clearTimeout(Fe),ue=false);});},{root:ve??null,threshold:O,rootMargin:C}),F;function me(){clearTimeout(F),F=setTimeout(()=>{_.forEach((y,H)=>{k[H]=_e(y),y.style.strokeDasharray=`${k[H]}`;});},150);}return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),G>0?setTimeout(()=>v.observe(e),G):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(Fe),v.disconnect(),window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me),clearTimeout(F);},replay(){Oe=0,Me();},pause(){Y||!ue||(Y=true,b=performance.now()-a,cancelAnimationFrame(q));},resume(){Y&&(Y=false,ue=true,a=performance.now()-b,q=requestAnimationFrame(Ie));},seek(y){let H=Math.min(1,Math.max(0,y));ye=H,Y=true,b=H*s,a=performance.now()-b,cancelAnimationFrame(q),De(b);},getProgress(){return ye},refresh(){clearTimeout(F),_.forEach((y,H)=>{k[H]=_e(y),y.style.strokeDasharray=`${k[H]}`;});}}}if(ie)return tt(Wt());mt();function je(){if(!Ae||Y)return;let s=performance.now(),a=et();if(!Re&&I===false&&a===at){q=requestAnimationFrame(je);return}Re=false,at=a;let b=u;if(I!==false){let v=s-lt,F=v>0?Math.abs(a-(Be<0?a:Be))/v:0;b=u*Math.max(.2,1+F*(typeof I=="number"?I:1)*.04);}Be=a,lt=s;let ue=X?te===-1||a>=te?"forward":"reverse":P;te=a;let De=ge-f,Ie=true,Me=De===0?0:(a-f)/De;if(isNaN(ze)||(ze<=0&&Me>0?L?.():ze>0&&Me<=0&&fe?.(),ze<1&&Me>=1?S?.():ze>=1&&Me<1&&N?.()),ze=Me,Q){let v=Se(K(a,f,ge,b));ne&&!X&&(he=Math.max(he,v),v=he),ye=v,e.style.setProperty("--scroll-draw-progress",String(v));let F=ue==="reverse"?1-v:v;e.style.clipPath=ke(F),d?.(v),!V&&K(a,f,ge,b)>0&&(V=true,x?.()),v>=1&&!R?(R=true,g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{he=-1,V=false,R=false,e.style.clipPath=ke(0);},se))):v<1&&!ne&&(R=false),q=requestAnimationFrame(je);return}if(_.forEach((v,F)=>{let me=F*z*De,y=Se(K(a,f+me,ge+me,b));ne&&!X&&(he=Math.max(he,y),y=he),ye=y,v.style.strokeDashoffset=ue==="reverse"?`${k[F]*y}`:`${k[F]*(1-y)}`,m&&(v.style.opacity=ue==="reverse"?`${1-y}`:`${y}`),Ee&&le?v.style.stroke=Ve(Ee,le,y):le&&(v.style.stroke=le),ce!==null&&j!==null?v.style.strokeWidth=`${ce+(j-ce)*y}`:j!==null&&(v.style.strokeWidth=`${j}`),pe!==null&&Z!==null?v.style.fillOpacity=`${pe+(Z-pe)*y}`:Z!==null&&(v.style.fillOpacity=`${Z}`),D&&v.tagName.toLowerCase()==="path"&&i[F]&&v.setAttribute("d",st(i[F],D,y)),F===0&&(d?.(y),e.style.setProperty("--scroll-draw-progress",String(y))),y<1&&(Ie=false);}),w){let v=Se(K(a,f,ge,b));for(let F in w){let me=parseFloat(F);v>=me&&!Ne.has(me)&&(Ne.add(me),w[F]?.());}}!V&&K(a,f,ge,b)>0&&(V=true,x?.()),Ie&&!R?(R=true,g?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Fe=setTimeout(()=>{he=-1,V=false,R=false,Ne.clear(),Ge(),Re=true;},se))):!Ie&&!ne&&(R=false),q=requestAnimationFrame(je);}let rt=false;function Ye(){rt||(rt=true,q=requestAnimationFrame(function(){je();}));}function Ue(){rt=false,cancelAnimationFrame(q);}let nt=new IntersectionObserver(s=>{s.forEach(a=>{Ae=a.isIntersecting,Ae&&!Y?(Re=true,Ye()):Ue();});},{root:ve??null,threshold:O,rootMargin:C});function pt(){_.forEach((s,a)=>{k[a]=_e(s),s.style.strokeDasharray=`${k[a]}`;}),mt(),Re=true;}let Xe;function qe(){clearTimeout(Xe),Xe=setTimeout(pt,150);}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(()=>qe()),We.observe(document.body),We.observe(document.documentElement),We.observe(e)),G>0?setTimeout(()=>nt.observe(e),G):nt.observe(e),tt({destroy(){cancelAnimationFrame(q),clearTimeout(Fe),Ue(),nt.disconnect(),We?.disconnect(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(Xe),it();},replay(){he=-1,te=-1,Be=-1,V=false,R=false,Oe=0,Y=false,ye=0,Ne.clear(),clearTimeout(Fe),Ge(),Re=true,Ae&&Ye();},pause(){Y=true,Ue();},resume(){Y&&(Y=false,Re=true,Ae&&Ye());},seek(s){let a=Math.min(1,Math.max(0,s));ye=a,he=a,Y=true,Ue(),_t(a,P),Re=true;},getProgress(){return ye},refresh(){clearTimeout(Xe),pt(),Ae&&!Y&&Ye();}},()=>({tStart:f,tEnd:ge}))}function rr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],o=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:o});}return r}function nr(e,r,n){let t=xt(e),l=xt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((o,c)=>{let u=l[c];return o.fn!==u.fn||o.nums.length!==u.nums.length?n<1?`${o.fn}(${o.nums.map((m,p)=>`${m}${o.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,p)=>`${m+(u.nums[p]-m)*n}${o.units[p]}`).join(", ")})`}).join(" ")}function At(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(rr(t))return Ve(t,l,n);if(t.includes("("))return nr(t,l,n);let o=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(o&&c){let u=parseFloat(o[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${o[2]||c[2]}`}return n<1?t:l}function sr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var or=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ir=0,Mt="--scroll-draw-progress";function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Lt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:o="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:p,native:T=true,velocityScale:z=false,respectReducedMotion:P=true,triggerElement:ne,onProgress:$e,onComplete:B,onEnter:J,onLeave:X,onEnterBack:G,onLeaveBack:A}=r,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof o=="function"?o:re[o]??re["ease-out"],w=de(l.start??"top bottom"),I=de(l.end??"bottom top"),O=ne??e,C=typeof p=="string"?document.querySelector(p):p??null,E=Object.entries(t).map(([i,f])=>({prop:sr(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function se(){let i=window.getComputedStyle(e);for(let f of E)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function D(){for(let i of E)e.style.setProperty(i.prop,String(i.to));}let oe=new Map;for(let i of [...E.map(f=>f.prop),Mt])oe.set(i,e.style.getPropertyValue(i));function ie(){for(let[i,f]of oe)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if($)return D(),B?.(),{...n,destroy:ie,getProgress:()=>1};se();let ee=typeof o=="string"?Ke(o):null;function ae(){if(!T||!ar()||!ee||m!=="y"||C||O!==e||u||c!==1||$e||B||J||X||G||A||z!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of E)if(!or.has(i.prop))return false;return true}function d(){let i=`ssd-a-${++ir}`,f=E.map(te=>`${te.prop}:${te.from}`).join(";"),ge=E.map(te=>`${te.prop}:${te.to}`).join(";"),R=document.createElement("style");R.setAttribute("data-ssd-animate",""),R.textContent=`@keyframes ${i}{from{${f}}to{${ge}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(i);let V=()=>m==="x"?window.scrollX:window.scrollY,q=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let te=e.getBoundingClientRect();return xe({top:te.top,height:te.height},V(),q(),w,I)};Le(e,{type:"animate",getProgress:()=>he.getProgress(),getTrigger:Ae});let he={destroy(){e.classList.remove(i),R.remove(),e.style.animationPlayState="",ie(),Pe(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(te){let Y=Math.min(1,Math.max(0,te));e.classList.remove(i);for(let ye of E)e.style.setProperty(ye.prop,At(ye.from,ye.to,Y));},getProgress(){let{tStart:te,tEnd:Y}=Ae();return M(K(V(),te,Y,c))}};return he}if(ae())return d();let x=0,g=0,L=0,S=false,N=false,fe=-1,Q=0,Se=false,Ce=NaN,He=-1,ve=0,Ee=()=>C?m==="x"?C.scrollLeft:C.scrollTop:m==="x"?window.scrollX:window.scrollY,le=()=>C?m==="x"?C.clientWidth:C.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ce(){let i=Qe(O,C,m),f=xe(i,i.scroll,le(),w,I);x=f.tStart,g=f.tEnd;}function j(i){e.style.setProperty(Mt,String(i));for(let f of E)e.style.setProperty(f.prop,At(f.from,f.to,i));$e?.(i);}function pe(i){if(isNaN(Ce)){Ce=i;return}Ce<=0&&i>0?J?.():Ce>0&&i<=0&&A?.(),Ce<1&&i>=1?X?.():Ce>=1&&i<1&&G?.(),Ce=i;}function Z(){if(!S||N)return;let i=performance.now(),f=Ee(),ge=c;if(z!==false){let q=i-ve,Ae=q>0?Math.abs(f-(He<0?f:He))/q:0;ge=c*Math.max(.2,1+Ae*(typeof z=="number"?z:1)*.04);}He=f,ve=i;let R=g===x?0:(f-x)/(g-x);pe(R);let V=M(K(f,x,g,ge));u&&(fe=Math.max(fe,V),V=fe),Q=V,j(V),V>=1&&!Se?(Se=true,B?.()):V<1&&!u&&(Se=false),L=requestAnimationFrame(Z);}ce(),g===x&&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 i=M(K(Ee(),x,g,c));u&&i>0&&(fe=i),Q=i,j(i);}let ke=new IntersectionObserver(i=>{i.forEach(f=>{S=f.isIntersecting,S&&!N?L=requestAnimationFrame(Z):cancelAnimationFrame(L);});},{root:C??null}),_;function k(){clearTimeout(_),_=setTimeout(ce,150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),ke.observe(e),Le(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:x,tEnd:g})}),{destroy(){cancelAnimationFrame(L),ke.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(_),ie(),Pe(e);},replay(){fe=-1,Se=false,Q=0,N=false,j(0);},pause(){N=true,cancelAnimationFrame(L);},resume(){N&&(N=false,S&&(L=requestAnimationFrame(Z)));},seek(i){let f=Math.min(1,Math.max(0,i));Q=f,fe=f,N=true,cancelAnimationFrame(L),j(f);},getProgress(){return Q}}}var ot={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,r){if(typeof window>"u")return ot;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),ot;let t=n,{from:l=0,to:o,format:c,easing:u="ease-out",trigger:m={},once:p=true,decimals:T,onComplete:z}=r,P=T!==void 0?d=>d.toFixed(T):c??(d=>String(Math.round(d))),ne=typeof u=="function"?u:re[u]??re["ease-out"],$e=de(m.start??"top 80%"),B=de(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(o),z?.(),ot;let X=0,G=0,A=0,$=false,M=false,w=-1,I=0,O=false,C=()=>window.scrollY,E=()=>window.innerHeight;function se(){let d=t.getBoundingClientRect(),x=xe({top:d.top,height:d.height},C(),E(),$e,B);X=x.tStart,G=x.tEnd;}function D(d){t.textContent=P(l+(o-l)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function oe(){if(!$||M)return;let d=ne(K(C(),X,G,1));p&&(w=Math.max(w,d),d=w),I=d,D(d),d>=1&&!O?(O=true,z?.()):d<1&&!p&&(O=false),A=requestAnimationFrame(oe);}se();{let d=ne(K(C(),X,G,1));p&&d>0&&(w=d),I=d,D(d);}let ie=new IntersectionObserver(d=>{d.forEach(x=>{$=x.isIntersecting,$&&!M?A=requestAnimationFrame(oe):cancelAnimationFrame(A);});}),ee;function ae(){clearTimeout(ee),ee=setTimeout(se,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),ie.observe(t),Le(t,{type:"counter",getProgress:()=>I,getTrigger:()=>({tStart:X,tEnd:G})}),{destroy(){cancelAnimationFrame(A),ie.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ee),Pe(t);},replay(){w=-1,O=false,I=0,M=false,D(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,$&&(A=requestAnimationFrame(oe)));},seek(d){let x=Math.min(1,Math.max(0,d));I=x,w=x,M=true,cancelAnimationFrame(A),D(x);},getProgress(){return I}}}var $t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,r={}){if(typeof window>"u")return $t;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),$t;let t=n,{trigger:l={},easing:o="linear",once:c=false,axis:u="y",preload:m="auto",onReady:p,onComplete:T,onProgress:z}=r,P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ne=typeof o=="function"?o:re[o]??re.linear,$e=de(l.start??"top top"),B=de(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let J=r.from??0,X=r.to,G=0,A=0,$=0,M=false,w=false,I=-1,O=0,C=false,E=false,se=()=>u==="x"?window.scrollX:window.scrollY,D=()=>u==="x"?window.innerWidth:window.innerHeight;function oe(){let S=t.getBoundingClientRect(),N=u==="x"?S.left:S.top,fe=u==="x"?S.width:S.height,Q=xe({top:N,height:fe},se(),D(),$e,B);G=Q.tStart,A=Q.tEnd;}let ie=NaN;function ee(S){if(!E)return;let N=X??t.duration??0,fe=J+(N-J)*S;fe!==ie&&(ie=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(S)),z?.(S);}function ae(){if(!M||w||!E)return;let S=ne(K(se(),G,A,1));c&&(I=Math.max(I,S),S=I),O=S,ee(S),S>=1&&!C?(C=true,T?.()):S<1&&!c&&(C=false),$=requestAnimationFrame(ae);}function d(){if(E=true,X===void 0&&(X=t.duration),P){ee(1),p?.();return}oe(),p?.(),M&&!w&&($=requestAnimationFrame(ae));}t.readyState>=1?d():t.addEventListener("loadedmetadata",d,{once:true}),E||oe();let x=new IntersectionObserver(S=>{S.forEach(N=>{M=N.isIntersecting,M&&!w&&E?$=requestAnimationFrame(ae):cancelAnimationFrame($);});}),g;function L(){clearTimeout(g),g=setTimeout(oe,150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),x.observe(t),Le(t,{type:"video",getProgress:()=>O,getTrigger:()=>({tStart:G,tEnd:A})}),{destroy(){cancelAnimationFrame($),x.disconnect(),t.removeEventListener("loadedmetadata",d),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(g),Pe(t);},replay(){I=-1,C=false,O=0,w=false,ie=NaN,ee(0);},pause(){w=true,cancelAnimationFrame($);},resume(){w&&(w=false,M&&E&&($=requestAnimationFrame(ae)));},seek(S){let N=Math.min(1,Math.max(0,S));O=N,I=N,w=true,cancelAnimationFrame($),ie=NaN,ee(N);},getProgress(){return O}}}function Ot(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 lr(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=Ot(e),n=new Map;for(let o of r){let c=o.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(o);}let t=[],l=Array.from(n.keys()).sort((o,c)=>o-c);for(let o of l){let c=n.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,p)=>{let T=m.nextElementSibling;u.appendChild(m),p<c.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((o,c)=>{e.appendChild(o),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function cr(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,o=r*t,c=o+(1-l);return c<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(c-o)))}function ur(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 It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:o=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:T}=r,z=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof c=="function"?c:re[c]??re["ease-out"],ne=de(m.start??"top 85%"),$e=de(m.end??"top 40%"),B=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let J;l==="chars"?J=lr(t):l==="lines"?J=kt(t):J=Ot(t);let X=J.length;function G(g,L){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*L));let S=ur(L,u);S&&(g.style.transform=S);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),J.forEach((L,S)=>{let N=P(cr(g,S,X,o));G(L,N);});}if(z)return A(1),T?.(),{destroy(){t.innerHTML=B,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let $=0,M=0,w=0,I=false,O=false,C=-1,E=0,se=false,D=()=>window.scrollY,oe=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),L=xe({top:g.top,height:g.height},D(),oe(),ne,$e);$=L.tStart,M=L.tEnd;}function ee(){if(!I||O)return;let g=K(D(),$,M,1);p&&(C=Math.max(C,g),g=C),E=g,A(g),g>=1&&!se?(se=true,T?.()):g<1&&!p&&(se=false),w=requestAnimationFrame(ee);}ie();let ae=new IntersectionObserver(g=>{g.forEach(L=>{I=L.isIntersecting,I&&!O?w=requestAnimationFrame(ee):cancelAnimationFrame(w);});}),d;function x(){clearTimeout(d),d=setTimeout(()=>{if(l==="lines"){let g=E;t.innerHTML=B,t.setAttribute("aria-label",t.textContent??""),J=kt(t),A(g);}ie();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),ae.observe(t),Le(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:$,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ae.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(d),t.innerHTML=B,t.removeAttribute("aria-label"),Pe(t);},replay(){C=-1,se=false,E=0,O=false,A(0);},pause(){O=true,cancelAnimationFrame(w);},resume(){O&&(O=false,I&&(w=requestAnimationFrame(ee)));},seek(g){let L=Math.min(1,Math.max(0,g));E=L,C=L,O=true,cancelAnimationFrame(w),A(L);},getProgress(){return E}}}var Ft=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Tt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Nt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Lt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Rt=class{constructor(){this.instance=null;}init(r,n){return this.destroy(),this.instance=Pt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},Ht=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Ct(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}},zt=class{constructor(){this.instance=null;}init(r,n={}){return this.destroy(),this.instance=Dt(r,n),this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(r){return this.instance?.seek(r),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=null,this}};export{Nt as ScrollAnimateRef,Rt as ScrollCounterRef,Ft as ScrollDrawRef,zt as ScrollTextRef,Ht as ScrollVideoRef};
@@ -0,0 +1,2 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});function $(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var V=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function M(e,...t){V&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var O={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},Y={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},g="svg-scroll-draw-aos",i=(e,t)=>`translate3d(${e},${t},0)`,B=[["fade-up",i("0","100px")],["fade-down",i("0","-100px")],["fade-right",i("-100px","0")],["fade-left",i("100px","0")],["fade-up-right",i("-100px","100px")],["fade-up-left",i("100px","100px")],["fade-down-right",i("-100px","-100px")],["fade-down-left",i("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${i("0","100px")} scale(.6)`],["zoom-in-down",`${i("0","-100px")} scale(.6)`],["zoom-in-right",`${i("-100px","0")} scale(.6)`],["zoom-in-left",`${i("100px","0")} scale(.6)`],["zoom-out-up",`${i("0","100px")} scale(1.2)`],["zoom-out-down",`${i("0","-100px")} scale(1.2)`],["zoom-out-right",`${i("-100px","0")} scale(1.2)`],["zoom-out-left",`${i("100px","0")} scale(1.2)`],["slide-up",i("0","100%")],["slide-down",i("0","-100%")],["slide-right",i("-100%","0")],["slide-left",i("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function G(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...B.map(([o,u])=>`[data-aos=${o}]{transform:${u}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
2
+ `)}var a={...O},d=[],m=false,f=0,h,p=null,s=null,w=false,T=()=>typeof window<"u"&&typeof document<"u";function _(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var C=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function c(e,t){return e.getAttribute(`data-aos-${t}`)}function A(e,t,n){let o=c(e,t);return o==="true"?true:o==="false"?false:n}function N(e,t){let n=c(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function W(e){let t=window.innerHeight,n=c(e,"anchor-placement"),o=N(e,n),u=c(e,"anchor"),L=u?document.querySelector(u):null;u&&!L&&M(`aos: data-aos-anchor="${u}" matches nothing; using the element itself`);let x=L||e,l=C(x),r=_(x)-t;switch(n||a.anchorPlacement){case "center-bottom":r+=l/2;break;case "bottom-bottom":r+=l;break;case "top-center":r+=t/2;break;case "center-center":r+=t/2+l/2;break;case "bottom-center":r+=t/2+l;break;case "top-top":r+=t;break;case "bottom-top":r+=t+l;break;case "center-top":r+=t+l/2;break;}return r+o}function X(e){return _(e)+C(e)-N(e,null)}function Z(e){let t=c(e,"duration")??String(a.duration),n=c(e,"delay")??String(a.delay),o=c(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",Y[o]??o);}function D(){d=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=d.find(n=>n.node===e);return {node:e,in:0,out:0,once:A(e,"once",a.once),mirror:A(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:c(e,"id")}});for(let e of d)Z(e.node),e.node.classList.add(a.initClassName);}function R(){for(let e of d)e.in=W(e.node),e.out=X(e.node);}function H(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function z(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),H("in",e));}function S(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),H("out",e));}function E(){f=0;let e=window.scrollY;for(let t of d){if(w){z(t);continue}t.mirror&&!t.once&&e>t.out?S(t):e>t.in?z(t):t.once||S(t);}}var k=()=>{f||(f=requestAnimationFrame(E));};function b(){clearTimeout(h),h=setTimeout(v,50);}var q=()=>v();function I(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function P(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function j(){if(document.getElementById(g))return;let e=document.createElement("style");e.id=g,e.textContent=G(a.animatedClassName),document.head.appendChild(e);}function y(){if(!m){if(m=true,s=null,D(),w)for(let e of d)e.node.setAttribute("data-aos-instant","");R(),E(),window.addEventListener("scroll",k,{passive:true}),window.addEventListener("resize",b),window.addEventListener("orientationchange",b),window.addEventListener("load",q),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(p=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&Q();}),p.observe(document.documentElement,{childList:true,subtree:true}));}}function U(e={}){if(!T())return [];if((m||s)&&F(),a={...O,...e},I())return P(),[];w=$(),j();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)y();else if(a.startEvent==="load"&&document.readyState==="complete")y();else {let n=a.startEvent==="load"?window:document,o=()=>y();n.addEventListener(a.startEvent,o,{once:true}),s={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function v(){m&&(R(),E());}function Q(){if(m){if(I()){P();return}D(),v();}}function F(){if(T()){s&&s.target.removeEventListener(s.type,s.fn),s=null,cancelAnimationFrame(f),f=0,clearTimeout(h),window.removeEventListener("scroll",k),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),window.removeEventListener("load",q),p?.disconnect(),p=null;for(let e of d)e.node.removeAttribute("data-aos-instant");d=[],m=false,document.getElementById(g)?.remove();}}var J={init:U,refresh:v,refreshHard:Q,destroy:F},oe=J;exports.default=oe;exports.destroy=F;exports.init=U;exports.refresh=v;exports.refreshHard=Q;
@@ -0,0 +1,53 @@
1
+ type AOSAnchorPlacement = 'top-bottom' | 'top-center' | 'top-top' | 'center-bottom' | 'center-center' | 'center-top' | 'bottom-bottom' | 'bottom-center' | 'bottom-top';
2
+ interface AOSOptions {
3
+ /** Px from the trigger point before the animation starts. Default 120. */
4
+ offset?: number;
5
+ /** Ms to wait before animating in. Default 0. */
6
+ delay?: number;
7
+ /** Animation length in ms. Default 400. */
8
+ duration?: number;
9
+ /** An AOS easing name (`'ease-out-back'`…) or any CSS timing function. Default `'ease'`. */
10
+ easing?: string;
11
+ /** Animate only the first time the element scrolls in. Default false. */
12
+ once?: boolean;
13
+ /** Animate out again when the element scrolls past the top. Default false. */
14
+ mirror?: boolean;
15
+ /** Which edge of the element meets which edge of the window. Default `'top-bottom'`. */
16
+ anchorPlacement?: AOSAnchorPlacement;
17
+ /** Skip animations entirely: a boolean, a predicate, or a viewport class. */
18
+ disable?: boolean | 'phone' | 'tablet' | 'mobile' | (() => boolean);
19
+ /** Document event that starts AOS. Default `'DOMContentLoaded'`. */
20
+ startEvent?: string;
21
+ /** Do not watch the DOM for new `[data-aos]` elements. Default false. */
22
+ disableMutationObserver?: boolean;
23
+ /** Class added at init. Default `'aos-init'`. */
24
+ initClassName?: string;
25
+ /** Class added while animated in. Default `'aos-animate'`. */
26
+ animatedClassName?: string;
27
+ /** Also add the `data-aos` value as classes (for animate.css-style sets). Default false. */
28
+ useClassNames?: boolean;
29
+ /** Accepted for compatibility; scroll handling is batched per frame instead. */
30
+ throttleDelay?: number;
31
+ /** Accepted for compatibility; resize handling is debounced internally. */
32
+ debounceDelay?: number;
33
+ }
34
+ /** Start animating every `[data-aos]` element. Same options as AOS. */
35
+ declare function init(options?: AOSOptions): HTMLElement[];
36
+ /** Recalculate every trigger position (after a layout change). */
37
+ declare function refresh(): void;
38
+ /** Find `[data-aos]` elements again (after adding or removing some), then refresh. */
39
+ declare function refreshHard(): void;
40
+ /**
41
+ * Stop listening and remove the injected stylesheet. Not in AOS — added for
42
+ * single-page apps that unmount the page AOS was started on. Elements keep
43
+ * whatever classes they have.
44
+ */
45
+ declare function destroy(): void;
46
+ declare const AOS: {
47
+ init: typeof init;
48
+ refresh: typeof refresh;
49
+ refreshHard: typeof refreshHard;
50
+ destroy: typeof destroy;
51
+ };
52
+
53
+ export { type AOSAnchorPlacement, type AOSOptions, AOS as default, destroy, init, refresh, refreshHard };
@@ -0,0 +1,53 @@
1
+ type AOSAnchorPlacement = 'top-bottom' | 'top-center' | 'top-top' | 'center-bottom' | 'center-center' | 'center-top' | 'bottom-bottom' | 'bottom-center' | 'bottom-top';
2
+ interface AOSOptions {
3
+ /** Px from the trigger point before the animation starts. Default 120. */
4
+ offset?: number;
5
+ /** Ms to wait before animating in. Default 0. */
6
+ delay?: number;
7
+ /** Animation length in ms. Default 400. */
8
+ duration?: number;
9
+ /** An AOS easing name (`'ease-out-back'`…) or any CSS timing function. Default `'ease'`. */
10
+ easing?: string;
11
+ /** Animate only the first time the element scrolls in. Default false. */
12
+ once?: boolean;
13
+ /** Animate out again when the element scrolls past the top. Default false. */
14
+ mirror?: boolean;
15
+ /** Which edge of the element meets which edge of the window. Default `'top-bottom'`. */
16
+ anchorPlacement?: AOSAnchorPlacement;
17
+ /** Skip animations entirely: a boolean, a predicate, or a viewport class. */
18
+ disable?: boolean | 'phone' | 'tablet' | 'mobile' | (() => boolean);
19
+ /** Document event that starts AOS. Default `'DOMContentLoaded'`. */
20
+ startEvent?: string;
21
+ /** Do not watch the DOM for new `[data-aos]` elements. Default false. */
22
+ disableMutationObserver?: boolean;
23
+ /** Class added at init. Default `'aos-init'`. */
24
+ initClassName?: string;
25
+ /** Class added while animated in. Default `'aos-animate'`. */
26
+ animatedClassName?: string;
27
+ /** Also add the `data-aos` value as classes (for animate.css-style sets). Default false. */
28
+ useClassNames?: boolean;
29
+ /** Accepted for compatibility; scroll handling is batched per frame instead. */
30
+ throttleDelay?: number;
31
+ /** Accepted for compatibility; resize handling is debounced internally. */
32
+ debounceDelay?: number;
33
+ }
34
+ /** Start animating every `[data-aos]` element. Same options as AOS. */
35
+ declare function init(options?: AOSOptions): HTMLElement[];
36
+ /** Recalculate every trigger position (after a layout change). */
37
+ declare function refresh(): void;
38
+ /** Find `[data-aos]` elements again (after adding or removing some), then refresh. */
39
+ declare function refreshHard(): void;
40
+ /**
41
+ * Stop listening and remove the injected stylesheet. Not in AOS — added for
42
+ * single-page apps that unmount the page AOS was started on. Elements keep
43
+ * whatever classes they have.
44
+ */
45
+ declare function destroy(): void;
46
+ declare const AOS: {
47
+ init: typeof init;
48
+ refresh: typeof refresh;
49
+ refreshHard: typeof refreshHard;
50
+ destroy: typeof destroy;
51
+ };
52
+
53
+ export { type AOSAnchorPlacement, type AOSOptions, AOS as default, destroy, init, refresh, refreshHard };