animejs 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -47
- package/lib/anime.cjs +2 -2
- package/lib/anime.esm.js +860 -233
- package/lib/anime.esm.min.js +2 -2
- package/lib/anime.iife.js +2 -2
- package/lib/anime.iife.min.js +2 -2
- package/lib/anime.min.cjs +2 -2
- package/lib/anime.umd.js +2 -2
- package/lib/anime.umd.min.js +2 -2
- package/lib/gui/index.js +6341 -0
- package/package.json +1 -1
- package/types/index.d.ts +176 -117
- package/types/index.js +691 -158
package/lib/anime.esm.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* anime.js - ESM
|
|
3
|
-
* @version v4.0
|
|
3
|
+
* @version v4.1.0
|
|
4
4
|
* @author Julian Garnier
|
|
5
5
|
* @license MIT
|
|
6
6
|
* @copyright (c) 2025 Julian Garnier
|
|
7
7
|
* @see https://animejs.com
|
|
8
8
|
*/
|
|
9
|
-
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={replace:0,none:1,blend:2},r=Symbol(),n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),c=1e-11,d=1e12,u=1e3,p="",m=new Map;m.set("x","translateX"),m.set("y","translateY"),m.set("z","translateZ");const f=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],g=f.reduce(((t,e)=>({...t,[e]:e+"("})),{}),_=()=>{},y=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,v=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,b=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,S=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,x=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,T=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,w=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,k=/([a-z])([A-Z])/g,$=/(\w+)(\([^)]+\)+)/g,E=/(\*=|\+=|-=)/,C={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:u,delay:0,loopDelay:0,ease:"out(2)",composition:i.replace,modifier:t=>t,onBegin:_,onBeforeUpdate:_,onUpdate:_,onLoop:_,onPause:_,onComplete:_,onRender:_},B={defaults:C,root:s,scope:null,precision:4,timeScale:1,tickThreshold:200},D={version:"4.0.2",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(D));const L=t=>t.replace(k,"$1-$2").toLowerCase(),N=(t,e)=>0===t.indexOf(e),A=Date.now,F=Array.isArray,P=t=>t&&t.constructor===Object,R=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,X=t=>"function"==typeof t,M=t=>void 0===t,z=t=>M(t)||null===t,O=e=>t&&e instanceof SVGElement,I=t=>y.test(t),W=t=>N(t,"rgb"),V=t=>N(t,"hsl"),U=t=>!B.defaults.hasOwnProperty(t),H=t=>Y(t)?parseFloat(t):t,q=Math.pow,Q=Math.sqrt,j=Math.sin,G=Math.cos,Z=Math.abs,J=Math.exp,K=Math.ceil,tt=Math.floor,et=Math.asin,st=Math.max,it=Math.atan2,rt=Math.PI,nt=Math.round,ot=(t,e,s)=>t<e?e:t>s?s:t,at={},ht=(t,e)=>{if(e<0)return t;if(!e)return nt(t);let s=at[e];return s||(s=at[e]=10**e),nt(t*s)/s},lt=(t,e)=>F(e)?e.reduce(((e,s)=>Z(s-t)<Z(e-t)?s:e)):e?nt(t/e)*e:t,ct=(t,e,s)=>t+(e-t)*s,dt=t=>t===1/0?d:t===-1/0?-1e12:t,ut=t=>t<=c?c:dt(ht(t,11)),pt=t=>F(t)?[...t]:t,mt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=M(r)?e[i]:r}return s},ft=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},gt=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},_t=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o};class yt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=ht(u/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<c?c:s,r=ht(u/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<c?c:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const vt=(t,e,s,r,n)=>{const o=t.parent,h=t.duration,l=t.completed,d=t.iterationDuration,u=t.iterationCount,m=t._currentIteration,f=t._loopDelay,_=t._reversed,y=t._alternate,v=t._hasChildren,b=t._delay,S=t._currentTime,x=b+d,T=e-b,w=ot(S,-b,h),k=ot(T,-b,h),$=T-S,E=k>0,C=k>=h,D=h<=c,L=2===n;let N=0,A=T,F=0;if(u>1){const e=~~(k/(d+(C?0:f)));t._currentIteration=ot(e,0,u),C&&t._currentIteration--,N=t._currentIteration%2,A=k%(d+f)||0}const P=_^(y&&N),R=t._ease;let Y=C?P?0:h:P?d-A:A;R&&(Y=d*R(Y/d)||0);const X=(o?o.backwards:T<S)?!P:!!P;if(t._currentTime=T,t._iterationTime=Y,t.backwards=X,E&&!t.began?(t.began=!0,s||o&&(X||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||v||!E||t._currentIteration===m||t.onLoop(t),L||1===n&&(e>=b&&e<=x||e<=b&&w>b||e>=x&&w!==h)||Y>=x&&w!==h||Y<=b&&w>0||e<=w&&w===h&&l||C&&!l&&D){if(E&&(t.computeDeltaTime(w),s||t.onBeforeUpdate(t)),!v){const e=L||(X?-1*$:$)>=B.tickThreshold,n=t._offset+(o?o._offset:0)+b+Y;let h,l,c,d,u=t._head,m=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,_=u._nextRep,y=u._prevRep,v=t!==i.none;if((e||(s!==o||n<=f+(_?_._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!y||y._isOverridden||n>=y._absoluteStartTime+y._changeDuration+u._delay))){const e=u._currentTime=ot(Y-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,p=u._valueType,f=u._tweenType,g=0===f,_=0===p,y=_&&g||0===s||1===s?-1:B.precision;let b,S;if(_)b=S=n(ht(ct(u._fromNumber,u._toNumber,s),y));else if(1===p)S=n(ht(ct(u._fromNumber,u._toNumber,s),y)),b=`${S}${u._unit}`;else if(2===p){const t=u._fromNumbers,e=u._toNumbers,i=ht(ot(n(ct(t[0],e[0],s)),0,255),0),r=ht(ot(n(ct(t[1],e[1],s)),0,255),0),o=ht(ot(n(ct(t[2],e[2],s)),0,255),0),a=ot(n(ht(ct(t[3],e[3],s),y)),0,1);if(b=`rgba(${i},${r},${o},${a})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(3===p){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(ht(ct(u._fromNumbers[t],u._toNumbers[t],s),y)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=S),r||t===i.blend)u._value=b;else{const t=u.property;h=u.target,g?h[t]=b:1===f?h.setAttribute(t,b):(l=h.style,3===f?(h!==c&&(c=h,d=h[a]),d[t]=b,m=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(F=1)}}if(m&&u._renderTransforms){let t=p;for(let e in d)t+=`${g[e]}${d[e]}) `;l.transform=t,m=0}u=u._next}!s&&F&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&D?!s&&(o.began&&!X&&T>=h&&!l||X&&T<=c&&l)&&(t.onComplete(t),t.completed=!X):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(X||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},bt=(t,e,s,i,r)=>{const n=t._currentIteration;if(vt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=A();let d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;ft(o,(e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=c)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&vt(e,t,s,1,2),e.began=!1,e.completed=!1})),s||o.onLoop(o)}ft(o,(t=>{const e=ht((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;d+=vt(t,e,s,i,n),!t.completed&&u&&(u=!1)}),a),!s&&d&&o.onRender(o),u&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},St={animation:null,update:_},xt=t?requestAnimationFrame:setImmediate,Tt=t?cancelAnimationFrame:clearImmediate;class wt extends yt{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=C,this.paused=!(!t||!s.hidden),this.reqId=null}update(){const t=this._currentTime=A();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(gt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):bt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}St.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=xt($t)),this}pause(){return this.paused=!0,Et()}resume(){if(this.paused)return this.paused=!1,ft(this,(t=>t.resetTime())),this.wake()}get speed(){return this._speed*(1===B.timeScale?1:u)}set speed(t){this._speed=t*B.timeScale,ft(this,(t=>t.speed=t._speed))}get timeUnit(){return 1===B.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(B.timeScale!==s){B.timeScale=s,B.tickThreshold=200*s;const t=e?.001:u;this.defaults.duration*=t,this._speed*=t}}get precision(){return B.precision}set precision(t){B.precision=t}}const kt=(()=>{const e=new wt(A());return t&&(D.engine=e,s.addEventListener("visibilitychange",(()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())}))),e})(),$t=()=>{kt._head?(kt.reqId=xt($t),kt.update()):kt.reqId=0},Et=()=>(Tt(kt.reqId),kt.reqId=0,kt);function Ct(t){const e=Y(t)?B.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Bt(e){if(z(e))return[];if(F(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!z(i)){const t=Ct(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!z(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}if(!t)return[e];const s=Ct(e);return s?Array.from(s):[e]}function Dt(t){const e=Bt(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[r]){s[r]=!0;const t=O(s);(s.nodeType||t)&&(s[n]=!0,s[o]=t,s[a]={})}}return e}const Lt=t=>{const e=Bt(t)[0];if(e&&O(e))return e},Nt=(t,e,s=0)=>t.getPointAtLength(e+s>=1?e+s:0),At=(t,e)=>s=>{const i=+t.getTotalLength(),r=s[o],n=t.getCTM();return{from:0,to:i,modifier:s=>{if("a"===e){const e=Nt(t,s,-1),i=Nt(t,s,1);return 180*it(i.y-e.y,i.x-e.x)/rt}{const i=Nt(t,s,0);return"x"===e?r||!n?i.x:i.x*n.a+i.y*n.c+n.e:r||!n?i.y:i.x*n.b+i.y*n.d+n.f}}}},Ft=["opacity","rotate","overflow","color"],Pt={morphTo:(t,e=.33)=>s=>{const i=Lt(t);if(!i)return;const r="path"===s.tagName,n=r?" ":",",o=s[h];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const c=e/(h-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+ht(d.x,3)+n+d.y+" ",l+=p+ht(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[h]=l,[a,l]},createMotionPath:t=>{const e=Lt(t);if(e)return{translateX:At(e,"x"),translateY:At(e,"y"),rotate:At(e,"a")}},createDrawable:(t,e=0,s=0)=>Bt(t).map((t=>((t,e,s)=>{const i=u,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===l?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(Q(s.a*s.a+s.b*s.b)+Q(s.c*s.c+s.d*s.d))/2)}return e})(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:X(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h})(t,e,s)))},Rt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),Yt=(t,e)=>M(t)?e:t,Xt=(t,e,s,i,r)=>{if(X(t)){const n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};return r&&(r.func=n),n()}return t},Mt=(t,e)=>t[n]?t[o]&&((t,e)=>{if(Ft.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}})(t,e)?1:f.includes(e)||m.get(e)?3:N(e,"--")?4:e in t.style?2:e in t?0:1:0,zt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[l]||t).getPropertyValue(e);return"auto"===r?"0":r},Ot=(t,e,s,i)=>{const r=M(s)?Mt(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[a];let o;for(;o=$.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!M(r)?r:N(e,"scale")?"1":N(e,"rotate")||N(e,"skew")?"0deg":"0px"})(t,e,i):4===r?zt(t,e,i).trimStart():zt(t,e,i)},It=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Wt=(t,e)=>{if(e.t=0,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const n=!s.includes(" ")&&w.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(I(r=s)||W(r)||V(r))return e.t=2,e.d=W(i=s)?(t=>{const e=v.exec(t)||b.exec(t),s=M(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):I(i)?(t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]})(i):V(i)?(t=>{const e=S.exec(t)||x.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=M(e[4])?1:+e[4];let o,a,h;if(0===i)o=a=h=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=ht(255*Rt(e,t,s+1/3),0),a=ht(255*Rt(e,t,s),0),h=ht(255*Rt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(T);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(T)||[],e}}var i,r;return e.n=s,e},Vt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=pt(t._toNumbers),e.s=pt(t._strings),e),Ut={t:0,n:0,u:null,o:null,d:null,s:null},Ht={_rep:new WeakMap,_add:new Map},qt=(t,e,s="_rep")=>{const i=Ht[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Qt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,jt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=c,t._currentTime=c},Gt=(t,e)=>{const s=t._composition;if(s===i.replace){const s=t._absoluteStartTime;_t(e,t,Qt,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){jt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)jt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration);i._changeDuration=n-e-t,i._currentTime=i._changeDuration,i._isOverlapped=1,i._changeDuration<c&&jt(i)}let o=!0;if(ft(e,(t=>{t._isOverlapped||(o=!1)})),o){const t=e.parent;if(t){let s=!0;ft(t,(t=>{t!==e&&ft(t,(t=>{t._isOverlapped||(s=!1)}))})),s&&t.cancel()}else e.cancel()}}}else if(s===i.blend){const e=qt(t.target,t.property,"_add"),s=(t=>{let e=St.animation;return e||(e={duration:c,computeDeltaTime:_,_offset:0,_delay:0,_head:null,_tail:null},St.animation=e,St.update=()=>{t.forEach((t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?pt(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}})),vt(e,1,1,0,2)}),e})(Ht._add);let r=e._head;r||(r={...t},r._composition=i.replace,r._updateDuration=c,r._startTime=0,r._numbers=pt(t._fromNumbers),r._number=0,r._next=null,r._prev=null,_t(e,r),_t(s,r));const n=t._toNumber;if(t._fromNumber=r._fromNumber-n,t._toNumber=0,t._numbers=pt(t._fromNumbers),t._number=0,r._fromNumber=n,t._toNumbers){const e=pt(t._toNumbers);e&&e.forEach(((e,s)=>{t._fromNumbers[s]=r._fromNumbers[s]-e,t._toNumbers[s]=0})),r._fromNumbers=e}_t(e,t,null,"_prevAdd","_nextAdd")}return t},Zt=t=>{const e=t._composition;if(e!==i.none){const s=t.target,r=t.property,n=Ht._rep.get(s)[r];if(gt(n,t,"_prevRep","_nextRep"),e===i.blend){const e=Ht._add,i=e.get(s);if(!i)return;const n=i[r],o=St.animation;gt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){gt(n,a,"_prevAdd","_nextAdd"),gt(o,a);let t=!0;for(let e in i)if(i[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Jt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),Kt=t=>t._cancelled?(t._hasChildren?ft(t,Kt):ft(t,(t=>{t._composition!==i.none&&Gt(t,qt(t.target,t.property))})),t._cancelled=0,t):t;let te=0;class ee extends yt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:d,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:v,onUpdate:b}=t;B.scope&&B.scope.revertibles.push(this);const S=e?0:kt._elapsedTime,x=e?e.defaults:B.defaults,T=X(r)||M(r)?x.delay:+r,w=X(n)||M(n)?1/0:+n,k=Yt(h,x.loop),$=Yt(l,x.loopDelay),E=!0===k||k===1/0||k<0?1/0:k+1;let C=0;if(e)C=s;else{let t=A();kt.paused&&(kt.requestTick(t),t=kt._elapsedTime),C=t-kt._startTime}this.id=M(i)?++te:i,this.parent=e,this.duration=dt((w+$)*E-$)||c,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=b||x.onUpdate,this.onLoop=f||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=!e&&Yt(d,x.autoplay),this._offset=C,this._delay=T,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=_,this._running=!1,this._reversed=+Yt(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Yt(a,x.alternate),this._prev=null,this._next=null,this._elapsedTime=S,this._startTime=S,this._lastTime=S,this._fps=Yt(u,x.frameRate),this._speed=Yt(p,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(1).play()}get currentTime(){return ot(ht(this._currentTime,B.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ht(this._iterationTime,B.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ot(ht(this._currentTime/this.duration,5),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ot(ht(this._iterationTime/this.iterationDuration,5),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ot(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=0){return Kt(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,bt(this,0,1,t,2),Jt(this),this._hasChildren&&ft(this,Jt),this}init(t=0){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&bt(this,this.duration,1,t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!M(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*kt._speed);return this._startTime=A()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=c&&!this._hasChildren?bt(this,c,0,0,2):(this._running||(_t(kt,this),kt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,kt.wake()),this):this}restart(){return this.reset(0).resume()}seek(t,e=0,s=0){Kt(this),this.completed=!1;const i=this.paused;return this.paused=!0,bt(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?tt(d/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ft(this,(t=>t.cancel()),!0):ft(this,Zt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=ut(t);if(e===s)return this;const i=t/e,r=t<=c;return this.duration=r?c:s,this.iterationDuration=r?c:ut(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){bt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const se=t=>new ee(t,null,0).init(),ie=t=>t,re=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,ne=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?ie:r=>0===r||1===r?r:re(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=re(r,e,s)-t,i>0?o=r:n=r}while(Z(i)>1e-7&&++a<100);return r})(r,t,s),e,i),oe=(t=10,e)=>{const s=e?K:tt;return e=>s(ot(e,0,1)*t)*(1/t)},ae=(...t)=>{const e=t.length;if(!e)return ie;const s=e-1,i=t[0],r=t[s],n=[0],o=[H(i)];for(let e=1;e<s;e++){const i=t[e],r=Y(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(M(h)?e/s:H(h)/100),o.push(H(a))}return o.push(H(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},he=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(ot(o,r,1))}return s.push(1),ae(...s)},le=rt/2,ce=2*rt,de=(t=1.68)=>e=>q(e,+t),ue={[p]:de,Quad:de(2),Cubic:de(3),Quart:de(4),Quint:de(5),Sine:t=>1-G(t*le),Circ:t=>1-Q(1-t*t),Expo:t=>t?q(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=q(2,--s))-1)/11;);return 1/q(4,3-s)-7.5625*q((3*e-2)/22-t,2)},Back:(t=1.70158)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ot(+t,1,10),i=ot(+e,c,2),r=i/ce*et(1/s),n=ce/i;return t=>0===t||1===t?t:-s*q(2,-10*(1-t))*j((1-t-r)*n)}},pe={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},me=(t,e,s)=>{if(s[t])return s[t];if(t.indexOf("(")<=-1){const i=pe[t]||t.includes("Back")||t.includes("Elastic")?e[t]():e[t];return i?s[t]=i:ie}{const i=t.slice(0,-1).split("("),r=e[i[0]];return r?s[t]=r(...i[1].split(",")):ie}},fe=(()=>{const t={linear:ae,irregular:he,steps:oe,cubicBezier:ne};for(let e in pe)for(let s in ue){const i=ue[s],r=pe[e];t[e+s]=s===p||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ge={linear:ie},_e=t=>X(t)?t:Y(t)?me(t,fe,ge):ie,ye={},ve=(t,e,s)=>{if(3===s)return m.get(t)||t;if(2===s||1===s&&O(e)&&t in e.style){const e=ye[t];if(e)return e;{const e=t?L(t):t;return ye[t]=e,e}}return t},be={deg:1,rad:180/rt,turn:360},Se={},xe=(t,e,i,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===i)return e;const a=o+n+i,h=Se[a];if(M(h)||r){let r;if(n in be)r=o*be[n]/be[i];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==s?h:s.body;l.appendChild(a);const c=a.style;c.width=e+n;const d=a.offsetWidth||e;c.width=e+i;const u=d/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,Se[a]=r}else e.n=h;return e.t,e.u=i,e},Te=t=>{if(t._hasChildren)ft(t,Te,!0);else{const e=t;e.pause(),ft(e,(t=>{const s=t.property,i=t.target;if(i[n]){const r=i.style,n=e._inlineStyles[s];if(3===t._tweenType){const e=i[a];if(M(n)||n===p?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=p;for(let s in e)t+=g[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else M(n)||n===p?r.removeProperty(s):r[s]=n;e._tail===t&&e.targets.forEach((t=>{t.getAttribute&&t.getAttribute("style")===p&&t.removeAttribute("style")}))}}))}return t},we={t:0,n:0,u:null,o:null,d:null,s:null},ke={t:0,n:0,u:null,o:null,d:null,s:null},$e={func:null},Ee=[null],Ce=[null,null],Be={to:null};let De,Le,Ne=0;class Ae extends ee{constructor(t,e,s,r,n=!1,o=0,a=0){super(e,s,r);const h=Dt(t),l=h.length,d=e.keyframes,p=d?mt(((t,e)=>{const s={};if(F(t)){const e=[].concat(...t.map((t=>Object.keys(t)))).filter(U);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map((t=>{const e={};for(let s in t){const i=t[s];U(s)?s===r&&(e.to=i):e[s]=i}return e}));s[r]=n}}else{const i=Yt(e.duration,B.defaults.duration),r=Object.keys(t).map((e=>({o:parseFloat(e)/100,p:t[e]}))).sort(((t,e)=>t.o-e.o));r.forEach((t=>{const e=t.o,r=t.p;for(let t in r)if(U(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let c=0;for(let t=0;t<a;t++)c+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?c:0),n.push(l)}return t}));for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s})(d,e),e):e,{delay:m,duration:f,ease:g,playbackEase:_,modifier:y,composition:v,onRender:b}=p,S=s?s.defaults:B.defaults,x=Yt(_,S.playbackEase),T=x?_e(x):null,w=!M(g)&&!M(g.ease),k=w?g.ease:Yt(g,T?"linear":S.ease),$=w?g.duration:Yt(f,S.duration),E=Yt(m,S.delay),C=y||S.modifier,D=M(v)&&l>=u?i.none:M(v)?S.composition:v,L={},N=this._offset+(s?s._offset:0);let A=NaN,Y=NaN,X=0,z=0;for(let t=0;t<l;t++){const e=h[t],r=o||t,d=a||l;let u=NaN,m=NaN;for(let t in p)if(U(t)){const o=Mt(e,t),a=ve(t,e,o);let h=p[t];const l=F(h);if(n&&!l&&(Ce[0]=h,Ce[1]=h,h=Ce),l){const t=h.length,e=!P(h[0]);2===t&&e?(Be.to=h,Ee[0]=Be,De=Ee):t>2&&e?(De=[],h.forEach(((t,e)=>{e?1===e?(Ce[1]=t,De.push(Ce)):De.push(t):Ce[0]=t}))):De=h}else Ee[0]=h,De=Ee;let f=null,g=null,_=NaN,y=0,v=0;for(let t=De.length;v<t;v++){const n=De[v];P(n)?Le=n:(Be.to=n,Le=Be),$e.func=null;const h=Xt(Le.to,e,r,d,$e);let l;P(h)&&!M(h.to)?(Le=h,l=h.to):l=h;const u=Xt(Le.from,e,r,d),p=Le.ease,m=!M(p)&&!M(p.ease),b=m?p.ease:p||k,S=m?p.duration:Xt(Yt(Le.duration,t>1?Xt($,e,r,d)/t:$),e,r,d),x=Xt(Yt(Le.delay,v?0:E),e,r,d),T=Xt(Yt(Le.composition,D),e,r,d),w=R(T)?T:i[T],B=Le.modifier||C,A=!M(u),Y=!M(l),O=F(l),I=O||A&&Y,W=g?y+x:x,V=N+W;z||!A&&!O||(z=1);let U=g;if(w!==i.none){f||(f=qt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(U=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)jt(t),t=t._nextRep}if(I?(Wt(O?Xt(l[0],e,r,d):u,we),Wt(O?Xt(l[1],e,r,d,$e):l,ke),0===we.t&&(U?1===U._valueType&&(we.t=1,we.u=U._unit):(Wt(Ot(e,a,o,L),Ut),1===Ut.t&&(we.t=1,we.u=Ut.u)))):(Y?Wt(l,ke):g?Vt(g,ke):Wt(s&&U&&U.parent.parent===s?U._value:Ot(e,a,o,L),ke),A?Wt(u,we):g?Vt(g,we):Wt(s&&U&&U.parent.parent===s?U._value:Ot(e,a,o,L),we)),we.o&&(we.n=It(U?U._toNumber:Wt(Ot(e,a,o,L),Ut).n,we.n,we.o)),ke.o&&(ke.n=It(we.n,ke.n,ke.o)),we.t!==ke.t)if(3===we.t||3===ke.t){const t=3===we.t?we:ke,e=3===we.t?ke:we;e.t=3,e.s=pt(t.s),e.d=t.d.map((()=>e.n))}else if(1===we.t||1===ke.t){const t=1===we.t?we:ke,e=1===we.t?ke:we;e.t=1,e.u=t.u}else if(2===we.t||2===ke.t){const t=2===we.t?we:ke,e=2===we.t?ke:we;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(we.u!==ke.u){let t=ke.u?we:ke;t=xe(e,t,ke.u?ke.u:we.u,!1)}if(ke.d&&we.d&&ke.d.length!==we.d.length){const t=we.d.length>ke.d.length?we:ke,e=t===we?ke:we;e.d=t.d.map(((t,s)=>M(e.d[s])?0:e.d[s])),e.s=pt(t.s)}const H=ht(+S||c,12),q={parent:this,id:Ne++,property:a,target:e,_value:null,_func:$e.func,_ease:_e(b),_fromNumbers:pt(we.d),_toNumbers:pt(ke.d),_strings:pt(ke.s),_fromNumber:we.n,_toNumber:ke.n,_numbers:pt(we.d),_number:we.n,_unit:ke.u,_modifier:B,_currentTime:0,_startTime:W,_delay:+x,_updateDuration:H,_changeDuration:H,_absoluteStartTime:V,_tweenType:o,_valueType:ke.t,_composition:w,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};w!==i.none&&Gt(q,f),isNaN(_)&&(_=q._startTime),y=ht(W+H,12),g=q,X++,_t(this,q)}(isNaN(Y)||_<Y)&&(Y=_),(isNaN(A)||y>A)&&(A=y),3===o&&(u=X-v,m=X)}if(!isNaN(u)){let t=0;ft(this,(e=>{t>=u&&t<m&&(e._renderTransforms=1,e._composition===i.blend&&ft(St.animation,(t=>{t.id===e.id&&(t._renderTransforms=1)}))),t++}))}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),Y?(ft(this,(t=>{t._startTime-t._delay||(t._delay-=Y),t._startTime-=Y})),A-=Y):Y=0,A||(A=c,this.iterationCount=0),this.targets=h,this.duration=A===c?c:dt((A+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=b||S.onRender,this._ease=T,this._delay=Y,this.iterationDuration=A,this._inlineStyles=L,!this._autoplay&&z&&this.onRender(this)}stretch(t){const e=this.duration;if(e===ut(t))return this;const s=t/e;return ft(this,(t=>{t._updateDuration=ut(t._updateDuration*s),t._changeDuration=ut(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s})),super.stretch(t)}refresh(){return ft(this,(t=>{const e=Ot(t.target,t.property,t._tweenType);Wt(e,Ut),t._fromNumbers=pt(Ut.d),t._fromNumber=Ut.n,t._func&&(Wt(t._func(),ke),t._toNumbers=pt(ke.d),t._strings=pt(ke.s),t._toNumber=ke.n)})),this}revert(){return super.revert(),Te(this)}then(t){return super.then(t)}}const Fe=(t,e)=>new Ae(t,e,null,0,!1).init(),Pe=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(t(i/e));return`linear(${s.join(", ")})`},Re={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Ye=(()=>{const t={};for(let e in pe)t[e]=t=>pe[e](de(t));return t})(),Xe=t=>{let e=Re[t];if(e)return e;if(e="linear",Y(t)){if(N(t,"linear")||N(t,"cubic-")||N(t,"steps")||N(t,"ease"))e=t;else if(N(t,"cubicB"))e=L(t);else{const s=me(t,Ye,Re);X(s)&&(e=s===ie?"linear":Pe(s))}Re[t]=e}else if(X(t)){const s=Pe(t);s&&(e=s)}else t.ease&&(e=Pe(t.ease));return e},Me=["x","y","z"],ze=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Me],Oe=[...Me,...f.filter((t=>["X","Y","Z"].some((e=>t.endsWith(e)))))];let Ie=t&&(M(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"));const We={_head:null,_tail:null},Ve=(t,e,s)=>{let i=We._head;for(;i;){const r=i._next,n=i.$el===t,o=!e||i.property===e,a=!s||i.parent===s;if(n&&o&&a){const t=i.animation;try{t.commitStyles()}catch{}t.cancel(),gt(We,i);const e=i.parent;e&&(e._completed++,e.animations.length===e._completed&&(e.completed=!0,e.muteCallbacks||(e.paused=!0,e.onComplete(e),e._resolve(e))))}i=r}},Ue=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),Ve(e,s),_t(We,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Ve(e,s,t)};return n.onremove=a,n.onfinish=a,n},He=(t,e,s,i,r)=>{let n=Xt(e,s,i,r);return R(n)?ze.includes(t)||N(t,"translate")?`${n}px`:N(t,"rotate")||N(t,"skew")?`${n}deg`:`${n}`:n},qe=(t,e,s,i,r,n)=>{let o="0";const a=M(i)?getComputedStyle(t)[e]:He(e,i,t,r,n);return o=M(s)?F(i)?i.map((s=>He(e,s,t,r,n))):a:[He(e,s,t,r,n),a],o};class Qe{constructor(t,e){B.scope&&B.scope.revertibles.push(this),Ie||(f.forEach((t=>{const e=N(t,"skew"),s=N(t,"scale"),i=N(t,"rotate"),r=N(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}})),Ie=!0);const s=Dt(t),i=s.length;i||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const r=Yt(e.ease,Xe(B.defaults.ease)),n=r.ease&&r,o=Yt(e.autoplay,B.defaults.autoplay),h=!(!o||!o.link)&&o,l=e.alternate&&!0===e.alternate,c=e.reversed&&!0===e.reversed,d=Yt(e.loop,B.defaults.loop),y=!0===d||d===1/0?1/0:R(d)?d+1:1,v=l?c?"alternate-reverse":"alternate":c?"reverse":"normal",b=Xe(r),S=1===B.timeScale?1:u;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=e.onComplete||_,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!o||!1!==h,this.reversed=c,this.autoplay=o,this._speed=Yt(e.playbackRate,B.defaults.playbackRate),this._resolve=_,this._completed=0,this._inlineStyles=s.map((t=>t.getAttribute("style"))),s.forEach(((t,s)=>{const o=t[a],h=Oe.some((t=>e.hasOwnProperty(t))),l=(n?n.duration:Xt(Yt(e.duration,B.defaults.duration),t,s,i))*S,c=Xt(Yt(e.delay,B.defaults.delay),t,s,i)*S,d=Yt(e.composition,"replace");for(let n in e){if(!U(n))continue;const a={},u={iterations:y,direction:v,fill:"forwards",easing:b,duration:l,delay:c,composite:d},p=e[n],g=!!h&&(f.includes(n)?n:m.get(n));let _;if(P(p)){const e=p,h=Yt(e.ease,r),m=h.ease&&h,f=e.to,y=e.from;if(u.duration=(m?m.duration:Xt(Yt(e.duration,l),t,s,i))*S,u.delay=Xt(Yt(e.delay,c),t,s,i)*S,u.composite=Yt(e.composition,d),u.easing=Xe(h),_=qe(t,n,y,f,s,i),g?(a[`--${g}`]=_,o[g]=_):a[n]=qe(t,n,y,f,s,i),Ue(this,t,n,a,u),!M(y))if(g){const e=`--${g}`;t.style.setProperty(e,a[e][0])}else t.style[n]=a[n][0]}else _=F(p)?p.map((e=>He(n,e,t,s,i))):He(n,p,t,s,i),g?(a[`--${g}`]=_,o[g]=_):a[n]=_,Ue(this,t,n,a,u)}if(h){let e=p;for(let t in o)e+=`${g[t]}var(--${t})) `;t.style.transform=e}})),h&&this.autoplay.link(this)}forEach(t){const e=Y(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach((e=>e.playbackRate=t))}get currentTime(){const t=this.controlAnimation,e=B.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===B.timeScale?1:u);this.forEach((t=>{e>=this.duration&&t.play(),t.currentTime=e}))}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach((e=>e.currentTime=t*this.duration||0))}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach(((t,e)=>t.setAttribute("style",this._inlineStyles[e]))),this}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const je={animate:(t,e)=>new Qe(t,e),convertEase:Pe},Ge=(t=_)=>new ee({duration:1*B.timeScale,onComplete:t},null,0).resume();function Ze(t,e,s){const i=Dt(t);if(!i.length)return;const[r]=i,n=Mt(r,e),o=ve(e,r,n);let a=Ot(r,o);if(M(s))return a;if(Wt(a,Ut),0===Ut.t||1===Ut.t){if(!1===s)return Ut.n;{const t=xe(r,Ut,s,!1);return`${ht(t.n,B.precision)}${t.u}`}}}const Je=(t,e)=>{if(!M(e))return e.duration=c,e.composition=Yt(e.composition,i.none),new Ae(t,e,null,0,!0).resume()},Ke=(t,e,s)=>{let i=!1;return ft(e,(r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=ve(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),gt(e,r),Zt(r),i=!0)}}),!0),i},ts=(t,e,s)=>{const i=Bt(t),r=e||kt,n=e&&e.controlAnimation&&e;for(let t=0,e=i.length;t<e;t++){const e=i[t];Ve(e,s,n)}let o;if(r._hasChildren){let e=0;ft(r,(n=>{if(!n._hasChildren)if(o=Ke(i,n,s),o&&!n._head)n.cancel(),gt(r,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?ts(t,n,s):n._hasChildren=!1}),!0),M(r.iterationDuration)||(r.iterationDuration=e)}else o=Ke(i,r,s);return o&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),i},es=(t,e,s)=>{const i=10**(s||0);return tt((Math.random()*(e-t+1/i)+t)*i)/i},ss=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),is=(t,e,s,i)=>{let r=u/B.defaults.frameRate;if(!1!==i){const t=i||kt._hasChildren&&kt;t&&t.deltaTime&&(r=t.deltaTime)}const n=1-Math.exp(-s*r*.1);return s?1===s?e:(1-n)*t+n*e:t},rs=t=>(...e)=>{const s=t(...e);return new Proxy(_,{apply:(t,e,[i])=>s(i),get:(t,e)=>rs(((...t)=>{const i=os[e](...t);return t=>i(s(t))}))})},ns=(t,e=0)=>(...s)=>(s.length<t.length?rs(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(t,e)):t)(...s),os={$:Dt,get:Ze,set:Je,remove:ts,cleanInlineStyles:Te,random:es,randomPick:t=>t[es(0,t.length-1)],shuffle:t=>{let e,s,i=t.length;for(;i;)s=es(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},lerp:is,sync:Ge,clamp:ns(ot),round:ns(ht),snap:ns(lt),wrap:ns(((t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e)),interpolate:ns(ct,1),mapRange:ns(ss),roundPad:ns(((t,e)=>(+t).toFixed(e))),padStart:ns(((t,e,s)=>`${t}`.padStart(e,s))),padEnd:ns(((t,e,s)=>`${t}`.padEnd(e,s))),degToRad:ns((t=>t*rt/180)),radToDeg:ns((t=>180*t/rt))},as=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),M(e))return s;if(R(+e))return+e;const i=e,r=t?t.labels:null,n=!z(r),o=((t,e)=>{if(N(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!M(o),h=E.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=a?o:n?l:s,d=+e[1];return It(c,d,t[0])}return a?o:n?M(r[i])?s:r[i]:s};function hs(t,e,s,i,r,n){const o=R(t.duration)&&t.duration<=c?s-c:s;bt(e,o,1,1,1);const a=i?new Ae(i,t,e,o,!1,r,n):new ee(t,e,o);return a.init(1),_t(e,a),ft(e,(t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)})),e.duration=function(t){return dt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}class ls extends ee{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=B.defaults;this.defaults=e?mt(e,s):s,this.onRender=t.onRender||s.onRender;const i=Yt(t.playbackEase,s.playbackEase);this._ease=i?_e(i):null,this.iterationDuration=0}add(t,e,s){const i=P(e),r=P(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(X(s)){const e=s,r=Bt(t),n=this.duration,o=this.iterationDuration,a=i.id;let h=0;const l=r.length;r.forEach((t=>{const s={...i};this.duration=n,this.iterationDuration=o,M(a)||(s.id=a+"-"+h),hs(s,this,e(t,h,l,this),t,h,l),h++}))}else hs(i,this,as(this,s),t)}else hs(t,this,as(this,e));return this.init(1)}}sync(t,e){if(M(t)||t&&M(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return M(e)?this:(e.duration=c,e.composition=i.replace,this.add(t,e,s))}call(t,e){return M(t)||t&&!X(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return M(t)||t&&!Y(t)||(this.labels[t]=as(this,e)),this}remove(t,e){return ts(t,this,e),this}stretch(t){const e=this.duration;if(e===ut(t))return this;const s=t/e,i=this.labels;ft(this,(t=>t.stretch(t.duration*s)));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return ft(this,(t=>{t.refresh&&t.refresh()})),this}revert(){return super.revert(),ft(this,(t=>t.revert),!0),Te(this)}then(t){return super.then(t)}}const cs=t=>new ls(t).init();class ds{constructor(t,e){B.scope&&B.scope.revertibles.push(this);const s={},r={};if(this.targets=[],this.animations={},!M(t)&&!M(e)){for(let t in e){const i=e[t];U(t)?r[t]=i:s[t]=i}for(let e in r){const n=r[e],o=P(n);let a={},h="+=0";if(o){const t=n.unit;Y(t)&&(h+=t)}else a.duration=n;a[e]=o?mt({to:h},n):h;const l=mt(s,a);l.composition=i.replace,l.autoplay=!1;const c=this.animations[e]=new Ae(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(M(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return ft(c,(e=>{if(F(t))for(let s=0,i=t.length;s<i;s++)M(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;M(s)||(e._ease=_e(s)),e._currentTime=0})),M(e)||c.stretch(e),c.reset(1).resume(),this}}}}revert(){for(let t in this.animations)this[t]=_,this.animations[t].revert();return this.animations={},this.targets.length=0,this}}const us=(t,e)=>new ds(t,e);class ps{constructor(t={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/u,this.maxIterations=this.maxDuration/this.timeStep/u,this.m=ot(Yt(t.mass,1),0,u),this.s=ot(Yt(t.stiffness,100),1,u),this.d=ot(Yt(t.damping,10),.1,u),this.v=ot(Yt(t.velocity,0),-1e3,u),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>0===t||1===t?t:this.solve(t*this.solverDuration)}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?J(-n*e*s)*(1*G(i*n)+r*j(i*n)):(1+r*n)*J(-n*s),1-n}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ot(Q(o/r),c,u),l=this.zeta=n/(2*Q(o*r)),d=this.wd=l<1?h*Q(1-l*l):0;this.b=l<1?(l*h-a)/d:-a+h;let p=0,m=0,f=0;for(;m<t&&f<e;)Z(1-this.solve(p))<s?m++:m=0,this.solverDuration=p,p+=i,f++;this.duration=ht(this.solverDuration*u,0)*B.timeScale}get mass(){return this.m}set mass(t){this.m=ot(Yt(t,1),0,u),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ot(Yt(t,100),1,u),this.compute()}get damping(){return this.d}set damping(t){this.d=ot(Yt(t,10),.1,u),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ot(Yt(t,0),-1e3,u),this.compute()}}const ms=t=>new ps(t),fs=t=>{t.cancelable&&t.preventDefault()};class gs{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:_,remove:_}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class _s{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp((e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}})),t}remove(){this.traverseUp(((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"}))}revert(){this.traverseUp(((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s}))}}const ys=(t,e)=>t&&X(t)?t(e):t;let vs=0;class bs{constructor(t,i={}){if(!t)return;B.scope&&B.scope.revertibles.push(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,h=i.releaseEase,l=h&&_e(h),c=!M(h)&&!M(h.ease),u=P(r)&&!M(r.mapTo)?r.mapTo:"translateX",p=P(n)&&!M(n.mapTo)?n.mapTo:"translateY",m=ys(i.container,this);this.containerArray=F(m)?m:null,this.$container=m&&!this.containerArray?Bt(m)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=P(t)?new gs(t):Bt(t)[0],this.$trigger=Bt(o||t)[0],this.fixed="fixed"===Ze(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:ms({mass:Yt(i.releaseMass,1),stiffness:Yt(i.releaseStiffness,80),damping:Yt(i.releaseDamping,20)}),this.releaseYSpring=c?h:ms({mass:Yt(i.releaseMass,1),stiffness:Yt(i.releaseStiffness,80),damping:Yt(i.releaseDamping,20)}),this.releaseEase=l||fe.outQuint,this.hasReleaseSpring=c,this.onGrab=i.onGrab||_,this.onDrag=i.onDrag||_,this.onRelease=i.onRelease||_,this.onUpdate=i.onUpdate||_,this.onSettle=i.onSettle||_,this.onSnap=i.onSnap||_,this.onResize=i.onResize||_,this.onAfterResize=i.onAfterResize||_,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),M(r)||!0===r)f[u]=0;else if(P(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===r&&(f[u]=0,this.disabled[0]=1);if(M(n)||!0===n)f[p]=0;else if(P(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new ds(this.$target,f),this.xProp=u,this.yProp=p,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,d,d,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=A(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new _s(this.$target),this.overshootCoords={x:0,y:0},this.overshootXTicker=new ee({autoplay:!1},null,0).init(),this.overshootYTicker=new ee({autoplay:!1},null,0).init(),this.updateTicker=new ee({autoplay:!1},null,0).init(),this.overshootXTicker.onUpdate=()=>{this.disabled[0]||(this.updated=!0,this.manual=!0,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootXTicker.onComplete=()=>{this.disabled[0]||(this.manual=!1,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootYTicker.onUpdate=()=>{this.disabled[1]||(this.updated=!0,this.manual=!0,this.animate[this.yProp](this.overshootCoords.y,0))},this.overshootYTicker.onComplete=()=>{this.disabled[1]||(this.manual=!1,this.animate[this.yProp](this.overshootCoords.y,0))},this.updateTicker.onUpdate=()=>this.update(),this.contained=!M(m),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?u:p,this.animate.animations[this.activeProp].onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=it(n,r)):this.updated=!1},this.animate.animations[this.activeProp].onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ee({autoplay:!1,duration:150*B.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver((()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0})),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),P(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=A(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,l=this.velocityStackIndex;n[l]=ht(ot(Q(t*t+e*e)/r*o,a,h),5);const c=st(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=ht(t,5);return this.overshootXTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=lt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=ht(t,5);return this.overshootYTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=lt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return ht(this.animate[this.xProp](),B.precision)}set x(t){this.setX(t,!1)}get y(){return ht(this.animate[this.yProp](),B.precision)}set y(t){this.setY(t,!1)}get progressX(){return ss(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ss(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ss(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ss(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=ht(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=ht(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=s-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container,i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=e.innerWidth,h=this.window[1]=e.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,_]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ot(c,a,c):c,this.scrollView[1]=l?ot(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:S,right:x,bottom:T}=t.getBoundingClientRect();this.dragArea[2]=ht(l?ot(y,a,a):y,0),this.dragArea[3]=ht(l?ot(v,h,h):v,0);const w=Ze(t,"overflow"),k="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&k||!$&&!k)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!F(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-y:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=ht(r.top+s-(l?0:S),0),this.targetBounds[1]=ht(r.right+e-(l?a:x),0),this.targetBounds[2]=ht(r.bottom+s-(l?h:T),0),this.targetBounds[3]=ht(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+_):(this.containerBounds[0]=-ht(r.top-(u?ot(S,0,h):S)+o-m,0),this.containerBounds[1]=-ht(r.right-(u?ot(x,0,a):x)-c+f,0),this.containerBounds[2]=-ht(r.bottom-(u?ot(T,0,h):T)-d+g,0),this.containerBounds[3]=-ht(r.left-(u?ot(b,0,a):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,h]=this.disabled,l=!a&&e<o||!a&&e>r,c=!h&&s<i||!h&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=ys(t.container,this),o=ys(t.containerPadding,this)||0,a=F(o)?o:[o,o,o,o],h=this.x,l=this.y,c=ys(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}this.containerArray=F(n)?n:null,this.$container=n&&!this.containerArray?Bt(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Yt(a,[0,0,0,0]),this.containerFriction=ot(Yt(ys(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ot(Yt(ys(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ys(P(i)&&!M(i.snap)?i.snap:t.snap,this),this.snapY=ys(P(r)&&!M(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Yt(ys(t.scrollSpeed,this),1.5),this.scrollThreshold=Yt(ys(t.scrollThreshold,this),20),this.dragSpeed=Yt(ys(t.dragSpeed,this),1),this.minVelocity=Yt(ys(t.minVelocity,this),0),this.maxVelocity=Yt(ys(t.maxVelocity,this),50),this.velocityMultiplier=Yt(ys(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[u,p,m,f]=this.containerBounds;this.setX(ot(h,f,p),!0),this.setY(ot(l,u,m),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?ot(c,this.window[0],c):c,p=this.useWin?ot(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,_=this.scrollThreshold,[y,v]=this.coords,[b,S,x,T]=this.scrollBounds,w=ht(ot((v-b+t)/_,-1,0)*g,0),k=ht(ot((y-S-e)/_,0,1)*g,0),$=ht(ot((v-x-s)/_,0,1)*g,0),E=ht(ot((y-T+i)/_,-1,0)*g,0);if(w||$||E||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=ht(ot(h+(E||k),0,r-o),0),this.coords[0]-=h-s),e||(i=ht(ot(l+(w||$),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-h,n-l),this.angle=it(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootXTicker.pause(),this.overshootYTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return ts(this,null,"x"),ts(this,null,"y"),ts(this,null,"progressX"),ts(this,null,"progressY"),ts(this.scroll),ts(this.overshootCoords),this}scrollInView(t,e=0,s=fe.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,c,u]=o,p=ht(ot(r-h,-1e12,0),0),m=ht(ot(i-l,0,d),0),f=ht(ot(r-c,0,d),0),g=ht(ot(i-u,-1e12,0),0);new Ae(n,{x:ht(n.x+(g?g-e:m?m+e:0),0),y:ht(n.y+(p?p-e:f?f+e:0),0),duration:M(t)?350*B.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then((()=>{this.canScroll=a}))}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Je(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=fe.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=ot(lt(i,this.snapX),u,c),a=ot(lt(r,this.snapY),l,d),h=M(t)?350*B.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,h,s),n||2!==p&&3!==p||this.animate[this.yProp](a,h,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[h,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Ze(this.$target,"zIndex",!1);vs=(f>vs?f:vs)+1,this.targetStyles=Je(this.$target,{zIndex:vs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Je(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,fe.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let h=t.target,l=!1,c=!1,d=!1;for(;e&&h&&h!==this.$trigger;){const t=Ze(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentNode}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(fs(t),this.triggerStyles||(this.triggerStyles=Je(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",fs,{passive:!1}),this.$trigger.addEventListener("touchmove",fs,{passive:!1}),this.$trigger.addEventListener("touchend",fs),(!this.disabled[0]&&Z(o)>3||!this.disabled[1]&&Z(a)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[r,n,o,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,_=this.releaseYSpring,y=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,S=this.x,x=this.y,T=this.computeVelocity(r-h,n-l),w=this.angle=it(n-a,r-o),k=150*T,$=(1-this.releaseContainerFriction)*this.dragSpeed,E=S+G(w)*k,C=x+j(w)*k,D=E>d?d+(E-d)*$:E<p?p+(E-p)*$:E,L=C>u?u+(C-u)*$:C<c?c+(C-c)*$:C,N=this.destX=ot(ht(lt(D,this.snapX),5),p,d),A=this.destY=ot(ht(lt(L,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,E,C);let P=0,R=0,Y=y,X=y,M=0;if(b.x=S,b.y=x,!t){const t=N===d?S>d?-1:1:S<p?-1:1,s=ht(S-N,0);g.velocity=e&&v?s?k*t/Z(s):0:T;const{ease:i,duration:r,restDuration:n}=g;P=S===N?0:v?r:r-n*B.timeScale,v&&(Y=i),P>M&&(M=P)}if(!e){const e=A===u?x>u?-1:1:x<c?-1:1,s=ht(x-A,0);_.velocity=t&&v?s?k*e/Z(s):0:T;const{ease:i,duration:r,restDuration:n}=_;R=x===A?0:v?r:r-n*B.timeScale,v&&(X=i),R>M&&(M=R)}if(!v&&F&&$&&(P||R)){const t=i.blend;new Ae(b,{x:{to:D,duration:.65*P},y:{to:L,duration:.65*R},ease:y,composition:t}).init(),new Ae(b,{x:{to:N,duration:P},y:{to:A,duration:R},ease:y,composition:t}).init(),this.overshootXTicker.stretch(P).restart(),this.overshootYTicker.stretch(R).restart()}else t||this.animate[this.xProp](N,P,Y),e||this.animate[this.yProp](A,R,X);this.scrollInView(M,this.scrollThreshold,y);let z=!1;N!==m&&(this.snapped[0]=N,this.snapX&&(z=!0)),A!==f&&this.snapY&&(this.snapped[1]=A,this.snapY&&(z=!0)),z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",fs),this.$trigger.removeEventListener("touchmove",fs),this.$trigger.removeEventListener("touchend",fs),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Je(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.stop(),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootXTicker.revert(),this.overshootYTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":fs(t)}}}const Ss=(t,e)=>new bs(t,e);class xs{constructor(t={}){B.scope&&B.scope.revertibles.push(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||Bt(i)[0]||s);const n=t.defaults,o=B.defaults,a=t.mediaQueries;if(this.defaults=n?mt(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}execute(t){let e=B.scope,s=B.root,i=B.defaults;B.scope=this,B.root=this.root,B.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return B.scope=e,B.root=s,B.defaults=i,n}refresh(){return this.execute((()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach((t=>{const e=t(this);e&&this.revertConstructors.push(e)}))})),this}add(t,e){if(X(t)){const e=t;this.constructors.push(e),this.execute((()=>{const t=e(this);t&&this.revertConstructors.push(t)}))}else this.methods[t]=(...t)=>this.execute((()=>e(...t)));return this}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.mediaQueryLists;let i=t.length,r=e.length;for(;i--;)t[i].revert();for(;r--;)e[r](this);for(let t in s)s[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const Ts=t=>new xs(t),ws=(t,e)=>t&&X(t)?t(e):t,ks=new Map;class $s{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ee({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ft(this,(t=>t.handleScroll()),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ee({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=ht(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ee({autoplay:!1,duration:250*B.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ee({autoplay:!1,duration:500*B.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver((()=>this.resizeTicker.restart())),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=ht(t?e.scrollX:s.scrollLeft,0),this.scrollY=ht(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=(()=>{const t=document.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e})()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=t.width,i=t.height,this.top=t.top,this.left=t.left}this.width=s,this.height=i}refreshScrollObservers(){ft(this,(t=>{t._debug&&t.removeDebug()})),this.updateBounds(),ft(this,(t=>{t.refresh(),t._debug&&t.debug()}))}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.unobserve(this.element),(this.useWin?e:this.element).removeEventListener("scroll",this),ks.delete(this.element)}}const Es=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,a="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:h,u:l}=Wt(a,Ut);let c=h;return"%"===l?c=h/100*s:l&&(c=xe(t,Ut,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Cs=(t,e,s,i,r)=>{let n;if(Y(e)){const o=E.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=Es(t,l[0],s,i,r),p=Es(t,l[1],s,i,r);if(c){const e=It(Es(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=It(Es(t,"max",s),p,h);n=e>u?u:e}else n=It(u,p,h)}else n=Es(t,e,s,i,r)}else n=e;return ht(n,0)},Bs=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[n]){e=i;break}}return e};let Ds=0;const Ls=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Ns{constructor(t={}){B.scope&&B.scope.revertibles.push(this);const e=Yt(t.sync,"play pause"),i=e?_e(e):null,r=e&&("linear"===e||e===ie),n=e&&!(i===ie&&!r),o=e&&(R(e)||!0===e||r),a=e&&Y(e)&&!n&&!o,h=a?e.split(" ").map((t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null})):null,l=a&&h.length>2;this.index=Ds++,this.id=M(t.id)?this.index:t.id,this.container=(t=>{const e=t&&Bt(t)[0]||s.body;let i=ks.get(e);return i||(i=new $s(e),ks.set(e,i)),i})(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!h,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:_,this.onSyncLeave=h&&!l&&h[1]?h[1]:_,this.onSyncEnterForward=h&&l&&h[0]?h[0]:_,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:_,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:_,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:_,this.onEnter=t.onEnter||_,this.onLeave=t.onLeave||_,this.onEnterForward=t.onEnterForward||_,this.onLeaveForward=t.onLeaveForward||_,this.onEnterBackward=t.onEnterBackward||_,this.onLeaveBackward=t.onLeaveBackward||_,this.onUpdate=t.onUpdate||_,this.onSyncComplete=t.onSyncComplete||_,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Yt(t.debug,!1),this._next=null,this._prev=null,_t(this.container,this),Ge((()=>{if(!this.reverted){if(!this.target){const e=Bt(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}}))}link(t){if(t&&(t.pause(),this.linked=t,!this._params.target)){let e;M(t.targets)?ft(t,(t=>{t.targets&&!e&&(e=Bs(t))})):e=Bs(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:ht(ot(t,0,1),6)}refresh(){this.reverted=!1;const t=this._params;return this.repeat=Yt(ws(t.repeat,this),!0),this.horizontal="x"===Yt(ws(t.axis,this),"y"),this.enter=Yt(ws(t.enter,this),"end start"),this.leave=Yt(ws(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),a=Ls[this.index%Ls.length],h=t.useWin,l=h?t.winWidth:t.width,c=h?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,_=e?g:15,y=e?60:g,v=e?y:_,b=e?"repeat-x":"repeat-y",S=t=>e?"0px "+t+"px":t+"px 2px",x=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,T=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${T("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${T("sticky",0,0,e?l:g,e?g:c)}`,i||(n.style.cssText+=`background:\n ${x("#FFFF")}${S(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${S(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${T("relative",0,0,e?d:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${x("#FFFF")}${S(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${S(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const w=[" enter: "," leave: "];this.coords.forEach(((t,i)=>{const r=i>1,h=(r?0:this.offset)+t,m=i%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,S=s.createElement("div"),x=s.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${w[m]}${this.thresholds[i]}`,S.style.cssText=`${T("absolute",0,0,y,_)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${k}: 2px solid ${a};\n `,x.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${_};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,S.appendChild(x);let E=h-$+(e?1:0);S.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(S)})),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Ze(t.element,"position")&&(this.debugStyles=Je(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,a=e,h=0,l=0,c=a;n&&(o=n.currentTime,n.seek(0,!0));const d="static"===Ze(i.element,"position")&&Je(i.element,{position:"relative "});for(;a&&a!==i.element&&a!==s.body;){const e="sticky"===Ze(a,"position")&&Je(a,{position:"static"});a===c&&(h+=a.offsetLeft||0,l+=a.offsetTop||0,c=a.offsetParent),a=a.parentElement,e&&(t||(t=[]),t.push(e))}d&&d.revert();const u=r?h:l,p=r?e.offsetWidth:e.offsetHeight,m=r?i.width:i.height,f=(r?i.scrollWidth:i.scrollHeight)-m,g=this.enter,_=this.leave;let y="start",v="end",b="end",S="start";if(Y(g)){const t=g.split(" ");b=t[0],y=t.length>1?t[1]:y}else if(P(g)){const t=g;M(t.container)||(b=t.container),M(t.target)||(y=t.target)}else R(g)&&(b=g);if(Y(_)){const t=_.split(" ");S=t[0],v=t.length>1?t[1]:v}else if(P(_)){const t=_;M(t.container)||(S=t.container),M(t.target)||(v=t.target)}else R(_)&&(S=_);const x=Cs(e,y,p),T=Cs(e,v,p),w=x+u-m,k=T+u-f,$=Cs(e,b,m,w,k),E=Cs(e,S,m,w,k),C=x+u-$,B=T+u-E,D=B-C;this.offsets[0]=h,this.offsets[1]=l,this.offset=u,this.offsetStart=C,this.offsetEnd=B,this.distance=D<=0?0:D,this.thresholds=[y,v,b,S],this.coords=[x,T,$,E],t&&t.forEach((t=>t.revert())),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&R(i)){if(i<1){const t=e<g&&1===g?1e-4:e>g&&!g?-1e-4:0;g=ht(is(e,g,ct(.01,.2,i),!1)+t,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return gt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const As=(t={})=>new Ns(t),Fs=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!M(o),h=a&&!M(o.ease)?o.ease:a?_e(o):null,l=e.grid,c=e.axis,d=M(r)||0===r||"first"===r,u="center"===r,m="last"===r,f=F(t),g=H(f?t[0]:t),_=f?H(t[1]):0,y=w.exec((f?t[1]:t)+p),v=e.start||0+(f?g:0);let b=d?0:R(r)?r:0;return(t,r,o,a)=>{if(u&&(b=(o-1)/2),m&&(b=o-1),!s.length){for(let t=0;t<o;t++){if(l){const e=u?(l[0]-1)/2:b%l[0],i=u?(l[1]-1)/2:tt(b/l[0]),r=e-t%l[0],n=i-tt(t/l[0]);let o=Q(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(Z(b-t));i=st(...s)}h&&(s=s.map((t=>h(t/i)*i))),n&&(s=s.map((t=>c?t<0?-1*t:-t:Z(i-t))))}const d=f?(_-g)/i:g;let p=(a?as(a,M(e.start)?a.iterationDuration:v):v)+(d*ht(s[r],2)||0);return e.modifier&&(p=e.modifier(p)),y&&(p=`${p}${y[2]}`),p}};export{ds as Animatable,bs as Draggable,Ae as JSAnimation,xs as Scope,Ns as ScrollObserver,ps as Spring,ls as Timeline,ee as Timer,Qe as WAAPIAnimation,Fe as animate,us as createAnimatable,Ss as createDraggable,Ts as createScope,ms as createSpring,cs as createTimeline,se as createTimer,fe as eases,kt as engine,As as onScroll,ks as scrollContainers,Fs as stagger,Pt as svg,os as utils,je as waapi};
|
|
9
|
+
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={replace:0,none:1,blend:2},r=Symbol(),n=Symbol(),o=Symbol(),h=Symbol(),a=Symbol(),l=Symbol(),c=1e-11,d=1e12,u=1e3,p="",m=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),f=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],g=f.reduce(((t,e)=>({...t,[e]:e+"("})),{}),_=()=>{},y=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,v=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,b=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,T=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,w=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,S=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,k=/([a-z])([A-Z])/g,$=/(\w+)(\([^)]+\)+)/g,E=/(\*=|\+=|-=)/,C={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:u,delay:0,loopDelay:0,ease:"out(2)",composition:i.replace,modifier:t=>t,onBegin:_,onBeforeUpdate:_,onUpdate:_,onLoop:_,onPause:_,onComplete:_,onRender:_},B={current:null,root:s},L={defaults:C,precision:4,timeScale:1,tickThreshold:200},D={version:"4.1.0",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(D));const N=t=>t.replace(k,"$1-$2").toLowerCase(),A=(t,e)=>0===t.indexOf(e),F=Date.now,O=Array.isArray,P=t=>t&&t.constructor===Object,M=t=>"number"==typeof t&&!isNaN(t),R=t=>"string"==typeof t,Y=t=>"function"==typeof t,X=t=>void 0===t,z=t=>X(t)||null===t,I=e=>t&&e instanceof SVGElement,W=t=>y.test(t),V=t=>A(t,"rgb"),H=t=>A(t,"hsl"),U=t=>!L.defaults.hasOwnProperty(t),q=t=>R(t)?parseFloat(t):t,Q=Math.pow,j=Math.sqrt,G=Math.sin,Z=Math.cos,J=Math.abs,K=Math.exp,tt=Math.ceil,et=Math.floor,st=Math.asin,it=Math.max,rt=Math.atan2,nt=Math.PI,ot=Math.round,ht=(t,e,s)=>t<e?e:t>s?s:t,at={},lt=(t,e)=>{if(e<0)return t;if(!e)return ot(t);let s=at[e];return s||(s=at[e]=10**e),ot(t*s)/s},ct=(t,e)=>O(e)?e.reduce(((e,s)=>J(s-t)<J(e-t)?s:e)):e?ot(t/e)*e:t,dt=(t,e,s)=>t+(e-t)*s,ut=(t,e,s)=>{const i=10**(s||0);return et((Math.random()*(e-t+1/i)+t)*i)/i},pt=t=>{let e,s,i=t.length;for(;i;)s=ut(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},mt=t=>t===1/0?d:t===-1/0?-1e12:t,ft=t=>t<=c?c:mt(lt(t,11)),gt=t=>O(t)?[...t]:t,_t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=X(r)?e[i]:r}return s},yt=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},vt=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},bt=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},Tt=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const h=t(...s);return h&&!Y(h)&&h.revert&&(e=h),X(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),h||_}};class wt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=lt(u/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<c?c:s,r=lt(u/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<c?c:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const xt=(t,e,s,r,n)=>{const o=t.parent,a=t.duration,l=t.completed,d=t.iterationDuration,u=t.iterationCount,m=t._currentIteration,f=t._loopDelay,_=t._reversed,y=t._alternate,v=t._hasChildren,b=t._delay,T=t._currentTime,w=b+d,x=e-b,S=ht(T,-b,a),k=ht(x,-b,a),$=x-T,E=k>0,C=k>=a,B=a<=c,D=2===n;let N=0,A=x,F=0;if(u>1){const e=~~(k/(d+(C?0:f)));t._currentIteration=ht(e,0,u),C&&t._currentIteration--,N=t._currentIteration%2,A=k%(d+f)||0}const O=_^(y&&N),P=t._ease;let M=C?O?0:a:O?d-A:A;P&&(M=d*P(M/d)||0);const R=(o?o.backwards:x<T)?!O:!!O;if(t._currentTime=x,t._iterationTime=M,t.backwards=R,E&&!t.began?(t.began=!0,s||o&&(R||!o.began)||t.onBegin(t)):x<=0&&(t.began=!1),s||v||!E||t._currentIteration===m||t.onLoop(t),D||1===n&&(e>=b&&e<=w||e<=b&&S>b||e>=w&&S!==a)||M>=w&&S!==a||M<=b&&S>0||e<=S&&S===a&&l||C&&!l&&B){if(E&&(t.computeDeltaTime(S),s||t.onBeforeUpdate(t)),!v){const e=D||(R?-1*$:$)>=L.tickThreshold,n=t._offset+(o?o._offset:0)+b+M;let a,l,c,d,u=t._head,m=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,_=u._nextRep,y=u._prevRep,v=t!==i.none;if((e||(s!==o||n<=f+(_?_._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!y||y._isOverridden||n>=y._absoluteStartTime+y._changeDuration+u._delay))){const e=u._currentTime=ht(M-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,p=u._valueType,f=u._tweenType,g=0===f,_=0===p,y=_&&g||0===s||1===s?-1:L.precision;let b,T;if(_)b=T=n(lt(dt(u._fromNumber,u._toNumber,s),y));else if(1===p)T=n(lt(dt(u._fromNumber,u._toNumber,s),y)),b=`${T}${u._unit}`;else if(2===p){const t=u._fromNumbers,e=u._toNumbers,i=lt(ht(n(dt(t[0],e[0],s)),0,255),0),r=lt(ht(n(dt(t[1],e[1],s)),0,255),0),o=lt(ht(n(dt(t[2],e[2],s)),0,255),0),h=ht(n(lt(dt(t[3],e[3],s),y)),0,1);if(b=`rgba(${i},${r},${o},${h})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=h}}else if(3===p){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(lt(dt(u._fromNumbers[t],u._toNumbers[t],s),y)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=T),r||t===i.blend)u._value=b;else{const t=u.property;a=u.target,g?a[t]=b:1===f?a.setAttribute(t,b):(l=a.style,3===f?(a!==c&&(c=a,d=a[h]),d[t]=b,m=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(F=1)}}if(m&&u._renderTransforms){let t=p;for(let e in d)t+=`${g[e]}${d[e]}) `;l.transform=t,m=0}u=u._next}!s&&F&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&B?!s&&(o.began&&!R&&x>=a&&!l||R&&x<=c&&l)&&(t.onComplete(t),t.completed=!R):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(R||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},St=(t,e,s,i,r)=>{const n=t._currentIteration;if(xt(t,e,s,i,r),t._hasChildren){const o=t,h=o.backwards,a=i?e:o._iterationTime,l=F();let d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;yt(o,(e=>{if(h){const i=e.duration,r=e._offset+e._delay;s||!(i<=c)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&xt(e,t,s,1,2),e.began=!1,e.completed=!1})),s||o.onLoop(o)}yt(o,(t=>{const e=lt((a-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;d+=xt(t,e,s,i,n),!t.completed&&u&&(u=!1)}),h),!s&&d&&o.onRender(o),u&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},kt={animation:null,update:_},$t=(()=>t?requestAnimationFrame:setImmediate)(),Et=(()=>t?cancelAnimationFrame:clearImmediate)();class Ct extends wt{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=C,this.paused=!(!t||!s.hidden),this.reqId=null}update(){const t=this._currentTime=F();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(vt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):St(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}kt.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=$t(Lt)),this}pause(){return this.paused=!0,Dt()}resume(){if(this.paused)return this.paused=!1,yt(this,(t=>t.resetTime())),this.wake()}get speed(){return this._speed*(1===L.timeScale?1:u)}set speed(t){this._speed=t*L.timeScale,yt(this,(t=>t.speed=t._speed))}get timeUnit(){return 1===L.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(L.timeScale!==s){L.timeScale=s,L.tickThreshold=200*s;const t=e?.001:u;this.defaults.duration*=t,this._speed*=t}}get precision(){return L.precision}set precision(t){L.precision=t}}const Bt=(()=>{const e=new Ct(F());return t&&(D.engine=e,s.addEventListener("visibilitychange",(()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())}))),e})(),Lt=()=>{Bt._head?(Bt.reqId=$t(Lt),Bt.update()):Bt.reqId=0},Dt=()=>(Et(Bt.reqId),Bt.reqId=0,Bt);function Nt(t){const e=R(t)?B.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function At(e){if(z(e))return[];if(O(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!z(i)){const t=Nt(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!z(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}if(!t)return[e];const s=Nt(e);return s?Array.from(s):[e]}function Ft(t){const e=At(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[r]){s[r]=!0;const t=I(s);(s.nodeType||t)&&(s[n]=!0,s[o]=t,s[h]={})}}return e}const Ot=t=>{const e=At(t)[0];if(e&&I(e))return e},Pt=(t,e,s=0)=>t.getPointAtLength(e+s>=1?e+s:0),Mt=(t,e)=>s=>{const i=+t.getTotalLength(),r=s[o],n=t.getCTM();return{from:0,to:i,modifier:s=>{if("a"===e){const e=Pt(t,s,-1),i=Pt(t,s,1);return 180*rt(i.y-e.y,i.x-e.x)/nt}{const i=Pt(t,s,0);return"x"===e?r||!n?i.x:i.x*n.a+i.y*n.c+n.e:r||!n?i.y:i.x*n.b+i.y*n.d+n.f}}}},Rt=["opacity","rotate","overflow","color"],Yt={morphTo:(t,e=.33)=>s=>{const i=Ot(t);if(!i)return;const r="path"===s.tagName,n=r?" ":",",o=s[a];o&&s.setAttribute(r?"d":"points",o);let h="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),a=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<a;e++){const c=e/(a-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";h+=p+lt(d.x,3)+n+d.y+" ",l+=p+lt(u.x,3)+n+u.y+" "}}else h=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[a]=l,[h,l]},createMotionPath:t=>{const e=Ot(t);if(e)return{translateX:Mt(e,"x"),translateY:Mt(e,"y"),rotate:Mt(e,"a")}},createDrawable:(t,e=0,s=0)=>At(t).map((t=>((t,e,s)=>{const i=u,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let h=n;const a=new Proxy(t,{get(t,e){const s=t[e];return e===l?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],a=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(j(s.a*s.a+s.b*s.b)+j(s.c*s.c+s.d*s.d))/2)}return e})(o),c=-1e3*r*l,d=a*i*l+c,u=i*l+(0===r&&1===a||1===r&&0===a?0:10*l)-d;if("butt"!==n){const e=r===a?"butt":n;h!==e&&(t.style.strokeLinecap=`${e}`,h=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:Y(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),a.setAttribute("draw",`${e} ${s}`)),a})(t,e,s)))},Xt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),zt=(t,e)=>X(t)?e:t,It=(t,e,s,i,r)=>{if(Y(t)){const n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};return r&&(r.func=n),n()}return t},Wt=(t,e)=>t[n]?t[o]&&((t,e)=>{if(Rt.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}})(t,e)?1:f.includes(e)||m.get(e)?3:A(e,"--")?4:e in t.style?2:e in t?0:1:0,Vt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[l]||t).getPropertyValue(e);return"auto"===r?"0":r},Ht=(t,e,s,i)=>{const r=X(s)?Wt(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[h];let o;for(;o=$.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!X(r)?r:A(e,"scale")?"1":A(e,"rotate")||A(e,"skew")?"0deg":"0px"})(t,e,i):4===r?Vt(t,e,i).trimStart():Vt(t,e,i)},Ut=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,qt=(t,e)=>{if(e.t=0,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const n=!s.includes(" ")&&S.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(W(r=s)||V(r)||H(r))return e.t=2,e.d=V(i=s)?(t=>{const e=v.exec(t)||b.exec(t),s=X(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):W(i)?(t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]})(i):H(i)?(t=>{const e=T.exec(t)||w.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=X(e[4])?1:+e[4];let o,h,a;if(0===i)o=h=a=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=lt(255*Xt(e,t,s+1/3),0),h=lt(255*Xt(e,t,s),0),a=lt(255*Xt(e,t,s-1/3),0)}return[o,h,a,n]})(i):[0,0,0,1],e;{const t=s.match(x);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(x)||[],e}}var i,r;return e.n=s,e},Qt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=gt(t._toNumbers),e.s=gt(t._strings),e),jt={t:0,n:0,u:null,o:null,d:null,s:null},Gt={_rep:new WeakMap,_add:new Map},Zt=(t,e,s="_rep")=>{const i=Gt[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Jt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,Kt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=c,t._currentTime=c},te=(t,e)=>{const s=t._composition;if(s===i.replace){const s=t._absoluteStartTime;bt(e,t,Jt,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){Kt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)Kt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration);i._changeDuration=n-e-t,i._currentTime=i._changeDuration,i._isOverlapped=1,i._changeDuration<c&&Kt(i)}let o=!0;if(yt(e,(t=>{t._isOverlapped||(o=!1)})),o){const t=e.parent;if(t){let s=!0;yt(t,(t=>{t!==e&&yt(t,(t=>{t._isOverlapped||(s=!1)}))})),s&&t.cancel()}else e.cancel()}}}else if(s===i.blend){const e=Zt(t.target,t.property,"_add"),s=(t=>{let e=kt.animation;return e||(e={duration:c,computeDeltaTime:_,_offset:0,_delay:0,_head:null,_tail:null},kt.animation=e,kt.update=()=>{t.forEach((t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?gt(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}})),xt(e,1,1,0,2)}),e})(Gt._add);let r=e._head;r||(r={...t},r._composition=i.replace,r._updateDuration=c,r._startTime=0,r._numbers=gt(t._fromNumbers),r._number=0,r._next=null,r._prev=null,bt(e,r),bt(s,r));const n=t._toNumber;if(t._fromNumber=r._fromNumber-n,t._toNumber=0,t._numbers=gt(t._fromNumbers),t._number=0,r._fromNumber=n,t._toNumbers){const e=gt(t._toNumbers);e&&e.forEach(((e,s)=>{t._fromNumbers[s]=r._fromNumbers[s]-e,t._toNumbers[s]=0})),r._fromNumbers=e}bt(e,t,null,"_prevAdd","_nextAdd")}return t},ee=t=>{const e=t._composition;if(e!==i.none){const s=t.target,r=t.property,n=Gt._rep.get(s)[r];if(vt(n,t,"_prevRep","_nextRep"),e===i.blend){const e=Gt._add,i=e.get(s);if(!i)return;const n=i[r],o=kt.animation;vt(n,t,"_prevAdd","_nextAdd");const h=n._head;if(h&&h===n._tail){vt(n,h,"_prevAdd","_nextAdd"),vt(o,h);let t=!0;for(let e in i)if(i[e]._head){t=!1;break}t&&e.delete(s)}}}return t},se=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),ie=t=>t._cancelled?(t._hasChildren?yt(t,ie):yt(t,(t=>{t._composition!==i.none&&te(t,Zt(t.target,t.property))})),t._cancelled=0,t):t;let re=0;class ne extends wt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:h,loop:a,loopDelay:l,autoplay:d,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:v,onUpdate:b}=t;B.current&&B.current.register(this);const T=e?0:Bt._elapsedTime,w=e?e.defaults:L.defaults,x=Y(r)||X(r)?w.delay:+r,S=Y(n)||X(n)?1/0:+n,k=zt(a,w.loop),$=zt(l,w.loopDelay),E=!0===k||k===1/0||k<0?1/0:k+1;let C=0;if(e)C=s;else{let t=F();Bt.paused&&(Bt.requestTick(t),t=Bt._elapsedTime),C=t-Bt._startTime}this.id=X(i)?++re:i,this.parent=e,this.duration=mt((S+$)*E-$)||c,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||w.onBegin,this.onBeforeUpdate=v||w.onBeforeUpdate,this.onUpdate=b||w.onUpdate,this.onLoop=f||w.onLoop,this.onPause=g||w.onPause,this.onComplete=m||w.onComplete,this.iterationDuration=S,this.iterationCount=E,this._autoplay=!e&&zt(d,w.autoplay),this._offset=C,this._delay=x,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=_,this._running=!1,this._reversed=+zt(o,w.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=zt(h,w.alternate),this._prev=null,this._next=null,this._elapsedTime=T,this._startTime=T,this._lastTime=T,this._fps=zt(u,w.frameRate),this._speed=zt(p,w.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(1).play()}get currentTime(){return ht(lt(this._currentTime,L.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return lt(this._iterationTime,L.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ht(lt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ht(lt(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ht(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=0){return ie(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,St(this,0,1,t,2),se(this),this._hasChildren&&yt(this,se),this}init(t=0){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&St(this,this.duration,1,t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!X(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Bt._speed);return this._startTime=F()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=c&&!this._hasChildren?St(this,c,0,0,2):(this._running||(bt(Bt,this),Bt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Bt.wake()),this):this}restart(){return this.reset(0).resume()}seek(t,e=0,s=0){ie(this),this.completed=!1;const i=this.paused;return this.paused=!0,St(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?et(d/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?yt(this,(t=>t.cancel()),!0):yt(this,ee),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=ft(t);if(e===s)return this;const i=t/e,r=t<=c;return this.duration=r?c:s,this.iterationDuration=r?c:ft(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){St(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const oe=t=>new ne(t,null,0).init(),he=t=>t,ae=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,le=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?he:r=>0===r||1===r?r:ae(((t,e,s)=>{let i,r,n=0,o=1,h=0;do{r=n+(o-n)/2,i=ae(r,e,s)-t,i>0?o=r:n=r}while(J(i)>1e-7&&++h<100);return r})(r,t,s),e,i),ce=(t=10,e)=>{const s=e?tt:et;return e=>s(ht(e,0,1)*t)*(1/t)},de=(...t)=>{const e=t.length;if(!e)return he;const s=e-1,i=t[0],r=t[s],n=[0],o=[q(i)];for(let e=1;e<s;e++){const i=t[e],r=R(i)?i.trim().split(" "):[i],h=r[0],a=r[1];n.push(X(a)?e/s:q(a)/100),o.push(q(h))}return o.push(q(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},ue=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(ht(o,r,1))}return s.push(1),de(...s)},pe=nt/2,me=2*nt,fe=(t=1.68)=>e=>Q(e,+t),ge={[p]:fe,Quad:fe(2),Cubic:fe(3),Quart:fe(4),Quint:fe(5),Sine:t=>1-Z(t*pe),Circ:t=>1-j(1-t*t),Expo:t=>t?Q(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=Q(2,--s))-1)/11;);return 1/Q(4,3-s)-7.5625*Q((3*e-2)/22-t,2)},Back:(t=1.70158)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ht(+t,1,10),i=ht(+e,c,2),r=i/me*st(1/s),n=me/i;return t=>0===t||1===t?t:-s*Q(2,-10*(1-t))*G((1-t-r)*n)}},_e={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},ye=(t,e,s)=>{if(s[t])return s[t];if(t.indexOf("(")<=-1){const i=_e[t]||t.includes("Back")||t.includes("Elastic")?e[t]():e[t];return i?s[t]=i:he}{const i=t.slice(0,-1).split("("),r=e[i[0]];return r?s[t]=r(...i[1].split(",")):he}},ve=(()=>{const t={linear:de,irregular:ue,steps:ce,cubicBezier:le};for(let e in _e)for(let s in ge){const i=ge[s],r=_e[e];t[e+s]=s===p||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),be={linear:he},Te=t=>Y(t)?t:R(t)?ye(t,ve,be):he,we={},xe=(t,e,s)=>{if(3===s)return m.get(t)||t;if(2===s||1===s&&I(e)&&t in e.style){const e=we[t];if(e)return e;{const e=t?N(t):t;return we[t]=e,e}}return t},Se={deg:1,rad:180/nt,turn:360},ke={},$e=(t,e,i,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===i)return e;const h=o+n+i,a=ke[h];if(X(a)||r){let r;if(n in Se)r=o*Se[n]/Se[i];else{const e=100,h=t.cloneNode(),a=t.parentNode,l=a&&a!==s?a:s.body;l.appendChild(h);const c=h.style;c.width=e+n;const d=h.offsetWidth||e;c.width=e+i;const u=d/(h.offsetWidth||e);l.removeChild(h),r=u*o}e.n=r,ke[h]=r}else e.n=a;return e.t,e.u=i,e},Ee=t=>{if(t._hasChildren)yt(t,Ee,!0);else{const e=t;e.pause(),yt(e,(t=>{const s=t.property,i=t.target;if(i[n]){const r=i.style,n=e._inlineStyles[s];if(3===t._tweenType){const e=i[h];if(X(n)||n===p?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=p;for(let s in e)t+=g[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else X(n)||n===p?r.removeProperty(s):r[s]=n;e._tail===t&&e.targets.forEach((t=>{t.getAttribute&&t.getAttribute("style")===p&&t.removeAttribute("style")}))}}))}return t},Ce={t:0,n:0,u:null,o:null,d:null,s:null},Be={t:0,n:0,u:null,o:null,d:null,s:null},Le={func:null},De=[null],Ne=[null,null],Ae={to:null};let Fe,Oe,Pe=0;class Me extends ne{constructor(t,e,s,r,n=!1,o=0,h=0){super(e,s,r);const a=Ft(t),l=a.length,d=e.keyframes,p=d?_t(((t,e)=>{const s={};if(O(t)){const e=[].concat(...t.map((t=>Object.keys(t)))).filter(U);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map((t=>{const e={};for(let s in t){const i=t[s];U(s)?s===r&&(e.to=i):e[s]=i}return e}));s[r]=n}}else{const i=zt(e.duration,L.defaults.duration),r=Object.keys(t).map((e=>({o:parseFloat(e)/100,p:t[e]}))).sort(((t,e)=>t.o-e.o));r.forEach((t=>{const e=t.o,r=t.p;for(let t in r)if(U(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let h=n.length,a=n[h-1];const l={to:r[t]};let c=0;for(let t=0;t<h;t++)c+=n[t].duration;1===h&&(l.from=a.to),r.ease&&(l.ease=r.ease),l.duration=o-(h?c:0),n.push(l)}return t}));for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s})(d,e),e):e,{delay:m,duration:f,ease:g,playbackEase:_,modifier:y,composition:v,onRender:b}=p,T=s?s.defaults:L.defaults,w=zt(_,T.playbackEase),x=w?Te(w):null,S=!X(g)&&!X(g.ease),k=S?g.ease:zt(g,x?"linear":T.ease),$=S?g.duration:zt(f,T.duration),E=zt(m,T.delay),C=y||T.modifier,B=X(v)&&l>=u?i.none:X(v)?T.composition:v,D={},N=this._offset+(s?s._offset:0);let A=NaN,F=NaN,R=0,Y=0;for(let t=0;t<l;t++){const e=a[t],r=o||t,d=h||l;let u=NaN,m=NaN;for(let t in p)if(U(t)){const o=Wt(e,t),h=xe(t,e,o);let a=p[t];const l=O(a);if(n&&!l&&(Ne[0]=a,Ne[1]=a,a=Ne),l){const t=a.length,e=!P(a[0]);2===t&&e?(Ae.to=a,De[0]=Ae,Fe=De):t>2&&e?(Fe=[],a.forEach(((t,e)=>{e?1===e?(Ne[1]=t,Fe.push(Ne)):Fe.push(t):Ne[0]=t}))):Fe=a}else De[0]=a,Fe=De;let f=null,g=null,_=NaN,y=0,v=0;for(let t=Fe.length;v<t;v++){const n=Fe[v];P(n)?Oe=n:(Ae.to=n,Oe=Ae),Le.func=null;const a=It(Oe.to,e,r,d,Le);let l;P(a)&&!X(a.to)?(Oe=a,l=a.to):l=a;const u=It(Oe.from,e,r,d),p=Oe.ease,m=!X(p)&&!X(p.ease),b=m?p.ease:p||k,T=m?p.duration:It(zt(Oe.duration,t>1?It($,e,r,d)/t:$),e,r,d),w=It(zt(Oe.delay,v?0:E),e,r,d),x=It(zt(Oe.composition,B),e,r,d),S=M(x)?x:i[x],L=Oe.modifier||C,A=!X(u),F=!X(l),z=O(l),I=z||A&&F,W=g?y+w:w,V=N+W;Y||!A&&!z||(Y=1);let H=g;if(S!==i.none){f||(f=Zt(e,h));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(H=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)Kt(t),t=t._nextRep}if(I?(qt(z?It(l[0],e,r,d):u,Ce),qt(z?It(l[1],e,r,d,Le):l,Be),0===Ce.t&&(H?1===H._valueType&&(Ce.t=1,Ce.u=H._unit):(qt(Ht(e,h,o,D),jt),1===jt.t&&(Ce.t=1,Ce.u=jt.u)))):(F?qt(l,Be):g?Qt(g,Be):qt(s&&H&&H.parent.parent===s?H._value:Ht(e,h,o,D),Be),A?qt(u,Ce):g?Qt(g,Ce):qt(s&&H&&H.parent.parent===s?H._value:Ht(e,h,o,D),Ce)),Ce.o&&(Ce.n=Ut(H?H._toNumber:qt(Ht(e,h,o,D),jt).n,Ce.n,Ce.o)),Be.o&&(Be.n=Ut(Ce.n,Be.n,Be.o)),Ce.t!==Be.t)if(3===Ce.t||3===Be.t){const t=3===Ce.t?Ce:Be,e=3===Ce.t?Be:Ce;e.t=3,e.s=gt(t.s),e.d=t.d.map((()=>e.n))}else if(1===Ce.t||1===Be.t){const t=1===Ce.t?Ce:Be,e=1===Ce.t?Be:Ce;e.t=1,e.u=t.u}else if(2===Ce.t||2===Be.t){const t=2===Ce.t?Ce:Be,e=2===Ce.t?Be:Ce;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(Ce.u!==Be.u){let t=Be.u?Ce:Be;t=$e(e,t,Be.u?Be.u:Ce.u,!1)}if(Be.d&&Ce.d&&Be.d.length!==Ce.d.length){const t=Ce.d.length>Be.d.length?Ce:Be,e=t===Ce?Be:Ce;e.d=t.d.map(((t,s)=>X(e.d[s])?0:e.d[s])),e.s=gt(t.s)}const U=lt(+T||c,12),q={parent:this,id:Pe++,property:h,target:e,_value:null,_func:Le.func,_ease:Te(b),_fromNumbers:gt(Ce.d),_toNumbers:gt(Be.d),_strings:gt(Be.s),_fromNumber:Ce.n,_toNumber:Be.n,_numbers:gt(Ce.d),_number:Ce.n,_unit:Be.u,_modifier:L,_currentTime:0,_startTime:W,_delay:+w,_updateDuration:U,_changeDuration:U,_absoluteStartTime:V,_tweenType:o,_valueType:Be.t,_composition:S,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};S!==i.none&&te(q,f),isNaN(_)&&(_=q._startTime),y=lt(W+U,12),g=q,R++,bt(this,q)}(isNaN(F)||_<F)&&(F=_),(isNaN(A)||y>A)&&(A=y),3===o&&(u=R-v,m=R)}if(!isNaN(u)){let t=0;yt(this,(e=>{t>=u&&t<m&&(e._renderTransforms=1,e._composition===i.blend&&yt(kt.animation,(t=>{t.id===e.id&&(t._renderTransforms=1)}))),t++}))}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),F?(yt(this,(t=>{t._startTime-t._delay||(t._delay-=F),t._startTime-=F})),A-=F):F=0,A||(A=c,this.iterationCount=0),this.targets=a,this.duration=A===c?c:mt((A+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=b||T.onRender,this._ease=x,this._delay=F,this.iterationDuration=A,this._inlineStyles=D,!this._autoplay&&Y&&this.onRender(this)}stretch(t){const e=this.duration;if(e===ft(t))return this;const s=t/e;return yt(this,(t=>{t._updateDuration=ft(t._updateDuration*s),t._changeDuration=ft(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s})),super.stretch(t)}refresh(){return yt(this,(t=>{const e=t._func;if(e){const s=Ht(t.target,t.property,t._tweenType);qt(s,jt),qt(e(),Be),t._fromNumbers=gt(jt.d),t._fromNumber=jt.n,t._toNumbers=gt(Be.d),t._strings=gt(Be.s),t._toNumber=Be.n}})),this}revert(){return super.revert(),Ee(this)}then(t){return super.then(t)}}const Re=(t,e)=>new Me(t,e,null,0,!1).init(),Ye=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(t(i/e));return`linear(${s.join(", ")})`},Xe={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},ze=(()=>{const t={};for(let e in _e)t[e]=t=>_e[e](fe(t));return t})(),Ie=t=>{let e=Xe[t];if(e)return e;if(e="linear",R(t)){if(A(t,"linear")||A(t,"cubic-")||A(t,"steps")||A(t,"ease"))e=t;else if(A(t,"cubicB"))e=N(t);else{const s=ye(t,ze,Xe);Y(s)&&(e=s===he?"linear":Ye(s))}Xe[t]=e}else if(Y(t)){const s=Ye(t);s&&(e=s)}else t.ease&&(e=Ye(t.ease));return e},We=["x","y","z"],Ve=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...We],He=(()=>[...We,...f.filter((t=>["X","Y","Z"].some((e=>t.endsWith(e)))))])();let Ue=null;const qe={_head:null,_tail:null},Qe=(t,e,s)=>{let i=qe._head;for(;i;){const r=i._next,n=i.$el===t,o=!e||i.property===e,h=!s||i.parent===s;if(n&&o&&h){const t=i.animation;try{t.commitStyles()}catch{}t.cancel(),vt(qe,i);const e=i.parent;e&&(e._completed++,e.animations.length===e._completed&&(e.completed=!0,e.muteCallbacks||(e.paused=!0,e.onComplete(e),e._resolve(e))))}i=r}},je=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),Qe(e,s),bt(qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const h=()=>{Qe(e,s,t)};return n.onremove=h,n.onfinish=h,n},Ge=(t,e,s,i,r)=>{let n=It(e,s,i,r);return M(n)?Ve.includes(t)||A(t,"translate")?`${n}px`:A(t,"rotate")||A(t,"skew")?`${n}deg`:`${n}`:n},Ze=(t,e,s,i,r,n)=>{let o="0";const h=X(i)?getComputedStyle(t)[e]:Ge(e,i,t,r,n);return o=X(s)?O(i)?i.map((s=>Ge(e,s,t,r,n))):h:[Ge(e,s,t,r,n),h],o};class Je{constructor(e,s){B.current&&B.current.register(this),z(Ue)&&(!t||!X(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(f.forEach((t=>{const e=A(t,"skew"),s=A(t,"scale"),i=A(t,"rotate"),r=A(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}})),Ue=!0):Ue=!1);const i=Ft(e),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=zt(s.ease,Ie(L.defaults.ease)),o=n.ease&&n,a=zt(s.autoplay,L.defaults.autoplay),l=!(!a||!a.link)&&a,c=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,y=zt(s.loop,L.defaults.loop),v=!0===y||y===1/0?1/0:M(y)?y+1:1,b=c?d?"alternate-reverse":"alternate":d?"reverse":"normal",T=Ie(n),w=1===L.timeScale?1:u;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||_,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==l,this.reversed=d,this.autoplay=a,this._speed=zt(s.playbackRate,L.defaults.playbackRate),this._resolve=_,this._completed=0,this._inlineStyles=i.map((t=>t.getAttribute("style"))),i.forEach(((t,e)=>{const i=t[h],a=He.some((t=>s.hasOwnProperty(t))),l=(o?o.duration:It(zt(s.duration,L.defaults.duration),t,e,r))*w,c=It(zt(s.delay,L.defaults.delay),t,e,r)*w,d=zt(s.composition,"replace");for(let o in s){if(!U(o))continue;const h={},u={iterations:v,direction:b,fill:"forwards",easing:T,duration:l,delay:c,composite:d},p=s[o],g=!!a&&(f.includes(o)?o:m.get(o));let _;if(P(p)){const s=p,a=zt(s.ease,n),m=a.ease&&a,f=s.to,y=s.from;if(u.duration=(m?m.duration:It(zt(s.duration,l),t,e,r))*w,u.delay=It(zt(s.delay,c),t,e,r)*w,u.composite=zt(s.composition,d),u.easing=Ie(a),_=Ze(t,o,y,f,e,r),g?(h[`--${g}`]=_,i[g]=_):h[o]=Ze(t,o,y,f,e,r),je(this,t,o,h,u),!X(y))if(g){const e=`--${g}`;t.style.setProperty(e,h[e][0])}else t.style[o]=h[o][0]}else _=O(p)?p.map((s=>Ge(o,s,t,e,r))):Ge(o,p,t,e,r),g?(h[`--${g}`]=_,i[g]=_):h[o]=_,je(this,t,o,h,u)}if(a){let e=p;for(let t in i)e+=`${g[t]}var(--${t})) `;t.style.transform=e}})),l&&this.autoplay.link(this)}forEach(t){const e=R(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach((e=>e.playbackRate=t))}get currentTime(){const t=this.controlAnimation,e=L.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===L.timeScale?1:u);this.forEach((t=>{e>=this.duration&&t.play(),t.currentTime=e}))}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach((e=>e.currentTime=t*this.duration||0))}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach(((t,e)=>t.setAttribute("style",this._inlineStyles[e]))),this}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const Ke={animate:(t,e)=>new Je(t,e),convertEase:Ye},ts=(t=_)=>new ne({duration:1*L.timeScale,onComplete:t},null,0).resume();function es(t,e,s){const i=Ft(t);if(!i.length)return;const[r]=i,n=Wt(r,e),o=xe(e,r,n);let h=Ht(r,o);if(X(s))return h;if(qt(h,jt),0===jt.t||1===jt.t){if(!1===s)return jt.n;{const t=$e(r,jt,s,!1);return`${lt(t.n,L.precision)}${t.u}`}}}const ss=(t,e)=>{if(!X(e))return e.duration=c,e.composition=zt(e.composition,i.none),new Me(t,e,null,0,!0).resume()},is=(t,e,s)=>{let i=!1;return yt(e,(r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,h=xe(s,n,o);(!h||h&&h===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),vt(e,r),ee(r),i=!0)}}),!0),i},rs=(t,e,s)=>{const i=At(t),r=e||Bt,n=e&&e.controlAnimation&&e;for(let t=0,e=i.length;t<e;t++){const e=i[t];Qe(e,s,n)}let o;if(r._hasChildren){let e=0;yt(r,(n=>{if(!n._hasChildren)if(o=is(i,n,s),o&&!n._head)n.cancel(),vt(r,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?rs(t,n,s):n._hasChildren=!1}),!0),X(r.iterationDuration)||(r.iterationDuration=e)}else o=is(i,r,s);return o&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),i},ns=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),os=(t,e,s,i)=>{let r=u/L.defaults.frameRate;if(!1!==i){const t=i||Bt._hasChildren&&Bt;t&&t.deltaTime&&(r=t.deltaTime)}const n=1-Math.exp(-s*r*.1);return s?1===s?e:(1-n)*t+n*e:t},hs=t=>(...e)=>{const s=t(...e);return new Proxy(_,{apply:(t,e,[i])=>s(i),get:(t,e)=>hs(((...t)=>{const i=ls[e](...t);return t=>i(s(t))}))})},as=(t,e=0)=>(...s)=>(s.length<t.length?hs(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(t,e)):t)(...s),ls={$:Ft,get:es,set:ss,remove:rs,cleanInlineStyles:Ee,random:ut,randomPick:t=>t[ut(0,t.length-1)],shuffle:pt,lerp:os,sync:ts,keepTime:Tt,clamp:as(ht),round:as(lt),snap:as(ct),wrap:as(((t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e)),interpolate:as(dt,1),mapRange:as(ns),roundPad:as(((t,e)=>(+t).toFixed(e))),padStart:as(((t,e,s)=>`${t}`.padStart(e,s))),padEnd:as(((t,e,s)=>`${t}`.padEnd(e,s))),degToRad:as((t=>t*nt/180)),radToDeg:as((t=>180*t/nt))},cs=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),X(e))return s;if(M(+e))return+e;const i=e,r=t?t.labels:null,n=!z(r),o=((t,e)=>{if(A(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),h=!X(o),a=E.exec(i);if(a){const t=a[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=h?o:n?l:s,d=+e[1];return Ut(c,d,t[0])}return h?o:n?X(r[i])?s:r[i]:s};function ds(t,e,s,i,r,n){const o=M(t.duration)&&t.duration<=c?s-c:s;St(e,o,1,1,1);const h=i?new Me(i,t,e,o,!1,r,n):new ne(t,e,o);return h.init(1),bt(e,h),yt(e,(t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)})),e.duration=function(t){return mt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}class us extends ne{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=L.defaults;this.defaults=e?_t(e,s):s,this.onRender=t.onRender||s.onRender;const i=zt(t.playbackEase,s.playbackEase);this._ease=i?Te(i):null,this.iterationDuration=0}add(t,e,s){const i=P(e),r=P(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(Y(s)){const e=s,r=At(t),n=this.duration,o=this.iterationDuration,h=i.id;let a=0;const l=r.length;r.forEach((t=>{const s={...i};this.duration=n,this.iterationDuration=o,X(h)||(s.id=h+"-"+a),ds(s,this,e(t,a,l,this),t,a,l),a++}))}else ds(i,this,cs(this,s),t)}else ds(t,this,cs(this,e));return this.init(1)}}sync(t,e){if(X(t)||t&&X(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return X(e)?this:(e.duration=c,e.composition=i.replace,this.add(t,e,s))}call(t,e){return X(t)||t&&!Y(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return X(t)||t&&!R(t)||(this.labels[t]=cs(this,e)),this}remove(t,e){return rs(t,this,e),this}stretch(t){const e=this.duration;if(e===ft(t))return this;const s=t/e,i=this.labels;yt(this,(t=>t.stretch(t.duration*s)));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return yt(this,(t=>{t.refresh&&t.refresh()})),this}revert(){return super.revert(),yt(this,(t=>t.revert),!0),Ee(this)}then(t){return super.then(t)}}const ps=t=>new us(t).init();class ms{constructor(t,e){B.current&&B.current.register(this);const s={},r={};if(this.targets=[],this.animations={},!X(t)&&!X(e)){for(let t in e){const i=e[t];U(t)?r[t]=i:s[t]=i}for(let e in r){const n=r[e],o=P(n);let h={},a="+=0";if(o){const t=n.unit;R(t)&&(a+=t)}else h.duration=n;h[e]=o?_t({to:a},n):a;const l=_t(s,h);l.composition=i.replace,l.autoplay=!1;const c=this.animations[e]=new Me(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(X(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return yt(c,(e=>{if(O(t))for(let s=0,i=t.length;s<i;s++)X(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;X(s)||(e._ease=Te(s)),e._currentTime=0})),X(e)||c.stretch(e),c.reset(1).resume(),this}}}}revert(){for(let t in this.animations)this[t]=_,this.animations[t].revert();return this.animations={},this.targets.length=0,this}}const fs=(t,e)=>new ms(t,e);class gs{constructor(t={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/u,this.maxIterations=this.maxDuration/this.timeStep/u,this.m=ht(zt(t.mass,1),0,u),this.s=ht(zt(t.stiffness,100),1,u),this.d=ht(zt(t.damping,10),.1,u),this.v=ht(zt(t.velocity,0),-1e3,u),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>0===t||1===t?t:this.solve(t*this.solverDuration)}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?K(-n*e*s)*(1*Z(i*n)+r*G(i*n)):(1+r*n)*K(-n*s),1-n}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:h}=this,a=this.w0=ht(j(o/r),c,u),l=this.zeta=n/(2*j(o*r)),d=this.wd=l<1?a*j(1-l*l):0;this.b=l<1?(l*a-h)/d:-h+a;let p=0,m=0,f=0;for(;m<t&&f<e;)J(1-this.solve(p))<s?m++:m=0,this.solverDuration=p,p+=i,f++;this.duration=lt(this.solverDuration*u,0)*L.timeScale}get mass(){return this.m}set mass(t){this.m=ht(zt(t,1),0,u),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ht(zt(t,100),1,u),this.compute()}get damping(){return this.d}set damping(t){this.d=ht(zt(t,10),.1,u),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ht(zt(t,0),-1e3,u),this.compute()}}const _s=t=>new gs(t),ys=t=>{t.cancelable&&t.preventDefault()};class vs{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:_,remove:_}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class bs{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp((e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}})),t}remove(){this.traverseUp(((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"}))}revert(){this.traverseUp(((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s}))}}const Ts=(t,e)=>t&&Y(t)?t(e):t;let ws=0;class xs{constructor(t,i={}){if(!t)return;B.current&&B.current.register(this);const r=i.x,n=i.y,o=i.trigger,h=i.modifier,a=i.releaseEase,l=a&&Te(a),c=!X(a)&&!X(a.ease),u=P(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=P(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=Ts(i.container,this);this.containerArray=O(m)?m:null,this.$container=m&&!this.containerArray?At(m)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=P(t)?new vs(t):At(t)[0],this.$trigger=At(o||t)[0],this.fixed="fixed"===es(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?a:_s({mass:zt(i.releaseMass,1),stiffness:zt(i.releaseStiffness,80),damping:zt(i.releaseDamping,20)}),this.releaseYSpring=c?a:_s({mass:zt(i.releaseMass,1),stiffness:zt(i.releaseStiffness,80),damping:zt(i.releaseDamping,20)}),this.releaseEase=l||ve.outQuint,this.hasReleaseSpring=c,this.onGrab=i.onGrab||_,this.onDrag=i.onDrag||_,this.onRelease=i.onRelease||_,this.onUpdate=i.onUpdate||_,this.onSettle=i.onSettle||_,this.onSnap=i.onSnap||_,this.onResize=i.onResize||_,this.onAfterResize=i.onAfterResize||_,this.disabled=[0,0];const f={};if(h&&(f.modifier=h),X(r)||!0===r)f[u]=0;else if(P(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===r&&(f[u]=0,this.disabled[0]=1);if(X(n)||!0===n)f[p]=0;else if(P(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new ms(this.$target,f),this.xProp=u,this.yProp=p,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,d,d,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=F(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new bs(this.$target),this.overshootCoords={x:0,y:0},this.overshootXTicker=new ne({autoplay:!1},null,0).init(),this.overshootYTicker=new ne({autoplay:!1},null,0).init(),this.updateTicker=new ne({autoplay:!1},null,0).init(),this.overshootXTicker.onUpdate=()=>{this.disabled[0]||(this.updated=!0,this.manual=!0,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootXTicker.onComplete=()=>{this.disabled[0]||(this.manual=!1,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootYTicker.onUpdate=()=>{this.disabled[1]||(this.updated=!0,this.manual=!0,this.animate[this.yProp](this.overshootCoords.y,0))},this.overshootYTicker.onComplete=()=>{this.disabled[1]||(this.manual=!1,this.animate[this.yProp](this.overshootCoords.y,0))},this.updateTicker.onUpdate=()=>this.update(),this.contained=!X(m),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?u:p,this.animate.animations[this.activeProp].onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=rt(n,r)):this.updated=!1},this.animate.animations[this.activeProp].onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ne({autoplay:!1,duration:150*L.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver((()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0})),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),P(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=F(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,h=this.minVelocity,a=this.maxVelocity,l=this.velocityStackIndex;n[l]=lt(ht(j(t*t+e*e)/r*o,h,a),5);const c=it(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=lt(t,5);return this.overshootXTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=ct(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=lt(t,5);return this.overshootYTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=ct(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return lt(this.animate[this.xProp](),L.precision)}set x(t){this.setX(t,!1)}get y(){return lt(this.animate[this.yProp](),L.precision)}set y(t){this.setY(t,!1)}get progressX(){return ns(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ns(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ns(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ns(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=lt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=lt(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,h=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-h,this.scrollBounds[1]=t-this.targetBounds[1]-r+h,this.scrollBounds[2]=s-this.targetBounds[2]-n+h,this.scrollBounds[3]=t-this.targetBounds[3]+o-h}updateBoundingValues(){const t=this.$container,i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const h=this.window[0]=e.innerWidth,a=this.window[1]=e.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,_]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ht(c,h,c):c,this.scrollView[1]=l?ht(d,a,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:T,right:w,bottom:x}=t.getBoundingClientRect();this.dragArea[2]=lt(l?ht(y,h,h):y,0),this.dragArea[3]=lt(l?ht(v,a,a):v,0);const S=es(t,"overflow"),k="visible"===S,$="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===s.body&&k||!$&&!k)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!O(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-y:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=lt(r.top+s-(l?0:T),0),this.targetBounds[1]=lt(r.right+e-(l?h:w),0),this.targetBounds[2]=lt(r.bottom+s-(l?a:x),0),this.targetBounds[3]=lt(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+_):(this.containerBounds[0]=-lt(r.top-(u?ht(T,0,a):T)+o-m,0),this.containerBounds[1]=-lt(r.right-(u?ht(w,0,h):w)-c+f,0),this.containerBounds[2]=-lt(r.bottom-(u?ht(x,0,a):x)-d+g,0),this.containerBounds[3]=-lt(r.left-(u?ht(b,0,h):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[h,a]=this.disabled,l=!h&&e<o||!h&&e>r,c=!a&&s<i||!a&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Ts(t.container,this),o=Ts(t.containerPadding,this)||0,h=O(o)?o:[o,o,o,o],a=this.x,l=this.y,c=Ts(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}this.containerArray=O(n)?n:null,this.$container=n&&!this.containerArray?At(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=zt(h,[0,0,0,0]),this.containerFriction=ht(zt(Ts(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ht(zt(Ts(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ts(P(i)&&!X(i.snap)?i.snap:t.snap,this),this.snapY=Ts(P(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=zt(Ts(t.scrollSpeed,this),1.5),this.scrollThreshold=zt(Ts(t.scrollThreshold,this),20),this.dragSpeed=zt(Ts(t.dragSpeed,this),1),this.minVelocity=zt(Ts(t.minVelocity,this),0),this.maxVelocity=zt(Ts(t.maxVelocity,this),50),this.velocityMultiplier=zt(Ts(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[u,p,m,f]=this.containerBounds;this.setX(ht(a,f,p),!0),this.setY(ht(l,u,m),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],h=this.dragArea[3],a=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?ht(c,this.window[0],c):c,p=this.useWin?ht(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,_=this.scrollThreshold,[y,v]=this.coords,[b,T,w,x]=this.scrollBounds,S=lt(ht((v-b+t)/_,-1,0)*g,0),k=lt(ht((y-T-e)/_,0,1)*g,0),$=lt(ht((v-w-s)/_,0,1)*g,0),E=lt(ht((y-x+i)/_,-1,0)*g,0);if(S||$||E||k){const[t,e]=this.disabled;let s=a,i=l;t||(s=lt(ht(a+(E||k),0,r-o),0),this.coords[0]-=a-s),e||(i=lt(ht(l+(S||$),0,n-h),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(a-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,h,a,l]=this.pointer;this.coords[0]+=(r-a)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-a,n-l),this.angle=rt(n-h,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootXTicker.pause(),this.overshootYTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return rs(this,null,"x"),rs(this,null,"y"),rs(this,null,"progressX"),rs(this,null,"progressY"),rs(this.scroll),rs(this.overshootCoords),this}scrollInView(t,e=0,s=ve.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,h=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[a,l,c,u]=o,p=lt(ht(r-a,-1e12,0),0),m=lt(ht(i-l,0,d),0),f=lt(ht(r-c,0,d),0),g=lt(ht(i-u,-1e12,0),0);new Me(n,{x:lt(n.x+(g?g-e:m?m+e:0),0),y:lt(n.y+(p?p-e:f?f+e:0),0),duration:X(t)?350*L.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then((()=>{this.canScroll=h}))}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=ss(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=ve.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,h,a]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-h-e,u=this.scroll.x-this.targetBounds[3]+a+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=ht(ct(i,this.snapX),u,c),h=ht(ct(r,this.snapY),l,d),a=X(t)?350*L.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,a,s),n||2!==p&&3!==p||this.animate[this.yProp](h,a,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:h}=this.transforms.normalizePoint(r,n),[a,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<a?a+(m-a)/u:m:m,this.pointer[0]=o,this.pointer[1]=h,this.pointer[2]=o,this.pointer[3]=h,this.pointer[4]=o,this.pointer[5]=h,this.pointer[6]=o,this.pointer[7]=h,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=es(this.$target,"zIndex",!1);ws=(f>ws?f:ws)+1,this.targetStyles=ss(this.$target,{zIndex:ws}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=ss(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,ve.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],h=n-this.pointer[7];let a=t.target,l=!1,c=!1,d=!1;for(;e&&a&&a!==this.$trigger;){const t=es(a,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=a;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}a=a.parentNode}d&&(!l&&!c||l&&h<0||c&&h>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(ys(t),this.triggerStyles||(this.triggerStyles=ss(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ys,{passive:!1}),this.$trigger.addEventListener("touchmove",ys,{passive:!1}),this.$trigger.addEventListener("touchend",ys),(!this.disabled[0]&&J(o)>3||!this.disabled[1]&&J(h)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[r,n,o,h,a,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,_=this.releaseYSpring,y=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,w=this.y,x=this.computeVelocity(r-a,n-l),S=this.angle=rt(n-h,r-o),k=150*x,$=(1-this.releaseContainerFriction)*this.dragSpeed,E=T+Z(S)*k,C=w+G(S)*k,B=E>d?d+(E-d)*$:E<p?p+(E-p)*$:E,D=C>u?u+(C-u)*$:C<c?c+(C-c)*$:C,N=this.destX=ht(lt(ct(B,this.snapX),5),p,d),A=this.destY=ht(lt(ct(D,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,E,C);let O=0,P=0,M=y,R=y,Y=0;if(b.x=T,b.y=w,!t){const t=N===d?T>d?-1:1:T<p?-1:1,s=lt(T-N,0);g.velocity=e&&v?s?k*t/J(s):0:x;const{ease:i,duration:r,restDuration:n}=g;O=T===N?0:v?r:r-n*L.timeScale,v&&(M=i),O>Y&&(Y=O)}if(!e){const e=A===u?w>u?-1:1:w<c?-1:1,s=lt(w-A,0);_.velocity=t&&v?s?k*e/J(s):0:x;const{ease:i,duration:r,restDuration:n}=_;P=w===A?0:v?r:r-n*L.timeScale,v&&(R=i),P>Y&&(Y=P)}if(!v&&F&&$&&(O||P)){const t=i.blend;new Me(b,{x:{to:B,duration:.65*O},y:{to:D,duration:.65*P},ease:y,composition:t}).init(),new Me(b,{x:{to:N,duration:O},y:{to:A,duration:P},ease:y,composition:t}).init(),this.overshootXTicker.stretch(O).restart(),this.overshootYTicker.stretch(P).restart()}else t||this.animate[this.xProp](N,O,M),e||this.animate[this.yProp](A,P,R);this.scrollInView(Y,this.scrollThreshold,y);let X=!1;N!==m&&(this.snapped[0]=N,this.snapX&&(X=!0)),A!==f&&this.snapY&&(this.snapped[1]=A,this.snapY&&(X=!0)),X&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ys),this.$trigger.removeEventListener("touchmove",ys),this.$trigger.removeEventListener("touchend",ys),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=ss(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.stop(),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootXTicker.revert(),this.overshootYTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":ys(t)}}}const Ss=(t,e)=>new xs(t,e);class ks{constructor(t={}){B.current&&B.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||At(i)[0]||s);const n=t.defaults,o=L.defaults,h=t.mediaQueries;if(this.defaults=n?_t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},h)for(let t in h){const s=e.matchMedia(h[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=B.current,s=B.root,i=L.defaults;B.current=this,B.root=this.root,L.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return B.current=e,B.root=s,L.defaults=i,n}refresh(){return this.onceIndex=0,this.execute((()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach((t=>{const e=t(this);Y(e)&&this.revertConstructors.push(e)}))})),this}add(t,e){if(this.once=!1,Y(t)){const e=t;this.constructors.push(e),this.execute((()=>{const t=e(this);Y(t)&&this.revertConstructors.push(t)}))}else this.methods[t]=(...t)=>this.execute((()=>e(...t)));return this}addOnce(t){if(this.once=!0,Y(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute((()=>{const t=s(this);Y(t)&&this.revertConstructorsOnce.push(t)}))}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(Y(s))return s(this);const i=Tt(t);let r;return this.constructorsOnce[e]=i,this.execute((()=>{r=i(this)})),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,h=s.length,a=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;h--;)s[h].revert();for(;a--;)i[a](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const $s=t=>new ks(t),Es=(t,e)=>t&&Y(t)?t(e):t,Cs=new Map;class Bs{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ne({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;yt(this,(t=>t.handleScroll()),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ne({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,h=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),h&&(this.backwardY=i>n),this.velocity=lt(e>0?Math.sqrt(o*o+h*h)/e:0,5)}}).init(),this.resizeTicker=new ne({autoplay:!1,duration:250*L.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ne({autoplay:!1,duration:500*L.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver((()=>this.resizeTicker.restart())),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=lt(t?e.scrollX:s.scrollLeft,0),this.scrollY=lt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=(()=>{const t=document.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e})()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=t.width,i=t.height,this.top=t.top,this.left=t.left}this.width=s,this.height=i}refreshScrollObservers(){yt(this,(t=>{t._debug&&t.removeDebug()})),this.updateBounds(),yt(this,(t=>{t.refresh(),t._debug&&t.debug()}))}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.unobserve(this.element),(this.useWin?e:this.element).removeEventListener("scroll",this),Cs.delete(this.element)}}const Ls=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,h="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:a,u:l}=qt(h,jt);let c=a;return"%"===l?c=a/100*s:l&&(c=$e(t,jt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Ds=(t,e,s,i,r)=>{let n;if(R(e)){const o=E.exec(e);if(o){const h=o[0],a=h[0],l=e.split(h),c="min"===l[0],d="max"===l[0],u=Ls(t,l[0],s,i,r),p=Ls(t,l[1],s,i,r);if(c){const e=Ut(Ls(t,"min",s),p,a);n=e<u?u:e}else if(d){const e=Ut(Ls(t,"max",s),p,a);n=e>u?u:e}else n=Ut(u,p,a)}else n=Ls(t,e,s,i,r)}else n=e;return lt(n,0)},Ns=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[n]){e=i;break}}return e};let As=0;const Fs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Os{constructor(t={}){B.current&&B.current.register(this);const e=zt(t.sync,"play pause"),i=e?Te(e):null,r=e&&("linear"===e||e===he),n=e&&!(i===he&&!r),o=e&&(M(e)||!0===e||r),h=e&&R(e)&&!n&&!o,a=h?e.split(" ").map((t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null})):null,l=h&&a.length>2;this.index=As++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&At(t)[0]||s.body;let i=Cs.get(e);return i||(i=new Bs(e),Cs.set(e,i)),i})(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!a,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=a&&!l&&a[0]?a[0]:_,this.onSyncLeave=a&&!l&&a[1]?a[1]:_,this.onSyncEnterForward=a&&l&&a[0]?a[0]:_,this.onSyncLeaveForward=a&&l&&a[1]?a[1]:_,this.onSyncEnterBackward=a&&l&&a[2]?a[2]:_,this.onSyncLeaveBackward=a&&l&&a[3]?a[3]:_,this.onEnter=t.onEnter||_,this.onLeave=t.onLeave||_,this.onEnterForward=t.onEnterForward||_,this.onLeaveForward=t.onLeaveForward||_,this.onEnterBackward=t.onEnterBackward||_,this.onLeaveBackward=t.onLeaveBackward||_,this.onUpdate=t.onUpdate||_,this.onSyncComplete=t.onSyncComplete||_,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=zt(t.debug,!1),this._next=null,this._prev=null,bt(this.container,this),ts((()=>{if(!this.reverted){if(!this.target){const e=At(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}}))}link(t){if(t&&(t.pause(),this.linked=t,!this._params.target)){let e;X(t.targets)?yt(t,(t=>{t.targets&&!e&&(e=Ns(t))})):e=Ns(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:lt(ht(t,0,1),6)}refresh(){this.reverted=!1;const t=this._params;return this.repeat=zt(Es(t.repeat,this),!0),this.horizontal="x"===zt(Es(t.axis,this),"y"),this.enter=zt(Es(t.enter,this),"end start"),this.leave=zt(Es(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),h=Fs[this.index%Fs.length],a=t.useWin,l=a?t.winWidth:t.width,c=a?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,_=e?g:15,y=e?60:g,v=e?y:_,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",w=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,x=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${x("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${x("sticky",0,0,e?l:g,e?g:c)}`,i||(n.style.cssText+=`background:\n ${w("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${w("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${x("relative",0,0,e?d:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${w("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${w("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const S=[" enter: "," leave: "];this.coords.forEach(((t,i)=>{const r=i>1,a=(r?0:this.offset)+t,m=i%2,f=a<v,g=a>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),w=s.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;w.innerHTML=`${this.id}${S[m]}${this.thresholds[i]}`,T.style.cssText=`${x("absolute",0,0,y,_)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${k}: 2px solid ${h};\n `,w.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${_};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?h:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":h};\n border: 2px solid ${m?h:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,T.appendChild(w);let E=a-$+(e?1:0);T.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(T)})),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===es(t.element,"position")&&(this.debugStyles=ss(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,h=e,a=0,l=0,c=h;n&&(o=n.currentTime,n.seek(0,!0));const d="static"===es(i.element,"position")&&ss(i.element,{position:"relative "});for(;h&&h!==i.element&&h!==s.body;){const e="sticky"===es(h,"position")&&ss(h,{position:"static"});h===c&&(a+=h.offsetLeft||0,l+=h.offsetTop||0,c=h.offsetParent),h=h.parentElement,e&&(t||(t=[]),t.push(e))}d&&d.revert();const u=r?a:l,p=r?e.offsetWidth:e.offsetHeight,m=r?i.width:i.height,f=(r?i.scrollWidth:i.scrollHeight)-m,g=this.enter,_=this.leave;let y="start",v="end",b="end",T="start";if(R(g)){const t=g.split(" ");b=t[0],y=t.length>1?t[1]:y}else if(P(g)){const t=g;X(t.container)||(b=t.container),X(t.target)||(y=t.target)}else M(g)&&(b=g);if(R(_)){const t=_.split(" ");T=t[0],v=t.length>1?t[1]:v}else if(P(_)){const t=_;X(t.container)||(T=t.container),X(t.target)||(v=t.target)}else M(_)&&(T=_);const w=Ds(e,y,p),x=Ds(e,v,p),S=w+u-m,k=x+u-f,$=Ds(e,b,m,S,k),E=Ds(e,T,m,S,k),C=w+u-$,B=x+u-E,L=B-C;this.offsets[0]=a,this.offsets[1]=l,this.offset=u,this.offsetStart=C,this.offsetEnd=B,this.distance=L<=0?0:L,this.thresholds=[y,v,b,T],this.coords=[w,x,$,E],t&&t.forEach((t=>t.revert())),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,h=this.scroll,a=h<=this.offsetStart,l=h>=this.offsetEnd,c=!a&&!l,d=h===this.offsetStart||h===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(a&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&M(i)){if(i<1){const t=e<g&&1===g?1e-4:e>g&&!g?-1e-4:0;g=lt(os(e,g,dt(.01,.2,i),!1)+t,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return vt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const Ps=(t={})=>new Os(t),Ms=!X(Intl)&&Intl.Segmenter,Rs=/\{value\}/g,Ys=/\{i\}/g,Xs=/(\s+)/,zs=/^\s+$/,Is="line",Ws="word",Vs="char",Hs="data-line";let Us=null,qs=null,Qs=null;const js=t=>t.isWordLike||" "===t.segment||M(+t.segment),Gs=t=>t.setAttribute("aria-hidden","true"),Zs=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Js={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Ks=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Ks(e)}},ti=(t,e,s)=>{const i=t.getAttribute(Hs);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)ti(t.children[r],e,s);return s},ei=(t,e={})=>{let s="";const i=R(e.class)?` class="${e.class}"`:"",r=zt(e.clone,!1),n=zt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},si=(t,e,s,i,r,n,o,h,a)=>{const l=r===Is,c=r===Vs,d=`_${r}_`,u=Y(t)?t(s):t,p=l?"block":"inline-block";Qs.innerHTML=u.replace(Rs,`<i class="${d}"></i>`).replace(Ys,`${c?a:l?o:h}`);const m=Qs.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,_=m.querySelectorAll(`i.${d}`),y=_.length;if(y){f.style.display=p,g.style.display=p,g.setAttribute(Hs,`${o}`),l||(g.setAttribute("data-word",`${h}`),c&&g.setAttribute("data-char",`${a}`));let t=y;for(;t--;){const e=_[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${Js[r]}`),f};class ii{constructor(e,i={}){Us||(Us=Ms?new Ms([],{granularity:Ws}):{segment:t=>{const e=[],s=t.split(Xs);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!zs.test(i)})}return e}}),qs||(qs=Ms?new Ms([],{granularity:"grapheme"}):{segment:t=>[...t].map((t=>({segment:t})))}),!Qs&&t&&(Qs=s.createElement("template")),B.current&&B.current.register(this);const{words:r,chars:n,lines:o,accessible:h,includeSpaces:a,debug:l}=i,c=(e=O(e)?e[0]:e)&&e.nodeType?e:(Nt(e)||[])[0],d=!0===o?{}:o,u=!0===r||X(r)?{}:r,p=!0===n?{}:n;this.debug=zt(l,!1),this.includeSpaces=zt(a,!1),this.accessible=zt(h,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=P(d)?ei(Is,d):d,this.wordTemplate=P(u)||this.linesOnly?ei(Ws,u):u,this.charTemplate=P(p)?ei(Vs,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())}),150)})),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!Y(t))return console.warn("Effect must return a function.");const e=Tt(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach((t=>Y(t)?t(this):t.revert&&t.revert())),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,i=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const h=[],a=this.words,l=this.chars,c=Us.segment(o),d=s.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=js(t);if(!u||s&&u&&js(u))h.push(e);else{const t=h.length-1;h[t].includes(" ")||e.includes(" ")?h.push(e):h[t]+=e}u=t}for(let t=0,o=h.length;t<o;t++){const o=h[t];if(o.trim()){const c=h[t+1],u=r&&c&&!c.trim(),p=o,m=i?qs.segment(p):null,f=i?s.createDocumentFragment():s.createTextNode(u?o+" ":o);if(i){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],h=e===r-1&&u?o.segment+" ":o.segment,c=s.createTextNode(h);si(i,l,c,f,Vs,n,-1,a.length,l.length)}}e?si(e,a,f,d,Ws,n,-1,a.length,l.length):i?d.appendChild(f):d.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,i=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,h="loading"!==s.fonts.status,a=r&&h;this.ready=!r||h,i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),a&&(this.effectsCleanups.forEach((t=>Y(t)&&t(this))),i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Zs(e,Ws))),o&&(a||n)&&(this.chars=Zs(e,Vs));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(Hs,`${d}`);const r=e.querySelectorAll(`[${Hs}]`);let n=r.length;for(;n--;)r[n].setAttribute(Hs,`${d}`);c=s}if(a){const t=s.createDocumentFragment(),i=new Set,h=[];for(let t=0;t<d+1;t++){const s=e.cloneNode(!0);ti(s,t,new Set).forEach((t=>{const e=t.parentElement;e&&i.add(e),t.remove()})),h.push(s)}i.forEach(Ks);for(let e=0,s=h.length;e<s;e++)si(r,this.lines,h[e],t,Is,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Zs(e,Ws)),o&&(this.chars=Zs(e,Vs))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if((a||t)&&this.effects.forEach(((t,e)=>this.effectsCleanups[e]=t(this))),this.accessible&&(a||!i)){const t=s.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(Gs),this.words.forEach(Gs),this.chars.forEach(Gs)}return this.width=e.offsetWidth,this}refresh(){this.split(!0)}}const ri={split:(t,e)=>new ii(t,e)},ni=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,h=!X(o),a=h&&!X(o.ease)?o.ease:h?Te(o):null,l=e.grid,c=e.axis,d=e.total,u=X(r)||0===r||"first"===r,m="center"===r,f="last"===r,g="random"===r,_=O(t),y=e.use,v=q(_?t[0]:t),b=_?q(t[1]):0,T=S.exec((_?t[1]:t)+p),w=e.start||0+(_?v:0);let x=u?0:M(r)?r:0;return(t,r,o,h)=>{const[u]=Ft(t),p=X(d)?o:d,S=!X(y)&&(Y(y)?y(u,r,p):Ht(u,y)),k=M(S)||R(S)&&M(+S)?+S:r;if(m&&(x=(p-1)/2),f&&(x=p-1),!s.length){for(let t=0;t<p;t++){if(l){const e=m?(l[0]-1)/2:x%l[0],i=m?(l[1]-1)/2:et(x/l[0]),r=e-t%l[0],n=i-et(t/l[0]);let o=j(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(J(x-t));i=it(...s)}a&&(s=s.map((t=>a(t/i)*i))),n&&(s=s.map((t=>c?t<0?-1*t:-t:J(i-t)))),g&&(s=pt(s))}const $=_?(b-v)/i:v;let E=(h?cs(h,X(e.start)?h.iterationDuration:w):w)+($*lt(s[k],2)||0);return e.modifier&&(E=e.modifier(E)),T&&(E=`${E}${T[2]}`),E}};export{ms as Animatable,xs as Draggable,Me as JSAnimation,ks as Scope,Os as ScrollObserver,gs as Spring,ii as TextSplitter,us as Timeline,ne as Timer,Je as WAAPIAnimation,Re as animate,fs as createAnimatable,Ss as createDraggable,$s as createScope,_s as createSpring,ps as createTimeline,oe as createTimer,ve as eases,Bt as engine,Ps as onScroll,Cs as scrollContainers,ni as stagger,Yt as svg,ri as text,ls as utils,Ke as waapi};
|