UNPKG

phaser

Version:

A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.

1 lines 377 kB
(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r<n;r++)a[r]=s[r].fn;return a},o.prototype.listenerCount=function(t){var e=i?i+t:t,s=this._events[e];return s?s.fn?1:s.length:0},o.prototype.emit=function(t,e,s,r,n,a){var o=i?i+t:t;if(!this._events[o])return!1;var h,l,c=this._events[o],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,s),!0;case 4:return c.fn.call(c.context,e,s,r),!0;case 5:return c.fn.call(c.context,e,s,r,n),!0;case 6:return c.fn.call(c.context,e,s,r,n,a),!0}for(l=1,h=new Array(u-1);l<u;l++)h[l-1]=arguments[l];c.fn.apply(c.context,h)}else{var d,f=c.length;for(l=0;l<f;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,s);break;case 4:c[l].fn.call(c[l].context,e,s,r);break;default:if(!h)for(d=1,h=new Array(u-1);d<u;d++)h[d-1]=arguments[d];c[l].fn.apply(c[l].context,h)}}return!0},o.prototype.on=function(t,e,i){return n(this,t,e,i,!1)},o.prototype.once=function(t,e,i){return n(this,t,e,i,!0)},o.prototype.removeListener=function(t,e,s,r){var n=i?i+t:t;if(!this._events[n])return this;if(!e)return a(this,n),this;var o=this._events[n];if(o.fn)o.fn!==e||r&&!o.once||s&&o.context!==s||a(this,n);else{for(var h=0,l=[],c=o.length;h<c;h++)(o[h].fn!==e||r&&!o[h].once||s&&o[h].context!==s)&&l.push(o[h]);l.length?this._events[n]=1===l.length?l[0]:l:a(this,n)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,t.exports=o},6937:t=>{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>C,AnimationState:()=>kt,AnimationStateAdapter:()=>Ot,AnimationStateData:()=>Vt,AssetManager:()=>Ei,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>mt,BinaryInput:()=>Pe,BlendMode:()=>ke,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CameraController:()=>ji,ClippingAttachment:()=>Wt,Color:()=>h,Color2Attribute:()=>is,ColorAttribute:()=>es,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>m,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Lt,EventTimeline:()=>yt,EventType:()=>Pt,FIRST:()=>Dt,FakeTexture:()=>Zt,GLTexture:()=>Mi,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>zt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>ge,IkConstraintTimeline:()=>At,Input:()=>qi,IntSet:()=>n,Interpolation:()=>u,LoadingScreen:()=>Ms,M00:()=>Ti,M01:()=>Ii,M02:()=>Ci,M03:()=>Ri,M10:()=>ki,M11:()=>Fi,M12:()=>Li,M13:()=>Pi,M20:()=>Oi,M21:()=>Yi,M22:()=>Di,M23:()=>Xi,M30:()=>Bi,M31:()=>zi,M32:()=>_i,M33:()=>Ni,ManagedWebGLRenderingContext:()=>yi,MathUtils:()=>c,Matrix4:()=>Ui,Mesh:()=>Ki,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>k,OrthoCamera:()=>Wi,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>me,PathConstraintMixTimeline:()=>Tt,PathConstraintPositionTimeline:()=>Et,PathConstraintSpacingTimeline:()=>St,PointAttachment:()=>ie,PolygonBatcher:()=>ns,Pool:()=>x,Position2Attribute:()=>Qi,Position3Attribute:()=>$i,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>gt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,ResizeMode:()=>ws,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>_t,SUBSEQUENT:()=>Yt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SceneRenderer:()=>ys,SequenceTimeline:()=>Ct,Shader:()=>Zi,ShapeRenderer:()=>as,ShapeType:()=>os,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Se,SkeletonBinary:()=>Le,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Te,SkeletonDebugRenderer:()=>ls,SkeletonJson:()=>fi,SkeletonRenderer:()=>ds,Skin:()=>Ce,SkinEntry:()=>Ie,Slot:()=>Ae,SlotData:()=>Re,SpacingMode:()=>ve,SpineCanvas:()=>Ts,StringSet:()=>a,TexCoordAttribute:()=>ts,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>y,Timeline:()=>J,Touch:()=>Gi,TrackEntry:()=>Ft,TransformConstraint:()=>Me,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>Mt,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>g,Vector2:()=>v,Vector3:()=>Si,VertexAttachment:()=>M,VertexAttribute:()=>Ji,VertexAttributeType:()=>ss,WebGLBlendModeConverter:()=>bi,WindowedMean:()=>w});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i<s;i++)this.add(t[i]);return e!=this.size}contains(t){return this.entries[t]}clear(){this.entries={},this.size=0}},o=class{constructor(t=0,e=0,i=0,s=0){this.r=t,this.g=e,this.b=i,this.a=s}set(t,e,i,s){return this.r=t,this.g=e,this.b=i,this.a=s,this.clamp()}setFromColor(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}setFromString(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}add(t,e,i,s){return this.r+=t,this.g+=e,this.b+=i,this.a+=s,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return t<e?e:t>i?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n<e+r;n++,a++)i[a]=t[n]}static arrayFill(t,e,i,s){for(let r=e;r<i;r++)t[r]=s}static setArraySize(t,e,i=0){let s=t.length;if(s==e)return t;if(t.length=e,s<e)for(let r=s;r<e;r++)t[r]=i;return t}static ensureArrayCapacity(t,e,i=0){return t.length>=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s<t;s++)i[s]=e;return i}static newFloatArray(t){if(p.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);{let e=new Array(t);for(let t=0;t<e.length;t++)e[t]=0;return e}}static newShortArray(t){if(p.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);{let e=new Array(t);for(let t=0;t<e.length;t++)e[t]=0;return e}}static toFloatArray(t){return p.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t}static toSinglePrecision(t){return p.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t}static webkit602BugfixHelper(t,e){}static contains(t,e,i=!0){for(var s=0;s<t.length;s++)if(t[s]==e)return!0;return!1}static enumValue(t,e){return t[e[0].toUpperCase()+e.slice(1)]}},g=p;g.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array;var m=class{static logBones(t){for(let e=0;e<t.bones.length;e++){let i=t.bones[e];console.log(i.data.name+", "+i.a+", "+i.b+", "+i.c+", "+i.d+", "+i.worldX+", "+i.worldY)}}},x=class{constructor(t){this.items=new Array,this.instantiator=t}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;e<t.length;e++)this.free(t[e])}clear(){this.items.length=0}},v=class{constructor(t=0,e=0){this.x=t,this.y=e}set(t,e){return this.x=t,this.y=e,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}normalize(){let t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}},y=class{constructor(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}update(){let t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0}},b=class{constructor(t){if(!t)throw new Error("name cannot be null.");this.name=t}},A=class extends b{constructor(t){super(t),this.id=A.nextID++,this.bones=null,this.vertices=[],this.worldVerticesLength=0,this.timelineAttachment=this}computeWorldVertices(t,e,i,s,r,n){i=r+(i>>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a<i;t+=2,a+=n){let e=h[t],i=h[t+1];s[a]=e*u+i*d+l,s[a+1]=e*f+i*p+c}return}let c=0,u=0;for(let t=0;t<e;t+=2){let t=l[c];c+=t+1,u+=t}let d=a.bones;if(0==o.length)for(let t=r,e=3*u;t<i;t+=n){let i=0,r=0,n=l[c++];for(n+=c;c<n;c++,e+=3){let t=d[l[c]],s=h[e],n=h[e+1],a=h[e+2];i+=(s*t.a+n*t.b+t.worldX)*a,r+=(s*t.c+n*t.d+t.worldY)*a}s[t]=i,s[t+1]=r}else{let t=o;for(let e=r,a=3*u,o=u<<1;e<i;e+=n){let i=0,r=0,n=l[c++];for(n+=c;c<n;c++,a+=3,o+=2){let e=d[l[c]],s=h[a]+t[o],n=h[a+1]+t[o+1],u=h[a+2];i+=(s*e.a+n*e.b+e.worldX)*u,r+=(s*e.c+n*e.d+e.worldY)*u}s[e]=i,s[e+1]=r}}}copyTo(t){this.bones?(t.bones=new Array(this.bones.length),g.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=g.newFloatArray(this.vertices.length),g.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment}},M=A;M.nextID=0;var E=class{constructor(t){this.id=E.nextID(),this.start=0,this.digits=0,this.setupIndex=0,this.regions=new Array(t)}copy(){let t=new E(this.regions.length);return g.arrayCopy(this.regions,0,t.regions,0,this.regions.length),t.start=this.start,t.digits=this.digits,t.setupIndex=this.setupIndex,t}apply(t,e){let i=t.sequenceIndex;-1==i&&(i=this.setupIndex),i>=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return E._nextID++}},S=E;S._nextID=0;var T=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(T||{}),I=[0,1,2,3,4,5,6],C=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e<t.length;e++)this.timelineIds.addAll(t[e].getPropertyIds())}hasTimeline(t){for(let e=0;e<t.length;e++)if(this.timelineIds.contains(t[e]))return!0;return!1}apply(t,e,i,s,r,n,a,o){if(!t)throw new Error("skeleton cannot be null.");s&&0!=this.duration&&(i%=this.duration,e>0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s<l;s++)h[s].apply(t,e,i,r,n,a,o)}},R=(t=>(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),k=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(k||{}),F=0,L=1,P=2,O=3,Y=4,D=5,X=6,B=7,z=8,_=9,N=10,V=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;s<i;s++)if(t[s]>e)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;r<s;r+=i)if(t[r]>e)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=g.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=g.newFloatArray(e);g.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),g=.006*(3*(n-o)-s+l),m=.006*(3*(a-h)-r+c),x=2*f+g,v=2*p+m,y=.3*(n-s)+f+.16666667*g,w=.3*(a-r)+p+.16666667*m,b=s+y,A=r+w;for(let t=d+18;d<t;d+=2)u[d]=b,u[d+1]=A,y+=x,w+=v,x+=g,v+=m,b+=y,A+=w}getBezierValue(t,e,i,s){let r=this.curves;if(r[s]>t){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s<n;s+=2)if(r[s]>=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.rotation=o.data.rotation);case 1:o.rotation+=(o.data.rotation-o.rotation)*r}return}let h=this.getCurveValue(i);switch(n){case 0:o.rotation=o.data.rotation+h*r;break;case 1:case 2:h+=o.data.rotation-o.rotation;case 3:o.rotation+=h*r}}},it=class extends tt{constructor(t,e,i){super(t,e,L+"|"+i,P+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;let h=this.frames;if(i<h[0]){switch(n){case 0:return o.x=o.data.x,void(o.y=o.data.y);case 1:o.x+=(o.data.x-o.x)*r,o.y+=(o.data.y-o.y)*r}return}let l=0,c=0,u=J.search(h,i,3),d=this.curves[u/3];switch(d){case 0:let t=h[u];l=h[u+1],c=h[u+2];let e=(i-t)/(h[u+3]-t);l+=(h[u+3+1]-l)*e,c+=(h[u+3+2]-c)*e;break;case 1:l=h[u+1],c=h[u+2];break;default:l=this.getBezierValue(i,u,1,d-2),c=this.getBezierValue(i,u,2,d+18-2)}switch(n){case 0:o.x=o.data.x+l*r,o.y=o.data.y+c*r;break;case 1:case 2:o.x+=(o.data.x+l-o.x)*r,o.y+=(o.data.y+c-o.y)*r;break;case 3:o.x+=l*r,o.y+=c*r}}},st=class extends ${constructor(t,e,i){super(t,e,L+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.x=o.data.x);case 1:o.x+=(o.data.x-o.x)*r}return}let h=this.getCurveValue(i);switch(n){case 0:o.x=o.data.x+h*r;break;case 1:case 2:o.x+=(o.data.x+h-o.x)*r;break;case 3:o.x+=h*r}}},rt=class extends ${constructor(t,e,i){super(t,e,P+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.y=o.data.y);case 1:o.y+=(o.data.y-o.y)*r}return}let h=this.getCurveValue(i);switch(n){case 0:o.y=o.data.y+h*r;break;case 1:case 2:o.y+=(o.data.y+h-o.y)*r;break;case 3:o.y+=h*r}}},nt=class extends tt{constructor(t,e,i){super(t,e,O+"|"+i,Y+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;let h,l,u=this.frames;if(i<u[0]){switch(n){case 0:return o.scaleX=o.data.scaleX,void(o.scaleY=o.data.scaleY);case 1:o.scaleX+=(o.data.scaleX-o.scaleX)*r,o.scaleY+=(o.data.scaleY-o.scaleY)*r}return}let d=J.search(u,i,3),f=this.curves[d/3];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2];let e=(i-t)/(u[d+3]-t);h+=(u[d+3+1]-h)*e,l+=(u[d+3+2]-l)*e;break;case 1:h=u[d+1],l=u[d+2];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2)}if(h*=o.data.scaleX,l*=o.data.scaleY,1==r)3==n?(o.scaleX+=h-o.data.scaleX,o.scaleY+=l-o.data.scaleY):(o.scaleX=h,o.scaleY=l);else{let t=0,e=0;if(1==a)switch(n){case 0:t=o.data.scaleX,e=o.data.scaleY,o.scaleX=t+(Math.abs(h)*c.signum(t)-t)*r,o.scaleY=e+(Math.abs(l)*c.signum(e)-e)*r;break;case 1:case 2:t=o.scaleX,e=o.scaleY,o.scaleX=t+(Math.abs(h)*c.signum(t)-t)*r,o.scaleY=e+(Math.abs(l)*c.signum(e)-e)*r;break;case 3:o.scaleX+=(h-o.data.scaleX)*r,o.scaleY+=(l-o.data.scaleY)*r}else switch(n){case 0:t=Math.abs(o.data.scaleX)*c.signum(h),e=Math.abs(o.data.scaleY)*c.signum(l),o.scaleX=t+(h-t)*r,o.scaleY=e+(l-e)*r;break;case 1:case 2:t=Math.abs(o.scaleX)*c.signum(h),e=Math.abs(o.scaleY)*c.signum(l),o.scaleX=t+(h-t)*r,o.scaleY=e+(l-e)*r;break;case 3:o.scaleX+=(h-o.data.scaleX)*r,o.scaleY+=(l-o.data.scaleY)*r}}}},at=class extends ${constructor(t,e,i){super(t,e,O+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.scaleX=o.data.scaleX);case 1:o.scaleX+=(o.data.scaleX-o.scaleX)*r}return}let h=this.getCurveValue(i)*o.data.scaleX;if(1==r)3==n?o.scaleX+=h-o.data.scaleX:o.scaleX=h;else{let t=0;if(1==a)switch(n){case 0:t=o.data.scaleX,o.scaleX=t+(Math.abs(h)*c.signum(t)-t)*r;break;case 1:case 2:t=o.scaleX,o.scaleX=t+(Math.abs(h)*c.signum(t)-t)*r;break;case 3:o.scaleX+=(h-o.data.scaleX)*r}else switch(n){case 0:t=Math.abs(o.data.scaleX)*c.signum(h),o.scaleX=t+(h-t)*r;break;case 1:case 2:t=Math.abs(o.scaleX)*c.signum(h),o.scaleX=t+(h-t)*r;break;case 3:o.scaleX+=(h-o.data.scaleX)*r}}}},ot=class extends ${constructor(t,e,i){super(t,e,Y+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.scaleY=o.data.scaleY);case 1:o.scaleY+=(o.data.scaleY-o.scaleY)*r}return}let h=this.getCurveValue(i)*o.data.scaleY;if(1==r)3==n?o.scaleY+=h-o.data.scaleY:o.scaleY=h;else{let t=0;if(1==a)switch(n){case 0:t=o.data.scaleY,o.scaleY=t+(Math.abs(h)*c.signum(t)-t)*r;break;case 1:case 2:t=o.scaleY,o.scaleY=t+(Math.abs(h)*c.signum(t)-t)*r;break;case 3:o.scaleY+=(h-o.data.scaleY)*r}else switch(n){case 0:t=Math.abs(o.data.scaleY)*c.signum(h),o.scaleY=t+(h-t)*r;break;case 1:case 2:t=Math.abs(o.scaleY)*c.signum(h),o.scaleY=t+(h-t)*r;break;case 3:o.scaleY+=(h-o.data.scaleY)*r}}}},ht=class extends tt{constructor(t,e,i){super(t,e,D+"|"+i,X+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;let h=this.frames;if(i<h[0]){switch(n){case 0:return o.shearX=o.data.shearX,void(o.shearY=o.data.shearY);case 1:o.shearX+=(o.data.shearX-o.shearX)*r,o.shearY+=(o.data.shearY-o.shearY)*r}return}let l=0,c=0,u=J.search(h,i,3),d=this.curves[u/3];switch(d){case 0:let t=h[u];l=h[u+1],c=h[u+2];let e=(i-t)/(h[u+3]-t);l+=(h[u+3+1]-l)*e,c+=(h[u+3+2]-c)*e;break;case 1:l=h[u+1],c=h[u+2];break;default:l=this.getBezierValue(i,u,1,d-2),c=this.getBezierValue(i,u,2,d+18-2)}switch(n){case 0:o.shearX=o.data.shearX+l*r,o.shearY=o.data.shearY+c*r;break;case 1:case 2:o.shearX+=(o.data.shearX+l-o.shearX)*r,o.shearY+=(o.data.shearY+c-o.shearY)*r;break;case 3:o.shearX+=l*r,o.shearY+=c*r}}},lt=class extends ${constructor(t,e,i){super(t,e,D+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.shearX=o.data.shearX);case 1:o.shearX+=(o.data.shearX-o.shearX)*r}return}let h=this.getCurveValue(i);switch(n){case 0:o.shearX=o.data.shearX+h*r;break;case 1:case 2:o.shearX+=(o.data.shearX+h-o.shearX)*r;break;case 3:o.shearX+=h*r}}},ct=class extends ${constructor(t,e,i){super(t,e,X+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.shearY=o.data.shearY);case 1:o.shearY+=(o.data.shearY-o.shearY)*r}return}let h=this.getCurveValue(i);switch(n){case 0:o.shearY=o.data.shearY+h*r;break;case 1:case 2:o.shearY+=(o.data.shearY+h-o.shearY)*r;break;case 3:o.shearY+=h*r}}},ut=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 5}setFrame(t,e,i,s,r,n){t*=5,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color;if(i<h[0]){let t=o.data.color;switch(n){case 0:return void l.setFromColor(t);case 1:l.add((t.r-l.r)*r,(t.g-l.g)*r,(t.b-l.b)*r,(t.a-l.a)*r)}return}let c=0,u=0,d=0,f=0,p=J.search(h,i,5),g=this.curves[p/5];switch(g){case 0:let t=h[p];c=h[p+1],u=h[p+2],d=h[p+3],f=h[p+4];let e=(i-t)/(h[p+5]-t);c+=(h[p+5+1]-c)*e,u+=(h[p+5+2]-u)*e,d+=(h[p+5+3]-d)*e,f+=(h[p+5+4]-f)*e;break;case 1:c=h[p+1],u=h[p+2],d=h[p+3],f=h[p+4];break;default:c=this.getBezierValue(i,p,1,g-2),u=this.getBezierValue(i,p,2,g+18-2),d=this.getBezierValue(i,p,3,g+36-2),f=this.getBezierValue(i,p,4,g+54-2)}1==r?l.set(c,u,d,f):(0==n&&l.setFromColor(o.data.color),l.add((c-l.r)*r,(u-l.g)*r,(d-l.b)*r,(f-l.a)*r))}},dt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 4}setFrame(t,e,i,s,r){t<<=2,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color;if(i<h[0]){let t=o.data.color;switch(n){case 0:return l.r=t.r,l.g=t.g,void(l.b=t.b);case 1:l.r+=(t.r-l.r)*r,l.g+=(t.g-l.g)*r,l.b+=(t.b-l.b)*r}return}let c=0,u=0,d=0,f=J.search(h,i,4),p=this.curves[f>>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,z+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i<this.frames[0]){let t=o.data.color;switch(n){case 0:return void(h.a=t.a);case 1:h.a+=(t.a-h.a)*r}return}let l=this.getCurveValue(i);1==r?h.a=l:(0==n&&(h.a=o.data.color.a),h.a+=(l-h.a)*r)}},pt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i,_+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 8}setFrame(t,e,i,s,r,n,a,o,h){t<<=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o,this.frames[t+7]=h}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(i<h[0]){let t=o.data.color,e=o.data.darkColor;switch(n){case 0:return l.setFromColor(t),c.r=e.r,c.g=e.g,void(c.b=e.b);case 1:l.add((t.r-l.r)*r,(t.g-l.g)*r,(t.b-l.b)*r,(t.a-l.a)*r),c.r+=(e.r-c.r)*r,c.g+=(e.g-c.g)*r,c.b+=(e.b-c.b)*r}return}let u=0,d=0,f=0,p=0,g=0,m=0,x=0,v=J.search(h,i,8),y=this.curves[v>>3];switch(y){case 0:let t=h[v];u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);u+=(h[v+8+1]-u)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,g+=(h[v+8+5]-g)*e,m+=(h[v+8+6]-m)*e,x+=(h[v+8+7]-x)*e;break;case 1:u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];break;default:u=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),g=this.getBezierValue(i,v,5,y+72-2),m=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==r)l.set(u,d,f,p),c.r=g,c.g=m,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(g-c.r)*r,c.g+=(m-c.g)*r,c.b+=(x-c.b)*r}}},gt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,_+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(i<h[0]){let t=o.data.color,e=o.data.darkColor;switch(n){case 0:return l.r=t.r,l.g=t.g,l.b=t.b,c.r=e.r,c.g=e.g,void(c.b=e.b);case 1:l.r+=(t.r-l.r)*r,l.g+=(t.g-l.g)*r,l.b+=(t.b-l.b)*r,c.r+=(e.r-c.r)*r,c.g+=(e.g-c.g)*r,c.b+=(e.b-c.b)*r}return}let u=0,d=0,f=0,p=0,g=0,m=0,x=J.search(h,i,7),v=this.curves[x/7];switch(v){case 0:let t=h[x];u=h[x+1],d=h[x+2],f=h[x+3],p=h[x+4],g=h[x+5],m=h[x+6];let e=(i-t)/(h[x+7]-t);u+=(h[x+7+1]-u)*e,d+=(h[x+7+2]-d)*e,f+=(h[x+7+3]-f)*e,p+=(h[x+7+4]-p)*e,g+=(h[x+7+5]-g)*e,m+=(h[x+7+6]-m)*e;break;case 1:u=h[x+1],d=h[x+2],f=h[x+3],p=h[x+4],g=h[x+5],m=h[x+6];break;default:u=this.getBezierValue(i,x,1,v-2),d=this.getBezierValue(i,x,2,v+18-2),f=this.getBezierValue(i,x,3,v+36-2),p=this.getBezierValue(i,x,4,v+54-2),g=this.getBezierValue(i,x,5,v+72-2),m=this.getBezierValue(i,x,6,v+90-2)}if(1==r)l.r=u,l.g=d,l.b=f,c.r=p,c.g=g,c.b=m;else{if(0==n){let t=o.data.color,e=o.data.darkColor;l.r=t.r,l.g=t.g,l.b=t.b,c.r=e.r,c.g=e.g,c.b=e.b}l.r+=(u-l.r)*r,l.g+=(d-l.g)*r,l.b+=(f-l.b)*r,c.r+=(p-c.r)*r,c.g+=(g-c.g)*r,c.b+=(m-c.b)*r}}},mt=class extends J{constructor(t,e){super(t,[N+"|"+e]),this.slotIndex=0,this.slotIndex=e,this.attachmentNames=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];o.bone.active&&(1!=a?i<this.frames[0]?0!=n&&1!=n||this.setAttachment(t,o,o.data.attachmentName):this.setAttachment(t,o,this.attachmentNames[J.search1(this.frames,i)]):0==n&&this.setAttachment(t,o,o.data.attachmentName))}setAttachment(t,e,i){e.setAttachment(i?t.getAttachment(this.slotIndex,i):null)}},xt=class extends Q{constructor(t,e,i,s){super(t,e,[V+"|"+i+"|"+s.id]),this.slotIndex=0,this.slotIndex=i,this.attachment=s,this.vertices=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.vertices[t]=i}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*h-.06*a,g=.006*(3*(n-o)-s+l),m=.018*(a-h+.33333333),x=2*f+g,v=2*p+m,y=.3*(n-s)+f+.16666667*g,w=.3*a+p+.16666667*m,b=s+y,A=w;for(let t=d+18;d<t;d+=2)u[d]=b,u[d+1]=A,y+=x,w+=v,x+=g,v+=m,b+=y,A+=w}getCurvePercent(t,e){let i=this.curves,s=i[e];switch(s){case 0:let i=this.frames[e];return(t-i)/(this.frames[e+this.getFrameEntries()]-i);case 1:return 0}if(s-=2,i[s]>t){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s<r;s+=2)if(i[s]>=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof M)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i<d[0]){switch(n){case 0:return void(l.length=0);case 1:if(1==r)return void(l.length=0);l.length=u;let t=h;if(t.bones){r=1-r;for(f=0;f<u;f++)l[f]*=r}else{let e=t.vertices;for(var f=0;f<u;f++)l[f]+=(e[f]-l[f])*r}}return}if(l.length=u,i>=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;e<u;e++)l[e]+=t[e];else{let i=e.vertices;for(let e=0;e<u;e++)l[e]+=t[e]-i[e]}}else g.arrayCopy(t,0,l,0,u);else switch(n){case 0:{let e=h;if(e.bones)for(let e=0;e<u;e++)l[e]=t[e]*r;else{let i=e.vertices;for(let e=0;e<u;e++){let s=i[e];l[e]=s+(t[e]-s)*r}}break}case 1:case 2:for(let e=0;e<u;e++)l[e]+=(t[e]-l[e])*r;break;case 3:let e=h;if(e.bones)for(let e=0;e<u;e++)l[e]+=t[e]*r;else{let i=e.vertices;for(let e=0;e<u;e++)l[e]+=(t[e]-i[e])*r}}return}let p=J.search1(d,i),m=this.getCurvePercent(i,p),x=c[p],v=c[p+1];if(1==r)if(3==n){let t=h;if(t.bones)for(let t=0;t<u;t++){let e=x[t];l[t]+=e+(v[t]-e)*m}else{let e=t.vertices;for(let t=0;t<u;t++){let i=x[t];l[t]+=i+(v[t]-i)*m-e[t]}}}else for(let t=0;t<u;t++){let e=x[t];l[t]=e+(v[t]-e)*m}else switch(n){case 0:{let t=h;if(t.bones)for(let t=0;t<u;t++){let e=x[t];l[t]=(e+(v[t]-e)*m)*r}else{let e=t.vertices;for(let t=0;t<u;t++){let i=x[t],s=e[t];l[t]=s+(i+(v[t]-i)*m-s)*r}}break}case 1:case 2:for(let t=0;t<u;t++){let e=x[t];l[t]+=(e+(v[t]-e)*m-l[t])*r}break;case 3:let t=h;if(t.bones)for(let t=0;t<u;t++){let e=x[t];l[t]+=(e+(v[t]-e)*m)*r}else{let e=t.vertices;for(let t=0;t<u;t++){let i=x[t];l[t]+=(i+(v[t]-i)*m-e[t])*r}}}}},vt=class extends J{constructor(t){super(t,vt.propertyIds),this.events=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e){this.frames[t]=e.time,this.events[t]=e}apply(t,e,i,s,r,n,a){if(!s)return;let o=this.frames,h=this.frames.length;if(e>i)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i<o[0])return;let l=0;if(e<o[0])l=0;else{l=J.search1(o,e)+1;let t=o[l];for(;l>0&&o[l-1]==t;)l--}for(;l<h&&i>=o[l];l++)s.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends J{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i<this.frames[0])return void(0!=n&&1!=n||g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));let o=J.search1(this.frames,i),h=this.drawOrders[o];if(h){let e=t.drawOrder,i=t.slots;for(let t=0,s=h.length;t<s;t++)e[t]=i[h[t]]}else g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)}},bt=wt;bt.propertyIds=[""+W];var At=class extends Q{constructor(t,e,i){super(t,e,[q+"|"+i]),this.ikConstraintIndex=0,this.ikConstraintIndex=i}getFrameEntries(){return 6}setFrame(t,e,i,s,r,n,a){t*=6,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n?1:0,this.frames[t+5]=a?1:0}apply(t,e,i,s,r,n,a){let o=t.ikConstraints[this.ikConstraintIndex];if(!o.active)return;let h=this.frames;if(i<h[0]){switch(n){case 0:return o.mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,void(o.stretch=o.data.stretch);case 1:o.mix+=(o.data.mix-o.mix)*r,o.softness+=(o.data.softness-o.softness)*r,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch}return}let l=0,c=0,u=J.search(h,i,6),d=this.curves[u/6];switch(d){case 0:let t=h[u];l=h[u+1],c=h[u+2];let e=(i-t)/(h[u+6]-t);l+=(h[u+6+1]-l)*e,c+=(h[u+6+2]-c)*e;break;case 1:l=h[u+1],c=h[u+2];break;default:l=this.getBezierValue(i,u,1,d-2),c=this.getBezierValue(i,u,2,d+18-2)}0==n?(o.mix=o.data.mix+(l-o.data.mix)*r,o.softness=o.data.softness+(c-o.data.softness)*r,1==a?(o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch):(o.bendDirection=h[u+3],o.compress=0!=h[u+4],o.stretch=0!=h[u+5])):(o.mix+=(l-o.mix)*r,o.softness+=(c-o.softness)*r,0==a&&(o.bendDirection=h[u+3],o.compress=0!=h[u+4],o.stretch=0!=h[u+5]))}},Mt=class extends Q{constructor(t,e,i){super(t,e,[G+"|"+i]),this.transformConstraintIndex=0,this.transformConstraintIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){let h=this.frames;h[t*=7]=e,h[t+1]=i,h[t+2]=s,h[t+3]=r,h[t+4]=n,h[t+5]=a,h[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.transformConstraints[this.transformConstraintIndex];if(!o.active)return;let h,l,c,u,d,f,p=this.frames;if(i<p[0]){let t=o.data;switch(n){case 0:return o.mixRotate=t.mixRotate,o.mixX=t.mixX,o.mixY=t.mixY,o.mixScaleX=t.mixScaleX,o.mixScaleY=t.mixScaleY,void(o.mixShearY=t.mixShearY);case 1:o.mixRotate+=(t.mixRotate-o.mixRotate)*r,o.mixX+=(t.mixX-o.mixX)*r,o.mixY+=(t.mixY-o.mixY)*r,o.mixScaleX+=(t.mixScaleX-o.mixScaleX)*r,o.mixScaleY+=(t.mixScaleY-o.mixScaleY)*r,o.mixShearY+=(t.mixShearY-o.mixShearY)*r}return}let g=J.search(p,i,7),m=this.curves[g/7];switch(m){case 0:let t=p[g];h=p[g+1],l=p[g+2],c=p[g+3],u=p[g+4],d=p[g+5],f=p[g+6];let e=(i-t)/(p[g+7]-t);h+=(p[g+7+1]-h)*e,l+=(p[g+7+2]-l)*e,c+=(p[g+7+3]-c)*e,u+=(p[g+7+4]-u)*e,d+=(p[g+7+5]-d)*e,f+=(p[g+7+6]-f)*e;break;case 1:h=p[g+1],l=p[g+2],c=p[g+3],u=p[g+4],d=p[g+5],f=p[g+6];break;default:h=this.getBezierValue(i,g,1,m-2),l=this.getBezierValue(i,g,2,m+18-2),c=this.getBezierValue(i,g,3,m+36-2),u=this.getBezierValue(i,g,4,m+54-2),d=this.getBezierValue(i,g,5,m+72-2),f=this.getBezierValue(i,g,6,m+90-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r,o.mixScaleX=t.mixScaleX+(u-t.mixScaleX)*r,o.mixScaleY=t.mixScaleY+(d-t.mixScaleY)*r,o.mixShearY=t.mixShearY+(f-t.mixShearY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r,o.mixScaleX+=(u-o.mixScaleX)*r,o.mixScaleY+=(d-o.mixScaleY)*r,o.mixShearY+=(f-o.mixShearY)*r}},Et=class extends ${constructor(t,e,i){super(t,e,j+"|"+i),this.pathConstraintIndex=0,this.pathConstraintIndex=i}apply(t,e,i,s,r,n,a){let o=t.pathConstraints[this.pathConstraintIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.position=o.data.position);case 1:o.position+=(o.data.position-o.position)*r}return}let h=this.getCurveValue(i);0==n?o.position=o.data.position+(h-o.data.position)*r:o.position+=(h-o.position)*r}},St=class extends ${constructor(t,e,i){super(t,e,H+"|"+i),this.pathConstraintIndex=0,this.pathConstraintIndex=i}apply(t,e,i,s,r,n,a){let o=t.pathConstraints[this.pathConstraintIndex];if(!o.active)return;if(i<this.frames[0]){switch(n){case 0:return void(o.spacing=o.data.spacing);case 1:o.spacing+=(o.data.spacing-o.spacing)*r}return}let h=this.getCurveValue(i);0==n?o.spacing=o.data.spacing+(h-o.data.spacing)*r:o.spacing+=(h-o.spacing)*r}},Tt=class extends Q{constructor(t,e,i){super(t,e,[Z+"|"+i]),this.pathConstraintIndex=0,this.pathConstraintIndex=i}getFrameEntries(){return 4}setFrame(t,e,i,s,r){let n=this.frames;n[t<<=2]=e,n[t+1]=i,n[t+2]=s,n[t+3]=r}apply(t,e,i,s,r,n,a){let o=t.pathConstraints[this.pathConstraintIndex];if(!o.active)return;let h,l,c,u=this.frames;if(i<u[0]){switch(n){case 0:return o.mixRotate=o.data.mixRotate,o.mixX=o.data.mixX,void(o.mixY=o.data.mixY);case 1:o.mixRotate+=(o.data.mixRotate-o.mixRotate)*r,o.mixX+=(o.data.mixX-o.mixX)*r,o.mixY+=(o.data.mixY-o.mixY)*r}return}let d=J.search(u,i,4),f=this.curves[d>>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},It=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return It.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=It.ENTRIES]=e,n[t+It.MODE]=i|s<<4,n[t+It.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof M&&h.timelineAttachment==l))return;let c=this.frames;if(i<c[0])return void(0!=n&&1!=n||(o.sequenceIndex=-1));let u=J.search(c,i,It.ENTRIES),d=c[u],f=c[u+It.MODE],p=c[u+It.DELAY];if(!this.attachment.sequence)return;let g=f>>4,m=this.attachment.sequence.regions.length,x=I[15&f];if(0!=x)switch(g+=(i-d)/p+1e-5|0,x){case 1:g=Math.min(m-1,g);break;case 2:g%=m;break;case 3:{let t=(m<<1)-2;g=0==t?0:g%t,g>=m&&(g=t-g);break}case 4:g=Math.max(m-1-g,0);break;case 5:g=m-1-g%m;break;case 6:{let t=(m<<1)-2;g=0==t?0:(g+m-1)%t,g>=m&&(g=t-g)}}o.sequenceIndex=g}},Ct=It;Ct.ENTRIES=3,Ct.MODE=1,Ct.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Lt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i<s;i++){let s=e[i];if(!s)continue;s.animationLast=s.nextAnimationLast,s.trackLast=s.nextTrackLast;let r=t*s.timeScale;if(s.delay>0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n<a;n++){let a=i[n];if(!a||a.delay>0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e<p;e++){g.webkit602BugfixHelper(h,o);var r=f[e];r instanceof mt?this.applyAttachmentTimeline(r,t,u,o,!0):r.apply(t,l,u,d,h,o,0)}else{let e=a.timelineMode,i=a.shortestRotation,s=!i&&a.timelinesRotation.length!=p<<1;s&&(a.timelinesRotation.length=p<<1);for(let r=0;r<p;r++){let n=f[r],c=e[r]==Yt?o:0;!i&&n instanceof et?this.applyRotateTimeline(n,t,u,h,c,a.timelinesRotation,r<<1,s):n instanceof mt?this.applyAttachmentTimeline(n,t,u,o,!0):(g.webkit602BugfixHelper(h,o),n.apply(t,l,u,d,h,c,0))}}this.queueEvents(a,c),e.length=0,a.nextAnimationLast=c,a.nextTrackLast=a.trackTime}for(var n=this.unkeyedState+_t,a=t.slots,o=0,h=t.slots.length;o<h;o++){var l=a[o];if(l.attachmentState==n){var c=l.data.attachmentName;l.setAttachment(c?t.getAttachment(l.data.index,c):null)}}return this.unkeyedState+=2,this.queue.drain(),s}applyMixingFrom(t,e,i){let s=t.mixingFrom;s.mixingFrom&&this.applyMixingFrom(s,e,i);let r=0;0==t.mixDuration?(r=1,1==i&&(i=0)):(r=t.mixTime/t.mixDuration,r>1&&(r=1),1!=i&&(i=s.mixBlend));let n=r<s.attachmentThreshold,a=r<s.drawOrderThreshold,o=s.animation.timelines,h=o.length,l=s.alpha*t.interruptAlpha,c=l*(1-r),u=s.animationLast,d=s.getAnimationTime(),f=d,p=null;if(s.reverse?f=s.animation.duration-f:r<s.eventThreshold&&(p=this.events),3==i)for(let t=0;t<h;t++)o[t].apply(e,u,f,p,c,i,1);else{let t=s.timelineMode,r=s.timelineHoldMix,d=s.shortestRotation,m=!d&&s.timelinesRotation.length!=h<<1;m&&(s.timelinesRotation.length=h<<1),s.totalAlpha=0;for(let x=0;x<h;x++){let h,v=o[x],y=1,w=0;switch(t[x]){case Yt:if(!a&&v instanceof bt)continue;h=i,w=c;break;case Dt:h=0,w=c;break;case Xt:h=i,w=l;break;case Bt:h=0,w=l;break;default:h=0;let t=r[x];w=l*Math.max(0,1-t.mixTime/t.mixDuration)}s.totalAlpha+=w,!d&&v instanceof et?this.applyRotateTimeline(v,e,f,w,h,s.timelinesRotation,x<<1,m):v instanceof mt?this.applyAttachmentTimeline(v,e,f,h,n):(g.webkit602BugfixHelper(w,i),a&&v instanceof bt&&0==h&&(y=0),v.apply(e,u,f,p,w,h,y))}}return t.mixDuration>0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i<t.frames[0]?0!=s&&1!=s||this.setAttachment(e,n,n.data.attachmentName,r):this.setAttachment(e,n,t.attachmentNames[J.search1(t.frames,i)],r),n.attachmentState<=this.unkeyedState&&(n.attachmentState=this.unkeyedState+_t))}setAttachment(t,e,i,s){e.setAttachment(i?t.getAttachment(e.data.index,i):null),s&&(e.attachmentState=this.unkeyedState+Nt)}applyRotateTimeline(t,e,i,s,r,n,a,o){if(o&&(n[a]=0),1==s)return void t.apply(e,0,i,null,1,r,0);let h=e.bones[t.boneIndex];if(!h.active)return;let l=0,u=0;if(i<t.frames[0])switch(r){case 0:h.rotation=h.data.rotation;default:return;case 1:l=h.rotation,u=h.data.rotation}else l=0==r?h.data.rotation:h.rotation,u=h.data.rotation+t.getCurveValue(i);let d=0,f=u-l;if(f-=360*(16384-(16384.499999999996-f/360|0)),0==f)d=n[a];else{let t=0,e=0;o?(t=0,e=f):(t=n[a],e=n[a+1]);let i=f>0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;o<h;o++){let e=a[o];if(e.time<n)break;e.time>s||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast<s,l&&this.queue.complete(t);o<h;o++){let e=a[o];e.time<i||this.queue.event(t,e)}}clearTracks(){let t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let t=0,e=this.tracks.length;t<e;t++)this.clearTrack(t);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()}clearTrack(t){if(t>=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e<i;e++){let i=this.tracks[e];i&&this.setEmptyAnimation(i.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()}expandToIndex(t){return t<this.tracks.length?this.tracks[t]:(g.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)}trackEntry(t,e,i,s){let r=this.trackEntryPool.obtain();return r.reset(),r.trackIndex=t,r.animation=e,r.loop=i,r.holdPrevious=!1,r.reverse=!1,r.shortestRotation=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.mixTime=0,r.mixDuration=s?this.data.getMix(s.animation,e):0,r.interruptAlpha=1,r.totalAlpha=0,r.mixBlend=2,r}clearNext(t){let e=t.next;for(;e;)this.queue.dispose(e),e=e.next;t.next=null}_animationsChanged(){this.animationsChanged=!1,this.propertyIDs.clear();let t=this.tracks;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(i){for(;i.mixingFrom;)i=i.mixingFrom;do{i.mixingTo&&3==i.mixBlend||this.computeHold(i),i=i.mixingTo}while(i)}}}computeHold(t){let e=t.mixingTo,i=t.animation.timelines,s=t.animation.timelines.length,r=t.timelineMode;r.length=s;let n=t.timelineHoldMix;n.length=0;let a=this.propertyIDs;if(e&&e.holdPrevious)for(let t=0;t<s;t++)r[t]=a.addAll(i[t].getPropertyIds())?Bt:Xt;else t:for(let o=0;o<s;o++){let s=i[o],h=s.getPropertyIds();if(a.addAll(h))if(!e||s instanceof mt||s instanceof bt||s instanceof yt||!e.animation.hasTimeline(h))r[o]=Dt;else{for(let i=e.mixingTo;i;i=i.mixingTo)if(!i.animation.hasTimeline(h)){if(t.mixDuration>0){r[o]=zt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Yt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},kt=Rt;kt._emptyAnimation=new C("<empty>",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.len