var spine;!function(t){class e{constructor(t,e,s){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var a=0;a<e.length;a++)this.timelineIds[e[a].getPropertyId()]=!0;this.duration=s}hasTimeline(t){return 1==this.timelineIds[t]}apply(t,e,s,a,n,i,r,l){if(null==t)throw new Error("skeleton cannot be null.");a&&0!=this.duration&&(s%=this.duration,e>0&&(e%=this.duration));let o=this.timelines;for(let a=0,h=o.length;a<h;a++)o[a].apply(t,e,s,n,i,r,l)}static binarySearch(t,e,s=1){let a=0,n=t.length/s-2;if(0==n)return s;let i=n>>>1;for(;;){if(t[(i+1)*s]<=e?a=i+1:n=i,a==n)return(a+1)*s;i=a+n>>>1}}static linearSearch(t,e,s){for(let a=0,n=t.length-s;a<=n;a+=s)if(t[a]>e)return a;return-1}}let s,a,n;t.Animation=e,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(s=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(a=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(n=t.TimelineType||(t.TimelineType={}));class i{constructor(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=t.Utils.newFloatArray((e-1)*i.BEZIER_SIZE)}getFrameCount(){return this.curves.length/i.BEZIER_SIZE+1}setLinear(t){this.curves[t*i.BEZIER_SIZE]=i.LINEAR}setStepped(t){this.curves[t*i.BEZIER_SIZE]=i.STEPPED}getCurveType(t){let e=t*i.BEZIER_SIZE;if(e==this.curves.length)return i.LINEAR;let s=this.curves[e];return s==i.LINEAR?i.LINEAR:s==i.STEPPED?i.STEPPED:i.BEZIER}setCurve(t,e,s,a,n){let r=.03*(2*-e+a),l=.03*(2*-s+n),o=.006*(3*(e-a)+1),h=.006*(3*(s-n)+1),d=2*r+o,u=2*l+h,c=.3*e+r+.16666667*o,f=.3*s+l+.16666667*h,m=t*i.BEZIER_SIZE,g=this.curves;g[m++]=i.BEZIER;let p=c,w=f;for(let t=m+i.BEZIER_SIZE-1;m<t;m+=2)g[m]=p,g[m+1]=w,c+=d,f+=u,d+=o,u+=h,p+=c,w+=f}getCurvePercent(e,s){s=t.MathUtils.clamp(s,0,1);let a=this.curves,n=e*i.BEZIER_SIZE,r=a[n];if(r==i.LINEAR)return s;if(r==i.STEPPED)return 0;n++;let l=0;for(let t=n,e=n+i.BEZIER_SIZE-1;n<e;n+=2)if(l=a[n],l>=s){let e,i;return n==t?(e=0,i=0):(e=a[n-2],i=a[n-1]),i+(a[n+1]-i)*(s-e)/(l-e)}let o=a[n-1];return o+(1-o)*(s-l)/(1-l)}}i.LINEAR=0,i.STEPPED=1,i.BEZIER=2,i.BEZIER_SIZE=19,t.CurveTimeline=i;class r extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e<<1)}getPropertyId(){return(n.rotate<<24)+this.boneIndex}setFrame(t,e,s){t<<=1,this.frames[t]=e,this.frames[t+r.ROTATION]=s}apply(t,a,n,i,l,o,h){let d=this.frames,u=t.bones[this.boneIndex];if(!u.active)return;if(n<d[0]){switch(o){case s.setup:return void(u.rotation=u.data.rotation);case s.first:let t=u.data.rotation-u.rotation;u.rotation+=(t-360*(16384-(16384.499999999996-t/360|0)))*l}return}if(n>=d[d.length-r.ENTRIES]){let t=d[d.length+r.PREV_ROTATION];switch(o){case s.setup:u.rotation=u.data.rotation+t*l;break;case s.first:case s.replace:t+=u.data.rotation-u.rotation,t-=360*(16384-(16384.499999999996-t/360|0));case s.add:u.rotation+=t*l}return}let c=e.binarySearch(d,n,r.ENTRIES),f=d[c+r.PREV_ROTATION],m=d[c],g=this.getCurvePercent((c>>1)-1,1-(n-m)/(d[c+r.PREV_TIME]-m)),p=d[c+r.ROTATION]-f;switch(p=f+(p-360*(16384-(16384.499999999996-p/360|0)))*g,o){case s.setup:u.rotation=u.data.rotation+(p-360*(16384-(16384.499999999996-p/360|0)))*l;break;case s.first:case s.replace:p+=u.data.rotation-u.rotation;case s.add:u.rotation+=(p-360*(16384-(16384.499999999996-p/360|0)))*l}}}r.ENTRIES=2,r.PREV_TIME=-2,r.PREV_ROTATION=-1,r.ROTATION=1,t.RotateTimeline=r;class l extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*l.ENTRIES)}getPropertyId(){return(n.translate<<24)+this.boneIndex}setFrame(t,e,s,a){t*=l.ENTRIES,this.frames[t]=e,this.frames[t+l.X]=s,this.frames[t+l.Y]=a}apply(t,a,n,i,r,o,h){let d=this.frames,u=t.bones[this.boneIndex];if(!u.active)return;if(n<d[0]){switch(o){case s.setup:return u.x=u.data.x,void(u.y=u.data.y);case s.first:u.x+=(u.data.x-u.x)*r,u.y+=(u.data.y-u.y)*r}return}let c=0,f=0;if(n>=d[d.length-l.ENTRIES])c=d[d.length+l.PREV_X],f=d[d.length+l.PREV_Y];else{let t=e.binarySearch(d,n,l.ENTRIES);c=d[t+l.PREV_X],f=d[t+l.PREV_Y];let s=d[t],a=this.getCurvePercent(t/l.ENTRIES-1,1-(n-s)/(d[t+l.PREV_TIME]-s));c+=(d[t+l.X]-c)*a,f+=(d[t+l.Y]-f)*a}switch(o){case s.setup:u.x=u.data.x+c*r,u.y=u.data.y+f*r;break;case s.first:case s.replace:u.x+=(u.data.x+c-u.x)*r,u.y+=(u.data.y+f-u.y)*r;break;case s.add:u.x+=c*r,u.y+=f*r}}}l.ENTRIES=3,l.PREV_TIME=-3,l.PREV_X=-2,l.PREV_Y=-1,l.X=1,l.Y=2,t.TranslateTimeline=l;class o extends l{constructor(t){super(t)}getPropertyId(){return(n.scale<<24)+this.boneIndex}apply(n,i,r,l,h,d,u){let c=this.frames,f=n.bones[this.boneIndex];if(!f.active)return;if(r<c[0]){switch(d){case s.setup:return f.scaleX=f.data.scaleX,void(f.scaleY=f.data.scaleY);case s.first:f.scaleX+=(f.data.scaleX-f.scaleX)*h,f.scaleY+=(f.data.scaleY-f.scaleY)*h}return}let m=0,g=0;if(r>=c[c.length-o.ENTRIES])m=c[c.length+o.PREV_X]*f.data.scaleX,g=c[c.length+o.PREV_Y]*f.data.scaleY;else{let t=e.binarySearch(c,r,o.ENTRIES);m=c[t+o.PREV_X],g=c[t+o.PREV_Y];let s=c[t],a=this.getCurvePercent(t/o.ENTRIES-1,1-(r-s)/(c[t+o.PREV_TIME]-s));m=(m+(c[t+o.X]-m)*a)*f.data.scaleX,g=(g+(c[t+o.Y]-g)*a)*f.data.scaleY}if(1==h)d==s.add?(f.scaleX+=m-f.data.scaleX,f.scaleY+=g-f.data.scaleY):(f.scaleX=m,f.scaleY=g);else{let e=0,n=0;if(u==a.mixOut)switch(d){case s.setup:e=f.data.scaleX,n=f.data.scaleY,f.scaleX=e+(Math.abs(m)*t.MathUtils.signum(e)-e)*h,f.scaleY=n+(Math.abs(g)*t.MathUtils.signum(n)-n)*h;break;case s.first:case s.replace:e=f.scaleX,n=f.scaleY,f.scaleX=e+(Math.abs(m)*t.MathUtils.signum(e)-e)*h,f.scaleY=n+(Math.abs(g)*t.MathUtils.signum(n)-n)*h;break;case s.add:e=f.scaleX,n=f.scaleY,f.scaleX=e+(Math.abs(m)*t.MathUtils.signum(e)-f.data.scaleX)*h,f.scaleY=n+(Math.abs(g)*t.MathUtils.signum(n)-f.data.scaleY)*h}else switch(d){case s.setup:e=Math.abs(f.data.scaleX)*t.MathUtils.signum(m),n=Math.abs(f.data.scaleY)*t.MathUtils.signum(g),f.scaleX=e+(m-e)*h,f.scaleY=n+(g-n)*h;break;case s.first:case s.replace:e=Math.abs(f.scaleX)*t.MathUtils.signum(m),n=Math.abs(f.scaleY)*t.MathUtils.signum(g),f.scaleX=e+(m-e)*h,f.scaleY=n+(g-n)*h;break;case s.add:e=t.MathUtils.signum(m),n=t.MathUtils.signum(g),f.scaleX=Math.abs(f.scaleX)*e+(m-Math.abs(f.data.scaleX)*e)*h,f.scaleY=Math.abs(f.scaleY)*n+(g-Math.abs(f.data.scaleY)*n)*h}}}}t.ScaleTimeline=o;class h extends l{constructor(t){super(t)}getPropertyId(){return(n.shear<<24)+this.boneIndex}apply(t,a,n,i,r,l,o){let d=this.frames,u=t.bones[this.boneIndex];if(!u.active)return;if(n<d[0]){switch(l){case s.setup:return u.shearX=u.data.shearX,void(u.shearY=u.data.shearY);case s.first:u.shearX+=(u.data.shearX-u.shearX)*r,u.shearY+=(u.data.shearY-u.shearY)*r}return}let c=0,f=0;if(n>=d[d.length-h.ENTRIES])c=d[d.length+h.PREV_X],f=d[d.length+h.PREV_Y];else{let t=e.binarySearch(d,n,h.ENTRIES);c=d[t+h.PREV_X],f=d[t+h.PREV_Y];let s=d[t],a=this.getCurvePercent(t/h.ENTRIES-1,1-(n-s)/(d[t+h.PREV_TIME]-s));c+=(d[t+h.X]-c)*a,f+=(d[t+h.Y]-f)*a}switch(l){case s.setup:u.shearX=u.data.shearX+c*r,u.shearY=u.data.shearY+f*r;break;case s.first:case s.replace:u.shearX+=(u.data.shearX+c-u.shearX)*r,u.shearY+=(u.data.shearY+f-u.shearY)*r;break;case s.add:u.shearX+=c*r,u.shearY+=f*r}}}t.ShearTimeline=h;class d extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*d.ENTRIES)}getPropertyId(){return(n.color<<24)+this.slotIndex}setFrame(t,e,s,a,n,i){t*=d.ENTRIES,this.frames[t]=e,this.frames[t+d.R]=s,this.frames[t+d.G]=a,this.frames[t+d.B]=n,this.frames[t+d.A]=i}apply(t,a,n,i,r,l,o){let h=t.slots[this.slotIndex];if(!h.bone.active)return;let u=this.frames;if(n<u[0]){switch(l){case s.setup:return void h.color.setFromColor(h.data.color);case s.first:let t=h.color,e=h.data.color;t.add((e.r-t.r)*r,(e.g-t.g)*r,(e.b-t.b)*r,(e.a-t.a)*r)}return}let c=0,f=0,m=0,g=0;if(n>=u[u.length-d.ENTRIES]){let t=u.length;c=u[t+d.PREV_R],f=u[t+d.PREV_G],m=u[t+d.PREV_B],g=u[t+d.PREV_A]}else{let t=e.binarySearch(u,n,d.ENTRIES);c=u[t+d.PREV_R],f=u[t+d.PREV_G],m=u[t+d.PREV_B],g=u[t+d.PREV_A];let s=u[t],a=this.getCurvePercent(t/d.ENTRIES-1,1-(n-s)/(u[t+d.PREV_TIME]-s));c+=(u[t+d.R]-c)*a,f+=(u[t+d.G]-f)*a,m+=(u[t+d.B]-m)*a,g+=(u[t+d.A]-g)*a}if(1==r)h.color.set(c,f,m,g);else{let t=h.color;l==s.setup&&t.setFromColor(h.data.color),t.add((c-t.r)*r,(f-t.g)*r,(m-t.b)*r,(g-t.a)*r)}}}d.ENTRIES=5,d.PREV_TIME=-5,d.PREV_R=-4,d.PREV_G=-3,d.PREV_B=-2,d.PREV_A=-1,d.R=1,d.G=2,d.B=3,d.A=4,t.ColorTimeline=d;class u extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*u.ENTRIES)}getPropertyId(){return(n.twoColor<<24)+this.slotIndex}setFrame(t,e,s,a,n,i,r,l,o){t*=u.ENTRIES,this.frames[t]=e,this.frames[t+u.R]=s,this.frames[t+u.G]=a,this.frames[t+u.B]=n,this.frames[t+u.A]=i,this.frames[t+u.R2]=r,this.frames[t+u.G2]=l,this.frames[t+u.B2]=o}apply(t,a,n,i,r,l,o){let h=t.slots[this.slotIndex];if(!h.bone.active)return;let d=this.frames;if(n<d[0]){switch(l){case s.setup:return h.color.setFromColor(h.data.color),void h.darkColor.setFromColor(h.data.darkColor);case s.first:let t=h.color,e=h.darkColor,a=h.data.color,n=h.data.darkColor;t.add((a.r-t.r)*r,(a.g-t.g)*r,(a.b-t.b)*r,(a.a-t.a)*r),e.add((n.r-e.r)*r,(n.g-e.g)*r,(n.b-e.b)*r,0)}return}let c=0,f=0,m=0,g=0,p=0,w=0,x=0;if(n>=d[d.length-u.ENTRIES]){let t=d.length;c=d[t+u.PREV_R],f=d[t+u.PREV_G],m=d[t+u.PREV_B],g=d[t+u.PREV_A],p=d[t+u.PREV_R2],w=d[t+u.PREV_G2],x=d[t+u.PREV_B2]}else{let t=e.binarySearch(d,n,u.ENTRIES);c=d[t+u.PREV_R],f=d[t+u.PREV_G],m=d[t+u.PREV_B],g=d[t+u.PREV_A],p=d[t+u.PREV_R2],w=d[t+u.PREV_G2],x=d[t+u.PREV_B2];let s=d[t],a=this.getCurvePercent(t/u.ENTRIES-1,1-(n-s)/(d[t+u.PREV_TIME]-s));c+=(d[t+u.R]-c)*a,f+=(d[t+u.G]-f)*a,m+=(d[t+u.B]-m)*a,g+=(d[t+u.A]-g)*a,p+=(d[t+u.R2]-p)*a,w+=(d[t+u.G2]-w)*a,x+=(d[t+u.B2]-x)*a}if(1==r)h.color.set(c,f,m,g),h.darkColor.set(p,w,x,1);else{let t=h.color,e=h.darkColor;l==s.setup&&(t.setFromColor(h.data.color),e.setFromColor(h.data.darkColor)),t.add((c-t.r)*r,(f-t.g)*r,(m-t.b)*r,(g-t.a)*r),e.add((p-e.r)*r,(w-e.g)*r,(x-e.b)*r,0)}}}u.ENTRIES=8,u.PREV_TIME=-8,u.PREV_R=-7,u.PREV_G=-6,u.PREV_B=-5,u.PREV_A=-4,u.PREV_R2=-3,u.PREV_G2=-2,u.PREV_B2=-1,u.R=1,u.G=2,u.B=3,u.A=4,u.R2=5,u.G2=6,u.B2=7,t.TwoColorTimeline=u;t.AttachmentTimeline=class{constructor(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}getPropertyId(){return(n.attachment<<24)+this.slotIndex}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.attachmentNames[t]=s}apply(t,n,i,r,l,o,h){let d=t.slots[this.slotIndex];if(!d.bone.active)return;if(h==a.mixOut)return void(o==s.setup&&this.setAttachment(t,d,d.data.attachmentName));let u=this.frames;if(i<u[0])return void(o!=s.setup&&o!=s.first||this.setAttachment(t,d,d.data.attachmentName));let c=0;c=i>=u[u.length-1]?u.length-1:e.binarySearch(u,i,1)-1;let f=this.attachmentNames[c];t.slots[this.slotIndex].setAttachment(null==f?null:t.getAttachment(this.slotIndex,f))}setAttachment(t,e,s){e.attachment=null==s?null:t.getAttachment(this.slotIndex,s)}};let c=null;t.DeformTimeline=class extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e),this.frameVertices=new Array(e),null==c&&(c=t.Utils.newFloatArray(64))}getPropertyId(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex}setFrame(t,e,s){this.frames[t]=e,this.frameVertices[t]=s}apply(a,n,i,r,l,o,h){let d=a.slots[this.slotIndex];if(!d.bone.active)return;let u=d.getAttachment();if(!(u instanceof t.VertexAttachment)||u.deformAttachment!=this.attachment)return;let c=d.deform;0==c.length&&(o=s.setup);let f=this.frameVertices,m=f[0].length,g=this.frames;if(i<g[0]){let e=u;switch(o){case s.setup:return void(c.length=0);case s.first:if(1==l){c.length=0;break}let a=t.Utils.setArraySize(c,m);if(null==e.bones){let t=e.vertices;for(var p=0;p<m;p++)a[p]+=(t[p]-a[p])*l}else{l=1-l;for(p=0;p<m;p++)a[p]*=l}}return}let w=t.Utils.setArraySize(c,m);if(i>=g[g.length-1]){let e=f[g.length-1];if(1==l)if(o==s.add){let t=u;if(null==t.bones){let s=t.vertices;for(let t=0;t<m;t++)w[t]+=e[t]-s[t]}else for(let t=0;t<m;t++)w[t]+=e[t]}else t.Utils.arrayCopy(e,0,w,0,m);else switch(o){case s.setup:{let t=u;if(null==t.bones){let s=t.vertices;for(let t=0;t<m;t++){let a=s[t];w[t]=a+(e[t]-a)*l}}else for(let t=0;t<m;t++)w[t]=e[t]*l;break}case s.first:case s.replace:for(let t=0;t<m;t++)w[t]+=(e[t]-w[t])*l;break;case s.add:let t=u;if(null==t.bones){let s=t.vertices;for(let t=0;t<m;t++)w[t]+=(e[t]-s[t])*l}else for(let t=0;t<m;t++)w[t]+=e[t]*l}return}let x=e.binarySearch(g,i),M=f[x-1],E=f[x],T=g[x],A=this.getCurvePercent(x-1,1-(i-T)/(g[x-1]-T));if(1==l)if(o==s.add){let t=u;if(null==t.bones){let e=t.vertices;for(let t=0;t<m;t++){let s=M[t];w[t]+=s+(E[t]-s)*A-e[t]}}else for(let t=0;t<m;t++){let e=M[t];w[t]+=e+(E[t]-e)*A}}else for(let t=0;t<m;t++){let e=M[t];w[t]=e+(E[t]-e)*A}else switch(o){case s.setup:{let t=u;if(null==t.bones){let e=t.vertices;for(let t=0;t<m;t++){let s=M[t],a=e[t];w[t]=a+(s+(E[t]-s)*A-a)*l}}else for(let t=0;t<m;t++){let e=M[t];w[t]=(e+(E[t]-e)*A)*l}break}case s.first:case s.replace:for(let t=0;t<m;t++){let e=M[t];w[t]+=(e+(E[t]-e)*A-w[t])*l}break;case s.add:let t=u;if(null==t.bones){let e=t.vertices;for(let t=0;t<m;t++){let s=M[t];w[t]+=(s+(E[t]-s)*A-e[t])*l}}else for(let t=0;t<m;t++){let e=M[t];w[t]+=(e+(E[t]-e)*A)*l}}}};t.EventTimeline=class{constructor(e){this.frames=t.Utils.newFloatArray(e),this.events=new Array(e)}getPropertyId(){return n.event<<24}getFrameCount(){return this.frames.length}setFrame(t,e){this.frames[t]=e.time,this.events[t]=e}apply(t,s,a,n,i,r,l){if(null==n)return;let o=this.frames,h=this.frames.length;if(s>a)this.apply(t,s,Number.MAX_VALUE,n,i,r,l),s=-1;else if(s>=o[h-1])return;if(a<o[0])return;let d=0;if(s<o[0])d=0;else{d=e.binarySearch(o,s);let t=o[d];for(;d>0&&o[d-1]==t;)d--}for(;d<h&&a>=o[d];d++)n.push(this.events[d])}};t.DrawOrderTimeline=class{constructor(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}getPropertyId(){return n.drawOrder<<24}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.drawOrders[t]=s}apply(n,i,r,l,o,h,d){let u=n.drawOrder,c=n.slots;if(d==a.mixOut)return void(h==s.setup&&t.Utils.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length));let f=this.frames;if(r<f[0])return void(h!=s.setup&&h!=s.first||t.Utils.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length));let m=0;m=r>=f[f.length-1]?f.length-1:e.binarySearch(f,r)-1;let g=this.drawOrders[m];if(null==g)t.Utils.arrayCopy(c,0,u,0,c.length);else for(let t=0,e=g.length;t<e;t++)u[t]=c[g[t]]}};class f extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*f.ENTRIES)}getPropertyId(){return(n.ikConstraint<<24)+this.ikConstraintIndex}setFrame(t,e,s,a,n,i,r){t*=f.ENTRIES,this.frames[t]=e,this.frames[t+f.MIX]=s,this.frames[t+f.SOFTNESS]=a,this.frames[t+f.BEND_DIRECTION]=n,this.frames[t+f.COMPRESS]=i?1:0,this.frames[t+f.STRETCH]=r?1:0}apply(t,n,i,r,l,o,h){let d=this.frames,u=t.ikConstraints[this.ikConstraintIndex];if(!u.active)return;if(i<d[0]){switch(o){case s.setup:return u.mix=u.data.mix,u.softness=u.data.softness,u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,void(u.stretch=u.data.stretch);case s.first:u.mix+=(u.data.mix-u.mix)*l,u.softness+=(u.data.softness-u.softness)*l,u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch}return}if(i>=d[d.length-f.ENTRIES])return void(o==s.setup?(u.mix=u.data.mix+(d[d.length+f.PREV_MIX]-u.data.mix)*l,u.softness=u.data.softness+(d[d.length+f.PREV_SOFTNESS]-u.data.softness)*l,h==a.mixOut?(u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch):(u.bendDirection=d[d.length+f.PREV_BEND_DIRECTION],u.compress=0!=d[d.length+f.PREV_COMPRESS],u.stretch=0!=d[d.length+f.PREV_STRETCH])):(u.mix+=(d[d.length+f.PREV_MIX]-u.mix)*l,u.softness+=(d[d.length+f.PREV_SOFTNESS]-u.softness)*l,h==a.mixIn&&(u.bendDirection=d[d.length+f.PREV_BEND_DIRECTION],u.compress=0!=d[d.length+f.PREV_COMPRESS],u.stretch=0!=d[d.length+f.PREV_STRETCH])));let c=e.binarySearch(d,i,f.ENTRIES),m=d[c+f.PREV_MIX],g=d[c+f.PREV_SOFTNESS],p=d[c],w=this.getCurvePercent(c/f.ENTRIES-1,1-(i-p)/(d[c+f.PREV_TIME]-p));o==s.setup?(u.mix=u.data.mix+(m+(d[c+f.MIX]-m)*w-u.data.mix)*l,u.softness=u.data.softness+(g+(d[c+f.SOFTNESS]-g)*w-u.data.softness)*l,h==a.mixOut?(u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch):(u.bendDirection=d[c+f.PREV_BEND_DIRECTION],u.compress=0!=d[c+f.PREV_COMPRESS],u.stretch=0!=d[c+f.PREV_STRETCH])):(u.mix+=(m+(d[c+f.MIX]-m)*w-u.mix)*l,u.softness+=(g+(d[c+f.SOFTNESS]-g)*w-u.softness)*l,h==a.mixIn&&(u.bendDirection=d[c+f.PREV_BEND_DIRECTION],u.compress=0!=d[c+f.PREV_COMPRESS],u.stretch=0!=d[c+f.PREV_STRETCH]))}}f.ENTRIES=6,f.PREV_TIME=-6,f.PREV_MIX=-5,f.PREV_SOFTNESS=-4,f.PREV_BEND_DIRECTION=-3,f.PREV_COMPRESS=-2,f.PREV_STRETCH=-1,f.MIX=1,f.SOFTNESS=2,f.BEND_DIRECTION=3,f.COMPRESS=4,f.STRETCH=5,t.IkConstraintTimeline=f;class m extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*m.ENTRIES)}getPropertyId(){return(n.transformConstraint<<24)+this.transformConstraintIndex}setFrame(t,e,s,a,n,i){t*=m.ENTRIES,this.frames[t]=e,this.frames[t+m.ROTATE]=s,this.frames[t+m.TRANSLATE]=a,this.frames[t+m.SCALE]=n,this.frames[t+m.SHEAR]=i}apply(t,a,n,i,r,l,o){let h=this.frames,d=t.transformConstraints[this.transformConstraintIndex];if(!d.active)return;if(n<h[0]){let t=d.data;switch(l){case s.setup:return d.rotateMix=t.rotateMix,d.translateMix=t.translateMix,d.scaleMix=t.scaleMix,void(d.shearMix=t.shearMix);case s.first:d.rotateMix+=(t.rotateMix-d.rotateMix)*r,d.translateMix+=(t.translateMix-d.translateMix)*r,d.scaleMix+=(t.scaleMix-d.scaleMix)*r,d.shearMix+=(t.shearMix-d.shearMix)*r}return}let u=0,c=0,f=0,g=0;if(n>=h[h.length-m.ENTRIES]){let t=h.length;u=h[t+m.PREV_ROTATE],c=h[t+m.PREV_TRANSLATE],f=h[t+m.PREV_SCALE],g=h[t+m.PREV_SHEAR]}else{let t=e.binarySearch(h,n,m.ENTRIES);u=h[t+m.PREV_ROTATE],c=h[t+m.PREV_TRANSLATE],f=h[t+m.PREV_SCALE],g=h[t+m.PREV_SHEAR];let s=h[t],a=this.getCurvePercent(t/m.ENTRIES-1,1-(n-s)/(h[t+m.PREV_TIME]-s));u+=(h[t+m.ROTATE]-u)*a,c+=(h[t+m.TRANSLATE]-c)*a,f+=(h[t+m.SCALE]-f)*a,g+=(h[t+m.SHEAR]-g)*a}if(l==s.setup){let t=d.data;d.rotateMix=t.rotateMix+(u-t.rotateMix)*r,d.translateMix=t.translateMix+(c-t.translateMix)*r,d.scaleMix=t.scaleMix+(f-t.scaleMix)*r,d.shearMix=t.shearMix+(g-t.shearMix)*r}else d.rotateMix+=(u-d.rotateMix)*r,d.translateMix+=(c-d.translateMix)*r,d.scaleMix+=(f-d.scaleMix)*r,d.shearMix+=(g-d.shearMix)*r}}m.ENTRIES=5,m.PREV_TIME=-5,m.PREV_ROTATE=-4,m.PREV_TRANSLATE=-3,m.PREV_SCALE=-2,m.PREV_SHEAR=-1,m.ROTATE=1,m.TRANSLATE=2,m.SCALE=3,m.SHEAR=4,t.TransformConstraintTimeline=m;class g extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*g.ENTRIES)}getPropertyId(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex}setFrame(t,e,s){t*=g.ENTRIES,this.frames[t]=e,this.frames[t+g.VALUE]=s}apply(t,a,n,i,r,l,o){let h=this.frames,d=t.pathConstraints[this.pathConstraintIndex];if(!d.active)return;if(n<h[0]){switch(l){case s.setup:return void(d.position=d.data.position);case s.first:d.position+=(d.data.position-d.position)*r}return}let u=0;if(n>=h[h.length-g.ENTRIES])u=h[h.length+g.PREV_VALUE];else{let t=e.binarySearch(h,n,g.ENTRIES);u=h[t+g.PREV_VALUE];let s=h[t],a=this.getCurvePercent(t/g.ENTRIES-1,1-(n-s)/(h[t+g.PREV_TIME]-s));u+=(h[t+g.VALUE]-u)*a}l==s.setup?d.position=d.data.position+(u-d.data.position)*r:d.position+=(u-d.position)*r}}g.ENTRIES=2,g.PREV_TIME=-2,g.PREV_VALUE=-1,g.VALUE=1,t.PathConstraintPositionTimeline=g;class p extends g{constructor(t){super(t)}getPropertyId(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex}apply(t,a,n,i,r,l,o){let h=this.frames,d=t.pathConstraints[this.pathConstraintIndex];if(!d.active)return;if(n<h[0]){switch(l){case s.setup:return void(d.spacing=d.data.spacing);case s.first:d.spacing+=(d.data.spacing-d.spacing)*r}return}let u=0;if(n>=h[h.length-p.ENTRIES])u=h[h.length+p.PREV_VALUE];else{let t=e.binarySearch(h,n,p.ENTRIES);u=h[t+p.PREV_VALUE];let s=h[t],a=this.getCurvePercent(t/p.ENTRIES-1,1-(n-s)/(h[t+p.PREV_TIME]-s));u+=(h[t+p.VALUE]-u)*a}l==s.setup?d.spacing=d.data.spacing+(u-d.data.spacing)*r:d.spacing+=(u-d.spacing)*r}}t.PathConstraintSpacingTimeline=p;class w extends i{constructor(e){super(e),this.frames=t.Utils.newFloatArray(e*w.ENTRIES)}getPropertyId(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex}setFrame(t,e,s,a){t*=w.ENTRIES,this.frames[t]=e,this.frames[t+w.ROTATE]=s,this.frames[t+w.TRANSLATE]=a}apply(t,a,n,i,r,l,o){let h=this.frames,d=t.pathConstraints[this.pathConstraintIndex];if(!d.active)return;if(n<h[0]){switch(l){case s.setup:return d.rotateMix=d.data.rotateMix,void(d.translateMix=d.data.translateMix);case s.first:d.rotateMix+=(d.data.rotateMix-d.rotateMix)*r,d.translateMix+=(d.data.translateMix-d.translateMix)*r}return}let u=0,c=0;if(n>=h[h.length-w.ENTRIES])u=h[h.length+w.PREV_ROTATE],c=h[h.length+w.PREV_TRANSLATE];else{let t=e.binarySearch(h,n,w.ENTRIES);u=h[t+w.PREV_ROTATE],c=h[t+w.PREV_TRANSLATE];let s=h[t],a=this.getCurvePercent(t/w.ENTRIES-1,1-(n-s)/(h[t+w.PREV_TIME]-s));u+=(h[t+w.ROTATE]-u)*a,c+=(h[t+w.TRANSLATE]-c)*a}l==s.setup?(d.rotateMix=d.data.rotateMix+(u-d.data.rotateMix)*r,d.translateMix=d.data.translateMix+(c-d.data.translateMix)*r):(d.rotateMix+=(u-d.rotateMix)*r,d.translateMix+=(c-d.translateMix)*r)}}w.ENTRIES=3,w.PREV_TIME=-3,w.PREV_ROTATE=-2,w.PREV_TRANSLATE=-1,w.ROTATE=1,w.TRANSLATE=2,t.PathConstraintMixTimeline=w}(spine||(spine={})),function(t){class e{constructor(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new a(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(()=>new s),this.data=e}update(t){t*=this.timeScale;let e=this.tracks;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(null==a)continue;a.animationLast=a.nextAnimationLast,a.trackLast=a.nextTrackLast;let n=t*a.timeScale;if(a.delay>0){if(a.delay-=n,a.delay>0)continue;n=-a.delay,a.delay=0}let i=a.next;if(null!=i){let e=a.trackLast-i.delay;if(e>=0){for(i.delay=0,i.trackTime+=0==a.timeScale?0:(e/a.timeScale+t)*i.timeScale,a.trackTime+=n,this.setCurrent(s,i,!0);null!=i.mixingFrom;)i.mixTime+=t,i=i.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&null==a.mixingFrom){e[s]=null,this.queue.end(a),this.disposeNext(a);continue}if(null!=a.mixingFrom&&this.updateMixingFrom(a,t)){let t=a.mixingFrom;for(a.mixingFrom=null,null!=t&&(t.mixingTo=null);null!=t;)this.queue.end(t),t=t.mixingFrom}a.trackTime+=n}this.queue.drain()}updateMixingFrom(t,e){let s=t.mixingFrom;if(null==s)return!0;let a=this.updateMixingFrom(s,e);return s.animationLast=s.nextAnimationLast,s.trackLast=s.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=s.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=s.mixingFrom,null!=s.mixingFrom&&(s.mixingFrom.mixingTo=t),t.interruptAlpha=s.interruptAlpha,this.queue.end(s)),a):(s.trackTime+=e*s.timeScale,t.mixTime+=e,!1)}apply(s){if(null==s)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let a=this.events,n=this.tracks,i=!1;for(let l=0,o=n.length;l<o;l++){let o=n[l];if(null==o||o.delay>0)continue;i=!0;let h=0==l?t.MixBlend.first:o.mixBlend,d=o.alpha;null!=o.mixingFrom?d*=this.applyMixingFrom(o,s,h):o.trackTime>=o.trackEnd&&null==o.next&&(d=0);let u=o.animationLast,c=o.getAnimationTime(),f=o.animation.timelines.length,m=o.animation.timelines;if(0==l&&1==d||h==t.MixBlend.add)for(let e=0;e<f;e++){t.Utils.webkit602BugfixHelper(d,h);var r=m[e];r instanceof t.AttachmentTimeline?this.applyAttachmentTimeline(r,s,c,h,!0):r.apply(s,u,c,a,d,h,t.MixDirection.mixIn)}else{let n=o.timelineMode,i=0==o.timelinesRotation.length;i&&t.Utils.setArraySize(o.timelinesRotation,f<<1,null);let r=o.timelinesRotation;for(let l=0;l<f;l++){let o=m[l],f=n[l]==e.SUBSEQUENT?h:t.MixBlend.setup;o instanceof t.RotateTimeline?this.applyRotateTimeline(o,s,c,d,f,r,l<<1,i):o instanceof t.AttachmentTimeline?this.applyAttachmentTimeline(o,s,c,h,!0):(t.Utils.webkit602BugfixHelper(d,h),o.apply(s,u,c,a,d,f,t.MixDirection.mixIn))}}this.queueEvents(o,c),a.length=0,o.nextAnimationLast=c,o.nextTrackLast=o.trackTime}for(var l=this.unkeyedState+e.SETUP,o=s.slots,h=0,d=s.slots.length;h<d;h++){var u=o[h];if(u.attachmentState==l){var c=u.data.attachmentName;u.attachment=null==c?null:s.getAttachment(u.data.index,c)}}return this.unkeyedState+=2,this.queue.drain(),i}applyMixingFrom(s,a,n){let i=s.mixingFrom;null!=i.mixingFrom&&this.applyMixingFrom(i,a,n);let r=0;0==s.mixDuration?(r=1,n==t.MixBlend.first&&(n=t.MixBlend.setup)):(r=s.mixTime/s.mixDuration,r>1&&(r=1),n!=t.MixBlend.first&&(n=i.mixBlend));let l=r<i.eventThreshold?this.events:null,o=r<i.attachmentThreshold,h=r<i.drawOrderThreshold,d=i.animationLast,u=i.getAnimationTime(),c=i.animation.timelines.length,f=i.animation.timelines,m=i.alpha*s.interruptAlpha,g=m*(1-r);if(n==t.MixBlend.add)for(let e=0;e<c;e++)f[e].apply(a,d,u,l,g,n,t.MixDirection.mixOut);else{let s=i.timelineMode,r=i.timelineHoldMix,p=0==i.timelinesRotation.length;p&&t.Utils.setArraySize(i.timelinesRotation,c<<1,null);let w=i.timelinesRotation;i.totalAlpha=0;for(let x=0;x<c;x++){let c,M=f[x],E=t.MixDirection.mixOut,T=0;switch(s[x]){case e.SUBSEQUENT:if(!h&&M instanceof t.DrawOrderTimeline)continue;c=n,T=g;break;case e.FIRST:c=t.MixBlend.setup,T=g;break;case e.HOLD_SUBSEQUENT:c=n,T=m;break;case e.HOLD_FIRST:c=t.MixBlend.setup,T=m;break;default:c=t.MixBlend.setup;let s=r[x];T=m*Math.max(0,1-s.mixTime/s.mixDuration)}i.totalAlpha+=T,M instanceof t.RotateTimeline?this.applyRotateTimeline(M,a,u,T,c,w,x<<1,p):M instanceof t.AttachmentTimeline?this.applyAttachmentTimeline(M,a,u,c,o):(t.Utils.webkit602BugfixHelper(T,n),h&&M instanceof t.DrawOrderTimeline&&c==t.MixBlend.setup&&(E=t.MixDirection.mixIn),M.apply(a,d,u,l,T,c,E))}}return s.mixDuration>0&&this.queueEvents(i,u),this.events.length=0,i.nextAnimationLast=u,i.nextTrackLast=i.trackTime,r}applyAttachmentTimeline(s,a,n,i,r){var l=a.slots[s.slotIndex];if(l.bone.active){var o,h=s.frames;if(n<h[0])i!=t.MixBlend.setup&&i!=t.MixBlend.first||this.setAttachment(a,l,l.data.attachmentName,r);else o=n>=h[h.length-1]?h.length-1:t.Animation.binarySearch(h,n)-1,this.setAttachment(a,l,s.attachmentNames[o],r);l.attachmentState<=this.unkeyedState&&(l.attachmentState=this.unkeyedState+e.SETUP)}}setAttachment(t,s,a,n){s.setAttachment(null==a?null:t.getAttachment(s.data.index,a)),n&&(s.attachmentState=this.unkeyedState+e.CURRENT)}applyRotateTimeline(e,s,a,n,i,r,l,o){if(o&&(r[l]=0),1==n)return void e.apply(s,0,a,null,1,i,t.MixDirection.mixIn);let h=e,d=h.frames,u=s.bones[h.boneIndex];if(!u.active)return;let c=0,f=0;if(a<d[0])switch(i){case t.MixBlend.setup:u.rotation=u.data.rotation;default:return;case t.MixBlend.first:c=u.rotation,f=u.data.rotation}else if(c=i==t.MixBlend.setup?u.data.rotation:u.rotation,a>=d[d.length-t.RotateTimeline.ENTRIES])f=u.data.rotation+d[d.length+t.RotateTimeline.PREV_ROTATION];else{let e=t.Animation.binarySearch(d,a,t.RotateTimeline.ENTRIES),s=d[e+t.RotateTimeline.PREV_ROTATION],n=d[e],i=h.getCurvePercent((e>>1)-1,1-(a-n)/(d[e+t.RotateTimeline.PREV_TIME]-n));f=d[e+t.RotateTimeline.ROTATION]-s,f-=360*(16384-(16384.499999999996-f/360|0)),f=s+f*i+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0))}let m=0,g=f-c;if(g-=360*(16384-(16384.499999999996-g/360|0)),0==g)m=r[l];else{let e=0,s=0;o?(e=0,s=g):(e=r[l],s=r[l+1]);let a=g>0,n=e>=0;t.MathUtils.signum(s)!=t.MathUtils.signum(g)&&Math.abs(s)<=90&&(Math.abs(e)>180&&(e+=360*t.MathUtils.signum(e)),n=a),m=g+e-e%360,n!=a&&(m+=360*t.MathUtils.signum(e)),r[l]=m}r[l+1]=g,c+=m*n,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}queueEvents(t,e){let s=t.animationStart,a=t.animationEnd,n=a-s,i=t.trackLast%n,r=this.events,l=0,o=r.length;for(;l<o;l++){let e=r[l];if(e.time<i)break;e.time>a||this.queue.event(t,e)}let h=!1;for(h=t.loop?0==n||i>t.trackTime%n:e>=a&&t.animationLast<a,h&&this.queue.complete(t);l<o;l++){r[l].time<s||this.queue.event(t,r[l])}}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(null==e)return;this.queue.end(e),this.disposeNext(e);let s=e;for(;;){let t=s.mixingFrom;if(null==t)break;this.queue.end(t),s.mixingFrom=null,s.mixingTo=null,s=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,s){let a=this.expandToIndex(t);this.tracks[t]=e,null!=a&&(s&&this.queue.interrupt(a),e.mixingFrom=a,a.mixingTo=e,e.mixTime=0,null!=a.mixingFrom&&a.mixDuration>0&&(e.interruptAlpha*=Math.min(1,a.mixTime/a.mixDuration)),a.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,s){let a=this.data.skeletonData.findAnimation(e);if(null==a)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,a,s)}setAnimationWith(t,e,s){if(null==e)throw new Error("animation cannot be null.");let a=!0,n=this.expandToIndex(t);null!=n&&(-1==n.nextTrackLast?(this.tracks[t]=n.mixingFrom,this.queue.interrupt(n),this.queue.end(n),this.disposeNext(n),n=n.mixingFrom,a=!1):this.disposeNext(n));let i=this.trackEntry(t,e,s,n);return this.setCurrent(t,i,a),this.queue.drain(),i}addAnimation(t,e,s,a){let n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,n,s,a)}addAnimationWith(t,e,s,a){if(null==e)throw new Error("animation cannot be null.");let n=this.expandToIndex(t);if(null!=n)for(;null!=n.next;)n=n.next;let i=this.trackEntry(t,e,s,n);if(null==n)this.setCurrent(t,i,!0),this.queue.drain();else if(n.next=i,a<=0){let t=n.animationEnd-n.animationStart;0!=t?(n.loop?a+=t*(1+(n.trackTime/t|0)):a+=Math.max(t,n.trackTime),a-=this.data.getMix(n.animation,e)):a=n.trackTime}return i.delay=a,i}setEmptyAnimation(t,s){let a=this.setAnimationWith(t,e.emptyAnimation,!1);return a.mixDuration=s,a.trackEnd=s,a}addEmptyAnimation(t,s,a){a<=0&&(a-=s);let n=this.addAnimationWith(t,e.emptyAnimation,!1,a);return n.mixDuration=s,n.trackEnd=s,n}setEmptyAnimations(t){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,s=this.tracks.length;e<s;e++){let s=this.tracks[e];null!=s&&this.setEmptyAnimation(s.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()}expandToIndex(e){return e<this.tracks.length?this.tracks[e]:(t.Utils.ensureArrayCapacity(this.tracks,e+1,null),this.tracks.length=e+1,null)}trackEntry(e,s,a,n){let i=this.trackEntryPool.obtain();return i.trackIndex=e,i.animation=s,i.loop=a,i.holdPrevious=!1,i.eventThreshold=0,i.attachmentThreshold=0,i.drawOrderThreshold=0,i.animationStart=0,i.animationEnd=s.duration,i.animationLast=-1,i.nextAnimationLast=-1,i.delay=0,i.trackTime=0,i.trackLast=-1,i.nextTrackLast=-1,i.trackEnd=Number.MAX_VALUE,i.timeScale=1,i.alpha=1,i.interruptAlpha=1,i.mixTime=0,i.mixDuration=null==n?0:this.data.getMix(n.animation,s),i.mixBlend=t.MixBlend.replace,i}disposeNext(t){let e=t.next;for(;null!=e;)this.queue.dispose(e),e=e.next;t.next=null}_animationsChanged(){this.animationsChanged=!1,this.propertyIDs.clear();for(let e=0,s=this.tracks.length;e<s;e++){let s=this.tracks[e];if(null!=s){for(;null!=s.mixingFrom;)s=s.mixingFrom;do{null!=s.mixingFrom&&s.mixBlend==t.MixBlend.add||this.computeHold(s),s=s.mixingTo}while(null!=s)}}}computeHold(s){let a=s.mixingTo,n=s.animation.timelines,i=s.animation.timelines.length,r=t.Utils.setArraySize(s.timelineMode,i);s.timelineHoldMix.length=0;let l=t.Utils.setArraySize(s.timelineHoldMix,i),o=this.propertyIDs;if(null!=a&&a.holdPrevious)for(let t=0;t<i;t++)r[t]=o.add(n[t].getPropertyId())?e.HOLD_FIRST:e.HOLD_SUBSEQUENT;else t:for(let h=0;h<i;h++){let i=n[h],d=i.getPropertyId();if(o.add(d))if(null==a||i instanceof t.AttachmentTimeline||i instanceof t.DrawOrderTimeline||i instanceof t.EventTimeline||!a.animation.hasTimeline(d))r[h]=e.FIRST;else{for(let t=a.mixingTo;null!=t;t=t.mixingTo)if(!t.animation.hasTimeline(d)){if(s.mixDuration>0){r[h]=e.HOLD_MIX,l[h]=t;continue t}break}r[h]=e.HOLD_FIRST}else r[h]=e.SUBSEQUENT}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(null==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()}}e.emptyAnimation=new t.Animation("<empty>",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,t.AnimationState=e;class s{constructor(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=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.length=0}}t.TrackEntry=s;class a{constructor(t){this.objects=[],this.drainDisabled=!1,this.animState=t}start(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0}interrupt(t){this.objects.push(n.interrupt),this.objects.push(t)}end(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0}dispose(t){this.objects.push(n.dispose),this.objects.push(t)}complete(t){this.objects.push(n.complete),this.objects.push(t)}event(t,e){this.objects.push(n.event),this.objects.push(t),this.objects.push(e)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;let t=this.objects,e=this.animState.listeners;for(let s=0;s<t.length;s+=2){let a=t[s],i=t[s+1];switch(a){case n.start:null!=i.listener&&i.listener.start&&i.listener.start(i);for(let t=0;t<e.length;t++)e[t].start&&e[t].start(i);break;case n.interrupt:null!=i.listener&&i.listener.interrupt&&i.listener.interrupt(i);for(let t=0;t<e.length;t++)e[t].interrupt&&e[t].interrupt(i);break;case n.end:null!=i.listener&&i.listener.end&&i.listener.end(i);for(let t=0;t<e.length;t++)e[t].end&&e[t].end(i);case n.dispose:null!=i.listener&&i.listener.dispose&&i.listener.dispose(i);for(let t=0;t<e.length;t++)e[t].dispose&&e[t].dispose(i);this.animState.trackEntryPool.free(i);break;case n.complete:null!=i.listener&&i.listener.complete&&i.listener.complete(i);for(let t=0;t<e.length;t++)e[t].complete&&e[t].complete(i);break;case n.event:let a=t[2+s++];null!=i.listener&&i.listener.event&&i.listener.event(i,a);for(let t=0;t<e.length;t++)e[t].event&&e[t].event(i,a)}}this.clear(),this.drainDisabled=!1}clear(){this.objects.length=0}}let n;t.EventQueue=a,function(t){t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event"}(n=t.EventType||(t.EventType={}));t.AnimationStateAdapter=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}}}(spine||(spine={})),function(t){t.AnimationStateData=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,s){let a=this.skeletonData.findAnimation(t);if(null==a)throw new Error("Animation not found: "+t);let n=this.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);this.setMixWith(a,n,s)}setMixWith(t,e,s){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");let a=t.name+"."+e.name;this.animationToMixTime[a]=s}getMix(t,e){let s=t.name+"."+e.name,a=this.animationToMixTime[s];return void 0===a?this.defaultMix:a}}}(spine||(spine={})),function(t){t.AssetManager=class{constructor(t,e=""){this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.rawDataUris={},this.textureLoader=t,this.pathPrefix=e}downloadText(t,e,s){let a=Laya.Laya?Laya.Laya:Laya;a.loader.load([{type:a.Loader.TEXT,url:t}],a.Handler.create(this,n=>{n?e(a.loader.getRes(t)):s("download text error: ",t)}))}downloadBinary(t,e,s){let a=Laya.Laya?Laya.Laya:Laya;a.loader.load([{type:a.Loader.BUFFER,url:t}],a.Handler.create(this,n=>{n?e(new Uint8Array(a.loader.getRes(t))):s("download binary error: ",t)}))}setRawDataURI(t,e){this.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=null,s=null){t=this.pathPrefix+t,this.toLoad++,this.downloadBinary(t,s=>{this.assets[t]=s,e&&e(t,s),this.toLoad--,this.loaded++},(e,a)=>{this.errors[t]=`Couldn't load binary ${t}: status ${e}, ${a}`,s&&s(t,`Couldn't load binary ${t}: status ${e}, ${a}`),this.toLoad--,this.loaded++})}loadText(t,e=null,s=null){t=this.pathPrefix+t,this.toLoad++,this.downloadText(t,s=>{this.assets[t]=s,e&&e(t,s),this.toLoad--,this.loaded++},(e,a)=>{this.errors[t]=`Couldn't load text ${t}: status ${status}, ${a}`,s&&s(t,`Couldn't load text ${t}: status ${status}, ${a}`),this.toLoad--,this.loaded++})}loadTexture(t,e=null,s=null){t=this.pathPrefix+t;this.toLoad++;let a=Laya.Laya?Laya.Laya:Laya;a.loader.load([{type:a.Loader.IMAGE,url:t}],a.Handler.create(this,n=>{if(n){let s=this.textureLoader(a.loader.getRes(t));this.assets[t]=s,this.toLoad--,this.loaded++,e&&e(t,s)}else this.errors[t]="Couldn't load image "+t,this.toLoad--,this.loaded++,s&&s(t,"Couldn't load image "+t)}))}loadTextureAtlas(e,s=null,a=null){let n=e.lastIndexOf("/")>=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,i=>{let r={count:0},l=new Array;try{new t.TextureAtlas(i,e=>{l.push(""==n?e:n+"/"+e);let s=document.createElement("img");return new t.FakeTexture(s)})}catch(t){let s=t;return this.errors[e]=`Couldn't load texture atlas ${e}: ${s.message}`,a&&a(e,`Couldn't load texture atlas ${e}: ${s.message}`),this.toLoad--,void this.loaded++}for(let o of l){let h=!1;this.loadTexture(o,(o,d)=>{if(r.count++,r.count==l.length)if(h)this.errors[e]=`Couldn't load texture atlas page ${o}} of atlas ${e}`,a&&a(e,`Couldn't load texture atlas page ${o} of atlas ${e}`),this.toLoad--,this.loaded++;else try{let a=new t.TextureAtlas(i,t=>this.get(""==n?t:n+"/"+t));this.assets[e]=a,s&&s(e,a),this.toLoad--,this.loaded++}catch(t){let s=t;this.errors[e]=`Couldn't load texture atlas ${e}: ${s.message}`,a&&a(e,`Couldn't load texture atlas ${e}: ${s.message}`),this.toLoad--,this.loaded++}},(t,s)=>{h=!0,r.count++,r.count==l.length&&(this.errors[e]=`Couldn't load texture atlas page ${t}} of atlas ${e}`,a&&a(e,`Couldn't load texture atlas page ${t} of atlas ${e}`),this.toLoad--,this.loaded++)})}},(t,s)=>{this.errors[e]=`Couldn't load texture atlas ${e}: status ${status}, ${s}`,a&&a(e,`Couldn't load texture atlas ${e}: status ${status}, ${s}`),this.toLoad--,this.loaded++})}get(t){return t=this.pathPrefix+t,this.assets[t]}remove(t){t=this.pathPrefix+t;let e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}}}(spine||(spine={})),function(t){t.AtlasAttachmentLoader=class{constructor(t){this.atlas=t}newRegionAttachment(e,s,a){let n=this.atlas.findRegion(a);if(null==n)throw new Error("Region not found in atlas: "+a+" (region attachment: "+s+")");n.renderObject=n;let i=new t.RegionAttachment(s);return i.setRegion(n),i}newMeshAttachment(e,s,a){let n=this.atlas.findRegion(a);if(null==n)throw new Error("Region not found in atlas: "+a+" (mesh attachment: "+s+")");n.renderObject=n;let i=new t.MeshAttachment(s);return i.region=n,i}newBoundingBoxAttachment(e,s){return new t.BoundingBoxAttachment(s)}newPathAttachment(e,s){return new t.PathAttachment(s)}newPointAttachment(e,s){return new t.PointAttachment(s)}newClippingAttachment(e,s){return new t.ClippingAttachment(s)}}}(spine||(spine={})),function(t){let e;!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(e=t.BlendMode||(t.BlendMode={}))}(spine||(spine={})),function(t){t.Bone=class{constructor(t,e,s){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=s,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(e,s,a,n,i,r,l){this.ax=e,this.ay=s,this.arotation=a,this.ascaleX=n,this.ascaleY=i,this.ashearX=r,this.ashearY=l,this.appliedValid=!0;let o=this.parent;if(null==o){let o=this.skeleton,h=a+90+l,d=o.scaleX,u=o.scaleY;return this.a=t.MathUtils.cosDeg(a+r)*n*d,this.b=t.MathUtils.cosDeg(h)*i*d,this.c=t.MathUtils.sinDeg(a+r)*n*u,this.d=t.MathUtils.sinDeg(h)*i*u,this.worldX=e*d+o.x,void(this.worldY=s*u+o.y)}let h=o.a,d=o.b,u=o.c,c=o.d;switch(this.worldX=h*e+d*s+o.worldX,this.worldY=u*e+c*s+o.worldY,this.data.transformMode){case t.TransformMode.Normal:{let e=a+90+l,s=t.MathUtils.cosDeg(a+r)*n,o=t.MathUtils.cosDeg(e)*i,f=t.MathUtils.sinDeg(a+r)*n,m=t.MathUtils.sinDeg(e)*i;return this.a=h*s+d*f,this.b=h*o+d*m,this.c=u*s+c*f,void(this.d=u*o+c*m)}case t.TransformMode.OnlyTranslation:{let e=a+90+l;this.a=t.MathUtils.cosDeg(a+r)*n,this.b=t.MathUtils.cosDeg(e)*i,this.c=t.MathUtils.sinDeg(a+r)*n,this.d=t.MathUtils.sinDeg(e)*i;break}case t.TransformMode.NoRotationOrReflection:{let e=h*h+u*u,s=0;e>1e-4?(e=Math.abs(h*c-d*u)/e,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,d=u*e,c=h*e,s=Math.atan2(u,h)*t.MathUtils.radDeg):(h=0,u=0,s=90-Math.atan2(c,d)*t.MathUtils.radDeg);let o=a+r-s,f=a+l-s+90,m=t.MathUtils.cosDeg(o)*n,g=t.MathUtils.cosDeg(f)*i,p=t.MathUtils.sinDeg(o)*n,w=t.MathUtils.sinDeg(f)*i;this.a=h*m-d*p,this.b=h*g-d*w,this.c=u*m+c*p,this.d=u*g+c*w;break}case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:{let e=t.MathUtils.cosDeg(a),s=t.MathUtils.sinDeg(a),o=(h*e+d*s)/this.skeleton.scaleX,f=(u*e+c*s)/this.skeleton.scaleY,m=Math.sqrt(o*o+f*f);m>1e-5&&(m=1/m),o*=m,f*=m,m=Math.sqrt(o*o+f*f),this.data.transformMode==t.TransformMode.NoScale&&h*c-d*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(m=-m);let g=Math.PI/2+Math.atan2(f,o),p=Math.cos(g)*m,w=Math.sin(g)*m,x=t.MathUtils.cosDeg(r)*n,M=t.MathUtils.cosDeg(90+l)*i,E=t.MathUtils.sinDeg(r)*n,T=t.MathUtils.sinDeg(90+l)*i;this.a=o*x+p*E,this.b=o*M+p*T,this.c=f*x+w*E,this.d=f*M+w*T;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){this.appliedValid=!0;let e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);let s=e.a,a=e.b,n=e.c,i=e.d,r=1/(s*i-a*n),l=this.worldX-e.worldX,o=this.worldY-e.worldY;this.ax=l*i*r-o*a*r,this.ay=o*s*r-l*n*r;let h=r*i,d=r*s,u=r*a,c=r*n,f=h*this.a-u*this.c,m=h*this.b-u*this.d,g=d*this.c-c*this.a,p=d*this.d-c*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+g*g),this.ascaleX>1e-4){let e=f*p-m*g;this.ascaleY=e/this.ascaleX,this.ashearY=Math.atan2(f*m+g*p,e)*t.MathUtils.radDeg,this.arotation=Math.atan2(g,f)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(m*m+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,m)*t.MathUtils.radDeg}worldToLocal(t){let e=this.a,s=this.b,a=this.c,n=this.d,i=1/(e*n-s*a),r=t.x-this.worldX,l=t.y-this.worldY;return t.x=r*n*i-l*s*i,t.y=l*e*i-r*a*i,t}localToWorld(t){let e=t.x,s=t.y;return t.x=e*this.a+s*this.b+this.worldX,t.y=e*this.c+s*this.d+this.worldY,t}worldToLocalRotation(e){let s=t.MathUtils.sinDeg(e),a=t.MathUtils.cosDeg(e);return Math.atan2(this.a*s-this.c*a,this.d*a-this.b*s)*t.MathUtils.radDeg+this.rotation-this.shearX}localToWorldRotation(e){e-=this.rotation-this.shearX;let s=t.MathUtils.sinDeg(e),a=t.MathUtils.cosDeg(e);return Math.atan2(a*this.c+s*this.d,a*this.a+s*this.b)*t.MathUtils.radDeg}rotateWorld(e){let s=this.a,a=this.b,n=this.c,i=this.d,r=t.MathUtils.cosDeg(e),l=t.MathUtils.sinDeg(e);this.a=r*s-l*n,this.b=r*a-l*i,this.c=l*s+r*n,this.d=l*a+r*i,this.appliedValid=!1}}}(spine||(spine={})),function(t){let e;t.BoneData=class{constructor(s,a,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,s<0)throw new Error("index must be >= 0.");if(null==a)throw new Error("name cannot be null.");this.index=s,this.name=a,this.parent=n}},function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(spine||(spine={})),function(t){t.ConstraintData=class{constructor(t,e,s){this.name=t,this.order=e,this.skinRequired=s}}}(spine||(spine={})),function(t){t.Event=class{constructor(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}}(spine||(spine={})),function(t){t.EventData=class{constructor(t){this.name=t}}}(spine||(spine={})),function(t){t.IkConstraint=class{constructor(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(let s=0;s<t.bones.length;s++)this.bones.push(e.findBone(t.bones[s].name));this.target=e.findBone(t.target.name)}isActive(){return this.active}apply(){this.update()}update(){let t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.softness,this.mix)}}apply1(e,s,a,n,i,r,l){e.appliedValid||e.updateAppliedTransform();let o=e.parent,h=o.a,d=o.b,u=o.c,c=o.d,f=-e.ashearX-e.arotation,m=0,g=0;switch(e.data.transformMode){case t.TransformMode.OnlyTranslation:m=s-e.worldX,g=a-e.worldY;break;case t.TransformMode.NoRotationOrReflection:let n=Math.abs(h*c-d*u)/(h*h+u*u),i=h/e.skeleton.scaleX,r=u/e.skeleton.scaleY;d=-r*n*e.skeleton.scaleX,c=i*n*e.skeleton.scaleY,f+=Math.atan2(r,i)*t.MathUtils.radDeg;default:let l=s-o.worldX,p=a-o.worldY,w=h*c-d*u;m=(l*c-p*d)/w-e.ax,g=(p*h-l*u)/w-e.ay}f+=Math.atan2(g,m)*t.MathUtils.radDeg,e.ascaleX<0&&(f+=180),f>180?f-=360:f<-180&&(f+=360);let p=e.ascaleX,w=e.ascaleY;if(n||i){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:m=s-e.worldX,g=a-e.worldY}let o=e.data.length*p,h=Math.sqrt(m*m+g*g);if(n&&h<o||i&&h>o&&o>1e-4){let t=(h/o-1)*l+1;p*=t,r&&(w*=t)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*l,p,w,e.ashearX,e.ashearY)}apply2(e,s,a,n,i,r,l,o){if(0==o)return void s.updateWorldTransform();e.appliedValid||e.updateAppliedTransform(),s.appliedValid||s.updateAppliedTransform();let h=e.ax,d=e.ay,u=e.ascaleX,c=u,f=e.ascaleY,m=s.ascaleX,g=0,p=0,w=0;u<0?(u=-u,g=180,w=-1):(g=0,w=1),f<0&&(f=-f,w=-w),m<0?(m=-m,p=180):p=0;let x=s.ax,M=0,E=0,T=0,A=e.a,b=e.b,S=e.c,y=e.d,I=Math.abs(u-f)<=1e-4;I?(M=s.ay,E=A*x+b*M+e.worldX,T=S*x+y*M+e.worldY):(M=0,E=A*x+e.worldX,T=S*x+e.worldY);let R=e.parent;A=R.a,b=R.b,S=R.c,y=R.d;let C,P,V=1/(A*y-b*S),k=E-R.worldX,v=T-R.worldY,F=(k*y-v*b)*V-h,N=(v*A-k*S)*V-d,U=Math.sqrt(F*F+N*N),L=s.data.length*m;if(U<1e-4)return this.apply1(e,a,n,!1,r,!1,o),void s.updateWorldTransformWith(x,M,0,s.ascaleX,s.ascaleY,s.ashearX,s.ashearY);k=a-R.worldX,v=n-R.worldY;let Y=(k*y-v*b)*V-h,X=(v*A-k*S)*V-d,B=Y*Y+X*X;if(0!=l){l*=u*(m+1)/2;let t=Math.sqrt(B),e=t-U-L*u+l;if(e>0){let s=Math.min(1,e/(2*l))-1;s=(e-l*(1-s*s))/t,Y-=s*Y,X-=s*X,B=Y*Y+X*X}}t:if(I){L*=u;let t=(B-U*U-L*L)/(2*U*L);t<-1?t=-1:t>1&&(t=1,r&&(c*=(Math.sqrt(B)/(U+L)-1)*o+1)),P=Math.acos(t)*i,A=U+L*t,b=L*Math.sin(P),C=Math.atan2(X*A-Y*b,Y*A+X*b)}else{A=u*L,b=f*L;let e=A*A,s=b*b,a=Math.atan2(X,Y);S=s*U*U+e*B-e*s;let n=-2*s*U,r=s-e;if(y=n*n-4*r*S,y>=0){let t=Math.sqrt(y);n<0&&(t=-t),t=-(n+t)/2;let e=t/r,s=S/t,l=Math.abs(e)<Math.abs(s)?e:s;if(l*l<=B){v=Math.sqrt(B-l*l)*i,C=a-Math.atan2(v,l),P=Math.atan2(v/f,(l-U)/u);break t}}let l=t.MathUtils.PI,o=U-A,h=o*o,d=0,c=0,m=U+A,g=m*m,p=0;S=-A*U/(e-s),S>=-1&&S<=1&&(S=Math.acos(S),k=A*Math.cos(S)+U,v=b*Math.sin(S),y=k*k+v*v,y<h&&(l=S,h=y,o=k,d=v),y>g&&(c=S,g=y,m=k,p=v)),B<=(h+g)/2?(C=a-Math.atan2(d*i,o),P=l*i):(C=a-Math.atan2(p*i,m),P=c*i)}let O=Math.atan2(M,x)*w,_=e.arotation;C=(C-O)*t.MathUtils.radDeg+g-_,C>180?C-=360:C<-180&&(C+=360),e.updateWorldTransformWith(h,d,_+C*o,c,e.ascaleY,0,0),_=s.arotation,P=((P+O)*t.MathUtils.radDeg-s.ashearX)*w+p-_,P>180?P-=360:P<-180&&(P+=360),s.updateWorldTransformWith(x,M,_+P*o,s.ascaleX,s.ascaleY,s.ashearX,s.ashearY)}}}(spine||(spine={})),function(t){class e extends t.ConstraintData{constructor(t){super(t,0,!1),this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}}t.IkConstraintData=e}(spine||(spine={})),function(t){class e{constructor(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let s=0,a=t.bones.length;s<a;s++)this.bones.push(e.findBone(t.bones[s].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}isActive(){return this.active}apply(){this.update()}update(){let s=this.target.getAttachment();if(!(s instanceof t.PathAttachment))return;let a=this.rotateMix,n=this.translateMix,i=a>0;if(!(n>0)&&!i)return;let r=this.data,l=r.spacingMode==t.SpacingMode.Percent,o=r.rotateMode,h=o==t.RotateMode.Tangent,d=o==t.RotateMode.ChainScale,u=this.bones.length,c=h?u:u+1,f=this.bones,m=t.Utils.setArraySize(this.spaces,c),g=null,p=this.spacing;if(d||!l){d&&(g=t.Utils.setArraySize(this.lengths,u));let s=r.spacingMode==t.SpacingMode.Length;for(let t=0,a=c-1;t<a;){let a=f[t],n=a.data.length;if(n<e.epsilon)d&&(g[t]=0),m[++t]=0;else if(l){if(d){let e=n*a.a,s=n*a.c,i=Math.sqrt(e*e+s*s);g[t]=i}m[++t]=p}else{let e=n*a.a,i=n*a.c,r=Math.sqrt(e*e+i*i);d&&(g[t]=r),m[++t]=(s?n+p:p)*r/n}}}else for(let t=1;t<c;t++)m[t]=p;let w=this.computeWorldPositions(s,c,h,r.positionMode==t.PositionMode.Percent,l),x=w[0],M=w[1],E=r.offsetRotation,T=!1;if(0==E)T=o==t.RotateMode.Chain;else{T=!1;let e=this.target.bone;E*=e.a*e.d-e.b*e.c>0?t.MathUtils.degRad:-t.MathUtils.degRad}for(let e=0,s=3;e<u;e++,s+=3){let r=f[e];r.worldX+=(x-r.worldX)*n,r.worldY+=(M-r.worldY)*n;let l=w[s],o=w[s+1],u=l-x,c=o-M;if(d){let t=g[e];if(0!=t){let e=(Math.sqrt(u*u+c*c)/t-1)*a+1;r.a*=e,r.c*=e}}if(x=l,M=o,i){let n=r.a,i=r.b,l=r.c,o=r.d,d=0,f=0,g=0;if(d=h?w[s-1]:0==m[e+1]?w[s+2]:Math.atan2(c,u),d-=Math.atan2(l,n),T){f=Math.cos(d),g=Math.sin(d);let t=r.data.length;x+=(t*(f*n-g*l)-u)*a,M+=(t*(g*n+f*l)-c)*a}else d+=E;d>t.MathUtils.PI?d-=t.MathUtils.PI2:d<-t.MathUtils.PI&&(d+=t.MathUtils.PI2),d*=a,f=Math.cos(d),g=Math.sin(d),r.a=f*n-g*l,r.b=f*i-g*o,r.c=g*n+f*l,r.d=g*i+f*o}r.appliedValid=!1}}computeWorldPositions(s,a,n,i,r){let l=this.target,o=this.position,h=this.spaces,d=t.Utils.setArraySize(this.positions,3*a+2),u=null,c=s.closed,f=s.worldVerticesLength,m=f/6,g=e.NONE;if(!s.constantSpeed){let p=s.lengths;m-=c?1:2;let w=p[m];if(i&&(o*=w),r)for(let t=1;t<a;t++)h[t]*=w;u=t.Utils.setArraySize(this.world,8);for(let t=0,i=0,r=0;t<a;t++,i+=3){let a=h[t];o+=a;let x=o;if(c)x%=w,x<0&&(x+=w),r=0;else{if(x<0){g!=e.BEFORE&&(g=e.BEFORE,s.computeWorldVertices(l,2,4,u,0,2)),this.addBeforePosition(x,u,0,d,i);continue}if(x>w){g!=e.AFTER&&(g=e.AFTER,s.computeWorldVertices(l,f-6,4,u,0,2)),this.addAfterPosition(x-w,u,0,d,i);continue}}for(;;r++){let t=p[r];if(!(x>t)){if(0==r)x/=t;else{let e=p[r-1];x=(x-e)/(t-e)}break}}r!=g&&(g=r,c&&r==m?(s.computeWorldVertices(l,f-4,4,u,0,2),s.computeWorldVertices(l,0,4,u,4,2)):s.computeWorldVertices(l,6*r+2,8,u,0,2)),this.addCurvePosition(x,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],d,i,n||t>0&&0==a)}return d}c?(f+=2,u=t.Utils.setArraySize(this.world,f),s.computeWorldVertices(l,2,f-4,u,0,2),s.computeWorldVertices(l,0,2,u,f-4,2),u[f-2]=u[0],u[f-1]=u[1]):(m--,f-=4,u=t.Utils.setArraySize(this.world,f),s.computeWorldVertices(l,2,f,u,0,2));let p=t.Utils.setArraySize(this.curves,m),w=0,x=u[0],M=u[1],E=0,T=0,A=0,b=0,S=0,y=0,I=0,R=0,C=0,P=0,V=0,k=0,v=0,F=0;for(let t=0,e=2;t<m;t++,e+=6)E=u[e],T=u[e+1],A=u[e+2],b=u[e+3],S=u[e+4],y=u[e+5],I=.1875*(x-2*E+A),R=.1875*(M-2*T+b),C=.09375*(3*(E-A)-x+S),P=.09375*(3*(T-b)-M+y),V=2*I+C,k=2*R+P,v=.75*(E-x)+I+.16666667*C,F=.75*(T-M)+R+.16666667*P,w+=Math.sqrt(v*v+F*F),v+=V,F+=k,V+=C,k+=P,w+=Math.sqrt(v*v+F*F),v+=V,F+=k,w+=Math.sqrt(v*v+F*F),v+=V+C,F+=k+P,w+=Math.sqrt(v*v+F*F),p[t]=w,x=S,M=y;if(o*=i?w:w/s.lengths[m-1],r)for(let t=1;t<a;t++)h[t]*=w;let N=this.segments,U=0;for(let t=0,e=0,s=0,i=0;t<a;t++,e+=3){let a=h[t];o+=a;let r=o;if(c)r%=w,r<0&&(r+=w),s=0;else{if(r<0){this.addBeforePosition(r,u,0,d,e);continue}if(r>w){this.addAfterPosition(r-w,u,f-4,d,e);continue}}for(;;s++){let t=p[s];if(!(r>t)){if(0==s)r/=t;else{let e=p[s-1];r=(r-e)/(t-e)}break}}if(s!=g){g=s;let t=6*s;for(x=u[t],M=u[t+1],E=u[t+2],T=u[t+3],A=u[t+4],b=u[t+5],S=u[t+6],y=u[t+7],I=.03*(x-2*E+A),R=.03*(M-2*T+b),C=.006*(3*(E-A)-x+S),P=.006*(3*(T-b)-M+y),V=2*I+C,k=2*R+P,v=.3*(E-x)+I+.16666667*C,F=.3*(T-M)+R+.16666667*P,U=Math.sqrt(v*v+F*F),N[0]=U,t=1;t<8;t++)v+=V,F+=k,V+=C,k+=P,U+=Math.sqrt(v*v+F*F),N[t]=U;v+=V,F+=k,U+=Math.sqrt(v*v+F*F),N[8]=U,v+=V+C,F+=k+P,U+=Math.sqrt(v*v+F*F),N[9]=U,i=0}for(r*=U;;i++){let t=N[i];if(!(r>t)){if(0==i)r/=t;else{let e=N[i-1];r=i+(r-e)/(t-e)}break}}this.addCurvePosition(.1*r,x,M,E,T,A,b,S,y,d,e,n||t>0&&0==a)}return d}addBeforePosition(t,e,s,a,n){let i=e[s],r=e[s+1],l=e[s+2]-i,o=e[s+3]-r,h=Math.atan2(o,l);a[n]=i+t*Math.cos(h),a[n+1]=r+t*Math.sin(h),a[n+2]=h}addAfterPosition(t,e,s,a,n){let i=e[s+2],r=e[s+3],l=i-e[s],o=r-e[s+1],h=Math.atan2(o,l);a[n]=i+t*Math.cos(h),a[n+1]=r+t*Math.sin(h),a[n+2]=h}addCurvePosition(t,e,s,a,n,i,r,l,o,h,d,u){if(0==t||isNaN(t))return h[d]=e,h[d+1]=s,void(h[d+2]=Math.atan2(n-s,a-e));let c=t*t,f=c*t,m=1-t,g=m*m,p=g*m,w=m*t,x=3*w,M=m*x,E=x*t,T=e*p+a*M+i*E+l*f,A=s*p+n*M+r*E+o*f;h[d]=T,h[d+1]=A,u&&(h[d+2]=t<.001?Math.atan2(n-s,a-e):Math.atan2(A-(s*g+n*w*2+r*c),T-(e*g+a*w*2+i*c)))}}e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,t.PathConstraint=e}(spine||(spine={})),function(t){class e extends t.ConstraintData{constructor(t){super(t,0,!1),this.bones=new Array}}let s,a,n;t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(s=t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(a=t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(n=t.RotateMode||(t.RotateMode={}))}(spine||(spine={})),function(t){class e{constructor(t){this.toLoad=new Array,this.assets={},this.clientId=t}loaded(){let t=0;for(let e in this.assets)t++;return t}}t.SharedAssetManager=class{constructor(t=""){this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}queueAsset(t,s,a){let n=this.clientAssets[t];return null==n&&(n=new e(t),this.clientAssets[t]=n),null!==s&&(n.textureLoader=s),n.toLoad.push(a),this.queuedAssets[a]!==a&&(this.queuedAssets[a]=a,!0)}loadText(t,e){if(e=this.pathPrefix+e,!this.queueAsset(t,null,e))return;let s=new XMLHttpRequest;s.overrideMimeType("text/html"),s.onreadystatechange=()=>{s.readyState==XMLHttpRequest.DONE&&(s.status>=200&&s.status<300?this.rawAssets[e]=s.responseText:this.errors[e]=`Couldn't load text ${e}: status ${s.status}, ${s.responseText}`)},s.open("GET",e,!0),s.send()}loadJson(t,e){if(e=this.pathPrefix+e,!this.queueAsset(t,null,e))return;let s=new XMLHttpRequest;s.overrideMimeType("text/html"),s.onreadystatechange=()=>{s.readyState==XMLHttpRequest.DONE&&(s.status>=200&&s.status<300?this.rawAssets[e]=JSON.parse(s.responseText):this.errors[e]=`Couldn't load text ${e}: status ${s.status}, ${s.responseText}`)},s.open("GET",e,!0),s.send()}loadTexture(t,e,s){if(s=this.pathPrefix+s,!this.queueAsset(t,e,s))return;if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(s,{mode:"cors"}).then(t=>(t.ok||(this.errors[s]="Couldn't load image "+s),t.blob())).then(t=>createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})).then(t=>{this.rawAssets[s]=t})}else{let t=new Image;t.crossOrigin="anonymous",t.onload=e=>{this.rawAssets[s]=t},t.onerror=t=>{this.errors[s]="Couldn't load image "+s},t.src=s}}get(t,e){e=this.pathPrefix+e;let s=this.clientAssets[t];return null==s||s.assets[e]}updateClientAssets(t){let e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts;for(let s=0;s<t.toLoad.length;s++){let a=t.toLoad[s],n=t.assets[a];if(null==n){let s=this.rawAssets[a];if(null==s)continue;e?s instanceof ImageBitmap?t.assets[a]=t.textureLoader(s):t.assets[a]=s:s instanceof HTMLImageElement?t.assets[a]=t.textureLoader(s):t.assets[a]=s}}}isLoadingComplete(t){let e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())}dispose(){}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}}}(spine||(spine={})),function(t){t.Skeleton=class{constructor(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(let s=0;s<e.bones.length;s++){let a,n=e.bones[s];if(null==n.parent)a=new t.Bone(n,this,null);else{let e=this.bones[n.parent.index];a=new t.Bone(n,this,e),e.children.push(a)}this.bones.push(a)}this.slots=new Array,this.drawOrder=new Array;for(let s=0;s<e.slots.length;s++){let a=e.slots[s],n=this.bones[a.boneData.index],i=new t.Slot(a,n);this.slots.push(i),this.drawOrder.push(i)}this.ikConstraints=new Array;for(let s=0;s<e.ikConstraints.length;s++){let a=e.ikConstraints[s];this.ikConstraints.push(new t.IkConstraint(a,this))}this.transformConstraints=new Array;for(let s=0;s<e.transformConstraints.length;s++){let a=e.transformConstraints[s];this.transformConstraints.push(new t.TransformConstraint(a,this))}this.pathConstraints=new Array;for(let s=0;s<e.pathConstraints.length;s++){let a=e.pathConstraints[s];this.pathConstraints.push(new t.PathConstraint(a,this))}this.color=new t.Color(1,1,1,1),this.updateCache()}updateCache(){this._updateCache.length=0,this.updateCacheReset.length=0;let t=this.bones;for(let e=0,s=t.length;e<s;e++){let s=t[e];s.sorted=s.data.skinRequired,s.active=!s.sorted}if(null!=this.skin){let t=this.skin.bones;for(let e=0,s=this.skin.bones.length;e<s;e++){let s=this.bones[t[e].index];do{s.sorted=!1,s.active=!0,s=s.parent}while(null!=s)}}let e=this.ikConstraints,s=this.transformConstraints,a=this.pathConstraints,n=e.length,i=s.length,r=a.length,l=n+i+r;t:for(let t=0;t<l;t++){for(let s=0;s<n;s++){let a=e[s];if(a.data.order==t){this.sortIkConstraint(a);continue t}}for(let e=0;e<i;e++){let a=s[e];if(a.data.order==t){this.sortTransformConstraint(a);continue t}}for(let e=0;e<r;e++){let s=a[e];if(s.data.order==t){this.sortPathConstraint(s);continue t}}}for(let e=0,s=t.length;e<s;e++)this.sortBone(t[e])}sortIkConstraint(e){if(e.active=e.target.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),!e.active)return;let s=e.target;this.sortBone(s);let a=e.bones,n=a[0];if(this.sortBone(n),a.length>1){let t=a[a.length-1];this._updateCache.indexOf(t)>-1||this.updateCacheReset.push(t)}this._updateCache.push(e),this.sortReset(n.children),a[a.length-1].sorted=!0}sortPathConstraint(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),!e.active)return;let s=e.target,a=s.data.index,n=s.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,a,n),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,a,n);for(let t=0,e=this.data.skins.length;t<e;t++)this.sortPathConstraintAttachment(this.data.skins[t],a,n);let i=s.getAttachment();i instanceof t.PathAttachment&&this.sortPathConstraintAttachmentWith(i,n);let r=e.bones,l=r.length;for(let t=0;t<l;t++)this.sortBone(r[t]);this._updateCache.push(e);for(let t=0;t<l;t++)this.sortReset(r[t].children);for(let t=0;t<l;t++)r[t].sorted=!0}sortTransformConstraint(e){if(e.active=e.target.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),!e.active)return;this.sortBone(e.target);let s=e.bones,a=s.length;if(e.data.local)for(let t=0;t<a;t++){let e=s[t];this.sortBone(e.parent),this._updateCache.indexOf(e)>-1||this.updateCacheReset.push(e)}else for(let t=0;t<a;t++)this.sortBone(s[t]);this._updateCache.push(e);for(let t=0;t<a;t++)this.sortReset(s[t].children);for(let t=0;t<a;t++)s[t].sorted=!0}sortPathConstraintAttachment(t,e,s){let a=t.attachments[e];if(a)for(let t in a)this.sortPathConstraintAttachmentWith(a[t],s)}sortPathConstraintAttachmentWith(e,s){if(!(e instanceof t.PathAttachment))return;let a=e.bones;if(null==a)this.sortBone(s);else{let t=this.bones,e=0;for(;e<a.length;){let s=a[e++];for(let n=e+s;e<n;e++){let s=a[e];this.sortBone(t[s])}}}}sortBone(t){if(t.sorted)return;let e=t.parent;null!=e&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t)}sortReset(t){for(let e=0,s=t.length;e<s;e++){let s=t[e];s.active&&(s.sorted&&this.sortReset(s.children),s.sorted=!1)}}updateWorldTransform(){let t=this.updateCacheReset;for(let e=0,s=t.length;e<s;e++){let s=t[e];s.ax=s.x,s.ay=s.y,s.arotation=s.rotation,s.ascaleX=s.scaleX,s.ascaleY=s.scaleY,s.ashearX=s.shearX,s.ashearY=s.shearY,s.appliedValid=!0}let e=this._updateCache;for(let t=0,s=e.length;t<s;t++)e[t].update()}setToSetupPose(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()}setBonesToSetupPose(){let t=this.bones;for(let e=0,s=t.length;e<s;e++)t[e].setToSetupPose();let e=this.ikConstraints;for(let t=0,s=e.length;t<s;t++){let s=e[t];s.mix=s.data.mix,s.softness=s.data.softness,s.bendDirection=s.data.bendDirection,s.compress=s.data.compress,s.stretch=s.data.stretch}let s=this.transformConstraints;for(let t=0,e=s.length;t<e;t++){let e=s[t],a=e.data;e.rotateMix=a.rotateMix,e.translateMix=a.translateMix,e.scaleMix=a.scaleMix,e.shearMix=a.shearMix}let a=this.pathConstraints;for(let t=0,e=a.length;t<e;t++){let e=a[t],s=e.data;e.position=s.position,e.spacing=s.spacing,e.rotateMix=s.rotateMix,e.translateMix=s.translateMix}}setSlotsToSetupPose(){let e=this.slots;t.Utils.arrayCopy(e,0,this.drawOrder,0,e.length);for(let t=0,s=e.length;t<s;t++)e[t].setToSetupPose()}getRootBone(){return 0==this.bones.length?null:this.bones[0]}findBone(t){if(null==t)throw new Error("boneName cannot be null.");let e=this.bones;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.data.name==t)return a}return null}findBoneIndex(t){if(null==t)throw new Error("boneName cannot be null.");let e=this.bones;for(let s=0,a=e.length;s<a;s++)if(e[s].data.name==t)return s;return-1}findSlot(t){if(null==t)throw new Error("slotName cannot be null.");let e=this.slots;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.data.name==t)return a}return null}findSlotIndex(t){if(null==t)throw new Error("slotName cannot be null.");let e=this.slots;for(let s=0,a=e.length;s<a;s++)if(e[s].data.name==t)return s;return-1}setSkinByName(t){let e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)}setSkin(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else{let e=this.slots;for(let s=0,a=e.length;s<a;s++){let a=e[s],n=a.data.attachmentName;if(null!=n){let e=t.getAttachment(s,n);null!=e&&a.setAttachment(e)}}}this.skin=t,this.updateCache()}}getAttachmentByName(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)}getAttachment(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){let s=this.skin.getAttachment(t,e);if(null!=s)return s}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null}setAttachment(t,e){if(null==t)throw new Error("slotName cannot be null.");let s=this.slots;for(let a=0,n=s.length;a<n;a++){let n=s[a];if(n.data.name==t){let s=null;if(null!=e&&(s=this.getAttachment(a,e),null==s))throw new Error("Attachment not found: "+e+", for slot: "+t);return void n.setAttachment(s)}}throw new Error("Slot not found: "+t)}findIkConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.ikConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.data.name==t)return a}return null}findTransformConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.transformConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.data.name==t)return a}return null}findPathConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.pathConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.data.name==t)return a}return null}getBounds(e,s,a=new Array(2)){if(null==e)throw new Error("offset cannot be null.");if(null==s)throw new Error("size cannot be null.");let n=this.drawOrder,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let e=0,s=n.length;e<s;e++){let s=n[e];if(!s.bone.active)continue;let h=0,d=null,u=s.getAttachment();if(u instanceof t.RegionAttachment)h=8,d=t.Utils.setArraySize(a,h,0),u.computeWorldVertices(s.bone,d,0,2);else if(u instanceof t.MeshAttachment){let e=u;h=e.worldVerticesLength,d=t.Utils.setArraySize(a,h,0),e.computeWorldVertices(s,0,h,d,0,2)}if(null!=d)for(let t=0,e=d.length;t<e;t+=2){let e=d[t],s=d[t+1];i=Math.min(i,e),r=Math.min(r,s),l=Math.max(l,e),o=Math.max(o,s)}}e.set(i,r),s.set(l-i,o-r)}update(t){this.time+=t}}}(spine||(spine={})),function(t){class e{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(a){let n=this.scale,i=new t.SkeletonData;i.name="";let r=new s(a);if(i.hash=r.readString(),i.version=r.readString(),"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=r.readFloat(),i.y=r.readFloat(),i.width=r.readFloat(),i.height=r.readFloat();let l=r.readBoolean();l&&(i.fps=r.readFloat(),i.imagesPath=r.readString(),i.audioPath=r.readString());let o=0;o=r.readInt(!0);for(let t=0;t<o;t++)r.strings.push(r.readString());o=r.readInt(!0);for(let s=0;s<o;s++){let a=r.readString(),o=0==s?null:i.bones[r.readInt(!0)],h=new t.BoneData(s,a,o);h.rotation=r.readFloat(),h.x=r.readFloat()*n,h.y=r.readFloat()*n,h.scaleX=r.readFloat(),h.scaleY=r.readFloat(),h.shearX=r.readFloat(),h.shearY=r.readFloat(),h.length=r.readFloat()*n,h.transformMode=e.TransformModeValues[r.readInt(!0)],h.skinRequired=r.readBoolean(),l&&t.Color.rgba8888ToColor(h.color,r.readInt32()),i.bones.push(h)}o=r.readInt(!0);for(let s=0;s<o;s++){let a=r.readString(),n=i.bones[r.readInt(!0)],l=new t.SlotData(s,a,n);t.Color.rgba8888ToColor(l.color,r.readInt32());let o=r.readInt32();-1!=o&&t.Color.rgb888ToColor(l.darkColor=new t.Color,o),l.attachmentName=r.readStringRef(),l.blendMode=e.BlendModeValues[r.readInt(!0)],i.slots.push(l)}o=r.readInt(!0);for(let e,s=0;s<o;s++){let s=new t.IkConstraintData(r.readString());s.order=r.readInt(!0),s.skinRequired=r.readBoolean(),e=r.readInt(!0);for(let t=0;t<e;t++)s.bones.push(i.bones[r.readInt(!0)]);s.target=i.bones[r.readInt(!0)],s.mix=r.readFloat(),s.softness=r.readFloat()*n,s.bendDirection=r.readByte(),s.compress=r.readBoolean(),s.stretch=r.readBoolean(),s.uniform=r.readBoolean(),i.ikConstraints.push(s)}o=r.readInt(!0);for(let e,s=0;s<o;s++){let s=new t.TransformConstraintData(r.readString());s.order=r.readInt(!0),s.skinRequired=r.readBoolean(),e=r.readInt(!0);for(let t=0;t<e;t++)s.bones.push(i.bones[r.readInt(!0)]);s.target=i.bones[r.readInt(!0)],s.local=r.readBoolean(),s.relative=r.readBoolean(),s.offsetRotation=r.readFloat(),s.offsetX=r.readFloat()*n,s.offsetY=r.readFloat()*n,s.offsetScaleX=r.readFloat(),s.offsetScaleY=r.readFloat(),s.offsetShearY=r.readFloat(),s.rotateMix=r.readFloat(),s.translateMix=r.readFloat(),s.scaleMix=r.readFloat(),s.shearMix=r.readFloat(),i.transformConstraints.push(s)}o=r.readInt(!0);for(let s,a=0;a<o;a++){let a=new t.PathConstraintData(r.readString());a.order=r.readInt(!0),a.skinRequired=r.readBoolean(),s=r.readInt(!0);for(let t=0;t<s;t++)a.bones.push(i.bones[r.readInt(!0)]);a.target=i.slots[r.readInt(!0)],a.positionMode=e.PositionModeValues[r.readInt(!0)],a.spacingMode=e.SpacingModeValues[r.readInt(!0)],a.rotateMode=e.RotateModeValues[r.readInt(!0)],a.offsetRotation=r.readFloat(),a.position=r.readFloat(),a.positionMode==t.PositionMode.Fixed&&(a.position*=n),a.spacing=r.readFloat(),a.spacingMode!=t.SpacingMode.Length&&a.spacingMode!=t.SpacingMode.Fixed||(a.spacing*=n),a.rotateMix=r.readFloat(),a.translateMix=r.readFloat(),i.pathConstraints.push(a)}let h=this.readSkin(r,i,!0,l);null!=h&&(i.defaultSkin=h,i.skins.push(h));{let e=i.skins.length;for(t.Utils.setArraySize(i.skins,o=e+r.readInt(!0));e<o;e++)i.skins[e]=this.readSkin(r,i,!1,l)}o=this.linkedMeshes.length;for(let t=0;t<o;t++){let e=this.linkedMeshes[t],s=null==e.skin?i.defaultSkin:i.findSkin(e.skin);if(null==s)throw new Error("Skin not found: "+e.skin);let a=s.getAttachment(e.slotIndex,e.parent);if(null==a)throw new Error("Parent mesh not found: "+e.parent);e.mesh.deformAttachment=e.inheritDeform?a:e.mesh,e.mesh.setParentMesh(a),e.mesh.updateUVs()}this.linkedMeshes.length=0,o=r.readInt(!0);for(let e=0;e<o;e++){let e=new t.EventData(r.readStringRef());e.intValue=r.readInt(!1),e.floatValue=r.readFloat(),e.stringValue=r.readString(),e.audioPath=r.readString(),null!=e.audioPath&&(e.volume=r.readFloat(),e.balance=r.readFloat()),i.events.push(e)}o=r.readInt(!0);for(let t=0;t<o;t++)i.animations.push(this.readAnimation(r,r.readString(),i));return i}readSkin(e,s,a,n){let i=null,r=0;if(a){if(r=e.readInt(!0),0==r)return null;i=new t.Skin("default")}else{i=new t.Skin(e.readStringRef()),i.bones.length=e.readInt(!0);for(let t=0,a=i.bones.length;t<a;t++)i.bones[t]=s.bones[e.readInt(!0)];for(let t=0,a=e.readInt(!0);t<a;t++)i.constraints.push(s.ikConstraints[e.readInt(!0)]);for(let t=0,a=e.readInt(!0);t<a;t++)i.constraints.push(s.transformConstraints[e.readInt(!0)]);for(let t=0,a=e.readInt(!0);t<a;t++)i.constraints.push(s.pathConstraints[e.readInt(!0)]);r=e.readInt(!0)}for(let t=0;t<r;t++){let t=e.readInt(!0);for(let a=0,r=e.readInt(!0);a<r;a++){let a=e.readStringRef(),r=this.readAttachment(e,s,i,t,a,n);null!=r&&i.setAttachment(t,a,r)}}return i}readAttachment(s,n,i,r,l,o){let h=this.scale,d=s.readStringRef();null==d&&(d=l);let u=s.readByte();switch(e.AttachmentTypeValues[u]){case t.AttachmentType.Region:{let e=s.readStringRef(),a=s.readFloat(),n=s.readFloat(),r=s.readFloat(),l=s.readFloat(),o=s.readFloat(),u=s.readFloat(),c=s.readFloat(),f=s.readInt32();null==e&&(e=d);let m=this.attachmentLoader.newRegionAttachment(i,d,e);return null==m?null:(m.path=e,m.x=n*h,m.y=r*h,m.scaleX=l,m.scaleY=o,m.rotation=a,m.width=u*h,m.height=c*h,t.Color.rgba8888ToColor(m.color,f),m.updateOffset(),m)}case t.AttachmentType.BoundingBox:{let e=s.readInt(!0),a=this.readVertices(s,e),n=o?s.readInt32():0,r=this.attachmentLoader.newBoundingBoxAttachment(i,d);return null==r?null:(r.worldVerticesLength=e<<1,r.vertices=a.vertices,r.bones=a.bones,o&&t.Color.rgba8888ToColor(r.color,n),r)}case t.AttachmentType.Mesh:{let e=s.readStringRef(),a=s.readInt32(),n=s.readInt(!0),r=this.readFloatArray(s,n<<1,1),l=this.readShortArray(s),u=this.readVertices(s,n),c=s.readInt(!0),f=null,m=0,g=0;o&&(f=this.readShortArray(s),m=s.readFloat(),g=s.readFloat()),null==e&&(e=d);let p=this.attachmentLoader.newMeshAttachment(i,d,e);return null==p?null:(p.path=e,t.Color.rgba8888ToColor(p.color,a),p.bones=u.bones,p.vertices=u.vertices,p.worldVerticesLength=n<<1,p.triangles=l,p.regionUVs=r,p.updateUVs(),p.hullLength=c<<1,o&&(p.edges=f,p.width=m*h,p.height=g*h),p)}case t.AttachmentType.LinkedMesh:{let e=s.readStringRef(),n=s.readInt32(),l=s.readStringRef(),u=s.readStringRef(),c=s.readBoolean(),f=0,m=0;o&&(f=s.readFloat(),m=s.readFloat()),null==e&&(e=d);let g=this.attachmentLoader.newMeshAttachment(i,d,e);return null==g?null:(g.path=e,t.Color.rgba8888ToColor(g.color,n),o&&(g.width=f*h,g.height=m*h),this.linkedMeshes.push(new a(g,l,r,u,c)),g)}case t.AttachmentType.Path:{let e=s.readBoolean(),a=s.readBoolean(),n=s.readInt(!0),r=this.readVertices(s,n),l=t.Utils.newArray(n/3,0);for(let t=0,e=l.length;t<e;t++)l[t]=s.readFloat()*h;let u=o?s.readInt32():0,c=this.attachmentLoader.newPathAttachment(i,d);return null==c?null:(c.closed=e,c.constantSpeed=a,c.worldVerticesLength=n<<1,c.vertices=r.vertices,c.bones=r.bones,c.lengths=l,o&&t.Color.rgba8888ToColor(c.color,u),c)}case t.AttachmentType.Point:{let e=s.readFloat(),a=s.readFloat(),n=s.readFloat(),r=o?s.readInt32():0,l=this.attachmentLoader.newPointAttachment(i,d);return null==l?null:(l.x=a*h,l.y=n*h,l.rotation=e,o&&t.Color.rgba8888ToColor(l.color,r),l)}case t.AttachmentType.Clipping:{let e=s.readInt(!0),a=s.readInt(!0),r=this.readVertices(s,a),l=o?s.readInt32():0,h=this.attachmentLoader.newClippingAttachment(i,d);return null==h?null:(h.endSlot=n.slots[e],h.worldVerticesLength=a<<1,h.vertices=r.vertices,h.bones=r.bones,o&&t.Color.rgba8888ToColor(h.color,l),h)}}return null}readVertices(e,s){let a=s<<1,i=new n,r=this.scale;if(!e.readBoolean())return i.vertices=this.readFloatArray(e,a,r),i;let l=new Array,o=new Array;for(let t=0;t<s;t++){let t=e.readInt(!0);o.push(t);for(let s=0;s<t;s++)o.push(e.readInt(!0)),l.push(e.readFloat()*r),l.push(e.readFloat()*r),l.push(e.readFloat())}return i.vertices=t.Utils.toFloatArray(l),i.bones=o,i}readFloatArray(t,e,s){let a=new Array(e);if(1==s)for(let s=0;s<e;s++)a[s]=t.readFloat();else for(let n=0;n<e;n++)a[n]=t.readFloat()*s;return a}readShortArray(t){let e=t.readInt(!0),s=new Array(e);for(let a=0;a<e;a++)s[a]=t.readShort();return s}readAnimation(s,a,n){let i=new Array,r=this.scale,l=0,o=new t.Color,h=new t.Color;for(let a=0,n=s.readInt(!0);a<n;a++){let a=s.readInt(!0);for(let n=0,r=s.readInt(!0);n<r;n++){let n=s.readByte(),r=s.readInt(!0);switch(n){case e.SLOT_ATTACHMENT:{let e=new t.AttachmentTimeline(r);e.slotIndex=a;for(let t=0;t<r;t++)e.setFrame(t,s.readFloat(),s.readStringRef());i.push(e),l=Math.max(l,e.frames[r-1]);break}case e.SLOT_COLOR:{let e=new t.ColorTimeline(r);e.slotIndex=a;for(let a=0;a<r;a++){let n=s.readFloat();t.Color.rgba8888ToColor(o,s.readInt32()),e.setFrame(a,n,o.r,o.g,o.b,o.a),a<r-1&&this.readCurve(s,a,e)}i.push(e),l=Math.max(l,e.frames[(r-1)*t.ColorTimeline.ENTRIES]);break}case e.SLOT_TWO_COLOR:{let e=new t.TwoColorTimeline(r);e.slotIndex=a;for(let a=0;a<r;a++){let n=s.readFloat();t.Color.rgba8888ToColor(o,s.readInt32()),t.Color.rgb888ToColor(h,s.readInt32()),e.setFrame(a,n,o.r,o.g,o.b,o.a,h.r,h.g,h.b),a<r-1&&this.readCurve(s,a,e)}i.push(e),l=Math.max(l,e.frames[(r-1)*t.TwoColorTimeline.ENTRIES]);break}}}}for(let a=0,n=s.readInt(!0);a<n;a++){let a=s.readInt(!0);for(let n=0,o=s.readInt(!0);n<o;n++){let n=s.readByte(),o=s.readInt(!0);switch(n){case e.BONE_ROTATE:{let e=new t.RotateTimeline(o);e.boneIndex=a;for(let t=0;t<o;t++)e.setFrame(t,s.readFloat(),s.readFloat()),t<o-1&&this.readCurve(s,t,e);i.push(e),l=Math.max(l,e.frames[(o-1)*t.RotateTimeline.ENTRIES]);break}case e.BONE_TRANSLATE:case e.BONE_SCALE:case e.BONE_SHEAR:{let h,d=1;n==e.BONE_SCALE?h=new t.ScaleTimeline(o):n==e.BONE_SHEAR?h=new t.ShearTimeline(o):(h=new t.TranslateTimeline(o),d=r),h.boneIndex=a;for(let t=0;t<o;t++)h.setFrame(t,s.readFloat(),s.readFloat()*d,s.readFloat()*d),t<o-1&&this.readCurve(s,t,h);i.push(h),l=Math.max(l,h.frames[(o-1)*t.TranslateTimeline.ENTRIES]);break}}}}for(let e=0,a=s.readInt(!0);e<a;e++){let e=s.readInt(!0),a=s.readInt(!0),n=new t.IkConstraintTimeline(a);n.ikConstraintIndex=e;for(let t=0;t<a;t++)n.setFrame(t,s.readFloat(),s.readFloat(),s.readFloat()*r,s.readByte(),s.readBoolean(),s.readBoolean()),t<a-1&&this.readCurve(s,t,n);i.push(n),l=Math.max(l,n.frames[(a-1)*t.IkConstraintTimeline.ENTRIES])}for(let e=0,a=s.readInt(!0);e<a;e++){let e=s.readInt(!0),a=s.readInt(!0),n=new t.TransformConstraintTimeline(a);n.transformConstraintIndex=e;for(let t=0;t<a;t++)n.setFrame(t,s.readFloat(),s.readFloat(),s.readFloat(),s.readFloat(),s.readFloat()),t<a-1&&this.readCurve(s,t,n);i.push(n),l=Math.max(l,n.frames[(a-1)*t.TransformConstraintTimeline.ENTRIES])}for(let a=0,o=s.readInt(!0);a<o;a++){let a=s.readInt(!0),o=n.pathConstraints[a];for(let n=0,h=s.readInt(!0);n<h;n++){let n=s.readByte(),h=s.readInt(!0);switch(n){case e.PATH_POSITION:case e.PATH_SPACING:{let d,u=1;n==e.PATH_SPACING?(d=new t.PathConstraintSpacingTimeline(h),o.spacingMode!=t.SpacingMode.Length&&o.spacingMode!=t.SpacingMode.Fixed||(u=r)):(d=new t.PathConstraintPositionTimeline(h),o.positionMode==t.PositionMode.Fixed&&(u=r)),d.pathConstraintIndex=a;for(let t=0;t<h;t++)d.setFrame(t,s.readFloat(),s.readFloat()*u),t<h-1&&this.readCurve(s,t,d);i.push(d),l=Math.max(l,d.frames[(h-1)*t.PathConstraintPositionTimeline.ENTRIES]);break}case e.PATH_MIX:{let e=new t.PathConstraintMixTimeline(h);e.pathConstraintIndex=a;for(let t=0;t<h;t++)e.setFrame(t,s.readFloat(),s.readFloat(),s.readFloat()),t<h-1&&this.readCurve(s,t,e);i.push(e),l=Math.max(l,e.frames[(h-1)*t.PathConstraintMixTimeline.ENTRIES]);break}}}}for(let e=0,a=s.readInt(!0);e<a;e++){let e=n.skins[s.readInt(!0)];for(let a=0,n=s.readInt(!0);a<n;a++){let a=s.readInt(!0);for(let n=0,o=s.readInt(!0);n<o;n++){let n=e.getAttachment(a,s.readStringRef()),o=null!=n.bones,h=n.vertices,d=o?h.length/3*2:h.length,u=s.readInt(!0),c=new t.DeformTimeline(u);c.slotIndex=a,c.attachment=n;for(let e=0;e<u;e++){let a,n=s.readFloat(),i=s.readInt(!0);if(0==i)a=o?t.Utils.newFloatArray(d):h;else{a=t.Utils.newFloatArray(d);let e=s.readInt(!0);if(i+=e,1==r)for(let t=e;t<i;t++)a[t]=s.readFloat();else for(let t=e;t<i;t++)a[t]=s.readFloat()*r;if(!o)for(let t=0,e=a.length;t<e;t++)a[t]+=h[t]}c.setFrame(e,n,a),e<u-1&&this.readCurve(s,e,c)}i.push(c),l=Math.max(l,c.frames[u-1])}}}let d=s.readInt(!0);if(d>0){let e=new t.DrawOrderTimeline(d),a=n.slots.length;for(let n=0;n<d;n++){let i=s.readFloat(),r=s.readInt(!0),l=t.Utils.newArray(a,0);for(let t=a-1;t>=0;t--)l[t]=-1;let o=t.Utils.newArray(a-r,0),h=0,d=0;for(let t=0;t<r;t++){let t=s.readInt(!0);for(;h!=t;)o[d++]=h++;l[h+s.readInt(!0)]=h++}for(;h<a;)o[d++]=h++;for(let t=a-1;t>=0;t--)-1==l[t]&&(l[t]=o[--d]);e.setFrame(n,i,l)}i.push(e),l=Math.max(l,e.frames[d-1])}let u=s.readInt(!0);if(u>0){let e=new t.EventTimeline(u);for(let a=0;a<u;a++){let i=s.readFloat(),r=n.events[s.readInt(!0)],l=new t.Event(i,r);l.intValue=s.readInt(!1),l.floatValue=s.readFloat(),l.stringValue=s.readBoolean()?s.readString():r.stringValue,null!=l.data.audioPath&&(l.volume=s.readFloat(),l.balance=s.readFloat()),e.setFrame(a,l)}i.push(e),l=Math.max(l,e.frames[u-1])}return new t.Animation(a,i,l)}readCurve(t,s,a){switch(t.readByte()){case e.CURVE_STEPPED:a.setStepped(s);break;case e.CURVE_BEZIER:this.setCurve(a,s,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}}setCurve(t,e,s,a,n,i){t.setCurve(e,s,a,n,i)}}e.AttachmentTypeValues=[0,1,2,3,4,5,6],e.TransformModeValues=[t.TransformMode.Normal,t.TransformMode.OnlyTranslation,t.TransformMode.NoRotationOrReflection,t.TransformMode.NoScale,t.TransformMode.NoScaleOrReflection],e.PositionModeValues=[t.PositionMode.Fixed,t.PositionMode.Percent],e.SpacingModeValues=[t.SpacingMode.Length,t.SpacingMode.Fixed,t.SpacingMode.Percent],e.RotateModeValues=[t.RotateMode.Tangent,t.RotateMode.Chain,t.RotateMode.ChainScale],e.BlendModeValues=[t.BlendMode.Normal,t.BlendMode.Additive,t.BlendMode.Multiply,t.BlendMode.Screen],e.BONE_ROTATE=0,e.BONE_TRANSLATE=1,e.BONE_SCALE=2,e.BONE_SHEAR=3,e.SLOT_ATTACHMENT=0,e.SLOT_COLOR=1,e.SLOT_TWO_COLOR=2,e.PATH_POSITION=0,e.PATH_SPACING=1,e.PATH_MIX=2,e.CURVE_LINEAR=0,e.CURVE_STEPPED=1,e.CURVE_BEZIER=2,t.SkeletonBinary=e;class s{constructor(t,e=new Array,s=0,a=new DataView(t.buffer)){this.strings=e,this.index=s,this.buffer=a}readByte(){return this.buffer.getInt8(this.index++)}readShort(){let t=this.buffer.getInt16(this.index);return this.index+=2,t}readInt32(){let t=this.buffer.getInt32(this.index);return this.index+=4,t}readInt(t){let e=this.readByte(),s=127&e;return 0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<7,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<14,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<21,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<28)))),t?s:s>>>1^-(1&s)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let s=0;s<t;){let t=this.readByte();switch(t>>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),s+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),s+=3;break;default:e+=String.fromCharCode(t),s++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}}class a{constructor(t,e,s,a,n){this.mesh=t,this.skin=e,this.slotIndex=s,this.parent=a,this.inheritDeform=n}}class n{constructor(t=null,e=null){this.bones=t,this.vertices=e}}}(spine||(spine={})),function(t){t.SkeletonBounds=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(()=>t.Utils.newFloatArray(16))}update(e,s){if(null==e)throw new Error("skeleton cannot be null.");let a=this.boundingBoxes,n=this.polygons,i=this.polygonPool,r=e.slots,l=r.length;a.length=0,i.freeAll(n),n.length=0;for(let e=0;e<l;e++){let s=r[e];if(!s.bone.active)continue;let l=s.getAttachment();if(l instanceof t.BoundingBoxAttachment){let e=l;a.push(e);let r=i.obtain();r.length!=e.worldVerticesLength&&(r=t.Utils.newFloatArray(e.worldVerticesLength)),n.push(r),e.computeWorldVertices(s,0,e.worldVerticesLength,r,0,2)}}s?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)}aabbCompute(){let t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,n=this.polygons;for(let i=0,r=n.length;i<r;i++){let r=n[i],l=r;for(let n=0,i=r.length;n<i;n+=2){let i=l[n],r=l[n+1];t=Math.min(t,i),e=Math.min(e,r),s=Math.max(s,i),a=Math.max(a,r)}}this.minX=t,this.minY=e,this.maxX=s,this.maxY=a}aabbContainsPoint(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,s,a){let n=this.minX,i=this.minY,r=this.maxX,l=this.maxY;if(t<=n&&s<=n||e<=i&&a<=i||t>=r&&s>=r||e>=l&&a>=l)return!1;let o=(a-e)/(s-t),h=o*(n-t)+e;if(h>i&&h<l)return!0;if(h=o*(r-t)+e,h>i&&h<l)return!0;let d=(i-e)/o+t;return d>n&&d<r||(d=(l-e)/o+t,d>n&&d<r)}aabbIntersectsSkeleton(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY}containsPoint(t,e){let s=this.polygons;for(let a=0,n=s.length;a<n;a++)if(this.containsPointPolygon(s[a],t,e))return this.boundingBoxes[a];return null}containsPointPolygon(t,e,s){let a=t,n=t.length,i=n-2,r=!1;for(let t=0;t<n;t+=2){let n=a[t+1],l=a[i+1];if(n<s&&l>=s||l<s&&n>=s){let o=a[t];o+(s-n)/(l-n)*(a[i]-o)<e&&(r=!r)}i=t}return r}intersectsSegment(t,e,s,a){let n=this.polygons;for(let i=0,r=n.length;i<r;i++)if(this.intersectsSegmentPolygon(n[i],t,e,s,a))return this.boundingBoxes[i];return null}intersectsSegmentPolygon(t,e,s,a,n){let i=t,r=t.length,l=e-a,o=s-n,h=e*n-s*a,d=i[r-2],u=i[r-1];for(let t=0;t<r;t+=2){let r=i[t],c=i[t+1],f=d*c-u*r,m=d-r,g=u-c,p=l*g-o*m,w=(h*m-l*f)/p;if((w>=d&&w<=r||w>=r&&w<=d)&&(w>=e&&w<=a||w>=a&&w<=e)){let t=(h*g-o*f)/p;if((t>=u&&t<=c||t>=c&&t<=u)&&(t>=s&&t<=n||t>=n&&t<=s))return!0}d=r,u=c}return!1}getPolygon(t){if(null==t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}}}(spine||(spine={})),function(t){class e{constructor(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}clipStart(s,a){if(null!=this.clipAttachment)return 0;this.clipAttachment=a;let n=a.worldVerticesLength,i=t.Utils.setArraySize(this.clippingPolygon,n);a.computeWorldVertices(s,0,n,i,0,2);let r=this.clippingPolygon;e.makeClockwise(r);let l=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,s=l.length;t<s;t++){let s=l[t];e.makeClockwise(s),s.push(s[0]),s.push(s[1])}return l.length}clipEndWithSlot(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()}clipEnd(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)}isClipping(){return null!=this.clipAttachment}clipTriangles(e,s,a,n,i,r,l,o){let h=this.clipOutput,d=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,m=o?12:8,g=0;d.length=0,u.length=0;t:for(let s=0;s<n;s+=3){let n=a[s]<<1,p=e[n],w=e[n+1],x=i[n],M=i[n+1];n=a[s+1]<<1;let E=e[n],T=e[n+1],A=i[n],b=i[n+1];n=a[s+2]<<1;let S=e[n],y=e[n+1],I=i[n],R=i[n+1];for(let e=0;e<f;e++){let s=d.length;if(!this.clip(p,w,E,T,S,y,c[e],h)){let e=t.Utils.setArraySize(d,s+3*m);e[s]=p,e[s+1]=w,e[s+2]=r.r,e[s+3]=r.g,e[s+4]=r.b,e[s+5]=r.a,o?(e[s+6]=x,e[s+7]=M,e[s+8]=l.r,e[s+9]=l.g,e[s+10]=l.b,e[s+11]=l.a,e[s+12]=E,e[s+13]=T,e[s+14]=r.r,e[s+15]=r.g,e[s+16]=r.b,e[s+17]=r.a,e[s+18]=A,e[s+19]=b,e[s+20]=l.r,e[s+21]=l.g,e[s+22]=l.b,e[s+23]=l.a,e[s+24]=S,e[s+25]=y,e[s+26]=r.r,e[s+27]=r.g,e[s+28]=r.b,e[s+29]=r.a,e[s+30]=I,e[s+31]=R,e[s+32]=l.r,e[s+33]=l.g,e[s+34]=l.b,e[s+35]=l.a):(e[s+6]=x,e[s+7]=M,e[s+8]=E,e[s+9]=T,e[s+10]=r.r,e[s+11]=r.g,e[s+12]=r.b,e[s+13]=r.a,e[s+14]=A,e[s+15]=b,e[s+16]=S,e[s+17]=y,e[s+18]=r.r,e[s+19]=r.g,e[s+20]=r.b,e[s+21]=r.a,e[s+22]=I,e[s+23]=R),s=u.length;let a=t.Utils.setArraySize(u,s+3);a[s]=g,a[s+1]=g+1,a[s+2]=g+2,g+=3;continue t}{let e=h.length;if(0==e)continue;let a=T-y,n=S-E,i=p-S,c=y-w,f=1/(a*i+n*(w-y)),C=e>>1,P=this.clipOutput,V=t.Utils.setArraySize(d,s+C*m);for(let t=0;t<e;t+=2){let e=P[t],h=P[t+1];V[s]=e,V[s+1]=h,V[s+2]=r.r,V[s+3]=r.g,V[s+4]=r.b,V[s+5]=r.a;let d=e-S,u=h-y,g=(a*d+n*u)*f,p=(c*d+i*u)*f,w=1-g-p;V[s+6]=x*g+A*p+I*w,V[s+7]=M*g+b*p+R*w,o&&(V[s+8]=l.r,V[s+9]=l.g,V[s+10]=l.b,V[s+11]=l.a),s+=m}s=u.length;let k=t.Utils.setArraySize(u,s+3*(C-2));C--;for(let t=1;t<C;t++)k[s]=g,k[s+1]=g+t,k[s+2]=g+t+1,s+=3;g+=C+1}}}}clip(t,e,s,a,n,i,r,l){let o=l,h=!1,d=null;r.length%4>=2?(d=l,l=this.scratch):d=this.scratch,d.length=0,d.push(t),d.push(e),d.push(s),d.push(a),d.push(n),d.push(i),d.push(t),d.push(e),l.length=0;let u=r,c=r.length-4;for(let t=0;;t+=2){let e=u[t],s=u[t+1],a=u[t+2],n=u[t+3],i=e-a,r=s-n,f=d,m=d.length-2,g=l.length;for(let t=0;t<m;t+=2){let o=f[t],d=f[t+1],u=f[t+2],c=f[t+3],m=i*(c-n)-r*(u-a)>0;if(i*(d-n)-r*(o-a)>0){if(m){l.push(u),l.push(c);continue}let t=c-d,i=u-o,r=t*(a-e)-i*(n-s);if(Math.abs(r)>1e-6){let h=(i*(s-d)-t*(e-o))/r;l.push(e+(a-e)*h),l.push(s+(n-s)*h)}else l.push(e),l.push(s)}else if(m){let t=c-d,i=u-o,r=t*(a-e)-i*(n-s);if(Math.abs(r)>1e-6){let h=(i*(s-d)-t*(e-o))/r;l.push(e+(a-e)*h),l.push(s+(n-s)*h)}else l.push(e),l.push(s);l.push(u),l.push(c)}h=!0}if(g==l.length)return o.length=0,!0;if(l.push(l[0]),l.push(l[1]),t==c)break;let p=l;(l=d).length=0,d=p}if(o!=l){o.length=0;for(let t=0,e=l.length-2;t<e;t++)o[t]=l[t]}else o.length=o.length-2;return h}static makeClockwise(t){let e=t,s=t.length,a=e[s-2]*e[1]-e[0]*e[s-1],n=0,i=0,r=0,l=0;for(let t=0,o=s-3;t<o;t+=2)n=e[t],i=e[t+1],r=e[t+2],l=e[t+3],a+=n*l-r*i;if(!(a<0))for(let t=0,a=s-2,n=s>>1;t<n;t+=2){let s=e[t],n=e[t+1],i=a-t;e[t]=e[i],e[t+1]=e[i+1],e[i]=s,e[i+1]=n}}}t.SkeletonClipping=e}(spine||(spine={})),function(t){t.SkeletonData=class{constructor(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}findBone(t){if(null==t)throw new Error("boneName cannot be null.");let e=this.bones;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findBoneIndex(t){if(null==t)throw new Error("boneName cannot be null.");let e=this.bones;for(let s=0,a=e.length;s<a;s++)if(e[s].name==t)return s;return-1}findSlot(t){if(null==t)throw new Error("slotName cannot be null.");let e=this.slots;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findSlotIndex(t){if(null==t)throw new Error("slotName cannot be null.");let e=this.slots;for(let s=0,a=e.length;s<a;s++)if(e[s].name==t)return s;return-1}findSkin(t){if(null==t)throw new Error("skinName cannot be null.");let e=this.skins;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findEvent(t){if(null==t)throw new Error("eventDataName cannot be null.");let e=this.events;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findAnimation(t){if(null==t)throw new Error("animationName cannot be null.");let e=this.animations;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findIkConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.ikConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findTransformConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.transformConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findPathConstraint(t){if(null==t)throw new Error("constraintName cannot be null.");let e=this.pathConstraints;for(let s=0,a=e.length;s<a;s++){let a=e[s];if(a.name==t)return a}return null}findPathConstraintIndex(t){if(null==t)throw new Error("pathConstraintName cannot be null.");let e=this.pathConstraints;for(let s=0,a=e.length;s<a;s++)if(e[s].name==t)return s;return-1}}}(spine||(spine={})),function(t){class e{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(s){let a=this.scale,n=new t.SkeletonData,i="string"==typeof s?JSON.parse(s):s,r=i.skeleton;if(null!=r){if(n.hash=r.hash,n.version=r.spine,"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.fps=r.fps,n.imagesPath=r.images}if(i.bones)for(let s=0;s<i.bones.length;s++){let r=i.bones[s],l=null,o=this.getValue(r,"parent",null);if(null!=o&&(l=n.findBone(o),null==l))throw new Error("Parent bone not found: "+o);let h=new t.BoneData(n.bones.length,r.name,l);h.length=this.getValue(r,"length",0)*a,h.x=this.getValue(r,"x",0)*a,h.y=this.getValue(r,"y",0)*a,h.rotation=this.getValue(r,"rotation",0),h.scaleX=this.getValue(r,"scaleX",1),h.scaleY=this.getValue(r,"scaleY",1),h.shearX=this.getValue(r,"shearX",0),h.shearY=this.getValue(r,"shearY",0),h.transformMode=e.transformModeFromString(this.getValue(r,"transform","normal")),h.skinRequired=this.getValue(r,"skin",!1),n.bones.push(h)}if(i.slots)for(let s=0;s<i.slots.length;s++){let a=i.slots[s],r=a.name,l=a.bone,o=n.findBone(l);if(null==o)throw new Error("Slot bone not found: "+l);let h=new t.SlotData(n.slots.length,r,o),d=this.getValue(a,"color",null);null!=d&&h.color.setFromString(d);let u=this.getValue(a,"dark",null);null!=u&&(h.darkColor=new t.Color(1,1,1,1),h.darkColor.setFromString(u)),h.attachmentName=this.getValue(a,"attachment",null),h.blendMode=e.blendModeFromString(this.getValue(a,"blend","normal")),n.slots.push(h)}if(i.ik)for(let e=0;e<i.ik.length;e++){let s=i.ik[e],r=new t.IkConstraintData(s.name);r.order=this.getValue(s,"order",0),r.skinRequired=this.getValue(s,"skin",!1);for(let t=0;t<s.bones.length;t++){let e=s.bones[t],a=n.findBone(e);if(null==a)throw new Error("IK bone not found: "+e);r.bones.push(a)}let l=s.target;if(r.target=n.findBone(l),null==r.target)throw new Error("IK target bone not found: "+l);r.mix=this.getValue(s,"mix",1),r.softness=this.getValue(s,"softness",0)*a,r.bendDirection=this.getValue(s,"bendPositive",!0)?1:-1,r.compress=this.getValue(s,"compress",!1),r.stretch=this.getValue(s,"stretch",!1),r.uniform=this.getValue(s,"uniform",!1),n.ikConstraints.push(r)}if(i.transform)for(let e=0;e<i.transform.length;e++){let s=i.transform[e],r=new t.TransformConstraintData(s.name);r.order=this.getValue(s,"order",0),r.skinRequired=this.getValue(s,"skin",!1);for(let t=0;t<s.bones.length;t++){let e=s.bones[t],a=n.findBone(e);if(null==a)throw new Error("Transform constraint bone not found: "+e);r.bones.push(a)}let l=s.target;if(r.target=n.findBone(l),null==r.target)throw new Error("Transform constraint target bone not found: "+l);r.local=this.getValue(s,"local",!1),r.relative=this.getValue(s,"relative",!1),r.offsetRotation=this.getValue(s,"rotation",0),r.offsetX=this.getValue(s,"x",0)*a,r.offsetY=this.getValue(s,"y",0)*a,r.offsetScaleX=this.getValue(s,"scaleX",0),r.offsetScaleY=this.getValue(s,"scaleY",0),r.offsetShearY=this.getValue(s,"shearY",0),r.rotateMix=this.getValue(s,"rotateMix",1),r.translateMix=this.getValue(s,"translateMix",1),r.scaleMix=this.getValue(s,"scaleMix",1),r.shearMix=this.getValue(s,"shearMix",1),n.transformConstraints.push(r)}if(i.path)for(let s=0;s<i.path.length;s++){let r=i.path[s],l=new t.PathConstraintData(r.name);l.order=this.getValue(r,"order",0),l.skinRequired=this.getValue(r,"skin",!1);for(let t=0;t<r.bones.length;t++){let e=r.bones[t],s=n.findBone(e);if(null==s)throw new Error("Transform constraint bone not found: "+e);l.bones.push(s)}let o=r.target;if(l.target=n.findSlot(o),null==l.target)throw new Error("Path target slot not found: "+o);l.positionMode=e.positionModeFromString(this.getValue(r,"positionMode","percent")),l.spacingMode=e.spacingModeFromString(this.getValue(r,"spacingMode","length")),l.rotateMode=e.rotateModeFromString(this.getValue(r,"rotateMode","tangent")),l.offsetRotation=this.getValue(r,"rotation",0),l.position=this.getValue(r,"position",0),l.positionMode==t.PositionMode.Fixed&&(l.position*=a),l.spacing=this.getValue(r,"spacing",0),l.spacingMode!=t.SpacingMode.Length&&l.spacingMode!=t.SpacingMode.Fixed||(l.spacing*=a),l.rotateMix=this.getValue(r,"rotateMix",1),l.translateMix=this.getValue(r,"translateMix",1),n.pathConstraints.push(l)}if(i.skins)for(let e=0;e<i.skins.length;e++){let s=i.skins[e],a=new t.Skin(s.name);if(s.bones)for(let t=0;t<s.bones.length;t++){let i=n.findBone(s.bones[t]);if(null==i)throw new Error("Skin bone not found: "+s.bones[e]);a.bones.push(i)}if(s.ik)for(let t=0;t<s.ik.length;t++){let i=n.findIkConstraint(s.ik[t]);if(null==i)throw new Error("Skin IK constraint not found: "+s.ik[e]);a.constraints.push(i)}if(s.transform)for(let t=0;t<s.transform.length;t++){let i=n.findTransformConstraint(s.transform[t]);if(null==i)throw new Error("Skin transform constraint not found: "+s.transform[e]);a.constraints.push(i)}if(s.path)for(let t=0;t<s.path.length;t++){let i=n.findPathConstraint(s.path[t]);if(null==i)throw new Error("Skin path constraint not found: "+s.path[e]);a.constraints.push(i)}for(let t in s.attachments){let e=n.findSlot(t);if(null==e)throw new Error("Slot not found: "+t);let i=s.attachments[t];for(let t in i){let s=this.readAttachment(i[t],a,e.index,t,n);null!=s&&a.setAttachment(e.index,t,s)}}n.skins.push(a),"default"==a.name&&(n.defaultSkin=a)}for(let t=0,e=this.linkedMeshes.length;t<e;t++){let e=this.linkedMeshes[t],s=null==e.skin?n.defaultSkin:n.findSkin(e.skin);if(null==s)throw new Error("Skin not found: "+e.skin);let a=s.getAttachment(e.slotIndex,e.parent);if(null==a)throw new Error("Parent mesh not found: "+e.parent);e.mesh.deformAttachment=e.inheritDeform?a:e.mesh,e.mesh.setParentMesh(a),e.mesh.updateUVs()}if(this.linkedMeshes.length=0,i.events)for(let e in i.events){let s=i.events[e],a=new t.EventData(e);a.intValue=this.getValue(s,"int",0),a.floatValue=this.getValue(s,"float",0),a.stringValue=this.getValue(s,"string",""),a.audioPath=this.getValue(s,"audio",null),null!=a.audioPath&&(a.volume=this.getValue(s,"volume",1),a.balance=this.getValue(s,"balance",0)),n.events.push(a)}if(i.animations)for(let t in i.animations){let e=i.animations[t];this.readAnimation(e,t,n)}return n}readAttachment(e,a,n,i,r){let l=this.scale;switch(i=this.getValue(e,"name",i),this.getValue(e,"type","region")){case"region":{let t=this.getValue(e,"path",i),s=this.attachmentLoader.newRegionAttachment(a,i,t);if(null==s)return null;s.path=t,s.x=this.getValue(e,"x",0)*l,s.y=this.getValue(e,"y",0)*l,s.scaleX=this.getValue(e,"scaleX",1),s.scaleY=this.getValue(e,"scaleY",1),s.rotation=this.getValue(e,"rotation",0),s.width=e.width*l,s.height=e.height*l;let n=this.getValue(e,"color",null);return null!=n&&s.color.setFromString(n),s.updateOffset(),s}case"boundingbox":{let t=this.attachmentLoader.newBoundingBoxAttachment(a,i);if(null==t)return null;this.readVertices(e,t,e.vertexCount<<1);let s=this.getValue(e,"color",null);return null!=s&&t.color.setFromString(s),t}case"mesh":case"linkedmesh":{let t=this.getValue(e,"path",i),r=this.attachmentLoader.newMeshAttachment(a,i,t);if(null==r)return null;r.path=t;let o=this.getValue(e,"color",null);null!=o&&r.color.setFromString(o),r.width=this.getValue(e,"width",0)*l,r.height=this.getValue(e,"height",0)*l;let h=this.getValue(e,"parent",null);if(null!=h)return this.linkedMeshes.push(new s(r,this.getValue(e,"skin",null),n,h,this.getValue(e,"deform",!0))),r;let d=e.uvs;return this.readVertices(e,r,d.length),r.triangles=e.triangles,r.regionUVs=d,r.updateUVs(),r.edges=this.getValue(e,"edges",null),r.hullLength=2*this.getValue(e,"hull",0),r}case"path":{let s=this.attachmentLoader.newPathAttachment(a,i);if(null==s)return null;s.closed=this.getValue(e,"closed",!1),s.constantSpeed=this.getValue(e,"constantSpeed",!0);let n=e.vertexCount;this.readVertices(e,s,n<<1);let r=t.Utils.newArray(n/3,0);for(let t=0;t<e.lengths.length;t++)r[t]=e.lengths[t]*l;s.lengths=r;let o=this.getValue(e,"color",null);return null!=o&&s.color.setFromString(o),s}case"point":{let t=this.attachmentLoader.newPointAttachment(a,i);if(null==t)return null;t.x=this.getValue(e,"x",0)*l,t.y=this.getValue(e,"y",0)*l,t.rotation=this.getValue(e,"rotation",0);let s=this.getValue(e,"color",null);return null!=s&&t.color.setFromString(s),t}case"clipping":{let t=this.attachmentLoader.newClippingAttachment(a,i);if(null==t)return null;let s=this.getValue(e,"end",null);if(null!=s){let e=r.findSlot(s);if(null==e)throw new Error("Clipping end slot not found: "+s);t.endSlot=e}let n=e.vertexCount;this.readVertices(e,t,n<<1);let l=this.getValue(e,"color",null);return null!=l&&t.color.setFromString(l),t}}return null}readVertices(e,s,a){let n=this.scale;s.worldVerticesLength=a;let i=e.vertices;if(a==i.length){let e=t.Utils.toFloatArray(i);if(1!=n)for(let t=0,s=i.length;t<s;t++)e[t]*=n;return void(s.vertices=e)}let r=new Array,l=new Array;for(let t=0,e=i.length;t<e;){let e=i[t++];l.push(e);for(let s=t+4*e;t<s;t+=4)l.push(i[t]),r.push(i[t+1]*n),r.push(i[t+2]*n),r.push(i[t+3])}s.bones=l,s.vertices=t.Utils.toFloatArray(r)}readAnimation(e,s,a){let n=this.scale,i=new Array,r=0;if(e.slots)for(let s in e.slots){let n=e.slots[s],l=a.findSlotIndex(s);if(-1==l)throw new Error("Slot not found: "+s);for(let e in n){let a=n[e];if("attachment"==e){let e=new t.AttachmentTimeline(a.length);e.slotIndex=l;let s=0;for(let t=0;t<a.length;t++){let n=a[t];e.setFrame(s++,this.getValue(n,"time",0),n.name)}i.push(e),r=Math.max(r,e.frames[e.getFrameCount()-1])}else if("color"==e){let e=new t.ColorTimeline(a.length);e.slotIndex=l;let s=0;for(let n=0;n<a.length;n++){let i=a[n],r=new t.Color;r.setFromString(i.color),e.setFrame(s,this.getValue(i,"time",0),r.r,r.g,r.b,r.a),this.readCurve(i,e,s),s++}i.push(e),r=Math.max(r,e.frames[(e.getFrameCount()-1)*t.ColorTimeline.ENTRIES])}else{if("twoColor"!=e)throw new Error("Invalid timeline type for a slot: "+e+" ("+s+")");{let e=new t.TwoColorTimeline(a.length);e.slotIndex=l;let s=0;for(let n=0;n<a.length;n++){let i=a[n],r=new t.Color,l=new t.Color;r.setFromString(i.light),l.setFromString(i.dark),e.setFrame(s,this.getValue(i,"time",0),r.r,r.g,r.b,r.a,l.r,l.g,l.b),this.readCurve(i,e,s),s++}i.push(e),r=Math.max(r,e.frames[(e.getFrameCount()-1)*t.TwoColorTimeline.ENTRIES])}}}}if(e.bones)for(let s in e.bones){let l=e.bones[s],o=a.findBoneIndex(s);if(-1==o)throw new Error("Bone not found: "+s);for(let e in l){let a=l[e];if("rotate"===e){let e=new t.RotateTimeline(a.length);e.boneIndex=o;let s=0;for(let t=0;t<a.length;t++){let n=a[t];e.setFrame(s,this.getValue(n,"time",0),this.getValue(n,"angle",0)),this.readCurve(n,e,s),s++}i.push(e),r=Math.max(r,e.frames[(e.getFrameCount()-1)*t.RotateTimeline.ENTRIES])}else{if("translate"!==e&&"scale"!==e&&"shear"!==e)throw new Error("Invalid timeline type for a bone: "+e+" ("+s+")");{let s=null,l=1,h=0;"scale"===e?(s=new t.ScaleTimeline(a.length),h=1):"shear"===e?s=new t.ShearTimeline(a.length):(s=new t.TranslateTimeline(a.length),l=n),s.boneIndex=o;let d=0;for(let t=0;t<a.length;t++){let e=a[t],n=this.getValue(e,"x",h),i=this.getValue(e,"y",h);s.setFrame(d,this.getValue(e,"time",0),n*l,i*l),this.readCurve(e,s,d),d++}i.push(s),r=Math.max(r,s.frames[(s.getFrameCount()-1)*t.TranslateTimeline.ENTRIES])}}}}if(e.ik)for(let s in e.ik){let l=e.ik[s],o=a.findIkConstraint(s),h=new t.IkConstraintTimeline(l.length);h.ikConstraintIndex=a.ikConstraints.indexOf(o);let d=0;for(let t=0;t<l.length;t++){let e=l[t];h.setFrame(d,this.getValue(e,"time",0),this.getValue(e,"mix",1),this.getValue(e,"softness",0)*n,this.getValue(e,"bendPositive",!0)?1:-1,this.getValue(e,"compress",!1),this.getValue(e,"stretch",!1)),this.readCurve(e,h,d),d++}i.push(h),r=Math.max(r,h.frames[(h.getFrameCount()-1)*t.IkConstraintTimeline.ENTRIES])}if(e.transform)for(let s in e.transform){let n=e.transform[s],l=a.findTransformConstraint(s),o=new t.TransformConstraintTimeline(n.length);o.transformConstraintIndex=a.transformConstraints.indexOf(l);let h=0;for(let t=0;t<n.length;t++){let e=n[t];o.setFrame(h,this.getValue(e,"time",0),this.getValue(e,"rotateMix",1),this.getValue(e,"translateMix",1),this.getValue(e,"scaleMix",1),this.getValue(e,"shearMix",1)),this.readCurve(e,o,h),h++}i.push(o),r=Math.max(r,o.frames[(o.getFrameCount()-1)*t.TransformConstraintTimeline.ENTRIES])}if(e.path)for(let s in e.path){let l=e.path[s],o=a.findPathConstraintIndex(s);if(-1==o)throw new Error("Path constraint not found: "+s);let h=a.pathConstraints[o];for(let e in l){let s=l[e];if("position"===e||"spacing"===e){let a=null,l=1;"spacing"===e?(a=new t.PathConstraintSpacingTimeline(s.length),h.spacingMode!=t.SpacingMode.Length&&h.spacingMode!=t.SpacingMode.Fixed||(l=n)):(a=new t.PathConstraintPositionTimeline(s.length),h.positionMode==t.PositionMode.Fixed&&(l=n)),a.pathConstraintIndex=o;let d=0;for(let t=0;t<s.length;t++){let n=s[t];a.setFrame(d,this.getValue(n,"time",0),this.getValue(n,e,0)*l),this.readCurve(n,a,d),d++}i.push(a),r=Math.max(r,a.frames[(a.getFrameCount()-1)*t.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===e){let e=new t.PathConstraintMixTimeline(s.length);e.pathConstraintIndex=o;let a=0;for(let t=0;t<s.length;t++){let n=s[t];e.setFrame(a,this.getValue(n,"time",0),this.getValue(n,"rotateMix",1),this.getValue(n,"translateMix",1)),this.readCurve(n,e,a),a++}i.push(e),r=Math.max(r,e.frames[(e.getFrameCount()-1)*t.PathConstraintMixTimeline.ENTRIES])}}}if(e.deform)for(let s in e.deform){let l=e.deform[s],o=a.findSkin(s);if(null==o)throw new Error("Skin not found: "+s);for(let e in l){let s=l[e],h=a.findSlotIndex(e);if(-1==h)throw new Error("Slot not found: "+s.name);for(let e in s){let a=s[e],l=o.getAttachment(h,e);if(null==l)throw new Error("Deform attachment not found: "+a.name);let d=null!=l.bones,u=l.vertices,c=d?u.length/3*2:u.length,f=new t.DeformTimeline(a.length);f.slotIndex=h,f.attachment=l;let m=0;for(let e=0;e<a.length;e++){let s,i=a[e],r=this.getValue(i,"vertices",null);if(null==r)s=d?t.Utils.newFloatArray(c):u;else{s=t.Utils.newFloatArray(c);let e=this.getValue(i,"offset",0);if(t.Utils.arrayCopy(r,0,s,e,r.length),1!=n)for(let t=e,a=t+r.length;t<a;t++)s[t]*=n;if(!d)for(let t=0;t<c;t++)s[t]+=u[t]}f.setFrame(m,this.getValue(i,"time",0),s),this.readCurve(i,f,m),m++}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}let l=e.drawOrder;if(null==l&&(l=e.draworder),null!=l){let e=new t.DrawOrderTimeline(l.length),s=a.slots.length,n=0;for(let i=0;i<l.length;i++){let r=l[i],o=null,h=this.getValue(r,"offsets",null);if(null!=h){o=t.Utils.newArray(s,-1);let e=t.Utils.newArray(s-h.length,0),n=0,i=0;for(let t=0;t<h.length;t++){let s=h[t],r=a.findSlotIndex(s.slot);if(-1==r)throw new Error("Slot not found: "+s.slot);for(;n!=r;)e[i++]=n++;o[n+s.offset]=n++}for(;n<s;)e[i++]=n++;for(let t=s-1;t>=0;t--)-1==o[t]&&(o[t]=e[--i])}e.setFrame(n++,this.getValue(r,"time",0),o)}i.push(e),r=Math.max(r,e.frames[e.getFrameCount()-1])}if(e.events){let s=new t.EventTimeline(e.events.length),n=0;for(let i=0;i<e.events.length;i++){let r=e.events[i],l=a.findEvent(r.name);if(null==l)throw new Error("Event not found: "+r.name);let o=new t.Event(t.Utils.toSinglePrecision(this.getValue(r,"time",0)),l);o.intValue=this.getValue(r,"int",l.intValue),o.floatValue=this.getValue(r,"float",l.floatValue),o.stringValue=this.getValue(r,"string",l.stringValue),null!=o.data.audioPath&&(o.volume=this.getValue(r,"volume",1),o.balance=this.getValue(r,"balance",0)),s.setFrame(n++,o)}i.push(s),r=Math.max(r,s.frames[s.getFrameCount()-1])}if(isNaN(r))throw new Error("Error while parsing animation, duration is NaN");a.animations.push(new t.Animation(s,i,r))}readCurve(t,e,s){if(t.hasOwnProperty("curve"))if("stepped"==t.curve)e.setStepped(s);else{let a=t.curve;e.setCurve(s,a,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))}}getValue(t,e,s){return void 0!==t[e]?t[e]:s}static blendModeFromString(e){if("normal"==(e=e.toLowerCase()))return t.BlendMode.Normal;if("additive"==e)return t.BlendMode.Additive;if("multiply"==e)return t.BlendMode.Multiply;if("screen"==e)return t.BlendMode.Screen;throw new Error("Unknown blend mode: "+e)}static positionModeFromString(e){if("fixed"==(e=e.toLowerCase()))return t.PositionMode.Fixed;if("percent"==e)return t.PositionMode.Percent;throw new Error("Unknown position mode: "+e)}static spacingModeFromString(e){if("length"==(e=e.toLowerCase()))return t.SpacingMode.Length;if("fixed"==e)return t.SpacingMode.Fixed;if("percent"==e)return t.SpacingMode.Percent;throw new Error("Unknown position mode: "+e)}static rotateModeFromString(e){if("tangent"==(e=e.toLowerCase()))return t.RotateMode.Tangent;if("chain"==e)return t.RotateMode.Chain;if("chainscale"==e)return t.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+e)}static transformModeFromString(e){if("normal"==(e=e.toLowerCase()))return t.TransformMode.Normal;if("onlytranslation"==e)return t.TransformMode.OnlyTranslation;if("norotationorreflection"==e)return t.TransformMode.NoRotationOrReflection;if("noscale"==e)return t.TransformMode.NoScale;if("noscaleorreflection"==e)return t.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+e)}}t.SkeletonJson=e;class s{constructor(t,e,s,a,n){this.mesh=t,this.skin=e,this.slotIndex=s,this.parent=a,this.inheritDeform=n}}}(spine||(spine={})),function(t){class e{constructor(t,e,s){this.slotIndex=t,this.name=e,this.attachment=s}}t.SkinEntry=e;t.Skin=class{constructor(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}setAttachment(t,e,s){if(null==s)throw new Error("attachment cannot be null.");let a=this.attachments;t>=a.length&&(a.length=t+1),a[t]||(a[t]={}),a[t][e]=s}addSkin(t){for(let e=0;e<t.bones.length;e++){let s=t.bones[e],a=!1;for(let t=0;t<this.bones.length;t++)if(this.bones[t]==s){a=!0;break}a||this.bones.push(s)}for(let e=0;e<t.constraints.length;e++){let s=t.constraints[e],a=!1;for(let t=0;t<this.constraints.length;t++)if(this.constraints[t]==s){a=!0;break}a||this.constraints.push(s)}let e=t.getAttachments();for(let t=0;t<e.length;t++){var s=e[t];this.setAttachment(s.slotIndex,s.name,s.attachment)}}copySkin(e){for(let t=0;t<e.bones.length;t++){let s=e.bones[t],a=!1;for(let t=0;t<this.bones.length;t++)if(this.bones[t]==s){a=!0;break}a||this.bones.push(s)}for(let t=0;t<e.constraints.length;t++){let s=e.constraints[t],a=!1;for(let t=0;t<this.constraints.length;t++)if(this.constraints[t]==s){a=!0;break}a||this.constraints.push(s)}let s=e.getAttachments();for(let e=0;e<s.length;e++){var a=s[e];null!=a.attachment&&(a.attachment instanceof t.MeshAttachment?(a.attachment=a.attachment.newLinkedMesh(),this.setAttachment(a.slotIndex,a.name,a.attachment)):(a.attachment=a.attachment.copy(),this.setAttachment(a.slotIndex,a.name,a.attachment)))}}getAttachment(t,e){let s=this.attachments[t];return s?s[e]:null}removeAttachment(t,e){let s=this.attachments[t];s&&(s[e]=null)}getAttachments(){let t=new Array;for(var s=0;s<this.attachments.length;s++){let a=this.attachments[s];if(a)for(let n in a){let i=a[n];i&&t.push(new e(s,n,i))}}return t}getAttachmentsForSlot(t,s){let a=this.attachments[t];if(a)for(let n in a){let i=a[n];i&&s.push(new e(t,n,i))}}clear(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0}attachAll(t,e){let s=0;for(let a=0;a<t.slots.length;a++){let n=t.slots[a],i=n.getAttachment();if(i&&s<e.attachments.length){let t=e.attachments[s];for(let e in t){if(i==t[e]){let t=this.getAttachment(s,e);null!=t&&n.setAttachment(t);break}}}s++}}}}(spine||(spine={})),function(t){t.Slot=class{constructor(e,s){if(this.deform=new Array,null==e)throw new Error("data cannot be null.");if(null==s)throw new Error("bone cannot be null.");this.data=e,this.bone=s,this.color=new t.Color,this.darkColor=null==e.darkColor?null:new t.Color,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)}setAttachmentTime(t){this.attachmentTime=this.bone.skeleton.time-t}getAttachmentTime(){return this.bone.skeleton.time-this.attachmentTime}setToSetupPose(){this.color.setFromColor(this.data.color),null!=this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),null==this.data.attachmentName?this.attachment=null:(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName)))}}}(spine||(spine={})),function(t){t.SlotData=class{constructor(e,s,a){if(this.color=new t.Color(1,1,1,1),e<0)throw new Error("index must be >= 0.");if(null==s)throw new Error("name cannot be null.");if(null==a)throw new Error("boneData cannot be null.");this.index=e,this.name=s,this.boneData=a}}}(spine||(spine={})),function(t){class e{constructor(t){this._image=t}getImage(){return this._image}static filterFromString(t){switch(t.toLowerCase()){case"nearest":return s.Nearest;case"linear":return s.Linear;case"mipmap":return s.MipMap;case"mipmapnearestnearest":return s.MipMapNearestNearest;case"mipmaplinearnearest":return s.MipMapLinearNearest;case"mipmapnearestlinear":return s.MipMapNearestLinear;case"mipmaplinearlinear":return s.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}static wrapFromString(t){switch(t.toLowerCase()){case"mirroredtepeat":return a.MirroredRepeat;case"clamptoedge":return a.ClampToEdge;case"repeat":return a.Repeat;default:throw new Error("Unknown texture wrap "+t)}}}let s,a;t.Texture=e,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(s=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(a=t.TextureWrap||(t.TextureWrap={}));t.TextureRegion=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}};t.FakeTexture=class extends e{setFilters(t,e){}setWraps(t,e){}dispose(){}}}(spine||(spine={})),function(t){t.TextureAtlas=class{constructor(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}load(n,i){if(null==i)throw new Error("textureLoader cannot be null.");let r=new e(n),l=new Array(4),o=null;for(;;){let e=r.readLine();if(null==e)break;if(e=e.trim(),0==e.length)o=null;else if(o){let t=new a;t.name=e,t.page=o;let s=r.readValue();"true"==s.toLocaleLowerCase()?t.degrees=90:"false"==s.toLocaleLowerCase()?t.degrees=0:t.degrees=parseFloat(s),t.rotate=90==t.degrees,r.readTuple(l);let n=parseInt(l[0]),i=parseInt(l[1]);r.readTuple(l);let h=parseInt(l[0]),d=parseInt(l[1]);t.u=n/o.width,t.v=i/o.height,t.rotate?(t.u2=(n+d)/o.width,t.v2=(i+h)/o.height):(t.u2=(n+h)/o.width,t.v2=(i+d)/o.height),t.x=n,t.y=i,t.width=Math.abs(h),t.height=Math.abs(d),4==r.readTuple(l)&&4==r.readTuple(l)&&r.readTuple(l),t.originalWidth=parseInt(l[0]),t.originalHeight=parseInt(l[1]),r.readTuple(l),t.offsetX=parseInt(l[0]),t.offsetY=parseInt(l[1]),t.index=parseInt(r.readValue()),t.texture=o.texture,this.regions.push(t)}else{o=new s,o.name=e,2==r.readTuple(l)&&(o.width=parseInt(l[0]),o.height=parseInt(l[1]),r.readTuple(l)),r.readTuple(l),o.minFilter=t.Texture.filterFromString(l[0]),o.magFilter=t.Texture.filterFromString(l[1]);let a=r.readValue();o.uWrap=t.TextureWrap.ClampToEdge,o.vWrap=t.TextureWrap.ClampToEdge,"x"==a?o.uWrap=t.TextureWrap.Repeat:"y"==a?o.vWrap=t.TextureWrap.Repeat:"xy"==a&&(o.uWrap=o.vWrap=t.TextureWrap.Repeat),o.texture=i(e),o.texture.setFilters(o.minFilter,o.magFilter),o.texture.setWraps(o.uWrap,o.vWrap),o.width=o.texture.getImage().width,o.height=o.texture.getImage().height,this.pages.push(o)}}}findRegion(t){for(let e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null}dispose(){for(let t=0;t<this.pages.length;t++)this.pages[t].texture.dispose()}};class e{constructor(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readValue(){let t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()}readTuple(t){let e=this.readLine(),s=e.indexOf(":");if(-1==s)throw new Error("Invalid line: "+e);let a=0,n=s+1;for(;a<3;a++){let s=e.indexOf(",",n);if(-1==s)break;t[a]=e.substr(n,s-n).trim(),n=s+1}return t[a]=e.substring(n).trim(),a+1}}class s{}t.TextureAtlasPage=s;class a extends t.TextureRegion{}t.TextureAtlasRegion=a}(spine||(spine={})),function(t){t.TransformConstraint=class{constructor(e,s){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==s)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(let t=0;t<e.bones.length;t++)this.bones.push(s.findBone(e.bones[t].name));this.target=s.findBone(e.target.name)}isActive(){return this.active}apply(){this.update()}update(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()}applyAbsoluteWorld(){let e=this.rotateMix,s=this.translateMix,a=this.scaleMix,n=this.shearMix,i=this.target,r=i.a,l=i.b,o=i.c,h=i.d,d=r*h-l*o>0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*d,c=this.data.offsetShearY*d,f=this.bones;for(let d=0,m=f.length;d<m;d++){let m=f[d],g=!1;if(0!=e){let s=m.a,a=m.b,n=m.c,i=m.d,l=Math.atan2(o,r)-Math.atan2(n,s)+u;l>t.MathUtils.PI?l-=t.MathUtils.PI2:l<-t.MathUtils.PI&&(l+=t.MathUtils.PI2),l*=e;let h=Math.cos(l),d=Math.sin(l);m.a=h*s-d*n,m.b=h*a-d*i,m.c=d*s+h*n,m.d=d*a+h*i,g=!0}if(0!=s){let t=this.temp;i.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),m.worldX+=(t.x-m.worldX)*s,m.worldY+=(t.y-m.worldY)*s,g=!0}if(a>0){let t=Math.sqrt(m.a*m.a+m.c*m.c),e=Math.sqrt(r*r+o*o);t>1e-5&&(t=(t+(e-t+this.data.offsetScaleX)*a)/t),m.a*=t,m.c*=t,t=Math.sqrt(m.b*m.b+m.d*m.d),e=Math.sqrt(l*l+h*h),t>1e-5&&(t=(t+(e-t+this.data.offsetScaleY)*a)/t),m.b*=t,m.d*=t,g=!0}if(n>0){let e=m.b,s=m.d,a=Math.atan2(s,e),i=Math.atan2(h,l)-Math.atan2(o,r)-(a-Math.atan2(m.c,m.a));i>t.MathUtils.PI?i-=t.MathUtils.PI2:i<-t.MathUtils.PI&&(i+=t.MathUtils.PI2),i=a+(i+c)*n;let d=Math.sqrt(e*e+s*s);m.b=Math.cos(i)*d,m.d=Math.sin(i)*d,g=!0}g&&(m.appliedValid=!1)}}applyRelativeWorld(){let e=this.rotateMix,s=this.translateMix,a=this.scaleMix,n=this.shearMix,i=this.target,r=i.a,l=i.b,o=i.c,h=i.d,d=r*h-l*o>0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*d,c=this.data.offsetShearY*d,f=this.bones;for(let d=0,m=f.length;d<m;d++){let m=f[d],g=!1;if(0!=e){let s=m.a,a=m.b,n=m.c,i=m.d,l=Math.atan2(o,r)+u;l>t.MathUtils.PI?l-=t.MathUtils.PI2:l<-t.MathUtils.PI&&(l+=t.MathUtils.PI2),l*=e;let h=Math.cos(l),d=Math.sin(l);m.a=h*s-d*n,m.b=h*a-d*i,m.c=d*s+h*n,m.d=d*a+h*i,g=!0}if(0!=s){let t=this.temp;i.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),m.worldX+=t.x*s,m.worldY+=t.y*s,g=!0}if(a>0){let t=(Math.sqrt(r*r+o*o)-1+this.data.offsetScaleX)*a+1;m.a*=t,m.c*=t,t=(Math.sqrt(l*l+h*h)-1+this.data.offsetScaleY)*a+1,m.b*=t,m.d*=t,g=!0}if(n>0){let e=Math.atan2(h,l)-Math.atan2(o,r);e>t.MathUtils.PI?e-=t.MathUtils.PI2:e<-t.MathUtils.PI&&(e+=t.MathUtils.PI2);let s=m.b,a=m.d;e=Math.atan2(a,s)+(e-t.MathUtils.PI/2+c)*n;let i=Math.sqrt(s*s+a*a);m.b=Math.cos(e)*i,m.d=Math.sin(e)*i,g=!0}g&&(m.appliedValid=!1)}}applyAbsoluteLocal(){let t=this.rotateMix,e=this.translateMix,s=this.scaleMix,a=this.shearMix,n=this.target;n.appliedValid||n.updateAppliedTransform();let i=this.bones;for(let r=0,l=i.length;r<l;r++){let l=i[r];l.appliedValid||l.updateAppliedTransform();let o=l.arotation;if(0!=t){let e=n.arotation-o+this.data.offsetRotation;e-=360*(16384-(16384.499999999996-e/360|0)),o+=e*t}let h=l.ax,d=l.ay;0!=e&&(h+=(n.ax-h+this.data.offsetX)*e,d+=(n.ay-d+this.data.offsetY)*e);let u=l.ascaleX,c=l.ascaleY;0!=s&&(u>1e-5&&(u=(u+(n.ascaleX-u+this.data.offsetScaleX)*s)/u),c>1e-5&&(c=(c+(n.ascaleY-c+this.data.offsetScaleY)*s)/c));let f=l.ashearY;if(0!=a){let t=n.ashearY-f+this.data.offsetShearY;t-=360*(16384-(16384.499999999996-t/360|0)),l.shearY+=t*a}l.updateWorldTransformWith(h,d,o,u,c,l.ashearX,f)}}applyRelativeLocal(){let t=this.rotateMix,e=this.translateMix,s=this.scaleMix,a=this.shearMix,n=this.target;n.appliedValid||n.updateAppliedTransform();let i=this.bones;for(let r=0,l=i.length;r<l;r++){let l=i[r];l.appliedValid||l.updateAppliedTransform();let o=l.arotation;0!=t&&(o+=(n.arotation+this.data.offsetRotation)*t);let h=l.ax,d=l.ay;0!=e&&(h+=(n.ax+this.data.offsetX)*e,d+=(n.ay+this.data.offsetY)*e);let u=l.ascaleX,c=l.ascaleY;0!=s&&(u>1e-5&&(u*=(n.ascaleX-1+this.data.offsetScaleX)*s+1),c>1e-5&&(c*=(n.ascaleY-1+this.data.offsetScaleY)*s+1));let f=l.ashearY;0!=a&&(f+=(n.ashearY+this.data.offsetShearY)*a),l.updateWorldTransformWith(h,d,o,u,c,l.ashearX,f)}}}}(spine||(spine={})),function(t){class e extends t.ConstraintData{constructor(t){super(t,0,!1),this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}}t.TransformConstraintData=e}(spine||(spine={})),function(t){class e{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(()=>new Array),this.polygonIndicesPool=new t.Pool(()=>new Array)}triangulate(t){let s=t,a=t.length>>1,n=this.indicesArray;n.length=0;for(let t=0;t<a;t++)n[t]=t;let i=this.isConcaveArray;i.length=0;for(let t=0,r=a;t<r;++t)i[t]=e.isConcave(t,a,s,n);let r=this.triangles;for(r.length=0;a>3;){let t=a-1,l=0,o=1;for(;;){t:if(!i[l]){let r=n[t]<<1,h=n[l]<<1,d=n[o]<<1,u=s[r],c=s[r+1],f=s[h],m=s[h+1],g=s[d],p=s[d+1];for(let r=(o+1)%a;r!=t;r=(r+1)%a){if(!i[r])continue;let t=n[r]<<1,a=s[t],l=s[t+1];if(e.positiveArea(g,p,u,c,a,l)&&e.positiveArea(u,c,f,m,a,l)&&e.positiveArea(f,m,g,p,a,l))break t}break}if(0==o){do{if(!i[l])break;l--}while(l>0);break}t=l,l=o,o=(o+1)%a}r.push(n[(a+l-1)%a]),r.push(n[l]),r.push(n[(l+1)%a]),n.splice(l,1),i.splice(l,1),a--;let h=(a+l-1)%a,d=l==a?0:l;i[h]=e.isConcave(h,a,s,n),i[d]=e.isConcave(d,a,s,n)}return 3==a&&(r.push(n[2]),r.push(n[0]),r.push(n[1])),r}decompose(t,s){let a=t,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;let i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;let r=this.polygonIndicesPool.obtain();r.length=0;let l=this.polygonPool.obtain();l.length=0;let o=-1,h=0;for(let t=0,d=s.length;t<d;t+=3){let d=s[t]<<1,u=s[t+1]<<1,c=s[t+2]<<1,f=a[d],m=a[d+1],g=a[u],p=a[u+1],w=a[c],x=a[c+1],M=!1;if(o==d){let t=l.length-4,s=e.winding(l[t],l[t+1],l[t+2],l[t+3],w,x),a=e.winding(w,x,l[0],l[1],l[2],l[3]);s==h&&a==h&&(l.push(w),l.push(x),r.push(c),M=!0)}M||(l.length>0?(n.push(l),i.push(r)):(this.polygonPool.free(l),this.polygonIndicesPool.free(r)),l=this.polygonPool.obtain(),l.length=0,l.push(f),l.push(m),l.push(g),l.push(p),l.push(w),l.push(x),r=this.polygonIndicesPool.obtain(),r.length=0,r.push(d),r.push(u),r.push(c),h=e.winding(f,m,g,p,w,x),o=d)}l.length>0&&(n.push(l),i.push(r));for(let t=0,s=n.length;t<s;t++){if(r=i[t],0==r.length)continue;let a=r[0],o=r[r.length-1];l=n[t];let h=l.length-4,d=l[h],u=l[h+1],c=l[h+2],f=l[h+3],m=l[0],g=l[1],p=l[2],w=l[3],x=e.winding(d,u,c,f,m,g);for(let h=0;h<s;h++){if(h==t)continue;let s=i[h];if(3!=s.length)continue;let M=s[0],E=s[1],T=s[2],A=n[h],b=A[A.length-2],S=A[A.length-1];if(M!=a||E!=o)continue;let y=e.winding(d,u,c,f,b,S),I=e.winding(b,S,m,g,p,w);y==x&&I==x&&(A.length=0,s.length=0,l.push(b),l.push(S),r.push(T),d=c,u=f,c=b,f=S,h=0)}}for(let t=n.length-1;t>=0;t--)l=n[t],0==l.length&&(n.splice(t,1),this.polygonPool.free(l),r=i[t],i.splice(t,1),this.polygonIndicesPool.free(r));return n}static isConcave(t,e,s,a){let n=a[(e+t-1)%e]<<1,i=a[t]<<1,r=a[(t+1)%e]<<1;return!this.positiveArea(s[n],s[n+1],s[i],s[i+1],s[r],s[r+1])}static positiveArea(t,e,s,a,n,i){return t*(i-a)+s*(e-i)+n*(a-e)>=0}static winding(t,e,s,a,n,i){let r=s-t,l=a-e;return n*l-i*r+r*e-t*l>=0?1:-1}}t.Triangulator=e}(spine||(spine={})),function(t){t.IntSet=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}};class e{constructor(t=0,e=0,s=0,a=0){this.r=t,this.g=e,this.b=s,this.a=a}set(t,e,s,a){return this.r=t,this.g=e,this.b=s,this.a=a,this.clamp(),this}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?255:parseInt(t.substr(6,2),16))/255,this}add(t,e,s,a){return this.r+=t,this.g+=e,this.b+=s,this.a+=a,this.clamp(),this}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}}e.WHITE=new e(1,1,1,1),e.RED=new e(1,0,0,1),e.GREEN=new e(0,1,0,1),e.BLUE=new e(0,0,1,1),e.MAGENTA=new e(1,0,1,1),t.Color=e;class s{static clamp(t,e,s){return t<e?e:t>s?s:t}static cosDeg(t){return Math.cos(t*s.degRad)}static sinDeg(t){return Math.sin(t*s.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 s.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,s){let a=Math.random(),n=e-t;return a<=(s-t)/n?t+Math.sqrt(a*n*(s-t)):e-Math.sqrt((1-a)*n*(e-s))}}s.PI=3.1415927,s.PI2=2*s.PI,s.radiansToDegrees=180/s.PI,s.radDeg=s.radiansToDegrees,s.degreesToRadians=s.PI/180,s.degRad=s.degreesToRadians,t.MathUtils=s;class a{apply(t,e,s){return t+(e-t)*this.applyInternal(s)}}t.Interpolation=a;class n extends a{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}}t.Pow=n;t.PowOut=class extends n{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}};class i{static arrayCopy(t,e,s,a,n){for(let i=e,r=a;i<e+n;i++,r++)s[r]=t[i]}static setArraySize(t,e,s=0){let a=t.length;if(a==e)return t;if(t.length=e,a<e)for(let n=a;n<e;n++)t[n]=s;return t}static ensureArrayCapacity(t,e,s=0){return t.length>=e?t:i.setArraySize(t,e,s)}static newArray(t,e){let s=new Array(t);for(let a=0;a<t;a++)s[a]=e;return s}static newFloatArray(t){if(i.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(i.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 i.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t}static toSinglePrecision(t){return i.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t}static webkit602BugfixHelper(t,e){}static contains(t,e,s=!0){for(var a=0;a<t.length;a++)if(t[a]==e)return!0;return!1}}i.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,t.Utils=i;t.DebugUtils=class{static logBones(t){for(let e=0;e<t.bones.length;e++){let s=t.bones[e];console.log(s.data.name+", "+s.a+", "+s.b+", "+s.c+", "+s.d+", "+s.worldX+", "+s.worldY)}}};t.Pool=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}};t.Vector2=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}};t.TimeKeeper=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)}};t.WindowedMean=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}}}(spine||(spine={})),(()=>{var t;Math.fround||(Math.fround=(t=new Float32Array(1),function(e){return t[0]=e,t[0]}))})(),function(t){class e{constructor(t){if(null==t)throw new Error("name cannot be null.");this.name=t}}t.Attachment=e;class s extends e{constructor(t){super(t),this.id=(65535&s.nextID++)<<11,this.worldVerticesLength=0,this.deformAttachment=this}computeWorldVertices(t,e,s,a,n,i){s=n+(s>>1)*i;let r=t.bone.skeleton,l=t.deform,o=this.vertices,h=this.bones;if(null==h){l.length>0&&(o=l);let r=t.bone,h=r.worldX,d=r.worldY,u=r.a,c=r.b,f=r.c,m=r.d;for(let t=e,r=n;r<s;t+=2,r+=i){let e=o[t],s=o[t+1];a[r]=e*u+s*c+h,a[r+1]=e*f+s*m+d}return}let d=0,u=0;for(let t=0;t<e;t+=2){let t=h[d];d+=t+1,u+=t}let c=r.bones;if(0==l.length)for(let t=n,e=3*u;t<s;t+=i){let s=0,n=0,i=h[d++];for(i+=d;d<i;d++,e+=3){let t=c[h[d]],a=o[e],i=o[e+1],r=o[e+2];s+=(a*t.a+i*t.b+t.worldX)*r,n+=(a*t.c+i*t.d+t.worldY)*r}a[t]=s,a[t+1]=n}else{let t=l;for(let e=n,r=3*u,l=u<<1;e<s;e+=i){let s=0,n=0,i=h[d++];for(i+=d;d<i;d++,r+=3,l+=2){let e=c[h[d]],a=o[r]+t[l],i=o[r+1]+t[l+1],u=o[r+2];s+=(a*e.a+i*e.b+e.worldX)*u,n+=(a*e.c+i*e.d+e.worldY)*u}a[e]=s,a[e+1]=n}}}copyTo(e){null!=this.bones?(e.bones=new Array(this.bones.length),t.Utils.arrayCopy(this.bones,0,e.bones,0,this.bones.length)):e.bones=null,null!=this.vertices?(e.vertices=t.Utils.newFloatArray(this.vertices.length),t.Utils.arrayCopy(this.vertices,0,e.vertices,0,this.vertices.length)):e.vertices=null,e.worldVerticesLength=this.worldVerticesLength,e.deformAttachment=this.deformAttachment}}s.nextID=0,t.VertexAttachment=s}(spine||(spine={})),function(t){let e;!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(e=t.AttachmentType||(t.AttachmentType={}))}(spine||(spine={})),function(t){class e extends t.VertexAttachment{constructor(e){super(e),this.color=new t.Color(1,1,1,1)}copy(){let t=new e(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}}t.BoundingBoxAttachment=e}(spine||(spine={})),function(t){class e extends t.VertexAttachment{constructor(e){super(e),this.color=new t.Color(.2275,.2275,.8078,1)}copy(){let t=new e(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}}t.ClippingAttachment=e}(spine||(spine={})),function(t){class e extends t.VertexAttachment{constructor(e){super(e),this.color=new t.Color(1,1,1,1),this.tempColor=new t.Color(0,0,0,0)}updateUVs(){let e=this.regionUVs;null!=this.uvs&&this.uvs.length==e.length||(this.uvs=t.Utils.newFloatArray(e.length));let s=this.uvs,a=this.uvs.length,n=this.region.u,i=this.region.v,r=0,l=0;if(this.region instanceof t.TextureAtlasRegion){let t=this.region,o=t.texture.getImage().width,h=t.texture.getImage().height;switch(t.degrees){case 90:n-=(t.originalHeight-t.offsetY-t.height)/o,i-=(t.originalWidth-t.offsetX-t.width)/h,r=t.originalHeight/o,l=t.originalWidth/h;for(let t=0;t<a;t+=2)s[t]=n+e[t+1]*r,s[t+1]=i+(1-e[t])*l;return;case 180:n-=(t.originalWidth-t.offsetX-t.width)/o,i-=t.offsetY/h,r=t.originalWidth/o,l=t.originalHeight/h;for(let t=0;t<a;t+=2)s[t]=n+(1-e[t])*r,s[t+1]=i+(1-e[t+1])*l;return;case 270:n-=t.offsetY/o,i-=t.offsetX/h,r=t.originalHeight/o,l=t.originalWidth/h;for(let t=0;t<a;t+=2)s[t]=n+(1-e[t+1])*r,s[t+1]=i+e[t]*l;return}n-=t.offsetX/o,i-=(t.originalHeight-t.offsetY-t.height)/h,r=t.originalWidth/o,l=t.originalHeight/h}else null==this.region?(n=i=0,r=l=1):(r=this.region.u2-n,l=this.region.v2-i);for(let t=0;t<a;t+=2)s[t]=n+e[t]*r,s[t+1]=i+e[t+1]*l}getParentMesh(){return this.parentMesh}setParentMesh(t){this.parentMesh=t,null!=t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)}copy(){if(null!=this.parentMesh)return this.newLinkedMesh();let s=new e(this.name);return s.region=this.region,s.path=this.path,s.color.setFromColor(this.color),this.copyTo(s),s.regionUVs=new Array(this.regionUVs.length),t.Utils.arrayCopy(this.regionUVs,0,s.regionUVs,0,this.regionUVs.length),s.uvs=new Array(this.uvs.length),t.Utils.arrayCopy(this.uvs,0,s.uvs,0,this.uvs.length),s.triangles=new Array(this.triangles.length),t.Utils.arrayCopy(this.triangles,0,s.triangles,0,this.triangles.length),s.hullLength=this.hullLength,null!=this.edges&&(s.edges=new Array(this.edges.length),t.Utils.arrayCopy(this.edges,0,s.edges,0,this.edges.length)),s.width=this.width,s.height=this.height,s}newLinkedMesh(){let t=new e(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t}}t.MeshAttachment=e}(spine||(spine={})),function(t){class e extends t.VertexAttachment{constructor(e){super(e),this.closed=!1,this.constantSpeed=!1,this.color=new t.Color(1,1,1,1)}copy(){let s=new e(this.name);return this.copyTo(s),s.lengths=new Array(this.lengths.length),t.Utils.arrayCopy(this.lengths,0,s.lengths,0,this.lengths.length),s.closed=closed,s.constantSpeed=this.constantSpeed,s.color.setFromColor(this.color),s}}t.PathAttachment=e}(spine||(spine={})),function(t){class e extends t.VertexAttachment{constructor(e){super(e),this.color=new t.Color(.38,.94,0,1)}computeWorldPosition(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e}computeWorldRotation(e){let s=t.MathUtils.cosDeg(this.rotation),a=t.MathUtils.sinDeg(this.rotation),n=s*e.a+a*e.b,i=s*e.c+a*e.d;return Math.atan2(i,n)*t.MathUtils.radDeg}copy(){let t=new e(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t}}t.PointAttachment=e}(spine||(spine={})),function(t){class e extends t.Attachment{constructor(e){super(e),this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.rotation=0,this.width=0,this.height=0,this.color=new t.Color(1,1,1,1),this.offset=t.Utils.newFloatArray(8),this.uvs=t.Utils.newFloatArray(8),this.tempColor=new t.Color(1,1,1,1)}updateOffset(){let t=this.width/this.region.originalWidth*this.scaleX,s=this.height/this.region.originalHeight*this.scaleY,a=-this.width/2*this.scaleX+this.region.offsetX*t,n=-this.height/2*this.scaleY+this.region.offsetY*s,i=a+this.region.width*t,r=n+this.region.height*s,l=this.rotation*Math.PI/180,o=Math.cos(l),h=Math.sin(l),d=a*o+this.x,u=a*h,c=n*o+this.y,f=n*h,m=i*o+this.x,g=i*h,p=r*o+this.y,w=r*h,x=this.offset;x[e.OX1]=d-f,x[e.OY1]=c+u,x[e.OX2]=d-w,x[e.OY2]=p+u,x[e.OX3]=m-w,x[e.OY3]=p+g,x[e.OX4]=m-f,x[e.OY4]=c+g}setRegion(t){this.region=t;let e=this.uvs;t.rotate?(e[2]=t.u,e[3]=t.v2,e[4]=t.u,e[5]=t.v,e[6]=t.u2,e[7]=t.v,e[0]=t.u2,e[1]=t.v2):(e[0]=t.u,e[1]=t.v2,e[2]=t.u,e[3]=t.v,e[4]=t.u2,e[5]=t.v,e[6]=t.u2,e[7]=t.v2)}computeWorldVertices(t,s,a,n){let i=this.offset,r=t.worldX,l=t.worldY,o=t.a,h=t.b,d=t.c,u=t.d,c=0,f=0;c=i[e.OX1],f=i[e.OY1],s[a]=c*o+f*h+r,s[a+1]=c*d+f*u+l,a+=n,c=i[e.OX2],f=i[e.OY2],s[a]=c*o+f*h+r,s[a+1]=c*d+f*u+l,a+=n,c=i[e.OX3],f=i[e.OY3],s[a]=c*o+f*h+r,s[a+1]=c*d+f*u+l,a+=n,c=i[e.OX4],f=i[e.OY4],s[a]=c*o+f*h+r,s[a+1]=c*d+f*u+l}copy(){let s=new e(this.name);return s.region=this.region,s.rendererObject=this.rendererObject,s.path=this.path,s.x=this.x,s.y=this.y,s.scaleX=this.scaleX,s.scaleY=this.scaleY,s.rotation=this.rotation,s.width=this.width,s.height=this.height,t.Utils.arrayCopy(this.uvs,0,s.uvs,0,8),t.Utils.arrayCopy(this.offset,0,s.offset,0,8),s.color.setFromColor(this.color),s}}e.OX1=0,e.OY1=1,e.OX2=2,e.OY2=3,e.OX3=4,e.OY3=5,e.OX4=6,e.OY4=7,e.X1=0,e.Y1=1,e.C1R=2,e.C1G=3,e.C1B=4,e.C1A=5,e.U1=6,e.V1=7,e.X2=8,e.Y2=9,e.C2R=10,e.C2G=11,e.C2B=12,e.C2A=13,e.U2=14,e.V2=15,e.X3=16,e.Y3=17,e.C3R=18,e.C3G=19,e.C3B=20,e.C3A=21,e.U3=22,e.V3=23,e.X4=24,e.Y4=25,e.C4R=26,e.C4G=27,e.C4B=28,e.C4A=29,e.U4=30,e.V4=31,t.RegionAttachment=e}(spine||(spine={})),function(t){t.JitterEffect=class{constructor(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}begin(t){}transform(e,s,a,n){e.x+=t.MathUtils.randomTriangular(-this.jitterX,this.jitterY),e.y+=t.MathUtils.randomTriangular(-this.jitterX,this.jitterY)}end(){}}}(spine||(spine={})),function(t){class e{constructor(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}begin(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY}transform(s,a,n,i){let r=this.angle*t.MathUtils.degreesToRadians,l=s.x-this.worldX,o=s.y-this.worldY,h=Math.sqrt(l*l+o*o);if(h<this.radius){let t=e.interpolation.apply(0,r,(this.radius-h)/this.radius),a=Math.cos(t),n=Math.sin(t);s.x=a*l-n*o+this.worldX,s.y=n*l+a*o+this.worldY}}end(){}}e.interpolation=new t.PowOut(2),t.SwirlEffect=e}(spine||(spine={})),window.spine=spine;