text: var pixi_spine,__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){!function(t){var e,n,r,i=function(){function t(t,e,n){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.duration=n}return t.prototype.apply=function(t,e,n,r,i,a,o,s){if(null==t)throw new Error("skeleton cannot be null.");r&&0!=this.duration&&(n%=this.duration,e>0&&(e%=this.duration));for(var l=this.timelines,h=0,u=l.length;h<u;h++)l[h].apply(t,e,n,i,a,o,s)},t.binarySearch=function(t,e,n){void 0===n&&(n=1);var r=0,i=t.length/n-2;if(0==i)return n;for(var a=i>>>1;;){if(t[(a+1)*n]<=e?r=a+1:i=a,r==i)return(r+1)*n;a=r+i>>>1}},t.linearSearch=function(t,e,n){for(var r=0,i=t.length-n;r<=i;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=i,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.in=0]="in",t[t.out=1]="out"}(n=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"}(r=t.TimelineType||(t.TimelineType={}));var a=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,i,a){var o=.03*(2*-n+i),s=.03*(2*-r+a),l=.006*(3*(n-i)+1),h=.006*(3*(r-a)+1),u=2*o+l,c=2*s+h,p=.3*n+o+.16666667*l,f=.3*r+s+.16666667*h,d=t*e.BEZIER_SIZE,m=this.curves;m[d++]=e.BEZIER;for(var g=p,v=f,x=d+e.BEZIER_SIZE-1;d<x;d+=2)m[d]=g,m[d+1]=v,p+=u,f+=c,u+=l,c+=h,g+=p,v+=f},e.prototype.getCurvePercent=function(n,r){r=t.MathUtils.clamp(r,0,1);var i=this.curves,a=n*e.BEZIER_SIZE,o=i[a];if(o==e.LINEAR)return r;if(o==e.STEPPED)return 0;for(var s=0,l=++a,h=a+e.BEZIER_SIZE-1;a<h;a+=2)if((s=i[a])>=r){var u=void 0,c=void 0;return a==l?(u=0,c=0):(u=i[a-2],c=i[a-1]),c+(i[a+1]-c)*(r-u)/(s-u)}var p=i[a-1];return p+(1-p)*(r-s)/(1-s)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var o=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e<<1),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=n},a.prototype.apply=function(t,n,r,o,s,l,h){var u=this.frames,c=t.bones[this.boneIndex];if(r<u[0])switch(l){case e.setup:return void(c.rotation=c.data.rotation);case e.first:var p=c.data.rotation-c.rotation;c.rotation+=(p-360*(16384-(16384.499999999996-p/360|0)))*s}else if(r>=u[u.length-a.ENTRIES]){var f=u[u.length+a.PREV_ROTATION];switch(l){case e.setup:c.rotation=c.data.rotation+f*s;break;case e.first:case e.replace:f+=c.data.rotation-c.rotation,f-=360*(16384-(16384.499999999996-f/360|0));case e.add:c.rotation+=f*s}}else{var d=i.binarySearch(u,r,a.ENTRIES),m=u[d+a.PREV_ROTATION],g=u[d],v=this.getCurvePercent((d>>1)-1,1-(r-g)/(u[d+a.PREV_TIME]-g)),x=u[d+a.ROTATION]-m;switch(x=m+(x-360*(16384-(16384.499999999996-x/360|0)))*v,l){case e.setup:c.rotation=c.data.rotation+(x-360*(16384-(16384.499999999996-x/360|0)))*s;break;case e.first:case e.replace:x+=c.data.rotation-c.rotation;case e.add:c.rotation+=(x-360*(16384-(16384.499999999996-x/360|0)))*s}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=o;var s=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=n,this.frames[t+a.Y]=r},a.prototype.apply=function(t,n,r,o,s,l,h){var u=this.frames,c=t.bones[this.boneIndex];if(r<u[0])switch(l){case e.setup:return c.x=c.data.x,void(c.y=c.data.y);case e.first:c.x+=(c.data.x-c.x)*s,c.y+=(c.data.y-c.y)*s}else{var p=0,f=0;if(r>=u[u.length-a.ENTRIES])p=u[u.length+a.PREV_X],f=u[u.length+a.PREV_Y];else{var d=i.binarySearch(u,r,a.ENTRIES);p=u[d+a.PREV_X],f=u[d+a.PREV_Y];var m=u[d],g=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));p+=(u[d+a.X]-p)*g,f+=(u[d+a.Y]-f)*g}switch(l){case e.setup:c.x=c.data.x+p*s,c.y=c.data.y+f*s;break;case e.first:case e.replace:c.x+=(c.data.x+p-c.x)*s,c.y+=(c.data.y+f-c.y)*s;break;case e.add:c.x+=p*s,c.y+=f*s}}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a}(a);t.TranslateTimeline=s;var l=function(a){function o(t){return a.call(this,t)||this}return __extends(o,a),o.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},o.prototype.apply=function(r,a,s,l,h,u,c){var p=this.frames,f=r.bones[this.boneIndex];if(s<p[0])switch(u){case e.setup:return f.scaleX=f.data.scaleX,void(f.scaleY=f.data.scaleY);case e.first:f.scaleX+=(f.data.scaleX-f.scaleX)*h,f.scaleY+=(f.data.scaleY-f.scaleY)*h}else{var d=0,m=0;if(s>=p[p.length-o.ENTRIES])d=p[p.length+o.PREV_X]*f.data.scaleX,m=p[p.length+o.PREV_Y]*f.data.scaleY;else{var g=i.binarySearch(p,s,o.ENTRIES);d=p[g+o.PREV_X],m=p[g+o.PREV_Y];var v=p[g],x=this.getCurvePercent(g/o.ENTRIES-1,1-(s-v)/(p[g+o.PREV_TIME]-v));d=(d+(p[g+o.X]-d)*x)*f.data.scaleX,m=(m+(p[g+o.Y]-m)*x)*f.data.scaleY}if(1==h)u==e.add?(f.scaleX+=d-f.data.scaleX,f.scaleY+=m-f.data.scaleY):(f.scaleX=d,f.scaleY=m);else{var y=0,M=0;if(c==n.out)switch(u){case e.setup:y=f.data.scaleX,M=f.data.scaleY,f.scaleX=y+(Math.abs(d)*t.MathUtils.signum(y)-y)*h,f.scaleY=M+(Math.abs(m)*t.MathUtils.signum(M)-M)*h;break;case e.first:case e.replace:y=f.scaleX,M=f.scaleY,f.scaleX=y+(Math.abs(d)*t.MathUtils.signum(y)-y)*h,f.scaleY=M+(Math.abs(m)*t.MathUtils.signum(M)-M)*h;break;case e.add:y=f.scaleX,M=f.scaleY,f.scaleX=y+(Math.abs(d)*t.MathUtils.signum(y)-f.data.scaleX)*h,f.scaleY=M+(Math.abs(m)*t.MathUtils.signum(M)-f.data.scaleY)*h}else switch(u){case e.setup:y=Math.abs(f.data.scaleX)*t.MathUtils.signum(d),M=Math.abs(f.data.scaleY)*t.MathUtils.signum(m),f.scaleX=y+(d-y)*h,f.scaleY=M+(m-M)*h;break;case e.first:case e.replace:y=Math.abs(f.scaleX)*t.MathUtils.signum(d),M=Math.abs(f.scaleY)*t.MathUtils.signum(m),f.scaleX=y+(d-y)*h,f.scaleY=M+(m-M)*h;break;case e.add:y=t.MathUtils.signum(d),M=t.MathUtils.signum(m),f.scaleX=Math.abs(f.scaleX)*y+(d-Math.abs(f.data.scaleX)*y)*h,f.scaleY=Math.abs(f.scaleY)*M+(m-Math.abs(f.data.scaleY)*M)*h}}}},o}(s);t.ScaleTimeline=l;var h=function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},n.prototype.apply=function(t,r,a,o,s,l,h){var u=this.frames,c=t.bones[this.boneIndex];if(a<u[0])switch(l){case e.setup:return c.shearX=c.data.shearX,void(c.shearY=c.data.shearY);case e.first:c.shearX+=(c.data.shearX-c.shearX)*s,c.shearY+=(c.data.shearY-c.shearY)*s}else{var p=0,f=0;if(a>=u[u.length-n.ENTRIES])p=u[u.length+n.PREV_X],f=u[u.length+n.PREV_Y];else{var d=i.binarySearch(u,a,n.ENTRIES);p=u[d+n.PREV_X],f=u[d+n.PREV_Y];var m=u[d],g=this.getCurvePercent(d/n.ENTRIES-1,1-(a-m)/(u[d+n.PREV_TIME]-m));p+=(u[d+n.X]-p)*g,f+=(u[d+n.Y]-f)*g}switch(l){case e.setup:c.shearX=c.data.shearX+p*s,c.shearY=c.data.shearY+f*s;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+p-c.shearX)*s,c.shearY+=(c.data.shearY+f-c.shearY)*s;break;case e.add:c.shearX+=p*s,c.shearY+=f*s}}},n}(s);t.ShearTimeline=h;var u=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o},a.prototype.apply=function(t,n,r,o,s,l,h){var u=t.slots[this.slotIndex],c=this.frames;if(r<c[0])switch(l){case e.setup:return void u.color.setFromColor(u.data.color);case e.first:var p=u.color,f=u.data.color;p.add((f.r-p.r)*s,(f.g-p.g)*s,(f.b-p.b)*s,(f.a-p.a)*s)}else{var d=0,m=0,g=0,v=0;if(r>=c[c.length-a.ENTRIES]){var x=c.length;d=c[x+a.PREV_R],m=c[x+a.PREV_G],g=c[x+a.PREV_B],v=c[x+a.PREV_A]}else{var y=i.binarySearch(c,r,a.ENTRIES);d=c[y+a.PREV_R],m=c[y+a.PREV_G],g=c[y+a.PREV_B],v=c[y+a.PREV_A];var M=c[y],w=this.getCurvePercent(y/a.ENTRIES-1,1-(r-M)/(c[y+a.PREV_TIME]-M));d+=(c[y+a.R]-d)*w,m+=(c[y+a.G]-m)*w,g+=(c[y+a.B]-g)*w,v+=(c[y+a.A]-v)*w}if(1==s)u.color.set(d,m,g,v);else{p=u.color;l==e.setup&&p.setFromColor(u.data.color),p.add((d-p.r)*s,(m-p.g)*s,(g-p.b)*s,(v-p.a)*s)}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a}(a);t.ColorTimeline=u;var c=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o,s,l,h){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o,this.frames[t+a.R2]=s,this.frames[t+a.G2]=l,this.frames[t+a.B2]=h},a.prototype.apply=function(t,n,r,o,s,l,h){var u=t.slots[this.slotIndex],c=this.frames;if(r<c[0])switch(l){case e.setup:return u.color.setFromColor(u.data.color),void u.darkColor.setFromColor(u.data.darkColor);case e.first:var p=u.color,f=u.darkColor,d=u.data.color,m=u.data.darkColor;p.add((d.r-p.r)*s,(d.g-p.g)*s,(d.b-p.b)*s,(d.a-p.a)*s),f.add((m.r-f.r)*s,(m.g-f.g)*s,(m.b-f.b)*s,0)}else{var g=0,v=0,x=0,y=0,M=0,w=0,E=0;if(r>=c[c.length-a.ENTRIES]){var b=c.length;g=c[b+a.PREV_R],v=c[b+a.PREV_G],x=c[b+a.PREV_B],y=c[b+a.PREV_A],M=c[b+a.PREV_R2],w=c[b+a.PREV_G2],E=c[b+a.PREV_B2]}else{var T=i.binarySearch(c,r,a.ENTRIES);g=c[T+a.PREV_R],v=c[T+a.PREV_G],x=c[T+a.PREV_B],y=c[T+a.PREV_A],M=c[T+a.PREV_R2],w=c[T+a.PREV_G2],E=c[T+a.PREV_B2];var S=c[T],A=this.getCurvePercent(T/a.ENTRIES-1,1-(r-S)/(c[T+a.PREV_TIME]-S));g+=(c[T+a.R]-g)*A,v+=(c[T+a.G]-v)*A,x+=(c[T+a.B]-x)*A,y+=(c[T+a.A]-y)*A,M+=(c[T+a.R2]-M)*A,w+=(c[T+a.G2]-w)*A,E+=(c[T+a.B2]-E)*A}if(1==s)u.color.set(g,v,x,y),u.darkColor.set(M,w,E,1);else{p=u.color,f=u.darkColor;l==e.setup&&(p.setFromColor(u.data.color),f.setFromColor(u.data.darkColor)),p.add((g-p.r)*s,(v-p.g)*s,(x-p.b)*s,(y-p.a)*s),f.add((M-f.r)*s,(w-f.g)*s,(E-f.b)*s,0)}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a}(a);t.TwoColorTimeline=c;var p=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return a.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},a.prototype.apply=function(t,r,a,o,s,l,h){var u=t.slots[this.slotIndex];if(h!=n.out||l!=e.setup){var c=this.frames;if(a<c[0]){if(l==e.setup||l==e.first){var p=u.data.attachmentName;u.setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}}else{var f=0;f=a>=c[c.length-1]?c.length-1:i.binarySearch(c,a,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else{var m=u.data.attachmentName;u.setAttachment(null==m?null:t.getAttachment(this.slotIndex,m))}},a}();t.AttachmentTimeline=p;var f=null,d=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e),r.frameVertices=new Array(e),null==f&&(f=t.Utils.newFloatArray(64)),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},a.prototype.apply=function(n,r,a,o,s,l,h){var u=n.slots[this.slotIndex],c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.applyDeform(this.attachment)){var p=u.attachmentVertices;0==p.length&&(l=e.setup);var f=this.frameVertices,d=f[0].length,m=this.frames;if(a<m[0]){var g=c;switch(l){case e.setup:return void(p.length=0);case e.first:if(1==s){p.length=0;break}var v=t.Utils.setArraySize(p,d);if(null==g.bones)for(var x=g.vertices,y=0;y<d;y++)v[y]+=(x[y]-v[y])*s;else{s=1-s;for(y=0;y<d;y++)v[y]*=s}}}else{var M=t.Utils.setArraySize(p,d);if(a>=m[m.length-1]){var w=f[m.length-1];if(1==s)if(l==e.add)if(null==(g=c).bones)for(x=g.vertices,y=0;y<d;y++)M[y]+=w[y]-x[y];else for(y=0;y<d;y++)M[y]+=w[y];else t.Utils.arrayCopy(w,0,M,0,d);else switch(l){case e.setup:var E=c;if(null==E.bones)for(x=E.vertices,y=0;y<d;y++){var b=x[y];M[y]=b+(w[y]-b)*s}else for(y=0;y<d;y++)M[y]=w[y]*s;break;case e.first:case e.replace:for(y=0;y<d;y++)M[y]+=(w[y]-M[y])*s;case e.add:if(null==(g=c).bones)for(x=g.vertices,y=0;y<d;y++)M[y]+=(w[y]-x[y])*s;else for(y=0;y<d;y++)M[y]+=w[y]*s}}else{var T=i.binarySearch(m,a),S=f[T-1],A=f[T],I=m[T],R=this.getCurvePercent(T-1,1-(a-I)/(m[T-1]-I));if(1==s)if(l==e.add)if(null==(g=c).bones)for(x=g.vertices,y=0;y<d;y++){var P=S[y];M[y]+=P+(A[y]-P)*R-x[y]}else for(y=0;y<d;y++){P=S[y];M[y]+=P+(A[y]-P)*R}else for(y=0;y<d;y++){P=S[y];M[y]=P+(A[y]-P)*R}else switch(l){case e.setup:var C=c;if(null==C.bones)for(x=C.vertices,y=0;y<d;y++){P=S[y],b=x[y];M[y]=b+(P+(A[y]-P)*R-b)*s}else for(y=0;y<d;y++){P=S[y];M[y]=(P+(A[y]-P)*R)*s}break;case e.first:case e.replace:for(y=0;y<d;y++){P=S[y];M[y]+=(P+(A[y]-P)*R-M[y])*s}break;case e.add:if(null==(g=c).bones)for(x=g.vertices,y=0;y<d;y++){P=S[y];M[y]+=(P+(A[y]-P)*R-x[y])*s}else for(y=0;y<d;y++){P=S[y];M[y]+=(P+(A[y]-P)*R)*s}}}}}},a}(a);t.DeformTimeline=d;var m=function(){function e(e){this.frames=t.Utils.newFloatArray(e),this.events=new Array(e)}return e.prototype.getPropertyId=function(){return r.event<<24},e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},e.prototype.apply=function(t,e,n,r,a,o,s){if(null!=r){var l=this.frames,h=this.frames.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,r,a,o,s),e=-1;else if(e>=l[h-1])return;if(!(n<l[0])){var u=0;if(e<l[0])u=0;else for(var c=l[u=i.binarySearch(l,e)];u>0&&l[u-1]==c;)u--;for(;u<h&&n>=l[u];u++)r.push(this.events[u])}}},e}();t.EventTimeline=m;var g=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return a.prototype.getPropertyId=function(){return r.drawOrder<<24},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},a.prototype.apply=function(r,a,o,s,l,h,u){var c=r.drawOrder,p=r.slots;if(u!=n.out||h!=e.setup){var f=this.frames;if(o<f[0])h!=e.setup&&h!=e.first||t.Utils.arrayCopy(r.slots,0,r.drawOrder,0,r.slots.length);else{var d=0;d=o>=f[f.length-1]?f.length-1:i.binarySearch(f,o)-1;var m=this.drawOrders[d];if(null==m)t.Utils.arrayCopy(p,0,c,0,p.length);else for(var g=0,v=m.length;g<v;g++)c[g]=p[m[g]]}}else t.Utils.arrayCopy(r.slots,0,r.drawOrder,0,r.slots.length)},a}();t.DrawOrderTimeline=g;var v=function(a){function o(e){var n=a.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return __extends(o,a),o.prototype.getPropertyId=function(){return(r.ikConstraint<<24)+this.ikConstraintIndex},o.prototype.setFrame=function(t,e,n,r,i,a){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.MIX]=n,this.frames[t+o.BEND_DIRECTION]=r,this.frames[t+o.COMPRESS]=i?1:0,this.frames[t+o.STRETCH]=a?1:0},o.prototype.apply=function(t,r,a,s,l,h,u){var c=this.frames,p=t.ikConstraints[this.ikConstraintIndex];if(a<c[0])switch(h){case e.setup:return p.mix=p.data.mix,p.bendDirection=p.data.bendDirection,p.compress=p.data.compress,void(p.stretch=p.data.stretch);case e.first:p.mix+=(p.data.mix-p.mix)*l,p.bendDirection=p.data.bendDirection,p.compress=p.data.compress,p.stretch=p.data.stretch}else if(a>=c[c.length-o.ENTRIES])h==e.setup?(p.mix=p.data.mix+(c[c.length+o.PREV_MIX]-p.data.mix)*l,u==n.out?(p.bendDirection=p.data.bendDirection,p.compress=p.data.compress,p.stretch=p.data.stretch):(p.bendDirection=c[c.length+o.PREV_BEND_DIRECTION],p.compress=0!=c[c.length+o.PREV_COMPRESS],p.stretch=0!=c[c.length+o.PREV_STRETCH])):(p.mix+=(c[c.length+o.PREV_MIX]-p.mix)*l,u==n.in&&(p.bendDirection=c[c.length+o.PREV_BEND_DIRECTION],p.compress=0!=c[c.length+o.PREV_COMPRESS],p.stretch=0!=c[c.length+o.PREV_STRETCH]));else{var f=i.binarySearch(c,a,o.ENTRIES),d=c[f+o.PREV_MIX],m=c[f],g=this.getCurvePercent(f/o.ENTRIES-1,1-(a-m)/(c[f+o.PREV_TIME]-m));h==e.setup?(p.mix=p.data.mix+(d+(c[f+o.MIX]-d)*g-p.data.mix)*l,u==n.out?(p.bendDirection=p.data.bendDirection,p.compress=p.data.compress,p.stretch=p.data.stretch):(p.bendDirection=c[f+o.PREV_BEND_DIRECTION],p.compress=0!=c[f+o.PREV_COMPRESS],p.stretch=0!=c[f+o.PREV_STRETCH])):(p.mix+=(d+(c[f+o.MIX]-d)*g-p.mix)*l,u==n.in&&(p.bendDirection=c[f+o.PREV_BEND_DIRECTION],p.compress=0!=c[f+o.PREV_COMPRESS],p.stretch=0!=c[f+o.PREV_STRETCH]))}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_MIX=-4,o.PREV_BEND_DIRECTION=-3,o.PREV_COMPRESS=-2,o.PREV_STRETCH=-1,o.MIX=1,o.BEND_DIRECTION=2,o.COMPRESS=3,o.STRETCH=4,o}(a);t.IkConstraintTimeline=v;var x=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r,this.frames[t+a.SCALE]=i,this.frames[t+a.SHEAR]=o},a.prototype.apply=function(t,n,r,o,s,l,h){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(r<u[0]){var p=c.data;switch(l){case e.setup:return c.rotateMix=p.rotateMix,c.translateMix=p.translateMix,c.scaleMix=p.scaleMix,void(c.shearMix=p.shearMix);case e.first:c.rotateMix+=(p.rotateMix-c.rotateMix)*s,c.translateMix+=(p.translateMix-c.translateMix)*s,c.scaleMix+=(p.scaleMix-c.scaleMix)*s,c.shearMix+=(p.shearMix-c.shearMix)*s}}else{var f=0,d=0,m=0,g=0;if(r>=u[u.length-a.ENTRIES]){var v=u.length;f=u[v+a.PREV_ROTATE],d=u[v+a.PREV_TRANSLATE],m=u[v+a.PREV_SCALE],g=u[v+a.PREV_SHEAR]}else{var x=i.binarySearch(u,r,a.ENTRIES);f=u[x+a.PREV_ROTATE],d=u[x+a.PREV_TRANSLATE],m=u[x+a.PREV_SCALE],g=u[x+a.PREV_SHEAR];var y=u[x],M=this.getCurvePercent(x/a.ENTRIES-1,1-(r-y)/(u[x+a.PREV_TIME]-y));f+=(u[x+a.ROTATE]-f)*M,d+=(u[x+a.TRANSLATE]-d)*M,m+=(u[x+a.SCALE]-m)*M,g+=(u[x+a.SHEAR]-g)*M}if(l==e.setup){p=c.data;c.rotateMix=p.rotateMix+(f-p.rotateMix)*s,c.translateMix=p.translateMix+(d-p.translateMix)*s,c.scaleMix=p.scaleMix+(m-p.scaleMix)*s,c.shearMix=p.shearMix+(g-p.shearMix)*s}else c.rotateMix+=(f-c.rotateMix)*s,c.translateMix+=(d-c.translateMix)*s,c.scaleMix+=(m-c.scaleMix)*s,c.shearMix+=(g-c.shearMix)*s}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a}(a);t.TransformConstraintTimeline=x;var y=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=n},a.prototype.apply=function(t,n,r,o,s,l,h){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r<u[0])switch(l){case e.setup:return void(c.position=c.data.position);case e.first:c.position+=(c.data.position-c.position)*s}else{var p=0;if(r>=u[u.length-a.ENTRIES])p=u[u.length+a.PREV_VALUE];else{var f=i.binarySearch(u,r,a.ENTRIES);p=u[f+a.PREV_VALUE];var d=u[f],m=this.getCurvePercent(f/a.ENTRIES-1,1-(r-d)/(u[f+a.PREV_TIME]-d));p+=(u[f+a.VALUE]-p)*m}l==e.setup?c.position=c.data.position+(p-c.data.position)*s:c.position+=(p-c.position)*s}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a}(a);t.PathConstraintPositionTimeline=y;var M=function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,r,a,o,s,l,h){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(a<u[0])switch(l){case e.setup:return void(c.spacing=c.data.spacing);case e.first:c.spacing+=(c.data.spacing-c.spacing)*s}else{var p=0;if(a>=u[u.length-n.ENTRIES])p=u[u.length+n.PREV_VALUE];else{var f=i.binarySearch(u,a,n.ENTRIES);p=u[f+n.PREV_VALUE];var d=u[f],m=this.getCurvePercent(f/n.ENTRIES-1,1-(a-d)/(u[f+n.PREV_TIME]-d));p+=(u[f+n.VALUE]-p)*m}l==e.setup?c.spacing=c.data.spacing+(p-c.data.spacing)*s:c.spacing+=(p-c.spacing)*s}},n}(y);t.PathConstraintSpacingTimeline=M;var w=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return __extends(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r},a.prototype.apply=function(t,n,r,o,s,l,h){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r<u[0])switch(l){case e.setup:return c.rotateMix=c.data.rotateMix,void(c.translateMix=c.data.translateMix);case e.first:c.rotateMix+=(c.data.rotateMix-c.rotateMix)*s,c.translateMix+=(c.data.translateMix-c.translateMix)*s}else{var p=0,f=0;if(r>=u[u.length-a.ENTRIES])p=u[u.length+a.PREV_ROTATE],f=u[u.length+a.PREV_TRANSLATE];else{var d=i.binarySearch(u,r,a.ENTRIES);p=u[d+a.PREV_ROTATE],f=u[d+a.PREV_TRANSLATE];var m=u[d],g=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));p+=(u[d+a.ROTATE]-p)*g,f+=(u[d+a.TRANSLATE]-f)*g}l==e.setup?(c.rotateMix=c.data.rotateMix+(p-c.data.rotateMix)*s,c.translateMix=c.data.translateMix+(f-c.data.translateMix)*s):(c.rotateMix+=(p-c.rotateMix)*s,c.translateMix+=(f-c.translateMix)*s)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a}(a);t.PathConstraintMixTimeline=w}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new i(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new t.Pool(function(){return new n}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast;var a=t*i.timeScale;if(i.delay>0){if(i.delay-=a,i.delay>0)continue;a=-i.delay,i.delay=0}var o=i.next;if(null!=o){var s=i.trackLast-o.delay;if(s>=0){for(o.delay=0,o.trackTime=0==i.timeScale?0:(s/i.timeScale+t)*o.timeScale,i.trackTime+=a,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(i.trackLast>=i.trackEnd&&null==i.mixingFrom){e[n]=null,this.queue.end(i),this.disposeNext(i);continue}if(null!=i.mixingFrom&&this.updateMixingFrom(i,t)){var l=i.mixingFrom;for(i.mixingFrom=null,null!=l&&(l.mixingTo=null);null!=l;)this.queue.end(l),l=l.mixingFrom}i.trackTime+=a}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,i=this.tracks,a=!1,o=0,s=i.length;o<s;o++){var l=i[o];if(!(null==l||l.delay>0)){a=!0;var h=0==o?t.MixBlend.first:l.mixBlend,u=l.alpha;null!=l.mixingFrom?u*=this.applyMixingFrom(l,n,h):l.trackTime>=l.trackEnd&&null==l.next&&(u=0);var c=l.animationLast,p=l.getAnimationTime(),f=l.animation.timelines.length,d=l.animation.timelines;if(0!=o||1!=u&&h!=t.MixBlend.add){var m=l.timelineMode,g=0==l.timelinesRotation.length;g&&t.Utils.setArraySize(l.timelinesRotation,f<<1,null);var v=l.timelinesRotation;for(M=0;M<f;M++){var x=d[M],y=m[M]==e.SUBSEQUENT?h:t.MixBlend.setup;x instanceof t.RotateTimeline?this.applyRotateTimeline(x,n,p,u,y,v,M<<1,g):(t.Utils.webkit602BugfixHelper(u,h),x.apply(n,c,p,r,u,y,t.MixDirection.in))}}else for(var M=0;M<f;M++)d[M].apply(n,c,p,r,u,h,t.MixDirection.in);this.queueEvents(l,p),r.length=0,l.nextAnimationLast=p,l.nextTrackLast=l.trackTime}}return this.queue.drain(),a},e.prototype.applyMixingFrom=function(n,r,i){var a=n.mixingFrom;null!=a.mixingFrom&&this.applyMixingFrom(a,r,i);var o=0;0==n.mixDuration?(o=1,i==t.MixBlend.first&&(i=t.MixBlend.setup)):((o=n.mixTime/n.mixDuration)>1&&(o=1),i!=t.MixBlend.first&&(i=a.mixBlend));var s=o<a.eventThreshold?this.events:null,l=o<a.attachmentThreshold,h=o<a.drawOrderThreshold,u=a.animationLast,c=a.getAnimationTime(),p=a.animation.timelines.length,f=a.animation.timelines,d=a.alpha*n.interruptAlpha,m=d*(1-o);if(i==t.MixBlend.add)for(var g=0;g<p;g++)f[g].apply(r,u,c,s,m,i,t.MixDirection.out);else{var v=a.timelineMode,x=a.timelineHoldMix,y=0==a.timelinesRotation.length;y&&t.Utils.setArraySize(a.timelinesRotation,p<<1,null);var M=a.timelinesRotation;a.totalAlpha=0;for(g=0;g<p;g++){var w=f[g],E=t.MixDirection.out,b=void 0,T=0;switch(v[g]){case e.SUBSEQUENT:if(!l&&w instanceof t.AttachmentTimeline)continue;if(!h&&w instanceof t.DrawOrderTimeline)continue;b=i,T=m;break;case e.FIRST:b=t.MixBlend.setup,T=m;break;case e.HOLD:b=t.MixBlend.setup,T=d;break;default:b=t.MixBlend.setup;var S=x[g];T=d*Math.max(0,1-S.mixTime/S.mixDuration)}a.totalAlpha+=T,w instanceof t.RotateTimeline?this.applyRotateTimeline(w,r,c,T,b,M,g<<1,y):(t.Utils.webkit602BugfixHelper(T,i),b==t.MixBlend.setup&&(w instanceof t.AttachmentTimeline?l&&(E=t.MixDirection.out):w instanceof t.DrawOrderTimeline&&h&&(E=t.MixDirection.out)),w.apply(r,u,c,s,T,b,E))}}return n.mixDuration>0&&this.queueEvents(a,c),this.events.length=0,a.nextAnimationLast=c,a.nextTrackLast=a.trackTime,o},e.prototype.applyRotateTimeline=function(e,n,r,i,a,o,s,l){if(l&&(o[s]=0),1!=i){var h=e,u=h.frames,c=n.bones[h.boneIndex],p=0,f=0;if(r<u[0])switch(a){case t.MixBlend.setup:c.rotation=c.data.rotation;default:return;case t.MixBlend.first:p=c.rotation,f=c.data.rotation}else if(p=a==t.MixBlend.setup?c.data.rotation:c.rotation,r>=u[u.length-t.RotateTimeline.ENTRIES])f=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var d=t.Animation.binarySearch(u,r,t.RotateTimeline.ENTRIES),m=u[d+t.RotateTimeline.PREV_ROTATION],g=u[d],v=h.getCurvePercent((d>>1)-1,1-(r-g)/(u[d+t.RotateTimeline.PREV_TIME]-g));f=u[d+t.RotateTimeline.ROTATION]-m,f=m+(f-=360*(16384-(16384.499999999996-f/360|0)))*v+c.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0))}var x=0,y=f-p;if(0==(y-=360*(16384-(16384.499999999996-y/360|0))))x=o[s];else{var M=0,w=0;l?(M=0,w=y):(M=o[s],w=o[s+1]);var E=y>0,b=M>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(y)&&Math.abs(w)<=90&&(Math.abs(M)>180&&(M+=360*t.MathUtils.signum(M)),b=E),x=y+M-M%360,b!=E&&(x+=360*t.MathUtils.signum(M)),o[s]=x}o[s+1]=y,p+=x*i,c.rotation=p-360*(16384-(16384.499999999996-p/360|0))}else e.apply(n,0,r,null,1,a,t.MixDirection.in)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,a=t.trackLast%i,o=this.events,s=0,l=o.length;s<l;s++){var h=o[s];if(h.time<a)break;h.time>r||this.queue.event(t,h)}for((t.loop?0==i||a>t.trackTime%i:e>=r&&t.animationLast<r)&&this.queue.complete(t);s<l;s++){o[s].time<n||this.queue.event(t,o[s])}},e.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e<n;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},e.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,null!=r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,null!=r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=!0,i=this.expandToIndex(t);null!=i&&(-1==i.nextTrackLast?(this.tracks[t]=i.mixingFrom,this.queue.interrupt(i),this.queue.end(i),this.disposeNext(i),i=i.mixingFrom,r=!1):this.disposeNext(i));var a=this.trackEntry(t,e,n,i);return this.setCurrent(t,a,r),this.queue.drain(),a},e.prototype.addAnimation=function(t,e,n,r){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(null!=i)for(;null!=i.next;)i=i.next;var a=this.trackEntry(t,e,n,i);if(null==i)this.setCurrent(t,a,!0),this.queue.drain();else if(i.next=a,r<=0){var o=i.animationEnd-i.animationStart;0!=o?(i.loop?r+=o*(1+(i.trackTime/o|0)):r+=Math.max(o,i.trackTime),r-=this.data.getMix(i.animation,e)):r=i.trackTime}return a.delay=r,a},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var i=this.addAnimationWith(t,e.emptyAnimation,!1,r);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n<r;n++){var i=this.tracks[n];null!=i&&this.setEmptyAnimation(i.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},e.prototype.expandToIndex=function(e){return e<this.tracks.length?this.tracks[e]:(t.Utils.ensureArrayCapacity(this.tracks,e-this.tracks.length+1,null),this.tracks.length=e+1,null)},e.prototype.trackEntry=function(t,e,n,r){var i=this.trackEntryPool.obtain();return i.trackIndex=t,i.animation=e,i.loop=n,i.holdPrevious=!1,i.eventThreshold=0,i.attachmentThreshold=0,i.drawOrderThreshold=0,i.animationStart=0,i.animationEnd=e.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==r?0:this.data.getMix(r.animation,e),i},e.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},e.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var e=0,n=this.tracks.length;e<n;e++){var r=this.tracks[e];if(null!=r){for(;null!=r.mixingFrom;)r=r.mixingFrom;do{null!=r.mixingFrom&&r.mixBlend==t.MixBlend.add||this.setTimelineModes(r),r=r.mixingTo}while(null!=r)}}},e.prototype.setTimelineModes=function(n){var r=n.mixingTo,i=n.animation.timelines,a=n.animation.timelines.length,o=t.Utils.setArraySize(n.timelineMode,a);n.timelineHoldMix.length=0;var s=t.Utils.setArraySize(n.timelineHoldMix,a),l=this.propertyIDs;if(null!=r&&r.holdPrevious)for(var h=0;h<a;h++)l.add(i[h].getPropertyId()),o[h]=e.HOLD;else t:for(h=0;h<a;h++){var u=i[h].getPropertyId();if(l.add(u))if(null!=r&&this.hasTimeline(r,u)){for(var c=r.mixingTo;null!=c;c=c.mixingTo)if(!this.hasTimeline(c,u)){if(n.mixDuration>0){o[h]=e.HOLD_MIX,s[h]=c;continue t}break}o[h]=e.HOLD}else o[h]=e.FIRST;else o[h]=e.SUBSEQUENT}},e.prototype.hasTimeline=function(t,e){for(var n=t.animation.timelines,r=0,i=n.length;r<i;r++)if(n[r].getPropertyId()==e)return!0;return!1},e.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.prototype.setAnimationByName=function(t,n,r){e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(t,n,r)},e.prototype.addAnimationByName=function(t,n,r,i){e.deprecatedWarning2||(e.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(t,n,r,i)},e.prototype.hasAnimation=function(t){return null!==this.data.skeletonData.findAnimation(t)},e.prototype.hasAnimationByName=function(t){return e.deprecatedWarning3||(e.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(t)},e.emptyAnimation=new t.Animation("<empty>",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.deprecatedWarning1=!1,e.deprecatedWarning2=!1,e.deprecatedWarning3=!1,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){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},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(e.prototype,"time",{get:function(){return e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(t){e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endTime",{get:function(){return e.deprecatedWarning2||(e.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(t){e.deprecatedWarning2||(e.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=t},enumerable:!0,configurable:!0}),e.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},e.deprecatedWarning1=!1,e.deprecatedWarning2=!1,e}();t.TrackEntry=n;var r,i=function(){function e(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return e.prototype.start=function(t){this.objects.push(r.start),this.objects.push(t),this.animState.animationsChanged=!0},e.prototype.interrupt=function(t){this.objects.push(r.interrupt),this.objects.push(t)},e.prototype.end=function(t){this.objects.push(r.end),this.objects.push(t),this.animState.animationsChanged=!0},e.prototype.dispose=function(t){this.objects.push(r.dispose),this.objects.push(t)},e.prototype.complete=function(t){this.objects.push(r.complete),this.objects.push(t)},e.prototype.event=function(t,e){this.objects.push(r.event),this.objects.push(t),this.objects.push(e)},e.prototype.deprecateStuff=function(){return e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},e.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,n=this.animState.listeners,i=0;i<e.length;i+=2){var a=e[i],o=e[i+1];switch(a){case r.start:null!=o.listener&&o.listener.start&&o.listener.start(o);for(var s=0;s<n.length;s++)n[s].start&&n[s].start(o);o.onStart&&this.deprecateStuff()&&o.onStart(o.trackIndex),this.animState.onStart&&this.deprecateStuff()&&this.deprecateStuff&&this.animState.onStart(o.trackIndex);break;case r.interrupt:null!=o.listener&&o.listener.interrupt&&o.listener.interrupt(o);for(s=0;s<n.length;s++)n[s].interrupt&&n[s].interrupt(o);break;case r.end:null!=o.listener&&o.listener.end&&o.listener.end(o);for(s=0;s<n.length;s++)n[s].end&&n[s].end(o);o.onEnd&&this.deprecateStuff()&&o.onEnd(o.trackIndex),this.animState.onEnd&&this.deprecateStuff()&&this.animState.onEnd(o.trackIndex);case r.dispose:null!=o.listener&&o.listener.dispose&&o.listener.dispose(o);for(s=0;s<n.length;s++)n[s].dispose&&n[s].dispose(o);this.animState.trackEntryPool.free(o);break;case r.complete:null!=o.listener&&o.listener.complete&&o.listener.complete(o);for(s=0;s<n.length;s++)n[s].complete&&n[s].complete(o);var l=t.MathUtils.toInt(o.loopsCount());o.onComplete&&this.deprecateStuff()&&o.onComplete(o.trackIndex,l),this.animState.onComplete&&this.deprecateStuff()&&this.animState.onComplete(o.trackIndex,l);break;case r.event:var h=e[2+i++];null!=o.listener&&o.listener.event&&o.listener.event(o,h);for(s=0;s<n.length;s++)n[s].event&&n[s].event(o,h);o.onEvent&&this.deprecateStuff()&&o.onEvent(o.trackIndex,h),this.animState.onEvent&&this.deprecateStuff()&&this.animState.onEvent(o.trackIndex,h)}}this.clear(),this.drainDisabled=!1}},e.prototype.clear=function(){this.objects.length=0},e.deprecatedWarning1=!1,e}();t.EventQueue=i,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"}(r=t.EventType||(t.EventType={}));var a=function(){function t(){}return t.prototype.start=function(t){},t.prototype.interrupt=function(t){},t.prototype.end=function(t){},t.prototype.dispose=function(t){},t.prototype.complete=function(t){},t.prototype.event=function(t,e){},t}();t.AnimationStateAdapter2=a}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function t(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}return t.prototype.setMix=function(t,e,n){var r=this.skeletonData.findAnimation(t);if(null==r)throw new Error("Animation not found: "+t);var i=this.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);this.setMixWith(r,i,n)},t.prototype.setMixByName=function(e,n,r){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.")),this.setMix(e,n,r)},t.prototype.setMixWith=function(t,e,n){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");var r=t.name+"."+e.name;this.animationToMixTime[r]=n},t.prototype.getMix=function(t,e){var n=t.name+"."+e.name,r=this.animationToMixTime[n];return void 0===r?this.defaultMix:r},t.deprecatedWarning1=!1,t}();t.AnimationStateData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (region attachment: "+n+")");var a=new t.RegionAttachment(n);return a.region=i,a},e.prototype.newMeshAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (mesh attachment: "+n+")");var a=new t.MeshAttachment(n);return a.region=i,a},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(t.BlendMode||(t.BlendMode={}))}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t,e,n){if(this.matrix=new PIXI.Matrix,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.sorted=!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=n,this.setToSetupPose()}return Object.defineProperty(e.prototype,"worldX",{get:function(){return this.matrix.tx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"worldY",{get:function(){return this.matrix.ty},enumerable:!0,configurable:!0}),e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(n,r,i,a,o,s,l){this.ax=n,this.ay=r,this.arotation=i,this.ascaleX=a,this.ascaleY=o,this.ashearX=s,this.ashearY=l,this.appliedValid=!0;var h=this.parent,u=this.matrix,c=this.skeleton.scaleX,p=this.skeleton.scaleY;if(null==h){var f=this.skeleton,d=i+90+l;return u.a=t.MathUtils.cosDeg(i+s)*a*c,u.c=t.MathUtils.cosDeg(d)*o*p,u.b=t.MathUtils.sinDeg(i+s)*a*c,u.d=t.MathUtils.sinDeg(d)*o*p,u.tx=n*c+f.x,u.ty=r*p+f.y,void(e.yDown&&(u.b=-u.b,u.d=-u.d))}var m=h.matrix.a,g=h.matrix.c,v=h.matrix.b,x=h.matrix.d;switch(u.tx=m*n+g*r+h.matrix.tx,u.ty=v*n+x*r+h.matrix.ty,this.data.transformMode){case t.TransformMode.Normal:d=i+90+l;var y=t.MathUtils.cosDeg(i+s)*a,M=t.MathUtils.cosDeg(d)*o,w=t.MathUtils.sinDeg(i+s)*a,E=t.MathUtils.sinDeg(d)*o;return u.a=m*y+g*w,u.c=m*M+g*E,u.b=v*y+x*w,void(u.d=v*M+x*E);case t.TransformMode.OnlyTranslation:d=i+90+l;u.a=t.MathUtils.cosDeg(i+s)*a,u.c=t.MathUtils.cosDeg(d)*o,u.b=t.MathUtils.sinDeg(i+s)*a,u.d=t.MathUtils.sinDeg(d)*o;break;case t.TransformMode.NoRotationOrReflection:var b=0;(A=m*m+v*v)>1e-4?(g=v*(A=Math.abs(m*x-g*v)/A),x=m*A,b=Math.atan2(v,m)*t.MathUtils.radDeg):(m=0,v=0,b=90-Math.atan2(x,g)*t.MathUtils.radDeg);var T=i+s-b,S=i+l-b+90;y=t.MathUtils.cosDeg(T)*a,M=t.MathUtils.cosDeg(S)*o,w=t.MathUtils.sinDeg(T)*a,E=t.MathUtils.sinDeg(S)*o;u.a=m*y-g*w,u.c=m*M-g*E,u.b=v*y+x*w,u.d=v*M+x*E;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,I=t.MathUtils.cosDeg(i),R=t.MathUtils.sinDeg(i),P=(m*I+g*R)/c,C=(v*I+x*R)/p;(A=Math.sqrt(P*P+C*C))>1e-5&&(A=1/A),P*=A,C*=A,A=Math.sqrt(P*P+C*C);var V=Math.PI/2+Math.atan2(C,P),_=Math.cos(V)*A,k=Math.sin(V)*A;y=t.MathUtils.cosDeg(s)*a,M=t.MathUtils.cosDeg(90+l)*o,w=t.MathUtils.sinDeg(s)*a,E=t.MathUtils.sinDeg(90+l)*o;(this.data.transformMode!=t.TransformMode.NoScaleOrReflection?m*x-g*v<0:this.skeleton.flipX!=this.skeleton.flipY!=e.yDown)&&(_=-_,k=-k),u.a=P*y+_*w,u.c=P*M+_*E,u.b=C*y+k*w,u.d=C*M+k*E}u.a*=c,u.c*=c,u.b*=p,u.d*=p,e.yDown&&(u.b=-u.b,u.d=-u.d)},e.prototype.setToSetupPose=function(){var 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},e.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){var t=this.matrix;return Math.sqrt(t.a*t.a+t.c*t.c)},e.prototype.getWorldScaleY=function(){var t=this.matrix;return Math.sqrt(t.b*t.b+t.d*t.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,n=this.matrix;if(null==e)return this.ax=n.tx,this.ay=n.ty,this.arotation=Math.atan2(n.b,n.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(n.a*n.a+n.b*n.b),this.ascaleY=Math.sqrt(n.c*n.c+n.d*n.d),this.ashearX=0,void(this.ashearY=Math.atan2(n.a*n.c+n.b*n.d,n.a*n.d-n.b*n.c)*t.MathUtils.radDeg);var r=e.matrix,i=1/(r.a*r.d-r.b*r.c),a=n.tx-r.tx,o=n.ty-r.ty;this.ax=a*r.d*i-o*r.c*i,this.ay=o*r.a*i-a*r.b*i;var s=i*r.d,l=i*r.a,h=i*r.c,u=i*r.b,c=s*n.a-h*n.b,p=s*n.c-h*n.d,f=l*n.b-u*n.a,d=l*n.d-u*n.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(c*c+f*f),this.ascaleX>1e-4){var m=c*d-p*f;this.ascaleY=m/this.ascaleX,this.ashearY=Math.atan2(c*p+f*d,m)*t.MathUtils.radDeg,this.arotation=Math.atan2(f,c)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+d*d),this.ashearY=0,this.arotation=90-Math.atan2(d,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.matrix,n=e.a,r=e.c,i=e.b,a=e.d,o=1/(n*a-r*i),s=t.x-e.tx,l=t.y-e.ty;return t.x=s*a*o-l*r*o,t.y=l*n*o-s*i*o,t},e.prototype.localToWorld=function(t){var e=this.matrix,n=t.x,r=t.y;return t.x=n*e.a+r*e.c+e.tx,t.y=n*e.b+r*e.d+e.ty,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e),i=this.matrix;return Math.atan2(i.a*n-i.b*r,i.d*r-i.c*n)*t.MathUtils.radDeg},e.prototype.localToWorldRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e),i=this.matrix;return Math.atan2(r*i.b+n*i.d,r*i.a+n*i.c)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.matrix,r=n.a,i=n.c,a=n.b,o=n.d,s=t.MathUtils.cosDeg(e),l=t.MathUtils.sinDeg(e);n.a=s*r-l*a,n.c=s*i-l*o,n.b=l*r+s*a,n.d=l*i+s*o,this.appliedValid=!1},e.yDown=!1,e}();t.Bone=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e,n=function(){return function(t,n,r){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,t<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=t,this.name=n,this.parent=r}}();t.BoneData=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={}))}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}();t.Event=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t){this.name=t}}();t.EventData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=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.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}return e.prototype.getOrder=function(){return this.data.order},e.prototype.apply=function(){this.update()},e.prototype.update=function(){var 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.mix)}},e.prototype.apply1=function(e,n,r,i,a,o,s){e.appliedValid||e.updateAppliedTransform();var l=e.parent.matrix,h=1/(l.a*l.d-l.b*l.c),u=n-l.tx,c=r-l.ty,p=(u*l.d-c*l.c)*h-e.ax,f=(c*l.a-u*l.b)*h-e.ay,d=Math.atan2(f,p)*t.MathUtils.radDeg-e.ashearX-e.arotation;e.ascaleX<0&&(d+=180),d>180?d-=360:d<-180&&(d+=360);var m=e.ascaleX,g=e.ascaleY;if(i||a){var v=e.data.length*m,x=Math.sqrt(p*p+f*f);if(i&&x<v||a&&x>v&&v>1e-4){var y=(x/v-1)*s+1;m*=y,o&&(g*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,m,g,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,i,a,o,s){if(0!=s){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var l=e.ax,h=e.ay,u=e.ascaleX,c=u,p=e.ascaleY,f=n.ascaleX,d=e.matrix,m=0,g=0,v=0;u<0?(u=-u,m=180,v=-1):(m=0,v=1),p<0&&(p=-p,v=-v),f<0?(f=-f,g=180):g=0;var x=n.ax,y=0,M=0,w=0,E=d.a,b=d.c,T=d.b,S=d.d,A=Math.abs(u-p)<=1e-4;A?(M=E*x+b*(y=n.ay)+d.tx,w=T*x+S*y+d.ty):(y=0,M=E*x+d.tx,w=T*x+d.ty);var I=e.parent.matrix;E=I.a,b=I.c,T=I.b;var R=1/(E*(S=I.d)-b*T),P=r-I.tx,C=i-I.ty,V=(P*S-C*b)*R-l,_=(C*E-P*T)*R-h,k=V*V+_*_,N=((P=M-I.tx)*S-(C=w-I.ty)*b)*R-l,D=(C*E-P*T)*R-h,X=Math.sqrt(N*N+D*D),U=n.data.length*f,O=0,Y=0;t:if(A){var F=(k-X*X-(U*=u)*U)/(2*X*U);F<-1?F=-1:F>1&&(F=1,o&&X+U>1e-4&&(c*=(Math.sqrt(k)/(X+U)-1)*s+1)),Y=Math.acos(F)*a,E=X+U*F,b=U*Math.sin(Y),O=Math.atan2(_*E-V*b,V*E+_*b)}else{var L=(E=u*U)*E,B=(b=p*U)*b,W=Math.atan2(_,V),q=-2*B*X,j=B-L;if((S=q*q-4*j*(T=B*X*X+L*k-L*B))>=0){var G=Math.sqrt(S);q<0&&(G=-G);var H=(G=-(q+G)/2)/j,z=T/G,Z=Math.abs(H)<Math.abs(z)?H:z;if(Z*Z<=k){C=Math.sqrt(k-Z*Z)*a,O=W-Math.atan2(C,Z),Y=Math.atan2(C/p,(Z-X)/u);break t}}var J=t.MathUtils.PI,Q=X-E,K=Q*Q,$=0,tt=0,et=X+E,nt=et*et,rt=0;(T=-E*X/(L-B))>=-1&&T<=1&&(T=Math.acos(T),(S=(P=E*Math.cos(T)+X)*P+(C=b*Math.sin(T))*C)<K&&(J=T,K=S,Q=P,$=C),S>nt&&(tt=T,nt=S,et=P,rt=C)),k<=(K+nt)/2?(O=W-Math.atan2($*a,Q),Y=J*a):(O=W-Math.atan2(rt*a,et),Y=tt*a)}var it=Math.atan2(y,x)*v,at=e.arotation;(O=(O-it)*t.MathUtils.radDeg+m-at)>180?O-=360:O<-180&&(O+=360),e.updateWorldTransformWith(l,h,at+O*s,c,e.ascaleY,0,0),at=n.arotation,(Y=((Y+it)*t.MathUtils.radDeg-n.ashearX)*v+g-at)>180?Y-=360:Y<-180&&(Y+=360),n.updateWorldTransformWith(x,y,at+Y*s,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.name=t}}();t.IkConstraintData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(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,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(var n=0,r=t.bones.length;n<r;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}return e.prototype.apply=function(){this.update()},e.prototype.update=function(){var n=this.target.getAttachment();if(n instanceof t.PathAttachment){var r=this.rotateMix,i=this.translateMix,a=r>0;if(i>0||a){var o=this.data,s=o.spacingMode,l=s==t.SpacingMode.Length,h=o.rotateMode,u=h==t.RotateMode.Tangent,c=h==t.RotateMode.ChainScale,p=this.bones.length,f=u?p:p+1,d=this.bones,m=t.Utils.setArraySize(this.spaces,f),g=null,v=this.spacing;if(c||l){c&&(g=t.Utils.setArraySize(this.lengths,p));for(var x=0,y=f-1;x<y;){var M=(C=d[x]).data.length;if(M<e.epsilon)c&&(g[x]=0),m[++x]=0;else{var w=M*C.matrix.a,E=M*C.matrix.b,b=Math.sqrt(w*w+E*E);c&&(g[x]=b),m[++x]=(l?M+v:v)*b/M}}}else for(x=1;x<f;x++)m[x]=v;var T=this.computeWorldPositions(n,f,u,o.positionMode==t.PositionMode.Percent,s==t.SpacingMode.Percent),S=T[0],A=T[1],I=o.offsetRotation,R=!1;if(0==I)R=h==t.RotateMode.Chain;else R=!1,I*=(P=this.target.bone.matrix).a*P.d-P.b*P.c>0?t.MathUtils.degRad:-t.MathUtils.degRad;x=0;for(var P=3;x<p;x++,P+=3){var C,V=(C=d[x]).matrix;V.tx+=(S-V.tx)*i,V.ty+=(A-V.ty)*i;var _=(w=T[P])-S,k=(E=T[P+1])-A;if(c){var N=g[x];if(0!=N){var D=(Math.sqrt(_*_+k*k)/N-1)*r+1;V.a*=D,V.b*=D}}if(S=w,A=E,a){var X=V.a,U=V.c,O=V.b,Y=V.d,F=0,L=0,B=0;if(F=u?T[P-1]:0==m[x+1]?T[P+2]:Math.atan2(k,_),F-=Math.atan2(O,X),R){L=Math.cos(F),B=Math.sin(F);var W=C.data.length;S+=(W*(L*X-B*O)-_)*r,A+=(W*(B*X+L*O)-k)*r}else F+=I;F>t.MathUtils.PI?F-=t.MathUtils.PI2:F<-t.MathUtils.PI&&(F+=t.MathUtils.PI2),F*=r,L=Math.cos(F),B=Math.sin(F),V.a=L*X-B*O,V.c=L*U-B*Y,V.b=B*X+L*O,V.d=B*U+L*Y}C.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,i,a,o){var s=this.target,l=this.position,h=this.spaces,u=t.Utils.setArraySize(this.positions,3*r+2),c=null,p=n.closed,f=n.worldVerticesLength,d=f/6,m=e.NONE;if(!n.constantSpeed){var g=n.lengths,v=g[d-=p?1:2];if(a&&(l*=v),o)for(var x=0;x<r;x++)h[x]*=v;c=t.Utils.setArraySize(this.world,8);x=0;for(var y=0,M=0;x<r;x++,y+=3){var w=l+=j=h[x];if(p)(w%=v)<0&&(w+=v),M=0;else{if(w<0){m!=e.BEFORE&&(m=e.BEFORE,n.computeWorldVertices(s,2,4,c,0,2)),this.addBeforePosition(w,c,0,u,y);continue}if(w>v){m!=e.AFTER&&(m=e.AFTER,n.computeWorldVertices(s,f-6,4,c,0,2)),this.addAfterPosition(w-v,c,0,u,y);continue}}for(;;M++){var E=g[M];if(!(w>E)){if(0==M)w/=E;else w=(w-(Z=g[M-1]))/(E-Z);break}}M!=m&&(m=M,p&&M==d?(n.computeWorldVertices(s,f-4,4,c,0,2),n.computeWorldVertices(s,0,4,c,4,2)):n.computeWorldVertices(s,6*M+2,8,c,0,2)),this.addCurvePosition(w,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,y,i||x>0&&0==j)}return u}p?(f+=2,c=t.Utils.setArraySize(this.world,f),n.computeWorldVertices(s,2,f-4,c,0,2),n.computeWorldVertices(s,0,2,c,f-4,2),c[f-2]=c[0],c[f-1]=c[1]):(d--,f-=4,c=t.Utils.setArraySize(this.world,f),n.computeWorldVertices(s,2,f,c,0,2));for(var b=t.Utils.setArraySize(this.curves,d),T=0,S=c[0],A=c[1],I=0,R=0,P=0,C=0,V=0,_=0,k=0,N=0,D=0,X=0,U=0,O=0,Y=0,F=0,L=(x=0,2);x<d;x++,L+=6)I=c[L],R=c[L+1],P=c[L+2],C=c[L+3],U=2*(k=.1875*(S-2*I+P))+(D=.09375*(3*(I-P)-S+(V=c[L+4]))),O=2*(N=.1875*(A-2*R+C))+(X=.09375*(3*(R-C)-A+(_=c[L+5]))),Y=.75*(I-S)+k+.16666667*D,F=.75*(R-A)+N+.16666667*X,T+=Math.sqrt(Y*Y+F*F),Y+=U,F+=O,U+=D,O+=X,T+=Math.sqrt(Y*Y+F*F),Y+=U,F+=O,T+=Math.sqrt(Y*Y+F*F),Y+=U+D,F+=O+X,T+=Math.sqrt(Y*Y+F*F),b[x]=T,S=V,A=_;if(a&&(l*=T),o)for(x=0;x<r;x++)h[x]*=T;for(var B=this.segments,W=0,q=(x=0,y=0,M=0,0);x<r;x++,y+=3){var j;w=l+=j=h[x];if(p)(w%=T)<0&&(w+=T),M=0;else{if(w<0){this.addBeforePosition(w,c,0,u,y);continue}if(w>T){this.addAfterPosition(w-T,c,f-4,u,y);continue}}for(;;M++){var G=b[M];if(!(w>G)){if(0==M)w/=G;else w=(w-(Z=b[M-1]))/(G-Z);break}}if(M!=m){m=M;var H=6*M;for(S=c[H],A=c[H+1],I=c[H+2],R=c[H+3],P=c[H+4],C=c[H+5],U=2*(k=.03*(S-2*I+P))+(D=.006*(3*(I-P)-S+(V=c[H+6]))),O=2*(N=.03*(A-2*R+C))+(X=.006*(3*(R-C)-A+(_=c[H+7]))),Y=.3*(I-S)+k+.16666667*D,F=.3*(R-A)+N+.16666667*X,W=Math.sqrt(Y*Y+F*F),B[0]=W,H=1;H<8;H++)Y+=U,F+=O,U+=D,O+=X,W+=Math.sqrt(Y*Y+F*F),B[H]=W;Y+=U,F+=O,W+=Math.sqrt(Y*Y+F*F),B[8]=W,Y+=U+D,F+=O+X,W+=Math.sqrt(Y*Y+F*F),B[9]=W,q=0}for(w*=W;;q++){var z=B[q];if(!(w>z)){var Z;if(0==q)w/=z;else w=q+(w-(Z=B[q-1]))/(z-Z);break}}this.addCurvePosition(.1*w,S,A,I,R,P,C,V,_,u,y,i||x>0&&0==j)}return u},e.prototype.addBeforePosition=function(t,e,n,r,i){var a=e[n],o=e[n+1],s=e[n+2]-a,l=e[n+3]-o,h=Math.atan2(l,s);r[i]=a+t*Math.cos(h),r[i+1]=o+t*Math.sin(h),r[i+2]=h},e.prototype.addAfterPosition=function(t,e,n,r,i){var a=e[n+2],o=e[n+3],s=a-e[n],l=o-e[n+1],h=Math.atan2(l,s);r[i]=a+t*Math.cos(h),r[i+1]=o+t*Math.sin(h),r[i+2]=h},e.prototype.addCurvePosition=function(t,e,n,r,i,a,o,s,l,h,u,c){(0==t||isNaN(t))&&(t=1e-4);var p=t*t,f=p*t,d=1-t,m=d*d,g=m*d,v=d*t,x=3*v,y=d*x,M=x*t,w=e*g+r*y+a*M+s*f,E=n*g+i*y+o*M+l*f;h[u]=w,h[u+1]=E,c&&(h[u+2]=Math.atan2(E-(n*m+i*v*2+o*p),w-(e*m+r*v*2+a*p)))},e.prototype.getOrder=function(){return this.data.order},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t){this.order=0,this.bones=new Array,this.name=t}}();t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}))}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(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(var n=0;n<e.bones.length;n++){var r=e.bones[n],i=void 0;if(null==r.parent)i=new t.Bone(r,this,null);else{var a=this.bones[r.parent.index];i=new t.Bone(r,this,a),a.children.push(i)}this.bones.push(i)}this.slots=new Array,this.drawOrder=new Array;for(n=0;n<e.slots.length;n++){var o=e.slots[n],s=(i=this.bones[o.boneData.index],new t.Slot(o,i));this.slots.push(s),this.drawOrder.push(s)}this.ikConstraints=new Array;for(n=0;n<e.ikConstraints.length;n++){var l=e.ikConstraints[n];this.ikConstraints.push(new t.IkConstraint(l,this))}this.transformConstraints=new Array;for(n=0;n<e.transformConstraints.length;n++){var h=e.transformConstraints[n];this.transformConstraints.push(new t.TransformConstraint(h,this))}this.pathConstraints=new Array;for(n=0;n<e.pathConstraints.length;n++){var u=e.pathConstraints[n];this.pathConstraints.push(new t.PathConstraint(u,this))}this.color=new t.Color(1,1,1,1),this.updateCache()}return e.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].sorted=!1;var r=this.ikConstraints,i=this.transformConstraints,a=this.pathConstraints,o=r.length,s=i.length,l=a.length,h=o+s+l;t:for(e=0;e<h;e++){for(var u=0;u<o;u++){if((c=r[u]).data.order==e){this.sortIkConstraint(c);continue t}}for(u=0;u<s;u++){if((c=i[u]).data.order==e){this.sortTransformConstraint(c);continue t}}for(u=0;u<l;u++){var c;if((c=a[u]).data.order==e){this.sortPathConstraint(c);continue t}}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},e.prototype.sortIkConstraint=function(t){var e=t.target;this.sortBone(e);var n=t.bones,r=n[0];if(this.sortBone(r),n.length>1){var i=n[n.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(t),this.sortReset(r.children),n[n.length-1].sorted=!0},e.prototype.sortPathConstraint=function(e){var n=e.target,r=n.data.index,i=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,i);for(var a=0,o=this.data.skins.length;a<o;a++)this.sortPathConstraintAttachment(this.data.skins[a],r,i);var s=n.getAttachment();s instanceof t.PathAttachment&&this.sortPathConstraintAttachmentWith(s,i);var l=e.bones,h=l.length;for(a=0;a<h;a++)this.sortBone(l[a]);this._updateCache.push(e);for(a=0;a<h;a++)this.sortReset(l[a].children);for(a=0;a<h;a++)l[a].sorted=!0},e.prototype.sortTransformConstraint=function(t){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var r=0;r<n;r++){var i=e[r];this.sortBone(i.parent),this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}else for(r=0;r<n;r++)this.sortBone(e[r]);this._updateCache.push(t);for(var a=0;a<n;a++)this.sortReset(e[a].children);for(a=0;a<n;a++)e[a].sorted=!0},e.prototype.sortPathConstraintAttachment=function(t,e,n){var r=t.attachments[e];if(r)for(var i in r)this.sortPathConstraintAttachmentWith(r[i],n)},e.prototype.sortPathConstraintAttachmentWith=function(e,n){if(e instanceof t.PathAttachment){var r=e.bones;if(null==r)this.sortBone(n);else for(var i=this.bones,a=0;a<r.length;)for(var o=r[a++],s=a+o;a<s;a++){var l=r[a];this.sortBone(i[l])}}},e.prototype.sortBone=function(t){if(!t.sorted){var e=t.parent;null!=e&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t)}},e.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var r=t[e];r.sorted&&this.sortReset(r.children),r.sorted=!1}},e.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,n=t.length;e<n;e++){var r=t[e];r.ax=r.x,r.ay=r.y,r.arotation=r.rotation,r.ascaleX=r.scaleX,r.ascaleY=r.scaleY,r.ashearX=r.shearX,r.ashearY=r.shearY,r.appliedValid=!0}var i=this._updateCache;for(e=0,n=i.length;e<n;e++)i[e].update()},e.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},e.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();var r=this.ikConstraints;for(e=0,n=r.length;e<n;e++){(s=r[e]).bendDirection=s.data.bendDirection,s.mix=s.data.mix}var i=this.transformConstraints;for(e=0,n=i.length;e<n;e++){var a=(s=i[e]).data;s.rotateMix=a.rotateMix,s.translateMix=a.translateMix,s.scaleMix=a.scaleMix,s.shearMix=a.shearMix}var o=this.pathConstraints;for(e=0,n=o.length;e<n;e++){var s;a=(s=o[e]).data;s.position=a.position,s.spacing=a.spacing,s.rotateMix=a.rotateMix,s.translateMix=a.translateMix}},e.prototype.setSlotsToSetupPose=function(){var e=this.slots;t.Utils.arrayCopy(e,0,this.drawOrder,0,e.length);for(var n=0,r=e.length;n<r;n++)e[n].setToSetupPose()},e.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},e.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},e.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++)if(e[n].data.name==t)return n;return-1},e.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},e.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++)if(e[n].data.name==t)return n;return-1},e.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},e.prototype.setSkin=function(t){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n],a=i.data.attachmentName;if(null!=a){var o=t.getAttachment(n,a);null!=o&&i.setAttachment(o)}}this.skin=t},e.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},e.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var n=this.skin.getAttachment(t,e);if(null!=n)return n}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},e.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var n=this.slots,r=0,i=n.length;r<i;r++){var a=n[r];if(a.data.name==t){var o=null;if(null!=e&&null==(o=this.getAttachment(r,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void a.setAttachment(o)}}throw new Error("Slot not found: "+t)},e.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},e.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},e.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},e.prototype.getBounds=function(e,n,r){if(null==e)throw new Error("offset cannot be null.");if(null==n)throw new Error("size cannot be null.");for(var i=this.drawOrder,a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=0,u=i.length;h<u;h++){var c=i[h],p=0,f=null,d=c.getAttachment();if(d instanceof t.RegionAttachment)p=8,f=t.Utils.setArraySize(r,p,0),d.computeWorldVertices(c.bone,f,0,2);else if(d instanceof t.MeshAttachment){var m=d;p=m.worldVerticesLength,f=t.Utils.setArraySize(r,p,0),m.computeWorldVertices(c,0,p,f,0,2)}if(null!=f)for(var g=0,v=f.length;g<v;g+=2){var x=f[g],y=f[g+1];a=Math.min(a,x),o=Math.min(o,y),s=Math.max(s,x),l=Math.max(l,y)}}e.set(a,o),n.set(s-a,l-o)},e.prototype.update=function(t){this.time+=t},Object.defineProperty(e.prototype,"flipX",{get:function(){return-1==this.scaleX},set:function(t){e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY")),this.scaleX=t?1:-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flipY",{get:function(){return-1==this.scaleY},set:function(t){e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY")),this.scaleY=t?1:-1},enumerable:!0,configurable:!0}),e.deprecatedWarning1=!1,e}();t.Skeleton=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(){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(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var r=this.boundingBoxes,i=this.polygons,a=this.polygonPool,o=e.slots,s=o.length;r.length=0,a.freeAll(i),i.length=0;for(var l=0;l<s;l++){var h=o[l],u=h.getAttachment();if(u instanceof t.BoundingBoxAttachment){var c=u;r.push(c);var p=a.obtain();p.length!=c.worldVerticesLength&&(p=t.Utils.newFloatArray(c.worldVerticesLength)),i.push(p),c.computeWorldVertices(h,0,c.worldVerticesLength,p,0,2)}}n?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},e.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=this.polygons,a=0,o=i.length;a<o;a++)for(var s=i[a],l=s,h=0,u=s.length;h<u;h+=2){var c=l[h],p=l[h+1];t=Math.min(t,c),e=Math.min(e,p),n=Math.max(n,c),r=Math.max(r,p)}this.minX=t,this.minY=e,this.maxX=n,this.maxY=r},e.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,a=this.minY,o=this.maxX,s=this.maxY;if(t<=i&&n<=i||e<=a&&r<=a||t>=o&&n>=o||e>=s&&r>=s)return!1;var l=(r-e)/(n-t),h=l*(i-t)+e;if(h>a&&h<s)return!0;if((h=l*(o-t)+e)>a&&h<s)return!0;var u=(a-e)/l+t;return u>i&&u<o||(u=(s-e)/l+t)>i&&u<o},e.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r<i;r++)if(this.containsPointPolygon(n[r],t,e))return this.boundingBoxes[r];return null},e.prototype.containsPointPolygon=function(t,e,n){for(var r=t,i=t.length,a=i-2,o=!1,s=0;s<i;s+=2){var l=r[s+1],h=r[a+1];if(l<n&&h>=n||h<n&&l>=n){var u=r[s];u+(n-l)/(h-l)*(r[a]-u)<e&&(o=!o)}a=s}return o},e.prototype.intersectsSegment=function(t,e,n,r){for(var i=this.polygons,a=0,o=i.length;a<o;a++)if(this.intersectsSegmentPolygon(i[a],t,e,n,r))return this.boundingBoxes[a];return null},e.prototype.intersectsSegmentPolygon=function(t,e,n,r,i){for(var a=t,o=t.length,s=e-r,l=n-i,h=e*i-n*r,u=a[o-2],c=a[o-1],p=0;p<o;p+=2){var f=a[p],d=a[p+1],m=u*d-c*f,g=u-f,v=c-d,x=s*v-l*g,y=(h*g-s*m)/x;if((y>=u&&y<=f||y>=f&&y<=u)&&(y>=e&&y<=r||y>=r&&y<=e)){var M=(h*v-l*m)/x;if((M>=c&&M<=d||M>=d&&M<=c)&&(M>=n&&M<=i||M>=i&&M<=n))return!0}u=f,c=d}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(){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}return e.prototype.clipStart=function(n,r){if(null!=this.clipAttachment)return 0;this.clipAttachment=r;var i=r.worldVerticesLength,a=t.Utils.setArraySize(this.clippingPolygon,i);r.computeWorldVertices(n,0,i,a,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var s=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),l=0,h=s.length;l<h;l++){var u=s[l];e.makeClockwise(u),u.push(u[0]),u.push(u[1])}return s.length},e.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},e.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},e.prototype.isClipping=function(){return null!=this.clipAttachment},e.prototype.clipTriangles=function(e,n,r,i,a,o,s,l){var h=this.clipOutput,u=this.clippedVertices,c=this.clippedTriangles,p=this.clippingPolygons,f=this.clippingPolygons.length,d=l?12:8,m=0;u.length=0,c.length=0;t:for(var g=0;g<i;g+=3)for(var v=r[g]<<1,x=e[v],y=e[v+1],M=a[v],w=a[v+1],E=e[v=r[g+1]<<1],b=e[v+1],T=a[v],S=a[v+1],A=e[v=r[g+2]<<1],I=e[v+1],R=a[v],P=a[v+1],C=0;C<f;C++){var V=u.length;if(!this.clip(x,y,E,b,A,I,p[C],h)){(F=t.Utils.setArraySize(u,V+3*d))[V]=x,F[V+1]=y,F[V+2]=o.r,F[V+3]=o.g,F[V+4]=o.b,F[V+5]=o.a,l?(F[V+6]=M,F[V+7]=w,F[V+8]=s.r,F[V+9]=s.g,F[V+10]=s.b,F[V+11]=s.a,F[V+12]=E,F[V+13]=b,F[V+14]=o.r,F[V+15]=o.g,F[V+16]=o.b,F[V+17]=o.a,F[V+18]=T,F[V+19]=S,F[V+20]=s.r,F[V+21]=s.g,F[V+22]=s.b,F[V+23]=s.a,F[V+24]=A,F[V+25]=I,F[V+26]=o.r,F[V+27]=o.g,F[V+28]=o.b,F[V+29]=o.a,F[V+30]=R,F[V+31]=P,F[V+32]=s.r,F[V+33]=s.g,F[V+34]=s.b,F[V+35]=s.a):(F[V+6]=M,F[V+7]=w,F[V+8]=E,F[V+9]=b,F[V+10]=o.r,F[V+11]=o.g,F[V+12]=o.b,F[V+13]=o.a,F[V+14]=T,F[V+15]=S,F[V+16]=A,F[V+17]=I,F[V+18]=o.r,F[V+19]=o.g,F[V+20]=o.b,F[V+21]=o.a,F[V+22]=R,F[V+23]=P),V=c.length,(Z=t.Utils.setArraySize(c,V+3))[V]=m,Z[V+1]=m+1,Z[V+2]=m+2,m+=3;continue t}var _=h.length;if(0!=_){for(var k=b-I,N=A-E,D=x-A,X=I-y,U=1/(k*D+N*(y-I)),O=_>>1,Y=this.clipOutput,F=t.Utils.setArraySize(u,V+O*d),L=0;L<_;L+=2){var B=Y[L],W=Y[L+1];F[V]=B,F[V+1]=W,F[V+2]=o.r,F[V+3]=o.g,F[V+4]=o.b,F[V+5]=o.a;var q=B-A,j=W-I,G=(k*q+N*j)*U,H=(X*q+D*j)*U,z=1-G-H;F[V+6]=M*G+T*H+R*z,F[V+7]=w*G+S*H+P*z,l&&(F[V+8]=s.r,F[V+9]=s.g,F[V+10]=s.b,F[V+11]=s.a),V+=d}V=c.length;var Z=t.Utils.setArraySize(c,V+3*(O-2));O--;for(L=1;L<O;L++)Z[V]=m,Z[V+1]=m+L,Z[V+2]=m+L+1,V+=3;m+=O+1}}},e.prototype.clip=function(t,e,n,r,i,a,o,s){var l=s,h=!1,u=null;o.length%4>=2?(u=s,s=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(r),u.push(i),u.push(a),u.push(t),u.push(e),s.length=0;for(var c=o,p=o.length-4,f=0;;f+=2){for(var d=c[f],m=c[f+1],g=c[f+2],v=c[f+3],x=d-g,y=m-v,M=u,w=u.length-2,E=s.length,b=0;b<w;b+=2){var T=M[b],S=M[b+1],A=M[b+2],I=M[b+3],R=x*(I-v)-y*(A-g)>0;if(x*(S-v)-y*(T-g)>0){if(R){s.push(A),s.push(I);continue}var P=((V=A-T)*(m-S)-(C=I-S)*(d-T))/(C*(g-d)-V*(v-m));s.push(d+(g-d)*P),s.push(m+(v-m)*P)}else if(R){var C,V;P=((V=A-T)*(m-S)-(C=I-S)*(d-T))/(C*(g-d)-V*(v-m));s.push(d+(g-d)*P),s.push(m+(v-m)*P),s.push(A),s.push(I)}h=!0}if(E==s.length)return l.length=0,!0;if(s.push(s[0]),s.push(s[1]),f==p)break;var _=s;(s=u).length=0,u=_}if(l!=s){l.length=0;f=0;for(var k=s.length-2;f<k;f++)l[f]=s[f]}else l.length=l.length-2;return h},e.makeClockwise=function(t){for(var e=t,n=t.length,r=e[n-2]*e[1]-e[0]*e[n-1],i=0,a=0,o=0,s=0,l=n-3;s<l;s+=2)i=e[s],a=e[s+1],o=e[s+2],r+=i*e[s+3]-o*a;if(!(r<0)){s=0;var h=n-2;for(l=n>>1;s<l;s+=2){var u=e[s],c=e[s+1],p=h-s;e[s]=e[p],e[s+1]=e[p+1],e[p]=u,e[p+1]=c}}},e}();t.SkeletonClipping=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function t(){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}return t.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++)if(e[n].name==t)return n;return-1},t.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++)if(e[n].name==t)return n;return-1},t.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++)if(e[n].name==t)return n;return-1},t}();t.SkeletonData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}return e.prototype.readSkeletonData=function(n){var r=this.scale,i=new t.SkeletonData,a="string"==typeof n?JSON.parse(n):n,o=a.skeleton;if(null!=o&&(i.hash=o.hash,i.version=o.spine,i.width=o.width,i.height=o.height,i.fps=o.fps,i.imagesPath=o.images),a.bones)for(var s=0;s<a.bones.length;s++){var l=a.bones[s],h=null,u=this.getValue(l,"parent",null);if(null!=u&&null==(h=i.findBone(u)))throw new Error("Parent bone not found: "+u);(d=new t.BoneData(i.bones.length,l.name,h)).length=this.getValue(l,"length",0)*r,d.x=this.getValue(l,"x",0)*r,d.y=this.getValue(l,"y",0)*r,d.rotation=this.getValue(l,"rotation",0),d.scaleX=this.getValue(l,"scaleX",1),d.scaleY=this.getValue(l,"scaleY",1),d.shearX=this.getValue(l,"shearX",0),d.shearY=this.getValue(l,"shearY",0),d.transformMode=e.transformModeFromString(this.getValue(l,"transform","normal")),i.bones.push(d)}if(a.slots)for(s=0;s<a.slots.length;s++){var c=(S=a.slots[s]).name,p=S.bone,f=i.findBone(p);if(null==f)throw new Error("Slot bone not found: "+p);var d=new t.SlotData(i.slots.length,c,f),m=this.getValue(S,"color",null);null!=m&&d.color.setFromString(m);var g=this.getValue(S,"dark",null);null!=g&&(d.darkColor=new t.Color(1,1,1,1),d.darkColor.setFromString(g)),d.attachmentName=this.getValue(S,"attachment",null),d.blendMode=e.blendModeFromString(this.getValue(S,"blend","normal")),i.slots.push(d)}if(a.ik)for(s=0;s<a.ik.length;s++){var v=a.ik[s];(d=new t.IkConstraintData(v.name)).order=this.getValue(v,"order",0);for(var x=0;x<v.bones.length;x++){p=v.bones[x];if(null==(M=i.findBone(p)))throw new Error("IK bone not found: "+p);d.bones.push(M)}var y=v.target;if(d.target=i.findBone(y),null==d.target)throw new Error("IK target bone not found: "+y);d.bendDirection=this.getValue(v,"bendPositive",!0)?1:-1,d.mix=this.getValue(v,"mix",1),i.ikConstraints.push(d)}if(a.transform)for(s=0;s<a.transform.length;s++){v=a.transform[s];(d=new t.TransformConstraintData(v.name)).order=this.getValue(v,"order",0);for(x=0;x<v.bones.length;x++){p=v.bones[x];if(null==(M=i.findBone(p)))throw new Error("Transform constraint bone not found: "+p);d.bones.push(M)}y=v.target;if(d.target=i.findBone(y),null==d.target)throw new Error("Transform constraint target bone not found: "+y);d.local=this.getValue(v,"local",!1),d.relative=this.getValue(v,"relative",!1),d.offsetRotation=this.getValue(v,"rotation",0),d.offsetX=this.getValue(v,"x",0)*r,d.offsetY=this.getValue(v,"y",0)*r,d.offsetScaleX=this.getValue(v,"scaleX",0),d.offsetScaleY=this.getValue(v,"scaleY",0),d.offsetShearY=this.getValue(v,"shearY",0),d.rotateMix=this.getValue(v,"rotateMix",1),d.translateMix=this.getValue(v,"translateMix",1),d.scaleMix=this.getValue(v,"scaleMix",1),d.shearMix=this.getValue(v,"shearMix",1),i.transformConstraints.push(d)}if(a.path)for(s=0;s<a.path.length;s++){v=a.path[s];(d=new t.PathConstraintData(v.name)).order=this.getValue(v,"order",0);for(x=0;x<v.bones.length;x++){var M;p=v.bones[x];if(null==(M=i.findBone(p)))throw new Error("Transform constraint bone not found: "+p);d.bones.push(M)}y=v.target;if(d.target=i.findSlot(y),null==d.target)throw new Error("Path target slot not found: "+y);d.positionMode=e.positionModeFromString(this.getValue(v,"positionMode","percent")),d.spacingMode=e.spacingModeFromString(this.getValue(v,"spacingMode","length")),d.rotateMode=e.rotateModeFromString(this.getValue(v,"rotateMode","tangent")),d.offsetRotation=this.getValue(v,"rotation",0),d.position=this.getValue(v,"position",0),d.positionMode==t.PositionMode.Fixed&&(d.position*=r),d.spacing=this.getValue(v,"spacing",0),d.spacingMode!=t.SpacingMode.Length&&d.spacingMode!=t.SpacingMode.Fixed||(d.spacing*=r),d.rotateMix=this.getValue(v,"rotateMix",1),d.translateMix=this.getValue(v,"translateMix",1),i.pathConstraints.push(d)}if(a.skins)for(var w in a.skins){var E=a.skins[w],b=new t.Skin(w);for(var c in E){var T=i.findSlotIndex(c);if(-1==T)throw new Error("Slot not found: "+c);var S=E[c];for(var A in S){var I=this.readAttachment(S[A],b,T,A,i);null!=I&&b.addAttachment(T,A,I)}}i.skins.push(b),"default"==b.name&&(i.defaultSkin=b)}s=0;for(var R=this.linkedMeshes.length;s<R;s++){var P=this.linkedMeshes[s];if(null==(b=null==P.skin?i.defaultSkin:i.findSkin(P.skin)))throw new Error("Skin not found: "+P.skin);var C=b.getAttachment(P.slotIndex,P.parent);if(null==C)throw new Error("Parent mesh not found: "+P.parent);P.mesh.setParentMesh(C)}if(this.linkedMeshes.length=0,a.events)for(var V in a.events){var _=a.events[V];(d=new t.EventData(V)).intValue=this.getValue(_,"int",0),d.floatValue=this.getValue(_,"float",0),d.stringValue=this.getValue(_,"string",""),d.audioPath=this.getValue(_,"audio",null),null!=d.audioPath&&(d.volume=this.getValue(_,"volume",1),d.balance=this.getValue(_,"balance",0)),i.events.push(d)}if(a.animations)for(var k in a.animations){var N=a.animations[k];this.readAnimation(N,k,i)}return i},e.prototype.readAttachment=function(e,r,i,a,o){var s=this.scale;switch(a=this.getValue(e,"name",a),this.getValue(e,"type","region")){case"region":var l=this.getValue(e,"path",a),h=this.attachmentLoader.newRegionAttachment(r,a,l);return null==h?null:(h.path=l,h.x=this.getValue(e,"x",0)*s,h.y=this.getValue(e,"y",0)*s,h.scaleX=this.getValue(e,"scaleX",1),h.scaleY=this.getValue(e,"scaleY",1),h.rotation=this.getValue(e,"rotation",0),h.width=e.width*s,h.height=e.height*s,null!=(w=this.getValue(e,"color",null))&&h.color.setFromString(w),h);case"boundingbox":var u=this.attachmentLoader.newBoundingBoxAttachment(r,a);return null==u?null:(this.readVertices(e,u,e.vertexCount<<1),null!=(w=this.getValue(e,"color",null))&&u.color.setFromString(w),u);case"mesh":case"linkedmesh":l=this.getValue(e,"path",a);var c=this.attachmentLoader.newMeshAttachment(r,a,l);if(null==c)return null;c.path=l,null!=(w=this.getValue(e,"color",null))&&c.color.setFromString(w);var p=this.getValue(e,"parent",null);if(null!=p)return c.inheritDeform=this.getValue(e,"deform",!0),this.linkedMeshes.push(new n(c,this.getValue(e,"skin",null),i,p)),c;var f=e.uvs;return this.readVertices(e,c,f.length),c.triangles=e.triangles,c.regionUVs=f,c.hullLength=2*this.getValue(e,"hull",0),c;case"path":if(null==(l=this.attachmentLoader.newPathAttachment(r,a)))return null;l.closed=this.getValue(e,"closed",!1),l.constantSpeed=this.getValue(e,"constantSpeed",!0);var d=e.vertexCount;this.readVertices(e,l,d<<1);for(var m=t.Utils.newArray(d/3,0),g=0;g<e.lengths.length;g++)m[g]=e.lengths[g]*s;return l.lengths=m,null!=(w=this.getValue(e,"color",null))&&l.color.setFromString(w),l;case"point":var v=this.attachmentLoader.newPointAttachment(r,a);return null==v?null:(v.x=this.getValue(e,"x",0)*s,v.y=this.getValue(e,"y",0)*s,v.rotation=this.getValue(e,"rotation",0),null!=(w=this.getValue(e,"color",null))&&v.color.setFromString(w),v);case"clipping":var x=this.attachmentLoader.newClippingAttachment(r,a);if(null==x)return null;var y=this.getValue(e,"end",null);if(null!=y){var M=o.findSlot(y);if(null==M)throw new Error("Clipping end slot not found: "+y);x.endSlot=M}var w;d=e.vertexCount;return this.readVertices(e,x,d<<1),null!=(w=this.getValue(e,"color",null))&&x.color.setFromString(w),x}return null},e.prototype.readVertices=function(e,n,r){var i=this.scale;n.worldVerticesLength=r;var a=e.vertices;if(r!=a.length){var o=new Array,s=new Array;for(c=0,p=a.length;c<p;){var l=a[c++];s.push(l);for(var h=c+4*l;c<h;c+=4)s.push(a[c]),o.push(a[c+1]*i),o.push(a[c+2]*i),o.push(a[c+3])}n.bones=s,n.vertices=t.Utils.toFloatArray(o)}else{var u=t.Utils.toFloatArray(a);if(1!=i)for(var c=0,p=a.length;c<p;c++)u[c]*=i;n.vertices=u}},e.prototype.readAnimation=function(e,n,r){var i=this.scale,a=new Array,o=0;if(e.slots)for(var s in e.slots){var l=e.slots[s];if(-1==(Z=r.findSlotIndex(s)))throw new Error("Slot not found: "+s);for(var h in l){var u=l[h];if("attachment"==h){(M=new t.AttachmentTimeline(u.length)).slotIndex=Z;for(var c=0,p=0;p<u.length;p++){var f=u[p];M.setFrame(c++,f.time,f.name)}a.push(M),o=Math.max(o,M.frames[M.getFrameCount()-1])}else if("color"==h){(M=new t.ColorTimeline(u.length)).slotIndex=Z;for(c=0,p=0;p<u.length;p++){f=u[p];var d=new t.Color;d.setFromString(f.color||"ffffffff"),M.setFrame(c,f.time,d.r,d.g,d.b,d.a),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.ColorTimeline.ENTRIES])}else{if("twoColor"!=h)throw new Error("Invalid timeline type for a slot: "+h+" ("+s+")");(M=new t.TwoColorTimeline(u.length)).slotIndex=Z;for(c=0,p=0;p<u.length;p++){f=u[p];var m=new t.Color,g=new t.Color;m.setFromString(f.light),g.setFromString(f.dark),M.setFrame(c,f.time,m.r,m.g,m.b,m.a,g.r,g.g,g.b),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.TwoColorTimeline.ENTRIES])}}}if(e.bones)for(var v in e.bones){var x=e.bones[v],y=r.findBoneIndex(v);if(-1==y)throw new Error("Bone not found: "+v);for(var h in x){u=x[h];if("rotate"===h){(M=new t.RotateTimeline(u.length)).boneIndex=y;for(c=0,p=0;p<u.length;p++){f=u[p];M.setFrame(c,f.time,f.angle),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.RotateTimeline.ENTRIES])}else{if("translate"!==h&&"scale"!==h&&"shear"!==h)throw new Error("Invalid timeline type for a bone: "+h+" ("+v+")");var M=null,w=1;"scale"===h?M=new t.ScaleTimeline(u.length):"shear"===h?M=new t.ShearTimeline(u.length):(M=new t.TranslateTimeline(u.length),w=i),M.boneIndex=y;for(c=0,p=0;p<u.length;p++){f=u[p];var E=this.getValue(f,"x",0),b=this.getValue(f,"y",0);M.setFrame(c,f.time,E*w,b*w),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.TranslateTimeline.ENTRIES])}}}if(e.ik)for(var T in e.ik){var S=e.ik[T],A=r.findIkConstraint(T);(M=new t.IkConstraintTimeline(S.length)).ikConstraintIndex=r.ikConstraints.indexOf(A);for(c=0,p=0;p<S.length;p++){f=S[p];M.setFrame(c,f.time,this.getValue(f,"mix",1),this.getValue(f,"bendPositive",!0)?1:-1,this.getValue(f,"compress",!1),this.getValue(f,"stretch",!1)),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.IkConstraintTimeline.ENTRIES])}if(e.transform)for(var T in e.transform){S=e.transform[T],A=r.findTransformConstraint(T);(M=new t.TransformConstraintTimeline(S.length)).transformConstraintIndex=r.transformConstraints.indexOf(A);for(c=0,p=0;p<S.length;p++){f=S[p];M.setFrame(c,f.time,this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1),this.getValue(f,"scaleMix",1),this.getValue(f,"shearMix",1)),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.TransformConstraintTimeline.ENTRIES])}if(e.paths)for(var T in e.paths){S=e.paths[T];var I=r.findPathConstraintIndex(T);if(-1==I)throw new Error("Path constraint not found: "+T);var R=r.pathConstraints[I];for(var h in S){u=S[h];if("position"===h||"spacing"===h){M=null,w=1;"spacing"===h?(M=new t.PathConstraintSpacingTimeline(u.length),R.spacingMode!=t.SpacingMode.Length&&R.spacingMode!=t.SpacingMode.Fixed||(w=i)):(M=new t.PathConstraintPositionTimeline(u.length),R.positionMode==t.PositionMode.Fixed&&(w=i)),M.pathConstraintIndex=I;for(c=0,p=0;p<u.length;p++){f=u[p];M.setFrame(c,f.time,this.getValue(f,h,0)*w),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===h){(M=new t.PathConstraintMixTimeline(u.length)).pathConstraintIndex=I;for(c=0,p=0;p<u.length;p++){f=u[p];M.setFrame(c,f.time,this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1)),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[(M.getFrameCount()-1)*t.PathConstraintMixTimeline.ENTRIES])}}}if(e.deform)for(var P in e.deform){var C=e.deform[P],V=r.findSkin(P);if(null==V)throw new Error("Skin not found: "+P);for(var s in C){l=C[s];if(-1==(Z=r.findSlotIndex(s)))throw new Error("Slot not found: "+l.name);for(var h in l){u=l[h];var _=V.getAttachment(Z,h);if(null==_)throw new Error("Deform attachment not found: "+u.name);var k=null!=_.bones,N=_.vertices,D=k?N.length/3*2:N.length;(M=new t.DeformTimeline(u.length)).slotIndex=Z,M.attachment=_;c=0;for(var X=0;X<u.length;X++){f=u[X];var U=void 0,O=this.getValue(f,"vertices",null);if(null==O)U=k?t.Utils.newFloatArray(D):N;else{U=t.Utils.newFloatArray(D);var Y=this.getValue(f,"offset",0);if(t.Utils.arrayCopy(O,0,U,Y,O.length),1!=i)for(var F=(p=Y)+O.length;p<F;p++)U[p]*=i;if(!k)for(p=0;p<D;p++)U[p]+=N[p]}M.setFrame(c,f.time,U),this.readCurve(f,M,c),c++}a.push(M),o=Math.max(o,M.frames[M.getFrameCount()-1])}}}var L=e.drawOrder;if(null==L&&(L=e.draworder),null!=L){M=new t.DrawOrderTimeline(L.length);var B=r.slots.length;for(c=0,X=0;X<L.length;X++){var W=L[X],q=null,j=this.getValue(W,"offsets",null);if(null!=j){q=t.Utils.newArray(B,-1);var G=t.Utils.newArray(B-j.length,0),H=0,z=0;for(p=0;p<j.length;p++){var Z,J=j[p];if(-1==(Z=r.findSlotIndex(J.slot)))throw new Error("Slot not found: "+J.slot);for(;H!=Z;)G[z++]=H++;q[H+J.offset]=H++}for(;H<B;)G[z++]=H++;for(p=B-1;p>=0;p--)-1==q[p]&&(q[p]=G[--z])}M.setFrame(c++,W.time,q)}a.push(M),o=Math.max(o,M.frames[M.getFrameCount()-1])}if(e.events){for(M=new t.EventTimeline(e.events.length),c=0,p=0;p<e.events.length;p++){var Q=e.events[p],K=r.findEvent(Q.name);if(null==K)throw new Error("Event not found: "+Q.name);var $=new t.Event(t.Utils.toSinglePrecision(Q.time),K);$.intValue=this.getValue(Q,"int",K.intValue),$.floatValue=this.getValue(Q,"float",K.floatValue),$.stringValue=this.getValue(Q,"string",K.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Q,"volume",1),$.balance=this.getValue(Q,"balance",0)),M.setFrame(c++,$)}a.push(M),o=Math.max(o,M.frames[M.getFrameCount()-1])}if(isNaN(o))throw new Error("Error while parsing animation, duration is NaN");r.animations.push(new t.Animation(n,a,o))},e.prototype.readCurve=function(t,e,n){if(t.curve)if("stepped"===t.curve)e.setStepped(n);else if("[object Array]"===Object.prototype.toString.call(t.curve)){var r=t.curve;e.setCurve(n,r[0],r[1],r[2],r[3])}},e.prototype.getValue=function(t,e,n){return void 0!==t[e]?t[e]:n},e.blendModeFromString=function(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)},e.positionModeFromString=function(e){if("fixed"==(e=e.toLowerCase()))return t.PositionMode.Fixed;if("percent"==e)return t.PositionMode.Percent;throw new Error("Unknown position mode: "+e)},e.spacingModeFromString=function(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)},e.rotateModeFromString=function(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)},e.transformModeFromString=function(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)},e}();t.SkeletonJson=e;var n=function(){return function(t,e,n,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r}}()}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function t(t){if(this.attachments=new Array,null==t)throw new Error("name cannot be null.");this.name=t}return t.prototype.addAttachment=function(t,e,n){if(null==n)throw new Error("attachment cannot be null.");var r=this.attachments;t>=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r<t.slots.length;r++){var i=t.slots[r],a=i.getAttachment();if(a&&n<e.attachments.length){var o=e.attachments[n];for(var s in o){if(a==o[s]){var l=this.getAttachment(n,s);null!=l&&i.setAttachment(l);break}}}n++}},t}();t.Skin=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(e,n){if(this.attachmentVertices=new Array,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("bone cannot be null.");this.data=e,this.bone=n,this.color=new t.Color,this.darkColor=null==e.darkColor?null:new t.Color,this.setToSetupPose(),this.blendMode=this.data.blendMode}return e.prototype.getAttachment=function(){return this.attachment},e.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0)},e.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},e.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},e.prototype.setToSetupPose=function(){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)))},e}();t.Slot=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(e,n,r){if(this.color=new t.Color(1,1,1,1),e<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r}}();t.SlotData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e,n,r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=r,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"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var i=function(){function t(){this.size=null}return Object.defineProperty(t.prototype,"width",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.crop.width:t.trim?t.trim.width:t.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.crop.height:t.trim?t.trim.height:t.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){var t=this.texture;return t.trim?t.trim.x:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return console.warn("Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on."),this.spineOffsetY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pixiOffsetY",{get:function(){var t=this.texture;return t.trim?t.trim.y:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spineOffsetY",{get:function(){var t=this.texture;return this.originalHeight-this.height-(t.trim?t.trim.y:0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalWidth",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.trim?t.trim.width:t.crop.width:t.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalHeight",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.trim?t.trim.height:t.crop.height:t.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return 0!==this.texture.rotate},enumerable:!0,configurable:!0}),t}();t.TextureRegion=i}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t,e,n){this.pages=new Array,this.regions=new Array,t&&this.addSpineAtlas(t,e,n)}return e.prototype.addTexture=function(e,n){for(var a=this.pages,o=null,s=0;s<a.length;s++)if(a[s].baseTexture===n.baseTexture){o=a[s];break}if(null===o){(o=new r).name="texturePage";var l=n.baseTexture;o.width=l.realWidth,o.height=l.realHeight,o.baseTexture=l,o.minFilter=o.magFilter=t.TextureFilter.Nearest,o.uWrap=t.TextureWrap.ClampToEdge,o.vWrap=t.TextureWrap.ClampToEdge,a.push(o)}var h=new i;return h.name=e,h.page=o,h.texture=n,h.index=-1,this.regions.push(h),h},e.prototype.addTextureHash=function(t,e){for(var n in t)t.hasOwnProperty(n)&&this.addTexture(e&&-1!==n.indexOf(".")?n.substr(0,n.lastIndexOf(".")):n,t[n])},e.prototype.addSpineAtlas=function(t,e,n){return this.load(t,e,n)},e.prototype.load=function(e,a,o){var s=this;if(null==a)throw new Error("textureLoader cannot be null.");var l=new n(e),h=new Array(4),u=null,c=function(){for(;;){var e=l.readLine();if(null==e)return o&&o(s);if(0==(e=e.trim()).length)u=null;else{if(!u){(u=new r).name=e,2==l.readTuple(h)&&(u.width=parseInt(h[0]),u.height=parseInt(h[1]),l.readTuple(h)),l.readTuple(h),u.minFilter=t.Texture.filterFromString(h[0]),u.magFilter=t.Texture.filterFromString(h[1]);var n=l.readValue();u.uWrap=t.TextureWrap.ClampToEdge,u.vWrap=t.TextureWrap.ClampToEdge,"x"==n?u.uWrap=t.TextureWrap.Repeat:"y"==n?u.vWrap=t.TextureWrap.Repeat:"xy"==n&&(u.uWrap=u.vWrap=t.TextureWrap.Repeat),a(e,function(t){u.baseTexture=t,t.hasLoaded||(t.width=u.width,t.height=u.height),s.pages.push(u),u.setFilters(),u.width&&u.height||(u.width=t.realWidth,u.height=t.realHeight,u.width&&u.height||console.log("ERROR spine atlas page "+u.name+": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")),c()}),s.pages.push(u);break}var p=new i;p.name=e,p.page=u;var f="true"==l.readValue()?6:0;l.readTuple(h);var d=parseInt(h[0]),m=parseInt(h[1]);l.readTuple(h);var g=parseInt(h[0]),v=parseInt(h[1]),x=u.baseTexture.resolution;d/=x,m/=x,g/=x,v/=x;var y=new PIXI.Rectangle(d,m,f?v:g,f?g:v);4==l.readTuple(h)&&4==l.readTuple(h)&&l.readTuple(h);var M=parseInt(h[0])/x,w=parseInt(h[1])/x;l.readTuple(h);var E=parseInt(h[0])/x,b=parseInt(h[1])/x,T=new PIXI.Rectangle(0,0,M,w),S=new PIXI.Rectangle(E,w-v-b,g,v);if("3"!=PIXI.VERSION[0])p.texture=new PIXI.Texture(p.page.baseTexture,y,T,S,f);else{var A=new PIXI.Rectangle(d,m,g,v),I=A.clone();S.width=M,S.height=w,p.texture=new PIXI.Texture(p.page.baseTexture,A,I,S,f)}p.index=parseInt(l.readValue()),p.texture._updateUvs(),s.regions.push(p)}}};c()},e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.dispose=function(){for(var t=0;t<this.pages.length;t++)this.pages[t].baseTexture.dispose()},e}();t.TextureAtlas=e;var n=function(){function t(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}return t.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var r=0,i=n+1;r<3;r++){var a=e.indexOf(",",i);if(-1==a)break;t[r]=e.substr(i,a-i).trim(),i=a+1}return t[r]=e.substring(i).trim(),r+1},t}(),r=function(){function e(){}return e.prototype.setFilters=function(){var e=this.baseTexture,n=this.minFilter;n==t.TextureFilter.Linear?e.scaleMode=PIXI.SCALE_MODES.LINEAR:this.minFilter==t.TextureFilter.Nearest?e.scaleMode=PIXI.SCALE_MODES.NEAREST:(e.mipmap=!0,n==t.TextureFilter.MipMapNearestNearest?e.scaleMode=PIXI.SCALE_MODES.NEAREST:e.scaleMode=PIXI.SCALE_MODES.LINEAR)},e}();t.TextureAtlasPage=r;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=i}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,null==e)throw new Error("data cannot be null.");if(null==n)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(var r=0;r<e.bones.length;r++)this.bones.push(n.findBone(e.bones[r].name));this.target=n.findBone(e.target.name)}return e.prototype.apply=function(){this.update()},e.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},e.prototype.applyAbsoluteWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,l=o.c,h=o.b,u=o.d,c=s*u-l*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,p=this.data.offsetRotation*c,f=this.data.offsetShearY*c,d=this.bones,m=0,g=d.length;m<g;m++){var v=d[m],x=!1,y=v.matrix;if(0!=e){var M=y.a,w=y.c,E=y.b,b=y.d;(P=Math.atan2(h,s)-Math.atan2(E,M)+p)>t.MathUtils.PI?P-=t.MathUtils.PI2:P<-t.MathUtils.PI&&(P+=t.MathUtils.PI2),P*=e;var T=Math.cos(P),S=Math.sin(P);y.a=T*M-S*E,y.c=T*w-S*b,y.b=S*M+T*E,y.d=S*w+T*b,x=!0}if(0!=n){var A=this.temp;a.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.tx+=(A.x-y.tx)*n,y.ty+=(A.y-y.ty)*n,x=!0}if(r>0){var I=Math.sqrt(y.a*y.a+y.b*y.b),R=Math.sqrt(s*s+h*h);I>1e-5&&(I=(I+(R-I+this.data.offsetScaleX)*r)/I),y.a*=I,y.b*=I,I=Math.sqrt(y.c*y.c+y.d*y.d),R=Math.sqrt(l*l+u*u),I>1e-5&&(I=(I+(R-I+this.data.offsetScaleY)*r)/I),y.c*=I,y.d*=I,x=!0}if(i>0){w=y.c,b=y.d;var P,C=Math.atan2(b,w);(P=Math.atan2(u,l)-Math.atan2(h,s)-(C-Math.atan2(y.b,y.a)))>t.MathUtils.PI?P-=t.MathUtils.PI2:P<-t.MathUtils.PI&&(P+=t.MathUtils.PI2),P=C+(P+f)*i;I=Math.sqrt(w*w+b*b);y.c=Math.cos(P)*I,y.d=Math.sin(P)*I,x=!0}x&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,l=o.c,h=o.b,u=o.d,c=s*u-l*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,p=this.data.offsetRotation*c,f=this.data.offsetShearY*c,d=this.bones,m=0,g=d.length;m<g;m++){var v=d[m],x=!1,y=v.matrix;if(0!=e){var M=y.a,w=y.c,E=y.b,b=y.d;(R=Math.atan2(h,s)+p)>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var T=Math.cos(R),S=Math.sin(R);y.a=T*M-S*E,y.c=T*w-S*b,y.b=S*M+T*E,y.d=S*w+T*b,x=!0}if(0!=n){var A=this.temp;a.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.tx+=A.x*n,y.ty+=A.y*n,x=!0}if(r>0){var I=(Math.sqrt(s*s+h*h)-1+this.data.offsetScaleX)*r+1;y.a*=I,y.b*=I,I=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleY)*r+1,y.c*=I,y.d*=I,x=!0}if(i>0){var R;(R=Math.atan2(u,l)-Math.atan2(h,s))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2);w=y.c,b=y.d;R=Math.atan2(b,w)+(R-t.MathUtils.PI/2+f)*i;I=Math.sqrt(w*w+b*b);y.c=Math.cos(R)*I,y.d=Math.sin(R)*I,x=!0}x&&(v.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o<s;o++){var l=a[o];l.appliedValid||l.updateAppliedTransform();var h=l.arotation;if(0!=t){var u=i.arotation-h+this.data.offsetRotation;h+=(u-=360*(16384-(16384.499999999996-u/360|0)))*t}var c=l.ax,p=l.ay;0!=e&&(c+=(i.ax-c+this.data.offsetX)*e,p+=(i.ay-p+this.data.offsetY)*e);var f=l.ascaleX,d=l.ascaleY;n>0&&(f>1e-5&&(f=(f+(i.ascaleX-f+this.data.offsetScaleX)*n)/f),d>1e-5&&(d=(d+(i.ascaleY-d+this.data.offsetScaleY)*n)/d));var m=l.ashearY;if(r>0){u=i.ashearY-m+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),l.shearY+=u*r}l.updateWorldTransformWith(c,p,h,f,d,l.ashearX,m)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o<s;o++){var l=a[o];l.appliedValid||l.updateAppliedTransform();var h=l.arotation;0!=t&&(h+=(i.arotation+this.data.offsetRotation)*t);var u=l.ax,c=l.ay;0!=e&&(u+=(i.ax+this.data.offsetX)*e,c+=(i.ay+this.data.offsetY)*e);var p=l.ascaleX,f=l.ascaleY;n>0&&(p>1e-5&&(p*=(i.ascaleX-1+this.data.offsetScaleX)*n+1),f>1e-5&&(f*=(i.ascaleY-1+this.data.offsetScaleY)*n+1));var d=l.ashearY;r>0&&(d+=(i.ashearY+this.data.offsetShearY)*r),l.updateWorldTransformWith(u,c,h,p,f,l.ashearX,d)}},e.prototype.getOrder=function(){return this.data.order},e}();t.TransformConstraint=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t){if(this.order=0,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,null==t)throw new Error("name cannot be null.");this.name=t}}();t.TransformConstraintData=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(){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(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var n=t,r=t.length>>1,i=this.indicesArray;i.length=0;for(var a=0;a<r;a++)i[a]=a;var o=this.isConcaveArray;o.length=0;a=0;for(var s=r;a<s;++a)o[a]=e.isConcave(a,r,n,i);var l=this.triangles;for(l.length=0;r>3;){for(var h=r-1,u=(a=0,1);;){t:if(!o[a]){for(var c=i[h]<<1,p=i[a]<<1,f=i[u]<<1,d=n[c],m=n[c+1],g=n[p],v=n[p+1],x=n[f],y=n[f+1],M=(u+1)%r;M!=h;M=(M+1)%r)if(o[M]){var w=i[M]<<1,E=n[w],b=n[w+1];if(e.positiveArea(x,y,d,m,E,b)&&e.positiveArea(d,m,g,v,E,b)&&e.positiveArea(g,v,x,y,E,b))break t}break}if(0==u){do{if(!o[a])break;a--}while(a>0);break}h=a,a=u,u=(u+1)%r}l.push(i[(r+a-1)%r]),l.push(i[a]),l.push(i[(a+1)%r]),i.splice(a,1),o.splice(a,1);var T=(--r+a-1)%r,S=a==r?0:a;o[T]=e.isConcave(T,r,n,i),o[S]=e.isConcave(S,r,n,i)}return 3==r&&(l.push(i[2]),l.push(i[0]),l.push(i[1])),l},e.prototype.decompose=function(t,n){var r=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var a=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(a),a.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var s=this.polygonPool.obtain();s.length=0;for(var l=-1,h=0,u=0,c=n.length;u<c;u+=3){var p=n[u]<<1,f=n[u+1]<<1,d=n[u+2]<<1,m=r[p],g=r[p+1],v=r[f],x=r[f+1],y=r[d],M=r[d+1],w=!1;if(l==p){var E=s.length-4,b=e.winding(s[E],s[E+1],s[E+2],s[E+3],y,M),T=e.winding(y,M,s[0],s[1],s[2],s[3]);b==h&&T==h&&(s.push(y),s.push(M),o.push(d),w=!0)}w||(s.length>0?(i.push(s),a.push(o)):(this.polygonPool.free(s),this.polygonIndicesPool.free(o)),(s=this.polygonPool.obtain()).length=0,s.push(m),s.push(g),s.push(v),s.push(x),s.push(y),s.push(M),(o=this.polygonIndicesPool.obtain()).length=0,o.push(p),o.push(f),o.push(d),h=e.winding(m,g,v,x,y,M),l=p)}s.length>0&&(i.push(s),a.push(o));for(u=0,c=i.length;u<c;u++)if(0!=(o=a[u]).length)for(var S=o[0],A=o[o.length-1],I=(s=i[u])[E=s.length-4],R=s[E+1],P=s[E+2],C=s[E+3],V=s[0],_=s[1],k=s[2],N=s[3],D=e.winding(I,R,P,C,V,_),X=0;X<c;X++)if(X!=u){var U=a[X];if(3==U.length){var O=U[0],Y=U[1],F=U[2],L=i[X];y=L[L.length-2],M=L[L.length-1];if(O==S&&Y==A){b=e.winding(I,R,P,C,y,M),T=e.winding(y,M,V,_,k,N);b==D&&T==D&&(L.length=0,U.length=0,s.push(y),s.push(M),o.push(F),I=P,R=C,P=y,C=M,X=0)}}}for(u=i.length-1;u>=0;u--)0==(s=i[u]).length&&(i.splice(u,1),this.polygonPool.free(s),o=a[u],a.splice(u,1),this.polygonIndicesPool.free(o));return i},e.isConcave=function(t,e,n,r){var i=r[(e+t-1)%e]<<1,a=r[t]<<1,o=r[(t+1)%e]<<1;return!this.positiveArea(n[i],n[i+1],n[a],n[a+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,r,i,a){return t*(a-r)+n*(e-a)+i*(r-e)>=0},e.winding=function(t,e,n,r,i,a){var o=n-t,s=r-e;return i*s-a*o+o*e-t*s>=0?1:-1},e}();t.Triangulator=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(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},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){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},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),i=e-t;return r<=(n-t)/i?t+Math.sqrt(r*i*(n-t)):e-Math.sqrt((1-r)*i*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var i=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=i;var a=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return __extends(e,t),e.prototype.applyInternal=function(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},e}(i);t.Pow=a;var o=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(a);t.PowOut=o;var s=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var a=e,o=r;a<e+i;a++,o++)n[o]=t[a]},t.setArraySize=function(t,e,n){void 0===n&&(n=0);var r=t.length;if(r==e)return t;if(t.length=e,r<e)for(var i=r;i<e;i++)t[i]=n;return t},t.ensureArrayCapacity=function(e,n,r){return void 0===r&&(r=0),e.length>=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n},t.newFloatArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.newShortArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.toFloatArray=function(e){return t.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e},t.toSinglePrecision=function(e){return t.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e},t.webkit602BugfixHelper=function(t,e){},t.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,t}();t.Utils=s;var l=function(){function t(){}return t.logBones=function(t){for(var e=0;e<t.bones.length;e++){var n=t.bones[e],r=n.matrix;console.log(n.data.name+", "+r.a+", "+r.b+", "+r.c+", "+r.d+", "+r.tx+", "+r.ty)}},t}();t.DebugUtils=l;var h=function(){function t(t){this.items=new Array,this.instantiator=t}return t.prototype.obtain=function(){return this.items.length>0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)t[e].reset&&t[e].reset(),this.items[e]=t[e]},t.prototype.clear=function(){this.items.length=0},t}();t.Pool=h;var u=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},t.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},t}();t.Vector2=u;var c=function(){function t(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}return t.prototype.update=function(){var 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}();t.TimeKeeper=c;var p=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(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},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,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},t}();t.WindowedMean=p}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){return function(t){if(null==t)throw new Error("name cannot be null.");this.name=t}}();t.Attachment=e;var n=function(t){function e(n){var r=t.call(this,n)||this;return r.id=(65535&e.nextID++)<<11,r.worldVerticesLength=0,r}return __extends(e,t),e.prototype.computeWorldVerticesOld=function(t,e){this.computeWorldVertices(t,0,this.worldVerticesLength,e,0,2)},e.prototype.computeWorldVertices=function(t,e,n,r,i,a){n=i+(n>>1)*a;var o=t.bone.skeleton,s=t.attachmentVertices,l=this.vertices,h=this.bones;if(null!=h){for(var u=0,c=0,p=0;p<e;p+=2){u+=(g=h[u])+1,c+=g}var f=o.bones;if(0==s.length)for(R=i,T=3*c;R<n;R+=a){var d=0,m=0,g=h[u++];for(g+=u;u<g;u++,T+=3){M=f[h[u]].matrix,P=l[T],C=l[T+1];var v=l[T+2];d+=(P*M.a+C*M.c+M.tx)*v,m+=(P*M.b+C*M.d+M.ty)*v}r[R]=d,r[R+1]=m}else for(var x=s,y=(R=i,T=3*c,c<<1);R<n;R+=a){d=0,m=0,g=h[u++];for(g+=u;u<g;u++,T+=3,y+=2){M=f[h[u]].matrix,P=l[T]+x[y],C=l[T+1]+x[y+1],v=l[T+2];d+=(P*M.a+C*M.c+M.tx)*v,m+=(P*M.b+C*M.d+M.ty)*v}r[R]=d,r[R+1]=m}}else{s.length>0&&(l=s);for(var M,w=(M=t.bone.matrix).tx,E=M.ty,b=M.a,T=M.c,S=M.b,A=M.d,I=e,R=i;R<n;I+=2,R+=a){var P=l[I],C=l[I+1];r[R]=P*b+C*T+w,r[R+1]=P*S+C*A+E}}},e.prototype.applyDeform=function(t){return this==t},e.nextID=0,e}(e);t.VertexAttachment=n}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){!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.AttachmentType||(t.AttachmentType={}))}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.color=new t.Color(1,1,1,1),r}return __extends(n,e),n}(t.VertexAttachment);t.BoundingBoxAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.color=new t.Color(.2275,.2275,.8078,1),r}return __extends(n,e),n}(t.VertexAttachment);t.ClippingAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.color=new t.Color(1,1,1,1),r.inheritDeform=!1,r.tempColor=new t.Color(0,0,0,0),r}return __extends(n,e),n.prototype.updateUVs=function(e,n){var r=this.regionUVs.length;if(n&&n.length==r||(n=t.Utils.newFloatArray(r)),null!=e){for(var i=e.texture._uvs,a=e.width,o=e.height,s=e.originalWidth,l=e.originalHeight,h=e.offsetX,u=e.pixiOffsetY,c=0;c<r;c+=2){var p=this.regionUVs[c],f=this.regionUVs[c+1];p=(p*s-h)/a,f=(f*l-u)/o,n[c]=(i.x0*(1-p)+i.x1*p)*(1-f)+(i.x3*(1-p)+i.x2*p)*f,n[c+1]=(i.y0*(1-p)+i.y1*p)*(1-f)+(i.y3*(1-p)+i.y2*p)*f}return n}},n.prototype.applyDeform=function(t){return this==t||this.inheritDeform&&this.parentMesh==t},n.prototype.getParentMesh=function(){return this.parentMesh},n.prototype.setParentMesh=function(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)},n}(t.VertexAttachment);t.MeshAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.closed=!1,r.constantSpeed=!1,r.color=new t.Color(1,1,1,1),r}return __extends(n,e),n}(t.VertexAttachment);t.PathAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.color=new t.Color(.38,.94,0,1),r}return __extends(n,e),n.prototype.computeWorldPosition=function(t,e){var n=t.matrix;return e.x=this.x*n.a+this.y*n.c+t.worldX,e.y=this.x*n.b+this.y*n.d+t.worldY,e},n.prototype.computeWorldRotation=function(e){var n=e.matrix,r=t.MathUtils.cosDeg(this.rotation),i=t.MathUtils.sinDeg(this.rotation),a=r*n.a+i*n.c,o=r*n.b+i*n.d;return Math.atan2(o,a)*t.MathUtils.radDeg},n}(t.VertexAttachment);t.PointAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(e){function n(n){var r=e.call(this,n)||this;return r.x=0,r.y=0,r.scaleX=1,r.scaleY=1,r.rotation=0,r.width=0,r.height=0,r.color=new t.Color(1,1,1,1),r.offset=t.Utils.newFloatArray(8),r.uvs=t.Utils.newFloatArray(8),r.tempColor=new t.Color(1,1,1,1),r}return __extends(n,e),n.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,r=-this.width/2*this.scaleX+this.region.offsetX*t,i=-this.height/2*this.scaleY+this.region.offsetY*e,a=r+this.region.width*t,o=i+this.region.height*e,s=this.rotation*Math.PI/180,l=Math.cos(s),h=Math.sin(s),u=r*l+this.x,c=r*h,p=i*l+this.y,f=i*h,d=a*l+this.x,m=a*h,g=o*l+this.y,v=o*h,x=this.offset;x[n.OX1]=u-f,x[n.OY1]=p+c,x[n.OX2]=u-v,x[n.OY2]=g+c,x[n.OX3]=d-v,x[n.OY3]=g+m,x[n.OX4]=d-f,x[n.OY4]=p+m},n.prototype.setRegion=function(t){this.region=t;var 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)},n.prototype.computeWorldVertices=function(t,e,r,i){var a=this.offset,o=t.matrix,s=o.tx,l=o.ty,h=o.a,u=o.c,c=o.b,p=o.d,f=0,d=0;f=a[n.OX1],d=a[n.OY1],e[r]=f*h+d*u+s,e[r+1]=f*c+d*p+l,r+=i,f=a[n.OX2],d=a[n.OY2],e[r]=f*h+d*u+s,e[r+1]=f*c+d*p+l,r+=i,f=a[n.OX3],d=a[n.OY3],e[r]=f*h+d*u+s,e[r+1]=f*c+d*p+l,r+=i,f=a[n.OX4],d=a[n.OY4],e[r]=f*h+d*u+s,e[r+1]=f*c+d*p+l},n.OX1=0,n.OY1=1,n.OX2=2,n.OY2=3,n.OX3=4,n.OY3=5,n.OX4=6,n.OY4=7,n.X1=0,n.Y1=1,n.C1R=2,n.C1G=3,n.C1B=4,n.C1A=5,n.U1=6,n.V1=7,n.X2=8,n.Y2=9,n.C2R=10,n.C2G=11,n.C2B=12,n.C2A=13,n.U2=14,n.V2=15,n.X3=16,n.Y3=17,n.C3R=18,n.C3G=19,n.C3B=20,n.C3A=21,n.U3=22,n.V3=23,n.X4=24,n.Y4=25,n.C4R=26,n.C4G=27,n.C4B=28,n.C4A=29,n.U4=30,n.V4=31,n}(t.Attachment);t.RegionAttachment=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}return e.prototype.begin=function(t){},e.prototype.transform=function(e,n,r,i){e.x+=t.MathUtils.randomTriangular(-this.jitterX,this.jitterY),e.y+=t.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},e.prototype.end=function(){},e}();t.JitterEffect=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){!function(t){var e=function(){function e(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}return e.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},e.prototype.transform=function(n,r,i,a){var o=this.angle*t.MathUtils.degreesToRadians,s=n.x-this.worldX,l=n.y-this.worldY,h=Math.sqrt(s*s+l*l);if(h<this.radius){var u=e.interpolation.apply(0,o,(this.radius-h)/this.radius),c=Math.cos(u),p=Math.sin(u);n.x=c*s-p*l+this.worldX,n.y=p*s+c*l+this.worldY}},e.prototype.end=function(){},e.interpolation=new t.PowOut(2),e}();t.SwirlEffect=e}(t.core||(t.core={}))}(pixi_spine||(pixi_spine={})),function(t){PIXI.spine=t;var e=PIXI.Texture.prototype;e._updateUvs||(e._updateUvs=e.updateUvs)}(pixi_spine||(pixi_spine={})),function(t){function e(){return function(e,i){if(!e.data||!function(t){return t.type===PIXI.loaders.Resource.TYPE.JSON}(e)||!e.data.bones)return i();var a=e.metadata||{},o=a?e.metadata.spineSkeletonScale:null,s=a?e.metadata.spineAtlas:null;if(!1===s)return i();if(s&&s.pages){var l=new t.core.SkeletonJson(new t.core.AtlasAttachmentLoader(s));o&&(l.scale=o);var h=l.readSkeletonData(e.data);return e.spineData=h,e.spineAtlas=s,i()}var u=a.spineAtlasSuffix||".atlas",c=e.url,p=c.indexOf("?");p>0&&(c=c.substr(0,p)),c=c.substr(0,c.lastIndexOf("."))+u,e.metadata&&e.metadata.spineAtlasFile&&(c=e.metadata.spineAtlasFile),c=c.replace(this.baseUrl,"");var f={crossOrigin:e.crossOrigin,xhrType:PIXI.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,metadata:a.spineMetadata||null,parentResource:e},d={crossOrigin:e.crossOrigin,metadata:a.imageMetadata||null,parentResource:e},m=e.url.substr(0,e.url.lastIndexOf("/")+1);m=m.replace(this.baseUrl,"");var g=a.imageNamePrefix||e.name+"_atlas_page_",v=a.images?r(a.images):a.image?r({default:a.image}):a.imageLoader?a.imageLoader(this,g,m,d):n(this,g,m,d),x=function(n){new t.core.TextureAtlas(n,v,function(n){var r=new t.core.SkeletonJson(new t.core.AtlasAttachmentLoader(n));o&&(r.scale=o),e.spineData=r.readSkeletonData(e.data),e.spineAtlas=n,i()})};e.metadata&&e.metadata.atlasRawData?x(e.metadata.atlasRawData):this.add(e.name+"_atlas",c,f,function(t){t.error?i():x(t.data)})}}function n(t,e,n,r){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(i,a){var o=e+i,s=n+i,l=t.resources[o];if(l){function h(){a(l.texture.baseTexture)}l.texture?h():l.onAfterMiddleware.add(h)}else t.add(o,s,r,function(t){a(t.texture.baseTexture)})}}function r(t){return function(e,n){var r=t[e]||t.default;r&&r.baseTexture?n(r.baseTexture):n(r)}}t.atlasParser=e,t.imageLoaderAdapter=n,t.syncImageLoaderAdapter=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}},t.staticImageLoader=r,PIXI.loaders.Loader&&(PIXI.loaders.Loader.addPixiMiddleware(e),PIXI.loader.use(e()))}(pixi_spine||(pixi_spine={})),function(){var t;Math.fround||(Math.fround=Math.fround=(t=new Float32Array(1),function(e){return t[0]=e,t[0]}))}(),function(t){t.core.Bone.yDown=!0;var e=[0,0,0],n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.region=null,e}return __extends(e,t),e}(PIXI.Sprite);t.SpineSprite=n;var r=function(t){function e(e,n,r,i,a){return t.call(this,e,n,r,i,a)||this}return __extends(e,t),e}(PIXI.mesh.Mesh);t.SpineMesh=r;var i=function(i){function o(e){var n=i.call(this)||this;if(!e)throw new Error("The spineData param is required.");if("string"==typeof e)throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');n.spineData=e,n.skeleton=new t.core.Skeleton(e),n.skeleton.updateWorldTransform(),n.stateData=new t.core.AnimationStateData(e),n.state=new t.core.AnimationState(n.stateData),n.slotContainers=[],n.tempClipContainers=[];for(var r=0,a=n.skeleton.slots.length;r<a;r++){var o=n.skeleton.slots[r],s=o.attachment,l=n.newContainer();if(n.slotContainers.push(l),n.addChild(l),n.tempClipContainers.push(null),s instanceof t.core.RegionAttachment){var h=s.region.name,u=n.createSprite(o,s,h);o.currentSprite=u,o.currentSpriteName=h,l.addChild(u)}else if(s instanceof t.core.MeshAttachment){var c=n.createMesh(o,s);o.currentMesh=c,o.currentMeshName=s.name,l.addChild(c)}else{if(!(s instanceof t.core.ClippingAttachment))continue;n.createGraphics(o,s),l.addChild(o.clippingContainer),l.addChild(o.currentGraphics)}}return n.autoUpdate=!0,n.tintRgb=new Float32Array([1,1,1]),n}return __extends(o,i),Object.defineProperty(o.prototype,"autoUpdate",{get:function(){return this.updateTransform===o.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?o.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"tint",{get:function(){return PIXI.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=PIXI.utils.hex2rgb(t,this.tintRgb)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"delayLimit",{get:function(){return(void 0!==this.localDelayLimit?this.localDelayLimit:o.globalDelayLimit)||Number.MAX_VALUE},enumerable:!0,configurable:!0}),o.prototype.update=function(n){var r=this.delayLimit;n>r&&(n=r),this.state.update(n),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();var i=this.skeleton.slots,o=this.color,s=null,l=null;o?(s=o.light,l=o.dark):s=this.tintRgb;for(var h=PIXI.TransformBase&&1==this.transformHack(),u=0,c=i.length;u<c;u++){var p=(_=i[u]).attachment,f=this.slotContainers[u];if(p){var d=null,m=p.color;if(p instanceof t.core.RegionAttachment){var g=p.region;if(g){_.currentMesh&&(_.currentMesh.visible=!1,_.currentMesh=null,_.currentMeshName=void 0);var v=g;if(!_.currentSpriteName||_.currentSpriteName!==v.name){var x=v.name;if(_.currentSprite&&(_.currentSprite.visible=!1),_.sprites=_.sprites||{},void 0!==_.sprites[x])_.sprites[x].visible=!0;else{var y=this.createSprite(_,p,x);f.addChild(y)}_.currentSprite=_.sprites[x],_.currentSpriteName=x}}if(f.transform){var M=E=f.transform,w=null;M.matrix2d?(w=M.matrix2d,M._dirtyVersion++,M.version=M._dirtyVersion,M.isStatic=!0,M.operMode=0):h?(M.position&&((E=new PIXI.TransformBase)._parentID=-1,E._worldID=f.transform._worldID,f.transform=E),w=E.localTransform):M.setFromMatrix(_.bone.matrix),w&&_.bone.matrix.copy(w)}else{w=f.localTransform||new PIXI.Matrix;_.bone.matrix.copy(w),f.localTransform=w,f.displayObjectUpdateTransform=a}_.currentSprite.color?d=_.currentSprite.color:(e[0]=s[0]*_.color.r*m.r,e[1]=s[1]*_.color.g*m.g,e[2]=s[2]*_.color.b*m.b,_.currentSprite.tint=PIXI.utils.rgb2hex(e)),_.currentSprite.blendMode=_.blendMode}else if(p instanceof t.core.MeshAttachment){var E;if(_.currentSprite)if(_.currentSprite.visible=!1,_.currentSprite=null,_.currentSpriteName=void 0,f.transform)(E=new PIXI.TransformStatic)._parentID=-1,E._worldID=f.transform._worldID,f.transform=E;else f.localTransform=new PIXI.Matrix,f.displayObjectUpdateTransform=PIXI.DisplayObject.prototype.updateTransform;if(!_.currentMeshName||_.currentMeshName!==p.name){var b=p.name;if(_.currentMesh&&(_.currentMesh.visible=!1),_.meshes=_.meshes||{},void 0!==_.meshes[b])_.meshes[b].visible=!0;else{var T=this.createMesh(_,p);f.addChild(T)}_.currentMesh=_.meshes[b],_.currentMeshName=b}if(p.computeWorldVerticesOld(_,_.currentMesh.vertices),_.currentMesh.color)d=_.currentMesh.color;else if("3"!==PIXI.VERSION[0]){var S=_.currentMesh.tintRgb;S[0]=s[0]*_.color.r*m.r,S[1]=s[1]*_.color.g*m.g,S[2]=s[2]*_.color.b*m.b}_.currentMesh.blendMode=_.blendMode}else{if(!(p instanceof t.core.ClippingAttachment)){f.visible=!1;continue}_.currentGraphics||(this.createGraphics(_,p),f.addChild(_.clippingContainer),f.addChild(_.currentGraphics)),this.updateGraphics(_,p)}if(f.visible=!0,d){var A=_.color.r*m.r,I=_.color.g*m.g,R=_.color.b*m.b;d.setLight(s[0]*A+l[0]*(1-A),s[1]*I+l[1]*(1-I),s[2]*R+l[2]*(1-R)),_.darkColor?(A=_.darkColor.r,I=_.darkColor.g,R=_.darkColor.b):(A=0,I=0,R=0),d.setDark(s[0]*A+l[0]*(1-A),s[1]*I+l[1]*(1-I),s[2]*R+l[2]*(1-R))}f.alpha=_.color.a}else f.visible=!1}var P=this.skeleton.drawOrder,C=null,V=null;for(u=0,c=P.length;u<c;u++){var _=i[P[u].data.index];f=this.slotContainers[P[u].data.index];if(V||null!==f.parent&&f.parent!==this&&(f.parent.removeChild(f),f.parent=this),_.currentGraphics&&_.attachment)V=_.clippingContainer,C=_.attachment,V.children.length=0,this.children[u]=f,C.endSlot==_.data&&(C.endSlot=null);else if(V){var k=this.tempClipContainers[u];k||((k=this.tempClipContainers[u]=this.newContainer()).visible=!1),this.children[u]=k,f.parent=null,V.addChild(f),C.endSlot==_.data&&(V.renderable=!0,V=null,C=null)}else this.children[u]=f}},o.prototype.setSpriteRegion=function(t,e,n){e.region=n,e.texture=n.texture,n.size?(e.scale.x=n.size.width/n.originalWidth,e.scale.y=-n.size.height/n.originalHeight):(e.scale.x=t.scaleX*t.width/n.originalWidth,e.scale.y=-t.scaleY*t.height/n.originalHeight)},o.prototype.setMeshRegion=function(t,e,n){e.region=n,e.texture=n.texture,n.texture._updateUvs(),t.updateUVs(n,e.uvs),e.dirty++},o.prototype.autoUpdateTransform=function(){if(o.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},o.prototype.createSprite=function(e,n,r){var i=n.region;e.tempAttachment===n&&(i=e.tempRegion,e.tempAttachment=null,e.tempRegion=null);var a=i.texture,o=this.newSprite(a);return o.rotation=n.rotation*t.core.MathUtils.degRad,o.anchor.x=.5,o.anchor.y=.5,o.position.x=n.x,o.position.y=n.y,o.alpha=n.color.a,o.region=n.region,this.setSpriteRegion(n,o,n.region),e.sprites=e.sprites||{},e.sprites[r]=o,o},o.prototype.createMesh=function(t,e){var n=e.region;t.tempAttachment===e&&(n=t.tempRegion,t.tempAttachment=null,t.tempRegion=null);var r=this.newMesh(n.texture,new Float32Array(e.regionUVs.length),new Float32Array(e.regionUVs.length),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.color.a,r.region=e.region,this.setMeshRegion(e,r,n),t.meshes=t.meshes||{},t.meshes[e.name]=r,r},o.prototype.createGraphics=function(t,e){var n=this.newGraphics(),r=new PIXI.Polygon([]);return n.clear(),n.beginFill(16777215,1),n.drawPolygon(r),n.renderable=!1,t.currentGraphics=n,t.clippingContainer=this.newContainer(),t.clippingContainer.mask=t.currentGraphics,n},o.prototype.updateGraphics=function(t,e){var n=t.currentGraphics.graphicsData[0].shape.points,r=e.worldVerticesLength;n.length=r,e.computeWorldVertices(t,0,r,n,0,2),t.currentGraphics.dirty++,t.currentGraphics.clearDirty++},o.prototype.hackTextureBySlotIndex=function(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=this.skeleton.slots[e];if(!i)return!1;var a=i.attachment,o=a.region;return n&&((o=new t.core.TextureRegion).texture=n,o.size=r),i.currentSprite&&i.currentSprite.region!=o?(this.setSpriteRegion(a,i.currentSprite,o),i.currentSprite.region=o):i.currentMesh&&i.currentMesh.region!=o?this.setMeshRegion(a,i.currentMesh,o):(i.tempRegion=o,i.tempAttachment=a),!0},o.prototype.hackTextureBySlotName=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.skeleton.findSlotIndex(t);return-1!=r&&this.hackTextureBySlotIndex(r,e,n)},o.prototype.newContainer=function(){return new PIXI.Container},o.prototype.newSprite=function(t){return new n(t)},o.prototype.newGraphics=function(){return new PIXI.Graphics},o.prototype.newMesh=function(t,e,n,i,a){return new r(t,e,n,i,a)},o.prototype.transformHack=function(){return 1},o.prototype.hackAttachmentGroups=function(t,e,n){if(t){for(var r=[],i=[],a=0,o=this.skeleton.slots.length;a<o;a++){var s=this.skeleton.slots[a],l=s.currentSpriteName||s.currentMeshName||"",h=s.currentSprite||s.currentMesh;l.endsWith(t)?(h.parentGroup=e,i.push(h)):n&&h&&(h.parentGroup=n,r.push(h))}return[r,i]}},o.prototype.destroy=function(t){for(var e=0,n=this.skeleton.slots.length;e<n;e++){var r=this.skeleton.slots[e];for(var a in r.meshes)r.meshes[a].destroy(t);for(var o in r.meshes=null,r.sprites)r.sprites[o].destroy(t);r.sprites=null}for(e=0,n=this.slotContainers.length;e<n;e++)this.slotContainers[e].destroy(t);this.spineData=null,this.skeleton=null,this.slotContainers=null,this.stateData=null,this.state=null,this.tempClipContainers=null,i.prototype.destroy.call(this,t)},o.globalAutoUpdate=!0,o.globalDelayLimit=0,o.clippingPolygon=[],o}(PIXI.Container);function a(){var t=this.parent.worldTransform,e=this.worldTransform,n=this.localTransform;e.a=n.a*t.a+n.b*t.c,e.b=n.a*t.b+n.b*t.d,e.c=n.c*t.a+n.d*t.c,e.d=n.c*t.b+n.d*t.d,e.tx=n.tx*t.a+n.ty*t.c+t.tx,e.ty=n.tx*t.b+n.ty*t.d+t.ty,this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null}t.Spine=i}(pixi_spine||(pixi_spine={}));