animejs 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/anime.esm.js +13 -8
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +13 -8
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +1 -1
- package/dist/modules/animatable/animatable.js +1 -1
- package/dist/modules/animatable/index.cjs +1 -1
- package/dist/modules/animatable/index.js +1 -1
- package/dist/modules/animation/additive.cjs +1 -1
- package/dist/modules/animation/additive.js +1 -1
- package/dist/modules/animation/animation.cjs +1 -1
- package/dist/modules/animation/animation.js +1 -1
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +1 -1
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +1 -1
- package/dist/modules/core/clock.js +1 -1
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +1 -1
- package/dist/modules/core/consts.js +1 -1
- package/dist/modules/core/globals.cjs +2 -2
- package/dist/modules/core/globals.js +2 -2
- package/dist/modules/core/helpers.cjs +1 -1
- package/dist/modules/core/helpers.js +1 -1
- package/dist/modules/core/render.cjs +1 -1
- package/dist/modules/core/render.js +1 -1
- package/dist/modules/core/styles.cjs +1 -1
- package/dist/modules/core/styles.js +1 -1
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +1 -1
- package/dist/modules/core/transforms.js +1 -1
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +1 -1
- package/dist/modules/core/values.js +1 -1
- package/dist/modules/draggable/draggable.cjs +1 -1
- package/dist/modules/draggable/draggable.js +1 -1
- package/dist/modules/draggable/index.cjs +1 -1
- package/dist/modules/draggable/index.js +1 -1
- package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
- package/dist/modules/easings/cubic-bezier/index.js +1 -1
- package/dist/modules/easings/eases/index.cjs +1 -1
- package/dist/modules/easings/eases/index.js +1 -1
- package/dist/modules/easings/eases/parser.cjs +1 -1
- package/dist/modules/easings/eases/parser.js +1 -1
- package/dist/modules/easings/index.cjs +1 -1
- package/dist/modules/easings/index.js +1 -1
- package/dist/modules/easings/irregular/index.cjs +1 -1
- package/dist/modules/easings/irregular/index.js +1 -1
- package/dist/modules/easings/linear/index.cjs +1 -1
- package/dist/modules/easings/linear/index.js +1 -1
- package/dist/modules/easings/none.cjs +1 -1
- package/dist/modules/easings/none.js +1 -1
- package/dist/modules/easings/spring/index.cjs +1 -1
- package/dist/modules/easings/spring/index.js +1 -1
- package/dist/modules/easings/steps/index.cjs +1 -1
- package/dist/modules/easings/steps/index.js +1 -1
- package/dist/modules/engine/engine.cjs +1 -1
- package/dist/modules/engine/engine.js +1 -1
- package/dist/modules/engine/index.cjs +1 -1
- package/dist/modules/engine/index.js +1 -1
- package/dist/modules/events/index.cjs +1 -1
- package/dist/modules/events/index.js +1 -1
- package/dist/modules/events/scroll.cjs +5 -4
- package/dist/modules/events/scroll.js +5 -4
- package/dist/modules/index.cjs +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/layout/index.cjs +1 -1
- package/dist/modules/layout/index.js +1 -1
- package/dist/modules/layout/layout.cjs +1 -1
- package/dist/modules/layout/layout.js +1 -1
- package/dist/modules/scope/index.cjs +1 -1
- package/dist/modules/scope/index.js +1 -1
- package/dist/modules/scope/scope.cjs +1 -1
- package/dist/modules/scope/scope.js +1 -1
- package/dist/modules/svg/drawable.cjs +1 -1
- package/dist/modules/svg/drawable.js +1 -1
- package/dist/modules/svg/helpers.cjs +1 -1
- package/dist/modules/svg/helpers.js +1 -1
- package/dist/modules/svg/index.cjs +1 -1
- package/dist/modules/svg/index.js +1 -1
- package/dist/modules/svg/morphto.cjs +1 -1
- package/dist/modules/svg/morphto.js +1 -1
- package/dist/modules/svg/motionpath.cjs +1 -1
- package/dist/modules/svg/motionpath.js +1 -1
- package/dist/modules/text/index.cjs +1 -1
- package/dist/modules/text/index.js +1 -1
- package/dist/modules/text/split.cjs +1 -1
- package/dist/modules/text/split.js +1 -1
- package/dist/modules/timeline/index.cjs +1 -1
- package/dist/modules/timeline/index.js +1 -1
- package/dist/modules/timeline/position.cjs +1 -1
- package/dist/modules/timeline/position.js +1 -1
- package/dist/modules/timeline/timeline.cjs +8 -4
- package/dist/modules/timeline/timeline.js +8 -4
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +1 -1
- package/dist/modules/timer/timer.js +1 -1
- package/dist/modules/utils/chainable.cjs +1 -1
- package/dist/modules/utils/chainable.js +1 -1
- package/dist/modules/utils/index.cjs +1 -1
- package/dist/modules/utils/index.js +1 -1
- package/dist/modules/utils/number.cjs +1 -1
- package/dist/modules/utils/number.js +1 -1
- package/dist/modules/utils/random.cjs +1 -1
- package/dist/modules/utils/random.js +1 -1
- package/dist/modules/utils/stagger.cjs +1 -1
- package/dist/modules/utils/stagger.js +1 -1
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +1 -1
- package/dist/modules/utils/time.js +1 -1
- package/dist/modules/waapi/composition.cjs +1 -1
- package/dist/modules/waapi/composition.js +1 -1
- package/dist/modules/waapi/index.cjs +1 -1
- package/dist/modules/waapi/index.js +1 -1
- package/dist/modules/waapi/waapi.cjs +1 -1
- package/dist/modules/waapi/waapi.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM minified bundle
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.4
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
|
-
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),l=Symbol(),h=Symbol(),d=Symbol(),c=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=240,y="",_="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),x=()=>{},S=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,w=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,E=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,C=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,R=/([a-z])([A-Z])/g,D=/(\w+)(\([^)]+\)+)/g,I=/(\*=|\+=|-=)/,O=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,A={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:x,onBeforeUpdate:x,onUpdate:x,onLoop:x,onPause:x,onComplete:x,onRender:x},L={current:null,root:s},B={defaults:A,precision:4,timeScale:1,tickThreshold:200},P=t&&e.AnimeJSDevTools,F={version:"4.3.3",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(F));const M=t=>t.replace(R,"$1-$2").toLowerCase(),V=(t,e)=>0===t.indexOf(e),z=Date.now,X=Array.isArray,H=t=>t&&t.constructor===Object,U=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,W=t=>"function"==typeof t,q=t=>void 0===t,j=t=>q(t)||null===t,G=e=>t&&e instanceof SVGElement,Q=t=>S.test(t),J=t=>V(t,"rgb")&&")"===t[t.length-1],Z=t=>V(t,"hsl")&&")"===t[t.length-1],K=t=>Q(t)||J(t)||Z(t),tt=t=>!B.defaults.hasOwnProperty(t),et=["opacity","rotate","overflow","color"],st=(t,e)=>{if(et.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}},it=t=>Y(t)?parseFloat(t):t,rt=Math.pow,nt=Math.sqrt,ot=Math.sin,at=Math.cos,lt=Math.abs,ht=Math.exp,dt=Math.ceil,ct=Math.floor,ut=Math.asin,pt=Math.max,mt=Math.atan2,ft=Math.PI,gt=Math.round,yt=(t,e,s)=>t<e?e:t>s?s:t,_t={},vt=(t,e)=>{if(e<0)return t;if(!e)return gt(t);let s=_t[e];return s||(s=_t[e]=10**e),gt(t*s)/s},bt=(t,e)=>X(e)?e.reduce((e,s)=>lt(s-t)<lt(e-t)?s:e):e?gt(t/e)*e:t,Tt=(t,e,s)=>t+(e-t)*s,xt=t=>t===1/0?m:t===-1/0?-m:t,St=t=>t<=p?p:xt(vt(t,11)),wt=t=>X(t)?[...t]:t,Et=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=q(r)?e[i]:r}return s},$t=(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}},Ct=(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},Nt=(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},kt=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[d];let o;for(;o=D.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&&!q(r)?r:V(e,"scale")?"1":V(e,"rotate")||V(e,"skew")?"0deg":"0px"},Rt=t=>{const e=w.exec(t)||E.exec(t),s=q(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},Dt=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]},It=(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),Ot=t=>{const e=$.exec(t)||C.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=q(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=vt(255*It(e,t,s+1/3),0),a=vt(255*It(e,t,s),0),l=vt(255*It(e,t,s-1/3),0)}return[o,a,l,n]},At=t=>J(t)?Rt(t):Q(t)?Dt(t):Z(t)?Ot(t):[0,0,0,1],Lt=(t,e)=>q(t)?e:t,Bt=(t,e,s,i,r)=>{let n;if(W(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!Y(t)||!V(t,_))return t;n=()=>{const s=t.match(O),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==y||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Pt=(t,e)=>t[l]?t[h]&&st(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:V(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Ft=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Mt=(t,e,s,r)=>{const n=q(s)?Pt(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?kt(t,e,r):n===i.CSS_VAR?Ft(t,e,r).trimStart():Ft(t,e,r)},Vt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,zt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Xt=(t,e)=>{if(e.t=r.NUMBER,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 i=!s.includes(" ")&&k.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(K(s))return e.t=r.COLOR,e.d=At(s),e;{const t=s.match(N);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split(N)||[],e}}return e.n=s,e},Ht=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=wt(t._toNumbers),e.s=wt(t._strings),e),Ut=zt(),Yt=(t,e,s,a,l)=>{const h=t.parent,c=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,_=t._loopDelay,v=t._reversed,b=t._alternate,x=t._hasChildren,S=t._delay,w=t._currentTime,E=S+m,$=e-S,C=yt(w,-S,c),N=yt($,-S,c),k=$-w,R=N>0,D=N>=c,I=c<=p,O=l===n.FORCE;let A=0,L=$,P=0;if(f>1){const e=~~(N/(m+(D?0:_)));t._currentIteration=yt(e,0,f),D&&t._currentIteration--,A=t._currentIteration%2,L=N%(m+_)||0}const F=v^(b&&A),M=t._ease;let V=D?F?0:c:F?m-L:L;M&&(V=m*M(V/m)||0);const z=(h?h.backwards:$<w)?!F:!!F;if(t._currentTime=$,t._iterationTime=V,t.backwards=z,R&&!t.began?(t.began=!0,s||h&&(z||!h.began)||t.onBegin(t)):$<=0&&(t.began=!1),s||x||!R||t._currentIteration===g||t.onLoop(t),O||l===n.AUTO&&(e>=S&&e<=E||e<=S&&C>S||e>=E&&C!==c)||V>=E&&C!==c||V<=S&&C>0||e<=C&&C===c&&u||D&&!u&&I){if(R&&(t.computeDeltaTime(C),s||t.onBeforeUpdate(t)),!x){const e=O||(z?-1*k:k)>=B.tickThreshold,n=t._offset+(h?h._offset:0)+S+V;let l,c,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,h=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,_=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==h||n<=g+(_?_._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=yt(V-m._startTime,0,h),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,y=m._tweenType,_=y===i.OBJECT,v=g===r.NUMBER,T=v&&_||0===s||1===s?-1:B.precision;let x,S;if(v)x=S=n(vt(Tt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)S=n(vt(Tt(m._fromNumber,m._toNumber,s),T)),x=`${S}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=vt(yt(n(Tt(t[0],e[0],s)),0,255),0),r=vt(yt(n(Tt(t[1],e[1],s)),0,255),0),o=vt(yt(n(Tt(t[2],e[2],s)),0,255),0),a=yt(n(vt(Tt(t[3],e[3],s),T)),0,1);if(x=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){x=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(vt(Tt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];x+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=S),a||t===o.blend)m._value=x;else{const t=m.property;l=m.target,_?l[t]=x:y===i.ATTRIBUTE?l.setAttribute(t,x):(c=l.style,y===i.TRANSFORM?(l!==u&&(u=l,p=l[d]),p[t]=x,f=1):y===i.CSS?c[t]=x:y===i.CSS_VAR&&c.setProperty(t,x)),R&&(P=1)}}if(f&&m._renderTransforms){let t=y;for(let e in p)t+=`${T[e]}${p[e]}) `;c.transform=t,f=0}m=m._next}!s&&P&&t.onRender(t)}!s&&R&&t.onUpdate(t)}return h&&I?!s&&(h.began&&!z&&$>0&&!u||z&&$<=p&&u)&&(t.onComplete(t),t.completed=!z):R&&D?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||x||(t.completed=!0,s||h&&(z||!h.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,P},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Yt(t,e,s,i,r),t._hasChildren){const a=t,l=a.backwards,h=i?e:a._iterationTime,d=z();let c=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;$t(a,e=>{if(l){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Yt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}$t(a,t=>{const e=vt((h-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(d):r;c+=Yt(t,e,s,i,n),!t.completed&&u&&(u=!1)},l),!s&&c&&a.onRender(a),(u||l)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},qt={},jt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&G(e)&&t in e.style){const e=qt[t];if(e)return e;{const e=t?M(t):t;return qt[t]=e,e}}return t},Gt=t=>{if(t._hasChildren)$t(t,Gt,!0);else{const e=t;e.pause(),$t(e,t=>{const s=t.property,r=t.target;if(r[l]){const n=r.style,o=t._inlineValue,a=j(o)||o===y;if(t._tweenType===i.TRANSFORM){const e=r[d];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=y;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(M(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===y&&t.removeAttribute("style")})}})}return t};class Qt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=f/g,this._fps=g,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<p?p:s,r=f/i;i>A.frameRate&&(A.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return n.NONE;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Jt={animation:null,update:x},Zt=t=>{let e=Jt.animation;return e||(e={duration:p,computeDeltaTime:x,_offset:0,_delay:0,_head:null,_tail:null},Jt.animation=e,Jt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?wt(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Yt(e,1,1,0,n.FORCE)}),e},Kt=(()=>t?requestAnimationFrame:setImmediate)(),te=(()=>t?cancelAnimationFrame:clearImmediate)();class ee extends Qt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=A,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=z();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?(Ct(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Wt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Jt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Kt(ie)),this}pause(){if(this.reqId)return this.paused=!0,re()}resume(){if(this.paused)return this.paused=!1,$t(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===B.timeScale?1:f)}set speed(t){this._speed=t*B.timeScale,$t(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:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return B.precision}set precision(t){B.precision=t}}const se=(()=>{const e=new ee(z());return t&&(F.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),ie=()=>{se._head?(se.reqId=Kt(ie),se.update()):se.reqId=0},re=()=>(te(se.reqId),se.reqId=0,se),ne={_rep:new WeakMap,_add:new Map},oe=(t,e,s="_rep")=>{const i=ne[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},ae=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,le=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},he=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;Nt(e,t,ae,"_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){le(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)le(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=vt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&le(i)}let o=!0;if($t(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;$t(t,t=>{t!==e&&$t(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=oe(t.target,t.property,"_add"),s=Zt(ne._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=wt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,Nt(e,i),Nt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=wt(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=wt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}Nt(e,t,null,"_prevAdd","_nextAdd")}return t},de=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=ne._rep.get(s)[i];if(Ct(r,t,"_prevRep","_nextRep"),e===o.blend){const e=ne._add,r=e.get(s);if(!r)return;const n=r[i],o=Jt.animation;Ct(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Ct(n,a,"_prevAdd","_nextAdd"),Ct(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ce=(t,e,s)=>{let r=!1;return $t(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,l=jt(s,o,a);(!l||l&&l===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Ct(e,n),de(n),r=!0)}},!0),r},ue=(t,e,s)=>{const i=e||se;let r;if(i._hasChildren){let e=0;$t(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Ct(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?ue(t,n,s):n._hasChildren=!1},!0),q(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},pe=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),me=t=>t._cancelled?(t._hasChildren?$t(t,me):$t(t,t=>{t._composition!==o.none&&he(t,oe(t.target,t.property))}),t._cancelled=0,t):t;let fe=0;class ge extends Qt{constructor(t={},e=null,s=0){super(0),++fe;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:c,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:v}=t;L.current&&L.current.register(this);const b=e?0:se._lastTickTime,T=e?e.defaults:B.defaults,S=W(r)||q(r)?T.delay:+r,w=W(n)||q(n)?1/0:+n,E=Lt(l,T.loop),$=Lt(h,T.loopDelay);let C=!0===E||E===1/0||E<0?1/0:E+1;if(P){const s=C===1/0;if(P.register(this,t,s)&&s){const t=a?2:1,s=e?P.maxNestedInfiniteLoops:P.maxInfiniteLoops;C=Math.max(s,t)}}let N=0;e?N=s:(se.reqId||se.requestTick(z()),N=(se._lastTickTime-se._startTime)*B.timeScale),this.id=q(i)?fe:i,this.parent=e,this.duration=xt((w+$)*C-$)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||T.onBegin,this.onBeforeUpdate=_||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=w,this.iterationCount=C,this._autoplay=!e&&Lt(d,T.autoplay),this._offset=N,this._delay=S,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=x,this._running=!1,this._reversed=+Lt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Lt(a,T.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=Lt(c,T.frameRate),this._speed=Lt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return yt(vt(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 yt(vt(this._iterationTime,B.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return yt(vt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return yt(vt(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*yt(+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=!1){return me(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),pe(this),this._hasChildren&&$t(this,pe),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Wt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!q(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*se._speed);return this._startTime=z()-(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<=p&&!this._hasChildren?Wt(this,p,0,0,n.FORCE):(this._running||(Nt(se,this),se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,se.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){me(this),this.completed=!1;const i=this.paused;return this.paused=!0,Wt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ct(m/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?$t(this,t=>t.cancel(),!0):$t(this,de),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=St(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:St(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Wt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).cancel()}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ye=t=>new ge(t,null,0).init();function _e(t){const e=Y(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ve(e){if(j(e))return[];if(!t)return X(e)&&e.flat(1/0)||[e];if(X(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(i)){const t=_e(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(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}const s=_e(e);return s?Array.from(s):[e]}function be(t){const e=ve(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=G(s);(s.nodeType||t)&&(s[l]=!0,s[h]=t,s[d]={})}}return e}const Te={deg:1,rad:180/ft,turn:360},xe={},Se=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const l=a+o+i,h=xe[l];if(q(h)||n){let r;if(o in Te)r=a*Te[o]/Te[i];else{const e=100,n=t.cloneNode(),l=t.parentNode,h=l&&l!==s?l:s.body;h.appendChild(n);const d=n.style;d.width=e+o;const c=n.offsetWidth||e;d.width=e+i;const u=c/(n.offsetWidth||e);h.removeChild(n),r=u*a}e.n=r,xe[l]=r}else e.n=h;return e.t,e.u=i,e},we=t=>t,Ee=(t=1.68)=>e=>rt(e,+t),$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},Ce=ft/2,Ne=2*ft,ke={[y]:Ee,Quad:Ee(2),Cubic:Ee(3),Quart:Ee(4),Quint:Ee(5),Sine:t=>1-at(t*Ce),Circ:t=>1-nt(1-t*t),Expo:t=>t?rt(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=rt(2,--s))-1)/11;);return 1/rt(4,3-s)-7.5625*rt((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=yt(+t,1,10),i=yt(+e,p,2),r=i/Ne*ut(1/s),n=Ne/i;return t=>0===t||1===t?t:-s*rt(2,-10*(1-t))*ot((1-t-r)*n)}},Re=(()=>{const t={linear:we,none:we};for(let e in $e)for(let s in ke){const i=ke[s],r=$e[e];t[e+s]=s===y||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),De={linear:we,none:we},Ie=t=>{if(De[t])return De[t];if(t.indexOf("(")<=-1){const e=$e[t]||t.includes("Back")||t.includes("Elastic")?Re[t]():Re[t];return e?De[t]=e:we}{const e=t.slice(0,-1).split("("),s=Re[e[0]];return s?De[t]=s(...e[1].split(",")):we}},Oe=["steps(","irregular(","linear(","cubicBezier("],Ae=t=>{if(Y(t))for(let e=0,s=Oe.length;e<s;e++)if(V(t,Oe[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),we;return W(t)?t:Y(t)?Ie(t):we},Le=zt(),Be=zt(),Pe={},Fe={func:null},Me={func:null},Ve=[null],ze=[null,null],Xe={to:null};let He,Ue,Ye=0,We=0;const qe=(t,e)=>{const s={};if(X(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(tt);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];tt(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Lt(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(tt(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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};class je extends ge{constructor(t,e,s,n,a=!1,l=0,h=0){super(e,s,n),++We;const d=be(t),c=d.length,u=e.keyframes,m=u?Et(qe(u,e),e):e,{id:g,delay:y,duration:_,ease:v,playbackEase:b,modifier:T,composition:x,onRender:S}=m,w=s?s.defaults:B.defaults,E=Lt(v,w.ease),$=Lt(b,w.playbackEase),C=$?Ae($):null,N=!q(E.ease),k=N?E.ease:Lt(v,C?"linear":w.ease),R=N?E.settlingDuration:Lt(_,w.duration),D=Lt(y,w.delay),I=T||w.modifier,O=q(x)&&c>=f?o.none:q(x)?w.composition:x,A=this._offset+(s?s._offset:0);N&&(E.parent=this);let L=NaN,P=NaN,F=0,M=0;for(let t=0;t<c;t++){const e=d[t],n=l||t,u=h||c;let f=NaN,g=NaN;for(let t in m)if(tt(t)){const l=Pt(e,t),h=jt(t,e,l);let d=m[t];const c=X(d);if(a&&!c&&(ze[0]=d,ze[1]=d,d=ze),c){const t=d.length,e=!H(d[0]);2===t&&e?(Xe.to=d,Ve[0]=Xe,He=Ve):t>2&&e?(He=[],d.forEach((t,e)=>{e?1===e?(ze[1]=t,He.push(ze)):He.push(t):ze[0]=t})):He=d}else Ve[0]=d,He=Ve;let y=null,_=null,v=NaN,b=0,T=0;for(let t=He.length;T<t;T++){const i=He[T];H(i)?Ue=i:(Xe.to=i,Ue=Xe),Fe.func=null,Me.func=null;const a=Bt(Ue.to,e,n,u,Fe);let d;H(a)&&!q(a.to)?(Ue=a,d=a.to):d=a;const c=Bt(Ue.from,e,n,u),m=Ue.ease||k,f=Bt(m,e,n,u),g=W(f)||Y(f)?f:m,x=!q(g)&&!q(g.ease),S=x?g.ease:g,w=x?g.settlingDuration:Bt(Lt(Ue.duration,t>1?Bt(R,e,n,u)/t:R),e,n,u),E=Bt(Lt(Ue.delay,T?0:D),e,n,u),$=Bt(Lt(Ue.composition,O),e,n,u),C=U($)?$:o[$],N=Ue.modifier||I,L=!q(c),B=!q(d),P=X(d),V=P||L&&B,z=_?b+E:E,G=vt(A+z,12);M||!L&&!P||(M=1);let Q=_;if(C!==o.none){y||(y=oe(e,h));let t=y._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=G;)if(Q=t,t=t._nextRep,t&&t._absoluteStartTime>=G)for(;t;)le(t),t=t._nextRep}if(V){Xt(P?Bt(d[0],e,n,u,Me):c,Le),Xt(P?Bt(d[1],e,n,u,Fe):d,Be);const t=Mt(e,h,l,Pe);Le.t===r.NUMBER&&(Q?Q._valueType===r.UNIT&&(Le.t=r.UNIT,Le.u=Q._unit):(Xt(t,Ut),Ut.t===r.UNIT&&(Le.t=r.UNIT,Le.u=Ut.u)))}else B?Xt(d,Be):_?Ht(_,Be):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Be),L?Xt(c,Le):_?Ht(_,Le):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Le);if(Le.o&&(Le.n=Vt(Q?Q._toNumber:Xt(Mt(e,h,l,Pe),Ut).n,Le.n,Le.o)),Be.o&&(Be.n=Vt(Le.n,Be.n,Be.o)),Le.t!==Be.t)if(Le.t===r.COMPLEX||Be.t===r.COMPLEX){const t=Le.t===r.COMPLEX?Le:Be,e=Le.t===r.COMPLEX?Be:Le;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Le.t===r.UNIT||Be.t===r.UNIT){const t=Le.t===r.UNIT?Le:Be,e=Le.t===r.UNIT?Be:Le;e.t=r.UNIT,e.u=t.u}else if(Le.t===r.COLOR||Be.t===r.COLOR){const t=Le.t===r.COLOR?Le:Be,e=Le.t===r.COLOR?Be:Le;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Le.u!==Be.u){let t=Be.u?Le:Be;t=Se(e,t,Be.u?Be.u:Le.u,!1)}if(Be.d&&Le.d&&Be.d.length!==Le.d.length){const t=Le.d.length>Be.d.length?Le:Be,e=t===Le?Be:Le;e.d=t.d.map((t,s)=>q(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const J=vt(+w||p,12);let Z=Pe[h];j(Z)||(Pe[h]=null);const K={parent:this,id:Ye++,property:h,target:e,_value:null,_toFunc:Fe.func,_fromFunc:Me.func,_ease:Ae(S),_fromNumbers:wt(Le.d),_toNumbers:wt(Be.d),_strings:wt(Be.s),_fromNumber:Le.n,_toNumber:Be.n,_numbers:wt(Le.d),_number:Le.n,_unit:Be.u,_modifier:N,_currentTime:0,_startTime:z,_delay:+E,_updateDuration:J,_changeDuration:J,_absoluteStartTime:G,_tweenType:l,_valueType:Be.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&he(K,y),isNaN(v)&&(v=K._startTime),b=vt(z+J,12),_=K,F++,Nt(this,K)}(isNaN(P)||v<P)&&(P=v),(isNaN(L)||b>L)&&(L=b),l===i.TRANSFORM&&(f=F-T,g=F)}if(!isNaN(f)){let t=0;$t(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&$t(Jt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),P?($t(this,t=>{t._startTime-t._delay||(t._delay-=P),t._startTime-=P}),L-=P):P=0,L||(L=p,this.iterationCount=0),this.targets=d,this.id=q(g)?We:g,this.duration=L===p?p:xt((L+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=P,this.iterationDuration=L,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e;return $t(this,t=>{t._updateDuration=St(t._updateDuration*s),t._changeDuration=St(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return $t(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(Xt(s(),Le),Le.u!==t._unit&&t.target[l]&&Se(t.target,Le,t._unit,!0),t._fromNumbers=wt(Le.d),t._fromNumber=Le.n):e&&(Xt(Mt(t.target,t.property,t._tweenType),Ut),t._fromNumbers=wt(Ut.d),t._fromNumber=Ut.n),e&&(Xt(e(),Be),t._toNumbers=wt(Be.d),t._strings=wt(Be.s),t._toNumber=Be.o?Vt(t._fromNumber,Be.n,Be.o):Be.n))}),this.duration===p&&this.restart(),this}revert(){return super.revert(),Gt(this)}then(t){return super.then(t)}}const Ge=(t,e)=>new je(t,e,null,0,!1).init(),Qe={_head:null,_tail:null},Je=(t,e,s)=>{let i,r=Qe._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Ct(Qe,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ze=(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),Je(e,s),Nt(Qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Je(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Ke(t,e,s){const i=be(t);if(!i.length)return;const[n]=i,o=Pt(n,e),a=jt(e,n,o);let l=Mt(n,a);if(q(s))return l;if(Xt(l,Ut),Ut.t===r.NUMBER||Ut.t===r.UNIT){if(!1===s)return Ut.n;{const t=Se(n,Ut,s,!1);return`${vt(t.n,B.precision)}${t.u}`}}}const ts=(t,e)=>{if(!q(e))return e.duration=p,e.composition=Lt(e.composition,o.none),new je(t,e,null,0,!0).resume()},es=(t,e,s)=>{const i=ve(t);for(let t=0,r=i.length;t<r;t++)Je(i[t],s,e&&e.controlAnimation&&e);return ue(i,e,s),i},ss=(t,e)=>{if(V(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},is=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),q(e))return s;if(U(+e))return+e;const i=e,r=t?t.labels:null,n=!j(r),o=ss(t,i),a=!q(o),l=I.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Vt(d,c,t[0])}return a?o:n?q(r[i])?s:r[i]:s};function rs(t){return xt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function ns(t,e,s,i,r,o){const a=U(t.duration)&&t.duration<=p?s-p:s;e.composition&&Wt(e,a,1,1,n.AUTO);const l=i?new je(i,t,e,a,!1,r,o):new ge(t,e,a);return e.composition&&l.init(!0),Nt(e,l),$t(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=rs(e),e}let os=0;class as extends ge{constructor(t={}){super(t,null,0),++os,this.id=q(t.id)?os:t.id,this.duration=0,this.labels={};const e=t.defaults,s=B.defaults;this.defaults=e?Et(e,s):s,this.composition=Lt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=Lt(t.playbackEase,s.playbackEase);this._ease=i?Ae(i):null,this.iterationDuration=0}add(t,e,s){const i=H(e),r=H(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=ve(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,q(a)||(s.id=a+"-"+l),ns(s,this,is(this,e(t,l,h,this)),t,l,h),l++})}else ns(i,this,is(this,s),t)}else ns(t,this,is(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(q(t)||t&&q(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,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return q(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return q(t)||t&&!W(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return q(t)||t&&!Y(t)||(this.labels[t]=is(this,e)),this}remove(t,e){return ue(ve(t),this,e),this}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e,i=this.labels;$t(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return $t(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),$t(this,t=>t.revert,!0),Gt(this)}then(t){return super.then(t)}}const ls=t=>new as(t).init();class hs{constructor(t,e){L.current&&L.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!q(t)&&!q(e)){for(let t in e){const s=e[t];tt(t)?n[t]=s:V(t,"on")?r[t]=s:i[t]=s}this.callbacks=new je({v:0},r);for(let e in n){const s=n[e],r=H(s);let a={},l="+=0";if(r){const t=s.unit;Y(t)&&(l+=t)}else a.duration=s;a[e]=r?Et({to:l},s):l;const h=Et(i,a);h.composition=o.replace,h.autoplay=!1;const d=this.animations[e]=new je(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(q(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return $t(d,e=>{if(X(t))for(let s=0,i=t.length;s<i;s++)q(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;q(s)||(e._ease=Ae(s)),e._currentTime=0}),q(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=x,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const ds=(t,e)=>new hs(t,e),cs=(t,e)=>(+t).toFixed(e),us=(t,e,s)=>`${t}`.padStart(e,s),ps=(t,e,s)=>`${t}`.padEnd(e,s),ms=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,fs=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),gs=t=>t*Math.PI/180,ys=t=>180*t/Math.PI,_s=(t,e,s,i)=>i?1===i?e:Tt(t,e,1-Math.exp(-i*s*.1)):t;var vs=Object.freeze({__proto__:null,clamp:yt,damp:_s,degToRad:gs,lerp:Tt,mapRange:fs,padEnd:ps,padStart:us,radToDeg:ys,round:vt,roundPad:cs,snap:bt,wrap:ms});const bs=10*f;class Ts{constructor(t={}){const e=!q(t.bounce)||!q(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=yt(Lt(t.bounce,.5),-1,1),this.pd=yt(Lt(t.duration,628),10*B.timeScale,bs*B.timeScale),this.m=yt(Lt(t.mass,1),1,bs),this.s=yt(Lt(t.stiffness,100),p,bs),this.d=yt(Lt(t.damping,10),p,bs),this.v=yt(Lt(t.velocity,0),-1e4,bs),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||x,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),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?ht(-n*e*s)*(1*at(i*n)+r*ot(i*n)):1===e?(1+r*n)*ht(-n*s):((1+r)*ht((-e*s+i)*n)+(1-r)*ht((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===B.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=rt(2*ft/t,2),this.bn>=0?this.d=4*(1-this.bn)*ft/t:this.d=4*ft/(t*(1+this.bn)),this.s=vt(yt(this.s,p,bs),3),this.d=vt(yt(this.d,p,300),3)}calculateBDFromSD(){const t=2*ft/nt(this.s);this.pd=t*(1===B.timeScale?f:1);const e=this.d/(2*nt(this.s));this.bn=e<=1?1-this.d*t/(4*ft):4*ft/(this.d*t)-1,this.bn=vt(yt(this.bn,-1,1),3),this.pd=vt(yt(this.pd,10*B.timeScale,bs*B.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=yt(nt(o/r),p,f),h=this.zeta=n/(2*nt(o*r));h<1?(this.wd=l*nt(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*nt(h*h-1),this.b=(h*l-a)/this.wd);let d=0,c=0,u=0;for(;c<=t&&u<=e;)lt(1-this.solve(d))<s?c++:c=0,this.solverDuration=d,d+=i,u++;this.settlingDuration=vt(this.solverDuration*f,0)*B.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=yt(Lt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=yt(Lt(t,1),10*B.timeScale,bs*B.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=yt(Lt(t,100),p,bs),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=yt(Lt(t,10),p,bs),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=yt(Lt(t,1),1,bs),this.compute()}get velocity(){return this.v}set velocity(t){this.v=yt(Lt(t,0),-1e4,bs),this.compute()}}const xs=t=>new Ts(t),Ss=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Ts(t)),ws=t=>{t.cancelable&&t.preventDefault()};class Es{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:x,remove:x}}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 Cs=(t,e)=>t&&W(t)?t(e):t;let Ns=0;class ks{constructor(t,i={}){if(!t)return;L.current&&L.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,l=i.releaseEase,h=l&&Ae(l),d=!q(l)&&!q(l.ease),c=H(r)&&!q(r.mapTo)?r.mapTo:"translateX",u=H(n)&&!q(n.mapTo)?n.mapTo:"translateY",p=Cs(i.container,this);this.containerArray=X(p)?p:null,this.$container=p&&!this.containerArray?ve(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=H(t)?new Es(t):ve(t)[0],this.$trigger=ve(o||t)[0],this.fixed="fixed"===Ke(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.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=d?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseYSpring=d?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseEase=h||Re.outQuint,this.hasReleaseSpring=d,this.onGrab=i.onGrab||x,this.onDrag=i.onDrag||x,this.onRelease=i.onRelease||x,this.onUpdate=i.onUpdate||x,this.onSettle=i.onSettle||x,this.onSnap=i.onSnap||x,this.onResize=i.onResize||x,this.onAfterResize=i.onAfterResize||x,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),q(r)||!0===r)f[c]=0;else if(H(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(q(n)||!0===n)f[u]=0;else if(H(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new hs(this.$target,f),this.xProp=c,this.yProp=u,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=[-m,m,m,-m],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=z(),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.overshootTicker=new ge({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ge({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!q(p),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]?c:u,this.animate.callbacks.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&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=mt(n,r)):this.updated=!1},this.animate.callbacks.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 ge({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),H(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=z(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=vt(yt(nt(t*t+e*e)/r*o,a,l),5);const d=pt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=bt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=bt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return vt(this.animate[this.xProp](),B.precision)}set x(t){this.setX(t,!1)}get y(){return vt(this.animate[this.yProp](),B.precision)}set y(t){this.setY(t,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(fs(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(fs(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=vt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=vt(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;if(!t)return;const 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,l=this.window[1]=e.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?yt(d,a,d):d,this.scrollView[1]=h?yt(c,l,c):c,this.updateScrollCoords();const{width:_,height:v,left:b,top:T,right:x,bottom:S}=t.getBoundingClientRect();this.dragArea[2]=vt(h?yt(_,a,a):_,0),this.dragArea[3]=vt(h?yt(v,l,l):v,0);const w=Ke(t,"overflow"),E="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&E||!$&&!E)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!X(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-_:0,c=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=vt(r.top+s-(h?0:T),0),this.targetBounds[1]=vt(r.right+e-(h?a:x),0),this.targetBounds[2]=vt(r.bottom+s-(h?l:S),0),this.targetBounds[3]=vt(r.left+e-(h?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]+y):(this.containerBounds[0]=-vt(r.top-(u?yt(T,0,l):T)+o-m,0),this.containerBounds[1]=-vt(r.right-(u?yt(x,0,a):x)-d+f,0),this.containerBounds[2]=-vt(r.bottom-(u?yt(S,0,l):S)-c+g,0),this.containerBounds[3]=-vt(r.left-(u?yt(b,0,a):b)+n-y,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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Cs(t.container,this),o=Cs(t.containerPadding,this)||0,a=X(o)?o:[o,o,o,o],l=this.x,h=this.y,d=Cs(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=Cs(t.dragThreshold,this),p={mouse:3,touch:7};if(U(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;q(t)||(p.mouse=t),q(e)||(p.touch=e)}this.containerArray=X(n)?n:null,this.$container=n&&!this.containerArray?ve(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=Lt(a,[0,0,0,0]),this.containerFriction=yt(Lt(Cs(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=yt(Lt(Cs(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Cs(H(i)&&!q(i.snap)?i.snap:t.snap,this),this.snapY=Cs(H(r)&&!q(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Lt(Cs(t.scrollSpeed,this),1.5),this.scrollThreshold=Lt(Cs(t.scrollThreshold,this),20),this.dragSpeed=Lt(Cs(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Lt(Cs(t.minVelocity,this),0),this.maxVelocity=Lt(Cs(t.maxVelocity,this),50),this.velocityMultiplier=Lt(Cs(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(yt(l,y,f),!0),this.setY(yt(h,m,g),!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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?yt(d,this.window[0],d):d,p=this.useWin?yt(c,this.window[1],c):c,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,y=this.scrollThreshold,[_,v]=this.coords,[b,T,x,S]=this.scrollBounds,w=vt(yt((v-b+t)/y,-1,0)*g,0),E=vt(yt((_-T-e)/y,0,1)*g,0),$=vt(yt((v-x-s)/y,0,1)*g,0),C=vt(yt((_-S+i)/y,-1,0)*g,0);if(w||$||C||E){const[t,e]=this.disabled;let s=l,i=h;t||(s=vt(yt(l+(C||E),0,r-o),0),this.coords[0]-=l-s),e||(i=vt(yt(h+(w||$),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-l,n-h),this.angle=mt(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.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return ue([this],null,"x"),ue([this],null,"y"),ue([this],null,"progressX"),ue([this],null,"progressY"),ue([this.scroll]),ue([this.overshootCoords]),this}scrollInView(t,e=0,s=Re.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[l,h,d,c]=o,u=vt(yt(r-l,-m,0),0),p=vt(yt(i-h,0,m),0),f=vt(yt(r-d,0,m),0),g=vt(yt(i-c,-m,0),0);new je(n,{x:vt(n.x+(g?g-e:p?p+e:0),0),y:vt(n.y+(u?u-e:f?f+e:0),0),duration:q(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=ts(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Re.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+e,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=yt(bt(i,this.snapX),u,d),a=yt(bt(r,this.snapY),h,c),l=q(t)?350*B.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Ke(this.$target,"zIndex",!1);Ns=(f>Ns?f:Ns)+1,this.targetStyles=ts(this.$target,{zIndex:Ns}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=ts(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Re.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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Ke(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&a<0||d&&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):(ws(t),this.triggerStyles||(this.triggerStyles=ts(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ws,{passive:!1}),this.$trigger.addEventListener("touchmove",ws,{passive:!1}),this.$trigger.addEventListener("touchend",ws),(this.dragged||!this.disabled[0]&<(o)>this.dragThreshold||!this.disabled[1]&<(a)>this.dragThreshold)&&(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,[i,r,n,a,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,S=this.computeVelocity(i-l,r-h),w=this.angle=mt(r-a,i-n),E=150*S,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+at(w)*E,N=x+ot(w)*E,k=C>c?c+(C-c)*$:C<p?p+(C-p)*$:C,R=N>u?u+(N-u)*$:N<d?d+(N-d)*$:N,D=this.destX=yt(vt(bt(k,this.snapX),5),p,c),I=this.destY=yt(vt(bt(R,this.snapY),5),d,u),O=this.isOutOfBounds(this.containerBounds,C,N);let A=0,L=0,P=_,F=_,M=0;if(b.x=T,b.y=x,!t){const t=D===c?T>c?-1:1:T<p?-1:1,s=vt(T-D,0);g.velocity=e&&v?s?E*t/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=g;A=T===D?0:v?r:r-n*B.timeScale,v&&(P=i),A>M&&(M=A)}if(!e){const e=I===u?x>u?-1:1:x<d?-1:1,s=vt(x-I,0);y.velocity=t&&v?s?E*e/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=y;L=x===I?0:v?r:r-n*B.timeScale,v&&(F=i),L>M&&(M=L)}if(!v&&O&&$&&(A||L)){const t=o.blend;new je(b,{x:{to:k,duration:.65*A},y:{to:R,duration:.65*L},ease:_,composition:t}).init(),new je(b,{x:{to:D,duration:A},y:{to:I,duration:L},ease:_,composition:t}).init(),this.overshootTicker.stretch(pt(A,L)).restart()}else t||this.animate[this.xProp](D,A,P),e||this.animate[this.yProp](I,L,F);this.scrollInView(M,this.scrollThreshold,_);let V=!1;D!==m&&(this.snapped[0]=D,this.snapX&&(V=!0)),I!==f&&this.snapY&&(this.snapped[1]=I,this.snapY&&(V=!0)),V&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ws),this.$trigger.removeEventListener("touchmove",ws),this.$trigger.removeEventListener("touchend",ws),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=ts(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.$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.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),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":ws(t)}}}const Rs=(t,e)=>new ks(t,e),Ds=(t=x)=>new ge({duration:1*B.timeScale,onComplete:t},null,0).resume(),Is=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 a=t(...s);return a&&!W(a)&&a.revert&&(e=a),q(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||x}};class Os{constructor(t={}){L.current&&L.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||ve(i)[0]||s);const n=t.defaults,o=B.defaults,a=t.mediaQueries;if(this.defaults=n?Et(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={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=B.defaults;L.current=this,L.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 L.current=e,L.root=s,B.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);W(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,W(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);W(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,W(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);W(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(W(s))return s(this);const i=Is(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,a=s.length,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 As=t=>new Os(t),Ls=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Bs=(t,e)=>t&&W(t)?t(e):t,Ps=new Map;class Fs{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.scale=1,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 ge({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;$t(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ge({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=vt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ge({autoplay:!1,duration:250*B.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ge({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=vt(t?e.scrollX:s.scrollLeft,0),this.scrollY=vt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Ls()}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=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){$t(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),$t(this,t=>{t.refresh(),t.onResize(t),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.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Ps.delete(this.element)}}const Ms=t=>{const e=t&&ve(t)[0]||s.body;let i=Ps.get(e);return i||(i=new Fs(e),Ps.set(e,i)),i},Vs=(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:l,u:h}=Xt(a,Ut);let d=l;return"%"===h?d=l/100*s:h&&(d=Se(t,Ut,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},zs=(t,e,s,i,r)=>{let n;if(Y(e)){const o=I.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=Vs(t,h[0],s,i,r),p=Vs(t,h[1],s,i,r);if(d){const e=Vt(Vs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Vt(Vs(t,"max",s),p,l);n=e>u?u:e}else n=Vt(u,p,l)}else n=Vs(t,e,s,i,r)}else n=e;return vt(n,0)},Xs=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[l]){e=i;break}}return e};let Hs=0;const Us=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Ys{constructor(t={}){L.current&&L.current.register(this);const e=Lt(t.sync,"play pause"),i=e?Ae(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(U(e)||!0===e||r),a=e&&Y(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=Hs++,this.id=q(t.id)?this.index:t.id,this.container=Ms(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!l,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:x,this.onSyncLeave=l&&!h&&l[1]?l[1]:x,this.onSyncEnterForward=l&&h&&l[0]?l[0]:x,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:x,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:x,this.onSyncLeaveBackward=l&&h&&l[3]?l[3]:x,this.onEnter=t.onEnter||x,this.onLeave=t.onLeave||x,this.onEnterForward=t.onEnterForward||x,this.onLeaveForward=t.onLeaveForward||x,this.onEnterBackward=t.onEnterBackward||x,this.onLeaveBackward=t.onLeaveBackward||x,this.onUpdate=t.onUpdate||x,this.onResize=t.onResize||x,this.onSyncComplete=t.onSyncComplete||x,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,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=Lt(t.debug,!1),this._next=null,this._prev=null,Nt(this.container,this),Ds(()=>{if(!this.reverted){if(!this.target){const e=ve(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,q(t)||(t.persist=!0),!this._params.target)){let e;q(t.targets)?$t(t,t=>{t.targets&&!e&&(e=Xs(t))}):e=Xs(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:vt(yt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Lt(Bs(t.repeat,this),!0),this.horizontal="x"===Lt(Bs(t.axis,this),"y"),this.enter=Lt(Bs(t.enter,this),"end start"),this.leave=Lt(Bs(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=Us[this.index%Us.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?t.winHeight:t.height,c=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,y=e?g:15,_=e?60:g,v=e?_:y,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",x=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,S=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${S("absolute",m,f,e?c: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=`${S("sticky",0,0,e?h:g,e?g:d)}`,i||(n.style.cssText+=`background:\n ${x("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${S("relative",0,0,e?c:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${x("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const w=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,l=(r?0:this.offset)+t,m=i%2,f=l<v,g=l>(r?e?h:d:e?c:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),x=s.createElement("div"),E=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]}`,T.style.cssText=`${S("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-${E}: 2px solid ${a};\n `,x.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\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 `,T.appendChild(x);let C=l-$+(e?1:0);T.style[e?"left":"top"]=`${C}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"===Ke(t.element,"position")&&(this.debugStyles=ts(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;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==i.element&&a!==s.body;){const e="sticky"===Ke(a,"position")&&ts(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=i.scale,d=(r?l.left+i.scrollX-i.left:l.top+i.scrollY-i.top)*h,c=(r?l.width:l.height)*h,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(Y(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(H(m)){const t=m;q(t.container)||(_=t.container),q(t.target)||(g=t.target)}else U(m)&&(_=m);if(Y(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(H(f)){const t=f;q(t.container)||(v=t.container),q(t.target)||(y=t.target)}else U(f)&&(v=f);const b=zs(e,g,c),T=zs(e,y,c),x=b+d-u,S=T+d-p,w=zs(e,_,u,x,S),E=zs(e,v,u,x,S),$=b+d-w,C=T+d-E,N=C-$;this.offset=d,this.offsetStart=$,this.offsetEnd=C,this.distance=N<=0?0:N,this.thresholds=[g,y,_,v],this.coords=[b,T,w,E],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&U(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=vt(Tt(e,g,Tt(.01,.2,i))+s,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"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(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))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&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 Ct(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Ws=(t={})=>new Ys(t),qs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,js=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=qs(r,e,s)-t,i>0?o=r:n=r}while(lt(i)>1e-7&&++a<100);return r},Gs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:qs(js(r,t,s),e,i),Qs=(t=10,e)=>{const s=e?dt:ct;return e=>s(yt(e,0,1)*t)*(1/t)},Js=(...t)=>{const e=t.length;if(!e)return we;const s=e-1,i=t[0],r=t[s],n=[0],o=[it(i)];for(let e=1;e<s;e++){const i=t[e],r=Y(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(q(l)?e/s:it(l)/100),o.push(it(a))}return o.push(it(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]}},Zs=(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(yt(o,r,1))}return s.push(1),Js(...s)};var Ks=Object.freeze({__proto__:null,Spring:Ts,createSpring:Ss,cubicBezier:Gs,eases:Re,irregular:Zs,linear:Js,spring:xs,steps:Qs});const ti=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(vt(t(i/e),4));return`linear(${s.join(", ")})`},ei={},si=t=>{let e=ei[t];if(e)return e;if(e="linear",Y(t)){if(V(t,"linear")||V(t,"cubic-")||V(t,"steps")||V(t,"ease"))e=t;else if(V(t,"cubicB"))e=M(t);else{const s=Ie(t);W(s)&&(e=s===we?"linear":ti(s))}ei[t]=e}else if(W(t)){const s=ti(t);s&&(e=s)}else t.ease&&(e=ti(t.ease));return e},ii=["x","y","z"],ri=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...ii],ni=(()=>[...ii,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let oi=null;const ai=(t,e,s,i,r)=>{let n=Y(e)?e:Bt(e,s,i,r);return U(n)?ri.includes(t)||V(t,"translate")?`${n}px`:V(t,"rotate")||V(t,"skew")?`${n}deg`:`${n}`:n},li=(t,e,s,i,r,n)=>{let o="0";const a=q(i)?getComputedStyle(t)[e]:ai(e,i,t,r,n);return o=q(s)?X(i)?i.map(s=>ai(e,s,t,r,n)):a:[ai(e,s,t,r,n),a],o};class hi{constructor(e,s){L.current&&L.current.register(this),j(oi)&&(!t||!q(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=V(t,"skew"),s=V(t,"scale"),i=V(t,"rotate"),r=V(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{}}),oi=!0):oi=!1);const i=be(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=Lt(s.autoplay,B.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,l=s.reversed&&!0===s.reversed,h=Lt(s.loop,B.defaults.loop),c=!0===h||h===1/0?1/0:U(h)?h+1:1,u=a?l?"alternate-reverse":"alternate":l?"reverse":"normal",p=1===B.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||B.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!n||!1!==o,this.reversed=l,this.persist=Lt(s.persist,B.defaults.persist),this.autoplay=n,this._speed=Lt(s.playbackRate,B.defaults.playbackRate),this._resolve=x,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[d],n=ni.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},l=Lt(s.ease,B.defaults.ease),h=Bt(l,t,e,r),m=W(h)||Y(h)?h:l,f=l.ease&&l,g=si(m),_=(f?f.settlingDuration:Bt(Lt(s.duration,B.defaults.duration),t,e,r))*p,x=Bt(Lt(s.delay,B.defaults.delay),t,e,r)*p,S=Lt(s.composition,"replace");for(let l in s){if(!tt(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:g,duration:_,delay:x,composite:S},m=s[l],f=!!n&&(b.includes(l)?l:v.get(l)),y=f?"transform":l;let T;if(a[y]||(a[y]=o[y]),H(m)){const s=m,n=Lt(s.ease,g),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Bt(Lt(s.duration,_),t,e,r))*p,d.delay=Bt(Lt(s.delay,x),t,e,r)*p,d.composite=Lt(s.composition,S),d.easing=si(n),T=li(t,l,u,c,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=li(t,l,u,c,e,r),Ze(this,t,l,h,d),!q(u))if(f){const t=`--${f}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else T=X(m)?m.map(s=>ai(l,s,t,e,r)):ai(l,m,t,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=T,Ze(this,t,l,h,d)}if(n){let t=y;for(let e in i)t+=`${T[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=Y(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return 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:f);this.forEach(t=>{!this.persist&&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.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];q(r)||r===y?s.removeProperty(M(e)):t.style[e]=r}t.getAttribute("style")===y&&t.removeAttribute("style")}),this}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const di={animate:(t,e)=>new hi(t,e),convertEase:ti};let ci=0,ui=0;const pi=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),mi=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},fi=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},gi=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,mi(s)),i&&!e.has(i)&&e.set(i,mi(i))},yi=t=>{t.forEach((t,e)=>fi(e,t)),t.clear()},_i={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},vi=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},bi=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+ui++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.total=1,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Ti=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=pi(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=mi(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=mi(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,_=0,v=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();_=t.left,v=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);q(e)||(a[t]=e)}if(a.left=_,a.top=v,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=_,y=v):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=_-s-r,y=v-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=_-t-l.properties.clientLeft,y=v-e-l.properties.clientTop}else g=_-s-r,y=v-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},xi=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Si=(t,e)=>{const s=Bt(e.ease,t.$el,t.index,t.total),i=W(s)?s:e.ease,r=!q(i)&&!q(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Bt(e.duration,t.$el,t.index,t.total),t.delay=Bt(e.delay,t.$el,t.index,t.total)},wi=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},Ei=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},$i=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(fi(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(fi(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Ci=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.layout.pendingRemoval.delete(t.$el)},Ni=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class ki{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,mi(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||G(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?_i:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=pi(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=pi(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ti(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}vi(u),u=bi(e,t,this,u)}else u=bi(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Ti(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const t=this.layout,e=t.children,s=t.root,i=X(e)?e:[e],r=[],n="*"===e?s:L.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=mi(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=Y(e)?n.querySelectorAll(e):e}const l=be(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!pi(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode($i);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),fi(e,i)}return this}}function Ri(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class Di{constructor(t,e={}){L.current&&L.current.register(this);const s=Ri(e.swapAt),i=Ri(e.enterFrom),r=Ri(e.leaveTo),n=e.properties;if(e.duration=Lt(e.duration,350),e.delay=Lt(e.delay,0),e.ease=Lt(e.ease,"inOut(3.5)"),this.params=e,this.root=be(t)[0],this.id=ci++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=Et(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new ki(this),this.newState=new ki(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),yi(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>yi(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(Ei),this}animate(t={}){const e={ease:Lt(t.ease,this.params.ease),delay:Lt(t.delay,this.params.delay),duration:Lt(t.duration,this.params.duration)},s={},i=Lt(t.onComplete,this.params.onComplete),r=Lt(t.onPause,this.params.onPause);for(let e in A)"ease"!==e&&"duration"!==e&&"delay"!==e&&(q(t[e])?q(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Ci(t),Ei(t)});for(let t=0,e=S.length;t<e;t++){const e=S[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||yi(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Ci),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=Et(Et(t.swapAt||{},this.swapAtParams),e),o=Et(Et(t.enterFrom||{},this.enterFromParams),e),a=Et(Et(t.leaveTo||{},this.leaveToParams),e),[l,h]=Ri(n),[d,c]=Ri(o),[u,p]=Ri(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,_=this.entering,v=this.leaving,b=this.pendingRemoval;g.length=y.length=_.length=v.length=0,m.forEachRootNode(gi),f.record(),f.forEachRootNode(wi);const T=[],x=[],S=[],w=[],E=f.rootNode,$=E.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Ni(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Ni(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const S=b.has(e),w=a.measuredIsVisible,$=t.measuredIsVisible,C=!w&&$&&!o,N=!x&&(y||S)&&!r,k=x&&!y&&!n,R=k||x&&S&&!n;t.branchAdded=r||N,t.branchRemoved=n||R,t.branchNotRendered=o||x,x&&w&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Ni(a,t,f)),k?(t.isTarget&&(v.push(e),t.isLeaving=!0),b.add(e)):!x&&S&&b.delete(e),N&&!o||C?(xi(a,d),t.isTarget&&(_.push(e),t.isEntering=!0)):R&&!o&&xi(t,u),t===E||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,N=0,k=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==E&&i;for(;a&&!a.isTarget&&a!==E;)a=a.parentNode;const d=g.length;t===E?(t.index=0,t.total=d,Si(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:_.length,Si(t,c),C++):t.isLeaving?(t.index=a?a.index:N,t.total=a?d:v.length,N++,Si(t,p)):t.isTarget?(t.index=k++,t.total=d,Si(t,e)):(t.index=a?a.index:0,t.total=d,Si(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Bt(n[e],s,t.index,t.total),o[e]=Bt(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){t.isInlined||"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,S.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(!t.isInlined&&l.transform&&(t.hasTransform=!0,S.push(s)),w.push(s)))});const R={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=R,this.timeline=ls(s),!x.length&&!S.length&&!y.length)return yi(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==$||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===$&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px"),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none")}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};r.isInlined||(n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e);if(!s.isInlined){const t=s.properties;e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${t.x}px ${t.y}px`}this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{s.isInlined||(e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(w.length){const t=Ae(f.nodes.get(w[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(w,s,0)}}const D=S.length;if(D){for(let t=0;t<D;t++){const e=S[t];if(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`,e.style.transform=m.getComputedValue(e,"transform"),w.includes(e)){const t=f.getNode(e);t.ease=Bt(n.ease,e,t.index,t.total),t.duration=Bt(n.duration,e,t.index,t.total)}}this.transformAnimation=di.animate(S,{translate:t=>`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!w.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Bt(l.transform,t,i.index,i.total),e]},autoplay:!1,persist:!0,...R}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const Ii=(t,e)=>new Di(t,e),Oi=vs,Ai={},Li=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Bi=t=>(...e)=>{const s=t(...e);return new Proxy(x,{apply:(t,e,[i])=>s(i),get:(t,e)=>Bi((...t)=>{const i=Ai[e](...t);return t=>i(s(t))})})},Pi=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Bi(Li(e,s)):e)(...t);return Ai[t]||(Ai[t]=i),i},Fi=Pi("roundPad",Oi.roundPad),Mi=Pi("padStart",Oi.padStart),Vi=Pi("padEnd",Oi.padEnd),zi=Pi("wrap",Oi.wrap),Xi=Pi("mapRange",Oi.mapRange),Hi=Pi("degToRad",Oi.degToRad),Ui=Pi("radToDeg",Oi.radToDeg),Yi=Pi("snap",Oi.snap),Wi=Pi("clamp",Oi.clamp),qi=Pi("round",Oi.round),ji=Pi("lerp",Oi.lerp,1),Gi=Pi("damp",Oi.damp,1),Qi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Ji=0;const Zi=(t,e=0,s=1,i=0)=>{let r=void 0===t?Ji++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},Ki=t=>t[Qi(0,t.length-1)],tr=t=>{let e,s,i=t.length;for(;i;)s=Qi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},er=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!q(o),l=a&&!q(o.ease)?o.ease:a?Ae(o):null,h=e.grid,d=e.axis,c=e.total,u=q(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=X(t),_=e.use,v=it(g?t[0]:t),b=g?it(t[1]):0,T=k.exec((g?t[1]:t)+y),x=e.start||0+(g?v:0);let S=u?0:U(r)?r:0;return(t,r,o,a)=>{const[u]=be(t),y=q(c)?o:c,w=!q(_)&&(W(_)?_(u,r,y):Mt(u,_)),E=U(w)||Y(w)&&U(+w)?+w:r;if(p&&(S=(y-1)/2),m&&(S=y-1),!s.length){for(let t=0;t<y;t++){if(h){const e=p?(h[0]-1)/2:S%h[0],i=p?(h[1]-1)/2:ct(S/h[0]),r=e-t%h[0],n=i-ct(t/h[0]);let o=nt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(lt(S-t));i=pt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:lt(i-t))),f&&(s=tr(s))}const $=g?(b-v)/i:v;let C=(a?is(a,q(e.start)?a.iterationDuration:x):x)+($*vt(s[E],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var sr=Object.freeze({__proto__:null,$:be,clamp:Wi,cleanInlineStyles:Gt,createSeededRandom:Zi,damp:Gi,degToRad:Hi,get:Ke,keepTime:Is,lerp:ji,mapRange:Xi,padEnd:Vi,padStart:Mi,radToDeg:Ui,random:Qi,randomPick:Ki,remove:es,round:qi,roundPad:Fi,set:ts,shuffle:tr,snap:Yi,stagger:er,sync:Ds,wrap:zi});const ir=t=>{const e=ve(t)[0];return e&&G(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},rr=(t,e,s,i,r)=>{const n=s+i,o=r?Math.max(0,Math.min(n,e)):(n%e+e)%e;return t.getPointAtLength(o)},nr=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[h],o=t.getCTM(),a=0===s;return{from:0,to:r,modifier:i=>{const l=i+s*r;if("a"===e){const e=rr(t,r,l,-1,a),s=rr(t,r,l,1,a);return 180*mt(s.y-e.y,s.x-e.x)/ft}{const s=rr(t,r,l,0,a);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},or=(t,e=0)=>{const s=ir(t);if(s)return{translateX:nr(s,"x",e),translateY:nr(s,"y",e),rotate:nr(s,"a",e)}},ar=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(nt(s.a*s.a+s.b*s.b)+nt(s.c*s.c+s.d*s.d))/2)}return e},lr=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const l=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=ar(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:W(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l},hr=(t,e=0,s=0)=>ve(t).map(t=>lr(t,e,s)),dr=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=ir(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[c];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 d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+vt(c.x,3)+n+c.y+" ",l+=p+vt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[c]=l,[a,l]};var cr=Object.freeze({__proto__:null,createDrawable:hr,createMotionPath:or,morphTo:dr});const ur="undefined"!=typeof Intl&&Intl.Segmenter,pr=/\{value\}/g,mr=/\{i\}/g,fr=/(\s+)/,gr=/^\s+$/,yr="line",_r="word",vr="char",br="data-line";let Tr=null,xr=null,Sr=null;const wr=t=>t.isWordLike||" "===t.segment||U(+t.segment),Er=t=>t.setAttribute("aria-hidden","true"),$r=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Cr={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Nr=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Nr(e)}},kr=(t,e,s)=>{const i=t.getAttribute(br);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&gr.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&gr.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)kr(t.children[r],e,s);return s},Rr=(t,e={})=>{let s="";const i=Y(e.class)?` class="${e.class}"`:"",r=Lt(e.clone,!1),n=Lt(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},Dr=(t,e,s,i,r,n,o,a,l)=>{const h=r===yr,d=r===vr,c=`_${r}_`,u=W(t)?t(s):t,p=h?"block":"inline-block";Sr.innerHTML=u.replace(pr,`<i class="${c}"></i>`).replace(mr,`${d?l:h?o:a}`);const m=Sr.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(br,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Cr[r]}`),f};class Ir{constructor(e,i={}){Tr||(Tr=ur?new ur([],{granularity:_r}):{segment:t=>{const e=[],s=t.split(fr);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!gr.test(i)})}return e}}),xr||(xr=ur?new ur([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Sr&&t&&(Sr=s.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=i,d=(e=X(e)?e[0]:e)&&e.nodeType?e:(_e(e)||[])[0],c=!0===o?{}:o,u=!0===r||q(r)?{}:r,p=!0===n?{}:n;this.debug=Lt(h,!1),this.includeSpaces=Lt(l,!1),this.accessible=Lt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=H(c)?Rr(yr,c):c,this.wordTemplate=H(u)||this.linesOnly?Rr(_r,u):u,this.charTemplate=H(p)?Rr(vr,p):p,this.$target=d,this.html=d&&d.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&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=Is(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=>W(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 a=[],l=this.words,h=this.chars,d=Tr.segment(o),c=s.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=wr(t);if(!u||s&&u&&wr(u))a.push(e);else{const t=a.length-1,s=a[t];fr.test(s)||fr.test(e)?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const d=a[t+1],u=r&&d&&!d.trim(),p=o,m=i?xr.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],a=e===r-1&&u?o.segment+" ":o.segment,d=s.createTextNode(a);Dr(i,h,d,f,vr,n,-1,l.length,h.length)}}e?Dr(e,l,f,c,_r,n,-1,l.length,h.length):i?c.appendChild(f):c.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(c,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,a="loading"!==s.fonts.status,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>W(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=$r(e,_r))),o&&(l||n)&&(this.chars=$r(e,vr));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!q(d)&&s-d>.5*i&&c++,e.setAttribute(br,`${c}`);const r=e.querySelectorAll(`[${br}]`);let n=r.length;for(;n--;)r[n].setAttribute(br,`${c}`);d=s}if(l){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<c+1;t++){const s=e.cloneNode(!0);kr(s,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&i.add(e),e.removeChild(t))}),a.push(s)}i.forEach(Nr);for(let e=0,s=a.length;e<s;e++)Dr(r,this.lines,a[e],t,yr,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=$r(e,_r)),o&&(this.chars=$r(e,vr))}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(this.accessible&&(l||!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(Er),this.words.forEach(Er),this.chars.forEach(Er)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Or=(t,e)=>new Ir(t,e),Ar=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ir(t,e));var Lr=Object.freeze({__proto__:null,TextSplitter:Ir,split:Ar,splitText:Or});export{be as $,hs as Animatable,Di as AutoLayout,ks as Draggable,je as JSAnimation,Os as Scope,Ys as ScrollObserver,Ts as Spring,Ir as TextSplitter,as as Timeline,ge as Timer,hi as WAAPIAnimation,Ge as animate,Wi as clamp,Gt as cleanInlineStyles,ds as createAnimatable,Rs as createDraggable,hr as createDrawable,Ii as createLayout,or as createMotionPath,As as createScope,Zi as createSeededRandom,Ss as createSpring,ls as createTimeline,ye as createTimer,Gs as cubicBezier,Gi as damp,Hi as degToRad,Re as eases,Ks as easings,se as engine,Ke as get,Zs as irregular,Is as keepTime,ji as lerp,Js as linear,Xi as mapRange,dr as morphTo,Ws as onScroll,Vi as padEnd,Mi as padStart,Ui as radToDeg,Qi as random,Ki as randomPick,es as remove,qi as round,Fi as roundPad,Ps as scrollContainers,ts as set,tr as shuffle,Yi as snap,Ar as split,Or as splitText,xs as spring,er as stagger,Qs as steps,cr as svg,Ds as sync,Lr as text,sr as utils,di as waapi,zi as wrap};
|
|
7
|
+
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),l=Symbol(),h=Symbol(),d=Symbol(),c=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=240,y="",_="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),x=()=>{},S=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,w=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,E=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,C=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,R=/([a-z])([A-Z])/g,D=/(\w+)(\([^)]+\)+)/g,I=/(\*=|\+=|-=)/,O=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,A={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:x,onBeforeUpdate:x,onUpdate:x,onLoop:x,onPause:x,onComplete:x,onRender:x},L={current:null,root:s},B={defaults:A,precision:4,timeScale:1,tickThreshold:200},P=t&&e.AnimeJSDevTools,F={version:"4.3.4",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(F));const M=t=>t.replace(R,"$1-$2").toLowerCase(),V=(t,e)=>0===t.indexOf(e),z=Date.now,X=Array.isArray,H=t=>t&&t.constructor===Object,U=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,W=t=>"function"==typeof t,q=t=>void 0===t,j=t=>q(t)||null===t,G=e=>t&&e instanceof SVGElement,Q=t=>S.test(t),J=t=>V(t,"rgb")&&")"===t[t.length-1],Z=t=>V(t,"hsl")&&")"===t[t.length-1],K=t=>Q(t)||J(t)||Z(t),tt=t=>!B.defaults.hasOwnProperty(t),et=["opacity","rotate","overflow","color"],st=(t,e)=>{if(et.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}},it=t=>Y(t)?parseFloat(t):t,rt=Math.pow,nt=Math.sqrt,ot=Math.sin,at=Math.cos,lt=Math.abs,ht=Math.exp,dt=Math.ceil,ct=Math.floor,ut=Math.asin,pt=Math.max,mt=Math.atan2,ft=Math.PI,gt=Math.round,yt=(t,e,s)=>t<e?e:t>s?s:t,_t={},vt=(t,e)=>{if(e<0)return t;if(!e)return gt(t);let s=_t[e];return s||(s=_t[e]=10**e),gt(t*s)/s},bt=(t,e)=>X(e)?e.reduce((e,s)=>lt(s-t)<lt(e-t)?s:e):e?gt(t/e)*e:t,Tt=(t,e,s)=>t+(e-t)*s,xt=t=>t===1/0?m:t===-1/0?-m:t,St=t=>t<=p?p:xt(vt(t,11)),wt=t=>X(t)?[...t]:t,Et=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=q(r)?e[i]:r}return s},$t=(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}},Ct=(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},Nt=(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},kt=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[d];let o;for(;o=D.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&&!q(r)?r:V(e,"scale")?"1":V(e,"rotate")||V(e,"skew")?"0deg":"0px"},Rt=t=>{const e=w.exec(t)||E.exec(t),s=q(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},Dt=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]},It=(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),Ot=t=>{const e=$.exec(t)||C.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=q(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=vt(255*It(e,t,s+1/3),0),a=vt(255*It(e,t,s),0),l=vt(255*It(e,t,s-1/3),0)}return[o,a,l,n]},At=t=>J(t)?Rt(t):Q(t)?Dt(t):Z(t)?Ot(t):[0,0,0,1],Lt=(t,e)=>q(t)?e:t,Bt=(t,e,s,i,r)=>{let n;if(W(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!Y(t)||!V(t,_))return t;n=()=>{const s=t.match(O),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==y||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Pt=(t,e)=>t[l]?t[h]&&st(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:V(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Ft=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Mt=(t,e,s,r)=>{const n=q(s)?Pt(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?kt(t,e,r):n===i.CSS_VAR?Ft(t,e,r).trimStart():Ft(t,e,r)},Vt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,zt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Xt=(t,e)=>{if(e.t=r.NUMBER,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 i=!s.includes(" ")&&k.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(K(s))return e.t=r.COLOR,e.d=At(s),e;{const t=s.match(N);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split(N)||[],e}}return e.n=s,e},Ht=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=wt(t._toNumbers),e.s=wt(t._strings),e),Ut=zt(),Yt=(t,e,s,a,l)=>{const h=t.parent,c=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,_=t._loopDelay,v=t._reversed,b=t._alternate,x=t._hasChildren,S=t._delay,w=t._currentTime,E=S+m,$=e-S,C=yt(w,-S,c),N=yt($,-S,c),k=$-w,R=N>0,D=N>=c,I=c<=p,O=l===n.FORCE;let A=0,L=$,P=0;if(f>1){const e=~~(N/(m+(D?0:_)));t._currentIteration=yt(e,0,f),D&&t._currentIteration--,A=t._currentIteration%2,L=N%(m+_)||0}const F=v^(b&&A),M=t._ease;let V=D?F?0:c:F?m-L:L;M&&(V=m*M(V/m)||0);const z=(h?h.backwards:$<w)?!F:!!F;if(t._currentTime=$,t._iterationTime=V,t.backwards=z,R&&!t.began?(t.began=!0,s||h&&(z||!h.began)||t.onBegin(t)):$<=0&&(t.began=!1),s||x||!R||t._currentIteration===g||t.onLoop(t),O||l===n.AUTO&&(e>=S&&e<=E||e<=S&&C>S||e>=E&&C!==c)||V>=E&&C!==c||V<=S&&C>0||e<=C&&C===c&&u||D&&!u&&I){if(R&&(t.computeDeltaTime(C),s||t.onBeforeUpdate(t)),!x){const e=O||(z?-1*k:k)>=B.tickThreshold,n=t._offset+(h?h._offset:0)+S+V;let l,c,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,h=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,_=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==h||n<=g+(_?_._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=yt(V-m._startTime,0,h),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,y=m._tweenType,_=y===i.OBJECT,v=g===r.NUMBER,T=v&&_||0===s||1===s?-1:B.precision;let x,S;if(v)x=S=n(vt(Tt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)S=n(vt(Tt(m._fromNumber,m._toNumber,s),T)),x=`${S}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=vt(yt(n(Tt(t[0],e[0],s)),0,255),0),r=vt(yt(n(Tt(t[1],e[1],s)),0,255),0),o=vt(yt(n(Tt(t[2],e[2],s)),0,255),0),a=yt(n(vt(Tt(t[3],e[3],s),T)),0,1);if(x=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){x=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(vt(Tt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];x+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=S),a||t===o.blend)m._value=x;else{const t=m.property;l=m.target,_?l[t]=x:y===i.ATTRIBUTE?l.setAttribute(t,x):(c=l.style,y===i.TRANSFORM?(l!==u&&(u=l,p=l[d]),p[t]=x,f=1):y===i.CSS?c[t]=x:y===i.CSS_VAR&&c.setProperty(t,x)),R&&(P=1)}}if(f&&m._renderTransforms){let t=y;for(let e in p)t+=`${T[e]}${p[e]}) `;c.transform=t,f=0}m=m._next}!s&&P&&t.onRender(t)}!s&&R&&t.onUpdate(t)}return h&&I?!s&&(h.began&&!z&&$>0&&!u||z&&$<=p&&u)&&(t.onComplete(t),t.completed=!z):R&&D?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||x||(t.completed=!0,s||h&&(z||!h.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,P},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Yt(t,e,s,i,r),t._hasChildren){const a=t,l=a.backwards,h=i?e:a._iterationTime,d=z();let c=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;$t(a,e=>{if(l){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Yt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}$t(a,t=>{const e=vt((h-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(d):r;c+=Yt(t,e,s,i,n),!t.completed&&u&&(u=!1)},l),!s&&c&&a.onRender(a),(u||l)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},qt={},jt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&G(e)&&t in e.style){const e=qt[t];if(e)return e;{const e=t?M(t):t;return qt[t]=e,e}}return t},Gt=t=>{if(t._hasChildren)$t(t,Gt,!0);else{const e=t;e.pause(),$t(e,t=>{const s=t.property,r=t.target;if(r[l]){const n=r.style,o=t._inlineValue,a=j(o)||o===y;if(t._tweenType===i.TRANSFORM){const e=r[d];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=y;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(M(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===y&&t.removeAttribute("style")})}})}return t};class Qt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=f/g,this._fps=g,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<p?p:s,r=f/i;i>A.frameRate&&(A.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return n.NONE;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Jt={animation:null,update:x},Zt=t=>{let e=Jt.animation;return e||(e={duration:p,computeDeltaTime:x,_offset:0,_delay:0,_head:null,_tail:null},Jt.animation=e,Jt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?wt(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Yt(e,1,1,0,n.FORCE)}),e},Kt=(()=>t?requestAnimationFrame:setImmediate)(),te=(()=>t?cancelAnimationFrame:clearImmediate)();class ee extends Qt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=A,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=z();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?(Ct(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Wt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Jt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Kt(ie)),this}pause(){if(this.reqId)return this.paused=!0,re()}resume(){if(this.paused)return this.paused=!1,$t(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===B.timeScale?1:f)}set speed(t){this._speed=t*B.timeScale,$t(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:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return B.precision}set precision(t){B.precision=t}}const se=(()=>{const e=new ee(z());return t&&(F.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),ie=()=>{se._head?(se.reqId=Kt(ie),se.update()):se.reqId=0},re=()=>(te(se.reqId),se.reqId=0,se),ne={_rep:new WeakMap,_add:new Map},oe=(t,e,s="_rep")=>{const i=ne[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},ae=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,le=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},he=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;Nt(e,t,ae,"_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){le(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)le(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=vt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&le(i)}let o=!0;if($t(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;$t(t,t=>{t!==e&&$t(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=oe(t.target,t.property,"_add"),s=Zt(ne._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=wt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,Nt(e,i),Nt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=wt(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=wt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}Nt(e,t,null,"_prevAdd","_nextAdd")}return t},de=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=ne._rep.get(s)[i];if(Ct(r,t,"_prevRep","_nextRep"),e===o.blend){const e=ne._add,r=e.get(s);if(!r)return;const n=r[i],o=Jt.animation;Ct(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Ct(n,a,"_prevAdd","_nextAdd"),Ct(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ce=(t,e,s)=>{let r=!1;return $t(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,l=jt(s,o,a);(!l||l&&l===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Ct(e,n),de(n),r=!0)}},!0),r},ue=(t,e,s)=>{const i=e||se;let r;if(i._hasChildren){let e=0;$t(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Ct(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?ue(t,n,s):n._hasChildren=!1},!0),q(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},pe=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),me=t=>t._cancelled?(t._hasChildren?$t(t,me):$t(t,t=>{t._composition!==o.none&&he(t,oe(t.target,t.property))}),t._cancelled=0,t):t;let fe=0;class ge extends Qt{constructor(t={},e=null,s=0){super(0),++fe;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:c,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:v}=t;L.current&&L.current.register(this);const b=e?0:se._lastTickTime,T=e?e.defaults:B.defaults,S=W(r)||q(r)?T.delay:+r,w=W(n)||q(n)?1/0:+n,E=Lt(l,T.loop),$=Lt(h,T.loopDelay);let C=!0===E||E===1/0||E<0?1/0:E+1;if(P){const s=C===1/0;if(P.register(this,t,s)&&s){const t=a?2:1,s=e?P.maxNestedInfiniteLoops:P.maxInfiniteLoops;C=Math.max(s,t)}}let N=0;e?N=s:(se.reqId||se.requestTick(z()),N=(se._lastTickTime-se._startTime)*B.timeScale),this.id=q(i)?fe:i,this.parent=e,this.duration=xt((w+$)*C-$)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||T.onBegin,this.onBeforeUpdate=_||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=w,this.iterationCount=C,this._autoplay=!e&&Lt(d,T.autoplay),this._offset=N,this._delay=S,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=x,this._running=!1,this._reversed=+Lt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Lt(a,T.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=Lt(c,T.frameRate),this._speed=Lt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return yt(vt(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 yt(vt(this._iterationTime,B.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return yt(vt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return yt(vt(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*yt(+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=!1){return me(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),pe(this),this._hasChildren&&$t(this,pe),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Wt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!q(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*se._speed);return this._startTime=z()-(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<=p&&!this._hasChildren?Wt(this,p,0,0,n.FORCE):(this._running||(Nt(se,this),se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,se.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){me(this),this.completed=!1;const i=this.paused;return this.paused=!0,Wt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ct(m/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?$t(this,t=>t.cancel(),!0):$t(this,de),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=St(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:St(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Wt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).cancel()}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ye=t=>new ge(t,null,0).init();function _e(t){const e=Y(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ve(e){if(j(e))return[];if(!t)return X(e)&&e.flat(1/0)||[e];if(X(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(i)){const t=_e(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(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}const s=_e(e);return s?Array.from(s):[e]}function be(t){const e=ve(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=G(s);(s.nodeType||t)&&(s[l]=!0,s[h]=t,s[d]={})}}return e}const Te={deg:1,rad:180/ft,turn:360},xe={},Se=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const l=a+o+i,h=xe[l];if(q(h)||n){let r;if(o in Te)r=a*Te[o]/Te[i];else{const e=100,n=t.cloneNode(),l=t.parentNode,h=l&&l!==s?l:s.body;h.appendChild(n);const d=n.style;d.width=e+o;const c=n.offsetWidth||e;d.width=e+i;const u=c/(n.offsetWidth||e);h.removeChild(n),r=u*a}e.n=r,xe[l]=r}else e.n=h;return e.t,e.u=i,e},we=t=>t,Ee=(t=1.68)=>e=>rt(e,+t),$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},Ce=ft/2,Ne=2*ft,ke={[y]:Ee,Quad:Ee(2),Cubic:Ee(3),Quart:Ee(4),Quint:Ee(5),Sine:t=>1-at(t*Ce),Circ:t=>1-nt(1-t*t),Expo:t=>t?rt(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=rt(2,--s))-1)/11;);return 1/rt(4,3-s)-7.5625*rt((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=yt(+t,1,10),i=yt(+e,p,2),r=i/Ne*ut(1/s),n=Ne/i;return t=>0===t||1===t?t:-s*rt(2,-10*(1-t))*ot((1-t-r)*n)}},Re=(()=>{const t={linear:we,none:we};for(let e in $e)for(let s in ke){const i=ke[s],r=$e[e];t[e+s]=s===y||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),De={linear:we,none:we},Ie=t=>{if(De[t])return De[t];if(t.indexOf("(")<=-1){const e=$e[t]||t.includes("Back")||t.includes("Elastic")?Re[t]():Re[t];return e?De[t]=e:we}{const e=t.slice(0,-1).split("("),s=Re[e[0]];return s?De[t]=s(...e[1].split(",")):we}},Oe=["steps(","irregular(","linear(","cubicBezier("],Ae=t=>{if(Y(t))for(let e=0,s=Oe.length;e<s;e++)if(V(t,Oe[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),we;return W(t)?t:Y(t)?Ie(t):we},Le=zt(),Be=zt(),Pe={},Fe={func:null},Me={func:null},Ve=[null],ze=[null,null],Xe={to:null};let He,Ue,Ye=0,We=0;const qe=(t,e)=>{const s={};if(X(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(tt);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];tt(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Lt(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(tt(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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};class je extends ge{constructor(t,e,s,n,a=!1,l=0,h=0){super(e,s,n),++We;const d=be(t),c=d.length,u=e.keyframes,m=u?Et(qe(u,e),e):e,{id:g,delay:y,duration:_,ease:v,playbackEase:b,modifier:T,composition:x,onRender:S}=m,w=s?s.defaults:B.defaults,E=Lt(v,w.ease),$=Lt(b,w.playbackEase),C=$?Ae($):null,N=!q(E.ease),k=N?E.ease:Lt(v,C?"linear":w.ease),R=N?E.settlingDuration:Lt(_,w.duration),D=Lt(y,w.delay),I=T||w.modifier,O=q(x)&&c>=f?o.none:q(x)?w.composition:x,A=this._offset+(s?s._offset:0);N&&(E.parent=this);let L=NaN,P=NaN,F=0,M=0;for(let t=0;t<c;t++){const e=d[t],n=l||t,u=h||c;let f=NaN,g=NaN;for(let t in m)if(tt(t)){const l=Pt(e,t),h=jt(t,e,l);let d=m[t];const c=X(d);if(a&&!c&&(ze[0]=d,ze[1]=d,d=ze),c){const t=d.length,e=!H(d[0]);2===t&&e?(Xe.to=d,Ve[0]=Xe,He=Ve):t>2&&e?(He=[],d.forEach((t,e)=>{e?1===e?(ze[1]=t,He.push(ze)):He.push(t):ze[0]=t})):He=d}else Ve[0]=d,He=Ve;let y=null,_=null,v=NaN,b=0,T=0;for(let t=He.length;T<t;T++){const i=He[T];H(i)?Ue=i:(Xe.to=i,Ue=Xe),Fe.func=null,Me.func=null;const a=Bt(Ue.to,e,n,u,Fe);let d;H(a)&&!q(a.to)?(Ue=a,d=a.to):d=a;const c=Bt(Ue.from,e,n,u),m=Ue.ease||k,f=Bt(m,e,n,u),g=W(f)||Y(f)?f:m,x=!q(g)&&!q(g.ease),S=x?g.ease:g,w=x?g.settlingDuration:Bt(Lt(Ue.duration,t>1?Bt(R,e,n,u)/t:R),e,n,u),E=Bt(Lt(Ue.delay,T?0:D),e,n,u),$=Bt(Lt(Ue.composition,O),e,n,u),C=U($)?$:o[$],N=Ue.modifier||I,L=!q(c),B=!q(d),P=X(d),V=P||L&&B,z=_?b+E:E,G=vt(A+z,12);M||!L&&!P||(M=1);let Q=_;if(C!==o.none){y||(y=oe(e,h));let t=y._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=G;)if(Q=t,t=t._nextRep,t&&t._absoluteStartTime>=G)for(;t;)le(t),t=t._nextRep}if(V){Xt(P?Bt(d[0],e,n,u,Me):c,Le),Xt(P?Bt(d[1],e,n,u,Fe):d,Be);const t=Mt(e,h,l,Pe);Le.t===r.NUMBER&&(Q?Q._valueType===r.UNIT&&(Le.t=r.UNIT,Le.u=Q._unit):(Xt(t,Ut),Ut.t===r.UNIT&&(Le.t=r.UNIT,Le.u=Ut.u)))}else B?Xt(d,Be):_?Ht(_,Be):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Be),L?Xt(c,Le):_?Ht(_,Le):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Le);if(Le.o&&(Le.n=Vt(Q?Q._toNumber:Xt(Mt(e,h,l,Pe),Ut).n,Le.n,Le.o)),Be.o&&(Be.n=Vt(Le.n,Be.n,Be.o)),Le.t!==Be.t)if(Le.t===r.COMPLEX||Be.t===r.COMPLEX){const t=Le.t===r.COMPLEX?Le:Be,e=Le.t===r.COMPLEX?Be:Le;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Le.t===r.UNIT||Be.t===r.UNIT){const t=Le.t===r.UNIT?Le:Be,e=Le.t===r.UNIT?Be:Le;e.t=r.UNIT,e.u=t.u}else if(Le.t===r.COLOR||Be.t===r.COLOR){const t=Le.t===r.COLOR?Le:Be,e=Le.t===r.COLOR?Be:Le;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Le.u!==Be.u){let t=Be.u?Le:Be;t=Se(e,t,Be.u?Be.u:Le.u,!1)}if(Be.d&&Le.d&&Be.d.length!==Le.d.length){const t=Le.d.length>Be.d.length?Le:Be,e=t===Le?Be:Le;e.d=t.d.map((t,s)=>q(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const J=vt(+w||p,12);let Z=Pe[h];j(Z)||(Pe[h]=null);const K={parent:this,id:Ye++,property:h,target:e,_value:null,_toFunc:Fe.func,_fromFunc:Me.func,_ease:Ae(S),_fromNumbers:wt(Le.d),_toNumbers:wt(Be.d),_strings:wt(Be.s),_fromNumber:Le.n,_toNumber:Be.n,_numbers:wt(Le.d),_number:Le.n,_unit:Be.u,_modifier:N,_currentTime:0,_startTime:z,_delay:+E,_updateDuration:J,_changeDuration:J,_absoluteStartTime:G,_tweenType:l,_valueType:Be.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&he(K,y),isNaN(v)&&(v=K._startTime),b=vt(z+J,12),_=K,F++,Nt(this,K)}(isNaN(P)||v<P)&&(P=v),(isNaN(L)||b>L)&&(L=b),l===i.TRANSFORM&&(f=F-T,g=F)}if(!isNaN(f)){let t=0;$t(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&$t(Jt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),P?($t(this,t=>{t._startTime-t._delay||(t._delay-=P),t._startTime-=P}),L-=P):P=0,L||(L=p,this.iterationCount=0),this.targets=d,this.id=q(g)?We:g,this.duration=L===p?p:xt((L+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=P,this.iterationDuration=L,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e;return $t(this,t=>{t._updateDuration=St(t._updateDuration*s),t._changeDuration=St(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return $t(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(Xt(s(),Le),Le.u!==t._unit&&t.target[l]&&Se(t.target,Le,t._unit,!0),t._fromNumbers=wt(Le.d),t._fromNumber=Le.n):e&&(Xt(Mt(t.target,t.property,t._tweenType),Ut),t._fromNumbers=wt(Ut.d),t._fromNumber=Ut.n),e&&(Xt(e(),Be),t._toNumbers=wt(Be.d),t._strings=wt(Be.s),t._toNumber=Be.o?Vt(t._fromNumber,Be.n,Be.o):Be.n))}),this.duration===p&&this.restart(),this}revert(){return super.revert(),Gt(this)}then(t){return super.then(t)}}const Ge=(t,e)=>new je(t,e,null,0,!1).init(),Qe={_head:null,_tail:null},Je=(t,e,s)=>{let i,r=Qe._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Ct(Qe,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ze=(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),Je(e,s),Nt(Qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Je(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Ke(t,e,s){const i=be(t);if(!i.length)return;const[n]=i,o=Pt(n,e),a=jt(e,n,o);let l=Mt(n,a);if(q(s))return l;if(Xt(l,Ut),Ut.t===r.NUMBER||Ut.t===r.UNIT){if(!1===s)return Ut.n;{const t=Se(n,Ut,s,!1);return`${vt(t.n,B.precision)}${t.u}`}}}const ts=(t,e)=>{if(!q(e))return e.duration=p,e.composition=Lt(e.composition,o.none),new je(t,e,null,0,!0).resume()},es=(t,e,s)=>{const i=ve(t);for(let t=0,r=i.length;t<r;t++)Je(i[t],s,e&&e.controlAnimation&&e);return ue(i,e,s),i},ss=(t,e)=>{if(V(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},is=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),q(e))return s;if(U(+e))return+e;const i=e,r=t?t.labels:null,n=!j(r),o=ss(t,i),a=!q(o),l=I.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Vt(d,c,t[0])}return a?o:n?q(r[i])?s:r[i]:s};function rs(t){return xt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function ns(t,e,s,i,r,o){const a=U(t.duration)&&t.duration<=p?s-p:s;e.composition&&Wt(e,a,1,1,n.AUTO);const l=i?new je(i,t,e,a,!1,r,o):new ge(t,e,a);return e.composition&&l.init(!0),Nt(e,l),$t(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=rs(e),e}let os=0;class as extends ge{constructor(t={}){super(t,null,0),++os,this.id=q(t.id)?os:t.id,this.duration=0,this.labels={};const e=t.defaults,s=B.defaults;this.defaults=e?Et(e,s):s,this.composition=Lt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=Lt(t.playbackEase,s.playbackEase);this._ease=i?Ae(i):null,this.iterationDuration=0}add(t,e,s){const i=H(e),r=H(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=ve(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,q(a)||(s.id=a+"-"+l),ns(s,this,is(this,e(t,l,h,this)),t,l,h),l++})}else ns(i,this,is(this,s),t)}else ns(t,this,is(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(q(t)||t&&q(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return q(t)||q(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return q(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return q(t)||t&&!W(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return q(t)||t&&!Y(t)||(this.labels[t]=is(this,e)),this}remove(t,e){return ue(ve(t),this,e),this}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e,i=this.labels;$t(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return $t(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),$t(this,t=>t.revert,!0),Gt(this)}then(t){return super.then(t)}}const ls=t=>new as(t).init();class hs{constructor(t,e){L.current&&L.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!q(t)&&!q(e)){for(let t in e){const s=e[t];tt(t)?n[t]=s:V(t,"on")?r[t]=s:i[t]=s}this.callbacks=new je({v:0},r);for(let e in n){const s=n[e],r=H(s);let a={},l="+=0";if(r){const t=s.unit;Y(t)&&(l+=t)}else a.duration=s;a[e]=r?Et({to:l},s):l;const h=Et(i,a);h.composition=o.replace,h.autoplay=!1;const d=this.animations[e]=new je(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(q(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return $t(d,e=>{if(X(t))for(let s=0,i=t.length;s<i;s++)q(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;q(s)||(e._ease=Ae(s)),e._currentTime=0}),q(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=x,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const ds=(t,e)=>new hs(t,e),cs=(t,e)=>(+t).toFixed(e),us=(t,e,s)=>`${t}`.padStart(e,s),ps=(t,e,s)=>`${t}`.padEnd(e,s),ms=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,fs=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),gs=t=>t*Math.PI/180,ys=t=>180*t/Math.PI,_s=(t,e,s,i)=>i?1===i?e:Tt(t,e,1-Math.exp(-i*s*.1)):t;var vs=Object.freeze({__proto__:null,clamp:yt,damp:_s,degToRad:gs,lerp:Tt,mapRange:fs,padEnd:ps,padStart:us,radToDeg:ys,round:vt,roundPad:cs,snap:bt,wrap:ms});const bs=10*f;class Ts{constructor(t={}){const e=!q(t.bounce)||!q(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=yt(Lt(t.bounce,.5),-1,1),this.pd=yt(Lt(t.duration,628),10*B.timeScale,bs*B.timeScale),this.m=yt(Lt(t.mass,1),1,bs),this.s=yt(Lt(t.stiffness,100),p,bs),this.d=yt(Lt(t.damping,10),p,bs),this.v=yt(Lt(t.velocity,0),-1e4,bs),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||x,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),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?ht(-n*e*s)*(1*at(i*n)+r*ot(i*n)):1===e?(1+r*n)*ht(-n*s):((1+r)*ht((-e*s+i)*n)+(1-r)*ht((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===B.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=rt(2*ft/t,2),this.bn>=0?this.d=4*(1-this.bn)*ft/t:this.d=4*ft/(t*(1+this.bn)),this.s=vt(yt(this.s,p,bs),3),this.d=vt(yt(this.d,p,300),3)}calculateBDFromSD(){const t=2*ft/nt(this.s);this.pd=t*(1===B.timeScale?f:1);const e=this.d/(2*nt(this.s));this.bn=e<=1?1-this.d*t/(4*ft):4*ft/(this.d*t)-1,this.bn=vt(yt(this.bn,-1,1),3),this.pd=vt(yt(this.pd,10*B.timeScale,bs*B.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=yt(nt(o/r),p,f),h=this.zeta=n/(2*nt(o*r));h<1?(this.wd=l*nt(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*nt(h*h-1),this.b=(h*l-a)/this.wd);let d=0,c=0,u=0;for(;c<=t&&u<=e;)lt(1-this.solve(d))<s?c++:c=0,this.solverDuration=d,d+=i,u++;this.settlingDuration=vt(this.solverDuration*f,0)*B.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=yt(Lt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=yt(Lt(t,1),10*B.timeScale,bs*B.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=yt(Lt(t,100),p,bs),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=yt(Lt(t,10),p,bs),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=yt(Lt(t,1),1,bs),this.compute()}get velocity(){return this.v}set velocity(t){this.v=yt(Lt(t,0),-1e4,bs),this.compute()}}const xs=t=>new Ts(t),Ss=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Ts(t)),ws=t=>{t.cancelable&&t.preventDefault()};class Es{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:x,remove:x}}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 Cs=(t,e)=>t&&W(t)?t(e):t;let Ns=0;class ks{constructor(t,i={}){if(!t)return;L.current&&L.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,l=i.releaseEase,h=l&&Ae(l),d=!q(l)&&!q(l.ease),c=H(r)&&!q(r.mapTo)?r.mapTo:"translateX",u=H(n)&&!q(n.mapTo)?n.mapTo:"translateY",p=Cs(i.container,this);this.containerArray=X(p)?p:null,this.$container=p&&!this.containerArray?ve(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=H(t)?new Es(t):ve(t)[0],this.$trigger=ve(o||t)[0],this.fixed="fixed"===Ke(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.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=d?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseYSpring=d?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseEase=h||Re.outQuint,this.hasReleaseSpring=d,this.onGrab=i.onGrab||x,this.onDrag=i.onDrag||x,this.onRelease=i.onRelease||x,this.onUpdate=i.onUpdate||x,this.onSettle=i.onSettle||x,this.onSnap=i.onSnap||x,this.onResize=i.onResize||x,this.onAfterResize=i.onAfterResize||x,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),q(r)||!0===r)f[c]=0;else if(H(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(q(n)||!0===n)f[u]=0;else if(H(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new hs(this.$target,f),this.xProp=c,this.yProp=u,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=[-m,m,m,-m],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=z(),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.overshootTicker=new ge({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ge({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!q(p),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]?c:u,this.animate.callbacks.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&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=mt(n,r)):this.updated=!1},this.animate.callbacks.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 ge({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),H(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=z(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=vt(yt(nt(t*t+e*e)/r*o,a,l),5);const d=pt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=bt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=bt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return vt(this.animate[this.xProp](),B.precision)}set x(t){this.setX(t,!1)}get y(){return vt(this.animate[this.yProp](),B.precision)}set y(t){this.setY(t,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(fs(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(fs(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=vt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=vt(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;if(!t)return;const 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,l=this.window[1]=e.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?yt(d,a,d):d,this.scrollView[1]=h?yt(c,l,c):c,this.updateScrollCoords();const{width:_,height:v,left:b,top:T,right:x,bottom:S}=t.getBoundingClientRect();this.dragArea[2]=vt(h?yt(_,a,a):_,0),this.dragArea[3]=vt(h?yt(v,l,l):v,0);const w=Ke(t,"overflow"),E="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&E||!$&&!E)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!X(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-_:0,c=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=vt(r.top+s-(h?0:T),0),this.targetBounds[1]=vt(r.right+e-(h?a:x),0),this.targetBounds[2]=vt(r.bottom+s-(h?l:S),0),this.targetBounds[3]=vt(r.left+e-(h?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]+y):(this.containerBounds[0]=-vt(r.top-(u?yt(T,0,l):T)+o-m,0),this.containerBounds[1]=-vt(r.right-(u?yt(x,0,a):x)-d+f,0),this.containerBounds[2]=-vt(r.bottom-(u?yt(S,0,l):S)-c+g,0),this.containerBounds[3]=-vt(r.left-(u?yt(b,0,a):b)+n-y,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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Cs(t.container,this),o=Cs(t.containerPadding,this)||0,a=X(o)?o:[o,o,o,o],l=this.x,h=this.y,d=Cs(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=Cs(t.dragThreshold,this),p={mouse:3,touch:7};if(U(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;q(t)||(p.mouse=t),q(e)||(p.touch=e)}this.containerArray=X(n)?n:null,this.$container=n&&!this.containerArray?ve(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=Lt(a,[0,0,0,0]),this.containerFriction=yt(Lt(Cs(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=yt(Lt(Cs(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Cs(H(i)&&!q(i.snap)?i.snap:t.snap,this),this.snapY=Cs(H(r)&&!q(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Lt(Cs(t.scrollSpeed,this),1.5),this.scrollThreshold=Lt(Cs(t.scrollThreshold,this),20),this.dragSpeed=Lt(Cs(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Lt(Cs(t.minVelocity,this),0),this.maxVelocity=Lt(Cs(t.maxVelocity,this),50),this.velocityMultiplier=Lt(Cs(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(yt(l,y,f),!0),this.setY(yt(h,m,g),!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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?yt(d,this.window[0],d):d,p=this.useWin?yt(c,this.window[1],c):c,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,y=this.scrollThreshold,[_,v]=this.coords,[b,T,x,S]=this.scrollBounds,w=vt(yt((v-b+t)/y,-1,0)*g,0),E=vt(yt((_-T-e)/y,0,1)*g,0),$=vt(yt((v-x-s)/y,0,1)*g,0),C=vt(yt((_-S+i)/y,-1,0)*g,0);if(w||$||C||E){const[t,e]=this.disabled;let s=l,i=h;t||(s=vt(yt(l+(C||E),0,r-o),0),this.coords[0]-=l-s),e||(i=vt(yt(h+(w||$),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-l,n-h),this.angle=mt(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.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return ue([this],null,"x"),ue([this],null,"y"),ue([this],null,"progressX"),ue([this],null,"progressY"),ue([this.scroll]),ue([this.overshootCoords]),this}scrollInView(t,e=0,s=Re.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[l,h,d,c]=o,u=vt(yt(r-l,-m,0),0),p=vt(yt(i-h,0,m),0),f=vt(yt(r-d,0,m),0),g=vt(yt(i-c,-m,0),0);new je(n,{x:vt(n.x+(g?g-e:p?p+e:0),0),y:vt(n.y+(u?u-e:f?f+e:0),0),duration:q(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=ts(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Re.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+e,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=yt(bt(i,this.snapX),u,d),a=yt(bt(r,this.snapY),h,c),l=q(t)?350*B.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Ke(this.$target,"zIndex",!1);Ns=(f>Ns?f:Ns)+1,this.targetStyles=ts(this.$target,{zIndex:Ns}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=ts(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Re.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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Ke(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&a<0||d&&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):(ws(t),this.triggerStyles||(this.triggerStyles=ts(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ws,{passive:!1}),this.$trigger.addEventListener("touchmove",ws,{passive:!1}),this.$trigger.addEventListener("touchend",ws),(this.dragged||!this.disabled[0]&<(o)>this.dragThreshold||!this.disabled[1]&<(a)>this.dragThreshold)&&(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,[i,r,n,a,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,S=this.computeVelocity(i-l,r-h),w=this.angle=mt(r-a,i-n),E=150*S,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+at(w)*E,N=x+ot(w)*E,k=C>c?c+(C-c)*$:C<p?p+(C-p)*$:C,R=N>u?u+(N-u)*$:N<d?d+(N-d)*$:N,D=this.destX=yt(vt(bt(k,this.snapX),5),p,c),I=this.destY=yt(vt(bt(R,this.snapY),5),d,u),O=this.isOutOfBounds(this.containerBounds,C,N);let A=0,L=0,P=_,F=_,M=0;if(b.x=T,b.y=x,!t){const t=D===c?T>c?-1:1:T<p?-1:1,s=vt(T-D,0);g.velocity=e&&v?s?E*t/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=g;A=T===D?0:v?r:r-n*B.timeScale,v&&(P=i),A>M&&(M=A)}if(!e){const e=I===u?x>u?-1:1:x<d?-1:1,s=vt(x-I,0);y.velocity=t&&v?s?E*e/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=y;L=x===I?0:v?r:r-n*B.timeScale,v&&(F=i),L>M&&(M=L)}if(!v&&O&&$&&(A||L)){const t=o.blend;new je(b,{x:{to:k,duration:.65*A},y:{to:R,duration:.65*L},ease:_,composition:t}).init(),new je(b,{x:{to:D,duration:A},y:{to:I,duration:L},ease:_,composition:t}).init(),this.overshootTicker.stretch(pt(A,L)).restart()}else t||this.animate[this.xProp](D,A,P),e||this.animate[this.yProp](I,L,F);this.scrollInView(M,this.scrollThreshold,_);let V=!1;D!==m&&(this.snapped[0]=D,this.snapX&&(V=!0)),I!==f&&this.snapY&&(this.snapped[1]=I,this.snapY&&(V=!0)),V&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ws),this.$trigger.removeEventListener("touchmove",ws),this.$trigger.removeEventListener("touchend",ws),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=ts(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.$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.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),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":ws(t)}}}const Rs=(t,e)=>new ks(t,e),Ds=(t=x)=>new ge({duration:1*B.timeScale,onComplete:t},null,0).resume(),Is=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 a=t(...s);return a&&!W(a)&&a.revert&&(e=a),q(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||x}};class Os{constructor(t={}){L.current&&L.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||ve(i)[0]||s);const n=t.defaults,o=B.defaults,a=t.mediaQueries;if(this.defaults=n?Et(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={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=B.defaults;L.current=this,L.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 L.current=e,L.root=s,B.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);W(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,W(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);W(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,W(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);W(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(W(s))return s(this);const i=Is(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,a=s.length,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 As=t=>new Os(t),Ls=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Bs=(t,e)=>t&&W(t)?t(e):t,Ps=new Map;class Fs{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.scale=1,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 ge({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;$t(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ge({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=vt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ge({autoplay:!1,duration:250*B.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ge({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=vt(t?e.scrollX:s.scrollLeft,0),this.scrollY=vt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Ls()}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=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){$t(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),$t(this,t=>{t.refresh(),t.onResize(t),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.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Ps.delete(this.element)}}const Ms=t=>{const e=t&&ve(t)[0]||s.body;let i=Ps.get(e);return i||(i=new Fs(e),Ps.set(e,i)),i},Vs=(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:l,u:h}=Xt(a,Ut);let d=l;return"%"===h?d=l/100*s:h&&(d=Se(t,Ut,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},zs=(t,e,s,i,r)=>{let n;if(Y(e)){const o=I.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=Vs(t,h[0],s,i,r),p=Vs(t,h[1],s,i,r);if(d){const e=Vt(Vs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Vt(Vs(t,"max",s),p,l);n=e>u?u:e}else n=Vt(u,p,l)}else n=Vs(t,e,s,i,r)}else n=e;return vt(n,0)},Xs=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[l]){e=i;break}}return e};let Hs=0;const Us=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Ys{constructor(t={}){L.current&&L.current.register(this);const e=Lt(t.sync,"play pause"),i=e?Ae(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(U(e)||!0===e||r),a=e&&Y(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=Hs++,this.id=q(t.id)?this.index:t.id,this.container=Ms(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!l,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:x,this.onSyncLeave=l&&!h&&l[1]?l[1]:x,this.onSyncEnterForward=l&&h&&l[0]?l[0]:x,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:x,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:x,this.onSyncLeaveBackward=l&&h&&l[3]?l[3]:x,this.onEnter=t.onEnter||x,this.onLeave=t.onLeave||x,this.onEnterForward=t.onEnterForward||x,this.onLeaveForward=t.onLeaveForward||x,this.onEnterBackward=t.onEnterBackward||x,this.onLeaveBackward=t.onLeaveBackward||x,this.onUpdate=t.onUpdate||x,this.onResize=t.onResize||x,this.onSyncComplete=t.onSyncComplete||x,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,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=Lt(t.debug,!1),this._next=null,this._prev=null,Nt(this.container,this),Ds(()=>{if(!this.reverted){if(!this.target){const e=ve(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,q(t)||q(t.persist)||(t.persist=!0),!this._params.target)){let e;q(t.targets)?$t(t,t=>{t.targets&&!e&&(e=Xs(t))}):e=Xs(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:vt(yt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Lt(Bs(t.repeat,this),!0),this.horizontal="x"===Lt(Bs(t.axis,this),"y"),this.enter=Lt(Bs(t.enter,this),"end start"),this.leave=Lt(Bs(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=Us[this.index%Us.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?t.winHeight:t.height,c=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,y=e?g:15,_=e?60:g,v=e?_:y,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",x=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,S=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${S("absolute",m,f,e?c: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=`${S("sticky",0,0,e?h:g,e?g:d)}`,i||(n.style.cssText+=`background:\n ${x("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${S("relative",0,0,e?c:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${x("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const w=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,l=(r?0:this.offset)+t,m=i%2,f=l<v,g=l>(r?e?h:d:e?c:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),x=s.createElement("div"),E=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]}`,T.style.cssText=`${S("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-${E}: 2px solid ${a};\n `,x.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\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 `,T.appendChild(x);let C=l-$+(e?1:0);T.style[e?"left":"top"]=`${C}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"===Ke(t.element,"position")&&(this.debugStyles=ts(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;for(n&&(o=n.currentTime,n.seek(0,!0));a&&a!==i.element&&a!==s.body;){const e="sticky"===Ke(a,"position")&&ts(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=i.scale,d=(r?l.left+i.scrollX-i.left:l.top+i.scrollY-i.top)*h,c=(r?l.width:l.height)*h,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(Y(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(H(m)){const t=m;q(t.container)||(_=t.container),q(t.target)||(g=t.target)}else U(m)&&(_=m);if(Y(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(H(f)){const t=f;q(t.container)||(v=t.container),q(t.target)||(y=t.target)}else U(f)&&(v=f);const b=zs(e,g,c),T=zs(e,y,c),x=b+d-u,S=T+d-p,w=zs(e,_,u,x,S),E=zs(e,v,u,x,S),$=b+d-w,C=T+d-E,N=C-$;this.offset=d,this.offsetStart=$,this.offsetEnd=C,this.distance=N<=0?0:N,this.thresholds=[g,y,_,v],this.coords=[b,T,w,E],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&U(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=vt(Tt(e,g,Tt(.01,.2,i))+s,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"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(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))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&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 Ct(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Ws=(t={})=>new Ys(t),qs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,js=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=qs(r,e,s)-t,i>0?o=r:n=r}while(lt(i)>1e-7&&++a<100);return r},Gs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:qs(js(r,t,s),e,i),Qs=(t=10,e)=>{const s=e?dt:ct;return e=>s(yt(e,0,1)*t)*(1/t)},Js=(...t)=>{const e=t.length;if(!e)return we;const s=e-1,i=t[0],r=t[s],n=[0],o=[it(i)];for(let e=1;e<s;e++){const i=t[e],r=Y(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(q(l)?e/s:it(l)/100),o.push(it(a))}return o.push(it(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]}},Zs=(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(yt(o,r,1))}return s.push(1),Js(...s)};var Ks=Object.freeze({__proto__:null,Spring:Ts,createSpring:Ss,cubicBezier:Gs,eases:Re,irregular:Zs,linear:Js,spring:xs,steps:Qs});const ti=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(vt(t(i/e),4));return`linear(${s.join(", ")})`},ei={},si=t=>{let e=ei[t];if(e)return e;if(e="linear",Y(t)){if(V(t,"linear")||V(t,"cubic-")||V(t,"steps")||V(t,"ease"))e=t;else if(V(t,"cubicB"))e=M(t);else{const s=Ie(t);W(s)&&(e=s===we?"linear":ti(s))}ei[t]=e}else if(W(t)){const s=ti(t);s&&(e=s)}else t.ease&&(e=ti(t.ease));return e},ii=["x","y","z"],ri=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...ii],ni=(()=>[...ii,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let oi=null;const ai=(t,e,s,i,r)=>{let n=Y(e)?e:Bt(e,s,i,r);return U(n)?ri.includes(t)||V(t,"translate")?`${n}px`:V(t,"rotate")||V(t,"skew")?`${n}deg`:`${n}`:n},li=(t,e,s,i,r,n)=>{let o="0";const a=q(i)?getComputedStyle(t)[e]:ai(e,i,t,r,n);return o=q(s)?X(i)?i.map(s=>ai(e,s,t,r,n)):a:[ai(e,s,t,r,n),a],o};class hi{constructor(e,s){L.current&&L.current.register(this),j(oi)&&(!t||!q(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=V(t,"skew"),s=V(t,"scale"),i=V(t,"rotate"),r=V(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{}}),oi=!0):oi=!1);const i=be(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=Lt(s.autoplay,B.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,l=s.reversed&&!0===s.reversed,h=Lt(s.loop,B.defaults.loop),c=!0===h||h===1/0?1/0:U(h)?h+1:1,u=a?l?"alternate-reverse":"alternate":l?"reverse":"normal",p=1===B.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||B.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!n||!1!==o,this.reversed=l,this.persist=Lt(s.persist,B.defaults.persist),this.autoplay=n,this._speed=Lt(s.playbackRate,B.defaults.playbackRate),this._resolve=x,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[d],n=ni.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},l=Lt(s.ease,B.defaults.ease),h=Bt(l,t,e,r),m=W(h)||Y(h)?h:l,f=l.ease&&l,g=si(m),_=(f?f.settlingDuration:Bt(Lt(s.duration,B.defaults.duration),t,e,r))*p,x=Bt(Lt(s.delay,B.defaults.delay),t,e,r)*p,S=Lt(s.composition,"replace");for(let l in s){if(!tt(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:g,duration:_,delay:x,composite:S},m=s[l],f=!!n&&(b.includes(l)?l:v.get(l)),y=f?"transform":l;let T;if(a[y]||(a[y]=o[y]),H(m)){const s=m,n=Lt(s.ease,g),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Bt(Lt(s.duration,_),t,e,r))*p,d.delay=Bt(Lt(s.delay,x),t,e,r)*p,d.composite=Lt(s.composition,S),d.easing=si(n),T=li(t,l,u,c,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=li(t,l,u,c,e,r),Ze(this,t,l,h,d),!q(u))if(f){const t=`--${f}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else T=X(m)?m.map(s=>ai(l,s,t,e,r)):ai(l,m,t,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=T,Ze(this,t,l,h,d)}if(n){let t=y;for(let e in i)t+=`${T[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=Y(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return 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:f);this.forEach(t=>{!this.persist&&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.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];q(r)||r===y?s.removeProperty(M(e)):t.style[e]=r}t.getAttribute("style")===y&&t.removeAttribute("style")}),this}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const di={animate:(t,e)=>new hi(t,e),convertEase:ti};let ci=0,ui=0;const pi=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),mi=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},fi=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},gi=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,mi(s)),i&&!e.has(i)&&e.set(i,mi(i))},yi=t=>{t.forEach((t,e)=>fi(e,t)),t.clear()},_i={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},vi=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},bi=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+ui++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.total=1,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Ti=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=pi(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=mi(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=mi(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,_=0,v=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();_=t.left,v=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);q(e)||(a[t]=e)}if(a.left=_,a.top=v,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=_,y=v):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=_-s-r,y=v-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=_-t-l.properties.clientLeft,y=v-e-l.properties.clientTop}else g=_-s-r,y=v-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},xi=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Si=(t,e)=>{const s=Bt(e.ease,t.$el,t.index,t.total),i=W(s)?s:e.ease,r=!q(i)&&!q(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Bt(e.duration,t.$el,t.index,t.total),t.delay=Bt(e.delay,t.$el,t.index,t.total)},wi=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},Ei=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},$i=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(fi(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(fi(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Ci=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.layout.pendingRemoval.delete(t.$el)},Ni=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class ki{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,mi(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||G(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?_i:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=pi(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=pi(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ti(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}vi(u),u=bi(e,t,this,u)}else u=bi(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Ti(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const t=this.layout,e=t.children,s=t.root,i=X(e)?e:[e],r=[],n="*"===e?s:L.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=mi(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=Y(e)?n.querySelectorAll(e):e}const l=be(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!pi(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode($i);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),fi(e,i)}return this}}function Ri(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class Di{constructor(t,e={}){L.current&&L.current.register(this);const s=Ri(e.swapAt),i=Ri(e.enterFrom),r=Ri(e.leaveTo),n=e.properties;if(e.duration=Lt(e.duration,350),e.delay=Lt(e.delay,0),e.ease=Lt(e.ease,"inOut(3.5)"),this.params=e,this.root=be(t)[0],this.id=ci++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=Et(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new ki(this),this.newState=new ki(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),yi(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>yi(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(Ei),this}animate(t={}){const e={ease:Lt(t.ease,this.params.ease),delay:Lt(t.delay,this.params.delay),duration:Lt(t.duration,this.params.duration)},s={},i=Lt(t.onComplete,this.params.onComplete),r=Lt(t.onPause,this.params.onPause);for(let e in A)"ease"!==e&&"duration"!==e&&"delay"!==e&&(q(t[e])?q(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Ci(t),Ei(t)});for(let t=0,e=S.length;t<e;t++){const e=S[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||yi(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Ci),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=Et(Et(t.swapAt||{},this.swapAtParams),e),o=Et(Et(t.enterFrom||{},this.enterFromParams),e),a=Et(Et(t.leaveTo||{},this.leaveToParams),e),[l,h]=Ri(n),[d,c]=Ri(o),[u,p]=Ri(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,_=this.entering,v=this.leaving,b=this.pendingRemoval;g.length=y.length=_.length=v.length=0,m.forEachRootNode(gi),f.record(),f.forEachRootNode(wi);const T=[],x=[],S=[],w=[],E=f.rootNode,$=E.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Ni(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Ni(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const S=b.has(e),w=a.measuredIsVisible,$=t.measuredIsVisible,C=!w&&$&&!o,N=!x&&(y||S)&&!r,k=x&&!y&&!n,R=k||x&&S&&!n;t.branchAdded=r||N,t.branchRemoved=n||R,t.branchNotRendered=o||x,x&&w&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Ni(a,t,f)),k?(t.isTarget&&(v.push(e),t.isLeaving=!0),b.add(e)):!x&&S&&b.delete(e),N&&!o||C?(xi(a,d),t.isTarget&&(_.push(e),t.isEntering=!0)):R&&!o&&xi(t,u),t===E||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,N=0,k=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==E&&i;for(;a&&!a.isTarget&&a!==E;)a=a.parentNode;const d=g.length;t===E?(t.index=0,t.total=d,Si(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:_.length,Si(t,c),C++):t.isLeaving?(t.index=a?a.index:N,t.total=a?d:v.length,N++,Si(t,p)):t.isTarget?(t.index=k++,t.total=d,Si(t,e)):(t.index=a?a.index:0,t.total=d,Si(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Bt(n[e],s,t.index,t.total),o[e]=Bt(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){t.isInlined||"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,S.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(!t.isInlined&&l.transform&&(t.hasTransform=!0,S.push(s)),w.push(s)))});const R={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=R,this.timeline=ls(s),!x.length&&!S.length&&!y.length)return yi(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==$||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===$&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px"),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none")}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};r.isInlined||(n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e);if(!s.isInlined){const t=s.properties;e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${t.x}px ${t.y}px`}this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{s.isInlined||(e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(w.length){const t=Ae(f.nodes.get(w[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(w,s,0)}}const D=S.length;if(D){for(let t=0;t<D;t++){const e=S[t];if(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`,e.style.transform=m.getComputedValue(e,"transform"),w.includes(e)){const t=f.getNode(e);t.ease=Bt(n.ease,e,t.index,t.total),t.duration=Bt(n.duration,e,t.index,t.total)}}this.transformAnimation=di.animate(S,{translate:t=>`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!w.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Bt(l.transform,t,i.index,i.total),e]},autoplay:!1,persist:!0,...R}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const Ii=(t,e)=>new Di(t,e),Oi=vs,Ai={},Li=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Bi=t=>(...e)=>{const s=t(...e);return new Proxy(x,{apply:(t,e,[i])=>s(i),get:(t,e)=>Bi((...t)=>{const i=Ai[e](...t);return t=>i(s(t))})})},Pi=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Bi(Li(e,s)):e)(...t);return Ai[t]||(Ai[t]=i),i},Fi=Pi("roundPad",Oi.roundPad),Mi=Pi("padStart",Oi.padStart),Vi=Pi("padEnd",Oi.padEnd),zi=Pi("wrap",Oi.wrap),Xi=Pi("mapRange",Oi.mapRange),Hi=Pi("degToRad",Oi.degToRad),Ui=Pi("radToDeg",Oi.radToDeg),Yi=Pi("snap",Oi.snap),Wi=Pi("clamp",Oi.clamp),qi=Pi("round",Oi.round),ji=Pi("lerp",Oi.lerp,1),Gi=Pi("damp",Oi.damp,1),Qi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Ji=0;const Zi=(t,e=0,s=1,i=0)=>{let r=void 0===t?Ji++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},Ki=t=>t[Qi(0,t.length-1)],tr=t=>{let e,s,i=t.length;for(;i;)s=Qi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},er=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!q(o),l=a&&!q(o.ease)?o.ease:a?Ae(o):null,h=e.grid,d=e.axis,c=e.total,u=q(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=X(t),_=e.use,v=it(g?t[0]:t),b=g?it(t[1]):0,T=k.exec((g?t[1]:t)+y),x=e.start||0+(g?v:0);let S=u?0:U(r)?r:0;return(t,r,o,a)=>{const[u]=be(t),y=q(c)?o:c,w=!q(_)&&(W(_)?_(u,r,y):Mt(u,_)),E=U(w)||Y(w)&&U(+w)?+w:r;if(p&&(S=(y-1)/2),m&&(S=y-1),!s.length){for(let t=0;t<y;t++){if(h){const e=p?(h[0]-1)/2:S%h[0],i=p?(h[1]-1)/2:ct(S/h[0]),r=e-t%h[0],n=i-ct(t/h[0]);let o=nt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(lt(S-t));i=pt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:lt(i-t))),f&&(s=tr(s))}const $=g?(b-v)/i:v;let C=(a?is(a,q(e.start)?a.iterationDuration:x):x)+($*vt(s[E],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var sr=Object.freeze({__proto__:null,$:be,clamp:Wi,cleanInlineStyles:Gt,createSeededRandom:Zi,damp:Gi,degToRad:Hi,get:Ke,keepTime:Is,lerp:ji,mapRange:Xi,padEnd:Vi,padStart:Mi,radToDeg:Ui,random:Qi,randomPick:Ki,remove:es,round:qi,roundPad:Fi,set:ts,shuffle:tr,snap:Yi,stagger:er,sync:Ds,wrap:zi});const ir=t=>{const e=ve(t)[0];return e&&G(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},rr=(t,e,s,i,r)=>{const n=s+i,o=r?Math.max(0,Math.min(n,e)):(n%e+e)%e;return t.getPointAtLength(o)},nr=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[h],o=t.getCTM(),a=0===s;return{from:0,to:r,modifier:i=>{const l=i+s*r;if("a"===e){const e=rr(t,r,l,-1,a),s=rr(t,r,l,1,a);return 180*mt(s.y-e.y,s.x-e.x)/ft}{const s=rr(t,r,l,0,a);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},or=(t,e=0)=>{const s=ir(t);if(s)return{translateX:nr(s,"x",e),translateY:nr(s,"y",e),rotate:nr(s,"a",e)}},ar=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(nt(s.a*s.a+s.b*s.b)+nt(s.c*s.c+s.d*s.d))/2)}return e},lr=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const l=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=ar(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:W(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l},hr=(t,e=0,s=0)=>ve(t).map(t=>lr(t,e,s)),dr=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=ir(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[c];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 d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+vt(c.x,3)+n+c.y+" ",l+=p+vt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[c]=l,[a,l]};var cr=Object.freeze({__proto__:null,createDrawable:hr,createMotionPath:or,morphTo:dr});const ur="undefined"!=typeof Intl&&Intl.Segmenter,pr=/\{value\}/g,mr=/\{i\}/g,fr=/(\s+)/,gr=/^\s+$/,yr="line",_r="word",vr="char",br="data-line";let Tr=null,xr=null,Sr=null;const wr=t=>t.isWordLike||" "===t.segment||U(+t.segment),Er=t=>t.setAttribute("aria-hidden","true"),$r=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Cr={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Nr=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Nr(e)}},kr=(t,e,s)=>{const i=t.getAttribute(br);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&gr.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&gr.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)kr(t.children[r],e,s);return s},Rr=(t,e={})=>{let s="";const i=Y(e.class)?` class="${e.class}"`:"",r=Lt(e.clone,!1),n=Lt(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},Dr=(t,e,s,i,r,n,o,a,l)=>{const h=r===yr,d=r===vr,c=`_${r}_`,u=W(t)?t(s):t,p=h?"block":"inline-block";Sr.innerHTML=u.replace(pr,`<i class="${c}"></i>`).replace(mr,`${d?l:h?o:a}`);const m=Sr.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(br,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Cr[r]}`),f};class Ir{constructor(e,i={}){Tr||(Tr=ur?new ur([],{granularity:_r}):{segment:t=>{const e=[],s=t.split(fr);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!gr.test(i)})}return e}}),xr||(xr=ur?new ur([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Sr&&t&&(Sr=s.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=i,d=(e=X(e)?e[0]:e)&&e.nodeType?e:(_e(e)||[])[0],c=!0===o?{}:o,u=!0===r||q(r)?{}:r,p=!0===n?{}:n;this.debug=Lt(h,!1),this.includeSpaces=Lt(l,!1),this.accessible=Lt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=H(c)?Rr(yr,c):c,this.wordTemplate=H(u)||this.linesOnly?Rr(_r,u):u,this.charTemplate=H(p)?Rr(vr,p):p,this.$target=d,this.html=d&&d.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&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=Is(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=>W(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 a=[],l=this.words,h=this.chars,d=Tr.segment(o),c=s.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=wr(t);if(!u||s&&u&&wr(u))a.push(e);else{const t=a.length-1,s=a[t];fr.test(s)||fr.test(e)?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const d=a[t+1],u=r&&d&&!d.trim(),p=o,m=i?xr.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],a=e===r-1&&u?o.segment+" ":o.segment,d=s.createTextNode(a);Dr(i,h,d,f,vr,n,-1,l.length,h.length)}}e?Dr(e,l,f,c,_r,n,-1,l.length,h.length):i?c.appendChild(f):c.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(c,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,a="loading"!==s.fonts.status,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>W(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=$r(e,_r))),o&&(l||n)&&(this.chars=$r(e,vr));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!q(d)&&s-d>.5*i&&c++,e.setAttribute(br,`${c}`);const r=e.querySelectorAll(`[${br}]`);let n=r.length;for(;n--;)r[n].setAttribute(br,`${c}`);d=s}if(l){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<c+1;t++){const s=e.cloneNode(!0);kr(s,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&i.add(e),e.removeChild(t))}),a.push(s)}i.forEach(Nr);for(let e=0,s=a.length;e<s;e++)Dr(r,this.lines,a[e],t,yr,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=$r(e,_r)),o&&(this.chars=$r(e,vr))}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(this.accessible&&(l||!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(Er),this.words.forEach(Er),this.chars.forEach(Er)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Or=(t,e)=>new Ir(t,e),Ar=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ir(t,e));var Lr=Object.freeze({__proto__:null,TextSplitter:Ir,split:Ar,splitText:Or});export{be as $,hs as Animatable,Di as AutoLayout,ks as Draggable,je as JSAnimation,Os as Scope,Ys as ScrollObserver,Ts as Spring,Ir as TextSplitter,as as Timeline,ge as Timer,hi as WAAPIAnimation,Ge as animate,Wi as clamp,Gt as cleanInlineStyles,ds as createAnimatable,Rs as createDraggable,hr as createDrawable,Ii as createLayout,or as createMotionPath,As as createScope,Zi as createSeededRandom,Ss as createSpring,ls as createTimeline,ye as createTimer,Gs as cubicBezier,Gi as damp,Hi as degToRad,Re as eases,Ks as easings,se as engine,Ke as get,Zs as irregular,Is as keepTime,ji as lerp,Js as linear,Xi as mapRange,dr as morphTo,Ws as onScroll,Vi as padEnd,Mi as padStart,Ui as radToDeg,Qi as random,Ki as randomPick,es as remove,qi as round,Fi as roundPad,Ps as scrollContainers,ts as set,tr as shuffle,Yi as snap,Ar as split,Or as splitText,xs as spring,er as stagger,Qs as steps,cr as svg,Ds as sync,Lr as text,sr as utils,di as waapi,zi as wrap};
|