-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathapp.js
2 lines (2 loc) · 73.5 KB
/
app.js
1
2
/*! For license information please see app.js.LICENSE.txt */
(()=>{"use strict";const t=t=>"function"==typeof t,e=(e,i,r)=>t(i)?i.call(e):t(r)?r.call(e):r,i=(t=null)=>{const i={_state:null,_props:null,_setProps:null,_hasToRender:!1,_container:null,get hasToRender(){return this._hasToRender},set hasToRender(t){t!==this._hasToRender&&(this._hasToRender=t,t&&requestAnimationFrame(this.startRendering.bind(this)))},get state(){return null==this._state&&(this._state=e(this,this.initialState,{})),this._state},set state(t){let i=Object.assign({},this.state,t);this._state=i,this.hasToRender=!0,Object.keys(t).forEach((t=>e(this,"onState"+t.substr(0,1).toUpperCase()+t.substr(1))))},get props(){return null==this._props&&(this._props=e(this,this.defaultProps,{})),null!=this._setProps&&(this._props=Object.assign({},this._props,this._setProps)),this._props},set props(t){let e=Object.assign({},this.props,t);this._props=e,this.hasToRender=!0},get container(){return this._container},appendTo(t){return"string"==typeof t&&(t=document.querySelector(t)),this._container=t,e(this,this.init),this},startRendering(){this.hasToRender&&(e(this,this.render),this.hasToRender=!1)}};return i._setProps=t,i};function r(t,e,i=!1){let r=document.createElement("canvas"),n=1;return i&&(n=window.devicePixelRatio,r.style.width=`${t}px`,r.style.height=`${e}px`),r.width=t*n,r.height=e*n,r}const n=(t,e)=>t+e,s=(t,e)=>t-e,a=(t,e)=>t*e;function o(t,e,i){if(typeof e==typeof i){if("number"==typeof e)return t(e,i);if("object"==typeof e)return function(t,e,i){let[r,n]=[Object.keys(e),Object.keys(i)];return Object.assign({},...r.map((r=>{let n={};return n[r]=t(e[r],i[r]),n})))}(t,e,i)}else if("object"==typeof e)return function(t,e,i){return Object.assign({},...Object.keys(e).map((r=>{let n={};return n[r]=t(e[r],i),n})))}(t,e,i)}function h(t,e){return o(s,t,e)}function u(t,e=null,i=null){return null==e?(e=0,i=1):null==i&&(i=e,e=0),Math.min(i,Math.max(e,t))}function l(t,e,i,r=null){return null==r&&(r=t=>t),e+(t=r(t))*(i-e)}const f=t=>-1*t*(t-2),p=t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2);function c(t,e){let i=t.getPointAtLength(e);return{x:i.x,y:i.y}}function d(t){return t.getTotalLength()}function _(t,e){return Array.isArray(t)?t[Math.round(u(e)*(t.length-1))]:c(t,e*d(t))}function m(t,e,i=10,r=5){return function n(s,a){let o=(a-s)/(i-1),u=Array.from(Array(i)).map(((i,r)=>{let n=s+o*r,a=c(t,n);return{length:n,point:a,distance:function(t,e){let i=h(t,e);return Math.sqrt(i.x*i.x+i.y*i.y)}(e,a)}})).sort(((t,e)=>t.distance-e.distance)).map((t=>t.length)).slice(0,2);return--r?n(...u.sort(((t,e)=>t-e))):u[0]}(0,d(t))}function g(t,e,i=!1){let r=d(t);i&&(e=r/e);let n=r/e;return Array.from(Array(Math.floor(e))).map(((e,i)=>c(t,i*n)))}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var x,b,w,T,S,M,C,A,P,B,O,k,z,D,R,F,E,L,I,q,W,j,Y,N,V,U,X,G,H={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Z={duration:.5,overwrite:!1,delay:0},$=1e8,Q=1e-8,J=2*Math.PI,K=J/4,tt=0,et=Math.sqrt,it=Math.cos,rt=Math.sin,nt=function(t){return"string"==typeof t},st=function(t){return"function"==typeof t},at=function(t){return"number"==typeof t},ot=function(t){return void 0===t},ht=function(t){return"object"==typeof t},ut=function(t){return!1!==t},lt=function(){return"undefined"!=typeof window},ft=function(t){return st(t)||nt(t)},pt="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},ct=Array.isArray,dt=/(?:-?\.?\d|\.)+/gi,_t=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,mt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,gt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,vt=/[+-]=-?[.\d]+/,yt=/[#\-+.]*\b[a-z\d-=+%.]+/gi,xt=/[\d.+\-=]+(?:e[-+]\d*)*/i,bt={},wt={},Tt=function(t){return(wt=Zt(t,bt))&&Di},St=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Mt=function(t,e){return!e&&console.warn(t)},Ct=function(t,e){return t&&(bt[t]=e)&&wt&&(wt[t]=e)||bt},At=function(){return 0},Pt={},Bt=[],Ot={},kt={},zt={},Dt=30,Rt=[],Ft="",Et=function(t){var e,i,r=t[0];if(ht(r)||st(r)||(t=[t]),!(e=(r._gsap||{}).harness)){for(i=Rt.length;i--&&!Rt[i].targetTest(r););e=Rt[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new ni(t[i],e)))||t.splice(i,1);return t},Lt=function(t){return t._gsap||Et(Te(t))[0]._gsap},It=function(t,e,i){return(i=t[e])&&st(i)?t[e]():ot(i)&&t.getAttribute&&t.getAttribute(e)||i},qt=function(t,e){return(t=t.split(",")).forEach(e)||t},Wt=function(t){return Math.round(1e5*t)/1e5||0},jt=function(t,e){for(var i=e.length,r=0;t.indexOf(e[r])<0&&++r<i;);return r<i},Yt=function(t,e,i){var r,n=at(t[1]),s=(n?2:1)+(e<2?0:1),a=t[s];if(n&&(a.duration=t[1]),a.parent=i,e){for(r=a;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=ut(i.vars.inherit)&&i.parent;a.immediateRender=ut(r.immediateRender),e<2?a.runBackwards=1:a.startAt=t[s-1]}return a},Nt=function(){var t,e,i=Bt.length,r=Bt.slice(0);for(Ot={},Bt.length=0,t=0;t<i;t++)(e=r[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Vt=function(t,e,i,r){Bt.length&&Nt(),t.render(e,i,r),Bt.length&&Nt()},Ut=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(yt).length<2?e:nt(t)?t.trim():t},Xt=function(t){return t},Gt=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},Ht=function(t,e){for(var i in e)i in t||"duration"===i||"ease"===i||(t[i]=e[i])},Zt=function(t,e){for(var i in e)t[i]=e[i];return t},$t=function t(e,i){for(var r in i)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(e[r]=ht(i[r])?t(e[r]||(e[r]={}),i[r]):i[r]);return e},Qt=function(t,e){var i,r={};for(i in t)i in e||(r[i]=t[i]);return r},Jt=function(t){var e=t.parent||b,i=t.keyframes?Ht:Gt;if(ut(t.inherit))for(;e;)i(t,e.vars.defaults),e=e.parent||e._dp;return t},Kt=function(t,e,i,r){void 0===i&&(i="_first"),void 0===r&&(r="_last");var n=e._prev,s=e._next;n?n._next=s:t[i]===e&&(t[i]=s),s?s._prev=n:t[r]===e&&(t[r]=n),e._next=e._prev=e.parent=null},te=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove(t),t._act=0},ee=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},ie=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},re=function t(e){return!e||e._ts&&t(e.parent)},ne=function(t){return t._repeat?se(t._tTime,t=t.duration()+t._rDelay)*t:0},se=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},ae=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},oe=function(t){return t._end=Wt(t._start+(t._tDur/Math.abs(t._ts||t._rts||Q)||0))},he=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Wt(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),oe(t),i._dirty||ee(i,t)),t},ue=function(t,e){var i;if((e._time||e._initted&&!e._dur)&&(i=ae(t.rawTime(),e),(!e._dur||ye(0,e.totalDuration(),i)-e._tTime>Q)&&e.render(i,!0)),ee(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},le=function(t,e,i,r){return e.parent&&te(e),e._start=Wt(i+e._delay),e._end=Wt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),function(t,e,i,r,n){void 0===i&&(i="_first"),void 0===r&&(r="_last");var s,a=t[r];if(n)for(s=e[n];a&&a[n]>s;)a=a._prev;a?(e._next=a._next,a._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[r]=e,e._prev=a,e.parent=e._dp=t}(t,e,"_first","_last",t._sort?"_start":0),t._recent=e,r||ue(t,e),t},fe=function(t,e){return(bt.ScrollTrigger||St("scrollTrigger",e))&&bt.ScrollTrigger.create(e,t)},pe=function(t,e,i,r){return fi(t,e),t._initted?!i&&t._pt&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&C!==Ue.frame?(Bt.push(t),t._lazy=[e,r],1):void 0:1},ce=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},de=function(t,e,i,r){var n=t._repeat,s=Wt(e)||0,a=t._tTime/t._tDur;return a&&!r&&(t._time*=s/t._dur),t._dur=s,t._tDur=n?n<0?1e10:Wt(s*(n+1)+t._rDelay*n):s,a&&!r?he(t,t._tTime=t._tDur*a):t.parent&&oe(t),i||ee(t.parent,t),t},_e=function(t){return t instanceof ai?ee(t):de(t,t._dur)},me={_start:0,endTime:At},ge=function t(e,i){var r,n,s=e.labels,a=e._recent||me,o=e.duration()>=$?a.endTime(!1):e._dur;return nt(i)&&(isNaN(i)||i in s)?"<"===(r=i.charAt(0))||">"===r?("<"===r?a._start:a.endTime(a._repeat>=0))+(parseFloat(i.substr(1))||0):(r=i.indexOf("="))<0?(i in s||(s[i]=o),s[i]):(n=+(i.charAt(r-1)+i.substr(r+1)),r>1?t(e,i.substr(0,r-1))+n:o+n):null==i?o:+i},ve=function(t,e){return t||0===t?e(t):e},ye=function(t,e,i){return i<t?t:i>e?e:i},xe=function(t){if("string"!=typeof t)return"";var e=xt.exec(t);return e?t.substr(e.index+e[0].length):""},be=[].slice,we=function(t,e){return t&&ht(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&ht(t[0]))&&!t.nodeType&&t!==w},Te=function(t,e){return!nt(t)||e||!T&&Xe()?ct(t)?function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var r;return nt(t)&&!e||we(t,1)?(r=i).push.apply(r,Te(t)):i.push(t)}))||i}(t,e):we(t)?be.call(t,0):t?[t]:[]:be.call(S.querySelectorAll(t),0)},Se=function(t){return t.sort((function(){return.5-Math.random()}))},Me=function(t){if(st(t))return t;var e=ht(t)?t:{each:t},i=Ke(e.ease),r=e.from||0,n=parseFloat(e.base)||0,s={},a=r>0&&r<1,o=isNaN(r)||a,h=e.axis,u=r,l=r;return nt(r)?u=l={center:.5,edges:.5,end:1}[r]||0:!a&&o&&(u=r[0],l=r[1]),function(t,a,f){var p,c,d,_,m,g,v,y,x,b=(f||e).length,w=s[b];if(!w){if(!(x="auto"===e.grid?0:(e.grid||[1,$])[1])){for(v=-$;v<(v=f[x++].getBoundingClientRect().left)&&x<b;);x--}for(w=s[b]=[],p=o?Math.min(x,b)*u-.5:r%x,c=o?b*l/x-.5:r/x|0,v=0,y=$,g=0;g<b;g++)d=g%x-p,_=c-(g/x|0),w[g]=m=h?Math.abs("y"===h?_:d):et(d*d+_*_),m>v&&(v=m),m<y&&(y=m);"random"===r&&Se(w),w.max=v-y,w.min=y,w.v=b=(parseFloat(e.amount)||parseFloat(e.each)*(x>b?b-1:h?"y"===h?b/x:x:Math.max(x,b/x))||0)*("edges"===r?-1:1),w.b=b<0?n-b:n,w.u=xe(e.amount||e.each)||0,i=i&&b<0?Qe(i):i}return b=(w[t]-w.min)/w.max||0,Wt(w.b+(i?i(b):b)*w.v)+w.u}},Ce=function(t){var e=t<1?Math.pow(10,(t+"").length-2):1;return function(i){var r=Math.round(parseFloat(i)/t)*t*e;return(r-r%1)/e+(at(i)?0:xe(i))}},Ae=function(t,e){var i,r,n=ct(t);return!n&&ht(t)&&(i=n=t.radius||$,t.values?(t=Te(t.values),(r=!at(t[0]))&&(i*=i)):t=Ce(t.increment)),ve(e,n?st(t)?function(e){return r=t(e),Math.abs(r-e)<=i?r:e}:function(e){for(var n,s,a=parseFloat(r?e.x:e),o=parseFloat(r?e.y:0),h=$,u=0,l=t.length;l--;)(n=r?(n=t[l].x-a)*n+(s=t[l].y-o)*s:Math.abs(t[l]-a))<h&&(h=n,u=l);return u=!i||h<=i?t[u]:e,r||u===e||at(e)?u:u+xe(e)}:Ce(t))},Pe=function(t,e,i,r){return ve(ct(t)?!e:!0===i?!!(i=0):!r,(function(){return ct(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*r)/r}))},Be=function(t,e,i){return ve(i,(function(i){return t[~~e(i)]}))},Oe=function(t){for(var e,i,r,n,s=0,a="";~(e=t.indexOf("random(",s));)r=t.indexOf(")",e),n="["===t.charAt(e+7),i=t.substr(e+7,r-e-7).match(n?yt:dt),a+=t.substr(s,e-s)+Pe(n?i:+i[0],n?0:+i[1],+i[2]||1e-5),s=r+1;return a+t.substr(s,t.length-s)},ke=function(t,e,i,r,n){var s=e-t,a=r-i;return ve(n,(function(e){return i+((e-t)/s*a||0)}))},ze=function(t,e,i){var r,n,s,a=t.labels,o=$;for(r in a)(n=a[r]-e)<0==!!i&&n&&o>(n=Math.abs(n))&&(s=r,o=n);return s},De=function(t,e,i){var r,n,s=t.vars,a=s[e];if(a)return r=s[e+"Params"],n=s.callbackScope||t,i&&Bt.length&&Nt(),r?a.apply(n,r):a.call(n)},Re=function(t){return te(t),t.progress()<1&&De(t,"onInterrupt"),t},Fe=function(t){var e=(t=!t.name&&t.default||t).name,i=st(t),r=e&&!i&&t.init?function(){this._props=[]}:t,n={init:At,render:Si,add:ui,kill:Ci,modifier:Mi,rawVars:0},s={targetTest:0,get:0,getSetter:xi,aliases:{},register:0};if(Xe(),t!==r){if(kt[e])return;Gt(r,Gt(Qt(t,n),s)),Zt(r.prototype,Zt(n,Qt(t,s))),kt[r.prop=e]=r,t.targetTest&&(Rt.push(r),Pt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Ct(e,r),t.register&&t.register(Di,r,Bi)},Ee=255,Le={aqua:[0,Ee,Ee],lime:[0,Ee,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ee],navy:[0,0,128],white:[Ee,Ee,Ee],olive:[128,128,0],yellow:[Ee,Ee,0],orange:[Ee,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ee,0,0],pink:[Ee,192,203],cyan:[0,Ee,Ee],transparent:[Ee,Ee,Ee,0]},Ie=function(t,e,i){return(6*(t=t<0?t+1:t>1?t-1:t)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Ee+.5|0},qe=function(t,e,i){var r,n,s,a,o,h,u,l,f,p,c=t?at(t)?[t>>16,t>>8&Ee,t&Ee]:0:Le.black;if(!c){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Le[t])c=Le[t];else if("#"===t.charAt(0)){if(t.length<6&&(r=t.charAt(1),n=t.charAt(2),s=t.charAt(3),t="#"+r+r+n+n+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(c=parseInt(t.substr(1,6),16))>>16,c>>8&Ee,c&Ee,parseInt(t.substr(7),16)/255];c=[(t=parseInt(t.substr(1),16))>>16,t>>8&Ee,t&Ee]}else if("hsl"===t.substr(0,3))if(c=p=t.match(dt),e){if(~t.indexOf("="))return c=t.match(_t),i&&c.length<4&&(c[3]=1),c}else a=+c[0]%360/360,o=+c[1]/100,r=2*(h=+c[2]/100)-(n=h<=.5?h*(o+1):h+o-h*o),c.length>3&&(c[3]*=1),c[0]=Ie(a+1/3,r,n),c[1]=Ie(a,r,n),c[2]=Ie(a-1/3,r,n);else c=t.match(dt)||Le.transparent;c=c.map(Number)}return e&&!p&&(r=c[0]/Ee,n=c[1]/Ee,s=c[2]/Ee,h=((u=Math.max(r,n,s))+(l=Math.min(r,n,s)))/2,u===l?a=o=0:(f=u-l,o=h>.5?f/(2-u-l):f/(u+l),a=u===r?(n-s)/f+(n<s?6:0):u===n?(s-r)/f+2:(r-n)/f+4,a*=60),c[0]=~~(a+.5),c[1]=~~(100*o+.5),c[2]=~~(100*h+.5)),i&&c.length<4&&(c[3]=1),c},We=function(t){var e=[],i=[],r=-1;return t.split(Ye).forEach((function(t){var n=t.match(mt)||[];e.push.apply(e,n),i.push(r+=n.length+1)})),e.c=i,e},je=function(t,e,i){var r,n,s,a,o="",h=(t+o).match(Ye),u=e?"hsla(":"rgba(",l=0;if(!h)return t;if(h=h.map((function(t){return(t=qe(t,e,1))&&u+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=We(t),(r=i.c).join(o)!==s.c.join(o)))for(a=(n=t.replace(Ye,"1").split(mt)).length-1;l<a;l++)o+=n[l]+(~r.indexOf(l)?h.shift()||u+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!n)for(a=(n=t.split(Ye)).length-1;l<a;l++)o+=n[l]+h[l];return o+n[a]},Ye=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Le)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ne=/hsl[a]?\(/,Ve=function(t){var e,i=t.join(" ");if(Ye.lastIndex=0,Ye.test(i))return e=Ne.test(i),t[1]=je(t[1],e),t[0]=je(t[0],e,We(t[1])),!0},Ue=(F=Date.now,E=500,L=33,I=F(),q=I,j=W=1e3/240,N=function t(e){var i,r,n,s,a=F()-q,o=!0===e;if(a>E&&(I+=a-L),((i=(n=(q+=a)-I)-j)>0||o)&&(s=++z.frame,D=n-1e3*z.time,z.time=n/=1e3,j+=i+(i>=W?4:W-i),r=1),o||(B=O(t)),r)for(R=0;R<Y.length;R++)Y[R](n,D,s,e)},z={time:0,frame:0,tick:function(){N(!0)},deltaRatio:function(t){return D/(1e3/(t||60))},wake:function(){M&&(!T&<()&&(w=T=window,S=w.document||{},bt.gsap=Di,(w.gsapVersions||(w.gsapVersions=[])).push(Di.version),Tt(wt||w.GreenSockGlobals||!w.gsap&&w||{}),k=w.requestAnimationFrame),B&&z.sleep(),O=k||function(t){return setTimeout(t,j-1e3*z.time+1|0)},P=1,N(2))},sleep:function(){(k?w.cancelAnimationFrame:clearTimeout)(B),P=0,O=At},lagSmoothing:function(t,e){E=t||1e8,L=Math.min(e,E,0)},fps:function(t){W=1e3/(t||240),j=1e3*z.time+W},add:function(t){Y.indexOf(t)<0&&Y.push(t),Xe()},remove:function(t){var e;~(e=Y.indexOf(t))&&Y.splice(e,1)&&R>=e&&R--},_listeners:Y=[]}),Xe=function(){return!P&&Ue.wake()},Ge={},He=/^[\d.\-M][\d.\-,\s]/,Ze=/["']/g,$e=function(t){for(var e,i,r,n={},s=t.substr(1,t.length-3).split(":"),a=s[0],o=1,h=s.length;o<h;o++)i=s[o],e=o!==h-1?i.lastIndexOf(","):i.length,r=i.substr(0,e),n[a]=isNaN(r)?r.replace(Ze,"").trim():+r,a=i.substr(e+1).trim();return n},Qe=function(t){return function(e){return 1-t(1-e)}},Je=function t(e,i){for(var r,n=e._first;n;)n instanceof ai?t(n,i):!n.vars.yoyoEase||n._yoyo&&n._repeat||n._yoyo===i||(n.timeline?t(n.timeline,i):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=i)),n=n._next},Ke=function(t,e){return t&&(st(t)?t:Ge[t]||function(t){var e,i,r,n,s=(t+"").split("("),a=Ge[s[0]];return a&&s.length>1&&a.config?a.config.apply(null,~t.indexOf("{")?[$e(s[1])]:(e=t,i=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",i),e.substring(i,~n&&n<r?e.indexOf(")",r+1):r)).split(",").map(Ut)):Ge._CE&&He.test(t)?Ge._CE("",t):a}(t))||e},ti=function(t,e,i,r){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===r&&(r=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,s={easeIn:e,easeOut:i,easeInOut:r};return qt(t,(function(t){for(var e in Ge[t]=bt[t]=s,Ge[n=t.toLowerCase()]=i,s)Ge[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ge[t+"."+e]=s[e]})),s},ei=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},ii=function t(e,i,r){var n=i>=1?i:1,s=(r||(e?.3:.45))/(i<1?i:1),a=s/J*(Math.asin(1/n)||0),o=function(t){return 1===t?1:n*Math.pow(2,-10*t)*rt((t-a)*s)+1},h="out"===e?o:"in"===e?function(t){return 1-o(1-t)}:ei(o);return s=J/s,h.config=function(i,r){return t(e,i,r)},h},ri=function t(e,i){void 0===i&&(i=1.70158);var r=function(t){return t?--t*t*((i+1)*t+i)+1:0},n="out"===e?r:"in"===e?function(t){return 1-r(1-t)}:ei(r);return n.config=function(i){return t(e,i)},n};qt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;ti(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),Ge.Linear.easeNone=Ge.none=Ge.Linear.easeIn,ti("Elastic",ii("in"),ii("out"),ii()),V=7.5625,X=1/(U=2.75),ti("Bounce",(function(t){return 1-G(1-t)}),G=function(t){return t<X?V*t*t:t<.7272727272727273?V*Math.pow(t-1.5/U,2)+.75:t<.9090909090909092?V*(t-=2.25/U)*t+.9375:V*Math.pow(t-2.625/U,2)+.984375}),ti("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),ti("Circ",(function(t){return-(et(1-t*t)-1)})),ti("Sine",(function(t){return 1===t?1:1-it(t*K)})),ti("Back",ri("in"),ri("out"),ri()),Ge.SteppedEase=Ge.steps=bt.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,r=t+(e?0:1),n=e?1:0;return function(t){return((r*ye(0,.99999999,t)|0)+n)*i}}},Z.ease=Ge["quad.out"],qt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return Ft+=t+","+t+"Params,"}));var ni=function(t,e){this.id=tt++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:It,this.set=e?e.getSetter:xi},si=function(){function t(t,e){var i=t.parent||b;this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,de(this,+t.duration,1,1),this.data=t.data,P||Ue.wake(),i&&le(i,this,e||0===e?e:i._time,1),t.reversed&&this.reverse(),t.paused&&this.paused(!0)}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,de(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Xe(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(he(this,t),!i._dp||i.parent||ue(i,this);i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&le(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===Q||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Vt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+ne(this))%this._dur||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+ne(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?se(this._tTime,i)+1:1},e.timeScale=function(t){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?ae(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,ie(this.totalTime(ye(-this._delay,this._tDur,e),!0))},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Xe(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&(this._tTime-=Q)&&Math.abs(this._zTime)!==Q))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&le(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(ut(t)?this.totalDuration():this.duration())/Math.abs(this._ts)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ae(e.rawTime(t),this):this._tTime:this._tTime},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(e._ts||1),e=e._dp;return i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,_e(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){return arguments.length?(this._rDelay=t,_e(this)):this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(ge(this,t),ut(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,ut(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-Q))},e.eventCallback=function(t,e,i){var r=this.vars;return arguments.length>1?(e?(r[t]=e,i&&(r[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete r[t],this):r[t]},e.then=function(t){var e=this;return new Promise((function(i){var r=st(t)?t:Xt,n=function(){var t=e.then;e.then=null,st(r)&&(r=r(e))&&(r.then||r===e)&&(e.then=t),i(r),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?n():e._prom=n}))},e.kill=function(){Re(this)},t}();Gt(si.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var ai=function(t){function e(e,i){var r;return void 0===e&&(e={}),(r=t.call(this,e,i)||this).labels={},r.smoothChildTiming=!!e.smoothChildTiming,r.autoRemoveChildren=!!e.autoRemoveChildren,r._sort=ut(e.sortChildren),r.parent&&ue(r.parent,v(r)),e.scrollTrigger&&fe(v(r),e.scrollTrigger),r}y(e,t);var i=e.prototype;return i.to=function(t,e,i){return new _i(t,Yt(arguments,0,this),ge(this,at(e)?arguments[3]:i)),this},i.from=function(t,e,i){return new _i(t,Yt(arguments,1,this),ge(this,at(e)?arguments[3]:i)),this},i.fromTo=function(t,e,i,r){return new _i(t,Yt(arguments,2,this),ge(this,at(e)?arguments[4]:r)),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,Jt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new _i(t,e,ge(this,i),1),this},i.call=function(t,e,i){return le(this,_i.delayedCall(0,t,e),ge(this,i))},i.staggerTo=function(t,e,i,r,n,s,a){return i.duration=e,i.stagger=i.stagger||r,i.onComplete=s,i.onCompleteParams=a,i.parent=this,new _i(t,i,ge(this,n)),this},i.staggerFrom=function(t,e,i,r,n,s,a){return i.runBackwards=1,Jt(i).immediateRender=ut(i.immediateRender),this.staggerTo(t,e,i,r,n,s,a)},i.staggerFromTo=function(t,e,i,r,n,s,a,o){return r.startAt=i,Jt(r).immediateRender=ut(r.immediateRender),this.staggerTo(t,e,r,n,s,a,o)},i.render=function(t,e,i){var r,n,s,a,o,h,u,l,f,p,c,d,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=this!==b&&t>m-Q&&t>=0?m:t<Q?0:t,y=this._zTime<0!=t<0&&(this._initted||!g);if(v!==this._tTime||i||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),r=v,f=this._start,h=!(l=this._ts),y&&(g||(_=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(c=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,i);if(r=Wt(v%o),v===m?(a=this._repeat,r=g):((a=~~(v/o))&&a===v/o&&(r=g,a--),r>g&&(r=g)),p=se(this._tTime,o),!_&&this._tTime&&p!==a&&(p=a),c&&1&a&&(r=g-r,d=1),a!==p&&!this._lock){var x=c&&1&p,w=x===(c&&1&a);if(a<p&&(x=!x),_=x?0:g,this._lock=1,this.render(_||(d?0:Wt(a*o)),e,!g)._lock=0,!e&&this.parent&&De(this,"onRepeat"),this.vars.repeatRefresh&&!d&&(this.invalidate()._lock=1),_!==this._time||h!==!this._ts)return this;if(g=this._dur,m=this._tDur,w&&(this._lock=2,_=x?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!d&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;Je(this,d)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(u=function(t,e,i){var r;if(i>e)for(r=t._first;r&&r._start<=i;){if(!r._dur&&"isPause"===r.data&&r._start>e)return r;r=r._next}else for(r=t._last;r&&r._start>=i;){if(!r._dur&&"isPause"===r.data&&r._start<e)return r;r=r._prev}}(this,Wt(_),Wt(r)))&&(v-=r-(r=u._start)),this._tTime=v,this._time=r,this._act=!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&(r||!g&&t>=0)&&!e&&De(this,"onStart"),r>=_&&t>=0)for(n=this._first;n;){if(s=n._next,(n._act||r>=n._start)&&n._ts&&u!==n){if(n.parent!==this)return this.render(t,e,i);if(n.render(n._ts>0?(r-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(r-n._start)*n._ts,e,i),r!==this._time||!this._ts&&!h){u=0,s&&(v+=this._zTime=-1e-8);break}}n=s}else{n=this._last;for(var T=t<0?t:r;n;){if(s=n._prev,(n._act||T<=n._end)&&n._ts&&u!==n){if(n.parent!==this)return this.render(t,e,i);if(n.render(n._ts>0?(T-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(T-n._start)*n._ts,e,i),r!==this._time||!this._ts&&!h){u=0,s&&(v+=this._zTime=T?-1e-8:Q);break}}n=s}}if(u&&!e&&(this.pause(),u.render(r>=_?0:-1e-8)._zTime=r>=_?1:-1,this._ts))return this._start=f,oe(this),this.render(t,e,i);this._onUpdate&&!e&&De(this,"onUpdate",!0),(v===m&&m>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||((t||!g)&&(v===m&&this._ts>0||!v&&this._ts<0)&&te(this,1),e||t<0&&!_||!v&&!_||(De(this,v===m?"onComplete":"onReverseComplete",!0),this._prom&&!(v<m&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if(at(e)||(e=ge(this,e)),!(t instanceof si)){if(ct(t))return t.forEach((function(t){return i.add(t,e)})),this;if(nt(t))return this.addLabel(t,e);if(!st(t))return this;t=_i.delayedCall(0,t)}return this!==t?le(this,t,e):this},i.getChildren=function(t,e,i,r){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=-$);for(var n=[],s=this._first;s;)s._start>=r&&(s instanceof _i?e&&n.push(s):(i&&n.push(s),t&&n.push.apply(n,s.getChildren(!0,e,i)))),s=s._next;return n},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return nt(t)?this.removeLabel(t):st(t)?this.killTweensOf(t):(Kt(this,t),t===this._recent&&(this._recent=this._last),ee(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Wt(Ue.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=ge(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var r=_i.delayedCall(0,e||At,i);return r.data="isPause",this._hasPause=1,le(this,r,ge(this,t))},i.removePause=function(t){var e=this._first;for(t=ge(this,t);e;)e._start===t&&"isPause"===e.data&&te(e),e=e._next},i.killTweensOf=function(t,e,i){for(var r=this.getTweensOf(t,i),n=r.length;n--;)oi!==r[n]&&r[n].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,r=[],n=Te(t),s=this._first,a=at(e);s;)s instanceof _i?jt(s._targets,n)&&(a?(!oi||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&r.push(s):(i=s.getTweensOf(n,e)).length&&r.push.apply(r,i),s=s._next;return r},i.tweenTo=function(t,e){e=e||{};var i=this,r=ge(i,t),n=e,s=n.startAt,a=n.onStart,o=n.onStartParams,h=n.immediateRender,u=_i.to(i,Gt({ease:"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(s&&"time"in s?s.time:i._time))/i.timeScale())||Q,onStart:function(){i.pause();var t=e.duration||Math.abs((r-i._time)/i.timeScale());u._dur!==t&&de(u,t,0,1).render(u._time,!0,!0),a&&a.apply(u,o||[])}},e));return h?u.render(0):u},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,Gt({startAt:{time:ge(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),ze(this,ge(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),ze(this,ge(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+Q)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var r,n=this._first,s=this.labels;n;)n._start>=i&&(n._start+=t,n._end+=t),n=n._next;if(e)for(r in s)s[r]>=i&&(s[r]+=t);return ee(this)},i.invalidate=function(){var e=this._first;for(this._lock=0;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),ee(this)},i.totalDuration=function(t){var e,i,r,n=0,s=this,a=s._last,o=$;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(r=s.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(i=a._start)>o&&s._sort&&a._ts&&!s._lock?(s._lock=1,le(s,a,i-a._delay,1)._lock=0):o=i,i<0&&a._ts&&(n-=i,(!r&&!s._dp||r&&r.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),o=0),a._end>n&&a._ts&&(n=a._end),a=e;de(s,s===b&&s._time>n?s._time:n,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(b._ts&&(Vt(b,ae(t,b)),C=Ue.frame),Ue.frame>=Dt){Dt+=H.autoSleep||120;var e=b._first;if((!e||!e._ts)&&H.autoSleep&&Ue._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ue.sleep()}}},e}(si);Gt(ai.prototype,{_lock:0,_hasPause:0,_forcing:0});var oi,hi=function(t,e,i,r,n,s,a){var o,h,u,l,f,p,c,d,_=new Bi(this._pt,t,e,0,1,Ti,null,n),m=0,g=0;for(_.b=i,_.e=r,i+="",(c=~(r+="").indexOf("random("))&&(r=Oe(r)),s&&(s(d=[i,r],t,e),i=d[0],r=d[1]),h=i.match(gt)||[];o=gt.exec(r);)l=o[0],f=r.substring(m,o.index),u?u=(u+1)%5:"rgba("===f.substr(-5)&&(u=1),l!==h[g++]&&(p=parseFloat(h[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:p,c:"="===l.charAt(1)?parseFloat(l.substr(2))*("-"===l.charAt(0)?-1:1):parseFloat(l)-p,m:u&&u<4?Math.round:0},m=gt.lastIndex);return _.c=m<r.length?r.substring(m,r.length):"",_.fp=a,(vt.test(r)||c)&&(_.e=0),this._pt=_,_},ui=function(t,e,i,r,n,s,a,o,h){st(r)&&(r=r(n||0,t,s));var u,l=t[e],f="get"!==i?i:st(l)?h?t[e.indexOf("set")||!st(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():l,p=st(l)?h?vi:gi:mi;if(nt(r)&&(~r.indexOf("random(")&&(r=Oe(r)),"="===r.charAt(1)&&(r=parseFloat(f)+parseFloat(r.substr(2))*("-"===r.charAt(0)?-1:1)+(xe(f)||0))),f!==r)return isNaN(f*r)?(!l&&!(e in t)&&St(e,r),hi.call(this,t,e,f,r,p,o||H.stringFilter,h)):(u=new Bi(this._pt,t,e,+f||0,r-(f||0),"boolean"==typeof l?wi:bi,0,p),h&&(u.fp=h),a&&u.modifier(a,this,t),this._pt=u)},li=function(t,e,i,r,n,s){var a,o,h,u;if(kt[t]&&!1!==(a=new kt[t]).init(n,a.rawVars?e[t]:function(t,e,i,r,n){if(st(t)&&(t=pi(t,n,e,i,r)),!ht(t)||t.style&&t.nodeType||ct(t)||pt(t))return nt(t)?pi(t,n,e,i,r):t;var s,a={};for(s in t)a[s]=pi(t[s],n,e,i,r);return a}(e[t],r,n,s,i),i,r,s)&&(i._pt=o=new Bi(i._pt,n,t,0,1,a.render,a,0,a.priority),i!==A))for(h=i._ptLookup[i._targets.indexOf(n)],u=a._props.length;u--;)h[a._props[u]]=o;return a},fi=function t(e,i){var r,n,s,a,o,h,u,l,f,p,c,d,_,m=e.vars,g=m.ease,v=m.startAt,y=m.immediateRender,w=m.lazy,T=m.onUpdate,S=m.onUpdateParams,M=m.callbackScope,C=m.runBackwards,A=m.yoyoEase,P=m.keyframes,B=m.autoRevert,O=e._dur,k=e._startAt,z=e._targets,D=e.parent,R=D&&"nested"===D.data?D.parent._targets:z,F="auto"===e._overwrite&&!x,E=e.timeline;if(E&&(!P||!g)&&(g="none"),e._ease=Ke(g,Z.ease),e._yEase=A?Qe(Ke(!0===A?g:A,Z.ease)):0,A&&e._yoyo&&!e._repeat&&(A=e._yEase,e._yEase=e._ease,e._ease=A),!E){if(d=(l=z[0]?Lt(z[0]).harness:0)&&m[l.prop],r=Qt(m,Pt),k&&k.render(-1,!0).kill(),v){if(te(e._startAt=_i.set(z,Gt({data:"isStart",overwrite:!1,parent:D,immediateRender:!0,lazy:ut(w),startAt:null,delay:0,onUpdate:T,onUpdateParams:S,callbackScope:M,stagger:0},v))),y)if(i>0)B||(e._startAt=0);else if(O&&!(i<0&&k))return void(i&&(e._zTime=i))}else if(C&&O)if(k)!B&&(e._startAt=0);else if(i&&(y=!1),s=Gt({overwrite:!1,data:"isFromStart",lazy:y&&ut(w),immediateRender:y,stagger:0,parent:D},r),d&&(s[l.prop]=d),te(e._startAt=_i.set(z,s)),y){if(!i)return}else t(e._startAt,Q);for(e._pt=0,w=O&&ut(w)||w&&!O,n=0;n<z.length;n++){if(u=(o=z[n])._gsap||Et(z)[n]._gsap,e._ptLookup[n]=p={},Ot[u.id]&&Bt.length&&Nt(),c=R===z?n:R.indexOf(o),l&&!1!==(f=new l).init(o,d||r,e,c,R)&&(e._pt=a=new Bi(e._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach((function(t){p[t]=a})),f.priority&&(h=1)),!l||d)for(s in r)kt[s]&&(f=li(s,r,e,c,o,R))?f.priority&&(h=1):p[s]=a=ui.call(e,o,s,"get",r[s],c,R,0,m.stringFilter);e._op&&e._op[n]&&e.kill(o,e._op[n]),F&&e._pt&&(oi=e,b.killTweensOf(o,p,e.globalTime(0)),_=!e.parent,oi=0),e._pt&&w&&(Ot[u.id]=1)}h&&Pi(e),e._onInit&&e._onInit(e)}e._from=!E&&!!m.runBackwards,e._onUpdate=T,e._initted=(!e._op||e._pt)&&!_},pi=function(t,e,i,r,n){return st(t)?t.call(e,i,r,n):nt(t)&&~t.indexOf("random(")?Oe(t):t},ci=Ft+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",di=(ci+",id,stagger,delay,duration,paused,scrollTrigger").split(","),_i=function(t){function e(e,i,r,n){var s;"number"==typeof i&&(r.duration=i,i=r,r=null);var a,o,h,u,l,f,p,c,d=(s=t.call(this,n?i:Jt(i),r)||this).vars,_=d.duration,m=d.delay,g=d.immediateRender,y=d.stagger,w=d.overwrite,T=d.keyframes,S=d.defaults,M=d.scrollTrigger,C=d.yoyoEase,A=s.parent,P=(ct(e)||pt(e)?at(e[0]):"length"in i)?[e]:Te(e);if(s._targets=P.length?Et(P):Mt("GSAP target "+e+" not found. https://greensock.com",!H.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=w,T||y||ft(_)||ft(m)){if(i=s.vars,(a=s.timeline=new ai({data:"nested",defaults:S||{}})).kill(),a.parent=a._dp=v(s),a._start=0,T)Gt(a.vars.defaults,{ease:"none"}),T.forEach((function(t){return a.to(P,t,">")}));else{if(u=P.length,p=y?Me(y):At,ht(y))for(l in y)~ci.indexOf(l)&&(c||(c={}),c[l]=y[l]);for(o=0;o<u;o++){for(l in h={},i)di.indexOf(l)<0&&(h[l]=i[l]);h.stagger=0,C&&(h.yoyoEase=C),c&&Zt(h,c),f=P[o],h.duration=+pi(_,v(s),o,f,P),h.delay=(+pi(m,v(s),o,f,P)||0)-s._delay,!y&&1===u&&h.delay&&(s._delay=m=h.delay,s._start+=m,h.delay=0),a.to(f,h,p(o,f,P))}a.duration()?_=m=0:s.timeline=0}_||s.duration(_=a.duration())}else s.timeline=0;return!0!==w||x||(oi=v(s),b.killTweensOf(P),oi=0),A&&ue(A,v(s)),(g||!_&&!T&&s._start===Wt(A._time)&&ut(g)&&re(v(s))&&"nested"!==A.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-m))),M&&fe(v(s),M),s}y(e,t);var i=e.prototype;return i.render=function(t,e,i){var r,n,s,a,o,h,u,l,f,p=this._time,c=this._tDur,d=this._dur,_=t>c-Q&&t>=0?c:t<Q?0:t;if(d){if(_!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=t<0){if(r=_,l=this.timeline,this._repeat){if(a=d+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,i);if(r=Wt(_%a),_===c?(s=this._repeat,r=d):((s=~~(_/a))&&s===_/a&&(r=d,s--),r>d&&(r=d)),(h=this._yoyo&&1&s)&&(f=this._yEase,r=d-r),o=se(this._tTime,a),r===p&&!i&&this._initted)return this;s!==o&&(l&&this._yEase&&Je(l,h),!this.vars.repeatRefresh||h||this._lock||(this._lock=i=1,this.render(Wt(a*s),!0).invalidate()._lock=0))}if(!this._initted){if(pe(this,t<0?t:r,i,e))return this._tTime=0,this;if(d!==this._dur)return this.render(t,e,i)}for(this._tTime=_,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(f||this._ease)(r/d),this._from&&(this.ratio=u=1-u),r&&!p&&!e&&De(this,"onStart"),n=this._pt;n;)n.r(u,n.d),n=n._next;l&&l.render(t<0?t:!r&&h?-1e-8:l._dur*u,e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(t<0&&this._startAt&&this._startAt.render(t,!0,i),De(this,"onUpdate")),this._repeat&&s!==o&&this.vars.onRepeat&&!e&&this.parent&&De(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,!0,!0),(t||!d)&&(_===this._tDur&&this._ts>0||!_&&this._ts<0)&&te(this,1),e||t<0&&!p||!_&&!p||(De(this,_===c?"onComplete":"onReverseComplete",!0),this._prom&&!(_<c&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,r){var n,s,a,o=t.ratio,h=e<0||!e&&(!t._start&&ce(t)||(t._ts<0||t._dp._ts<0)&&"isFromStart"!==t.data&&"isStart"!==t.data)?0:1,u=t._rDelay,l=0;if(u&&t._repeat&&(l=ye(0,t._tDur,e),s=se(l,u),a=se(t._tTime,u),t._yoyo&&1&s&&(h=1-h),s!==a&&(o=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==o||r||t._zTime===Q||!e&&t._zTime){if(!t._initted&&pe(t,e,r,i))return;for(a=t._zTime,t._zTime=e||(i?Q:0),i||(i=e&&!a),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=l,i||De(t,"onStart"),n=t._pt;n;)n.r(h,n.d),n=n._next;t._startAt&&e<0&&t._startAt.render(e,!0,!0),t._onUpdate&&!i&&De(t,"onUpdate"),l&&t._repeat&&!i&&t.parent&&De(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&te(t,1),i||(De(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),t.prototype.invalidate.call(this)},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Re(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,oi&&!0!==oi.vars.overwrite)._first||Re(this),this.parent&&i!==this.timeline.totalDuration()&&de(this,this._dur*this.timeline._tDur/i,0,1),this}var r,n,s,a,o,h,u,l=this._targets,f=t?Te(t):l,p=this._ptLookup,c=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,r=i===e.length;r&&i--&&t[i]===e[i];);return i<0}(l,f))return"all"===e&&(this._pt=0),Re(this);for(r=this._op=this._op||[],"all"!==e&&(nt(e)&&(o={},qt(e,(function(t){return o[t]=1})),e=o),e=function(t,e){var i,r,n,s,a=t[0]?Lt(t[0]).harness:0,o=a&&a.aliases;if(!o)return e;for(r in i=Zt({},e),o)if(r in i)for(n=(s=o[r].split(",")).length;n--;)i[s[n]]=i[r];return i}(l,e)),u=l.length;u--;)if(~f.indexOf(l[u]))for(o in n=p[u],"all"===e?(r[u]=e,a=n,s={}):(s=r[u]=r[u]||{},a=e),a)(h=n&&n[o])&&("kill"in h.d&&!0!==h.d.kill(o)||Kt(this,h,"_pt"),delete n[o]),"all"!==s&&(s[o]=1);return this._initted&&!this._pt&&c&&Re(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,i){return new e(t,Yt(arguments,1))},e.delayedCall=function(t,i,r,n){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:n})},e.fromTo=function(t,i,r){return new e(t,Yt(arguments,2))},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return b.killTweensOf(t,e,i)},e}(si);Gt(_i.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),qt("staggerTo,staggerFrom,staggerFromTo",(function(t){_i[t]=function(){var e=new ai,i=be.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var mi=function(t,e,i){return t[e]=i},gi=function(t,e,i){return t[e](i)},vi=function(t,e,i,r){return t[e](r.fp,i)},yi=function(t,e,i){return t.setAttribute(e,i)},xi=function(t,e){return st(t[e])?gi:ot(t[e])&&t.setAttribute?yi:mi},bi=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4,e)},wi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Ti=function(t,e){var i=e._pt,r="";if(!t&&e.b)r=e.b;else if(1===t&&e.e)r=e.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+r,i=i._next;r+=e.c}e.set(e.t,e.p,r,e)},Si=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},Mi=function(t,e,i,r){for(var n,s=this._pt;s;)n=s._next,s.p===r&&s.modifier(t,e,i),s=n},Ci=function(t){for(var e,i,r=this._pt;r;)i=r._next,r.p===t&&!r.op||r.op===t?Kt(this,r,"_pt"):r.dep||(e=1),r=i;return!e},Ai=function(t,e,i,r){r.mSet(t,e,r.m.call(r.tween,i,r.mt),r)},Pi=function(t){for(var e,i,r,n,s=t._pt;s;){for(e=s._next,i=r;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:n)?s._prev._next=s:r=s,(s._next=i)?i._prev=s:n=s,s=e}t._pt=r},Bi=function(){function t(t,e,i,r,n,s,a,o,h){this.t=e,this.s=r,this.c=n,this.p=i,this.r=s||bi,this.d=a||this,this.set=o||mi,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=Ai,this.m=t,this.mt=i,this.tween=e},t}();qt(Ft+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return Pt[t]=1})),bt.TweenMax=bt.TweenLite=_i,bt.TimelineLite=bt.TimelineMax=ai,b=new ai({sortChildren:!1,defaults:Z,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),H.stringFilter=Ve;var Oi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Fe(t)}))},timeline:function(t){return new ai(t)},getTweensOf:function(t,e){return b.getTweensOf(t,e)},getProperty:function(t,e,i,r){nt(t)&&(t=Te(t)[0]);var n=Lt(t||{}).get,s=i?Xt:Ut;return"native"===i&&(i=""),t?e?s((kt[e]&&kt[e].get||n)(t,e,i,r)):function(e,i,r){return s((kt[e]&&kt[e].get||n)(t,e,i,r))}:t},quickSetter:function(t,e,i){if((t=Te(t)).length>1){var r=t.map((function(t){return Di.quickSetter(t,e,i)})),n=r.length;return function(t){for(var e=n;e--;)r[e](t)}}t=t[0]||{};var s=kt[e],a=Lt(t),o=a.harness&&(a.harness.aliases||{})[e]||e,h=s?function(e){var r=new s;A._pt=0,r.init(t,i?e+i:e,A,0,[t]),r.render(1,r),A._pt&&Si(1,A)}:a.set(t,o);return s?h:function(e){return h(t,o,i?e+i:e,a,1)}},isTweening:function(t){return b.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Ke(t.ease,Z.ease)),$t(Z,t||{})},config:function(t){return $t(H,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,r=t.plugins,n=t.defaults,s=t.extendTimeline;(r||"").split(",").forEach((function(t){return t&&!kt[t]&&!bt[t]&&Mt(e+" effect requires "+t+" plugin.")})),zt[e]=function(t,e,r){return i(Te(t),Gt(e||{},n),r)},s&&(ai.prototype[e]=function(t,i,r){return this.add(zt[e](t,ht(i)?i:(r=i)&&{},this),r)})},registerEase:function(t,e){Ge[t]=Ke(e)},parseEase:function(t,e){return arguments.length?Ke(t,e):Ge},getById:function(t){return b.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,r,n=new ai(t);for(n.smoothChildTiming=ut(t.smoothChildTiming),b.remove(n),n._dp=0,n._time=n._tTime=b._time,i=b._first;i;)r=i._next,!e&&!i._dur&&i instanceof _i&&i.vars.onComplete===i._targets[0]||le(n,i,i._start-i._delay),i=r;return le(b,n,0),n},utils:{wrap:function t(e,i,r){var n=i-e;return ct(e)?Be(e,t(0,e.length),i):ve(r,(function(t){return(n+(t-e)%n)%n+e}))},wrapYoyo:function t(e,i,r){var n=i-e,s=2*n;return ct(e)?Be(e,t(0,e.length-1),i):ve(r,(function(t){return e+((t=(s+(t-e)%s)%s||0)>n?s-t:t)}))},distribute:Me,random:Pe,snap:Ae,normalize:function(t,e,i){return ke(t,e,0,1,i)},getUnit:xe,clamp:function(t,e,i){return ve(i,(function(i){return ye(t,e,i)}))},splitColor:qe,toArray:Te,mapRange:ke,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||xe(i))}},interpolate:function t(e,i,r,n){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var a,o,h,u,l,f=nt(e),p={};if(!0===r&&(n=1)&&(r=null),f)e={p:e},i={p:i};else if(ct(e)&&!ct(i)){for(h=[],u=e.length,l=u-2,o=1;o<u;o++)h.push(t(e[o-1],e[o]));u--,s=function(t){t*=u;var e=Math.min(l,~~t);return h[e](t-e)},r=i}else n||(e=Zt(ct(e)?[]:{},e));if(!h){for(a in i)ui.call(p,e,a,"get",i[a]);s=function(t){return Si(t,p)||(f?e.p:e)}}}return ve(r,s)},shuffle:Se},install:Tt,effects:zt,ticker:Ue,updateRoot:ai.updateRoot,plugins:kt,globalTimeline:b,core:{PropTween:Bi,globals:Ct,Tween:_i,Timeline:ai,Animation:si,getCache:Lt,_removeLinkedListItem:Kt,suppressOverwrites:function(t){return x=t}}};qt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Oi[t]=_i[t]})),Ue.add(ai.updateRoot),A=Oi.to({},{duration:0});var ki=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},zi=function(t,e){return{name:t,rawVars:1,init:function(t,i,r){r._onInit=function(t){var r,n;if(nt(i)&&(r={},qt(i,(function(t){return r[t]=1})),i=r),e){for(n in r={},i)r[n]=e(i[n]);i=r}!function(t,e){var i,r,n,s=t._targets;for(i in e)for(r=s.length;r--;)(n=t._ptLookup[r][i])&&(n=n.d)&&(n._pt&&(n=ki(n,i)),n&&n.modifier&&n.modifier(e[i],t,s[r],i))}(t,i)}}}},Di=Oi.registerPlugin({name:"attr",init:function(t,e,i,r,n){var s,a;for(s in e)(a=this.add(t,"setAttribute",(t.getAttribute(s)||0)+"",e[s],r,n,0,0,s))&&(a.op=s),this._props.push(s)}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i])}},zi("roundProps",Ce),zi("modifiers"),zi("snap",Ae))||Oi;_i.version=ai.version=Di.version="3.6.0",M=1,lt()&&Xe(),Ge.Power0,Ge.Power1,Ge.Power2,Ge.Power3,Ge.Power4,Ge.Linear,Ge.Quad,Ge.Cubic,Ge.Quart,Ge.Quint,Ge.Strong,Ge.Elastic,Ge.Back,Ge.SteppedEase,Ge.Bounce,Ge.Sine,Ge.Expo,Ge.Circ;var Ri,Fi,Ei,Li,Ii,qi,Wi,ji,Yi={},Ni=180/Math.PI,Vi=Math.PI/180,Ui=Math.atan2,Xi=/([A-Z])/g,Gi=/(?:left|right|width|margin|padding|x)/i,Hi=/[\s,\(]\S/,Zi={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},$i=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Qi=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Ji=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},Ki=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},tr=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},er=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},ir=function(t,e,i){return t.style[e]=i},rr=function(t,e,i){return t.style.setProperty(e,i)},nr=function(t,e,i){return t._gsap[e]=i},sr=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},ar=function(t,e,i,r,n){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(n,s)},or=function(t,e,i,r,n){var s=t._gsap;s[e]=i,s.renderTransform(n,s)},hr="transform",ur=hr+"Origin",lr=function(t,e){var i=Fi.createElementNS?Fi.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Fi.createElement(t);return i.style?i:Fi.createElement(t)},fr=function t(e,i,r){var n=getComputedStyle(e);return n[i]||n.getPropertyValue(i.replace(Xi,"-$1").toLowerCase())||n.getPropertyValue(i)||!r&&t(e,cr(i)||i,1)||""},pr="O,Moz,ms,Ms,Webkit".split(","),cr=function(t,e,i){var r=(e||Ii).style,n=5;if(t in r&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(pr[n]+t in r););return n<0?null:(3===n?"ms":n>=0?pr[n]:"")+t},dr=function(){"undefined"!=typeof window&&window.document&&(Ri=window,Fi=Ri.document,Ei=Fi.documentElement,Ii=lr("div")||{style:{}},qi=lr("div"),hr=cr(hr),ur=hr+"Origin",Ii.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ji=!!cr("perspective"),Li=1)},_r=function t(e){var i,r=lr("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,s=this.nextSibling,a=this.style.cssText;if(Ei.appendChild(r),r.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return n&&(s?n.insertBefore(this,s):n.appendChild(this)),Ei.removeChild(r),this.style.cssText=a,i},mr=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},gr=function(t){var e;try{e=t.getBBox()}catch(i){e=_r.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===_r||(e=_r.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+mr(t,["x","cx","x1"])||0,y:+mr(t,["y","cy","y1"])||0,width:0,height:0}},vr=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!gr(t))},yr=function(t,e){if(e){var i=t.style;e in Yi&&e!==ur&&(e=hr),i.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty(e.replace(Xi,"-$1").toLowerCase())):i.removeAttribute(e)}},xr=function(t,e,i,r,n,s){var a=new Bi(t._pt,e,i,0,1,s?er:tr);return t._pt=a,a.b=r,a.e=n,t._props.push(i),a},br={deg:1,rad:1,turn:1},wr=function t(e,i,r,n){var s,a,o,h,u=parseFloat(r)||0,l=(r+"").trim().substr((u+"").length)||"px",f=Ii.style,p=Gi.test(i),c="svg"===e.tagName.toLowerCase(),d=(c?"client":"offset")+(p?"Width":"Height"),_=100,m="px"===n,g="%"===n;return n===l||!u||br[n]||br[l]?u:("px"!==l&&!m&&(u=t(e,i,r,"px")),h=e.getCTM&&vr(e),!g&&"%"!==l||!Yi[i]&&!~i.indexOf("adius")?(f[p?"width":"height"]=_+(m?l:n),a=~i.indexOf("adius")||"em"===n&&e.appendChild&&!c?e:e.parentNode,h&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==Fi&&a.appendChild||(a=Fi.body),(o=a._gsap)&&g&&o.width&&p&&o.time===Ue.time?Wt(u/o.width*_):((g||"%"===l)&&(f.position=fr(e,"position")),a===e&&(f.position="static"),a.appendChild(Ii),s=Ii[d],a.removeChild(Ii),f.position="absolute",p&&g&&((o=Lt(a)).time=Ue.time,o.width=a[d]),Wt(m?s*u/_:s&&u?_/s*u:0))):(s=h?e.getBBox()[p?"width":"height"]:e[d],Wt(g?u/s*_:u/100*s)))},Tr=function(t,e,i,r){var n;return Li||dr(),e in Zi&&"transform"!==e&&~(e=Zi[e]).indexOf(",")&&(e=e.split(",")[0]),Yi[e]&&"transform"!==e?(n=Rr(t,r),n="transformOrigin"!==e?n[e]:Fr(fr(t,ur))+" "+n.zOrigin+"px"):(!(n=t.style[e])||"auto"===n||r||~(n+"").indexOf("calc("))&&(n=Ar[e]&&Ar[e](t,e,i)||fr(t,e)||It(t,e)||("opacity"===e?1:0)),i&&!~(n+"").trim().indexOf(" ")?wr(t,e,n,i)+i:n},Sr=function(t,e,i,r){if(!i||"none"===i){var n=cr(e,t,1),s=n&&fr(t,n,1);s&&s!==i?(e=n,i=s):"borderColor"===e&&(i=fr(t,"borderTopColor"))}var a,o,h,u,l,f,p,c,d,_,m,g,v=new Bi(this._pt,t.style,e,0,1,Ti),y=0,x=0;if(v.b=i,v.e=r,i+="","auto"==(r+="")&&(t.style[e]=r,r=fr(t,e)||r,t.style[e]=i),Ve(a=[i,r]),r=a[1],h=(i=a[0]).match(mt)||[],(r.match(mt)||[]).length){for(;o=mt.exec(r);)p=o[0],d=r.substring(y,o.index),l?l=(l+1)%5:"rgba("!==d.substr(-5)&&"hsla("!==d.substr(-5)||(l=1),p!==(f=h[x++]||"")&&(u=parseFloat(f)||0,m=f.substr((u+"").length),(g="="===p.charAt(1)?+(p.charAt(0)+"1"):0)&&(p=p.substr(2)),c=parseFloat(p),_=p.substr((c+"").length),y=mt.lastIndex-_.length,_||(_=_||H.units[e]||m,y===r.length&&(r+=_,v.e+=_)),m!==_&&(u=wr(t,e,f,_)||0),v._pt={_next:v._pt,p:d||1===x?d:",",s:u,c:g?g*c:c-u,m:l&&l<4||"zIndex"===e?Math.round:0});v.c=y<r.length?r.substring(y,r.length):""}else v.r="display"===e&&"none"===r?er:tr;return vt.test(r)&&(v.e=0),this._pt=v,v},Mr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Cr=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,r,n,s=e.t,a=s.style,o=e.u,h=s._gsap;if("all"===o||!0===o)a.cssText="",r=1;else for(n=(o=o.split(",")).length;--n>-1;)i=o[n],Yi[i]&&(r=1,i="transformOrigin"===i?ur:hr),yr(s,i);r&&(yr(s,hr),h&&(h.svg&&s.removeAttribute("transform"),Rr(s,1),h.uncache=1))}},Ar={clearProps:function(t,e,i,r,n){if("isFromStart"!==n.data){var s=t._pt=new Bi(t._pt,e,i,0,0,Cr);return s.u=r,s.pr=-10,s.tween=n,t._props.push(i),1}}},Pr=[1,0,0,1,0,0],Br={},Or=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},kr=function(t){var e=fr(t,hr);return Or(e)?Pr:e.substr(7).match(_t).map(Wt)},zr=function(t,e){var i,r,n,s,a=t._gsap||Lt(t),o=t.style,h=kr(t);return a.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Pr:h:(h!==Pr||t.offsetParent||t===Ei||a.svg||(n=o.display,o.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,r=t.nextSibling,Ei.appendChild(t)),h=kr(t),n?o.display=n:yr(t,"display"),s&&(r?i.insertBefore(t,r):i?i.appendChild(t):Ei.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Dr=function(t,e,i,r,n,s){var a,o,h,u=t._gsap,l=n||zr(t,!0),f=u.xOrigin||0,p=u.yOrigin||0,c=u.xOffset||0,d=u.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],x=l[5],b=e.split(" "),w=parseFloat(b[0])||0,T=parseFloat(b[1])||0;i?l!==Pr&&(o=_*v-m*g)&&(h=w*(-m/o)+T*(_/o)-(_*x-m*y)/o,w=w*(v/o)+T*(-g/o)+(g*x-v*y)/o,T=h):(w=(a=gr(t)).x+(~b[0].indexOf("%")?w/100*a.width:w),T=a.y+(~(b[1]||b[0]).indexOf("%")?T/100*a.height:T)),r||!1!==r&&u.smooth?(y=w-f,x=T-p,u.xOffset=c+(y*_+x*g)-y,u.yOffset=d+(y*m+x*v)-x):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=T,u.smooth=!!r,u.origin=e,u.originIsAbsolute=!!i,t.style[ur]="0px 0px",s&&(xr(s,u,"xOrigin",f,w),xr(s,u,"yOrigin",p,T),xr(s,u,"xOffset",c,u.xOffset),xr(s,u,"yOffset",d,u.yOffset)),t.setAttribute("data-svg-origin",w+" "+T)},Rr=function(t,e){var i=t._gsap||new ni(t);if("x"in i&&!e&&!i.uncache)return i;var r,n,s,a,o,h,u,l,f,p,c,d,_,m,g,v,y,x,b,w,T,S,M,C,A,P,B,O,k,z,D,R,F=t.style,E=i.scaleX<0,L="px",I="deg",q=fr(t,ur)||"0";return r=n=s=h=u=l=f=p=c=0,a=o=1,i.svg=!(!t.getCTM||!vr(t)),m=zr(t,i.svg),i.svg&&(C=!i.uncache&&t.getAttribute("data-svg-origin"),Dr(t,C||q,!!C||i.originIsAbsolute,!1!==i.smooth,m)),d=i.xOrigin||0,_=i.yOrigin||0,m!==Pr&&(x=m[0],b=m[1],w=m[2],T=m[3],r=S=m[4],n=M=m[5],6===m.length?(a=Math.sqrt(x*x+b*b),o=Math.sqrt(T*T+w*w),h=x||b?Ui(b,x)*Ni:0,(f=w||T?Ui(w,T)*Ni+h:0)&&(o*=Math.cos(f*Vi)),i.svg&&(r-=d-(d*x+_*w),n-=_-(d*b+_*T))):(R=m[6],z=m[7],B=m[8],O=m[9],k=m[10],D=m[11],r=m[12],n=m[13],s=m[14],u=(g=Ui(R,k))*Ni,g&&(C=S*(v=Math.cos(-g))+B*(y=Math.sin(-g)),A=M*v+O*y,P=R*v+k*y,B=S*-y+B*v,O=M*-y+O*v,k=R*-y+k*v,D=z*-y+D*v,S=C,M=A,R=P),l=(g=Ui(-w,k))*Ni,g&&(v=Math.cos(-g),D=T*(y=Math.sin(-g))+D*v,x=C=x*v-B*y,b=A=b*v-O*y,w=P=w*v-k*y),h=(g=Ui(b,x))*Ni,g&&(C=x*(v=Math.cos(g))+b*(y=Math.sin(g)),A=S*v+M*y,b=b*v-x*y,M=M*v-S*y,x=C,S=A),u&&Math.abs(u)+Math.abs(h)>359.9&&(u=h=0,l=180-l),a=Wt(Math.sqrt(x*x+b*b+w*w)),o=Wt(Math.sqrt(M*M+R*R)),g=Ui(S,M),f=Math.abs(g)>2e-4?g*Ni:0,c=D?1/(D<0?-D:D):0),i.svg&&(C=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Or(fr(t,hr)),C&&t.setAttribute("transform",C))),Math.abs(f)>90&&Math.abs(f)<270&&(E?(a*=-1,f+=h<=0?180:-180,h+=h<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),i.x=r-((i.xPercent=r&&(i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-r)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+L,i.y=n-((i.yPercent=n&&(i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+L,i.z=s+L,i.scaleX=Wt(a),i.scaleY=Wt(o),i.rotation=Wt(h)+I,i.rotationX=Wt(u)+I,i.rotationY=Wt(l)+I,i.skewX=f+I,i.skewY=p+I,i.transformPerspective=c+L,(i.zOrigin=parseFloat(q.split(" ")[2])||0)&&(F[ur]=Fr(q)),i.xOffset=i.yOffset=0,i.force3D=H.force3D,i.renderTransform=i.svg?Yr:ji?jr:Lr,i.uncache=0,i},Fr=function(t){return(t=t.split(" "))[0]+" "+t[1]},Er=function(t,e,i){var r=xe(e);return Wt(parseFloat(e)+parseFloat(wr(t,"x",i+"px",r)))+r},Lr=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,jr(t,e)},Ir="0deg",qr="0px",Wr=") ",jr=function(t,e){var i=e||this,r=i.xPercent,n=i.yPercent,s=i.x,a=i.y,o=i.z,h=i.rotation,u=i.rotationY,l=i.rotationX,f=i.skewX,p=i.skewY,c=i.scaleX,d=i.scaleY,_=i.transformPerspective,m=i.force3D,g=i.target,v=i.zOrigin,y="",x="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ir||u!==Ir)){var b,w=parseFloat(u)*Vi,T=Math.sin(w),S=Math.cos(w);w=parseFloat(l)*Vi,b=Math.cos(w),s=Er(g,s,T*b*-v),a=Er(g,a,-Math.sin(w)*-v),o=Er(g,o,S*b*-v+v)}_!==qr&&(y+="perspective("+_+Wr),(r||n)&&(y+="translate("+r+"%, "+n+"%) "),(x||s!==qr||a!==qr||o!==qr)&&(y+=o!==qr||x?"translate3d("+s+", "+a+", "+o+") ":"translate("+s+", "+a+Wr),h!==Ir&&(y+="rotate("+h+Wr),u!==Ir&&(y+="rotateY("+u+Wr),l!==Ir&&(y+="rotateX("+l+Wr),f===Ir&&p===Ir||(y+="skew("+f+", "+p+Wr),1===c&&1===d||(y+="scale("+c+", "+d+Wr),g.style[hr]=y||"translate(0, 0)"},Yr=function(t,e){var i,r,n,s,a,o=e||this,h=o.xPercent,u=o.yPercent,l=o.x,f=o.y,p=o.rotation,c=o.skewX,d=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,x=o.xOffset,b=o.yOffset,w=o.forceCSS,T=parseFloat(l),S=parseFloat(f);p=parseFloat(p),c=parseFloat(c),(d=parseFloat(d))&&(c+=d=parseFloat(d),p+=d),p||c?(p*=Vi,c*=Vi,i=Math.cos(p)*_,r=Math.sin(p)*_,n=Math.sin(p-c)*-m,s=Math.cos(p-c)*m,c&&(d*=Vi,a=Math.tan(c-d),n*=a=Math.sqrt(1+a*a),s*=a,d&&(a=Math.tan(d),i*=a=Math.sqrt(1+a*a),r*=a)),i=Wt(i),r=Wt(r),n=Wt(n),s=Wt(s)):(i=_,s=m,r=n=0),(T&&!~(l+"").indexOf("px")||S&&!~(f+"").indexOf("px"))&&(T=wr(g,"x",l,"px"),S=wr(g,"y",f,"px")),(v||y||x||b)&&(T=Wt(T+v-(v*i+y*n)+x),S=Wt(S+y-(v*r+y*s)+b)),(h||u)&&(a=g.getBBox(),T=Wt(T+h/100*a.width),S=Wt(S+u/100*a.height)),a="matrix("+i+","+r+","+n+","+s+","+T+","+S+")",g.setAttribute("transform",a),w&&(g.style[hr]=a)},Nr=function(t,e,i,r,n,s){var a,o,h=360,u=nt(n),l=parseFloat(n)*(u&&~n.indexOf("rad")?Ni:1),f=s?l*s:l-r,p=r+f+"deg";return u&&("short"===(a=n.split("_")[1])&&(f%=h)!=f%180&&(f+=f<0?h:-360),"cw"===a&&f<0?f=(f+36e9)%h-~~(f/h)*h:"ccw"===a&&f>0&&(f=(f-36e9)%h-~~(f/h)*h)),t._pt=o=new Bi(t._pt,e,i,r,f,Qi),o.e=p,o.u="deg",t._props.push(i),o},Vr=function(t,e,i){var r,n,s,a,o,h,u,l=qi.style,f=i._gsap;for(n in l.cssText=getComputedStyle(i).cssText+";position:absolute;display:block;",l[hr]=e,Fi.body.appendChild(qi),r=Rr(qi,1),Yi)(s=f[n])!==(a=r[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=xe(s)!==(u=xe(a))?wr(i,n,s,u):parseFloat(s),h=parseFloat(a),t._pt=new Bi(t._pt,f,n,o,h-o,$i),t._pt.u=u||0,t._props.push(n));Fi.body.removeChild(qi)};qt("padding,margin,Width,Radius",(function(t,e){var i="Top",r="Right",n="Bottom",s="Left",a=(e<3?[i,r,n,s]:[i+s,i+r,n+r,n+s]).map((function(i){return e<2?t+i:"border"+i+t}));Ar[e>1?"border"+t:t]=function(t,e,i,r,n){var s,o;if(arguments.length<4)return s=a.map((function(e){return Tr(t,e,i)})),5===(o=s.join(" ")).split(s[0]).length?s[0]:o;s=(r+"").split(" "),o={},a.forEach((function(t,e){return o[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,o,n)}}));var Ur,Xr,Gr={name:"css",register:dr,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,r,n){var s,a,o,h,u,l,f,p,c,d,_,m,g,v,y,x,b,w,T,S=this._props,M=t.style,C=i.vars.startAt;for(f in Li||dr(),e)if("autoRound"!==f&&(a=e[f],!kt[f]||!li(f,e,i,r,t,n)))if(u=typeof a,l=Ar[f],"function"===u&&(u=typeof(a=a.call(i,r,t,n))),"string"===u&&~a.indexOf("random(")&&(a=Oe(a)),l)l(this,t,f,a,i)&&(y=1);else if("--"===f.substr(0,2))s=(getComputedStyle(t).getPropertyValue(f)+"").trim(),a+="",p=xe(s),(c=xe(a))?p!==c&&(s=wr(t,f,s,c)+c):p&&(a+=p),this.add(M,"setProperty",s,a,r,n,0,0,f);else if("undefined"!==u){if(C&&f in C?(s="function"==typeof C[f]?C[f].call(i,r,t,n):C[f],f in H.units&&!xe(s)&&(s+=H.units[f]),"="===(s+"").charAt(1)&&(s=Tr(t,f))):s=Tr(t,f),h=parseFloat(s),(d="string"===u&&"="===a.charAt(1)?+(a.charAt(0)+"1"):0)&&(a=a.substr(2)),o=parseFloat(a),f in Zi&&("autoAlpha"===f&&(1===h&&"hidden"===Tr(t,"visibility")&&o&&(h=0),xr(this,M,"visibility",h?"inherit":"hidden",o?"inherit":"hidden",!o)),"scale"!==f&&"transform"!==f&&~(f=Zi[f]).indexOf(",")&&(f=f.split(",")[0])),_=f in Yi)if(m||((g=t._gsap).renderTransform&&!e.parseTransform||Rr(t,e.parseTransform),v=!1!==e.smoothOrigin&&g.smooth,(m=this._pt=new Bi(this._pt,M,hr,0,1,g.renderTransform,g,0,-1)).dep=1),"scale"===f)this._pt=new Bi(this._pt,g,"scaleY",g.scaleY,d?d*o:o-g.scaleY),S.push("scaleY",f),f+="X";else{if("transformOrigin"===f){b=void 0,w=void 0,T=void 0,w=(b=(x=a).split(" "))[0],T=b[1]||"50%","top"!==w&&"bottom"!==w&&"left"!==T&&"right"!==T||(x=w,w=T,T=x),b[0]=Mr[w]||w,b[1]=Mr[T]||T,a=b.join(" "),g.svg?Dr(t,a,0,v,0,this):((c=parseFloat(a.split(" ")[2])||0)!==g.zOrigin&&xr(this,g,"zOrigin",g.zOrigin,c),xr(this,M,f,Fr(s),Fr(a)));continue}if("svgOrigin"===f){Dr(t,a,1,v,0,this);continue}if(f in Br){Nr(this,g,f,h,a,d);continue}if("smoothOrigin"===f){xr(this,g,"smooth",g.smooth,a);continue}if("force3D"===f){g[f]=a;continue}if("transform"===f){Vr(this,a,t);continue}}else f in M||(f=cr(f)||f);if(_||(o||0===o)&&(h||0===h)&&!Hi.test(a)&&f in M)o||(o=0),(p=(s+"").substr((h+"").length))!==(c=xe(a)||(f in H.units?H.units[f]:p))&&(h=wr(t,f,s,c)),this._pt=new Bi(this._pt,_?g:M,f,h,d?d*o:o-h,_||"px"!==c&&"zIndex"!==f||!1===e.autoRound?$i:Ki),this._pt.u=c||0,p!==c&&(this._pt.b=s,this._pt.r=Ji);else if(f in M)Sr.call(this,t,f,s,a);else{if(!(f in t)){St(f,a);continue}this.add(t,f,t[f],a,r,n)}S.push(f)}y&&Pi(this)},get:Tr,aliases:Zi,getSetter:function(t,e,i){var r=Zi[e];return r&&r.indexOf(",")<0&&(e=r),e in Yi&&e!==ur&&(t._gsap.x||Tr(t,"x"))?i&&Wi===i?"scale"===e?sr:nr:(Wi=i||{})&&("scale"===e?ar:or):t.style&&!ot(t.style[e])?ir:~e.indexOf("-")?rr:xi(t,e)},core:{_removeProperty:yr,_getMatrix:zr}};Di.utils.checkPrefix=cr,Xr=qt("x,y,z,scale,scaleX,scaleY,xPercent,yPercent"+","+(Ur="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Yi[t]=1})),qt(Ur,(function(t){H.units[t]="deg",Br[t]=1})),Zi[Xr[13]]="x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+Ur,qt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");Zi[e[1]]=Xr[e[0]]})),qt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){H.units[t]="px"})),Di.registerPlugin(Gr);var Hr=Di.registerPlugin(Gr)||Di;Hr.core.Tween;let Zr=()=>window.pageYOffset,$r=(t,e="source-over",i=null)=>{t.globalCompositeOperation=e;let r=t.globalCompositeOperation===e;return r||null==i||(t.globalCompositeOperation=i),r},Qr=(t,e,i,r)=>{let n=e.width/i.width,s=e.height/i.height,a={width:r.width*n,height:r.height*s},o=a.width/e.width,h=a.height/e.height;t.drawImage(e,Math.round(-i.x*o),Math.round(-i.y*h),Math.round(a.width),Math.round(a.height))};(t=>{let e={ready:!1,canvas:null,ctx:null,map:null,mapScale:1,mapScales:2,mapMaxScale:2.5,mapCache:null,mapBuffer:null,mapBufferCtx:null,mapBufferScale:0,mapBufferSize:{x:2048,y:2048},mapBufferMargin:400,mapBufferOffset:null,mapBufferLast:null,mapSVG:null,mapWidth:null,mapHeight:null,points:null,pointsPos:null,cameraPath:null,cameraBreakpoints:null,cameraSubdivisions:null,cameraSubdivisionSize:1,cameraLength:0,trailPath:null,trailPathData:null,trailBreakpoints:null,trailSubdivisions:null,trailSubdivisionSize:1,trailLength:0,labels:null,sections:null,sectionsBounds:null,sectionsIcons:null,imagesBounds:null,lastScroll:0,scrollAnim:null,textWidth:0,initialState:()=>({sectionIndex:0,section:null,sectionBounds:{top:0,bottom:0,height:0},cameraSegment:{start:0,end:0,length:0},trailSegment:{start:0,end:0,length:0},pos:0,width:0,height:0,zoom:1}),defaultProps:()=>({textContainer:null,mapSrc:null,trailColor:null,trailWidth:null,trailDash:[2,4],trailVisitedColor:"#DB466E",trailVisitedWidth:4,pointColor:null,pointRadius:null,pointFutureColor:"#aaa",pointPresentColor:null,pointPastColor:null,fontPastColor:"#666",fontPresentColor:"#000",fontFutureColor:"#aaa"}),get trailColor(){return void 0!==this.props&&null!=this.props.trailColor?this.props.trailColor:null==this.trailPath?"RGBA(38, 46, 69, 0.33)":this.trailPath.getAttribute("stroke")},get trailWidth(){return void 0!==this.props&&null!=this.props.trailWidth?this.props.trailColor:null==this.trailPath?2:parseFloat(this.trailPath.getAttribute("stroke-width")||2)},init(){let t=window.innerWidth,e=window.innerHeight;var i;this.state={width:t,height:e},this.canvas=r(t,e),this.canvas.style.position="absolute",this.canvas.style.top=0,this.canvas.style.left=0,this.ctx=this.canvas.getContext("2d",{alpha:!1}),this.ctx.fillStyle="#fff",this.ctx.fillRect(0,0,this.state.width,this.state.height),this.container.appendChild(this.canvas),this.calculateSections(),Array.from(this.props.textContainer.querySelectorAll("img")).forEach((t=>{t.addEventListener("load",(t=>{this.calculateSections(),this.renderMap()}))})),this.scrollAnim={value:0},(i=this.props.mapSrc,new Promise(((t,e)=>{var r=new XMLHttpRequest;r.open("GET",i),r.onload=i=>{200===r.status?t(r.response):e(r)},r.send()}))).then((t=>{var e;this.mapSVG=Array.from((new DOMParser).parseFromString(t,"image/svg+xml").childNodes).filter((t=>{let e=t.tagName;return void 0!==e&&"svg"===e.toLowerCase()}))[0],this.cameraPath=this.mapSVG.querySelector("#camera-path path"),this.trailPath=this.mapSVG.querySelector("#trail-path path"),this.points=Array.from(this.mapSVG.querySelectorAll("#points circle")).map((t=>{let[e,i]=[parseFloat(t.getAttribute("cx")),parseFloat(t.getAttribute("cy"))];return{x:e,y:i,length:m(this.trailPath,{x:e,y:i}),label:(t.getAttribute("id")||"").replace(/_/g," "),color:t.getAttribute("fill")||"black",radius:parseFloat(t.getAttribute("r"))}})).sort(((t,e)=>t.length-e.length)),this.cameraSubdivisions=g(this.cameraPath,this.cameraSubdivisionSize,!0),this.cameraLength=d(this.cameraPath),this.cameraBreakpoints=this.setupBreakpoints(this.cameraPath),this.trailSubdivisions=g(this.trailPath,this.trailSubdivisionSize,!0),this.trailBreakpoints=this.setupBreakpoints(this.trailPath),this.trailLength=d(this.trailPath),(e=this.props.mapSrc,new Promise(((t,i)=>{let r=new Image;r.addEventListener("load",(e=>{t(r)})),r.src=e}))).then((t=>{var e;this.mapWidth=t.width,this.mapHeight=t.height,0===this.mapHeight&&(this.mapWidth=2040,this.mapHeight=1178),this.map=(e=this.mapScales,Array.from(Array(e))).map(((e,i)=>{let n=1+(this.mapMaxScale-1)/(this.mapScales-1)*i,s=r(this.mapWidth*n,this.mapHeight*n),a=s.getContext("2d",{alpha:!1});return a.fillStyle="white",a.fillRect(0,0,this.mapWidth*n,this.mapHeight*n),a.drawImage(t,0,0,this.mapWidth*n,this.mapHeight*n),{map:s,scale:n}})),this.mapBuffer=r(1,1),this.mapBufferCtx=this.mapBuffer.getContext("2d",{alpha:!1}),this.updateMapBufferSize(),this.mapBufferCtx.fillStyle="white",this.mapBufferCtx.fillRect(0,0,this.mapBufferSize.x,this.mapBufferSize.y),this.mapBufferOffset={x:0,y:0},this.mapBufferScale=this.mapScale,this.ready=!0,document.addEventListener("scroll",this.onScroll.bind(this)),this.onScroll()}))})),window.addEventListener("resize",this.onResize.bind(this))},setupBreakpoints(t){return this.points.map((e=>m(t,e))).map(((t,e)=>"true"===this.sections[e].getAttribute("data-stay")?[t,t]:[t])).reduce(((t,e)=>t.concat(e)),[])},getMapBufferSize(){return{x:this.state.width+2*this.mapBufferMargin,y:this.state.height+2*this.mapBufferMargin}},updateMapBufferSize(){this.mapBufferSize=this.getMapBufferSize(),this.mapBuffer.setAttribute("width",this.mapBufferSize.x),this.mapBuffer.setAttribute("height",this.mapBufferSize.y),this.mapBufferLast={zoom:-1,pos:{x:-1,y:-1}}},calculateSections(){let t=Zr();this.sections=Array.from(this.props.textContainer.querySelectorAll(".js-section")),this.sectionsBounds=this.sections.map((e=>{let i=e.getBoundingClientRect();return{top:i.top+t,bottom:i.bottom+t,left:i.left,right:i.right,height:i.height,width:i.width}})),this.sectionsIcons=this.sections.map((t=>{let e=t.getAttribute("data-icon");if(null!=e){let t=document.createElement("img");return t.setAttribute("src",e),t}return null})),this.imagesBounds=this.sections.map((e=>Array.from(e.querySelectorAll(".js-image")).map((e=>{let i=e.getBoundingClientRect();return{top:i.top+t,bottom:i.bottom+t,left:i.left,right:i.right,height:i.height,mapPos:parseFloat(e.getAttribute("data-pos"))}}))))},onScroll(){let t=Zr(),e=0,i=Math.abs(t-this.lastScroll);i=Math.sqrt(u(i/10)),this.lastScroll=t,e=.2*i,Hr.to(this.scrollAnim,e,{value:t,onUpdate:()=>{this.updateScroll(this.scrollAnim.value)},onComplete:()=>{this.updateScroll(this.scrollAnim.value)}})},updateScroll(t){let e=this.sectionsBounds.findIndex(((e,i,r)=>{if(i===r.length-1)return!0;let n=r[i+1],s=void 0!==n&&t<n.top;return t<e.bottom||s})),i=this.sectionsBounds[e],r=this.sections[e],n=u((t-i.top)/i.height,0,1),s={start:this.cameraBreakpoints[e],end:this.cameraBreakpoints[u(e+1,this.cameraBreakpoints.length-1)]};s.length=s.end-s.start;let a={start:this.trailBreakpoints[e],end:this.trailBreakpoints[u(e+1,this.trailBreakpoints.length-1)]};a.length=a.end-a.start,this.state={sectionIndex:e,section:r,sectionBounds:i,pos:n,cameraSegment:s,trailSegment:a}},onResize(){this.state={width:window.innerWidth,height:window.innerHeight},this.updateMapBufferSize(),this.canvas.width=this.state.width,this.canvas.height=this.state.height,this.calculateSections(),this.onScroll()},getZoom(){return this.getZoomAtPercent(this.state.pos)},drawMapBuffer(t,e,i){t.fillStyle="white",t.fillRect(0,0,this.mapBufferSize.x,this.mapBufferSize.y);let r=0;for(;i>this.map[r].scale&&r<this.map.length-1;)r++;let n=this.map[r],s=h((l=e,f=n.scale,o(a,l,f)),this.mapBufferMargin),u=n.scale/i;var l,f;return Qr(t,n.map,Object.assign({},s,{width:this.mapBufferSize.x*u,height:this.mapBufferSize.y*u}),{x:0,y:0,width:this.mapBufferSize.x,height:this.mapBufferSize.y}),{offset:s,scale:u,mapScale:n.scale}},getCameraPosAtPercent(t){return _(this.cameraSubdivisions,t)},getMapSliceAtPercent(t){isNaN(t)&&(t=1);let e=this.getCameraPosAtPercent(t),i=this.getZoomAtPercent(t),[r,n]=[this.state.width/i,this.state.height/i],s=this.state.width>720?.66:.5;return{x:e.x-r*s,y:e.y-.33*n,width:r,height:n,zoom:i,cameraPos:e}},getPosAtPercent(t){return this.state.pos},getZoomAtPercent(t){let e=this.state.sectionIndex,i=this.getPosAtPercent(),r=this.sections[e],n=this.sections[u(e+1,this.sections.length-1)],s=(this.sections[u(e-1,0,this.sections.length-1)],(t,e,i=1)=>{let r=t.getAttribute(e);return null==r?i:parseFloat(r)}),a=t=>s(t,"data-zoom-middle",o(t)),o=t=>s(t,"data-zoom-start",1),h=i<=.5?o(r):a(r),f=i<=.5?a(r):o(n);return l(1===i?1:i/.5-Math.floor(i/.5),h,f,p)},renderMap(){if(!this.ready)return;let t=t=>{let e=Zr(),i=_(this.trailSubdivisions,l(t.mapPos,v.start,v.end)/this.trailLength),r=window.innerHeight/2,n=1.2*r,s=t.top+t.height/2-e,a=(n-Math.abs(r-s))/n;if(a=f(u(a)),a<=0)return;let o=S(i);o={x:o[0],y:o[1]};let h=(t,e)=>[t,e];((t,e)=>{t=h(...t),e=h(...e);let i=(t,e)=>Math.atan2(e-o.y,t-o.x);const r=Math.PI,n=2*r;let s=i(...t)+n,u=i(...e)+n,l=Math.atan2(Math.sin(s-u),Math.cos(s-u)),f=2*a,p=s-l/2+r/2,c=(f+1)*Math.cos(p),d=(f+1)*Math.sin(p),_=.3*a;this.ctx.fillStyle=`rgba(220,220,202,${_})`,$r(this.ctx,"darken","source-over"),this.ctx.beginPath(),this.ctx.moveTo(o.x+c,o.y+d),this.ctx.lineTo(...t),this.ctx.lineTo(...e),this.ctx.lineTo(o.x-c,o.y-d),this.ctx.lineWidth=5*a,this.ctx.arc(o.x,o.y,f,p+r,p),this.ctx.fill(),this.ctx.beginPath(),this.ctx.arc(o.x,o.y,f,p,p+n),this.ctx.fill(),$r(this.ctx),this.ctx.fillStyle="#405b54";let m=4*a;this.ctx.beginPath(),this.ctx.arc(o.x,o.y,m,0,n),this.ctx.fill()})([t.top-e<o.y?t.right:t.left,t.top-e],[t.bottom-e<o.y?t.left:t.right,t.right<o.x?t.bottom-e:t.top-e])},e=(t,e=1,i=-1)=>{this.ctx.beginPath(),this.ctx.moveTo(...S(t[0]));let r=!1;for(let n=1;n<(-1===i?t.length:u(i,t.length));n+=e){let e=r?this.ctx.moveTo:this.ctx.lineTo,i=S(t[n]);i[0]>=0&&i[1]>=0&&i[0]<this.state.width&&i[1]<this.state.height?(r=!1,e.call(this.ctx,...i)):r=!0}this.ctx.stroke()},i=t=>y>=t.length,r=(t,e,r,n=null)=>{null==n&&(n=e);let s=this.points[t],a=this.points[t+1]||null;return i(s)?null==a?r:i(a)?e:r:n},s=(t,e)=>{this.ctx.fillStyle=r(e,this.props.pointPastColor||t.color,this.props.pointPresentColor||t.color,this.props.pointFutureColor),this.ctx.beginPath(),this.ctx.arc(...S(t),this.props.pointRadius||t.radius,0,2*Math.PI),this.ctx.fill()},a=(t,e)=>{this.ctx.font=`${r(e,"normal","bold")} ${r(e,15,18)}px Arial`,this.ctx.textAlign="left",this.ctx.textBaseline="middle",this.ctx.fillStyle=r(e,this.props.fontPastColor,this.props.fontPresentColor,this.props.fontFutureColor),this.ctx.strokeStyle="#e3dac9",this.ctx.lineWidth=2;let i=o(n,t,{x:20*T,y:0});this.ctx.strokeText(t.label,...S(i)),this.ctx.fillText(t.label,...S(i))},h=()=>{let t=Math.abs(w-this.mapBufferLast.zoom),e=Math.abs(b.x-this.mapBufferLast.pos.x),i=Math.abs(b.y-this.mapBufferLast.pos.y),r=0;for(;w>this.map[r].scale&&r<this.map.length-1;)r++;let n=this.map[r].scale;e<this.mapBufferMargin/3&&i<this.mapBufferMargin/3&&t<1&&(w!==n||this.mapBufferLast.zoom===n)||(this.mapBufferLast={zoom:w,pos:{x:b.x,y:b.y}},c())},p=!1,c=()=>{p=!0;let t=this.drawMapBuffer(this.mapBufferCtx,b,w);this.mapBufferScale=t.scale,this.mapBufferOffset=t.offset,this.mapScale=t.mapScale},d=(this.cameraPath,this.state.pos),m=(this.state.section,this.state.sectionIndex),g=this.state.cameraSegment,v=this.state.trailSegment,y=l(d,v.start,v.end,(t=>u(1.2*t))),x=Math.round(y/this.trailSubdivisionSize),b=(this.trailSubdivisions[u(x,this.trailSubdivisions.length-1)],this.trailSubdivisions[u(x-1,this.trailSubdivisions.length-1)],this.sectionsIcons[m],this.getMapSliceAtPercent(l(d,g.start,g.end)/this.cameraLength)),w=b.zoom,T=1/w,S=(b.cameraPos,(t,e)=>"object"==typeof t?S(t.x,t.y):[(t-b.x)*w,(e-b.y)*w]);this.ctx.fillStyle="#fff",this.ctx.fillRect(0,0,1*this.canvas.width,1*this.canvas.height),(()=>{if(h(),p)this.ctx.drawImage(this.mapBuffer,Math.round(-this.mapBufferMargin/this.mapBufferScale),Math.round(-this.mapBufferMargin/this.mapBufferScale));else{let t={x:(b.x*this.mapScale-this.mapBufferOffset.x)/this.mapBufferScale,y:(b.y*this.mapScale-this.mapBufferOffset.y)/this.mapBufferScale,width:b.width*this.mapScale/this.mapBufferScale,height:b.height*this.mapScale/this.mapBufferScale},e={x:0,y:0,width:this.state.width,height:this.state.height};Qr(this.ctx,this.mapBuffer,t,e)}})(),(()=>{this.ctx.lineWidth=this.trailWidth,this.ctx.strokeStyle=this.trailColor,this.ctx.lineCap="round",this.ctx.setLineDash(this.props.trailDash),e(this.trailSubdivisions,4),this.ctx.lineWidth=this.props.trailVisitedWidth,this.ctx.setLineDash([]),this.ctx.strokeStyle=this.props.trailVisitedColor,this.ctx.lineCap="butt",e(this.trailSubdivisions,2,x)})(),(()=>{this.points.forEach(s)})(),(()=>{this.points.forEach(a)})(),(()=>{this.imagesBounds[this.state.sectionIndex].forEach(t)})();let M=$r(this.ctx,"screen"),C=this.ctx.createLinearGradient(this.sectionsBounds[0].right,0,this.sectionsBounds[0].right+200,0);C.addColorStop(0,"rgba(255, 255, 255, 0.85)"),C.addColorStop(1,"rgba(255, 255, 255, 0)"),this.ctx.fillStyle=C,this.ctx.fillRect(0,0,this.sectionsBounds[0].right+200,this.state.height),M&&$r(this.ctx)},render(){this.renderMap()}};return Object.assign(i(t),e)})({textContainer:document.querySelector(".text"),mapSrc:"img/map.svg",trailVisitedColor:"#AF3C43",fontPresentColor:"#5D5C56"}).appendTo(".container")})();