squiffy-runtime 6.0.0-beta.0 → 6.0.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.
@@ -91,7 +91,7 @@ Expecting `+w.join(", ")+", got '"+(this.terminals_[S]||S)+"'":E="Parse error on
91
91
  * @license MIT
92
92
  * @copyright (c) 2025 Julian Garnier
93
93
  * @see https://animejs.com
94
- */const ot=typeof window<"u",Ie=ot?window:null,H=ot?document:null,pe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},Z={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ge={NONE:0,AUTO:1,FORCE:2},ke={replace:0,none:1,blend:2},zi=Symbol(),Qs=Symbol(),qr=Symbol(),ns=Symbol(),Vi=Symbol(),Ui=Symbol(),ee=1e-11,Ht=1e12,Ne=1e3,Hr=120,dt="",Fr=(()=>{const s=new Map;return s.set("x","translateX"),s.set("y","translateY"),s.set("z","translateZ"),s})(),is=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],$r=is.reduce((s,e)=>({...s,[e]:e+"("}),{}),W=()=>{},fl=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,dl=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,gl=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,ml=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,vl=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Wi=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,Gi=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,yl=/([a-z])([A-Z])/g,_l=/(\w+)(\([^)]+\)+)/g,Xi=/(\*=|\+=|-=)/,Yi={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Hr,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:Ne,delay:0,loopDelay:0,ease:"out(2)",composition:ke.replace,modifier:s=>s,onBegin:W,onBeforeUpdate:W,onUpdate:W,onLoop:W,onPause:W,onComplete:W,onRender:W},me={current:null,root:H},G={defaults:Yi,precision:4,timeScale:1,tickThreshold:200},Ji={version:"4.1.3",engine:null};ot&&(Ie.AnimeJS||(Ie.AnimeJS=[]),Ie.AnimeJS.push(Ji));const Qi=s=>s.replace(yl,"$1-$2").toLowerCase(),_e=(s,e)=>s.indexOf(e)===0,kt=Date.now,Le=Array.isArray,be=s=>s&&s.constructor===Object,Xe=s=>typeof s=="number"&&!isNaN(s),ze=s=>typeof s=="string",fe=s=>typeof s=="function",I=s=>typeof s>"u",os=s=>I(s)||s===null,zr=s=>ot&&s instanceof SVGElement,Ki=s=>fl.test(s),Zi=s=>_e(s,"rgb"),ji=s=>_e(s,"hsl"),bl=s=>Ki(s)||Zi(s)||ji(s),Ft=s=>!G.defaults.hasOwnProperty(s),Lt=s=>ze(s)?parseFloat(s):s,$t=Math.pow,xt=Math.sqrt,Vr=Math.sin,Ur=Math.cos,at=Math.abs,eo=Math.exp,Sl=Math.ceil,as=Math.floor,kl=Math.asin,Wr=Math.max,Ks=Math.atan2,zt=Math.PI,Gr=Math.round,F=(s,e,t)=>s<e?e:s>t?t:s,to={},N=(s,e)=>{if(e<0)return s;if(!e)return Gr(s);let t=to[e];return t||(t=to[e]=10**e),Gr(s*t)/t},At=(s,e)=>Le(e)?e.reduce((t,n)=>at(n-s)<at(t-s)?n:t):e?Gr(s/e)*e:s,gt=(s,e,t)=>s+(e-s)*t,Xr=(s,e,t)=>{const n=10**(t||0);return as((Math.random()*(e-s+1/n)+s)*n)/n},so=s=>{let e=s.length,t,n;for(;e;)n=Xr(0,--e),t=s[e],s[e]=s[n],s[n]=t;return s},Zs=s=>s===1/0?Ht:s===-1/0?-1e12:s,Vt=s=>s<=ee?ee:Zs(N(s,11)),Be=s=>Le(s)?[...s]:s,ls=(s,e)=>{const t={...s};for(let n in e){const r=s[n];t[n]=I(r)?e[n]:r}return t},ie=(s,e,t,n="_prev",r="_next")=>{let o=s._head,i=r;for(t&&(o=s._tail,i=n);o;){const l=o[i];e(o),o=l}},mt=(s,e,t="_prev",n="_next")=>{const r=e[t],o=e[n];r?r[n]=o:s._head=o,o?o[t]=r:s._tail=r,e[t]=null,e[n]=null},vt=(s,e,t,n="_prev",r="_next")=>{let o=s._tail;for(;o&&t&&t(o,e);)o=o[n];const i=o?o[r]:s._head;o?o[r]=e:s._head=e,i?i[n]=e:s._tail=e,e[n]=o,e[r]=i},Yr=s=>{let e;return(...t)=>{let n,r,o,i;e&&(n=e.currentIteration,r=e.iterationProgress,o=e.reversed,i=e._alternate,e.revert());const l=s(...t);return l&&!fe(l)&&l.revert&&(e=l),I(r)||(e.currentIteration=n,e.iterationProgress=(i&&n%2?!o:o)?1-r:r),l||W}};class ro{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=N(Ne/Hr,0),this._fps=Hr,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<ee?ee:n,o=N(Ne/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<ee?ee:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return Ge.NONE;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,Ge.AUTO}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const js=(s,e,t,n,r)=>{const o=s.parent,i=s.duration,l=s.completed,c=s.iterationDuration,p=s.iterationCount,f=s._currentIteration,g=s._loopDelay,u=s._reversed,h=s._alternate,a=s._hasChildren,d=s._delay,m=s._currentTime,v=d+c,_=e-d,S=F(m,-d,i),y=F(_,-d,i),b=_-m,k=y>0,x=y>=i,C=i<=ee,O=r===Ge.FORCE;let P=0,w=_,E=0;if(p>1){const U=~~(y/(c+(x?0:g)));s._currentIteration=F(U,0,p),x&&s._currentIteration--,P=s._currentIteration%2,w=y%(c+g)||0}const L=u^(h&&P),M=s._ease;let q=x?L?0:i:L?c-w:w;M&&(q=c*M(q/c)||0);const $=(o?o.backwards:_<m)?!L:!!L;if(s._currentTime=_,s._iterationTime=q,s.backwards=$,k&&!s.began?(s.began=!0,!t&&!(o&&($||!o.began))&&s.onBegin(s)):_<=0&&(s.began=!1),!t&&!a&&k&&s._currentIteration!==f&&s.onLoop(s),O||r===Ge.AUTO&&(e>=d&&e<=v||e<=d&&S>d||e>=v&&S!==i)||q>=v&&S!==i||q<=d&&S>0||e<=S&&S===i&&l||x&&!l&&C){if(k&&(s.computeDeltaTime(S),t||s.onBeforeUpdate(s)),!a){const U=O||($?b*-1:b)>=G.tickThreshold,z=s._offset+(o?o._offset:0)+d+q;let R=s._head,ae,te,xe,ve,V=0;for(;R;){const j=R._composition,re=R._currentTime,ue=R._changeDuration,ct=R._absoluteStartTime+R._changeDuration,Ae=R._nextRep,we=R._prevRep,he=j!==ke.none;if((U||(re!==ue||z<=ct+(Ae?Ae._delay:0))&&(re!==0||z>=R._absoluteStartTime))&&(!he||!R._isOverridden&&(!R._isOverlapped||z<=ct)&&(!Ae||Ae._isOverridden||z<=Ae._absoluteStartTime)&&(!we||we._isOverridden||z>=we._absoluteStartTime+we._changeDuration+R._delay))){const se=R._currentTime=F(q-R._startTime,0,ue),Y=R._ease(se/R._updateDuration),Te=R._modifier,Ue=R._valueType,Ce=R._tweenType,Re=Ce===pe.OBJECT,St=Ue===Z.NUMBER,qe=St&&Re||Y===0||Y===1?-1:G.precision;let ge,T;if(St)ge=T=Te(N(gt(R._fromNumber,R._toNumber,Y),qe));else if(Ue===Z.UNIT)T=Te(N(gt(R._fromNumber,R._toNumber,Y),qe)),ge=`${T}${R._unit}`;else if(Ue===Z.COLOR){const A=R._fromNumbers,B=R._toNumbers,J=N(F(Te(gt(A[0],B[0],Y)),0,255),0),Q=N(F(Te(gt(A[1],B[1],Y)),0,255),0),ye=N(F(Te(gt(A[2],B[2],Y)),0,255),0),Pe=F(Te(N(gt(A[3],B[3],Y),qe)),0,1);if(ge=`rgba(${J},${Q},${ye},${Pe})`,he){const Ee=R._numbers;Ee[0]=J,Ee[1]=Q,Ee[2]=ye,Ee[3]=Pe}}else if(Ue===Z.COMPLEX){ge=R._strings[0];for(let A=0,B=R._toNumbers.length;A<B;A++){const J=Te(N(gt(R._fromNumbers[A],R._toNumbers[A],Y),qe)),Q=R._strings[A+1];ge+=`${Q?J+Q:J}`,he&&(R._numbers[A]=J)}}if(he&&(R._number=T),!n&&j!==ke.blend){const A=R.property;ae=R.target,Re?ae[A]=ge:Ce===pe.ATTRIBUTE?ae.setAttribute(A,ge):(te=ae.style,Ce===pe.TRANSFORM?(ae!==xe&&(xe=ae,ve=ae[ns]),ve[A]=ge,V=1):Ce===pe.CSS?te[A]=ge:Ce===pe.CSS_VAR&&te.setProperty(A,ge)),k&&(E=1)}else R._value=ge}if(V&&R._renderTransforms){let se=dt;for(let Y in ve)se+=`${$r[Y]}${ve[Y]}) `;te.transform=se,V=0}R=R._next}!t&&E&&s.onRender(s)}!t&&k&&s.onUpdate(s)}return o&&C?!t&&(o.began&&!$&&_>=i&&!l||$&&_<=ee&&l)&&(s.onComplete(s),s.completed=!$):k&&x?p===1/0?s._startTime+=s.duration:s._currentIteration>=p-1&&(s.paused=!0,!l&&!a&&(s.completed=!0,!t&&!(o&&($||!o.began))&&(s.onComplete(s),s._resolve(s)))):s.completed=!1,E},Rt=(s,e,t,n,r)=>{const o=s._currentIteration;if(js(s,e,t,n,r),s._hasChildren){const i=s,l=i.backwards,c=n?e:i._iterationTime,p=kt();let f=0,g=!0;if(!n&&i._currentIteration!==o){const u=i.iterationDuration;ie(i,h=>{if(!l)!h.completed&&!h.backwards&&h._currentTime<h.iterationDuration&&js(h,u,t,1,Ge.FORCE),h.began=!1,h.completed=!1;else{const a=h.duration,d=h._offset+h._delay,m=d+a;!t&&a<=ee&&(!d||m===u)&&h.onComplete(h)}}),t||i.onLoop(i)}ie(i,u=>{const h=N((c-u._offset)*u._speed,12),a=u._fps<i._fps?u.requestTick(p):r;f+=js(u,h,t,n,a),!u.completed&&g&&(g=!1)},l),!t&&f&&i.onRender(i),(g||l)&&i._currentTime>=i.duration&&(i.paused=!0,i.completed||(i.completed=!0,t||(i.onComplete(i),i._resolve(i))))}},Ut={animation:null,update:W},xl=s=>{let e=Ut.animation;return e||(e={duration:ee,computeDeltaTime:W,_offset:0,_delay:0,_head:null,_tail:null},Ut.animation=e,Ut.update=()=>{s.forEach(t=>{for(let n in t){const r=t[n],o=r._head;if(o){const i=o._valueType,l=i===Z.COMPLEX||i===Z.COLOR?Be(o._fromNumbers):null;let c=o._fromNumber,p=r._tail;for(;p&&p!==o;){if(l)for(let f=0,g=p._numbers.length;f<g;f++)l[f]+=p._numbers[f];else c+=p._number;p=p._prevAdd}o._toNumber=c,o._toNumbers=l}}}),js(e,1,1,0,Ge.FORCE)}),e},no=ot?requestAnimationFrame:setImmediate,wl=ot?cancelAnimationFrame:clearImmediate;class Tl extends ro{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Yi,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=kt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(mt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Rt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Ge.AUTO),r=o}Ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(kt()),this.reqId=no(io)),this}pause(){if(this.reqId)return this.paused=!0,Cl()}resume(){if(this.paused)return this.paused=!1,ie(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(G.timeScale===1?1:Ne)}set speed(e){this._speed=e*G.timeScale,ie(this,t=>t.speed=t._speed)}get timeUnit(){return G.timeScale===1?"ms":"s"}set timeUnit(e){const n=e==="s",r=n?.001:1;if(G.timeScale!==r){G.timeScale=r,G.tickThreshold=200*r;const o=n?.001:Ne;this.defaults.duration*=o,this._speed*=o}}get precision(){return G.precision}set precision(e){G.precision=e}}const Se=(()=>{const s=new Tl(kt());return ot&&(Ji.engine=s,H.addEventListener("visibilitychange",()=>{s.pauseOnDocumentHidden&&(H.hidden?s.pause():s.resume())})),s})(),io=()=>{Se._head?(Se.reqId=no(io),Se.update()):Se.reqId=0},Cl=()=>(wl(Se.reqId),Se.reqId=0,Se),Pl=(s,e,t)=>{const n=s.style.transform;let r;if(n){const o=s[ns];let i;for(;i=_l.exec(n);){const l=i[1],c=i[2].slice(1,-1);o[l]=c,l===e&&(r=c,t&&(t[e]=c))}}return n&&!I(r)?r:_e(e,"scale")?"1":_e(e,"rotate")||_e(e,"skew")?"0deg":"0px"};function Jr(s){const e=ze(s)?me.root.querySelectorAll(s):s;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Ke(s){if(os(s))return[];if(!ot)return Le(s)&&s.flat(1/0)||[s];if(Le(s)){const t=s.flat(1/0),n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];if(!os(i)){const l=Jr(i);if(l)for(let c=0,p=l.length;c<p;c++){const f=l[c];if(!os(f)){let g=!1;for(let u=0,h=n.length;u<h;u++)if(n[u]===f){g=!0;break}g||n.push(f)}}else{let c=!1;for(let p=0,f=n.length;p<f;p++)if(n[p]===i){c=!0;break}c||n.push(i)}}}return n}const e=Jr(s);return e?Array.from(e):[s]}function cs(s){const e=Ke(s),t=e.length;if(t)for(let n=0;n<t;n++){const r=e[n];if(!r[zi]){r[zi]=!0;const o=zr(r);(r.nodeType||o)&&(r[Qs]=!0,r[qr]=o,r[ns]={})}}return e}const oo=s=>{const t=Ke(s)[0];if(!(!t||!zr(t)))return t},El=(s,e=.33)=>t=>{const n=oo(s);if(!n)return;const r=t.tagName==="path",o=r?" ":",",i=t[Vi];i&&t.setAttribute(r?"d":"points",i);let l="",c="";if(!e)l=t.getAttribute(r?"d":"points"),c=n.getAttribute(r?"d":"points");else{const p=t.getTotalLength(),f=n.getTotalLength(),g=Math.max(Math.ceil(p*e),Math.ceil(f*e));for(let u=0;u<g;u++){const h=u/(g-1),a=t.getPointAtLength(p*h),d=n.getPointAtLength(f*h),m=r?u===0?"M":"L":"";l+=m+N(a.x,3)+o+a.y+" ",c+=m+N(d.x,3)+o+d.y+" "}}return t[Vi]=c,[l,c]},Ll=s=>{let e=1;if(s&&s.getCTM){const t=s.getCTM();if(t){const n=xt(t.a*t.a+t.b*t.b),r=xt(t.c*t.c+t.d*t.d);e=(n+r)/2}}return e},Al=(s,e,t)=>{const n=Ne,r=getComputedStyle(s),o=r.strokeLinecap,i=r.vectorEffect==="non-scaling-stroke"?s:null;let l=o;const c=new Proxy(s,{get(p,f){const g=p[f];return f===Ui?p:f==="setAttribute"?(...u)=>{if(u[0]==="draw"){const a=u[1].split(" "),d=+a[0],m=+a[1],v=Ll(i),_=d*-1e3*v,S=m*n*v+_,y=n*v+(d===0&&m===1||d===1&&m===0?0:10*v)-S;if(o!=="butt"){const b=d===m?"butt":o;l!==b&&(p.style.strokeLinecap=`${b}`,l=b)}p.setAttribute("stroke-dashoffset",`${_}`),p.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(g,p,u)}:fe(g)?(...u)=>Reflect.apply(g,p,u):g}});return s.getAttribute("pathLength")!==`${n}`&&(s.setAttribute("pathLength",`${n}`),c.setAttribute("draw",`${e} ${t}`)),c},Rl=(s,e=0,t=0)=>Ke(s).map(r=>Al(r,e,t)),Qr=(s,e,t=0)=>s.getPointAtLength(e+t>=1?e+t:0),Kr=(s,e)=>t=>{const n=+s.getTotalLength(),r=t[qr],o=s.getCTM();return{from:0,to:n,modifier:i=>{if(e==="a"){const l=Qr(s,i,-1),c=Qr(s,i,1);return Ks(c.y-l.y,c.x-l.x)*180/zt}else{const l=Qr(s,i,0);return e==="x"?r||!o?l.x:l.x*o.a+l.y*o.c+o.e:r||!o?l.y:l.x*o.b+l.y*o.d+o.f}}}},Ol=s=>{const e=oo(s);if(e)return{translateX:Kr(e,"x"),translateY:Kr(e,"y"),rotate:Kr(e,"a")}},Ml=["opacity","rotate","overflow","color"],Il=(s,e)=>{if(Ml.includes(e))return!1;if(s.getAttribute(e)||e in s){if(e==="scale"){const t=s.parentNode;return t&&t.tagName==="filter"}return!0}},Nl={morphTo:El,createMotionPath:Ol,createDrawable:Rl},Bl=s=>{const e=dl.exec(s)||gl.exec(s),t=I(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],t]},Dl=s=>{const e=s.length,t=e===4||e===5;return[+("0x"+s[1]+s[t?1:2]),+("0x"+s[t?2:3]+s[t?2:4]),+("0x"+s[t?3:5]+s[t?3:6]),e===5||e===9?+(+("0x"+s[t?4:7]+s[t?4:8])/255).toFixed(3):1]},Zr=(s,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s),ql=s=>{const e=ml.exec(s)||vl.exec(s),t=+e[1]/360,n=+e[2]/100,r=+e[3]/100,o=I(e[4])?1:+e[4];let i,l,c;if(n===0)i=l=c=r;else{const p=r<.5?r*(1+n):r+n-r*n,f=2*r-p;i=N(Zr(f,p,t+1/3)*255,0),l=N(Zr(f,p,t)*255,0),c=N(Zr(f,p,t-1/3)*255,0)}return[i,l,c,o]},Hl=s=>Zi(s)?Bl(s):Ki(s)?Dl(s):ji(s)?ql(s):[0,0,0,1],D=(s,e)=>I(s)?e:s,Ye=(s,e,t,n,r)=>{if(fe(s)){const o=()=>{const i=s(e,t,n);return isNaN(+i)?i||0:+i};return r&&(r.func=o),o()}else return s},jr=(s,e)=>s[Qs]?s[qr]&&Il(s,e)?pe.ATTRIBUTE:is.includes(e)||Fr.get(e)?pe.TRANSFORM:_e(e,"--")?pe.CSS_VAR:e in s.style?pe.CSS:e in s?pe.OBJECT:pe.ATTRIBUTE:pe.OBJECT,ao=(s,e,t)=>{const n=s.style[e];n&&t&&(t[e]=n);const r=n||getComputedStyle(s[Ui]||s).getPropertyValue(e);return r==="auto"?"0":r},Ot=(s,e,t,n)=>{const r=I(t)?jr(s,e):t;return r===pe.OBJECT?s[e]||0:r===pe.ATTRIBUTE?s.getAttribute(e):r===pe.TRANSFORM?Pl(s,e,n):r===pe.CSS_VAR?ao(s,e,n).trimStart():ao(s,e,n)},Mt=(s,e,t)=>t==="-"?s-e:t==="+"?s+e:s*e,en=()=>({t:Z.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ze=(s,e)=>{if(e.t=Z.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!s)return e;const t=+s;if(isNaN(t)){let n=s;n[1]==="="&&(e.o=n[0],n=n.slice(2));const r=n.includes(" ")?!1:Gi.exec(n);if(r)return e.t=Z.UNIT,e.n=+r[1],e.u=r[2],e;if(e.o)return e.n=+n,e;if(bl(n))return e.t=Z.COLOR,e.d=Hl(n),e;{const o=n.match(Wi);return e.t=Z.COMPLEX,e.d=o?o.map(Number):[],e.s=n.split(Wi)||[],e}}else return e.n=t,e},lo=(s,e)=>(e.t=s._valueType,e.n=s._toNumber,e.u=s._unit,e.o=null,e.d=Be(s._toNumbers),e.s=Be(s._strings),e),De=en(),er={_rep:new WeakMap,_add:new Map},tn=(s,e,t="_rep")=>{const n=er[t];let r=n.get(s);return r||(r={},n.set(s,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Fl=(s,e)=>s._isOverridden||s._absoluteStartTime>e._absoluteStartTime,tr=s=>{s._isOverlapped=1,s._isOverridden=1,s._changeDuration=ee,s._currentTime=ee},co=(s,e)=>{const t=s._composition;if(t===ke.replace){const n=s._absoluteStartTime;vt(e,s,Fl,"_prevRep","_nextRep");const r=s._prevRep;if(r){const o=r.parent,i=r._absoluteStartTime+r._changeDuration;if(s.parent.id!==o.id&&o.iterationCount>1&&i+(o.duration-o.iterationDuration)>n){tr(r);let p=r._prevRep;for(;p&&p.parent.id===o.id;)tr(p),p=p._prevRep}const l=n-s._delay;if(i>l){const p=r._startTime,f=i-(p+r._updateDuration),g=N(l-f-p,12);r._changeDuration=g,r._currentTime=g,r._isOverlapped=1,g<ee&&tr(r)}let c=!0;if(ie(o,p=>{p._isOverlapped||(c=!1)}),c){const p=o.parent;if(p){let f=!0;ie(p,g=>{g!==o&&ie(g,u=>{u._isOverlapped||(f=!1)})}),f&&p.cancel()}else o.cancel()}}}else if(t===ke.blend){const n=tn(s.target,s.property,"_add"),r=xl(er._add);let o=n._head;o||(o={...s},o._composition=ke.replace,o._updateDuration=ee,o._startTime=0,o._numbers=Be(s._fromNumbers),o._number=0,o._next=null,o._prev=null,vt(n,o),vt(r,o));const i=s._toNumber;if(s._fromNumber=o._fromNumber-i,s._toNumber=0,s._numbers=Be(s._fromNumbers),s._number=0,o._fromNumber=i,s._toNumbers){const l=Be(s._toNumbers);l&&l.forEach((c,p)=>{s._fromNumbers[p]=o._fromNumbers[p]-c,s._toNumbers[p]=0}),o._fromNumbers=l}vt(n,s,null,"_prevAdd","_nextAdd")}return s},uo=s=>{const e=s._composition;if(e!==ke.none){const t=s.target,n=s.property,i=er._rep.get(t)[n];if(mt(i,s,"_prevRep","_nextRep"),e===ke.blend){const l=er._add,c=l.get(t);if(!c)return;const p=c[n],f=Ut.animation;mt(p,s,"_prevAdd","_nextAdd");const g=p._head;if(g&&g===p._tail){mt(p,g,"_prevAdd","_nextAdd"),mt(f,g);let u=!0;for(let h in c)if(c[h]._head){u=!1;break}u&&l.delete(t)}}}return s},ho=s=>(s.paused=!0,s.began=!1,s.completed=!1,s),sn=s=>(s._cancelled&&(s._hasChildren?ie(s,sn):ie(s,e=>{e._composition!==ke.none&&co(e,tn(e.target,e.property))}),s._cancelled=0),s);let $l=0;class Je extends ro{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:l,alternate:c,loop:p,loopDelay:f,autoplay:g,frameRate:u,playbackRate:h,onComplete:a,onLoop:d,onPause:m,onBegin:v,onBeforeUpdate:_,onUpdate:S}=e;me.current&&me.current.register(this);const y=t?0:Se._elapsedTime,b=t?t.defaults:G.defaults,k=fe(o)||I(o)?b.delay:+o,x=fe(i)||I(i)?1/0:+i,C=D(p,b.loop),O=D(f,b.loopDelay),P=C===!0||C===1/0||C<0?1/0:C+1;let w=0;t?w=n:(Se.reqId||Se.requestTick(kt()),w=(Se._elapsedTime-Se._startTime)*G.timeScale),this.id=I(r)?++$l:r,this.parent=t,this.duration=Zs((x+O)*P-O)||ee,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=v||b.onBegin,this.onBeforeUpdate=_||b.onBeforeUpdate,this.onUpdate=S||b.onUpdate,this.onLoop=d||b.onLoop,this.onPause=m||b.onPause,this.onComplete=a||b.onComplete,this.iterationDuration=x,this.iterationCount=P,this._autoplay=t?!1:D(g,b.autoplay),this._offset=w,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=W,this._running=!1,this._reversed=+D(l,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=D(c,b.alternate),this._prev=null,this._next=null,this._elapsedTime=y,this._startTime=y,this._lastTime=y,this._fps=D(u,b.frameRate),this._speed=D(h,b.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return F(N(this._currentTime,G.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return N(this._iterationTime,G.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return F(N(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return F(N(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*F(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return sn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,e,Ge.FORCE),ho(this),this._hasChildren&&ie(this,ho),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Rt(this,this.duration,1,e,Ge.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!I(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Se._speed);return this._startTime=kt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=ee&&!this._hasChildren?Rt(this,ee,0,0,Ge.FORCE):(this._running||(vt(Se,this),Se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Se.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){sn(this),this.completed=!1;const r=this.paused;return this.paused=!0,Rt(this,e+this._delay,~~t,~~n,Ge.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?as(Ht/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-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?ie(this,e=>e.cancel(),!0):ie(this,uo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=Vt(e);if(t===n)return this;const r=e/t,o=e<=ee;return this.duration=o?ee:n,this.iterationDuration=o?ee:Vt(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Rt(this,0,1,0,Ge.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const zl=s=>new Je(s,null,0).init(),yt=s=>s,po=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,Vl=(s,e,t)=>{let n=0,r=1,o,i,l=0;do i=n+(r-n)/2,o=po(i,e,t)-s,o>0?r=i:n=i;while(at(o)>1e-7&&++l<100);return i},Ul=(s=.5,e=0,t=.5,n=1)=>s===e&&t===n?yt:r=>r===0||r===1?r:po(Vl(r,s,t),e,n),Wl=(s=10,e)=>{const t=e?Sl:as;return n=>t(F(n,0,1)*s)*(1/s)},fo=(...s)=>{const e=s.length;if(!e)return yt;const t=e-1,n=s[0],r=s[t],o=[0],i=[Lt(n)];for(let l=1;l<t;l++){const c=s[l],p=ze(c)?c.trim().split(" "):[c],f=p[0],g=p[1];o.push(I(g)?l/t:Lt(g)/100),i.push(Lt(f))}return i.push(Lt(r)),o.push(1),function(c){for(let p=1,f=o.length;p<f;p++){const g=o[p];if(c<=g){const u=o[p-1],h=i[p-1];return h+(i[p]-h)*(c-u)/(g-u)}}return i[i.length-1]}},Gl=(s=10,e=1)=>{const t=[0],n=s-1;for(let r=1;r<n;r++){const o=t[r-1],i=r/n,l=(r+1)/n,c=i+(l-i)*Math.random(),p=i*(1-e)+c*e;t.push(F(p,o,1))}return t.push(1),fo(...t)},Xl=zt/2,go=zt*2,Wt=(s=1.68)=>e=>$t(e,+s),mo={[dt]:Wt,Quad:Wt(2),Cubic:Wt(3),Quart:Wt(4),Quint:Wt(5),Sine:s=>1-Ur(s*Xl),Circ:s=>1-xt(1-s*s),Expo:s=>s?$t(2,10*s-10):0,Bounce:s=>{let e,t=4;for(;s<((e=$t(2,--t))-1)/11;);return 1/$t(4,3-t)-7.5625*$t((e*3-2)/22-s,2)},Back:(s=1.70158)=>e=>(+s+1)*e*e*e-+s*e*e,Elastic:(s=1,e=.3)=>{const t=F(+s,1,10),n=F(+e,ee,2),r=n/go*kl(1/t),o=go/n;return i=>i===0||i===1?i:-t*$t(2,-10*(1-i))*Vr((1-i-r)*o)}},us={in:s=>e=>s(e),out:s=>e=>1-s(1-e),inOut:s=>e=>e<.5?s(e*2)/2:1-s(e*-2+2)/2,outIn:s=>e=>e<.5?(1-s(1-e*2))/2:(s(e*2-1)+1)/2},vo=(s,e,t)=>{if(t[s])return t[s];if(s.indexOf("(")<=-1){const r=us[s]||s.includes("Back")||s.includes("Elastic")?e[s]():e[s];return r?t[s]=r:yt}else{const n=s.slice(0,-1).split("("),r=e[n[0]];return r?t[s]=r(...n[1].split(",")):yt}},Gt=(()=>{const s={linear:fo,irregular:Gl,steps:Wl,cubicBezier:Ul};for(let e in us)for(let t in mo){const n=mo[t],r=us[e];s[e+t]=t===dt||t==="Back"||t==="Elastic"?(o,i)=>r(n(o,i)):r(n)}return s})(),Yl={linear:yt},It=s=>fe(s)?s:ze(s)?vo(s,Gt,Yl):yt,yo={},rn=(s,e,t)=>{if(t===pe.TRANSFORM){const n=Fr.get(s);return n||s}else if(t===pe.CSS||t===pe.ATTRIBUTE&&zr(e)&&s in e.style){const n=yo[s];if(n)return n;{const r=s&&Qi(s);return yo[s]=r,r}}else return s},nn={deg:1,rad:180/zt,turn:360},_o={},on=(s,e,t,n=!1)=>{const r=e.u,o=e.n;if(e.t===Z.UNIT&&r===t)return e;const i=o+r+t,l=_o[i];if(!I(l)&&!n)e.n=l;else{let c;if(r in nn)c=o*nn[r]/nn[t];else{const f=s.cloneNode(),g=s.parentNode,u=g&&g!==H?g:H.body;u.appendChild(f);const h=f.style;h.width=100+r;const a=f.offsetWidth||100;h.width=100+t;const d=f.offsetWidth||100,m=a/d;u.removeChild(f),c=m*o}e.n=c,_o[i]=c}return e.t,Z.UNIT,e.u=t,e},sr=s=>{if(s._hasChildren)ie(s,sr,!0);else{const e=s;e.pause(),ie(e,t=>{const n=t.property,r=t.target;if(r[Qs]){const o=r.style,i=e._inlineStyles[n];if(t._tweenType===pe.TRANSFORM){const l=r[ns];if(I(i)||i===dt?delete l[n]:l[n]=i,t._renderTransforms)if(!Object.keys(l).length)o.removeProperty("transform");else{let c=dt;for(let p in l)c+=$r[p]+l[p]+") ";o.transform=c}}else I(i)||i===dt?o.removeProperty(n):o[n]=i;e._tail===t&&e.targets.forEach(l=>{l.getAttribute&&l.getAttribute("style")===dt&&l.removeAttribute("style")})}})}return s},X=en(),K=en(),rr={func:null},nr=[null],Xt=[null,null],ir={to:null};let Jl=0,wt,lt;const Ql=(s,e)=>{const t={};if(Le(s)){const n=[].concat(...s.map(r=>Object.keys(r))).filter(Ft);for(let r=0,o=n.length;r<o;r++){const i=n[r],l=s.map(c=>{const p={};for(let f in c){const g=c[f];Ft(f)?f===i&&(p.to=g):p[f]=g}return p});t[i]=l}}else{const n=D(e.duration,G.defaults.duration);Object.keys(s).map(o=>({o:parseFloat(o)/100,p:s[o]})).sort((o,i)=>o.o-i.o).forEach(o=>{const i=o.o,l=o.p;for(let c in l)if(Ft(c)){let p=t[c];p||(p=t[c]=[]);const f=i*n;let g=p.length,u=p[g-1];const h={to:l[c]};let a=0;for(let d=0;d<g;d++)a+=p[d].duration;g===1&&(h.from=u.to),l.ease&&(h.ease=l.ease),h.duration=f-(g?a:0),p.push(h)}return o});for(let o in t){const i=t[o];let l;for(let c=0,p=i.length;c<p;c++){const f=i[c],g=f.ease;f.ease=l||void 0,l=g}i[0].duration||i.shift()}}return t};class _t extends Je{constructor(e,t,n,r,o=!1,i=0,l=0){super(t,n,r);const c=cs(e),p=c.length,f=t.keyframes,g=f?ls(Ql(f,t),t):t,{delay:u,duration:h,ease:a,playbackEase:d,modifier:m,composition:v,onRender:_}=g,S=n?n.defaults:G.defaults,y=D(d,S.playbackEase),b=y?It(y):null,k=!I(a)&&!I(a.ease),x=k?a.ease:D(a,b?"linear":S.ease),C=k?a.duration:D(h,S.duration),O=D(u,S.delay),P=m||S.modifier,w=I(v)&&p>=Ne?ke.none:I(v)?S.composition:v,E={},L=this._offset+(n?n._offset:0);let M=NaN,q=NaN,$=0,U=0;for(let z=0;z<p;z++){const R=c[z],ae=i||z,te=l||p;let xe=NaN,ve=NaN;for(let V in g)if(Ft(V)){const j=jr(R,V),re=rn(V,R,j);let ue=g[V];const ct=Le(ue);if(o&&!ct&&(Xt[0]=ue,Xt[1]=ue,ue=Xt),ct){const Te=ue.length,Ue=!be(ue[0]);Te===2&&Ue?(ir.to=ue,nr[0]=ir,wt=nr):Te>2&&Ue?(wt=[],ue.forEach((Ce,Re)=>{Re?Re===1?(Xt[1]=Ce,wt.push(Xt)):wt.push(Ce):Xt[0]=Ce})):wt=ue}else nr[0]=ue,wt=nr;let Ae=null,we=null,he=NaN,se=0,Y=0;for(let Te=wt.length;Y<Te;Y++){const Ue=wt[Y];be(Ue)?lt=Ue:(ir.to=Ue,lt=ir),rr.func=null;const Ce=Ye(lt.to,R,ae,te,rr);let Re;be(Ce)&&!I(Ce.to)?(lt=Ce,Re=Ce.to):Re=Ce;const St=Ye(lt.from,R,ae,te),qe=lt.ease,ge=!I(qe)&&!I(qe.ease),T=ge?qe.ease:qe||x,A=ge?qe.duration:Ye(D(lt.duration,Te>1?Ye(C,R,ae,te)/Te:C),R,ae,te),B=Ye(D(lt.delay,Y?0:O),R,ae,te),J=Ye(D(lt.composition,w),R,ae,te),Q=Xe(J)?J:ke[J],ye=lt.modifier||P,Pe=!I(St),Ee=!I(Re),je=Le(Re),de=je||Pe&&Ee,kn=we?se+B:B,xn=N(L+kn,12);!U&&(Pe||je)&&(U=1);let et=we;if(Q!==ke.none){Ae||(Ae=tn(R,re));let ce=Ae._head;for(;ce&&!ce._isOverridden&&ce._absoluteStartTime<=xn;)if(et=ce,ce=ce._nextRep,ce&&ce._absoluteStartTime>=xn)for(;ce;)tr(ce),ce=ce._nextRep}if(de?(Ze(je?Ye(Re[0],R,ae,te):St,X),Ze(je?Ye(Re[1],R,ae,te,rr):Re,K),X.t===Z.NUMBER&&(et?et._valueType===Z.UNIT&&(X.t=Z.UNIT,X.u=et._unit):(Ze(Ot(R,re,j,E),De),De.t===Z.UNIT&&(X.t=Z.UNIT,X.u=De.u)))):(Ee?Ze(Re,K):we?lo(we,K):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,j,E),K),Pe?Ze(St,X):we?lo(we,X):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,j,E),X)),X.o&&(X.n=Mt(et?et._toNumber:Ze(Ot(R,re,j,E),De).n,X.n,X.o)),K.o&&(K.n=Mt(X.n,K.n,K.o)),X.t!==K.t){if(X.t===Z.COMPLEX||K.t===Z.COMPLEX){const ce=X.t===Z.COMPLEX?X:K,Oe=X.t===Z.COMPLEX?K:X;Oe.t=Z.COMPLEX,Oe.s=Be(ce.s),Oe.d=ce.d.map(()=>Oe.n)}else if(X.t===Z.UNIT||K.t===Z.UNIT){const ce=X.t===Z.UNIT?X:K,Oe=X.t===Z.UNIT?K:X;Oe.t=Z.UNIT,Oe.u=ce.u}else if(X.t===Z.COLOR||K.t===Z.COLOR){const ce=X.t===Z.COLOR?X:K,Oe=X.t===Z.COLOR?K:X;Oe.t=Z.COLOR,Oe.s=ce.s,Oe.d=[0,0,0,1]}}if(X.u!==K.u){let ce=K.u?X:K;ce=on(R,ce,K.u?K.u:X.u,!1)}if(K.d&&X.d&&K.d.length!==X.d.length){const ce=X.d.length>K.d.length?X:K,Oe=ce===X?K:X;Oe.d=ce.d.map((Bc,zo)=>I(Oe.d[zo])?0:Oe.d[zo]),Oe.s=Be(ce.s)}const wn=N(+A||ee,12),yr={parent:this,id:Jl++,property:re,target:R,_value:null,_func:rr.func,_ease:It(T),_fromNumbers:Be(X.d),_toNumbers:Be(K.d),_strings:Be(K.s),_fromNumber:X.n,_toNumber:K.n,_numbers:Be(X.d),_number:X.n,_unit:K.u,_modifier:ye,_currentTime:0,_startTime:kn,_delay:+B,_updateDuration:wn,_changeDuration:wn,_absoluteStartTime:xn,_tweenType:j,_valueType:K.t,_composition:Q,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};Q!==ke.none&&co(yr,Ae),isNaN(he)&&(he=yr._startTime),se=N(kn+wn,12),we=yr,$++,vt(this,yr)}(isNaN(q)||he<q)&&(q=he),(isNaN(M)||se>M)&&(M=se),j===pe.TRANSFORM&&(xe=$-Y,ve=$)}if(!isNaN(xe)){let V=0;ie(this,j=>{V>=xe&&V<ve&&(j._renderTransforms=1,j._composition===ke.blend&&ie(Ut.animation,re=>{re.id===j.id&&(re._renderTransforms=1)})),V++})}}p||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),q?(ie(this,z=>{z._startTime-z._delay||(z._delay-=q),z._startTime-=q}),M-=q):q=0,M||(M=ee,this.iterationCount=0),this.targets=c,this.duration=M===ee?ee:Zs((M+this._loopDelay)*this.iterationCount-this._loopDelay)||ee,this.onRender=_||S.onRender,this._ease=b,this._delay=q,this.iterationDuration=M,this._inlineStyles=E,!this._autoplay&&U&&this.onRender(this)}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t;return ie(this,r=>{r._updateDuration=Vt(r._updateDuration*n),r._changeDuration=Vt(r._changeDuration*n),r._currentTime*=n,r._startTime*=n,r._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ie(this,e=>{const t=e._func;if(t){const n=Ot(e.target,e.property,e._tweenType);Ze(n,De),Ze(t(),K),e._fromNumbers=Be(De.d),e._fromNumber=De.n,e._toNumbers=Be(K.d),e._strings=Be(K.s),e._toNumber=K.o?Mt(De.n,K.n,K.o):K.n}}),this}revert(){return super.revert(),sr(this)}then(e){return super.then(e)}}const hs=(s,e)=>new _t(s,e,null,0,!1).init(),or=(s,e=100)=>{const t=[];for(let n=0;n<=e;n++)t.push(s(n/e));return`linear(${t.join(", ")})`},an={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Kl=(()=>{const s={};for(let e in us)s[e]=t=>us[e](Wt(t));return s})(),ln=s=>{let e=an[s];if(e)return e;if(e="linear",ze(s)){if(_e(s,"linear")||_e(s,"cubic-")||_e(s,"steps")||_e(s,"ease"))e=s;else if(_e(s,"cubicB"))e=Qi(s);else{const t=vo(s,Kl,an);fe(t)&&(e=t===yt?"linear":or(t))}an[s]=e}else if(fe(s)){const t=or(s);t&&(e=t)}else s.ease&&(e=or(s.ease));return e},bo=["x","y","z"],Zl=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bo],jl=[...bo,...is.filter(s=>["X","Y","Z"].some(e=>s.endsWith(e)))];let cn=null;const un={_head:null,_tail:null},hn=(s,e,t)=>{let n=un._head;for(;n;){const r=n._next,o=n.$el===s,i=!e||n.property===e,l=!t||n.parent===t;if(o&&i&&l){const c=n.animation;try{c.commitStyles()}catch{}c.cancel(),mt(un,n);const p=n.parent;p&&(p._completed++,p.animations.length===p._completed&&(p.completed=!0,p.muteCallbacks||(p.paused=!0,p.onComplete(p),p._resolve(p))))}n=r}},So=(s,e,t,n,r)=>{const o=e.animate(n,r),i=r.delay+ +r.duration*r.iterations;o.playbackRate=s._speed,s.paused&&o.pause(),s.duration<i&&(s.duration=i,s.controlAnimation=o),s.animations.push(o),hn(e,t),vt(un,{parent:s,animation:o,$el:e,property:t,_next:null,_prev:null});const l=()=>{hn(e,t,s)};return o.onremove=l,o.onfinish=l,o},ps=(s,e,t,n,r)=>{let o=Ye(e,t,n,r);return Xe(o)?Zl.includes(s)||_e(s,"translate")?`${o}px`:_e(s,"rotate")||_e(s,"skew")?`${o}deg`:`${o}`:o},ko=(s,e,t,n,r,o)=>{let i="0";const l=I(n)?getComputedStyle(s)[e]:ps(e,n,s,r,o);return I(t)?i=Le(n)?n.map(c=>ps(e,c,s,r,o)):l:i=[ps(e,t,s,r,o),l],i};class xo{constructor(e,t){me.current&&me.current.register(this),os(cn)&&(ot&&(I(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?cn=!1:(is.forEach(v=>{const _=_e(v,"skew"),S=_e(v,"scale"),y=_e(v,"rotate"),b=_e(v,"translate"),k=y||_,x=k?"<angle>":S?"<number>":b?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+v,syntax:x,inherits:!1,initialValue:b?"0px":k?"0deg":S?"1":"0"})}catch{}}),cn=!0));const n=cs(e),r=n.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const o=D(t.ease,ln(G.defaults.ease)),i=o.ease&&o,l=D(t.autoplay,G.defaults.autoplay),c=l&&l.link?l:!1,p=t.alternate&&t.alternate===!0,f=t.reversed&&t.reversed===!0,g=D(t.loop,G.defaults.loop),u=g===!0||g===1/0?1/0:Xe(g)?g+1:1,h=p?f?"alternate-reverse":"alternate":f?"reverse":"normal",a="forwards",d=ln(o),m=G.timeScale===1?1:Ne;this.targets=n,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||W,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!l||c!==!1,this.reversed=f,this.autoplay=l,this._speed=D(t.playbackRate,G.defaults.playbackRate),this._resolve=W,this._completed=0,this._inlineStyles=n.map(v=>v.getAttribute("style")),n.forEach((v,_)=>{const S=v[ns],y=jl.some(C=>t.hasOwnProperty(C)),b=(i?i.duration:Ye(D(t.duration,G.defaults.duration),v,_,r))*m,k=Ye(D(t.delay,G.defaults.delay),v,_,r)*m,x=D(t.composition,"replace");for(let C in t){if(!Ft(C))continue;const O={},P={iterations:u,direction:h,fill:a,easing:d,duration:b,delay:k,composite:x},w=t[C],E=y?is.includes(C)?C:Fr.get(C):!1;let L;if(be(w)){const M=w,q=D(M.ease,o),$=q.ease&&q,U=M.to,z=M.from;if(P.duration=($?$.duration:Ye(D(M.duration,b),v,_,r))*m,P.delay=Ye(D(M.delay,k),v,_,r)*m,P.composite=D(M.composition,x),P.easing=ln(q),L=ko(v,C,z,U,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=ko(v,C,z,U,_,r),So(this,v,C,O,P),!I(z))if(!E)v.style[C]=O[C][0];else{const R=`--${E}`;v.style.setProperty(R,O[R][0])}}else L=Le(w)?w.map(M=>ps(C,M,v,_,r)):ps(C,w,v,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=L,So(this,v,C,O,P)}if(y){let C=dt;for(let O in S)C+=`${$r[O]}var(--${O})) `;v.style.transform=C}}),c&&this.autoplay.link(this)}forEach(e){const t=ze(e)?n=>n[e]():e;return this.animations.forEach(t),this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=G.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(G.timeScale===1?1:Ne);this.forEach(n=>{t>=this.duration&&n.play(),n.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*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(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach((e,t)=>e.setAttribute("style",this._inlineStyles[t])),this}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const ec={animate:(s,e)=>new xo(s,e),convertEase:or},wo=(s=W)=>new Je({duration:1*G.timeScale,onComplete:s},null,0).resume();function Nt(s,e,t){const n=cs(s);if(!n.length)return;const[r]=n,o=jr(r,e),i=rn(e,r,o);let l=Ot(r,i);if(I(t))return l;if(Ze(l,De),De.t===Z.NUMBER||De.t===Z.UNIT){if(t===!1)return De.n;{const c=on(r,De,t,!1);return`${N(c.n,G.precision)}${c.u}`}}}const Tt=(s,e)=>{if(!I(e))return e.duration=ee,e.composition=D(e.composition,ke.none),new _t(s,e,null,0,!0).resume()},To=(s,e,t)=>{let n=!1;return ie(e,r=>{const o=r.target;if(s.includes(o)){const i=r.property,l=r._tweenType,c=rn(t,o,l);(!c||c&&c===i)&&(r.parent._tail===r&&r._tweenType===pe.TRANSFORM&&r._prev&&r._prev._tweenType===pe.TRANSFORM&&(r._prev._renderTransforms=1),mt(e,r),uo(r),n=!0)}},!0),n},bt=(s,e,t)=>{const n=Ke(s),r=e||Se,o=e&&e.controlAnimation&&e;for(let l=0,c=n.length;l<c;l++){const p=n[l];hn(p,t,o)}let i;if(r._hasChildren){let l=0;ie(r,c=>{if(!c._hasChildren)if(i=To(n,c,t),i&&!c._head)c.cancel(),mt(r,c);else{const f=c._offset+c._delay+c.duration;f>l&&(l=f)}c._head?bt(s,c,t):c._hasChildren=!1},!0),I(r.iterationDuration)||(r.iterationDuration=l)}else i=To(n,r,t);return i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),n},tc=Yr,sc=s=>s[Xr(0,s.length-1)],rc=(s,e)=>(+s).toFixed(e),nc=(s,e,t)=>`${s}`.padStart(e,t),ic=(s,e,t)=>`${s}`.padEnd(e,t),oc=(s,e,t)=>((s-e)%(t-e)+(t-e))%(t-e)+e,fs=(s,e,t,n,r)=>n+(s-e)/(t-e)*(r-n),ac=s=>s*zt/180,lc=s=>s*180/zt,Co=(s,e,t,n)=>{let r=Ne/G.defaults.frameRate;if(n!==!1){const i=n||Se._hasChildren&&Se;i&&i.deltaTime&&(r=i.deltaTime)}const o=1-Math.exp(-t*r*.1);return t?t===1?e:(1-o)*s+o*e:s},cc=(s,e=0)=>(...t)=>e?n=>s(...t,n):n=>s(n,...t),Po=s=>(...e)=>{const t=s(...e);return new Proxy(W,{apply:(n,r,[o])=>t(o),get:(n,r)=>Po((...o)=>{const i=Eo[r](...o);return l=>i(t(l))})})},nt=(s,e=0)=>(...t)=>(t.length<s.length?Po(cc(s,e)):s)(...t),Eo={$:cs,get:Nt,set:Tt,remove:bt,cleanInlineStyles:sr,random:Xr,randomPick:sc,shuffle:so,lerp:Co,sync:wo,keepTime:tc,clamp:nt(F),round:nt(N),snap:nt(At),wrap:nt(oc),interpolate:nt(gt,1),mapRange:nt(fs),roundPad:nt(rc),padStart:nt(nc),padEnd:nt(ic),degToRad:nt(ac),radToDeg:nt(lc)},uc=(s,e)=>{if(_e(e,"<")){const t=e[1]==="<",n=s._tail,r=n?n._offset+n._delay:0;return t?r:r+n.duration}},ds=(s,e)=>{let t=s.iterationDuration;if(t===ee&&(t=0),I(e))return t;if(Xe(+e))return+e;const n=e,r=s?s.labels:null,o=!os(r),i=uc(s,n),l=!I(i),c=Xi.exec(n);if(c){const p=c[0],f=n.split(p),g=o&&f[0]?r[f[0]]:t,u=l?i:o?g:t,h=+f[1];return Mt(u,h,p[0])}else return l?i:o?I(r[n])?t:r[n]:t};function hc(s){return Zs((s.iterationDuration+s._loopDelay)*s.iterationCount-s._loopDelay)||ee}function pn(s,e,t,n,r,o){const l=Xe(s.duration)&&s.duration<=ee?t-ee:t;Rt(e,l,1,1,Ge.AUTO);const c=n?new _t(n,s,e,l,!1,r,o):new Je(s,e,l);return c.init(1),vt(e,c),ie(e,p=>{const g=p._offset+p._delay+p.duration;g>e.iterationDuration&&(e.iterationDuration=g)}),e.duration=hc(e),e}class Lo extends Je{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=G.defaults;this.defaults=t?ls(t,n):n,this.onRender=e.onRender||n.onRender;const r=D(e.playbackEase,n.playbackEase);this._ease=r?It(r):null,this.iterationDuration=0}add(e,t,n){const r=be(t),o=be(e);if(r||o){if(this._hasChildren=!0,r){const i=t;if(fe(n)){const l=n,c=Ke(e),p=this.duration,f=this.iterationDuration,g=i.id;let u=0;const h=c.length;c.forEach(a=>{const d={...i};this.duration=p,this.iterationDuration=f,I(g)||(d.id=g+"-"+u),pn(d,this,ds(this,l(a,u,h,this)),a,u,h),u++})}else pn(i,this,ds(this,n),e)}else pn(e,this,ds(this,t));return this.init(1)}}sync(e,t){if(I(e)||e&&I(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:"linear"},t)}set(e,t,n){return I(t)?this:(t.duration=ee,t.composition=ke.replace,this.add(e,t,n))}call(e,t){return I(e)||e&&!fe(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return I(e)||e&&!ze(e)?this:(this.labels[e]=ds(this,t),this)}remove(e,t){return bt(e,this,t),this}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t,r=this.labels;ie(this,o=>o.stretch(o.duration*n));for(let o in r)r[o]*=n;return super.stretch(e)}refresh(){return ie(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ie(this,e=>e.revert,!0),sr(this)}then(e){return super.then(e)}}const pc=s=>new Lo(s).init();class fn{constructor(e,t){me.current&&me.current.register(this);const n=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let p in this.animations)if(!this.animations[p].paused&&c){c=!1;break}c&&this.callbacks.complete()},o={onBegin:n,onComplete:r,onPause:r},i={v:1,autoplay:!1},l={};if(this.targets=[],this.animations={},this.callbacks=null,!(I(e)||I(t))){for(let c in t){const p=t[c];Ft(c)?l[c]=p:_e(c,"on")?i[c]=p:o[c]=p}this.callbacks=new _t({v:0},i);for(let c in l){const p=l[c],f=be(p);let g={},u="+=0";if(f){const d=p.unit;ze(d)&&(u+=d)}else g.duration=p;g[c]=f?ls({to:u},p):u;const h=ls(o,g);h.composition=ke.replace,h.autoplay=!1;const a=this.animations[c]=new _t(e,h,null,0,!1).init();this.targets.length||this.targets.push(...a.targets),this[c]=(d,m,v)=>{const _=a._head;if(I(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ie(a,S=>{if(Le(d))for(let y=0,b=d.length;y<b;y++)I(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=d[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=d;I(v)||(S._ease=It(v)),S._currentTime=0}),I(m)||a.stretch(m),a.reset(1).resume(),this}}}}revert(){for(let e in this.animations)this[e]=W,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const fc=(s,e)=>new fn(s,e),Ct=Ne*10;class Ao{constructor(e={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ne,this.maxIterations=this.maxDuration/this.timeStep/Ne,this.m=F(D(e.mass,1),0,Ct),this.s=F(D(e.stiffness,100),1,Ct),this.d=F(D(e.damping,10),.1,Ct),this.v=F(D(e.velocity,0),-1e4,Ct),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>t===0||t===1?t:this.solve(t*this.solverDuration)}solve(e){const{zeta:t,w0:n,wd:r,b:o}=this;let i=e;return t<1?i=eo(-i*t*n)*(1*Ur(r*i)+o*Vr(r*i)):i=(1+o*i)*eo(-i*n),1-i}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:o,d:i,s:l,v:c}=this,p=this.w0=F(xt(l/o),ee,Ne),f=this.zeta=i/(2*xt(l*o)),g=this.wd=f<1?p*xt(1-f*f):0;this.b=f<1?(f*p+-c)/g:-c+p;let u=0,h=0,a=0;for(;h<e&&a<t;)at(1-this.solve(u))<n?h++:h=0,this.solverDuration=u,u+=r,a++;this.duration=N(this.solverDuration*Ne,0)*G.timeScale}get mass(){return this.m}set mass(e){this.m=F(D(e,1),0,Ct),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=F(D(e,100),1,Ct),this.compute()}get damping(){return this.d}set damping(e){this.d=F(D(e,10),.1,Ct),this.compute()}get velocity(){return this.v}set velocity(e){this.v=F(D(e,0),-1e4,Ct),this.compute()}}const dn=s=>new Ao(s),Pt=s=>{s.cancelable&&s.preventDefault()};class dc{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:W,remove:W}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class gc{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,n=0;for(;t&&t!==H;)e(t,n),t=t.parentElement,n++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const n=getComputedStyle(t).transform;if(n){const r=new DOMMatrix(n);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform="none"})}revert(){this.traverseUp((e,t)=>{const n=this.inlineTransforms[t];n===""?e.style.removeProperty("transform"):e.style.transform=n})}}const Ve=(s,e)=>s&&fe(s)?s(e):s;let ar=0;class Ro{constructor(e,t={}){if(!e)return;me.current&&me.current.register(this);const n=t.x,r=t.y,o=t.trigger,i=t.modifier,l=t.releaseEase,c=l&&It(l),p=!I(l)&&!I(l.ease),f=be(n)&&!I(n.mapTo)?n.mapTo:"translateX",g=be(r)&&!I(r.mapTo)?r.mapTo:"translateY",u=Ve(t.container,this);this.containerArray=Le(u)?u:null,this.$container=u&&!this.containerArray?Ke(u)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.$target=be(e)?new dc(e):Ke(e)[0],this.$trigger=Ke(o||e)[0],this.fixed=Nt(this.$target,"position")==="fixed",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseYSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseEase=c||Gt.outQuint,this.hasReleaseSpring=p,this.onGrab=t.onGrab||W,this.onDrag=t.onDrag||W,this.onRelease=t.onRelease||W,this.onUpdate=t.onUpdate||W,this.onSettle=t.onSettle||W,this.onSnap=t.onSnap||W,this.onResize=t.onResize||W,this.onAfterResize=t.onAfterResize||W,this.disabled=[0,0];const h={};if(i&&(h.modifier=i),I(n)||n===!0)h[f]=0;else if(be(n)){const a=n,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[f]=d}else n===!1&&(h[f]=0,this.disabled[0]=1);if(I(r)||r===!0)h[g]=0;else if(be(r)){const a=r,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[g]=d}else r===!1&&(h[g]=0,this.disabled[1]=1);this.animate=new fn(this.$target,h),this.xProp=f,this.yProp=g,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,Ht,Ht,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=kt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new gc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new Je({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 Je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!I(u),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]?f:g,this.animate.callbacks.onRender=()=>{const a=this.updated,m=!(this.grabbed&&a)&&this.released,v=this.x,_=this.y,S=v-this.coords[2],y=_-this.coords[3];this.deltaX=S,this.deltaY=y,this.coords[2]=v,this.coords[3]=_,a&&(S||y)&&this.onUpdate(this),m?(this.computeVelocity(S,y),this.angle=Ks(y,S)):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 Je({autoplay:!1,duration:150*G.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),be(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const n=this.velocityTime,r=kt(),o=r-n;if(o<17)return this.velocity;this.velocityTime=r;const i=this.velocityStack,l=this.velocityMultiplier,c=this.minVelocity,p=this.maxVelocity,f=this.velocityStackIndex;i[f]=N(F(xt(e*e+t*t)/o*l,c,p),5);const g=Wr(i[0],i[1],i[2]);return this.velocity=g,this.velocityStackIndex=(f+1)%3,g}setX(e,t=!1){if(this.disabled[0])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=n,this.snapped[0]=At(n,this.snapX),this.animate[this.xProp](n,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=n,this.snapped[1]=At(n,this.snapY),this.animate[this.yProp](n,0),this.manual=!1,this}get x(){return N(this.animate[this.xProp](),G.precision)}set x(e){this.setX(e,!1)}get y(){return N(this.animate[this.yProp](),G.precision)}set y(e){this.setY(e,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(fs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(fs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=N(this.useWin?Ie.scrollX:this.$container.scrollLeft,0),t=N(this.useWin?Ie.scrollY:this.$container.scrollTop,0),[n,r,o,i]=this.containerPadding,l=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+n-l,this.scrollBounds[1]=e-this.targetBounds[1]-r+l,this.scrollBounds[2]=t-this.targetBounds[2]-o+l,this.scrollBounds[3]=e-this.targetBounds[3]+i-l}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,n=this.y,r=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 i=this.window[0]=Ie.innerWidth,l=this.window[1]=Ie.innerHeight,c=this.useWin,p=e.scrollWidth,f=e.scrollHeight,g=this.fixed,u=e.getBoundingClientRect(),[h,a,d,m]=this.containerPadding;this.dragArea[0]=c?0:u.left,this.dragArea[1]=c?0:u.top,this.scrollView[0]=c?F(p,i,p):p,this.scrollView[1]=c?F(f,l,f):f,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:b,bottom:k}=e.getBoundingClientRect();this.dragArea[2]=N(c?F(v,i,i):v,0),this.dragArea[3]=N(c?F(_,l,l):_,0);const x=Nt(e,"overflow"),C=x==="visible",O=x==="hidden";if(this.canScroll=g?!1:this.contained&&(e===H.body&&C||!O&&!C)&&(p>this.dragArea[2]+m-a||f>this.dragArea[3]+h-d)&&(!this.containerArray||this.containerArray&&!Le(this.containerArray)),this.contained){const P=this.scroll.x,w=this.scroll.y,E=this.canScroll,L=this.$target.getBoundingClientRect(),M=E?c?0:e.scrollLeft:0,q=E?c?0:e.scrollTop:0,$=E?this.scrollView[0]-M-v:0,U=E?this.scrollView[1]-q-_:0;this.targetBounds[0]=N(L.top+w-(c?0:y),0),this.targetBounds[1]=N(L.right+P-(c?i:b),0),this.targetBounds[2]=N(L.bottom+w-(c?l:k),0),this.targetBounds[3]=N(L.left+P-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+h,this.containerBounds[1]=this.containerArray[1]-a,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+m):(this.containerBounds[0]=-N(L.top-(g?F(y,0,l):y)+q-h,0),this.containerBounds[1]=-N(L.right-(g?F(b,0,i):b)-$+a,0),this.containerBounds[2]=-N(L.bottom-(g?F(k,0,l):k)-U+d,0),this.containerBounds[3]=-N(L.left-(g?F(S,0,i):S)+M-m,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=o,this.setX(t,!0),this.setY(n,!0)}isOutOfBounds(e,t,n){if(!this.contained)return 0;const[r,o,i,l]=e,[c,p]=this.disabled,f=!c&&t<l||!c&&t>o,g=!p&&n<r||!p&&n>i;return f&&!g?1:!f&&g?2:f&&g?3:0}refresh(){const e=this.parameters,t=e.x,n=e.y,r=Ve(e.container,this),o=Ve(e.containerPadding,this)||0,i=Le(o)?o:[o,o,o,o],l=this.x,c=this.y,p=Ve(e.cursor,this),f={onHover:"grab",onGrab:"grabbing"};if(p){const{onHover:d,onGrab:m}=p;d&&(f.onHover=d),m&&(f.onGrab=m)}this.containerArray=Le(r)?r:null,this.$container=r&&!this.containerArray?Ke(r)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=D(i,[0,0,0,0]),this.containerFriction=F(D(Ve(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=F(D(Ve(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ve(be(t)&&!I(t.snap)?t.snap:e.snap,this),this.snapY=Ve(be(n)&&!I(n.snap)?n.snap:e.snap,this),this.scrollSpeed=D(Ve(e.scrollSpeed,this),1.5),this.scrollThreshold=D(Ve(e.scrollThreshold,this),20),this.dragSpeed=D(Ve(e.dragSpeed,this),1),this.minVelocity=D(Ve(e.minVelocity,this),0),this.maxVelocity=D(Ve(e.maxVelocity,this),50),this.velocityMultiplier=D(Ve(e.velocityMultiplier,this),1),this.cursor=p===!1?!1:f,this.updateBoundingValues();const[g,u,h,a]=this.containerBounds;this.setX(F(l,a,u),!0),this.setY(F(c,g,h),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,b]=this.containerPadding,[k,x]=this.scrollView,C=this.dragArea[2],O=this.dragArea[3],P=this.scroll.x,w=this.scroll.y,E=this.$container.scrollWidth,L=this.$container.scrollHeight,M=this.useWin?F(E,this.window[0],E):E,q=this.useWin?F(L,this.window[1],L):L,$=k-M,U=x-q;this.dragged&&$>0&&(this.coords[0]-=$,this.scrollView[0]=M),this.dragged&&U>0&&(this.coords[1]-=U,this.scrollView[1]=q);const z=this.scrollSpeed*10,R=this.scrollThreshold,[ae,te]=this.coords,[xe,ve,V,j]=this.scrollBounds,re=N(F((te-xe+_)/R,-1,0)*z,0),ue=N(F((ae-ve-S)/R,0,1)*z,0),ct=N(F((te-V-y)/R,0,1)*z,0),Ae=N(F((ae-j+b)/R,-1,0)*z,0);if(re||ct||Ae||ue){const[we,he]=this.disabled;let se=P,Y=w;we||(se=N(F(P+(Ae||ue),0,k-C),0),this.coords[0]-=P-se),he||(Y=N(F(w+(re||ct),0,x-O),0),this.coords[1]-=w-Y),this.useWin?this.$scrollContainer.scrollBy(-(P-se),-(w-Y)):this.$scrollContainer.scrollTo(se,Y)}}const[e,t,n,r]=this.containerBounds,[o,i,l,c,p,f]=this.pointer;this.coords[0]+=(o-p)*this.dragSpeed,this.coords[1]+=(i-f)*this.dragSpeed,this.pointer[4]=o,this.pointer[5]=i;const[g,u]=this.coords,[h,a]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(g>t?t+(g-t)*d:g<r?r+(g-r)*d:g,!1),this.setY(u>n?n+(u-n)*d:u<e?e+(u-e)*d:u,!1),this.computeVelocity(o-p,i-f),this.angle=Ks(i-c,o-l);const[m,v]=this.snapped;(m!==h&&this.snapX||v!==a&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return bt(this,null,"x"),bt(this,null,"y"),bt(this,null,"progressX"),bt(this,null,"progressY"),bt(this.scroll),bt(this.overshootCoords),this}scrollInView(e,t=0,n=Gt.inOutQuad){this.updateScrollCoords();const r=this.destX,o=this.destY,i=this.scroll,l=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(l,r,o)){const[p,f,g,u]=l,h=N(F(o-p,-1e12,0),0),a=N(F(r-f,0,Ht),0),d=N(F(o-g,0,Ht),0),m=N(F(r-u,-1e12,0),0);new _t(i,{x:N(i.x+(m?m-t:a?a+t:0),0),y:N(i.y+(h?h-t:d?d+t:0),0),duration:I(e)?350*G.timeScale:e,ease:n,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(i.x,i.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,n=Gt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,o=this.y,[i,l,c,p]=this.containerPadding,f=this.scroll.y-this.targetBounds[0]+i+t,g=this.scroll.x-this.targetBounds[1]-l-t,u=this.scroll.y-this.targetBounds[2]-c-t,h=this.scroll.x-this.targetBounds[3]+p+t,a=this.isOutOfBounds([f,g,u,h],r,o);if(a){const[d,m]=this.disabled,v=F(At(r,this.snapX),h,g),_=F(At(o,this.snapY),f,u),S=I(e)?350*G.timeScale:e;!d&&(a===1||a===3)&&this.animate[this.xProp](v,S,n),!m&&(a===2||a===3)&&this.animate[this.yProp](_,S,n)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type==="range")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const n=e.changedTouches,r=n?n[0].clientX:e.clientX,o=n?n[0].clientY:e.clientY,{x:i,y:l}=this.transforms.normalizePoint(r,o),[c,p,f,g]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,h=this.x,a=this.y;this.coords[0]=this.coords[2]=u?h>p?p+(h-p)/u:h<g?g+(h-g)/u:h:h,this.coords[1]=this.coords[3]=u?a>f?f+(a-f)/u:a<c?c+(a-c)/u:a:a,this.pointer[0]=i,this.pointer[1]=l,this.pointer[2]=i,this.pointer[3]=l,this.pointer[4]=i,this.pointer[5]=l,this.pointer[6]=i,this.pointer[7]=l,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 d=Nt(this.$target,"zIndex",!1);ar=(d>ar?d:ar)+1,this.targetStyles=Tt(this.$target,{zIndex:ar}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(H.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Gt.out(3)),this.onGrab(this),H.addEventListener("touchmove",this),H.addEventListener("touchend",this),H.addEventListener("touchcancel",this),H.addEventListener("mousemove",this),H.addEventListener("mouseup",this),H.addEventListener("selectstart",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,n=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:o,y:i}=this.transforms.normalizePoint(n,r),l=o-this.pointer[6],c=i-this.pointer[7];let p=e.target,f=!1,g=!1,u=!1;for(;t&&p&&p!==this.$trigger;){const h=Nt(p,"overflow-y");if(h!=="hidden"&&h!=="visible"){const{scrollTop:a,scrollHeight:d,clientHeight:m}=p;if(d>m){u=!0,f=a<=3,g=a>=d-m-3;break}}p=p.parentNode}u&&(!f&&!g||f&&c<0||g&&c>0)?(this.pointer[0]=o,this.pointer[1]=i,this.pointer[2]=o,this.pointer[3]=i,this.pointer[4]=o,this.pointer[5]=i,this.pointer[6]=o,this.pointer[7]=i):(Pt(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Pt,{passive:!1}),this.$trigger.addEventListener("touchmove",Pt,{passive:!1}),this.$trigger.addEventListener("touchend",Pt),(!this.disabled[0]&&at(l)>3||!this.disabled[1]&&at(c)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=o,this.pointer[1]=i,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[e,t]=this.disabled,[n,r,o,i,l,c]=this.pointer,[p,f,g,u]=this.containerBounds,[h,a]=this.snapped,d=this.releaseXSpring,m=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,b=this.y,k=this.computeVelocity(n-l,r-c),x=this.angle=Ks(r-i,n-o),C=k*150,O=(1-this.releaseContainerFriction)*this.dragSpeed,P=y+Ur(x)*C,w=b+Vr(x)*C,E=P>f?f+(P-f)*O:P<u?u+(P-u)*O:P,L=w>g?g+(w-g)*O:w<p?p+(w-p)*O:w,M=this.destX=F(N(At(E,this.snapX),5),u,f),q=this.destY=F(N(At(L,this.snapY),5),p,g),$=this.isOutOfBounds(this.containerBounds,P,w);let U=0,z=0,R=v,ae=v,te=0;if(S.x=y,S.y=b,!e){const ve=M===f?y>f?-1:1:y<u?-1:1,V=N(y-M,0);d.velocity=t&&_?V?C*ve/at(V):0:k;const{ease:j,duration:re,restDuration:ue}=d;U=y===M?0:_?re:re-ue*G.timeScale,_&&(R=j),U>te&&(te=U)}if(!t){const ve=q===g?b>g?-1:1:b<p?-1:1,V=N(b-q,0);m.velocity=e&&_?V?C*ve/at(V):0:k;const{ease:j,duration:re,restDuration:ue}=m;z=b===q?0:_?re:re-ue*G.timeScale,_&&(ae=j),z>te&&(te=z)}if(!_&&$&&O&&(U||z)){const ve=ke.blend;new _t(S,{x:{to:E,duration:U*.65},y:{to:L,duration:z*.65},ease:v,composition:ve}).init(),new _t(S,{x:{to:M,duration:U},y:{to:q,duration:z},ease:v,composition:ve}).init(),this.overshootTicker.stretch(Wr(U,z)).restart()}else e||this.animate[this.xProp](M,U,R),t||this.animate[this.yProp](q,z,ae);this.scrollInView(te,this.scrollThreshold,v);let xe=!1;M!==h&&(this.snapped[0]=M,this.snapX&&(xe=!0)),q!==a&&this.snapY&&(this.snapped[1]=q,this.snapY&&(xe=!0)),xe&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Pt),this.$trigger.removeEventListener("touchmove",Pt),this.$trigger.removeEventListener("touchend",Pt),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.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=Tt(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),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.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(e){switch(e.type){case"mousedown":this.handleDown(e);break;case"touchstart":this.handleDown(e);break;case"mousemove":this.handleMove(e);break;case"touchmove":this.handleMove(e);break;case"mouseup":this.handleUp();break;case"touchend":this.handleUp();break;case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":Pt(e);break}}}const mc=(s,e)=>new Ro(s,e);class Oo{constructor(e={}){me.current&&me.current.register(this);const t=e.root;let n=H;t&&(n=t.current||t.nativeElement||Ke(t)[0]||H);const r=e.defaults,o=G.defaults,i=e.mediaQueries;if(this.defaults=r?ls(r,o):o,this.root=n,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={},i)for(let l in i){const c=Ie.matchMedia(i[l]);this.mediaQueryLists[l]=c,c.addEventListener("change",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=me.current,n=me.root,r=G.defaults;me.current=this,me.root=this.root,G.defaults=this.defaults;const o=this.mediaQueryLists;for(let l in o)this.matches[l]=o[l].matches;const i=e(this);return me.current=t,me.root=n,G.defaults=r,i}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(n=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,fe(e)){const n=e;this.constructors.push(n),this.execute(()=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...n)=>this.execute(()=>t(...n));return this}addOnce(e){if(this.once=!0,fe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const r=e;this.constructorsOnce[t]=r,this.execute(()=>{const o=r(this);fe(o)&&this.revertConstructorsOnce.push(o)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,n=this.constructorsOnce[t];if(fe(n))return n(this);const r=Yr(e);this.constructorsOnce[t]=r;let o;return this.execute(()=>{o=r(this)}),o}handleEvent(e){switch(e.type){case"change":this.refresh();break}}revert(){const e=this.revertibles,t=this.revertConstructors,n=this.revertiblesOnce,r=this.revertConstructorsOnce,o=this.mediaQueryLists;let i=e.length,l=t.length,c=n.length,p=r.length;for(;i--;)e[i].revert();for(;l--;)t[l](this);for(;c--;)n[c].revert();for(;p--;)r[p](this);for(let f in o)o[f].removeEventListener("change",this);e.length=0,t.length=0,this.constructors.length=0,n.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vc=s=>new Oo(s),yc=()=>{const s=H.createElement("div");H.body.appendChild(s),s.style.height="100lvh";const e=s.offsetHeight;return H.body.removeChild(s),e},lr=(s,e)=>s&&fe(s)?s(e):s,cr=new Map;class _c{constructor(e){this.element=e,this.useWin=this.element===H.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ie(this,n=>n.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Je({autoplay:!1,frameRate:30,onUpdate:t=>{const n=t.deltaTime,r=this.prevScrollX,o=this.prevScrollY,i=this.scrollX,l=this.scrollY,c=r-i,p=o-l;this.prevScrollX=i,this.prevScrollY=l,c&&(this.backwardX=r>i),p&&(this.backwardY=o>l),this.velocity=N(n>0?Math.sqrt(c*c+p*p)/n:0,5)}}).init(),this.resizeTicker=new Je({autoplay:!1,duration:250*G.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Je({autoplay:!1,duration:500*G.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?Ie:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=N(e?Ie.scrollX:t.scrollLeft,0),this.scrollY=N(e?Ie.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ie.innerWidth,this.winHeight=yc()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let n,r;if(this.useWin)n=this.winWidth,r=this.winHeight;else{const o=t.getBoundingClientRect();n=t.clientWidth,r=t.clientHeight,this.top=o.top,this.left=o.left}this.width=n,this.height=r}refreshScrollObservers(){ie(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ie(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){switch(e.type){case"scroll":this.handleScroll();break}}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?Ie:this.element).removeEventListener("scroll",this),cr.delete(this.element)}}const bc=s=>{const e=s&&Ke(s)[0]||H.body;let t=cr.get(e);return t||(t=new _c(e),cr.set(e,t)),t},gs=(s,e,t,n,r)=>{const o=e==="min",i=e==="max",l=e==="top"||e==="left"||e==="start"||o?0:e==="bottom"||e==="right"||e==="end"||i?"100%":e==="center"?"50%":e,{n:c,u:p}=Ze(l,De);let f=c;return p==="%"?f=c/100*t:p&&(f=on(s,De,"px",!0).n),i&&n<0&&(f+=n),o&&r>0&&(f+=r),f},ur=(s,e,t,n,r)=>{let o;if(ze(e)){const i=Xi.exec(e);if(i){const l=i[0],c=l[0],p=e.split(l),f=p[0]==="min",g=p[0]==="max",u=gs(s,p[0],t,n,r),h=gs(s,p[1],t,n,r);if(f){const a=Mt(gs(s,"min",t),h,c);o=a<u?u:a}else if(g){const a=Mt(gs(s,"max",t),h,c);o=a>u?u:a}else o=Mt(u,h,c)}else o=gs(s,e,t,n,r)}else o=e;return N(o,0)},Mo=s=>{let e;const t=s.targets;for(let n=0,r=t.length;n<r;n++){const o=t[n];if(o[Qs]){e=o;break}}return e};let Sc=0;const Io=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class No{constructor(e={}){me.current&&me.current.register(this);const t=D(e.sync,"play pause"),n=t?It(t):null,r=t&&(t==="linear"||t===yt),o=t&&!(n===yt&&!r),i=t&&(Xe(t)||t===!0||r),l=t&&ze(t)&&!o&&!i,c=l?t.split(" ").map(f=>()=>{const g=this.linked;return g&&g[f]?g[f]():null}):null,p=l&&c.length>2;this.index=Sc++,this.id=I(e.id)?this.index:e.id,this.container=bc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!c,this.syncEase=o?n:null,this.syncSmooth=i?t===!0||r?1:t:null,this.onSyncEnter=c&&!p&&c[0]?c[0]:W,this.onSyncLeave=c&&!p&&c[1]?c[1]:W,this.onSyncEnterForward=c&&p&&c[0]?c[0]:W,this.onSyncLeaveForward=c&&p&&c[1]?c[1]:W,this.onSyncEnterBackward=c&&p&&c[2]?c[2]:W,this.onSyncLeaveBackward=c&&p&&c[3]?c[3]:W,this.onEnter=e.onEnter||W,this.onLeave=e.onLeave||W,this.onEnterForward=e.onEnterForward||W,this.onLeaveForward=e.onLeaveForward||W,this.onEnterBackward=e.onEnterBackward||W,this.onLeaveBackward=e.onLeaveBackward||W,this.onUpdate=e.onUpdate||W,this.onSyncComplete=e.onSyncComplete||W,this.reverted=!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=e,this._debug=D(e.debug,!1),this._next=null,this._prev=null,vt(this.container,this),wo(()=>{if(!this.reverted){if(!this.target){const f=Ke(e.target)[0];this.target=f||H.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;I(e.targets)?ie(e,n=>{n.targets&&!t&&(t=Mo(n))}):t=Mo(e),this.target=t||H.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 e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:N(F(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=D(lr(e.repeat,this),!0),this.horizontal=D(lr(e.axis,this),"y")==="x",this.enter=D(lr(e.enter,this),"end start"),this.leave=D(lr(e.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 e=this.container,t=this.horizontal,n=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=H.createElement("div"),o=H.createElement("div"),i=H.createElement("div"),l=Io[this.index%Io.length],c=e.useWin,p=c?e.winWidth:e.width,f=c?e.winHeight:e.height,g=e.scrollWidth,u=e.scrollHeight,h=this.container.width>360?320:260,a=t?0:10,d=t?10:0,m=t?24:h/2,v=t?m:15,_=t?60:m,S=t?_:v,y=t?"repeat-x":"repeat-y",b=P=>t?"0px "+P+"px":P+"px 2px",k=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,x=(P,w,E,L,M)=>`position:${P};left:${w}px;top:${E}px;width:${L}px;height:${M}px;`;r.style.cssText=`${x("absolute",a,d,t?g:h,t?h:u)}
94
+ */const ot=typeof window<"u",Ie=ot?window:null,H=ot?document:null,pe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},Z={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ge={NONE:0,AUTO:1,FORCE:2},ke={replace:0,none:1,blend:2},zi=Symbol(),Qs=Symbol(),qr=Symbol(),ns=Symbol(),Vi=Symbol(),Ui=Symbol(),te=1e-11,Ht=1e12,Ne=1e3,Hr=120,dt="",Fr=(()=>{const s=new Map;return s.set("x","translateX"),s.set("y","translateY"),s.set("z","translateZ"),s})(),is=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],$r=is.reduce((s,e)=>({...s,[e]:e+"("}),{}),W=()=>{},fl=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,dl=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,gl=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,ml=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,vl=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Wi=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,Gi=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,yl=/([a-z])([A-Z])/g,_l=/(\w+)(\([^)]+\)+)/g,Xi=/(\*=|\+=|-=)/,Yi={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Hr,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:Ne,delay:0,loopDelay:0,ease:"out(2)",composition:ke.replace,modifier:s=>s,onBegin:W,onBeforeUpdate:W,onUpdate:W,onLoop:W,onPause:W,onComplete:W,onRender:W},me={current:null,root:H},G={defaults:Yi,precision:4,timeScale:1,tickThreshold:200},Ji={version:"4.1.3",engine:null};ot&&(Ie.AnimeJS||(Ie.AnimeJS=[]),Ie.AnimeJS.push(Ji));const Qi=s=>s.replace(yl,"$1-$2").toLowerCase(),_e=(s,e)=>s.indexOf(e)===0,kt=Date.now,Le=Array.isArray,be=s=>s&&s.constructor===Object,Xe=s=>typeof s=="number"&&!isNaN(s),ze=s=>typeof s=="string",fe=s=>typeof s=="function",I=s=>typeof s>"u",os=s=>I(s)||s===null,zr=s=>ot&&s instanceof SVGElement,Ki=s=>fl.test(s),Zi=s=>_e(s,"rgb"),ji=s=>_e(s,"hsl"),bl=s=>Ki(s)||Zi(s)||ji(s),Ft=s=>!G.defaults.hasOwnProperty(s),Lt=s=>ze(s)?parseFloat(s):s,$t=Math.pow,xt=Math.sqrt,Vr=Math.sin,Ur=Math.cos,at=Math.abs,eo=Math.exp,Sl=Math.ceil,as=Math.floor,kl=Math.asin,Wr=Math.max,Ks=Math.atan2,zt=Math.PI,Gr=Math.round,F=(s,e,t)=>s<e?e:s>t?t:s,to={},N=(s,e)=>{if(e<0)return s;if(!e)return Gr(s);let t=to[e];return t||(t=to[e]=10**e),Gr(s*t)/t},At=(s,e)=>Le(e)?e.reduce((t,n)=>at(n-s)<at(t-s)?n:t):e?Gr(s/e)*e:s,gt=(s,e,t)=>s+(e-s)*t,Xr=(s,e,t)=>{const n=10**(t||0);return as((Math.random()*(e-s+1/n)+s)*n)/n},so=s=>{let e=s.length,t,n;for(;e;)n=Xr(0,--e),t=s[e],s[e]=s[n],s[n]=t;return s},Zs=s=>s===1/0?Ht:s===-1/0?-1e12:s,Vt=s=>s<=te?te:Zs(N(s,11)),Be=s=>Le(s)?[...s]:s,ls=(s,e)=>{const t={...s};for(let n in e){const r=s[n];t[n]=I(r)?e[n]:r}return t},ie=(s,e,t,n="_prev",r="_next")=>{let o=s._head,i=r;for(t&&(o=s._tail,i=n);o;){const l=o[i];e(o),o=l}},mt=(s,e,t="_prev",n="_next")=>{const r=e[t],o=e[n];r?r[n]=o:s._head=o,o?o[t]=r:s._tail=r,e[t]=null,e[n]=null},vt=(s,e,t,n="_prev",r="_next")=>{let o=s._tail;for(;o&&t&&t(o,e);)o=o[n];const i=o?o[r]:s._head;o?o[r]=e:s._head=e,i?i[n]=e:s._tail=e,e[n]=o,e[r]=i},Yr=s=>{let e;return(...t)=>{let n,r,o,i;e&&(n=e.currentIteration,r=e.iterationProgress,o=e.reversed,i=e._alternate,e.revert());const l=s(...t);return l&&!fe(l)&&l.revert&&(e=l),I(r)||(e.currentIteration=n,e.iterationProgress=(i&&n%2?!o:o)?1-r:r),l||W}};class ro{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=N(Ne/Hr,0),this._fps=Hr,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<te?te:n,o=N(Ne/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<te?te:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return Ge.NONE;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,Ge.AUTO}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const js=(s,e,t,n,r)=>{const o=s.parent,i=s.duration,l=s.completed,c=s.iterationDuration,p=s.iterationCount,f=s._currentIteration,g=s._loopDelay,u=s._reversed,h=s._alternate,a=s._hasChildren,d=s._delay,m=s._currentTime,v=d+c,_=e-d,S=F(m,-d,i),y=F(_,-d,i),b=_-m,k=y>0,x=y>=i,C=i<=te,O=r===Ge.FORCE;let P=0,w=_,E=0;if(p>1){const U=~~(y/(c+(x?0:g)));s._currentIteration=F(U,0,p),x&&s._currentIteration--,P=s._currentIteration%2,w=y%(c+g)||0}const L=u^(h&&P),M=s._ease;let q=x?L?0:i:L?c-w:w;M&&(q=c*M(q/c)||0);const $=(o?o.backwards:_<m)?!L:!!L;if(s._currentTime=_,s._iterationTime=q,s.backwards=$,k&&!s.began?(s.began=!0,!t&&!(o&&($||!o.began))&&s.onBegin(s)):_<=0&&(s.began=!1),!t&&!a&&k&&s._currentIteration!==f&&s.onLoop(s),O||r===Ge.AUTO&&(e>=d&&e<=v||e<=d&&S>d||e>=v&&S!==i)||q>=v&&S!==i||q<=d&&S>0||e<=S&&S===i&&l||x&&!l&&C){if(k&&(s.computeDeltaTime(S),t||s.onBeforeUpdate(s)),!a){const U=O||($?b*-1:b)>=G.tickThreshold,z=s._offset+(o?o._offset:0)+d+q;let R=s._head,ae,se,xe,ve,V=0;for(;R;){const ee=R._composition,re=R._currentTime,ue=R._changeDuration,ct=R._absoluteStartTime+R._changeDuration,Ae=R._nextRep,we=R._prevRep,he=ee!==ke.none;if((U||(re!==ue||z<=ct+(Ae?Ae._delay:0))&&(re!==0||z>=R._absoluteStartTime))&&(!he||!R._isOverridden&&(!R._isOverlapped||z<=ct)&&(!Ae||Ae._isOverridden||z<=Ae._absoluteStartTime)&&(!we||we._isOverridden||z>=we._absoluteStartTime+we._changeDuration+R._delay))){const j=R._currentTime=F(q-R._startTime,0,ue),J=R._ease(j/R._updateDuration),Te=R._modifier,Ue=R._valueType,Ce=R._tweenType,Re=Ce===pe.OBJECT,St=Ue===Z.NUMBER,qe=St&&Re||J===0||J===1?-1:G.precision;let ge,T;if(St)ge=T=Te(N(gt(R._fromNumber,R._toNumber,J),qe));else if(Ue===Z.UNIT)T=Te(N(gt(R._fromNumber,R._toNumber,J),qe)),ge=`${T}${R._unit}`;else if(Ue===Z.COLOR){const A=R._fromNumbers,B=R._toNumbers,Q=N(F(Te(gt(A[0],B[0],J)),0,255),0),X=N(F(Te(gt(A[1],B[1],J)),0,255),0),ye=N(F(Te(gt(A[2],B[2],J)),0,255),0),Pe=F(Te(N(gt(A[3],B[3],J),qe)),0,1);if(ge=`rgba(${Q},${X},${ye},${Pe})`,he){const Ee=R._numbers;Ee[0]=Q,Ee[1]=X,Ee[2]=ye,Ee[3]=Pe}}else if(Ue===Z.COMPLEX){ge=R._strings[0];for(let A=0,B=R._toNumbers.length;A<B;A++){const Q=Te(N(gt(R._fromNumbers[A],R._toNumbers[A],J),qe)),X=R._strings[A+1];ge+=`${X?Q+X:Q}`,he&&(R._numbers[A]=Q)}}if(he&&(R._number=T),!n&&ee!==ke.blend){const A=R.property;ae=R.target,Re?ae[A]=ge:Ce===pe.ATTRIBUTE?ae.setAttribute(A,ge):(se=ae.style,Ce===pe.TRANSFORM?(ae!==xe&&(xe=ae,ve=ae[ns]),ve[A]=ge,V=1):Ce===pe.CSS?se[A]=ge:Ce===pe.CSS_VAR&&se.setProperty(A,ge)),k&&(E=1)}else R._value=ge}if(V&&R._renderTransforms){let j=dt;for(let J in ve)j+=`${$r[J]}${ve[J]}) `;se.transform=j,V=0}R=R._next}!t&&E&&s.onRender(s)}!t&&k&&s.onUpdate(s)}return o&&C?!t&&(o.began&&!$&&_>=i&&!l||$&&_<=te&&l)&&(s.onComplete(s),s.completed=!$):k&&x?p===1/0?s._startTime+=s.duration:s._currentIteration>=p-1&&(s.paused=!0,!l&&!a&&(s.completed=!0,!t&&!(o&&($||!o.began))&&(s.onComplete(s),s._resolve(s)))):s.completed=!1,E},Rt=(s,e,t,n,r)=>{const o=s._currentIteration;if(js(s,e,t,n,r),s._hasChildren){const i=s,l=i.backwards,c=n?e:i._iterationTime,p=kt();let f=0,g=!0;if(!n&&i._currentIteration!==o){const u=i.iterationDuration;ie(i,h=>{if(!l)!h.completed&&!h.backwards&&h._currentTime<h.iterationDuration&&js(h,u,t,1,Ge.FORCE),h.began=!1,h.completed=!1;else{const a=h.duration,d=h._offset+h._delay,m=d+a;!t&&a<=te&&(!d||m===u)&&h.onComplete(h)}}),t||i.onLoop(i)}ie(i,u=>{const h=N((c-u._offset)*u._speed,12),a=u._fps<i._fps?u.requestTick(p):r;f+=js(u,h,t,n,a),!u.completed&&g&&(g=!1)},l),!t&&f&&i.onRender(i),(g||l)&&i._currentTime>=i.duration&&(i.paused=!0,i.completed||(i.completed=!0,t||(i.onComplete(i),i._resolve(i))))}},Ut={animation:null,update:W},xl=s=>{let e=Ut.animation;return e||(e={duration:te,computeDeltaTime:W,_offset:0,_delay:0,_head:null,_tail:null},Ut.animation=e,Ut.update=()=>{s.forEach(t=>{for(let n in t){const r=t[n],o=r._head;if(o){const i=o._valueType,l=i===Z.COMPLEX||i===Z.COLOR?Be(o._fromNumbers):null;let c=o._fromNumber,p=r._tail;for(;p&&p!==o;){if(l)for(let f=0,g=p._numbers.length;f<g;f++)l[f]+=p._numbers[f];else c+=p._number;p=p._prevAdd}o._toNumber=c,o._toNumbers=l}}}),js(e,1,1,0,Ge.FORCE)}),e},no=ot?requestAnimationFrame:setImmediate,wl=ot?cancelAnimationFrame:clearImmediate;class Tl extends ro{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Yi,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=kt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(mt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Rt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Ge.AUTO),r=o}Ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(kt()),this.reqId=no(io)),this}pause(){if(this.reqId)return this.paused=!0,Cl()}resume(){if(this.paused)return this.paused=!1,ie(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(G.timeScale===1?1:Ne)}set speed(e){this._speed=e*G.timeScale,ie(this,t=>t.speed=t._speed)}get timeUnit(){return G.timeScale===1?"ms":"s"}set timeUnit(e){const n=e==="s",r=n?.001:1;if(G.timeScale!==r){G.timeScale=r,G.tickThreshold=200*r;const o=n?.001:Ne;this.defaults.duration*=o,this._speed*=o}}get precision(){return G.precision}set precision(e){G.precision=e}}const Se=(()=>{const s=new Tl(kt());return ot&&(Ji.engine=s,H.addEventListener("visibilitychange",()=>{s.pauseOnDocumentHidden&&(H.hidden?s.pause():s.resume())})),s})(),io=()=>{Se._head?(Se.reqId=no(io),Se.update()):Se.reqId=0},Cl=()=>(wl(Se.reqId),Se.reqId=0,Se),Pl=(s,e,t)=>{const n=s.style.transform;let r;if(n){const o=s[ns];let i;for(;i=_l.exec(n);){const l=i[1],c=i[2].slice(1,-1);o[l]=c,l===e&&(r=c,t&&(t[e]=c))}}return n&&!I(r)?r:_e(e,"scale")?"1":_e(e,"rotate")||_e(e,"skew")?"0deg":"0px"};function Jr(s){const e=ze(s)?me.root.querySelectorAll(s):s;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Ke(s){if(os(s))return[];if(!ot)return Le(s)&&s.flat(1/0)||[s];if(Le(s)){const t=s.flat(1/0),n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];if(!os(i)){const l=Jr(i);if(l)for(let c=0,p=l.length;c<p;c++){const f=l[c];if(!os(f)){let g=!1;for(let u=0,h=n.length;u<h;u++)if(n[u]===f){g=!0;break}g||n.push(f)}}else{let c=!1;for(let p=0,f=n.length;p<f;p++)if(n[p]===i){c=!0;break}c||n.push(i)}}}return n}const e=Jr(s);return e?Array.from(e):[s]}function cs(s){const e=Ke(s),t=e.length;if(t)for(let n=0;n<t;n++){const r=e[n];if(!r[zi]){r[zi]=!0;const o=zr(r);(r.nodeType||o)&&(r[Qs]=!0,r[qr]=o,r[ns]={})}}return e}const oo=s=>{const t=Ke(s)[0];if(!(!t||!zr(t)))return t},El=(s,e=.33)=>t=>{const n=oo(s);if(!n)return;const r=t.tagName==="path",o=r?" ":",",i=t[Vi];i&&t.setAttribute(r?"d":"points",i);let l="",c="";if(!e)l=t.getAttribute(r?"d":"points"),c=n.getAttribute(r?"d":"points");else{const p=t.getTotalLength(),f=n.getTotalLength(),g=Math.max(Math.ceil(p*e),Math.ceil(f*e));for(let u=0;u<g;u++){const h=u/(g-1),a=t.getPointAtLength(p*h),d=n.getPointAtLength(f*h),m=r?u===0?"M":"L":"";l+=m+N(a.x,3)+o+a.y+" ",c+=m+N(d.x,3)+o+d.y+" "}}return t[Vi]=c,[l,c]},Ll=s=>{let e=1;if(s&&s.getCTM){const t=s.getCTM();if(t){const n=xt(t.a*t.a+t.b*t.b),r=xt(t.c*t.c+t.d*t.d);e=(n+r)/2}}return e},Al=(s,e,t)=>{const n=Ne,r=getComputedStyle(s),o=r.strokeLinecap,i=r.vectorEffect==="non-scaling-stroke"?s:null;let l=o;const c=new Proxy(s,{get(p,f){const g=p[f];return f===Ui?p:f==="setAttribute"?(...u)=>{if(u[0]==="draw"){const a=u[1].split(" "),d=+a[0],m=+a[1],v=Ll(i),_=d*-1e3*v,S=m*n*v+_,y=n*v+(d===0&&m===1||d===1&&m===0?0:10*v)-S;if(o!=="butt"){const b=d===m?"butt":o;l!==b&&(p.style.strokeLinecap=`${b}`,l=b)}p.setAttribute("stroke-dashoffset",`${_}`),p.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(g,p,u)}:fe(g)?(...u)=>Reflect.apply(g,p,u):g}});return s.getAttribute("pathLength")!==`${n}`&&(s.setAttribute("pathLength",`${n}`),c.setAttribute("draw",`${e} ${t}`)),c},Rl=(s,e=0,t=0)=>Ke(s).map(r=>Al(r,e,t)),Qr=(s,e,t=0)=>s.getPointAtLength(e+t>=1?e+t:0),Kr=(s,e)=>t=>{const n=+s.getTotalLength(),r=t[qr],o=s.getCTM();return{from:0,to:n,modifier:i=>{if(e==="a"){const l=Qr(s,i,-1),c=Qr(s,i,1);return Ks(c.y-l.y,c.x-l.x)*180/zt}else{const l=Qr(s,i,0);return e==="x"?r||!o?l.x:l.x*o.a+l.y*o.c+o.e:r||!o?l.y:l.x*o.b+l.y*o.d+o.f}}}},Ol=s=>{const e=oo(s);if(e)return{translateX:Kr(e,"x"),translateY:Kr(e,"y"),rotate:Kr(e,"a")}},Ml=["opacity","rotate","overflow","color"],Il=(s,e)=>{if(Ml.includes(e))return!1;if(s.getAttribute(e)||e in s){if(e==="scale"){const t=s.parentNode;return t&&t.tagName==="filter"}return!0}},Nl={morphTo:El,createMotionPath:Ol,createDrawable:Rl},Bl=s=>{const e=dl.exec(s)||gl.exec(s),t=I(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],t]},Dl=s=>{const e=s.length,t=e===4||e===5;return[+("0x"+s[1]+s[t?1:2]),+("0x"+s[t?2:3]+s[t?2:4]),+("0x"+s[t?3:5]+s[t?3:6]),e===5||e===9?+(+("0x"+s[t?4:7]+s[t?4:8])/255).toFixed(3):1]},Zr=(s,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s),ql=s=>{const e=ml.exec(s)||vl.exec(s),t=+e[1]/360,n=+e[2]/100,r=+e[3]/100,o=I(e[4])?1:+e[4];let i,l,c;if(n===0)i=l=c=r;else{const p=r<.5?r*(1+n):r+n-r*n,f=2*r-p;i=N(Zr(f,p,t+1/3)*255,0),l=N(Zr(f,p,t)*255,0),c=N(Zr(f,p,t-1/3)*255,0)}return[i,l,c,o]},Hl=s=>Zi(s)?Bl(s):Ki(s)?Dl(s):ji(s)?ql(s):[0,0,0,1],D=(s,e)=>I(s)?e:s,Ye=(s,e,t,n,r)=>{if(fe(s)){const o=()=>{const i=s(e,t,n);return isNaN(+i)?i||0:+i};return r&&(r.func=o),o()}else return s},jr=(s,e)=>s[Qs]?s[qr]&&Il(s,e)?pe.ATTRIBUTE:is.includes(e)||Fr.get(e)?pe.TRANSFORM:_e(e,"--")?pe.CSS_VAR:e in s.style?pe.CSS:e in s?pe.OBJECT:pe.ATTRIBUTE:pe.OBJECT,ao=(s,e,t)=>{const n=s.style[e];n&&t&&(t[e]=n);const r=n||getComputedStyle(s[Ui]||s).getPropertyValue(e);return r==="auto"?"0":r},Ot=(s,e,t,n)=>{const r=I(t)?jr(s,e):t;return r===pe.OBJECT?s[e]||0:r===pe.ATTRIBUTE?s.getAttribute(e):r===pe.TRANSFORM?Pl(s,e,n):r===pe.CSS_VAR?ao(s,e,n).trimStart():ao(s,e,n)},Mt=(s,e,t)=>t==="-"?s-e:t==="+"?s+e:s*e,en=()=>({t:Z.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ze=(s,e)=>{if(e.t=Z.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!s)return e;const t=+s;if(isNaN(t)){let n=s;n[1]==="="&&(e.o=n[0],n=n.slice(2));const r=n.includes(" ")?!1:Gi.exec(n);if(r)return e.t=Z.UNIT,e.n=+r[1],e.u=r[2],e;if(e.o)return e.n=+n,e;if(bl(n))return e.t=Z.COLOR,e.d=Hl(n),e;{const o=n.match(Wi);return e.t=Z.COMPLEX,e.d=o?o.map(Number):[],e.s=n.split(Wi)||[],e}}else return e.n=t,e},lo=(s,e)=>(e.t=s._valueType,e.n=s._toNumber,e.u=s._unit,e.o=null,e.d=Be(s._toNumbers),e.s=Be(s._strings),e),De=en(),er={_rep:new WeakMap,_add:new Map},tn=(s,e,t="_rep")=>{const n=er[t];let r=n.get(s);return r||(r={},n.set(s,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Fl=(s,e)=>s._isOverridden||s._absoluteStartTime>e._absoluteStartTime,tr=s=>{s._isOverlapped=1,s._isOverridden=1,s._changeDuration=te,s._currentTime=te},co=(s,e)=>{const t=s._composition;if(t===ke.replace){const n=s._absoluteStartTime;vt(e,s,Fl,"_prevRep","_nextRep");const r=s._prevRep;if(r){const o=r.parent,i=r._absoluteStartTime+r._changeDuration;if(s.parent.id!==o.id&&o.iterationCount>1&&i+(o.duration-o.iterationDuration)>n){tr(r);let p=r._prevRep;for(;p&&p.parent.id===o.id;)tr(p),p=p._prevRep}const l=n-s._delay;if(i>l){const p=r._startTime,f=i-(p+r._updateDuration),g=N(l-f-p,12);r._changeDuration=g,r._currentTime=g,r._isOverlapped=1,g<te&&tr(r)}let c=!0;if(ie(o,p=>{p._isOverlapped||(c=!1)}),c){const p=o.parent;if(p){let f=!0;ie(p,g=>{g!==o&&ie(g,u=>{u._isOverlapped||(f=!1)})}),f&&p.cancel()}else o.cancel()}}}else if(t===ke.blend){const n=tn(s.target,s.property,"_add"),r=xl(er._add);let o=n._head;o||(o={...s},o._composition=ke.replace,o._updateDuration=te,o._startTime=0,o._numbers=Be(s._fromNumbers),o._number=0,o._next=null,o._prev=null,vt(n,o),vt(r,o));const i=s._toNumber;if(s._fromNumber=o._fromNumber-i,s._toNumber=0,s._numbers=Be(s._fromNumbers),s._number=0,o._fromNumber=i,s._toNumbers){const l=Be(s._toNumbers);l&&l.forEach((c,p)=>{s._fromNumbers[p]=o._fromNumbers[p]-c,s._toNumbers[p]=0}),o._fromNumbers=l}vt(n,s,null,"_prevAdd","_nextAdd")}return s},uo=s=>{const e=s._composition;if(e!==ke.none){const t=s.target,n=s.property,i=er._rep.get(t)[n];if(mt(i,s,"_prevRep","_nextRep"),e===ke.blend){const l=er._add,c=l.get(t);if(!c)return;const p=c[n],f=Ut.animation;mt(p,s,"_prevAdd","_nextAdd");const g=p._head;if(g&&g===p._tail){mt(p,g,"_prevAdd","_nextAdd"),mt(f,g);let u=!0;for(let h in c)if(c[h]._head){u=!1;break}u&&l.delete(t)}}}return s},ho=s=>(s.paused=!0,s.began=!1,s.completed=!1,s),sn=s=>(s._cancelled&&(s._hasChildren?ie(s,sn):ie(s,e=>{e._composition!==ke.none&&co(e,tn(e.target,e.property))}),s._cancelled=0),s);let $l=0;class Je extends ro{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:l,alternate:c,loop:p,loopDelay:f,autoplay:g,frameRate:u,playbackRate:h,onComplete:a,onLoop:d,onPause:m,onBegin:v,onBeforeUpdate:_,onUpdate:S}=e;me.current&&me.current.register(this);const y=t?0:Se._elapsedTime,b=t?t.defaults:G.defaults,k=fe(o)||I(o)?b.delay:+o,x=fe(i)||I(i)?1/0:+i,C=D(p,b.loop),O=D(f,b.loopDelay),P=C===!0||C===1/0||C<0?1/0:C+1;let w=0;t?w=n:(Se.reqId||Se.requestTick(kt()),w=(Se._elapsedTime-Se._startTime)*G.timeScale),this.id=I(r)?++$l:r,this.parent=t,this.duration=Zs((x+O)*P-O)||te,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=v||b.onBegin,this.onBeforeUpdate=_||b.onBeforeUpdate,this.onUpdate=S||b.onUpdate,this.onLoop=d||b.onLoop,this.onPause=m||b.onPause,this.onComplete=a||b.onComplete,this.iterationDuration=x,this.iterationCount=P,this._autoplay=t?!1:D(g,b.autoplay),this._offset=w,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=W,this._running=!1,this._reversed=+D(l,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=D(c,b.alternate),this._prev=null,this._next=null,this._elapsedTime=y,this._startTime=y,this._lastTime=y,this._fps=D(u,b.frameRate),this._speed=D(h,b.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return F(N(this._currentTime,G.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return N(this._iterationTime,G.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return F(N(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return F(N(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*F(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return sn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,e,Ge.FORCE),ho(this),this._hasChildren&&ie(this,ho),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Rt(this,this.duration,1,e,Ge.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!I(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Se._speed);return this._startTime=kt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=te&&!this._hasChildren?Rt(this,te,0,0,Ge.FORCE):(this._running||(vt(Se,this),Se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Se.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){sn(this),this.completed=!1;const r=this.paused;return this.paused=!0,Rt(this,e+this._delay,~~t,~~n,Ge.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?as(Ht/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-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?ie(this,e=>e.cancel(),!0):ie(this,uo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=Vt(e);if(t===n)return this;const r=e/t,o=e<=te;return this.duration=o?te:n,this.iterationDuration=o?te:Vt(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Rt(this,0,1,0,Ge.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const zl=s=>new Je(s,null,0).init(),yt=s=>s,po=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,Vl=(s,e,t)=>{let n=0,r=1,o,i,l=0;do i=n+(r-n)/2,o=po(i,e,t)-s,o>0?r=i:n=i;while(at(o)>1e-7&&++l<100);return i},Ul=(s=.5,e=0,t=.5,n=1)=>s===e&&t===n?yt:r=>r===0||r===1?r:po(Vl(r,s,t),e,n),Wl=(s=10,e)=>{const t=e?Sl:as;return n=>t(F(n,0,1)*s)*(1/s)},fo=(...s)=>{const e=s.length;if(!e)return yt;const t=e-1,n=s[0],r=s[t],o=[0],i=[Lt(n)];for(let l=1;l<t;l++){const c=s[l],p=ze(c)?c.trim().split(" "):[c],f=p[0],g=p[1];o.push(I(g)?l/t:Lt(g)/100),i.push(Lt(f))}return i.push(Lt(r)),o.push(1),function(c){for(let p=1,f=o.length;p<f;p++){const g=o[p];if(c<=g){const u=o[p-1],h=i[p-1];return h+(i[p]-h)*(c-u)/(g-u)}}return i[i.length-1]}},Gl=(s=10,e=1)=>{const t=[0],n=s-1;for(let r=1;r<n;r++){const o=t[r-1],i=r/n,l=(r+1)/n,c=i+(l-i)*Math.random(),p=i*(1-e)+c*e;t.push(F(p,o,1))}return t.push(1),fo(...t)},Xl=zt/2,go=zt*2,Wt=(s=1.68)=>e=>$t(e,+s),mo={[dt]:Wt,Quad:Wt(2),Cubic:Wt(3),Quart:Wt(4),Quint:Wt(5),Sine:s=>1-Ur(s*Xl),Circ:s=>1-xt(1-s*s),Expo:s=>s?$t(2,10*s-10):0,Bounce:s=>{let e,t=4;for(;s<((e=$t(2,--t))-1)/11;);return 1/$t(4,3-t)-7.5625*$t((e*3-2)/22-s,2)},Back:(s=1.70158)=>e=>(+s+1)*e*e*e-+s*e*e,Elastic:(s=1,e=.3)=>{const t=F(+s,1,10),n=F(+e,te,2),r=n/go*kl(1/t),o=go/n;return i=>i===0||i===1?i:-t*$t(2,-10*(1-i))*Vr((1-i-r)*o)}},us={in:s=>e=>s(e),out:s=>e=>1-s(1-e),inOut:s=>e=>e<.5?s(e*2)/2:1-s(e*-2+2)/2,outIn:s=>e=>e<.5?(1-s(1-e*2))/2:(s(e*2-1)+1)/2},vo=(s,e,t)=>{if(t[s])return t[s];if(s.indexOf("(")<=-1){const r=us[s]||s.includes("Back")||s.includes("Elastic")?e[s]():e[s];return r?t[s]=r:yt}else{const n=s.slice(0,-1).split("("),r=e[n[0]];return r?t[s]=r(...n[1].split(",")):yt}},Gt=(()=>{const s={linear:fo,irregular:Gl,steps:Wl,cubicBezier:Ul};for(let e in us)for(let t in mo){const n=mo[t],r=us[e];s[e+t]=t===dt||t==="Back"||t==="Elastic"?(o,i)=>r(n(o,i)):r(n)}return s})(),Yl={linear:yt},It=s=>fe(s)?s:ze(s)?vo(s,Gt,Yl):yt,yo={},rn=(s,e,t)=>{if(t===pe.TRANSFORM){const n=Fr.get(s);return n||s}else if(t===pe.CSS||t===pe.ATTRIBUTE&&zr(e)&&s in e.style){const n=yo[s];if(n)return n;{const r=s&&Qi(s);return yo[s]=r,r}}else return s},nn={deg:1,rad:180/zt,turn:360},_o={},on=(s,e,t,n=!1)=>{const r=e.u,o=e.n;if(e.t===Z.UNIT&&r===t)return e;const i=o+r+t,l=_o[i];if(!I(l)&&!n)e.n=l;else{let c;if(r in nn)c=o*nn[r]/nn[t];else{const f=s.cloneNode(),g=s.parentNode,u=g&&g!==H?g:H.body;u.appendChild(f);const h=f.style;h.width=100+r;const a=f.offsetWidth||100;h.width=100+t;const d=f.offsetWidth||100,m=a/d;u.removeChild(f),c=m*o}e.n=c,_o[i]=c}return e.t,Z.UNIT,e.u=t,e},sr=s=>{if(s._hasChildren)ie(s,sr,!0);else{const e=s;e.pause(),ie(e,t=>{const n=t.property,r=t.target;if(r[Qs]){const o=r.style,i=e._inlineStyles[n];if(t._tweenType===pe.TRANSFORM){const l=r[ns];if(I(i)||i===dt?delete l[n]:l[n]=i,t._renderTransforms)if(!Object.keys(l).length)o.removeProperty("transform");else{let c=dt;for(let p in l)c+=$r[p]+l[p]+") ";o.transform=c}}else I(i)||i===dt?o.removeProperty(n):o[n]=i;e._tail===t&&e.targets.forEach(l=>{l.getAttribute&&l.getAttribute("style")===dt&&l.removeAttribute("style")})}})}return s},Y=en(),K=en(),rr={func:null},nr=[null],Xt=[null,null],ir={to:null};let Jl=0,wt,lt;const Ql=(s,e)=>{const t={};if(Le(s)){const n=[].concat(...s.map(r=>Object.keys(r))).filter(Ft);for(let r=0,o=n.length;r<o;r++){const i=n[r],l=s.map(c=>{const p={};for(let f in c){const g=c[f];Ft(f)?f===i&&(p.to=g):p[f]=g}return p});t[i]=l}}else{const n=D(e.duration,G.defaults.duration);Object.keys(s).map(o=>({o:parseFloat(o)/100,p:s[o]})).sort((o,i)=>o.o-i.o).forEach(o=>{const i=o.o,l=o.p;for(let c in l)if(Ft(c)){let p=t[c];p||(p=t[c]=[]);const f=i*n;let g=p.length,u=p[g-1];const h={to:l[c]};let a=0;for(let d=0;d<g;d++)a+=p[d].duration;g===1&&(h.from=u.to),l.ease&&(h.ease=l.ease),h.duration=f-(g?a:0),p.push(h)}return o});for(let o in t){const i=t[o];let l;for(let c=0,p=i.length;c<p;c++){const f=i[c],g=f.ease;f.ease=l||void 0,l=g}i[0].duration||i.shift()}}return t};class _t extends Je{constructor(e,t,n,r,o=!1,i=0,l=0){super(t,n,r);const c=cs(e),p=c.length,f=t.keyframes,g=f?ls(Ql(f,t),t):t,{delay:u,duration:h,ease:a,playbackEase:d,modifier:m,composition:v,onRender:_}=g,S=n?n.defaults:G.defaults,y=D(d,S.playbackEase),b=y?It(y):null,k=!I(a)&&!I(a.ease),x=k?a.ease:D(a,b?"linear":S.ease),C=k?a.duration:D(h,S.duration),O=D(u,S.delay),P=m||S.modifier,w=I(v)&&p>=Ne?ke.none:I(v)?S.composition:v,E={},L=this._offset+(n?n._offset:0);let M=NaN,q=NaN,$=0,U=0;for(let z=0;z<p;z++){const R=c[z],ae=i||z,se=l||p;let xe=NaN,ve=NaN;for(let V in g)if(Ft(V)){const ee=jr(R,V),re=rn(V,R,ee);let ue=g[V];const ct=Le(ue);if(o&&!ct&&(Xt[0]=ue,Xt[1]=ue,ue=Xt),ct){const Te=ue.length,Ue=!be(ue[0]);Te===2&&Ue?(ir.to=ue,nr[0]=ir,wt=nr):Te>2&&Ue?(wt=[],ue.forEach((Ce,Re)=>{Re?Re===1?(Xt[1]=Ce,wt.push(Xt)):wt.push(Ce):Xt[0]=Ce})):wt=ue}else nr[0]=ue,wt=nr;let Ae=null,we=null,he=NaN,j=0,J=0;for(let Te=wt.length;J<Te;J++){const Ue=wt[J];be(Ue)?lt=Ue:(ir.to=Ue,lt=ir),rr.func=null;const Ce=Ye(lt.to,R,ae,se,rr);let Re;be(Ce)&&!I(Ce.to)?(lt=Ce,Re=Ce.to):Re=Ce;const St=Ye(lt.from,R,ae,se),qe=lt.ease,ge=!I(qe)&&!I(qe.ease),T=ge?qe.ease:qe||x,A=ge?qe.duration:Ye(D(lt.duration,Te>1?Ye(C,R,ae,se)/Te:C),R,ae,se),B=Ye(D(lt.delay,J?0:O),R,ae,se),Q=Ye(D(lt.composition,w),R,ae,se),X=Xe(Q)?Q:ke[Q],ye=lt.modifier||P,Pe=!I(St),Ee=!I(Re),je=Le(Re),de=je||Pe&&Ee,kn=we?j+B:B,xn=N(L+kn,12);!U&&(Pe||je)&&(U=1);let et=we;if(X!==ke.none){Ae||(Ae=tn(R,re));let ce=Ae._head;for(;ce&&!ce._isOverridden&&ce._absoluteStartTime<=xn;)if(et=ce,ce=ce._nextRep,ce&&ce._absoluteStartTime>=xn)for(;ce;)tr(ce),ce=ce._nextRep}if(de?(Ze(je?Ye(Re[0],R,ae,se):St,Y),Ze(je?Ye(Re[1],R,ae,se,rr):Re,K),Y.t===Z.NUMBER&&(et?et._valueType===Z.UNIT&&(Y.t=Z.UNIT,Y.u=et._unit):(Ze(Ot(R,re,ee,E),De),De.t===Z.UNIT&&(Y.t=Z.UNIT,Y.u=De.u)))):(Ee?Ze(Re,K):we?lo(we,K):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),K),Pe?Ze(St,Y):we?lo(we,Y):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),Y)),Y.o&&(Y.n=Mt(et?et._toNumber:Ze(Ot(R,re,ee,E),De).n,Y.n,Y.o)),K.o&&(K.n=Mt(Y.n,K.n,K.o)),Y.t!==K.t){if(Y.t===Z.COMPLEX||K.t===Z.COMPLEX){const ce=Y.t===Z.COMPLEX?Y:K,Oe=Y.t===Z.COMPLEX?K:Y;Oe.t=Z.COMPLEX,Oe.s=Be(ce.s),Oe.d=ce.d.map(()=>Oe.n)}else if(Y.t===Z.UNIT||K.t===Z.UNIT){const ce=Y.t===Z.UNIT?Y:K,Oe=Y.t===Z.UNIT?K:Y;Oe.t=Z.UNIT,Oe.u=ce.u}else if(Y.t===Z.COLOR||K.t===Z.COLOR){const ce=Y.t===Z.COLOR?Y:K,Oe=Y.t===Z.COLOR?K:Y;Oe.t=Z.COLOR,Oe.s=ce.s,Oe.d=[0,0,0,1]}}if(Y.u!==K.u){let ce=K.u?Y:K;ce=on(R,ce,K.u?K.u:Y.u,!1)}if(K.d&&Y.d&&K.d.length!==Y.d.length){const ce=Y.d.length>K.d.length?Y:K,Oe=ce===Y?K:Y;Oe.d=ce.d.map((Bc,zo)=>I(Oe.d[zo])?0:Oe.d[zo]),Oe.s=Be(ce.s)}const wn=N(+A||te,12),yr={parent:this,id:Jl++,property:re,target:R,_value:null,_func:rr.func,_ease:It(T),_fromNumbers:Be(Y.d),_toNumbers:Be(K.d),_strings:Be(K.s),_fromNumber:Y.n,_toNumber:K.n,_numbers:Be(Y.d),_number:Y.n,_unit:K.u,_modifier:ye,_currentTime:0,_startTime:kn,_delay:+B,_updateDuration:wn,_changeDuration:wn,_absoluteStartTime:xn,_tweenType:ee,_valueType:K.t,_composition:X,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};X!==ke.none&&co(yr,Ae),isNaN(he)&&(he=yr._startTime),j=N(kn+wn,12),we=yr,$++,vt(this,yr)}(isNaN(q)||he<q)&&(q=he),(isNaN(M)||j>M)&&(M=j),ee===pe.TRANSFORM&&(xe=$-J,ve=$)}if(!isNaN(xe)){let V=0;ie(this,ee=>{V>=xe&&V<ve&&(ee._renderTransforms=1,ee._composition===ke.blend&&ie(Ut.animation,re=>{re.id===ee.id&&(re._renderTransforms=1)})),V++})}}p||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),q?(ie(this,z=>{z._startTime-z._delay||(z._delay-=q),z._startTime-=q}),M-=q):q=0,M||(M=te,this.iterationCount=0),this.targets=c,this.duration=M===te?te:Zs((M+this._loopDelay)*this.iterationCount-this._loopDelay)||te,this.onRender=_||S.onRender,this._ease=b,this._delay=q,this.iterationDuration=M,this._inlineStyles=E,!this._autoplay&&U&&this.onRender(this)}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t;return ie(this,r=>{r._updateDuration=Vt(r._updateDuration*n),r._changeDuration=Vt(r._changeDuration*n),r._currentTime*=n,r._startTime*=n,r._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ie(this,e=>{const t=e._func;if(t){const n=Ot(e.target,e.property,e._tweenType);Ze(n,De),Ze(t(),K),e._fromNumbers=Be(De.d),e._fromNumber=De.n,e._toNumbers=Be(K.d),e._strings=Be(K.s),e._toNumber=K.o?Mt(De.n,K.n,K.o):K.n}}),this}revert(){return super.revert(),sr(this)}then(e){return super.then(e)}}const hs=(s,e)=>new _t(s,e,null,0,!1).init(),or=(s,e=100)=>{const t=[];for(let n=0;n<=e;n++)t.push(s(n/e));return`linear(${t.join(", ")})`},an={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Kl=(()=>{const s={};for(let e in us)s[e]=t=>us[e](Wt(t));return s})(),ln=s=>{let e=an[s];if(e)return e;if(e="linear",ze(s)){if(_e(s,"linear")||_e(s,"cubic-")||_e(s,"steps")||_e(s,"ease"))e=s;else if(_e(s,"cubicB"))e=Qi(s);else{const t=vo(s,Kl,an);fe(t)&&(e=t===yt?"linear":or(t))}an[s]=e}else if(fe(s)){const t=or(s);t&&(e=t)}else s.ease&&(e=or(s.ease));return e},bo=["x","y","z"],Zl=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bo],jl=[...bo,...is.filter(s=>["X","Y","Z"].some(e=>s.endsWith(e)))];let cn=null;const un={_head:null,_tail:null},hn=(s,e,t)=>{let n=un._head;for(;n;){const r=n._next,o=n.$el===s,i=!e||n.property===e,l=!t||n.parent===t;if(o&&i&&l){const c=n.animation;try{c.commitStyles()}catch{}c.cancel(),mt(un,n);const p=n.parent;p&&(p._completed++,p.animations.length===p._completed&&(p.completed=!0,p.muteCallbacks||(p.paused=!0,p.onComplete(p),p._resolve(p))))}n=r}},So=(s,e,t,n,r)=>{const o=e.animate(n,r),i=r.delay+ +r.duration*r.iterations;o.playbackRate=s._speed,s.paused&&o.pause(),s.duration<i&&(s.duration=i,s.controlAnimation=o),s.animations.push(o),hn(e,t),vt(un,{parent:s,animation:o,$el:e,property:t,_next:null,_prev:null});const l=()=>{hn(e,t,s)};return o.onremove=l,o.onfinish=l,o},ps=(s,e,t,n,r)=>{let o=Ye(e,t,n,r);return Xe(o)?Zl.includes(s)||_e(s,"translate")?`${o}px`:_e(s,"rotate")||_e(s,"skew")?`${o}deg`:`${o}`:o},ko=(s,e,t,n,r,o)=>{let i="0";const l=I(n)?getComputedStyle(s)[e]:ps(e,n,s,r,o);return I(t)?i=Le(n)?n.map(c=>ps(e,c,s,r,o)):l:i=[ps(e,t,s,r,o),l],i};class xo{constructor(e,t){me.current&&me.current.register(this),os(cn)&&(ot&&(I(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?cn=!1:(is.forEach(v=>{const _=_e(v,"skew"),S=_e(v,"scale"),y=_e(v,"rotate"),b=_e(v,"translate"),k=y||_,x=k?"<angle>":S?"<number>":b?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+v,syntax:x,inherits:!1,initialValue:b?"0px":k?"0deg":S?"1":"0"})}catch{}}),cn=!0));const n=cs(e),r=n.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const o=D(t.ease,ln(G.defaults.ease)),i=o.ease&&o,l=D(t.autoplay,G.defaults.autoplay),c=l&&l.link?l:!1,p=t.alternate&&t.alternate===!0,f=t.reversed&&t.reversed===!0,g=D(t.loop,G.defaults.loop),u=g===!0||g===1/0?1/0:Xe(g)?g+1:1,h=p?f?"alternate-reverse":"alternate":f?"reverse":"normal",a="forwards",d=ln(o),m=G.timeScale===1?1:Ne;this.targets=n,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||W,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!l||c!==!1,this.reversed=f,this.autoplay=l,this._speed=D(t.playbackRate,G.defaults.playbackRate),this._resolve=W,this._completed=0,this._inlineStyles=n.map(v=>v.getAttribute("style")),n.forEach((v,_)=>{const S=v[ns],y=jl.some(C=>t.hasOwnProperty(C)),b=(i?i.duration:Ye(D(t.duration,G.defaults.duration),v,_,r))*m,k=Ye(D(t.delay,G.defaults.delay),v,_,r)*m,x=D(t.composition,"replace");for(let C in t){if(!Ft(C))continue;const O={},P={iterations:u,direction:h,fill:a,easing:d,duration:b,delay:k,composite:x},w=t[C],E=y?is.includes(C)?C:Fr.get(C):!1;let L;if(be(w)){const M=w,q=D(M.ease,o),$=q.ease&&q,U=M.to,z=M.from;if(P.duration=($?$.duration:Ye(D(M.duration,b),v,_,r))*m,P.delay=Ye(D(M.delay,k),v,_,r)*m,P.composite=D(M.composition,x),P.easing=ln(q),L=ko(v,C,z,U,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=ko(v,C,z,U,_,r),So(this,v,C,O,P),!I(z))if(!E)v.style[C]=O[C][0];else{const R=`--${E}`;v.style.setProperty(R,O[R][0])}}else L=Le(w)?w.map(M=>ps(C,M,v,_,r)):ps(C,w,v,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=L,So(this,v,C,O,P)}if(y){let C=dt;for(let O in S)C+=`${$r[O]}var(--${O})) `;v.style.transform=C}}),c&&this.autoplay.link(this)}forEach(e){const t=ze(e)?n=>n[e]():e;return this.animations.forEach(t),this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=G.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(G.timeScale===1?1:Ne);this.forEach(n=>{t>=this.duration&&n.play(),n.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*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(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach((e,t)=>e.setAttribute("style",this._inlineStyles[t])),this}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const ec={animate:(s,e)=>new xo(s,e),convertEase:or},wo=(s=W)=>new Je({duration:1*G.timeScale,onComplete:s},null,0).resume();function Nt(s,e,t){const n=cs(s);if(!n.length)return;const[r]=n,o=jr(r,e),i=rn(e,r,o);let l=Ot(r,i);if(I(t))return l;if(Ze(l,De),De.t===Z.NUMBER||De.t===Z.UNIT){if(t===!1)return De.n;{const c=on(r,De,t,!1);return`${N(c.n,G.precision)}${c.u}`}}}const Tt=(s,e)=>{if(!I(e))return e.duration=te,e.composition=D(e.composition,ke.none),new _t(s,e,null,0,!0).resume()},To=(s,e,t)=>{let n=!1;return ie(e,r=>{const o=r.target;if(s.includes(o)){const i=r.property,l=r._tweenType,c=rn(t,o,l);(!c||c&&c===i)&&(r.parent._tail===r&&r._tweenType===pe.TRANSFORM&&r._prev&&r._prev._tweenType===pe.TRANSFORM&&(r._prev._renderTransforms=1),mt(e,r),uo(r),n=!0)}},!0),n},bt=(s,e,t)=>{const n=Ke(s),r=e||Se,o=e&&e.controlAnimation&&e;for(let l=0,c=n.length;l<c;l++){const p=n[l];hn(p,t,o)}let i;if(r._hasChildren){let l=0;ie(r,c=>{if(!c._hasChildren)if(i=To(n,c,t),i&&!c._head)c.cancel(),mt(r,c);else{const f=c._offset+c._delay+c.duration;f>l&&(l=f)}c._head?bt(s,c,t):c._hasChildren=!1},!0),I(r.iterationDuration)||(r.iterationDuration=l)}else i=To(n,r,t);return i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),n},tc=Yr,sc=s=>s[Xr(0,s.length-1)],rc=(s,e)=>(+s).toFixed(e),nc=(s,e,t)=>`${s}`.padStart(e,t),ic=(s,e,t)=>`${s}`.padEnd(e,t),oc=(s,e,t)=>((s-e)%(t-e)+(t-e))%(t-e)+e,fs=(s,e,t,n,r)=>n+(s-e)/(t-e)*(r-n),ac=s=>s*zt/180,lc=s=>s*180/zt,Co=(s,e,t,n)=>{let r=Ne/G.defaults.frameRate;if(n!==!1){const i=n||Se._hasChildren&&Se;i&&i.deltaTime&&(r=i.deltaTime)}const o=1-Math.exp(-t*r*.1);return t?t===1?e:(1-o)*s+o*e:s},cc=(s,e=0)=>(...t)=>e?n=>s(...t,n):n=>s(n,...t),Po=s=>(...e)=>{const t=s(...e);return new Proxy(W,{apply:(n,r,[o])=>t(o),get:(n,r)=>Po((...o)=>{const i=Eo[r](...o);return l=>i(t(l))})})},nt=(s,e=0)=>(...t)=>(t.length<s.length?Po(cc(s,e)):s)(...t),Eo={$:cs,get:Nt,set:Tt,remove:bt,cleanInlineStyles:sr,random:Xr,randomPick:sc,shuffle:so,lerp:Co,sync:wo,keepTime:tc,clamp:nt(F),round:nt(N),snap:nt(At),wrap:nt(oc),interpolate:nt(gt,1),mapRange:nt(fs),roundPad:nt(rc),padStart:nt(nc),padEnd:nt(ic),degToRad:nt(ac),radToDeg:nt(lc)},uc=(s,e)=>{if(_e(e,"<")){const t=e[1]==="<",n=s._tail,r=n?n._offset+n._delay:0;return t?r:r+n.duration}},ds=(s,e)=>{let t=s.iterationDuration;if(t===te&&(t=0),I(e))return t;if(Xe(+e))return+e;const n=e,r=s?s.labels:null,o=!os(r),i=uc(s,n),l=!I(i),c=Xi.exec(n);if(c){const p=c[0],f=n.split(p),g=o&&f[0]?r[f[0]]:t,u=l?i:o?g:t,h=+f[1];return Mt(u,h,p[0])}else return l?i:o?I(r[n])?t:r[n]:t};function hc(s){return Zs((s.iterationDuration+s._loopDelay)*s.iterationCount-s._loopDelay)||te}function pn(s,e,t,n,r,o){const l=Xe(s.duration)&&s.duration<=te?t-te:t;Rt(e,l,1,1,Ge.AUTO);const c=n?new _t(n,s,e,l,!1,r,o):new Je(s,e,l);return c.init(1),vt(e,c),ie(e,p=>{const g=p._offset+p._delay+p.duration;g>e.iterationDuration&&(e.iterationDuration=g)}),e.duration=hc(e),e}class Lo extends Je{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=G.defaults;this.defaults=t?ls(t,n):n,this.onRender=e.onRender||n.onRender;const r=D(e.playbackEase,n.playbackEase);this._ease=r?It(r):null,this.iterationDuration=0}add(e,t,n){const r=be(t),o=be(e);if(r||o){if(this._hasChildren=!0,r){const i=t;if(fe(n)){const l=n,c=Ke(e),p=this.duration,f=this.iterationDuration,g=i.id;let u=0;const h=c.length;c.forEach(a=>{const d={...i};this.duration=p,this.iterationDuration=f,I(g)||(d.id=g+"-"+u),pn(d,this,ds(this,l(a,u,h,this)),a,u,h),u++})}else pn(i,this,ds(this,n),e)}else pn(e,this,ds(this,t));return this.init(1)}}sync(e,t){if(I(e)||e&&I(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:"linear"},t)}set(e,t,n){return I(t)?this:(t.duration=te,t.composition=ke.replace,this.add(e,t,n))}call(e,t){return I(e)||e&&!fe(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return I(e)||e&&!ze(e)?this:(this.labels[e]=ds(this,t),this)}remove(e,t){return bt(e,this,t),this}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t,r=this.labels;ie(this,o=>o.stretch(o.duration*n));for(let o in r)r[o]*=n;return super.stretch(e)}refresh(){return ie(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ie(this,e=>e.revert,!0),sr(this)}then(e){return super.then(e)}}const pc=s=>new Lo(s).init();class fn{constructor(e,t){me.current&&me.current.register(this);const n=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let p in this.animations)if(!this.animations[p].paused&&c){c=!1;break}c&&this.callbacks.complete()},o={onBegin:n,onComplete:r,onPause:r},i={v:1,autoplay:!1},l={};if(this.targets=[],this.animations={},this.callbacks=null,!(I(e)||I(t))){for(let c in t){const p=t[c];Ft(c)?l[c]=p:_e(c,"on")?i[c]=p:o[c]=p}this.callbacks=new _t({v:0},i);for(let c in l){const p=l[c],f=be(p);let g={},u="+=0";if(f){const d=p.unit;ze(d)&&(u+=d)}else g.duration=p;g[c]=f?ls({to:u},p):u;const h=ls(o,g);h.composition=ke.replace,h.autoplay=!1;const a=this.animations[c]=new _t(e,h,null,0,!1).init();this.targets.length||this.targets.push(...a.targets),this[c]=(d,m,v)=>{const _=a._head;if(I(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ie(a,S=>{if(Le(d))for(let y=0,b=d.length;y<b;y++)I(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=d[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=d;I(v)||(S._ease=It(v)),S._currentTime=0}),I(m)||a.stretch(m),a.reset(1).resume(),this}}}}revert(){for(let e in this.animations)this[e]=W,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const fc=(s,e)=>new fn(s,e),Ct=Ne*10;class Ao{constructor(e={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ne,this.maxIterations=this.maxDuration/this.timeStep/Ne,this.m=F(D(e.mass,1),0,Ct),this.s=F(D(e.stiffness,100),1,Ct),this.d=F(D(e.damping,10),.1,Ct),this.v=F(D(e.velocity,0),-1e4,Ct),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>t===0||t===1?t:this.solve(t*this.solverDuration)}solve(e){const{zeta:t,w0:n,wd:r,b:o}=this;let i=e;return t<1?i=eo(-i*t*n)*(1*Ur(r*i)+o*Vr(r*i)):i=(1+o*i)*eo(-i*n),1-i}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:o,d:i,s:l,v:c}=this,p=this.w0=F(xt(l/o),te,Ne),f=this.zeta=i/(2*xt(l*o)),g=this.wd=f<1?p*xt(1-f*f):0;this.b=f<1?(f*p+-c)/g:-c+p;let u=0,h=0,a=0;for(;h<e&&a<t;)at(1-this.solve(u))<n?h++:h=0,this.solverDuration=u,u+=r,a++;this.duration=N(this.solverDuration*Ne,0)*G.timeScale}get mass(){return this.m}set mass(e){this.m=F(D(e,1),0,Ct),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=F(D(e,100),1,Ct),this.compute()}get damping(){return this.d}set damping(e){this.d=F(D(e,10),.1,Ct),this.compute()}get velocity(){return this.v}set velocity(e){this.v=F(D(e,0),-1e4,Ct),this.compute()}}const dn=s=>new Ao(s),Pt=s=>{s.cancelable&&s.preventDefault()};class dc{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:W,remove:W}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class gc{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,n=0;for(;t&&t!==H;)e(t,n),t=t.parentElement,n++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const n=getComputedStyle(t).transform;if(n){const r=new DOMMatrix(n);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform="none"})}revert(){this.traverseUp((e,t)=>{const n=this.inlineTransforms[t];n===""?e.style.removeProperty("transform"):e.style.transform=n})}}const Ve=(s,e)=>s&&fe(s)?s(e):s;let ar=0;class Ro{constructor(e,t={}){if(!e)return;me.current&&me.current.register(this);const n=t.x,r=t.y,o=t.trigger,i=t.modifier,l=t.releaseEase,c=l&&It(l),p=!I(l)&&!I(l.ease),f=be(n)&&!I(n.mapTo)?n.mapTo:"translateX",g=be(r)&&!I(r.mapTo)?r.mapTo:"translateY",u=Ve(t.container,this);this.containerArray=Le(u)?u:null,this.$container=u&&!this.containerArray?Ke(u)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.$target=be(e)?new dc(e):Ke(e)[0],this.$trigger=Ke(o||e)[0],this.fixed=Nt(this.$target,"position")==="fixed",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseYSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseEase=c||Gt.outQuint,this.hasReleaseSpring=p,this.onGrab=t.onGrab||W,this.onDrag=t.onDrag||W,this.onRelease=t.onRelease||W,this.onUpdate=t.onUpdate||W,this.onSettle=t.onSettle||W,this.onSnap=t.onSnap||W,this.onResize=t.onResize||W,this.onAfterResize=t.onAfterResize||W,this.disabled=[0,0];const h={};if(i&&(h.modifier=i),I(n)||n===!0)h[f]=0;else if(be(n)){const a=n,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[f]=d}else n===!1&&(h[f]=0,this.disabled[0]=1);if(I(r)||r===!0)h[g]=0;else if(be(r)){const a=r,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[g]=d}else r===!1&&(h[g]=0,this.disabled[1]=1);this.animate=new fn(this.$target,h),this.xProp=f,this.yProp=g,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,Ht,Ht,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=kt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new gc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new Je({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 Je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!I(u),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]?f:g,this.animate.callbacks.onRender=()=>{const a=this.updated,m=!(this.grabbed&&a)&&this.released,v=this.x,_=this.y,S=v-this.coords[2],y=_-this.coords[3];this.deltaX=S,this.deltaY=y,this.coords[2]=v,this.coords[3]=_,a&&(S||y)&&this.onUpdate(this),m?(this.computeVelocity(S,y),this.angle=Ks(y,S)):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 Je({autoplay:!1,duration:150*G.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),be(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const n=this.velocityTime,r=kt(),o=r-n;if(o<17)return this.velocity;this.velocityTime=r;const i=this.velocityStack,l=this.velocityMultiplier,c=this.minVelocity,p=this.maxVelocity,f=this.velocityStackIndex;i[f]=N(F(xt(e*e+t*t)/o*l,c,p),5);const g=Wr(i[0],i[1],i[2]);return this.velocity=g,this.velocityStackIndex=(f+1)%3,g}setX(e,t=!1){if(this.disabled[0])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=n,this.snapped[0]=At(n,this.snapX),this.animate[this.xProp](n,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=n,this.snapped[1]=At(n,this.snapY),this.animate[this.yProp](n,0),this.manual=!1,this}get x(){return N(this.animate[this.xProp](),G.precision)}set x(e){this.setX(e,!1)}get y(){return N(this.animate[this.yProp](),G.precision)}set y(e){this.setY(e,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(fs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(fs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=N(this.useWin?Ie.scrollX:this.$container.scrollLeft,0),t=N(this.useWin?Ie.scrollY:this.$container.scrollTop,0),[n,r,o,i]=this.containerPadding,l=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+n-l,this.scrollBounds[1]=e-this.targetBounds[1]-r+l,this.scrollBounds[2]=t-this.targetBounds[2]-o+l,this.scrollBounds[3]=e-this.targetBounds[3]+i-l}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,n=this.y,r=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 i=this.window[0]=Ie.innerWidth,l=this.window[1]=Ie.innerHeight,c=this.useWin,p=e.scrollWidth,f=e.scrollHeight,g=this.fixed,u=e.getBoundingClientRect(),[h,a,d,m]=this.containerPadding;this.dragArea[0]=c?0:u.left,this.dragArea[1]=c?0:u.top,this.scrollView[0]=c?F(p,i,p):p,this.scrollView[1]=c?F(f,l,f):f,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:b,bottom:k}=e.getBoundingClientRect();this.dragArea[2]=N(c?F(v,i,i):v,0),this.dragArea[3]=N(c?F(_,l,l):_,0);const x=Nt(e,"overflow"),C=x==="visible",O=x==="hidden";if(this.canScroll=g?!1:this.contained&&(e===H.body&&C||!O&&!C)&&(p>this.dragArea[2]+m-a||f>this.dragArea[3]+h-d)&&(!this.containerArray||this.containerArray&&!Le(this.containerArray)),this.contained){const P=this.scroll.x,w=this.scroll.y,E=this.canScroll,L=this.$target.getBoundingClientRect(),M=E?c?0:e.scrollLeft:0,q=E?c?0:e.scrollTop:0,$=E?this.scrollView[0]-M-v:0,U=E?this.scrollView[1]-q-_:0;this.targetBounds[0]=N(L.top+w-(c?0:y),0),this.targetBounds[1]=N(L.right+P-(c?i:b),0),this.targetBounds[2]=N(L.bottom+w-(c?l:k),0),this.targetBounds[3]=N(L.left+P-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+h,this.containerBounds[1]=this.containerArray[1]-a,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+m):(this.containerBounds[0]=-N(L.top-(g?F(y,0,l):y)+q-h,0),this.containerBounds[1]=-N(L.right-(g?F(b,0,i):b)-$+a,0),this.containerBounds[2]=-N(L.bottom-(g?F(k,0,l):k)-U+d,0),this.containerBounds[3]=-N(L.left-(g?F(S,0,i):S)+M-m,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=o,this.setX(t,!0),this.setY(n,!0)}isOutOfBounds(e,t,n){if(!this.contained)return 0;const[r,o,i,l]=e,[c,p]=this.disabled,f=!c&&t<l||!c&&t>o,g=!p&&n<r||!p&&n>i;return f&&!g?1:!f&&g?2:f&&g?3:0}refresh(){const e=this.parameters,t=e.x,n=e.y,r=Ve(e.container,this),o=Ve(e.containerPadding,this)||0,i=Le(o)?o:[o,o,o,o],l=this.x,c=this.y,p=Ve(e.cursor,this),f={onHover:"grab",onGrab:"grabbing"};if(p){const{onHover:d,onGrab:m}=p;d&&(f.onHover=d),m&&(f.onGrab=m)}this.containerArray=Le(r)?r:null,this.$container=r&&!this.containerArray?Ke(r)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=D(i,[0,0,0,0]),this.containerFriction=F(D(Ve(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=F(D(Ve(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ve(be(t)&&!I(t.snap)?t.snap:e.snap,this),this.snapY=Ve(be(n)&&!I(n.snap)?n.snap:e.snap,this),this.scrollSpeed=D(Ve(e.scrollSpeed,this),1.5),this.scrollThreshold=D(Ve(e.scrollThreshold,this),20),this.dragSpeed=D(Ve(e.dragSpeed,this),1),this.minVelocity=D(Ve(e.minVelocity,this),0),this.maxVelocity=D(Ve(e.maxVelocity,this),50),this.velocityMultiplier=D(Ve(e.velocityMultiplier,this),1),this.cursor=p===!1?!1:f,this.updateBoundingValues();const[g,u,h,a]=this.containerBounds;this.setX(F(l,a,u),!0),this.setY(F(c,g,h),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,b]=this.containerPadding,[k,x]=this.scrollView,C=this.dragArea[2],O=this.dragArea[3],P=this.scroll.x,w=this.scroll.y,E=this.$container.scrollWidth,L=this.$container.scrollHeight,M=this.useWin?F(E,this.window[0],E):E,q=this.useWin?F(L,this.window[1],L):L,$=k-M,U=x-q;this.dragged&&$>0&&(this.coords[0]-=$,this.scrollView[0]=M),this.dragged&&U>0&&(this.coords[1]-=U,this.scrollView[1]=q);const z=this.scrollSpeed*10,R=this.scrollThreshold,[ae,se]=this.coords,[xe,ve,V,ee]=this.scrollBounds,re=N(F((se-xe+_)/R,-1,0)*z,0),ue=N(F((ae-ve-S)/R,0,1)*z,0),ct=N(F((se-V-y)/R,0,1)*z,0),Ae=N(F((ae-ee+b)/R,-1,0)*z,0);if(re||ct||Ae||ue){const[we,he]=this.disabled;let j=P,J=w;we||(j=N(F(P+(Ae||ue),0,k-C),0),this.coords[0]-=P-j),he||(J=N(F(w+(re||ct),0,x-O),0),this.coords[1]-=w-J),this.useWin?this.$scrollContainer.scrollBy(-(P-j),-(w-J)):this.$scrollContainer.scrollTo(j,J)}}const[e,t,n,r]=this.containerBounds,[o,i,l,c,p,f]=this.pointer;this.coords[0]+=(o-p)*this.dragSpeed,this.coords[1]+=(i-f)*this.dragSpeed,this.pointer[4]=o,this.pointer[5]=i;const[g,u]=this.coords,[h,a]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(g>t?t+(g-t)*d:g<r?r+(g-r)*d:g,!1),this.setY(u>n?n+(u-n)*d:u<e?e+(u-e)*d:u,!1),this.computeVelocity(o-p,i-f),this.angle=Ks(i-c,o-l);const[m,v]=this.snapped;(m!==h&&this.snapX||v!==a&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return bt(this,null,"x"),bt(this,null,"y"),bt(this,null,"progressX"),bt(this,null,"progressY"),bt(this.scroll),bt(this.overshootCoords),this}scrollInView(e,t=0,n=Gt.inOutQuad){this.updateScrollCoords();const r=this.destX,o=this.destY,i=this.scroll,l=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(l,r,o)){const[p,f,g,u]=l,h=N(F(o-p,-1e12,0),0),a=N(F(r-f,0,Ht),0),d=N(F(o-g,0,Ht),0),m=N(F(r-u,-1e12,0),0);new _t(i,{x:N(i.x+(m?m-t:a?a+t:0),0),y:N(i.y+(h?h-t:d?d+t:0),0),duration:I(e)?350*G.timeScale:e,ease:n,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(i.x,i.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,n=Gt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,o=this.y,[i,l,c,p]=this.containerPadding,f=this.scroll.y-this.targetBounds[0]+i+t,g=this.scroll.x-this.targetBounds[1]-l-t,u=this.scroll.y-this.targetBounds[2]-c-t,h=this.scroll.x-this.targetBounds[3]+p+t,a=this.isOutOfBounds([f,g,u,h],r,o);if(a){const[d,m]=this.disabled,v=F(At(r,this.snapX),h,g),_=F(At(o,this.snapY),f,u),S=I(e)?350*G.timeScale:e;!d&&(a===1||a===3)&&this.animate[this.xProp](v,S,n),!m&&(a===2||a===3)&&this.animate[this.yProp](_,S,n)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type==="range")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const n=e.changedTouches,r=n?n[0].clientX:e.clientX,o=n?n[0].clientY:e.clientY,{x:i,y:l}=this.transforms.normalizePoint(r,o),[c,p,f,g]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,h=this.x,a=this.y;this.coords[0]=this.coords[2]=u?h>p?p+(h-p)/u:h<g?g+(h-g)/u:h:h,this.coords[1]=this.coords[3]=u?a>f?f+(a-f)/u:a<c?c+(a-c)/u:a:a,this.pointer[0]=i,this.pointer[1]=l,this.pointer[2]=i,this.pointer[3]=l,this.pointer[4]=i,this.pointer[5]=l,this.pointer[6]=i,this.pointer[7]=l,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 d=Nt(this.$target,"zIndex",!1);ar=(d>ar?d:ar)+1,this.targetStyles=Tt(this.$target,{zIndex:ar}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(H.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Gt.out(3)),this.onGrab(this),H.addEventListener("touchmove",this),H.addEventListener("touchend",this),H.addEventListener("touchcancel",this),H.addEventListener("mousemove",this),H.addEventListener("mouseup",this),H.addEventListener("selectstart",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,n=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:o,y:i}=this.transforms.normalizePoint(n,r),l=o-this.pointer[6],c=i-this.pointer[7];let p=e.target,f=!1,g=!1,u=!1;for(;t&&p&&p!==this.$trigger;){const h=Nt(p,"overflow-y");if(h!=="hidden"&&h!=="visible"){const{scrollTop:a,scrollHeight:d,clientHeight:m}=p;if(d>m){u=!0,f=a<=3,g=a>=d-m-3;break}}p=p.parentNode}u&&(!f&&!g||f&&c<0||g&&c>0)?(this.pointer[0]=o,this.pointer[1]=i,this.pointer[2]=o,this.pointer[3]=i,this.pointer[4]=o,this.pointer[5]=i,this.pointer[6]=o,this.pointer[7]=i):(Pt(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Pt,{passive:!1}),this.$trigger.addEventListener("touchmove",Pt,{passive:!1}),this.$trigger.addEventListener("touchend",Pt),(!this.disabled[0]&&at(l)>3||!this.disabled[1]&&at(c)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=o,this.pointer[1]=i,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[e,t]=this.disabled,[n,r,o,i,l,c]=this.pointer,[p,f,g,u]=this.containerBounds,[h,a]=this.snapped,d=this.releaseXSpring,m=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,b=this.y,k=this.computeVelocity(n-l,r-c),x=this.angle=Ks(r-i,n-o),C=k*150,O=(1-this.releaseContainerFriction)*this.dragSpeed,P=y+Ur(x)*C,w=b+Vr(x)*C,E=P>f?f+(P-f)*O:P<u?u+(P-u)*O:P,L=w>g?g+(w-g)*O:w<p?p+(w-p)*O:w,M=this.destX=F(N(At(E,this.snapX),5),u,f),q=this.destY=F(N(At(L,this.snapY),5),p,g),$=this.isOutOfBounds(this.containerBounds,P,w);let U=0,z=0,R=v,ae=v,se=0;if(S.x=y,S.y=b,!e){const ve=M===f?y>f?-1:1:y<u?-1:1,V=N(y-M,0);d.velocity=t&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=d;U=y===M?0:_?re:re-ue*G.timeScale,_&&(R=ee),U>se&&(se=U)}if(!t){const ve=q===g?b>g?-1:1:b<p?-1:1,V=N(b-q,0);m.velocity=e&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=m;z=b===q?0:_?re:re-ue*G.timeScale,_&&(ae=ee),z>se&&(se=z)}if(!_&&$&&O&&(U||z)){const ve=ke.blend;new _t(S,{x:{to:E,duration:U*.65},y:{to:L,duration:z*.65},ease:v,composition:ve}).init(),new _t(S,{x:{to:M,duration:U},y:{to:q,duration:z},ease:v,composition:ve}).init(),this.overshootTicker.stretch(Wr(U,z)).restart()}else e||this.animate[this.xProp](M,U,R),t||this.animate[this.yProp](q,z,ae);this.scrollInView(se,this.scrollThreshold,v);let xe=!1;M!==h&&(this.snapped[0]=M,this.snapX&&(xe=!0)),q!==a&&this.snapY&&(this.snapped[1]=q,this.snapY&&(xe=!0)),xe&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Pt),this.$trigger.removeEventListener("touchmove",Pt),this.$trigger.removeEventListener("touchend",Pt),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.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=Tt(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),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.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(e){switch(e.type){case"mousedown":this.handleDown(e);break;case"touchstart":this.handleDown(e);break;case"mousemove":this.handleMove(e);break;case"touchmove":this.handleMove(e);break;case"mouseup":this.handleUp();break;case"touchend":this.handleUp();break;case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":Pt(e);break}}}const mc=(s,e)=>new Ro(s,e);class Oo{constructor(e={}){me.current&&me.current.register(this);const t=e.root;let n=H;t&&(n=t.current||t.nativeElement||Ke(t)[0]||H);const r=e.defaults,o=G.defaults,i=e.mediaQueries;if(this.defaults=r?ls(r,o):o,this.root=n,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={},i)for(let l in i){const c=Ie.matchMedia(i[l]);this.mediaQueryLists[l]=c,c.addEventListener("change",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=me.current,n=me.root,r=G.defaults;me.current=this,me.root=this.root,G.defaults=this.defaults;const o=this.mediaQueryLists;for(let l in o)this.matches[l]=o[l].matches;const i=e(this);return me.current=t,me.root=n,G.defaults=r,i}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(n=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,fe(e)){const n=e;this.constructors.push(n),this.execute(()=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...n)=>this.execute(()=>t(...n));return this}addOnce(e){if(this.once=!0,fe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const r=e;this.constructorsOnce[t]=r,this.execute(()=>{const o=r(this);fe(o)&&this.revertConstructorsOnce.push(o)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,n=this.constructorsOnce[t];if(fe(n))return n(this);const r=Yr(e);this.constructorsOnce[t]=r;let o;return this.execute(()=>{o=r(this)}),o}handleEvent(e){switch(e.type){case"change":this.refresh();break}}revert(){const e=this.revertibles,t=this.revertConstructors,n=this.revertiblesOnce,r=this.revertConstructorsOnce,o=this.mediaQueryLists;let i=e.length,l=t.length,c=n.length,p=r.length;for(;i--;)e[i].revert();for(;l--;)t[l](this);for(;c--;)n[c].revert();for(;p--;)r[p](this);for(let f in o)o[f].removeEventListener("change",this);e.length=0,t.length=0,this.constructors.length=0,n.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vc=s=>new Oo(s),yc=()=>{const s=H.createElement("div");H.body.appendChild(s),s.style.height="100lvh";const e=s.offsetHeight;return H.body.removeChild(s),e},lr=(s,e)=>s&&fe(s)?s(e):s,cr=new Map;class _c{constructor(e){this.element=e,this.useWin=this.element===H.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ie(this,n=>n.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Je({autoplay:!1,frameRate:30,onUpdate:t=>{const n=t.deltaTime,r=this.prevScrollX,o=this.prevScrollY,i=this.scrollX,l=this.scrollY,c=r-i,p=o-l;this.prevScrollX=i,this.prevScrollY=l,c&&(this.backwardX=r>i),p&&(this.backwardY=o>l),this.velocity=N(n>0?Math.sqrt(c*c+p*p)/n:0,5)}}).init(),this.resizeTicker=new Je({autoplay:!1,duration:250*G.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Je({autoplay:!1,duration:500*G.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?Ie:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=N(e?Ie.scrollX:t.scrollLeft,0),this.scrollY=N(e?Ie.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ie.innerWidth,this.winHeight=yc()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let n,r;if(this.useWin)n=this.winWidth,r=this.winHeight;else{const o=t.getBoundingClientRect();n=t.clientWidth,r=t.clientHeight,this.top=o.top,this.left=o.left}this.width=n,this.height=r}refreshScrollObservers(){ie(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ie(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){switch(e.type){case"scroll":this.handleScroll();break}}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?Ie:this.element).removeEventListener("scroll",this),cr.delete(this.element)}}const bc=s=>{const e=s&&Ke(s)[0]||H.body;let t=cr.get(e);return t||(t=new _c(e),cr.set(e,t)),t},gs=(s,e,t,n,r)=>{const o=e==="min",i=e==="max",l=e==="top"||e==="left"||e==="start"||o?0:e==="bottom"||e==="right"||e==="end"||i?"100%":e==="center"?"50%":e,{n:c,u:p}=Ze(l,De);let f=c;return p==="%"?f=c/100*t:p&&(f=on(s,De,"px",!0).n),i&&n<0&&(f+=n),o&&r>0&&(f+=r),f},ur=(s,e,t,n,r)=>{let o;if(ze(e)){const i=Xi.exec(e);if(i){const l=i[0],c=l[0],p=e.split(l),f=p[0]==="min",g=p[0]==="max",u=gs(s,p[0],t,n,r),h=gs(s,p[1],t,n,r);if(f){const a=Mt(gs(s,"min",t),h,c);o=a<u?u:a}else if(g){const a=Mt(gs(s,"max",t),h,c);o=a>u?u:a}else o=Mt(u,h,c)}else o=gs(s,e,t,n,r)}else o=e;return N(o,0)},Mo=s=>{let e;const t=s.targets;for(let n=0,r=t.length;n<r;n++){const o=t[n];if(o[Qs]){e=o;break}}return e};let Sc=0;const Io=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class No{constructor(e={}){me.current&&me.current.register(this);const t=D(e.sync,"play pause"),n=t?It(t):null,r=t&&(t==="linear"||t===yt),o=t&&!(n===yt&&!r),i=t&&(Xe(t)||t===!0||r),l=t&&ze(t)&&!o&&!i,c=l?t.split(" ").map(f=>()=>{const g=this.linked;return g&&g[f]?g[f]():null}):null,p=l&&c.length>2;this.index=Sc++,this.id=I(e.id)?this.index:e.id,this.container=bc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!c,this.syncEase=o?n:null,this.syncSmooth=i?t===!0||r?1:t:null,this.onSyncEnter=c&&!p&&c[0]?c[0]:W,this.onSyncLeave=c&&!p&&c[1]?c[1]:W,this.onSyncEnterForward=c&&p&&c[0]?c[0]:W,this.onSyncLeaveForward=c&&p&&c[1]?c[1]:W,this.onSyncEnterBackward=c&&p&&c[2]?c[2]:W,this.onSyncLeaveBackward=c&&p&&c[3]?c[3]:W,this.onEnter=e.onEnter||W,this.onLeave=e.onLeave||W,this.onEnterForward=e.onEnterForward||W,this.onLeaveForward=e.onLeaveForward||W,this.onEnterBackward=e.onEnterBackward||W,this.onLeaveBackward=e.onLeaveBackward||W,this.onUpdate=e.onUpdate||W,this.onSyncComplete=e.onSyncComplete||W,this.reverted=!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=e,this._debug=D(e.debug,!1),this._next=null,this._prev=null,vt(this.container,this),wo(()=>{if(!this.reverted){if(!this.target){const f=Ke(e.target)[0];this.target=f||H.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;I(e.targets)?ie(e,n=>{n.targets&&!t&&(t=Mo(n))}):t=Mo(e),this.target=t||H.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 e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:N(F(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=D(lr(e.repeat,this),!0),this.horizontal=D(lr(e.axis,this),"y")==="x",this.enter=D(lr(e.enter,this),"end start"),this.leave=D(lr(e.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 e=this.container,t=this.horizontal,n=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=H.createElement("div"),o=H.createElement("div"),i=H.createElement("div"),l=Io[this.index%Io.length],c=e.useWin,p=c?e.winWidth:e.width,f=c?e.winHeight:e.height,g=e.scrollWidth,u=e.scrollHeight,h=this.container.width>360?320:260,a=t?0:10,d=t?10:0,m=t?24:h/2,v=t?m:15,_=t?60:m,S=t?_:v,y=t?"repeat-x":"repeat-y",b=P=>t?"0px "+P+"px":P+"px 2px",k=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,x=(P,w,E,L,M)=>`position:${P};left:${w}px;top:${E}px;width:${L}px;height:${M}px;`;r.style.cssText=`${x("absolute",a,d,t?g:h,t?h:u)}
95
95
  pointer-events: none;
96
96
  z-index: ${this.container.zIndex++};
97
97
  display: flex;
@@ -103,7 +103,7 @@ Expecting `+w.join(", ")+", got '"+(this.terminals_[S]||S)+"'":E="Parse error on
103
103
  `),i.style.cssText=`${x("relative",0,0,t?g:m,t?m:u)}`,n||(i.style.cssText+=`background:
104
104
  ${k("#FFFF")}${b(0)} / ${t?"100px 10px":"10px 100px"} ${y},
105
105
  ${k("#FFF8")}${b(0)} / ${t?"10px 0px":"0px 10px"} ${y};
106
- `);const C=[" enter: "," leave: "];this.coords.forEach((P,w)=>{const E=w>1,L=(E?0:this.offset)+P,M=w%2,q=L<S,$=L>(E?t?p:f:t?g:u)-S,U=(E?M&&!q:!M&&!q)||$,z=H.createElement("div"),R=H.createElement("div"),ae=t?U?"right":"left":U?"bottom":"top",te=U?(t?_:v)+(E?t?-1:$?0:-2:t?-1:-2):t?1:0;R.innerHTML=`${this.id}${C[M]}${this.thresholds[w]}`,z.style.cssText=`${x("absolute",0,0,_,v)}
106
+ `);const C=[" enter: "," leave: "];this.coords.forEach((P,w)=>{const E=w>1,L=(E?0:this.offset)+P,M=w%2,q=L<S,$=L>(E?t?p:f:t?g:u)-S,U=(E?M&&!q:!M&&!q)||$,z=H.createElement("div"),R=H.createElement("div"),ae=t?U?"right":"left":U?"bottom":"top",se=U?(t?_:v)+(E?t?-1:$?0:-2:t?-1:-2):t?1:0;R.innerHTML=`${this.id}${C[M]}${this.thresholds[w]}`,z.style.cssText=`${x("absolute",0,0,_,v)}
107
107
  display: flex;
108
108
  flex-direction: ${t?"column":"row"};
109
109
  justify-content: flex-${E?"start":"end"};
@@ -128,5 +128,5 @@ Expecting `+w.join(", ")+", got '"+(this.terminals_[S]||S)+"'":E="Parse error on
128
128
  border: 2px solid ${M?l:"transparent"};
129
129
  border-${t?U?"top-left":"top-right":U?"top-left":"bottom-left"}-radius: 5px;
130
130
  border-${t?U?"bottom-left":"bottom-right":U?"top-right":"bottom-right"}-radius: 5px;
131
- `,z.appendChild(R);let xe=L-te+(t?1:0);z.style[t?"left":"top"]=`${xe}px`,(E?o:i).appendChild(z)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Nt(e.element,"position")==="static"&&(this.debugStyles=Tt(e.element,{position:"relative "}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,l=t;for(o&&(i=o.currentTime,o.seek(0,!0)),l.parentElement;l&&l!==n.element&&l!==H.body;){const L=Nt(l,"position")==="sticky"?Tt(l,{position:"static"}):!1;l=l.parentElement,L&&(e||(e=[]),e.push(L))}const c=t.getBoundingClientRect(),p=r?c.left+n.scrollX-n.left:c.top+n.scrollY-n.top,f=r?c.width:c.height,g=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-g,a=this.enter,d=this.leave;let m="start",v="end",_="end",S="start";if(ze(a)){const L=a.split(" ");_=L[0],m=L.length>1?L[1]:m}else if(be(a)){const L=a;I(L.container)||(_=L.container),I(L.target)||(m=L.target)}else Xe(a)&&(_=a);if(ze(d)){const L=d.split(" ");S=L[0],v=L.length>1?L[1]:v}else if(be(d)){const L=d;I(L.container)||(S=L.container),I(L.target)||(v=L.target)}else Xe(d)&&(S=d);const y=ur(t,m,f),b=ur(t,v,f),k=y+p-g,x=b+p-h,C=ur(t,_,g,k,x),O=ur(t,S,g,k,x),P=y+p-C,w=b+p-O,E=w-P;this.offset=p,this.offsetStart=P,this.offsetEnd=w,this.distance=E<=0?0:E,this.thresholds=[m,v,_,S],this.coords=[y,b,C,O],e&&e.forEach(L=>L.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,l=this.container,c=this.scroll,p=c<=this.offsetStart,f=c>=this.offsetEnd,g=!p&&!f,u=c===this.offsetStart||c===this.offsetEnd,h=!this.hasEntered&&u,a=this._debug&&this.$debug;let d=!1,m=!1,v=this.progress;if(p&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),o){const _=e.progress;if(r&&Xe(r)){if(r<1){const y=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=N(Co(_,v,gt(.01,.2,r),!1)+y,6)}}else n&&(v=n(v));d=v!==this.prevProgress,m=_===1,d&&!m&&r&&_&&l.wakeTicker.restart()}if(a){const _=i?l.scrollY:l.scrollX;a.style[i?"top":"left"]=_+10+"px"}(g&&!this.isInView||h&&!this.forceEnter&&!this.hasEntered)&&(g&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(a&&g&&(a.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,h&&(this.forceEnter=!0)):g&&(this.forceEnter=!1)),(g||!g&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*v),this.onUpdate(this)),!g&&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)),t&&!r&&(m=!0)),v>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return mt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const kc=(s={})=>new No(s),hr=typeof Intl<"u"&&Intl.Segmenter,xc=/\{value\}/g,wc=/\{i\}/g,Tc=/(\s+)/,Cc=/^\s+$/,gn="line",ms="word",vs="char",ys="data-line";let mn=null,vn=null,pr=null;const Bo=s=>s.isWordLike||s.segment===" "||Xe(+s.segment),yn=s=>s.setAttribute("aria-hidden","true"),fr=(s,e)=>[...s.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Pc={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Do=s=>{if(!s.childElementCount&&!s.textContent.trim()){const e=s.parentElement;s.remove(),e&&Do(e)}},qo=(s,e,t)=>{const n=s.getAttribute(ys);(n!==null&&+n!==e||s.tagName==="BR")&&t.add(s);let r=s.childElementCount;for(;r--;)qo(s.children[r],e,t);return t},_n=(s,e={})=>{let t="";const n=ze(e.class)?` class="${e.class}"`:"",r=D(e.clone,!1),o=D(e.wrap,!1),i=o?o===!0?"clip":o:r?"clip":!1;if(o&&(t+=`<span${i?` style="overflow:${i};"`:""}>`),t+=`<span${n}${r?' style="position:relative;"':""} data-${s}="{i}">`,r){const l=r==="left"?"-100%":r==="right"?"100%":"0",c=r==="top"?"-100%":r==="bottom"?"100%":"0";t+="<span>{value}</span>",t+=`<span inert style="position:absolute;top:${c};left:${l};white-space:nowrap;">{value}</span>`}else t+="{value}";return t+="</span>",o&&(t+="</span>"),t},bn=(s,e,t,n,r,o,i,l,c)=>{const p=r===gn,f=r===vs,g=`_${r}_`,u=fe(s)?s(t):s,h=p?"block":"inline-block";pr.innerHTML=u.replace(xc,`<i class="${g}"></i>`).replace(wc,`${f?c:p?i:l}`);const a=pr.content,d=a.firstElementChild,m=a.querySelector(`[data-${r}]`)||d,v=a.querySelectorAll(`i.${g}`),_=v.length;if(_){d.style.display=h,m.style.display=h,m.setAttribute(ys,`${i}`),p||(m.setAttribute("data-word",`${l}`),f&&m.setAttribute("data-char",`${c}`));let S=_;for(;S--;){const y=v[S],b=y.parentElement;b.style.display=h,p?b.innerHTML=t.innerHTML:b.replaceChild(t.cloneNode(!0),y)}e.push(m),n.appendChild(a)}else console.warn('The expression "{value}" is missing from the provided template.');return o&&(d.style.outline=`1px dotted ${Pc[r]}`),d};class Ho{constructor(e,t={}){mn||(mn=hr?new hr([],{granularity:ms}):{segment:a=>{const d=[],m=a.split(Tc);for(let v=0,_=m.length;v<_;v++){const S=m[v];d.push({segment:S,isWordLike:!Cc.test(S)})}return d}}),vn||(vn=hr?new hr([],{granularity:"grapheme"}):{segment:a=>[...a].map(d=>({segment:d}))}),!pr&&ot&&(pr=H.createElement("template")),me.current&&me.current.register(this);const{words:n,chars:r,lines:o,accessible:i,includeSpaces:l,debug:c}=t,p=(e=Le(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],f=o===!0?{}:o,g=n===!0||I(n)?{}:n,u=r===!0?{}:r;this.debug=D(c,!1),this.includeSpaces=D(l,!1),this.accessible=D(i,!0),this.linesOnly=f&&!g&&!u,this.lineTemplate=be(f)?_n(gn,f):f,this.wordTemplate=be(g)||this.linesOnly?_n(ms,g):g,this.charTemplate=be(u)?_n(vs,u):u,this.$target=p,this.html=p&&p.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const h=()=>this.html&&(f||g||u)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const a=p.offsetWidth;a!==this.width&&(this.width=a,h())},150)}),this.lineTemplate&&!this.ready?H.fonts.ready.then(h):h(),p?this.resizeObserver.observe(p):console.warn("No Text Splitter target found.")}addEffect(e){if(!fe(e))return console.warn("Effect must return a function.");const t=Yr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>fe(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,n=this.charTemplate,r=this.includeSpaces,o=this.debug,i=e.nodeType;if(i===3){const l=e.nodeValue;if(l.trim()){const c=[],p=this.words,f=this.chars,g=mn.segment(l),u=H.createDocumentFragment();let h=null;for(const a of g){const d=a.segment,m=Bo(a);if(!h||m&&h&&Bo(h))c.push(d);else{const v=c.length-1;!c[v].includes(" ")&&!d.includes(" ")?c[v]+=d:c.push(d)}h=a}for(let a=0,d=c.length;a<d;a++){const m=c[a];if(m.trim()){const v=c[a+1],_=r&&v&&!v.trim(),S=m,y=n?vn.segment(S):null,b=n?H.createDocumentFragment():H.createTextNode(_?m+" ":m);if(n){const k=[...y];for(let x=0,C=k.length;x<C;x++){const O=k[x],w=x===C-1&&_?O.segment+" ":O.segment,E=H.createTextNode(w);bn(n,f,E,b,vs,o,-1,p.length,f.length)}}t?bn(t,p,b,u,ms,o,-1,p.length,f.length):n?u.appendChild(b):u.appendChild(H.createTextNode(m)),_&&a++}else{if(a&&r)continue;u.appendChild(H.createTextNode(m))}}e.parentNode.replaceChild(u,e)}}else if(i===1){const l=[...e.childNodes];for(let c=0,p=l.length;c<p;c++)this.splitNode(l[c])}}split(e=!1){const t=this.$target,n=!!this.cache&&!e,r=this.lineTemplate,o=this.wordTemplate,i=this.charTemplate,l=H.fonts.status!=="loading",c=r&&l;this.ready=!r||l,(c||e)&&this.effectsCleanups.forEach(u=>fe(u)&&u(this)),n||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(n&&(t.innerHTML=this.cache),this.lines.length=0,o&&(this.words=fr(t,ms))),i&&(c||o)&&(this.chars=fr(t,vs));const p=this.words.length?this.words:this.chars;let f,g=0;for(let u=0,h=p.length;u<h;u++){const a=p[u],{top:d,height:m}=a.getBoundingClientRect();f&&d-f>m*.5&&g++,a.setAttribute(ys,`${g}`);const v=a.querySelectorAll(`[${ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(ys,`${g}`);f=d}if(c){const u=H.createDocumentFragment(),h=new Set,a=[];for(let d=0;d<g+1;d++){const m=t.cloneNode(!0);qo(m,d,new Set).forEach(v=>{const _=v.parentElement;_&&h.add(_),v.remove()}),a.push(m)}h.forEach(Do);for(let d=0,m=a.length;d<m;d++)bn(r,this.lines,a[d],u,gn,this.debug,d);t.innerHTML="",t.appendChild(u),o&&(this.words=fr(t,ms)),i&&(this.chars=fr(t,vs))}if(this.linesOnly){const u=this.words;let h=u.length;for(;h--;){const a=u[h];a.replaceWith(a.textContent)}u.length=0}if(this.accessible&&(c||!n)){const u=H.createElement("span");u.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",u.innerHTML=this.html,t.insertBefore(u,t.firstChild),this.lines.forEach(yn),this.words.forEach(yn),this.chars.forEach(yn)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((u,h)=>this.effectsCleanups[h]=u(this)),this}refresh(){this.split(!0)}}const dr={split:(s,e)=>new Ho(s,e)},gr=(s,e={})=>{let t=[],n=0;const r=e.from,o=e.reversed,i=e.ease,l=!I(i),p=l&&!I(i.ease)?i.ease:l?It(i):null,f=e.grid,g=e.axis,u=e.total,h=I(r)||r===0||r==="first",a=r==="center",d=r==="last",m=r==="random",v=Le(s),_=e.use,S=Lt(v?s[0]:s),y=v?Lt(s[1]):0,b=Gi.exec((v?s[1]:s)+dt),k=e.start||0+(v?S:0);let x=h?0:Xe(r)?r:0;return(C,O,P,w)=>{const[E]=cs(C),L=I(u)?P:u,M=I(_)?!1:fe(_)?_(E,O,L):Ot(E,_),q=Xe(M)||ze(M)&&Xe(+M)?+M:O;if(a&&(x=(L-1)/2),d&&(x=L-1),!t.length){for(let R=0;R<L;R++){if(!f)t.push(at(x-R));else{const ae=a?(f[0]-1)/2:x%f[0],te=a?(f[1]-1)/2:as(x/f[0]),xe=R%f[0],ve=as(R/f[0]),V=ae-xe,j=te-ve;let re=xt(V*V+j*j);g==="x"&&(re=-V),g==="y"&&(re=-j),t.push(re)}n=Wr(...t)}p&&(t=t.map(R=>p(R/n)*n)),o&&(t=t.map(R=>g?R<0?R*-1:-R:at(n-R))),m&&(t=so(t))}const $=v?(y-S)/n:S;let z=(w?ds(w,I(e.start)?w.iterationDuration:k):k)+($*N(t[q],2)||0);return e.modifier&&(z=e.modifier(z)),b&&(z=`${z}${b[2]}`),z}},Ec=Object.freeze(Object.defineProperty({__proto__:null,Animatable:fn,Draggable:Ro,JSAnimation:_t,Scope:Oo,ScrollObserver:No,Spring:Ao,TextSplitter:Ho,Timeline:Lo,Timer:Je,WAAPIAnimation:xo,animate:hs,createAnimatable:fc,createDraggable:mc,createScope:vc,createSpring:dn,createTimeline:pc,createTimer:zl,eases:Gt,engine:Se,onScroll:kc,scrollContainers:cr,stagger:gr,svg:Nl,text:dr,utils:Eo,waapi:ec},Symbol.toStringTag,{value:"Module"}));class Lc{constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation("typewriter",function(e,t,n,r){const{chars:o}=dr.split(e,{words:!1,chars:!0}),i=t.fadeDuration||100,l=t.interval||100;hs(o,{opacity:[0,1],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,n,r){const{words:o}=dr.split(e,{words:!0,chars:!1}),i=t.fadeDuration||100,l=t.interval||200;hs(o,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,n,r){const o=t.duration||500;hs(e,{opacity:[0,1],easing:t.easing||"easeOutQuad",duration:o,delay:t.start||0,loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("continue",function(e,t,n){e.classList.add("squiffy-continue");const r=t.style||"pulse";let o=null,i=null;r==="wave"?(e.classList.add("squiffy-continue-wave"),i=dr.split(e,{words:!1,chars:!0}).chars,o=hs(i,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:gr(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const l=()=>{if(e.classList.remove("squiffy-continue","squiffy-continue-wave",`squiffy-continue-${r}`),e.removeEventListener("click",l),o&&(o.pause(),i))for(const c of i)c.style.opacity="1";n()};e.addEventListener("click",l)})}registerAnimation(e,t,n={}){this.animations[e]={handler:t,options:n}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,n,r,o){const i=this.animations[e];i?i.handler(t,n,r,o):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}}const Ac={animejs:Ec},Fo="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Rc="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function $o(s){if(!s)return!0;const e=s.querySelectorAll(Fo);for(const t of e)if(!t.checkValidity())return!1;return!0}function Sn(s){if(!s)return;const e=$o(s),t=s.querySelectorAll(Rc);for(const n of t)e?(n.classList.remove("validation-disabled"),n.removeAttribute("aria-disabled")):(n.classList.add("validation-disabled"),n.setAttribute("aria-disabled","true"))}function mr(s){if(!s)return;const e=s.querySelectorAll(Fo);for(const t of e)t.addEventListener("input",()=>Sn(s)),t.addEventListener("change",()=>Sn(s)),t.addEventListener("invalid",n=>{n.preventDefault(),t.classList.add("squiffy-invalid")}),t.addEventListener("input",()=>{t.checkValidity()&&t.classList.remove("squiffy-invalid")});Sn(s)}const Oc=async s=>{let e,t,n,r,o,i=0;const l=new rl,c=[];let p=!1;async function f(T){if(p||T.closest(".squiffy-output-section")!==n||T.classList.contains("disabled")||!$o(n))return!1;const B=T.getAttribute("data-passage"),J=T.getAttribute("data-section");if(B!==null)return u(T),Y("_turncount",se("_turncount")+1),await d(T),B&&(o=null,await b(B)),l.emit("linkClick",{linkType:"passage"}),!0;if(J!==null)return await d(T),J&&await v(J),l.emit("linkClick",{linkType:"section"}),!0;const[Q,ye,Pe]=Ue.handleLink(T);return Q?(Pe?.disableLink&&u(T),C(),l.emit("linkClick",{linkType:ye}),!0):!1}async function g(T){const A=T.target;A.classList.contains("squiffy-link")&&await f(A)}function u(T){T.classList.add("disabled"),T.setAttribute("tabindex","-1")}function h(T){T.classList.remove("disabled"),T.removeAttribute("tabindex")}async function a(){O()||await v(e.start)}async function d(T){qe.runLinkAnimation(T),await y();const A=T.getAttribute("data-set");if(A){const B=JSON.parse(A);for(const J of B)m(J)}}function m(T){T=T.replace(/^(\w*\s*):=(.*)$/,(J,Q,ye)=>Q+"="+$.processText(ye,!0));const B=/^([\w]*)\s*=\s*(.*)$/.exec(T);if(B){const J=B[1];let Q=B[2];Q==="true"?Y(J,!0):Q==="false"?Y(J,!1):isNaN(Q)?(Q.startsWith("@")&&(Q=se(Q.substring(1))),Y(J,Q)):Y(J,parseFloat(Q))}else{const Q=/^([\w]*)\s*([+\-*/])=\s*(.*)$/.exec(T);if(Q){const ye=Q[1],Pe=Q[2];let Ee=Q[3];Ee.startsWith("@")&&(Ee=se(Ee.substring(1)));const je=parseFloat(Ee);let de=se(ye);de===null&&(de=0),Pe=="+"&&(de+=je),Pe=="-"&&(de-=je),Pe=="*"&&(de*=je),Pe=="/"&&(de/=je),Y(ye,de)}else{let ye=!0;T.startsWith("not ")&&(T=T.substring(4),ye=!1),Y(T,ye)}}}async function v(T){const A=te();if(t=e.sections[T],!t)return;Y("_section",T),he.setSeen(T);const B=e.sections[""];(B?.clear||t.clear)&&M(),w(T),B&&await S(B,"[[]]"),await S(t,`[[${T}]]`),mr(n),se("_section")==T&&(Y("_turncount",0),Ae(),C());const J=te();J!=A&&l.emit("canGoBackChanged",{canGoBack:J})}function _(T,A=null){const B={get:se,set:Y,ui:{transition:St,write:$.write,scrollToEnd:$.scrollToEnd},story:{go:v},element:ve,import:Ac,...A};e.js[T](B,se,Y)}async function S(T,A){T.attributes&&await k(T.attributes),T.jsIndex!==void 0&&_(T.jsIndex),$.write(T.text||"",A),await y()}async function y(){p=!0,n.classList.add("links-disabled");for(const T of c)await T();c.length=0,p=!1,n.classList.remove("links-disabled")}async function b(T){const A=te();let B=t.passages&&t.passages[T];const J=e.sections[""];if(!B&&J&&J.passages&&(B=J.passages[T]),!B)throw`No passage named ${T} in the current section or master section`;he.setSeen(T);const Q=[],ye=[];if(J&&J.passages){const de=J.passages[""];de&&(Q.push(de),ye.push(()=>S(de,"[[]][]")))}const Pe=t.passages&&t.passages[""];Pe&&(Q.push(Pe),ye.push(()=>S(Pe,`[[${se("_section")}]][]`))),Q.push(B),ye.push(()=>S(B,`[[${se("_section")}]][${T}]`));const Ee="@"+se("_turncount");if(t.passages){if(Ee in t.passages){const de=t.passages[Ee];Q.push(de),ye.push(()=>S(de,`[[${se("_section")}]][${Ee}]`))}if("@last"in t.passages&&se("_turncount")>=(t.passageCount||0)){const de=t.passages["@last"];Q.push(de),ye.push(()=>S(de,`[[${se("_section")}]][${Ee}]`))}}Q.some(de=>de.clear)&&(M(),E()),r=document.createElement("div"),r.classList.add("squiffy-output-passage"),r.setAttribute("data-passage",`${T}`),n.appendChild(r);for(const de of ye)await de();mr(n),Ae(),C();const je=te();je!=A&&l.emit("canGoBackChanged",{canGoBack:je})}async function k(T){for(const A of T)m(A)}function x(){he.reset(),j.scroll==="element"||j.scroll==="none"?(V.innerHTML="",a()):location.reload()}function C(){Y("_output",V.innerHTML)}function O(){const T=()=>{e.uiJsIndex!==void 0&&_(e.uiJsIndex,{registerAnimation:qe.registerAnimation.bind(qe)})};he.load();const A=se("_output");return A?(V.innerHTML=A,z(),R(),o=V.querySelector(".squiffy-output-block:last-child"),t=e.sections[se("_section")],T(),ge.onLoad(),mr(n),!0):(T(),!1)}function P(){o=document.createElement("div"),o.classList.add("squiffy-output-block"),(r||n)?.appendChild(o)}function w(T){n&&(n.querySelectorAll("input").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&Y(B,A.value),A.disabled=!0}),n.querySelectorAll("[contenteditable]").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&Y(B,A.innerHTML),A.contentEditable="false"}),n.querySelectorAll("textarea").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&Y(B,A.value),A.disabled=!0}),n.querySelectorAll("select").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&Y(B,A.value),A.disabled=!0})),r=null,E(T),P()}function E(T){n=document.createElement("div"),n.classList.add("squiffy-output-section"),n.setAttribute("data-section",T??se("_section")),T||n.setAttribute("data-clear","true"),V.appendChild(n)}function L(){return V.querySelector(".squiffy-clear-stack")}function M(){let T=L();T||(T=document.createElement("div"),T.classList.add("squiffy-clear-stack"),T.style.display="none",V.prepend(T));const A=document.createElement("div");T.appendChild(A);for(const B of[...V.children])B!==T&&A.appendChild(B)}function q(){const T=L();for(const B of[...V.children])B!==T&&B.remove();const A=T.children[T.children.length-1];for(const B of[...A.children])V.appendChild(B);A.remove()}const $={write:(T,A)=>{i=V.scrollHeight;const B=$.processText(T,!1).trim();o||P();const J=document.createElement("div");A&&J.setAttribute("data-source",A),J.innerHTML=B,ge.onWrite(J),o.appendChild(J),mr(n),$.scrollToEnd()},clearScreen:()=>{M(),E()},scrollToEnd:()=>{if(j.scroll!=="none")if(j.scroll==="element")V.lastElementChild.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let T=i;const A=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>A){const B=document.documentElement.scrollHeight-window.innerHeight;T>B&&(T=B),window.scrollTo({top:T,behavior:"smooth"})}}},processText:(T,A)=>Te.process(T,A)};function U(T){if(T.start!=e.start){e=T,he.reset(),V.innerHTML="",v(e.start);return}il(e,T,V,$,u,A=>k(A)),e=T,z(),R()}function z(){const T=V.querySelectorAll(".squiffy-output-section:last-child");n=T[T.length-1];const A=n.getAttribute("data-section");t=e.sections[A]}function R(){r=n.querySelector(".squiffy-output-passage:last-child")}function ae(){const T=L(),A=V.querySelectorAll(".squiffy-output-section").length+V.querySelectorAll(".squiffy-output-passage").length;return T?A+T.children.length:A}function te(){return ae()>1}function xe(){if(!te())return;const T=L();if(r){const A=r.getAttribute("data-passage");we(r.getAttribute("data-undo")),r.remove();let B=!1,J=!1;for(const Q of V.children)if(Q!==T){if(Q.getAttribute("data-clear")=="true"&&Q.children.length==0){B=!0;continue}J=!0;break}B&&!J&&(q(),z());for(const Q of n.querySelectorAll("a.squiffy-link[data-passage]"))Q.getAttribute("data-passage")==A&&h(Q);R()}else{we(n.getAttribute("data-undo")),n.remove();let A=!1;for(const B of[...V.children])if(B!==T){A=!0;break}A||q(),z(),R()}te()||l.emit("canGoBackChanged",{canGoBack:!1})}const ve=s.element,V=document.createElement("div");ve.appendChild(V),e=s.story;const j={scroll:s.scroll||"body",persist:s.persist===void 0?!0:s.persist,onSet:s.onSet||(()=>{})};let re="";j.persist&&(s.storyId!==void 0?re=s.storyId:window.location.protocol==="file:"?re=e.id||"":re=window.location.pathname,re||(console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."),j.persist=!1)),j.scroll==="element"&&(V.style.overflowY="auto"),V.addEventListener("click",g),V.addEventListener("keypress",async function(T){T.key==="Enter"&&await g(T)});let ue={};const ct=function(T,A){T!="_output"&&(T in ue||(ue[T]=A))},Ae=function(){(r??n).setAttribute("data-undo",JSON.stringify(ue)),ue={}},we=function(T){if(!T)return;const A=JSON.parse(T);if(A)for(const B of Object.keys(A))he.setInternal(B,A[B],!1)},he=new nl(j.persist,re,j.onSet,l,ct),se=he.get.bind(he),Y=he.set.bind(he),Te=new sl(e,he,()=>t),Ue=new pl,Ce=T=>T in e.sections&&e.sections[T].text||null,Re=T=>t.passages&&T in t.passages?t.passages[T].text||null:"passages"in e.sections[""]&&e.sections[""].passages&&T in e.sections[""].passages&&e.sections[""].passages[T].text||null,St=T=>{c.push(T)},qe=new Lc,ge=new ol(V,Te,he,Ue,Ce,Re,$.processText,St,qe,l);return ge.add(rs.ReplaceLabel()),ge.add(rs.RotateSequencePlugin()),ge.add(rs.RandomPlugin()),ge.add(rs.LivePlugin()),ge.add(rs.AnimatePlugin()),{begin:a,restart:x,get:se,set:Y,clickLink:f,update:U,goBack:xe,on:(T,A)=>l.on(T,A),off:(T,A)=>l.off(T,A),once:(T,A)=>l.once(T,A)}};return ut.init=Oc,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}),ut})({});
131
+ `,z.appendChild(R);let xe=L-se+(t?1:0);z.style[t?"left":"top"]=`${xe}px`,(E?o:i).appendChild(z)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Nt(e.element,"position")==="static"&&(this.debugStyles=Tt(e.element,{position:"relative "}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,l=t;for(o&&(i=o.currentTime,o.seek(0,!0)),l.parentElement;l&&l!==n.element&&l!==H.body;){const L=Nt(l,"position")==="sticky"?Tt(l,{position:"static"}):!1;l=l.parentElement,L&&(e||(e=[]),e.push(L))}const c=t.getBoundingClientRect(),p=r?c.left+n.scrollX-n.left:c.top+n.scrollY-n.top,f=r?c.width:c.height,g=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-g,a=this.enter,d=this.leave;let m="start",v="end",_="end",S="start";if(ze(a)){const L=a.split(" ");_=L[0],m=L.length>1?L[1]:m}else if(be(a)){const L=a;I(L.container)||(_=L.container),I(L.target)||(m=L.target)}else Xe(a)&&(_=a);if(ze(d)){const L=d.split(" ");S=L[0],v=L.length>1?L[1]:v}else if(be(d)){const L=d;I(L.container)||(S=L.container),I(L.target)||(v=L.target)}else Xe(d)&&(S=d);const y=ur(t,m,f),b=ur(t,v,f),k=y+p-g,x=b+p-h,C=ur(t,_,g,k,x),O=ur(t,S,g,k,x),P=y+p-C,w=b+p-O,E=w-P;this.offset=p,this.offsetStart=P,this.offsetEnd=w,this.distance=E<=0?0:E,this.thresholds=[m,v,_,S],this.coords=[y,b,C,O],e&&e.forEach(L=>L.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,l=this.container,c=this.scroll,p=c<=this.offsetStart,f=c>=this.offsetEnd,g=!p&&!f,u=c===this.offsetStart||c===this.offsetEnd,h=!this.hasEntered&&u,a=this._debug&&this.$debug;let d=!1,m=!1,v=this.progress;if(p&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),o){const _=e.progress;if(r&&Xe(r)){if(r<1){const y=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=N(Co(_,v,gt(.01,.2,r),!1)+y,6)}}else n&&(v=n(v));d=v!==this.prevProgress,m=_===1,d&&!m&&r&&_&&l.wakeTicker.restart()}if(a){const _=i?l.scrollY:l.scrollX;a.style[i?"top":"left"]=_+10+"px"}(g&&!this.isInView||h&&!this.forceEnter&&!this.hasEntered)&&(g&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(a&&g&&(a.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,h&&(this.forceEnter=!0)):g&&(this.forceEnter=!1)),(g||!g&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*v),this.onUpdate(this)),!g&&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)),t&&!r&&(m=!0)),v>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return mt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const kc=(s={})=>new No(s),hr=typeof Intl<"u"&&Intl.Segmenter,xc=/\{value\}/g,wc=/\{i\}/g,Tc=/(\s+)/,Cc=/^\s+$/,gn="line",ms="word",vs="char",ys="data-line";let mn=null,vn=null,pr=null;const Bo=s=>s.isWordLike||s.segment===" "||Xe(+s.segment),yn=s=>s.setAttribute("aria-hidden","true"),fr=(s,e)=>[...s.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Pc={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Do=s=>{if(!s.childElementCount&&!s.textContent.trim()){const e=s.parentElement;s.remove(),e&&Do(e)}},qo=(s,e,t)=>{const n=s.getAttribute(ys);(n!==null&&+n!==e||s.tagName==="BR")&&t.add(s);let r=s.childElementCount;for(;r--;)qo(s.children[r],e,t);return t},_n=(s,e={})=>{let t="";const n=ze(e.class)?` class="${e.class}"`:"",r=D(e.clone,!1),o=D(e.wrap,!1),i=o?o===!0?"clip":o:r?"clip":!1;if(o&&(t+=`<span${i?` style="overflow:${i};"`:""}>`),t+=`<span${n}${r?' style="position:relative;"':""} data-${s}="{i}">`,r){const l=r==="left"?"-100%":r==="right"?"100%":"0",c=r==="top"?"-100%":r==="bottom"?"100%":"0";t+="<span>{value}</span>",t+=`<span inert style="position:absolute;top:${c};left:${l};white-space:nowrap;">{value}</span>`}else t+="{value}";return t+="</span>",o&&(t+="</span>"),t},bn=(s,e,t,n,r,o,i,l,c)=>{const p=r===gn,f=r===vs,g=`_${r}_`,u=fe(s)?s(t):s,h=p?"block":"inline-block";pr.innerHTML=u.replace(xc,`<i class="${g}"></i>`).replace(wc,`${f?c:p?i:l}`);const a=pr.content,d=a.firstElementChild,m=a.querySelector(`[data-${r}]`)||d,v=a.querySelectorAll(`i.${g}`),_=v.length;if(_){d.style.display=h,m.style.display=h,m.setAttribute(ys,`${i}`),p||(m.setAttribute("data-word",`${l}`),f&&m.setAttribute("data-char",`${c}`));let S=_;for(;S--;){const y=v[S],b=y.parentElement;b.style.display=h,p?b.innerHTML=t.innerHTML:b.replaceChild(t.cloneNode(!0),y)}e.push(m),n.appendChild(a)}else console.warn('The expression "{value}" is missing from the provided template.');return o&&(d.style.outline=`1px dotted ${Pc[r]}`),d};class Ho{constructor(e,t={}){mn||(mn=hr?new hr([],{granularity:ms}):{segment:a=>{const d=[],m=a.split(Tc);for(let v=0,_=m.length;v<_;v++){const S=m[v];d.push({segment:S,isWordLike:!Cc.test(S)})}return d}}),vn||(vn=hr?new hr([],{granularity:"grapheme"}):{segment:a=>[...a].map(d=>({segment:d}))}),!pr&&ot&&(pr=H.createElement("template")),me.current&&me.current.register(this);const{words:n,chars:r,lines:o,accessible:i,includeSpaces:l,debug:c}=t,p=(e=Le(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],f=o===!0?{}:o,g=n===!0||I(n)?{}:n,u=r===!0?{}:r;this.debug=D(c,!1),this.includeSpaces=D(l,!1),this.accessible=D(i,!0),this.linesOnly=f&&!g&&!u,this.lineTemplate=be(f)?_n(gn,f):f,this.wordTemplate=be(g)||this.linesOnly?_n(ms,g):g,this.charTemplate=be(u)?_n(vs,u):u,this.$target=p,this.html=p&&p.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const h=()=>this.html&&(f||g||u)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const a=p.offsetWidth;a!==this.width&&(this.width=a,h())},150)}),this.lineTemplate&&!this.ready?H.fonts.ready.then(h):h(),p?this.resizeObserver.observe(p):console.warn("No Text Splitter target found.")}addEffect(e){if(!fe(e))return console.warn("Effect must return a function.");const t=Yr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>fe(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,n=this.charTemplate,r=this.includeSpaces,o=this.debug,i=e.nodeType;if(i===3){const l=e.nodeValue;if(l.trim()){const c=[],p=this.words,f=this.chars,g=mn.segment(l),u=H.createDocumentFragment();let h=null;for(const a of g){const d=a.segment,m=Bo(a);if(!h||m&&h&&Bo(h))c.push(d);else{const v=c.length-1;!c[v].includes(" ")&&!d.includes(" ")?c[v]+=d:c.push(d)}h=a}for(let a=0,d=c.length;a<d;a++){const m=c[a];if(m.trim()){const v=c[a+1],_=r&&v&&!v.trim(),S=m,y=n?vn.segment(S):null,b=n?H.createDocumentFragment():H.createTextNode(_?m+" ":m);if(n){const k=[...y];for(let x=0,C=k.length;x<C;x++){const O=k[x],w=x===C-1&&_?O.segment+" ":O.segment,E=H.createTextNode(w);bn(n,f,E,b,vs,o,-1,p.length,f.length)}}t?bn(t,p,b,u,ms,o,-1,p.length,f.length):n?u.appendChild(b):u.appendChild(H.createTextNode(m)),_&&a++}else{if(a&&r)continue;u.appendChild(H.createTextNode(m))}}e.parentNode.replaceChild(u,e)}}else if(i===1){const l=[...e.childNodes];for(let c=0,p=l.length;c<p;c++)this.splitNode(l[c])}}split(e=!1){const t=this.$target,n=!!this.cache&&!e,r=this.lineTemplate,o=this.wordTemplate,i=this.charTemplate,l=H.fonts.status!=="loading",c=r&&l;this.ready=!r||l,(c||e)&&this.effectsCleanups.forEach(u=>fe(u)&&u(this)),n||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(n&&(t.innerHTML=this.cache),this.lines.length=0,o&&(this.words=fr(t,ms))),i&&(c||o)&&(this.chars=fr(t,vs));const p=this.words.length?this.words:this.chars;let f,g=0;for(let u=0,h=p.length;u<h;u++){const a=p[u],{top:d,height:m}=a.getBoundingClientRect();f&&d-f>m*.5&&g++,a.setAttribute(ys,`${g}`);const v=a.querySelectorAll(`[${ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(ys,`${g}`);f=d}if(c){const u=H.createDocumentFragment(),h=new Set,a=[];for(let d=0;d<g+1;d++){const m=t.cloneNode(!0);qo(m,d,new Set).forEach(v=>{const _=v.parentElement;_&&h.add(_),v.remove()}),a.push(m)}h.forEach(Do);for(let d=0,m=a.length;d<m;d++)bn(r,this.lines,a[d],u,gn,this.debug,d);t.innerHTML="",t.appendChild(u),o&&(this.words=fr(t,ms)),i&&(this.chars=fr(t,vs))}if(this.linesOnly){const u=this.words;let h=u.length;for(;h--;){const a=u[h];a.replaceWith(a.textContent)}u.length=0}if(this.accessible&&(c||!n)){const u=H.createElement("span");u.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",u.innerHTML=this.html,t.insertBefore(u,t.firstChild),this.lines.forEach(yn),this.words.forEach(yn),this.chars.forEach(yn)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((u,h)=>this.effectsCleanups[h]=u(this)),this}refresh(){this.split(!0)}}const dr={split:(s,e)=>new Ho(s,e)},gr=(s,e={})=>{let t=[],n=0;const r=e.from,o=e.reversed,i=e.ease,l=!I(i),p=l&&!I(i.ease)?i.ease:l?It(i):null,f=e.grid,g=e.axis,u=e.total,h=I(r)||r===0||r==="first",a=r==="center",d=r==="last",m=r==="random",v=Le(s),_=e.use,S=Lt(v?s[0]:s),y=v?Lt(s[1]):0,b=Gi.exec((v?s[1]:s)+dt),k=e.start||0+(v?S:0);let x=h?0:Xe(r)?r:0;return(C,O,P,w)=>{const[E]=cs(C),L=I(u)?P:u,M=I(_)?!1:fe(_)?_(E,O,L):Ot(E,_),q=Xe(M)||ze(M)&&Xe(+M)?+M:O;if(a&&(x=(L-1)/2),d&&(x=L-1),!t.length){for(let R=0;R<L;R++){if(!f)t.push(at(x-R));else{const ae=a?(f[0]-1)/2:x%f[0],se=a?(f[1]-1)/2:as(x/f[0]),xe=R%f[0],ve=as(R/f[0]),V=ae-xe,ee=se-ve;let re=xt(V*V+ee*ee);g==="x"&&(re=-V),g==="y"&&(re=-ee),t.push(re)}n=Wr(...t)}p&&(t=t.map(R=>p(R/n)*n)),o&&(t=t.map(R=>g?R<0?R*-1:-R:at(n-R))),m&&(t=so(t))}const $=v?(y-S)/n:S;let z=(w?ds(w,I(e.start)?w.iterationDuration:k):k)+($*N(t[q],2)||0);return e.modifier&&(z=e.modifier(z)),b&&(z=`${z}${b[2]}`),z}},Ec=Object.freeze(Object.defineProperty({__proto__:null,Animatable:fn,Draggable:Ro,JSAnimation:_t,Scope:Oo,ScrollObserver:No,Spring:Ao,TextSplitter:Ho,Timeline:Lo,Timer:Je,WAAPIAnimation:xo,animate:hs,createAnimatable:fc,createDraggable:mc,createScope:vc,createSpring:dn,createTimeline:pc,createTimer:zl,eases:Gt,engine:Se,onScroll:kc,scrollContainers:cr,stagger:gr,svg:Nl,text:dr,utils:Eo,waapi:ec},Symbol.toStringTag,{value:"Module"}));class Lc{constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation("typewriter",function(e,t,n,r){const{chars:o}=dr.split(e,{words:!1,chars:!0}),i=t.fadeDuration||100,l=t.interval||100;hs(o,{opacity:[0,1],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,n,r){const{words:o}=dr.split(e,{words:!0,chars:!1}),i=t.fadeDuration||100,l=t.interval||200;hs(o,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,n,r){const o=t.duration||500;hs(e,{opacity:[0,1],easing:t.easing||"easeOutQuad",duration:o,delay:t.start||0,loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("continue",function(e,t,n){e.classList.add("squiffy-continue");const r=t.style||"pulse";let o=null,i=null;r==="wave"?(e.classList.add("squiffy-continue-wave"),i=dr.split(e,{words:!1,chars:!0}).chars,o=hs(i,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:gr(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const l=()=>{if(e.classList.remove("squiffy-continue","squiffy-continue-wave",`squiffy-continue-${r}`),e.removeEventListener("click",l),o&&(o.pause(),i))for(const c of i)c.style.opacity="1";n()};e.addEventListener("click",l)})}registerAnimation(e,t,n={}){this.animations[e]={handler:t,options:n}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,n,r,o){const i=this.animations[e];i?i.handler(t,n,r,o):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}}const Ac={animejs:Ec},Fo="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Rc="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function $o(s){if(!s)return!0;const e=s.querySelectorAll(Fo);for(const t of e)if(!t.checkValidity())return!1;return!0}function Sn(s){if(!s)return;const e=$o(s),t=s.querySelectorAll(Rc);for(const n of t)e?(n.classList.remove("validation-disabled"),n.removeAttribute("aria-disabled")):(n.classList.add("validation-disabled"),n.setAttribute("aria-disabled","true"))}function mr(s){if(!s)return;const e=s.querySelectorAll(Fo);for(const t of e)t.addEventListener("input",()=>Sn(s)),t.addEventListener("change",()=>Sn(s)),t.addEventListener("invalid",n=>{n.preventDefault(),t.classList.add("squiffy-invalid")}),t.addEventListener("input",()=>{t.checkValidity()&&t.classList.remove("squiffy-invalid")});Sn(s)}const Oc=async s=>{let e,t,n,r,o,i=0;const l=new rl,c=[];let p=!1;async function f(T){if(p||T.closest(".squiffy-output-section")!==n||T.classList.contains("disabled")||!$o(n))return!1;const B=T.getAttribute("data-passage"),Q=T.getAttribute("data-section");if(B!==null)return u(T),J("_turncount",j("_turncount")+1),await d(T),B&&(o=null,await b(B)),l.emit("linkClick",{linkType:"passage"}),!0;if(Q!==null)return await d(T),Q&&await v(Q),l.emit("linkClick",{linkType:"section"}),!0;const[X,ye,Pe]=Ue.handleLink(T);return X?(Pe?.disableLink&&u(T),C(),l.emit("linkClick",{linkType:ye}),!0):!1}async function g(T){const A=T.target;A.classList.contains("squiffy-link")&&await f(A)}function u(T){T.classList.add("disabled"),T.setAttribute("tabindex","-1")}function h(T){T.classList.remove("disabled"),T.removeAttribute("tabindex")}async function a(){O()||await v(e.start)}async function d(T){qe.runLinkAnimation(T),await y();const A=T.getAttribute("data-set");if(A){const B=JSON.parse(A);for(const Q of B)m(Q)}}function m(T){T=T.replace(/^(\w*\s*):=(.*)$/,(Q,X,ye)=>X+"="+$.processText(ye,!0));const B=/^([\w]*)\s*=\s*(.*)$/.exec(T);if(B){const Q=B[1];let X=B[2];X==="true"?J(Q,!0):X==="false"?J(Q,!1):isNaN(X)?(X.startsWith("@")&&(X=j(X.substring(1))),J(Q,X)):J(Q,parseFloat(X))}else{const X=/^([\w]*)\s*([+\-*/])=\s*(.*)$/.exec(T);if(X){const ye=X[1],Pe=X[2];let Ee=X[3];Ee.startsWith("@")&&(Ee=j(Ee.substring(1)));const je=parseFloat(Ee);let de=j(ye);de===null&&(de=0),Pe=="+"&&(de+=je),Pe=="-"&&(de-=je),Pe=="*"&&(de*=je),Pe=="/"&&(de/=je),J(ye,de)}else{let ye=!0;T.startsWith("not ")&&(T=T.substring(4),ye=!1),J(T,ye)}}}async function v(T){const A=se();if(t=e.sections[T],!t)return;J("_section",T),he.setSeen(T);const B=e.sections[""];(B?.clear||t.clear)&&M(),w(T);const Q=n;if(B&&(await S(B,"[[]]"),j("_section")!==T)){Q.remove();return}if(await S(t,`[[${T}]]`),j("_section")!==T){Q.remove();return}mr(n),J("_turncount",0),Ae(),C();const X=se();X!=A&&l.emit("canGoBackChanged",{canGoBack:X})}function _(T,A=null){const B={get:j,set:J,ui:{transition:St,write:$.write,scrollToEnd:$.scrollToEnd},story:{go:v},element:ve,import:Ac,...A};e.js[T](B,j,J)}async function S(T,A){if(T.attributes&&await k(T.attributes),T.jsIndex!==void 0){const B=j("_section");if(_(T.jsIndex),j("_section")!==B)return}$.write(T.text||"",A),await y()}async function y(){p=!0,n.classList.add("links-disabled");for(const T of c)await T();c.length=0,p=!1,n.classList.remove("links-disabled")}async function b(T){const A=se();let B=t.passages&&t.passages[T];const Q=e.sections[""];if(!B&&Q&&Q.passages&&(B=Q.passages[T]),!B)throw`No passage named ${T} in the current section or master section`;he.setSeen(T);const X=[],ye=[];if(Q&&Q.passages){const de=Q.passages[""];de&&(X.push(de),ye.push(()=>S(de,"[[]][]")))}const Pe=t.passages&&t.passages[""];Pe&&(X.push(Pe),ye.push(()=>S(Pe,`[[${j("_section")}]][]`))),X.push(B),ye.push(()=>S(B,`[[${j("_section")}]][${T}]`));const Ee="@"+j("_turncount");if(t.passages){if(Ee in t.passages){const de=t.passages[Ee];X.push(de),ye.push(()=>S(de,`[[${j("_section")}]][${Ee}]`))}if("@last"in t.passages&&j("_turncount")>=(t.passageCount||0)){const de=t.passages["@last"];X.push(de),ye.push(()=>S(de,`[[${j("_section")}]][${Ee}]`))}}X.some(de=>de.clear)&&(M(),E()),r=document.createElement("div"),r.classList.add("squiffy-output-passage"),r.setAttribute("data-passage",`${T}`),n.appendChild(r);for(const de of ye)await de();mr(n),Ae(),C();const je=se();je!=A&&l.emit("canGoBackChanged",{canGoBack:je})}async function k(T){for(const A of T)m(A)}function x(){he.reset(),ee.scroll==="element"||ee.scroll==="none"?(V.innerHTML="",a()):location.reload()}function C(){J("_output",V.innerHTML)}function O(){const T=()=>{e.uiJsIndex!==void 0&&_(e.uiJsIndex,{registerAnimation:qe.registerAnimation.bind(qe)})};he.load();const A=j("_output");return A?(V.innerHTML=A,z(),R(),o=V.querySelector(".squiffy-output-block:last-child"),t=e.sections[j("_section")],T(),ge.onLoad(),mr(n),!0):(T(),!1)}function P(){o=document.createElement("div"),o.classList.add("squiffy-output-block"),(r||n)?.appendChild(o)}function w(T){n&&(n.querySelectorAll("input").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll("[contenteditable]").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.innerHTML),A.contentEditable="false"}),n.querySelectorAll("textarea").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll("select").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0})),r=null,E(T),P()}function E(T){n=document.createElement("div"),n.classList.add("squiffy-output-section"),n.setAttribute("data-section",T??j("_section")),T||n.setAttribute("data-clear","true"),V.appendChild(n)}function L(){return V.querySelector(".squiffy-clear-stack")}function M(){let T=L();T||(T=document.createElement("div"),T.classList.add("squiffy-clear-stack"),T.style.display="none",V.prepend(T));const A=document.createElement("div");T.appendChild(A);for(const B of[...V.children])B!==T&&A.appendChild(B)}function q(){const T=L();for(const B of[...V.children])B!==T&&B.remove();const A=T.children[T.children.length-1];for(const B of[...A.children])V.appendChild(B);A.remove()}const $={write:(T,A)=>{i=V.scrollHeight;const B=$.processText(T,!1).trim();o||P();const Q=document.createElement("div");A&&Q.setAttribute("data-source",A),Q.innerHTML=B,ge.onWrite(Q),o.appendChild(Q),mr(n),$.scrollToEnd()},clearScreen:()=>{M(),E()},scrollToEnd:()=>{if(ee.scroll!=="none")if(ee.scroll==="element")V.lastElementChild.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let T=i;const A=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>A){const B=document.documentElement.scrollHeight-window.innerHeight;T>B&&(T=B),window.scrollTo({top:T,behavior:"smooth"})}}},processText:(T,A)=>Te.process(T,A)};function U(T){if(T.start!=e.start){e=T,he.reset(),V.innerHTML="",v(e.start);return}il(e,T,V,$,u,A=>k(A)),e=T,z(),R()}function z(){const T=V.querySelectorAll(".squiffy-output-section:last-child");n=T[T.length-1];const A=n.getAttribute("data-section");t=e.sections[A]}function R(){r=n.querySelector(".squiffy-output-passage:last-child")}function ae(){const T=L(),A=V.querySelectorAll(".squiffy-output-section").length+V.querySelectorAll(".squiffy-output-passage").length;return T?A+T.children.length:A}function se(){return ae()>1}function xe(){if(!se())return;const T=L();if(r){const A=r.getAttribute("data-passage");we(r.getAttribute("data-undo")),r.remove();let B=!1,Q=!1;for(const X of V.children)if(X!==T){if(X.getAttribute("data-clear")=="true"&&X.children.length==0){B=!0;continue}Q=!0;break}B&&!Q&&(q(),z());for(const X of n.querySelectorAll("a.squiffy-link[data-passage]"))X.getAttribute("data-passage")==A&&h(X);R()}else{we(n.getAttribute("data-undo")),n.remove();let A=!1;for(const B of[...V.children])if(B!==T){A=!0;break}A||q(),z(),R()}se()||l.emit("canGoBackChanged",{canGoBack:!1})}const ve=s.element,V=document.createElement("div");ve.appendChild(V),e=s.story;const ee={scroll:s.scroll||"body",persist:s.persist===void 0?!0:s.persist,onSet:s.onSet||(()=>{})};let re="";ee.persist&&(s.storyId!==void 0?re=s.storyId:window.location.protocol==="file:"?re=e.id||"":re=window.location.pathname,re||(console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."),ee.persist=!1)),ee.scroll==="element"&&(V.style.overflowY="auto"),V.addEventListener("click",g),V.addEventListener("keypress",async function(T){T.key==="Enter"&&await g(T)});let ue={};const ct=function(T,A){T!="_output"&&(T in ue||(ue[T]=A))},Ae=function(){(r??n).setAttribute("data-undo",JSON.stringify(ue)),ue={}},we=function(T){if(!T)return;const A=JSON.parse(T);if(A)for(const B of Object.keys(A))he.setInternal(B,A[B],!1)},he=new nl(ee.persist,re,ee.onSet,l,ct),j=he.get.bind(he),J=he.set.bind(he),Te=new sl(e,he,()=>t),Ue=new pl,Ce=T=>T in e.sections&&e.sections[T].text||null,Re=T=>t.passages&&T in t.passages?t.passages[T].text||null:"passages"in e.sections[""]&&e.sections[""].passages&&T in e.sections[""].passages&&e.sections[""].passages[T].text||null,St=T=>{c.push(T)},qe=new Lc,ge=new ol(V,Te,he,Ue,Ce,Re,$.processText,St,qe,l);return ge.add(rs.ReplaceLabel()),ge.add(rs.RotateSequencePlugin()),ge.add(rs.RandomPlugin()),ge.add(rs.LivePlugin()),ge.add(rs.AnimatePlugin()),{begin:a,restart:x,get:j,set:J,clickLink:f,update:U,goBack:xe,on:(T,A)=>l.on(T,A),off:(T,A)=>l.off(T,A),once:(T,A)=>l.once(T,A)}};return ut.init=Oc,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}),ut})({});
132
132
  //# sourceMappingURL=squiffy.runtime.global.js.map