vendor: 10,571 bytes, lines 1-10
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t} 2/*! 3 * GSAP 3.11.3 4 * https://greensock.com 5 * 6 * @license Copyright 2008-2022, GreenSock. All rights reserved. 7 * Subject to the terms at https://greensock.com/standard-license or for 8 * Club GreenSock members, the agreement issued with that membership. 9 * @author: Jack Doyle, [email protected] 10 */var n={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},s={duration:.5,overwrite:!1,delay:0},o,r,a,l=1e8,c=1e-8,h=2*Math.PI,u=h/4,d=0,f=Math.sqrt,p=Math.cos,g=Math.sin,m=function t(e){return"string"==typeof e},v=function t(e){return"function"==typeof e},b=function t(e){return"number"==typeof e},y=function t(e){return void 0===e},w=function t(e){return"object"==typeof e},x=function t(e){return!1!==e},_=function t(){return"undefined"!=typeof window},T=function t(e){return v(e)||m(e)},P="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},S=Array.isArray,E=/(?:-?\.?\d|\.)+/gi,M=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,O=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,C=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,k=/[+-]=-?[.\d]+/,A=/[^,'"\[\]\s]+/gi,R=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,z,L,D,I,F={},j={},B,H=function t(e){return(j=bt(e,F))&&Xi},N=function t(e,i){return console.warn("Invalid property",e,"set to",i,"Missing plugin? gsap.registerPlugin()")},X=function t(e,i){return!i&&console.warn(e)},Y=function t(e,i){return e&&(F[e]=i)&&j&&(j[e]=i)||F},W=function t(){return 0},q={suppressEvents:!0,isStart:!0,kill:!1},V={suppressEvents:!0,kill:!1},Z={suppressEvents:!0},U={},G=[],K={},J,Q={},tt={},et=30,it=[],nt="",st=function t(e){var i=e[0],n,s;if(w(i)||v(i)||(e=[e]),!(n=(i._gsap||{}).harness)){for(s=it.length;s--&&!it[s].targetTest(i););n=it[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new Qe(e[s],n)))||e.splice(s,1);return e},ot=function t(e){return e._gsap||st(ee(e))[0]._gsap},rt=function t(e,i,n){return(n=e[i])&&v(n)?e[i]():y(n)&&e.getAttribute&&e.getAttribute(i)||n},at=function t(e,i){return(e=e.split(",")).forEach(i)||e},lt=function t(e){return Math.round(1e5*e)/1e5||0},ct=function t(e){return Math.round(1e7*e)/1e7||0},ht=function t(e,i){var n=i.charAt(0),s=parseFloat(i.substr(2));return e=parseFloat(e),"+"===n?e+s:"-"===n?e-s:"*"===n?e*s:e/s},ut=function t(e,i){for(var n=i.length,s=0;e.indexOf(i[s])<0&&++s<n;);return s<n},dt=function t(){var e=G.length,i=G.slice(0),n,s;for(K={},G.length=0,n=0;n<e;n++)(s=i[n])&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},ft=function t(e,i,n,s){G.length&&dt(),e.render(i,n,s||r&&i<0&&(e._initted||e._startAt)),G.length&&dt()},pt=function t(e){var i=parseFloat(e);return(i||0===i)&&(e+"").match(A).length<2?i:m(e)?e.trim():e},gt=function t(e){return e},mt=function t(e,i){for(var n in i)n in e||(e[n]=i[n]);return e},vt=function t(e){return function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}},bt=function t(e,i){for(var n in i)e[n]=i[n];return e},yt=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=w(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},wt=function t(e,i){var n={},s;for(s in e)s in i||(n[s]=e[s]);return n},xt=function t(e){var i=e.parent||z,n=e.keyframes?vt(S(e.keyframes)):mt;if(x(e.inherit))for(;i;)n(e,i.vars.defaults),i=i.parent||i._dp;return e},_t=function t(e,i){for(var n=e.length,s=n===i.length;s&&n--&&e[n]===i[n];);return n<0},Tt=function t(e,i,n,s,o){void 0===n&&(n="_first"),void 0===s&&(s="_last");var r=e[s],a;if(o)for(a=i[o];r&&r[o]>a;)r=r._prev;return r?(i._next=r._next,r._next=i):(i._next=e[n],e[n]=i),i._next?i._next._prev=i:e[s]=i,i._prev=r,i.parent=i._dp=e,i},Pt=function t(e,i,n,s){void 0===n&&(n="_first"),void 0===s&&(s="_last");var o=i._prev,r=i._next;o?o._next=r:e[n]===i&&(e[n]=r),r?r._prev=o:e[s]===i&&(e[s]=o),i._next=i._prev=i.parent=null},St=function t(e,i){e.parent&&(!i||e.parent.autoRemoveChildren)&&e.parent.remove(e),e._act=0},Et=function t(e,i){if(e&&(!i||i._end>e._dur||i._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Mt=function t(e){for(var i=e.parent;i&&i.parent;)i._dirty=1,i.totalDuration(),i=i.parent;return e},Ot=function t(e,i,n,s){return e._startAt&&(r?e._startAt.revert(V):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(i,!0,s))},Ct=function t(e){return!e||e._ts&&t(e.parent)},kt=function t(e){return e._repeat?At(e._tTime,e=e.duration()+e._rDelay)*e:0},At=function t(e,i){var n=Math.floor(e/=i);return e&&n===e?n-1:n},Rt=function t(e,i){return(e-i._start)*i._ts+(i._ts>=0?0:i._dirty?i.totalDuration():i._tDur)},zt=function t(e){return e._end=ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||c)||0))},Lt=function t(e,i){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=ct(n._time-(e._ts>0?i/e._ts:((e._dirty?e.totalDuration():e._tDur)-i)/-e._ts)),zt(e),n._dirty||Et(n,e)),e},Dt=function t(e,i){var n;if((i._time||i._initted&&!i._dur)&&(n=Rt(e.rawTime(),i),(!i._dur||Ut(0,i.totalDuration(),n)-i._tTime>c)&&i.render(n,!0)),Et(e,i)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-1e-8}},It=function t(e,i,n,s){return i.parent&&St(i),i._start=ct((b(n)?n:n||e!==z?qt(e,n,i):e._time)+i._delay),i._end=ct(i._start+(i.totalDuration()/Math.abs(i.timeScale())||0)),Tt(e,i,"_first","_last",e._sort?"_start":0),Ht(i)||(e._recent=i),s||Dt(e,i),e._ts<0&&Lt(e,e._tTime),e},Ft=function t(e,i){return(F.ScrollTrigger||N("scrollTrigger",i))&&F.ScrollTrigger.create(i,e)},jt=function t(e,i,n,s,o){return li(e,i,o),e._initted?!n&&e._pt&&!r&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&J!==Re.frame?(G.push(e),e._lazy=[o,s],1):void 0:1},Bt=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},Ht=function t(e){var i=e.data;return"isFromStart"===i||"isStart"===i},Nt=function t(e,i,n,s){var o=e.ratio,a=i<0||!i&&(!e._start&&Bt(e)&&(e._initted||!Ht(e))||(e._ts<0||e._dp._ts<0)&&!Ht(e))?0:1,l=e._rDelay,h=0,u,d,f;if(l&&e._repeat&&(h=Ut(0,e._tDur,i),d=At(h,l),e._yoyo&&1&d&&(a=1-a),d!==At(e._tTime,l)&&(o=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==o||r||s||e._zTime===c||!i&&e._zTime){if(!e._initted&&jt(e,i,s,n,h))return;for(f=e._zTime,e._zTime=i||(n?c:0),n||(n=i&&!f),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=h,u=e._pt;u;)u.r(a,u.d),u=u._next;i<0&&Ot(e,i,n,!0),e._onUpdate&&!n&&be(e,"onUpdate"),h&&e._repeat&&!n&&e.parent&&be(e,"onRepeat"),(i>=e._tDur||i<0)&&e.ratio===a&&(a&&St(e,1),n||r||(be(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=i)},Xt=function t(e,i,n){var s;if(n>i)for(s=e._first;s&&s._start<=n;){if("isPause"===s.data&&s._start>i)return s;s=s._next}else for(s=e._last;s&&s._start>=n;){if("isPause"===s.data&&s._start<i)return s;s=s._prev}},Yt=function t(e,i,n,s){var o=e._repeat,r=ct(i)||0,a=e._tTime/e._tDur;return a&&!s&&(e._time*=r/e._dur),e._dur=r,e._tDur=o?o<0?1e10:ct(r*(o+1)+e._rDelay*o):r,a>0&&!s&&Lt(e,e._tTime=e._tDur*a),e.parent&&zt(e),n||Et(e.parent,e),e},Wt=function t(e){return e instanceof ei?Et(e):Yt(e,e._dur)},$t={_start:0,endTime:W,totalDuration:W},qt=function t(e,i,n){var s=e.labels,o=e._recent||$t,r=e.duration()>=l?o.endTime(!1):e._dur,a,c,h;return m(i)&&(isNaN(i)||i in s)?(c=i.charAt(0),h="%"===i.substr(-1),a=i.indexOf("="),"<"===c||">"===c?(a>=0&&(i=i.replace(/=/,"")),("<"===c?o._start:o.endTime(o._repeat>=0))+(parseFloat(i.substr(1))||0)*(h?(a<0?o:n).totalDuration()/100:1)):a<0?(i in s||(s[i]=r),s[i]):(c=parseFloat(i.charAt(a-1)+i.substr(a+1)),h&&n&&(c=c/100*(S(n)?n[0]:n).totalDuration()),a>1?t(e,i.substr(0,a-1),n)+c:r+c)):null==i?r:+i},Vt=function t(e,i,n){var s=b(i[1]),o=(s?2:1)+(e<2?0:1),r=i[o],a,l;if(s&&(r.duration=i[1]),r.parent=n,e){for(a=r,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=x(l.vars.inherit)&&l.parent;r.immediateRender=x(a.immediateRender),e<2?r.runBackwards=1:r.startAt=i[o-1]}return new gi(i[0],r,i[o+1])},Zt=function t(e,i){return e||0===e?i(e):i},Ut=function t(e,i,n){return n<e?e:n>i?i:n},Gt=function t(e,i){return m(e)&&(i=R.exec(e))?i[1]:""},Kt=function t(e,i,n){return Zt(n,(function(t){return Ut(e,i,t)}))},Jt=[].slice,Qt=function t(e,i){return e&&w(e)&&"length"in e&&(!i&&!e.length||e.length-1 in e&&w(e[0]))&&!e.nodeType&&e!==L},te=function t(e,i,n){return void 0===n&&(n=[]),e.forEach((function(t){var e;return m(t)&&!i||Qt(t,1)?(e=n).push.apply(e,ee(t)):n.push(t)}))||n},ee=function t(e,i,n){return a&&!i&&a.selector?a.selector(e):!m(e)||n||!D&&ze()?S(e)?te(e,n):Qt(e)?Jt.call(e,0):e?[e]:[]:Jt.call((i||I).querySelectorAll(e),0)},ie=function t(e){return e=ee(e)[0]||X("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return ee(t,i.querySelectorAll?i:i===e?X("Invalid scope")||I.createElement("div"):e)}},ne=function t(e){return e.sort((function(){return.5-Math.random()}))},se=function t(e){if(v(e))return e;var i=w(e)?e:{each:e},n=Xe(i.ease),s=i.from||0,o=parseFloat(i.base)||0,r={},a=s>0&&s<1,c=isNaN(s)||a,h=i.axis,u=s,d=s;return m(s)?u=d={center:.5,edges:.5,end:1}[s]||0:!a&&c&&(u=s[0],d=s[1]),function(t,e,a){var p=(a||i).length,g=r[p],m,v,b,y,w,x,_,T,P;if(!g){if(!(P="auto"===i.grid?0:(i.grid||[1,l])[1])){for(_=-l;_<(_=a[P++].getBoundingClientRect().left)&&P<p;);P--}for(g=r[p]=[],m=c?Math.min(P,p)*u-.5:s%P,v=P===l?0:c?p*d/P-.5:s/P|0,_=0,T=l,x=0;x<p;x++)b=x%P-m,y=v-(x/P|0),g[x]=w=h?Math.abs("y"===h?y:b):f(b*b+y*y),w>_&&(_=w),w<T&&(T=w);"random"===s&&ne(g),g.max=_-T,g.min=T,g.v=p=(parseFloat(i.amount)||parseFloat(i.each)*(P>p?p-1:h?"y"===h?p/P:P:Math.max(P,p/P))||0)*("edges"===s?-1:1),g.b=p<0?o-p:o,g.u=Gt(i.amount||i.each)||0,n=n&&p<0?He(n):n}return p=(g[t]-g.min)/g.max||0,ct(g.b+(n?n(p):p)*g.v)+g.u}},oe=function t(e){var i=Math.pow(10,((e+"").split(".")[1]||"").length);return function(t){var n=ct(Math.round(parseFloat(t)/e)*e*i);return(n-n%1)/i+(b(t)?0:Gt(t))}},re=function t(e,i){var n=S(e),s,o;return!n&&w(e)&&(s=n=e.radius||l,e.values?(e=ee(e.values),(o=!b(e[0]))&&(s*=s)):e=oe(e.increment)),Zt(i,n?v(e)?function(t){return o=e(t),Math.abs(o-t)<=s?o:t}:function(t){for(var i=parseFloat(o?t.x:t),n=parseFloat(o?t.y:0),r=l,a=0,c=e.length,h,u;c--;)(h=o?(h=e[c].x-i)*h+(u=e[c].y-n)*u:Math.abs(e[c]-i))<r&&(r=h,a=c);return a=!s||r<=s?e[a]:t,o||a===t||b(t)?a:a+Gt(t)}:oe(e))}
10,ae=function t(e,i,n,s){return Zt(S(e)?!i:!0===n?!!(n=0):!s,(function(){return S(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(s=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(i-e+.99*n))/n)*n*s)/s}))},le=function t(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return function(t){return i.reduce((function(t,e){return e(t)}),t)}},ce=function t(e,i){return function(t){return e(parseFloat(t))+(i||Gt(t))}},he=function t(e,i,n){return ge(e,i,0,1,n)},ue=function t(e,i,n){return Zt(n,(function(t){return e[~~i(t)]}))},de=function t(e,i,n){var s=i-e;return S(e)?ue(e,t(0,e.length),i):Zt(n,(function(t){return(s+(t-e)%s)%s+e}))},fe=function t(e,i,n){var s=i-e,o=2*s;return S(e)?ue(e,t(0,e.length-1),i):Zt(n,(function(t){return e+((t=(o+(t-e)%o)%o||0)>s?o-t:t)}))},pe=function t(e){for(var i=0,n="",s,o,r,a;~(s=e.indexOf("random(",i));)r=e.indexOf(")",s),a="["===e.charAt(s+7),o=e.substr(s+7,r-s-7).match(a?A:E),n+=e.substr(i,s-i)+ae(a?o:+o[0],a?0:+o[1],+o[2]||1e-5),i=r+1;return n+e.substr(i,e.length-i)},ge=function t(e,i,n,s,o){var r=i-e,a=s-n;return Zt(o,(function(t){return n+((t-e)/r*a||0)}))},me=function t(e,i,n,s){var o=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!o){var r=m(e),a={},l,c,h,u,d;if(!0===n&&(s=1)&&(n=null),r)e={p:e},i={p:i};else if(S(e)&&!S(i)){for(h=[],u=e.length,d=u-2,c=1;c<u;c++)h.push(t(e[c-1],e[c]));u--,o=function t(e){e*=u;var i=Math.min(d,~~e);return h[i](e-i)},n=i}else s||(e=bt(S(e)?[]:{},e));if(!h){for(l in i)ni.call(a,e,l,"get",i[l]);o=function t(i){return Pi(i,a)||(r?e.p:e)}}}return Zt(n,o)},ve=function t(e,i,n){var s=e.labels,o=l,r,a,c;for(r in s)(a=s[r]-i)<0==!!n&&a&&o>(a=Math.abs(a))&&(c=r,o=a);return c},be=function t(e,i,n){var s=e.vars,o=s[i],r=a,l=e._ctx,c,h,u;if(o)return c=s[i+"Params"],h=s.callbackScope||e,n&&G.length&&dt(),l&&(a=l),u=c?o.apply(h,c):o.call(h),a=r,u},ye=function t(e){return St(e),e.scrollTrigger&&e.scrollTrigger.kill(!!r),e.progress()<1&&be(e,"onInterrupt"),e},we,xe=function t(e){var i=(e=!e.name&&e.default||e).name,n=v(e),s=i&&!n&&e.init?function(){this._props=[]}:e,o={init:W,render:Pi,add:ni,kill:Ei,modifier:Si,rawVars:0},r={targetTest:0,get:0,getSetter:wi,aliases:{},register:0};if(ze(),e!==s){if(Q[i])return;mt(s,mt(wt(e,o),r)),bt(s.prototype,bt(o,wt(e,r))),Q[s.prop=i]=s,e.targetTest&&(it.push(s),U[i]=1),i=("css"===i?"CSS":i.charAt(0).toUpperCase()+i.substr(1))+"Plugin"}Y(i,s),e.register&&e.register(Xi,s,Ci)},_e=255,Te={aqua:[0,_e,_e],lime:[0,_e,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_e],navy:[0,0,128],white:[_e,_e,_e],olive:[128,128,0],yellow:[_e,_e,0],orange:[_e,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_e,0,0],pink:[_e,192,203],cyan:[0,_e,_e],transparent:[_e,_e,_e,0]},Pe=function t(e,i,n){return(6*(e+=e<0?1:e>1?-1:0)<1?i+(n-i)*e*6:e<.5?n:3*e<2?i+(n-i)*(2/3-e)*6:i)*_e+.5|0},Se=function t(e,i,n){var s=e?b(e)?[e>>16,e>>8&_e,e&_e]:0:Te.black,o,r,a,l,c,h,u,d,f,p;if(!s){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Te[e])s=Te[e];else if("#"===e.charAt(0)){if(e.length<6&&(o=e.charAt(1),r=e.charAt(2),a=e.charAt(3),e="#"+o+o+r+r+a+a+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(s=parseInt(e.substr(1,6),16))>>16,s>>8&_e,s&_e,parseInt(e.substr(7),16)/255];s=[(e=parseInt(e.substr(1),16))>>16,e>>8&_e,e&_e]}else if("hsl"===e.substr(0,3))if(s=p=e.match(E),i){if(~e.indexOf("="))return s=e.match(M),n&&s.length<4&&(s[3]=1),s}else l=+s[0]%360/360,c=+s[1]/100,o=2*(h=+s[2]/100)-(r=h<=.5?h*(c+1):h+c-h*c),s.length>3&&(s[3]*=1),s[0]=Pe(l+1/3,o,r),s[1]=Pe(l,o,r),s[2]=Pe(l-1/3,o,r);else s=e.match(E)||Te.transparent;s=s.map(Number)}return i&&!p&&(o=s[0]/_e,r=s[1]/_e,a=s[2]/_e,h=((u=Math.max(o,r,a))+(d=Math.min(o,r,a)))/2,u===d?l=c=0:(f=u-d,c=h>.5?f/(2-u-d):f/(u+d),l=u===o?(r-a)/f+(r<a?6:0):u===r?(a-o)/f+2:(o-r)/f+4,l*=60),s[0]=~~(l+.5),s[1]=~~(100*c+.5),s[2]=~~(100*h+.5)),n&&s.length<4&&(s[3]=1),s},Ee=function t(e){var i=[],n=[],s=-1;return e.split(Oe).forEach((function(t){var e=t.match(O)||[];i.push.apply(i,e),n.push(s+=e.length+1)})),i.c=n,i},Me=function t(e,i,n){var s="",o=(e+s).match(Oe),r=i?"hsla(":"rgba(",a=0,l,c,h,u;if(!o)return e;
10if(o=o.map((function(t){return(t=Se(t,i,1))&&r+(i?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),n&&(h=Ee(e),(l=n.c).join(s)!==h.c.join(s)))for(u=(c=e.replace(Oe,"1").split(O)).length-1;a<u;a++)s+=c[a]+(~l.indexOf(a)?o.shift()||r+"0,0,0,0)":(h.length?h:o.length?o:n).shift());if(!c)for(u=(c=e.split(Oe)).length-1;a<u;a++)s+=c[a]+o[a];return s+c[u]},Oe=function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Te)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),Ce=/hsl[a]?\(/,ke=function t(e){var i=e.join(" "),n;if(Oe.lastIndex=0,Oe.test(i))return n=Ce.test(i),e[1]=Me(e[1],n),e[0]=Me(e[0],n,Ee(e[1])),!0},Ae,Re=function(){var t=Date.now,e=500,i=33,n=t(),s=n,o=1e3/240,r=o,a=[],l,c,h,u,d,f,p=function h(p){var g=t()-s,m=!0===p,v,b,y,w;if(g>e&&(n+=g-i),((v=(y=(s+=g)-n)-r)>0||m)&&(w=++u.frame,d=y-1e3*u.time,u.time=y/=1e3,r+=v+(v>=o?4:o-v),b=1),m||(l=c(h)),b)for(f=0;f<a.length;f++)a[f](y,d,w,p)};return u={time:0,frame:0,tick:function t(){p(!0)},deltaRatio:function t(e){return d/(1e3/(e||60))},wake:function t(){B&&(!D&&_()&&(L=D=window,I=L.document||{},F.gsap=Xi,(L.gsapVersions||(L.gsapVersions=[])).push(Xi.version),H(j||L.GreenSockGlobals||!L.gsap&&L||{}),h=L.requestAnimationFrame),l&&u.sleep(),c=h||function(t){return setTimeout(t,r-1e3*u.time+1|0)},Ae=1,p(2))},sleep:function t(){(h?L.cancelAnimationFrame:clearTimeout)(l),Ae=0,c=W},lagSmoothing:function t(n,s){e=n||1e8,i=Math.min(s,e,0)},fps:function t(e){o=1e3/(e||240),r=1e3*u.time+o},add:function t(e,i,n){var s=i?function(t,i,n,o){e(t,i,n,o),u.remove(s)}:e;return u.remove(e),a[n?"unshift":"push"](s),ze(),s},remove:function t(e,i){~(i=a.indexOf(e))&&a.splice(i,1)&&f>=i&&f--},_listeners:a}}(),ze=function t(){return!Ae&&Re.wake()},Le={},De=/^[\d.\-M][\d.\-,\s]/,Ie=/["']/g,Fe=function t(e){for(var i={},n=e.substr(1,e.length-3).split(":"),s=n[0],o=1,r=n.length,a,l,c;o<r;o++)l=n[o],a=o!==r-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),i[s]=isNaN(c)?c.replace(Ie,"").trim():+c,s=l.substr(a+1).trim();return i},je=function t(e){var i=e.indexOf("(")+1,n=e.indexOf(")"),s=e.indexOf("(",i);return e.substring(i,~s&&s<n?e.indexOf(")",n+1):n)},Be=function t(e){var i=(e+"").split("("),n=Le[i[0]];return n&&i.length>1&&n.config?n.config.apply(null,~e.indexOf("{")?[Fe(i[1])]:je(e).split(",").map(pt)):Le._CE&&De.test(e)?Le._CE("",e):n},He=function t(e){return function(t){return 1-e(1-t)}},Ne=function t(e,i){for(var n=e._first,s;n;)n instanceof ei?t(n,i):!n.vars.yoyoEase||n._yoyo&&n._repeat||n._yoyo===i||(n.timeline?t(n.timeline,i):(s=n._ease,n._ease=n._yEase,n._yEase=s,n._yoyo=i)),n=n._next},Xe=function t(e,i){return e&&(v(e)?e:Le[e]||Be(e))||i},Ye=function t(e,i,n,s){void 0===n&&(n=function t(e){return 1-i(1-e)}),void 0===s&&(s=function t(e){return e<.5?i(2*e)/2:1-i(2*(1-e))/2});var o={easeIn:i,easeOut:n,easeInOut:s},r;return at(e,(function(t){for(var e in Le[t]=F[t]=o,Le[r=t.toLowerCase()]=n,o)Le[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Le[t+"."+e]=o[e]})),o},We=function t(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},$e=function t(e,i,n){var s=i>=1?i:1,o=(n||(e?.3:.45))/(i<1?i:1),r=o/h*(Math.asin(1/s)||0),a=function t(e){return 1===e?1:s*Math.pow(2,-10*e)*g((e-r)*o)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:We(a);return o=h/o,l.config=function(i,n){return t(e,i,n)},l},qe=function t(e,i){void 0===i&&(i=1.70158);var n=function t(e){return e?--e*e*((i+1)*e+i)+1:0},s="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:We(n);return s.config=function(i){return t(e,i)},s},Ve,Ze,Ue,Ge,Ke,Je;at("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;Ye(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}))})),Le.Linear.easeNone=Le.none=Le.Linear.easeIn,Ye("Elastic",$e("in"),$e("out"),$e()),Ve=7.5625,Ge=2*(Ue=1/(Ze=2.75)),Ke=2.5*Ue,Ye("Bounce",(function(t){return 1-Je(1-t)}),Je=function t(e){return e<Ue?Ve*e*e:e<Ge?Ve*Math.pow(e-1.5/Ze,2)+.75:e<Ke?Ve*(e-=2.25/Ze)*e+.9375:Ve*Math.pow(e-2.625/Ze,2)+.984375}),Ye("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Ye("Circ",(function(t){return-(f(1-t*t)-1)})),Ye("Sine",(function(t){return 1===t?1:1-p(t*u)})),Ye("Back",qe("in"),qe("out"),qe()),Le.SteppedEase=Le.steps=F.SteppedEase={config:function t(e,i){void 0===e&&(e=1);var n=1/e,s=e+(i?0:1),o=i?1:0,r=.99999999;return function(t){return((s*Ut(0,r,t)|0)+o)*n}}},s.ease=Le["quad.out"],at("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return nt+=t+","+t+"Param
10s,"}));var Qe=function t(e,i){this.id=d++,e._gsap=this,this.target=e,this.harness=i,this.get=i?i.get:rt,this.set=i?i.getSetter:wi},ti=function(){function t(t){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,Yt(this,+t.duration,1,1),this.data=t.data,a&&(this._ctx=a,a.data.push(this)),Ae||Re.wake()}var e=t.prototype;return e.delay=function t(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},e.duration=function t(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},e.totalDuration=function t(e){return arguments.length?(this._dirty=0,Yt(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function t(e,i){if(ze(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Lt(this,e),!n._dp||n.parent||Dt(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&It(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===c||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),ft(this,e,i)),this},e.time=function t(e,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+kt(this))%(this._dur+this._rDelay)||(e?this._dur:0),i):this._time},e.totalProgress=function t(e,i){return arguments.length?this.totalTime(this.totalDuration()*e,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function t(e,i){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+kt(this),i):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function t(e,i){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,i):this._repeat?At(this._tTime,n)+1:1},e.timeScale=function t(e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===e)return this;var i=this.parent&&this._ts?Rt(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||-1e-8===e?0:this._rts,this.totalTime(Ut(-this._delay,this._tDur,i),!0),zt(this),Mt(this)},e.paused=function t(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ze(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==c&&(this._tTime-=c)))),this):this._ps},e.startTime=function t(e){if(arguments.length){this._start=e;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&It(i,this,e-this._delay),this}return this._start},e.endTime=function t(e){return this._start+(x(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function t(e){var i=this.parent||this._dp;return i?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Rt(i.rawTime(e),this):this._tTime:this._tTime},e.revert=function t(e){void 0===e&&(e=Z);var i=r;return r=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),r=i,this},e.globalTime=function t(e){for(var i=this,n=arguments.length?e:i.rawTime();i;)n=i._start+n/(i._ts||1),i=i._dp;return!this.parent&&this.vars.immediateRender?-1:n},e.repeat=function t(e){return arguments.length?(this._repeat=e===1/0?-2:e,Wt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function t(e){if(arguments.length){var i=this._time;return this._rDelay=e,Wt(this),i?this.time(i):this}return this._rDelay},e.yoyo=function t(e){return arguments.length?(this._yoyo=e,this):this._yoyo},e.seek=function t(e,i){return this.totalTime(qt(this,e),x(i))},e.restart=function t(e,i){return this.play().totalTime(e?-this._delay:0,x(i))},e.play=function t(e,i){return null!=e&&this.seek(e,i),this.reversed(!1).paused(!1)},e.reverse=function t(e,i){return null!=e&&this.seek(e||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function t(e,i){return null!=e&&this.seek(e,i),this.paused(!0)},e.resume=function t(){return this.paused(!1)},e.reversed=function t(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-1e-8:0)),this):this._rts<0}
vendor: 16,948 bytes, lines 10-11
10,e.invalidate=function t(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function t(){var e=this.parent||this._dp,i=this._start,n;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=i&&n<this.endTime(!0)-c))},e.eventCallback=function t(e,i,n){var s=this.vars;return arguments.length>1?(i?(s[e]=i,n&&(s[e+"Params"]=n),"onUpdate"===e&&(this._onUpdate=i)):delete s[e],this):s[e]},e.then=function t(e){var i=this;return new Promise((function(t){var n=v(e)?e:gt,s=function e(){var s=i.then;i.then=null,v(n)&&(n=n(i))&&(n.then||n===i)&&(i.then=s),t(n),i.then=s};i._initted&&1===i.totalProgress()&&i._ts>=0||!i._tTime&&i._ts<0?s():i._prom=s}))},e.kill=function t(){ye(this)},t}();mt(ti.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 ei=function(t){function s(e,n){var s;return void 0===e&&(e={}),(s=t.call(this,e)||this).labels={},s.smoothChildTiming=!!e.smoothChildTiming,s.autoRemoveChildren=!!e.autoRemoveChildren,s._sort=x(e.sortChildren),z&&It(e.parent||z,i(s),n),e.reversed&&s.reverse(),e.paused&&s.paused(!0),e.scrollTrigger&&Ft(i(s),e.scrollTrigger),s}e(s,t);var o=s.prototype;return o.to=function t(e,i,n){return Vt(0,arguments,this),this},o.from=function t(e,i,n){return Vt(1,arguments,this),this},o.fromTo=function t(e,i,n,s){return Vt(2,arguments,this),this},o.set=function t(e,i,n){return i.duration=0,i.parent=this,xt(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new gi(e,i,qt(this,n),1),this},o.call=function t(e,i,n){return It(this,gi.delayedCall(0,e,i),n)},o.staggerTo=function t(e,i,n,s,o,r,a){return n.duration=i,n.stagger=n.stagger||s,n.onComplete=r,n.onCompleteParams=a,n.parent=this,new gi(e,n,qt(this,o)),this},o.staggerFrom=function t(e,i,n,s,o,r,a){return n.runBackwards=1,xt(n).immediateRender=x(n.immediateRender),this.staggerTo(e,i,n,s,o,r,a)},o.staggerFromTo=function t(e,i,n,s,o,r,a,l){return s.startAt=n,xt(s).immediateRender=x(s.immediateRender),this.staggerTo(e,i,s,o,r,a,l)},o.render=function t(e,i,n){var s=this._time,o=this._dirty?this.totalDuration():this._tDur,a=this._dur,l=e<=0?0:ct(e),h=this._zTime<0!=e<0&&(this._initted||!a),u,d,f,p,g,m,v,b,y,w,x,_;if(this!==z&&l>o&&e>=0&&(l=o),l!==this._tTime||n||h){if(s!==this._time&&a&&(l+=this._time-s,e+=this._time-s),u=l,y=this._start,m=!(b=this._ts),h&&(a||(s=this._zTime),(e||!i)&&(this._zTime=e)),this._repeat){if(x=this._yoyo,g=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*g+e,i,n);if(u=ct(l%g),l===o?(p=this._repeat,u=a):((p=~~(l/g))&&p===l/g&&(u=a,p--),u>a&&(u=a)),w=At(this._tTime,g),!s&&this._tTime&&w!==p&&(w=p),x&&1&p&&(u=a-u,_=1),p!==w&&!this._lock){var T=x&&1&w,P=T===(x&&1&p);if(p<w&&(T=!T),s=T?0:a,this._lock=1,this.render(s||(_?0:ct(p*g)),i,!a)._lock=0,this._tTime=l,!i&&this.parent&&be(this,"onRepeat"),this.vars.repeatRefresh&&!_&&(this.invalidate()._lock=1),s&&s!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(a=this._dur,o=this._tDur,P&&(this._lock=2,s=T?a:-1e-4,this.render(s,!0),this.vars.repeatRefresh&&!_&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;Ne(this,_)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=Xt(this,ct(s),ct(u)))&&(l-=u-(u=v._start)),this._tTime=l,this._time=u,this._act=!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,s=0),!s&&u&&!i&&(be(this,"onStart"),this._tTime!==l))return this;if(u>=s&&e>=0)for(d=this._first;d;){if(f=d._next,(d._act||u>=d._start)&&d._ts&&v!==d){if(d.parent!==this)return this.render(e,i,n);if(d.render(d._ts>0?(u-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(u-d._start)*d._ts,i,n),u!==this._time||!this._ts&&!m){v=0,f&&(l+=this._zTime=-1e-8);break}}d=f}else{d=this._last;for(var S=e<0?e:u;d;){if(f=d._prev,(d._act||S<=d._end)&&d._ts&&v!==d){if(d.parent!==this)return this.render(e,i,n);if(d.render(d._ts>0?(S-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(S-d._start)*d._ts,i,n||r&&(d._initted||d._startAt)),u!==this._time||!this._ts&&!m){v=0,f&&(l+=this._zTime=S?-1e-8:c);break}}d=f}}if(v&&!i&&(this.pause(),v.render(u>=s?0:-1e-8)._zTime=u>=s?1:-1,this._ts))return this._start=y,zt(this),this.render(e,i,n);this._onUpdate&&!i&&be(this,"onUpdate",!0),(l===o&&this._tTime>=this.totalDuration()||!l&&s)&&(y!==this._start&&Math.abs(b)===Math.abs(this._ts)||this._lock||((e||!a)&&(l===o&&this._ts>0||!l&&this._ts<0)&&St(this,1),i||e<0&&!s||!l&&!s&&o||(be(this,l===o&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(l<o&&this.timeScale()>0)&&this._prom())))}return this},o.add=function t(e,i){var n=this;if(b(i)||(i=qt(this,i,e)),!(e instanceof ti)){if(S(e))return e.forEach((function(t){return n.add(t,i)})),this;if(m(e))return this.addLabel(e,i);if(!v(e))return this;e=gi.delayedCall(0,e)}return this!==e?It(this,e,i):this},o.getChildren=function t(e,i,n,s){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===s&&(s=-l);for(var o=[],r=this._first;r;)r._start>=s&&(r instanceof gi?i&&o.push(r):(n&&o.push(r),e&&o.push.apply(o,r.getChildren(!0,i,n)))),r=r._next;return o},o.getById=function t(e){for(var i=this.getChildren(1,1,1),n=i.length;n--;)if(i[n].vars.id===e)return i[n]},o.remove=function t(e){return m(e)?this.removeLabel(e):v(e)?this.killTweensOf(e):(Pt(this,e),e===this._recent&&(this._recent=this._last),Et(this))},o.totalTime=function e(i,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ct(Re.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),t.prototype.totalTime.call(this,i,n),this._forcing=0,this):this._tTime},o.addLabel=function t(e,i){return this.labels[e]=qt(this,i),this},o.removeLabel=function t(e){return delete this.labels[e],this},o.addPause=function t(e,i,n){var s=gi.delayedCall(0,i||W,n);return s.data="isPause",this._hasPause=1,It(this,s,qt(this,e))},o.removePause=function t(e){var i=this._first;for(e=qt(this,e);i;)i._start===e&&"isPause"===i.data&&St(i),i=i._next},o.killTweensOf=function t(e,i,n){for(var s=this.getTweensOf(e,n),o=s.length;o--;)ri!==s[o]&&s[o].kill(e,i);return this},o.getTweensOf=function t(e,i){for(var n=[],s=ee(e),o=this._first,r=b(i),a;o;)o instanceof gi?ut(o._targets,s)&&(r?(!ri||o._initted&&o._ts)&&o.globalTime(0)<=i&&o.globalTime(o.totalDuration())>i:!i||o.isActive())&&n.push(o):(a=o.getTweensOf(s,i)).length&&n.push.apply(n,a),o=o._next;return n},o.tweenTo=function t(e,i){i=i||{};var n=this,s=qt(n,e),o=i,r=o.startAt,a=o.onStart,l=o.onStartParams,h=o.immediateRender,u,d=gi.to(n,mt({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:s,overwrite:"auto",duration:i.duration||Math.abs((s-(r&&"time"in r?r.time:n._time))/n.timeScale())||c,onStart:function t(){if(n.pause(),!u){var e=i.duration||Math.abs((s-(r&&"time"in r?r.time:n._time))/n.timeScale());d._dur!==e&&Yt(d,e,0,1).render(d._time,!0,!0),u=1}a&&a.apply(d,l||[])}},i));return h?d.render(0):d},o.tweenFromTo=function t(e,i,n){return this.tweenTo(i,mt({startAt:{time:qt(this,e)}},n))},o.recent=function t(){return this._recent},o.nextLabel=function t(e){return void 0===e&&(e=this._time),ve(this,qt(this,e))},o.previousLabel=function t(e){return void 0===e&&(e=this._time),ve(this,qt(this,e),1)},o.currentLabel=function t(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+c)},o.shiftChildren=function t(e,i,n){void 0===n&&(n=0);for(var s=this._first,o=this.labels,r;s;)s._start>=n&&(s._start+=e,s._end+=e),s=s._next;if(i)for(r in o)o[r]>=n&&(o[r]+=e);return Et(this)},o.invalidate=function e(i){var n=this._first;for(this._lock=0;n;)n.invalidate(i),n=n._next;return t.prototype.invalidate.call(this,i)},o.clear=function t(e){void 0===e&&(e=!0);for(var i=this._first,n;i;)n=i._next,this.remove(i),i=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Et(this)},o.totalDuration=function t(e){var i=0,n=this,s=n._last,o=l,r,a,c;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(c=n.parent;s;)r=s._prev,s._dirty&&s.totalDuration(),(a=s._start)>o&&n._sort&&s._ts&&!n._lock?(n._lock=1,It(n,s,a-s._delay,1)._lock=0):o=a,a<0&&s._ts&&(i-=a,(!c&&!n._dp||c&&c.smoothChildTiming)&&(n._start+=a/n._ts,n._time-=a,n._tTime-=a),n.shiftChildren(-a,!1,-Infinity),o=0),s._end>i&&s._ts&&(i=s._end),s=r;Yt(n,n===z&&n._time>i?n._time:i,1,1),n._dirty=0}return n._tDur},s.updateRoot=function t(e){if(z._ts&&(ft(z,Rt(e,z)),J=Re.frame),Re.frame>=et){et+=n.autoSleep||120;var i=z._first;if((!i||!i._ts)&&n.autoSleep&&Re._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Re.sleep()}}},s}(ti);mt(ei.prototype,{_lock:0, 11_hasPause:0,_forcing:0});var ii=function t(e,i,n,s,o,r,a){var l=new Ci(this._pt,e,i,0,1,Ti,null,o),c=0,h=0,u,d,f,p,g,m,v,b;for(l.b=n,l.e=s,n+="",(v=~(s+="").indexOf("random("))&&(s=pe(s)),r&&(r(b=[n,s],e,i),n=b[0],s=b[1]),d=n.match(C)||[];u=C.exec(s);)p=u[0],g=s.substring(c,u.index),f?f=(f+1)%5:"rgba("===g.substr(-5)&&(f=1),p!==d[h++]&&(m=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:g||1===h?g:",",s:m,c:"="===p.charAt(1)?ht(m,p)-m:parseFloat(p)-m,m:f&&f<4?Math.round:0},c=C.lastIndex);return l.c=c<s.length?s.substring(c,s.length):"",l.fp=a,(k.test(s)||v)&&(l.e=0),this._pt=l,l},ni=function t(e,i,s,o,r,a,l,c,h,u){v(o)&&(o=o(r||0,e,a));var d=e[i],f="get"!==s?s:v(d)?h?e[i.indexOf("set")||!v(e["get"+i.substr(3)])?i:"get"+i.substr(3)](h):e[i]():d,p=v(d)?h?bi:vi:mi,g;if(m(o)&&(~o.indexOf("random(")&&(o=pe(o)),"="===o.charAt(1)&&((g=ht(f,o)+(Gt(f)||0))||0===g)&&(o=g)),!u||f!==o||ai)return isNaN(f*o)||""===o?(!d&&!(i in e)&&N(i,o),ii.call(this,e,i,f,o,p,c||n.stringFilter,h)):(g=new Ci(this._pt,e,i,+f||0,o-(f||0),"boolean"==typeof d?_i:xi,0,p),h&&(g.fp=h),l&&g.modifier(l,this,e),this._pt=g)},si=function t(e,i,n,s,o){if(v(e)&&(e=di(e,o,i,n,s)),!w(e)||e.style&&e.nodeType||S(e)||P(e))return m(e)?di(e,o,i,n,s):e;var r={},a;for(a in e)r[a]=di(e[a],o,i,n,s);return r},oi=function t(e,i,n,s,o,r){var a,l,c,h;if(Q[e]&&!1!==(a=new Q[e]).init(o,a.rawVars?i[e]:si(i[e],s,o,r,n),n,s,r)&&(n._pt=l=new Ci(n._pt,o,e,0,1,a.render,a,0,a.priority),n!==we))for(c=n._ptLookup[n._targets.indexOf(o)],h=a._props.length;h--;)c[a._props[h]]=l;return a},ri,ai,li=function t(e,i,n){var a=e.vars,h=a.ease,u=a.startAt,d=a.immediateRender,f=a.lazy,p=a.onUpdate,g=a.onUpdateParams,m=a.callbackScope,v=a.runBackwards,b=a.yoyoEase,y=a.keyframes,w=a.autoRevert,_=e._dur,T=e._startAt,P=e._targets,S=e.parent,E=S&&"nested"===S.data?S.vars.targets:P,M="auto"===e._overwrite&&!o,O=e.timeline,C,k,A,R,L,D,I,F,j,B,H,N,X;if(O&&(!y||!h)&&(h="none"),e._ease=Xe(h,s.ease),e._yEase=b?He(Xe(!0===b?h:b,s.ease)):0,b&&e._yoyo&&!e._repeat&&(b=e._yEase,e._yEase=e._ease,e._ease=b),e._from=!O&&!!a.runBackwards,!O||y&&!a.stagger){if(N=(F=P[0]?ot(P[0]).harness:0)&&a[F.prop],C=wt(a,U),T&&(T._zTime<0&&T.progress(1),i<0&&v&&d&&!w?T.render(-1,!0):T.revert(v&&_?V:q),T._lazy=0),u){if(St(e._startAt=gi.set(P,mt({data:"isStart",overwrite:!1,parent:S,immediateRender:!0,lazy:x(f),startAt:null,delay:0,onUpdate:p,onUpdateParams:g,callbackScope:m,stagger:0},u))),e._startAt._dp=0,i<0&&(r||!d&&!w)&&e._startAt.revert(V),d&&_&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(v&&_&&!T)if(i&&(d=!1),A=mt({overwrite:!1,data:"isFromStart",lazy:d&&x(f),immediateRender:d,stagger:0,parent:S},C),N&&(A[F.prop]=N),St(e._startAt=gi.set(P,A)),e._startAt._dp=0,i<0&&(r?e._startAt.revert(V):e._startAt.render(-1,!0)),e._zTime=i,d){if(!i)return}else t(e._startAt,c,c);for(e._pt=e._ptCache=0,f=_&&x(f)||f&&!_,k=0;k<P.length;k++){if(I=(L=P[k])._gsap||st(P)[k]._gsap,e._ptLookup[k]=B={},K[I.id]&&G.length&&dt(),H=E===P?k:E.indexOf(L),F&&!1!==(j=new F).init(L,N||C,e,H,E)&&(e._pt=R=new Ci(e._pt,L,j.name,0,1,j.render,j,0,j.priority),j._props.forEach((function(t){B[t]=R})),j.priority&&(D=1)),!F||N)for(A in C)Q[A]&&(j=oi(A,C,e,H,L,E))?j.priority&&(D=1):B[A]=R=ni.call(e,L,A,"get",C[A],H,E,0,a.stringFilter);e._op&&e._op[k]&&e.kill(L,e._op[k]),M&&e._pt&&(ri=e,z.killTweensOf(L,B,e.globalTime(i)),X=!e.parent,ri=0),e._pt&&f&&(K[I.id]=1)}D&&Oi(e),e._onInit&&e._onInit(e)}e._onUpdate=p,e._initted=(!e._op||e._pt)&&!X,y&&i<=0&&O.render(l,!0,!0)},ci=function t(e,i,n,s,o,r,a){var l=(e._pt&&e._ptCache||(e._ptCache={}))[i],c,h,u,d;if(!l)for(l=e._ptCache[i]=[],u=e._ptLookup,d=e._targets.length;d--;){if((c=u[d][i])&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==i&&c.fp!==i;)c=c._next;if(!c)return ai=1,e.vars[i]="+=0",li(e,a),ai=0,1;l.push(c)}for(d=l.length;d--;)(c=(h=l[d])._pt||h).s=!s&&0!==s||o?c.s+(s||0)+r*c.c:s,c.c=n-c.s,h.e&&(h.e=lt(n)+Gt(h.e)),h.b&&(h.b=c.s+Gt(h.b))},hi=function t(e,i){var n=e[0]?ot(e[0]).harness:0,s=n&&n.aliases,o,r,a,l;if(!s)return i;for(r in o=bt({},i),s)if(r in o)for(a=(l=s[r].split(",")).length;a--;)o[l[a]]=o[r];return o},ui=function t(e,i,n,s){var o=i.ease||s||"power1.inOut",r,a;if(S(i))a=n[e]||(n[e]=[]),i.forEach((function(t,e){return a.push({t:e/(i.length-1)*100,v:t,e:o})}));else for(r in i)a=n[r]||(n[r]=[]),"ease"===r||a.push({t:parseFloat(e),v:i[r],e:o})},di=function t(e,i,n,s,o){return v(e)?e.call(i,n,s,o):m(e)&&~e.indexOf("random(")?pe(e):e},fi=nt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",pi={};at(fi+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return pi[t]=1}));var gi=function(t){function s(e,s,r,a){var l;"number"==typeof s&&(r.duration=s,s=r,r=null);var c=(l=t.call(this,a?s:xt(s))||this).vars,h=c.duration,u=c.delay,d=c.immediateRender,f=c.stagger,p=c.overwrite,g=c.keyframes,m=c.defaults,v=c.scrollTrigger,y=c.yoyoEase,_=s.parent||z,E=(S(e)||P(e)?b(e[0]):"length"in s)?[e]:ee(e),M,O,C,k,A,R,L,D;if(l._targets=E.length?st(E):X("GSAP target "+e+" not found. https://greensock.com",!n.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=p,g||f||T(h)||T(u)){if(s=l.vars,(M=l.timeline=new ei({data:"nested",defaults:m||{},targets:_&&"nested"===_.data?_.vars.targets:E})).kill(),M.parent=M._dp=i(l),M._start=0,f||T(h)||T(u)){if(k=E.length,L=f&&se(f),w(f))for(A in f)~fi.indexOf(A)&&(D||(D={}),D[A]=f[A]);for(O=0;O<k;O++)(C=wt(s,pi)).stagger=0,y&&(C.yoyoEase=y),D&&bt(C,D),R=E[O],C.duration=+di(h,i(l),O,R,E),C.delay=(+di(u,i(l),O,R,E)||0)-l._delay,!f&&1===k&&C.delay&&(l._delay=u=C.delay,l._start+=u,C.delay=0),M.to(R,C,L?L(O,R,E):0),M._ease=Le.none;M.duration()?h=u=0:l.timeline=0}else if(g){xt(mt(M.vars.defaults,{ease:"none"})),M._ease=Xe(g.ease||s.ease||"none");var I=0,F,j,B;if(S(g))g.forEach((function(t){return M.to(E,t,">")})),M.duration();else{for(A in C={},g)"ease"===A||"easeEach"===A||ui(A,g[A],C,g.easeEach);for(A in C)for(F=C[A].sort((function(t,e){return t.t-e.t})),I=0,O=0;O<F.length;O++)(B={ease:(j=F[O]).e,duration:(j.t-(O?F[O-1].t:0))/100*h})[A]=j.v,M.to(E,B,I),I+=B.duration;M.duration()<h&&M.to({},{duration:h-M.duration()})}}h||l.duration(h=M.duration())}else l.timeline=0;return!0!==p||o||(ri=i(l),z.killTweensOf(E),ri=0),It(_,i(l),r),s.reversed&&l.reverse(),s.paused&&l.paused(!0),(d||!h&&!g&&l._start===ct(_._time)&&x(d)&&Ct(i(l))&&"nested"!==_.data)&&(l._tTime=-1e-8,l.render(Math.max(0,-u)||0)),v&&Ft(i(l),v),l}e(s,t);var r=s.prototype;return r.render=function t(e,i,n){var s=this._time,o=this._tDur,r=this._dur,a=e<0,l=e>o-c&&!a?o:e<c?0:e,h,u,d,f,p,g,m,v,b;if(r){if(l!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==a){if(h=l,v=this.timeline,this._repeat){if(f=r+this._rDelay,this._repeat<-1&&a)return this.totalTime(100*f+e,i,n);if(h=ct(l%f),l===o?(d=this._repeat,h=r):((d=~~(l/f))&&d===l/f&&(h=r,d--),h>r&&(h=r)),(g=this._yoyo&&1&d)&&(b=this._yEase,h=r-h),p=At(this._tTime,f),h===s&&!n&&this._initted)return this._tTime=l,this;d!==p&&(v&&this._yEase&&Ne(v,g),!this.vars.repeatRefresh||g||this._lock||(this._lock=n=1,this.render(ct(f*d),!0).invalidate()._lock=0))}if(!this._initted){if(jt(this,a?e:h,n,i,l))return this._tTime=0,this;if(s!==this._time)return this;if(r!==this._dur)return this.render(e,i,n)}if(this._tTime=l,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=m=(b||this._ease)(h/r),this._from&&(this.ratio=m=1-m),h&&!s&&!i&&(be(this,"onStart"),this._tTime!==l))return this;for(u=this._pt;u;)u.r(m,u.d),u=u._next;v&&v.render(e<0?e:!h&&g?-1e-8:v._dur*v._ease(h/this._dur),i,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!i&&(a&&Ot(this,e,i,n),be(this,"onUpdate")),this._repeat&&d!==p&&this.vars.onRepeat&&!i&&this.parent&&be(this,"onRepeat"),l!==this._tDur&&l||this._tTime!==l||(a&&!this._onUpdate&&Ot(this,e,!0,!0),(e||!r)&&(l===this._tDur&&this._ts>0||!l&&this._ts<0)&&St(this,1),i||a&&!s||!(l||s||g)||(be(this,l===o?"onComplete":"onReverseComplete",!0),this._prom&&!(l<o&&this.timeScale()>0)&&this._prom()))}}else Nt(this,e,i,n);return this},r.targets=function t(){return this._targets},r.invalidate=function e(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),t.prototype.invalidate.call(this,i)},r.resetTo=function t(e,i,n,s){Ae||Re.wake(),this._ts||this.play();
11var o=Math.min(this._dur,(this._dp._time-this._start)*this._ts),r;return this._initted||li(this,o),r=this._ease(o/this._dur),ci(this,e,i,n,s,r,o)?this.resetTo(e,i,n,s):(Lt(this,0),this.parent||Tt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function t(e,i){if(void 0===i&&(i="all"),!(e||i&&"all"!==i))return this._lazy=this._pt=0,this.parent?ye(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,i,ri&&!0!==ri.vars.overwrite)._first||ye(this),this.parent&&n!==this.timeline.totalDuration()&&Yt(this,this._dur*this.timeline._tDur/n,0,1),this}var s=this._targets,o=e?ee(e):s,r=this._ptLookup,a=this._pt,l,c,h,u,d,f,p;if((!i||"all"===i)&&_t(s,o))return"all"===i&&(this._pt=0),ye(this);for(l=this._op=this._op||[],"all"!==i&&(m(i)&&(d={},at(i,(function(t){return d[t]=1})),i=d),i=hi(s,i)),p=s.length;p--;)if(~o.indexOf(s[p]))for(d in c=r[p],"all"===i?(l[p]=i,u=c,h={}):(h=l[p]=l[p]||{},u=i),u)(f=c&&c[d])&&("kill"in f.d&&!0!==f.d.kill(d)||Pt(this,f,"_pt"),delete c[d]),"all"!==h&&(h[d]=1);return this._initted&&!this._pt&&a&&ye(this),this},s.to=function t(e,i,n){return new s(e,i,n)},s.from=function t(e,i){return Vt(1,arguments)},s.delayedCall=function t(e,i,n,o){return new s(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:o})},s.fromTo=function t(e,i,n){return Vt(2,arguments)},s.set=function t(e,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new s(e,i)},s.killTweensOf=function t(e,i,n){return z.killTweensOf(e,i,n)},s}(ti);mt(gi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),at("staggerTo,staggerFrom,staggerFromTo",(function(t){gi[t]=function(){var e=new ei,i=Jt.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var mi=function t(e,i,n){return e[i]=n},vi=function t(e,i,n){return e[i](n)},bi=function t(e,i,n,s){return e[i](s.fp,n)},yi=function t(e,i,n){return e.setAttribute(i,n)},wi=function t(e,i){return v(e[i])?vi:y(e[i])&&e.setAttribute?yi:mi},xi=function t(e,i){return i.set(i.t,i.p,Math.round(1e6*(i.s+i.c*e))/1e6,i)},_i=function t(e,i){return i.set(i.t,i.p,!!(i.s+i.c*e),i)},Ti=function t(e,i){var n=i._pt,s="";if(!e&&i.b)s=i.b;else if(1===e&&i.e)s=i.e;else{for(;n;)s=n.p+(n.m?n.m(n.s+n.c*e):Math.round(1e4*(n.s+n.c*e))/1e4)+s,n=n._next;s+=i.c}i.set(i.t,i.p,s,i)},Pi=function t(e,i){for(var n=i._pt;n;)n.r(e,n.d),n=n._next},Si=function t(e,i,n,s){for(var o=this._pt,r;o;)r=o._next,o.p===s&&o.modifier(e,i,n),o=r},Ei=function t(e){for(var i=this._pt,n,s;i;)s=i._next,i.p===e&&!i.op||i.op===e?Pt(this,i,"_pt"):i.dep||(n=1),i=s;return!n},Mi=function t(e,i,n,s){s.mSet(e,i,s.m.call(s.tween,n,s.mt),s)},Oi=function t(e){for(var i=e._pt,n,s,o,r;i;){for(n=i._next,s=o;s&&s.pr>i.pr;)s=s._next;(i._prev=s?s._prev:r)?i._prev._next=i:o=i,(i._next=s)?s._prev=i:r=i,i=n}e._pt=o},Ci=function(){function t(t,e,i,n,s,o,r,a,l){this.t=e,this.s=n,this.c=s,this.p=i,this.r=o||xi,this.d=r||this,this.set=a||mi,this.pr=l||0,this._next=t,t&&(t._prev=this)}var e;return t.prototype.modifier=function t(e,i,n){this.mSet=this.mSet||this.set,this.set=Mi,this.m=e,this.mt=n,this.tween=i},t}();at(nt+"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 U[t]=1})),F.TweenMax=F.TweenLite=gi,F.TimelineLite=F.TimelineMax=ei,z=new ei({sortChildren:!1,defaults:s,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),n.stringFilter=ke;var ki=[],Ai={},Ri=[],zi=0,Li=function t(e){return(Ai[e]||Ri).map((function(t){return t()}))},Di=function t(){var e=Date.now(),i=[];e-zi>2&&(Li("matchMediaInit"),ki.forEach((function(t){var e=t.queries,n=t.conditions,s,o,r,a;for(o in e)(s=L.matchMedia(e[o]).matches)&&(r=1),s!==n[o]&&(n[o]=s,a=1);a&&(t.revert(),r&&i.push(t))})),Li("matchMediaRevert"),i.forEach((function(t){return t.onMatch(t)})),zi=e,Li("matchMedia"))},Ii=function(){function t(t,e){this.selector=e&&ie(e),this.data=[],this._r=[],this.isReverted=!1,t&&this.add(t)}var e=t.prototype;return e.add=function t(e,i,n){v(e)&&(n=i,i=e,e=v);var s=this,o=function t(){var e=a,o=s.selector,r;return e&&e!==s&&e.data.push(s),n&&(s.selector=ie(n)),a=s,r=i.apply(s,arguments),v(r)&&s._r.push(r),a=e,s.selector=o,s.isReverted=!1,r};return s.last=o,e===v?o(s):e?s[e]=o:o},e.ignore=function t(e){var i=a;a=null,e(this),a=i},e.getTweens=function e(){var i=[];return this.data.forEach((function(e){return e instanceof t?i.push.apply(i,e.getTweens()):e instanceof gi&&!(e.parent&&"nested"===e.parent.data)&&i.push(e)})),i},e.clear=function t(){this._r.length=this.data.length=0},e.kill=function t(e,i){var n=this;if(e){var s=this.getTweens();this.data.forEach((function(t){"isFlip"===t.data&&(t.revert(),t.getChildren(!0,!0,!1).forEac
11h((function(t){return s.splice(s.indexOf(t),1)})))})),s.map((function(t){return{g:t.globalTime(0),t:t}})).sort((function(t,e){return e.g-t.g||-1})).forEach((function(t){return t.t.revert(e)})),this.data.forEach((function(t){return!(t instanceof ti)&&t.revert&&t.revert(e)})),this._r.forEach((function(t){return t(e,n)})),this.isReverted=!0}else this.data.forEach((function(t){return t.kill&&t.kill()}));if(this.clear(),i){var o=ki.indexOf(this);~o&&ki.splice(o,1)}},e.revert=function t(e){this.kill(e||{})},t}(),Fi=function(){function t(t){this.contexts=[],this.scope=t}var e=t.prototype;return e.add=function t(e,i,n){w(e)||(e={matches:e});var s=new Ii(0,n||this.scope),o=s.conditions={},r,a,l;for(a in this.contexts.push(s),i=s.add("onMatch",i),s.queries=e,e)"all"===a?l=1:(r=L.matchMedia(e[a]))&&(ki.indexOf(s)<0&&ki.push(s),(o[a]=r.matches)&&(l=1),r.addListener?r.addListener(Di):r.addEventListener("change",Di));return l&&i(s),this},e.revert=function t(e){this.kill(e||{})},e.kill=function t(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},t}(),ji={registerPlugin:function t(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];i.forEach((function(t){return xe(t)}))},timeline:function t(e){return new ei(e)},getTweensOf:function t(e,i){return z.getTweensOf(e,i)},getProperty:function t(e,i,n,s){m(e)&&(e=ee(e)[0]);var o=ot(e||{}).get,r=n?gt:pt;return"native"===n&&(n=""),e?i?r((Q[i]&&Q[i].get||o)(e,i,n,s)):function(t,i,n){return r((Q[t]&&Q[t].get||o)(e,t,i,n))}:e},quickSetter:function t(e,i,n){if((e=ee(e)).length>1){var s=e.map((function(t){return Xi.quickSetter(t,i,n)})),o=s.length;return function(t){for(var e=o;e--;)s[e](t)}}e=e[0]||{};var r=Q[i],a=ot(e),l=a.harness&&(a.harness.aliases||{})[i]||i,c=r?function(t){var i=new r;we._pt=0,i.init(e,n?t+n:t,we,0,[e]),i.render(1,i),we._pt&&Pi(1,we)}:a.set(e,l);return r?c:function(t){return c(e,l,n?t+n:t,a,1)}},quickTo:function t(e,i,n){var s,o=Xi.to(e,bt(((s={})[i]="+=0.1",s.paused=!0,s),n||{})),r=function t(e,n,s){return o.resetTo(i,e,n,s)};return r.tween=o,r},isTweening:function t(e){return z.getTweensOf(e,!0).length>0},defaults:function t(e){return e&&e.ease&&(e.ease=Xe(e.ease,s.ease)),yt(s,e||{})},config:function t(e){return yt(n,e||{})},registerEffect:function t(e){var i=e.name,n=e.effect,s=e.plugins,o=e.defaults,r=e.extendTimeline;(s||"").split(",").forEach((function(t){return t&&!Q[t]&&!F[t]&&X(i+" effect requires "+t+" plugin.")})),tt[i]=function(t,e,i){return n(ee(t),mt(e||{},o),i)},r&&(ei.prototype[i]=function(t,e,n){return this.add(tt[i](t,w(e)?e:(n=e)&&{},this),n)})},registerEase:function t(e,i){Le[e]=Xe(i)},parseEase:function t(e,i){return arguments.length?Xe(e,i):Le},getById:function t(e){return z.getById(e)},exportRoot:function t(e,i){void 0===e&&(e={});var n=new ei(e),s,o;for(n.smoothChildTiming=x(e.smoothChildTiming),z.remove(n),n._dp=0,n._time=n._tTime=z._time,s=z._first;s;)o=s._next,!i&&!s._dur&&s instanceof gi&&s.vars.onComplete===s._targets[0]||It(n,s,s._start-s._delay),s=o;return It(z,n,0),n},context:function t(e,i){return e?new Ii(e,i):a},matchMedia:function t(e){return new Fi(e)},matchMediaRefresh:function t(){return ki.forEach((function(t){var e=t.conditions,i,n;for(n in e)e[n]&&(e[n]=!1,i=1);i&&t.revert()}))||Di()},addEventListener:function t(e,i){var n=Ai[e]||(Ai[e]=[]);~n.indexOf(i)||n.push(i)},removeEventListener:function t(e,i){var n=Ai[e],s=n&&n.indexOf(i);s>=0&&n.splice(s,1)},utils:{wrap:de,wrapYoyo:fe,distribute:se,random:ae,snap:re,normalize:he,getUnit:Gt,clamp:Kt,splitColor:Se,toArray:ee,selector:ie,mapRange:ge,pipe:le,unitize:ce,interpolate:me,shuffle:ne},install:H,effects:tt,ticker:Re,updateRoot:ei.updateRoot,plugins:Q,globalTimeline:z,core:{PropTween:Ci,globals:Y,Tween:gi,Timeline:ei,Animation:ti,getCache:ot,_removeLinkedListItem:Pt,reverting:function t(){return r},context:function t(e){return e&&a&&(a.data.push(e),e._ctx=a),a},suppressOverwrites:function t(e){return o=e}}};at("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return ji[t]=gi[t]})),Re.add(ei.updateRoot),we=ji.to({},{duration:0});var Bi=function t(e,i){for(var n=e._pt;n&&n.p!==i&&n.op!==i&&n.fp!==i;)n=n._next;return n},Hi=function t(e,i){var n=e._targets,s,o,r;for(s in i)for(o=n.length;o--;)(r=e._ptLookup[o][s])&&(r=r.d)&&(r._pt&&(r=Bi(r,s)),r&&r.modifier&&r.modifier(i[s],e,n[o],s))},Ni=function t(e,i){return{name:e,rawVars:1,init:function t(e,n,s){s._onInit=function(t){var e,s;if(m(n)&&(e={},at(n,(function(t){return e[t]=1})),n=e),i){for(s in e={},n)e[s]=i(n[s]);n=e}Hi(t,n)}}}},Xi=ji.registerPlugin({name:"attr",init:function t(e,i,n,s,o){var r,a,l;for(r in this.tween=n,i)l=e.getAttribute(r)||"",(a=this.add(e,"setAttribute",(l||0)+"",i[r],s,o,0,0,r)).op=r,a.b=l,this._props.push(r)},render:function t(e,i){for(var n=i._pt;n;)r?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function t(e,i){for(var n=i.length;n--;)this.add(e,n,e[n]||0,i[n],0,0,0,0,0,1)}}
11,Ni("roundProps",oe),Ni("modifiers"),Ni("snap",re))||ji;gi.version=ei.version=Xi.version="3.11.3",B=1,_()&&ze();var Yi=Le.Power0,Wi=Le.Power1,$i=Le.Power2,qi=Le.Power3,Vi=Le.Power4,Zi=Le.Linear,Ui=Le.Quad,Gi=Le.Cubic,Ki=Le.Quart,Ji=Le.Quint,Qi=Le.Strong,tn=Le.Elastic,en=Le.Back,nn=Le.SteppedEase,sn=Le.Bounce,on=Le.Sine,rn=Le.Expo,an=Le.Circ,ln,cn,hn,un,dn,fn,pn,gn,mn=function t(){return"undefined"!=typeof window},vn={},bn=180/Math.PI,yn=Math.PI/180,wn=Math.atan2,xn=1e8,_n=/([A-Z])/g,Tn=/(left|right|width|margin|padding|x)/i,Pn=/[\s,\(]\S/,Sn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},En=function t(e,i){return i.set(i.t,i.p,Math.round(1e4*(i.s+i.c*e))/1e4+i.u,i)},Mn=function t(e,i){return i.set(i.t,i.p,1===e?i.e:Math.round(1e4*(i.s+i.c*e))/1e4+i.u,i)},On=function t(e,i){return i.set(i.t,i.p,e?Math.round(1e4*(i.s+i.c*e))/1e4+i.u:i.b,i)},Cn=function t(e,i){var n=i.s+i.c*e;i.set(i.t,i.p,~~(n+(n<0?-.5:.5))+i.u,i)},kn=function t(e,i){return i.set(i.t,i.p,e?i.e:i.b,i)},An=function t(e,i){return i.set(i.t,i.p,1!==e?i.b:i.e,i)},Rn=function t(e,i,n){return e.style[i]=n},zn=function t(e,i,n){return e.style.setProperty(i,n)},Ln=function t(e,i,n){return e._gsap[i]=n},Dn=function t(e,i,n){return e._gsap.scaleX=e._gsap.scaleY=n},In=function t(e,i,n,s,o){var r=e._gsap;r.scaleX=r.scaleY=n,r.renderTransform(o,r)},Fn=function t(e,i,n,s,o){var r=e._gsap;r[i]=n,r.renderTransform(o,r)},jn="transform",Bn=jn+"Origin",Hn=function t(e,i){var n=this,s=this.target,o=s.style;if(e in vn){if(this.tfm=this.tfm||{},"transform"!==e&&(~(e=Sn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=os(s,t)})):this.tfm[e]=s._gsap.x?s._gsap[e]:os(s,e)),this.props.indexOf(jn)>=0)return;s._gsap.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(Bn,i,"")),e=jn}(o||i)&&this.props.push(e,i,o[e])},Nn=function t(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Xn=function t(){var e=this.props,i=this.target,n=i.style,s=i._gsap,o,r;for(o=0;o<e.length;o+=3)e[o+1]?i[e[o]]=e[o+2]:e[o+2]?n[e[o]]=e[o+2]:n.removeProperty(e[o].replace(_n,"-$1").toLowerCase());if(this.tfm){for(r in this.tfm)s[r]=this.tfm[r];s.svg&&(s.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),!(o=gn())||o.isStart||n[jn]||(Nn(n),s.uncache=1)}},Yn=function t(e,i){var n={target:e,props:[],revert:Xn,save:Hn};return i&&i.split(",").forEach((function(t){return n.save(t)})),n},Wn,$n=function t(e,i){var n=cn.createElementNS?cn.createElementNS((i||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):cn.createElement(e);return n.style?n:cn.createElement(e)},qn=function t(e,i,n){var s=getComputedStyle(e);return s[i]||s.getPropertyValue(i.replace(_n,"-$1").toLowerCase())||s.getPropertyValue(i)||!n&&t(e,Zn(i)||i,1)||""},Vn="O,Moz,ms,Ms,Webkit".split(","),Zn=function t(e,i,n){var s,o=(i||dn).style,r=5;if(e in o&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);r--&&!(Vn[r]+e in o););return r<0?null:(3===r?"ms":r>=0?Vn[r]:"")+e},Un=function t(){mn()&&window.document&&(ln=window,cn=ln.document,hn=cn.documentElement,dn=$n("div")||{style:{}},fn=$n("div"),jn=Zn(jn),Bn=jn+"Origin",dn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Wn=!!Zn("perspective"),gn=Xi.core.reverting,un=1)},Gn=function t(e){var i=$n("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,s=this.nextSibling,o=this.style.cssText,r;if(hn.appendChild(i),i.appendChild(this),this.style.display="block",e)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(r=this._gsapBBox());return n&&(s?n.insertBefore(this,s):n.appendChild(this)),hn.removeChild(i),this.style.cssText=o,r},Kn=function t(e,i){for(var n=i.length;n--;)if(e.hasAttribute(i[n]))return e.getAttribute(i[n])},Jn=function t(e){var i;try{i=e.getBBox()}catch(t){i=Gn.call(e,!0)}return i&&(i.width||i.height)||e.getBBox===Gn||(i=Gn.call(e,!0)),!i||i.width||i.x||i.y?i:{x:+Kn(e,["x","cx","x1"])||0,y:+Kn(e,["y","cy","y1"])||0,width:0,height:0}},Qn=function t(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!Jn(e))},ts=function t(e,i){if(i){var n=e.style;i in vn&&i!==Bn&&(i=jn),n.removeProperty?("ms"!==i.substr(0,2)&&"webkit"!==i.substr(0,6)||(i="-"+i),n.removeProperty(i.replace(_n,"-$1").toLowerCase())):n.removeAttribute(i)}},es=function t(e,i,n,s,o,r){var a=new Ci(e._pt,i,n,0,1,r?An:kn);return e._pt=a,a.b=s,a.e=o,e._props.push(n),a},is={deg:1,rad:1,turn:1},ns={grid:1,flex:1},ss=function t(e,i,n,s){var o=parseFloat(n)||0,r=(n+"").trim().substr((o+"").length)||"px",a=dn.style,l=Tn.test(i),c="svg"===e.tagName.toLowerCase(),h=(c?"client":"offset")+(l?"Width":"Height"),u=100,d="px"===s,f="%"===s,p,g,m,v;
vendor: 9,617 bytes, lines 11-12
11return s===r||!o||is[s]||is[r]?o:("px"!==r&&!d&&(o=t(e,i,n,"px")),v=e.getCTM&&Qn(e),!f&&"%"!==r||!vn[i]&&!~i.indexOf("adius")?(a[l?"width":"height"]=u+(d?r:s),g=~i.indexOf("adius")||"em"===s&&e.appendChild&&!c?e:e.parentNode,v&&(g=(e.ownerSVGElement||{}).parentNode),g&&g!==cn&&g.appendChild||(g=cn.body),(m=g._gsap)&&f&&m.width&&l&&m.time===Re.time&&!m.uncache?lt(o/m.width*u):((f||"%"===r)&&!ns[qn(g,"display")]&&(a.position=qn(e,"position")),g===e&&(a.position="static"),g.appendChild(dn),p=dn[h],g.removeChild(dn),a.position="absolute",l&&f&&((m=ot(g)).time=Re.time,m.width=g[h]),lt(d?p*o/u:p&&o?u/p*o:0))):(p=v?e.getBBox()[l?"width":"height"]:e[h],lt(f?o/p*u:o/100*p)))},os=function t(e,i,n,s){var o;return un||Un(),i in Sn&&"transform"!==i&&~(i=Sn[i]).indexOf(",")&&(i=i.split(",")[0]),vn[i]&&"transform"!==i?(o=vs(e,s),o="transformOrigin"!==i?o[i]:o.svg?o.origin:bs(qn(e,Bn))+" "+o.zOrigin+"px"):(!(o=e.style[i])||"auto"===o||s||~(o+"").indexOf("calc("))&&(o=hs[i]&&hs[i](e,i,n)||qn(e,i)||rt(e,i)||("opacity"===i?1:0)),n&&!~(o+"").trim().indexOf(" ")?ss(e,i,o,n)+n:o},rs=function t(e,i,s,o){if(!s||"none"===s){var r=Zn(i,e,1),a=r&&qn(e,r,1);a&&a!==s?(i=r,s=a):"borderColor"===i&&(s=qn(e,"borderTopColor"))}var l=new Ci(this._pt,e.style,i,0,1,Ti),c=0,h=0,u,d,f,p,g,m,v,b,y,w,x,_;if(l.b=s,l.e=o,s+="","auto"===(o+="")&&(e.style[i]=o,o=qn(e,i)||o,e.style[i]=s),ke(u=[s,o]),s=u[0],o=u[1],f=s.match(O)||[],(_=o.match(O)||[]).length){for(;d=O.exec(o);)v=d[0],y=o.substring(c,d.index),g?g=(g+1)%5:"rgba("!==y.substr(-5)&&"hsla("!==y.substr(-5)||(g=1),v!==(m=f[h++]||"")&&(p=parseFloat(m)||0,x=m.substr((p+"").length),"="===v.charAt(1)&&(v=ht(p,v)+x),b=parseFloat(v),w=v.substr((b+"").length),c=O.lastIndex-w.length,w||(w=w||n.units[i]||x,c===o.length&&(o+=w,l.e+=w)),x!==w&&(p=ss(e,i,m,w)||0),l._pt={_next:l._pt,p:y||1===h?y:",",s:p,c:b-p,m:g&&g<4||"zIndex"===i?Math.round:0});l.c=c<o.length?o.substring(c,o.length):""}else l.r="display"===i&&"none"===o?An:kn;return k.test(o)&&(l.e=0),this._pt=l,l},as={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ls=function t(e){var i=e.split(" "),n=i[0],s=i[1]||"50%";return"top"!==n&&"bottom"!==n&&"left"!==s&&"right"!==s||(e=n,n=s,s=e),i[0]=as[n]||n,i[1]=as[s]||s,i.join(" ")},cs=function t(e,i){if(i.tween&&i.tween._time===i.tween._dur){var n=i.t,s=n.style,o=i.u,r=n._gsap,a,l,c;if("all"===o||!0===o)s.cssText="",l=1;else for(c=(o=o.split(",")).length;--c>-1;)a=o[c],vn[a]&&(l=1,a="transformOrigin"===a?Bn:jn),ts(n,a);l&&(ts(n,jn),r&&(r.svg&&n.removeAttribute("transform"),vs(n,1),r.uncache=1,Nn(s)))}},hs={clearProps:function t(e,i,n,s,o){if("isFromStart"!==o.data){var r=e._pt=new Ci(e._pt,i,n,0,0,cs);return r.u=s,r.pr=-10,r.tween=o,e._props.push(n),1}}},us=[1,0,0,1,0,0],ds={},fs=function t(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},ps=function t(e){var i=qn(e,jn);return fs(i)?us:i.substr(7).match(M).map(lt)},gs=function t(e,i){var n=e._gsap||ot(e),s=e.style,o=ps(e),r,a,l,c;return n.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(o=[(l=e.transform.baseVal.consolidate().matrix).a,l.b,l.c,l.d,l.e,l.f]).join(",")?us:o:(o!==us||e.offsetParent||e===hn||n.svg||(l=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(c=1,a=e.nextElementSibling,hn.appendChild(e)),o=ps(e),l?s.display=l:ts(e,"display"),c&&(a?r.insertBefore(e,a):r?r.appendChild(e):hn.removeChild(e))),i&&o.length>6?[o[0],o[1],o[4],o[5],o[12],o[13]]:o)},ms=function t(e,i,n,s,o,r){var a=e._gsap,l=o||gs(e,!0),c=a.xOrigin||0,h=a.yOrigin||0,u=a.xOffset||0,d=a.yOffset||0,f=l[0],p=l[1],g=l[2],m=l[3],v=l[4],b=l[5],y=i.split(" "),w=parseFloat(y[0])||0,x=parseFloat(y[1])||0,_,T,P,S;n?l!==us&&(T=f*m-p*g)&&(S=w*(-p/T)+x*(f/T)-(f*b-p*v)/T,w=P=w*(m/T)+x*(-g/T)+(g*b-m*v)/T,x=S):(w=(_=Jn(e)).x+(~y[0].indexOf("%")?w/100*_.width:w),x=_.y+(~(y[1]||y[0]).indexOf("%")?x/100*_.height:x)),s||!1!==s&&a.smooth?(v=w-c,b=x-h,a.xOffset=u+(v*f+b*g)-v,a.yOffset=d+(v*p+b*m)-b):a.xOffset=a.yOffset=0,a.xOrigin=w,a.yOrigin=x,a.smooth=!!s,a.origin=i,a.originIsAbsolute=!!n,e.style[Bn]="0px 0px",r&&(es(r,a,"xOrigin",c,w),es(r,a,"yOrigin",h,x),es(r,a,"xOffset",u,a.xOffset),es(r,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",w+" "+x)},vs=function t(e,i){var s=e._gsap||new Qe(e);if("x"in s&&!i&&!s.uncache)return s;var o=e.style,r=s.scaleX<0,a="px",l="deg",c=getComputedStyle(e),h=qn(e,Bn)||"0",u,d,f,p,g,m,v,b,y,w,x,_,T,P,S,E,M,O,C,k,A,R,z,L,D,I,F,j,B,H,N,X;return u=d=f=m=v=b=y=w=x=0,p=g=1,s.svg=!(!e.getCTM||!Qn(e)),c.translate&&("none"===c.translate&&"none"===c.scale&&"none"===c.rotate||(o[jn]=("none"!==c.translate?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==c.rotate?"rotate("+c.rotate+") ":"")+("none"!==c.scale?"scale("+c.scale.split(" ").join(",")+") ":"")+("none"!==c[jn]?c[jn]:"")),o.scale=o.rotate=o.translate="none"),P=gs(e,s.svg),s.svg&&(s.uncache?(D=e.getBBox(),h=s.xOrigin-D.x+"px "+(s.yOrigin-D.y)+"px",L=""):L=!i&&e.getAttribute("data-svg-origin"),ms(e,L||h,!!L||s.originIsAbsolute,!1!==s.smooth,P)),_=s.xOrigin||0,T=s.yOrigin||0,P!==us&&(O=P[0],C=P[1],k=P[2],A=P[3],u=R=P[4],d=z=P[5],6===P.length?(p=Math.sqrt(O*O+C*C),g=Math.sqrt(A*A+k*k),m=O||C?wn(C,O)*bn:0,(y=k||A?wn(k,A)*bn+m:0)&&(g*=Math.abs(Math.cos(y*yn))),s.svg&&(u-=_-(_*O+T*k),d-=T-(_*C+T*A))):(X=P[6],H=P[7],F=P[8],j=P[9],B=P[10],N=P[11],u=P[12],d=P[13],f=P[14],v=(S=wn(X,B))*bn,S&&(L=R*(E=Math.cos(-S))+F*(M=Math.sin(-S)),D=z*E+j*M,I=X*E+B*M,F=R*-M+F*E,j=z*-M+j*E,B=X*-M+B*E,N=H*-M+N*E,R=L,z=D,X=I),b=(S=wn(-k,B))*bn,S&&(E=Math.cos(-S),N=A*(M=Math.sin(-S))+N*E,O=L=O*E-F*M,C=D=C*E-j*M,k=I=k*E-B*M),m=(S=wn(C,O))*bn,S&&(L=O*(E=Math.cos(S))+C*(M=Math.sin(S)),D=R*E+z*M,C=C*E-O*M,z=z*E-R*M,O=L,R=D),v&&Math.abs(v)+Math.abs(m)>359.9&&(v=m=0,b=180-b),p=lt(Math.sqrt(O*O+C*C+k*k)),g=lt(Math.sqrt(z*z+X*X)),S=wn(R,z),y=Math.abs(S)>2e-4?S*bn:0,x=N?1/(N<0?-N:N):0),s.svg&&(L=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!fs(qn(e,jn)),L&&e.setAttribute("transform",L))),Math.abs(y)>90&&Math.abs(y)<270&&(r?(p*=-1,y+=m<=0?180:-180,m+=m<=0?180:-180):(g*=-1,y+=y<=0?180:-180)),i=i||s.uncache,s.x=u-((s.xPercent=u&&(!i&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+a,s.y=d-((s.yPercent=d&&(!i&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+a,s.z=f+a,s.scaleX=lt(p),s.scaleY=lt(g),s.rotation=lt(m)+l,s.rotationX=lt(v)+l,s.rotationY=lt(b)+l,s.skewX=y+l,s.skewY=w+l,s.transformPerspective=x+a,(s.zOrigin=parseFloat(h.split(" ")[2])||0)&&(o[Bn]=bs(h)),s.xOffset=s.yOffset=0,s.force3D=n.force3D,s.renderTransform=s.svg?Ss:Wn?Ps:ws,s.uncache=0,s},bs=function t(e){return(e=e.split(" "))[0]+" "+e[1]},ys=function t(e,i,n){var s=Gt(i);return lt(parseFloat(i)+parseFloat(ss(e,"x",n+"px",s)))+s},ws=function t(e,i){i.z="0px",i.rotationY=i.rotationX="0deg",i.force3D=0,Ps(e,i)},xs="0deg",_s="0px",Ts=") ",Ps=function t(e,i){var n=i||this,s=n.xPercent,o=n.yPercent,r=n.x,a=n.y,l=n.z,c=n.rotation,h=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,g=n.scaleY,m=n.transformPerspective,v=n.force3D,b=n.target,y=n.zOrigin,w="",x="auto"===v&&e&&1!==e||!0===v;if(y&&(u!==xs||h!==xs)){var _=parseFloat(h)*yn,T=Math.sin(_),P=Math.cos(_),S;_=parseFloat(u)*yn,S=Math.cos(_),r=ys(b,r,T*S*-y),a=ys(b,a,-Math.sin(_)*-y),l=ys(b,l,P*S*-y+y)}m!==_s&&(w+="perspective("+m+Ts),(s||o)&&(w+="translate("+s+"%, "+o+"%) "),(x||r!==_s||a!==_s||l!==_s)&&(w+=l!==_s||x?"translate3d("+r+", "+a+", "+l+") ":"translate("+r+", "+a+Ts),c!==xs&&(w+="rotate("+c+Ts),h!==xs&&(w+="rotateY("+h+Ts),u!==xs&&(w+="rotateX("+u+Ts),d===xs&&f===xs||(w+="skew("+d+", "+f+Ts),1===p&&1===g||(w+="scale("+p+", "+g+Ts),b.style[jn]=w||"translate(0, 0)"},Ss=function t(e,i){var n=i||this,s=n.xPercent,o=n.yPercent,r=n.x,a=n.y,l=n.rotation,c=n.skewX,h=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,g=n.yOrigin,m=n.xOffset,v=n.yOffset,b=n.forceCSS,y=parseFloat(r),w=parseFloat(a),x,_,T,P,S;l=parseFloat(l),c=parseFloat(c),(h=parseFloat(h))&&(c+=h=parseFloat(h),l+=h),l||c?(l*=yn,c*=yn,x=Math.cos(l)*u,_=Math.sin(l)*u,T=Math.sin(l-c)*-d,P=Math.cos(l-c)*d,c&&(h*=yn,S=Math.tan(c-h),T*=S=Math.sqrt(1+S*S),P*=S,h&&(S=Math.tan(h),x*=S=Math.sqrt(1+S*S),_*=S)),x=lt(x),_=lt(_),T=lt(T),P=lt(P)):(x=u,P=d,_=T=0),(y&&!~(r+"").indexOf("px")||w&&!~(a+"").indexOf("px"))&&(y=ss(f,"x",r,"px"),w=ss(f,"y",a,"px")),(p||g||m||v)&&(y=lt(y+p-(p*x+g*T)+m),w=lt(w+g-(p*_+g*P)+v)),(s||o)&&(S=f.getBBox(),y=lt(y+s/100*S.width),w=lt(w+o/100*S.height)),S="matrix("+x+","+_+","+T+","+P+","+y+","+w+")",f.setAttribute("transform",S),b&&(f.style[jn]=S)},Es=function t(e,i,n,s,o){var r=360,a=m(o),l,c=parseFloat(o)*(a&&~o.indexOf("rad")?bn:1)-s,h=s+c+"deg",u,d;return a&&("short"===(u=o.split("_")[1])&&(c%=r)!==c%180&&(c+=c<0?r:-360),"cw"===u&&c<0?c=(c+36e9)%r-~~(c/r)*r:"ccw"===u&&c>0&&(c=(c-36e9)%r-~~(c/r)*r)),e._pt=d=new Ci(e._pt,i,n,s,c,Mn),d.e=h,d.u="deg",e._props.push(n),d},Ms=function t(e,i){for(var n in i)e[n]=i[n];return e},Os=function t(e,i,n){var s=Ms({},n._gsap),o="perspective,force3D,transformOrigin,svgOrigin",r=n.style,a,l,c,h,u,d,f,p 12;for(l in s.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),r[jn]=i,a=vs(n,1),ts(n,jn),n.setAttribute("transform",c)):(c=getComputedStyle(n)[jn],r[jn]=i,a=vs(n,1),r[jn]=c),vn)(c=s[l])!==(h=a[l])&&o.indexOf(l)<0&&(u=(f=Gt(c))!==(p=Gt(h))?ss(n,l,c,p):parseFloat(c),d=parseFloat(h),e._pt=new Ci(e._pt,a,l,u,d-u,En),e._pt.u=p||0,e._props.push(l));Ms(a,s)};at("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",s="Bottom",o="Left",r=(e<3?[i,n,s,o]:[i+o,i+n,s+n,s+o]).map((function(i){return e<2?t+i:"border"+i+t}));hs[e>
121?"border"+t:t]=function(t,e,i,n,s){var o,a;if(arguments.length<4)return o=r.map((function(e){return os(t,e,i)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(n+"").split(" "),a={},r.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,s)}}));var Cs={name:"css",register:Un,targetTest:function t(e){return e.style&&e.nodeType},init:function t(e,i,s,o,r){var a=this._props,l=e.style,c=s.vars.startAt,h,u,d,f,p,g,v,b,y,w,x,_,T,P,S,E;for(v in un||Un(),this.styles=this.styles||Yn(e),E=this.styles.props,this.tween=s,i)if("autoRound"!==v&&(u=i[v],!Q[v]||!oi(v,i,s,o,e,r)))if(p=typeof u,g=hs[v],"function"===p&&(p=typeof(u=u.call(s,o,e,r))),"string"===p&&~u.indexOf("random(")&&(u=pe(u)),g)g(this,e,v,u,s)&&(S=1);else if("--"===v.substr(0,2))h=(getComputedStyle(e).getPropertyValue(v)+"").trim(),u+="",Oe.lastIndex=0,Oe.test(h)||(b=Gt(h),y=Gt(u)),y?b!==y&&(h=ss(e,v,h,y)+y):b&&(u+=b),this.add(l,"setProperty",h,u,o,r,0,0,v),a.push(v),E.push(v,0,l[v]);else if("undefined"!==p){if(c&&v in c?(h="function"==typeof c[v]?c[v].call(s,o,e,r):c[v],m(h)&&~h.indexOf("random(")&&(h=pe(h)),Gt(h+"")||(h+=n.units[v]||Gt(os(e,v))||""),"="===(h+"").charAt(1)&&(h=os(e,v))):h=os(e,v),f=parseFloat(h),(w="string"===p&&"="===u.charAt(1)&&u.substr(0,2))&&(u=u.substr(2)),d=parseFloat(u),v in Sn&&("autoAlpha"===v&&(1===f&&"hidden"===os(e,"visibility")&&d&&(f=0),E.push("visibility",0,l.visibility),es(this,l,"visibility",f?"inherit":"hidden",d?"inherit":"hidden",!d)),"scale"!==v&&"transform"!==v&&~(v=Sn[v]).indexOf(",")&&(v=v.split(",")[0])),x=v in vn)if(this.styles.save(v),_||((T=e._gsap).renderTransform&&!i.parseTransform||vs(e,i.parseTransform),P=!1!==i.smoothOrigin&&T.smooth,(_=this._pt=new Ci(this._pt,l,jn,0,1,T.renderTransform,T,0,-1)).dep=1),"scale"===v)this._pt=new Ci(this._pt,T,"scaleY",f,(w?ht(f,w+d):d)-f||0,En),this._pt.u=0,a.push("scaleY",v),v+="X";else{if("transformOrigin"===v){E.push(Bn,0,l[Bn]),u=ls(u),T.svg?ms(e,u,0,P,0,this):((y=parseFloat(u.split(" ")[2])||0)!==T.zOrigin&&es(this,T,"zOrigin",T.zOrigin,y),es(this,l,v,bs(h),bs(u)));continue}if("svgOrigin"===v){ms(e,u,1,P,0,this);continue}if(v in ds){Es(this,T,v,f,w?ht(f,w+u):u);continue}if("smoothOrigin"===v){es(this,T,"smooth",T.smooth,u);continue}if("force3D"===v){T[v]=u;continue}if("transform"===v){Os(this,u,e);continue}}else v in l||(v=Zn(v)||v);if(x||(d||0===d)&&(f||0===f)&&!Pn.test(u)&&v in l)d||(d=0),(b=(h+"").substr((f+"").length))!==(y=Gt(u)||(v in n.units?n.units[v]:b))&&(f=ss(e,v,h,y)),this._pt=new Ci(this._pt,x?T:l,v,f,(w?ht(f,w+d):d)-f,x||"px"!==y&&"zIndex"!==v||!1===i.autoRound?En:Cn),this._pt.u=y||0,b!==y&&"%"!==y&&(this._pt.b=h,this._pt.r=On);else if(v in l)rs.call(this,e,v,h,w?w+u:u);else{if(!(v in e)){N(v,u);continue}this.add(e,v,h||e[v],w?w+u:u,o,r)}x||(v in l?E.push(v,0,l[v]):E.push(v,1,h||e[v])),a.push(v)}S&&Oi(this)},render:function t(e,i){if(i.tween._time||!gn())for(var n=i._pt;n;)n.r(e,n.d),n=n._next;else i.styles.revert()},get:os,aliases:Sn,getSetter:function t(e,i,n){var s=Sn[i];return s&&s.indexOf(",")<0&&(i=s),i in vn&&i!==Bn&&(e._gsap.x||os(e,"x"))?n&&pn===n?"scale"===i?Dn:Ln:(pn=n||{})&&("scale"===i?In:Fn):e.style&&!y(e.style[i])?Rn:~i.indexOf("-")?zn:wi(e,i)},core:{_removeProperty:ts,_getMatrix:gs}},ks,As,Rs,zs,Ls;Xi.utils.checkPrefix=Zn,Xi.core.getStyleSaver=Yn,zs="0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",Ls=at((ks="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(As="rotation,rotationX,rotationY,skewX,skewY")+","+(Rs="transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective"),(function(t){vn[t]=1})),at(As,(function(t){n.units[t]="deg",ds[t]=1})),Sn[Ls[13]]=ks+","+As,at(zs,(function(t){var e=t.split(":");Sn[e[1]]=Ls[e[0]]})),at("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){n.units[t]="px"})),Xi.registerPlugin(Cs);var Ds=Xi.registerPlugin(Cs)||Xi,Is=Ds.core.Tween;t.Back=en,t.Bounce=sn,t.CSSPlugin=Cs,t.Circ=an,t.Cubic=Gi,t.Elastic=tn,t.Expo=rn,t.Linear=Zi,t.Power0=Yi,t.Power1=Wi,t.Power2=$i,t.Power3=qi,t.Power4=Vi,t.Quad=Ui,t.Quart=Ki,t.Quint=Ji,t.Sine=on,t.SteppedEase=nn,t.Strong=Qi,t.TimelineLite=ei,t.TimelineMax=ei,t.TweenLite=gi,t.TweenMax=Is,t.default=Ds,t.gsap=Ds,"undefined"==typeof window||window!==t?Object.defineProperty(t,"__esMo
12dule",{value:!0}):delete window.default})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t} 13/*! 14 * Observer 3.11.3 15 * https://greensock.com 16 * 17 * @license Copyright 2008-2022, GreenSock. All rights reserved. 18 * Subject to the terms at https://greensock.com/standard-license or for 19 * Club GreenSock members, the agreement issued with that membership. 20 * @author: Jack Doyle, [email protected] 21 */var n,s,o,r,a,l,c,h,u,d,f,p,g,m=function t(){return n||"undefined"!=typeof window&&(n=window.gsap)&&n.registerPlugin&&n},v=1,b=[],y=[],w=[],x=Date.now,_=function t(e,i){return i},T=function t(){var e=d.core,i=e.bridge||{},n=e._scrollers,s=e._proxies;n.push.apply(n,y),s.push.apply(s,w),y=n,w=s,_=function t(e,n){return i[e](n)}},P=function t(e,i){return~w.indexOf(e)&&w[w.indexOf(e)+1][i]},S=function t(e){return!!~f.indexOf(e)},E=function t(e,i,n,s,o){return e.addEventListener(i,n,{passive:!s,capture:!!o})},M=function t(e,i,n,s){return e.removeEventListener(i,n,!!s)},O="scrollLeft",C="scrollTop",k=function t(){return p&&p.isPressed||y.cache++},A=function t(e,i){var n=function t(n){if(n||0===n){v&&(r.history.scrollRestoration="manual");var s=p&&p.isPressed;n=t.v=Math.round(n)||(p&&p.iOS?1:0),e(n),t.cacheID=y.cache,s&&_("ss",n)}else(i||y.cache!==t.cacheID||_("ref"))&&(t.cacheID=y.cache,t.v=e());return t.v+t.offset};return n.offset=0,e&&n},R={s:O,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:A((function(t){return arguments.length?r.scrollTo(t,z.sc()):r.pageXOffset||a.scrollLeft||l.scrollLeft||c.scrollLeft||0}))},z={s:C,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:R,sc:A((function(t){return arguments.length?r.scrollTo(R.sc(),t):r.pageYOffset||a.scrollTop||l.scrollTop||c.scrollTop||0}))},L=function t(e){return n.utils.toArray(e)[0]||("string"==typeof e&&!1!==n.config().nullTargetWarn?console.warn("Element not found:",e):null)},D=function t(e,i){var s=i.s,o=i.sc;S(e)&&(e=a.scrollingElement||l);var r=y.indexOf(e),c=o===z.sc?1:2;!~r&&(r=y.push(e)-1),y[r+c]||e.addEventListener("scroll",k);var h=y[r+c],u=h||(y[r+c]=A(P(e,s),!0)||(S(e)?o:A((function(t){return arguments.length?e[s]=t:e[s]}))));return u.target=e,h||(u.smooth="smooth"===n.getProperty(e,"scrollBehavior")),u},I=function t(e,i,n){var s=e,o=e,r=x(),a=r,l=i||50,c=Math.max(500,3*l),h=function t(e,i){var c=x();i||c-r>l?(o=s,s=e,a=r,r=c):n?s+=e:s=o+(e-o)/(c-a)*(r-a)},u,d=function t(e){var i=a,l=o,u=x();return(e||0===e)&&e!==s&&h(e),r===a||u-a>c?0:(s+(n?l:-l))/((n?u:r)-i)*1e3};return{update:h,reset:function t(){o=s=n?0:s,a=r=0},getVelocity:d}},F=function t(e,i){return i&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},j=function t(e){var i=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(i)>=Math.abs(n)?i:n},B=function t(){(d=n.core.globals().ScrollTrigger)&&d.core&&T()},H=function t(e){return(n=e||m())&&"undefined"!=typeof document&&document.body&&(r=window,a=document,l=a.documentElement,c=a.body,f=[r,a,l,c],o=n.utils.clamp,u="onpointerenter"in c?"pointer":"mouse",h=N.isTouch=r.matchMedia&&r.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in r||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,g=N.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return v=0}),500),B(),s=1),s};R.op=z,y.cache=0;var N=function(){function t(t){this.init(t)}var e;return t.prototype.init=function t(e){s||H(n)||console.warn("Please gsap.registerPlugin(Observer)"),d||B();var i=e.tolerance,o=e.dragMinimum,f=e.type,m=e.target,v=e.lineHeight,y=e.debounce,w=e.preventDefault,_=e.onStop,T=e.onStopDelay,P=e.ignore,O=e.wheelSpeed,C=e.event,A=e.onDragStart,N=e.onDragEnd,X=e.onDrag,Y=e.onPress,W=e.onRelease,q=e.onRight,V=e.onLeft,Z=e.onUp,U=e.onDown,G=e.onChangeX,K=e.onCh
vendor: 4,822 bytes, line 21
21angeY,J=e.onChange,Q=e.onToggleX,tt=e.onToggleY,et=e.onHover,it=e.onHoverEnd,nt=e.onMove,st=e.ignoreCheck,ot=e.isNormalizer,rt=e.onGestureStart,at=e.onGestureEnd,lt=e.onWheel,ct=e.onEnable,ht=e.onDisable,ut=e.onClick,dt=e.scrollSpeed,ft=e.capture,pt=e.allowClicks,gt=e.lockAxis,mt=e.onLockAxis;this.target=m=L(m)||l,this.vars=e,P&&(P=n.utils.toArray(P)),i=i||1e-9,o=o||0,O=O||1,dt=dt||1,f=f||"wheel,touch,pointer",y=!1!==y,v||(v=parseFloat(r.getComputedStyle(c).lineHeight)||22);var vt,bt,yt,wt,xt,_t,Tt,Pt=this,St=0,Et=0,Mt=D(m,R),Ot=D(m,z),Ct=Mt(),kt=Ot(),At=~f.indexOf("touch")&&!~f.indexOf("pointer")&&"pointerdown"===g[0],Rt=S(m),zt=m.ownerDocument||a,Lt=[0,0,0],Dt=[0,0,0],It=0,Ft=function t(){return It=x()},jt=function t(e,i){return(Pt.event=e)&&P&&~P.indexOf(e.target)||i&&At&&"touch"!==e.pointerType||st&&st(e,i)},Bt=function t(){Pt._vx.reset(),Pt._vy.reset(),bt.pause(),_&&_(Pt)},Ht=function t(){var e=Pt.deltaX=j(Lt),n=Pt.deltaY=j(Dt),s=Math.abs(e)>=i,o=Math.abs(n)>=i;J&&(s||o)&&J(Pt,e,n,Lt,Dt),s&&(q&&Pt.deltaX>0&&q(Pt),V&&Pt.deltaX<0&&V(Pt),G&&G(Pt),Q&&Pt.deltaX<0!=St<0&&Q(Pt),St=Pt.deltaX,Lt[0]=Lt[1]=Lt[2]=0),o&&(U&&Pt.deltaY>0&&U(Pt),Z&&Pt.deltaY<0&&Z(Pt),K&&K(Pt),tt&&Pt.deltaY<0!=Et<0&&tt(Pt),Et=Pt.deltaY,Dt[0]=Dt[1]=Dt[2]=0),(wt||yt)&&(nt&&nt(Pt),yt&&(X(Pt),yt=!1),wt=!1),_t&&!(_t=!1)&&mt&&mt(Pt),xt&&(lt(Pt),xt=!1),vt=0},Nt=function t(e,i,n){Lt[n]+=e,Dt[n]+=i,Pt._vx.update(e),Pt._vy.update(i),y?vt||(vt=requestAnimationFrame(Ht)):Ht()},Xt=function t(e,i){gt&&!Tt&&(Pt.axis=Tt=Math.abs(e)>Math.abs(i)?"x":"y",_t=!0),"y"!==Tt&&(Lt[2]+=e,Pt._vx.update(e,!0)),"x"!==Tt&&(Dt[2]+=i,Pt._vy.update(i,!0)),y?vt||(vt=requestAnimationFrame(Ht)):Ht()},Yt=function t(e){if(!jt(e,1)){var i=(e=F(e,w)).clientX,n=e.clientY,s=i-Pt.x,r=n-Pt.y,a=Pt.isDragging;Pt.x=i,Pt.y=n,(a||Math.abs(Pt.startX-i)>=o||Math.abs(Pt.startY-n)>=o)&&(X&&(yt=!0),a||(Pt.isDragging=!0),Xt(s,r),a||A&&A(Pt))}},Wt=Pt.onPress=function(t){jt(t,1)||(Pt.axis=Tt=null,bt.pause(),Pt.isPressed=!0,t=F(t),St=Et=0,Pt.startX=Pt.x=t.clientX,Pt.startY=Pt.y=t.clientY,Pt._vx.reset(),Pt._vy.reset(),E(ot?m:zt,g[1],Yt,w,!0),Pt.deltaX=Pt.deltaY=0,Y&&Y(Pt))},$t=function t(e){if(!jt(e,1)){M(ot?m:zt,g[1],Yt,!0);var i=Pt.isDragging&&(Math.abs(Pt.x-Pt.startX)>3||Math.abs(Pt.y-Pt.startY)>3),s=F(e);i||(Pt._vx.reset(),Pt._vy.reset(),w&&pt&&n.delayedCall(.08,(function(){if(x()-It>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(zt.createEvent){var t=zt.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,r,1,s.screenX,s.screenY,s.clientX,s.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}))),Pt.isDragging=Pt.isGesturing=Pt.isPressed=!1,_&&!ot&&bt.restart(!0),N&&i&&N(Pt),W&&W(Pt,i)}},qt=function t(e){return e.touches&&e.touches.length>1&&(Pt.isGesturing=!0)&&rt(e,Pt.isDragging)},Vt=function t(){return(Pt.isGesturing=!1)||at(Pt)},Zt=function t(e){if(!jt(e)){var i=Mt(),n=Ot();Nt((i-Ct)*dt,(n-kt)*dt,1),Ct=i,kt=n,_&&bt.restart(!0)}},Ut=function t(e){if(!jt(e)){e=F(e,w),lt&&(xt=!0);var i=(1===e.deltaMode?v:2===e.deltaMode?r.innerHeight:1)*O;Nt(e.deltaX*i,e.deltaY*i,0),_&&!ot&&bt.restart(!0)}},Gt=function t(e){if(!jt(e)){var i=e.clientX,n=e.clientY,s=i-Pt.x,o=n-Pt.y;Pt.x=i,Pt.y=n,wt=!0,(s||o)&&Xt(s,o)}},Kt=function t(e){Pt.event=e,et(Pt)},Jt=function t(e){Pt.event=e,it(Pt)},Qt=function t(e){return jt(e)||F(e,w)&&ut(Pt)};bt=Pt._dc=n.delayedCall(T||.25,Bt).pause(),Pt.deltaX=Pt.deltaY=0,Pt._vx=I(0,50,!0),Pt._vy=I(0,50,!0),Pt.scrollX=Mt,Pt.scrollY=Ot,Pt.isDragging=Pt.isGesturing=Pt.isPressed=!1,Pt.enable=function(t){return Pt.isEnabled||(E(Rt?zt:m,"scroll",k),f.indexOf("scroll")>=0&&E(Rt?zt:m,"scroll",Zt,w,ft),f.indexOf("wheel")>=0&&E(m,"wheel",Ut,w,ft),(f.indexOf("touch")>=0&&h||f.indexOf("pointer")>=0)&&(E(m,g[0],Wt,w,ft),E(zt,g[2],$t),E(zt,g[3],$t),pt&&E(m,"click",Ft,!1,!0),ut&&E(m,"click",Qt),rt&&E(zt,"gesturestart",qt),at&&E(zt,"gestureend",Vt),et&&E(m,u+"enter",Kt),it&&E(m,u+"leave",Jt),nt&&E(m,u+"move",Gt)),Pt.isEnabled=!0,t&&t.type&&Wt(t),ct&&ct(Pt)),Pt},Pt.disable=function(){Pt.isEnabled&&(b.filter((function(t){return t!==Pt&&S(t.target)})).length||M(Rt?zt:m,"scroll",k),Pt.isPressed&&(Pt._vx.reset(),Pt._vy.reset(),M(ot?m:zt,g[1],Yt,!0)),M(Rt?zt:m,"scroll",Zt,ft),M(m,"wheel",Ut,ft),M(m,g[0],Wt,ft),M(zt,g[2],$t),M(zt,g[3],$t),M(m,"click",Ft,!0),M(m,"click",Qt),M(zt,"gesturestart",qt),M(zt,"gestureend",Vt),M(m,u+"enter",Kt),M(m,u+"leave",Jt),M(m,u+"move",Gt),Pt.isEnabled=Pt.isPressed=Pt.isDragging=!1,ht&&ht(Pt))},Pt.kill=function(){Pt.disable();var t=b.indexOf(Pt);t>=0&&b.splice(t,1),p===Pt&&(p=0)},b.push(Pt),ot&&S(m)&&(p=Pt),Pt.enable(C)},i(t,[{key:"velocityX",get:function t(){return this._vx.getVelocity()}},{key:"velocityY",get:function t(){return this._vy.getVelocity()}}]),t}();N.version="3.11.3",N.create=function(t){return new N(t)},N.register=H,N.getAll=function(){return b.slice()}
21,N.getById=function(t){return b.filter((function(e){return e.vars.id===t}))[0]},m()&&n.registerPlugin(N); 22/*! 23 * ScrollTrigger 3.11.3 24 * https://greensock.com 25 * 26 * @license Copyright 2008-2022, GreenSock. All rights reserved. 27 * Subject to the terms at https://greensock.com/standard-license or for 28 * Club GreenSock members, the agreement issued with that membership. 29 * @author: Jack Doyle, [email protected] 30 */ 31var X,Y,W,q,V,Z,U,G,K,J,Q,tt,et,it,nt,st,ot,rt,at,lt,ct,ht,ut,dt,ft,pt,gt,mt,vt,bt,yt=1,wt=Date.now,xt=wt(),_t=0,Tt=0,Pt=function t(){return it=1},St=function t(){return it=0},Et=function t(e){return e},Mt=function t(e){return Math.round(1e5*e)/1e5||0},Ot=function t(){return"undefined"!=typeof window},Ct=function t(){return X||Ot()&&(X=window.gsap)&&X.registerPlugin&&X},kt=function t(e){return!!~U.indexOf(e)},At=function t(e){return P(e,"getBoundingClientRect")||(kt(e)?function(){return ei.width=W.innerWidth,ei.height=W.innerHeight,ei}:function(){return ae(e)})},Rt=function t(e,i,n){var s=n.d,o=n.d2,r=n.a;return(r=P(e,"getBoundingClientRect"))?function(){return r()[s]}:function(){return(i?W["inner"+o]:e["client"+o])||0}},zt=function t(e,i){return!i||~w.indexOf(e)?At(e):function(){return ei}},Lt=function t(e,i){var n=i.s,s=i.d2,o=i.d,r=i.a;return(n="scroll"+s)&&(r=P(e,n))?r()-At(e)()[o]:kt(e)?(V[n]||Z[n])-(W["inner"+s]||V["client"+s]||Z["client"+s]):e[n]-e["offset"+s]},Dt=function t(e,i){for(var n=0;n<at.length;n+=3)(!i||~i.indexOf(at[n+1]))&&e(at[n],at[n+1],at[n+2])},It=function t(e){return"string"==typeof e},Ft=function t(e){return"function"==typeof e},jt=function t(e){return"number"==typeof e},Bt=function t(e){return"object"==typeof e},Ht=function t(e,i,n){return e&&e.progress(i?0:1)&&n&&e.pause()},Nt=function t(e,i){if(e.enabled){var n=i(e);n&&n.totalTime&&(e.callbackAnimation=n)}},Xt=Math.abs,Yt="left",Wt="top",$t="right",qt="bottom",Vt="width",Zt="height",Ut="Right",Gt="Left",Kt="Top",Jt="Bottom",Qt="padding",te="margin",ee="Width",ie="Height",ne="px",se=function t(e){return W.getComputedStyle(e)},oe=function t(e){var i=se(e).position;e.style.position="absolute"===i||"fixed"===i?i:"relative"},re=function t(e,i){for(var n in i)n in e||(e[n]=i[n]);return e},ae=function t(e,i){var n=i&&"matrix(1, 0, 0, 1, 0, 0)"!==se(e)[nt]&&X.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),s=e.getBoundingClientRect();return n&&n.progress(0).kill(),s},le=function t(e,i){var n=i.d2;return e["offset"+n]||e["client"+n]||0},ce=function t(e){var i=[],n=e.labels,s=e.duration(),o;for(o in n)i.push(n[o]/s);return i},he=function t(e){return function(t){return X.utils.snap(ce(e),t)}},ue=function t(e){var i=X.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort((function(t,e){return t-e}));return n?function(t,e,s){var o;if(void 0===s&&(s=.001),!e)return i(t);if(e>0){for(t-=s,o=0;o<n.length;o++)if(n[o]>=t)return n[o];return n[o-1]}for(o=n.length,t+=s;o--;)if(n[o]<=t)return n[o];return n[0]}:function(t,n,s){void 0===s&&(s=.001);var o=i(t);return!n||Math.abs(o-t)<s||o-t<0==n<0?o:i(n<0?t-e:t+e)}},de=function t(e){return function(t,i){return ue(ce(e))(t,i.direction)}},fe=function t(e,i,n,s){return n.split(",").forEach((function(t){return e(i,t,s)}))},pe=function t(e,i,n,s,o){return e.addEventListener(i,n,{passive:!s,capture:!!o})},ge=function t(e,i,n,s){return e.removeEventListener(i,n,!!s)},me=function t(e,i,n){return n&&n.wheelHandler&&e(i,"wheel",n)},ve={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},be={toggleActions:"play",anticipatePin:0},ye={top:0,left:0,center:.5,bottom:1,right:1},we=function t(e,i){if(It(e)){var n=e.indexOf("="),s=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf("%")>n&&(s*=i/100),e=e.substr(0,n-1)),e=s+(e in ye?ye[e]*i:~e.indexOf("%")?parseFloat(e)*i/100:parseFloat(e)||0)}return e},xe=function t(e,i,n,s,o,r,a,l){var c=o.startColor,h=o.endColor,u=o.fontSize,d=o.indent,f=o.fontWeight,p=q.createElement("div"),g=kt(n)||"fixed"===P(n,"pinType"),m=-1!==e.indexOf("scroller"),v=g?Z:n,b=-1!==e.indexOf("start"),y=b?c:h,w="border-color:"+y+";font-size:"+u+";color:"+y+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return w+="position:"+((m||l)&&g?"fixed;":"absolute;"),(m||l||!g)&&(w+=(s===z?$t:qt)+":"+(r+parseFloat(d))+"px;"),a&&(w+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),p._isStart=b,p.setAttribute("class","gsap-marker-"+e+(i?" marker-"+i:"")),p.style.cssText=w,p.innerText=i||0===i?e+"-"+i:e,v.children[0]?v.insertBefore(p,v.children[0]):v.appendChild(p),p._offset=p["offset"+s.op.d2],_e(p,0,s,b),p},_e=function t(e,i,n,s){var o={display:"block"},r=n[s?"os2":"p2"],a=n[s?"p2":"os2"];e._isFlipped=s,o[n.a+"Percent"]=s?-100:0,o[n.a]=s?"1px":0,o["border"+r+ee]=1,o["border"+a+ee]=0,o[n.p]=i+"px",X.set(e,o)},Te=[],Pe={},Se,Ee=function t(){return wt()-_t>34&&(Se||(Se=requestAnimationFrame(qe)))},Me=function t(){(!ut||!ut.isPressed||ut.startX>Z.clientWidth)&&(y.cache++,ut?Se||(Se=requestAnimationFrame(qe)):qe(),_t||ze("scrollStart"),_t=wt())}
31,Oe=function t(){pt=W.innerWidth,ft=W.innerHeight},Ce=function t(){y.cache++,!et&&!ht&&!q.fullscreenElement&&!q.webkitFullscreenElement&&(!dt||pt!==W.innerWidth||Math.abs(W.innerHeight-ft)>.25*W.innerHeight)&&G.restart(!0)},ke={},Ae=[],Re=function t(){return ge(ri,"scrollEnd",t)||Xe(!0)},ze=function t(e){return ke[e]&&ke[e].map((function(t){return t()}))||Ae},Le=[],De=function t(e){for(var i=0;i<Le.length;i+=5)(!e||Le[i+4]&&Le[i+4].query===e)&&(Le[i].style.cssText=Le[i+1],Le[i].getBBox&&Le[i].setAttribute("transform",Le[i+2]||""),Le[i+3].uncache=1)},Ie=function t(e,i){var n;for(st=0;st<Te.length;st++)!(n=Te[st])||i&&n._ctx!==i||(e?n.kill(1):n.revert(!0,!0));i&&De(i),i||ze("revert")},Fe=function t(e,i){y.cache++,(i||!je)&&y.forEach((function(t){return Ft(t)&&t.cacheID++&&(t.rec=0)})),It(e)&&(W.history.scrollRestoration=vt=e)},je,Be=0,He,Ne=function t(){if(He!==Be){var e=He=Be;requestAnimationFrame((function(){return e===Be&&Xe(!0)}))}},Xe=function t(e,i){if(!_t||e){je=ri.isRefreshing=!0,y.forEach((function(t){return Ft(t)&&t.cacheID++&&(t.rec=t())}));var n=ze("refreshInit");lt&&ri.sort(),i||Ie(),y.forEach((function(t){Ft(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))})),Te.slice(0).forEach((function(t){return t.refresh()})),Te.forEach((function(t,e){if(t._subPinOffset&&t.pin){var i=t.vars.horizontal?"offsetWidth":"offsetHeight",n=t.pin[i];t.revert(!0,1),t.adjustPinSpacing(t.pin[i]-n),t.revert(!1,1)}})),Te.forEach((function(t){return"max"===t.vars.end&&t.setPositions(t.start,Math.max(t.start+1,Lt(t.scroller,t._dir)))})),n.forEach((function(t){return t&&t.render&&t.render(-1)})),y.forEach((function(t){Ft(t)&&(t.smooth&&requestAnimationFrame((function(){return t.target.style.scrollBehavior="smooth"})),t.rec&&t(t.rec))})),Fe(vt,1),G.pause(),Be++,qe(2),Te.forEach((function(t){return Ft(t.vars.onRefresh)&&t.vars.onRefresh(t)})),je=ri.isRefreshing=!1,ze("refresh")}else pe(ri,"scrollEnd",Re)},Ye=0,We=1,$e,qe=function t(e){if(!je||2===e){ri.isUpdating=!0,$e&&$e.update(0);var i=Te.length,n=wt(),s=n-xt>=50,o=i&&Te[0].scroll();if(We=Ye>o?-1:1,Ye=o,s&&(_t&&!it&&n-_t>200&&(_t=0,ze("scrollEnd")),Q=xt,xt=n),We<0){for(st=i;st-- >0;)Te[st]&&Te[st].update(0,s);We=1}else for(st=0;st<i;st++)Te[st]&&Te[st].update(0,s);ri.isUpdating=!1}Se=0},Ve=[Yt,Wt,qt,$t,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Ze=Ve.concat([Vt,Zt,"boxSizing","maxWidth","maxHeight","position",te,Qt,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),Ue=function t(e,i,n){Je(n);var s=e._gsap;if(s.spacerIsNative)Je(s.spacerState);else if(e._gsap.swappedIn){var o=i.parentNode;o&&(o.insertBefore(e,i),o.removeChild(i))}e._gsap.swappedIn=!1},Ge=function t(e,i,n,s){if(!e._gsap.swappedIn){for(var o=Ve.length,r=i.style,a=e.style,l;o--;)r[l=Ve[o]]=n[l];r.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(r.display="inline-block"),a.bottom=a.right="auto",r.flexBasis=n.flexBasis||"auto",r.overflow="visible",r.boxSizing="border-box",r.width=le(e,R)+ne,r.height=le(e,z)+ne,r.padding=a.margin=a.top=a.left="0",Je(s),a.width=a.maxWidth=n.width,a.height=a.maxHeight=n.height,a.padding=n.padding,e.parentNode!==i&&(e.parentNode.insertBefore(i,e),i.appendChild(e)),e._gsap.swappedIn=!0}},Ke=/([A-Z])/g,Je=function t(e){if(e){var i=e.t.style,n=e.length,s=0,o,r;for((e.t._gsap||X.core.getCache(e.t)).uncache=1;s<n;s+=2)r=e[s+1],o=e[s],r?i[o]=r:i[o]&&i.removeProperty(o.replace(Ke,"-$1").toLowerCase())}},Qe=function t(e){for(var i=Ze.length,n=e.style,s=[],o=0;o<i;o++)s.push(Ze[o],n[Ze[o]]);return s.t=e,s},ti=function t(e,i,n){for(var s=[],o=e.length,r=n?8:0,a;r<o;r+=2)a=e[r],s.push(a,a in i?i[a]:e[r+1]);return s.t=e.t,s},ei={left:0,top:0},ii=function t(e,i,n,s,o,r,a,l,c,h,u,d,f){Ft(e)&&(e=e(l)),It(e)&&"max"===e.substr(0,3)&&(e=d+("="===e.charAt(4)?we("0"+e.substr(3),n):0));var p=f?f.time():0,g,m,v;if(f&&f.seek(0),jt(e))a&&_e(a,n,s,!0);else{Ft(i)&&(i=i(l));var b=(e||"0").split(" "),y,w,x,_;
31v=L(i)||Z,(y=ae(v)||{})&&(y.left||y.top)||"none"!==se(v).display||(_=v.style.display,v.style.display="block",y=ae(v),_?v.style.display=_:v.style.removeProperty("display")),w=we(b[0],y[s.d]),x=we(b[1]||"0",n),e=y[s.p]-c[s.p]-h+w+o-x,a&&_e(a,x,s,n-x<20||a._isStart&&x>20),n-=n-x}if(r){var T=e+n,P=r._isStart;g="scroll"+s.d2,_e(r,T,s,P&&T>20||!P&&(u?Math.max(Z[g],V[g]):r.parentNode[g])<=T+1),u&&(c=ae(a),u&&(r.style[s.op.p]=c[s.op.p]-s.op.m-r._offset+ne))}return f&&v&&(g=ae(v),f.seek(d),m=ae(v),f._caScrollDist=g[s.p]-m[s.p],e=e/f._caScrollDist*d),f&&f.seek(p),f?e:Math.round(e)},ni=/(webkit|moz|length|cssText|inset)/i,si=function t(e,i,n,s){if(e.parentNode!==i){var o=e.style,r,a;if(i===Z){for(r in e._stOrig=o.cssText,a=se(e))+r||ni.test(r)||!a[r]||"string"!=typeof o[r]||"0"===r||(o[r]=a[r]);o.top=n,o.left=s}else o.cssText=e._stOrig;X.core.getCache(e).uncache=1,i.appendChild(e)}},oi=function t(e,i){var n=D(e,i),s="_scroll"+i.p2,o,r,a=function t(i,a,l,c,h){var u=t.tween,d=a.onComplete,f={};return l=l||n(),h=c&&h||0,c=c||i-l,u&&u.kill(),o=Math.round(l),a[s]=i,a.modifiers=f,f[s]=function(e){return(e=Math.round(n()))!==o&&e!==r&&Math.abs(e-o)>3&&Math.abs(e-r)>3?(u.kill(),t.tween=0):e=l+c*u.ratio+h*u.ratio*u.ratio,r=o,o=Math.round(e)},a.onComplete=function(){t.tween=0,d&&d.call(u)},u=t.tween=X.to(e,a)};return e[s]=n,n.wheelHandler=function(){return a.tween&&a.tween.kill()&&(a.tween=0)},pe(e,"wheel",n.wheelHandler),a},ri=function(){function t(e,i){Y||t.register(X)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,i)}var e;return t.prototype.init=function e(i,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Tt){var s=i=re(It(i)||jt(i)||i.nodeType?{trigger:i}:i,be),o=s.onUpdate,r=s.toggleClass,a=s.id,l=s.onToggle,c=s.onRefresh,h=s.scrub,u=s.trigger,d=s.pin,f=s.pinSpacing,p=s.invalidateOnRefresh,g=s.anticipatePin,m=s.onScrubComplete,v=s.onSnapComplete,b=s.once,x=s.snap,_=s.pinReparent,T=s.pinSpacer,S=s.containerAnimation,E=s.fastScrollEnd,M=s.preventOverlaps,O=i.horizontal||i.containerAnimation&&!1!==i.horizontal?R:z,C=!h&&0!==h,k=L(i.scroller||W),A=X.core.getCache(k),I=kt(k),F="fixed"===("pinType"in i?i.pinType:P(k,"pinType")||I&&"fixed"),j=[i.onEnter,i.onLeave,i.onEnterBack,i.onLeaveBack],B=C&&i.toggleActions.split(" "),H="markers"in i?i.markers:be.markers,N=I?0:parseFloat(se(k)["border"+O.p2+ee])||0,Y=this,U=i.onRefreshInit&&function(){return i.onRefreshInit(Y)},G=Rt(k,I,O),tt=zt(k,I),nt=0,ot=0,rt=D(k,O),at,ht,ut,dt,ft,pt,gt,vt,xt,Pt,St,Ot,Ct,At,Dt,Yt,Wt,$t,qt,Vt,Zt,Ut,Gt,Kt,Jt,ie,ce,fe,me,ye,_e,Se,Ee,Oe,ke,Ae,ze,Le;if(mt(Y),Y._dir=O,g*=45,Y.scroller=k,Y.scroll=S?S.time.bind(S):rt,dt=rt(),Y.vars=i,n=n||i.animation,"refreshPriority"in i&&(lt=1,-9999===i.refreshPriority&&($e=Y)),A.tweenScroll=A.tweenScroll||{top:oi(k,z),left:oi(k,R)},Y.tweenTo=at=A.tweenScroll[O.p],Y.scrubDuration=function(t){(_e=jt(t)&&t)?ye?ye.duration(t):ye=X.to(n,{ease:"expo",totalProgress:"+=0.001",duration:_e,paused:!0,onComplete:function t(){return m&&m(Y)}}):(ye&&ye.progress(1).kill(),ye=0)},n&&(n.vars.lazy=!1,n._initted||!1!==n.vars.immediateRender&&!1!==i.immediateRender&&n.duration()&&n.render(0,!0,!0),Y.animation=n.pause(),n.scrollTrigger=Y,Y.scrubDuration(h),fe=0,a||(a=n.vars.id)),Te.push(Y),x&&(Bt(x)&&!x.push||(x={snapTo:x}),"scrollBehavior"in Z.style&&X.set(I?[Z,V]:k,{scrollBehavior:"auto"}),y.forEach((function(t){return Ft(t)&&t.target===(I?q.scrollingElement||V:k)&&(t.smooth=!1)})),ut=Ft(x.snapTo)?x.snapTo:"labels"===x.snapTo?he(n):"labelsDirectional"===x.snapTo?de(n):!1!==x.directional?function(t,e){return ue(x.snapTo)(t,wt()-ot<500?0:e.direction)}:X.utils.snap(x.snapTo),Se=x.duration||{min:.1,max:2},Se=Bt(Se)?J(Se.min,Se.max):J(Se,Se),Ee=X.delayedCall(x.delay||_e/2||.1,(function(){var t=rt(),e=wt()-ot<500,i=at.tween;if(!(e||Math.abs(Y.getVelocity())<10)||i||it||nt===t)Y.isActive&&nt!==t&&Ee.restart(!0);else{var s=(t-pt)/Ct,o=n&&!C?n.totalProgress():s,r=e?0:(o-me)/(wt()-Q)*1e3||0,a=X.utils.clamp(-s,1-s,Xt(r/2)*r/.185),l=s+(!1===x.inertia?0:a),c=J(0,1,ut(l,Y)),h=Math.round(pt+c*Ct),u=x,d=u.onStart,f=u.onInterrupt,p=u.onComplete;
31if(t<=gt&&t>=pt&&h!==t){if(i&&!i._initted&&i.data<=Xt(h-t))return;!1===x.inertia&&(a=c-s),at(h,{duration:Se(Xt(.185*Math.max(Xt(l-o),Xt(c-o))/r/.05||0)),ease:x.ease||"power3",data:Xt(h-t),onInterrupt:function t(){return Ee.restart(!0)&&f&&f(Y)},onComplete:function t(){Y.update(),nt=rt(),fe=me=n&&!C?n.totalProgress():Y.progress,v&&v(Y),p&&p(Y)}},t,a*Ct,h-t-a*Ct),d&&d(Y,at.tween)}}})).pause()),a&&(Pe[a]=Y),(Le=(u=Y.trigger=L(u||d))&&u._gsap&&u._gsap.stRevert)&&(Le=Le(Y)),d=!0===d?u:L(d),It(r)&&(r={targets:u,className:r}),d&&(!1===f||f===te||(f=!(!f&&d.parentNode&&d.parentNode.style&&"flex"===se(d.parentNode).display)&&Qt),Y.pin=d,(ht=X.core.getCache(d)).spacer?At=ht.pinState:(T&&((T=L(T))&&!T.nodeType&&(T=T.current||T.nativeElement),ht.spacerIsNative=!!T,T&&(ht.spacerState=Qe(T))),ht.spacer=Wt=T||q.createElement("div"),Wt.classList.add("pin-spacer"),a&&Wt.classList.add("pin-spacer-"+a),ht.pinState=At=Qe(d)),!1!==i.force3D&&X.set(d,{force3D:!0}),Y.spacer=Wt=ht.spacer,ce=se(d),Gt=ce[f+O.os2],qt=X.getProperty(d),Vt=X.quickSetter(d,O.a,ne),Ge(d,Wt,ce),Yt=Qe(d)),H){Ot=Bt(H)?re(H,ve):ve,Pt=xe("scroller-start",a,k,O,Ot,0),St=xe("scroller-end",a,k,O,Ot,0,Pt),$t=Pt["offset"+O.op.d2];var De=L(P(k,"content")||k);vt=this.markerStart=xe("start",a,De,O,Ot,$t,0,S),xt=this.markerEnd=xe("end",a,De,O,Ot,$t,0,S),S&&(ze=X.quickSetter([vt,xt],O.a,ne)),F||w.length&&!0===P(k,"fixedMarkers")||(oe(I?Z:k),X.set([Pt,St],{force3D:!0}),Jt=X.quickSetter(Pt,O.a,ne),ie=X.quickSetter(St,O.a,ne))}if(S){var Ie=S.vars.onUpdate,Fe=S.vars.onUpdateParams;S.eventCallback("onUpdate",(function(){Y.update(0,0,1),Ie&&Ie.apply(Fe||[])}))}Y.previous=function(){return Te[Te.indexOf(Y)-1]},Y.next=function(){return Te[Te.indexOf(Y)+1]},Y.revert=function(t,e){if(!e)return Y.kill(!0);var i=!1!==t||!Y.enabled,s=et;i!==Y.isReverted&&(i&&(ke=Math.max(rt(),Y.scroll.rec||0),Oe=Y.progress,Ae=n&&n.progress()),vt&&[vt,xt,Pt,St].forEach((function(t){return t.style.display=i?"none":"block"})),i&&(et=1,Y.update(i)),d&&(i?Ue(d,Wt,At):(!_||!Y.isActive)&&Ge(d,Wt,se(d),Kt)),i||Y.update(i),et=s,Y.isReverted=i)},Y.refresh=function(e,s){if(!et&&Y.enabled||s)if(d&&e&&_t)pe(t,"scrollEnd",Re);else{!je&&U&&U(Y),et=1,ot=wt(),at.tween&&(at.tween.kill(),at.tween=0),ye&&ye.pause(),p&&n&&n.revert({kill:!1}).invalidate(),Y.isReverted||Y.revert(!0,!0),Y._subPinOffset=!1;for(var o=G(),r=tt(),a=S?S.duration():Lt(k,O),l=0,h=0,g=i.end,m=i.endTrigger||u,v=i.start||(0!==i.start&&u?d?"0 0":"0 100%":0),b=Y.pinnedContainer=i.pinnedContainer&&L(i.pinnedContainer),y=u&&Math.max(0,Te.indexOf(Y))||0,w=y,x,T,P,E,M,A,j,B,H,W;w--;)(A=Te[w]).end||A.refresh(0,1)||(et=1),!(j=A.pin)||j!==u&&j!==d||A.isReverted||(W||(W=[]),W.unshift(A),A.revert(!0,!0)),A!==Te[w]&&(y--,w--);for(Ft(v)&&(v=v(Y)),pt=ii(v,u,o,O,rt(),vt,Pt,Y,r,N,F,a,S)||(d?-.001:0),Ft(g)&&(g=g(Y)),It(g)&&!g.indexOf("+=")&&(~g.indexOf(" ")?g=(It(v)?v.split(" ")[0]:"")+g:(l=we(g.substr(2),o),g=It(v)?v:pt+l,m=u)),gt=Math.max(pt,ii(g||(m?"100% 0":a),m,o,O,rt()+l,xt,St,Y,r,N,F,a,S))||-.001,Ct=gt-pt||(pt-=.01)&&.001,l=0,w=y;w--;)(j=(A=Te[w]).pin)&&A.start-A._pinPush<=pt&&!S&&A.end>0&&(x=A.end-A.start,(j===u&&A.start-A._pinPush<pt||j===b)&&!jt(v)&&(l+=x*(1-A.progress)),j===d&&(h+=x));if(pt+=l,gt+=l,Y._pinPush=h,vt&&l&&((x={})[O.a]="+="+l,b&&(x[O.p]="-="+rt()),X.set([vt,xt],x)),d)x=se(d),E=O===z,P=rt(),Zt=parseFloat(qt(O.a))+h,!a&>>1&&((I?Z:k).style["overflow-"+O.a]="scroll"),Ge(d,Wt,x),Yt=Qe(d),T=ae(d,!0),B=F&&D(k,E?R:z)(),f&&((Kt=[f+O.os2,Ct+h+ne]).t=Wt,(w=f===Qt?le(d,O)+Ct+h:0)&&Kt.push(O.d,w+ne),Je(Kt),b&&Te.forEach((function(t){t.pin===b&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)})),F&&rt(ke)),F&&((M={top:T.top+(E?P-pt:B)+ne,left:T.left+(E?B:P-pt)+ne,boxSizing:"border-box",position:"fixed"}).width=M.maxWidth=Math.ceil(T.width)+ne,M.height=M.maxHeight=Math.ceil(T.height)+ne,M.margin=M.marginTop=M.marginRight=M.marginBottom=M.marginLeft="0",M.padding=x.padding,M.paddingTop=x.paddingTop,M.paddingRight=x.paddingRight,M.paddingBottom=x.paddingBottom,M.paddingLeft=x.paddingLeft,Dt=ti(At,M,_),je&&rt(0)),n?(H=n._initted,ct(1),n.render(n.duration(),!0,!0),Ut=qt(O.a)-Zt+Ct+h,Ct!==Ut&&F&&Dt.splice(Dt.length-2,2),n.render(0,!0,!0),H||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),ct(0)):Ut=Ct;else if(u&&rt()&&!S)for(T=u.parentNode;T&&T!==Z;)T._pinOffset&&(pt-=T._pinOffset,gt-=T._pinOffset),T=T.parentNode;W&&W.forEach((function(t){return t.revert(!1,!0)})),Y.start=pt,Y.end=gt,dt=ft=je?ke:rt(),S||je||(dt<ke&&rt(ke),Y.scroll.rec=0),Y.revert(!1,!0),Ee&&(nt=-1,Y.isActive&&rt(pt+Ct*Oe),Ee.restart(!0)),et=0,n&&C&&(n._initted||Ae)&&n.progress()!==Ae&&n.progress(Ae,!0).render(n.time(),!0,!0),(Oe!==Y.progress||S)&&(n&&!C&&n.totalProgress(Oe,!0),Y.progress=(dt-pt)/Ct===Oe?0:Oe),d&&f&&(Wt._pinOffset=Math.round(Y.progress*Ut)),c&&!je&&c(Y)}},Y.getVelocity=function(){return(rt()-ft)/(wt()-Q)*1e3||0}
31,Y.endAnimation=function(){Ht(Y.callbackAnimation),n&&(ye?ye.progress(1):n.paused()?C||Ht(n,Y.direction<0,1):Ht(n,n.reversed()))},Y.labelToScroll=function(t){return n&&n.labels&&(pt||Y.refresh()||pt)+n.labels[t]/n.duration()*Ct||0},Y.getTrailing=function(t){var e=Te.indexOf(Y),i=Y.direction>0?Te.slice(0,e).reverse():Te.slice(e+1);return(It(t)?i.filter((function(e){return e.vars.preventOverlaps===t})):i).filter((function(t){return Y.direction>0?t.end<=pt:t.start>=gt}))},Y.update=function(t,e,i){if(!S||i||t){var s=je?ke:Y.scroll(),a=t?0:(s-pt)/Ct,c=a<0?0:a>1?1:a||0,u=Y.progress,p,m,v,y,w,T,P,A;if(e&&(ft=dt,dt=S?rt():s,x&&(me=fe,fe=n&&!C?n.totalProgress():c)),g&&!c&&d&&!et&&!yt&&_t&&pt<s+(s-ft)/(wt()-Q)*g&&(c=1e-4),c!==u&&Y.enabled){if(w=(T=(p=Y.isActive=!!c&&c<1)!==(m=!!u&&u<1))||!!c!=!!u,Y.direction=c>u?1:-1,Y.progress=c,w&&!et&&(v=c&&!u?0:1===c?1:1===u?2:3,C&&(y=!T&&"none"!==B[v+1]&&B[v+1]||B[v],A=n&&("complete"===y||"reset"===y||y in n))),M&&(T||A)&&(A||h||!n)&&(Ft(M)?M(Y):Y.getTrailing(M).forEach((function(t){return t.endAnimation()}))),C||(!ye||et||yt?n&&n.totalProgress(c,!!et):((S||$e&&$e!==Y)&&ye.render(ye._dp._time-ye._start),ye.resetTo?ye.resetTo("totalProgress",c,n._tTime/n._tDur):(ye.vars.totalProgress=c,ye.invalidate().restart()))),d)if(t&&f&&(Wt.style[f+O.os2]=Gt),F){if(w){if(P=!t&&c>u&>+1>s&&s+1>=Lt(k,O),_)if(t||!p&&!P)si(d,Wt);else{var R=ae(d,!0),L=s-pt;si(d,Z,R.top+(O===z?L:0)+ne,R.left+(O===z?0:L)+ne)}Je(p||P?Dt:Yt),Ut!==Ct&&c<1&&p||Vt(Zt+(1!==c||P?0:Ut))}}else Vt(Mt(Zt+Ut*c));x&&!at.tween&&!et&&!yt&&Ee.restart(!0),r&&(T||b&&c&&(c<1||!bt))&&K(r.targets).forEach((function(t){return t.classList[p||b?"add":"remove"](r.className)})),o&&!C&&!t&&o(Y),w&&!et?(C&&(A&&("complete"===y?n.pause().totalProgress(1):"reset"===y?n.restart(!0).pause():"restart"===y?n.restart(!0):n[y]()),o&&o(Y)),!T&&bt||(l&&T&&Nt(Y,l),j[v]&&Nt(Y,j[v]),b&&(1===c?Y.kill(!1,1):j[v]=0),T||j[v=1===c?1:3]&&Nt(Y,j[v])),E&&!p&&Math.abs(Y.getVelocity())>(jt(E)?E:2500)&&(Ht(Y.callbackAnimation),ye?ye.progress(1):Ht(n,"reverse"===y?1:!c,1))):C&&o&&!et&&o(Y)}if(ie){var D=S?s/S.duration()*(S._caScrollDist||0):s;Jt(D+(Pt._isFlipped?1:0)),ie(D)}ze&&ze(-s/S.duration()*(S._caScrollDist||0))}},Y.enable=function(e,i){Y.enabled||(Y.enabled=!0,pe(k,"resize",Ce),pe(I?q:k,"scroll",Me),U&&pe(t,"refreshInit",U),!1!==e&&(Y.progress=Oe=0,dt=ft=nt=rt()),!1!==i&&Y.refresh())},Y.getTween=function(t){return t&&at?at.tween:ye},Y.setPositions=function(t,e){d&&(Zt+=t-pt,Ut+=e-t-Ct,f===Qt&&Y.adjustPinSpacing(e-t-Ct)),Y.start=pt=t,Y.end=gt=e,Ct=e-t,Y.update()},Y.adjustPinSpacing=function(t){if(Kt){var e=Kt.indexOf(O.d)+1;Kt[e]=parseFloat(Kt[e])+t+ne,Kt[1]=parseFloat(Kt[1])+t+ne,Je(Kt)}},Y.disable=function(e,i){if(Y.enabled&&(!1!==e&&Y.revert(!0,!0),Y.enabled=Y.isActive=!1,i||ye&&ye.pause(),ke=0,ht&&(ht.uncache=1),U&&ge(t,"refreshInit",U),Ee&&(Ee.pause(),at.tween&&at.tween.kill()&&(at.tween=0)),!I)){for(var n=Te.length;n--;)if(Te[n].scroller===k&&Te[n]!==Y)return;ge(k,"resize",Ce),ge(k,"scroll",Me)}},Y.kill=function(t,e){Y.disable(t,e),ye&&!e&&ye.kill(),a&&delete Pe[a];var s=Te.indexOf(Y);s>=0&&Te.splice(s,1),s===st&&We>0&&st--,s=0,Te.forEach((function(t){return t.scroller===Y.scroller&&(s=1)})),s||je||(Y.scroll.rec=0),n&&(n.scrollTrigger=null,t&&n.revert({kill:!1}),e||n.kill()),vt&&[vt,xt,Pt,St].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),$e===Y&&($e=0),d&&(ht&&(ht.uncache=1),s=0,Te.forEach((function(t){return t.pin===d&&s++})),s||(ht.spacer=0)),i.onKill&&i.onKill(Y)},Y.enable(!1,!1),Le&&Le(Y),n&&n.add&&!Ct?X.delayedCall(.01,(function(){return pt||gt||Y.refresh()}))&&(Ct=.01)&&(pt=gt=0):Y.refresh(),d&&Ne()}else this.update=this.refresh=this.kill=Et},t.register=function e(i){return Y||(X=i||Ct(),Ot()&&window.document&&t.enable(),Y=Tt),Y},t.defaults=function t(e){if(e)for(var i in e)be[i]=e[i];return be},t.disable=function t(e,i){Tt=0,Te.forEach((function(t){return t[i?"kill":"disable"](e)})),ge(W,"wheel",Me),ge(q,"scroll",Me),clearInterval(tt),ge(q,"touchcancel",Et),ge(Z,"touchstart",Et),fe(ge,q,"pointerdown,touchstart,mousedown",Pt),fe(ge,q,"pointerup,touchend,mouseup",St),G.kill(),Dt(ge);for(var n=0;n<y.length;n+=3)me(ge,y[n],y[n+1]),me(ge,y[n],y[n+2])},t.enable=function e(){if(W=window,q=document,V=q.documentElement,Z=q.body,X&&(K=X.utils.toArray,J=X.utils.clamp,mt=X.core.context||Et,ct=X.core.suppressOverwrites||Et,vt=W.history.scrollRestoration||"auto",X.core.globals("ScrollTrigger",t),Z)){Tt=1,N.register(X),t.isTouch=N.isTouch,gt=N.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),pe(W,"wheel",Me),U=[W,q,V,Z],X.matchMedia?(t.matchMedia=function(t){var e=X.matchMedia(),i;for(i in t)e.add(i,t[i]);return e},X.addEventListener("matchMediaInit",(function(){return Ie()})),X.addEventListener("matchMediaRevert",(function(){return De()})),X.addEventListener("matchMedia",(function(){Xe(0,1),ze("matchMedia")})),X.matchMedia("(orientation: portrait)",(function(){return Oe(),Oe}))):console.warn("Requires GSAP 3.11.0 or later"),Oe(),pe(q,"scroll",Me);var i=Z.style,n=i.borderTopStyle,s=X.core.Animation.prototype,o,r;for(s.revert||Object.defineProperty(s,"revert",{value:function t(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",o=ae(Z),z.m=Math.round(o.top+z.sc())||0,R.m=Math.round(o.left+R.sc())||0,n?i.borderTopStyle=n:i.removeProperty("border-top-style"),tt=setInterval(Ee,250),X.delayedCall(.5,(function(){return yt=0})),pe(q,"touchcancel",Et),pe(Z,"touchstart",Et),fe(pe,q,"pointerdown,touchstart,mousedown",Pt),fe(pe,q,"pointerup,touchend,mouseup",St),nt=X.utils.checkPrefix("transform"),Ze.push(nt),Y=wt(),G=X.delayedCall(.2,Xe).pause(),at=[q,"visibilitychange",function(){var t=W.innerWidth,e=W.innerHe
31ight;q.hidden?(ot=t,rt=e):ot===t&&rt===e||Ce()},q,"DOMContentLoaded",Xe,W,"load",Xe,W,"resize",Ce],Dt(pe),Te.forEach((function(t){return t.enable(0,1)})),r=0;r<y.length;r+=3)me(ge,y[r],y[r+1]),me(ge,y[r],y[r+2])}},t.config=function e(i){"limitCallbacks"in i&&(bt=!!i.limitCallbacks);var n=i.syncInterval;n&&clearInterval(tt)||(tt=n)&&setInterval(Ee,n),"ignoreMobileResize"in i&&(dt=1===t.isTouch&&i.ignoreMobileResize),"autoRefreshEvents"in i&&(Dt(ge)||Dt(pe,i.autoRefreshEvents||"none"),ht=-1===(i.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function t(e,i){var n=L(e),s=y.indexOf(n),o=kt(n);~s&&y.splice(s,o?6:2),i&&(o?w.unshift(W,i,Z,i,V,i):w.unshift(n,i))},t.clearMatchMedia=function t(e){Te.forEach((function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)}))},t.isInViewport=function t(e,i,n){var s=(It(e)?L(e):e).getBoundingClientRect(),o=s[n?Vt:Zt]*i||0;return n?s.right-o>0&&s.left+o<W.innerWidth:s.bottom-o>0&&s.top+o<W.innerHeight},t.positionInViewport=function t(e,i,n){It(e)&&(e=L(e));var s=e.getBoundingClientRect(),o=s[n?Vt:Zt],r=null==i?o/2:i in ye?ye[i]*o:~i.indexOf("%")?parseFloat(i)*o/100:parseFloat(i)||0;return n?(s.left+r)/W.innerWidth:(s.top+r)/W.innerHeight},t.killAll=function t(e){if(Te.forEach((function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()})),!0!==e){var i=ke.killAll||[];ke={},i.forEach((function(t){return t()}))}},t}();ri.version="3.11.3",ri.saveStyles=function(t){return t?K(t).forEach((function(t){if(t&&t.style){var e=Le.indexOf(t);e>=0&&Le.splice(e,5),Le.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),X.core.getCache(t),mt())}})):Le},ri.revert=function(t,e){return Ie(!t,e)},ri.create=function(t,e){return new ri(t,e)},ri.refresh=function(t){return t?Ce():(Y||ri.register())&&Xe(!0)},ri.update=qe,ri.clearScrollMemory=Fe,ri.maxScroll=function(t,e){return Lt(t,e?R:z)},ri.getScrollFunc=function(t,e){return D(L(t),e?R:z)},ri.getById=function(t){return Pe[t]},ri.getAll=function(){return Te.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},ri.isScrolling=function(){return!!_t},ri.snapDirectional=ue,ri.addEventListener=function(t,e){var i=ke[t]||(ke[t]=[]);~i.indexOf(e)||i.push(e)},ri.removeEventListener=function(t,e){var i=ke[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},ri.batch=function(t,e){var i=[],n={},s=e.interval||.016,o=e.batchMax||1e9,r=function t(e,i){var n=[],r=[],a=X.delayedCall(s,(function(){i(n,r),n=[],r=[]})).pause();return function(t){n.length||a.restart(!0),n.push(t.trigger),r.push(t),o<=n.length&&a.progress(1)}},a;for(a in e)n[a]="on"===a.substr(0,2)&&Ft(e[a])&&"onRefreshInit"!==a?r(a,e[a]):e[a];return Ft(o)&&(o=o(),pe(ri,"refresh",(function(){return o=e.batchMax()}))),K(t).forEach((function(t){var e={};for(a in n)e[a]=n[a];e.trigger=t,i.push(ri.create(e))})),i};var ai=function t(e,i,n,s){return i>s?e(s):i<0&&e(0),n>s?(s-i)/(n-i):n<0?i/(i-n):1},li=function t(e,i){!0===i?e.style.removeProperty("touch-action"):e.style.touchAction=!0===i?"auto":i?"pan-"+i+(N.isTouch?" pinch-zoom":""):"none",e===V&&t(Z,i)},ci={auto:1,scroll:1},hi=function t(e){var i=e.event,n=e.target,s=e.axis,o=(i.changedTouches?i.changedTouches[0]:i).target,r=o._gsap||X.core.getCache(o),a=wt(),l;if(!r._isScrollT||a-r._isScrollT>2e3){for(;o&&o.scrollHeight<=o.clientHeight;)o=o.parentNode;r._isScroll=o&&!kt(o)&&o!==n&&(ci[(l=se(o)).overflowY]||ci[l.overflowX]),r._isScrollT=a}(r._isScroll||"x"===s)&&(i.stopPropagation(),i._gsapAllow=!0)},ui=function t(e,i,n,s){return N.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:i,onWheel:s=s&&hi,onPress:s,onDrag:s,onScroll:s,onEnable:function t(){return n&&pe(q,N.eventTypes[0],pi,!1,!0)},onDisable:function t(){return ge(q,N.eventTypes[0],pi,!0)}})},di=/(input|label|select|textarea)/i,fi,pi=function t(e){var i=di.test(e.target.tagName);(i||fi)&&(e._gsapAllow=!0,fi=i)},gi=function t(e){Bt(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var i=e,n=i.normalizeScrollX,s=i.momentum,o=i.allowNestedScroll,r,a,l=L(e.target)||V,c=X.core.globals().ScrollSmoother,h=c&&c.get(),u=gt&&(e.content&&L(e.content)||h&&!1!==e.content&&!h.smooth()&&h.content()),d=D(l,z),f=D(l,R),p=1,g=(N.isTouch&&W.visualVie
31wport?W.visualViewport.scale*W.visualViewport.width:W.outerWidth)/W.innerWidth,m=0,v=Ft(s)?function(){return s(r)}:function(){return s||2.8},b,w,x=ui(l,e.type,!0,o),_=function t(){return w=!1},T=Et,P=Et,S=function t(){a=Lt(l,z),P=J(gt?1:0,a),n&&(T=J(0,Lt(l,R))),b=Be},E=function t(){u._gsap.y=Mt(parseFloat(u._gsap.y)+d.offset)+"px",u.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(u._gsap.y)+", 0, 1)",d.offset=d.cacheID=0},M=function t(){if(w){requestAnimationFrame(_);var e=Mt(r.deltaY/2),i=P(d.v-e);if(u&&i!==d.v+d.offset){d.offset=i-d.v;var n=Mt((parseFloat(u&&u._gsap.y)||0)-d.offset);u.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+n+", 0, 1)",u._gsap.y=n+"px",d.cacheID=y.cache,qe()}return!0}d.offset&&E(),w=!0},O,C,k,A,I=function t(){S(),O.isActive()&&O.vars.scrollY>a&&(d()>a?O.progress(1)&&d(a):O.resetTo("scrollY",a))};return u&&X.set(u,{y:"+=0"}),e.ignoreCheck=function(t){return gt&&"touchmove"===t.type&&M()||p>1.05&&"touchstart"!==t.type||r.isGesturing||t.touches&&t.touches.length>1},e.onPress=function(){var t=p;p=Mt((W.visualViewport&&W.visualViewport.scale||1)/g),O.pause(),t!==p&&li(l,p>1.01||!n&&"x"),C=f(),k=d(),S(),b=Be},e.onRelease=e.onGestureStart=function(t,e){if(d.offset&&E(),e){y.cache++;var i=v(),s,o;n&&(o=(s=f())+.05*i*-t.velocityX/.227,i*=ai(f,s,o,Lt(l,R)),O.vars.scrollX=T(o)),o=(s=d())+.05*i*-t.velocityY/.227,i*=ai(d,s,o,Lt(l,z)),O.vars.scrollY=P(o),O.invalidate().duration(i).play(.01),(gt&&O.vars.scrollY>=a||s>=a-1)&&X.to({},{onUpdate:I,duration:i})}else A.restart(!0)},e.onWheel=function(){O._ts&&O.pause(),wt()-m>1e3&&(b=0,m=wt())},e.onChange=function(t,e,i,s,o){if(Be!==b&&S(),e&&n&&f(T(s[2]===e?C+(t.startX-t.x):f()+e-s[1])),i){d.offset&&E();var r=o[2]===i,a=r?k+t.startY-t.y:d()+i-o[1],l=P(a);r&&a!==l&&(k+=l-a),d(l)}(i||e)&&qe()},e.onEnable=function(){li(l,!n&&"x"),ri.addEventListener("refresh",I),pe(W,"resize",I),d.smooth&&(d.target.style.scrollBehavior="auto",d.smooth=f.smooth=!1),x.enable()},e.onDisable=function(){li(l,!0),ge(W,"resize",I),ri.removeEventListener("refresh",I),x.kill()},e.lockAxis=!1!==e.lockAxis,(r=new N(e)).iOS=gt,gt&&!d()&&d(1),gt&&X.ticker.add(Et),A=r._dc,O=X.to(r,{ease:"power4",paused:!0,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:A.vars.onComplete}),r};ri.sort=function(t){return Te.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+t.start-(e.start+-1e6*(e.vars.refreshPriority||0))})},ri.observe=function(t){return new N(t)},ri.normalizeScroll=function(t){if(void 0===t)return ut;if(!0===t&&ut)return ut.enable();if(!1===t)return ut&&ut.kill();var e=t instanceof N?t:gi(t);return ut&&ut.target===e.target&&ut.kill(),kt(e.target)&&(ut=e),e},ri.core={_getVelocityProp:I,_inputObserver:ui,_scrollers:y,_proxies:w,bridge:{ss:function t(){_t||ze("scrollStart"),_t=wt()},ref:function t(){return et}}},Ct()&&X.registerPlugin(ri),t.ScrollTrigger=ri,t.default=ri,"undefined"==typeof window||window!==t?Object.defineProperty(t,"__esModule",{value:!0}):delete window.default})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t} 32/*! 33 * ScrollSmoother 3.11.3 34 * https://greensock.com 35 * 36 * @license Copyright 2008-2022, GreenSock. All rights reserved. 37 * Subject to the terms at https://greensock.com/standard-license or for 38 * Club GreenSock members, the agreement issued with that membership. 39 * @author: Jack Doyle, [email protected] 40 */var n,s,o,r,a,l,c,h,u,d,f,p,g,m,v,b=function t(){return"undefined"!=typeof window},y=function t(){return n||b()&&(n=window.gsap)&&n.registerPlugin&&n},w=function t(e){return Math.round(1e5*e)/1e5||0},x=function t(e,i){var n=e.parentNode||a,s=e.getBoundingClientRect(),r=n.getBoundingClientRect(),l=r.top-s.top,c=r.bottom-s.bottom,h=(Math.abs(l)>
40Math.abs(c)?l:c)/(1-i),u=-h*i,d,f;return h>0&&(f=.5===(d=r.height/(o.innerHeight+r.height))?2*r.height:2*Math.min(r.height,-h*d/(2*d-1))*(i||1),u+=i?-f*i:-f/2,h+=f),{change:h,offset:u}},_=function t(e){var i=r.querySelector(".ScrollSmoother-wrapper");return i||((i=r.createElement("div")).classList.add("ScrollSmoother-wrapper"),e.parentNode.insertBefore(i,e),i.appendChild(e)),i},T=function(){function t(e){function i(){return A=C.clientHeight,C.style.overflow="visible",l.style.height=A+"px",A-o.innerHeight}var b=this;s||t.register(n)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),e=this.vars=e||{},d&&d.kill(),d=this,m(this);var y=e,T=y.smoothTouch,P=y.onUpdate,S=y.onStop,E=y.smooth,M=y.onFocusIn,O=y.normalizeScroll,C,k,A,R,z,L,D,I,F,j,B,H,N,X=this,Y="undefined"!=typeof ResizeObserver&&!1!==e.autoResize&&new ResizeObserver((function(){return u.isRefreshing||v.restart(!0)})),W=e.effectsPrefix||"",q=u.getScrollFunc(o),V=1===u.isTouch?!0===T?.8:parseFloat(T)||0:0===E||!1===E?0:parseFloat(E)||.8,Z=0,U=0,G=1,K=p(0),J=function t(){return K.update(-Z)},Q={y:0},tt=function t(){return C.style.overflow="visible"},et,it=function t(e){e.update();var i=e.getTween();i&&(i.pause(),i._time=i._dur,i._tTime=i._tDur),et=!1,e.animation.progress(e.progress,!0)},nt=function t(e,i){(e!==Z&&!j||i)&&(V&&(C.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+e+", 0, 1)",C._gsap.y=e+"px"),U=e-Z,Z=e,u.isUpdating||u.update())},st=function t(e){return arguments.length?(e<0&&(e=0),Q.y=-e,et=!0,j?Z=-e:nt(-e),u.isRefreshing?R.update():q(e),this):-Z},ot,rt=function t(e){k.scrollTop=0,e.target.contains&&e.target.contains(k)||M&&!1===M(b,e)||(u.isInViewport(e.target)||e.target===ot||b.scrollTo(e.target,!1,"center center"),ot=e.target)},at=function t(e,i){var s,o,r,a;z.forEach((function(t){s=t.pins,a=t.markers,e.forEach((function(e){t.trigger&&e.trigger&&t!==e&&(e.trigger===t.trigger||e.pinnedContainer===t.trigger||t.trigger.contains(e.trigger))&&(o=e.start,r=(o-t.start-t.offset)/t.ratio-(o-t.start),s.forEach((function(e){return r-=e.distance/t.ratio-e.distance})),e.setPositions(o+r,e.end+r),e.markerStart&&a.push(n.quickSetter([e.markerStart,e.markerEnd],"y","px")),e.pin&&e.end>0&&(r=e.end-e.start,s.push({start:e.start,end:e.end,distance:r,trig:e}),t.setPositions(t.start,t.end+r),t.vars.onRefresh(t)))}))}))},lt=function t(){tt(),requestAnimationFrame(tt),z&&(z.forEach((function(t){var e=t.start,i=t.auto?Math.min(u.maxScroll(t.scroller),t.end):e+(t.end-e)/t.ratio,n=(i-t.end)/2;e-=n,i-=n,t.offset=n||1e-4,t.pins.length=0,t.setPositions(Math.min(e,i),Math.max(e,i)),t.vars.onRefresh(t)})),at(u.sort())),K.reset()},ct=function t(){return u.addEventListener("refresh",lt)},ht=function t(){return z&&z.forEach((function(t){return t.vars.onRefresh(t)}))},ut=function t(){return z&&z.forEach((function(t){return t.vars.onRefreshInit(t)})),ht},dt=function t(e,i,n,s){return function(){var t="function"==typeof i?i(n,s):i;return t||0===t||(t=s.getAttribute("data-"+W+e)||("speed"===e?1:0)),s.setAttribute("data-"+W+e,t),"auto"===t?t:parseFloat(t)}},ft=function t(e,i,s,o){var r=dt("speed",i,o,e),a=dt("lag",s,o,e),l=n.getProperty(e,"y"),c=e._gsap,d,p,g,m,v,b,y=function t(){i=r(),s=a(),d=parseFloat(i)||1,v=(g="auto"===i)?0:.5,m&&m.kill(),m=s&&n.to(e,{ease:f,overwrite:!1,y:"+=0",duration:s}),p&&(p.ratio=d,p.autoSpeed=g)},_=function t(){c.y=l+"px",c.renderTransform(1),y()},T=[],P=[],S=0,E=function t(i){if(g){_();var n=x(e,h(0,1,-i.start/(i.end-i.start)));S=n.change,b=n.offset}else S=(i.end-i.start)*(1-d),b=0;T.forEach((function(t){return S-=t.distance*(1-d)})),i.vars.onUpdate(i),m&&m.progress(1)};return y(),(1!==d||g||m)&&(p=u.create({trigger:g?e.parentNode:e,scroller:k,scrub:!0,refreshPriority:-999,onRefreshInit:_,onRefresh:E,onKill:function t(e){var i=z.indexOf(e);i>=0&&z.splice(i,1),_()},onUpdate:function t(e){var i=l+S*(e.progress-v),s=T.length,o=0,r,a,h;if(e.offset){if(s){for(a=-Z,h=e.end;s--;){if((r=T[s]).trig.isActive||a>=r.start&&a<=r.end)return void(m&&(r.trig.progress+=r.trig.direction<0?.001:-.001,r.trig.update(0,0,1),m.resetTo("y",parseFloat(c.y),-U,!0),G&&m.progress(1)));a>r.end&&(o+=r.distance),h-=r.distance}i=l+o+S*((n.utils.clamp(e.start,e.end,a)-e.start-o)/(h-e.start)-v)}i=w(i+b),P.length&&!g&&P.forEach((function(t){return t(i-o)})),m?(m.resetTo("y",i,-U,!0),G&&m.progress(1)):(c.y=i+"px",c.renderTransform(1))}}}),E(p),n.core.getCache(p.trigger).stRevert=ut,p.startY=l,p.pins=T,p.markers=P,p.ratio=d,p.autoSpeed=g,e.style.willChange="transform"),p};ct(),u.addEventListener("killAll",ct),n.delayedCall(.5,(function(){return G=0}
40)),this.scrollTop=st,this.scrollTo=function(t,e,i){var s=n.utils.clamp(0,u.maxScroll(o),isNaN(t)?b.offset(t,i):+t);e?j?n.to(b,{duration:V,scrollTop:s,overwrite:"auto",ease:f}):q(s):st(s)},this.offset=function(t,e){var i=(t=c(t)[0]).style.cssText,s=u.create({trigger:t,start:e||"top top"}),o;return z&&at([s]),o=s.start,s.kill(!1),t.style.cssText=i,n.core.getCache(t).uncache=1,o},this.content=function(t){if(arguments.length){var e=c(t||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||l.children[0];return e!==C&&(F=(C=e).getAttribute("style")||"",Y&&Y.observe(C),n.set(C,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),V||n.set(C,{clearProps:"transform"})),this}return C},this.wrapper=function(t){return arguments.length?(k=c(t||"#smooth-wrapper")[0]||_(C),I=k.getAttribute("style")||"",i(),n.set(k,V?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):k},this.effects=function(t,e){var i;if(z||(z=[]),!t)return z.slice(0);(t=c(t)).forEach((function(t){for(var e=z.length;e--;)z[e].trigger===t&&z[e].kill()}));var n=e=e||{},s=n.speed,o=n.lag,r=[],a,l;for(a=0;a<t.length;a++)(l=ft(t[a],s,o,a))&&r.push(l);return(i=z).push.apply(i,r),r},this.sections=function(t,e){var i;if(L||(L=[]),!t)return L.slice(0);var n=c(t).map((function(t){return u.create({trigger:t,start:"top 120%",end:"bottom -20%",onToggle:function e(i){t.style.opacity=i.isActive?"1":"0",t.style.pointerEvents=i.isActive?"all":"none"}})}));return e&&e.add?(i=L).push.apply(i,n):L=n.slice(0),n},this.content(e.content),this.wrapper(e.wrapper),this.render=function(t){return nt(t||0===t?t:Z)},this.getVelocity=function(){return K.getVelocity(-Z)},u.scrollerProxy(k,{scrollTop:st,scrollHeight:function t(){return i()&&l.scrollHeight},fixedMarkers:!1!==e.fixedMarkers&&!!V,content:C,getBoundingClientRect:function t(){return{top:0,left:0,width:o.innerWidth,height:o.innerHeight}}}),u.defaults({scroller:k});var pt=u.getAll().filter((function(t){return t.scroller===o||t.scroller===k}));pt.forEach((function(t){return t.revert(!0)})),R=u.create({animation:n.fromTo(Q,{y:0},{y:function t(){return-i()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function t(){if(this._dur){var e=et;e&&(it(R),Q.y=Z),nt(Q.y,e),J(),P&&!j&&P(X)}}}),onRefreshInit:function t(e){if(z){var i=u.getAll().filter((function(t){return!!t.pin}));z.forEach((function(t){t.vars.pinnedContainer||i.forEach((function(e){if(e.pin.contains(t.trigger)){var i=t.vars;i.pinnedContainer=e.pin,t.vars=null,t.init(i,t.animation)}}))}))}var n=e.getTween();N=n&&n._end>n._dp._time,H=Z,Q.y=0,V&&(k.style.pointerEvents="none",k.scrollTop=0,setTimeout((function(){return k.style.removeProperty("pointer-events")}),50))},onRefresh:function t(e){e.animation.invalidate(),e.setPositions(e.start,i()),N||it(e),Q.y=-q(),nt(Q.y),G||e.animation.progress(n.utils.clamp(0,1,H/-e.end)),N&&(e.progress-=.001,e.update())},id:"ScrollSmoother",scroller:o,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:i,onScrubComplete:function t(){K.reset(),S&&S(b)},scrub:V||!0}),this.smooth=function(t){return arguments.length&&(V=t||0),arguments.length?R.scrubDuration(t):R.getTween()?R.getTween().duration():0},R.getTween()&&(R.getTween().vars.ease=e.ease||f),this.scrollTrigger=R,e.effects&&this.effects(!0===e.effects?"[data-"+W+"speed], [data-"+W+"lag]":e.effects,{}),e.sections&&this.sections(!0===e.sections?"[data-section]":e.sections),pt.forEach((function(t){t.vars.scroller=k,t.init(t.vars,t.animation)})),this.paused=function(t,e){return arguments.length?(!!j!==t&&(t?(R.getTween()&&R.getTween().pause(),q(-Z),K.reset(),(B=u.normalizeScroll())&&B.disable(),(j=u.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function t(){return st(-Z)}})).nested=g(a,"wheel,touch,scroll",!0,!1!==e)):(j.nested.kill(),j.kill(),j=0,B&&B.enable(),R.progress=(-Z-R.start)/(R.end-R.start),it(R))),this):!!j},this.kill=this.revert=function(){b.paused(!1),it(R),R.kill();for(var t=(z||[]).concat(L||[]),e=t.length;e--;)t[e].kill();u.scrollerProxy(k),u.removeEventListener("killAll",ct),u.removeEventListener("refresh",lt),k.style.cssText=I,C.style.cssText=F;var i=u.defaults({});i&&i.scroller===k&&u.defaults({scroller:o}),b.normalizer&&u.normalizeScroll(!1),clearInterval(D),d=null,Y&&Y.disconnect(),l.style.removeProperty("height"),o.removeEventListener("focusin",rt)},this.refresh=function(t,e){return R.refresh(t,e)},O&&(this.normalizer=u.normalizeScroll(!0===O?{debounce:!0,content:!V&&C}:O)),u.config(e),"overscrollBehavior"in o.getComputedStyle(l)&&n.set([l,a],{overscrollBehavior:"none"}),"scrollBehavior"in o.getComputedStyle(l)&&n.set([l,a],{scrollBehavior:"auto"}),o.addEventListener("focusin",rt),D=setInterval(J,250),"loading"===r.readyState||requestAnimationFrame((function(){return u.refresh()}))}return t.register=function e(i){return s||(n=i||y(),b()&&window.document&&(o=window,r=document,a=r.documentElement,l=r.body),n&&(c=n.utils.toArray,h=n.utils.clamp,f=n.parseEase("expo"),m=n.core.context||function(){},v=n.delayedCall(.2,(function(){return u.isRefreshing||d&&d.refresh()})).pause(),u=n.core.globals().ScrollTrigger,n.core.globals("ScrollSmoother",t),l&&u&&(p=u.core._getVelocityProp,g=u.core._inputObserver,t.refresh=u.refresh,s=1))),s},i(t,[{key:"progress",get:function t(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}]),t}();T.version="3.11.3",T.create=function(t){return d&&t&&d.content()===c(t.content)[0]?d:new T(t)},T.get=function(){return d},y()&&n.registerPlugin(T),t.ScrollSmoother=T,t.default=T,"undefined"==typeof window||window!==t?Object.defineProperty(t,"__esMo
vendor: 4,105 bytes, lines 40-49
40dule",{value:!0}):delete window.default})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,(function(t){"use strict"; 41/*! 42 * ScrollToPlugin 3.11.3 43 * https://greensock.com 44 * 45 * @license Copyright 2008-2022, GreenSock. All rights reserved. 46 * Subject to the terms at https://greensock.com/standard-license or for 47 * Club GreenSock members, the agreement issued with that membership. 48 * @author: Jack Doyle, [email protected] 49 */var e,i,n,s,o,r,a,l=function t(){return"undefined"!=typeof window},c=function t(){return e||l()&&(e=window.gsap)&&e.registerPlugin&&e},h=function t(e){return"string"==typeof e},u=function t(e){return"function"==typeof e},d=function t(e,i){var r="x"===i?"Width":"Height",a="scroll"+r,l="client"+r;return e===n||e===s||e===o?Math.max(s[a],o[a])-(n["inner"+r]||s[l]||o[l]):e[a]-e["offset"+r]},f=function t(e,i){var r="scroll"+("x"===i?"Left":"Top");return e===n&&(null!=e.pageXOffset?r="page"+i.toUpperCase()+"Offset":e=null!=s[r]?s:o),function(){return e[r]}},p=function t(e,i,n,s){if(u(e)&&(e=e(i,n,s)),"object"!=typeof e)return h(e)&&"max"!==e&&"="!==e.charAt(1)?{x:e,y:e}:{y:e};if(e.nodeType)return{y:e,x:e};var o={},r;for(r in e)o[r]="onAutoKill"!==r&&u(e[r])?e[r](i,n,s):e[r];return o},g=function t(e,i){if(!(e=r(e)[0])||!e.getBoundingClientRect)return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0};var a=e.getBoundingClientRect(),l=!i||i===n||i===o,c=l?{top:s.clientTop-(n.pageYOffset||s.scrollTop||o.scrollTop||0),left:s.clientLeft-(n.pageXOffset||s.scrollLeft||o.scrollLeft||0)}:i.getBoundingClientRect(),h={x:a.left-c.left,y:a.top-c.top};return!l&&i&&(h.x+=f(i,"x")(),h.y+=f(i,"y")()),h},m=function t(e,i,n,s,o){return isNaN(e)||"object"==typeof e?h(e)&&"="===e.charAt(1)?parseFloat(e.substr(2))*("-"===e.charAt(0)?-1:1)+s-o:"max"===e?d(i,n)-o:Math.min(d(i,n),g(e,i)[n]-o):parseFloat(e)-o},v=function t(){e=c(),l()&&e&&document.body&&(n=window,o=document.body,s=document.documentElement,r=e.utils.toArray,e.config({autoKillThreshold:7}),a=e.config(),i=1)},b={version:"3.11.3",name:"scrollTo",rawVars:1,register:function t(i){e=i,v()},init:function t(s,o,r,a,l){i||v();var c=this,h=e.getProperty(s,"scrollSnapType");c.isWin=s===n,c.target=s,c.tween=r,o=p(o,a,s,l),c.vars=o,c.autoKill=!!o.autoKill,c.getX=f(s,"x"),c.getY=f(s,"y"),c.x=c.xPrev=c.getX(),c.y=c.yPrev=c.getY(),"smooth"===e.getProperty(s,"scrollBehavior")&&e.set(s,{scrollBehavior:"auto"}),h&&"none"!==h&&(c.snap=1,c.snapInline=s.style.scrollSnapType,s.style.scrollSnapType="none"),null!=o.x?(c.add(c,"x",c.x,m(o.x,s,"x",c.x,o.offsetX||0),a,l),c._props.push("scrollTo_x")):c.skipX=1,null!=o.y?(c.add(c,"y",c.y,m(o.y,s,"y",c.y,o.offsetY||0),a,l),c._props.push("scrollTo_y")):c.skipY=1},render:function t(e,i){for(var s=i._pt,o=i.target,r=i.tween,l=i.autoKill,c=i.xPrev,h=i.yPrev,u=i.isWin,f=i.snap,p=i.snapInline,g,m,v,b,y;s;)s.r(e,s.d),s=s._next;g=u||!i.skipX?i.getX():c,v=(m=u||!i.skipY?i.getY():h)-h,b=g-c,y=a.autoKillThreshold,i.x<0&&(i.x=0),i.y<0&&(i.y=0),l&&(!i.skipX&&(b>y||b<-y)&&g<d(o,"x")&&(i.skipX=1),!i.skipY&&(v>y||v<-y)&&m<d(o,"y")&&(i.skipY=1),i.skipX&&i.skipY&&(r.kill(),i.vars.onAutoKill&&i.vars.onAutoKill.apply(r,i.vars.onAutoKillParams||[]))),u?n.scrollTo(i.skipX?g:i.x,i.skipY?m:i.y):(i.skipY||(o.scrollTop=i.y),i.skipX||(o.scrollLeft=i.x)),!f||1!==e&&0!==e||(m=o.scrollTop,g=o.scrollLeft,p?o.style.scrollSnapType=p:o.style.removeProperty("scroll-snap-type"),o.scrollTop=m+1,o.scrollLeft=g+1,o.scrollTop=m,o.scrollLeft=g),i.xPrev=i.x,i.yPrev=i.y},kill:function t(e){var i="scrollTo"===e;(i||"scrollTo_x"===e)&&(this.skipX=1),(i||"scrollTo_y"===e)&&(this.skipY=1)}};b.max=d,b.getOffset=g,b.buildGetter=f,c()&&e.registerPlugin(b),t.ScrollToPlugin=b,t.default=b,Object.defineProperty(t,"__esModule",{value:!0})})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}((function(t){function e(){var e,i,n={height:c.innerHeight,width:c.innerWidth};
49return n.height||((e=l.compatMode)||!t.support.boxModel)&&(n={height:(i="CSS1Compat"===e?h:l.body).clientHeight,width:i.clientWidth}),n}function i(){return{top:c.pageYOffset||h.scrollTop||l.body.scrollTop,left:c.pageXOffset||h.scrollLeft||l.body.scrollLeft}}function n(){if(a.length){var n=0,r=t.map(a,(function(t){var e=t.data.selector,i=t.$element;return e?i.find(e):i}));for(s=s||e(),o=o||i();n<a.length;n++)if(t.contains(h,r[n][0])){var l=t(r[n]),c={height:l[0].offsetHeight,width:l[0].offsetWidth},u=l.offset(),d=l.data("inview");if(!o||!s)return;u.top+c.height>o.top&&u.top<o.top+s.height&&u.left+c.width>o.left&&u.left<o.left+s.width?d||l.data("inview",!0).trigger("inview",[!0]):d&&l.data("inview",!1).trigger("inview",[!1])}}}var s,o,r,a=[],l=document,c=window,h=l.documentElement;t.event.special.inview={add:function(e){a.push({data:e,$element:t(this),element:this}),!r&&a.length&&(r=setInterval(n,250))},remove:function(t){for(var e=0;e<a.length;e++){var i=a[e];if(i.element===this&&i.data.guid===t.guid){a.splice(e,1);break}}a.length||(clearInterval(r),r=null)}},t(c).on("scroll resize scrollstop",(function(){s=o=null})),!h.addEventListener&&h.attachEvent&&h.attachEvent("onfocusin",(function(){o=null}))})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}((function($){return $.fn.tilt=function(t){const e=function(){this.ticking||(requestAnimationFrame(c.bind(this)),this.ticking=!0)},i=function(){const t=this;$(this).on("mousemove",r),$(this).on("mouseenter",s),this.settings.reset&&$(this).on("mouseleave",a),this.settings.glare&&$(window).on("resize",u.bind(t))},n=function(){void 0!==this.timeout&&clearTimeout(this.timeout),$(this).css({transition:`${this.settings.speed}ms ${this.settings.easing}`}),this.settings.glare&&this.glareElement.css({transition:`opacity ${this.settings.speed}ms ${this.settings.easing}`}),this.timeout=setTimeout((()=>{$(this).css({transition:""}),this.settings.glare&&this.glareElement.css({transition:""})}),this.settings.speed)},s=function(t){this.ticking=!1,$(this).css({"will-change":"transform"}),n.call(this),$(this).trigger("tilt.mouseEnter")},o=function(t){return void 0===t&&(t={pageX:$(this).offset().left+$(this).outerWidth()/2,pageY:$(this).offset().top+$(this).outerHeight()/2}),{x:t.pageX,y:t.pageY}},r=function(t){this.mousePositions=o(t),e.call(this)},a=function(){n.call(this),this.reset=!0,e.call(this),$(this).trigger("tilt.mouseLeave")},l=function(){const t=$(this).outerWidth(),e=$(this).outerHeight(),i=$(this).offset().left,n=$(this).offset().top;if(this.mousePositions){const s=(this.mousePositions.x-i)/t,o=(this.mousePositions.y-n)/e,r=undefined,a=undefined,l=undefined;return{tiltX:(this.settings.maxTilt/2-s*this.settings.maxTilt).toFixed(2),tiltY:(o*this.settings.maxTilt-this.settings.maxTilt/2).toFixed(2),percentageX:100*s,percentageY:100*o,angle:Math.atan2(this.mousePositions.x-(i+t/2),-(this.mousePositions.y-(n+e/2)))*(180/Math.PI)}}},c=function(){if(this.transforms=l.call(this),this.reset)return this.reset=!1,$(this).css("transform",`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg)`),void(this.settings.glare&&(this.glareElement.css("transform","rotate(180deg) translate(-50%, -50%)"),this.glareElement.css("opacity","0")));$(this).css("transform",`perspective(${this.settings.perspective}px) rotateX(${"x"===this.settings.disableAxis?0:this.transforms.tiltY}deg) rotateY(${"y"===this.settings.disableAxis?0:this.transforms.tiltX}deg) scale3d(${this.settings.scale},${this.settings.scale},${this.settings.scale})`),this.settings.glare&&(this.glareElement.css("transform",`rotate(${this.transforms.angle}deg) translate(-50%, -50%)`),this.glareElement.css("opacity",""+this.transforms.percentageY*this.settings.maxGlare/100)),$(this).trigger("change",[this.transforms]),this.ticking=!1},h=function(){const t=this.settings.glarePrerender;if(t||$(this).append('<div class="js-tilt-glare"><div class="js-tilt-glare-inner"></div></div>'),this.glareElementWrapper=$(this).find(".js-tilt-glare"),this.glareElement=$(this).find(".js-tilt-glare-inner"),t)return;const e={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};this.glareElementWrapper.css(e).css({overflow:"hidden","pointer-events":"none"}),this.glareElement.css({position:"absolute",top:"50%",left:"50%","background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",width:""+2*$(this).outerWidth(),height:""+2*$(this).outerWidth(),transform:"rotate(180deg) translate(-50%, -50%)","transform-origin":"0% 0%",opacity:"0"})},u=function(){this.glareElement.css({width:""+2*$(this).outerWidth(),height:""+2*$(this).outerWidth()})};return $.fn.tilt.destroy=function(){$(this).each((function(){$(this).find(".js-tilt-glare").remove(),$(this).css({"will-change":"",transform:""}),$(this).off("mousemove mouseenter mouseleave")}))},$.fn.tilt.getValues=function(){const t=[];return $(this).each((function(){this.mousePositions=o.call(this),t.push(l.call(this))})),t},$.fn.tilt.reset=function(){$(this).each((function(){this.mousePositions=o.call(this),this.settings=$(this).data("settings"),a.call(this),setTimeout((()=>{this.reset=!1}),this.settings.transition)}))},this.each((function(){this.settings=$.extend({maxTilt:$(this).is("[data-tilt-max]")?$(this).data("tilt-max"):20,perspective:$(this).is("[data-tilt-perspective]")?$(this).data("tilt-perspective"):300,easing:$(this).is("[data-tilt-easing]")?$(this).data("tilt-easing"):"cubic-bezier(.03,.98,.52,.99)",scale:$(this).is("[data-tilt-scale]")?$(this).data("tilt-scale"):"1",speed:$(this).is("[data-tilt-speed]")?$(this).data("tilt-speed"):"400",transition:!$(this).is("[data-tilt-transition]")||$(this).data("tilt-transition"),disableAxis:$(this).is("[data-tilt-disable-axis]")?$(this).data("tilt-disable-axis"):null,axis:$(this).is("[data-tilt-axis]")?$(this).data("tilt-axis"):null,reset:!$(this).is("[data-tilt-reset]")||$(this).data("tilt-reset"),glare:!!$(this).is("[data-tilt-glare]")&&$(this).data("tilt-glare"),maxGlare:$(this).is("[data-tilt-maxglare]")?$(this).data("tilt-maxglare"):1},t),null!==this.settings.axis&&(console.warn("Tilt.js: the axis setting has been renamed to disableAxis. See https://github.com/gijsroge/tilt.js/pull/26 for more information"),this.settings.disableAxis=this.settings.axis),this.init=()=>{$(this).data("settings",this.settings),this.settings.glare&&h.call(this),i.call(this)},this.init()}))},$("[data-tilt]").tilt(),!0})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function i(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}const n=(t,e=1e4)=>(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t){if(!(t&&t instanceof Element&&t.offsetParent))return!1;const e=t.scrollHeight>t.clientHeight,i=window.getComputedStyle(t).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&&!n&&!s},o=function(t,e){return!(!t||t===document.body||e&&t===e)&&(s(t)?t:o(t.parentElement,e))},r=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount>1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild},a=t=>`${t||""}`.split(" ").filter((t=>!!t)),l=(t,e,i)=>{t&&a(e).forEach((e=>{t.classList.toggle(e,i||!1)}))};class c{constructor(t){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.time=Date.now()}}const h={passive:!1};class u{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(const t of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[t]=this[t].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,h),this.element.addEventListener("touchstart",this.onTouchStart,h),this.element.addEventListener("touchmove",this.onMove,h),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(t){if(!t.buttons||0!==t.button)return;const e=new c(t);this.currentPointers.some((t=>
49t.id===e.id))||this.triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerStart(new c(e),t);window.addEventListener("blur",this.onWindowBlur)}onMove(t){const e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((t=>new c(t))):[new c(t)],n=[];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(n.push(t),this.currentPointers[e]=t)}n.length&&this.moveCallback(t,this.currentPointers.slice(),e)}onPointerEnd(t){t.buttons>0&&0!==t.button||(this.triggerPointerEnd(t,new c(t)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerEnd(t,new c(e))}triggerPointerStart(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}triggerPointerEnd(t,e){const i=this.currentPointers.findIndex((t=>t.id===e.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const t=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}),t,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,h),this.element.removeEventListener("touchstart",this.onTouchStart,h),this.element.removeEventListener("touchmove",this.onMove,h),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}const d=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t),f=(t,...e)=>{const i=e.length;for(let n=0;n<i;n++){const i=e[n]||{};Object.entries(i).forEach((([e,i])=>{const n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,{[e]:n}),d(i)?Object.assign(t[e],f(n,i)):Array.isArray(i)?Object.assign(t,{[e]:[...i]}):Object.assign(t,{[e]:i})}))}return t},p=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class g{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?f({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=p(t,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=p(e,t);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,t,...n));let r=p(e,this.options);return r&&"function"==typeof r?s=r.call(this,this,t,...n,s):void 0===s&&(s=r),void 0===s?i:s}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=>{let n="";return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;i<e.length;i++)t=t.split(e[i][0]).join(e[i][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),this.events||(this.events=new Map),i.forEac
49h((t=>{let i=this.events.get(t);i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),i.forEach((t=>{const i=this.events.get(t);if(Array.isArray(i)){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(g,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.33"}),Object.defineProperty(g,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class m extends g{constructor(t={}){super(t),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(t={}){const e=new Map;for(const[i,n]of Object.entries(t)){const t=this.option(i),s=this.plugins[i];s||!1===t?s&&!1===t&&(s.detach(),delete this.plugins[i]):e.set(i,new n(this,t||{}))}for(const[t,i]of e)this.plugins[t]=i,i.attach()}detachPlugins(t){t=t||Object.keys(this.plugins);for(const e of t){const t=this.plugins[e];t&&t.detach(),delete this.plugins[e]}return this.emit("detachPlugins"),this}}var v;!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(v||(v={}));const b=["a","b","c","d","e","f"],y={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},w={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:y},x='<circle cx="25" cy="25" r="20"></circle>',_='<div class="f-spinner"><svg viewBox="0 0 50 50">'+x+x+"</svg></div>",T=t=>t&&null!==t&&t instanceof Element&&"nodeType"in t,P=(t,e)=>{t&&a(e).forEach((e=>{t.classList.remove(e)}))},S=(t,e)=>{t&&a(e).forEach((e=>{t.classList.add(e)}))},E={a:1,b:0,c:0,d:1,e:0,f:0},M=1e5,O=1e4,C="mousemove",k="drag",A="content";let R=null,z=null;class L extends m{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===z&&(z=window.matchMedia("(hover: none)").matches),z}get isMobile(){return null===R&&(R=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),R}get panMode(){return this.options.panMode!==C||this.isTouchDevice?k:C}get panOnlyZoomed(){const t=this.options.panOnlyZoomed;return"auto"===t?this.isTouchDevice:t}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:t,b:e}=this.current;return Math.sqrt(t*t+e*e)||1}get targetScale(){const{a:t,b:e}=this.target;return Math.sqrt(t*t+e*e)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:t}=this;return t.fullWidth/t.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:t,contentRect:e}=this,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const t=this.content;return!!(t&&t instanceof HTMLImageElement)&&!t.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const t of b){const e="e"==t||"f"===t?1e-4:1e-5;
49if(Math.abs(this.target[t]-this.current[t])>e)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(t,e={},i={}){var n;if(super(e),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:v.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},E)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},E)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");this.container=t,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},L.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const s=this.content;if(s.addEventListener("load",this.onLoad),s.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){t.classList.add(this.cn("isLoading"));const e=r(_);!t.contains(s)||s.parentElement instanceof HTMLPictureElement?this.spinner=t.appendChild(e):this.spinner=(null===(n=s.parentElement)||void 0===n?void 0:n.insertBefore(e,s))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:t}=this,e=this.cn(A);let i=this.option(A)||t.querySelector(`.${e}`);if(i||(i=t.querySelector("img,picture")||t.firstElementChild,i&&S(i,e)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:t,container:e,state:i}=this;t&&(t.remove(),this.spinner=null),this.option("spinner")&&e.classList.remove(this.cn("isLoading")),this.emit
49("afterLoad"),i===v.Init?this.enable():this.updateMetrics()}onError(){this.state!==v.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=v.Error,this.emit("error"))}getNextScale(t){const{fullScale:e,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this;let r=o;switch(t){case"toggleMax":r=i-o<.5*(s-o)?s:o;break;case"toggleCover":r=i-o<.5*(n-o)?n:o;break;case"toggleZoom":r=i-o<.5*(e-o)?e:o;break;case"iterateZoom":let t=[1,e,s].sort(((t,e)=>t-e)),a=t.findIndex((t=>t>i+1e-5));r=t[a]||1}return r}attachObserver(){var t;const e=()=>{const{container:t,containerRect:e}=this;return Math.abs(e.width-t.getBoundingClientRect().width)>.1||Math.abs(e.height-t.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(e()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{e()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}detachObserver(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}attachEvents(){const{container:t}=this;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new u(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(C,this.onMouseMove)}detachEvents(){var t;const{container:e}=this;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(C,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const t=this.friction,e=this.option("maxVelocity");for(const i of b)t?(this.velocity[i]*=1-t,e&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],e),-1*e)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const t of b)"e"===t&&this.isBouncingX||"f"===t&&this.isBouncingY||(this.velocity[t]=(1/(1-this.friction)-1)*(this.target[t]-this.current[t]))}checkBounds(t=0,e=0){const{current:i}=this,n=i.e+t,s=i.f+e,o=this.getBounds(),{x:r,y:a}=o,l=r.min,c=r.max,h=a.min,u=a.max;let d=0,f=0;return l!==1/0&&n<l?d=l-n:c!==1/0&&n>c&&(d=c-n),h!==1/0&&s<h?f=h-s:u!==1/0&&s>u&&(f=u-s),Math.abs(d)<1e-4&&(d=0),Math.abs(f)<1e-4&&(f=0),Object.assign(Object.assign({},o),{xDiff:d,yDiff:f,inBounds:!d&&!f})}clampTargetBounds(){const{target:t}=this,{x:e,y:i}=this.getBounds();e.min!==1/0&&(t.e=Math.max(t.e,e.min)),e.max!==1/0&&(t.e=Math.min(t.e,e.max)),i.min!==1/0&&(t.f=Math.max(t.f,i.min)),i.max!==1/0&&(t.f=Math.min(t.f,i.max))}calculateContentDim(t=this.current){const{content:e,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:r}=i;let a=o,l=r;if(this.option("zoom")||0!==this.angle){const i=!(e instanceof HTMLImageElement||"none"!==window.getComputedStyle(e).maxWidth&&"none"!==window.getComputedStyle(e).maxHeight),c=i?o:n,h=i?r:s,u=this.getMatrix(t),d=new DOMPoint(0,0).matrixTransform(u),f=new DOMPoint(0+c,0).matrixTransform(u),p=new DOMPoint(0+c,0+h).matrixTransform(u),g=new DOMPoint(0,0+h).matrixTransform(u),m=Math.abs(p.x-d.x),v=Math.abs(p.y-d.y),b=Math.abs(g.x-f.x),y=Math.abs(g.y-f.y);a=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:a,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===C||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:t}=this,{x:e,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity");let r=this.velocity.e,a=this.velocity.f;0!==n?(this.isBouncingX=!0,n*r<=0?r+=.14*n:(r=.14*n,e.min!==1/0&&(this.target.e=Math.max(t.e,e.min)),e.max!==1/0&&(this.target.e=Math.min(t.e,e.max))),o&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*a<=0?a+=.14*s:(a=.14*s,i.min!==1/0&&(this.target.f=Math.max(t.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(t.f,i.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=r),this.isBouncingY&&(this.velocity.f=a)}enable(){const{content:t}=this,e=new DOMMatrixReadOnly(window.getComputedStyle(t).transform);for(const t of b)this.current[t]=this.target[t]=e[t];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=v.Ready,this.emit
49("ready")}onClick(t){var e;"click"===t.type&&0===t.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(e=this.pointerTracker)||void 0===e||e.clear(),this.trackingPoints=[],this.startDecelAnim());const i=t.target;if(!i||t.defaultPrevented)return;if(i.hasAttribute("disabled"))return t.preventDefault(),void t.stopPropagation();if((()=>{const t=window.getSelection();return t&&"Range"===t.type})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,r=o&&T(o)?o.dataset:null;if(r){const e=r.panzoomChange,i=r.panzoomAction;if((e||i)&&t.preventDefault(),e){let i={};try{i=JSON.parse(e)}catch(t){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(i)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return t.preventDefault(),void t.stopPropagation();if(i.closest("[data-fancybox]"))return;const a=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(a.x-l.x)>2||Math.abs(a.y-l.y)>2))return;this.dragStart.time=0;const c=e=>{ 50this.option("zoom",t)&&e&&"string"==typeof e&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&&"function"==typeof this[e]&&(t.preventDefault(),this[e]({event:t}))},h=this.option("click",t),u=this.option("dblClick",t);u?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",t),!t.defaultPrevented&&h&&c(h)):(this.emit("dblClick",t),t.defaultPrevented||c(u)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&&h&&c(h))}addTrackingPoint(t){const e=this.trackingPoints.filter((t=>t.time>Date.now()-100));e.push(t),this.trackingPoints=e}onPointerDown(t,e,i){var n;if(!1===this.option("touch",t))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===C&&this.targetScale>1)return t.preventDefault(),t.stopPropagation(),!1;const o=t.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)["A","BUTTON"].includes(o.nodeName)||t.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit("touchStart",t)),!0}onPointerMove(t,s,r){if(!1===this.option("touch",t))return;if(!this.isDragging)return;if(s.length<2&&this.panOnlyZoomed&&n(this.targetScale)<=n(this.minScale))return;if(this.emit("touchMove",t),t.defaultPrevented)return;this.addTrackingPoint(s[0]);const{content:a}=this,l=i(r[0],r[1]),c=i(s[0],s[1]);let h=0,u=0;if(s.length>1){const t=a.getBoundingClientRect();h=l.clientX-t.left-.5*t.width,u=l.clientY-t.top-.5*t.height}const d=e(r[0],r[1]),f=e(s[0],s[1]);let p=d?f/d:1,g=c.clientX-l.clientX,m=c.clientY-l.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=n(this.targetScale)===n(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void t.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=e>45&&e<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(o(t.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&n(this.targetScale)===n(this.minScale))return;t.cancelable&&t.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(p=Math.max(p,w)),y>
501.5*x&&(p=Math.min(p,x)),"y"===this.lockedAxis&&n(y)===n(w)&&(g=0),"x"===this.lockedAxis&&n(y)===n(w)&&(m=0),this.applyChange({originX:h,originY:u,panX:g,panY:m,scale:p,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(e),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),o(t.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==v.Destroy&&(t.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var t;const e=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of b)this.velocity[t]=0;this.target.e=this.current.e,this.target.f=this.current.f,P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:i}=this,s=i[0],o=i[i.length-1];let r=0,a=0,l=0;o&&s&&(r=o.clientX-s.clientX,a=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&&(r*=c,a*=c);let h=0,u=0,d=0,f=0,p=this.option("decelFriction");const g=this.targetScale;if(l>0){d=Math.abs(r)>3?r/(l/30):0,f=Math.abs(a)>3?a/(l/30):0;const t=this.option("maxVelocity");t&&(d=Math.max(Math.min(d,t),-1*t),f=Math.max(Math.min(f,t),-1*t))}d&&(h=d/(1/(1-p)-1)),f&&(u=f/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&n(g)===this.minScale)&&(h=d=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&n(g)===this.minScale)&&(u=f=0);const m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(v)<y&&(h=u=0,d=f=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||e&&!h&&!u)&&(p=.35),this.applyChange({panX:h,panY:u,friction:p}),this.emit("decel",d,f,m,v)}onWheel(t){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode===C)return;if(t.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&&!1!==this.option("zoom")&&this.zoomWithWheel(t)}onMouseMove(t){this.panWithMouse(t)}onKeydown(t){"Escape"===t.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:t,target:e,content:i,contentRect:s}=this,o=Object.assign({},E);for(const i of b){const s="e"==i||"f"===i?O:M;o[i]=n(t[i],s),Math.abs(e[i]-t[i])<("e"==i||"f"===i?.51:.001)&&(t[i]=e[i])}let{a:r,b:a,c:l,d:c,e:h,f:u}=o,d=`matrix(${r}, ${a}, ${l}, ${c}, ${h}, ${u})`,f=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===d)return;f.style.transform=d;const{contentWidth:p,contentHeight:g}=this.calculateContentDim();s.width=p,s.height=g,this.emit("afterTransform")}updateMetrics(t=!1){var e;if(!this||this.state===v.Destroy)return;if(this.isContentLoading)return;const i=Math.max(1,(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1),{container:s,content:o}=this,r=o instanceof HTMLImageElement,a=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=a.width*i,h=a.height*i;const u=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),d=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),f=h-u;this.containerRect={width:c,height:h,innerWidth:d,innerHeight:f};let p=this.option("width")||"auto",g=this.option("height")||"auto";"auto"===p&&(p=parseFloat(o.dataset.width||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth),e||0})(o)),"auto"===g&&(g=parseFloat(o.dataset.height||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight),e||0})(o));let m=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(m=m.parentElement||m);const b=m.getAttribute("style")||"";m.style.setProperty("transform","none","important"),r&&(m.style.width="",m.style.height=""),m.offsetHeight;const y=o.getBoundingClientRect();let w=y.width*i,x=y.height*i,_=0,T=0;r&&(Math.abs(p-w)>1||Math.abs(g-x)>1)&&({width:w,height:x,top:_,left:T}=((t,e,i,n)=>{const s=i/n;return s>t/e?(i=t,n=t/s):(i=e*s,n=e),{width:i,height:n,top:.5*(e-n),left:.5*(t-i)}})(w,x,p,g)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:y.top-a.top+_,bottom:a.bottom-y.bottom+_,left:y.left-a.left+T,right:a.right-y.right+T,fitWidth:w,fitHeight:x,width:w,height:x,fullWidth:p,fullHeight:g}),m.style.cssText=b,r&&(m.style.width=`${w}px`,m.style.height=`${x}
50px`),this.setTransform(),!0!==t&&this.emit("refresh"),this.ignoreBounds||(n(this.targetScale)<n(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===v.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:t,contentHeight:e}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:s}=this,{fitWidth:o,fitHeight:r}=this.contentRect;let a=0,l=0,c=0,h=0;const u=this.option("infinite");if(!0===u||s&&u===s)a=-1/0,c=1/0,l=-1/0,h=1/0;else{let{containerRect:s,contentRect:u}=this,d=n(o*i,O),f=n(r*i,O),{innerWidth:p,innerHeight:g}=s;if(s.width===d&&(p=s.width),s.width===f&&(g=s.height),t>p){c=.5*(t-p),a=-1*c;let e=.5*(u.right-u.left);a+=e,c+=e}if(o>p&&t<p&&(a-=.5*(o-p),c-=.5*(o-p)),e>g){h=.5*(e-g),l=-1*h;let t=.5*(u.bottom-u.top);l+=t,h+=t}r>g&&e<g&&(a-=.5*(r-g),c-=.5*(r-g))}return{x:{min:a,max:c},y:{min:l,max:h}}}getBounds(){const t=this.option("bounds");return"auto"!==t?t:this.calculateBounds()}updateControls(){const t=this,e=t.container,{panMode:i,contentRect:s,targetScale:o,minScale:r}=t;let a=r,c=t.option("click")||!1;c&&(a=t.getNextScale(c));let h=t.canZoomIn(),u=t.canZoomOut(),d=i===k&&!!this.option("touch"),f=u&&d;if(d&&(n(o)<n(r)&&!this.panOnlyZoomed&&(f=!0),(n(s.width,1)>n(s.fitWidth,1)||n(s.height,1)>n(s.fitHeight,1))&&(f=!0)),n(s.width*o,1)<n(s.fitWidth,1)&&(f=!1),i===C&&(f=!1),l(e,this.cn("isDraggable"),f),!this.option("zoom"))return;let p=h&&n(a)>n(o),g=!p&&!f&&u&&n(a)<n(o);l(e,this.cn("canZoomIn"),p),l(e,this.cn("canZoomOut"),g);for(const t of e.querySelectorAll("[data-panzoom-action]")){let e=!1,i=!1;switch(t.dataset.panzoomAction){case"zoomIn":h?e=!0:i=!0;break;case"zoomOut":u?e=!0:i=!0;break;case"toggleZoom":case"iterateZoom":h||u?e=!0:i=!0;const n=t.querySelector("g");n&&(n.style.display=h?"":"none")}e?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):i&&(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"))}}panTo({x:t=this.target.e,y:e=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:r=0,flipX:a=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==v.Destroy&&this.applyChange({panX:t-this.target.e,panY:e-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:r,friction:n,flipX:a,flipY:l,ignoreBounds:c})}applyChange({panX:t=0,panY:e=0,scale:i=1,angle:s=0,originX:o=-this.current.e,originY:r=-this.current.f,friction:a=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:h=!1,bounce:u=this.option("bounce")}){const d=this.state;if(d===v.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=a||0,this.ignoreBounds=h;const{current:f}=this,p=f.e,g=f.f,m=this.getMatrix(this.target);let y=(new DOMMatrix).translate(p,g).translate(o,r).translate(t,e);if(this.option("zoom")){if(!h){const t=this.targetScale,e=this.minScale,n=this.maxScale;t*i<e&&(i=e/t),t*i>n&&(i=n/t)}y=y.scale(i)}y=y.translate(-o,-r).translate(-p,-g).multiply(m),s&&(y=y.rotate(s)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(const t of b)"e"!==t&&"f"!==t&&(y[t]>this.minScale+1e-5||y[t]<this.minScale-1e-5)?this.target[t]=y[t]:this.target[t]=n(y[t],O);(this.targetScale<this.scale||Math.abs(i-1)>.1||this.panMode===C||!1===u)&&!h&&this.clampTargetBounds(),d===v.Init?this.animate():this.isResting||(this.state=v.Panning,this.requestTick())}stop(t=!1){if(this.state===v.Init||this.state===v.Destroy)return;const e=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of b)this.velocity[e]=0,"current"===t?this.current[e]=this.target[e]:"target"===t&&(this.target[e]=this.current[e]);this.setTransform(),P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1,this.state=v.Ready,e&&(this.emit
50("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),S(this.container,"is-animating"),this.isScaling&&S(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(t,e=this.option("mouseMoveFriction")){if(this.pmme=t,this.panMode!==C||!t)return;if(n(this.targetScale)<=n(this.minScale))return;this.emit("mouseMove",t);const{container:i,containerRect:s,contentRect:o}=this,r=s.width,a=s.height,l=i.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top;let{contentWidth:u,contentHeight:d}=this.calculateContentDim(this.target);const f=this.option("mouseMoveFactor");f>1&&(u!==r&&(u*=f),d!==a&&(d*=f));let p=.5*(u-r)-c/r*100/100*(u-r);p+=.5*(o.right-o.left);let g=.5*(d-a)-h/a*100/100*(d-a);g+=.5*(o.bottom-o.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:e})}zoomWithWheel(t){if(this.state===v.Destroy||this.state===v.Init)return;const e=Date.now();if(e-this.pwt<45)return void t.preventDefault();this.pwt=e;var i=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const s=Math.max(-1,Math.min(1,i)),{targetScale:o,maxScale:r,minScale:a}=this;let l=o*(100+45*s)/100;n(l)<n(a)&&n(o)<=n(a)?(this.cwd+=Math.abs(s),l=a):n(l)>n(r)&&n(o)>=n(r)?(this.cwd+=Math.abs(s),l=r):(this.cwd=0,l=Math.max(Math.min(l,r),a)),this.cwd>this.option("wheelLimit")||(t.preventDefault(),n(l)!==n(o)&&this.zoomTo(l,{event:t}))}canZoomIn(){return this.option("zoom")&&(n(this.contentRect.width,1)<n(this.contentRect.fitWidth,1)||n(this.targetScale)<n(this.maxScale))}canZoomOut(){return this.option("zoom")&&n(this.targetScale)>n(this.minScale)}zoomIn(t=1.25,e){this.zoomTo(this.targetScale*t,e)}zoomOut(t=.8,e){this.zoomTo(this.targetScale*t,e)}zoomToFit(t){this.zoomTo("fit",t)}zoomToCover(t){this.zoomTo("cover",t)}zoomToFull(t){this.zoomTo("full",t)}zoomToMax(t){this.zoomTo("max",t)}toggleZoom(t){this.zoomTo(this.getNextScale("toggleZoom"),t)}toggleMax(t){this.zoomTo(this.getNextScale("toggleMax"),t)}toggleCover(t){this.zoomTo(this.getNextScale("toggleCover"),t)}iterateZoom(t){this.zoomTo("next",t)}zoomTo(t=1,{friction:e="auto",originX:i="auto",originY:n="auto",event:s}={}){if(this.isContentLoading||this.state===v.Destroy)return;const{targetScale:o,fullScale:r,maxScale:a,coverScale:l}=this;if(this.stop(),this.panMode===C&&(s=this.pmme||s),s||"auto"===i||"auto"===n){const t=this.content.getBoundingClientRect(),e=this.container.getBoundingClientRect(),o=s?s.clientX:e.left+.5*e.width,r=s?s.clientY:e.top+.5*e.height;i=o-t.left-.5*t.width,n=r-t.top-.5*t.height}let c=1;"number"==typeof t?c=t:"full"===t?c=r:"cover"===t?c=l:"max"===t?c=a:"fit"===t?c=1:"next"===t&&(c=this.getNextScale("iterateZoom")),c=c/o||1,e="auto"===e?c>1?.15:.25:e,this.applyChange({scale:c,originX:i,originY:n,friction:e}),s&&this.panMode===C&&this.panWithMouse(s,e)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHeight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:t}=this,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);const n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(t=this.current){const{a:e,b:i,c:n,d:s,e:o,f:r}=t;return new DOMMatrix([e,i,n,s,o,r])}reset(t){if(this.state!==v.Init&&this.state!==v.Destroy){this.stop("current");for(const t of b)this.target[t]=E[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=v.Panning,this.requestTick())}}
50destroy(){this.stop(),this.state=v.Destroy,this.detachEvents(),this.detachObserver();const{container:t,content:e}=this,i=this.option("classes")||{};for(const e of Object.values(i))t.classList.remove(e+"");e&&(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(L,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(L,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const D=function(t,e){let i=!0;return(...n)=>{i&&(i=!1,t(...n),setTimeout((()=>{i=!0}),e))}},I=(t,e)=>{let i=[];return t.childNodes.forEach((t=>{t.nodeType!==Node.ELEMENT_NODE||e&&!t.matches(e)||i.push(t)})),i},F={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var j;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(j||(j={}));const B=t=>{if("string"==typeof t||t instanceof HTMLElement)t={html:t};else{const e=t.thumb;void 0!==e&&("string"==typeof e&&(t.thumbSrc=e),e instanceof HTMLImageElement&&(t.thumbEl=e,t.thumbElSrc=e.src,t.thumbSrc=e.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},H=(t={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},t);class N extends g{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}const $={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2};class X extends N{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let t=this.list;if(!t){t=document.createElement("ul"),S(t,this.cn("list")),t.setAttribute("role","tablist");const e=this.instance.container;e.appendChild(t),S(e,this.cn("hasDots")),this.list=t}return t}refresh(){var t;const e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(e<i||e>n)return void this.cleanup();const o="number"==typeof s&&e>5&&e>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&&this.cleanup();const a=this.build();if(l(a,this.cn("isDynamic"),!!o),r)for(let t=0;t<e;t++)a.append(this.createItem(t));let c,h=0;for(const e of[...a.children]){const i=h===this.instance.page;i&&(c=e),l(e,this.cn("isCurrent"),i),null===(t=e.children[0])||void 0===t||t.setAttribute("aria-selected",i?"true":"false");for(const t of["isBeforePrev","isPrev","isNext","isAfterNext"])P(e,this.cn(t));h++}if(c=c||a.firstChild,o&&c){const t=c.previousElementSibling,e=t&&t.previousElementSibling;S(t,this.cn("isPrev")),S(e,this.cn("isBeforePrev"));const i=c.nextElementSibling,n=i&&i.nextElementSibling;S(i,this.cn("isNext")),S(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(t=0){var e;const i=document.createElement("li");i.setAttribute("role","presentation");const n=r(this.instance.localize(this.option("dotTpl"),[["%d",t+1]]).replace(/\%i/g,t+""));return i.appendChild(n),null===(e=i.children[0])||void 0===e||e.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,P(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(X,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:$});const Y="disabled",W="next",q="prev";class V extends N{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){const t=this.instance,e=t.pages.length,i=t.page;if(e<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute(Y),s.removeAttribute(Y),t.isInfinite||(i<=0&&n.setAttribute(Y,""),i>=e-1&&s.setAttribute(Y,"")))}addBtn(t){var e;const i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${t.toUpperCase()}}}`)),S(n,this.cn("button")+" "+this.cn(t===W?"isNext":"isPrev"));const s=i.isRTL?t===W?q:W:t;var o;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${o=t,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""}`]="true",null===(e=this.container)||void 0===e||e.appendChild(n),n}build(){const t=this.instance.container,e=this.cn("container");let{container:i,prev:n,next:s}=this;i||(i=t.querySelector("."+e),this.isDom=!!i),i||(i=document.createElement("div"),S(i,e),t.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(W)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(q)),this.prev=n}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(V,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
50',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class Z extends N{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(t){this.target=this.instance,this.nav=t,this.attachEvents()}addAsNavFor(t){this.nav=this.instance,this.target=t,this.attachEvents()}attachEvents(){const{nav:t,target:e}=this;t&&e&&(t.options.initialSlide=e.options.initialPage,t.state===j.Ready?this.onNavReady(t):t.on("ready",this.onNavReady),e.state===j.Ready?this.onTargetReady(e):e.on("ready",this.onTargetReady))}onNavReady(t){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(t){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(t,e,i){this.onNavTouch(t,t.panzoom,i)}onNavTouch(t,e,i){var n,s;if(Math.abs(e.dragOffset.x)>3||Math.abs(e.dragOffset.y)>3)return;const o=i.target,{nav:r,target:a}=this;if(!r||!a||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=a.getPageForSlide(c),u=r.getPageForSlide(c);r.slideTo(u),a.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){var t,e;const{target:i,nav:n}=this;if(!i||!n)return;if(n.state!==j.Ready||i.state!==j.Ready)return;const s=null===(e=null===(t=i.pages[i.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(t){const e=this.nav;e&&e.state===j.Ready&&(this.selectedIndex=t,[...e.slides].map((e=>{e.el&&e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}attach(){const t=this;let e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&&t.addAsTargetFor(i)}detach(){const t=this,e=t.nav,i=t.target;e&&(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&&(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}Object.defineProperty(Z,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const U={Navigation:V,Dots:X,Sync:Z},G="animationend",K="isSelected",J="slide";class Q extends m{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===j.Ready}get isInfinite(){let t=!1;const{contentDim:e,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&e+o.dim>=i&&(t=this.option("infinite")),t}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(t,e={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:j.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&&(t=document.querySelector(t)),!t||!T(t))throw new Error("No Element found");this.container=t,this.slideNext=D(this.slideNext.bind(this),150),this.slidePrev=D(this.slidePrev.bind(this),150),this.userOptions=e,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){var t,e;const i=f({},Q.defaults,this.userOptions);let n="";const s=i.breakpoints;if(s&&d(s))for(const[t,e]of Object.entries(s))window.matchMedia(t).matches&&d(e)&&(n+=t,f(i,e));n===this.bp&&this.state!==j.Init||(this.bp=n,this.state===j.Ready&&(i.initialSlide=(null===(e=null===(t=this.pages[this.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index)||0),this.state!==j.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}
50init(){this.state=j.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},Q.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=j.Ready,this.emit("ready")}initLayout(){const{container:t}=this,e=this.option("classes");S(t,this.cn("container")),l(t,e.isLTR,!this.isRTL),l(t,e.isRTL,this.isRTL),l(t,e.isVertical,!this.isHorizontal),l(t,e.isHorizontal,this.isHorizontal);let i=this.option("viewport")||t.querySelector(`.${e.viewport}`);i||(i=document.createElement("div"),S(i,e.viewport),i.append(...I(t,`.${e.slide}`)),t.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||t.querySelector(`.${e.track}`);n||(n=document.createElement("div"),S(n,e.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:t}=this;if(!t)return;const e=[...this.slides],i=[];[...I(t,`.${this.cn(J)}`)].forEach((t=>{if(T(t)){const e=B({el:t,isDom:!0,index:this.slides.length});i.push(e)}}));for(let t of[...this.option("slides",[])||[],...e])i.push(B(t));this.slides=i;for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;
50for(const t of i)this.emit("beforeInitSlide",t,t.index),this.emit("initSlide",t,t.index);this.emit("initSlides")}setInitialPage(){const t=this.option("initialSlide");this.page="number"==typeof t?this.getPageForSlide(t):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:t,pages:e,isHorizontal:i}=this;if(!t||!e.length)return;let n=this.page;e[n]||(this.page=n=0);const s=(e[n].pos||0)*(this.isRTL&&i?1:-1),o=i?`${s}px`:"0",r=i?"0":`${s}px`;t.style.transform=`translate3d(${o}, ${r}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const t=this.option("Panzoom")||{};this.panzoom=new L(this.viewport,f({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:t=>!(this.pages.length<2&&!t.options.infinite),bounds:()=>this.getBounds(),maxVelocity:t=>Math.abs(t.target[this.axis]-t.current[this.axis])<2*this.viewportDim?100:0},t)),this.panzoom.on("*",((t,e,...i)=>{this.emit(`Panzoom.${e}`,t,...i)})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const t=this.container;t&&(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let t=[];const{contentDim:e,viewportDim:i}=this;let n=this.option("slidesPerPage");n=("auto"===n||e<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,r=0 51;for(const e of this.slides)(!t.length||o+e.dim-i>.05||r>=n)&&(t.push(H()),s=t.length-1,o=0,r=0),t[s].slides.push(e),o+=e.dim+e.gap,r++;return t}processPages(){const t=this.pages,{contentDim:e,viewportDim:i,isInfinite:s}=this,o=this.option("center"),r=this.option("fill"),a=r&&o&&e>i&&!s;if(t.forEach(((t,n)=>{var s;t.index=n,t.pos=(null===(s=t.slides[0])||void 0===s?void 0:s.pos)||0,t.dim=0;for(const[e,i]of t.slides.entries())t.dim+=i.dim,e<t.slides.length-1&&(t.dim+=i.gap);a&&t.pos+.5*t.dim<.5*i?t.pos=0:a&&t.pos+.5*t.dim>=e-.5*i?t.pos=e-i:o&&(t.pos+=-.5*(i-t.dim))})),t.forEach((t=>{r&&!s&&e>i&&(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,e-i)),t.pos=n(t.pos,1e3),t.dim=n(t.dim,1e3),Math.abs(t.pos)<=.1&&(t.pos=0)})),s)return t;const l=[];let c;return t.forEach((t=>{const e=Object.assign({},t);c&&e.pos===c.pos?(c.dim+=e.dim,c.slides=[...c.slides,...e.slides]):(e.index=l.length,c=e,l.push(e))})),l}getPageFromIndex(t=0){const e=this.pages.length;let i;return t=parseInt((t||0).toString())||0,i=this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0),i}getSlideMetrics(t){var e,i;const s=this.isHorizontal?"width":"height";let o=0,r=0,a=t.el;const l=!(!a||a.parentNode);if(a?o=parseFloat(a.dataset[s]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",(this.track||document.body).prepend(a)),S(a,this.cn(J)+" "+t.class+" "+t.customClass),o)a.style[s]=`${o}px`,a.style["width"===s?"height":"width"]="";else{l&&(this.track||document.body).prepend(a),o=a.getBoundingClientRect()[s]*Math.max(1,(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1);let t=a[this.isHorizontal?"offsetWidth":"offsetHeight"];t-1>o&&(o=t)}const c=getComputedStyle(a);return"content-box"===c.boxSizing&&(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),r=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(i=a.parentElement)||void 0===i||i.removeChild(a):t.el||a.remove(),{dim:n(o,1e3),gap:n(r,1e3)}}getBounds(){const{isInfinite:t,isRTL:e,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(t)s={min:-1/0,max:1/0};else if(n.length){const t=n[0].pos,o=n[n.length-1].pos;s=e&&i?{min:t,max:o}:{min:-1*o,max:-1*t}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let t,{isHorizontal:e,isRTL:i,isInfinite:s,viewport:o,viewportDim:r,contentDim:a,page:l,pages:c,slides:h,panzoom:u}=this,d=0,f=0,p=0,g=0;u?g=-1*u.current[this.axis]:c[l]&&(g=c[l].pos||0),t=e?i?"right":"left":"top",i&&e&&(g*=-1);for(const e of h){const i=e.el;i?("top"===t?(i.style.right="",i.style.left=""):i.style.top="",e.index!==d?i.style[t]=0===f?"":`${n(f,1e3)}px`:i.style[t]="",p+=e.dim+e.gap,d++):f+=e.dim+e.gap}if(s&&p&&o){let i=getComputedStyle(o),s="padding",l=e?"Right":"Bottom",c=parseFloat(i[s+(e?"Left":"Top")]);g-=c,r+=c,r+=parseFloat(i[s+l]);for(const e of h)e.el&&(n(e.pos)<n(r)&&n(e.pos+e.dim+e.gap)<n(g)&&n(g)>n(a-r)&&(e.el.style[t]=`${n(f+p,1e3)}px`),n(e.pos+e.gap)>=n(a-r)&&n(e.pos)>n(g+r)&&n(g)<n(r)&&(e.el.style[t]=`-${n(p,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let e=0;for(const i of h)i.el?this.inTransition.has(i.index)&&m.slides.indexOf(i)<0&&(i.el.style[t]=`${n(e+(m.pos-v.pos),1e3)}px`):e+=i.dim+i.gap}}createSlideEl(t){const{track:e,slides:i}=this;if(!e||!t)return;if(t.el&&t.el.parentNode)return;const n=t.el||document.createElement("div");S(n,this.cn(J)),S(n,t.class),S(n,t.customClass);const s=t.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=t.html+"");const o=[];
51i.forEach(((t,e)=>{t.el&&o.push(e)}));const r=t.index;let a=null;o.length&&(a=i[o.reduce(((t,e)=>Math.abs(e-r)<Math.abs(t-r)?e:t))]);const l=a&&a.el&&a.el.parentNode?a.index<t.index?a.el.nextSibling:a.el:null;e.insertBefore(n,e.contains(l)?l:null),t.el=n,this.emit("createSlide",t)}removeSlideEl(t,e=!1){const i=null==t?void 0:t.el;if(!i||!i.parentNode)return;const n=this.cn(K);if(i.classList.contains(n)&&(P(i,n),this.emit("unselectSlide",t)),t.isDom&&!e)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",t);const s=new CustomEvent(G);i.dispatchEvent(s),t.el&&(t.el.remove(),t.el=null)}transitionTo(t=0,e=this.option("transition")){var i,n,s,o;if(!e)return!1;const r=this.page,{pages:a,panzoom:l}=this;t=parseInt((t||0).toString())||0;const c=this.getPageFromIndex(t);if(!l||!a[c]||a.length<2||Math.abs(((null===(n=null===(i=a[r])||void 0===i?void 0:i.slides[0])||void 0===n?void 0:n.dim)||0)-this.viewportDim)>1)return!1;const h=t>r?1:-1,u=a[c].pos*(this.isRTL?1:-1);if(r===c&&Math.abs(u-l.target[this.axis])<1)return!1;this.clearTransitions();const d=l.isResting;S(this.container,this.cn("inTransition"));const f=(null===(s=a[r])||void 0===s?void 0:s.slides[0])||null,p=(null===(o=a[c])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(p.index),this.createSlideEl(p);let g=f.el,m=p.el;d||e===J||(e="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(f.index),f.transition=e,g.addEventListener(G,this.onAnimationEnd),g.classList.add(`f-${e}Out`,`to-${h>0?b:v}`)),m&&(p.transition=e,m.addEventListener(G,this.onAnimationEnd),m.classList.add(`f-${e}In`,`from-${h>0?v:b}`)),l.current[this.axis]=u,l.target[this.axis]=u,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?t.add(n):e.add(n);for(const e of this.inTransition)t.add(this.slides[e]);for(const e of t)this.createSlideEl(e),this.lazyLoadSlide(e);for(const i of e)t.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const t="aria-hidden";let e=this.cn(K);if(e)for(const i of this.slides){const n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(t):n.setAttribute(t,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(e)||(S(n,e),this.emit("selectSlide",i)),n.removeAttribute(t)):(n.classList.contains(e)&&(P(n,e),this.emit("unselectSlide",i)),n.setAttribute(t,"true")))}}flipInfiniteTrack(){const{axis:t,isHorizontal:e,isInfinite:i,isRTL:n,viewportDim:s,contentDim:o}=this,r=this.panzoom;if(!r||!i)return;let a=r.current[t],l=r.target[t]-a,c=0,h=.5*s;n&&e?(a<-h&&(c=-1,a+=o),a>o-h&&(c=1,a-=o)):(a>h&&(c=1,a-=o),a<-o+h&&(c=-1,a+=o)),c&&(r.current[t]=a,r.target[t]=a+l)}lazyLoadImg(t,e){const i=this,n="f-fadeIn",s="is-preloading";let o=!1,a=null;const l=()=>{o||(o=!0,a&&(a.remove(),a=null),P(e,s),e.complete&&(S(e,n),setTimeout((()=>{P(e,n)}),350)),this.option("adaptiveHeight")&&t.el&&this.pages[this.page].slides.indexOf(t)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",t))};S(e,s),e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.addEventListener("error",(()=>{l()})),e.addEventListener("load",(()=>{l()})),setTimeout((()=>{const i=e.parentNode;i&&t.el&&(e.complete?l():o||(a=r(_),i.insertBefore(a,e)))}),300)}lazyLoadSlide(t){const e=t&&t.el;if(!e)return;const i=new Set;let n=Array.from(e.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));e.dataset.lazySrc&&n.push(e),n.map((t=>{t instanceof HTMLImageElement?i.add(t):t instanceof HTMLElement&&t.dataset.lazySrc&&(t.style.backgroundImage=`url('${t.dataset.lazySrc}')`,delete t.dataset.lazySrc)}));for(const e of i)this.lazyLoadImg(t,e)}onAnimationEnd(t){var e;const i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(!i||!s||!o)return;const r=!!this.inTransition.has(n)&&s.transition;r&&o.substring(0,r.length+2)===`f-${r}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&&this.emit
51("settle")}onDecel(t,e=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:o,isHorizontal:r,axis:a,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180));let u=0;if(u=h>45&&h<135?r?0:i:r?e:0,!c)return;let d=this.page,f=o&&r?1:-1;const p=t.current[a]*f;let{pageIndex:g}=this.getPageFromPosition(p);Math.abs(u)>5?(l[d].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(d=g),d=o&&r?u<0?d-1:d+1:u<0?d+1:d-1):d=0===n&&0===s?d:g,this.slideTo(d,{transition:!1,friction:t.option("decelFriction")})}onClick(t){const e=t.target,i=e&&T(e)?e.dataset:null;let n,s;i&&(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&&(s="slidePrev")),s?(t.preventDefault(),t.stopPropagation(),e&&!e.hasAttribute("disabled")&&this[s](n)):this.emit("click",t)}onSlideTo(t){const e=t.detail||0;this.slideTo(this.getPageForSlide(e),{friction:0})}onChange(t,e=0){const i=this.page;this.prevPage=i,this.page=t,this.option("adaptiveHeight")&&this.setViewportHeight(),t!==i&&(this.markSelectedSlides(),this.emit("change",t,i,e))}onRefresh(){let t=this.contentDim,e=this.viewportDim;this.updateMetrics(),this.contentDim===t&&this.viewportDim===e||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var t;null===(t=this.viewport)||void 0===t||t.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(t){this.lp!==t.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=t.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(t=null,e=null){this.destroy(),this.state=j.Init,this.prevPage=null,this.userOptions=t||this.userOptions,this.userPlugins=e||this.userPlugins,this.processOptions()}slideTo(t=0,{friction:e=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===j.Destroy)return;t=parseInt((t||0).toString())||0;const n=this.getPageFromIndex(t),{axis:s,isHorizontal:o,isRTL:r,pages:a,panzoom:l}=this,c=a.length,h=r&&o?1:-1;if(!l||!c)return;if(this.page!==n){const e=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",e,t),e.defaultPrevented)return}if(this.transitionTo(t,i))return;let u=a[n].pos;if(this.isInfinite){const e=this.contentDim,i=l.target[s]*h;2===c?u+=e*Math.floor(parseFloat(t+"")/2):u=[u,u-e,u+e].reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t}))}u*=h,Math.abs(l.target[s]-u)<1||(l.panTo({x:o?u:0,y:o?0:u,friction:e}),this.onChange(n))}slideToClosest(t){if(this.panzoom){const{pageIndex:e}=this.getPageFromPosition();this.slideTo(e,t)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),P(this.container,this.cn("inTransition"));const t=["to-prev","to-next","from-prev","from-next"];for(const e of this.slides){const i=e.el;if(i){i.removeEventListener(G,this.onAnimationEnd),i.classList.remove(...t);const n=e.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(t,e){var i,n,s,o;const r=this.panzoom,a=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,l=(null===(n=this.pages[this.page])||void 0===n?void 0:n.dim)||0,c=this.contentDim<this.viewportDim;let h=Array.isArray(e)?e:[e];const u=[];for(const t of h)u.push(B(t));this.slides.splice(t,0,...u);for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;for(const t of u)this.emit("beforeInitSlide",t,t.index);if(this.page>=t&&(this.page+=u.length),this.updateMetrics(),r){const e=(null===(s=this.pages[this.page])||void 0===s?void 0:s.pos)||0,i=(null===(o=this.pages[this.page])||void 0===o?void 0:o.dim)||0,n=this.pages.length||1,h=this.isRTL?l-i:i-l,u=this.isRTL?a-e:e-a;c&&1===n?(t<=this.page&&(r.current[this.axis]-=h,r.target[this.axis]-=h),r.panTo({[this.isHorizontal?"x":"y"]:-1*e})):u&&t<=this.page&&(r.target[this.axis]-=u,r.current[this.axis]-=u,r.requestTick())}for(const t of u)this.emit("initSlide",t,t.index)}prependSlide(t){this.addSlide(0,t)}appendSlide(t){this.addSlide(this.slides.length,t)}removeSlide(t){const e=this.slides.length;t=(t%e+e)%e;const i=this.slides[t];
51if(i){this.removeSlideEl(i,!0),this.slides.splice(t,1);for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}),this.emit("destroySlide",i)}}updateMetrics(){const{panzoom:t,viewport:e,track:i,slides:s,isHorizontal:o,isInfinite:r}=this;if(!i)return;const a=o?"width":"height",l=o?"offsetWidth":"offsetHeight";if(e){let t=Math.max(e[l],n(e.getBoundingClientRect()[a],1e3)),i=getComputedStyle(e),s="padding",r=o?"Right":"Bottom";t-=parseFloat(i[s+(o?"Left":"Top")])+parseFloat(i[s+r]),this.viewportDim=t}let c,h=0;for(const[t,e]of s.entries()){let i=0,o=0;!e.el&&c?(i=c.dim,o=c.gap):(({dim:i,gap:o}=this.getSlideMetrics(e)),c=e),i=n(i,1e3),o=n(o,1e3),e.dim=i,e.gap=o,e.pos=h,h+=i,(r||t<s.length-1)&&(h+=o)}h=n(h,1e3),this.contentDim=h,t&&(t.contentRect[a]=h,t.contentRect[o?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===j.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(t,e=!1,i=!1){void 0===t&&(t=this.page);const s=this,o=s.panzoom,r=s.contentDim,a=s.pages[t]||0;if(!a||!o)return t>this.page?-1:1;let l=-1*o.current.e,c=n((l-a.pos)/(1*a.dim),1e3),h=c,u=c;this.isInfinite&&!0!==i&&(h=n((l-a.pos+r)/(1*a.dim),1e3),u=n((l-a.pos-r)/(1*a.dim),1e3));let d=[c,h,u].reduce((function(t,e){return Math.abs(e)<Math.abs(t)?e:t}));return e?d:d>1?1:d<-1?-1:d}setViewportHeight(){const{page:t,pages:e,viewport:i,isHorizontal:n}=this;if(!i||!e[t])return;let s=0;n&&this.track&&(this.track.style.height="auto",e[t].slides.forEach((t=>{t.el&&(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide(t){for(const e of this.pages)for(const i of e.slides)if(i.index===t)return e.index;return-1}getVisibleSlides(t=0){var e;const i=new Set;let{panzoom:n,contentDim:s,viewportDim:o,pages:r,page:a}=this;if(o){s=s+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;let l=0;l=n&&n.state!==v.Init&&n.state!==v.Destroy?-1*n.current[this.axis]:r[a]&&r[a].pos||0,this.isInfinite&&(l-=Math.floor(l/s)*s),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-o*t,h=l+o*(t+1),u=this.isInfinite?[-1,0,1]:[0];for(const t of this.slides)for(const e of u){const n=t.pos+e*s,o=n+t.dim+t.gap;n<h&&o>c&&i.add(t)}}return i}getPageFromPosition(t){const{viewportDim:e,contentDim:i,slides:n,pages:s,panzoom:o}=this,r=s.length,a=n.length,l=n[0],c=n[a-1],h=this.option("center");let u=0,d=0,f=0,p=void 0===t?-1*((null==o?void 0:o.target[this.axis])||0):t;h&&(p+=.5*e),this.isInfinite?(p<l.pos-.5*c.gap&&(p-=i,f=-1),p>c.pos+c.dim+.5*c.gap&&(p-=i,f=1)):p=Math.max(l.pos||0,Math.min(p,c.pos));let g=c,m=n.find((t=>{const e=t.pos-.5*g.gap,i=t.pos+t.dim+.5*t.gap;return g=t,p>=e&&p<i}));return m||(m=c),d=this.getPageForSlide(m.index),u=d+f*r,{page:u,pageIndex:d}}setPageFromPosition(){const{pageIndex:t}=this.getPageFromPosition();this.onChange(t)}destroy(){if([j.Destroy].includes(this.state))return;this.state=j.Destroy;const{container:t,viewport:e,track:i,slides:n,panzoom:s}=this,o=this.option("classes");t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach((t=>{this.removeSlideEl(t)})),this.detachPlugins(),e&&(e.removeEventListener("scroll",this.onScroll),e.offsetParent&&i&&i.offsetParent&&e.replaceWith(...i.childNodes));for(const[e,i]of Object.entries(o))"container"!==e&&i&&t.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const r=this.events.get("ready");this.events=new Map,r&&this.events.set("ready",r)}}Object.defineProperty(Q,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:L}),Object.defineProperty(Q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:F}),Object.defineProperty(Q,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:U});const tt=function(t){if(!T(t))return 0;const e=window.scrollY,i=window.innerHeight,n=e+i,s=t.getBoundingClientRect(),o=s.y+e,r=s.height,a=o+r;if(e>a||n<o)return 0;if(e<o&&n>a)return 100;if(o<e&&a>n)return 100;let l=r;o<e&&(l-=e-o),a>n&&(l-=a-n);const c=l/i*100;return Math.round(c)},et=!("undefined"==typeof window||!window.document||!window.document.createElement);let it;const nt=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not
51([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),st=t=>{if(t&&et){void 0===it&&document.createElement("div").focus({get preventScroll(){return it=!0,!1}});try{if(it)t.focus({preventScroll:!0});else{const e=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch(t){}}},ot=()=>{const t=document;let e,i="",n="",s="";return t.fullscreenEnabled?(i="requestFullscreen",n="exitFullscreen",s="fullscreenElement"):t.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",n="webkitExitFullscreen",s="webkitFullscreenElement"),i&&(e={request:function(e=t.documentElement){return"webkitRequestFullscreen"===i?e[i](Element.ALLOW_KEYBOARD_INPUT):e[i]()},exit:function(){return t[s]&&t[n]()},isFullscreen:function(){return t[s]}}),e},rt={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},y),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n <div class="fancybox__backdrop"></div>\n <div class="fancybox__carousel"></div>\n <div class="fancybox__footer"></div>\n </div>'},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,wheel:"zoom"};var at,lt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"}(at||(at={})),function(t){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}(lt||(lt={}));let ct="",ht=!1,ut=!1,dt=null;const ft=()=>{let t="",e="";const i=Ee.getInstance();if(i){const n=i.carousel,s=i.getSlide();if(n&&s){let o=s.slug||void 0,r=s.triggerEl||void 0;e=o||i.option("slug")||"",!e&&r&&r.dataset&&(e=r.dataset.fancybox||""),e&&"true"!==e&&(t="#"+e+(!o&&n.slides.length>1?"-"+(s.index+1):""))}}return{hash:t,slug:e,index:1}},pt=()=>{const t=new URL(document.URL).hash,e=t.slice(1).split("-"),i=e[e.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:n}},gt=()=>{const{slug:t,index:e}=pt();if(!t)return;let i=document.querySelector(`[data-slug="${t}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Ee.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${t}"]`);n.length&&(i=n[e-1],i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},mt=()=>{if(!1===Ee.defaults.Hash)return;const t=Ee.getInstance();if(!1===(null==t?void 0:t.options.Hash))return;const{slug:e,index:i}=pt(),{slug:n}=ft();t&&(e===n?t.jumpTo(i-1):(ht=!0,t.close())),gt()},vt=()=>{dt&&clearTimeout(dt),queueMicrotask((()=>{mt()}))},bt=()=>{window.addEventListener("hashchange",vt,!1),setTimeout((()=>{mt()}),500)};et&&(/complete|interactive|loaded/.test(document.readyState)?bt():document.addEventListener("DOMContentLoaded",bt));const yt="is-zooming-in";class wt extends N{onCreateSlide(t,e,i){const n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&this.setImage(i,n)}onRemoveSlide(t,e,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(t,e,i,n){P(this.instance.container,yt);for(const t of e.slides){const e=t.panzoom;e&&t.index!==i&&e.reset(.35)}}onClose(){var t;const e=this.instance,i=e.container,n=e.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:r,thumbElSrc:a}=n;if(!s||!a||!o||!r||r.isContentLoading||r.state===v.Init||r.state===v.Destroy)return;r.updateMetrics();let l=this.getZoomInfo(n);if(!l)return;this.instance.state=at.CustomClosing,i.classList.remove(yt),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${a}')`;const c=i.getBoundingClientRect();
511===((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${i.offsetTop+window.scrollY}px`,left:`${i.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:h,y:u,scale:d,opacity:f}=l;if(f){const t=((t,e,i,n)=>{const s=e-t,o=-1;return e=>1+((e-t)/s*o||0)})(r.scale,d,1,0);r.on("afterTransform",(()=>{o.style.opacity=t(r.scale)+""}))}r.on("endAnimation",(()=>{e.destroy()})),r.target.a=d,r.target.b=0,r.target.c=0,r.target.d=d,r.panTo({x:h,y:u,scale:d,friction:f?.2:.33,ignoreBounds:!0}),r.isResting&&e.destroy()}setImage(t,e){const i=this.instance;t.src=e,this.process(t,e).then((e=>{const{contentEl:n,imageEl:s,thumbElSrc:o,el:r}=t;if(i.isClosing()||!n||!s)return;n.offsetHeight;const a=!!i.isOpeningSlide(t)&&this.getZoomInfo(t);if(this.option("protected")&&r){r.addEventListener("contextmenu",(t=>{t.preventDefault()}));const t=document.createElement("div");S(t,"fancybox-protected"),n.appendChild(t)}if(o&&a){const s=e.contentRect,r=Math.max(s.fullWidth,s.fullHeight);let c=null;!a.opacity&&r>1200&&(c=document.createElement("img"),S(c,"fancybox-ghost"),c.src=o,n.appendChild(c));const h=()=>{c&&(S(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=o,new Promise(((t,e)=>{const i=new Image;i.onload=t,i.onerror=e,i.src=l}))).then((()=>{i.hideLoading(t),t.state=lt.Opening,this.instance.emit("reveal",t),this.zoomIn(t).then((()=>{h(),this.instance.done(t)}),(()=>{})),c&&setTimeout((()=>{h()}),r>2500?800:200)}),(()=>{i.hideLoading(t),i.revealContent(t)}))}else{const n=this.optionFor(t,"initialSize"),s=this.optionFor(t,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0};let r=i.optionFor(t,"showClass")||void 0,a=!0;i.isOpeningSlide(t)&&("full"===n?e.zoomToFull(o):"cover"===n?e.zoomToCover(o):"max"===n?e.zoomToMax(o):a=!1,e.stop("current")),a&&r&&(r=e.isDragging?"f-fadeIn":""),i.hideLoading(t),i.revealContent(t,r)}var l}),(()=>{i.setError(t,"{{IMAGE_ERROR}}")}))}process(t,e){return new Promise(((i,n)=>{var s;const o=this.instance,a=t.el;o.clearContent(t),o.showLoading(t);let l=this.optionFor(t,"content");if("string"==typeof l&&(l=r(l)),!l||!T(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let i="",n=t.caption;i="string"==typeof n&&n?n.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${t.index+1} of ${(null===(s=o.carousel)||void 0===s?void 0:s.pages.length)||1}`,l.src=e||"",l.alt=i,l.draggable=!1,t.srcset&&l.setAttribute("srcset",t.srcset),this.instance.isOpeningSlide(t)&&(l.fetchPriority="high")}t.sizes&&l.setAttribute("sizes",t.sizes)}S(l,"fancybox-image"),t.imageEl=l,o.setContent(t,l,!1),t.panzoom=new L(a,f({transformParent:!0},this.option("Panzoom")||{},{content:l,width:o.optionFor(t,"width","auto"),height:o.optionFor(t,"height","auto"),wheel:()=>{const t=o.option("wheel");return("zoom"===t||"pan"==t)&&t},click:(e,i)=>{var n,s;if(o.isCompact||o.isClosing())return!1;if(t.index!==(null===(n=o.getSlide())||void 0===n?void 0:n.index))return!1;if(i){const t=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(t.nodeName))return!1}let r=!i||i.target&&(null===(s=t.contentEl)||void 0===s?void 0:s.contains(i.target));return o.option(r?"contentClick":"backdropClick")||!1},dblClick:()=>o.isCompact?"toggleZoom":o.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:t=>{i(t)},error:()=>{n()},destroy:()=>{n()}}}))}))}zoomIn(t){return new Promise(((e,i)=>{const n=this.instance,s=n.container,{panzoom:o,contentEl:r,el:a}=t;o&&o.updateMetrics();const l=this.getZoomInfo(t);if(!(l&&a&&r&&o&&s))return void i();const{x:c,y:h,scale:u,opacity:d}=l,f=()=>{t.state!==lt.Closing&&(d&&(r.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-u)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&e(o))},p=t=>{(t.scale<.99||t.scale>1.01)&&!t.isDragging||(P(s,yt),r.style.opacity="",t.off("endAnimation",p),t.off("touchStart",p),t.off("afterTransform",f),e(t))};o.on("endAnimation",p),o.on("touchStart",p),o.on("afterTransform",f),o.on(["error","destroy"],(()=>{i()})),o.panTo({x:c,y:h,scale:u,friction:0,ignoreBounds:!0}),o.stop("current");
51const g={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},m=this.optionFor(t,"initialSize");S(s,yt),n.hideLoading(t),"full"===m?o.zoomToFull(g):"cover"===m?o.zoomToCover(g):"max"===m?o.zoomToMax(g):o.reset(.172)}))}getZoomInfo(t){const{el:e,imageEl:i,thumbEl:n,panzoom:s}=t,o=this.instance,r=o.container;if(!e||!i||!n||!s||tt(n)<3||!this.optionFor(t,"zoom")||!r||o.state===at.Destroy)return!1;if("0"===getComputedStyle(r).getPropertyValue("--f-images-zoom"))return!1;const a=window.visualViewport||null;if(1!==(a?a.scale:1))return!1;let{top:l,left:c,width:h,height:u}=n.getBoundingClientRect(),{top:d,left:f,fitWidth:p,fitHeight:g}=s.contentRect;if(!(h&&u&&p&&g))return!1;const m=s.container.getBoundingClientRect();f+=m.left,d+=m.top;const v=-1*(f+.5*p-(c+.5*h)),b=-1*(d+.5*g-(l+.5*u)),y=h/p;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(h/u-p/g)>.1),{x:v,y:b,scale:y,opacity:w}}attach(){const t=this,e=t.instance;e.on("Carousel.change",t.onChange),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("close",t.onClose)}detach(){const t=this,e=t.instance;e.off("Carousel.change",t.onChange),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("close",t.onClose)}}Object.defineProperty(wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const xt="html",_t="image",Tt="map",Pt="youtube",St="vimeo",Et="html5video",Mt=(t,e={})=>{const i=new URL(t),n=new URLSearchParams(i.search),s=new URLSearchParams;for(const[t,i]of[...n,...Object.entries(e)]){let e=i+"";if("t"===t){let t=e.match(/((\d*)m)?(\d*)s?/);t&&s.set("start",60*parseInt(t[2]||"0")+parseInt(t[3]||"0")+"")}else s.set(t,e)}let o=s+"",r=t.match(/#t=((.*)?\d+s)/);return r&&(o+=`#t=${r[1]}`),o},Ot={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Ct=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class kt extends N{onBeforeInitSlide(t,e,i){this.processType(i)}onCreateSlide(t,e,i){this.setContent(i)}onClearContent(t,e){e.xhr&&(e.xhr.abort(),e.xhr=null);const i=e.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",e.iframeEl=null);const n=e.contentEl,s=e.placeholderEl;if("inline"===e.type&&n&&s)n.classList.remove("fancybox__content"),"none"!==n.style.display&&(n.style.display="none"),s.parentNode&&s.parentNode.insertBefore(n,s),s.remove(),e.contentEl=void 0,e.placeholderEl=void 0;else for(;e.el&&e.el.firstChild;)e.el.removeChild(e.el.firstChild)}onSelectSlide(t,e,i){i.state===lt.Ready&&this.playVideo()}onUnselectSlide(t,e,i){var n,s;if(i.type===Et){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(t){}return}let o;i.type===St?o={method:"pause",value:"true"}:i.type===Pt&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(t,e){t.isCurrentSlide(e)&&!t.isClosing()&&this.playVideo()}onRefresh(t,e){e.slides.forEach((t=>{t.el&&(this.resizeIframe(t),this.setAspectRatio(t))}))}onMessage(t){try{let e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event)for(let e of Array.from(document.getElementsByClassName("fancybox__iframe")))e instanceof HTMLIFrameElement&&e.contentWindow===t.source&&(e.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===e.event){const t=document.getElementById(e.id);t&&(t.dataset.ready="true")}}catch(t){}}loadAjaxContent(t){const e=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);const i=this.instance,n=new XMLHttpRequest;i.showLoading(t),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===at.Ready&&(i.hideLoading(t),200===n.status?i.setContent(t,n.responseText):i.setError(t,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=t.ajax||null;n.open(s?"POST":"GET",e+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),t.xhr=n}setInlineContent(t){let e=null;if(T(t.src))e=t.src;else if("string"==typeof t.src){const i=t.src.split("#",2).pop();e=i?document.getElementById(i):null}if(e){if("clone"===t.type||e.closest(".fancybox__slide")){e=e.cloneNode(!0);const i=e.dataset.animationName;i&&(e.classList.remove(i),delete e.dataset.animationName);let n=e.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${t.index}`,e.setAttribute("id",n)}else if(e.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(i,e),t.placeholderEl=i}this.instance.setContent(t,e)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(t){const{src:e,el:i}=t;if(!e||"string"!=typeof e||!i)return;i.classList.add("is-loading");const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${t.index}`);for(const[e,i]of Object.entries(this.optionFor(t,"iframeAttr")||{}))s.setAttribute(e,i);s.onerror=()=>{n.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=s;const o=this.optionFor(t,"preload") 52;if("iframe"!==t.type||!1===o)return s.setAttribute("src",t.src+""),n.setContent(t,s,!1),this.resizeIframe(t),void n.revealContent(t);n.showLoading(t),s.onload=()=>
52{if(!s.src.length)return;const e="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe(t),e?n.revealContent(t):n.hideLoading(t)},s.setAttribute("src",e),n.setContent(t,s,!1)}resizeIframe(t){const{type:e,iframeEl:i}=t;if(e===Pt||e===St)return;const n=null==i?void 0:i.parentElement;if(!i||!n)return;let s=t.autoSize;void 0===s&&(s=this.optionFor(t,"autoSize"));let o=t.width||0,r=t.height||0;o&&r&&(s=!1);const a=n&&n.style;if(!1!==t.preload&&!1!==s&&a)try{const t=window.getComputedStyle(n),e=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),s=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),l=i.contentWindow;if(l){const t=l.document,i=t.getElementsByTagName(xt)[0],n=t.body;a.width="",n.style.overflow="hidden",o=o||i.scrollWidth+e,a.width=`${o}px`,n.style.overflow="",a.flex="0 0 auto",a.height=`${n.scrollHeight}px`,r=i.scrollHeight+s}}catch(t){}if(o||r){const t={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(t.width=`${o}px`),r&&"auto"!==r&&(t.height=`${r}px`),Object.assign(a,t)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:e}=t;if(!e||!e.offsetParent)return;if(!this.optionFor(t,"videoAutoplay"))return;if(t.type===Et)try{const t=e.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(t){}if(t.type!==Pt&&t.type!==St)return;const i=()=>{if(t.iframeEl&&t.iframeEl.contentWindow){let e;if("true"===t.iframeEl.dataset.ready)return e=t.type===Pt?{event:"command",func:"playVideo"}:{method:"play",value:"true"},e&&t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"),void(t.poller=void 0);t.type===Pt&&(e={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"))}t.poller=setTimeout(i,250)};i()}processType(t){if(t.html)return t.type=xt,t.src=t.html,void(t.html="");const e=this.instance.optionFor(t,"src","");if(!e||"string"!=typeof e)return;let i=t.type,n=null;if(n=e.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const s=this.optionFor(t,Pt),{nocookie:o}=s,r=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}(s,["nocookie"]),a=`www.youtube${o?"-nocookie":""}.com`,l=Mt(e,r),c=encodeURIComponent(n[2]);t.videoId=c,t.src=`https://${a}/embed/${c}?${l}`,t.thumbSrc=t.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=Pt}else if(n=e.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const s=Mt(e,this.optionFor(t,St)),o=encodeURIComponent(n[1]),r=n[4]||"";t.videoId=o,t.src=`https://player.vimeo.com/video/${o}?${r?`h=${r}${s?"&":""}`:""}${s}`,i=St}if(!i&&t.triggerEl){const e=t.triggerEl.dataset.type;Ct.includes(e)&&(i=e)}i||"string"==typeof e&&("#"===e.charAt(0)?i="inline":(n=e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=Et,t.videoFormat=t.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=_t:e.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`https://maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i=Tt):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i=Tt),i=i||this.instance.option("defaultType"),t.type=i,i===_t&&(t.thumbSrc=t.thumbSrc||t.src)}setContent(t){const e=this.instance.optionFor(t,"src")||"";if(t&&t.type&&e){switch(t.type){case xt:this.instance.setContent(t,e);break;case Et:const i=this.option("videoTpl");i&&this.instance.setContent(t,i.replace(/\{\{src\}\}/gi,e+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case Tt:case Pt:case St:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}setAspectRatio(t){const e=t.contentEl;if(!(t.el&&e&&t.type&&[Pt,St,Et].includes(t.type)))return;let i,n=t.width||"auto",s=t.height||"auto";if("auto"===n||"auto"===s){i=this.optionFor(t,"videoRatio");const e=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=e&&e.length>2?parseFloat(e[1])/parseFloat(e[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(!i)return;e.style.aspectRatio="",e.style.width="",e.style.height="",e.offsetHeight;const o=e.getBoundingClientRect(),r=o.width||1,a=o.height||1;e.style.aspectRatio=i+"",i<r/a?(s="auto"===s?a:Math.min(a,s),e.style.width="auto",e.style.height=`${s}px`):(n="auto"===n?r:Math.min(r,n),e.style.width=`${n}px`,e.style.height="auto")}attach(){const t=this,e=t.instance;e.on("Carousel.beforeInitSlide",t.onBeforeInitSlide),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.selectSlide",t.onSelectSlide),e.on("Carousel.unselectSlide",t.onUnselectSlide),e.on("Carousel.Panzoom.refresh",t.onRefresh),e.on("done",t.onDone),e.on("clearContent",t.onClearContent),window.addEventListener("message",t.onMessage)}detach(){const t=this,e=t.instance;e.off("Carousel.beforeInitSlide",t.onBeforeInitSlide),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.selectSlide",t.onSelectSlide),e.off("Carousel.unselectSlide",t.onUnselectSlide),e.off("Carousel.Panzoom.refresh",t.onRefresh),e.off("done",t.onDone),e.off("clearContent",t.onClearContent),window.removeEventListener("message",t.onMessage)}}Object.defineProperty(kt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Ot});const At="play",Rt="pause",zt="ready";class Lt extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:zt}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==zt}onReady(t){this.option("autoStart")&&(t.isInfinite||t.page<t.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var t;this.inHover=!1,(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)&&this.resume()}onTimerEnd(){const t=this.instance;"play"===this.state&&(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();const e=this.instance,i=(null===(t=e.pages[e.page])||void 0===t?void 0:t.slides)||[];let n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||e.viewport),!n)return null;const s=document.createElement("div");return S(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){const t=this,e=t.instance;if(e.pages.length<2)return;if(t.timer)return;const i=t.option("timeout");t.state=At,S(e.container,"has-autoplay");let n=t.createProgressBar();n&&(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),t.timer=setTimeout((()=>{t.timer=null,t.inHover||t.onTimerEnd()}),i),t.emit("set")}clear(){const t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==zt){if(t.option("pauseOnHover")){const e=t.instance.container;e.addEventListener("mouseenter",t.onMouseEnter,!1),e.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,e=t.state,i=t.instance.container;t.clear(),t.state=zt,i.removeEventListener("mouseenter",t.onMouseEnter,!1),i.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),P(i,"has-autoplay"),e!==zt&&t.emit("stop")}pause(){const t=this;t.state===At&&(t.state=Rt,t.clear(),t.emit(Rt))}resume(){const t=this,e=t.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(t.state!==At){if(t.state===Rt&&!t.inHover){const e=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",e),e.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===At||this.state===Rt?this.stop():this.start()}attach(){const t=this,e=t.instance;
52e.on("ready",t.onReady),e.on("Panzoom.startAnimation",t.onChange),e.on("Panzoom.endAnimation",t.onSettle),e.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,e=t.instance;e.off("ready",t.onReady),e.off("Panzoom.startAnimation",t.onChange),e.off("Panzoom.endAnimation",t.onSettle),e.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(Lt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Dt extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(t){const e=t.carousel;if(!e)return;const i=t.container;i&&(e.options.Autoplay=f({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{t.emit("startSlideshow")},set:e=>{var n;i.classList.add("has-slideshow"),(null===(n=t.getSlide())||void 0===n?void 0:n.state)!==lt.Ready&&e.pause()},stop:()=>{i.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(e,i)=>{var n,s,o;!i||!i.cancelable||(null===(n=t.getSlide())||void 0===n?void 0:n.state)===lt.Ready&&(null===(o=null===(s=t.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),e.attachPlugins({Autoplay:Lt}),this.ref=e.plugins.Autoplay)}onReady(t){const e=t.carousel,i=this.ref;i&&e&&this.option("playOnStart")&&(e.isInfinite||e.page<e.pages.length-1)&&i.start()}onDone(t,e){const i=this.ref,n=t.carousel;if(!i||!n)return;const s=e.panzoom;s&&s.on("startAnimation",(()=>{t.isCurrentSlide(e)&&i.stop()})),t.isCurrentSlide(e)&&i.resume()}onKeydown(t,e){var i;const n=this.ref;n&&e===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}attach(){const t=this,e=t.instance;e.on("Carousel.init",t.onPrepare),e.on("Carousel.ready",t.onReady),e.on("done",t.onDone),e.on("keydown",t.onKeydown)}detach(){const t=this,e=t.instance;e.off("Carousel.init",t.onPrepare),e.off("Carousel.ready",t.onReady),e.off("done",t.onDone),e.off("keydown",t.onKeydown)}}Object.defineProperty(Dt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=>{var e;return(null===(e=t.instance.container)||void 0===e?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const It={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var Ft;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"}(Ft||(Ft={}));const jt="isResting",Bt="thumbWidth",Ht="thumbHeight",Nt="thumbClipWidth";let Xt=class extends N{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ft.Init})}get isModern(){return"modern"===this.type}onInitSlide(t,e){const i=e.el?e.el.dataset:void 0;i&&(e.thumbSrc=i.thumbSrc||e.thumbSrc||"",e[Nt]=parseFloat(i[Nt]||"")||e[Nt]||0,e[Ht]=parseFloat(i.thumbHe
52ight||"")||e[Ht]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var t;if(!this.isModern)return;const e=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,r=i.page;if(n&&s&&o){if(n.isDragging){P(e,this.cn(jt));let n=(null===(t=s.pages[r])||void 0===t?void 0:t.pos)||0;n+=i.getProgress(r)*(this[Nt]+this.thumbGap);let a=o.getBounds();-1*n>a.x.min&&-1*n<a.x.max&&o.panTo({x:-1*n,friction:.12})}else l(e,this.cn(jt),n.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const t of this.instance.slides||[])this.resizeModernSlide(t);this.shiftModern()}isDisabled(){const t=this.option("minCount")||0;if(t){const e=this.instance;let i=0;for(const t of e.slides||[])t.thumbSrc&&i++;if(i<t)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)<0}getThumb(t){const e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(t){const e=this.carousel;e&&e.addSlide(t.index,this.getThumb(t))}getSlides(){const t=[];for(const e of this.instance.slides||[])t.push(this.getThumb(e));return t}resizeModernSlide(t){this.isModern&&(t[Bt]=t[Nt]&&t[Ht]?Math.round(this[Ht]*(t[Nt]/t[Ht])):this[Bt])}updateProps(){const t=this.container;if(!t)return;const e=e=>parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+e))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[Bt]=e("width")||40,this[Nt]=e("clip-width")||40,this[Ht]=e("height")||40}build(){const t=this;if(t.state!==Ft.Init)return;if(t.isDisabled())return void t.emit("disabled");const e=t.instance,i=e.container,n=t.getSlides(),s=t.option("type");t.type=s;const o=t.option("parentEl"),r=t.cn("container"),a=t.cn("track");let l=null==o?void 0:o.querySelector("."+r);l||(l=document.createElement("div"),S(l,r),o?o.appendChild(l):i.after(l)),S(l,`is-${s}`),S(i,t.cn("hasThumbs")),t.container=l,t.updateProps();let c=l.querySelector("."+a);c||(c=document.createElement("div"),S(c,t.cn("track")),l.appendChild(c)),t.track=c;const h=f({},{track:c,infinite:!1,center:!0,fill:"classic"===s,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},t.option("Carousel")||{},{Sync:{target:e},slides:n}),u=new e.constructor(l,h);u.on("createSlide",((e,i)=>{t.setProps(i.index),t.emit("createSlide",i,i.el)})),u.on("ready",(()=>{t.shiftModern(),t.emit("ready")})),u.on("refresh",(()=>{t.shiftModern()})),u.on("Panzoom.click",((e,i,n)=>{t.onClick(n)})),t.carousel=u,t.state=Ft.Ready}onClick(t){t.preventDefault(),t.stopPropagation();const e=this.instance,{pages:i,page:n}=e,s=t=>{if(t){const e=t.closest("[data-carousel-index]");if(e)return[parseInt(e.dataset.carouselIndex||"",10)||0,e]}return[-1,void 0]},o=(t,e)=>{const i=document.elementFromPoint(t,e);return i?s(i):[-1,void 0]};let[r,a]=s(t.target);if(r>-1)return;const l=this[Nt],c=t.clientX,h=t.clientY;let[u,d]=o(c-l,h),[f,p]=o(c+l,h);d&&p?(r=Math.abs(c-d.getBoundingClientRect().right)<Math.abs(c-p.getBoundingClientRect().left)?u:f,r===n&&(r=r===u?f:u)):d?r=u:p&&(r=f),r>-1&&i[r]&&e.slideTo(r)}getShift(t){var e;const i=this,{instance:n}=i,s=i.carousel;if(!n||!s)return 0;const o=i[Bt],r=i[Nt],a=i.thumbGap,l=i.thumbExtraGap;if(!(null===(e=s.slides[t])||void 0===e?void 0:e.el))return 0;const c=.5*(o-r),h=n.pages.length-1;let u=n.getProgress(0),d=n.getProgress(h),f=n.getProgress(t,!1,!0),p=0,g=c+l+a;const m=u<0&&u>-1,v=d>0&&d<1;return 0===t?(p=g*Math.abs(u),v&&1===u&&(p-=g*Math.abs(d))):t===h?(p=g*Math.abs(d)*-1,m&&-1===d&&(p+=g*Math.abs(u))):m||v?(p=-1*g,p+=g*Math.abs(u),p+=g*(1-Math.abs(d))):p=g*f,p}setProps(t){var e;const i=this;if(!i.isModern)return;const{instance:s}=i,o=i.carousel;if(s&&o){const r=null===(e=o.slides[t])||void 0===e?void 0:e.el;if(r&&r.childNodes.length){let e=n(1-Math.abs(s.getProgress(t))),o=n(i.getShift(t));r.style.setProperty("--progress",e?e+"":""),r.style.setProperty("--shift",o+"")}}}shiftModern(){const t=this;if(!t.isModern)return;const{instance:e,track:i}=t,n=e.panzoom,s=t.carousel;if(!(e&&i&&n&&s))return;if(n.state===v.Init||n.state===v.Destroy)return;for(const i of e.slides)t.setProps(i.index);let o=(t[Nt]+t.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}cleanup(){const t=this;t.carousel&&t.carousel.destroy(),t.carousel=null,t.container&&t.container.remove(),t.container=null,t.track&&t.track.remove(),t.track=null,t.state=Ft.Init,P(t.instance.container,t.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===j.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}};Object.defineProperty(Xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:
52It});const Yt=Object.assign(Object.assign({},It),{key:"t",showOnStart:!0,parentEl:null}),Wt="is-masked",$t="aria-hidden";class qt extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&&!t.isDisabled()}get isHidden(){return this.hidden}onClick(t,e){e.stopPropagation()}onCreateSlide(t,e){var i,n,s;const o=(null===(s=null===(n=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===n?void 0:n.slides[e.index])||void 0===s?void 0:s.type)||"",r=e.el;if(r&&o){let t=`for-${o}`;["video","youtube","vimeo","html5video"].includes(o)&&(t+=" for-video"),S(r,t)}}onInit(){var t;const e=this,i=e.instance,n=i.carousel;if(e.ref||!n)return;const s=e.option("parentEl")||i.footer||i.container;if(!s)return;const o=f({},e.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:t=>{const i=t.container;i&&this.hidden&&(e.refresh(),i.style.transition="none",e.hide(),i.offsetHeight,queueMicrotask((()=>{i.style.transition="",e.show()})))}}});o.Carousel=o.Carousel||{},o.Carousel.on=f((null===(t=e.options.Carousel)||void 0===t?void 0:t.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=o,n.attachPlugins({Thumbs:Xt}),e.ref=n.plugins.Thumbs,e.option("showOnStart")||(e.ref.state=Ft.Hidden,e.hidden=!0)}onResize(){var t;const e=null===(t=this.ref)||void 0===t?void 0:t.container;e&&(e.style.maxHeight="")}onKeydown(t,e){const i=this.option("key");i&&i===e&&this.toggle()}toggle(){const t=this.ref;if(t&&!t.isDisabled())return t.state===Ft.Hidden?(t.state=Ft.Init,void t.build()):void(this.hidden?this.show():this.hide())}show(){const t=this.ref;if(!t||t.isDisabled())return;const e=t.container;e&&(this.refresh(),e.offsetHeight,e.removeAttribute($t),e.classList.remove(Wt),this.hidden=!1)}hide(){const t=this.ref,e=t&&t.container;e&&(this.refresh(),e.offsetHeight,e.classList.add(Wt),e.setAttribute($t,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||!t.state)return;const e=t.container,i=(null==e?void 0:e.firstChild)||null;e&&i&&i.childNodes.length&&(e.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const t=this,e=t.instance;e.state===at.Init?e.on("Carousel.init",t.onInit):t.onInit(),e.on("resize",t.onResize),e.on("keydown",t.onKeydown)}detach(){var t;const e=this,i=e.instance;i.off("Carousel.init",e.onInit),i.off("resize",e.onResize),i.off("keydown",e.onKeydown),null===(t=i.carousel)||void 0===t||t.detachPlugins(["Thumbs"]),e.ref=null}}Object.defineProperty(qt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Yt});const Vt={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3">
52<path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Zt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"}(Zt||(Zt={}));const Ut={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},Gt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Kt="has-toolbar",Jt="fancybox__toolbar";class Qt extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Zt.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(t){var e;if(!t.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){const t=this.instance.carousel;let e=0;if(t)for(const i of t.slides)(i.panzoom||"image"===i.type)&&e++;e||(s=!1)}s||(i=void 0);let o=0;const r={left:[],middle:[],right:[]};if(i)for(const t of["left","middle","right"])for(const n of i[t]){const i=this.createEl(n);i&&(null===(e=r[t])||void 0===e||e.push(i),o++)}let a=null;if(o&&(a=this.createContainer()),a){for(const[t,e]of Object.entries(r)){const i=document.createElement("div");S(i,Jt+"__column is-"+t);for(const t of e)i.appendChild(t);"auto"!==n||"middle"!==t||e.length||(n=!0),a.appendChild(i)}!0===n&&S(a,"is-absolute"),this.state=Zt.Ready,this.onRefresh()}else this.state=Zt.Disabled}onClick(t){var e,i;const n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,r=t.target,a=r&&T(r)?r.dataset:null;if(!a)return;if(void 0!==a.fancyboxToggleThumbs)return t.preventDefault(),t.stopPropagation(),void(null===(e=n.plugins.Thumbs
52)||void 0===e||e.toggle());if(void 0!==a.fancyboxToggleFullscreen)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==a.fancyboxToggleSlideshow){t.preventDefault(),t.stopPropagation();const e=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay;let s=e.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?e.stop():e.start())}const l=a.panzoomAction,c=a.panzoomChange;if((c||l)&&(t.preventDefault(),t.stopPropagation()),c){let e={};try{e=JSON.parse(c)}catch(t){}o&&o.applyChange(e)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const e=this.instance.getSlide();if(!e||e.state!==lt.Ready)return;const i=e&&!e.error&&e.panzoom;for(const e of t.querySelectorAll("[data-panzoom-action]"))i?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),s=i&&i.canZoomOut();for(const e of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));const t=e.querySelector("g");t&&(t.style.display=n?"":"none")}}onDone(t,e){var i;null===(i=e.panzoom)||void 0===i||i.on("afterTransform",(()=>{this.instance.isCurrentSlide(e)&&this.onRefresh()})),this.instance.isCurrentSlide(e)&&this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const e=this.option("parentEl")||t;let i=e.querySelector("."+Jt);return i||(i=document.createElement("div"),S(i,Jt),e.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&S(t,Kt),this.container=i,i}createEl(t){const e=this.instance,i=e.carousel;if(!i)return null;if("toggleFS"===t)return null;if("fullscreen"===t&&!ot())return null;let n=null;const s=i.slides.length||0;let o=0,a=0;for(const t of i.slides)(t.panzoom||"image"===t.type)&&o++,("image"===t.type||t.downloadSrc)&&a++;if(s<2&&["infobar","prev","next"].includes(t))return n;if(void 0!==Vt[t]&&!o)return null;if("download"===t&&!a)return null;if("thumbs"===t){const t=e.plugins.Thumbs;if(!t||!t.isEnabled)return null}if("slideshow"===t&&(!i.plugins.Autoplay||s<2))return null;if(void 0!==Vt[t]){const e=Vt[t];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),S(n,"f-button"),e.action&&(n.dataset.panzoomAction=e.action),e.change&&(n.dataset.panzoomChange=JSON.stringify(e.change)),n.appendChild(r(this.instance.localize(e.icon)))}else{const e=(this.option("items")||[])[t];e&&(n=r(this.instance.localize(e.tpl)),"function"==typeof e.click&&n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof e.click&&e.click.call(this,this,t)})))}const l=null==n?void 0:n.querySelector("svg");if(l)for(const[t,e]of Object.entries(Gt))l.getAttribute(t)||l.setAttribute(t,String(e));return n}removeContainer(){const t=this.container;t&&t.remove(),this.container=null,this.state=Zt.Disabled;const e=this.instance.container;e&&P(e,Kt)}attach(){const t=this,e=t.instance;e.on("Carousel.initSlides",t.onReady),e.on("done",t.onDone),e.on(["reveal","Carousel.change"],t.onChange),t.onReady(t.instance)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlides",t.onReady),e.off("done",t.onDone),e.off(["reveal","Carousel.change"],t.onChange),t.removeContainer()}}Object.defineProperty(Qt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Ut});const te={Hash:class extends N{onReady(){ht=!1}onChange(t){dt&&clearTimeout(dt);const{hash:e}=ft(),{hash:i}=pt(),n=t.isOpeningSlide(t.getSlide());n&&(ct=i===e?"":i),e&&e!==i&&(dt=setTimeout((()=>{try{if(t.state===at.Ready){let t="replaceState";
52n&&!ut&&(t="pushState",ut=!0),window.history[t]({},document.title,window.location.pathname+window.location.search+e)}}catch(t){}}),300))}onClose(t){if(dt&&clearTimeout(dt),!ht&&ut)return ut=!1,ht=!1,void window.history.back();if(!ht)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ct||""))}catch(t){}}attach(){const t=this.instance;t.on("ready",this.onReady),t.on(["Carousel.ready","Carousel.change"],this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance 53;t.off("ready",this.onReady),t.off(["Carousel.ready","Carousel.change"],this.onChange),t.off("close",this.onClose)}static parseURL(){return pt()}static startFromUrl(){gt()}static destroy(){window.removeEventListener("hashchange",vt,!1)}},Html:kt,Images:wt,Slideshow:Dt,Thumbs:qt,Toolbar:Qt},ee="with-fancybox",ie="hide-scrollbar",ne="--fancybox-scrollbar-compensate",se="--fancybox-body-margin",oe="aria-hidden",re="is-using-tab",ae="is-animated",le="is-compact",ce="is-loading",he="is-opening",ue="has-caption",de="disabled",fe="tabindex",pe="download",ge="href",me="src",ve=t=>"string"==typeof t,be=function(){var t=window.getSelection();return!!t&&"Range"===t.type};let ye,we=null,xe=null,_e=0,Te=0;const Pe=new Map;let Se=0;class Ee extends m{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],e={},i={}){super(e),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:at.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),ye||(ye=ot()),this.id=e.id||++Se,Pe.set(this.id,this),this.userSlides=t,this.userPlugins=i,queueMicrotask((()=>{this.init()}))}init(){if(this.state===at.Destroy)return;this.state=at.Init,this.attachPlugins(Object.assign(Object.assign({},Ee.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!et)return;const t=document,e=t.body,i=t.documentElement;if(e.classList.contains(ie))return;let n=window.innerWidth-i.getBoundingClientRect().width;const s=parseFloat(window.getComputedStyle(e).marginRight);n<0&&(n=0),i.style.setProperty(ne,`${n}px`),s&&e.style.setProperty(se,`${s}px`),e.classList.add(ie)})(),this.initLayout(),this.scale();const t=()=>{this.initCarousel(this.userSlides),this.state=at.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute(oe,"false")}),16)};this.option("Fullscreen.autoStart")&&ye&&!ye.isFullscreen()?ye.request().then((()=>{this.startedFs=!0,t()})).catch((()=>t())):t()}initLayout(){var t,e;const i=this.option("parentEl")||document.body,n=r(this.localize(this.option("tpl.main")||""));n&&(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(le,this.isCompact),S(n,this.option("mainClass")||""),S(n,he),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),S(document.documentElement,ee),we&&xe||(we=document.createElement("span"),S(we,"fancybox-focus-guard"),we.setAttribute(fe,"0"),we.setAttribute(oe,"true"),we.setAttribute("aria-label","Focus guard"),xe=we.cloneNode(),null===(t=n.parentElement)||void 0===t||t.insertBefore(we,n),null===(e=n.parentElement)||void 0===e||e.append(xe)),n.addEventListener("mousedown",(t=>{_e=t.pageX,Te=t.pageY,P(n,re)})),this.option("animated")&&(S(n,ae),setTimeout((()=>{this.isClosing()||P(n,ae)}
53),350)),this.emit("initLayout"))}initCarousel(t){const e=this.container;if(!e)return;const i=e.querySelector(".fancybox__carousel");if(!i)return;const n=this.carousel=new Q(i,f({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));n.on("*",((t,e,...i)=>{this.emit(`Carousel.${e}`,t,...i)})),n.on(["ready","change"],(()=>{this.manageCaption()})),this.on("Carousel.removeSlide",((t,e,i)=>{this.clearContent(i),i.state=void 0})),n.on("Panzoom.touchStart",(()=>{var t,e;this.isCompact||this.endIdle(),(null===(t=document.activeElement)||void 0===t?void 0:t.closest(".f-thumbs"))&&(null===(e=this.container)||void 0===e||e.focus())})),n.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()})),this.option("dragToClose")&&(n.on("Panzoom.afterTransform",((t,e)=>{const i=this.getSlide();if(i&&s(i.el))return;const n=this.container;if(n){const t=Math.abs(e.current.f),i=t<1?"":Math.max(.5,Math.min(1,1-t/e.contentRect.fitHeight*1.5));n.style.setProperty("--fancybox-ts",i?"0s":""),n.style.setProperty("--fancybox-opacity",i+"")}})),n.on("Panzoom.touchEnd",((t,e,i)=>{var n;const o=this.getSlide();if(o&&s(o.el))return;if(e.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(n=document.activeElement)||void 0===n?void 0:n.nodeName))return;const r=Math.abs(e.dragOffset.y);"y"===e.lockedAxis&&(r>=200||r>=50&&e.dragOffset.time<300)&&(i&&i.cancelable&&i.preventDefault(),this.close(i,"f-throwOut"+(e.current.f<0?"Up":"Down")))}))),n.on("change",(t=>{var e;let i=null===(e=this.getSlide())||void 0===e?void 0:e.triggerEl;if(i){const e=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:t.page});i.dispatchEvent(e)}})),n.on(["refresh","change"],(t=>{const e=this.container;if(!e)return;for(const i of e.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=t.page+1;for(const i of e.querySelectorAll("[data-fancybox-count]"))i.innerHTML=t.pages.length;if(!t.isInfinite){for(const i of e.querySelectorAll("[data-fancybox-next]"))t.page<t.pages.length-1?(i.removeAttribute(de),i.removeAttribute(fe)):(i.setAttribute(de,""),i.setAttribute(fe,"-1"));for(const i of e.querySelectorAll("[data-fancybox-prev]"))t.page>0?(i.removeAttribute(de),i.removeAttribute(fe)):(i.setAttribute(de,""),i.setAttribute(fe,"-1"))}const i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";n||"image"!==i.type||i.error||!ve(i.src)||(n=i.src);for(const t of e.querySelectorAll("[data-fancybox-download]")){const e=i.downloadFilename;n?(t.removeAttribute(de),t.removeAttribute(fe),t.setAttribute(ge,n),t.setAttribute(pe,e||n),t.setAttribute("target","_blank")):(t.setAttribute(de,""),t.setAttribute(fe,"-1"),t.removeAttribute(ge),t.removeAttribute(pe))}})),this.emit("initCarousel")}attachEvents(){const t=this,e=t.container;if(!e)return;e.addEventListener("click",t.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",t.onResize),i.addEventListener("resize",t.onResize))}detachEvents(){const t=this,e=t.container;if(!e)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",t.onResize),i.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;
53const e=window.visualViewport,i=Math.max(1,(null==e?void 0:e.scale)||1);let n="",s="",o="";if(e&&i>1){let t=`${e.offsetLeft}px`,r=`${e.offsetTop}px`;n=e.width*i+"px",s=e.height*i+"px",o=`translate3d(${t}, ${r}, 0) scale(${1/i})`}t.style.transform=o,t.style.width=n,t.style.height=s}onClick(t){var e;const{container:i,isCompact:n}=this;if(!i||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();const s=t.composedPath()[0];if(s.closest(".fancybox-spinner")||s.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(s.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(s.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if("click"===t.type&&0===t.detail)return;if(Math.abs(t.pageX-_e)>30||Math.abs(t.pageY-Te)>30)return;const o=document.activeElement;if(be()&&o&&i.contains(o))return;if(n&&"image"===(null===(e=this.getSlide())||void 0===e?void 0:e.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=>{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",t),t.defaultPrevented)return;let r=!1;if(s.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;s.matches(nt)||o.blur()}if(be())return;r=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(nt)&&(r=this.option("backdropClick"));"close"===r?(t.preventDefault(),this.close(t)):"next"===r?(t.preventDefault(),this.next()):"prev"===r&&(t.preventDefault(),this.prev())}onWheel(t){const e=t.target;let i=this.option("wheel",t);e.closest(".fancybox__thumbs")&&(i="slide");const n="slide"===i,s=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t})),r=Math.max(-1,Math.min(1,s)),a=Date.now();this.pwt&&a-this.pwt<300?n&&t.preventDefault():(this.pwt=a,this.emit("wheel",t,r),t.defaultPrevented||("close"===i?(t.preventDefault(),this.close(t)):"slide"===i&&(o(e)||(t.preventDefault(),this[r>0?"prev":"next"]()))))}onKeydown(t){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const e=t.key,i=this.option("keyboard");if(!i)return;const n=t.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==e&&!o&&T(n)&&(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName)))return;if("Tab"===t.key?S(this.container,re):P(this.container,re),t.ctrlKey||t.altKey||t.shiftKey)return;this.emit("keydown",e,t);const r=i[e];r&&"function"==typeof this[r]&&(t.preventDefault(),this[r]())}onResize(){const t=this.container;if(!t)return;const e=this.isCompact;t.classList.toggle(le,e),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(t){this.isTopmost()&&this.checkFocus(t)}onMousemove(t){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(t){const e=this.optionFor(t,"closeButton")||!1;if("auto"===e){const t=this.plugins.Toolbar;if(t&&t.state===Zt.Ready)return}if(!e)return;if(!t.contentEl||t.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const e=r(this.localize(i));t.closeBtnEl=t.contentEl.appendChild(e),t.el&&S(t.el,"has-close-btn")}}manageCaption(t){var e,i;const n="fancybox__caption",s=this.container;if(!s)return;P(s,ue);const o=this.isCompact||this.option("commonCaption"),r=!o;if(this.caption&&this.stop(this.caption),r&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption)for(const t of(null===(e=this.carousel)||void 0===e?void 0:e.slides)||[])t.captionEl&&(t.captionEl.remove(),t.captionEl=void 0,P(t.el,ue),null===(i=t.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||o&&!this.isCurrentSlide(t))return;const a=t.el;let l=this.optionFor(t,"caption","");if(!l)return void(o&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let c=null;if(r){if(c=t.captionEl||null,a&&!c){const e=`fancybox__caption_${this.id}_${t.index}`;c=document.createElement("div"),S(c,n),c.setAttribute("id",e),t.captionEl=a.appendChild(c),S(a,ue),a.setAttribute("aria-labelledby",e)}}else c=this.caption,c||(c=s.querySelector("."+n)),c||(c=document.createElement("div"),c.dataset.fancyboxCaption="",S(c,n),(this.footer||s).prepend(c)),S(s,ue),this.caption=c;c&&(c.innerHTML="",ve(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}checkFocus(t){this.focus(t)}focus(t){var e;if(this.ignoreFocusChange)return;const i=document.activeElement||null,n=(null==t?void 0:t.target)||null,s=this.container,o=null===(e=this.carousel)||void 0===e?void 0:e.viewport;if(!s||!o)return;if(!t&&i&&s.contains(i))return;const r=this.getSlide(),a=r&&r.state===lt.Ready?r.el:null;if(!a||a.contains(i)||s===i)return;t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(s.querySelectorAll(nt));let c=[],h=null;for(let t of l){const e=!t.offsetParent||!!t.closest('[aria-hidden="true"]'),i=a&&a.contains(t),n=!o.contains(t);if(t===s||(i||n)&&!e){c.push(t);const e=t.dataset.origTabindex;void 0!==e&&e&&(t.tabIndex=parseFloat(e)),t.removeAttribute("data-orig-tabindex"),!t.hasAttribute("autoFocus")&&h||(h=t)}else{const e=void 0===t.dataset.origTabindex?t.getAttribute("tabindex")||"":t.dataset.origTabindex;e&&(t.dataset.origTabindex=e),t.tabIndex=-1}}let u=null;t?(!n||c.indexOf(n)<0)&&(u=h||s,c.length&&(i===xe?u=c[0]:this.lastFocus!==s&&i!==we||(u=c[c.length-1]))):u=r&&"image"===r.type?s:h||s,u&&st(u),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}
53next(){const t=this.carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.carousel&&this.carousel.slideTo(...t)}isTopmost(){var t;return(null===(t=Ee.getInstance())||void 0===t?void 0:t.id)==this.id}animate(t=null,e="",i){if(!t||!e)return void(i&&i());this.stop(t);const n=s=>{s.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",n),delete t.dataset.animationName,i&&i(),P(t,e))};t.dataset.animationName=e,t.addEventListener("animationend",n),S(t,e)}stop(t){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,e="",i=!0){if(this.isClosing())return;const n=t.el;if(!n)return;let s=null;if(T(e)?s=e:(s=r(e+""),T(s)||(s=document.createElement("div"),s.innerHTML=e+"")),["img","picture","iframe","video","audio"].includes(s.nodeName.toLowerCase())){const t=document.createElement("div");t.appendChild(s),s=t}T(s)&&t.filter&&!t.error&&(s=s.querySelector(t.filter)),s&&T(s)?(S(s,"fancybox__content"),t.id&&s.setAttribute("id",t.id),"none"!==s.style.display&&"none"!==getComputedStyle(s).getPropertyValue("display")||(s.style.display=t.display||this.option("defaultDisplay")||"flex"),n.classList.add(`has-${t.error?"error":t.type||"unknown"}`),n.prepend(s),t.contentEl=s,i&&this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,e){const i=t.el,n=t.contentEl;i&&n&&(this.emit("reveal",t),this.hideLoading(t),t.state=lt.Opening,(e=this.isOpeningSlide(t)?void 0===e?this.optionFor(t,"showClass"):e:"f-fadeIn")?this.animate(n,e,(()=>{this.done(t)})):this.done(t))}done(t){this.isClosing()||(t.state=lt.Ready,this.emit("done",t),S(t.el,"is-done"),this.isCurrentSlide(t)&&this.option("autoFocus")&&queueMicrotask((()=>{var e;null===(e=t.panzoom)||void 0===e||e.updateControls(),this.option("autoFocus")&&this.focus()})),this.isOpeningSlide(t)&&(P(this.container,he),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(t){const e=this.getSlide();return!(!t||!e)&&e.index===t.index}isOpeningSlide(t){var e,i;return null===(null===(e=this.carousel)||void 0===e?void 0:e.prevPage)&&t&&t.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(t){t.state=lt.Loading;const e=t.el;e&&(S(e,ce),this.emit("loading",t),t.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!t.spinnerEl&&t.state===lt.Loading){let i=r(_);S(i,"fancybox-spinner"),t.spinnerEl=i,e.prepend(i),this.animate(i,"f-fadeIn")}}),250))}hideLoading(t){const e=t.el;if(!e)return;const i=t.spinnerEl;this.isClosing()?null==i||i.remove():(P(e,ce),i&&this.animate(i,"f-fadeOut",(()=>{i.remove()}
53)),t.state===lt.Loading&&(this.emit("loaded",t),t.state=lt.Ready))}setError(t,e){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,t),i.defaultPrevented)return;t.error=e,this.hideLoading(t),this.clearContent(t);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(e||"<p>{{ERROR}}</p>"),this.setContent(t,n)}clearContent(t){if(void 0===t.state)return;this.emit("clearContent",t),t.contentEl&&(t.contentEl.remove(),t.contentEl=void 0);const e=t.el;e&&(P(e,"has-error"),P(e,"has-unknown"),P(e,`has-${t.type||"unknown"}`)),t.closeBtnEl&&t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&&t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&&t.spinnerEl.remove(),t.spinnerEl=void 0}getSlide(){var t;const e=this.carousel;return(null===(t=null==e?void 0:e.pages[null==e?void 0:e.page])||void 0===t?void 0:t.slides[0])||void 0}close(t,e){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,t),i.defaultPrevented)return;t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());const n=()=>{this.proceedClose(t,e)};this.startedFs&&ye&&ye.isFullscreen()?Promise.resolve(ye.exit()).then((()=>n())):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const e=()=>{this.clearIdle(),this.idle=!0,S(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)e();else{const t=this.option("idle");t&&(this.idleTimer=setTimeout(e,t))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,P(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){ye&&(ye.isFullscreen()?ye.exit():ye.request().then((()=>{this.startedFs=!0})))}isClosing(){return[at.Closing,at.CustomClosing,at.Destroy].includes(this.state)}proceedClose(t,e){var i,n;this.state=at.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,r=this.getSlide(),a=r&&this.option("placeFocusBack")?r.triggerEl||this.option("triggerEl"):null;if(a&&(tt(a)?st(a):a.focus()),s&&(P(s,he),S(s,"is-closing"),s.setAttribute(oe,"true"),this.option("animated")&&S(s,ae),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();for(const t of o.slides){t.state=lt.Closing,this.hideLoading(t);const e=t.contentEl;e&&this.stop(e);const i=null==t?void 0:t.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(t)||o.emit("removeSlide",t)}}this.emit("close",t),this.state!==at.CustomClosing?(void 0===e&&r&&(e=this.optionFor(r,"hideClass")),e&&r?(this.animate(r.contentEl,e,(()=>{o&&o.emit("removeSlide",r)})),setTimeout((()=>{this.destroy()}),500)):this.destroy()):setTimeout((()=>{this.destroy()}),500)}destroy(){var t;if(this.state===at.Destroy)return;this.state=at.Destroy,null===(t=this.carousel)||void 0===t||t.destroy();const e=this.container;e&&e.remove(),Pe.delete(this.id);const i=Ee.getInstance();i?i.focus():(we&&(we.remove(),we=null),xe&&(xe.remove(),xe=null),P(document.documentElement,ee),(()=>{if(!et)return;const t=document,e=t.body;e.classList.remove(ie),e.style.setProperty(se,""),t.documentElement.style.setProperty(ne,"")})(),this.emit("destroy"))}static bind(t,e,i){if(!et)return;let n,s="",o={};if(void 0===t?n=document.body:ve(t)?(n=document.body,s=t,"object"==typeof e&&(o=e||{})):(n=t,ve(e)&&(s=e),"object"==typeof i&&(o=i||{})),!n||!T(n))return;s=s||"[data-fancybox]";const r=Ee.openers.get(n)||new Map;r.set(s,o),Ee.openers.set(n,r),1===r.size&&n.addEventListener("click",Ee.fromEvent)}static unbind(t,e){let i,n="";if(ve(t)?(i=document.body,n=t):(i=t,ve(e)&&(n=e)),!i)return;const s=Ee.openers.get(i);s&&n&&s.delete(n),n&&s||(Ee.openers.delete(i),i.removeEventListener("click",Ee.fromEvent))}static destroy(){let t;for(;t=Ee.getInstance();)t.destroy();for(const t of Ee.openers.keys())t.removeEventListener("click",Ee.fromEvent);Ee.openers=new Map}static fromEvent(t){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;let e=t.composedPath()[0];const i=e.closest("[data-fancybox-trigger]");if(i){const t=i.dataset.fancyboxTrigger||"",n=document.querySelectorAll(`[data-fancybox="${t}"]`),s=parseInt(i.dataset.fancyboxIndex||"",10)||0;e=n[s]||e}if(!(e&&e instanceof Element))return;let n,s,o,r;if([...Ee.openers].reverse().find((([t,i])=>!(!t.contains(e)||![...i].reverse().find((([i,a])=>{let l=e.closest(i);return!!l&&(n=t,s=i,o=l,r=a,!0)}))))),!n||!s||!o)return;r=r||{},t.preventDefault(),e=o;let a=[],l=f({},rt,r);l.event=t,l.triggerEl=e,l.delegate=i;const c=l.groupAll,h=l.groupAttr,u=h&&e?e.getAttribute(`${h}`):"";if((!e||u||c)&&(a=[].slice.call(n.querySelectorAll(s))),e&&!c&&(a=u?a.filter((t=>t.getAttribute(`${h}`)===u)):[e]),!a.length)return;const d=Ee.getInstance();return d&&d.options.triggerEl&&a.indexOf(d.options.triggerEl)>-1?void 0:(e&&(l.startIndex=a.indexOf(e)),Ee.fromNodes(a,l))}static fromSelector(t,e,i){let n=null,s="",o={};if(ve(t)?(n=document.body,s=t,"object"==typeof e&&(o=e||{})):t instanceof HTMLElement&&ve(e)&&(n=t,s=e,"object"==typeof i&&(o=i||{})),!n||!s)return!1;const r=Ee.openers.get(n);return!!r&&(o=f({},r.get(s)||{},o),!!o&&Ee.fromNodes(Array.from(n.querySelectorAll(s)),o))}static fromNodes(t,e){e=f({},rt,e||{});const i=[];for(const n of t){const t=n.dataset||{},s=t.src||n.getAttribute(ge)||n.getAttribute("currentSrc")||n.getAttribute(me)||void 0;let o;const r=e.delegate;let a;r&&i.length===e.startIndex&&(o=r instanceof HTMLImageElement?r:r.querySelector("img:not([aria-hidden])")),o||(o=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),o&&(a=o.currentSrc||o.src||void 0,!a&&o.dataset&&(a=o.dataset.lazySrc||o.dataset.src||void 0));const l={src:s,triggerEl:n,thumbEl:o,thumbElSrc:a,thumbSrc:a};for(const e in t){let i=t[e]+"";i="false"!==i&&("true"===i||i),l[e]=i}i.push(l)}return new Ee(i,e)}static getInstance(t){return t?Pe.get(t):Array.from(Pe.values()).reverse().find((t=>!t.isClosing()&&t))||null}static getSlide(){var t;return(null===(t=Ee.getInstance())||void 0===t?void 0:t.getSlide())||null}static show(t=[],e={}){return new Ee(t,e)}static next(){const t=Ee.getInstance();t&&t.next()}static prev(){const t=Ee.getInstance();t&&t.prev()}static close(t=!0,...e){if(t)for(const t of Pe.values())t.close(...e);else{const t=Ee.getInstance();t&&t.close(...e)}}}Object.defineProperty(Ee,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.33"}),Object.defineProperty(Ee,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:rt}),Object.defineProperty(Ee,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:te}),Object.defineProperty(Ee,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),t.Carousel=Q,t.Fancybox=Ee,t.Panzoom=L})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function e(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function i(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}const n=(t,e=1e4)=>(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t,e){return!(!t||t===document.body||e&&t===e)&&(function(t){if(!(t&&t instanceof Element&&t.offsetParent))return!1;const e=t.scrollHeight>t.clientHeight,i=window.getComputedStyle(t).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&&!n&&!s}(t)?t:s(t.parentElement,e))},o=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount>1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild}
53,r=t=>`${t||""}`.split(" ").filter((t=>!!t)),a=(t,e,i)=>{t&&r(e).forEach((e=>{t.classList.toggle(e,i||!1)}))};class l{constructor(t){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.time=Date.now()}}const c={passive:!1};class h{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(const t of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[t]=this[t].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,c),this.element.addEventListener("touchstart",this.onTouchStart,c),this.element.addEventListener("touchmove",this.onMove,c),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(t){if(!t.buttons||0!==t.button)return;const e=new l(t);this.currentPointers.some((t=>t.id===e.id))||this.triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerStart(new l(e),t);window.addEventListener("blur",this.onWindowBlur)}onMove(t){const e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((t=>new l(t))):[new l(t)],n=[];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(n.push(t),this.currentPointers[e]=t)}n.length&&this.moveCallback(t,this.currentPointers.slice(),e)}onPointerEnd(t){t.buttons>0&&0!==t.button||(this.triggerPointerEnd(t,new l(t)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerEnd(t,new l(e))}triggerPointerStart(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}triggerPointerEnd(t,e){const i=this.currentPointers.findIndex((t=>t.id===e.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const t=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}),t,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,c),this.element.removeEventListener("touchstart",this.onTouchStart,c),this.element.removeEventListener("touchmove",this.onMove,c),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}const u=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t),d=(t,...e)=>{const i=e.length;for(let n=0;n<i;n++){const i=e[n]||{};
53Object.entries(i).forEach((([e,i])=>{const n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,{[e]:n}),u(i)?Object.assign(t[e],d(n,i)):Array.isArray(i)?Object.assign(t,{[e]:[...i]}):Object.assign(t,{[e]:i})}))}return t},f=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class p{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?d({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=f(t,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=f(e,t);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,t,...n));let r=f(e,this.options);return r&&"function"==typeof r?s=r.call(this,this,t,...n,s):void 0===s&&(s=r),void 0===s?i:s}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=>{let n="";return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;i<e.length;i++)t=t.split(e[i][0]).join(e[i][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),this.events||(this.events=new Map),i.forEac
53h((t=>{let i=this.events.get(t);i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),i.forEach((t=>{const i=this.events.get(t);if(Array.isArray(i)){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(p,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.33"}), 54Object.defineProperty(p,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class g extends p{constructor(t={}){super(t),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(t={}){const e=new Map;for(const[i,n]of Object.entries(t)){const t=this.option(i),s=this.plugins[i];s||!1===t?s&&!1===t&&(s.detach(),delete this.plugins[i]):e.set(i,new n(this,t||{}))}for(const[t,i]of e)this.plugins[t]=i,i.attach()}detachPlugins(t){t=t||Object.keys(this.plugins);for(const e of t){const t=this.plugins[e];t&&t.detach(),delete this.plugins[e]}return this.emit("detachPlugins"),this}}var m;!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(m||(m={}));const v=["a","b","c","d","e","f"],b={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:{PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"}},y='<circle cx="25" cy="25" r="20"></circle>',w='<div class="f-spinner"><svg viewBox="0 0 50 50">'+y+y+"</svg></div>",x=t=>t&&null!==t&&t instanceof Element&&"nodeType"in t,_=(t,e)=>{t&&r(e).forEach((e=>{t.classList.remove(e)}))},T=(t,e)=>{t&&r(e).forEach((e=>{t.classList.add(e)}))},P={a:1,b:0,c:0,d:1,e:0,f:0},S=1e5,E=1e4,M="mousemove",O="drag",C="content";let k=null,A=null;class R extends g{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===A&&(A=window.matchMedia("(hover: none)").matches),A}get isMobile(){return null===k&&(k=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),k}get panMode(){return this.options.panMode!==M||this.isTouchDevice?O:M}get panOnlyZoomed(){const t=this.options.panOnlyZoomed;return"auto"===t?this.isTouchDevice:t}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:t,b:e}=this.current;return Math.sqrt(t*t+e*e)||1}get targetScale(){const{a:t,b:e}=this.target;return Math.sqrt(t*t+e*e)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:t}=this;return t.fullWidth/t.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:t,contentRect:e}=this,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const t=this.content;return!!(t&&t instanceof HTMLImageElement)&&!t.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const t of v){const e="e"==t||"f"===t?1e-4:1e-5;
54if(Math.abs(this.target[t]-this.current[t])>e)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(t,e={},i={}){var n;if(super(e),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:m.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},P)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},P)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");this.container=t,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},R.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const s=this.content;if(s.addEventListener("load",this.onLoad),s.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){t.classList.add(this.cn("isLoading"));const e=o(w);!t.contains(s)||s.parentElement instanceof HTMLPictureElement?this.spinner=t.appendChild(e):this.spinner=(null===(n=s.parentElement)||void 0===n?void 0:n.insertBefore(e,s))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:t}=this,e=this.cn(C);let i=this.option(C)||t.querySelector(`.${e}`);if(i||(i=t.querySelector("img,picture")||t.firstElementChild,i&&T(i,e)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:t,container:e,state:i}=this;t&&(t.remove(),this.spinner=null),this.option("spinner")&&e.classList.remove(this.cn("isLoading")),this.emit
54("afterLoad"),i===m.Init?this.enable():this.updateMetrics()}onError(){this.state!==m.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=m.Error,this.emit("error"))}getNextScale(t){const{fullScale:e,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this;let r=o;switch(t){case"toggleMax":r=i-o<.5*(s-o)?s:o;break;case"toggleCover":r=i-o<.5*(n-o)?n:o;break;case"toggleZoom":r=i-o<.5*(e-o)?e:o;break;case"iterateZoom":let t=[1,e,s].sort(((t,e)=>t-e)),a=t.findIndex((t=>t>i+1e-5));r=t[a]||1}return r}attachObserver(){var t;const e=()=>{const{container:t,containerRect:e}=this;return Math.abs(e.width-t.getBoundingClientRect().width)>.1||Math.abs(e.height-t.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(e()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{e()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}detachObserver(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}attachEvents(){const{container:t}=this;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new h(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(M,this.onMouseMove)}detachEvents(){var t;const{container:e}=this;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(M,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const t=this.friction,e=this.option("maxVelocity");for(const i of v)t?(this.velocity[i]*=1-t,e&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],e),-1*e)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const t of v)"e"===t&&this.isBouncingX||"f"===t&&this.isBouncingY||(this.velocity[t]=(1/(1-this.friction)-1)*(this.target[t]-this.current[t]))}checkBounds(t=0,e=0){const{current:i}=this,n=i.e+t,s=i.f+e,o=this.getBounds(),{x:r,y:a}=o,l=r.min,c=r.max,h=a.min,u=a.max;let d=0,f=0;return l!==1/0&&n<l?d=l-n:c!==1/0&&n>c&&(d=c-n),h!==1/0&&s<h?f=h-s:u!==1/0&&s>u&&(f=u-s),Math.abs(d)<1e-4&&(d=0),Math.abs(f)<1e-4&&(f=0),Object.assign(Object.assign({},o),{xDiff:d,yDiff:f,inBounds:!d&&!f})}clampTargetBounds(){const{target:t}=this,{x:e,y:i}=this.getBounds();e.min!==1/0&&(t.e=Math.max(t.e,e.min)),e.max!==1/0&&(t.e=Math.min(t.e,e.max)),i.min!==1/0&&(t.f=Math.max(t.f,i.min)),i.max!==1/0&&(t.f=Math.min(t.f,i.max))}calculateContentDim(t=this.current){const{content:e,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:r}=i;let a=o,l=r;if(this.option("zoom")||0!==this.angle){const i=!(e instanceof HTMLImageElement||"none"!==window.getComputedStyle(e).maxWidth&&"none"!==window.getComputedStyle(e).maxHeight),c=i?o:n,h=i?r:s,u=this.getMatrix(t),d=new DOMPoint(0,0).matrixTransform(u),f=new DOMPoint(0+c,0).matrixTransform(u),p=new DOMPoint(0+c,0+h).matrixTransform(u),g=new DOMPoint(0,0+h).matrixTransform(u),m=Math.abs(p.x-d.x),v=Math.abs(p.y-d.y),b=Math.abs(g.x-f.x),y=Math.abs(g.y-f.y);a=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:a,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===M||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:t}=this,{x:e,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity");let r=this.velocity.e,a=this.velocity.f;0!==n?(this.isBouncingX=!0,n*r<=0?r+=.14*n:(r=.14*n,e.min!==1/0&&(this.target.e=Math.max(t.e,e.min)),e.max!==1/0&&(this.target.e=Math.min(t.e,e.max))),o&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*a<=0?a+=.14*s:(a=.14*s,i.min!==1/0&&(this.target.f=Math.max(t.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(t.f,i.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=r),this.isBouncingY&&(this.velocity.f=a)}enable(){const{content:t}=this,e=new DOMMatrixReadOnly(window.getComputedStyle(t).transform);for(const t of v)this.current[t]=this.target[t]=e[t];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=m.Ready,this.emit
54("ready")}onClick(t){var e;"click"===t.type&&0===t.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(e=this.pointerTracker)||void 0===e||e.clear(),this.trackingPoints=[],this.startDecelAnim());const i=t.target;if(!i||t.defaultPrevented)return;if(i.hasAttribute("disabled"))return t.preventDefault(),void t.stopPropagation();if((()=>{const t=window.getSelection();return t&&"Range"===t.type})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,r=o&&x(o)?o.dataset:null;if(r){const e=r.panzoomChange,i=r.panzoomAction;if((e||i)&&t.preventDefault(),e){let i={};try{i=JSON.parse(e)}catch(t){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(i)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return t.preventDefault(),void t.stopPropagation();if(i.closest("[data-fancybox]"))return;const a=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(a.x-l.x)>2||Math.abs(a.y-l.y)>2))return;this.dragStart.time=0;const c=e=>{this.option("zoom",t)&&e&&"string"==typeof e&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&&"function"==typeof this[e]&&(t.preventDefault(),this[e]({event:t}))},h=this.option("click",t),u=this.option("dblClick",t);u?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",t),!t.defaultPrevented&&h&&c(h)):(this.emit("dblClick",t),t.defaultPrevented||c(u)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&&h&&c(h))}addTrackingPoint(t){const e=this.trackingPoints.filter((t=>t.time>Date.now()-100));e.push(t),this.trackingPoints=e}onPointerDown(t,e,i){var n;if(!1===this.option("touch",t))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===M&&this.targetScale>1)return t.preventDefault(),t.stopPropagation(),!1;const o=t.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)["A","BUTTON"].includes(o.nodeName)||t.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit("touchStart",t)),!0}onPointerMove(t,o,r){if(!1===this.option("touch",t))return;if(!this.isDragging)return;if(o.length<2&&this.panOnlyZoomed&&n(this.targetScale)<=n(this.minScale))return;if(this.emit("touchMove",t),t.defaultPrevented)return;this.addTrackingPoint(o[0]);const{content:a}=this,l=i(r[0],r[1]),c=i(o[0],o[1]);let h=0,u=0;if(o.length>1){const t=a.getBoundingClientRect();h=l.clientX-t.left-.5*t.width,u=l.clientY-t.top-.5*t.height}const d=e(r[0],r[1]),f=e(o[0],o[1]);let p=d?f/d:1,g=c.clientX-l.clientX,m=c.clientY-l.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=n(this.targetScale)===n(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void t.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=e>45&&e<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(s(t.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&n(this.targetScale)===n(this.minScale))return;t.cancelable&&t.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(p=Math.max(p,w)),y>
541.5*x&&(p=Math.min(p,x)),"y"===this.lockedAxis&&n(y)===n(w)&&(g=0),"x"===this.lockedAxis&&n(y)===n(w)&&(m=0),this.applyChange({originX:h,originY:u,panX:g,panY:m,scale:p,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(e),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),s(t.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==m.Destroy&&(t.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var t;const e=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of v)this.velocity[t]=0;this.target.e=this.current.e,this.target.f=this.current.f,_(this.container,"is-scaling"),_(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:i}=this,s=i[0],o=i[i.length-1];let r=0,a=0,l=0;o&&s&&(r=o.clientX-s.clientX,a=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&&(r*=c,a*=c);let h=0,u=0,d=0,f=0,p=this.option("decelFriction");const g=this.targetScale;if(l>0){d=Math.abs(r)>3?r/(l/30):0,f=Math.abs(a)>3?a/(l/30):0;const t=this.option("maxVelocity");t&&(d=Math.max(Math.min(d,t),-1*t),f=Math.max(Math.min(f,t),-1*t))}d&&(h=d/(1/(1-p)-1)),f&&(u=f/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&n(g)===this.minScale)&&(h=d=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&n(g)===this.minScale)&&(u=f=0);const m=this.dragOffset.x,b=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(b)<y&&(h=u=0,d=f=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||e&&!h&&!u)&&(p=.35),this.applyChange({panX:h,panY:u,friction:p}),this.emit("decel",d,f,m,b)}onWheel(t){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode===M)return;if(t.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&&!1!==this.option("zoom")&&this.zoomWithWheel(t)}onMouseMove(t){this.panWithMouse(t)}onKeydown(t){"Escape"===t.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:t,target:e,content:i,contentRect:s}=this,o=Object.assign({},P);for(const i of v){const s="e"==i||"f"===i?E:S;o[i]=n(t[i],s),Math.abs(e[i]-t[i])<("e"==i||"f"===i?.51:.001)&&(t[i]=e[i])}let{a:r,b:a,c:l,d:c,e:h,f:u}=o,d=`matrix(${r}, ${a}, ${l}, ${c}, ${h}, ${u})`,f=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===d)return;f.style.transform=d;const{contentWidth:p,contentHeight:g}=this.calculateContentDim();s.width=p,s.height=g,this.emit("afterTransform")}updateMetrics(t=!1){var e;if(!this||this.state===m.Destroy)return;if(this.isContentLoading)return;const i=Math.max(1,(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1),{container:s,content:o}=this,r=o instanceof HTMLImageElement,a=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=a.width*i,h=a.height*i;const u=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),d=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),f=h-u;this.containerRect={width:c,height:h,innerWidth:d,innerHeight:f};let p=this.option("width")||"auto",g=this.option("height")||"auto";"auto"===p&&(p=parseFloat(o.dataset.width||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth),e||0})(o)),"auto"===g&&(g=parseFloat(o.dataset.height||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight),e||0})(o));let v=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(v=v.parentElement||v);const b=v.getAttribute("style")||"";v.style.setProperty("transform","none","important"),r&&(v.style.width="",v.style.height=""),v.offsetHeight;const y=o.getBoundingClientRect();let w=y.width*i,x=y.height*i,_=0,T=0;r&&(Math.abs(p-w)>1||Math.abs(g-x)>1)&&({width:w,height:x,top:_,left:T}=((t,e,i,n)=>{const s=i/n;return s>t/e?(i=t,n=t/s):(i=e*s,n=e),{width:i,height:n,top:.5*(e-n),left:.5*(t-i)}})(w,x,p,g)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:y.top-a.top+_,bottom:a.bottom-y.bottom+_,left:y.left-a.left+T,right:a.right-y.right+T,fitWidth:w,fitHeight:x,width:w,height:x,fullWidth:p,fullHeight:g}),v.style.cssText=b,r&&(v.style.width=`${w}px`,v.style.height=`${x}
54px`),this.setTransform(),!0!==t&&this.emit("refresh"),this.ignoreBounds||(n(this.targetScale)<n(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===m.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:t,contentHeight:e}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:s}=this,{fitWidth:o,fitHeight:r}=this.contentRect;let a=0,l=0,c=0,h=0;const u=this.option("infinite");if(!0===u||s&&u===s)a=-1/0,c=1/0,l=-1/0,h=1/0;else{let{containerRect:s,contentRect:u}=this,d=n(o*i,E),f=n(r*i,E),{innerWidth:p,innerHeight:g}=s;if(s.width===d&&(p=s.width),s.width===f&&(g=s.height),t>p){c=.5*(t-p),a=-1*c;let e=.5*(u.right-u.left);a+=e,c+=e}if(o>p&&t<p&&(a-=.5*(o-p),c-=.5*(o-p)),e>g){h=.5*(e-g),l=-1*h;let t=.5*(u.bottom-u.top);l+=t,h+=t}r>g&&e<g&&(a-=.5*(r-g),c-=.5*(r-g))}return{x:{min:a,max:c},y:{min:l,max:h}}}getBounds(){const t=this.option("bounds");return"auto"!==t?t:this.calculateBounds()}updateControls(){const t=this,e=t.container,{panMode:i,contentRect:s,targetScale:o,minScale:r}=t;let l=r,c=t.option("click")||!1;c&&(l=t.getNextScale(c));let h=t.canZoomIn(),u=t.canZoomOut(),d=i===O&&!!this.option("touch"),f=u&&d;if(d&&(n(o)<n(r)&&!this.panOnlyZoomed&&(f=!0),(n(s.width,1)>n(s.fitWidth,1)||n(s.height,1)>n(s.fitHeight,1))&&(f=!0)),n(s.width*o,1)<n(s.fitWidth,1)&&(f=!1),i===M&&(f=!1),a(e,this.cn("isDraggable"),f),!this.option("zoom"))return;let p=h&&n(l)>n(o),g=!p&&!f&&u&&n(l)<n(o);a(e,this.cn("canZoomIn"),p),a(e,this.cn("canZoomOut"),g);for(const t of e.querySelectorAll("[data-panzoom-action]")){let e=!1,i=!1;switch(t.dataset.panzoomAction){case"zoomIn":h?e=!0:i=!0;break;case"zoomOut":u?e=!0:i=!0;break;case"toggleZoom":case"iterateZoom":h||u?e=!0:i=!0;const n=t.querySelector("g");n&&(n.style.display=h?"":"none")}e?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):i&&(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"))}}panTo({x:t=this.target.e,y:e=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:r=0,flipX:a=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==m.Destroy&&this.applyChange({panX:t-this.target.e,panY:e-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:r,friction:n,flipX:a,flipY:l,ignoreBounds:c})}applyChange({panX:t=0,panY:e=0,scale:i=1,angle:s=0,originX:o=-this.current.e,originY:r=-this.current.f,friction:a=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:h=!1,bounce:u=this.option("bounce")}){const d=this.state;if(d===m.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=a||0,this.ignoreBounds=h;const{current:f}=this,p=f.e,g=f.f,b=this.getMatrix(this.target);let y=(new DOMMatrix).translate(p,g).translate(o,r).translate(t,e);if(this.option("zoom")){if(!h){const t=this.targetScale,e=this.minScale,n=this.maxScale;t*i<e&&(i=e/t),t*i>n&&(i=n/t)}y=y.scale(i)}y=y.translate(-o,-r).translate(-p,-g).multiply(b),s&&(y=y.rotate(s)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(const t of v)"e"!==t&&"f"!==t&&(y[t]>this.minScale+1e-5||y[t]<this.minScale-1e-5)?this.target[t]=y[t]:this.target[t]=n(y[t],E);(this.targetScale<this.scale||Math.abs(i-1)>.1||this.panMode===M||!1===u)&&!h&&this.clampTargetBounds(),d===m.Init?this.animate():this.isResting||(this.state=m.Panning,this.requestTick())}stop(t=!1){if(this.state===m.Init||this.state===m.Destroy)return;const e=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of v)this.velocity[e]=0,"current"===t?this.current[e]=this.target[e]:"target"===t&&(this.target[e]=this.current[e]);this.setTransform(),_(this.container,"is-scaling"),_(this.container,"is-animating"),this.isTicking=!1,this.state=m.Ready,e&&(this.emit
54("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),T(this.container,"is-animating"),this.isScaling&&T(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(t,e=this.option("mouseMoveFriction")){if(this.pmme=t,this.panMode!==M||!t)return;if(n(this.targetScale)<=n(this.minScale))return;this.emit("mouseMove",t);const{container:i,containerRect:s,contentRect:o}=this,r=s.width,a=s.height,l=i.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top;let{contentWidth:u,contentHeight:d}=this.calculateContentDim(this.target);const f=this.option("mouseMoveFactor");f>1&&(u!==r&&(u*=f),d!==a&&(d*=f));let p=.5*(u-r)-c/r*100/100*(u-r);p+=.5*(o.right-o.left);let g=.5*(d-a)-h/a*100/100*(d-a);g+=.5*(o.bottom-o.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:e})}zoomWithWheel(t){if(this.state===m.Destroy||this.state===m.Init)return;const e=Date.now();if(e-this.pwt<45)return void t.preventDefault();this.pwt=e;var i=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const s=Math.max(-1,Math.min(1,i)),{targetScale:o,maxScale:r,minScale:a}=this;let l=o*(100+45*s)/100;n(l)<n(a)&&n(o)<=n(a)?(this.cwd+=Math.abs(s),l=a):n(l)>n(r)&&n(o)>=n(r)?(this.cwd+=Math.abs(s),l=r):(this.cwd=0,l=Math.max(Math.min(l,r),a)),this.cwd>this.option("wheelLimit")||(t.preventDefault(),n(l)!==n(o)&&this.zoomTo(l,{event:t}))}canZoomIn(){return this.option("zoom")&&(n(this.contentRect.width,1)<n(this.contentRect.fitWidth,1)||n(this.targetScale)<n(this.maxScale))}canZoomOut(){return this.option("zoom")&&n(this.targetScale)>n(this.minScale)}zoomIn(t=1.25,e){this.zoomTo(this.targetScale*t,e)}zoomOut(t=.8,e){this.zoomTo(this.targetScale*t,e)}zoomToFit(t){this.zoomTo("fit",t)}zoomToCover(t){this.zoomTo("cover",t)}zoomToFull(t){this.zoomTo("full",t)}zoomToMax(t){this.zoomTo("max",t)}toggleZoom(t){this.zoomTo(this.getNextScale("toggleZoom"),t)}toggleMax(t){this.zoomTo(this.getNextScale("toggleMax"),t)}toggleCover(t){this.zoomTo(this.getNextScale("toggleCover"),t)}iterateZoom(t){this.zoomTo("next",t)}zoomTo(t=1,{friction:e="auto",originX:i="auto",originY:n="auto",event:s}={}){if(this.isContentLoading||this.state===m.Destroy)return;const{targetScale:o,fullScale:r,maxScale:a,coverScale:l}=this;if(this.stop(),this.panMode===M&&(s=this.pmme||s),s||"auto"===i||"auto"===n){const t=this.content.getBoundingClientRect(),e=this.container.getBoundingClientRect(),o=s?s.clientX:e.left+.5*e.width,r=s?s.clientY:e.top+.5*e.height;i=o-t.left-.5*t.width,n=r-t.top-.5*t.height}let c=1;"number"==typeof t?c=t:"full"===t?c=r:"cover"===t?c=l:"max"===t?c=a:"fit"===t?c=1:"next"===t&&(c=this.getNextScale("iterateZoom")),c=c/o||1,e="auto"===e?c>1?.15:.25:e,this.applyChange({scale:c,originX:i,originY:n,friction:e}),s&&this.panMode===M&&this.panWithMouse(s,e)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHeight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:t}=this,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);const n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(t=this.current){const{a:e,b:i,c:n,d:s,e:o,f:r}=t;return new DOMMatrix([e,i,n,s,o,r])}reset(t){if(this.state!==m.Init&&this.state!==m.Destroy){this.stop("current");for(const t of v)this.target[t]=P[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=m.Panning,this.requestTick())}}destroy(){this.stop(),this.state=m.Destroy,this.detachEvents(),this.detachObserver();const{container:t,content:e}=this,i=this.option("classes")||{};for(const e of Object.values(i))t.classList.remove(e+"");e&&(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(R,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:b}),Object.defineProperty(R,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const z=function(t,e){let i=!0;return(...n)=>{i&&(i=!1,t(...n),setTimeout((()=>{i=!0}),e))}},L=(t,e)=>{let i=[];
54return t.childNodes.forEach((t=>{t.nodeType!==Node.ELEMENT_NODE||e&&!t.matches(e)||i.push(t)})),i},D={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var I;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready", 55t[t.Destroy=2]="Destroy"}(I||(I={}));const F=t=>{if("string"==typeof t||t instanceof HTMLElement)t={html:t};else{const e=t.thumb;void 0!==e&&("string"==typeof e&&(t.thumbSrc=e),e instanceof HTMLImageElement&&(t.thumbEl=e,t.thumbElSrc=e.src,t.thumbSrc=e.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},j=(t={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},t);class B extends p{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}const H={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2};class N extends B{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let t=this.list;if(!t){t=document.createElement("ul"),T(t,this.cn("list")),t.setAttribute("role","tablist");const e=this.instance.container;e.appendChild(t),T(e,this.cn("hasDots")),this.list=t}return t}refresh(){var t;const e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(e<i||e>n)return void this.cleanup();const o="number"==typeof s&&e>5&&e>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&&this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(let t=0;t<e;t++)l.append(this.createItem(t));let c,h=0;for(const e of[...l.children]){const i=h===this.instance.page;i&&(c=e),a(e,this.cn("isCurrent"),i),null===(t=e.children[0])||void 0===t||t.setAttribute("aria-selected",i?"true":"false");for(const t of["isBeforePrev","isPrev","isNext","isAfterNext"])_(e,this.cn(t));h++}if(c=c||l.firstChild,o&&c){const t=c.previousElementSibling,e=t&&t.previousElementSibling;T(t,this.cn("isPrev")),T(e,this.cn("isBeforePrev"));const i=c.nextElementSibling,n=i&&i.nextElementSibling;T(i,this.cn("isNext")),T(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(t=0){var e;const i=document.createElement("li");i.setAttribute("role","presentation");const n=o(this.instance.localize(this.option("dotTpl"),[["%d",t+1]]).replace(/\%i/g,t+""));return i.appendChild(n),null===(e=i.children[0])||void 0===e||e.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,_(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(N,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:H});const X="disabled",Y="next",$="prev";class W extends B{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){const t=this.instance,e=t.pages.length,i=t.page;if(e<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute(X),s.removeAttribute(X),t.isInfinite||(i<=0&&n.setAttribute(X,""),i>=e-1&&s.setAttribute(X,"")))}addBtn(t){var e;const i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${t.toUpperCase()}}}`)),T(n,this.cn("button")+" "+this.cn(t===Y?"isNext":"isPrev"));const s=i.isRTL?t===Y?$:Y:t;var o;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${o=t,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""}`]="true",null===(e=this.container)||void 0===e||e.appendChild(n),n}build(){const t=this.instance.container,e=this.cn("container");let{container:i,prev:n,next:s}=this;i||(i=t.querySelector("."+e),this.isDom=!!i),i||(i=document.createElement("div"),T(i,e),t.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(Y)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn($)),this.prev=n}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(W,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
55',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class q extends B{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(t){this.target=this.instance,this.nav=t,this.attachEvents()}addAsNavFor(t){this.nav=this.instance,this.target=t,this.attachEvents()}attachEvents(){const{nav:t,target:e}=this;t&&e&&(t.options.initialSlide=e.options.initialPage,t.state===I.Ready?this.onNavReady(t):t.on("ready",this.onNavReady),e.state===I.Ready?this.onTargetReady(e):e.on("ready",this.onTargetReady))}onNavReady(t){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(t){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(t,e,i){this.onNavTouch(t,t.panzoom,i)}onNavTouch(t,e,i){var n,s;if(Math.abs(e.dragOffset.x)>3||Math.abs(e.dragOffset.y)>3)return;const o=i.target,{nav:r,target:a}=this;if(!r||!a||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=a.getPageForSlide(c),u=r.getPageForSlide(c);r.slideTo(u),a.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){var t,e;const{target:i,nav:n}=this;if(!i||!n)return;if(n.state!==I.Ready||i.state!==I.Ready)return;const s=null===(e=null===(t=i.pages[i.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(t){const e=this.nav;e&&e.state===I.Ready&&(this.selectedIndex=t,[...e.slides].map((e=>{e.el&&e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}attach(){const t=this;let e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&&t.addAsTargetFor(i)}detach(){const t=this,e=t.nav,i=t.target;e&&(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&&(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}Object.defineProperty(q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const V={Navigation:W,Dots:N,Sync:q},Z="animationend",U="isSelected",G="slide";class K extends g{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===I.Ready}get isInfinite(){let t=!1;const{contentDim:e,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&e+o.dim>=i&&(t=this.option("infinite")),t}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(t,e={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:I.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&&(t=document.querySelector(t)),!t||!x(t))throw new Error("No Element found");this.container=t,this.slideNext=z(this.slideNext.bind(this),150),this.slidePrev=z(this.slidePrev.bind(this),150),this.userOptions=e,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){var t,e;const i=d({},K.defaults,this.userOptions);let n="";const s=i.breakpoints;if(s&&u(s))for(const[t,e]of Object.entries(s))window.matchMedia(t).matches&&u(e)&&(n+=t,d(i,e));n===this.bp&&this.state!==I.Init||(this.bp=n,this.state===I.Ready&&(i.initialSlide=(null===(e=null===(t=this.pages[this.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index)||0),this.state!==I.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}
55init(){this.state=I.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},K.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=I.Ready,this.emit("ready")}initLayout(){const{container:t}=this,e=this.option("classes");T(t,this.cn("container")),a(t,e.isLTR,!this.isRTL),a(t,e.isRTL,this.isRTL),a(t,e.isVertical,!this.isHorizontal),a(t,e.isHorizontal,this.isHorizontal);let i=this.option("viewport")||t.querySelector(`.${e.viewport}`);i||(i=document.createElement("div"),T(i,e.viewport),i.append(...L(t,`.${e.slide}`)),t.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||t.querySelector(`.${e.track}`);n||(n=document.createElement("div"),T(n,e.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:t}=this;if(!t)return;const e=[...this.slides],i=[];[...L(t,`.${this.cn(G)}`)].forEach((t=>{if(x(t)){const e=F({el:t,isDom:!0,index:this.slides.length});i.push(e)}}));for(let t of[...this.option("slides",[])||[],...e])i.push(F(t));this.slides=i;for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;
55for(const t of i)this.emit("beforeInitSlide",t,t.index),this.emit("initSlide",t,t.index);this.emit("initSlides")}setInitialPage(){const t=this.option("initialSlide");this.page="number"==typeof t?this.getPageForSlide(t):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:t,pages:e,isHorizontal:i}=this;if(!t||!e.length)return;let n=this.page;e[n]||(this.page=n=0);const s=(e[n].pos||0)*(this.isRTL&&i?1:-1),o=i?`${s}px`:"0",r=i?"0":`${s}px`;t.style.transform=`translate3d(${o}, ${r}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const t=this.option("Panzoom")||{};this.panzoom=new R(this.viewport,d({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:t=>!(this.pages.length<2&&!t.options.infinite),bounds:()=>this.getBounds(),maxVelocity:t=>Math.abs(t.target[this.axis]-t.current[this.axis])<2*this.viewportDim?100:0},t)),this.panzoom.on("*",((t,e,...i)=>{this.emit(`Panzoom.${e}`,t,...i)})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const t=this.container;t&&(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let t=[];const{contentDim:e,viewportDim:i}=this;let n=this.option("slidesPerPage");n=("auto"===n||e<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,r=0;for(const e of this.slides)(!t.length||o+e.dim-i>.05||r>=n)&&(t.push(j()),s=t.length-1,o=0,r=0),t[s].slides.push(e),o+=e.dim+e.gap,r++;return t}processPages(){const t=this.pages,{contentDim:e,viewportDim:i,isInfinite:s}=this,o=this.option("center"),r=this.option("fill"),a=r&&o&&e>i&&!s;if(t.forEach(((t,n)=>{var s;t.index=n,t.pos=(null===(s=t.slides[0])||void 0===s?void 0:s.pos)||0,t.dim=0;for(const[e,i]of t.slides.entries())t.dim+=i.dim,e<t.slides.length-1&&(t.dim+=i.gap);a&&t.pos+.5*t.dim<.5*i?t.pos=0:a&&t.pos+.5*t.dim>=e-.5*i?t.pos=e-i:o&&(t.pos+=-.5*(i-t.dim))})),t.forEach((t=>{r&&!s&&e>i&&(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,e-i)),t.pos=n(t.pos,1e3),t.dim=n(t.dim,1e3),Math.abs(t.pos)<=.1&&(t.pos=0)})),s)return t;const l=[];let c;return t.forEach((t=>{const e=Object.assign({},t);c&&e.pos===c.pos?(c.dim+=e.dim,c.slides=[...c.slides,...e.slides]):(e.index=l.length,c=e,l.push(e))})),l}getPageFromIndex(t=0){const e=this.pages.length;let i;return t=parseInt((t||0).toString())||0,i=this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0),i}getSlideMetrics(t){var e,i;const s=this.isHorizontal?"width":"height";let o=0,r=0,a=t.el;const l=!(!a||a.parentNode);if(a?o=parseFloat(a.dataset[s]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",(this.track||document.body).prepend(a)),T(a,this.cn(G)+" "+t.class+" "+t.customClass),o)a.style[s]=`${o}px`,a.style["width"===s?"height":"width"]="";else{l&&(this.track||document.body).prepend(a),o=a.getBoundingClientRect()[s]*Math.max(1,(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1);let t=a[this.isHorizontal?"offsetWidth":"offsetHeight"];t-1>o&&(o=t)}const c=getComputedStyle(a);return"content-box"===c.boxSizing&&(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),r=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(i=a.parentElement)||void 0===i||i.removeChild(a):t.el||a.remove(),{dim:n(o,1e3),gap:n(r,1e3)}}getBounds(){const{isInfinite:t,isRTL:e,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(t)s={min:-1/0,max:1/0};else if(n.length){const t=n[0].pos,o=n[n.length-1].pos;s=e&&i?{min:t,max:o}:{min:-1*o,max:-1*t}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let t,{isHorizontal:e,isRTL:i,isInfinite:s,viewport:o,viewportDim:r,contentDim:a,page:l,pages:c,slides:h,panzoom:u}=this,d=0,f=0,p=0,g=0;u?g=-1*u.current[this.axis]:c[l]&&(g=c[l].pos||0),t=e?i?"right":"left":"top",i&&e&&(g*=-1);for(const e of h){const i=e.el;i?("top"===t?(i.style.right="",i.style.left=""):i.style.top="",e.index!==d?i.style[t]=0===f?"":`${n(f,1e3)}px`:i.style[t]="",p+=e.dim+e.gap,d++):f+=e.dim+e.gap}if(s&&p&&o){let i=getComputedStyle(o),s="padding",l=e?"Right":"Bottom",c=parseFloat(i[s+(e?"Left":"Top")]);g-=c,r+=c,r+=parseFloat(i[s+l]);for(const e of h)e.el&&(n(e.pos)<n(r)&&n(e.pos+e.dim+e.gap)<n(g)&&n(g)>n(a-r)&&(e.el.style[t]=`${n(f+p,1e3)}px`),n(e.pos+e.gap)>=n(a-r)&&n(e.pos)>n(g+r)&&n(g)<n(r)&&(e.el.style[t]=`-${n(p,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let e=0;for(const i of h)i.el?this.inTransition.has(i.index)&&m.slides.indexOf(i)<0&&(i.el.style[t]=`${n(e+(m.pos-v.pos),1e3)}px`):e+=i.dim+i.gap}}createSlideEl(t){const{track:e,slides:i}=this;if(!e||!t)return;if(t.el&&t.el.parentNode)return;const n=t.el||document.createElement("div");T(n,this.cn(G)),T(n,t.class),T(n,t.customClass);const s=t.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=t.html+"");const o=[];
55i.forEach(((t,e)=>{t.el&&o.push(e)}));const r=t.index;let a=null;o.length&&(a=i[o.reduce(((t,e)=>Math.abs(e-r)<Math.abs(t-r)?e:t))]);const l=a&&a.el&&a.el.parentNode?a.index<t.index?a.el.nextSibling:a.el:null;e.insertBefore(n,e.contains(l)?l:null),t.el=n,this.emit("createSlide",t)}removeSlideEl(t,e=!1){const i=null==t?void 0:t.el;if(!i||!i.parentNode)return;const n=this.cn(U);if(i.classList.contains(n)&&(_(i,n),this.emit("unselectSlide",t)),t.isDom&&!e)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",t);const s=new CustomEvent(Z);i.dispatchEvent(s),t.el&&(t.el.remove(),t.el=null)}transitionTo(t=0,e=this.option("transition")){var i,n,s,o;if(!e)return!1;const r=this.page,{pages:a,panzoom:l}=this;t=parseInt((t||0).toString())||0;const c=this.getPageFromIndex(t);if(!l||!a[c]||a.length<2||Math.abs(((null===(n=null===(i=a[r])||void 0===i?void 0:i.slides[0])||void 0===n?void 0:n.dim)||0)-this.viewportDim)>1)return!1;const h=t>r?1:-1,u=a[c].pos*(this.isRTL?1:-1);if(r===c&&Math.abs(u-l.target[this.axis])<1)return!1;this.clearTransitions();const d=l.isResting;T(this.container,this.cn("inTransition"));const f=(null===(s=a[r])||void 0===s?void 0:s.slides[0])||null,p=(null===(o=a[c])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(p.index),this.createSlideEl(p);let g=f.el,m=p.el;d||e===G||(e="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(f.index),f.transition=e,g.addEventListener(Z,this.onAnimationEnd),g.classList.add(`f-${e}Out`,`to-${h>0?b:v}`)),m&&(p.transition=e,m.addEventListener(Z,this.onAnimationEnd),m.classList.add(`f-${e}In`,`from-${h>0?v:b}`)),l.current[this.axis]=u,l.target[this.axis]=u,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?t.add(n):e.add(n);for(const e of this.inTransition)t.add(this.slides[e]);for(const e of t)this.createSlideEl(e),this.lazyLoadSlide(e);for(const i of e)t.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const t="aria-hidden";let e=this.cn(U);if(e)for(const i of this.slides){const n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(t):n.setAttribute(t,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(e)||(T(n,e),this.emit("selectSlide",i)),n.removeAttribute(t)):(n.classList.contains(e)&&(_(n,e),this.emit("unselectSlide",i)),n.setAttribute(t,"true")))}}flipInfiniteTrack(){const{axis:t,isHorizontal:e,isInfinite:i,isRTL:n,viewportDim:s,contentDim:o}=this,r=this.panzoom;if(!r||!i)return;let a=r.current[t],l=r.target[t]-a,c=0,h=.5*s;n&&e?(a<-h&&(c=-1,a+=o),a>o-h&&(c=1,a-=o)):(a>h&&(c=1,a-=o),a<-o+h&&(c=-1,a+=o)),c&&(r.current[t]=a,r.target[t]=a+l)}lazyLoadImg(t,e){const i=this,n="f-fadeIn",s="is-preloading";let r=!1,a=null;const l=()=>{r||(r=!0,a&&(a.remove(),a=null),_(e,s),e.complete&&(T(e,n),setTimeout((()=>{_(e,n)}),350)),this.option("adaptiveHeight")&&t.el&&this.pages[this.page].slides.indexOf(t)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",t))};T(e,s),e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.addEventListener("error",(()=>{l()})),e.addEventListener("load",(()=>{l()})),setTimeout((()=>{const i=e.parentNode;i&&t.el&&(e.complete?l():r||(a=o(w),i.insertBefore(a,e)))}),300)}lazyLoadSlide(t){const e=t&&t.el;if(!e)return;const i=new Set;let n=Array.from(e.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));e.dataset.lazySrc&&n.push(e),n.map((t=>{t instanceof HTMLImageElement?i.add(t):t instanceof HTMLElement&&t.dataset.lazySrc&&(t.style.backgroundImage=`url('${t.dataset.lazySrc}')`,delete t.dataset.lazySrc)}));for(const e of i)this.lazyLoadImg(t,e)}onAnimationEnd(t){var e;const i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(!i||!s||!o)return;const r=!!this.inTransition.has(n)&&s.transition;r&&o.substring(0,r.length+2)===`f-${r}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&&this.emit
55("settle")}onDecel(t,e=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:o,isHorizontal:r,axis:a,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180));let u=0;if(u=h>45&&h<135?r?0:i:r?e:0,!c)return;let d=this.page,f=o&&r?1:-1;const p=t.current[a]*f;let{pageIndex:g}=this.getPageFromPosition(p);Math.abs(u)>5?(l[d].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(d=g),d=o&&r?u<0?d-1:d+1:u<0?d+1:d-1):d=0===n&&0===s?d:g,this.slideTo(d,{transition:!1,friction:t.option("decelFriction")})}onClick(t){const e=t.target,i=e&&x(e)?e.dataset:null;let n,s;i&&(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&&(s="slidePrev")),s?(t.preventDefault(),t.stopPropagation(),e&&!e.hasAttribute("disabled")&&this[s](n)):this.emit("click",t)}onSlideTo(t){const e=t.detail||0;this.slideTo(this.getPageForSlide(e),{friction:0})}onChange(t,e=0){const i=this.page;this.prevPage=i,this.page=t,this.option("adaptiveHeight")&&this.setViewportHeight(),t!==i&&(this.markSelectedSlides(),this.emit("change",t,i,e))}onRefresh(){let t=this.contentDim,e=this.viewportDim;this.updateMetrics(),this.contentDim===t&&this.viewportDim===e||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var t;null===(t=this.viewport)||void 0===t||t.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(t){this.lp!==t.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=t.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(t=null,e=null){this.destroy(),this.state=I.Init,this.prevPage=null,this.userOptions=t||this.userOptions,this.userPlugins=e||this.userPlugins,this.processOptions()}slideTo(t=0,{friction:e=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===I.Destroy)return;t=parseInt((t||0).toString())||0;const n=this.getPageFromIndex(t),{axis:s,isHorizontal:o,isRTL:r,pages:a,panzoom:l}=this,c=a.length,h=r&&o?1:-1;if(!l||!c)return;if(this.page!==n){const e=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",e,t),e.defaultPrevented)return}if(this.transitionTo(t,i))return;let u=a[n].pos;if(this.isInfinite){const e=this.contentDim,i=l.target[s]*h;2===c?u+=e*Math.floor(parseFloat(t+"")/2):u=[u,u-e,u+e].reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t}))}u*=h,Math.abs(l.target[s]-u)<1||(l.panTo({x:o?u:0,y:o?0:u,friction:e}),this.onChange(n))}slideToClosest(t){if(this.panzoom){const{pageIndex:e}=this.getPageFromPosition();this.slideTo(e,t)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),_(this.container,this.cn("inTransition"));const t=["to-prev","to-next","from-prev","from-next"];for(const e of this.slides){const i=e.el;if(i){i.removeEventListener(Z,this.onAnimationEnd),i.classList.remove(...t);const n=e.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(t,e){var i,n,s,o;const r=this.panzoom,a=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,l=(null===(n=this.pages[this.page])||void 0===n?void 0:n.dim)||0,c=this.contentDim<this.viewportDim;let h=Array.isArray(e)?e:[e];const u=[];for(const t of h)u.push(F(t));this.slides.splice(t,0,...u);for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;for(const t of u)this.emit("beforeInitSlide",t,t.index);if(this.page>=t&&(this.page+=u.length),this.updateMetrics(),r){const e=(null===(s=this.pages[this.page])||void 0===s?void 0:s.pos)||0,i=(null===(o=this.pages[this.page])||void 0===o?void 0:o.dim)||0,n=this.pages.length||1,h=this.isRTL?l-i:i-l,u=this.isRTL?a-e:e-a;c&&1===n?(t<=this.page&&(r.current[this.axis]-=h,r.target[this.axis]-=h),r.panTo({[this.isHorizontal?"x":"y"]:-1*e})):u&&t<=this.page&&(r.target[this.axis]-=u,r.current[this.axis]-=u,r.requestTick())}for(const t of u)this.emit("initSlide",t,t.index)}prependSlide(t){this.addSlide(0,t)}appendSlide(t){this.addSlide(this.slides.length,t)}removeSlide(t){const e=this.slides.length;t=(t%e+e)%e;const i=this.slides[t];
55if(i){this.removeSlideEl(i,!0),this.slides.splice(t,1);for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}),this.emit("destroySlide",i)}}updateMetrics(){const{panzoom:t,viewport:e,track:i,slides:s,isHorizontal:o,isInfinite:r}=this;if(!i)return;const a=o?"width":"height",l=o?"offsetWidth":"offsetHeight";if(e){let t=Math.max(e[l],n(e.getBoundingClientRect()[a],1e3)),i=getComputedStyle(e),s="padding",r=o?"Right":"Bottom";t-=parseFloat(i[s+(o?"Left":"Top")])+parseFloat(i[s+r]),this.viewportDim=t}let c,h=0;for(const[t,e]of s.entries()){let i=0,o=0;!e.el&&c?(i=c.dim,o=c.gap):(({dim:i,gap:o}=this.getSlideMetrics(e)),c=e),i=n(i,1e3),o=n(o,1e3),e.dim=i,e.gap=o,e.pos=h,h+=i,(r||t<s.length-1)&&(h+=o)}h=n(h,1e3),this.contentDim=h,t&&(t.contentRect[a]=h,t.contentRect[o?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===I.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(t,e=!1,i=!1){void 0===t&&(t=this.page);const s=this,o=s.panzoom,r=s.contentDim,a=s.pages[t]||0;if(!a||!o)return t>this.page?-1:1;let l=-1*o.current.e,c=n((l-a.pos)/(1*a.dim),1e3),h=c,u=c;this.isInfinite&&!0!==i&&(h=n((l-a.pos+r)/(1*a.dim),1e3),u=n((l-a.pos-r)/(1*a.dim),1e3));let d=[c,h,u].reduce((function(t,e){return Math.abs(e)<Math.abs(t)?e:t}));return e?d:d>1?1:d<-1?-1:d}setViewportHeight(){const{page:t,pages:e,viewport:i,isHorizontal:n}=this;if(!i||!e[t])return;let s=0;n&&this.track&&(this.track.style.height="auto",e[t].slides.forEach((t=>{t.el&&(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide(t){for(const e of this.pages)for(const i of e.slides)if(i.index===t)return e.index;return-1}getVisibleSlides(t=0){var e;const i=new Set;let{panzoom:n,contentDim:s,viewportDim:o,pages:r,page:a}=this;if(o){s=s+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;let l=0;l=n&&n.state!==m.Init&&n.state!==m.Destroy?-1*n.current[this.axis]:r[a]&&r[a].pos||0,this.isInfinite&&(l-=Math.floor(l/s)*s),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-o*t,h=l+o*(t+1),u=this.isInfinite?[-1,0,1]:[0];for(const t of this.slides)for(const e of u){const n=t.pos+e*s,o=n+t.dim+t.gap;n<h&&o>c&&i.add(t)}}return i}getPageFromPosition(t){const{viewportDim:e,contentDim:i,slides:n,pages:s,panzoom:o}=this,r=s.length,a=n.length,l=n[0],c=n[a-1],h=this.option("center");let u=0,d=0,f=0,p=void 0===t?-1*((null==o?void 0:o.target[this.axis])||0):t;h&&(p+=.5*e),this.isInfinite?(p<l.pos-.5*c.gap&&(p-=i,f=-1),p>c.pos+c.dim+.5*c.gap&&(p-=i,f=1)):p=Math.max(l.pos||0,Math.min(p,c.pos));let g=c,m=n.find((t=>{const e=t.pos-.5*g.gap,i=t.pos+t.dim+.5*t.gap;return g=t,p>=e&&p<i}));return m||(m=c),d=this.getPageForSlide(m.index),u=d+f*r,{page:u,pageIndex:d}}setPageFromPosition(){const{pageIndex:t}=this.getPageFromPosition();this.onChange(t)}destroy(){if([I.Destroy].includes(this.state))return;this.state=I.Destroy;const{container:t,viewport:e,track:i,slides:n,panzoom:s}=this,o=this.option("classes");t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach((t=>{this.removeSlideEl(t)})),this.detachPlugins(),e&&(e.removeEventListener("scroll",this.onScroll),e.offsetParent&&i&&i.offsetParent&&e.replaceWith(...i.childNodes));for(const[e,i]of Object.entries(o))"container"!==e&&i&&t.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const r=this.events.get("ready");this.events=new Map,r&&this.events.set("ready",r)}}Object.defineProperty(K,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:R}),Object.defineProperty(K,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(K,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:V}),t.Carousel=K,t.Panzoom=R})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,...i)=>{const n=i.length;for(let s=0;s<n;s++){const n=i[s]||{};
55Object.entries(n).forEach((([i,n])=>{const s=Array.isArray(n)?[]:{};var o;t[i]||Object.assign(t,{[i]:s}),"object"==typeof(o=n)&&null!==o&&o.constructor===Object&&"[object Object]"===Object.prototype.toString.call(o)?Object.assign(t[i],e(s,n)):Array.isArray(n)?Object.assign(t,{[i]:[...n]}):Object.assign(t,{[i]:n})}))}return t},i=t=>`${t||""}`.split(" ").filter((t=>!!t)),n=(t,e)=>{t&&i(e).forEach((e=>{t.classList.add(e)}))},s=(t,e)=>{t&&i(e).forEach((e=>{t.classList.remove(e)}))},o=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class r{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?e({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=o(t,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=o(e,t);var r;"string"!=typeof(r=s)||isNaN(r)||isNaN(parseFloat(r))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,t,...n));let a=o(e,this.options);return a&&"function"==typeof a?s=a.call(this,this,t,...n,s):void 0===s&&(s=a),void 0===s?i:s}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=>{let n="" 56;return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;i<e.length;i++)t=t.split(e[i][0]).join(e[i][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),this.events||(this.events=new Map),i.forEac
56h((t=>{let i=this.events.get(t);i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),i.forEach((t=>{const i=this.events.get(t);if(Array.isArray(i)){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(r,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.33"}),Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class a extends r{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}var l,c;!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(l||(l={})),function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(c||(c={}));const h=(t,e=1e4)=>(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),u={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};t.States=void 0,function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"}(t.States||(t.States={}));const d="isResting",f="thumbWidth",p="thumbHeight",g="thumbClipWidth";class m extends a{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:t.States.Init})}get isModern(){return"modern"===this.type}onInitSlide(t,e){const i=e.el?e.el.dataset:void 0;i&&(e.thumbSrc=i.thumbSrc||e.thumbSrc||"",e[g]=parseFloat(i[g]||"")||e[g]||0,e[p]=parseFloat(i.thumbHeight||"")||e[p]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var t;if(!this.isModern)return;const e=this.container,n=this.instance,o=n.panzoom,r=this.carousel,a=r?r.panzoom:null,l=n.page;if(o&&r&&a){if(o.isDragging){s(e,this.cn(d));let i=(null===(t=r.pages[l])||void 0===t?void 0:t.pos)||0;i+=n.getProgress(l)*(this[g]+this.thumbGap);let o=a.getBounds();-1*i>o.x.min&&-1*i<o.x.max&&a.panTo({x:-1*i,friction:.12})}else c=e,h=this.cn(d),u=o.isResting,c&&i(h).forEach((t=>{c.classList.toggle(t,u||!1)}));var c,h,u;this.shiftModern()}}onRefresh(){this.updateProps();for(const t of this.instance.slides||[])this.resizeModernSlide(t);this.shiftModern()}isDisabled(){const t=this.option("minCount")||0;if(t){const e=this.instance;let i=0;for(const t of e.slides||[])t.thumbSrc&&i++;if(i<t)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)<0}getThumb(t){const e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(t){const e=this.carousel;e&&e.addSlide(t.index,this.getThumb(t))}getSlides(){const t=[];for(const e of this.instance.slides||[])t.push(this.getThumb(e));return t}resizeModernSlide(t){this.isModern&&(t[f]=t[g]&&t[p]?Math.round(this[p]*(t[g]/t[p])):this[f])}updateProps(){const t=this.container;if(!t)return;const e=e=>parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+e))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[f]=e("width")||40,this[g]=e("clip-width")||40,this[p]=e("height")||40}build(){const i=this;if(i.state!==t.States.Init)return;if(i.isDisabled())return void i.emit("disabled");const s=i.instance,o=s.container,r=i.getSlides(),a=i.option("type");i.type=a;const l=i.option("parentEl"),c=i.cn("container"),h=i.cn("track");let u=null==l?void 0:l.querySelector("."+c);u||(u=document.createElement("div"),n(u,c),l?l.appendChild(u):o.after(u)),n(u,`is-${a}`),n(o,i.cn("hasThumbs")),i.container=u,i.updateProps();let d=u.querySelector("."+h);d||(d=document.createElement("div"),n(d,i.cn("track")),u.appendChild(d)),i.track=d;const f=e({},{track:d,infinite:!1,center:!0,fill:"classic"===a,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},i.option("Carousel")||{},{Sync:{target:s},slides:r}),p=new s.constructor(u,f);p.on("createSlide",((t,e)=>{i.setProps(e.index),i.emit("createSlide",e,e.el)})),p.on("ready",(()=>{i.shiftModern(),i.emit("ready")})),p.on("refresh",(()=>{i.shiftModern()})),p.on("Panzoom.click",((t,e,n)=>{i.onClick(n)})),i.carousel=p,i.state=t.States.Ready}onClick(t){t.preventDefault(),t.stopPropagation();const e=this.instance,{pages:i,page:n}=e,s=t=>{if(t){const e=t.closest("[data-carousel-index]");if(e)return[parseInt(e.dataset.carouselIndex||"",10)||0,e]}return[-1,void 0]},o=(t,e)=>{const i=document.elementFromPoint(t,e);return i?s(i):[-1,void 0]};let[r,a]=s(t.target);if(r>-1)return;const l=this[g],c=t.clientX,h=t.clientY;let[u,d]=o(c-l,h),[f,p]=o(c+l,h);d&&p?(r=Math.abs(c-d.getBoundingClientRect().right)<Math.abs(c-p.getBoundingClientRect().left)?u:f,r===n&&(r=r===u?f:u)):d?r=u:p&&(r=f),r>-1&&i[r]&&e.slideTo(r)}getShift(t){var e;const i=this,{instance:n}=i,s=i.carousel;if(!n||!s)return 0;const o=i[f],r=i[g],a=i.thumbGap,l=i.thumbExtraGap;if(!(null===(e=s.slides[t])||void 0===e?void 0:e.el))return 0;const c=.5*(o-r),h=n.pages.length-1;let u=n.getProgress(0),d=n.getProgress(h),p=n.getProgress(t,!1,!0),m=0,v=c+l+a;const b=u<0&&u>-1,y=d>0&&d<1;return 0===t?(m=v*Math.abs(u),y&&1===u&&(m-=v*Math.abs(d))):t===h?(m=v*Math.abs(d)*-1,b&&-1===d&&(m+=v*Math.abs(u))):b||y?(m=-1*v,m+=v*Math.abs(u),m+=v*(1-Math.abs(d))):m=v*p,m}setProps(t){var e;const i=this;if(!i.isModern)return;const{instance:n}=i,s=i.carousel;if(n&&s){const o=null===(e=s.slides[t])||void 0===e?void 0:e.el;if(o&&o.childNodes.length){let e=h(1-Math.abs(n.getProgress(t))),s=h(i.get
56Shift(t));o.style.setProperty("--progress",e?e+"":""),o.style.setProperty("--shift",s+"")}}}shiftModern(){const t=this;if(!t.isModern)return;const{instance:e,track:i}=t,n=e.panzoom,s=t.carousel;if(!(e&&i&&n&&s))return;if(n.state===l.Init||n.state===l.Destroy)return;for(const i of e.slides)t.setProps(i.index);let o=(t[g]+t.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}cleanup(){const e=this;e.carousel&&e.carousel.destroy(),e.carousel=null,e.container&&e.container.remove(),e.container=null,e.track&&e.track.remove(),e.track=null,e.state=t.States.Init,s(e.instance.container,e.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===c.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}}Object.defineProperty(m,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:u}),t.Thumbs=m,t.defaultOptions=u})); 57//# sourceMappingURL=plugins.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.