(function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.VueWinWheel={},_.Vue))})(this,function(exports,vue){"use strict";const _imports_0="data:image/png;base64,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";function _assertThisInitialized(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function _inheritsLoose(_,e){_.prototype=Object.create(e.prototype),_.prototype.constructor=_,_.__proto__=e}/*! * GSAP 3.12.2 * https://greensock.com * * @license Copyright 2008-2023, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function(e){return typeof e=="string"},_isFunction=function(e){return typeof e=="function"},_isNumber=function(e){return typeof e=="number"},_isUndefined=function(e){return typeof e>"u"},_isObject=function(e){return typeof e=="object"},_isNotFalse=function(e){return e!==!1},_windowExists$1=function(){return typeof window<"u"},_isFuncOrString=function(e){return _isFunction(e)||_isString(e)},_isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function(e){return(_installScope=_merge(e,_globals))&&gsap},_missingPlugin=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},_warn=function(e,t){return!t&&console.warn(e)},_addGlobal=function(e,t){return e&&(_globals[e]=t)&&_installScope&&(_installScope[e]=t)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function(e){var t=e[0],i,n;if(_isObject(t)||_isFunction(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=_harnessPlugins.length;n--&&!_harnessPlugins[n].targetTest(t););i=_harnessPlugins[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new GSCache(e[n],i)))||e.splice(n,1);return e},_getCache=function(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function(e,t,i){return(i=e[t])&&_isFunction(i)?e[t]():_isUndefined(i)&&e.getAttribute&&e.getAttribute(t)||i},_forEachName=function(e,t){return(e=e.split(",")).forEach(t)||e},_round=function(e){return Math.round(e*1e5)/1e5||0},_roundPrecise=function(e){return Math.round(e*1e7)/1e7||0},_parseRelative=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+n:i==="-"?e-n:i==="*"?e*n:e/n},_arrayContainsAny=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++na;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e,t},_removeLinkedListItem=function(e,t,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var r=t._prev,s=t._next;r?r._next=s:e[i]===t&&(e[i]=s),s?s._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},_removeFromParent=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},_recacheAncestors=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},_rewindStartAt=function(e,t,i,n){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},_hasNoPausedAncestors=function _(e){return!e||e._ts&&_(e.parent)},_elapsedCycleDuration=function(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},_parentToChildTotalTime=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},_setEnd=function(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),_setEnd(e),i._dirty||_uncache(i,e)),e},_postAddChecks=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start_tinyNum)&&t.render(i,!0)),_uncache(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-_tinyNum}},_addToTimeline=function(e,t,i,n){return t.parent&&_removeFromParent(t),t._start=_roundPrecise((_isNumber(i)?i:i||e!==_globalTimeline?_parsePosition(e,i,t):e._time)+t._delay),t._end=_roundPrecise(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_addLinkedListItem(e,t,"_first","_last",e._sort?"_start":0),_isFromOrFromStart(t)||(e._recent=t),n||_postAddChecks(e,t),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function(e,t){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",t))&&_globals.ScrollTrigger.create(t,e)},_attemptInitTween=function(e,t,i,n,r){if(_initTween(e,t,r),!e._initted)return 1;if(!i&&e._pt&&!_reverting$1&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame)return _lazyTweens.push(e),e._lazy=[r,n],1},_parentPlayheadIsBeforeStart=function _(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||_(t))},_isFromOrFromStart=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},_renderZeroDurationTween=function(e,t,i,n){var r=e.ratio,s=t<0||!t&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&!(!e._initted&&_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,a=e._rDelay,o=0,l,u,h;if(a&&e._repeat&&(o=_clamp(0,e._tDur,t),u=_animationCycle(o,a),e._yoyo&&u&1&&(s=1-s),u!==_animationCycle(e._tTime,a)&&(r=1-s,e.vars.repeatRefresh&&e._initted&&e.invalidate())),s!==r||_reverting$1||n||e._zTime===_tinyNum||!t&&e._zTime){if(!e._initted&&_attemptInitTween(e,t,n,i,o))return;for(h=e._zTime,e._zTime=t||(i?_tinyNum:0),i||(i=t&&!h),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=o,l=e._pt;l;)l.r(s,l.d),l=l._next;t<0&&_rewindStartAt(e,t,i,!0),e._onUpdate&&!i&&_callback(e,"onUpdate"),o&&e._repeat&&!i&&e.parent&&_callback(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(s&&_removeFromParent(e,1),!i&&!_reverting$1&&(_callback(e,s?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},_findNextPauseTween=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start0&&!n&&_alignPlayhead(e,e._tTime=e._tDur*a),e.parent&&_setEnd(e),i||_uncache(e.parent,e),e},_onUpdateTotalDuration=function(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function _(e,t,i){var n=e.labels,r=e._recent||_zeroPosition,s=e.duration()>=_bigNum$1?r.endTime(!1):e._dur,a,o,l;return _isString(t)&&(isNaN(t)||t in n)?(o=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),o==="<"||o===">"?(a>=0&&(t=t.replace(/=/,"")),(o==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?r:i).totalDuration()/100:1)):a<0?(t in n||(n[t]=s),n[t]):(o=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&i&&(o=o/100*(_isArray(i)?i[0]:i).totalDuration()),a>1?_(e,t.substr(0,a-1),i)+o:s+o)):t==null?s:+t},_createTweenType=function(e,t,i){var n=_isNumber(t[1]),r=(n?2:1)+(e<2?0:1),s=t[r],a,o;if(n&&(s.duration=t[1]),s.parent=i,e){for(a=s,o=i;o&&!("immediateRender"in a);)a=o.vars.defaults||{},o=_isNotFalse(o.vars.inherit)&&o.parent;s.immediateRender=_isNotFalse(a.immediateRender),e<2?s.runBackwards=1:s.startAt=t[r-1]}return new Tween(t[0],s,t[r+1])},_conditionalReturn=function(e,t){return e||e===0?t(e):t},_clamp=function(e,t,i){return it?t:i},getUnit=function(e,t){return!_isString(e)||!(t=_unitExp.exec(e))?"":t[1]},clamp=function(e,t,i){return _conditionalReturn(i,function(n){return _clamp(e,t,n)})},_slice=[].slice,_isArrayLike=function(e,t){return e&&_isObject(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_isObject(e[0]))&&!e.nodeType&&e!==_win$1},_flatten=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(n){var r;return _isString(n)&&!t||_isArrayLike(n,1)?(r=i).push.apply(r,toArray(n)):i.push(n)})||i},toArray=function(e,t,i){return _context&&!t&&_context.selector?_context.selector(e):_isString(e)&&!i&&(_coreInitted||!_wake())?_slice.call((t||_doc$1).querySelectorAll(e),0):_isArray(e)?_flatten(e,i):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]},selector=function(e){return e=toArray(e)[0]||_warn("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return toArray(t,i.querySelectorAll?i:i===e?_warn("Invalid scope")||_doc$1.createElement("div"):e)}},shuffle=function(e){return e.sort(function(){return .5-Math.random()})},distribute=function(e){if(_isFunction(e))return e;var t=_isObject(e)?e:{each:e},i=_parseEase(t.ease),n=t.from||0,r=parseFloat(t.base)||0,s={},a=n>0&&n<1,o=isNaN(n)||a,l=t.axis,u=n,h=n;return _isString(n)?u=h={center:.5,edges:.5,end:1}[n]||0:!a&&o&&(u=n[0],h=n[1]),function(c,d,p){var f=(p||t).length,g=s[f],A,m,y,x,T,P,S,v,w;if(!g){if(w=t.grid==="auto"?0:(t.grid||[1,_bigNum$1])[1],!w){for(S=-_bigNum$1;S<(S=p[w++].getBoundingClientRect().left)&&wS&&(S=T),Tf?f-1:l?l==="y"?f/w:w:Math.max(w,f/w))||0)*(n==="edges"?-1:1),g.b=f<0?r-f:r,g.u=getUnit(t.amount||t.each)||0,i=i&&f<0?_invertEase(i):i}return f=(g[c]-g.min)/g.max||0,_roundPrecise(g.b+(i?i(f):f)*g.v)+g.u}},_roundModifier=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=_roundPrecise(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(_isNumber(i)?0:getUnit(i))}},snap=function(e,t){var i=_isArray(e),n,r;return!i&&_isObject(e)&&(n=i=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(r=!_isNumber(e[0]))&&(n*=n)):e=_roundModifier(e.increment)),_conditionalReturn(t,i?_isFunction(e)?function(s){return r=e(s),Math.abs(r-s)<=n?r:s}:function(s){for(var a=parseFloat(r?s.x:s),o=parseFloat(r?s.y:0),l=_bigNum$1,u=0,h=e.length,c,d;h--;)r?(c=e[h].x-a,d=e[h].y-o,c=c*c+d*d):c=Math.abs(e[h]-a),cn?r-s:s)})},_replaceRandom=function(e){for(var t=0,i="",n,r,s,a;~(n=e.indexOf("random(",t));)s=e.indexOf(")",n),a=e.charAt(n+7)==="[",r=e.substr(n+7,s-n-7).match(a?_delimitedValueExp:_strictNumExp),i+=e.substr(t,n-t)+random(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=s+1;return i+e.substr(t,e.length-t)},mapRange=function(e,t,i,n,r){var s=t-e,a=n-i;return _conditionalReturn(r,function(o){return i+((o-e)/s*a||0)})},interpolate=function _(e,t,i,n){var r=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!r){var s=_isString(e),a={},o,l,u,h,c;if(i===!0&&(n=1)&&(i=null),s)e={p:e},t={p:t};else if(_isArray(e)&&!_isArray(t)){for(u=[],h=e.length,c=h-2,l=1;l(a=Math.abs(a))&&(o=s,r=a);return o},_callback=function(e,t,i){var n=e.vars,r=n[t],s=_context,a=e._ctx,o,l,u;if(r)return o=n[t+"Params"],l=n.callbackScope||e,i&&_lazyTweens.length&&_lazyRender(),a&&(_context=a),u=o?r.apply(l,o):r.call(l),_context=s,u},_interrupt=function(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback(e,"onInterrupt"),e},_quickTween,_registerPluginQueue=[],_createPlugin=function(e){if(_windowExists$1()&&e){e=!e.name&&e.default||e;var t=e.name,i=_isFunction(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},s={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==n){if(_plugins[t])return;_setDefaults(n,_setDefaults(_copyExcluding(e,r),s)),_merge(n.prototype,_merge(r,_copyExcluding(e,s))),_plugins[n.prop=t]=n,e.targetTest&&(_harnessPlugins.push(n),_reservedProps[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}_addGlobal(t,n),e.register&&e.register(gsap,n,PropTween)}else e&&_registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*_255+.5|0},splitColor=function(e,t,i){var n=e?_isNumber(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black,r,s,a,o,l,u,h,c,d,p;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),_colorLookup[e])n=_colorLookup[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),s=e.charAt(2),a=e.charAt(3),e="#"+r+r+s+s+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&_255,n&_255,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&_255,e&_255]}else if(e.substr(0,3)==="hsl"){if(n=p=e.match(_strictNumExp),!t)o=+n[0]%360/360,l=+n[1]/100,u=+n[2]/100,s=u<=.5?u*(l+1):u+l-u*l,r=u*2-s,n.length>3&&(n[3]*=1),n[0]=_hue(o+1/3,r,s),n[1]=_hue(o,r,s),n[2]=_hue(o-1/3,r,s);else if(~e.indexOf("="))return n=e.match(_numExp),i&&n.length<4&&(n[3]=1),n}else n=e.match(_strictNumExp)||_colorLookup.transparent;n=n.map(Number)}return t&&!p&&(r=n[0]/_255,s=n[1]/_255,a=n[2]/_255,h=Math.max(r,s,a),c=Math.min(r,s,a),u=(h+c)/2,h===c?o=l=0:(d=h-c,l=u>.5?d/(2-h-c):d/(h+c),o=h===r?(s-a)/d+(se&&(i+=A-t),n+=A,T=n-i,y=T-s,(y>0||m)&&(P=++h.frame,c=T-h.time*1e3,h.time=T=T/1e3,s+=y+(y>=r?4:r-y),x=1),m||(o=l(f)),x)for(d=0;d=A&&d--},_listeners:a},h}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),n=i[0],r=1,s=i.length,a,o,l;r1&&i.config?i.config.apply(null,~e.indexOf("{")?[_parseObjectInString(t[1])]:_valueInParentheses(e).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE("",e):i},_invertEase=function(e){return function(t){return 1-e(1-t)}},_propagateYoyoEase=function _(e,t){for(var i=e._first,n;i;)i instanceof Timeline?_(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?_(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},_parseEase=function(e,t){return e&&(_isFunction(e)?e:_easeMap[e]||_configEaseFromString(e))||t},_insertEase=function(e,t,i,n){i===void 0&&(i=function(o){return 1-t(1-o)}),n===void 0&&(n=function(o){return o<.5?t(o*2)/2:1-t((1-o)*2)/2});var r={easeIn:t,easeOut:i,easeInOut:n},s;return _forEachName(e,function(a){_easeMap[a]=_globals[a]=r,_easeMap[s=a.toLowerCase()]=i;for(var o in r)_easeMap[s+(o==="easeIn"?".in":o==="easeOut"?".out":".inOut")]=_easeMap[a+"."+o]=r[o]}),r},_easeInOutFromOut=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},_configElastic=function _(e,t,i){var n=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),s=r/_2PI*(Math.asin(1/n)||0),a=function(u){return u===1?1:n*Math.pow(2,-10*u)*_sin((u-s)*r)+1},o=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:_easeInOutFromOut(a);return r=_2PI/r,o.config=function(l,u){return _(e,l,u)},o},_configBack=function _(e,t){t===void 0&&(t=1.70158);var i=function(s){return s?--s*s*((t+1)*s+t)+1:0},n=e==="out"?i:e==="in"?function(r){return 1-i(1-r)}:_easeInOutFromOut(i);return n.config=function(r){return _(e,r)},n};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(_,e){var t=e<5?e+1:e;_insertEase(_+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})}),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic()),function(_,e){var t=1/e,i=2*t,n=2.5*t,r=function(a){return a0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(_wake(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(_alignPlayhead(this,i),!r._dp||r.parent||_postAddChecks(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i0||!this._tDur&&!i)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===_tinyNum||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),_lazySafeRender(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+_elapsedCycleDuration(this),n):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(i,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,n):this._repeat?_animationCycle(this._tTime,r)+1:1},e.timeScale=function(i){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===i)return this;var n=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,n),!0),_setEnd(this),_recacheAncestors(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&_addToTimeline(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(_isNotFalse(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=_revertConfig);var n=_reverting$1;return _reverting$1=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),_reverting$1=n,this},e.globalTime=function(i){for(var n=this,r=arguments.length?i:n.rawTime();n;)r=n._start+r/(n._ts||1),n=n._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1/0:this._sat.globalTime(i):r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,_onUpdateTotalDuration(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,_onUpdateTotalDuration(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(_parsePosition(this,i),_isNotFalse(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,_isNotFalse(n))},e.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-_tinyNum:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},e.isActive=function(){var i=this.parent||this._dp,n=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=n&&r1?(n?(s[i]=n,r&&(s[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=n)):delete s[i],this):s[i]},e.then=function(i){var n=this;return new Promise(function(r){var s=_isFunction(i)?i:_passThrough,a=function(){var l=n.then;n.then=null,_isFunction(s)&&(s=s(n))&&(s.then||s===n)&&(n.then=l),r(s),n.then=l};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},e.kill=function(){_interrupt(this)},_}();_setDefaults(Animation$1.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:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(_){_inheritsLoose(e,_);function e(i,n){var r;return i===void 0&&(i={}),r=_.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=_isNotFalse(i.sortChildren),_globalTimeline&&_addToTimeline(i.parent||_globalTimeline,_assertThisInitialized(r),n),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&_scrollTrigger(_assertThisInitialized(r),i.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,s){return _createTweenType(0,arguments,this),this},t.from=function(n,r,s){return _createTweenType(1,arguments,this),this},t.fromTo=function(n,r,s,a){return _createTweenType(2,arguments,this),this},t.set=function(n,r,s){return r.duration=0,r.parent=this,_inheritDefaults(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new Tween(n,r,_parsePosition(this,s),1),this},t.call=function(n,r,s){return _addToTimeline(this,Tween.delayedCall(0,n,r),s)},t.staggerTo=function(n,r,s,a,o,l,u){return s.duration=r,s.stagger=s.stagger||a,s.onComplete=l,s.onCompleteParams=u,s.parent=this,new Tween(n,s,_parsePosition(this,o)),this},t.staggerFrom=function(n,r,s,a,o,l,u){return s.runBackwards=1,_inheritDefaults(s).immediateRender=_isNotFalse(s.immediateRender),this.staggerTo(n,r,s,a,o,l,u)},t.staggerFromTo=function(n,r,s,a,o,l,u,h){return a.startAt=s,_inheritDefaults(a).immediateRender=_isNotFalse(a.immediateRender),this.staggerTo(n,r,a,o,l,u,h)},t.render=function(n,r,s){var a=this._time,o=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=n<=0?0:_roundPrecise(n),h=this._zTime<0!=n<0&&(this._initted||!l),c,d,p,f,g,A,m,y,x,T,P,S;if(this!==_globalTimeline&&u>o&&n>=0&&(u=o),u!==this._tTime||s||h){if(a!==this._time&&l&&(u+=this._time-a,n+=this._time-a),c=u,x=this._start,y=this._ts,A=!y,h&&(l||(a=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(P=this._yoyo,g=l+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,r,s);if(c=_roundPrecise(u%g),u===o?(f=this._repeat,c=l):(f=~~(u/g),f&&f===u/g&&(c=l,f--),c>l&&(c=l)),T=_animationCycle(this._tTime,g),!a&&this._tTime&&T!==f&&this._tTime-T*g-this._dur<=0&&(T=f),P&&f&1&&(c=l-c,S=1),f!==T&&!this._lock){var v=P&&T&1,w=v===(P&&f&1);if(f=a&&n>=0)for(d=this._first;d;){if(p=d._next,(d._act||c>=d._start)&&d._ts&&m!==d){if(d.parent!==this)return this.render(n,r,s);if(d.render(d._ts>0?(c-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(c-d._start)*d._ts,r,s),c!==this._time||!this._ts&&!A){m=0,p&&(u+=this._zTime=-_tinyNum);break}}d=p}else{d=this._last;for(var b=n<0?n:c;d;){if(p=d._prev,(d._act||b<=d._end)&&d._ts&&m!==d){if(d.parent!==this)return this.render(n,r,s);if(d.render(d._ts>0?(b-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(b-d._start)*d._ts,r,s||_reverting$1&&(d._initted||d._startAt)),c!==this._time||!this._ts&&!A){m=0,p&&(u+=this._zTime=b?-_tinyNum:_tinyNum);break}}d=p}}if(m&&!r&&(this.pause(),m.render(c>=a?0:-_tinyNum)._zTime=c>=a?1:-1,this._ts))return this._start=x,_setEnd(this),this.render(n,r,s);this._onUpdate&&!r&&_callback(this,"onUpdate",!0),(u===o&&this._tTime>=this.totalDuration()||!u&&a)&&(x===this._start||Math.abs(y)!==Math.abs(this._ts))&&(this._lock||((n||!l)&&(u===o&&this._ts>0||!u&&this._ts<0)&&_removeFromParent(this,1),!r&&!(n<0&&!a)&&(u||a||!o)&&(_callback(this,u===o&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(n,r){var s=this;if(_isNumber(r)||(r=_parsePosition(this,r,n)),!(n instanceof Animation$1)){if(_isArray(n))return n.forEach(function(a){return s.add(a,r)}),this;if(_isString(n))return this.addLabel(n,r);if(_isFunction(n))n=Tween.delayedCall(0,n);else return this}return this!==n?_addToTimeline(this,n,r):this},t.getChildren=function(n,r,s,a){n===void 0&&(n=!0),r===void 0&&(r=!0),s===void 0&&(s=!0),a===void 0&&(a=-_bigNum$1);for(var o=[],l=this._first;l;)l._start>=a&&(l instanceof Tween?r&&o.push(l):(s&&o.push(l),n&&o.push.apply(o,l.getChildren(!0,r,s)))),l=l._next;return o},t.getById=function(n){for(var r=this.getChildren(1,1,1),s=r.length;s--;)if(r[s].vars.id===n)return r[s]},t.remove=function(n){return _isString(n)?this.removeLabel(n):_isFunction(n)?this.killTweensOf(n):(_removeLinkedListItem(this,n),n===this._recent&&(this._recent=this._last),_uncache(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),_.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=_parsePosition(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,s){var a=Tween.delayedCall(0,r||_emptyFunc,s);return a.data="isPause",this._hasPause=1,_addToTimeline(this,a,_parsePosition(this,n))},t.removePause=function(n){var r=this._first;for(n=_parsePosition(this,n);r;)r._start===n&&r.data==="isPause"&&_removeFromParent(r),r=r._next},t.killTweensOf=function(n,r,s){for(var a=this.getTweensOf(n,s),o=a.length;o--;)_overwritingTween!==a[o]&&a[o].kill(n,r);return this},t.getTweensOf=function(n,r){for(var s=[],a=toArray(n),o=this._first,l=_isNumber(r),u;o;)o instanceof Tween?_arrayContainsAny(o._targets,a)&&(l?(!_overwritingTween||o._initted&&o._ts)&&o.globalTime(0)<=r&&o.globalTime(o.totalDuration())>r:!r||o.isActive())&&s.push(o):(u=o.getTweensOf(a,r)).length&&s.push.apply(s,u),o=o._next;return s},t.tweenTo=function(n,r){r=r||{};var s=this,a=_parsePosition(s,n),o=r,l=o.startAt,u=o.onStart,h=o.onStartParams,c=o.immediateRender,d,p=Tween.to(s,_setDefaults({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(l&&"time"in l?l.time:s._time))/s.timeScale())||_tinyNum,onStart:function(){if(s.pause(),!d){var g=r.duration||Math.abs((a-(l&&"time"in l?l.time:s._time))/s.timeScale());p._dur!==g&&_setDuration(p,g,0,1).render(p._time,!0,!0),d=1}u&&u.apply(p,h||[])}},r));return c?p.render(0):p},t.tweenFromTo=function(n,r,s){return this.tweenTo(r,_setDefaults({startAt:{time:_parsePosition(this,n)}},s))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),_getLabelInDirection(this,_parsePosition(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),_getLabelInDirection(this,_parsePosition(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+_tinyNum)},t.shiftChildren=function(n,r,s){s===void 0&&(s=0);for(var a=this._first,o=this.labels,l;a;)a._start>=s&&(a._start+=n,a._end+=n),a=a._next;if(r)for(l in o)o[l]>=s&&(o[l]+=n);return _uncache(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return _.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var r=this._first,s;r;)s=r._next,this.remove(r),r=s;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),_uncache(this)},t.totalDuration=function(n){var r=0,s=this,a=s._last,o=_bigNum$1,l,u,h;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-n:n));if(s._dirty){for(h=s.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>o&&s._sort&&a._ts&&!s._lock?(s._lock=1,_addToTimeline(s,a,u-a._delay,1)._lock=0):o=u,u<0&&a._ts&&(r-=u,(!h&&!s._dp||h&&h.smoothChildTiming)&&(s._start+=u/s._ts,s._time-=u,s._tTime-=u),s.shiftChildren(-u,!1,-1/0),o=0),a._end>r&&a._ts&&(r=a._end),a=l;_setDuration(s,s===_globalTimeline&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(n){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(n,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var r=_globalTimeline._first;if((!r||!r._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||_ticker.sleep()}}},e}(Animation$1);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(e,t,i,n,r,s,a){var o=new PropTween(this._pt,e,t,0,1,_renderComplexString,null,r),l=0,u=0,h,c,d,p,f,g,A,m;for(o.b=i,o.e=n,i+="",n+="",(A=~n.indexOf("random("))&&(n=_replaceRandom(n)),s&&(m=[i,n],s(m,e,t),i=m[0],n=m[1]),c=i.match(_complexStringNumExp)||[];h=_complexStringNumExp.exec(n);)p=h[0],f=n.substring(l,h.index),d?d=(d+1)%5:f.substr(-5)==="rgba("&&(d=1),p!==c[u++]&&(g=parseFloat(c[u-1])||0,o._pt={_next:o._pt,p:f||u===1?f:",",s:g,c:p.charAt(1)==="="?_parseRelative(g,p)-g:parseFloat(p)-g,m:d&&d<4?Math.round:0},l=_complexStringNumExp.lastIndex);return o.c=l")}),x.duration();else{P={};for(v in p)v==="ease"||v==="easeEach"||_parseKeyframe(v,p[v],P,p.easeEach);for(v in P)for(O=P[v].sort(function(W,M){return W.t-M.t}),C=0,T=0;To-_tinyNum&&!u?o:n<_tinyNum?0:n,c,d,p,f,g,A,m,y,x;if(!l)_renderZeroDurationTween(this,n,r,s);else if(h!==this._tTime||!n||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u){if(c=h,y=this.timeline,this._repeat){if(f=l+this._rDelay,this._repeat<-1&&u)return this.totalTime(f*100+n,r,s);if(c=_roundPrecise(h%f),h===o?(p=this._repeat,c=l):(p=~~(h/f),p&&p===h/f&&(c=l,p--),c>l&&(c=l)),A=this._yoyo&&p&1,A&&(x=this._yEase,c=l-c),g=_animationCycle(this._tTime,f),c===a&&!s&&this._initted)return this._tTime=h,this;p!==g&&(y&&this._yEase&&_propagateYoyoEase(y,A),this.vars.repeatRefresh&&!A&&!this._lock&&(this._lock=s=1,this.render(_roundPrecise(f*p),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,u?n:c,s,r,h))return this._tTime=0,this;if(a!==this._time)return this;if(l!==this._dur)return this.render(n,r,s)}if(this._tTime=h,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=m=(x||this._ease)(c/l),this._from&&(this.ratio=m=1-m),c&&!a&&!r&&!p&&(_callback(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(m,d.d),d=d._next;y&&y.render(n<0?n:!c&&A?-_tinyNum:y._dur*y._ease(c/this._dur),r,s)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(u&&_rewindStartAt(this,n,r,s),_callback(this,"onUpdate")),this._repeat&&p!==g&&this.vars.onRepeat&&!r&&this.parent&&_callback(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&_rewindStartAt(this,n,!0,!0),(n||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&_removeFromParent(this,1),!r&&!(u&&!a)&&(h||a||A)&&(_callback(this,h===o?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),_.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,s,a){_tickerActive||_ticker.wake(),this._ts||this.play();var o=Math.min(this._dur,(this._dp._time-this._start)*this._ts),l;return this._initted||_initTween(this,o),l=this._ease(o/this._dur),_updatePropTweens(this,n,r,s,a,l,o)?this.resetTo(n,r,s,a):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(r===void 0&&(r="all"),!n&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,_overwritingTween&&_overwritingTween.vars.overwrite!==!0)._first||_interrupt(this),this.parent&&s!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/s,0,1),this}var a=this._targets,o=n?toArray(n):a,l=this._ptLookup,u=this._pt,h,c,d,p,f,g,A;if((!r||r==="all")&&_arraysMatch(a,o))return r==="all"&&(this._pt=0),_interrupt(this);for(h=this._op=this._op||[],r!=="all"&&(_isString(r)&&(f={},_forEachName(r,function(m){return f[m]=1}),r=f),r=_addAliasesToVars(a,r)),A=a.length;A--;)if(~o.indexOf(a[A])){c=l[A],r==="all"?(h[A]=r,p=c,d={}):(d=h[A]=h[A]||{},p=r);for(f in p)g=c&&c[f],g&&((!("kill"in g.d)||g.d.kill(f)===!0)&&_removeLinkedListItem(this,g,"_pt"),delete c[f]),d!=="all"&&(d[f]=1)}return this._initted&&!this._pt&&u&&_interrupt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return _createTweenType(1,arguments)},e.delayedCall=function(n,r,s,a){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:a})},e.fromTo=function(n,r,s){return _createTweenType(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,s){return _globalTimeline.killTweensOf(n,r,s)},e}(Animation$1);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName("staggerTo,staggerFrom,staggerFromTo",function(_){Tween[_]=function(){var e=new Timeline,t=_slice.call(arguments,0);return t.splice(_==="staggerFromTo"?5:4,0,0),e[_].apply(e,t)}});var _setterPlain=function(e,t,i){return e[t]=i},_setterFunc=function(e,t,i){return e[t](i)},_setterFuncWithParam=function(e,t,i,n){return e[t](n.fp,i)},_setterAttribute=function(e,t,i){return e.setAttribute(t,i)},_getSetter=function(e,t){return _isFunction(e[t])?_setterFunc:_isUndefined(e[t])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},_renderBoolean=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_renderComplexString=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},_renderPropTweens=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},_addPluginModifier=function(e,t,i,n){for(var r=this._pt,s;r;)s=r._next,r.p===n&&r.modifier(e,t,i),r=s},_killPropTweensOf=function(e){for(var t=this._pt,i,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?_removeLinkedListItem(this,t,"_pt"):t.dep||(i=1),t=n;return!i},_setterWithModifier=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},_sortPropTweensByPriority=function(e){for(var t=e._pt,i,n,r,s;t;){for(i=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:s)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:s=t,t=i}e._pt=r},PropTween=function(){function _(t,i,n,r,s,a,o,l,u){this.t=i,this.s=r,this.c=s,this.p=n,this.r=a||_renderPlain,this.d=o||this,this.set=l||_setterPlain,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=_.prototype;return e.modifier=function(i,n,r){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=i,this.mt=r,this.tween=n},_}();_forEachName(_callbackNames+"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(_){return _reservedProps[_]=1}),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function(e){return(_listeners[e]||_emptyArray).map(function(t){return t()})},_onMediaChange=function(){var e=Date.now(),t=[];e-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach(function(i){var n=i.queries,r=i.conditions,s,a,o,l;for(a in n)s=_win$1.matchMedia(n[a]).matches,s&&(o=1),s!==r[a]&&(r[a]=s,l=1);l&&(i.revert(),o&&t.push(i))}),_dispatch("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i)}),_lastMediaTime=e,_dispatch("matchMedia"))},Context=function(){function _(t,i){this.selector=i&&selector(i),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,t&&this.add(t)}var e=_.prototype;return e.add=function(i,n,r){_isFunction(i)&&(r=n,n=i,i=_isFunction);var s=this,a=function(){var l=_context,u=s.selector,h;return l&&l!==s&&l.data.push(s),r&&(s.selector=selector(r)),_context=s,h=n.apply(s,arguments),_isFunction(h)&&s._r.push(h),_context=l,s.selector=u,s.isReverted=!1,h};return s.last=a,i===_isFunction?a(s):i?s[i]=a:a},e.ignore=function(i){var n=_context;_context=null,i(this),_context=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof _?i.push.apply(i,n.getTweens()):n instanceof Tween&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var r=this;if(i){var s=this.getTweens();this.data.forEach(function(o){o.data==="isFlip"&&(o.revert(),o.getChildren(!0,!0,!1).forEach(function(l){return s.splice(s.indexOf(l),1)}))}),s.map(function(o){return{g:o.globalTime(0),t:o}}).sort(function(o,l){return l.g-o.g||-1/0}).forEach(function(o){return o.t.revert(i)}),this.data.forEach(function(o){return!(o instanceof Tween)&&o.revert&&o.revert(i)}),this._r.forEach(function(o){return o(i,r)}),this.isReverted=!0}else this.data.forEach(function(o){return o.kill&&o.kill()});if(this.clear(),n)for(var a=_media.length;a--;)_media[a].id===this.id&&_media.splice(a,1)},e.revert=function(i){this.kill(i||{})},_}(),MatchMedia=function(){function _(t){this.contexts=[],this.scope=t}var e=_.prototype;return e.add=function(i,n,r){_isObject(i)||(i={matches:i});var s=new Context(0,r||this.scope),a=s.conditions={},o,l,u;_context&&!s.selector&&(s.selector=_context.selector),this.contexts.push(s),n=s.add("onMatch",n),s.queries=i;for(l in i)l==="all"?u=1:(o=_win$1.matchMedia(i[l]),o&&(_media.indexOf(s)<0&&_media.push(s),(a[l]=o.matches)&&(u=1),o.addListener?o.addListener(_onMediaChange):o.addEventListener("change",_onMediaChange)));return u&&n(s),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},_}(),_gsap={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i1){var n=e.map(function(u){return gsap.quickSetter(u,t,i)}),r=n.length;return function(u){for(var h=r;h--;)n[h](u)}}e=e[0]||{};var s=_plugins[t],a=_getCache(e),o=a.harness&&(a.harness.aliases||{})[t]||t,l=s?function(u){var h=new s;_quickTween._pt=0,h.init(e,i?u+i:u,_quickTween,0,[e]),h.render(1,h),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:a.set(e,o);return s?l:function(u){return l(e,o,i?u+i:u,a,1)}},quickTo:function(e,t,i){var n,r=gsap.to(e,_merge((n={},n[t]="+=0.1",n.paused=!0,n),i||{})),s=function(o,l,u){return r.resetTo(t,o,l,u)};return s.tween=r,s},isTweening:function(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults.ease)),_mergeDeep(_defaults,e||{})},config:function(e){return _mergeDeep(_config,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,r=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!_plugins[a]&&!_globals[a]&&_warn(t+" effect requires "+a+" plugin.")}),_effects[t]=function(a,o,l){return i(toArray(a),_setDefaults(o||{},r),l)},s&&(Timeline.prototype[t]=function(a,o,l){return this.add(_effects[t](a,_isObject(o)?o:(l=o)&&{},this),l)})},registerEase:function(e,t){_easeMap[e]=_parseEase(t)},parseEase:function(e,t){return arguments.length?_parseEase(e,t):_easeMap},getById:function(e){return _globalTimeline.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Timeline(e),n,r;for(i.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(i),i._dp=0,i._time=i._tTime=_globalTimeline._time,n=_globalTimeline._first;n;)r=n._next,(t||!(!n._dur&&n instanceof Tween&&n.vars.onComplete===n._targets[0]))&&_addToTimeline(i,n,n._start-n._delay),n=r;return _addToTimeline(_globalTimeline,i,0),i},context:function(e,t){return e?new Context(e,t):_context},matchMedia:function(e){return new MatchMedia(e)},matchMediaRefresh:function(){return _media.forEach(function(e){var t=e.conditions,i,n;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||_onMediaChange()},addEventListener:function(e,t){var i=_listeners[e]||(_listeners[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=_listeners[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap,wrapYoyo,distribute,random,snap,normalize,getUnit,clamp,splitColor,toArray,selector,mapRange,pipe,unitize,interpolate,shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween,globals:_addGlobal,Tween,Timeline,Animation:Animation$1,getCache:_getCache,_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(e){return e&&_context&&(_context.data.push(e),e._ctx=_context),_context},suppressOverwrites:function(e){return _suppressOverwrites=e}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(_){return _gsap[_]=Tween[_]}),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},_addModifiers=function(e,t){var i=e._targets,n,r,s;for(n in t)for(r=i.length;r--;)s=e._ptLookup[r][n],s&&(s=s.d)&&(s._pt&&(s=_getPluginPropTween(s,n)),s&&s.modifier&&s.modifier(t[n],e,i[r],n))},_buildModifierPlugin=function(e,t){return{name:e,rawVars:1,init:function(n,r,s){s._onInit=function(a){var o,l;if(_isString(r)&&(o={},_forEachName(r,function(u){return o[u]=1}),r=o),t){o={};for(l in r)o[l]=t(r[l]);r=o}_addModifiers(a,r)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function(e,t,i,n,r){var s,a,o;this.tween=i;for(s in t)o=e.getAttribute(s)||"",a=this.add(e,"setAttribute",(o||0)+"",t[s],n,r,0,0,s),a.op=s,a.b=o,this._props.push(s)},render:function(e,t){for(var i=t._pt;i;)_reverting$1?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.2",_coreReady=1,_windowExists$1()&&_wake(),_easeMap.Power0,_easeMap.Power1,_easeMap.Power2,_easeMap.Power3,_easeMap.Power4,_easeMap.Linear,_easeMap.Quad,_easeMap.Cubic,_easeMap.Quart,_easeMap.Quint,_easeMap.Strong,_easeMap.Elastic,_easeMap.Back,_easeMap.SteppedEase,_easeMap.Bounce,_easeMap.Sine,_easeMap.Expo,_easeMap.Circ;/*! * CSSPlugin 3.12.2 * https://greensock.com * * Copyright 2008-2023, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return typeof window<"u"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},_setterCSSStyle=function(e,t,i){return e.style[t]=i},_setterCSSProp=function(e,t,i){return e.style.setProperty(t,i)},_setterTransform=function(e,t,i){return e._gsap[t]=i},_setterScale=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},_setterScaleWithRender=function(e,t,i,n,r){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},_setterTransformWithRender=function(e,t,i,n,r){var s=e._gsap;s[t]=i,s.renderTransform(r,s)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function _(e,t){var i=this,n=this.target,r=n.style;if(e in _transformProps&&r){if(this.tfm=this.tfm||{},e!=="transform")e=_propertyAliases[e]||e,~e.indexOf(",")?e.split(",").forEach(function(s){return i.tfm[s]=_get(n,s)}):this.tfm[e]=n._gsap.x?n._gsap[e]:_get(n,e);else return _propertyAliases.transform.split(",").forEach(function(s){return _.call(i,s,t)});if(this.props.indexOf(_transformProp)>=0)return;n._gsap.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,t,"")),e=_transformProp}(r||t)&&this.props.push(e,t,r[e])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e=this.props,t=this.target,i=t.style,n=t._gsap,r,s;for(r=0;r=0?_prefixes[s]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function _(e){var t=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,r=this.style.cssText,s;if(_docElement.appendChild(t),t.appendChild(this),this.style.display="block",e)try{s=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=_}catch{}else this._gsapBBox&&(s=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),_docElement.removeChild(t),this.style.cssText=r,s},_getAttributeFallbacks=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},_getBBox=function(e){var t;try{t=e.getBBox()}catch{t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}:t},_isSVG=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&_getBBox(e))},_removeProperty=function(e,t){if(t){var i=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),i.removeProperty?((t.substr(0,2)==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(t.replace(_capsExp,"-$1").toLowerCase())):i.removeAttribute(t)}},_addNonTweeningPT=function(e,t,i,n,r,s){var a=new PropTween(e._pt,t,i,0,1,s?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=r,e._props.push(i),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function _(e,t,i,n){var r=parseFloat(i)||0,s=(i+"").trim().substr((r+"").length)||"px",a=_tempDiv.style,o=_horizontalExp.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(o?"Width":"Height"),h=100,c=n==="px",d=n==="%",p,f,g,A;return n===s||!r||_nonConvertibleUnits[n]||_nonConvertibleUnits[s]?r:(s!=="px"&&!c&&(r=_(e,t,i,"px")),A=e.getCTM&&_isSVG(e),(d||s==="%")&&(_transformProps[t]||~t.indexOf("adius"))?(p=A?e.getBBox()[o?"width":"height"]:e[u],_round(d?r/p*h:r/100*p)):(a[o?"width":"height"]=h+(c?s:n),f=~t.indexOf("adius")||n==="em"&&e.appendChild&&!l?e:e.parentNode,A&&(f=(e.ownerSVGElement||{}).parentNode),(!f||f===_doc||!f.appendChild)&&(f=_doc.body),g=f._gsap,g&&d&&g.width&&o&&g.time===_ticker.time&&!g.uncache?_round(r/g.width*h):((d||s==="%")&&!_nonStandardLayouts[_getComputedProperty(f,"display")]&&(a.position=_getComputedProperty(e,"position")),f===e&&(a.position="static"),f.appendChild(_tempDiv),p=_tempDiv[u],f.removeChild(_tempDiv),a.position="absolute",o&&d&&(g=_getCache(f),g.time=_ticker.time,g.width=f[u]),_round(c?p*r/h:p&&r?h/p*r:0))))},_get=function(e,t,i,n){var r;return _pluginInitted||_initCore(),t in _propertyAliases&&t!=="transform"&&(t=_propertyAliases[t],~t.indexOf(",")&&(t=t.split(",")[0])),_transformProps[t]&&t!=="transform"?(r=_parseTransform(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=_specialProps[t]&&_specialProps[t](e,t,i)||_getComputedProperty(e,t)||_getProperty(e,t)||(t==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?_convertToUnit(e,t,r,i)+i:r},_tweenComplexCSSString=function(e,t,i,n){if(!i||i==="none"){var r=_checkPropPrefix(t,e,1),s=r&&_getComputedProperty(e,r,1);s&&s!==i?(t=r,i=s):t==="borderColor"&&(i=_getComputedProperty(e,"borderTopColor"))}var a=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),o=0,l=0,u,h,c,d,p,f,g,A,m,y,x,T;if(a.b=i,a.e=n,i+="",n+="",n==="auto"&&(e.style[t]=n,n=_getComputedProperty(e,t)||n,e.style[t]=i),u=[i,n],_colorStringFilter(u),i=u[0],n=u[1],c=i.match(_numWithUnitExp)||[],T=n.match(_numWithUnitExp)||[],T.length){for(;h=_numWithUnitExp.exec(n);)g=h[0],m=n.substring(o,h.index),p?p=(p+1)%5:(m.substr(-5)==="rgba("||m.substr(-5)==="hsla(")&&(p=1),g!==(f=c[l++]||"")&&(d=parseFloat(f)||0,x=f.substr((d+"").length),g.charAt(1)==="="&&(g=_parseRelative(d,g)+x),A=parseFloat(g),y=g.substr((A+"").length),o=_numWithUnitExp.lastIndex-y.length,y||(y=y||_config.units[t]||x,o===n.length&&(n+=y,a.e+=y)),x!==y&&(d=_convertToUnit(e,t,f,y)||0),a._pt={_next:a._pt,p:m||l===1?m:",",s:d,c:A-d,m:p&&p<4||t==="zIndex"?Math.round:0});a.c=o-1;)a=r[l],_transformProps[a]&&(o=1,a=a==="transformOrigin"?_transformOriginProp:_transformProp),_removeProperty(i,a);o&&(_removeProperty(i,_transformProp),s&&(s.svg&&i.removeAttribute("transform"),_parseTransform(i,1),s.uncache=1,_removeIndependentTransforms(n)))}},_specialProps={clearProps:function(e,t,i,n,r){if(r.data!=="isFromStart"){var s=e._pt=new PropTween(e._pt,t,i,0,0,_renderClearProps);return s.u=n,s.pr=-10,s.tween=r,e._props.push(i),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var i=e._gsap||_getCache(e),n=e.style,r=_getComputedTransformMatrixAsArray(e),s,a,o,l;return i.svg&&e.getAttribute("transform")?(o=e.transform.baseVal.consolidate().matrix,r=[o.a,o.b,o.c,o.d,o.e,o.f],r.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:r):(r===_identity2DMatrix&&!e.offsetParent&&e!==_docElement&&!i.svg&&(o=n.display,n.display="block",s=e.parentNode,(!s||!e.offsetParent)&&(l=1,a=e.nextElementSibling,_docElement.appendChild(e)),r=_getComputedTransformMatrixAsArray(e),o?n.display=o:_removeProperty(e,"display"),l&&(a?s.insertBefore(e,a):s?s.appendChild(e):_docElement.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},_applySVGOrigin=function(e,t,i,n,r,s){var a=e._gsap,o=r||_getMatrix(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,c=a.yOffset||0,d=o[0],p=o[1],f=o[2],g=o[3],A=o[4],m=o[5],y=t.split(" "),x=parseFloat(y[0])||0,T=parseFloat(y[1])||0,P,S,v,w;i?o!==_identity2DMatrix&&(S=d*g-p*f)&&(v=x*(g/S)+T*(-f/S)+(f*m-g*A)/S,w=x*(-p/S)+T*(d/S)-(d*m-p*A)/S,x=v,T=w):(P=_getBBox(e),x=P.x+(~y[0].indexOf("%")?x/100*P.width:x),T=P.y+(~(y[1]||y[0]).indexOf("%")?T/100*P.height:T)),n||n!==!1&&a.smooth?(A=x-l,m=T-u,a.xOffset=h+(A*d+m*f)-A,a.yOffset=c+(A*p+m*g)-m):a.xOffset=a.yOffset=0,a.xOrigin=x,a.yOrigin=T,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!i,e.style[_transformOriginProp]="0px 0px",s&&(_addNonTweeningPT(s,a,"xOrigin",l,x),_addNonTweeningPT(s,a,"yOrigin",u,T),_addNonTweeningPT(s,a,"xOffset",h,a.xOffset),_addNonTweeningPT(s,a,"yOffset",c,a.yOffset)),e.setAttribute("data-svg-origin",x+" "+T)},_parseTransform=function(e,t){var i=e._gsap||new GSCache(e);if("x"in i&&!t&&!i.uncache)return i;var n=e.style,r=i.scaleX<0,s="px",a="deg",o=getComputedStyle(e),l=_getComputedProperty(e,_transformOriginProp)||"0",u,h,c,d,p,f,g,A,m,y,x,T,P,S,v,w,b,D,C,O,F,k,W,M,E,N,I,B,z,V,R,L;return u=h=c=f=g=A=m=y=x=0,d=p=1,i.svg=!!(e.getCTM&&_isSVG(e)),o.translate&&((o.translate!=="none"||o.scale!=="none"||o.rotate!=="none")&&(n[_transformProp]=(o.translate!=="none"?"translate3d("+(o.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(o.rotate!=="none"?"rotate("+o.rotate+") ":"")+(o.scale!=="none"?"scale("+o.scale.split(" ").join(",")+") ":"")+(o[_transformProp]!=="none"?o[_transformProp]:"")),n.scale=n.rotate=n.translate="none"),S=_getMatrix(e,i.svg),i.svg&&(i.uncache?(E=e.getBBox(),l=i.xOrigin-E.x+"px "+(i.yOrigin-E.y)+"px",M=""):M=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,M||l,!!M||i.originIsAbsolute,i.smooth!==!1,S)),T=i.xOrigin||0,P=i.yOrigin||0,S!==_identity2DMatrix&&(D=S[0],C=S[1],O=S[2],F=S[3],u=k=S[4],h=W=S[5],S.length===6?(d=Math.sqrt(D*D+C*C),p=Math.sqrt(F*F+O*O),f=D||C?_atan2(C,D)*_RAD2DEG:0,m=O||F?_atan2(O,F)*_RAD2DEG+f:0,m&&(p*=Math.abs(Math.cos(m*_DEG2RAD))),i.svg&&(u-=T-(T*D+P*O),h-=P-(T*C+P*F))):(L=S[6],V=S[7],I=S[8],B=S[9],z=S[10],R=S[11],u=S[12],h=S[13],c=S[14],v=_atan2(L,z),g=v*_RAD2DEG,v&&(w=Math.cos(-v),b=Math.sin(-v),M=k*w+I*b,E=W*w+B*b,N=L*w+z*b,I=k*-b+I*w,B=W*-b+B*w,z=L*-b+z*w,R=V*-b+R*w,k=M,W=E,L=N),v=_atan2(-O,z),A=v*_RAD2DEG,v&&(w=Math.cos(-v),b=Math.sin(-v),M=D*w-I*b,E=C*w-B*b,N=O*w-z*b,R=F*b+R*w,D=M,C=E,O=N),v=_atan2(C,D),f=v*_RAD2DEG,v&&(w=Math.cos(v),b=Math.sin(v),M=D*w+C*b,E=k*w+W*b,C=C*w-D*b,W=W*w-k*b,D=M,k=E),g&&Math.abs(g)+Math.abs(f)>359.9&&(g=f=0,A=180-A),d=_round(Math.sqrt(D*D+C*C+O*O)),p=_round(Math.sqrt(W*W+L*L)),v=_atan2(k,W),m=Math.abs(v)>2e-4?v*_RAD2DEG:0,x=R?1/(R<0?-R:R):0),i.svg&&(M=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),M&&e.setAttribute("transform",M))),Math.abs(m)>90&&Math.abs(m)<270&&(r?(d*=-1,m+=f<=0?180:-180,f+=f<=0?180:-180):(p*=-1,m+=m<=0?180:-180)),t=t||i.uncache,i.x=u-((i.xPercent=u&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+s,i.y=h-((i.yPercent=h&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+s,i.z=c+s,i.scaleX=_round(d),i.scaleY=_round(p),i.rotation=_round(f)+a,i.rotationX=_round(g)+a,i.rotationY=_round(A)+a,i.skewX=m+a,i.skewY=y+a,i.transformPerspective=x+s,(i.zOrigin=parseFloat(l.split(" ")[2])||0)&&(n[_transformOriginProp]=_firstTwoOnly(l)),i.xOffset=i.yOffset=0,i.force3D=_config.force3D,i.renderTransform=i.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,i.uncache=0,i},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,i){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",i+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,a=i.y,o=i.z,l=i.rotation,u=i.rotationY,h=i.rotationX,c=i.skewX,d=i.skewY,p=i.scaleX,f=i.scaleY,g=i.transformPerspective,A=i.force3D,m=i.target,y=i.zOrigin,x="",T=A==="auto"&&e&&e!==1||A===!0;if(y&&(h!==_zeroDeg||u!==_zeroDeg)){var P=parseFloat(u)*_DEG2RAD,S=Math.sin(P),v=Math.cos(P),w;P=parseFloat(h)*_DEG2RAD,w=Math.cos(P),s=_addPxTranslate(m,s,S*w*-y),a=_addPxTranslate(m,a,-Math.sin(P)*-y),o=_addPxTranslate(m,o,v*w*-y+y)}g!==_zeroPx&&(x+="perspective("+g+_endParenthesis),(n||r)&&(x+="translate("+n+"%, "+r+"%) "),(T||s!==_zeroPx||a!==_zeroPx||o!==_zeroPx)&&(x+=o!==_zeroPx||T?"translate3d("+s+", "+a+", "+o+") ":"translate("+s+", "+a+_endParenthesis),l!==_zeroDeg&&(x+="rotate("+l+_endParenthesis),u!==_zeroDeg&&(x+="rotateY("+u+_endParenthesis),h!==_zeroDeg&&(x+="rotateX("+h+_endParenthesis),(c!==_zeroDeg||d!==_zeroDeg)&&(x+="skew("+c+", "+d+_endParenthesis),(p!==1||f!==1)&&(x+="scale("+p+", "+f+_endParenthesis),m.style[_transformProp]=x||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,a=i.y,o=i.rotation,l=i.skewX,u=i.skewY,h=i.scaleX,c=i.scaleY,d=i.target,p=i.xOrigin,f=i.yOrigin,g=i.xOffset,A=i.yOffset,m=i.forceCSS,y=parseFloat(s),x=parseFloat(a),T,P,S,v,w;o=parseFloat(o),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,o+=u),o||l?(o*=_DEG2RAD,l*=_DEG2RAD,T=Math.cos(o)*h,P=Math.sin(o)*h,S=Math.sin(o-l)*-c,v=Math.cos(o-l)*c,l&&(u*=_DEG2RAD,w=Math.tan(l-u),w=Math.sqrt(1+w*w),S*=w,v*=w,u&&(w=Math.tan(u),w=Math.sqrt(1+w*w),T*=w,P*=w)),T=_round(T),P=_round(P),S=_round(S),v=_round(v)):(T=h,v=c,P=S=0),(y&&!~(s+"").indexOf("px")||x&&!~(a+"").indexOf("px"))&&(y=_convertToUnit(d,"x",s,"px"),x=_convertToUnit(d,"y",a,"px")),(p||f||g||A)&&(y=_round(y+p-(p*T+f*S)+g),x=_round(x+f-(p*P+f*v)+A)),(n||r)&&(w=d.getBBox(),y=_round(y+n/100*w.width),x=_round(x+r/100*w.height)),w="matrix("+T+","+P+","+S+","+v+","+y+","+x+")",d.setAttribute("transform",w),m&&(d.style[_transformProp]=w)},_addRotationalPropTween=function(e,t,i,n,r){var s=360,a=_isString(r),o=parseFloat(r)*(a&&~r.indexOf("rad")?_RAD2DEG:1),l=o-n,u=n+l+"deg",h,c;return a&&(h=r.split("_")[1],h==="short"&&(l%=s,l!==l%(s/2)&&(l+=l<0?s:-s)),h==="cw"&&l<0?l=(l+s*_bigNum)%s-~~(l/s)*s:h==="ccw"&&l>0&&(l=(l-s*_bigNum)%s-~~(l/s)*s)),e._pt=c=new PropTween(e._pt,t,i,n,l,_renderPropWithEnd),c.e=u,c.u="deg",e._props.push(i),c},_assign=function(e,t){for(var i in t)e[i]=t[i];return e},_addRawTransformPTs=function(e,t,i){var n=_assign({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",s=i.style,a,o,l,u,h,c,d,p;n.svg?(l=i.getAttribute("transform"),i.setAttribute("transform",""),s[_transformProp]=t,a=_parseTransform(i,1),_removeProperty(i,_transformProp),i.setAttribute("transform",l)):(l=getComputedStyle(i)[_transformProp],s[_transformProp]=t,a=_parseTransform(i,1),s[_transformProp]=l);for(o in _transformProps)l=n[o],u=a[o],l!==u&&r.indexOf(o)<0&&(d=getUnit(l),p=getUnit(u),h=d!==p?_convertToUnit(i,o,l,p):parseFloat(l),c=parseFloat(u),e._pt=new PropTween(e._pt,a,o,h,c-h,_renderCSSProp),e._pt.u=p||0,e._props.push(o));_assign(a,n)};_forEachName("padding,margin,Width,Radius",function(_,e){var t="Top",i="Right",n="Bottom",r="Left",s=(e<3?[t,i,n,r]:[t+r,t+i,n+i,n+r]).map(function(a){return e<2?_+a:"border"+a+_});_specialProps[e>1?"border"+_:_]=function(a,o,l,u,h){var c,d;if(arguments.length<4)return c=s.map(function(p){return _get(a,p,l)}),d=c.join(" "),d.split(c[0]).length===5?c[0]:d;c=(u+"").split(" "),d={},s.forEach(function(p,f){return d[p]=c[f]=c[f]||c[(f-1)/2|0]}),a.init(o,d,h)}});var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var s=this._props,a=e.style,o=i.vars.startAt,l,u,h,c,d,p,f,g,A,m,y,x,T,P,S,v;_pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),v=this.styles.props,this.tween=i;for(f in t)if(f!=="autoRound"&&(u=t[f],!(_plugins[f]&&_checkPlugin(f,t,i,n,e,r)))){if(d=typeof u,p=_specialProps[f],d==="function"&&(u=u.call(i,n,e,r),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=_replaceRandom(u)),p)p(this,e,f,u,i)&&(S=1);else if(f.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(f)+"").trim(),u+="",_colorExp.lastIndex=0,_colorExp.test(l)||(g=getUnit(l),A=getUnit(u)),A?g!==A&&(l=_convertToUnit(e,f,l,A)+A):g&&(u+=g),this.add(a,"setProperty",l,u,n,r,0,0,f),s.push(f),v.push(f,0,a[f]);else if(d!=="undefined"){if(o&&f in o?(l=typeof o[f]=="function"?o[f].call(i,n,e,r):o[f],_isString(l)&&~l.indexOf("random(")&&(l=_replaceRandom(l)),getUnit(l+"")||(l+=_config.units[f]||getUnit(_get(e,f))||""),(l+"").charAt(1)==="="&&(l=_get(e,f))):l=_get(e,f),c=parseFloat(l),m=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),m&&(u=u.substr(2)),h=parseFloat(u),f in _propertyAliases&&(f==="autoAlpha"&&(c===1&&_get(e,"visibility")==="hidden"&&h&&(c=0),v.push("visibility",0,a.visibility),_addNonTweeningPT(this,a,"visibility",c?"inherit":"hidden",h?"inherit":"hidden",!h)),f!=="scale"&&f!=="transform"&&(f=_propertyAliases[f],~f.indexOf(",")&&(f=f.split(",")[0]))),y=f in _transformProps,y){if(this.styles.save(f),x||(T=e._gsap,T.renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),P=t.smoothOrigin!==!1&&T.smooth,x=this._pt=new PropTween(this._pt,a,_transformProp,0,1,T.renderTransform,T,0,-1),x.dep=1),f==="scale")this._pt=new PropTween(this._pt,T,"scaleY",T.scaleY,(m?_parseRelative(T.scaleY,m+h):h)-T.scaleY||0,_renderCSSProp),this._pt.u=0,s.push("scaleY",f),f+="X";else if(f==="transformOrigin"){v.push(_transformOriginProp,0,a[_transformOriginProp]),u=_convertKeywordsToPercentages(u),T.svg?_applySVGOrigin(e,u,0,P,0,this):(A=parseFloat(u.split(" ")[2])||0,A!==T.zOrigin&&_addNonTweeningPT(this,T,"zOrigin",T.zOrigin,A),_addNonTweeningPT(this,a,f,_firstTwoOnly(l),_firstTwoOnly(u)));continue}else if(f==="svgOrigin"){_applySVGOrigin(e,u,1,P,0,this);continue}else if(f in _rotationalProperties){_addRotationalPropTween(this,T,f,c,m?_parseRelative(c,m+u):u);continue}else if(f==="smoothOrigin"){_addNonTweeningPT(this,T,"smooth",T.smooth,u);continue}else if(f==="force3D"){T[f]=u;continue}else if(f==="transform"){_addRawTransformPTs(this,u,e);continue}}else f in a||(f=_checkPropPrefix(f)||f);if(y||(h||h===0)&&(c||c===0)&&!_complexExp.test(u)&&f in a)g=(l+"").substr((c+"").length),h||(h=0),A=getUnit(u)||(f in _config.units?_config.units[f]:g),g!==A&&(c=_convertToUnit(e,f,l,A)),this._pt=new PropTween(this._pt,y?T:a,f,c,(m?_parseRelative(c,m+h):h)-c,!y&&(A==="px"||f==="zIndex")&&t.autoRound!==!1?_renderRoundedCSSProp:_renderCSSProp),this._pt.u=A||0,g!==A&&A!=="%"&&(this._pt.b=l,this._pt.r=_renderCSSPropWithBeginning);else if(f in a)_tweenComplexCSSString.call(this,e,f,l,m?m+u:u);else if(f in e)this.add(e,f,l||e[f],m?m+u:u,n,r);else if(f!=="parseTransform"){_missingPlugin(f,u);continue}y||(f in a?v.push(f,0,a[f]):v.push(f,1,l||e[f])),s.push(f)}}S&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,i){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?i&&_recentSetterPlugin===i?t==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=i||{})&&(t==="scale"?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty,_getMatrix}};gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,function(_,e,t,i){var n=_forEachName(_+","+e+","+t,function(r){_transformProps[r]=1});_forEachName(e,function(r){_config.units[r]="deg",_rotationalProperties[r]=1}),_propertyAliases[n[13]]=_+","+e,_forEachName(i,function(r){var s=r.split(":");_propertyAliases[s[1]]=n[s[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(_){_config.units[_]="px"}),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap,TweenMaxWithCSS=gsapWithCSS.core.Tween;class winwheel{constructor(e,t){var i={canvasId:"canvas",centerX:null,centerY:null,outerRadius:null,innerRadius:0,numSegments:1,drawMode:"code",rotationAngle:0,textFontFamily:"Arial",textFontSize:20,textFontWeight:"bold",textOrientation:"horizontal",textAlignment:"center",textDirection:"normal",textMargin:null,textFillStyle:"black",textStrokeStyle:null,textLineWidth:1,fillStyle:"silver",strokeStyle:"black",lineWidth:1,clearTheCanvas:!0,imageOverlay:!1,drawText:!0,pointerAngle:0,wheelImage:null,imageDirection:"N",responsive:!1,scaleFactor:1};for(let n in i)e!=null&&typeof e[n]<"u"?this[n]=e[n]:this[n]=i[n];if(e!=null)for(let n in e)typeof this[n]>"u"&&(this[n]=e[n]);this.canvasId?(this.canvas=document.getElementById(this.canvasId),this.canvas?(this.centerX==null&&(this.centerX=this.canvas.width/2),this.centerY==null&&(this.centerY=this.canvas.height/2),this.outerRadius==null&&(this.canvas.width"u"&&(this.fillStyle=null),typeof e.strokeStyle>"u"&&(this.strokeStyle="red"),typeof e.drawText>"u"&&(this.drawText=!1),typeof e.lineWidth>"u"&&(this.lineWidth=1),typeof t>"u"&&(t=!1)):typeof t>"u"&&(t=!0),e!=null&&e.pointerGuide&&typeof e.pointerGuide<"u"?this.pointerGuide=new PointerGuide(e.pointerGuide):this.pointerGuide=new PointerGuide,this.responsive&&(WinWheelToDrawDuringAnimation=this,this._originalCanvasWidth=this.canvas.width,this._originalCanvasHeight=this.canvas.height,this._responsiveScaleHeight=this.canvas.dataset.responsivescaleheight,this._responsiveMinWidth=this.canvas.dataset.responsiveminwidth,this._responsiveMinHeight=this.canvas.dataset.responsiveminheight,this._responsiveMargin=this.canvas.dataset.responsivemargin,window.addEventListener("load",WinWheelResize),window.addEventListener("resize",WinWheelResize)),t==!0)this.draw(this.clearTheCanvas);else if(this.drawMode=="segmentImage"){WinWheelToDrawDuringAnimation=this,WinWheelAlreadyDrawn=!1;for(let n=1;n<=this.numSegments;n++)this.segments[n].image!==null&&(this.segments[n].imgData=new Image,this.segments[n].imgData.onload=WinWheelLoadedImage,this.segments[n].imgData.src=this.segments[n].image)}}updateSegmentSizes(){if(this.segments){let e=0,t=0;for(let s=1;s<=this.numSegments;s++)this.segments[s].size!==null&&(e+=this.segments[s].size,t++);let i=360-e,n=0;i>0&&(n=i/(this.numSegments-t));let r=0;for(let s=1;s<=this.numSegments;s++)this.segments[s].startAngle=r,this.segments[s].size?r+=this.segments[s].size:r+=n,this.segments[s].endAngle=r}}clearCanvas(){this.ctx&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)}draw(e){this.ctx&&(typeof e<"u"?e==!0&&this.clearCanvas():this.clearCanvas(),this.drawMode=="image"?(this.drawWheelImage(),this.drawText==!0&&this.drawSegmentText(),this.imageOverlay==!0&&this.drawSegments()):this.drawMode=="segmentImage"?(this.drawSegmentImages(),this.drawText==!0&&this.drawSegmentText(),this.imageOverlay==!0&&this.drawSegments()):(this.drawSegments(),this.drawText==!0&&this.drawSegmentText()),typeof this.pins<"u"&&this.pins.visible==!0&&this.drawPins(),this.pointerGuide.display==!0&&this.drawPointerGuide())}drawPins(){if(this.pins&&this.pins.number){let e=this.centerX*this.scaleFactor,t=this.centerY*this.scaleFactor,i=this.outerRadius*this.scaleFactor,n=this.pins.outerRadius,r=this.pins.margin;this.pins.responsive&&(n=this.pins.outerRadius*this.scaleFactor,r=this.pins.margin*this.scaleFactor);let s=360/this.pins.number;for(let a=1;a<=this.pins.number;a++)this.ctx.save(),this.ctx.strokeStyle=this.pins.strokeStyle,this.ctx.lineWidth=this.pins.lineWidth,this.ctx.fillStyle=this.pins.fillStyle,this.ctx.translate(e,t),this.ctx.rotate(this.degToRad(a*s+this.rotationAngle)),this.ctx.translate(-e,-t),this.ctx.beginPath(),this.ctx.arc(e,t-i+n+r,n,0,2*Math.PI),this.pins.fillStyle&&this.ctx.fill(),this.pins.strokeStyle&&this.ctx.stroke(),this.ctx.restore()}}drawPointerGuide(){if(this.ctx){let e=this.centerX*this.scaleFactor,t=this.centerY*this.scaleFactor,i=this.outerRadius*this.scaleFactor;this.ctx.save(),this.ctx.translate(e,t),this.ctx.rotate(this.degToRad(this.pointerAngle)),this.ctx.translate(-e,-t),this.ctx.strokeStyle=this.pointerGuide.strokeStyle,this.ctx.lineWidth=this.pointerGuide.lineWidth,this.ctx.beginPath(),this.ctx.moveTo(e,t),this.ctx.lineTo(e,-(i/4)),this.ctx.stroke(),this.ctx.restore()}}drawWheelImage(){if(this.wheelImage!=null){let e=this.centerX*this.scaleFactor,t=this.centerY*this.scaleFactor,i=this.wheelImage.width*this.scaleFactor,n=this.wheelImage.height*this.scaleFactor,r=e-i/2,s=t-n/2;this.ctx.save(),this.ctx.translate(e,t),this.ctx.rotate(this.degToRad(this.rotationAngle)),this.ctx.translate(-e,-t),this.ctx.drawImage(this.wheelImage,r,s,i,n),this.ctx.restore()}}drawSegmentImages(){if(this.ctx){let e=this.centerX*this.scaleFactor,t=this.centerY*this.scaleFactor;if(this.segments)for(let i=1;i<=this.numSegments;i++){let n=this.segments[i];if(n.imgData.height){let r=0,s=0,a=0,o="",l=n.imgData.width*this.scaleFactor,u=n.imgData.height*this.scaleFactor;n.imageDirection!==null?o=n.imageDirection:o=this.imageDirection,o=="S"?(r=e-l/2,s=t,a=n.startAngle+180+(n.endAngle-n.startAngle)/2):o=="E"?(r=e,s=t-u/2,a=n.startAngle+270+(n.endAngle-n.startAngle)/2):o=="W"?(r=e-l,s=t-u/2,a=n.startAngle+90+(n.endAngle-n.startAngle)/2):(r=e-l/2,s=t-u,a=n.startAngle+(n.endAngle-n.startAngle)/2),this.ctx.save(),this.ctx.translate(e,t),this.ctx.rotate(this.degToRad(this.rotationAngle+a)),this.ctx.translate(-e,-t),this.ctx.drawImage(n.imgData,r,s,l,u),this.ctx.restore()}else console.log("Segment "+i+" imgData is not loaded")}}}drawSegments(){if(this.ctx&&this.segments){let e=this.centerX*this.scaleFactor,t=this.centerY*this.scaleFactor,i=this.innerRadius*this.scaleFactor,n=this.outerRadius*this.scaleFactor;for(let r=1;r<=this.numSegments;r++){let s=this.segments[r],a,o,l;if(s.fillStyle!==null?a=s.fillStyle:a=this.fillStyle,this.ctx.fillStyle=a,s.lineWidth!==null?o=s.lineWidth:o=this.lineWidth,this.ctx.lineWidth=o,s.strokeStyle!==null?l=s.strokeStyle:l=this.strokeStyle,this.ctx.strokeStyle=l,l||a){if(this.ctx.beginPath(),!this.innerRadius)this.ctx.moveTo(e,t);else{let u=Math.cos(this.degToRad(s.startAngle+this.rotationAngle-90))*(i-o/2),h=Math.sin(this.degToRad(s.startAngle+this.rotationAngle-90))*(i-o/2);this.ctx.moveTo(e+u,t+h)}this.ctx.arc(e,t,n,this.degToRad(s.startAngle+this.rotationAngle-90),this.degToRad(s.endAngle+this.rotationAngle-90),!1),this.innerRadius?this.ctx.arc(e,t,i,this.degToRad(s.endAngle+this.rotationAngle-90),this.degToRad(s.startAngle+this.rotationAngle-90),!0):this.ctx.lineTo(e,t),a&&this.ctx.fill(),l&&this.ctx.stroke()}}}}drawSegmentText(){if(this.ctx){let e,t,i,n,r,s,a,o,l,u,h=this.centerX*this.scaleFactor,c=this.centerY*this.scaleFactor,d=this.outerRadius*this.scaleFactor,p=this.innerRadius*this.scaleFactor;for(let f=1;f<=this.numSegments;f++){this.ctx.save();let g=this.segments[f];if(g.text){g.textFontFamily!==null?e=g.textFontFamily:e=this.textFontFamily,g.textFontSize!==null?t=g.textFontSize:t=this.textFontSize,g.textFontWeight!==null?i=g.textFontWeight:i=this.textFontWeight,g.textOrientation!==null?n=g.textOrientation:n=this.textOrientation,g.textAlignment!==null?r=g.textAlignment:r=this.textAlignment,g.textDirection!==null?s=g.textDirection:s=this.textDirection,g.textMargin!==null?a=g.textMargin:a=this.textMargin,g.textFillStyle!==null?o=g.textFillStyle:o=this.textFillStyle,g.textStrokeStyle!==null?l=g.textStrokeStyle:l=this.textStrokeStyle,g.textLineWidth!==null?u=g.textLineWidth:u=this.textLineWidth,t=t*this.scaleFactor,a=a*this.scaleFactor;let A="";i!=null&&(A+=i+" "),t!=null&&(A+=t+"px "),e!=null&&(A+=e),this.ctx.font=A,this.ctx.fillStyle=o,this.ctx.strokeStyle=l,this.ctx.lineWidth=u;let m=g.text.split(` `),y=0-t*(m.length/2)+t/2;n=="curved"&&(r=="inner"||r=="outer")&&(y=0);for(let x=0;x=0;v--){let w=m[x].charAt(v);o&&this.ctx.fillText(w,h+y,P),l&&this.ctx.strokeText(w,h+y,P),P-=S}else if(r=="inner")for(let v=0;v1&&(v=S*(m[x].length-1)/2);let w=c+p+(d-p)/2+v+a;for(let b=m[x].length-1;b>=0;b--){let D=m[x].charAt(b);o&&this.ctx.fillText(D,h+y,w),l&&this.ctx.strokeText(D,h+y,w),w-=S}}this.ctx.restore()}else if(n=="curved"){let T=0;r=="inner"?(T=p+a,this.ctx.textBaseline="top"):r=="outer"?(T=d-a,this.ctx.textBaseline="bottom",T-=t*(m.length-1)):r=="center"&&(T=p+a+(d-p)/2,this.ctx.textBaseline="middle");let P=0,S=0;if(m[x].length>1){this.ctx.textAlign="left",P=4*(t/10);let v=100/T;P=P*v;let w=P*m[x].length;S=g.startAngle+((g.endAngle-g.startAngle)/2-w/2)}else S=g.startAngle+(g.endAngle-g.startAngle)/2,this.ctx.textAlign="center";S+=this.rotationAngle,S-=180;for(let v=m[x].length;v>=0;v--){this.ctx.save();let w=m[x].charAt(v);this.ctx.translate(h,c),this.ctx.rotate(this.degToRad(S)),this.ctx.translate(-h,-c),l&&this.ctx.strokeText(w,h,c+T+y),o&&this.ctx.fillText(w,h,c+T+y),S+=P,this.ctx.restore()}}}else if(n=="horizontal"){r=="inner"?this.ctx.textAlign="left":r=="outer"?this.ctx.textAlign="right":this.ctx.textAlign="center",this.ctx.textBaseline="middle";let T=this.degToRad(g.endAngle-(g.endAngle-g.startAngle)/2+this.rotationAngle-90);this.ctx.save(),this.ctx.translate(h,c),this.ctx.rotate(T),this.ctx.translate(-h,-c),r=="inner"?(o&&this.ctx.fillText(m[x],h+p+a,c+y),l&&this.ctx.strokeText(m[x],h+p+a,c+y)):r=="outer"?(o&&this.ctx.fillText(m[x],h+d-a,c+y),l&&this.ctx.strokeText(m[x],h+d-a,c+y)):(o&&this.ctx.fillText(m[x],h+p+(d-p)/2+a,c+y),l&&this.ctx.strokeText(m[x],h+p+(d-p)/2+a,c+y)),this.ctx.restore()}else if(n=="vertical"){this.ctx.textAlign="center",r=="inner"?this.ctx.textBaseline="bottom":r=="outer"?this.ctx.textBaseline="top":this.ctx.textBaseline="middle";let T=g.endAngle-(g.endAngle-g.startAngle)/2;T+=this.rotationAngle,this.ctx.save(),this.ctx.translate(h,c),this.ctx.rotate(this.degToRad(T)),this.ctx.translate(-h,-c);let P=0;r=="outer"?P=c-d+a:r=="inner"&&(P=c-p-a);let S=t-t/9;if(r=="outer")for(let v=0;v=0;v--){let w=m[x].charAt(v);o&&this.ctx.fillText(w,h+y,P),l&&this.ctx.strokeText(w,h+y,P),P-=S}else if(r=="center"){let v=0;m[x].length>1&&(v=S*(m[x].length-1)/2);let w=c-p-(d-p)/2-v-a;for(let b=0;b1){this.ctx.textAlign="left",P=4*(t/10);let v=100/T;P=P*v;let w=P*m[x].length;S=g.startAngle+((g.endAngle-g.startAngle)/2-w/2)}else S=g.startAngle+(g.endAngle-g.startAngle)/2,this.ctx.textAlign="center";S+=this.rotationAngle;for(let v=0;vt;r--)this.segments[r]=this.segments[r-1];this.segments[t]=i,n=t}else this.segments[this.numSegments]=i,n=this.numSegments;return this.updateSegmentSizes(),this.segments[n]}setCanvasId(e){e?(this.canvasId=e,this.canvas=document.getElementById(this.canvasId),this.canvas&&(this.ctx=this.canvas.getContext("2d"))):(this.canvasId=null,this.ctx=null,this.canvas=null)}deleteSegment(e){if(this.numSegments>1){if(typeof e<"u")for(let t=e;tl?(s=i.x-l,r="R"):(s=l-i.x,r="L"),i.y>u?(a=i.y-u,n="B"):(a=u-i.y,n="T");let d=a/s,p=Math.atan(d)*180/Math.PI,f=0;if(o=Math.sqrt(a*a+s*s),n=="T"&&r=="R"?f=Math.round(90-p):n=="B"&&r=="R"?f=Math.round(p+90):n=="B"&&r=="L"?f=Math.round(90-p+180):n=="T"&&r=="L"&&(f=Math.round(p+270)),this.rotationAngle!=0){let A=this.getRotationPosition();f=f-A,f<0&&(f=360-Math.abs(f))}let g=null;for(let A=1;A<=this.numSegments;A++)if(f>=this.segments[A].startAngle&&f<=this.segments[A].endAngle&&o>=c&&o<=h){g=A;break}return g}getIndicatedSegment(){let e=this.getIndicatedSegmentNumber();return this.segments[e]}getIndicatedSegmentNumber(){let e=0,t=this.getRotationPosition(),i=Math.floor(this.pointerAngle-t);i<0&&(i=360-Math.abs(i));for(let n=1;n=this.segments[n].startAngle&&i<=this.segments[n].endAngle){e=n;break}return e}getCurrentPinNumber(){let e=0;if(this.pins){let t=this.getRotationPosition(),i=Math.floor(this.pointerAngle-t);i<0&&(i=360-Math.abs(i));let n=360/this.pins.number,r=0;for(let s=0;s=r&&i<=r+n){e=s;break}r+=n}this.animation.direction=="clockwise"&&(e++,e>this.pins.number&&(e=0))}return e}getRotationPosition(){let e=this.rotationAngle;if(e>=0){if(e>360){let t=Math.floor(e/360);e=e-360*t}}else{if(e<-360){let t=Math.ceil(e/360);e=e-360*t}e=360+e}return e}startAnimation(){if(this.animation){this.computeAnimation(),WinWheelToDrawDuringAnimation=this;let e=new Array(null);e[this.animation.propertyName]=this.animation.propertyValue,e.yoyo=this.animation.yoyo,e.repeat=this.animation.repeat,e.ease=this.animation.easing,e.onUpdate=WinWheelAnimationLoop,e.onComplete=WinWheelStopAnimation,this.tween=TweenMaxWithCSS.to(this,this.animation.duration,e)}}stopAnimation(e){WinWheelToDrawDuringAnimation&&(WinWheelToDrawDuringAnimation.tween&&WinWheelToDrawDuringAnimation.tween.kill(),WinWheelStopAnimation(e)),WinWheelToDrawDuringAnimation=this}pauseAnimation(){this.tween&&this.tween.pause()}resumeAnimation(){this.tween&&this.tween.play()}computeAnimation(){this.animation&&(this.animation.type=="spinOngoing"?(this.animation.propertyName="rotationAngle",this.animation.spins==null&&(this.animation.spins=5),this.animation.repeat==null&&(this.animation.repeat=-1),this.animation.easing==null&&(this.animation.easing="Linear.easeNone"),this.animation.yoyo==null&&(this.animation.yoyo=!1),this.animation.propertyValue=this.animation.spins*360,this.animation.direction=="anti-clockwise"&&(this.animation.propertyValue=0-this.animation.propertyValue)):this.animation.type=="spinToStop"?(this.animation.propertyName="rotationAngle",this.animation.spins==null&&(this.animation.spins=5),this.animation.repeat==null&&(this.animation.repeat=0),this.animation.easing==null&&(this.animation.easing="Power3.easeOut"),this.animation.stopAngle==null?this.animation._stopAngle=Math.floor(Math.random()*359):this.animation._stopAngle=360-this.animation.stopAngle+this.pointerAngle,this.animation.yoyo==null&&(this.animation.yoyo=!1),this.animation.propertyValue=this.animation.spins*360,this.animation.direction=="anti-clockwise"?(this.animation.propertyValue=0-this.animation.propertyValue,this.animation.propertyValue-=360-this.animation._stopAngle):this.animation.propertyValue+=this.animation._stopAngle):this.animation.type=="spinAndBack"?(this.animation.propertyName="rotationAngle",this.animation.spins==null&&(this.animation.spins=5),this.animation.repeat==null&&(this.animation.repeat=1),this.animation.easing==null&&(this.animation.easing="Power2.easeInOut"),this.animation.yoyo==null&&(this.animation.yoyo=!0),this.animation.stopAngle==null?this.animation._stopAngle=0:this.animation._stopAngle=360-this.animation.stopAngle,this.animation.propertyValue=this.animation.spins*360,this.animation.direction=="anti-clockwise"?(this.animation.propertyValue=0-this.animation.propertyValue,this.animation.propertyValue-=360-this.animation._stopAngle):this.animation.propertyValue+=this.animation._stopAngle):this.animation.type=="custom")}getRandomForSegment(e){let t=0;if(e)if(typeof this.segments[e]<"u"){let i=this.segments[e].startAngle,r=this.segments[e].endAngle-i-2;r>0?t=i+1+Math.floor(Math.random()*r):console.log("Segment size is too small to safely get random angle inside it")}else console.log("Segment "+e+" undefined");else console.log("Segment number not specified");return t}}class Pin{constructor(e){let t={visible:!0,number:36,outerRadius:3,fillStyle:"grey",strokeStyle:"black",lineWidth:1,margin:3,responsive:!1};for(let i in t)e!=null&&typeof e[i]<"u"?this[i]=e[i]:this[i]=t[i];if(e!=null)for(let i in e)typeof this[i]>"u"&&(this[i]=e[i])}}class Animation{constructor(e){let t={type:"spinOngoing",direction:"clockwise",propertyName:null,propertyValue:null,duration:10,yoyo:!1,repeat:null,easing:null,stopAngle:null,spins:null,clearTheCanvas:null,callbackFinished:null,callbackBefore:null,callbackAfter:null,callbackSound:null,soundTrigger:"segment"};for(let i in t)e!=null&&typeof e[i]<"u"?this[i]=e[i]:this[i]=t[i];if(e!=null)for(let i in e)typeof this[i]>"u"&&(this[i]=e[i])}}class Segment{constructor(e){let t={size:null,text:"",fillStyle:null,strokeStyle:null,lineWidth:null,textFontFamily:null,textFontSize:null,textFontWeight:null,textOrientation:null,textAlignment:null,textDirection:null,textMargin:null,textFillStyle:null,textStrokeStyle:null,textLineWidth:null,image:null,imageDirection:null,imgData:null};for(let i in t)e!=null&&typeof e[i]<"u"?this[i]=e[i]:this[i]=t[i];if(e!=null)for(let i in e)typeof this[i]>"u"&&(this[i]=e[i]);this.startAngle=0,this.endAngle=0}changeImage(e,t){this.image=e,this.imgData=null,t&&(this.imageDirection=t),WinWheelAlreadyDrawn=!1,this.imgData=new Image,this.imgData.onload=WinWheelLoadedImage,this.imgData.src=this.image}}class PointerGuide{constructor(e){let t={display:!1,strokeStyle:"red",lineWidth:3};for(let i in t)e!=null&&typeof e[i]<"u"?this[i]=e[i]:this[i]=t[i]}}function WinWheelAnimationLoop(){if(WinWheelToDrawDuringAnimation){WinWheelToDrawDuringAnimation.animation.clearTheCanvas!=!1&&WinWheelToDrawDuringAnimation.ctx.clearRect(0,0,WinWheelToDrawDuringAnimation.canvas.width,WinWheelToDrawDuringAnimation.canvas.height);let callbackBefore=WinWheelToDrawDuringAnimation.animation.callbackBefore,callbackAfter=WinWheelToDrawDuringAnimation.animation.callbackAfter;callbackBefore!=null&&(typeof callbackBefore=="function"?callbackBefore():eval(callbackBefore)),WinWheelToDrawDuringAnimation.draw(!1),callbackAfter!=null&&(typeof callbackAfter=="function"?callbackAfter():eval(callbackAfter)),WinWheelToDrawDuringAnimation.animation.callbackSound&&WinWheelTriggerSound()}}function WinWheelTriggerSound(){WinWheelToDrawDuringAnimation.hasOwnProperty("_lastSoundTriggerNumber")==!1&&(WinWheelToDrawDuringAnimation._lastSoundTriggerNumber=0);let callbackSound=WinWheelToDrawDuringAnimation.animation.callbackSound,currentTriggerNumber=0;WinWheelToDrawDuringAnimation.animation.soundTrigger=="pin"?currentTriggerNumber=WinWheelToDrawDuringAnimation.getCurrentPinNumber():currentTriggerNumber=WinWheelToDrawDuringAnimation.getIndicatedSegmentNumber(),currentTriggerNumber!=WinWheelToDrawDuringAnimation._lastSoundTriggerNumber&&(typeof callbackSound=="function"?callbackSound():eval(callbackSound),WinWheelToDrawDuringAnimation._lastSoundTriggerNumber=currentTriggerNumber)}let WinWheelToDrawDuringAnimation=null;function WinWheelStopAnimation(canCallback){if(canCallback!=!1){let callback=WinWheelToDrawDuringAnimation.animation.callbackFinished;callback!=null&&(typeof callback=="function"?callback(WinWheelToDrawDuringAnimation.getIndicatedSegment()):eval(callback))}}let WinWheelAlreadyDrawn=!1;function WinWheelLoadedImage(){if(WinWheelAlreadyDrawn==!1){let _=0;for(let e=1;e<=WinWheelToDrawDuringAnimation.numSegments;e++)WinWheelToDrawDuringAnimation.segments[e].imgData!=null&&WinWheelToDrawDuringAnimation.segments[e].imgData.height&&_++;_==WinWheelToDrawDuringAnimation.numSegments&&(WinWheelAlreadyDrawn=!0,WinWheelToDrawDuringAnimation.draw())}}function WinWheelResize(){let _=40;typeof WinWheelToDrawDuringAnimation._responsiveMargin<"u"&&(_=WinWheelToDrawDuringAnimation._responsiveMargin);let e=window.innerWidth-_,t=WinWheelToDrawDuringAnimation._responsiveMinWidth,i=WinWheelToDrawDuringAnimation._responsiveMinHeight;eWinWheelToDrawDuringAnimation._originalCanvasWidth&&(e=WinWheelToDrawDuringAnimation._originalCanvasWidth);let n=e/WinWheelToDrawDuringAnimation._originalCanvasWidth;if(WinWheelToDrawDuringAnimation.canvas.width=WinWheelToDrawDuringAnimation._originalCanvasWidth*n,WinWheelToDrawDuringAnimation._responsiveScaleHeight){let r=WinWheelToDrawDuringAnimation._originalCanvasHeight*n;rWinWheelToDrawDuringAnimation._originalCanvasHeight&&(r=WinWheelToDrawDuringAnimation._originalCanvasHeight),WinWheelToDrawDuringAnimation.canvas.height=r}WinWheelToDrawDuringAnimation.scaleFactor=n,WinWheelToDrawDuringAnimation.draw()}const _withScopeId=_=>(vue.pushScopeId("data-v-55340b99"),_=_(),vue.popScopeId(),_),_hoisted_1={id:"canvas-container",class:"canvas-container d-flex align-center content-center direction-column"},_hoisted_2=["height","width","id"],_hoisted_3=_withScopeId(()=>vue.createElementVNode("img",{id:"prize-pointer",class:"prize-pointer",src:_imports_0,alt:"prize pointer"},null,-1)),_sfc_main=vue.defineComponent({__name:"VueWinWheel",props:{options:{default:{canvasId:"canvas",centerX:250,centerY:250,outerRadius:246,rotationAngle:0,textFontFamily:"Arial",textFontWeight:"bold",textFillStyle:"black",textStrokeStyle:null,textLineWidth:1,fillStyle:"silver",strokeStyle:"black",clearTheCanvas:!0,imageOverlay:!1,drawText:!0,pointerAngle:0,wheelImage:null,imageDirection:"N",responsive:!1,scaleFactor:1,textFontSize:12,innerRadius:30,lineWidth:4,textAlignment:"center",textDirection:"normal",textOrientation:"horizontal",textMargin:1,drawMode:"code",imageSrc:null,numSegments:4,segments:[{fillStyle:"#eae56f",text:"Prize One"},{fillStyle:"#89f26e",text:"Prize Two"},{fillStyle:"#7de6ef",text:"Prize Three"},{fillStyle:"#e7706f",text:"Prize Four"}],animation:{type:"spinToStop",duration:3,spins:3,callbackSound:()=>console.log("callbackSound"),callbackFinished:()=>console.log("callbackFinished")}}},canvasWidth:{default:500},canvasHeight:{default:500},stopAt:{default:1}},setup(_,{expose:e}){const t=_;let i=vue.ref({}),n=vue.ref({}),r=vue.ref(t.stopAt);function s(l=null){var h,c,d,p,f,g;const u={...t==null?void 0:t.options,centerX:(t.canvasWidth||500)/2,centerY:(t.canvasHeight||500)/2};if((h=t==null?void 0:t.options)!=null&&h.innerWheelOptions&&(n.value=new winwheel((c=t.options)==null?void 0:c.innerWheelOptions)),i.value=new winwheel(u),l&&l(i.value,n.value),((d=t==null?void 0:t.options)==null?void 0:d.drawMode)==="image"&&((p=t==null?void 0:t.options)==null?void 0:p.imageSrc)!=null){let A=new Image;A.onload=function(){i.value.wheelImage=A,i.value.draw()},A.src=(f=t==null?void 0:t.options)==null?void 0:f.imageSrc}else(g=t==null?void 0:t.options)!=null&&g.innerWheelOptions&&(i.value.draw(),n.value.draw(!1))}function a(l=null){s(l),i.value.startAnimation()}function o(l=null,u=null){s(u);const h=l||r.value;i.value.animation.stopAngle=360/t.options.segments.length*parseInt(h)-360/t.options.segments.length/2,i.value.startAnimation()}return vue.onMounted(()=>{s()}),e({spin:a,spinAndStopAt:o}),(l,u)=>{var h;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("canvas",{height:t.canvasHeight||500,width:t.canvasWidth||500,id:((h=t==null?void 0:t.options)==null?void 0:h.canvasId)||"canvas"},null,8,_hoisted_2),_hoisted_3])}}}),VueWinWheel_vue_vue_type_style_index_0_scoped_55340b99_lang="",_export_sfc=(_,e)=>{const t=_.__vccOpts||_;for(const[i,n]of e)t[i]=n;return t},VueWinWheel=_export_sfc(_sfc_main,[["__scopeId","data-v-55340b99"]]);exports.VueWinWheel=VueWinWheel,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});