svg-scroll-draw 2.20.0 → 2.20.1

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.
@@ -1,3 +1,3 @@
1
- "use strict";var SvgScrollDraw=(()=>{var gt=Object.defineProperty;var ir=Object.getOwnPropertyDescriptor;var ar=Object.getOwnPropertyNames;var lr=Object.prototype.hasOwnProperty;var cr=(e,t)=>{for(var r in t)gt(e,r,{get:t[r],enumerable:!0})},ur=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ar(t))!lr.call(e,s)&&s!==r&&gt(e,s,{get:()=>t[s],enumerable:!(n=ir(t,s))||n.enumerable});return e};var mr=e=>ur(gt({},"__esModule",{value:!0}),e);var Cr={};cr(Cr,{Cinematic:()=>ut,PRESETS:()=>nt,createBounce:()=>yt,createElastic:()=>ht,createSpring:()=>It,scrollAnimate:()=>Qt,scrollCounter:()=>Jt,scrollDraw:()=>jt,scrollParallax:()=>Zt});function It({tension:e=2.5,friction:t=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,t)}function yt({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(n),i=0,u=[];for(let f=0;f<r;f++){let v=Math.pow(s,f);u.push(v),i+=v}let m=[0],c=0;for(let f=0;f<r;f++)c+=u[f]/i,m.push(c);return f=>{if(f<=0)return 0;if(f>=1)return 1;for(let v=0;v<r;v++)if(f<=m[v+1]){let M=(f-m[v])/(m[v+1]-m[v]);if(v===0)return M*(2-M);let E=1-Math.pow(n,v);return E+(1-E)*(2*M-1)*(2*M-1)}return 1}}function ht({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),s=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)+1}var ne={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:yt(),elastic:ht()};function Ot(e,t,r){return Math.min(r,Math.max(t,e))}function Le(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return{element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return{element:r,viewport:n}}function Rt(e,t,r,n){switch(n){case"top":return e+r;case"center":return e+r+t/2;case"bottom":return e+r+t;default:return e+r}}function Ft(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case"top":return 0;case"center":return t/2;case"bottom":return t;default:return t}}function pe(e,t,r,n){return r===t?0:Ot((e-t)/(r-t)*n,0,1)}function Fe(e,t,r,n,s){let i=Rt(e.top,e.height,t,n.element)-Ft(n.viewport,r),u=Rt(e.top,e.height,t,s.element)-Ft(s.viewport,r);return{tStart:i,tEnd:u}}function rt(e,t,r){let n=e.getBoundingClientRect(),s=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:r==="x"?n.left:n.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function Be(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Nt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ge(e,t,r){let n=Nt(e),s=Nt(t);return!n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*r)},${Math.round(n[1]+(s[1]-n[1])*r)},${Math.round(n[2]+(s[2]-n[2])*r)})`}var nt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:!1},reveal:{easing:"ease-out",fade:!0,speed:1.2,once:!0},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:!0,speed:.75},spring:{easing:"spring",speed:1.1}};function Z(e,...t){}var fr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ht=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let t=[];for(let r=0;r<Ht;r++){let n=r/(Ht-1);t.push(String(Math.round(e(n)*1e5)/1e5))}return`linear(${t.join(",")})`}function ot(e){switch(e){case"linear":return"linear";case"ease-in":return fr;case"ease-out":return pr;case"ease-in-out":return dr()?gr(ne["ease-in-out"]):null;default:return null}}var _t=Symbol.for("svg-scroll-draw.registry");function Vt(){let e=globalThis;return e[_t]||(e[_t]=new Map)}function Ce(e,t){Vt().set(e,t)}function De(e){Vt().delete(e)}var Ue,st=new Set,it=new WeakMap,Xe=new Map,zt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function yr(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function je(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return()=>{};let r=()=>t();Ue??(Ue=new ResizeObserver(s=>{let i=!1;for(let{target:u}of s)it.get(u)!==zt(u)&&(i=!0),it.set(u,"");i&&st.forEach(u=>u())})),st.add(r);let n=yr(e);return[document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{it.has(s)||it.set(s,zt(s)),Xe.set(s,(Xe.get(s)??0)+1),Ue.observe(s)}),()=>{st.delete(r)&&(n.forEach(s=>{let i=(Xe.get(s)??1)-1;if(i)return void Xe.set(s,i);Xe.delete(s),Ue?.unobserve(s)}),st.size||(Ue?.disconnect(),Ue=void 0))}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Wt(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim()}catch{}return r||(e.getAttribute(t)??"").trim()}var qt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function wr(e){if(!!1)return;let t=Wt(e,"stroke");if(!t||t==="none"){Z("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!qt.has(r)&&!qt.has(Wt(e,"fill"))&&Z("Element has a fill \u2014 it may obscure the stroke animation.",e)}function vr(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=r==="x"?window.scrollX:window.scrollY,u=e-i,m=t-i,c=r==="x";n.innerHTML=`
1
+ "use strict";var SvgScrollDraw=(()=>{var ht=Object.defineProperty;var ar=Object.getOwnPropertyDescriptor;var lr=Object.getOwnPropertyNames;var cr=Object.prototype.hasOwnProperty;var ur=(e,t)=>{for(var r in t)ht(e,r,{get:t[r],enumerable:!0})},mr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of lr(t))!cr.call(e,s)&&s!==r&&ht(e,s,{get:()=>t[s],enumerable:!(n=ar(t,s))||n.enumerable});return e};var fr=e=>mr(ht({},"__esModule",{value:!0}),e);var Dr={};ur(Dr,{Cinematic:()=>ut,PRESETS:()=>nt,createBounce:()=>bt,createElastic:()=>wt,createSpring:()=>Ot,scrollAnimate:()=>Zt,scrollCounter:()=>Kt,scrollDraw:()=>Yt,scrollParallax:()=>Jt});function Ot({tension:e=2.5,friction:t=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,t)}function bt({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(n),i=0,u=[];for(let f=0;f<r;f++){let v=Math.pow(s,f);u.push(v),i+=v}let m=[0],c=0;for(let f=0;f<r;f++)c+=u[f]/i,m.push(c);return f=>{if(f<=0)return 0;if(f>=1)return 1;for(let v=0;v<r;v++)if(f<=m[v+1]){let M=(f-m[v])/(m[v+1]-m[v]);if(v===0)return M*(2-M);let E=1-Math.pow(n,v);return E+(1-E)*(2*M-1)*(2*M-1)}return 1}}function wt({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),s=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)+1}var ne={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:bt(),elastic:wt()};function Rt(e,t,r){return Math.min(r,Math.max(t,e))}function Le(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return{element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return{element:r,viewport:n}}function Ft(e,t,r,n){switch(n){case"top":return e+r;case"center":return e+r+t/2;case"bottom":return e+r+t;default:return e+r}}function Nt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case"top":return 0;case"center":return t/2;case"bottom":return t;default:return t}}function pe(e,t,r,n){return r===t?0:Rt((e-t)/(r-t)*n,0,1)}function Fe(e,t,r,n,s){let i=Ft(e.top,e.height,t,n.element)-Nt(n.viewport,r),u=Ft(e.top,e.height,t,s.element)-Nt(s.viewport,r);return{tStart:i,tEnd:u}}function rt(e,t,r){let n=e.getBoundingClientRect(),s=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:r==="x"?n.left:n.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function Be(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Ht(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ge(e,t,r){let n=Ht(e),s=Ht(t);return!n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*r)},${Math.round(n[1]+(s[1]-n[1])*r)},${Math.round(n[2]+(s[2]-n[2])*r)})`}var nt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:!1},reveal:{easing:"ease-out",fade:!0,speed:1.2,once:!0},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:!0,speed:.75},spring:{easing:"spring",speed:1.1}};function Q(e,...t){}var pr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",dr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",_t=33;function gr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function yr(e){let t=[];for(let r=0;r<_t;r++){let n=r/(_t-1);t.push(String(Math.round(e(n)*1e5)/1e5))}return`linear(${t.join(",")})`}function ot(e){switch(e){case"linear":return"linear";case"ease-in":return pr;case"ease-out":return dr;case"ease-in-out":return gr()?yr(ne["ease-in-out"]):null;default:return null}}var Vt=Symbol.for("svg-scroll-draw.registry");function zt(){let e=globalThis;return e[Vt]||(e[Vt]=new Map)}function Ce(e,t){zt().set(e,t)}function De(e){zt().delete(e)}var Xe,st=new Set,it=new WeakMap,Qe=new Map,Wt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function hr(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function je(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return()=>{};let r=()=>t();Xe??(Xe=new ResizeObserver(s=>{let i=!1;for(let{target:u}of s)it.get(u)!==Wt(u)&&(i=!0),it.set(u,"");i&&st.forEach(u=>u())})),st.add(r);let n=hr(e);return[document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{it.has(s)||it.set(s,Wt(s)),Qe.set(s,(Qe.get(s)??0)+1),Xe.observe(s)}),()=>{st.delete(r)&&(n.forEach(s=>{let i=(Qe.get(s)??1)-1;if(i)return void Qe.set(s,i);Qe.delete(s),Xe?.unobserve(s)}),st.size||(Xe?.disconnect(),Xe=void 0))}}var br=0;function wr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function qt(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim()}catch{}return r||(e.getAttribute(t)??"").trim()}var Bt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function vr(e){if(!!1)return;let t=qt(e,"stroke");if(!t||t==="none"){Q("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Bt.has(r)&&!Bt.has(qt(e,"fill"))&&Q("Element has a fill \u2014 it may obscure the stroke animation.",e)}function Er(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=r==="x"?window.scrollX:window.scrollY,u=e-i,m=t-i,c=r==="x";n.innerHTML=`
2
2
  <div style="position:absolute;${c?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`}return document.body.appendChild(n),window.addEventListener("scroll",s,{passive:!0}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove()}}}var Bt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Gt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Er(e,t,r){if(!!1)return;let n=(e.match(Gt)??[]).join("").toUpperCase(),s=(t.match(Gt)??[]).join("").toUpperCase(),i=(e.match(Bt)??[]).length,u=(t.match(Bt)??[]).length;if(n!==s){Z(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==u&&Z(`morphTo: coordinate count differs (${i} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r)}function bt(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let u=parseFloat(i),m=n[s++]??u;return String(+(u+(m-u)*r).toFixed(4))})}function at(e,t={}){if(typeof window>"u")return{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...n}=t,s=r?{...nt[r],...n}:n,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:u="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=!1,easing:f="linear",trigger:v={},stagger:M=0,direction:E="forward",once:oe=!1,debug:Te=!1,axis:S="y",scrollContainer:P,autoReverse:d=!1,delay:x=0,strokeColor:T,strokeWidth:I,fillOpacity:J,waypoints:q,velocityScale:se=!1,threshold:le=0,rootMargin:j="0px",repeat:O=0,repeatDelay:Ne=0,morphTo:Y,clip:ye,autoplay:Ae=!1,duration:He=1e3,native:_e=!0,onProgress:de,onStart:K,onComplete:p,onEnter:R,onLeave:Ve,onEnterBack:Ee,onLeaveBack:Me}=s,ie=ye===!0?"left":typeof ye=="string"?ye:!1,he=typeof f=="function"?f:ne[f]??ne.linear,Se=Le(v.start??"top bottom"),ze=Le(v.end??"bottom top"),ce=typeof P=="string"?document.querySelector(P):P??null,ge=Array.isArray(T)?T[0]:null,ee=Array.isArray(T)?T[1]:typeof T=="string"?T:null,_=Array.isArray(I)?I[0]:null,U=Array.isArray(I)?I[1]:typeof I=="number"?I:null,X=Array.isArray(J)?J[0]:null,V=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function Pe(o){let a=o*100;switch(ie){case"right":return`inset(0 0 0 ${100-a}%)`;case"top":return`inset(0 0 ${100-a}% 0)`;case"bottom":return`inset(${100-a}% 0 0 0)`;case"center":return`circle(${o*150}% at 50% 50%)`;default:return`inset(0 ${100-a}% 0 0)`}}let L=ie?[]:Array.from(e.querySelectorAll(u)),$=[],te=[],B=0,ue=0,l=M,h=0,C=!1,F=!1,A=0,G=!1,ae=-1,$e=[],Q=-1,N=!1,me=0,ke=0,Ie,mt=null;function xt(){mt?.destroy(),mt=null}let Oe=new Set,Tt=NaN,Re=!0,Qe=-1,At=performance.now(),We=NaN;function Ze(){return ce?S==="x"?ce.scrollLeft:ce.scrollTop:S==="x"?window.scrollX:window.scrollY}function Mt(){return ce?S==="x"?ce.clientWidth:ce.clientHeight:S==="x"?window.innerWidth:window.innerHeight}function Pt(){let o=rt(e,ce,S);return Fe(o,o.scroll,Mt(),Se,ze)}function er(){let o=ue-B,a=L.length-1,y=ce??document.documentElement,z=S==="x"?"Width":"Height";if(l=M,M>0&&a>0&&o>0){let be=y[`scroll${z}`]-y[`client${z}`]-1-B-o/m;be>=0&&(l=Math.min(M,be/(a*o)))}h=ue+a*l*o}function $t(){({tStart:B,tEnd:ue}=Pt()),er(),Te&&!1&&(xt(),mt=vr(B,ue,S))}function ft(o,a=Pt){Ce(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),De(e)},o}function tr(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),ie){let y=a==="reverse"?1-o:o;e.style.clipPath=Pe(y);return}L.forEach((y,z)=>{y.style.strokeDashoffset=a==="reverse"?`${$[z]*o}`:`${$[z]*(1-o)}`,c&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),ge&&ee?y.style.stroke=Ge(ge,ee,o):ee&&(y.style.stroke=ee),_!==null&&U!==null?y.style.strokeWidth=`${_+(U-_)*o}`:U!==null&&(y.style.strokeWidth=`${U}`),X!==null&&V!==null?y.style.fillOpacity=`${X+(V-X)*o}`:V!==null&&(y.style.fillOpacity=`${V}`),Y&&y.tagName.toLowerCase()==="path"&&te[z]&&y.setAttribute("d",bt(te[z],Y,o))})}function Je(){if(e.style.setProperty("--scroll-draw-progress","0"),ie){e.style.clipPath=Pe(0);return}L.forEach((o,a)=>{o.style.strokeDasharray=`${$[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${$[a]}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ge&&(o.style.stroke=ge),_!==null&&(o.style.strokeWidth=`${_}`),X!==null&&(o.style.fillOpacity=`${X}`),Y&&o.tagName.toLowerCase()==="path"&&te[a]&&o.setAttribute("d",te[a])})}if(L.forEach(o=>{wr(o);let a=Be(o);$.push(a);let y=o.tagName.toLowerCase()==="path";y?te.push(o.getAttribute("d")??""):te.push(""),Y&&(y?Er(te[te.length-1],Y,o):Z(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),ee&&(o.style.stroke=ee),U!==null&&(o.style.strokeWidth=`${U}`),V!==null&&(o.style.fillOpacity=`${V}`),Y&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",Y)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ge&&(o.style.stroke=ge),_!==null&&(o.style.strokeWidth=`${_}`),X!==null&&(o.style.fillOpacity=`${X}`))}),ie){if(i)return e.style.clipPath=Pe(1),p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Pe(0)}else if(i)return p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let kt=typeof f=="string"?ot(f):null;function rr(){return!(_e===!1||!br()||!L.length||!kt||ie||S!=="y"||ce||m!==1||M!==0||oe||d||se!==!1||Y||q||O||x>0||de||K||p||R||Ve||Ee||Me||T!=null||I!=null||J!=null||(v.start??"top bottom").trim()!=="top bottom"||(v.end??"bottom top").trim()!=="bottom top")}function nr(){let o=++hr,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,z=`--svg-scroll-draw-${o}`,be=E==="reverse"?"0":"var(--ssd-len)",xe=E==="reverse"?"var(--ssd-len)":"0",ve=`stroke-dashoffset:${be};`,w=`stroke-dashoffset:${xe};`;c&&(ve+=`opacity:${E==="reverse"?1:0};`,w+=`opacity:${E==="reverse"?0:1};`);let k=document.createElement("style");k.setAttribute("data-svg-scroll-draw",""),k.textContent=`@keyframes ${a}{from{${ve}}to{${w}}}.${y}{view-timeline-name:${z};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${kt};animation-fill-mode:both;animation-timeline:${z};animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(y);function re(g,W){g.style.setProperty("--ssd-len",String($[W])),g.style.strokeDasharray=`${$[W]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a)}L.forEach(re);let b=!1,D=-1;function H(){if(D>=0)return D;let g=e.getBoundingClientRect(),{tStart:W,tEnd:we}=Fe({top:g.top,height:g.height},Ze(),Mt(),Se,ze);return he(pe(Ze(),W,we,m))}return{destroy(){e.classList.remove(y),L.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState=""}),k.remove()},replay(){b=!1,D=-1,L.forEach(re)},pause(){b=!0,L.forEach(g=>{g.style.animationPlayState="paused"})},resume(){b&&(b=!1,L.forEach(g=>{g.style.animationPlayState="running"}))},seek(g){let W=Math.min(1,Math.max(0,g));D=W,b=!0,L.forEach((we,fe)=>{we.classList.remove(a),we.style.strokeDashoffset=E==="reverse"?`${$[fe]*W}`:`${$[fe]*(1-W)}`,c&&(we.style.opacity=E==="reverse"?`${1-W}`:`${W}`)})},getProgress(){return H()},refresh(){L.forEach((g,W)=>{$[W]=Be(g),g.style.setProperty("--ssd-len",String($[W])),g.style.strokeDasharray=`${$[W]}`})}}}if(rr())return ft(nr());function or(){let o=Math.max(1,He),a=0,y=0,z=!1;function be(b){let D=!0;if(ie){let H=Math.min(1,Math.max(0,b/o)),g=he(H);me=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Pe(E==="reverse"?1-g:g),de?.(g),H<1&&(D=!1)}else L.forEach((H,g)=>{let W=g*M*o,we=Math.min(1,Math.max(0,(b-W)/o)),fe=he(we);H.style.strokeDashoffset=E==="reverse"?`${$[g]*fe}`:`${$[g]*(1-fe)}`,c&&(H.style.opacity=E==="reverse"?`${1-fe}`:`${fe}`),ge&&ee?H.style.stroke=Ge(ge,ee,fe):ee&&(H.style.stroke=ee),_!==null&&U!==null?H.style.strokeWidth=`${_+(U-_)*fe}`:U!==null&&(H.style.strokeWidth=`${U}`),X!==null&&V!==null?H.style.fillOpacity=`${X+(V-X)*fe}`:V!==null&&(H.style.fillOpacity=`${V}`),Y&&H.tagName.toLowerCase()==="path"&&te[g]&&H.setAttribute("d",bt(te[g],Y,fe)),g===0&&(me=fe,de?.(fe),e.style.setProperty("--scroll-draw-progress",String(fe))),we<1&&(D=!1)});if(q){let H=Math.min(1,Math.max(0,b/o)),g=he(H);for(let W in q){let we=parseFloat(W);g>=we&&!Oe.has(we)&&(Oe.add(we),q[W]?.())}}return D}function xe(b){if(N)return;let D=b-a;F||(F=!0,K?.());let H=be(D);if(H&&!C){C=!0,be(o*(1+Math.max(0,L.length-1)*M)),p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{a=performance.now(),F=!1,C=!1,Oe.clear(),Je(),A=requestAnimationFrame(xe)},Ne));return}H||(A=requestAnimationFrame(xe))}function ve(){cancelAnimationFrame(A),clearTimeout(Ie),a=performance.now(),y=0,N=!1,F=!1,C=!1,ke=0,z=!0,me=0,Oe.clear(),Je(),A=requestAnimationFrame(xe)}let w=new IntersectionObserver(b=>{b.forEach(D=>{D.isIntersecting&&!(oe&&C)?ve():!D.isIntersecting&&!oe&&!C&&(cancelAnimationFrame(A),clearTimeout(Ie),z=!1)})},{root:ce??null,threshold:le,rootMargin:j}),k;function re(){clearTimeout(k),k=setTimeout(()=>{L.forEach((b,D)=>{$[D]=Be(b),b.style.strokeDasharray=`${$[D]}`})},150)}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),x>0?setTimeout(()=>w.observe(e),x):w.observe(e),{destroy(){cancelAnimationFrame(A),clearTimeout(Ie),w.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(k)},replay(){ke=0,ve()},pause(){N||!z||(N=!0,y=performance.now()-a,cancelAnimationFrame(A))},resume(){N&&(N=!1,z=!0,a=performance.now()-y,A=requestAnimationFrame(xe))},seek(b){let D=Math.min(1,Math.max(0,b));me=D,N=!0,y=D*o,a=performance.now()-y,cancelAnimationFrame(A),be(y)},getProgress(){return me},refresh(){clearTimeout(k),L.forEach((b,D)=>{$[D]=Be(b),b.style.strokeDasharray=`${$[D]}`})}}}if(Ae)return ft(or());$t();function Lt(){if(N||!qe)return;let o=performance.now(),a=Ze();if(!Re&&se===!1&&a===Tt){pt(a);return}Re=!1,Tt=a;let y=m;if(se!==!1){let w=o-At,k=w>0?Math.abs(a-(Qe<0?a:Qe))/w:0;y=m*Math.max(.2,1+k*(typeof se=="number"?se:1)*.04)}Qe=a,At=o;let z=d?Q===-1||a>=Q?"forward":"reverse":E;Q=a;let be=ue-B,xe=!0,ve=be===0?0:(a-B)/be;if(isNaN(We)||(We<=0&&ve>0?R?.():We>0&&ve<=0&&Me?.(),We<1&&ve>=1?Ve?.():We>=1&&ve<1&&Ee?.()),We=ve,ie){let w=he(pe(a,B,ue,y));oe&&!d&&(ae=Math.max(ae,w),w=ae),me=w,e.style.setProperty("--scroll-draw-progress",String(w));let k=z==="reverse"?1-w:w;e.style.clipPath=Pe(k),de?.(w),!F&&pe(a,B,ue,y)>0&&(F=!0,K?.()),w>=1&&!C?(C=!0,p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{ae=-1,F=!1,C=!1,e.style.clipPath=Pe(0)},Ne))):w<1&&!oe&&(C=!1),pt(a);return}if(L.forEach((w,k)=>{let re=k*l*be,b=he(pe(a,B+re,ue+re,y));oe&&!d&&(b=$e[k]=Math.max($e[k]??ae,b)),w.style.strokeDashoffset=z==="reverse"?`${$[k]*b}`:`${$[k]*(1-b)}`,c&&(w.style.opacity=z==="reverse"?`${1-b}`:`${b}`),ge&&ee?w.style.stroke=Ge(ge,ee,b):ee&&(w.style.stroke=ee),_!==null&&U!==null?w.style.strokeWidth=`${_+(U-_)*b}`:U!==null&&(w.style.strokeWidth=`${U}`),X!==null&&V!==null?w.style.fillOpacity=`${X+(V-X)*b}`:V!==null&&(w.style.fillOpacity=`${V}`),Y&&w.tagName.toLowerCase()==="path"&&te[k]&&w.setAttribute("d",bt(te[k],Y,b)),k===0&&(me=b,de?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(xe=!1)}),q){let w=he(pe(a,B,ue,y));for(let k in q){let re=parseFloat(k);w>=re&&!Oe.has(re)&&(Oe.add(re),q[k]?.())}}!F&&pe(a,B,ue,y)>0&&(F=!0,K?.()),xe&&!C?(C=!0,p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{ae=-1,$e=[],F=!1,C=!1,Oe.clear(),Je(),Re=!0},Ne))):!xe&&!oe&&(C=!1),pt(a)}function Ct(o){return o>=ue&&o<h}function pt(o){G||Ct(o)?A=requestAnimationFrame(Lt):qe=!1}let qe=!1;function Ke(){qe||(qe=!0,A=requestAnimationFrame(function(){Lt()}))}function et(){qe=!1,cancelAnimationFrame(A)}let dt=new IntersectionObserver(o=>{o.forEach(a=>{G=a.isIntersecting,G&&!N?(Re=!0,Ke()):qe&&!N&&Ct(Ze())||et()})},{root:ce??null,threshold:le,rootMargin:j});function Dt(){L.forEach((o,a)=>{$[a]=Be(o),o.style.strokeDasharray=`${$[a]}`}),$t(),Re=!0}let tt;function Ye(){clearTimeout(tt),tt=setTimeout(Dt,150)}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let sr=je([e],Ye);return x>0?setTimeout(()=>dt.observe(e),x):dt.observe(e),ft({destroy(){cancelAnimationFrame(A),clearTimeout(Ie),et(),dt.disconnect(),sr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(tt),xt()},replay(){ae=-1,$e=[],Q=-1,Qe=-1,F=!1,C=!1,ke=0,N=!1,me=0,Oe.clear(),clearTimeout(Ie),Je(),Re=!0,G&&Ke()},pause(){N=!0,et()},resume(){N&&(N=!1,Re=!0,G&&Ke())},seek(o){let a=Math.min(1,Math.max(0,o));me=a,ae=a,$e=[],N=!0,et(),tr(a,E),Re=!0},getProgress(){return me},refresh(){clearTimeout(tt),Dt(),G&&!N&&Ke()}},()=>({tStart:B,tEnd:ue}))}function jt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?at(n,t):(Z("Container not found:",e),r)}function Sr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Yt(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let s=[],i=[],u=n[2].trim();if(u)for(let m of u.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"")}t.push({fn:n[1],nums:s,units:i})}return t}function xr(e,t,r){let n=Yt(e),s=Yt(t);return n.length===0||n.length!==s.length?r<1?e:t:n.map((i,u)=>{let m=s[u];return i.fn!==m.fn||i.nums.length!==m.nums.length?r<1?`${i.fn}(${i.nums.map((c,f)=>`${c}${i.units[f]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,f)=>`${c}${m.units[f]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,f)=>`${c+(m.nums[f]-c)*r}${i.units[f]}`).join(", ")})`}).join(" ")}function Ut(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),s=String(t);if(Sr(n))return Ge(n,s,r);if(n.includes("("))return xr(n,s,r);let i=n.match(/^([-+]?[\d.]+)(.*)$/),u=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&u){let m=parseFloat(i[1]),c=parseFloat(u[1]);return`${m+(c-m)*r}${i[2]||u[2]}`}return r<1?n:s}function Tr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Mr=0,Xt="--scroll-draw-progress";function Pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function vt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:s={},easing:i="ease-out",speed:u=1,once:m=!1,axis:c="y",scrollContainer:f,native:v=!0,velocityScale:M=!1,respectReducedMotion:E=!0,triggerElement:oe,onProgress:Te,onComplete:S,onEnter:P,onLeave:d,onEnterBack:x,onLeaveBack:T}=t,I=E&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=typeof i=="function"?i:ne[i]??ne["ease-out"],q=Le(s.start??"top bottom"),se=Le(s.end??"bottom top"),le=oe??e,j=typeof f=="string"?document.querySelector(f):f??null,O=Object.entries(n).map(([l,h])=>({prop:Tr(l),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function Ne(){let l=window.getComputedStyle(e);for(let h of O)h.from===""&&(h.from=l.getPropertyValue(h.prop).trim()||"0")}function Y(){for(let l of O)e.style.setProperty(l.prop,String(l.to))}let ye=new Map;for(let l of[...O.map(h=>h.prop),Xt])ye.set(l,e.style.getPropertyValue(l));function Ae(){for(let[l,h]of ye)h?e.style.setProperty(l,h):e.style.removeProperty(l)}if(I)return Y(),S?.(),{...r,destroy:Ae,getProgress:()=>1};Ne();let He=typeof i=="string"?ot(i):null;function _e(){if(!v||!Pr()||!He||c!=="y"||j||le!==e||m||u!==1||Te||S||P||d||x||T||M!==!1||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return!1;for(let l of O)if(!Ar.has(l.prop))return!1;return!0}function de(){let l=`ssd-a-${++Mr}`,h=O.map(Q=>`${Q.prop}:${Q.from}`).join(";"),C=O.map(Q=>`${Q.prop}:${Q.to}`).join(";"),F=document.createElement("style");F.setAttribute("data-ssd-animate",""),F.textContent=`@keyframes ${l}{from{${h}}to{${C}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${He};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(l);let A=()=>c==="x"?window.scrollX:window.scrollY,G=()=>c==="x"?window.innerWidth:window.innerHeight,ae=()=>{let Q=e.getBoundingClientRect();return Fe({top:Q.top,height:Q.height},A(),G(),q,se)};Ce(e,{type:"animate",getProgress:()=>$e.getProgress(),getTrigger:ae});let $e={refresh(){},destroy(){e.classList.remove(l),F.remove(),e.style.animationPlayState="",Ae(),De(e)},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l)},pause(){e.style.animationPlayState="paused"},resume(){e.style.animationPlayState=""},seek(Q){let N=Math.min(1,Math.max(0,Q));e.classList.remove(l);for(let me of O)e.style.setProperty(me.prop,Ut(me.from,me.to,N))},getProgress(){let{tStart:Q,tEnd:N}=ae();return J(pe(A(),Q,N,u))}};return $e}if(_e())return de();let K=0,p=0,R=0,Ve=!1,Ee=!1,Me=-1,ie=0,he=!1,Se=NaN,ze=-1,ce=0,ge=()=>j?c==="x"?j.scrollLeft:j.scrollTop:c==="x"?window.scrollX:window.scrollY,ee=()=>j?c==="x"?j.clientWidth:j.clientHeight:c==="x"?window.innerWidth:window.innerHeight,_=le===e?O:[],U=!1;function X(){let l=e.style,h=_.map(G=>l.getPropertyValue(G.prop)),C=l.transition;_.length&&(l.transition="none"),_.forEach(G=>l.setProperty(G.prop,ye.get(G.prop)??""));let F=rt(le,j,c);_.forEach((G,ae)=>l.setProperty(G.prop,h[ae])),_.length&&(e.offsetWidth,l.transition=C);let A=Fe(F,F.scroll,ee(),q,se);U&&Math.abs(A.tStart-K)<1&&Math.abs(A.tEnd-p)<1||(U=!0,K=A.tStart,p=A.tEnd)}function V(l){e.style.setProperty(Xt,String(l));for(let h of O)e.style.setProperty(h.prop,Ut(h.from,h.to,l));Te?.(l)}function Pe(l){if(isNaN(Se)){Se=l;return}Se<=0&&l>0?P?.():Se>0&&l<=0&&T?.(),Se<1&&l>=1?d?.():Se>=1&&l<1&&x?.(),Se=l}function L(){if(!Ve||Ee)return;let l=performance.now(),h=ge(),C=u;if(M!==!1){let G=l-ce,ae=G>0?Math.abs(h-(ze<0?h:ze))/G:0;C=u*Math.max(.2,1+ae*(typeof M=="number"?M:1)*.04)}ze=h,ce=l;let F=p===K?0:(h-K)/(p-K);Pe(F);let A=J(pe(h,K,p,C));m&&(Me=Math.max(Me,A),A=Me),ie=A,V(A),A>=1&&!he?(he=!0,S?.()):A<1&&!m&&(he=!1),R=requestAnimationFrame(L)}X(),p===K&&Z("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=J(pe(ge(),K,p,u));m&&l>0&&(Me=l),ie=l,V(l)}let $=new IntersectionObserver(l=>{l.forEach(h=>{Ve=h.isIntersecting,Ve&&!Ee?R=requestAnimationFrame(L):cancelAnimationFrame(R)})},{root:j??null}),te;function B(){clearTimeout(te),te=setTimeout(X,150)}window.addEventListener("resize",B),window.addEventListener("orientationchange",B);let ue=je([le],B);return $.observe(e),Ce(e,{type:"animate",getProgress:()=>ie,getTrigger:()=>({tStart:K,tEnd:p})}),{destroy(){cancelAnimationFrame(R),$.disconnect(),window.removeEventListener("resize",B),window.removeEventListener("orientationchange",B),ue(),clearTimeout(te),Ae(),De(e)},replay(){Me=-1,he=!1,ie=0,Ee=!1,V(0)},pause(){Ee=!0,cancelAnimationFrame(R)},resume(){Ee&&(Ee=!1,Ve&&(R=requestAnimationFrame(L)))},seek(l){let h=Math.min(1,Math.max(0,l));ie=h,Me=h,Ee=!0,cancelAnimationFrame(R),V(h)},getProgress(){return ie},refresh(){X()}}}var lt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,t){if(typeof window>"u")return lt;let r=typeof e=="string"?document.querySelector(e):e;return r?vt(r,t):(Z("scrollAnimate: element not found:",e),lt)}function Zt(e,t={}){if(typeof window>"u")return lt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return Z("scrollParallax: element not found:",e),lt;let{speed:n=.3,axis:s="y",easing:i="linear",trigger:u,onProgress:m}=t,c=-n*100,f=r.style,v=!!r.ownerSVGElement,M=f.getPropertyValue("transform-box");v&&f.setProperty("transform-box","fill-box");let E=vt(r,{props:s==="x"?{transform:["translateX(0%)",`translateX(${c}%)`]}:{transform:["translateY(0%)",`translateY(${c}%)`]},trigger:u??{start:"top bottom",end:"bottom top"},easing:i,native:!1,onProgress:m});return v?{...E,destroy(){E.destroy(),f.setProperty("transform-box",M)}}:E}var Et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,t){if(typeof window>"u")return Et;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return Z("scrollCounter: element not found:",e),Et;let n=r,{from:s=0,to:i,format:u,easing:m="ease-out",trigger:c={},once:f=!0,decimals:v,onComplete:M}=t,E=v!==void 0?p=>p.toFixed(v):u??(p=>String(Math.round(p))),oe=typeof m=="function"?m:ne[m]??ne["ease-out"],Te=Le(c.start??"top 80%"),S=Le(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n.textContent=E(i),M?.(),Et;let d=0,x=0,T=!1,I=0,J=!1,q=!1,se=-1,le=0,j=!1,O=()=>window.scrollY,Ne=()=>window.innerHeight;function Y(){let p=n.getBoundingClientRect(),R=Fe({top:p.top,height:p.height},O(),Ne(),Te,S);T&&Math.abs(R.tStart-d)<1&&Math.abs(R.tEnd-x)<1||(T=!0,d=R.tStart,x=R.tEnd)}function ye(p){n.textContent=E(s+(i-s)*p),n.style.setProperty("--scroll-draw-progress",String(p))}function Ae(){if(!J||q)return;let p=oe(pe(O(),d,x,1));f&&(se=Math.max(se,p),p=se),le=p,ye(p),p>=1&&!j?(j=!0,M?.()):p<1&&!f&&(j=!1),I=requestAnimationFrame(Ae)}Y();{let p=oe(pe(O(),d,x,1));f&&p>0&&(se=p),le=p,ye(p)}let He=new IntersectionObserver(p=>{p.forEach(R=>{J=R.isIntersecting,J&&!q?I=requestAnimationFrame(Ae):cancelAnimationFrame(I)})}),_e;function de(){clearTimeout(_e),_e=setTimeout(Y,150)}window.addEventListener("resize",de),window.addEventListener("orientationchange",de);let K=je([n],de);return He.observe(n),Ce(n,{type:"counter",getProgress:()=>le,getTrigger:()=>({tStart:d,tEnd:x})}),{destroy(){cancelAnimationFrame(I),He.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),K(),clearTimeout(_e),De(n)},replay(){se=-1,j=!1,le=0,q=!1,ye(0)},pause(){q=!0,cancelAnimationFrame(I)},resume(){q&&(q=!1,J&&(I=requestAnimationFrame(Ae)))},seek(p){let R=Math.min(1,Math.max(0,p));le=R,se=R,q=!0,cancelAnimationFrame(I),ye(R)},getProgress(){return le}}}var Kt="http://www.w3.org/2000/svg",$r="cinematic-photo",St=e=>e<0?0:e>1?1:e;function ct(e){let t=parseFloat(e);return Number.isFinite(t)?St(t/100):0}function kr(e){return ne[e]??ne.linear}var Lr={destroy:()=>{},getProgress:()=>0},ut=class{constructor(t){if(typeof document>"u"){this.mount=null;return}this.mount=typeof t.wrapper=="string"?document.querySelector(t.wrapper):t.wrapper,this.mount||Z("Cinematic: wrapper not found:",t.wrapper)}loadStory(t){let r=this.mount;if(typeof window>"u"||!r)return Lr;r.style.position="relative",r.style.height=t.totalHeight,r.style.display="block";let n=document.createElement("div");n.setAttribute("data-cinematic-stage",""),n.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(n);let s=[];for(let S of t.scenes){if(S.background){let d=document.createElement("img");d.id=$r,d.src=S.background,d.alt="",d.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",n.appendChild(d)}let P=S.animations.filter(d=>d.type==="draw");if(P.length){let d=document.createElementNS(Kt,"svg");d.setAttribute("viewBox",`0 0 ${t.canvas.width} ${t.canvas.height}`),d.setAttribute("preserveAspectRatio","xMidYMid meet"),d.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",n.appendChild(d);for(let x of P){let T=document.createElementNS(Kt,"path");T.id=x.target.replace(/^#/,""),T.setAttribute("d",x.d),T.setAttribute("fill","none"),T.setAttribute("stroke",x.stroke),T.setAttribute("stroke-width",String(x.strokeWidth)),T.setAttribute("stroke-linecap","round"),T.setAttribute("stroke-linejoin","round");let I=x.length||T.getTotalLength?.()||0;T.style.strokeDasharray=String(I),T.style.strokeDashoffset=String(I),d.appendChild(T),s.push({kind:"draw",el:T,start:ct(x.start),end:ct(x.end),ease:kr(x.easing),length:I})}}for(let d of S.animations){if(d.type!=="fade")continue;let x=n.querySelector(d.target)??document.querySelector(d.target);x&&(x.style.opacity=String(d.from),s.push({kind:"fade",el:x,start:ct(d.start),end:ct(d.end),ease:ne["ease-in-out"]??ne.linear,from:d.from,to:d.to}))}}let i=0,u=()=>{let S=r.offsetHeight-window.innerHeight;return S<=0?r.getBoundingClientRect().top<=0?1:0:St(-r.getBoundingClientRect().top/S)},m=S=>{for(let P of s){let d=P.end-P.start,x=d<=0?S>=P.end?1:0:St((S-P.start)/d),T=P.ease(x);P.kind==="draw"?P.el.style.strokeDashoffset=String(P.length*(1-T)):P.el.style.opacity=String(P.from+(P.to-P.from)*T)}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return m(1),{destroy:()=>{},getProgress:()=>1};let c=0,f=!1,v=!1,M=()=>{i=u(),m(i),f&&(c=requestAnimationFrame(M))},E=()=>{f||(f=!0,c=requestAnimationFrame(M))},oe=()=>{f=!1,cancelAnimationFrame(c)},Te=new IntersectionObserver(S=>{for(let P of S)v=P.isIntersecting,v?E():oe()},{threshold:0});return Te.observe(n),i=u(),m(i),Ce(r,{type:"draw",getProgress:()=>i,getTrigger:()=>{let S=r.getBoundingClientRect().top+window.scrollY;return{tStart:S,tEnd:S+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){oe(),Te.disconnect(),De(r)},getProgress:()=>i}}};if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class t extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key=""}connectedCallback(){this.build()}attributeChangedCallback(){this.instance&&this.build()}build(){let s=JSON.stringify(e.map(M=>this.getAttribute(M)));if(this.instance&&s===this.key)return;this.instance?.destroy(),this.key=s;let i={},u=this.getAttribute("speed"),m=this.getAttribute("easing"),c=this.getAttribute("stagger"),f=this.getAttribute("direction"),v=this.getAttribute("selector");u&&(i.speed=parseFloat(u)),m&&(i.easing=m),c&&(i.stagger=parseFloat(c)),f&&(i.direction=f),v&&(i.selector=v),this.hasAttribute("fade")&&(i.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(i.once=this.getAttribute("once")!=="false"),this.instance=at(this,i)}disconnectedCallback(){this.instance?.destroy(),this.instance=null}}t.observedAttributes=e,customElements.define("scroll-draw",t)}return mr(Cr);})();
3
+ <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`}return document.body.appendChild(n),window.addEventListener("scroll",s,{passive:!0}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove()}}}var Gt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sr(e,t,r){if(!!1)return;let n=(e.match(jt)??[]).join("").toUpperCase(),s=(t.match(jt)??[]).join("").toUpperCase(),i=(e.match(Gt)??[]).length,u=(t.match(Gt)??[]).length;if(n!==s){Q(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==u&&Q(`morphTo: coordinate count differs (${i} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r)}function vt(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let u=parseFloat(i),m=n[s++]??u;return String(+(u+(m-u)*r).toFixed(4))})}function at(e,t={}){if(typeof window>"u")return{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...n}=t,s=r?{...nt[r],...n}:n,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:u="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=!1,easing:f="linear",trigger:v={},stagger:M=0,direction:E="forward",once:oe=!1,debug:Te=!1,axis:S="y",scrollContainer:P,autoReverse:d=!1,delay:x=0,strokeColor:T,strokeWidth:I,fillOpacity:Z,waypoints:q,velocityScale:se=!1,threshold:le=0,rootMargin:G="0px",repeat:O=0,repeatDelay:Ne=0,morphTo:j,clip:ye,autoplay:Ae=!1,duration:He=1e3,native:_e=!0,onProgress:de,onStart:J,onComplete:p,onEnter:R,onLeave:Ve,onEnterBack:Ee,onLeaveBack:Me}=s,ie=ye===!0?"left":typeof ye=="string"?ye:!1,he=typeof f=="function"?f:ne[f]??ne.linear,Se=Le(v.start??"top bottom"),ze=Le(v.end??"bottom top"),ce=typeof P=="string"?document.querySelector(P):P??null,ge=Array.isArray(T)?T[0]:null,K=Array.isArray(T)?T[1]:typeof T=="string"?T:null,_=Array.isArray(I)?I[0]:null,Y=Array.isArray(I)?I[1]:typeof I=="number"?I:null,U=Array.isArray(Z)?Z[0]:null,V=Array.isArray(Z)?Z[1]:typeof Z=="number"?Z:null;function Pe(o){let a=o*100;switch(ie){case"right":return`inset(0 0 0 ${100-a}%)`;case"top":return`inset(0 0 ${100-a}% 0)`;case"bottom":return`inset(${100-a}% 0 0 0)`;case"center":return`circle(${o*150}% at 50% 50%)`;default:return`inset(0 ${100-a}% 0 0)`}}let L=ie?[]:Array.from(e.querySelectorAll(u)),$=[],ee=[],B=0,ue=0,l=M,h=0,C=!1,F=!1,A=0,te=!1,ae=-1,$e=[],X=-1,N=!1,me=0,ke=0,Ie,mt=null;function At(){mt?.destroy(),mt=null}let Oe=new Set,Mt=NaN,Re=!0,Ze=-1,Pt=performance.now(),We=NaN;function Ye(){return ce?S==="x"?ce.scrollLeft:ce.scrollTop:S==="x"?window.scrollX:window.scrollY}function $t(){return ce?S==="x"?ce.clientWidth:ce.clientHeight:S==="x"?window.innerWidth:window.innerHeight}function kt(){let o=rt(e,ce,S);return Fe(o,o.scroll,$t(),Se,ze)}function tr(){let o=ue-B,a=L.length-1,y=ce??document.documentElement,z=S==="x"?"Width":"Height";if(l=M,M>0&&a>0&&o>0){let be=y[`scroll${z}`]-y[`client${z}`]-1-B-o/m;be>=0&&(l=Math.min(M,be/(a*o)))}h=ue+a*l*o}function Lt(){({tStart:B,tEnd:ue}=kt()),tr(),Te&&!1&&(At(),mt=Er(B,ue,S))}function ft(o,a=kt){Ce(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),De(e)},o}function rr(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),ie){let y=a==="reverse"?1-o:o;e.style.clipPath=Pe(y);return}L.forEach((y,z)=>{y.style.strokeDashoffset=a==="reverse"?`${$[z]*o}`:`${$[z]*(1-o)}`,c&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),ge&&K?y.style.stroke=Ge(ge,K,o):K&&(y.style.stroke=K),_!==null&&Y!==null?y.style.strokeWidth=`${_+(Y-_)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),U!==null&&V!==null?y.style.fillOpacity=`${U+(V-U)*o}`:V!==null&&(y.style.fillOpacity=`${V}`),j&&y.tagName.toLowerCase()==="path"&&ee[z]&&y.setAttribute("d",vt(ee[z],j,o))})}function Je(){if(e.style.setProperty("--scroll-draw-progress","0"),ie){e.style.clipPath=Pe(0);return}L.forEach((o,a)=>{o.style.strokeDasharray=`${$[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${$[a]}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ge&&(o.style.stroke=ge),_!==null&&(o.style.strokeWidth=`${_}`),U!==null&&(o.style.fillOpacity=`${U}`),j&&o.tagName.toLowerCase()==="path"&&ee[a]&&o.setAttribute("d",ee[a])})}if(L.forEach(o=>{vr(o);let a=Be(o);$.push(a);let y=o.tagName.toLowerCase()==="path";y?ee.push(o.getAttribute("d")??""):ee.push(""),j&&(y?Sr(ee[ee.length-1],j,o):Q(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),K&&(o.style.stroke=K),Y!==null&&(o.style.strokeWidth=`${Y}`),V!==null&&(o.style.fillOpacity=`${V}`),j&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",j)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,c?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ge&&(o.style.stroke=ge),_!==null&&(o.style.strokeWidth=`${_}`),U!==null&&(o.style.fillOpacity=`${U}`))}),ie){if(i)return e.style.clipPath=Pe(1),p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Pe(0)}else if(i)return p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Ct=typeof f=="string"?ot(f):null;function nr(){return!(_e===!1||!wr()||!L.length||!Ct||ie||S!=="y"||ce||m!==1||M!==0||oe||d||se!==!1||j||q||O||x>0||de||J||p||R||Ve||Ee||Me||T!=null||I!=null||Z!=null||(v.start??"top bottom").trim()!=="top bottom"||(v.end??"bottom top").trim()!=="bottom top")}function or(){let o=++br,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,z=`--svg-scroll-draw-${o}`,be=E==="reverse"?"0":"var(--ssd-len)",xe=E==="reverse"?"var(--ssd-len)":"0",ve=`stroke-dashoffset:${be};`,w=`stroke-dashoffset:${xe};`;c&&(ve+=`opacity:${E==="reverse"?1:0};`,w+=`opacity:${E==="reverse"?0:1};`);let k=document.createElement("style");k.setAttribute("data-svg-scroll-draw",""),k.textContent=`@keyframes ${a}{from{${ve}}to{${w}}}.${y}{view-timeline-name:${z};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${z};animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(y);function re(g,W){g.style.setProperty("--ssd-len",String($[W])),g.style.strokeDasharray=`${$[W]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a)}L.forEach(re);let b=!1,D=-1;function H(){if(D>=0)return D;let g=e.getBoundingClientRect(),{tStart:W,tEnd:we}=Fe({top:g.top,height:g.height},Ye(),$t(),Se,ze);return he(pe(Ye(),W,we,m))}return{destroy(){e.classList.remove(y),L.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState=""}),k.remove()},replay(){b=!1,D=-1,L.forEach(re)},pause(){b=!0,L.forEach(g=>{g.style.animationPlayState="paused"})},resume(){b&&(b=!1,L.forEach(g=>{g.style.animationPlayState="running"}))},seek(g){let W=Math.min(1,Math.max(0,g));D=W,b=!0,L.forEach((we,fe)=>{we.classList.remove(a),we.style.strokeDashoffset=E==="reverse"?`${$[fe]*W}`:`${$[fe]*(1-W)}`,c&&(we.style.opacity=E==="reverse"?`${1-W}`:`${W}`)})},getProgress(){return H()},refresh(){L.forEach((g,W)=>{$[W]=Be(g),g.style.setProperty("--ssd-len",String($[W])),g.style.strokeDasharray=`${$[W]}`})}}}if(nr())return ft(or());function sr(){let o=Math.max(1,He),a=0,y=0,z=!1;function be(b){let D=!0;if(ie){let H=Math.min(1,Math.max(0,b/o)),g=he(H);me=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Pe(E==="reverse"?1-g:g),de?.(g),H<1&&(D=!1)}else L.forEach((H,g)=>{let W=g*M*o,we=Math.min(1,Math.max(0,(b-W)/o)),fe=he(we);H.style.strokeDashoffset=E==="reverse"?`${$[g]*fe}`:`${$[g]*(1-fe)}`,c&&(H.style.opacity=E==="reverse"?`${1-fe}`:`${fe}`),ge&&K?H.style.stroke=Ge(ge,K,fe):K&&(H.style.stroke=K),_!==null&&Y!==null?H.style.strokeWidth=`${_+(Y-_)*fe}`:Y!==null&&(H.style.strokeWidth=`${Y}`),U!==null&&V!==null?H.style.fillOpacity=`${U+(V-U)*fe}`:V!==null&&(H.style.fillOpacity=`${V}`),j&&H.tagName.toLowerCase()==="path"&&ee[g]&&H.setAttribute("d",vt(ee[g],j,fe)),g===0&&(me=fe,de?.(fe),e.style.setProperty("--scroll-draw-progress",String(fe))),we<1&&(D=!1)});if(q){let H=Math.min(1,Math.max(0,b/o)),g=he(H);for(let W in q){let we=parseFloat(W);g>=we&&!Oe.has(we)&&(Oe.add(we),q[W]?.())}}return D}function xe(b){if(N)return;let D=b-a;F||(F=!0,J?.());let H=be(D);if(H&&!C){C=!0,be(o*(1+Math.max(0,L.length-1)*M)),p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{a=performance.now(),F=!1,C=!1,Oe.clear(),Je(),A=requestAnimationFrame(xe)},Ne));return}H||(A=requestAnimationFrame(xe))}function ve(){cancelAnimationFrame(A),clearTimeout(Ie),a=performance.now(),y=0,N=!1,F=!1,C=!1,ke=0,z=!0,me=0,Oe.clear(),Je(),A=requestAnimationFrame(xe)}let w=new IntersectionObserver(b=>{b.forEach(D=>{D.isIntersecting&&!(oe&&C)?ve():!D.isIntersecting&&!oe&&!C&&(cancelAnimationFrame(A),clearTimeout(Ie),z=!1)})},{root:ce??null,threshold:le,rootMargin:G}),k;function re(){clearTimeout(k),k=setTimeout(()=>{L.forEach((b,D)=>{$[D]=Be(b),b.style.strokeDasharray=`${$[D]}`})},150)}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),x>0?setTimeout(()=>w.observe(e),x):w.observe(e),{destroy(){cancelAnimationFrame(A),clearTimeout(Ie),w.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(k)},replay(){ke=0,ve()},pause(){N||!z||(N=!0,y=performance.now()-a,cancelAnimationFrame(A))},resume(){N&&(N=!1,z=!0,a=performance.now()-y,A=requestAnimationFrame(xe))},seek(b){let D=Math.min(1,Math.max(0,b));me=D,N=!0,y=D*o,a=performance.now()-y,cancelAnimationFrame(A),be(y)},getProgress(){return me},refresh(){clearTimeout(k),L.forEach((b,D)=>{$[D]=Be(b),b.style.strokeDasharray=`${$[D]}`})}}}if(Ae)return ft(sr());Lt();function Dt(){if(N||!qe)return;let o=performance.now(),a=Ye();if(!Re&&se===!1&&a===Mt){dt(a);return}Re=!1,Mt=a;let y=m;if(se!==!1){let w=o-Pt,k=w>0?Math.abs(a-(Ze<0?a:Ze))/w:0;y=m*Math.max(.2,1+k*(typeof se=="number"?se:1)*.04)}Ze=a,Pt=o;let z=d?X===-1||a>=X?"forward":"reverse":E;X=a;let be=ue-B,xe=!0,ve=be===0?0:(a-B)/be;if(isNaN(We)||(We<=0&&ve>0?R?.():We>0&&ve<=0&&Me?.(),We<1&&ve>=1?Ve?.():We>=1&&ve<1&&Ee?.()),We=ve,ie){let w=he(pe(a,B,ue,y));oe&&!d&&(ae=Math.max(ae,w),w=ae),me=w,e.style.setProperty("--scroll-draw-progress",String(w));let k=z==="reverse"?1-w:w;e.style.clipPath=Pe(k),de?.(w),!F&&pe(a,B,ue,y)>0&&(F=!0,J?.()),w>=1&&!C?(C=!0,p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{ae=-1,F=!1,C=!1,e.style.clipPath=Pe(0)},Ne))):w<1&&!oe&&(C=!1),dt(a);return}if(L.forEach((w,k)=>{let re=k*l*be,b=he(pe(a,B+re,ue+re,y));oe&&!d&&(b=$e[k]=Math.max($e[k]??ae,b)),w.style.strokeDashoffset=z==="reverse"?`${$[k]*b}`:`${$[k]*(1-b)}`,c&&(w.style.opacity=z==="reverse"?`${1-b}`:`${b}`),ge&&K?w.style.stroke=Ge(ge,K,b):K&&(w.style.stroke=K),_!==null&&Y!==null?w.style.strokeWidth=`${_+(Y-_)*b}`:Y!==null&&(w.style.strokeWidth=`${Y}`),U!==null&&V!==null?w.style.fillOpacity=`${U+(V-U)*b}`:V!==null&&(w.style.fillOpacity=`${V}`),j&&w.tagName.toLowerCase()==="path"&&ee[k]&&w.setAttribute("d",vt(ee[k],j,b)),k===0&&(me=b,de?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(xe=!1)}),q){let w=he(pe(a,B,ue,y));for(let k in q){let re=parseFloat(k);w>=re&&!Oe.has(re)&&(Oe.add(re),q[k]?.())}}!F&&pe(a,B,ue,y)>0&&(F=!0,J?.()),xe&&!C?(C=!0,p?.(),ke<(O==="infinite"?1/0:O??0)&&(ke++,Ie=setTimeout(()=>{ae=-1,$e=[],F=!1,C=!1,Oe.clear(),Je(),Re=!0},Ne))):!xe&&!oe&&(C=!1),dt(a)}function pt(o){return o>=ue&&o<h}function dt(o){te||pt(o)?A=requestAnimationFrame(Dt):qe=!1}function gt(){return te||pt(Ye())}let qe=!1;function Ke(){qe||(qe=!0,A=requestAnimationFrame(function(){Dt()}))}function et(){qe=!1,cancelAnimationFrame(A)}let yt=new IntersectionObserver(o=>{o.forEach(a=>{te=a.isIntersecting,te&&!N?(Re=!0,Ke()):qe&&!N&&pt(Ye())||et()})},{root:ce??null,threshold:le,rootMargin:G});function It(){L.forEach((o,a)=>{$[a]=Be(o),o.style.strokeDasharray=`${$[a]}`}),Lt(),Re=!0}let tt;function Ue(){clearTimeout(tt),tt=setTimeout(It,150)}window.addEventListener("resize",Ue),window.addEventListener("orientationchange",Ue);let ir=je([e],Ue);return x>0?setTimeout(()=>yt.observe(e),x):yt.observe(e),ft({destroy(){cancelAnimationFrame(A),clearTimeout(Ie),et(),yt.disconnect(),ir(),window.removeEventListener("resize",Ue),window.removeEventListener("orientationchange",Ue),clearTimeout(tt),At()},replay(){ae=-1,$e=[],X=-1,Ze=-1,F=!1,C=!1,ke=0,N=!1,me=0,Oe.clear(),clearTimeout(Ie),Je(),Re=!0,gt()&&Ke()},pause(){N=!0,et()},resume(){N&&(N=!1,Re=!0,gt()&&Ke())},seek(o){let a=Math.min(1,Math.max(0,o));me=a,ae=a,$e=[],N=!0,et(),rr(a,E),Re=!0},getProgress(){return me},refresh(){clearTimeout(tt),It(),gt()&&!N&&Ke()}},()=>({tStart:B,tEnd:ue}))}function Yt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?at(n,t):(Q("Container not found:",e),r)}function xr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ut(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let s=[],i=[],u=n[2].trim();if(u)for(let m of u.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"")}t.push({fn:n[1],nums:s,units:i})}return t}function Tr(e,t,r){let n=Ut(e),s=Ut(t);return n.length===0||n.length!==s.length?r<1?e:t:n.map((i,u)=>{let m=s[u];return i.fn!==m.fn||i.nums.length!==m.nums.length?r<1?`${i.fn}(${i.nums.map((c,f)=>`${c}${i.units[f]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,f)=>`${c}${m.units[f]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,f)=>`${c+(m.nums[f]-c)*r}${i.units[f]}`).join(", ")})`}).join(" ")}function Xt(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),s=String(t);if(xr(n))return Ge(n,s,r);if(n.includes("("))return Tr(n,s,r);let i=n.match(/^([-+]?[\d.]+)(.*)$/),u=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&u){let m=parseFloat(i[1]),c=parseFloat(u[1]);return`${m+(c-m)*r}${i[2]||u[2]}`}return r<1?n:s}function Ar(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Pr=0,Qt="--scroll-draw-progress";function $r(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function St(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:s={},easing:i="ease-out",speed:u=1,once:m=!1,axis:c="y",scrollContainer:f,native:v=!0,velocityScale:M=!1,respectReducedMotion:E=!0,triggerElement:oe,onProgress:Te,onComplete:S,onEnter:P,onLeave:d,onEnterBack:x,onLeaveBack:T}=t,I=E&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,Z=typeof i=="function"?i:ne[i]??ne["ease-out"],q=Le(s.start??"top bottom"),se=Le(s.end??"bottom top"),le=oe??e,G=typeof f=="string"?document.querySelector(f):f??null,O=Object.entries(n).map(([l,h])=>({prop:Ar(l),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function Ne(){let l=window.getComputedStyle(e);for(let h of O)h.from===""&&(h.from=l.getPropertyValue(h.prop).trim()||"0")}function j(){for(let l of O)e.style.setProperty(l.prop,String(l.to))}let ye=new Map;for(let l of[...O.map(h=>h.prop),Qt])ye.set(l,e.style.getPropertyValue(l));function Ae(){for(let[l,h]of ye)h?e.style.setProperty(l,h):e.style.removeProperty(l)}if(I)return j(),S?.(),{...r,destroy:Ae,getProgress:()=>1};Ne();let He=typeof i=="string"?ot(i):null;function _e(){if(!v||!$r()||!He||c!=="y"||G||le!==e||m||u!==1||Te||S||P||d||x||T||M!==!1||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return!1;for(let l of O)if(!Mr.has(l.prop))return!1;return!0}function de(){let l=`ssd-a-${++Pr}`,h=O.map(X=>`${X.prop}:${X.from}`).join(";"),C=O.map(X=>`${X.prop}:${X.to}`).join(";"),F=document.createElement("style");F.setAttribute("data-ssd-animate",""),F.textContent=`@keyframes ${l}{from{${h}}to{${C}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${He};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(l);let A=()=>c==="x"?window.scrollX:window.scrollY,te=()=>c==="x"?window.innerWidth:window.innerHeight,ae=()=>{let X=e.getBoundingClientRect();return Fe({top:X.top,height:X.height},A(),te(),q,se)};Ce(e,{type:"animate",getProgress:()=>$e.getProgress(),getTrigger:ae});let $e={refresh(){},destroy(){e.classList.remove(l),F.remove(),e.style.animationPlayState="",Ae(),De(e)},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l)},pause(){e.style.animationPlayState="paused"},resume(){e.style.animationPlayState=""},seek(X){let N=Math.min(1,Math.max(0,X));e.classList.remove(l);for(let me of O)e.style.setProperty(me.prop,Xt(me.from,me.to,N))},getProgress(){let{tStart:X,tEnd:N}=ae();return Z(pe(A(),X,N,u))}};return $e}if(_e())return de();let J=0,p=0,R=0,Ve=!1,Ee=!1,Me=-1,ie=0,he=!1,Se=NaN,ze=-1,ce=0,ge=()=>G?c==="x"?G.scrollLeft:G.scrollTop:c==="x"?window.scrollX:window.scrollY,K=()=>G?c==="x"?G.clientWidth:G.clientHeight:c==="x"?window.innerWidth:window.innerHeight,_=le===e?O:[],Y=!1;function U(){let l=e.style,h=_.map(te=>l.getPropertyValue(te.prop)),C=l.transition;_.length&&(l.transition="none"),_.forEach(te=>l.setProperty(te.prop,ye.get(te.prop)??""));let F=rt(le,G,c);_.forEach((te,ae)=>l.setProperty(te.prop,h[ae])),_.length&&(e.offsetWidth,l.transition=C);let A=Fe(F,F.scroll,K(),q,se);Y&&Math.abs(A.tStart-J)<1&&Math.abs(A.tEnd-p)<1||(Y=!0,J=A.tStart,p=A.tEnd)}function V(l){e.style.setProperty(Qt,String(l));for(let h of O)e.style.setProperty(h.prop,Xt(h.from,h.to,l));Te?.(l)}function Pe(l){if(isNaN(Se)){Se=l;return}Se<=0&&l>0?P?.():Se>0&&l<=0&&T?.(),Se<1&&l>=1?d?.():Se>=1&&l<1&&x?.(),Se=l}function L(){if(!Ve||Ee)return;let l=performance.now(),h=ge(),C=u;if(M!==!1){let te=l-ce,ae=te>0?Math.abs(h-(ze<0?h:ze))/te:0;C=u*Math.max(.2,1+ae*(typeof M=="number"?M:1)*.04)}ze=h,ce=l;let F=p===J?0:(h-J)/(p-J);Pe(F);let A=Z(pe(h,J,p,C));m&&(Me=Math.max(Me,A),A=Me),ie=A,V(A),A>=1&&!he?(he=!0,S?.()):A<1&&!m&&(he=!1),R=requestAnimationFrame(L)}U(),p===J&&Q("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=Z(pe(ge(),J,p,u));m&&l>0&&(Me=l),ie=l,V(l)}let $=new IntersectionObserver(l=>{l.forEach(h=>{Ve=h.isIntersecting,Ve&&!Ee?R=requestAnimationFrame(L):cancelAnimationFrame(R)})},{root:G??null}),ee;function B(){clearTimeout(ee),ee=setTimeout(U,150)}window.addEventListener("resize",B),window.addEventListener("orientationchange",B);let ue=je([le],B);return $.observe(e),Ce(e,{type:"animate",getProgress:()=>ie,getTrigger:()=>({tStart:J,tEnd:p})}),{destroy(){cancelAnimationFrame(R),$.disconnect(),window.removeEventListener("resize",B),window.removeEventListener("orientationchange",B),ue(),clearTimeout(ee),Ae(),De(e)},replay(){Me=-1,he=!1,ie=0,Ee=!1,V(0)},pause(){Ee=!0,cancelAnimationFrame(R)},resume(){Ee&&(Ee=!1,Ve&&(R=requestAnimationFrame(L)))},seek(l){let h=Math.min(1,Math.max(0,l));ie=h,Me=h,Ee=!0,cancelAnimationFrame(R),V(h)},getProgress(){return ie},refresh(){U()}}}var lt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,t){if(typeof window>"u")return lt;let r=typeof e=="string"?document.querySelector(e):e;return r?St(r,t):(Q("scrollAnimate: element not found:",e),lt)}function Jt(e,t={}){if(typeof window>"u")return lt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return Q("scrollParallax: element not found:",e),lt;let{speed:n=.3,axis:s="y",easing:i="linear",trigger:u,onProgress:m}=t,c=-n*100,f=r.style,v=!!r.ownerSVGElement,M=f.getPropertyValue("transform-box");v&&f.setProperty("transform-box","fill-box");let E=St(r,{props:s==="x"?{transform:["translateX(0%)",`translateX(${c}%)`]}:{transform:["translateY(0%)",`translateY(${c}%)`]},trigger:u??{start:"top bottom",end:"bottom top"},easing:i,native:!1,onProgress:m});return v?{...E,destroy(){E.destroy(),f.setProperty("transform-box",M)}}:E}var xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,t){if(typeof window>"u")return xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return Q("scrollCounter: element not found:",e),xt;let n=r,{from:s=0,to:i,format:u,easing:m="ease-out",trigger:c={},once:f=!0,decimals:v,onComplete:M}=t,E=v!==void 0?p=>p.toFixed(v):u??(p=>String(Math.round(p))),oe=typeof m=="function"?m:ne[m]??ne["ease-out"],Te=Le(c.start??"top 80%"),S=Le(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n.textContent=E(i),M?.(),xt;let d=0,x=0,T=!1,I=0,Z=!1,q=!1,se=-1,le=0,G=!1,O=()=>window.scrollY,Ne=()=>window.innerHeight;function j(){let p=n.getBoundingClientRect(),R=Fe({top:p.top,height:p.height},O(),Ne(),Te,S);T&&Math.abs(R.tStart-d)<1&&Math.abs(R.tEnd-x)<1||(T=!0,d=R.tStart,x=R.tEnd)}function ye(p){n.textContent=E(s+(i-s)*p),n.style.setProperty("--scroll-draw-progress",String(p))}function Ae(){if(!Z||q)return;let p=oe(pe(O(),d,x,1));f&&(se=Math.max(se,p),p=se),le=p,ye(p),p>=1&&!G?(G=!0,M?.()):p<1&&!f&&(G=!1),I=requestAnimationFrame(Ae)}j();{let p=oe(pe(O(),d,x,1));f&&p>0&&(se=p),le=p,ye(p)}let He=new IntersectionObserver(p=>{p.forEach(R=>{Z=R.isIntersecting,Z&&!q?I=requestAnimationFrame(Ae):cancelAnimationFrame(I)})}),_e;function de(){clearTimeout(_e),_e=setTimeout(j,150)}window.addEventListener("resize",de),window.addEventListener("orientationchange",de);let J=je([n],de);return He.observe(n),Ce(n,{type:"counter",getProgress:()=>le,getTrigger:()=>({tStart:d,tEnd:x})}),{destroy(){cancelAnimationFrame(I),He.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),J(),clearTimeout(_e),De(n)},replay(){se=-1,G=!1,le=0,q=!1,ye(0)},pause(){q=!0,cancelAnimationFrame(I)},resume(){q&&(q=!1,Z&&(I=requestAnimationFrame(Ae)))},seek(p){let R=Math.min(1,Math.max(0,p));le=R,se=R,q=!0,cancelAnimationFrame(I),ye(R)},getProgress(){return le}}}var er="http://www.w3.org/2000/svg",kr="cinematic-photo",Tt=e=>e<0?0:e>1?1:e;function ct(e){let t=parseFloat(e);return Number.isFinite(t)?Tt(t/100):0}function Lr(e){return ne[e]??ne.linear}var Cr={destroy:()=>{},getProgress:()=>0},ut=class{constructor(t){if(typeof document>"u"){this.mount=null;return}this.mount=typeof t.wrapper=="string"?document.querySelector(t.wrapper):t.wrapper,this.mount||Q("Cinematic: wrapper not found:",t.wrapper)}loadStory(t){let r=this.mount;if(typeof window>"u"||!r)return Cr;r.style.position="relative",r.style.height=t.totalHeight,r.style.display="block";let n=document.createElement("div");n.setAttribute("data-cinematic-stage",""),n.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(n);let s=[];for(let S of t.scenes){if(S.background){let d=document.createElement("img");d.id=kr,d.src=S.background,d.alt="",d.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",n.appendChild(d)}let P=S.animations.filter(d=>d.type==="draw");if(P.length){let d=document.createElementNS(er,"svg");d.setAttribute("viewBox",`0 0 ${t.canvas.width} ${t.canvas.height}`),d.setAttribute("preserveAspectRatio","xMidYMid meet"),d.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",n.appendChild(d);for(let x of P){let T=document.createElementNS(er,"path");T.id=x.target.replace(/^#/,""),T.setAttribute("d",x.d),T.setAttribute("fill","none"),T.setAttribute("stroke",x.stroke),T.setAttribute("stroke-width",String(x.strokeWidth)),T.setAttribute("stroke-linecap","round"),T.setAttribute("stroke-linejoin","round");let I=x.length||T.getTotalLength?.()||0;T.style.strokeDasharray=String(I),T.style.strokeDashoffset=String(I),d.appendChild(T),s.push({kind:"draw",el:T,start:ct(x.start),end:ct(x.end),ease:Lr(x.easing),length:I})}}for(let d of S.animations){if(d.type!=="fade")continue;let x=n.querySelector(d.target)??document.querySelector(d.target);x&&(x.style.opacity=String(d.from),s.push({kind:"fade",el:x,start:ct(d.start),end:ct(d.end),ease:ne["ease-in-out"]??ne.linear,from:d.from,to:d.to}))}}let i=0,u=()=>{let S=r.offsetHeight-window.innerHeight;return S<=0?r.getBoundingClientRect().top<=0?1:0:Tt(-r.getBoundingClientRect().top/S)},m=S=>{for(let P of s){let d=P.end-P.start,x=d<=0?S>=P.end?1:0:Tt((S-P.start)/d),T=P.ease(x);P.kind==="draw"?P.el.style.strokeDashoffset=String(P.length*(1-T)):P.el.style.opacity=String(P.from+(P.to-P.from)*T)}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return m(1),{destroy:()=>{},getProgress:()=>1};let c=0,f=!1,v=!1,M=()=>{i=u(),m(i),f&&(c=requestAnimationFrame(M))},E=()=>{f||(f=!0,c=requestAnimationFrame(M))},oe=()=>{f=!1,cancelAnimationFrame(c)},Te=new IntersectionObserver(S=>{for(let P of S)v=P.isIntersecting,v?E():oe()},{threshold:0});return Te.observe(n),i=u(),m(i),Ce(r,{type:"draw",getProgress:()=>i,getTrigger:()=>{let S=r.getBoundingClientRect().top+window.scrollY;return{tStart:S,tEnd:S+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){oe(),Te.disconnect(),De(r)},getProgress:()=>i}}};if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class t extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key=""}connectedCallback(){this.build()}attributeChangedCallback(){this.instance&&this.build()}build(){let s=JSON.stringify(e.map(M=>this.getAttribute(M)));if(this.instance&&s===this.key)return;this.instance?.destroy(),this.key=s;let i={},u=this.getAttribute("speed"),m=this.getAttribute("easing"),c=this.getAttribute("stagger"),f=this.getAttribute("direction"),v=this.getAttribute("selector");u&&(i.speed=parseFloat(u)),m&&(i.easing=m),c&&(i.stagger=parseFloat(c)),f&&(i.direction=f),v&&(i.selector=v),this.hasAttribute("fade")&&(i.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(i.once=this.getAttribute("once")!=="false"),this.instance=at(this,i)}disconnectedCallback(){this.instance?.destroy(),this.instance=null}}t.observedAttributes=e,customElements.define("scroll-draw",t)}return fr(Dr);})();
@@ -1 +1 @@
1
- import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-7SBTYJGH.mjs';import {a as a$4}from'./chunk-I45LCJUP.mjs';import {a as a$2}from'./chunk-KHQ7OGQK.mjs';import {a as a$1}from'./chunk-BFX2CSQ3.mjs';import {b as b$2}from'./chunk-LQBXJRFY.mjs';import {defineComponent,ref,h as h$1,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o){let l=null,i=t(),s=()=>{l?.destroy(),l=e.value?o(e.value,b$1(i,()=>i)):null;};onMounted(s),watch(()=>a(i=t()),s),onUnmounted(()=>{l?.destroy(),l=null;});}function B(e={}){let t=ref(null);return r(t,()=>u(e),b$2),t}var g={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},b=[null,Boolean,[Boolean,String],[Boolean,Number]],T=e=>({type:e,default:void 0}),H=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(g).map(([e,t])=>[e,t?T(b[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let l={};for(let i in g){let s=e[i];s!=null&&(l[i]=s);}return l},b$2),()=>h$1("div",{ref:o},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var j=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h$1("div",{ref:o},t.default?.())}});function G(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var h=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:T(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h$1("span",{ref:t})}});function N(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var F=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h$1("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function q(e={}){let t=ref(null);return r(t,()=>u(e),a$4),t}var I=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$4),()=>h$1(e.tag,{ref:o},t.default?.())}});export{B as a,H as b,V as c,j as d,G as e,h as f,N as g,F as h,q as i,I as j};
1
+ import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-7SBTYJGH.mjs';import {a as a$4}from'./chunk-I45LCJUP.mjs';import {a as a$2}from'./chunk-KHQ7OGQK.mjs';import {a as a$1}from'./chunk-BFX2CSQ3.mjs';import {b as b$2}from'./chunk-ENACACPZ.mjs';import {defineComponent,ref,h as h$1,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o){let l=null,i=t(),s=()=>{l?.destroy(),l=e.value?o(e.value,b$1(i,()=>i)):null;};onMounted(s),watch(()=>a(i=t()),s),onUnmounted(()=>{l?.destroy(),l=null;});}function B(e={}){let t=ref(null);return r(t,()=>u(e),b$2),t}var g={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},b=[null,Boolean,[Boolean,String],[Boolean,Number]],T=e=>({type:e,default:void 0}),H=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(g).map(([e,t])=>[e,t?T(b[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let l={};for(let i in g){let s=e[i];s!=null&&(l[i]=s);}return l},b$2),()=>h$1("div",{ref:o},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var j=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h$1("div",{ref:o},t.default?.())}});function G(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var h=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:T(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h$1("span",{ref:t})}});function N(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var F=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h$1("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function q(e={}){let t=ref(null);return r(t,()=>u(e),a$4),t}var I=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$4),()=>h$1(e.tag,{ref:o},t.default?.())}});export{B as a,H as b,V as c,j as d,G as e,h as f,N as g,F as h,q as i,I as j};
@@ -1,3 +1,3 @@
1
- import {b as b$1,a as a$5}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a as a$1}from'./chunk-YZV4Z3EQ.mjs';import {a,d as d$1,c,b as b$3}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var dt={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 Lt=0;function Mt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function yt(r,w){let d="";try{d=getComputedStyle(r).getPropertyValue(w).trim();}catch{}return d||(r.getAttribute(w)??"").trim()}var ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Dt(r){if(!a$3)return;let w=yt(r,"stroke");if(!w||w==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let d=(r.getAttribute("fill")??"").trim();d&&!ht.has(d)&&!ht.has(yt(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function Ct(r,w,d){let b=document.createElement("div");b.setAttribute("data-svg-scroll-draw-debug",""),b.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 W(){let N=d==="x"?window.scrollX:window.scrollY,F=r-N,V=w-N,H=d==="x";b.innerHTML=`
1
+ import {b as b$1,a as a$5}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a as a$1}from'./chunk-YZV4Z3EQ.mjs';import {a,d as d$1,c,b as b$3}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var 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 Mt=0;function Dt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function ht(r,w){let d="";try{d=getComputedStyle(r).getPropertyValue(w).trim();}catch{}return d||(r.getAttribute(w)??"").trim()}var gt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ct(r){if(!a$3)return;let w=ht(r,"stroke");if(!w||w==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let d=(r.getAttribute("fill")??"").trim();d&&!gt.has(d)&&!gt.has(ht(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function Ot(r,w,d){let b=document.createElement("div");b.setAttribute("data-svg-scroll-draw-debug",""),b.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 W(){let N=d==="x"?window.scrollX:window.scrollY,F=r-N,V=w-N,H=d==="x";b.innerHTML=`
2
2
  <div style="position:absolute;${H?`left:${F}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${F}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;${H?`left:${V}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${V}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(b),window.addEventListener("scroll",W,{passive:true}),W(),{el:b,destroy(){window.removeEventListener("scroll",W),b.remove();}}}var gt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Ot(r,w,d){if(!a$3)return;let b$1=(r.match(vt)??[]).join("").toUpperCase(),W=(w.match(vt)??[]).join("").toUpperCase(),N=(r.match(gt)??[]).length,F=(w.match(gt)??[]).length;if(b$1!==W){b(`morphTo: command sequence differs (${b$1||"\u2205"} \u2192 ${W||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,d);return}N!==F&&b(`morphTo: coordinate count differs (${N} \u2192 ${F}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,d);}function Ge(r,w,d){let b=(w.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),W=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,N=>{let F=parseFloat(N),V=b[W++]??F;return String(+(F+(V-F)*d).toFixed(4))})}function _t(r,w={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:d$2,...b$4}=w,W=d$2?{...dt[d$2],...b$4}:b$4,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:F="path, polyline, line, polygon, rect, circle",speed:V=1,fade:H=false,easing:de="linear",trigger:be={},stagger:J=0,direction:y="forward",once:K=false,debug:wt=false,axis:U="y",scrollContainer:Oe,autoReverse:$e=false,delay:ye=0,strokeColor:ee,strokeWidth:te,fillOpacity:re,waypoints:se,velocityScale:he=false,threshold:Be=0,rootMargin:_e="0px",repeat:oe=0,repeatDelay:Ne=0,morphTo:P,clip:Fe,autoplay:bt=false,duration:$t=1e3,native:Et=true,onProgress:ge,onStart:Ee,onComplete:le,onEnter:Ue,onLeave:je,onEnterBack:Xe,onLeaveBack:Ye}=W,j=Fe===true?"left":typeof Fe=="string"?Fe:false,ne=typeof de=="function"?de:d[de]??d.linear,Qe=a(be.start??"top bottom"),Ze=a(be.end??"bottom top"),R=typeof Oe=="string"?document.querySelector(Oe):Oe??null,q=Array.isArray(ee)?ee[0]:null,$=Array.isArray(ee)?ee[1]:typeof ee=="string"?ee:null,S=Array.isArray(te)?te[0]:null,E=Array.isArray(te)?te[1]:typeof te=="number"?te:null,x=Array.isArray(re)?re[0]:null,T=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function ie(e){let t=e*100;switch(j){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let p=j?[]:Array.from(r.querySelectorAll(F)),l=[],L=[],M=0,D=0,Te=J,Je=0,v=false,I=false,A=0,fe=false,X=-1,ve=[],ke=-1,h=false,G=0,_=0,Y,He=null;function Ke(){He?.destroy(),He=null;}let Q=new Set,et=NaN,Z=true,Se=-1,tt=performance.now(),ce=NaN;function xe(){return R?U==="x"?R.scrollLeft:R.scrollTop:U==="x"?window.scrollX:window.scrollY}function rt(){return R?U==="x"?R.clientWidth:R.clientHeight:U==="x"?window.innerWidth:window.innerHeight}function st(){let e=a$2(r,R,U);return c(e,e.scroll,rt(),Qe,Ze)}function Tt(){let e=D-M,t=p.length-1,o=R??document.documentElement,u=U==="x"?"Width":"Height";if(Te=J,J>0&&t>0&&e>0){let C=o[`scroll${u}`]-o[`client${u}`]-1-M-e/V;C>=0&&(Te=Math.min(J,C/(t*e)));}Je=D+t*Te*e;}function ot(){(({tStart:M,tEnd:D}=st())),Tt(),wt&&a$3&&(Ke(),He=Ct(M,D,U));}function Re(e,t=st){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let o=e.destroy;return e.destroy=()=>{o.call(e),b$2(r);},e}function kt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),j){let o=t==="reverse"?1-e:e;r.style.clipPath=ie(o);return}p.forEach((o,u)=>{o.style.strokeDashoffset=t==="reverse"?`${l[u]*e}`:`${l[u]*(1-e)}`,H&&(o.style.opacity=t==="reverse"?`${1-e}`:`${e}`),q&&$?o.style.stroke=a$5(q,$,e):$&&(o.style.stroke=$),S!==null&&E!==null?o.style.strokeWidth=`${S+(E-S)*e}`:E!==null&&(o.style.strokeWidth=`${E}`),x!==null&&T!==null?o.style.fillOpacity=`${x+(T-x)*e}`:T!==null&&(o.style.fillOpacity=`${T}`),P&&o.tagName.toLowerCase()==="path"&&L[u]&&o.setAttribute("d",Ge(L[u],P,e));});}function Ae(){if(r.style.setProperty("--scroll-draw-progress","0"),j){r.style.clipPath=ie(0);return}p.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=y==="reverse"?"0":`${l[t]}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(p.forEach(e=>{Dt(e);let t=a$1(e);l.push(t);let o=e.tagName.toLowerCase()==="path";o?L.push(e.getAttribute("d")??""):L.push(""),P&&(o?Ot(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),N?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?`${t}`:"0",H&&(e.style.opacity="1"),$&&(e.style.stroke=$),E!==null&&(e.style.strokeWidth=`${E}`),T!==null&&(e.style.fillOpacity=`${T}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?"0":`${t}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`));}),j){if(N)return r.style.clipPath=ie(1),le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ie(0);}else if(N)return le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let nt=typeof de=="string"?b$1(de):null;function St(){return !(Et===false||!Mt()||!p.length||!nt||j||U!=="y"||R||V!==1||J!==0||K||$e||he!==false||P||se||oe||ye>0||ge||Ee||le||Ue||je||Xe||Ye||ee!=null||te!=null||re!=null||(be.start??"top bottom").trim()!=="top bottom"||(be.end??"bottom top").trim()!=="bottom top")}function xt(){let e=++Lt,t=`svg-scroll-draw-${e}`,o=`svg-scroll-draw-host-${e}`,u=`--svg-scroll-draw-${e}`,C=y==="reverse"?"0":"var(--ssd-len)",B=y==="reverse"?"var(--ssd-len)":"0",z=`stroke-dashoffset:${C};`,i=`stroke-dashoffset:${B};`;H&&(z+=`opacity:${y==="reverse"?1:0};`,i+=`opacity:${y==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${z}}to{${i}}}.${o}{view-timeline-name:${u};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${nt};animation-fill-mode:both;animation-timeline:${u};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(o);function g(s,m){s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}p.forEach(g);let n=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:m,tEnd:O}=c({top:s.top,height:s.height},xe(),rt(),Qe,Ze);return ne(b$3(xe(),m,O,V))}return {destroy(){r.classList.remove(o),p.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){n=false,f=-1,p.forEach(g);},pause(){n=true,p.forEach(s=>{s.style.animationPlayState="paused";});},resume(){n&&(n=false,p.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let m=Math.min(1,Math.max(0,s));f=m,n=true,p.forEach((O,k)=>{O.classList.remove(t),O.style.strokeDashoffset=y==="reverse"?`${l[k]*m}`:`${l[k]*(1-m)}`,H&&(O.style.opacity=y==="reverse"?`${1-m}`:`${m}`);});},getProgress(){return c$1()},refresh(){p.forEach((s,m)=>{l[m]=a$1(s),s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`;});}}}if(St())return Re(xt());function At(){let e=Math.max(1,$t),t=0,o=0,u=false;function C(n){let f=true;if(j){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);G=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ie(y==="reverse"?1-s:s),ge?.(s),c<1&&(f=false);}else p.forEach((c,s)=>{let m=s*J*e,O=Math.min(1,Math.max(0,(n-m)/e)),k=ne(O);c.style.strokeDashoffset=y==="reverse"?`${l[s]*k}`:`${l[s]*(1-k)}`,H&&(c.style.opacity=y==="reverse"?`${1-k}`:`${k}`),q&&$?c.style.stroke=a$5(q,$,k):$&&(c.style.stroke=$),S!==null&&E!==null?c.style.strokeWidth=`${S+(E-S)*k}`:E!==null&&(c.style.strokeWidth=`${E}`),x!==null&&T!==null?c.style.fillOpacity=`${x+(T-x)*k}`:T!==null&&(c.style.fillOpacity=`${T}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",Ge(L[s],P,k)),s===0&&(G=k,ge?.(k),r.style.setProperty("--scroll-draw-progress",String(k))),O<1&&(f=false);});if(se){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);for(let m in se){let O=parseFloat(m);s>=O&&!Q.has(O)&&(Q.add(O),se[m]?.());}}return f}function B(n){if(h)return;let f=n-t;I||(I=true,Ee?.());let c=C(f);if(c&&!v){v=true,C(e*(1+Math.max(0,p.length-1)*J)),le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{t=performance.now(),I=false,v=false,Q.clear(),Ae(),A=requestAnimationFrame(B);},Ne));return}c||(A=requestAnimationFrame(B));}function z(){cancelAnimationFrame(A),clearTimeout(Y),t=performance.now(),o=0,h=false,I=false,v=false,_=0,u=true,G=0,Q.clear(),Ae(),A=requestAnimationFrame(B);}let i=new IntersectionObserver(n=>{n.forEach(f=>{f.isIntersecting&&!(K&&v)?z():!f.isIntersecting&&!K&&!v&&(cancelAnimationFrame(A),clearTimeout(Y),u=false);});},{root:R??null,threshold:Be,rootMargin:_e}),a;function g(){clearTimeout(a),a=setTimeout(()=>{p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),ye>0?setTimeout(()=>i.observe(r),ye):i.observe(r),{destroy(){cancelAnimationFrame(A),clearTimeout(Y),i.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(a);},replay(){_=0,z();},pause(){h||!u||(h=true,o=performance.now()-t,cancelAnimationFrame(A));},resume(){h&&(h=false,u=true,t=performance.now()-o,A=requestAnimationFrame(B));},seek(n){let f=Math.min(1,Math.max(0,n));G=f,h=true,o=f*e,t=performance.now()-o,cancelAnimationFrame(A),C(o);},getProgress(){return G},refresh(){clearTimeout(a),p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});}}}if(bt)return Re(At());ot();function it(){if(h||!ue)return;let e=performance.now(),t=xe();if(!Z&&he===false&&t===et){Ie(t);return}Z=false,et=t;let o=V;if(he!==false){let i=e-tt,a=i>0?Math.abs(t-(Se<0?t:Se))/i:0;o=V*Math.max(.2,1+a*(typeof he=="number"?he:1)*.04);}Se=t,tt=e;let u=$e?ke===-1||t>=ke?"forward":"reverse":y;ke=t;let C=D-M,B=true,z=C===0?0:(t-M)/C;if(isNaN(ce)||(ce<=0&&z>0?Ue?.():ce>0&&z<=0&&Ye?.(),ce<1&&z>=1?je?.():ce>=1&&z<1&&Xe?.()),ce=z,j){let i=ne(b$3(t,M,D,o));K&&!$e&&(X=Math.max(X,i),i=X),G=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=u==="reverse"?1-i:i;r.style.clipPath=ie(a),ge?.(i),!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),i>=1&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,I=false,v=false,r.style.clipPath=ie(0);},Ne))):i<1&&!K&&(v=false),Ie(t);return}if(p.forEach((i,a)=>{let g=a*Te*C,n=ne(b$3(t,M+g,D+g,o));K&&!$e&&(n=ve[a]=Math.max(ve[a]??X,n)),i.style.strokeDashoffset=u==="reverse"?`${l[a]*n}`:`${l[a]*(1-n)}`,H&&(i.style.opacity=u==="reverse"?`${1-n}`:`${n}`),q&&$?i.style.stroke=a$5(q,$,n):$&&(i.style.stroke=$),S!==null&&E!==null?i.style.strokeWidth=`${S+(E-S)*n}`:E!==null&&(i.style.strokeWidth=`${E}`),x!==null&&T!==null?i.style.fillOpacity=`${x+(T-x)*n}`:T!==null&&(i.style.fillOpacity=`${T}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",Ge(L[a],P,n)),a===0&&(G=n,ge?.(n),r.style.setProperty("--scroll-draw-progress",String(n))),n<1&&(B=false);}),se){let i=ne(b$3(t,M,D,o));for(let a in se){let g=parseFloat(a);i>=g&&!Q.has(g)&&(Q.add(g),se[a]?.());}}!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),B&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,ve=[],I=false,v=false,Q.clear(),Ae(),Z=true;},Ne))):!B&&!K&&(v=false),Ie(t);}function at(e){return e>=D&&e<Je}function Ie(e){fe||at(e)?A=requestAnimationFrame(it):ue=false;}let ue=false;function Pe(){ue||(ue=true,A=requestAnimationFrame(function(){it();}));}function Le(){ue=false,cancelAnimationFrame(A);}let ze=new IntersectionObserver(e=>{e.forEach(t=>{fe=t.isIntersecting,fe&&!h?(Z=true,Pe()):ue&&!h&&at(xe())||Le();});},{root:R??null,threshold:Be,rootMargin:_e});function lt(){p.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),ot(),Z=true;}let Me;function we(){clearTimeout(Me),Me=setTimeout(lt,150);}window.addEventListener("resize",we),window.addEventListener("orientationchange",we);let Pt=d$1([r],we);return ye>0?setTimeout(()=>ze.observe(r),ye):ze.observe(r),Re({destroy(){cancelAnimationFrame(A),clearTimeout(Y),Le(),ze.disconnect(),Pt(),window.removeEventListener("resize",we),window.removeEventListener("orientationchange",we),clearTimeout(Me),Ke();},replay(){X=-1,ve=[],ke=-1,Se=-1,I=false,v=false,_=0,h=false,G=0,Q.clear(),clearTimeout(Y),Ae(),Z=true,fe&&Pe();},pause(){h=true,Le();},resume(){h&&(h=false,Z=true,fe&&Pe());},seek(e){let t=Math.min(1,Math.max(0,e));G=t,X=t,ve=[],h=true,Le(),kt(t,y),Z=true;},getProgress(){return G},refresh(){clearTimeout(Me),lt(),fe&&!h&&Pe();}},()=>({tStart:M,tEnd:D}))}export{dt as a,_t as b};
3
+ <div style="position:absolute;${H?`left:${V}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${V}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(b),window.addEventListener("scroll",W,{passive:true}),W(),{el:b,destroy(){window.removeEventListener("scroll",W),b.remove();}}}var vt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Nt(r,w,d){if(!a$3)return;let b$1=(r.match(wt)??[]).join("").toUpperCase(),W=(w.match(wt)??[]).join("").toUpperCase(),N=(r.match(vt)??[]).length,F=(w.match(vt)??[]).length;if(b$1!==W){b(`morphTo: command sequence differs (${b$1||"\u2205"} \u2192 ${W||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,d);return}N!==F&&b(`morphTo: coordinate count differs (${N} \u2192 ${F}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,d);}function _e(r,w,d){let b=(w.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),W=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,N=>{let F=parseFloat(N),V=b[W++]??F;return String(+(F+(V-F)*d).toFixed(4))})}function Ut(r,w={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:d$2,...b$4}=w,W=d$2?{...yt[d$2],...b$4}:b$4,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:F="path, polyline, line, polygon, rect, circle",speed:V=1,fade:H=false,easing:pe="linear",trigger:be={},stagger:J=0,direction:y="forward",once:K=false,debug:bt=false,axis:U="y",scrollContainer:Oe,autoReverse:$e=false,delay:de=0,strokeColor:ee,strokeWidth:te,fillOpacity:re,waypoints:se,velocityScale:ye=false,threshold:Ue=0,rootMargin:je="0px",repeat:oe=0,repeatDelay:Ne=0,morphTo:P,clip:Fe,autoplay:$t=false,duration:Et=1e3,native:Tt=true,onProgress:he,onStart:Ee,onComplete:le,onEnter:Xe,onLeave:Ye,onEnterBack:Qe,onLeaveBack:Ze}=W,j=Fe===true?"left":typeof Fe=="string"?Fe:false,ne=typeof pe=="function"?pe:d[pe]??d.linear,Je=a(be.start??"top bottom"),Ke=a(be.end??"bottom top"),R=typeof Oe=="string"?document.querySelector(Oe):Oe??null,q=Array.isArray(ee)?ee[0]:null,$=Array.isArray(ee)?ee[1]:typeof ee=="string"?ee:null,S=Array.isArray(te)?te[0]:null,E=Array.isArray(te)?te[1]:typeof te=="number"?te:null,x=Array.isArray(re)?re[0]:null,T=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function ie(e){let t=e*100;switch(j){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let p=j?[]:Array.from(r.querySelectorAll(F)),l=[],L=[],M=0,D=0,Te=J,et=0,v=false,I=false,A=0,ke=false,X=-1,ge=[],Se=-1,h=false,G=0,_=0,Y,He=null;function tt(){He?.destroy(),He=null;}let Q=new Set,rt=NaN,Z=true,xe=-1,st=performance.now(),fe=NaN;function ve(){return R?U==="x"?R.scrollLeft:R.scrollTop:U==="x"?window.scrollX:window.scrollY}function ot(){return R?U==="x"?R.clientWidth:R.clientHeight:U==="x"?window.innerWidth:window.innerHeight}function nt(){let e=a$2(r,R,U);return c(e,e.scroll,ot(),Je,Ke)}function kt(){let e=D-M,t=p.length-1,o=R??document.documentElement,u=U==="x"?"Width":"Height";if(Te=J,J>0&&t>0&&e>0){let C=o[`scroll${u}`]-o[`client${u}`]-1-M-e/V;C>=0&&(Te=Math.min(J,C/(t*e)));}et=D+t*Te*e;}function it(){(({tStart:M,tEnd:D}=nt())),kt(),bt&&a$3&&(tt(),He=Ot(M,D,U));}function Re(e,t=nt){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let o=e.destroy;return e.destroy=()=>{o.call(e),b$2(r);},e}function St(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),j){let o=t==="reverse"?1-e:e;r.style.clipPath=ie(o);return}p.forEach((o,u)=>{o.style.strokeDashoffset=t==="reverse"?`${l[u]*e}`:`${l[u]*(1-e)}`,H&&(o.style.opacity=t==="reverse"?`${1-e}`:`${e}`),q&&$?o.style.stroke=a$5(q,$,e):$&&(o.style.stroke=$),S!==null&&E!==null?o.style.strokeWidth=`${S+(E-S)*e}`:E!==null&&(o.style.strokeWidth=`${E}`),x!==null&&T!==null?o.style.fillOpacity=`${x+(T-x)*e}`:T!==null&&(o.style.fillOpacity=`${T}`),P&&o.tagName.toLowerCase()==="path"&&L[u]&&o.setAttribute("d",_e(L[u],P,e));});}function Ae(){if(r.style.setProperty("--scroll-draw-progress","0"),j){r.style.clipPath=ie(0);return}p.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=y==="reverse"?"0":`${l[t]}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(p.forEach(e=>{Ct(e);let t=a$1(e);l.push(t);let o=e.tagName.toLowerCase()==="path";o?L.push(e.getAttribute("d")??""):L.push(""),P&&(o?Nt(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),N?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?`${t}`:"0",H&&(e.style.opacity="1"),$&&(e.style.stroke=$),E!==null&&(e.style.strokeWidth=`${E}`),T!==null&&(e.style.fillOpacity=`${T}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=y==="reverse"?"0":`${t}`,H?e.style.opacity=y==="reverse"?"1":"0":e.style.opacity="",q&&(e.style.stroke=q),S!==null&&(e.style.strokeWidth=`${S}`),x!==null&&(e.style.fillOpacity=`${x}`));}),j){if(N)return r.style.clipPath=ie(1),le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ie(0);}else if(N)return le?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let at=typeof pe=="string"?b$1(pe):null;function xt(){return !(Tt===false||!Dt()||!p.length||!at||j||U!=="y"||R||V!==1||J!==0||K||$e||ye!==false||P||se||oe||de>0||he||Ee||le||Xe||Ye||Qe||Ze||ee!=null||te!=null||re!=null||(be.start??"top bottom").trim()!=="top bottom"||(be.end??"bottom top").trim()!=="bottom top")}function At(){let e=++Mt,t=`svg-scroll-draw-${e}`,o=`svg-scroll-draw-host-${e}`,u=`--svg-scroll-draw-${e}`,C=y==="reverse"?"0":"var(--ssd-len)",B=y==="reverse"?"var(--ssd-len)":"0",z=`stroke-dashoffset:${C};`,i=`stroke-dashoffset:${B};`;H&&(z+=`opacity:${y==="reverse"?1:0};`,i+=`opacity:${y==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${z}}to{${i}}}.${o}{view-timeline-name:${u};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${at};animation-fill-mode:both;animation-timeline:${u};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(o);function g(s,m){s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}p.forEach(g);let n=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:m,tEnd:O}=c({top:s.top,height:s.height},ve(),ot(),Je,Ke);return ne(b$3(ve(),m,O,V))}return {destroy(){r.classList.remove(o),p.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){n=false,f=-1,p.forEach(g);},pause(){n=true,p.forEach(s=>{s.style.animationPlayState="paused";});},resume(){n&&(n=false,p.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let m=Math.min(1,Math.max(0,s));f=m,n=true,p.forEach((O,k)=>{O.classList.remove(t),O.style.strokeDashoffset=y==="reverse"?`${l[k]*m}`:`${l[k]*(1-m)}`,H&&(O.style.opacity=y==="reverse"?`${1-m}`:`${m}`);});},getProgress(){return c$1()},refresh(){p.forEach((s,m)=>{l[m]=a$1(s),s.style.setProperty("--ssd-len",String(l[m])),s.style.strokeDasharray=`${l[m]}`;});}}}if(xt())return Re(At());function Pt(){let e=Math.max(1,Et),t=0,o=0,u=false;function C(n){let f=true;if(j){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);G=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ie(y==="reverse"?1-s:s),he?.(s),c<1&&(f=false);}else p.forEach((c,s)=>{let m=s*J*e,O=Math.min(1,Math.max(0,(n-m)/e)),k=ne(O);c.style.strokeDashoffset=y==="reverse"?`${l[s]*k}`:`${l[s]*(1-k)}`,H&&(c.style.opacity=y==="reverse"?`${1-k}`:`${k}`),q&&$?c.style.stroke=a$5(q,$,k):$&&(c.style.stroke=$),S!==null&&E!==null?c.style.strokeWidth=`${S+(E-S)*k}`:E!==null&&(c.style.strokeWidth=`${E}`),x!==null&&T!==null?c.style.fillOpacity=`${x+(T-x)*k}`:T!==null&&(c.style.fillOpacity=`${T}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",_e(L[s],P,k)),s===0&&(G=k,he?.(k),r.style.setProperty("--scroll-draw-progress",String(k))),O<1&&(f=false);});if(se){let c=Math.min(1,Math.max(0,n/e)),s=ne(c);for(let m in se){let O=parseFloat(m);s>=O&&!Q.has(O)&&(Q.add(O),se[m]?.());}}return f}function B(n){if(h)return;let f=n-t;I||(I=true,Ee?.());let c=C(f);if(c&&!v){v=true,C(e*(1+Math.max(0,p.length-1)*J)),le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{t=performance.now(),I=false,v=false,Q.clear(),Ae(),A=requestAnimationFrame(B);},Ne));return}c||(A=requestAnimationFrame(B));}function z(){cancelAnimationFrame(A),clearTimeout(Y),t=performance.now(),o=0,h=false,I=false,v=false,_=0,u=true,G=0,Q.clear(),Ae(),A=requestAnimationFrame(B);}let i=new IntersectionObserver(n=>{n.forEach(f=>{f.isIntersecting&&!(K&&v)?z():!f.isIntersecting&&!K&&!v&&(cancelAnimationFrame(A),clearTimeout(Y),u=false);});},{root:R??null,threshold:Ue,rootMargin:je}),a;function g(){clearTimeout(a),a=setTimeout(()=>{p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),de>0?setTimeout(()=>i.observe(r),de):i.observe(r),{destroy(){cancelAnimationFrame(A),clearTimeout(Y),i.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(a);},replay(){_=0,z();},pause(){h||!u||(h=true,o=performance.now()-t,cancelAnimationFrame(A));},resume(){h&&(h=false,u=true,t=performance.now()-o,A=requestAnimationFrame(B));},seek(n){let f=Math.min(1,Math.max(0,n));G=f,h=true,o=f*e,t=performance.now()-o,cancelAnimationFrame(A),C(o);},getProgress(){return G},refresh(){clearTimeout(a),p.forEach((n,f)=>{l[f]=a$1(n),n.style.strokeDasharray=`${l[f]}`;});}}}if($t)return Re(Pt());it();function lt(){if(h||!ce)return;let e=performance.now(),t=ve();if(!Z&&ye===false&&t===rt){ze(t);return}Z=false,rt=t;let o=V;if(ye!==false){let i=e-st,a=i>0?Math.abs(t-(xe<0?t:xe))/i:0;o=V*Math.max(.2,1+a*(typeof ye=="number"?ye:1)*.04);}xe=t,st=e;let u=$e?Se===-1||t>=Se?"forward":"reverse":y;Se=t;let C=D-M,B=true,z=C===0?0:(t-M)/C;if(isNaN(fe)||(fe<=0&&z>0?Xe?.():fe>0&&z<=0&&Ze?.(),fe<1&&z>=1?Ye?.():fe>=1&&z<1&&Qe?.()),fe=z,j){let i=ne(b$3(t,M,D,o));K&&!$e&&(X=Math.max(X,i),i=X),G=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=u==="reverse"?1-i:i;r.style.clipPath=ie(a),he?.(i),!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),i>=1&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,I=false,v=false,r.style.clipPath=ie(0);},Ne))):i<1&&!K&&(v=false),ze(t);return}if(p.forEach((i,a)=>{let g=a*Te*C,n=ne(b$3(t,M+g,D+g,o));K&&!$e&&(n=ge[a]=Math.max(ge[a]??X,n)),i.style.strokeDashoffset=u==="reverse"?`${l[a]*n}`:`${l[a]*(1-n)}`,H&&(i.style.opacity=u==="reverse"?`${1-n}`:`${n}`),q&&$?i.style.stroke=a$5(q,$,n):$&&(i.style.stroke=$),S!==null&&E!==null?i.style.strokeWidth=`${S+(E-S)*n}`:E!==null&&(i.style.strokeWidth=`${E}`),x!==null&&T!==null?i.style.fillOpacity=`${x+(T-x)*n}`:T!==null&&(i.style.fillOpacity=`${T}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",_e(L[a],P,n)),a===0&&(G=n,he?.(n),r.style.setProperty("--scroll-draw-progress",String(n))),n<1&&(B=false);}),se){let i=ne(b$3(t,M,D,o));for(let a in se){let g=parseFloat(a);i>=g&&!Q.has(g)&&(Q.add(g),se[a]?.());}}!I&&b$3(t,M,D,o)>0&&(I=true,Ee?.()),B&&!v?(v=true,le?.(),_<(oe==="infinite"?1/0:oe??0)&&(_++,Y=setTimeout(()=>{X=-1,ge=[],I=false,v=false,Q.clear(),Ae(),Z=true;},Ne))):!B&&!K&&(v=false),ze(t);}function Ie(e){return e>=D&&e<et}function ze(e){ke||Ie(e)?A=requestAnimationFrame(lt):ce=false;}function We(){return ke||Ie(ve())}let ce=false;function Pe(){ce||(ce=true,A=requestAnimationFrame(function(){lt();}));}function Le(){ce=false,cancelAnimationFrame(A);}let Ve=new IntersectionObserver(e=>{e.forEach(t=>{ke=t.isIntersecting,ke&&!h?(Z=true,Pe()):ce&&!h&&Ie(ve())||Le();});},{root:R??null,threshold:Ue,rootMargin:je});function ft(){p.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),it(),Z=true;}let Me;function we(){clearTimeout(Me),Me=setTimeout(ft,150);}window.addEventListener("resize",we),window.addEventListener("orientationchange",we);let Lt=d$1([r],we);return de>0?setTimeout(()=>Ve.observe(r),de):Ve.observe(r),Re({destroy(){cancelAnimationFrame(A),clearTimeout(Y),Le(),Ve.disconnect(),Lt(),window.removeEventListener("resize",we),window.removeEventListener("orientationchange",we),clearTimeout(Me),tt();},replay(){X=-1,ge=[],Se=-1,xe=-1,I=false,v=false,_=0,h=false,G=0,Q.clear(),clearTimeout(Y),Ae(),Z=true,We()&&Pe();},pause(){h=true,Le();},resume(){h&&(h=false,Z=true,We()&&Pe());},seek(e){let t=Math.min(1,Math.max(0,e));G=t,X=t,ge=[],h=true,Le(),St(t,y),Z=true;},getProgress(){return G},refresh(){clearTimeout(Me),ft(),We()&&!h&&Pe();}},()=>({tStart:M,tEnd:D}))}export{yt as a,Ut as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-LQBXJRFY.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
1
+ import {b}from'./chunk-ENACACPZ.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
@@ -1,3 +1,3 @@
1
- 'use strict';function Qt({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),c=0,f=[];for(let y=0;y<r;y++){let $=Math.pow(o,y);f.push($),c+=$;}let i=[0],u=0;for(let y=0;y<r;y++)u+=f[y]/c,i.push(u);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let $=0;$<r;$++)if(y<=i[$+1]){let L=(y-i[$])/(i[$+1]-i[$]);if($===0)return L*(2-L);let w=1-Math.pow(t,$);return w+(1-w)*(2*L-1)*(2*L-1)}return 1}}function Zt({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var $e={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:Qt(),elastic:Zt()};function At(e,n,r){return Math.min(r,Math.max(n,e))}function Ne(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Mt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Lt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ie(e,n,r,t){return r===n?0:At((e-n)/(r-n)*t,0,1)}function Fe(e,n,r,t,o){let c=Mt(e.top,e.height,n,t.element)-Lt(t.viewport,r),f=Mt(e.top,e.height,n,o.element)-Lt(o.viewport,r);return {tStart:c,tEnd:f}}function ot(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function _e(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function kt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,n,r){let t=kt(e),o=kt(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var Dt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function pe(e,...n){qe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Kt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Jt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",It=33;function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function tr(e){let n=[];for(let r=0;r<It;r++){let t=r/(It-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return Kt;case "ease-out":return Jt;case "ease-in-out":return er()?tr($e["ease-in-out"]):null;default:return null}}var Ct=Symbol.for("svg-scroll-draw.registry");function Ot(){let e=globalThis;return e[Ct]||(e[Ct]=new Map)}function Be(e,n){Ot().set(e,n);}function je(e){Ot().delete(e);}var Ue,it=new Set,at=new WeakMap,Xe=new Map,Rt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function rr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function lt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ue??(Ue=new ResizeObserver(o=>{let c=false;for(let{target:f}of o)at.get(f)!==Rt(f)&&(c=true),at.set(f,"");c&&it.forEach(f=>f());})),it.add(r);let t=rr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{at.has(o)||at.set(o,Rt(o)),Xe.set(o,(Xe.get(o)??0)+1),Ue.observe(o);}),()=>{it.delete(r)&&(t.forEach(o=>{let c=(Xe.get(o)??1)-1;if(c)return void Xe.set(o,c);Xe.delete(o),Ue?.unobserve(o);}),it.size||(Ue?.disconnect(),Ue=void 0));}}var nr=0;function or(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Nt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ft=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function sr(e){if(!qe)return;let n=Nt(e,"stroke");if(!n||n==="none"){pe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ft.has(r)&&!Ft.has(Nt(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function ir(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let c=r==="x"?window.scrollX:window.scrollY,f=e-c,i=n-c,u=r==="x";t.innerHTML=`
1
+ 'use strict';function Zt({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),c=0,f=[];for(let y=0;y<r;y++){let $=Math.pow(o,y);f.push($),c+=$;}let i=[0],u=0;for(let y=0;y<r;y++)u+=f[y]/c,i.push(u);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let $=0;$<r;$++)if(y<=i[$+1]){let L=(y-i[$])/(i[$+1]-i[$]);if($===0)return L*(2-L);let w=1-Math.pow(t,$);return w+(1-w)*(2*L-1)*(2*L-1)}return 1}}function Kt({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var $e={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:Zt(),elastic:Kt()};function Mt(e,n,r){return Math.min(r,Math.max(n,e))}function Ne(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Lt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function kt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ie(e,n,r,t){return r===n?0:Mt((e-n)/(r-n)*t,0,1)}function Fe(e,n,r,t,o){let c=Lt(e.top,e.height,n,t.element)-kt(t.viewport,r),f=Lt(e.top,e.height,n,o.element)-kt(o.viewport,r);return {tStart:c,tEnd:f}}function ot(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function _e(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Dt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function He(e,n,r){let t=Dt(e),o=Dt(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var It={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 Be=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function pe(e,...n){Be&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",er="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ct=33;function tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function rr(e){let n=[];for(let r=0;r<Ct;r++){let t=r/(Ct-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return er;case "ease-in-out":return tr()?rr($e["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function Rt(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function je(e,n){Rt().set(e,n);}function Ue(e){Rt().delete(e);}var Xe,it=new Set,at=new WeakMap,Ye=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function nr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function lt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Xe??(Xe=new ResizeObserver(o=>{let c=false;for(let{target:f}of o)at.get(f)!==Nt(f)&&(c=true),at.set(f,"");c&&it.forEach(f=>f());})),it.add(r);let t=nr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{at.has(o)||at.set(o,Nt(o)),Ye.set(o,(Ye.get(o)??0)+1),Xe.observe(o);}),()=>{it.delete(r)&&(t.forEach(o=>{let c=(Ye.get(o)??1)-1;if(c)return void Ye.set(o,c);Ye.delete(o),Xe?.unobserve(o);}),it.size||(Xe?.disconnect(),Xe=void 0));}}var or=0;function sr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ft(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var _t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function ir(e){if(!Be)return;let n=Ft(e,"stroke");if(!n||n==="none"){pe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!_t.has(r)&&!_t.has(Ft(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function ar(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let c=r==="x"?window.scrollX:window.scrollY,f=e-c,i=n-c,u=r==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${u?`left:${f}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${f}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ht=/[MmLlHhVvCcSsQqTtAaZz]/g;function ar(e,n,r){if(!qe)return;let t=(e.match(Ht)??[]).join("").toUpperCase(),o=(n.match(Ht)??[]).join("").toUpperCase(),c=(e.match(_t)??[]).length,f=(n.match(_t)??[]).length;if(t!==o){pe(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}c!==f&&pe(`morphTo: coordinate count differs (${c} \u2192 ${f}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let f=parseFloat(c),i=t[o++]??f;return String(+(f+(i-f)*r).toFixed(4))})}function gt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Dt[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:f="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:y="linear",trigger:$={},stagger:L=0,direction:w="forward",once:de=false,debug:Qe=false,axis:J="y",scrollContainer:Ie,autoReverse:Pe=false,delay:Ee=0,strokeColor:ae,strokeWidth:ge,fillOpacity:oe,waypoints:le,velocityScale:ve=false,threshold:Ae=0,rootMargin:ee="0px",repeat:N=0,repeatDelay:ze=0,morphTo:j,clip:Me,autoplay:We=false,duration:Ze=1e3,native:ct=true,onProgress:Le,onStart:U,onComplete:G,onEnter:ce,onLeave:ke,onEnterBack:ue,onLeaveBack:ye}=o,q=Me===true?"left":typeof Me=="string"?Me:false,te=typeof y=="function"?y:$e[y]??$e.linear,fe=Ne($.start??"top bottom"),Ce=Ne($.end??"bottom top"),X=typeof Ie=="string"?document.querySelector(Ie):Ie??null,K=Array.isArray(ae)?ae[0]:null,V=Array.isArray(ae)?ae[1]:typeof ae=="string"?ae:null,k=Array.isArray(ge)?ge[0]:null,F=Array.isArray(ge)?ge[1]:typeof ge=="number"?ge:null,_=Array.isArray(oe)?oe[0]:null,D=Array.isArray(oe)?oe[1]:typeof oe=="number"?oe:null;function he(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 S=q?[]:Array.from(e.querySelectorAll(f)),E=[],z=[],O=0,Y=0,l=L,d=0,x=false,P=false,b=0,R=false,B=-1,be=[],H=-1,A=false,Q=0,we=0,Se,ut=null;function ht(){ut?.destroy(),ut=null;}let xe=new Set,bt=NaN,Te=true,Ke=-1,wt=performance.now(),Oe=NaN;function Je(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function Et(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function vt(){let s=ot(e,X,J);return Fe(s,s.scroll,Et(),fe,Ce)}function qt(){let s=Y-O,a=S.length-1,p=X??document.documentElement,I=J==="x"?"Width":"Height";if(l=L,L>0&&a>0&&s>0){let re=p[`scroll${I}`]-p[`client${I}`]-1-O-s/i;re>=0&&(l=Math.min(L,re/(a*s)));}d=Y+a*l*s;}function St(){(({tStart:O,tEnd:Y}=vt())),qt(),Qe&&qe&&(ht(),ut=ir(O,Y,J));}function ft(s,a=vt){Be(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let p=s.destroy;return s.destroy=()=>{p.call(s),je(e);},s}function Bt(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),q){let p=a==="reverse"?1-s:s;e.style.clipPath=he(p);return}S.forEach((p,I)=>{p.style.strokeDashoffset=a==="reverse"?`${E[I]*s}`:`${E[I]*(1-s)}`,u&&(p.style.opacity=a==="reverse"?`${1-s}`:`${s}`),K&&V?p.style.stroke=He(K,V,s):V&&(p.style.stroke=V),k!==null&&F!==null?p.style.strokeWidth=`${k+(F-k)*s}`:F!==null&&(p.style.strokeWidth=`${F}`),_!==null&&D!==null?p.style.fillOpacity=`${_+(D-_)*s}`:D!==null&&(p.style.fillOpacity=`${D}`),j&&p.tagName.toLowerCase()==="path"&&z[I]&&p.setAttribute("d",dt(z[I],j,s));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),q){e.style.clipPath=he(0);return}S.forEach((s,a)=>{s.style.strokeDasharray=`${E[a]}`,s.style.strokeDashoffset=w==="reverse"?"0":`${E[a]}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),_!==null&&(s.style.fillOpacity=`${_}`),j&&s.tagName.toLowerCase()==="path"&&z[a]&&s.setAttribute("d",z[a]);});}if(S.forEach(s=>{sr(s);let a=_e(s);E.push(a);let p=s.tagName.toLowerCase()==="path";p?z.push(s.getAttribute("d")??""):z.push(""),j&&(p?ar(z[z.length-1],j,s):pe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?`${a}`:"0",u&&(s.style.opacity="1"),V&&(s.style.stroke=V),F!==null&&(s.style.strokeWidth=`${F}`),D!==null&&(s.style.fillOpacity=`${D}`),j&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",j)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?"0":`${a}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),_!==null&&(s.style.fillOpacity=`${_}`));}),q){if(c)return e.style.clipPath=he(1),G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=he(0);}else if(c)return G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let xt=typeof y=="string"?st(y):null;function jt(){return !(ct===false||!or()||!S.length||!xt||q||J!=="y"||X||i!==1||L!==0||de||Pe||ve!==false||j||le||N||Ee>0||Le||U||G||ce||ke||ue||ye||ae!=null||ge!=null||oe!=null||($.start??"top bottom").trim()!=="top bottom"||($.end??"bottom top").trim()!=="bottom top")}function Ut(){let s=++nr,a=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,I=`--svg-scroll-draw-${s}`,re=w==="reverse"?"0":"var(--ssd-len)",me=w==="reverse"?"var(--ssd-len)":"0",se=`stroke-dashoffset:${re};`,h=`stroke-dashoffset:${me};`;u&&(se+=`opacity:${w==="reverse"?1:0};`,h+=`opacity:${w==="reverse"?0:1};`);let v=document.createElement("style");v.setAttribute("data-svg-scroll-draw",""),v.textContent=`@keyframes ${a}{from{${se}}to{${h}}}.${p}{view-timeline-name:${I};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${I};animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(p);function W(m,C){m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`,m.style.strokeDashoffset="",m.style.opacity="",m.style.animationPlayState="",m.classList.add(a);}S.forEach(W);let g=false,T=-1;function M(){if(T>=0)return T;let m=e.getBoundingClientRect(),{tStart:C,tEnd:ne}=Fe({top:m.top,height:m.height},Je(),Et(),fe,Ce);return te(ie(Je(),C,ne,i))}return {destroy(){e.classList.remove(p),S.forEach(m=>{m.classList.remove(a),m.style.removeProperty("--ssd-len"),m.style.animationPlayState="";}),v.remove();},replay(){g=false,T=-1,S.forEach(W);},pause(){g=true,S.forEach(m=>{m.style.animationPlayState="paused";});},resume(){g&&(g=false,S.forEach(m=>{m.style.animationPlayState="running";}));},seek(m){let C=Math.min(1,Math.max(0,m));T=C,g=true,S.forEach((ne,Z)=>{ne.classList.remove(a),ne.style.strokeDashoffset=w==="reverse"?`${E[Z]*C}`:`${E[Z]*(1-C)}`,u&&(ne.style.opacity=w==="reverse"?`${1-C}`:`${C}`);});},getProgress(){return M()},refresh(){S.forEach((m,C)=>{E[C]=_e(m),m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`;});}}}if(jt())return ft(Ut());function Xt(){let s=Math.max(1,Ze),a=0,p=0,I=false;function re(g){let T=true;if(q){let M=Math.min(1,Math.max(0,g/s)),m=te(M);Q=m,e.style.setProperty("--scroll-draw-progress",String(m)),e.style.clipPath=he(w==="reverse"?1-m:m),Le?.(m),M<1&&(T=false);}else S.forEach((M,m)=>{let C=m*L*s,ne=Math.min(1,Math.max(0,(g-C)/s)),Z=te(ne);M.style.strokeDashoffset=w==="reverse"?`${E[m]*Z}`:`${E[m]*(1-Z)}`,u&&(M.style.opacity=w==="reverse"?`${1-Z}`:`${Z}`),K&&V?M.style.stroke=He(K,V,Z):V&&(M.style.stroke=V),k!==null&&F!==null?M.style.strokeWidth=`${k+(F-k)*Z}`:F!==null&&(M.style.strokeWidth=`${F}`),_!==null&&D!==null?M.style.fillOpacity=`${_+(D-_)*Z}`:D!==null&&(M.style.fillOpacity=`${D}`),j&&M.tagName.toLowerCase()==="path"&&z[m]&&M.setAttribute("d",dt(z[m],j,Z)),m===0&&(Q=Z,Le?.(Z),e.style.setProperty("--scroll-draw-progress",String(Z))),ne<1&&(T=false);});if(le){let M=Math.min(1,Math.max(0,g/s)),m=te(M);for(let C in le){let ne=parseFloat(C);m>=ne&&!xe.has(ne)&&(xe.add(ne),le[C]?.());}}return T}function me(g){if(A)return;let T=g-a;P||(P=true,U?.());let M=re(T);if(M&&!x){x=true,re(s*(1+Math.max(0,S.length-1)*L)),G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{a=performance.now(),P=false,x=false,xe.clear(),et(),b=requestAnimationFrame(me);},ze));return}M||(b=requestAnimationFrame(me));}function se(){cancelAnimationFrame(b),clearTimeout(Se),a=performance.now(),p=0,A=false,P=false,x=false,we=0,I=true,Q=0,xe.clear(),et(),b=requestAnimationFrame(me);}let h=new IntersectionObserver(g=>{g.forEach(T=>{T.isIntersecting&&!(de&&x)?se():!T.isIntersecting&&!de&&!x&&(cancelAnimationFrame(b),clearTimeout(Se),I=false);});},{root:X??null,threshold:Ae,rootMargin:ee}),v;function W(){clearTimeout(v),v=setTimeout(()=>{S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});},150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),Ee>0?setTimeout(()=>h.observe(e),Ee):h.observe(e),{destroy(){cancelAnimationFrame(b),clearTimeout(Se),h.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(v);},replay(){we=0,se();},pause(){A||!I||(A=true,p=performance.now()-a,cancelAnimationFrame(b));},resume(){A&&(A=false,I=true,a=performance.now()-p,b=requestAnimationFrame(me));},seek(g){let T=Math.min(1,Math.max(0,g));Q=T,A=true,p=T*s,a=performance.now()-p,cancelAnimationFrame(b),re(p);},getProgress(){return Q},refresh(){clearTimeout(v),S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});}}}if(We)return ft(Xt());St();function Tt(){if(A||!Re)return;let s=performance.now(),a=Je();if(!Te&&ve===false&&a===bt){mt(a);return}Te=false,bt=a;let p=i;if(ve!==false){let h=s-wt,v=h>0?Math.abs(a-(Ke<0?a:Ke))/h:0;p=i*Math.max(.2,1+v*(typeof ve=="number"?ve:1)*.04);}Ke=a,wt=s;let I=Pe?H===-1||a>=H?"forward":"reverse":w;H=a;let re=Y-O,me=true,se=re===0?0:(a-O)/re;if(isNaN(Oe)||(Oe<=0&&se>0?ce?.():Oe>0&&se<=0&&ye?.(),Oe<1&&se>=1?ke?.():Oe>=1&&se<1&&ue?.()),Oe=se,q){let h=te(ie(a,O,Y,p));de&&!Pe&&(B=Math.max(B,h),h=B),Q=h,e.style.setProperty("--scroll-draw-progress",String(h));let v=I==="reverse"?1-h:h;e.style.clipPath=he(v),Le?.(h),!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),h>=1&&!x?(x=true,G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{B=-1,P=false,x=false,e.style.clipPath=he(0);},ze))):h<1&&!de&&(x=false),mt(a);return}if(S.forEach((h,v)=>{let W=v*l*re,g=te(ie(a,O+W,Y+W,p));de&&!Pe&&(g=be[v]=Math.max(be[v]??B,g)),h.style.strokeDashoffset=I==="reverse"?`${E[v]*g}`:`${E[v]*(1-g)}`,u&&(h.style.opacity=I==="reverse"?`${1-g}`:`${g}`),K&&V?h.style.stroke=He(K,V,g):V&&(h.style.stroke=V),k!==null&&F!==null?h.style.strokeWidth=`${k+(F-k)*g}`:F!==null&&(h.style.strokeWidth=`${F}`),_!==null&&D!==null?h.style.fillOpacity=`${_+(D-_)*g}`:D!==null&&(h.style.fillOpacity=`${D}`),j&&h.tagName.toLowerCase()==="path"&&z[v]&&h.setAttribute("d",dt(z[v],j,g)),v===0&&(Q=g,Le?.(g),e.style.setProperty("--scroll-draw-progress",String(g))),g<1&&(me=false);}),le){let h=te(ie(a,O,Y,p));for(let v in le){let W=parseFloat(v);h>=W&&!xe.has(W)&&(xe.add(W),le[v]?.());}}!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),me&&!x?(x=true,G?.(),we<(N==="infinite"?1/0:N??0)&&(we++,Se=setTimeout(()=>{B=-1,be=[],P=false,x=false,xe.clear(),et(),Te=true;},ze))):!me&&!de&&(x=false),mt(a);}function $t(s){return s>=Y&&s<d}function mt(s){R||$t(s)?b=requestAnimationFrame(Tt):Re=false;}let Re=false;function tt(){Re||(Re=true,b=requestAnimationFrame(function(){Tt();}));}function rt(){Re=false,cancelAnimationFrame(b);}let pt=new IntersectionObserver(s=>{s.forEach(a=>{R=a.isIntersecting,R&&!A?(Te=true,tt()):Re&&!A&&$t(Je())||rt();});},{root:X??null,threshold:Ae,rootMargin:ee});function Pt(){S.forEach((s,a)=>{E[a]=_e(s),s.style.strokeDasharray=`${E[a]}`;}),St(),Te=true;}let nt;function Ge(){clearTimeout(nt),nt=setTimeout(Pt,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let Yt=lt([e],Ge);return Ee>0?setTimeout(()=>pt.observe(e),Ee):pt.observe(e),ft({destroy(){cancelAnimationFrame(b),clearTimeout(Se),rt(),pt.disconnect(),Yt(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(nt),ht();},replay(){B=-1,be=[],H=-1,Ke=-1,P=false,x=false,we=0,A=false,Q=0,xe.clear(),clearTimeout(Se),et(),Te=true,R&&tt();},pause(){A=true,rt();},resume(){A&&(A=false,Te=true,R&&tt());},seek(s){let a=Math.min(1,Math.max(0,s));Q=a,B=a,be=[],A=true,rt(),Bt(a,w),Te=true;},getProgress(){return Q},refresh(){clearTimeout(nt),Pt(),R&&!A&&tt();}},()=>({tStart:O,tEnd:Y}))}function lr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Vt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],f=t[2].trim();if(f)for(let i of f.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function cr(e,n,r){let t=Vt(e),o=Vt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,f)=>{let i=o[f];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,y)=>`${u}${c.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,y)=>`${u}${i.units[y]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,y)=>`${u+(i.nums[y]-u)*r}${c.units[y]}`).join(", ")})`}).join(" ")}function yt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(lr(t))return He(t,o,r);if(t.includes("("))return cr(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),f=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&f){let i=parseFloat(c[1]),u=parseFloat(f[1]);return `${i+(u-i)*r}${c[2]||f[2]}`}return r<1?t:o}function ur(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var fr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),mr=0,zt="--scroll-draw-progress";function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ve(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:f=1,once:i=false,axis:u="y",scrollContainer:y,native:$=true,velocityScale:L=false,respectReducedMotion:w=true,triggerElement:de,onProgress:Qe,onComplete:J,onEnter:Ie,onLeave:Pe,onEnterBack:Ee,onLeaveBack:ae}=n,ge=w&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,oe=typeof c=="function"?c:$e[c]??$e["ease-out"],le=Ne(o.start??"top bottom"),ve=Ne(o.end??"bottom top"),Ae=de??e,ee=typeof y=="string"?document.querySelector(y):y??null,N=Object.entries(t).map(([l,d])=>({prop:ur(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function ze(){let l=window.getComputedStyle(e);for(let d of N)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function j(){for(let l of N)e.style.setProperty(l.prop,String(l.to));}let Me=new Map;for(let l of [...N.map(d=>d.prop),zt])Me.set(l,e.style.getPropertyValue(l));function We(){for(let[l,d]of Me)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if(ge)return j(),J?.(),{...r,destroy:We,getProgress:()=>1};ze();let Ze=typeof c=="string"?st(c):null;function ct(){if(!$||!pr()||!Ze||u!=="y"||ee||Ae!==e||i||f!==1||Qe||J||Ie||Pe||Ee||ae||L!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of N)if(!fr.has(l.prop))return false;return true}function Le(){let l=`ssd-a-${++mr}`,d=N.map(H=>`${H.prop}:${H.from}`).join(";"),x=N.map(H=>`${H.prop}:${H.to}`).join(";"),P=document.createElement("style");P.setAttribute("data-ssd-animate",""),P.textContent=`@keyframes ${l}{from{${d}}to{${x}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Ze};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(P),e.classList.add(l);let b=()=>u==="x"?window.scrollX:window.scrollY,R=()=>u==="x"?window.innerWidth:window.innerHeight,B=()=>{let H=e.getBoundingClientRect();return Fe({top:H.top,height:H.height},b(),R(),le,ve)};Be(e,{type:"animate",getProgress:()=>be.getProgress(),getTrigger:B});let be={refresh(){},destroy(){e.classList.remove(l),P.remove(),e.style.animationPlayState="",We(),je(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(H){let A=Math.min(1,Math.max(0,H));e.classList.remove(l);for(let Q of N)e.style.setProperty(Q.prop,yt(Q.from,Q.to,A));},getProgress(){let{tStart:H,tEnd:A}=B();return oe(ie(b(),H,A,f))}};return be}if(ct())return Le();let U=0,G=0,ce=0,ke=false,ue=false,ye=-1,q=0,te=false,fe=NaN,Ce=-1,X=0,K=()=>ee?u==="x"?ee.scrollLeft:ee.scrollTop:u==="x"?window.scrollX:window.scrollY,V=()=>ee?u==="x"?ee.clientWidth:ee.clientHeight:u==="x"?window.innerWidth:window.innerHeight,k=Ae===e?N:[],F=false;function _(){let l=e.style,d=k.map(R=>l.getPropertyValue(R.prop)),x=l.transition;k.length&&(l.transition="none"),k.forEach(R=>l.setProperty(R.prop,Me.get(R.prop)??""));let P=ot(Ae,ee,u);k.forEach((R,B)=>l.setProperty(R.prop,d[B])),k.length&&(e.offsetWidth,l.transition=x);let b=Fe(P,P.scroll,V(),le,ve);F&&Math.abs(b.tStart-U)<1&&Math.abs(b.tEnd-G)<1||(F=true,U=b.tStart,G=b.tEnd);}function D(l){e.style.setProperty(zt,String(l));for(let d of N)e.style.setProperty(d.prop,yt(d.from,d.to,l));Qe?.(l);}function he(l){if(isNaN(fe)){fe=l;return}fe<=0&&l>0?Ie?.():fe>0&&l<=0&&ae?.(),fe<1&&l>=1?Pe?.():fe>=1&&l<1&&Ee?.(),fe=l;}function S(){if(!ke||ue)return;let l=performance.now(),d=K(),x=f;if(L!==false){let R=l-X,B=R>0?Math.abs(d-(Ce<0?d:Ce))/R:0;x=f*Math.max(.2,1+B*(typeof L=="number"?L:1)*.04);}Ce=d,X=l;let P=G===U?0:(d-U)/(G-U);he(P);let b=oe(ie(d,U,G,x));i&&(ye=Math.max(ye,b),b=ye),q=b,D(b),b>=1&&!te?(te=true,J?.()):b<1&&!i&&(te=false),ce=requestAnimationFrame(S);}_(),G===U&&pe("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=oe(ie(K(),U,G,f));i&&l>0&&(ye=l),q=l,D(l);}let E=new IntersectionObserver(l=>{l.forEach(d=>{ke=d.isIntersecting,ke&&!ue?ce=requestAnimationFrame(S):cancelAnimationFrame(ce);});},{root:ee??null}),z;function O(){clearTimeout(z),z=setTimeout(_,150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let Y=lt([Ae],O);return E.observe(e),Be(e,{type:"animate",getProgress:()=>q,getTrigger:()=>({tStart:U,tEnd:G})}),{destroy(){cancelAnimationFrame(ce),E.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),Y(),clearTimeout(z),We(),je(e);},replay(){ye=-1,te=false,q=0,ue=false,D(0);},pause(){ue=true,cancelAnimationFrame(ce);},resume(){ue&&(ue=false,ke&&(ce=requestAnimationFrame(S)));},seek(l){let d=Math.min(1,Math.max(0,l));q=d,ye=d,ue=true,cancelAnimationFrame(ce),D(d);},getProgress(){return q},refresh(){_();}}}var Wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Gt(e,n={}){if(typeof window>"u")return Wt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return pe("scrollParallax: element not found:",e),Wt;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:f,onProgress:i}=n,u=-t*100,y=r.style,$=!!r.ownerSVGElement,L=y.getPropertyValue("transform-box");$&&y.setProperty("transform-box","fill-box");let w=Ve(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${u}%)`]}:{transform:["translateY(0%)",`translateY(${u}%)`]},trigger:f??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i});return $?{...w,destroy(){w.destroy(),y.setProperty("transform-box",L);}}:w}function Ye(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var De={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jr(e,n={}){if(typeof window>"u")return De;let r=Ye(e).map(t=>gt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function en(e,n={}){if(typeof window>"u")return De;let r=Ye(e);if(r.length===0)return De;let t=0,o=[];function c(i){return gt(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function tn(e,n){if(typeof window>"u")return De;let r=Ye(e).map(t=>Ve(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function rn(e,n){if(typeof window>"u")return De;let r=Ye(e);if(r.length===0)return De;let t=0,o=[];function c(i){return Ve(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function nn(e,n={}){if(typeof window>"u")return De;let r=Ye(e).map(t=>Gt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=tn;exports.scrollAnimateSequence=rn;exports.scrollDrawGroup=Jr;exports.scrollDrawSequence=en;exports.scrollParallaxGroup=nn;
3
+ <div style="position:absolute;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var Ht=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function lr(e,n,r){if(!Be)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),o=(n.match(Vt)??[]).join("").toUpperCase(),c=(e.match(Ht)??[]).length,f=(n.match(Ht)??[]).length;if(t!==o){pe(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}c!==f&&pe(`morphTo: coordinate count differs (${c} \u2192 ${f}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function yt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let f=parseFloat(c),i=t[o++]??f;return String(+(f+(i-f)*r).toFixed(4))})}function ht(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...It[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:f="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:y="linear",trigger:$={},stagger:L=0,direction:w="forward",once:de=false,debug:Ze=false,axis:J="y",scrollContainer:Ie,autoReverse:Pe=false,delay:Ee=0,strokeColor:ae,strokeWidth:ge,fillOpacity:oe,waypoints:le,velocityScale:ve=false,threshold:Ae=0,rootMargin:ee="0px",repeat:R=0,repeatDelay:ze=0,morphTo:j,clip:Me,autoplay:We=false,duration:Ke=1e3,native:ct=true,onProgress:Le,onStart:U,onComplete:G,onEnter:ce,onLeave:ke,onEnterBack:ue,onLeaveBack:ye}=o,q=Me===true?"left":typeof Me=="string"?Me:false,te=typeof y=="function"?y:$e[y]??$e.linear,fe=Ne($.start??"top bottom"),Ce=Ne($.end??"bottom top"),X=typeof Ie=="string"?document.querySelector(Ie):Ie??null,K=Array.isArray(ae)?ae[0]:null,H=Array.isArray(ae)?ae[1]:typeof ae=="string"?ae:null,k=Array.isArray(ge)?ge[0]:null,N=Array.isArray(ge)?ge[1]:typeof ge=="number"?ge:null,F=Array.isArray(oe)?oe[0]:null,D=Array.isArray(oe)?oe[1]:typeof oe=="number"?oe:null;function he(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 S=q?[]:Array.from(e.querySelectorAll(f)),E=[],V=[],O=0,Y=0,l=L,d=0,x=false,P=false,b=0,z=false,B=-1,be=[],_=-1,A=false,Q=0,we=0,Se,ut=null;function wt(){ut?.destroy(),ut=null;}let xe=new Set,Et=NaN,Te=true,Je=-1,vt=performance.now(),Oe=NaN;function Ge(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function St(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function xt(){let s=ot(e,X,J);return Fe(s,s.scroll,St(),fe,Ce)}function Bt(){let s=Y-O,a=S.length-1,p=X??document.documentElement,I=J==="x"?"Width":"Height";if(l=L,L>0&&a>0&&s>0){let re=p[`scroll${I}`]-p[`client${I}`]-1-O-s/i;re>=0&&(l=Math.min(L,re/(a*s)));}d=Y+a*l*s;}function Tt(){(({tStart:O,tEnd:Y}=xt())),Bt(),Ze&&Be&&(wt(),ut=ar(O,Y,J));}function ft(s,a=xt){je(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:a});let p=s.destroy;return s.destroy=()=>{p.call(s),Ue(e);},s}function jt(s,a){if(e.style.setProperty("--scroll-draw-progress",String(s)),q){let p=a==="reverse"?1-s:s;e.style.clipPath=he(p);return}S.forEach((p,I)=>{p.style.strokeDashoffset=a==="reverse"?`${E[I]*s}`:`${E[I]*(1-s)}`,u&&(p.style.opacity=a==="reverse"?`${1-s}`:`${s}`),K&&H?p.style.stroke=He(K,H,s):H&&(p.style.stroke=H),k!==null&&N!==null?p.style.strokeWidth=`${k+(N-k)*s}`:N!==null&&(p.style.strokeWidth=`${N}`),F!==null&&D!==null?p.style.fillOpacity=`${F+(D-F)*s}`:D!==null&&(p.style.fillOpacity=`${D}`),j&&p.tagName.toLowerCase()==="path"&&V[I]&&p.setAttribute("d",yt(V[I],j,s));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),q){e.style.clipPath=he(0);return}S.forEach((s,a)=>{s.style.strokeDasharray=`${E[a]}`,s.style.strokeDashoffset=w==="reverse"?"0":`${E[a]}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),F!==null&&(s.style.fillOpacity=`${F}`),j&&s.tagName.toLowerCase()==="path"&&V[a]&&s.setAttribute("d",V[a]);});}if(S.forEach(s=>{ir(s);let a=_e(s);E.push(a);let p=s.tagName.toLowerCase()==="path";p?V.push(s.getAttribute("d")??""):V.push(""),j&&(p?lr(V[V.length-1],j,s):pe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?`${a}`:"0",u&&(s.style.opacity="1"),H&&(s.style.stroke=H),N!==null&&(s.style.strokeWidth=`${N}`),D!==null&&(s.style.fillOpacity=`${D}`),j&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",j)):(s.style.strokeDasharray=`${a}`,s.style.strokeDashoffset=w==="reverse"?"0":`${a}`,u?s.style.opacity=w==="reverse"?"1":"0":s.style.opacity="",K&&(s.style.stroke=K),k!==null&&(s.style.strokeWidth=`${k}`),F!==null&&(s.style.fillOpacity=`${F}`));}),q){if(c)return e.style.clipPath=he(1),G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=he(0);}else if(c)return G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let $t=typeof y=="string"?st(y):null;function Ut(){return !(ct===false||!sr()||!S.length||!$t||q||J!=="y"||X||i!==1||L!==0||de||Pe||ve!==false||j||le||R||Ee>0||Le||U||G||ce||ke||ue||ye||ae!=null||ge!=null||oe!=null||($.start??"top bottom").trim()!=="top bottom"||($.end??"bottom top").trim()!=="bottom top")}function Xt(){let s=++or,a=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,I=`--svg-scroll-draw-${s}`,re=w==="reverse"?"0":"var(--ssd-len)",me=w==="reverse"?"var(--ssd-len)":"0",se=`stroke-dashoffset:${re};`,h=`stroke-dashoffset:${me};`;u&&(se+=`opacity:${w==="reverse"?1:0};`,h+=`opacity:${w==="reverse"?0:1};`);let v=document.createElement("style");v.setAttribute("data-svg-scroll-draw",""),v.textContent=`@keyframes ${a}{from{${se}}to{${h}}}.${p}{view-timeline-name:${I};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${$t};animation-fill-mode:both;animation-timeline:${I};animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(p);function W(m,C){m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`,m.style.strokeDashoffset="",m.style.opacity="",m.style.animationPlayState="",m.classList.add(a);}S.forEach(W);let g=false,T=-1;function M(){if(T>=0)return T;let m=e.getBoundingClientRect(),{tStart:C,tEnd:ne}=Fe({top:m.top,height:m.height},Ge(),St(),fe,Ce);return te(ie(Ge(),C,ne,i))}return {destroy(){e.classList.remove(p),S.forEach(m=>{m.classList.remove(a),m.style.removeProperty("--ssd-len"),m.style.animationPlayState="";}),v.remove();},replay(){g=false,T=-1,S.forEach(W);},pause(){g=true,S.forEach(m=>{m.style.animationPlayState="paused";});},resume(){g&&(g=false,S.forEach(m=>{m.style.animationPlayState="running";}));},seek(m){let C=Math.min(1,Math.max(0,m));T=C,g=true,S.forEach((ne,Z)=>{ne.classList.remove(a),ne.style.strokeDashoffset=w==="reverse"?`${E[Z]*C}`:`${E[Z]*(1-C)}`,u&&(ne.style.opacity=w==="reverse"?`${1-C}`:`${C}`);});},getProgress(){return M()},refresh(){S.forEach((m,C)=>{E[C]=_e(m),m.style.setProperty("--ssd-len",String(E[C])),m.style.strokeDasharray=`${E[C]}`;});}}}if(Ut())return ft(Xt());function Yt(){let s=Math.max(1,Ke),a=0,p=0,I=false;function re(g){let T=true;if(q){let M=Math.min(1,Math.max(0,g/s)),m=te(M);Q=m,e.style.setProperty("--scroll-draw-progress",String(m)),e.style.clipPath=he(w==="reverse"?1-m:m),Le?.(m),M<1&&(T=false);}else S.forEach((M,m)=>{let C=m*L*s,ne=Math.min(1,Math.max(0,(g-C)/s)),Z=te(ne);M.style.strokeDashoffset=w==="reverse"?`${E[m]*Z}`:`${E[m]*(1-Z)}`,u&&(M.style.opacity=w==="reverse"?`${1-Z}`:`${Z}`),K&&H?M.style.stroke=He(K,H,Z):H&&(M.style.stroke=H),k!==null&&N!==null?M.style.strokeWidth=`${k+(N-k)*Z}`:N!==null&&(M.style.strokeWidth=`${N}`),F!==null&&D!==null?M.style.fillOpacity=`${F+(D-F)*Z}`:D!==null&&(M.style.fillOpacity=`${D}`),j&&M.tagName.toLowerCase()==="path"&&V[m]&&M.setAttribute("d",yt(V[m],j,Z)),m===0&&(Q=Z,Le?.(Z),e.style.setProperty("--scroll-draw-progress",String(Z))),ne<1&&(T=false);});if(le){let M=Math.min(1,Math.max(0,g/s)),m=te(M);for(let C in le){let ne=parseFloat(C);m>=ne&&!xe.has(ne)&&(xe.add(ne),le[C]?.());}}return T}function me(g){if(A)return;let T=g-a;P||(P=true,U?.());let M=re(T);if(M&&!x){x=true,re(s*(1+Math.max(0,S.length-1)*L)),G?.(),we<(R==="infinite"?1/0:R??0)&&(we++,Se=setTimeout(()=>{a=performance.now(),P=false,x=false,xe.clear(),et(),b=requestAnimationFrame(me);},ze));return}M||(b=requestAnimationFrame(me));}function se(){cancelAnimationFrame(b),clearTimeout(Se),a=performance.now(),p=0,A=false,P=false,x=false,we=0,I=true,Q=0,xe.clear(),et(),b=requestAnimationFrame(me);}let h=new IntersectionObserver(g=>{g.forEach(T=>{T.isIntersecting&&!(de&&x)?se():!T.isIntersecting&&!de&&!x&&(cancelAnimationFrame(b),clearTimeout(Se),I=false);});},{root:X??null,threshold:Ae,rootMargin:ee}),v;function W(){clearTimeout(v),v=setTimeout(()=>{S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});},150);}return window.addEventListener("resize",W),window.addEventListener("orientationchange",W),Ee>0?setTimeout(()=>h.observe(e),Ee):h.observe(e),{destroy(){cancelAnimationFrame(b),clearTimeout(Se),h.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),clearTimeout(v);},replay(){we=0,se();},pause(){A||!I||(A=true,p=performance.now()-a,cancelAnimationFrame(b));},resume(){A&&(A=false,I=true,a=performance.now()-p,b=requestAnimationFrame(me));},seek(g){let T=Math.min(1,Math.max(0,g));Q=T,A=true,p=T*s,a=performance.now()-p,cancelAnimationFrame(b),re(p);},getProgress(){return Q},refresh(){clearTimeout(v),S.forEach((g,T)=>{E[T]=_e(g),g.style.strokeDasharray=`${E[T]}`;});}}}if(We)return ft(Yt());Tt();function Pt(){if(A||!Re)return;let s=performance.now(),a=Ge();if(!Te&&ve===false&&a===Et){pt(a);return}Te=false,Et=a;let p=i;if(ve!==false){let h=s-vt,v=h>0?Math.abs(a-(Je<0?a:Je))/h:0;p=i*Math.max(.2,1+v*(typeof ve=="number"?ve:1)*.04);}Je=a,vt=s;let I=Pe?_===-1||a>=_?"forward":"reverse":w;_=a;let re=Y-O,me=true,se=re===0?0:(a-O)/re;if(isNaN(Oe)||(Oe<=0&&se>0?ce?.():Oe>0&&se<=0&&ye?.(),Oe<1&&se>=1?ke?.():Oe>=1&&se<1&&ue?.()),Oe=se,q){let h=te(ie(a,O,Y,p));de&&!Pe&&(B=Math.max(B,h),h=B),Q=h,e.style.setProperty("--scroll-draw-progress",String(h));let v=I==="reverse"?1-h:h;e.style.clipPath=he(v),Le?.(h),!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),h>=1&&!x?(x=true,G?.(),we<(R==="infinite"?1/0:R??0)&&(we++,Se=setTimeout(()=>{B=-1,P=false,x=false,e.style.clipPath=he(0);},ze))):h<1&&!de&&(x=false),pt(a);return}if(S.forEach((h,v)=>{let W=v*l*re,g=te(ie(a,O+W,Y+W,p));de&&!Pe&&(g=be[v]=Math.max(be[v]??B,g)),h.style.strokeDashoffset=I==="reverse"?`${E[v]*g}`:`${E[v]*(1-g)}`,u&&(h.style.opacity=I==="reverse"?`${1-g}`:`${g}`),K&&H?h.style.stroke=He(K,H,g):H&&(h.style.stroke=H),k!==null&&N!==null?h.style.strokeWidth=`${k+(N-k)*g}`:N!==null&&(h.style.strokeWidth=`${N}`),F!==null&&D!==null?h.style.fillOpacity=`${F+(D-F)*g}`:D!==null&&(h.style.fillOpacity=`${D}`),j&&h.tagName.toLowerCase()==="path"&&V[v]&&h.setAttribute("d",yt(V[v],j,g)),v===0&&(Q=g,Le?.(g),e.style.setProperty("--scroll-draw-progress",String(g))),g<1&&(me=false);}),le){let h=te(ie(a,O,Y,p));for(let v in le){let W=parseFloat(v);h>=W&&!xe.has(W)&&(xe.add(W),le[v]?.());}}!P&&ie(a,O,Y,p)>0&&(P=true,U?.()),me&&!x?(x=true,G?.(),we<(R==="infinite"?1/0:R??0)&&(we++,Se=setTimeout(()=>{B=-1,be=[],P=false,x=false,xe.clear(),et(),Te=true;},ze))):!me&&!de&&(x=false),pt(a);}function mt(s){return s>=Y&&s<d}function pt(s){z||mt(s)?b=requestAnimationFrame(Pt):Re=false;}function dt(){return z||mt(Ge())}let Re=false;function tt(){Re||(Re=true,b=requestAnimationFrame(function(){Pt();}));}function rt(){Re=false,cancelAnimationFrame(b);}let gt=new IntersectionObserver(s=>{s.forEach(a=>{z=a.isIntersecting,z&&!A?(Te=true,tt()):Re&&!A&&mt(Ge())||rt();});},{root:X??null,threshold:Ae,rootMargin:ee});function At(){S.forEach((s,a)=>{E[a]=_e(s),s.style.strokeDasharray=`${E[a]}`;}),Tt(),Te=true;}let nt;function qe(){clearTimeout(nt),nt=setTimeout(At,150);}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let Qt=lt([e],qe);return Ee>0?setTimeout(()=>gt.observe(e),Ee):gt.observe(e),ft({destroy(){cancelAnimationFrame(b),clearTimeout(Se),rt(),gt.disconnect(),Qt(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(nt),wt();},replay(){B=-1,be=[],_=-1,Je=-1,P=false,x=false,we=0,A=false,Q=0,xe.clear(),clearTimeout(Se),et(),Te=true,dt()&&tt();},pause(){A=true,rt();},resume(){A&&(A=false,Te=true,dt()&&tt());},seek(s){let a=Math.min(1,Math.max(0,s));Q=a,B=a,be=[],A=true,rt(),jt(a,w),Te=true;},getProgress(){return Q},refresh(){clearTimeout(nt),At(),dt()&&!A&&tt();}},()=>({tStart:O,tEnd:Y}))}function cr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function zt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],f=t[2].trim();if(f)for(let i of f.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function ur(e,n,r){let t=zt(e),o=zt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,f)=>{let i=o[f];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,y)=>`${u}${c.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,y)=>`${u}${i.units[y]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,y)=>`${u+(i.nums[y]-u)*r}${c.units[y]}`).join(", ")})`}).join(" ")}function bt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(cr(t))return He(t,o,r);if(t.includes("("))return ur(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),f=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&f){let i=parseFloat(c[1]),u=parseFloat(f[1]);return `${i+(u-i)*r}${c[2]||f[2]}`}return r<1?t:o}function fr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),pr=0,Wt="--scroll-draw-progress";function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ve(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:f=1,once:i=false,axis:u="y",scrollContainer:y,native:$=true,velocityScale:L=false,respectReducedMotion:w=true,triggerElement:de,onProgress:Ze,onComplete:J,onEnter:Ie,onLeave:Pe,onEnterBack:Ee,onLeaveBack:ae}=n,ge=w&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,oe=typeof c=="function"?c:$e[c]??$e["ease-out"],le=Ne(o.start??"top bottom"),ve=Ne(o.end??"bottom top"),Ae=de??e,ee=typeof y=="string"?document.querySelector(y):y??null,R=Object.entries(t).map(([l,d])=>({prop:fr(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function ze(){let l=window.getComputedStyle(e);for(let d of R)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function j(){for(let l of R)e.style.setProperty(l.prop,String(l.to));}let Me=new Map;for(let l of [...R.map(d=>d.prop),Wt])Me.set(l,e.style.getPropertyValue(l));function We(){for(let[l,d]of Me)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if(ge)return j(),J?.(),{...r,destroy:We,getProgress:()=>1};ze();let Ke=typeof c=="string"?st(c):null;function ct(){if(!$||!dr()||!Ke||u!=="y"||ee||Ae!==e||i||f!==1||Ze||J||Ie||Pe||Ee||ae||L!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of R)if(!mr.has(l.prop))return false;return true}function Le(){let l=`ssd-a-${++pr}`,d=R.map(_=>`${_.prop}:${_.from}`).join(";"),x=R.map(_=>`${_.prop}:${_.to}`).join(";"),P=document.createElement("style");P.setAttribute("data-ssd-animate",""),P.textContent=`@keyframes ${l}{from{${d}}to{${x}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Ke};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(P),e.classList.add(l);let b=()=>u==="x"?window.scrollX:window.scrollY,z=()=>u==="x"?window.innerWidth:window.innerHeight,B=()=>{let _=e.getBoundingClientRect();return Fe({top:_.top,height:_.height},b(),z(),le,ve)};je(e,{type:"animate",getProgress:()=>be.getProgress(),getTrigger:B});let be={refresh(){},destroy(){e.classList.remove(l),P.remove(),e.style.animationPlayState="",We(),Ue(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(_){let A=Math.min(1,Math.max(0,_));e.classList.remove(l);for(let Q of R)e.style.setProperty(Q.prop,bt(Q.from,Q.to,A));},getProgress(){let{tStart:_,tEnd:A}=B();return oe(ie(b(),_,A,f))}};return be}if(ct())return Le();let U=0,G=0,ce=0,ke=false,ue=false,ye=-1,q=0,te=false,fe=NaN,Ce=-1,X=0,K=()=>ee?u==="x"?ee.scrollLeft:ee.scrollTop:u==="x"?window.scrollX:window.scrollY,H=()=>ee?u==="x"?ee.clientWidth:ee.clientHeight:u==="x"?window.innerWidth:window.innerHeight,k=Ae===e?R:[],N=false;function F(){let l=e.style,d=k.map(z=>l.getPropertyValue(z.prop)),x=l.transition;k.length&&(l.transition="none"),k.forEach(z=>l.setProperty(z.prop,Me.get(z.prop)??""));let P=ot(Ae,ee,u);k.forEach((z,B)=>l.setProperty(z.prop,d[B])),k.length&&(e.offsetWidth,l.transition=x);let b=Fe(P,P.scroll,H(),le,ve);N&&Math.abs(b.tStart-U)<1&&Math.abs(b.tEnd-G)<1||(N=true,U=b.tStart,G=b.tEnd);}function D(l){e.style.setProperty(Wt,String(l));for(let d of R)e.style.setProperty(d.prop,bt(d.from,d.to,l));Ze?.(l);}function he(l){if(isNaN(fe)){fe=l;return}fe<=0&&l>0?Ie?.():fe>0&&l<=0&&ae?.(),fe<1&&l>=1?Pe?.():fe>=1&&l<1&&Ee?.(),fe=l;}function S(){if(!ke||ue)return;let l=performance.now(),d=K(),x=f;if(L!==false){let z=l-X,B=z>0?Math.abs(d-(Ce<0?d:Ce))/z:0;x=f*Math.max(.2,1+B*(typeof L=="number"?L:1)*.04);}Ce=d,X=l;let P=G===U?0:(d-U)/(G-U);he(P);let b=oe(ie(d,U,G,x));i&&(ye=Math.max(ye,b),b=ye),q=b,D(b),b>=1&&!te?(te=true,J?.()):b<1&&!i&&(te=false),ce=requestAnimationFrame(S);}F(),G===U&&pe("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=oe(ie(K(),U,G,f));i&&l>0&&(ye=l),q=l,D(l);}let E=new IntersectionObserver(l=>{l.forEach(d=>{ke=d.isIntersecting,ke&&!ue?ce=requestAnimationFrame(S):cancelAnimationFrame(ce);});},{root:ee??null}),V;function O(){clearTimeout(V),V=setTimeout(F,150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let Y=lt([Ae],O);return E.observe(e),je(e,{type:"animate",getProgress:()=>q,getTrigger:()=>({tStart:U,tEnd:G})}),{destroy(){cancelAnimationFrame(ce),E.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),Y(),clearTimeout(V),We(),Ue(e);},replay(){ye=-1,te=false,q=0,ue=false,D(0);},pause(){ue=true,cancelAnimationFrame(ce);},resume(){ue&&(ue=false,ke&&(ce=requestAnimationFrame(S)));},seek(l){let d=Math.min(1,Math.max(0,l));q=d,ye=d,ue=true,cancelAnimationFrame(ce),D(d);},getProgress(){return q},refresh(){F();}}}var Gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function qt(e,n={}){if(typeof window>"u")return Gt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return pe("scrollParallax: element not found:",e),Gt;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:f,onProgress:i}=n,u=-t*100,y=r.style,$=!!r.ownerSVGElement,L=y.getPropertyValue("transform-box");$&&y.setProperty("transform-box","fill-box");let w=Ve(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${u}%)`]}:{transform:["translateY(0%)",`translateY(${u}%)`]},trigger:f??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i});return $?{...w,destroy(){w.destroy(),y.setProperty("transform-box",L);}}:w}function Qe(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var De={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function en(e,n={}){if(typeof window>"u")return De;let r=Qe(e).map(t=>ht(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function tn(e,n={}){if(typeof window>"u")return De;let r=Qe(e);if(r.length===0)return De;let t=0,o=[];function c(i){return ht(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function rn(e,n){if(typeof window>"u")return De;let r=Qe(e).map(t=>Ve(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function nn(e,n){if(typeof window>"u")return De;let r=Qe(e);if(r.length===0)return De;let t=0,o=[];function c(i){return Ve(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function f(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return f(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,f();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function on(e,n={}){if(typeof window>"u")return De;let r=Qe(e).map(t=>qt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=rn;exports.scrollAnimateSequence=nn;exports.scrollDrawGroup=en;exports.scrollDrawSequence=tn;exports.scrollParallaxGroup=on;
@@ -1 +1 @@
1
- import {b as b$1}from'../chunk-MTEGM4RR.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
1
+ import {b as b$1}from'../chunk-MTEGM4RR.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};