animejs 4.3.0-beta.1 → 4.3.0-beta.2

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